You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							30 lines
						
					
					
						
							645 B
						
					
					
				
			
		
		
	
	
							30 lines
						
					
					
						
							645 B
						
					
					
				"use strict";
 | 
						|
 | 
						|
Object.defineProperty(exports, "__esModule", {
 | 
						|
  value: true
 | 
						|
});
 | 
						|
exports.buildActionCallApiTrigger = void 0;
 | 
						|
 | 
						|
var _callActionApi = require("./call-action-api");
 | 
						|
 | 
						|
/* eslint-disable arrow-parens */
 | 
						|
const buildActionCallApiTrigger = options => {
 | 
						|
  const {
 | 
						|
    action,
 | 
						|
    params,
 | 
						|
    actionResponseHandler,
 | 
						|
    search
 | 
						|
  } = options;
 | 
						|
 | 
						|
  const callApi = () => {
 | 
						|
    const promise = (0, _callActionApi.callActionApi)(action, params, search);
 | 
						|
    promise.then(actionResponseHandler).catch(error => {
 | 
						|
      throw error;
 | 
						|
    });
 | 
						|
    return promise;
 | 
						|
  };
 | 
						|
 | 
						|
  return callApi;
 | 
						|
};
 | 
						|
 | 
						|
exports.buildActionCallApiTrigger = buildActionCallApiTrigger; |