@livechat/platform-workflows 0.0.49 → 0.0.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +951 -601
- package/dist/index.mjs +962 -618
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -262,7 +262,7 @@ var require_react_is_development = __commonJS({
|
|
|
262
262
|
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
263
263
|
var Element = REACT_ELEMENT_TYPE;
|
|
264
264
|
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
265
|
-
var
|
|
265
|
+
var Fragment17 = REACT_FRAGMENT_TYPE;
|
|
266
266
|
var Lazy = REACT_LAZY_TYPE;
|
|
267
267
|
var Memo = REACT_MEMO_TYPE;
|
|
268
268
|
var Portal = REACT_PORTAL_TYPE;
|
|
@@ -321,7 +321,7 @@ var require_react_is_development = __commonJS({
|
|
|
321
321
|
exports2.ContextProvider = ContextProvider;
|
|
322
322
|
exports2.Element = Element;
|
|
323
323
|
exports2.ForwardRef = ForwardRef;
|
|
324
|
-
exports2.Fragment =
|
|
324
|
+
exports2.Fragment = Fragment17;
|
|
325
325
|
exports2.Lazy = Lazy;
|
|
326
326
|
exports2.Memo = Memo;
|
|
327
327
|
exports2.Portal = Portal;
|
|
@@ -484,20 +484,22 @@ module.exports = __toCommonJS(src_exports);
|
|
|
484
484
|
|
|
485
485
|
// src/config.ts
|
|
486
486
|
var import_developer_studio_ui_react = require("@livechat/developer-studio-ui-react");
|
|
487
|
-
var
|
|
487
|
+
var configBase = {
|
|
488
488
|
env: "labs"
|
|
489
489
|
};
|
|
490
|
+
var config = getWorkflowsConfig(configBase);
|
|
490
491
|
function setWorkflowsConfig(newConfig) {
|
|
491
|
-
|
|
492
|
+
configBase = __spreadValues(__spreadValues({}, configBase), newConfig);
|
|
492
493
|
(0, import_developer_studio_ui_react.setConfig)({
|
|
493
|
-
env:
|
|
494
|
-
basePath:
|
|
494
|
+
env: configBase.env,
|
|
495
|
+
basePath: configBase.basePath
|
|
495
496
|
});
|
|
497
|
+
config = getWorkflowsConfig(configBase);
|
|
496
498
|
}
|
|
497
|
-
function getWorkflowsConfig() {
|
|
498
|
-
const isProd =
|
|
499
|
-
const coreConfig = (0, import_developer_studio_ui_react.getConfig)();
|
|
500
|
-
return __spreadProps(__spreadValues(__spreadValues({}, coreConfig),
|
|
499
|
+
function getWorkflowsConfig(base) {
|
|
500
|
+
const isProd = base.env === "prod";
|
|
501
|
+
const coreConfig = (0, import_developer_studio_ui_react.getConfig)(base);
|
|
502
|
+
return __spreadProps(__spreadValues(__spreadValues({}, coreConfig), configBase), {
|
|
501
503
|
// Authorization
|
|
502
504
|
accountsClientId: isProd ? "381b682538d896b6a25f54caf1805650" : "bc52b2c51dc4a5c2491ca49eaa7354d0",
|
|
503
505
|
// Workflows
|
|
@@ -510,7 +512,7 @@ function getWorkflowsConfig() {
|
|
|
510
512
|
});
|
|
511
513
|
}
|
|
512
514
|
var getWorkflowsEnv = (key) => {
|
|
513
|
-
return
|
|
515
|
+
return config[key];
|
|
514
516
|
};
|
|
515
517
|
|
|
516
518
|
// ../../../node_modules/.pnpm/@emotion+react@11.13.3_@types+react@18.2.5_react@18.2.0/node_modules/@emotion/react/dist/emotion-element-b4c8b265.esm.js
|
|
@@ -1993,7 +1995,7 @@ var PRODUCT_NAMES = {
|
|
|
1993
1995
|
};
|
|
1994
1996
|
|
|
1995
1997
|
// src/views/Flows/Definitions/Mocks/System/index.ts
|
|
1996
|
-
var systemTaskConfigs = {
|
|
1998
|
+
var systemTaskConfigs = () => ({
|
|
1997
1999
|
[import_developer_studio_api2.WorkflowDefinitionTaskType.http]: {
|
|
1998
2000
|
key: import_developer_studio_api2.WorkflowDefinitionTaskType.http,
|
|
1999
2001
|
type: "other",
|
|
@@ -2064,7 +2066,7 @@ var systemTaskConfigs = {
|
|
|
2064
2066
|
},
|
|
2065
2067
|
specification: {}
|
|
2066
2068
|
}
|
|
2067
|
-
};
|
|
2069
|
+
});
|
|
2068
2070
|
var workflowForkTask = {
|
|
2069
2071
|
name: "fork",
|
|
2070
2072
|
type: "FORK_JOIN",
|
|
@@ -2122,7 +2124,7 @@ var workflowHttpTask = {
|
|
|
2122
2124
|
}
|
|
2123
2125
|
}
|
|
2124
2126
|
};
|
|
2125
|
-
var systemTaskTemplates = {
|
|
2127
|
+
var systemTaskTemplates = () => ({
|
|
2126
2128
|
[import_developer_studio_api2.WorkflowDefinitionTaskType.http]: workflowHttpTask,
|
|
2127
2129
|
[import_developer_studio_api2.WorkflowDefinitionTaskType.switch]: workflowSwitchTask,
|
|
2128
2130
|
[import_developer_studio_api2.WorkflowDefinitionTaskType.forkJoin]: workflowForkTask,
|
|
@@ -2132,8 +2134,8 @@ var systemTaskTemplates = {
|
|
|
2132
2134
|
[import_developer_studio_api2.WorkflowDefinitionTaskType.addNode]: workflowAddNodeTask,
|
|
2133
2135
|
[import_developer_studio_api2.WorkflowDefinitionTaskType.addTrigger]: workflowAddTriggerTask,
|
|
2134
2136
|
[import_developer_studio_api2.WorkflowDefinitionTaskType.trigger]: workflowTriggerTask
|
|
2135
|
-
};
|
|
2136
|
-
var systemTriggerConfigs = {
|
|
2137
|
+
});
|
|
2138
|
+
var systemTriggerConfigs = () => ({
|
|
2137
2139
|
["scheduled" /* Scheduled */]: {
|
|
2138
2140
|
key: "scheduled" /* Scheduled */,
|
|
2139
2141
|
type: "system",
|
|
@@ -2173,8 +2175,8 @@ var systemTriggerConfigs = {
|
|
|
2173
2175
|
output: {}
|
|
2174
2176
|
}
|
|
2175
2177
|
}
|
|
2176
|
-
};
|
|
2177
|
-
var systemTriggerTemplates = {
|
|
2178
|
+
});
|
|
2179
|
+
var systemTriggerTemplates = () => ({
|
|
2178
2180
|
["manual" /* Manual */]: {
|
|
2179
2181
|
type: "manual_only"
|
|
2180
2182
|
},
|
|
@@ -2182,10 +2184,9 @@ var systemTriggerTemplates = {
|
|
|
2182
2184
|
type: "recurring",
|
|
2183
2185
|
schedule: "* * * * *"
|
|
2184
2186
|
}
|
|
2185
|
-
};
|
|
2187
|
+
});
|
|
2186
2188
|
|
|
2187
2189
|
// src/views/Flows/Definitions/Mocks/BigCommerce/index.ts
|
|
2188
|
-
var config2 = getWorkflowsConfig();
|
|
2189
2190
|
var bigCommerceProductBody = {
|
|
2190
2191
|
id: {
|
|
2191
2192
|
type: "number",
|
|
@@ -2521,11 +2522,13 @@ var bigCommerceCustomerResponse = {
|
|
|
2521
2522
|
}
|
|
2522
2523
|
}
|
|
2523
2524
|
};
|
|
2524
|
-
var bigCommerceTaskConfigs = {
|
|
2525
|
+
var bigCommerceTaskConfigs = () => ({
|
|
2525
2526
|
["BIGCOMMERCE_CREATE_BLOG_POST" /* CreateBlogPost */]: {
|
|
2526
2527
|
key: "BIGCOMMERCE_CREATE_BLOG_POST" /* CreateBlogPost */,
|
|
2527
2528
|
type: import_developer_studio_api3.WorkflowDefinitionTaskType.http,
|
|
2528
|
-
url: `${
|
|
2529
|
+
url: `${getWorkflowsEnv(
|
|
2530
|
+
"workflowsApiUr"
|
|
2531
|
+
)}/functions/create-bigcommerce-blog-post`,
|
|
2529
2532
|
customization: {
|
|
2530
2533
|
provider: import_developer_studio_api3.IntegrationNames.BigCommerce,
|
|
2531
2534
|
product: import_developer_studio_api3.IntegrationDisplayNames.BigCommerce,
|
|
@@ -2648,7 +2651,9 @@ var bigCommerceTaskConfigs = {
|
|
|
2648
2651
|
["BIGCOMMERCE_CREATE_CUSTOMER" /* CreateCustomer */]: {
|
|
2649
2652
|
key: "BIGCOMMERCE_CREATE_CUSTOMER" /* CreateCustomer */,
|
|
2650
2653
|
type: import_developer_studio_api3.WorkflowDefinitionTaskType.http,
|
|
2651
|
-
url: `${
|
|
2654
|
+
url: `${getWorkflowsEnv(
|
|
2655
|
+
"workflowsApiUr"
|
|
2656
|
+
)}/functions/create-bigcommerce-customer`,
|
|
2652
2657
|
customization: {
|
|
2653
2658
|
provider: import_developer_studio_api3.IntegrationNames.BigCommerce,
|
|
2654
2659
|
product: import_developer_studio_api3.IntegrationDisplayNames.BigCommerce,
|
|
@@ -2681,7 +2686,9 @@ var bigCommerceTaskConfigs = {
|
|
|
2681
2686
|
["BIGCOMMERCE_UPDATE_CUSTOMER" /* UpdateCustomer */]: {
|
|
2682
2687
|
key: "BIGCOMMERCE_UPDATE_CUSTOMER" /* UpdateCustomer */,
|
|
2683
2688
|
type: import_developer_studio_api3.WorkflowDefinitionTaskType.http,
|
|
2684
|
-
url: `${
|
|
2689
|
+
url: `${getWorkflowsEnv(
|
|
2690
|
+
"workflowsApiUr"
|
|
2691
|
+
)}/functions/update-bigcommerce-customer`,
|
|
2685
2692
|
customization: {
|
|
2686
2693
|
provider: import_developer_studio_api3.IntegrationNames.BigCommerce,
|
|
2687
2694
|
product: import_developer_studio_api3.IntegrationDisplayNames.BigCommerce,
|
|
@@ -2712,7 +2719,9 @@ var bigCommerceTaskConfigs = {
|
|
|
2712
2719
|
["BIGCOMMERCE_CREATE_PRODUCT" /* CreateProduct */]: {
|
|
2713
2720
|
key: "BIGCOMMERCE_CREATE_PRODUCT" /* CreateProduct */,
|
|
2714
2721
|
type: import_developer_studio_api3.WorkflowDefinitionTaskType.http,
|
|
2715
|
-
url: `${
|
|
2722
|
+
url: `${getWorkflowsEnv(
|
|
2723
|
+
"workflowsApiUr"
|
|
2724
|
+
)}/functions/create-bigcommerce-product`,
|
|
2716
2725
|
customization: {
|
|
2717
2726
|
provider: import_developer_studio_api3.IntegrationNames.BigCommerce,
|
|
2718
2727
|
product: import_developer_studio_api3.IntegrationDisplayNames.BigCommerce,
|
|
@@ -2742,7 +2751,9 @@ var bigCommerceTaskConfigs = {
|
|
|
2742
2751
|
["BIGCOMMERCE_CREATE_CUSTOMER_ADDRESS" /* CreateCustomerAddress */]: {
|
|
2743
2752
|
key: "BIGCOMMERCE_CREATE_CUSTOMER_ADDRESS" /* CreateCustomerAddress */,
|
|
2744
2753
|
type: import_developer_studio_api3.WorkflowDefinitionTaskType.http,
|
|
2745
|
-
url: `${
|
|
2754
|
+
url: `${getWorkflowsEnv(
|
|
2755
|
+
"workflowsApiUr"
|
|
2756
|
+
)}/functions/create-bigcommerce-customer-address`,
|
|
2746
2757
|
customization: {
|
|
2747
2758
|
provider: import_developer_studio_api3.IntegrationNames.BigCommerce,
|
|
2748
2759
|
product: import_developer_studio_api3.IntegrationDisplayNames.BigCommerce,
|
|
@@ -2787,7 +2798,9 @@ var bigCommerceTaskConfigs = {
|
|
|
2787
2798
|
["BIGCOMMERCE_GET_CUSTOMER" /* GetCustomer */]: {
|
|
2788
2799
|
key: "BIGCOMMERCE_GET_CUSTOMER" /* GetCustomer */,
|
|
2789
2800
|
type: import_developer_studio_api3.WorkflowDefinitionTaskType.http,
|
|
2790
|
-
url: `${
|
|
2801
|
+
url: `${getWorkflowsEnv(
|
|
2802
|
+
"workflowsApiUr"
|
|
2803
|
+
)}/functions/get-bigcommerce-customer`,
|
|
2791
2804
|
customization: {
|
|
2792
2805
|
provider: import_developer_studio_api3.IntegrationNames.BigCommerce,
|
|
2793
2806
|
product: import_developer_studio_api3.IntegrationDisplayNames.BigCommerce,
|
|
@@ -2820,7 +2833,9 @@ var bigCommerceTaskConfigs = {
|
|
|
2820
2833
|
["BIGCOMMERCE_GET_CUSTOMER_ADDRESSES" /* GetCustomerAddresses */]: {
|
|
2821
2834
|
key: "BIGCOMMERCE_GET_CUSTOMER_ADDRESSES" /* GetCustomerAddresses */,
|
|
2822
2835
|
type: import_developer_studio_api3.WorkflowDefinitionTaskType.http,
|
|
2823
|
-
url: `${
|
|
2836
|
+
url: `${getWorkflowsEnv(
|
|
2837
|
+
"workflowsApiUr"
|
|
2838
|
+
)}/functions/get-bigcommerce-customer-address`,
|
|
2824
2839
|
customization: {
|
|
2825
2840
|
provider: import_developer_studio_api3.IntegrationNames.BigCommerce,
|
|
2826
2841
|
product: import_developer_studio_api3.IntegrationDisplayNames.BigCommerce,
|
|
@@ -2852,7 +2867,9 @@ var bigCommerceTaskConfigs = {
|
|
|
2852
2867
|
["BIGCOMMERCE_GET_PRODUCTS" /* GetProducts */]: {
|
|
2853
2868
|
key: "BIGCOMMERCE_GET_PRODUCTS" /* GetProducts */,
|
|
2854
2869
|
type: import_developer_studio_api3.WorkflowDefinitionTaskType.http,
|
|
2855
|
-
url: `${
|
|
2870
|
+
url: `${getWorkflowsEnv(
|
|
2871
|
+
"workflowsApiUr"
|
|
2872
|
+
)}/functions/get-bigcommerce-products`,
|
|
2856
2873
|
customization: {
|
|
2857
2874
|
provider: import_developer_studio_api3.IntegrationNames.BigCommerce,
|
|
2858
2875
|
product: import_developer_studio_api3.IntegrationDisplayNames.BigCommerce,
|
|
@@ -2871,14 +2888,16 @@ var bigCommerceTaskConfigs = {
|
|
|
2871
2888
|
})
|
|
2872
2889
|
}
|
|
2873
2890
|
}
|
|
2874
|
-
};
|
|
2875
|
-
var bigCommerceTaskTemplates = {
|
|
2891
|
+
});
|
|
2892
|
+
var bigCommerceTaskTemplates = () => ({
|
|
2876
2893
|
["BIGCOMMERCE_CREATE_BLOG_POST" /* CreateBlogPost */]: __spreadProps(__spreadValues({}, workflowHttpTask), {
|
|
2877
2894
|
name: "BIGCOMMERCE_CREATE_BLOG_POST" /* CreateBlogPost */,
|
|
2878
2895
|
taskReferenceName: "bigcommerce_create_blog_post",
|
|
2879
2896
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
2880
2897
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
2881
|
-
uri: `${
|
|
2898
|
+
uri: `${getWorkflowsEnv(
|
|
2899
|
+
"workflowsApiUr"
|
|
2900
|
+
)}/functions/create-bigcommerce-blog-post`,
|
|
2882
2901
|
method: "POST",
|
|
2883
2902
|
body: {
|
|
2884
2903
|
title: "Blog post title",
|
|
@@ -2897,7 +2916,9 @@ var bigCommerceTaskTemplates = {
|
|
|
2897
2916
|
taskReferenceName: "bigcommerce_create_customer",
|
|
2898
2917
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
2899
2918
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
2900
|
-
uri: `${
|
|
2919
|
+
uri: `${getWorkflowsEnv(
|
|
2920
|
+
"workflowsApiUr"
|
|
2921
|
+
)}/functions/create-bigcommerce-customer`,
|
|
2901
2922
|
method: "POST",
|
|
2902
2923
|
body: {
|
|
2903
2924
|
first_name: "#{first_name}",
|
|
@@ -2917,7 +2938,9 @@ var bigCommerceTaskTemplates = {
|
|
|
2917
2938
|
taskReferenceName: "bigcommerce_update_customer",
|
|
2918
2939
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
2919
2940
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
2920
|
-
uri: `${
|
|
2941
|
+
uri: `${getWorkflowsEnv(
|
|
2942
|
+
"workflowsApiUr"
|
|
2943
|
+
)}/functions/update-bigcommerce-customer`,
|
|
2921
2944
|
method: "PATCH",
|
|
2922
2945
|
body: {
|
|
2923
2946
|
id: "#{customer_id}"
|
|
@@ -2935,7 +2958,9 @@ var bigCommerceTaskTemplates = {
|
|
|
2935
2958
|
taskReferenceName: "bigcommerce_create_product",
|
|
2936
2959
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
2937
2960
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
2938
|
-
uri: `${
|
|
2961
|
+
uri: `${getWorkflowsEnv(
|
|
2962
|
+
"workflowsApiUr"
|
|
2963
|
+
)}/functions/create-bigcommerce-product`,
|
|
2939
2964
|
method: "POST",
|
|
2940
2965
|
body: {
|
|
2941
2966
|
name: "Product name",
|
|
@@ -2956,7 +2981,9 @@ var bigCommerceTaskTemplates = {
|
|
|
2956
2981
|
taskReferenceName: "bigcommerce_create_customer_address",
|
|
2957
2982
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
2958
2983
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
2959
|
-
uri: `${
|
|
2984
|
+
uri: `${getWorkflowsEnv(
|
|
2985
|
+
"workflowsApiUr"
|
|
2986
|
+
)}/functions/create-bigcommerce-customer-address`,
|
|
2960
2987
|
method: "POST",
|
|
2961
2988
|
body: {
|
|
2962
2989
|
customer_id: "#{customer_id}",
|
|
@@ -2984,7 +3011,9 @@ var bigCommerceTaskTemplates = {
|
|
|
2984
3011
|
taskReferenceName: "bigcommerce_get_customer",
|
|
2985
3012
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
2986
3013
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
2987
|
-
uri: `${
|
|
3014
|
+
uri: `${getWorkflowsEnv(
|
|
3015
|
+
"workflowsApiUr"
|
|
3016
|
+
)}/functions/get-bigcommerce-customer?customer_id=#{customer_id}&customer_email=#{customer_email}`,
|
|
2988
3017
|
method: "GET",
|
|
2989
3018
|
headers: {
|
|
2990
3019
|
Accept: "application/json",
|
|
@@ -2999,7 +3028,9 @@ var bigCommerceTaskTemplates = {
|
|
|
2999
3028
|
taskReferenceName: "bigcommerce_get_customer_addresses",
|
|
3000
3029
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
3001
3030
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
3002
|
-
uri: `${
|
|
3031
|
+
uri: `${getWorkflowsEnv(
|
|
3032
|
+
"workflowsApiUr"
|
|
3033
|
+
)}/functions/get-bigcommerce-customer-addresses?customer_id=#{customer_id}`,
|
|
3003
3034
|
method: "GET",
|
|
3004
3035
|
headers: {
|
|
3005
3036
|
Accept: "application/json",
|
|
@@ -3014,7 +3045,9 @@ var bigCommerceTaskTemplates = {
|
|
|
3014
3045
|
taskReferenceName: "bigcommerce_get_products",
|
|
3015
3046
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
3016
3047
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
3017
|
-
uri: `${
|
|
3048
|
+
uri: `${getWorkflowsEnv(
|
|
3049
|
+
"workflowsApiUr"
|
|
3050
|
+
)}/functions/get-bigcommerce-products?limit=200&page=1`,
|
|
3018
3051
|
method: "GET",
|
|
3019
3052
|
headers: {
|
|
3020
3053
|
Accept: "application/json",
|
|
@@ -3024,7 +3057,7 @@ var bigCommerceTaskTemplates = {
|
|
|
3024
3057
|
})
|
|
3025
3058
|
})
|
|
3026
3059
|
})
|
|
3027
|
-
};
|
|
3060
|
+
});
|
|
3028
3061
|
var BigCommerceTriggerNames = {
|
|
3029
3062
|
CartCreated: `${import_developer_studio_api3.IntegrationNames.BigCommerce}-${import_developer_studio_api3.BigCommerceEventNames.CartCreated}`,
|
|
3030
3063
|
CartUpdated: `${import_developer_studio_api3.IntegrationNames.BigCommerce}-${import_developer_studio_api3.BigCommerceEventNames.CartUpdated}`,
|
|
@@ -3033,7 +3066,7 @@ var BigCommerceTriggerNames = {
|
|
|
3033
3066
|
ProductCreated: `${import_developer_studio_api3.IntegrationNames.BigCommerce}-${import_developer_studio_api3.BigCommerceEventNames.ProductCreated}`,
|
|
3034
3067
|
ProductUpdated: `${import_developer_studio_api3.IntegrationNames.BigCommerce}-${import_developer_studio_api3.BigCommerceEventNames.ProductUpdated}`
|
|
3035
3068
|
};
|
|
3036
|
-
var bigcommerceTriggerConfigs = {
|
|
3069
|
+
var bigcommerceTriggerConfigs = () => ({
|
|
3037
3070
|
[BigCommerceTriggerNames.CartCreated]: {
|
|
3038
3071
|
key: BigCommerceTriggerNames.CartCreated,
|
|
3039
3072
|
name: import_developer_studio_api3.BigCommerceEventNames.CartCreated,
|
|
@@ -3190,8 +3223,8 @@ var bigcommerceTriggerConfigs = {
|
|
|
3190
3223
|
}
|
|
3191
3224
|
}
|
|
3192
3225
|
}
|
|
3193
|
-
};
|
|
3194
|
-
var bigcommerceTriggerTemplates = {
|
|
3226
|
+
});
|
|
3227
|
+
var bigcommerceTriggerTemplates = () => ({
|
|
3195
3228
|
[BigCommerceTriggerNames.CartCreated]: {
|
|
3196
3229
|
type: "webhook",
|
|
3197
3230
|
webhook: {
|
|
@@ -3294,11 +3327,10 @@ var bigcommerceTriggerTemplates = {
|
|
|
3294
3327
|
}
|
|
3295
3328
|
}
|
|
3296
3329
|
}
|
|
3297
|
-
};
|
|
3330
|
+
});
|
|
3298
3331
|
|
|
3299
3332
|
// src/views/Flows/Definitions/Mocks/HelpDesk/index.ts
|
|
3300
3333
|
var import_developer_studio_api4 = require("@livechat/developer-studio-api");
|
|
3301
|
-
var config3 = getWorkflowsConfig();
|
|
3302
3334
|
var helpdeskTicketResponse = WORKFLOW_HTTP_TASK_OUTPUT_SCHEMA({
|
|
3303
3335
|
type: "object",
|
|
3304
3336
|
properties: {
|
|
@@ -3451,11 +3483,13 @@ var helpdeskTicketInput = {
|
|
|
3451
3483
|
title: "Transaction ID"
|
|
3452
3484
|
}
|
|
3453
3485
|
};
|
|
3454
|
-
var helpdeskTaskConfigs = {
|
|
3486
|
+
var helpdeskTaskConfigs = () => ({
|
|
3455
3487
|
["HELPDESK_ADD_FOLLOWERS_TO_TICKET" /* AddFollowersToTicket */]: {
|
|
3456
3488
|
key: "HELPDESK_ADD_FOLLOWERS_TO_TICKET" /* AddFollowersToTicket */,
|
|
3457
3489
|
type: import_developer_studio_api4.WorkflowDefinitionTaskType.http,
|
|
3458
|
-
url: `${
|
|
3490
|
+
url: `${getWorkflowsEnv(
|
|
3491
|
+
"workflowsApiUr"
|
|
3492
|
+
)}/functions/add-followers-to-helpdesk-ticket`,
|
|
3459
3493
|
customization: {
|
|
3460
3494
|
provider: `${import_developer_studio_api4.IntegrationNames.Text}-${PRODUCT_TYPE.HD}`,
|
|
3461
3495
|
product: PRODUCT_NAMES.helpdesk,
|
|
@@ -3490,7 +3524,9 @@ var helpdeskTaskConfigs = {
|
|
|
3490
3524
|
["HELPDESK_ADD_TAGS_TO_TICKET" /* AddTagsToTicket */]: {
|
|
3491
3525
|
key: "HELPDESK_ADD_TAGS_TO_TICKET" /* AddTagsToTicket */,
|
|
3492
3526
|
type: import_developer_studio_api4.WorkflowDefinitionTaskType.http,
|
|
3493
|
-
url: `${
|
|
3527
|
+
url: `${getWorkflowsEnv(
|
|
3528
|
+
"workflowsApiUr"
|
|
3529
|
+
)}/functions/add-tags-to-helpdesk-ticket`,
|
|
3494
3530
|
customization: {
|
|
3495
3531
|
provider: `${import_developer_studio_api4.IntegrationNames.Text}-${PRODUCT_TYPE.HD}`,
|
|
3496
3532
|
product: PRODUCT_NAMES.helpdesk,
|
|
@@ -3524,7 +3560,9 @@ var helpdeskTaskConfigs = {
|
|
|
3524
3560
|
["HELPDESK_CREATE_TICKET" /* CreateTicket */]: {
|
|
3525
3561
|
key: "HELPDESK_CREATE_TICKET" /* CreateTicket */,
|
|
3526
3562
|
type: import_developer_studio_api4.WorkflowDefinitionTaskType.http,
|
|
3527
|
-
url: `${
|
|
3563
|
+
url: `${getWorkflowsEnv(
|
|
3564
|
+
"workflowsApiUr"
|
|
3565
|
+
)}/functions/create-helpdesk-ticket`,
|
|
3528
3566
|
customization: {
|
|
3529
3567
|
provider: `${import_developer_studio_api4.IntegrationNames.Text}-${PRODUCT_TYPE.HD}`,
|
|
3530
3568
|
product: PRODUCT_NAMES.helpdesk,
|
|
@@ -3545,7 +3583,9 @@ var helpdeskTaskConfigs = {
|
|
|
3545
3583
|
["HELPDESK_CREATE_TRANSACTION" /* CreateTransaction */]: {
|
|
3546
3584
|
type: import_developer_studio_api4.WorkflowDefinitionTaskType.http,
|
|
3547
3585
|
key: "HELPDESK_CREATE_TRANSACTION" /* CreateTransaction */,
|
|
3548
|
-
url: `${
|
|
3586
|
+
url: `${getWorkflowsEnv(
|
|
3587
|
+
"workflowsApiUr"
|
|
3588
|
+
)}/functions/create-helpdesk-transaction`,
|
|
3549
3589
|
customization: {
|
|
3550
3590
|
provider: `${import_developer_studio_api4.IntegrationNames.Text}-${PRODUCT_TYPE.HD}`,
|
|
3551
3591
|
product: PRODUCT_NAMES.helpdesk,
|
|
@@ -3632,7 +3672,7 @@ var helpdeskTaskConfigs = {
|
|
|
3632
3672
|
["HELPDESK_FIND_TICKET" /* FindTicket */]: {
|
|
3633
3673
|
key: "HELPDESK_FIND_TICKET" /* FindTicket */,
|
|
3634
3674
|
type: import_developer_studio_api4.WorkflowDefinitionTaskType.http,
|
|
3635
|
-
url: `${
|
|
3675
|
+
url: `${getWorkflowsEnv("workflowsApiUr")}/functions/find-helpdesk-ticket`,
|
|
3636
3676
|
customization: {
|
|
3637
3677
|
provider: `${import_developer_studio_api4.IntegrationNames.Text}-${PRODUCT_TYPE.HD}`,
|
|
3638
3678
|
product: PRODUCT_NAMES.helpdesk,
|
|
@@ -3659,7 +3699,9 @@ var helpdeskTaskConfigs = {
|
|
|
3659
3699
|
["HELPDESK_UPDATE_TICKET" /* UpdateTicket */]: {
|
|
3660
3700
|
key: "HELPDESK_UPDATE_TICKET" /* UpdateTicket */,
|
|
3661
3701
|
type: import_developer_studio_api4.WorkflowDefinitionTaskType.http,
|
|
3662
|
-
url: `${
|
|
3702
|
+
url: `${getWorkflowsEnv(
|
|
3703
|
+
"workflowsApiUr"
|
|
3704
|
+
)}/functions/update-helpdesk-ticket`,
|
|
3663
3705
|
customization: {
|
|
3664
3706
|
provider: `${import_developer_studio_api4.IntegrationNames.Text}-${PRODUCT_TYPE.HD}`,
|
|
3665
3707
|
product: PRODUCT_NAMES.helpdesk,
|
|
@@ -3690,14 +3732,16 @@ var helpdeskTaskConfigs = {
|
|
|
3690
3732
|
output: helpdeskTicketResponse
|
|
3691
3733
|
}
|
|
3692
3734
|
}
|
|
3693
|
-
};
|
|
3694
|
-
var helpdeskTaskTemplates = {
|
|
3735
|
+
});
|
|
3736
|
+
var helpdeskTaskTemplates = () => ({
|
|
3695
3737
|
["HELPDESK_CREATE_TICKET" /* CreateTicket */]: __spreadProps(__spreadValues({}, workflowHttpTask), {
|
|
3696
3738
|
name: "HELPDESK_CREATE_TICKET" /* CreateTicket */,
|
|
3697
3739
|
taskReferenceName: "helpdesk_create_ticket",
|
|
3698
3740
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
3699
3741
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
3700
|
-
uri: `${
|
|
3742
|
+
uri: `${getWorkflowsEnv(
|
|
3743
|
+
"workflowsApiUr"
|
|
3744
|
+
)}/functions/create-helpdesk-ticket`,
|
|
3701
3745
|
method: "POST",
|
|
3702
3746
|
body: {
|
|
3703
3747
|
requester: {
|
|
@@ -3721,7 +3765,9 @@ var helpdeskTaskTemplates = {
|
|
|
3721
3765
|
taskReferenceName: "helpdesk_add_followers_to_ticket",
|
|
3722
3766
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
3723
3767
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
3724
|
-
uri: `${
|
|
3768
|
+
uri: `${getWorkflowsEnv(
|
|
3769
|
+
"workflowsApiUr"
|
|
3770
|
+
)}/functions/add-followers-to-helpdesk-ticket`,
|
|
3725
3771
|
method: "POST",
|
|
3726
3772
|
body: {
|
|
3727
3773
|
id: "#{id}",
|
|
@@ -3739,7 +3785,9 @@ var helpdeskTaskTemplates = {
|
|
|
3739
3785
|
taskReferenceName: "helpdesk_add_tags_to_ticket",
|
|
3740
3786
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
3741
3787
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
3742
|
-
uri: `${
|
|
3788
|
+
uri: `${getWorkflowsEnv(
|
|
3789
|
+
"workflowsApiUr"
|
|
3790
|
+
)}/functions/add-tags-to-helpdesk-ticket`,
|
|
3743
3791
|
method: "POST",
|
|
3744
3792
|
body: {
|
|
3745
3793
|
id: "#{id}",
|
|
@@ -3757,7 +3805,9 @@ var helpdeskTaskTemplates = {
|
|
|
3757
3805
|
taskReferenceName: "helpdesk_create_transaction",
|
|
3758
3806
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
3759
3807
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
3760
|
-
uri: `${
|
|
3808
|
+
uri: `${getWorkflowsEnv(
|
|
3809
|
+
"workflowsApiUr"
|
|
3810
|
+
)}/functions/create-helpdesk-transaction`,
|
|
3761
3811
|
method: "POST",
|
|
3762
3812
|
body: {
|
|
3763
3813
|
ticketID: "#{ticket_id}",
|
|
@@ -3775,7 +3825,9 @@ var helpdeskTaskTemplates = {
|
|
|
3775
3825
|
taskReferenceName: "helpdesk_find_ticket",
|
|
3776
3826
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
3777
3827
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
3778
|
-
uri: `${
|
|
3828
|
+
uri: `${getWorkflowsEnv(
|
|
3829
|
+
"workflowsApiUr"
|
|
3830
|
+
)}/functions/find-helpdesk-ticket?id=#{ticket_id}`,
|
|
3779
3831
|
method: "GET",
|
|
3780
3832
|
headers: {
|
|
3781
3833
|
Accept: "application/json",
|
|
@@ -3789,7 +3841,9 @@ var helpdeskTaskTemplates = {
|
|
|
3789
3841
|
taskReferenceName: "helpdesk_update_ticket",
|
|
3790
3842
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
3791
3843
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
3792
|
-
uri: `${
|
|
3844
|
+
uri: `${getWorkflowsEnv(
|
|
3845
|
+
"workflowsApiUr"
|
|
3846
|
+
)}/functions/update-helpdesk-ticket?id=#{ticket_id}`,
|
|
3793
3847
|
method: "PATCH",
|
|
3794
3848
|
headers: {
|
|
3795
3849
|
Accept: "application/json",
|
|
@@ -3798,11 +3852,10 @@ var helpdeskTaskTemplates = {
|
|
|
3798
3852
|
})
|
|
3799
3853
|
})
|
|
3800
3854
|
})
|
|
3801
|
-
};
|
|
3855
|
+
});
|
|
3802
3856
|
|
|
3803
3857
|
// src/views/Flows/Definitions/Mocks/HubSpot/index.ts
|
|
3804
3858
|
var import_developer_studio_api5 = require("@livechat/developer-studio-api");
|
|
3805
|
-
var config4 = getWorkflowsConfig();
|
|
3806
3859
|
var hubspotContactProperties = {
|
|
3807
3860
|
company: {
|
|
3808
3861
|
type: "string",
|
|
@@ -3836,11 +3889,13 @@ var hubspotContactBody = {
|
|
|
3836
3889
|
properties: hubspotContactProperties
|
|
3837
3890
|
}
|
|
3838
3891
|
};
|
|
3839
|
-
var hubspotTaskConfigs = {
|
|
3892
|
+
var hubspotTaskConfigs = () => ({
|
|
3840
3893
|
["HUBSPOT_CREATE_CONTACT" /* CreateContact */]: {
|
|
3841
3894
|
key: "HUBSPOT_CREATE_CONTACT" /* CreateContact */,
|
|
3842
3895
|
type: import_developer_studio_api5.WorkflowDefinitionTaskType.http,
|
|
3843
|
-
url: `${
|
|
3896
|
+
url: `${getWorkflowsEnv(
|
|
3897
|
+
"workflowsApiUr"
|
|
3898
|
+
)}/functions/create-hubspot-contact`,
|
|
3844
3899
|
customization: {
|
|
3845
3900
|
provider: import_developer_studio_api5.IntegrationNames.HubSpot,
|
|
3846
3901
|
product: import_developer_studio_api5.IntegrationDisplayNames.HubSpot,
|
|
@@ -3865,7 +3920,7 @@ var hubspotTaskConfigs = {
|
|
|
3865
3920
|
// [HubSpotTaskNames.DeleteContact]: {
|
|
3866
3921
|
// key: HubSpotTaskNames.DeleteContact,
|
|
3867
3922
|
// type: WorkflowDefinitionTaskType.http,
|
|
3868
|
-
// url: `${
|
|
3923
|
+
// url: `${getWorkflowsEnv("workflowsApiUr")}/functions/delete-hubspot-contact`,
|
|
3869
3924
|
// customization: {
|
|
3870
3925
|
// provider: IntegrationNames.HubSpot,
|
|
3871
3926
|
// product: IntegrationDisplayNames.HubSpot,
|
|
@@ -3890,7 +3945,7 @@ var hubspotTaskConfigs = {
|
|
|
3890
3945
|
["HUBSPOT_GET_CONTACT" /* GetContact */]: {
|
|
3891
3946
|
key: "HUBSPOT_GET_CONTACT" /* GetContact */,
|
|
3892
3947
|
type: import_developer_studio_api5.WorkflowDefinitionTaskType.http,
|
|
3893
|
-
url: `${
|
|
3948
|
+
url: `${getWorkflowsEnv("workflowsApiUr")}/functions/get-hubspot-contact`,
|
|
3894
3949
|
customization: {
|
|
3895
3950
|
provider: import_developer_studio_api5.IntegrationNames.HubSpot,
|
|
3896
3951
|
product: import_developer_studio_api5.IntegrationDisplayNames.HubSpot,
|
|
@@ -3919,7 +3974,9 @@ var hubspotTaskConfigs = {
|
|
|
3919
3974
|
["HUBSPOT_UPDATE_CONTACT" /* UpdateContact */]: {
|
|
3920
3975
|
key: "HUBSPOT_UPDATE_CONTACT" /* UpdateContact */,
|
|
3921
3976
|
type: import_developer_studio_api5.WorkflowDefinitionTaskType.http,
|
|
3922
|
-
url: `${
|
|
3977
|
+
url: `${getWorkflowsEnv(
|
|
3978
|
+
"workflowsApiUr"
|
|
3979
|
+
)}/functions/update-hubspot-contact`,
|
|
3923
3980
|
customization: {
|
|
3924
3981
|
provider: import_developer_studio_api5.IntegrationNames.HubSpot,
|
|
3925
3982
|
product: import_developer_studio_api5.IntegrationDisplayNames.HubSpot,
|
|
@@ -3952,14 +4009,16 @@ var hubspotTaskConfigs = {
|
|
|
3952
4009
|
})
|
|
3953
4010
|
}
|
|
3954
4011
|
}
|
|
3955
|
-
};
|
|
3956
|
-
var hubspotTaskTemplates = {
|
|
4012
|
+
});
|
|
4013
|
+
var hubspotTaskTemplates = () => ({
|
|
3957
4014
|
["HUBSPOT_CREATE_CONTACT" /* CreateContact */]: __spreadProps(__spreadValues({}, workflowHttpTask), {
|
|
3958
4015
|
name: "HUBSPOT_CREATE_CONTACT" /* CreateContact */,
|
|
3959
4016
|
taskReferenceName: "hubspot_create_contact",
|
|
3960
4017
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
3961
4018
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
3962
|
-
uri: `${
|
|
4019
|
+
uri: `${getWorkflowsEnv(
|
|
4020
|
+
"workflowsApiUr"
|
|
4021
|
+
)}/functions/create-hubspot-contact`,
|
|
3963
4022
|
method: "POST",
|
|
3964
4023
|
body: {
|
|
3965
4024
|
properties: {
|
|
@@ -3983,7 +4042,7 @@ var hubspotTaskTemplates = {
|
|
|
3983
4042
|
// ...workflowHttpTask.inputParameters,
|
|
3984
4043
|
// http_request: {
|
|
3985
4044
|
// ...workflowHttpTask.inputParameters.http_request,
|
|
3986
|
-
// uri: `${
|
|
4045
|
+
// uri: `${getWorkflowsEnv("workflowsApiUr")}/functions/delete-hubspot-contact?contactId=#{contactId}`,
|
|
3987
4046
|
// method: 'DELETE',
|
|
3988
4047
|
// headers: {
|
|
3989
4048
|
// Accept: 'application/json',
|
|
@@ -3997,7 +4056,9 @@ var hubspotTaskTemplates = {
|
|
|
3997
4056
|
taskReferenceName: "hubspot_get_contact",
|
|
3998
4057
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
3999
4058
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
4000
|
-
uri: `${
|
|
4059
|
+
uri: `${getWorkflowsEnv(
|
|
4060
|
+
"workflowsApiUr"
|
|
4061
|
+
)}/functions/get-hubspot-contact?contactId=#{contactId}`,
|
|
4001
4062
|
method: "GET",
|
|
4002
4063
|
headers: {
|
|
4003
4064
|
Accept: "application/json",
|
|
@@ -4011,7 +4072,9 @@ var hubspotTaskTemplates = {
|
|
|
4011
4072
|
taskReferenceName: "hubspot_update_contact",
|
|
4012
4073
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
4013
4074
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
4014
|
-
uri: `${
|
|
4075
|
+
uri: `${getWorkflowsEnv(
|
|
4076
|
+
"workflowsApiUr"
|
|
4077
|
+
)}/functions/update-hubspot-contact?contactId=#{contactId}`,
|
|
4015
4078
|
method: "PATCH",
|
|
4016
4079
|
body: {
|
|
4017
4080
|
properties: {
|
|
@@ -4027,12 +4090,12 @@ var hubspotTaskTemplates = {
|
|
|
4027
4090
|
})
|
|
4028
4091
|
})
|
|
4029
4092
|
})
|
|
4030
|
-
};
|
|
4093
|
+
});
|
|
4031
4094
|
var HubSpotTriggerNames = {
|
|
4032
4095
|
ContactCreated: `${import_developer_studio_api5.IntegrationNames.HubSpot}-${import_developer_studio_api5.HubspotEventNames.ContactCreated}`,
|
|
4033
4096
|
ContactDeleted: `${import_developer_studio_api5.IntegrationNames.HubSpot}-${import_developer_studio_api5.HubspotEventNames.ContactDeleted}`
|
|
4034
4097
|
};
|
|
4035
|
-
var hubspotTriggerConfigs = {
|
|
4098
|
+
var hubspotTriggerConfigs = () => ({
|
|
4036
4099
|
[HubSpotTriggerNames.ContactCreated]: {
|
|
4037
4100
|
key: HubSpotTriggerNames.ContactCreated,
|
|
4038
4101
|
name: import_developer_studio_api5.HubspotEventNames.ContactCreated,
|
|
@@ -4071,8 +4134,8 @@ var hubspotTriggerConfigs = {
|
|
|
4071
4134
|
}
|
|
4072
4135
|
}
|
|
4073
4136
|
}
|
|
4074
|
-
};
|
|
4075
|
-
var hubSpotTriggerTemplates = {
|
|
4137
|
+
});
|
|
4138
|
+
var hubSpotTriggerTemplates = () => ({
|
|
4076
4139
|
[HubSpotTriggerNames.ContactCreated]: {
|
|
4077
4140
|
type: "webhook",
|
|
4078
4141
|
webhook: {
|
|
@@ -4101,11 +4164,10 @@ var hubSpotTriggerTemplates = {
|
|
|
4101
4164
|
}
|
|
4102
4165
|
}
|
|
4103
4166
|
}
|
|
4104
|
-
};
|
|
4167
|
+
});
|
|
4105
4168
|
|
|
4106
4169
|
// src/views/Flows/Definitions/Mocks/LiveChat/index.ts
|
|
4107
4170
|
var import_developer_studio_api6 = require("@livechat/developer-studio-api");
|
|
4108
|
-
var config5 = getWorkflowsConfig();
|
|
4109
4171
|
var webhookSpecs = {
|
|
4110
4172
|
new_chat: {
|
|
4111
4173
|
output: {
|
|
@@ -4670,11 +4732,13 @@ var webhookSpecs = {
|
|
|
4670
4732
|
}
|
|
4671
4733
|
}
|
|
4672
4734
|
};
|
|
4673
|
-
var livechatTaskConfigs = {
|
|
4735
|
+
var livechatTaskConfigs = () => ({
|
|
4674
4736
|
["LIVECHAT_TRANSFER_CHAT" /* TransferChat */]: {
|
|
4675
4737
|
key: "LIVECHAT_TRANSFER_CHAT" /* TransferChat */,
|
|
4676
4738
|
type: import_developer_studio_api6.WorkflowDefinitionTaskType.http,
|
|
4677
|
-
url: `${
|
|
4739
|
+
url: `${getWorkflowsEnv(
|
|
4740
|
+
"workflowsApiUr"
|
|
4741
|
+
)}/functions/transfer-livechat-chat`,
|
|
4678
4742
|
customization: {
|
|
4679
4743
|
provider: `${import_developer_studio_api6.IntegrationNames.Text}-${PRODUCT_TYPE.LC}`,
|
|
4680
4744
|
product: PRODUCT_NAMES.livechat,
|
|
@@ -4717,7 +4781,7 @@ var livechatTaskConfigs = {
|
|
|
4717
4781
|
["LIVECHAT_TAG_CHAT" /* TagChat */]: {
|
|
4718
4782
|
key: "LIVECHAT_TAG_CHAT" /* TagChat */,
|
|
4719
4783
|
type: import_developer_studio_api6.WorkflowDefinitionTaskType.http,
|
|
4720
|
-
url: `${
|
|
4784
|
+
url: `${getWorkflowsEnv("workflowsApiUr")}/functions/tag-livechat-chat`,
|
|
4721
4785
|
customization: {
|
|
4722
4786
|
provider: `${import_developer_studio_api6.IntegrationNames.Text}-${PRODUCT_TYPE.LC}`,
|
|
4723
4787
|
product: PRODUCT_NAMES.livechat,
|
|
@@ -4753,7 +4817,9 @@ var livechatTaskConfigs = {
|
|
|
4753
4817
|
["LIVECHAT_CHAT_TRANSCRIPT" /* GetChatTranscript */]: {
|
|
4754
4818
|
key: "LIVECHAT_CHAT_TRANSCRIPT" /* GetChatTranscript */,
|
|
4755
4819
|
type: import_developer_studio_api6.WorkflowDefinitionTaskType.http,
|
|
4756
|
-
url: `${
|
|
4820
|
+
url: `${getWorkflowsEnv(
|
|
4821
|
+
"workflowsApiUr"
|
|
4822
|
+
)}/functions/get-livechat-chat-transcript`,
|
|
4757
4823
|
customization: {
|
|
4758
4824
|
provider: `${import_developer_studio_api6.IntegrationNames.Text}-${PRODUCT_TYPE.LC}`,
|
|
4759
4825
|
product: PRODUCT_NAMES.livechat,
|
|
@@ -4802,7 +4868,9 @@ var livechatTaskConfigs = {
|
|
|
4802
4868
|
["LIVECHAT_SEND_MESSAGE" /* SendMessage */]: {
|
|
4803
4869
|
key: "LIVECHAT_SEND_MESSAGE" /* SendMessage */,
|
|
4804
4870
|
type: import_developer_studio_api6.WorkflowDefinitionTaskType.http,
|
|
4805
|
-
url: `${
|
|
4871
|
+
url: `${getWorkflowsEnv(
|
|
4872
|
+
"workflowsApiUr"
|
|
4873
|
+
)}/functions/send-livechat-agent-message`,
|
|
4806
4874
|
customization: {
|
|
4807
4875
|
provider: `${import_developer_studio_api6.IntegrationNames.Text}-${PRODUCT_TYPE.LC}`,
|
|
4808
4876
|
product: PRODUCT_NAMES.livechat,
|
|
@@ -4841,7 +4909,9 @@ var livechatTaskConfigs = {
|
|
|
4841
4909
|
["LIVECHAT_SUPERVISE_CHAT" /* SuperviseChat */]: {
|
|
4842
4910
|
key: "LIVECHAT_SUPERVISE_CHAT" /* SuperviseChat */,
|
|
4843
4911
|
type: import_developer_studio_api6.WorkflowDefinitionTaskType.http,
|
|
4844
|
-
url: `${
|
|
4912
|
+
url: `${getWorkflowsEnv(
|
|
4913
|
+
"workflowsApiUr"
|
|
4914
|
+
)}/functions/supervise-livechat-chat`,
|
|
4845
4915
|
customization: {
|
|
4846
4916
|
provider: `${import_developer_studio_api6.IntegrationNames.Text}-${PRODUCT_TYPE.LC}`,
|
|
4847
4917
|
product: PRODUCT_NAMES.livechat,
|
|
@@ -4867,14 +4937,14 @@ var livechatTaskConfigs = {
|
|
|
4867
4937
|
})
|
|
4868
4938
|
}
|
|
4869
4939
|
}
|
|
4870
|
-
};
|
|
4871
|
-
var livechatTaskTemplates = {
|
|
4940
|
+
});
|
|
4941
|
+
var livechatTaskTemplates = () => ({
|
|
4872
4942
|
["LIVECHAT_TAG_CHAT" /* TagChat */]: __spreadProps(__spreadValues({}, workflowHttpTask), {
|
|
4873
4943
|
name: "LIVECHAT_TAG_CHAT" /* TagChat */,
|
|
4874
4944
|
taskReferenceName: "livechat_tag_chat",
|
|
4875
4945
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
4876
4946
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
4877
|
-
uri: `${
|
|
4947
|
+
uri: `${getWorkflowsEnv("workflowsApiUr")}/functions/tag-livechat-chat`,
|
|
4878
4948
|
method: "POST",
|
|
4879
4949
|
body: {
|
|
4880
4950
|
chat_id: "#{chat_id}",
|
|
@@ -4893,7 +4963,9 @@ var livechatTaskTemplates = {
|
|
|
4893
4963
|
taskReferenceName: "livechat_transfer_chat",
|
|
4894
4964
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
4895
4965
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
4896
|
-
uri: `${
|
|
4966
|
+
uri: `${getWorkflowsEnv(
|
|
4967
|
+
"workflowsApiUr"
|
|
4968
|
+
)}/functions/transfer-livechat-chat`,
|
|
4897
4969
|
method: "POST",
|
|
4898
4970
|
body: {
|
|
4899
4971
|
chat_id: "#{chat_id}",
|
|
@@ -4912,7 +4984,9 @@ var livechatTaskTemplates = {
|
|
|
4912
4984
|
taskReferenceName: "livechat_get_chat_transcript",
|
|
4913
4985
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
4914
4986
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
4915
|
-
uri: `${
|
|
4987
|
+
uri: `${getWorkflowsEnv(
|
|
4988
|
+
"workflowsApiUr"
|
|
4989
|
+
)}/functions/get-livechat-chat-transcript?chat_id=#{chat_id}`,
|
|
4916
4990
|
method: "GET",
|
|
4917
4991
|
headers: {
|
|
4918
4992
|
Accept: "application/json",
|
|
@@ -4926,7 +5000,9 @@ var livechatTaskTemplates = {
|
|
|
4926
5000
|
taskReferenceName: "livechat_send_message",
|
|
4927
5001
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
4928
5002
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
4929
|
-
uri: `${
|
|
5003
|
+
uri: `${getWorkflowsEnv(
|
|
5004
|
+
"workflowsApiUr"
|
|
5005
|
+
)}/functions/send-livechat-agent-message`,
|
|
4930
5006
|
method: "POST",
|
|
4931
5007
|
body: {
|
|
4932
5008
|
chat_id: "#{chat_id}",
|
|
@@ -4945,7 +5021,9 @@ var livechatTaskTemplates = {
|
|
|
4945
5021
|
taskReferenceName: "livechat_supervise_chat",
|
|
4946
5022
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
4947
5023
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
4948
|
-
uri: `${
|
|
5024
|
+
uri: `${getWorkflowsEnv(
|
|
5025
|
+
"workflowsApiUr"
|
|
5026
|
+
)}/functions/supervise-livechat-chat`,
|
|
4949
5027
|
method: "POST",
|
|
4950
5028
|
body: {
|
|
4951
5029
|
chat_id: "#{chat_id}",
|
|
@@ -4958,7 +5036,7 @@ var livechatTaskTemplates = {
|
|
|
4958
5036
|
})
|
|
4959
5037
|
})
|
|
4960
5038
|
})
|
|
4961
|
-
};
|
|
5039
|
+
});
|
|
4962
5040
|
var TextLiveChatTriggerNames = {
|
|
4963
5041
|
ChatStarted: `${import_developer_studio_api6.IntegrationNames.Text}-${PRODUCT_TYPE.LC}-${import_developer_studio_api6.TextLivechatEventNames.ChatStarted}`,
|
|
4964
5042
|
ChatEnded: `${import_developer_studio_api6.IntegrationNames.Text}-${PRODUCT_TYPE.LC}-${import_developer_studio_api6.TextLivechatEventNames.ChatEnded}`,
|
|
@@ -4970,7 +5048,7 @@ var TextLiveChatTriggerNames = {
|
|
|
4970
5048
|
UserAddedToChat: `${import_developer_studio_api6.IntegrationNames.Text}-${PRODUCT_TYPE.LC}-${import_developer_studio_api6.TextLivechatEventNames.UserAddedToChat}`,
|
|
4971
5049
|
UserRemovedFromChat: `${import_developer_studio_api6.IntegrationNames.Text}-${PRODUCT_TYPE.LC}-${import_developer_studio_api6.TextLivechatEventNames.UserRemovedFromChat}`
|
|
4972
5050
|
};
|
|
4973
|
-
var livechatTriggerConfigs = {
|
|
5051
|
+
var livechatTriggerConfigs = () => ({
|
|
4974
5052
|
[TextLiveChatTriggerNames.ChatStarted]: {
|
|
4975
5053
|
key: TextLiveChatTriggerNames.ChatStarted,
|
|
4976
5054
|
name: import_developer_studio_api6.TextLivechatEventNames.ChatStarted,
|
|
@@ -5132,8 +5210,8 @@ var livechatTriggerConfigs = {
|
|
|
5132
5210
|
output: webhookSpecs.chat_tagged.output
|
|
5133
5211
|
}
|
|
5134
5212
|
}
|
|
5135
|
-
};
|
|
5136
|
-
var livechatTriggerTemplates = {
|
|
5213
|
+
});
|
|
5214
|
+
var livechatTriggerTemplates = () => ({
|
|
5137
5215
|
[TextLiveChatTriggerNames.ChatEnded]: {
|
|
5138
5216
|
type: "webhook",
|
|
5139
5217
|
webhook: {
|
|
@@ -5246,11 +5324,10 @@ var livechatTriggerTemplates = {
|
|
|
5246
5324
|
}
|
|
5247
5325
|
}
|
|
5248
5326
|
}
|
|
5249
|
-
};
|
|
5327
|
+
});
|
|
5250
5328
|
|
|
5251
5329
|
// src/views/Flows/Definitions/Mocks/MailChimp/index.ts
|
|
5252
5330
|
var import_developer_studio_api7 = require("@livechat/developer-studio-api");
|
|
5253
|
-
var config6 = getWorkflowsConfig();
|
|
5254
5331
|
var mailchimpCampaignTrackingBody = {
|
|
5255
5332
|
type: "object",
|
|
5256
5333
|
required: ["opens", "html_clicks", "text_clicks"],
|
|
@@ -5433,11 +5510,13 @@ var webhookSpecs2 = {
|
|
|
5433
5510
|
}
|
|
5434
5511
|
}
|
|
5435
5512
|
};
|
|
5436
|
-
var mailchimpTaskConfigs = {
|
|
5513
|
+
var mailchimpTaskConfigs = () => ({
|
|
5437
5514
|
["MAILCHIMP_ADD_SUBSCRIBER" /* AddSubscriber */]: {
|
|
5438
5515
|
key: "MAILCHIMP_ADD_SUBSCRIBER" /* AddSubscriber */,
|
|
5439
5516
|
type: import_developer_studio_api7.WorkflowDefinitionTaskType.http,
|
|
5440
|
-
url: `${
|
|
5517
|
+
url: `${getWorkflowsEnv(
|
|
5518
|
+
"workflowsApiUr"
|
|
5519
|
+
)}/functions/add-mailchimp-subscriber`,
|
|
5441
5520
|
customization: {
|
|
5442
5521
|
provider: import_developer_studio_api7.IntegrationNames.Mailchimp,
|
|
5443
5522
|
product: import_developer_studio_api7.IntegrationDisplayNames.Mailchimp,
|
|
@@ -5480,7 +5559,9 @@ var mailchimpTaskConfigs = {
|
|
|
5480
5559
|
["MAILCHIMP_ADD_CAMPAIGN" /* AddCampaign */]: {
|
|
5481
5560
|
key: "MAILCHIMP_ADD_CAMPAIGN" /* AddCampaign */,
|
|
5482
5561
|
type: import_developer_studio_api7.WorkflowDefinitionTaskType.http,
|
|
5483
|
-
url: `${
|
|
5562
|
+
url: `${getWorkflowsEnv(
|
|
5563
|
+
"workflowsApiUr"
|
|
5564
|
+
)}/functions/add-mailchimp-campaign`,
|
|
5484
5565
|
customization: {
|
|
5485
5566
|
provider: import_developer_studio_api7.IntegrationNames.Mailchimp,
|
|
5486
5567
|
product: import_developer_studio_api7.IntegrationDisplayNames.Mailchimp,
|
|
@@ -5525,7 +5606,9 @@ var mailchimpTaskConfigs = {
|
|
|
5525
5606
|
["MAILCHIMP_SEND_CAMPAIGN" /* SendCampaign */]: {
|
|
5526
5607
|
key: "MAILCHIMP_SEND_CAMPAIGN" /* SendCampaign */,
|
|
5527
5608
|
type: import_developer_studio_api7.WorkflowDefinitionTaskType.http,
|
|
5528
|
-
url: `${
|
|
5609
|
+
url: `${getWorkflowsEnv(
|
|
5610
|
+
"workflowsApiUr"
|
|
5611
|
+
)}/functions/send-mailchimp-campaign`,
|
|
5529
5612
|
customization: {
|
|
5530
5613
|
provider: import_developer_studio_api7.IntegrationNames.Mailchimp,
|
|
5531
5614
|
product: import_developer_studio_api7.IntegrationDisplayNames.Mailchimp,
|
|
@@ -5556,7 +5639,9 @@ var mailchimpTaskConfigs = {
|
|
|
5556
5639
|
["MAILCHIMP_ADD_OR_UPDATE_SUBSCRIBER" /* AddOrUpdateSubscriber */]: {
|
|
5557
5640
|
key: "MAILCHIMP_ADD_OR_UPDATE_SUBSCRIBER" /* AddOrUpdateSubscriber */,
|
|
5558
5641
|
type: import_developer_studio_api7.WorkflowDefinitionTaskType.http,
|
|
5559
|
-
url: `${
|
|
5642
|
+
url: `${getWorkflowsEnv(
|
|
5643
|
+
"workflowsApiUr"
|
|
5644
|
+
)}/functions/add-or-update-mailchimp-subscriber`,
|
|
5560
5645
|
customization: {
|
|
5561
5646
|
provider: import_developer_studio_api7.IntegrationNames.Mailchimp,
|
|
5562
5647
|
product: import_developer_studio_api7.IntegrationDisplayNames.Mailchimp,
|
|
@@ -5604,7 +5689,9 @@ var mailchimpTaskConfigs = {
|
|
|
5604
5689
|
["MAILCHIMP_UPDATE_SUBSCRIBER" /* UpdateSubscriber */]: {
|
|
5605
5690
|
key: "MAILCHIMP_UPDATE_SUBSCRIBER" /* UpdateSubscriber */,
|
|
5606
5691
|
type: import_developer_studio_api7.WorkflowDefinitionTaskType.http,
|
|
5607
|
-
url: `${
|
|
5692
|
+
url: `${getWorkflowsEnv(
|
|
5693
|
+
"workflowsApiUr"
|
|
5694
|
+
)}/functions/update-mailchimp-subscriber`,
|
|
5608
5695
|
customization: {
|
|
5609
5696
|
provider: import_developer_studio_api7.IntegrationNames.Mailchimp,
|
|
5610
5697
|
product: import_developer_studio_api7.IntegrationDisplayNames.Mailchimp,
|
|
@@ -5652,7 +5739,9 @@ var mailchimpTaskConfigs = {
|
|
|
5652
5739
|
["MAILCHIMP_ARCHIVE_SUBSCRIBER" /* ArchiveSubscriber */]: {
|
|
5653
5740
|
key: "MAILCHIMP_ARCHIVE_SUBSCRIBER" /* ArchiveSubscriber */,
|
|
5654
5741
|
type: import_developer_studio_api7.WorkflowDefinitionTaskType.http,
|
|
5655
|
-
url: `${
|
|
5742
|
+
url: `${getWorkflowsEnv(
|
|
5743
|
+
"workflowsApiUr"
|
|
5744
|
+
)}/functions/archive-mailchimp-subscriber`,
|
|
5656
5745
|
customization: {
|
|
5657
5746
|
provider: import_developer_studio_api7.IntegrationNames.Mailchimp,
|
|
5658
5747
|
product: import_developer_studio_api7.IntegrationDisplayNames.Mailchimp,
|
|
@@ -5687,7 +5776,9 @@ var mailchimpTaskConfigs = {
|
|
|
5687
5776
|
["MAILCHIMP_DELETE_SUBSCRIBER" /* DeleteSubscriber */]: {
|
|
5688
5777
|
key: "MAILCHIMP_DELETE_SUBSCRIBER" /* DeleteSubscriber */,
|
|
5689
5778
|
type: import_developer_studio_api7.WorkflowDefinitionTaskType.http,
|
|
5690
|
-
url: `${
|
|
5779
|
+
url: `${getWorkflowsEnv(
|
|
5780
|
+
"workflowsApiUr"
|
|
5781
|
+
)}/functions/delete-mailchimp-subscriber`,
|
|
5691
5782
|
customization: {
|
|
5692
5783
|
provider: import_developer_studio_api7.IntegrationNames.Mailchimp,
|
|
5693
5784
|
product: import_developer_studio_api7.IntegrationDisplayNames.Mailchimp,
|
|
@@ -5722,7 +5813,9 @@ var mailchimpTaskConfigs = {
|
|
|
5722
5813
|
["MAILCHIMP_ADD_SUBSCRIBER_TAG" /* AddSubscriberTag */]: {
|
|
5723
5814
|
key: "MAILCHIMP_ADD_SUBSCRIBER_TAG" /* AddSubscriberTag */,
|
|
5724
5815
|
type: import_developer_studio_api7.WorkflowDefinitionTaskType.http,
|
|
5725
|
-
url: `${
|
|
5816
|
+
url: `${getWorkflowsEnv(
|
|
5817
|
+
"workflowsApiUr"
|
|
5818
|
+
)}/functions/add-mailchimp-subscriber-tag`,
|
|
5726
5819
|
customization: {
|
|
5727
5820
|
provider: import_developer_studio_api7.IntegrationNames.Mailchimp,
|
|
5728
5821
|
product: import_developer_studio_api7.IntegrationDisplayNames.Mailchimp,
|
|
@@ -5762,7 +5855,9 @@ var mailchimpTaskConfigs = {
|
|
|
5762
5855
|
["MAILCHIMP_ADD_SUBSCRIBER_EVENT" /* AddSubscriberEvent */]: {
|
|
5763
5856
|
key: "MAILCHIMP_ADD_SUBSCRIBER_EVENT" /* AddSubscriberEvent */,
|
|
5764
5857
|
type: import_developer_studio_api7.WorkflowDefinitionTaskType.http,
|
|
5765
|
-
url: `${
|
|
5858
|
+
url: `${getWorkflowsEnv(
|
|
5859
|
+
"workflowsApiUr"
|
|
5860
|
+
)}/functions/add-mailchimp-subscriber-event`,
|
|
5766
5861
|
customization: {
|
|
5767
5862
|
provider: import_developer_studio_api7.IntegrationNames.Mailchimp,
|
|
5768
5863
|
product: import_developer_studio_api7.IntegrationDisplayNames.Mailchimp,
|
|
@@ -5818,7 +5913,9 @@ var mailchimpTaskConfigs = {
|
|
|
5818
5913
|
["MAILCHIMP_ADD_SUBSCRIBER_NOTE" /* AddSubscriberNote */]: {
|
|
5819
5914
|
key: "MAILCHIMP_ADD_SUBSCRIBER_NOTE" /* AddSubscriberNote */,
|
|
5820
5915
|
type: import_developer_studio_api7.WorkflowDefinitionTaskType.http,
|
|
5821
|
-
url: `${
|
|
5916
|
+
url: `${getWorkflowsEnv(
|
|
5917
|
+
"workflowsApiUr"
|
|
5918
|
+
)}/functions/add-mailchimp-subscriber-note`,
|
|
5822
5919
|
customization: {
|
|
5823
5920
|
provider: import_developer_studio_api7.IntegrationNames.Mailchimp,
|
|
5824
5921
|
product: import_developer_studio_api7.IntegrationDisplayNames.Mailchimp,
|
|
@@ -5858,7 +5955,9 @@ var mailchimpTaskConfigs = {
|
|
|
5858
5955
|
["MAILCHIMP_DELETE_SUBSCRIBER_TAG" /* DeleteSubscriberTag */]: {
|
|
5859
5956
|
key: "MAILCHIMP_DELETE_SUBSCRIBER_TAG" /* DeleteSubscriberTag */,
|
|
5860
5957
|
type: import_developer_studio_api7.WorkflowDefinitionTaskType.http,
|
|
5861
|
-
url: `${
|
|
5958
|
+
url: `${getWorkflowsEnv(
|
|
5959
|
+
"workflowsApiUr"
|
|
5960
|
+
)}/functions/delete-mailchimp-subscriber-tag`,
|
|
5862
5961
|
customization: {
|
|
5863
5962
|
provider: import_developer_studio_api7.IntegrationNames.Mailchimp,
|
|
5864
5963
|
product: import_developer_studio_api7.IntegrationDisplayNames.Mailchimp,
|
|
@@ -5897,7 +5996,9 @@ var mailchimpTaskConfigs = {
|
|
|
5897
5996
|
["MAILCHIMP_GET_SUBSCRIBER_TAGS" /* GetSubscriberTags */]: {
|
|
5898
5997
|
key: "MAILCHIMP_GET_SUBSCRIBER_TAGS" /* GetSubscriberTags */,
|
|
5899
5998
|
type: import_developer_studio_api7.WorkflowDefinitionTaskType.http,
|
|
5900
|
-
url: `${
|
|
5999
|
+
url: `${getWorkflowsEnv(
|
|
6000
|
+
"workflowsApiUr"
|
|
6001
|
+
)}/functions/get-mailchimp-subscriber-tags`,
|
|
5901
6002
|
customization: {
|
|
5902
6003
|
provider: import_developer_studio_api7.IntegrationNames.Mailchimp,
|
|
5903
6004
|
product: import_developer_studio_api7.IntegrationDisplayNames.Mailchimp,
|
|
@@ -5962,7 +6063,9 @@ var mailchimpTaskConfigs = {
|
|
|
5962
6063
|
["MAILCHIMP_GET_SUBSCRIBER" /* GetSubscriber */]: {
|
|
5963
6064
|
key: "MAILCHIMP_GET_SUBSCRIBER" /* GetSubscriber */,
|
|
5964
6065
|
type: import_developer_studio_api7.WorkflowDefinitionTaskType.http,
|
|
5965
|
-
url: `${
|
|
6066
|
+
url: `${getWorkflowsEnv(
|
|
6067
|
+
"workflowsApiUr"
|
|
6068
|
+
)}/functions/get-mailchimp-subscriber`,
|
|
5966
6069
|
customization: {
|
|
5967
6070
|
provider: import_developer_studio_api7.IntegrationNames.Mailchimp,
|
|
5968
6071
|
product: import_developer_studio_api7.IntegrationDisplayNames.Mailchimp,
|
|
@@ -6137,7 +6240,9 @@ var mailchimpTaskConfigs = {
|
|
|
6137
6240
|
["MAILCHIMP_GET_SUBSCRIBERS" /* GetSubscribers */]: {
|
|
6138
6241
|
key: "MAILCHIMP_GET_SUBSCRIBERS" /* GetSubscribers */,
|
|
6139
6242
|
type: import_developer_studio_api7.WorkflowDefinitionTaskType.http,
|
|
6140
|
-
url: `${
|
|
6243
|
+
url: `${getWorkflowsEnv(
|
|
6244
|
+
"workflowsApiUr"
|
|
6245
|
+
)}/functions/find-mailchimp-subscribers`,
|
|
6141
6246
|
customization: {
|
|
6142
6247
|
provider: import_developer_studio_api7.IntegrationNames.Mailchimp,
|
|
6143
6248
|
product: import_developer_studio_api7.IntegrationDisplayNames.Mailchimp,
|
|
@@ -6313,7 +6418,9 @@ var mailchimpTaskConfigs = {
|
|
|
6313
6418
|
["MAILCHIMP_FIND_CAMPAIGN" /* FindCampaign */]: {
|
|
6314
6419
|
key: "MAILCHIMP_FIND_CAMPAIGN" /* FindCampaign */,
|
|
6315
6420
|
type: import_developer_studio_api7.WorkflowDefinitionTaskType.http,
|
|
6316
|
-
url: `${
|
|
6421
|
+
url: `${getWorkflowsEnv(
|
|
6422
|
+
"workflowsApiUr"
|
|
6423
|
+
)}/functions/find-mailchimp-campaign`,
|
|
6317
6424
|
customization: {
|
|
6318
6425
|
provider: import_developer_studio_api7.IntegrationNames.Mailchimp,
|
|
6319
6426
|
product: import_developer_studio_api7.IntegrationDisplayNames.Mailchimp,
|
|
@@ -6468,14 +6575,16 @@ var mailchimpTaskConfigs = {
|
|
|
6468
6575
|
})
|
|
6469
6576
|
}
|
|
6470
6577
|
}
|
|
6471
|
-
};
|
|
6472
|
-
var mailchimpTaskTemplates = {
|
|
6578
|
+
});
|
|
6579
|
+
var mailchimpTaskTemplates = () => ({
|
|
6473
6580
|
["MAILCHIMP_ADD_SUBSCRIBER" /* AddSubscriber */]: __spreadProps(__spreadValues({}, workflowHttpTask), {
|
|
6474
6581
|
name: "MAILCHIMP_ADD_SUBSCRIBER" /* AddSubscriber */,
|
|
6475
6582
|
taskReferenceName: "mailchimp_add_contact",
|
|
6476
6583
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
6477
6584
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
6478
|
-
uri: `${
|
|
6585
|
+
uri: `${getWorkflowsEnv(
|
|
6586
|
+
"workflowsApiUr"
|
|
6587
|
+
)}/functions/add-mailchimp-subscriber`,
|
|
6479
6588
|
method: "POST",
|
|
6480
6589
|
body: {
|
|
6481
6590
|
list_id: null,
|
|
@@ -6495,7 +6604,9 @@ var mailchimpTaskTemplates = {
|
|
|
6495
6604
|
taskReferenceName: "mailchimp_add_campaign",
|
|
6496
6605
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
6497
6606
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
6498
|
-
uri: `${
|
|
6607
|
+
uri: `${getWorkflowsEnv(
|
|
6608
|
+
"workflowsApiUr"
|
|
6609
|
+
)}/functions/add-mailchimp-campaign`,
|
|
6499
6610
|
method: "POST",
|
|
6500
6611
|
body: {
|
|
6501
6612
|
type: null,
|
|
@@ -6526,7 +6637,9 @@ var mailchimpTaskTemplates = {
|
|
|
6526
6637
|
taskReferenceName: "mailchimp_send_campaign",
|
|
6527
6638
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
6528
6639
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
6529
|
-
uri: `${
|
|
6640
|
+
uri: `${getWorkflowsEnv(
|
|
6641
|
+
"workflowsApiUr"
|
|
6642
|
+
)}/functions/send-mailchimp-campaign`,
|
|
6530
6643
|
method: "POST",
|
|
6531
6644
|
body: {
|
|
6532
6645
|
campaign_id: null
|
|
@@ -6543,7 +6656,9 @@ var mailchimpTaskTemplates = {
|
|
|
6543
6656
|
taskReferenceName: "mailchimp_add_or_update_subscriber",
|
|
6544
6657
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
6545
6658
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
6546
|
-
uri: `${
|
|
6659
|
+
uri: `${getWorkflowsEnv(
|
|
6660
|
+
"workflowsApiUr"
|
|
6661
|
+
)}/functions/add-or-update-mailchimp-subscriber`,
|
|
6547
6662
|
method: "POST",
|
|
6548
6663
|
body: {
|
|
6549
6664
|
list_id: null,
|
|
@@ -6563,7 +6678,9 @@ var mailchimpTaskTemplates = {
|
|
|
6563
6678
|
taskReferenceName: "mailchimp_update_subscriber",
|
|
6564
6679
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
6565
6680
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
6566
|
-
uri: `${
|
|
6681
|
+
uri: `${getWorkflowsEnv(
|
|
6682
|
+
"workflowsApiUr"
|
|
6683
|
+
)}/functions/update-mailchimp-subscriber`,
|
|
6567
6684
|
method: "POST",
|
|
6568
6685
|
body: {
|
|
6569
6686
|
list_id: null,
|
|
@@ -6583,7 +6700,9 @@ var mailchimpTaskTemplates = {
|
|
|
6583
6700
|
taskReferenceName: "mailchimp_archive_subscriber",
|
|
6584
6701
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
6585
6702
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
6586
|
-
uri: `${
|
|
6703
|
+
uri: `${getWorkflowsEnv(
|
|
6704
|
+
"workflowsApiUr"
|
|
6705
|
+
)}/functions/archive-mailchimp-subscriber`,
|
|
6587
6706
|
method: "POST",
|
|
6588
6707
|
body: {
|
|
6589
6708
|
list_id: null,
|
|
@@ -6601,7 +6720,9 @@ var mailchimpTaskTemplates = {
|
|
|
6601
6720
|
taskReferenceName: "mailchimp_delete_subscriber",
|
|
6602
6721
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
6603
6722
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
6604
|
-
uri: `${
|
|
6723
|
+
uri: `${getWorkflowsEnv(
|
|
6724
|
+
"workflowsApiUr"
|
|
6725
|
+
)}/functions/delete-mailchimp-subscriber`,
|
|
6605
6726
|
method: "POST",
|
|
6606
6727
|
body: {
|
|
6607
6728
|
list_id: null,
|
|
@@ -6619,7 +6740,9 @@ var mailchimpTaskTemplates = {
|
|
|
6619
6740
|
taskReferenceName: "mailchimp_add_subscriber_tag",
|
|
6620
6741
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
6621
6742
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
6622
|
-
uri: `${
|
|
6743
|
+
uri: `${getWorkflowsEnv(
|
|
6744
|
+
"workflowsApiUr"
|
|
6745
|
+
)}/functions/add-mailchimp-subscriber-tag`,
|
|
6623
6746
|
method: "POST",
|
|
6624
6747
|
body: {
|
|
6625
6748
|
list_id: null,
|
|
@@ -6638,7 +6761,9 @@ var mailchimpTaskTemplates = {
|
|
|
6638
6761
|
taskReferenceName: "mailchimp_add_subscriber_event",
|
|
6639
6762
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
6640
6763
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
6641
|
-
uri: `${
|
|
6764
|
+
uri: `${getWorkflowsEnv(
|
|
6765
|
+
"workflowsApiUr"
|
|
6766
|
+
)}/functions/add-mailchimp-subscriber-event`,
|
|
6642
6767
|
method: "POST",
|
|
6643
6768
|
body: {
|
|
6644
6769
|
list_id: null,
|
|
@@ -6657,7 +6782,9 @@ var mailchimpTaskTemplates = {
|
|
|
6657
6782
|
taskReferenceName: "mailchimp_add_subscriber_note",
|
|
6658
6783
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
6659
6784
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
6660
|
-
uri: `${
|
|
6785
|
+
uri: `${getWorkflowsEnv(
|
|
6786
|
+
"workflowsApiUr"
|
|
6787
|
+
)}/functions/add-mailchimp-subscriber-note`,
|
|
6661
6788
|
method: "POST",
|
|
6662
6789
|
body: {
|
|
6663
6790
|
list_id: null,
|
|
@@ -6676,7 +6803,9 @@ var mailchimpTaskTemplates = {
|
|
|
6676
6803
|
taskReferenceName: "mailchimp_delete_subscriber_tag",
|
|
6677
6804
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
6678
6805
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
6679
|
-
uri: `${
|
|
6806
|
+
uri: `${getWorkflowsEnv(
|
|
6807
|
+
"workflowsApiUr"
|
|
6808
|
+
)}/functions/delete-mailchimp-subscriber-tag`,
|
|
6680
6809
|
method: "POST",
|
|
6681
6810
|
body: {
|
|
6682
6811
|
list_id: null,
|
|
@@ -6695,7 +6824,9 @@ var mailchimpTaskTemplates = {
|
|
|
6695
6824
|
taskReferenceName: "mailchimp_get_subscriber_tags",
|
|
6696
6825
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
6697
6826
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
6698
|
-
uri: `${
|
|
6827
|
+
uri: `${getWorkflowsEnv(
|
|
6828
|
+
"workflowsApiUr"
|
|
6829
|
+
)}/functions/get-mailchimp-subscriber-tags?list_id=#{list_id}&email=#{email}`,
|
|
6699
6830
|
method: "GET",
|
|
6700
6831
|
body: {},
|
|
6701
6832
|
headers: {
|
|
@@ -6710,7 +6841,9 @@ var mailchimpTaskTemplates = {
|
|
|
6710
6841
|
taskReferenceName: "mailchimp_get_subscriber",
|
|
6711
6842
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
6712
6843
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
6713
|
-
uri: `${
|
|
6844
|
+
uri: `${getWorkflowsEnv(
|
|
6845
|
+
"workflowsApiUr"
|
|
6846
|
+
)}/functions/get-mailchimp-subscriber?list_id=#{list_id}&email=#{email}`,
|
|
6714
6847
|
method: "GET",
|
|
6715
6848
|
body: {},
|
|
6716
6849
|
headers: {
|
|
@@ -6725,7 +6858,9 @@ var mailchimpTaskTemplates = {
|
|
|
6725
6858
|
taskReferenceName: "mailchimp_get_subscribers",
|
|
6726
6859
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
6727
6860
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
6728
|
-
uri: `${
|
|
6861
|
+
uri: `${getWorkflowsEnv(
|
|
6862
|
+
"workflowsApiUr"
|
|
6863
|
+
)}/functions/find-mailchimp-subscribers?list_id=#{list_id}&query=#{query}`,
|
|
6729
6864
|
method: "GET",
|
|
6730
6865
|
body: {},
|
|
6731
6866
|
headers: {
|
|
@@ -6740,7 +6875,9 @@ var mailchimpTaskTemplates = {
|
|
|
6740
6875
|
taskReferenceName: "mailchimp_find_campaign",
|
|
6741
6876
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
6742
6877
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
6743
|
-
uri: `${
|
|
6878
|
+
uri: `${getWorkflowsEnv(
|
|
6879
|
+
"workflowsApiUr"
|
|
6880
|
+
)}/functions/find-mailchimp-campaign?campaign_id=#{campaign_id}`,
|
|
6744
6881
|
method: "POST",
|
|
6745
6882
|
body: {},
|
|
6746
6883
|
headers: {
|
|
@@ -6750,12 +6887,12 @@ var mailchimpTaskTemplates = {
|
|
|
6750
6887
|
})
|
|
6751
6888
|
})
|
|
6752
6889
|
})
|
|
6753
|
-
};
|
|
6890
|
+
});
|
|
6754
6891
|
var MailchimpTriggerNames = {
|
|
6755
6892
|
Subscribed: `${import_developer_studio_api7.IntegrationNames.Mailchimp}-${import_developer_studio_api7.MailchimpEventNames.Subscribed}`,
|
|
6756
6893
|
Unsubscribed: `${import_developer_studio_api7.IntegrationNames.Mailchimp}-${import_developer_studio_api7.MailchimpEventNames.Unsubscribed}`
|
|
6757
6894
|
};
|
|
6758
|
-
var mailchimpTriggerConfigs = {
|
|
6895
|
+
var mailchimpTriggerConfigs = () => ({
|
|
6759
6896
|
[MailchimpTriggerNames.Subscribed]: {
|
|
6760
6897
|
key: MailchimpTriggerNames.Subscribed,
|
|
6761
6898
|
name: import_developer_studio_api7.MailchimpEventNames.Subscribed,
|
|
@@ -6810,8 +6947,8 @@ var mailchimpTriggerConfigs = {
|
|
|
6810
6947
|
output: webhookSpecs2.new_unsubscriber.output
|
|
6811
6948
|
}
|
|
6812
6949
|
}
|
|
6813
|
-
};
|
|
6814
|
-
var mailchimpTriggerTemplates = {
|
|
6950
|
+
});
|
|
6951
|
+
var mailchimpTriggerTemplates = () => ({
|
|
6815
6952
|
[MailchimpTriggerNames.Subscribed]: {
|
|
6816
6953
|
type: "webhook",
|
|
6817
6954
|
webhook: {
|
|
@@ -6848,16 +6985,17 @@ var mailchimpTriggerTemplates = {
|
|
|
6848
6985
|
}
|
|
6849
6986
|
}
|
|
6850
6987
|
}
|
|
6851
|
-
};
|
|
6988
|
+
});
|
|
6852
6989
|
|
|
6853
6990
|
// src/views/Flows/Definitions/Mocks/OpenAI/index.ts
|
|
6854
6991
|
var import_developer_studio_api8 = require("@livechat/developer-studio-api");
|
|
6855
|
-
var
|
|
6856
|
-
var openAiTaskConfigs = {
|
|
6992
|
+
var openAiTaskConfigs = () => ({
|
|
6857
6993
|
["OPENAI_EXTRACT_ORDER_REQUEST" /* ExtractOrderRequest */]: {
|
|
6858
6994
|
key: "OPENAI_EXTRACT_ORDER_REQUEST" /* ExtractOrderRequest */,
|
|
6859
6995
|
type: import_developer_studio_api8.WorkflowDefinitionTaskType.http,
|
|
6860
|
-
url: `${
|
|
6996
|
+
url: `${getWorkflowsEnv(
|
|
6997
|
+
"workflowsApiUr"
|
|
6998
|
+
)}/functions/extract-order-from-text`,
|
|
6861
6999
|
customization: {
|
|
6862
7000
|
provider: OTHER_PRODUCT_TYPE.OPENAI,
|
|
6863
7001
|
product: "OpenAI",
|
|
@@ -6946,7 +7084,9 @@ var openAiTaskConfigs = {
|
|
|
6946
7084
|
["OPENAI_ANALYZE_TEXT_SENTIMENT" /* AnalyzeTextSentiment */]: {
|
|
6947
7085
|
key: "OPENAI_ANALYZE_TEXT_SENTIMENT" /* AnalyzeTextSentiment */,
|
|
6948
7086
|
type: import_developer_studio_api8.WorkflowDefinitionTaskType.http,
|
|
6949
|
-
url: `${
|
|
7087
|
+
url: `${getWorkflowsEnv(
|
|
7088
|
+
"workflowsApiUr"
|
|
7089
|
+
)}/functions/analyze-text-sentiment`,
|
|
6950
7090
|
customization: {
|
|
6951
7091
|
provider: OTHER_PRODUCT_TYPE.OPENAI,
|
|
6952
7092
|
product: "OpenAI",
|
|
@@ -6981,7 +7121,7 @@ var openAiTaskConfigs = {
|
|
|
6981
7121
|
["OPENAI_SUMMARIZE_TEXT" /* SummarizeText */]: {
|
|
6982
7122
|
key: "OPENAI_SUMMARIZE_TEXT" /* SummarizeText */,
|
|
6983
7123
|
type: import_developer_studio_api8.WorkflowDefinitionTaskType.http,
|
|
6984
|
-
url: `${
|
|
7124
|
+
url: `${getWorkflowsEnv("workflowsApiUr")}/functions/summarize-text`,
|
|
6985
7125
|
customization: {
|
|
6986
7126
|
provider: OTHER_PRODUCT_TYPE.OPENAI,
|
|
6987
7127
|
product: "OpenAI",
|
|
@@ -7016,7 +7156,7 @@ var openAiTaskConfigs = {
|
|
|
7016
7156
|
["OPENAI_MODERATE_TEXT" /* ModerateText */]: {
|
|
7017
7157
|
key: "OPENAI_MODERATE_TEXT" /* ModerateText */,
|
|
7018
7158
|
type: import_developer_studio_api8.WorkflowDefinitionTaskType.http,
|
|
7019
|
-
url: `${
|
|
7159
|
+
url: `${getWorkflowsEnv("workflowsApiUr")}/functions/moderate-text`,
|
|
7020
7160
|
customization: {
|
|
7021
7161
|
provider: OTHER_PRODUCT_TYPE.OPENAI,
|
|
7022
7162
|
product: "OpenAI",
|
|
@@ -7050,7 +7190,7 @@ var openAiTaskConfigs = {
|
|
|
7050
7190
|
["OPENAI_CATEGORIZE_TEXT" /* CategorizeText */]: {
|
|
7051
7191
|
key: "OPENAI_CATEGORIZE_TEXT" /* CategorizeText */,
|
|
7052
7192
|
type: import_developer_studio_api8.WorkflowDefinitionTaskType.http,
|
|
7053
|
-
url: `${
|
|
7193
|
+
url: `${getWorkflowsEnv("workflowsApiUr")}/functions/categorize-text`,
|
|
7054
7194
|
customization: {
|
|
7055
7195
|
provider: OTHER_PRODUCT_TYPE.OPENAI,
|
|
7056
7196
|
product: "OpenAI",
|
|
@@ -7090,14 +7230,16 @@ var openAiTaskConfigs = {
|
|
|
7090
7230
|
})
|
|
7091
7231
|
}
|
|
7092
7232
|
}
|
|
7093
|
-
};
|
|
7094
|
-
var openAiTaskTemplates = {
|
|
7233
|
+
});
|
|
7234
|
+
var openAiTaskTemplates = () => ({
|
|
7095
7235
|
["OPENAI_EXTRACT_ORDER_REQUEST" /* ExtractOrderRequest */]: __spreadProps(__spreadValues({}, workflowHttpTask), {
|
|
7096
7236
|
name: "OPENAI_EXTRACT_ORDER_REQUEST" /* ExtractOrderRequest */,
|
|
7097
7237
|
taskReferenceName: "openai_extract_order_request",
|
|
7098
7238
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
7099
7239
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
7100
|
-
uri: `${
|
|
7240
|
+
uri: `${getWorkflowsEnv(
|
|
7241
|
+
"workflowsApiUr"
|
|
7242
|
+
)}/functions/extract-order-from-text`,
|
|
7101
7243
|
method: "POST",
|
|
7102
7244
|
body: {
|
|
7103
7245
|
text: "#{chat_transcript}"
|
|
@@ -7114,7 +7256,9 @@ var openAiTaskTemplates = {
|
|
|
7114
7256
|
taskReferenceName: "openai_text_sentiment",
|
|
7115
7257
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
7116
7258
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
7117
|
-
uri: `${
|
|
7259
|
+
uri: `${getWorkflowsEnv(
|
|
7260
|
+
"workflowsApiUr"
|
|
7261
|
+
)}/functions/analyze-text-sentiment`,
|
|
7118
7262
|
method: "POST",
|
|
7119
7263
|
body: {
|
|
7120
7264
|
text: "#{chat_transcript}"
|
|
@@ -7131,7 +7275,7 @@ var openAiTaskTemplates = {
|
|
|
7131
7275
|
taskReferenceName: "openai_summarize_text",
|
|
7132
7276
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
7133
7277
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
7134
|
-
uri: `${
|
|
7278
|
+
uri: `${getWorkflowsEnv("workflowsApiUr")}/functions/summarize-text`,
|
|
7135
7279
|
method: "POST",
|
|
7136
7280
|
body: {
|
|
7137
7281
|
text: "#{chat_transcript}"
|
|
@@ -7148,7 +7292,7 @@ var openAiTaskTemplates = {
|
|
|
7148
7292
|
taskReferenceName: "openai_moderate_text",
|
|
7149
7293
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
7150
7294
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
7151
|
-
uri: `${
|
|
7295
|
+
uri: `${getWorkflowsEnv("workflowsApiUr")}/functions/moderate-text`,
|
|
7152
7296
|
method: "POST",
|
|
7153
7297
|
body: {
|
|
7154
7298
|
text: "#{chat_transcript}"
|
|
@@ -7165,7 +7309,7 @@ var openAiTaskTemplates = {
|
|
|
7165
7309
|
taskReferenceName: "openai_categorize_text",
|
|
7166
7310
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
7167
7311
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
7168
|
-
uri: `${
|
|
7312
|
+
uri: `${getWorkflowsEnv("workflowsApiUr")}/functions/categorize-text`,
|
|
7169
7313
|
method: "POST",
|
|
7170
7314
|
body: {
|
|
7171
7315
|
text: "#{chat_transcript}"
|
|
@@ -7177,11 +7321,10 @@ var openAiTaskTemplates = {
|
|
|
7177
7321
|
})
|
|
7178
7322
|
})
|
|
7179
7323
|
})
|
|
7180
|
-
};
|
|
7324
|
+
});
|
|
7181
7325
|
|
|
7182
7326
|
// src/views/Flows/Definitions/Mocks/Shopify/index.ts
|
|
7183
7327
|
var import_developer_studio_api9 = require("@livechat/developer-studio-api");
|
|
7184
|
-
var config8 = getWorkflowsConfig();
|
|
7185
7328
|
var shopifyCustomerAddressBody = {
|
|
7186
7329
|
id: {
|
|
7187
7330
|
type: "number",
|
|
@@ -7601,11 +7744,13 @@ var webhookSpecs3 = {
|
|
|
7601
7744
|
}
|
|
7602
7745
|
}
|
|
7603
7746
|
};
|
|
7604
|
-
var shopifyTaskConfigs = {
|
|
7747
|
+
var shopifyTaskConfigs = () => ({
|
|
7605
7748
|
["SHOPIFY_CREATE_CUSTOMER" /* CreateCustomer */]: {
|
|
7606
7749
|
key: "SHOPIFY_CREATE_CUSTOMER" /* CreateCustomer */,
|
|
7607
7750
|
type: import_developer_studio_api9.WorkflowDefinitionTaskType.http,
|
|
7608
|
-
url: `${
|
|
7751
|
+
url: `${getWorkflowsEnv(
|
|
7752
|
+
"workflowsApiUr"
|
|
7753
|
+
)}/functions/create-shopify-customer`,
|
|
7609
7754
|
customization: {
|
|
7610
7755
|
provider: import_developer_studio_api9.IntegrationNames.Shopify,
|
|
7611
7756
|
product: import_developer_studio_api9.IntegrationDisplayNames.Shopify,
|
|
@@ -7629,7 +7774,7 @@ var shopifyTaskConfigs = {
|
|
|
7629
7774
|
["SHOPIFY_CREATE_ORDER" /* CreateOrder */]: {
|
|
7630
7775
|
key: "SHOPIFY_CREATE_ORDER" /* CreateOrder */,
|
|
7631
7776
|
type: import_developer_studio_api9.WorkflowDefinitionTaskType.http,
|
|
7632
|
-
url: `${
|
|
7777
|
+
url: `${getWorkflowsEnv("workflowsApiUr")}/functions/create-shopify-order`,
|
|
7633
7778
|
customization: {
|
|
7634
7779
|
provider: import_developer_studio_api9.IntegrationNames.Shopify,
|
|
7635
7780
|
product: import_developer_studio_api9.IntegrationDisplayNames.Shopify,
|
|
@@ -7652,7 +7797,9 @@ var shopifyTaskConfigs = {
|
|
|
7652
7797
|
["SHOPIFY_CREATE_DRAFT_ORDER" /* CreateDraftOrder */]: {
|
|
7653
7798
|
key: "SHOPIFY_CREATE_DRAFT_ORDER" /* CreateDraftOrder */,
|
|
7654
7799
|
type: import_developer_studio_api9.WorkflowDefinitionTaskType.http,
|
|
7655
|
-
url: `${
|
|
7800
|
+
url: `${getWorkflowsEnv(
|
|
7801
|
+
"workflowsApiUr"
|
|
7802
|
+
)}/functions/create-shopify-draft-order`,
|
|
7656
7803
|
customization: {
|
|
7657
7804
|
provider: import_developer_studio_api9.IntegrationNames.Shopify,
|
|
7658
7805
|
product: import_developer_studio_api9.IntegrationDisplayNames.Shopify,
|
|
@@ -7675,7 +7822,9 @@ var shopifyTaskConfigs = {
|
|
|
7675
7822
|
["SHOPIFY_CREATE_PRODUCT" /* CreateProduct */]: {
|
|
7676
7823
|
key: "SHOPIFY_CREATE_PRODUCT" /* CreateProduct */,
|
|
7677
7824
|
type: import_developer_studio_api9.WorkflowDefinitionTaskType.http,
|
|
7678
|
-
url: `${
|
|
7825
|
+
url: `${getWorkflowsEnv(
|
|
7826
|
+
"workflowsApiUr"
|
|
7827
|
+
)}/functions/create-shopify-product`,
|
|
7679
7828
|
customization: {
|
|
7680
7829
|
provider: import_developer_studio_api9.IntegrationNames.Shopify,
|
|
7681
7830
|
product: import_developer_studio_api9.IntegrationDisplayNames.Shopify,
|
|
@@ -7698,7 +7847,9 @@ var shopifyTaskConfigs = {
|
|
|
7698
7847
|
["SHOPIFY_CREATE_PRODUCT_VARIANT" /* CreateProductVariant */]: {
|
|
7699
7848
|
type: import_developer_studio_api9.WorkflowDefinitionTaskType.http,
|
|
7700
7849
|
key: "SHOPIFY_CREATE_PRODUCT_VARIANT" /* CreateProductVariant */,
|
|
7701
|
-
url: `${
|
|
7850
|
+
url: `${getWorkflowsEnv(
|
|
7851
|
+
"workflowsApiUr"
|
|
7852
|
+
)}/functions/create-shopify-product-variant`,
|
|
7702
7853
|
customization: {
|
|
7703
7854
|
provider: import_developer_studio_api9.IntegrationNames.Shopify,
|
|
7704
7855
|
product: import_developer_studio_api9.IntegrationDisplayNames.Shopify,
|
|
@@ -7721,7 +7872,7 @@ var shopifyTaskConfigs = {
|
|
|
7721
7872
|
["SHOPIFY_GET_CUSTOMER" /* GetCustomer */]: {
|
|
7722
7873
|
key: "SHOPIFY_GET_CUSTOMER" /* GetCustomer */,
|
|
7723
7874
|
type: import_developer_studio_api9.WorkflowDefinitionTaskType.http,
|
|
7724
|
-
url: `${
|
|
7875
|
+
url: `${getWorkflowsEnv("workflowsApiUr")}/functions/get-shopify-customer`,
|
|
7725
7876
|
customization: {
|
|
7726
7877
|
provider: import_developer_studio_api9.IntegrationNames.Shopify,
|
|
7727
7878
|
product: import_developer_studio_api9.IntegrationDisplayNames.Shopify,
|
|
@@ -7750,7 +7901,9 @@ var shopifyTaskConfigs = {
|
|
|
7750
7901
|
["SHOPIFY_GET_CUSTOMER_ORDERS" /* GetCustomerOrders */]: {
|
|
7751
7902
|
key: "SHOPIFY_GET_CUSTOMER_ORDERS" /* GetCustomerOrders */,
|
|
7752
7903
|
type: import_developer_studio_api9.WorkflowDefinitionTaskType.http,
|
|
7753
|
-
url: `${
|
|
7904
|
+
url: `${getWorkflowsEnv(
|
|
7905
|
+
"workflowsApiUr"
|
|
7906
|
+
)}/functions/get-shopify-customer-orders`,
|
|
7754
7907
|
customization: {
|
|
7755
7908
|
provider: import_developer_studio_api9.IntegrationNames.Shopify,
|
|
7756
7909
|
product: import_developer_studio_api9.IntegrationDisplayNames.Shopify,
|
|
@@ -7782,7 +7935,9 @@ var shopifyTaskConfigs = {
|
|
|
7782
7935
|
["SHOPIFY_GET_CUSTOMER_LAST_ORDER" /* GetCustomerLastOrder */]: {
|
|
7783
7936
|
key: "SHOPIFY_GET_CUSTOMER_LAST_ORDER" /* GetCustomerLastOrder */,
|
|
7784
7937
|
type: import_developer_studio_api9.WorkflowDefinitionTaskType.http,
|
|
7785
|
-
url: `${
|
|
7938
|
+
url: `${getWorkflowsEnv(
|
|
7939
|
+
"workflowsApiUr"
|
|
7940
|
+
)}/functions/get-shopify-customer-last-order`,
|
|
7786
7941
|
customization: {
|
|
7787
7942
|
provider: import_developer_studio_api9.IntegrationNames.Shopify,
|
|
7788
7943
|
product: import_developer_studio_api9.IntegrationDisplayNames.Shopify,
|
|
@@ -7811,7 +7966,7 @@ var shopifyTaskConfigs = {
|
|
|
7811
7966
|
["SHOPIFY_GET_PRODUCT" /* GetProduct */]: {
|
|
7812
7967
|
type: import_developer_studio_api9.WorkflowDefinitionTaskType.http,
|
|
7813
7968
|
key: "SHOPIFY_GET_PRODUCT" /* GetProduct */,
|
|
7814
|
-
url: `${
|
|
7969
|
+
url: `${getWorkflowsEnv("workflowsApiUr")}/functions/get-shopify-product`,
|
|
7815
7970
|
customization: {
|
|
7816
7971
|
provider: import_developer_studio_api9.IntegrationNames.Shopify,
|
|
7817
7972
|
product: import_developer_studio_api9.IntegrationDisplayNames.Shopify,
|
|
@@ -7841,7 +7996,9 @@ var shopifyTaskConfigs = {
|
|
|
7841
7996
|
["SHOPIFY_GET_PRODUCT_VARIANT" /* GetProductVariant */]: {
|
|
7842
7997
|
key: "SHOPIFY_GET_PRODUCT_VARIANT" /* GetProductVariant */,
|
|
7843
7998
|
type: import_developer_studio_api9.WorkflowDefinitionTaskType.http,
|
|
7844
|
-
url: `${
|
|
7999
|
+
url: `${getWorkflowsEnv(
|
|
8000
|
+
"workflowsApiUr"
|
|
8001
|
+
)}/functions/get-shopify-product-variant`,
|
|
7845
8002
|
customization: {
|
|
7846
8003
|
provider: import_developer_studio_api9.IntegrationNames.Shopify,
|
|
7847
8004
|
product: import_developer_studio_api9.IntegrationDisplayNames.Shopify,
|
|
@@ -7874,7 +8031,9 @@ var shopifyTaskConfigs = {
|
|
|
7874
8031
|
["SHOPIFY_UPDATE_INVENTORY_QUANTITY" /* UpdateInventoryQuantity */]: {
|
|
7875
8032
|
key: "SHOPIFY_UPDATE_INVENTORY_QUANTITY" /* UpdateInventoryQuantity */,
|
|
7876
8033
|
type: import_developer_studio_api9.WorkflowDefinitionTaskType.http,
|
|
7877
|
-
url: `${
|
|
8034
|
+
url: `${getWorkflowsEnv(
|
|
8035
|
+
"workflowsApiUr"
|
|
8036
|
+
)}/functions/update-shopify-inventory-quantity`,
|
|
7878
8037
|
customization: {
|
|
7879
8038
|
provider: import_developer_studio_api9.IntegrationNames.Shopify,
|
|
7880
8039
|
product: import_developer_studio_api9.IntegrationDisplayNames.Shopify,
|
|
@@ -7940,7 +8099,7 @@ var shopifyTaskConfigs = {
|
|
|
7940
8099
|
["SHOPIFY_UPDATE_ORDER" /* UpdateOrder */]: {
|
|
7941
8100
|
type: import_developer_studio_api9.WorkflowDefinitionTaskType.http,
|
|
7942
8101
|
key: "SHOPIFY_UPDATE_ORDER" /* UpdateOrder */,
|
|
7943
|
-
url: `${
|
|
8102
|
+
url: `${getWorkflowsEnv("workflowsApiUr")}/functions/update-shopify-order`,
|
|
7944
8103
|
customization: {
|
|
7945
8104
|
provider: import_developer_studio_api9.IntegrationNames.Shopify,
|
|
7946
8105
|
product: import_developer_studio_api9.IntegrationDisplayNames.Shopify,
|
|
@@ -7963,7 +8122,9 @@ var shopifyTaskConfigs = {
|
|
|
7963
8122
|
["SHOPIFY_UPDATE_PRODUCT" /* UpdateProduct */]: {
|
|
7964
8123
|
key: "SHOPIFY_UPDATE_PRODUCT" /* UpdateProduct */,
|
|
7965
8124
|
type: import_developer_studio_api9.WorkflowDefinitionTaskType.http,
|
|
7966
|
-
url: `${
|
|
8125
|
+
url: `${getWorkflowsEnv(
|
|
8126
|
+
"workflowsApiUr"
|
|
8127
|
+
)}/functions/update-shopify-product`,
|
|
7967
8128
|
customization: {
|
|
7968
8129
|
provider: import_developer_studio_api9.IntegrationNames.Shopify,
|
|
7969
8130
|
product: import_developer_studio_api9.IntegrationDisplayNames.Shopify,
|
|
@@ -7986,7 +8147,9 @@ var shopifyTaskConfigs = {
|
|
|
7986
8147
|
["SHOPIFY_UPDATE_PRODUCT_VARIANT" /* UpdateProductVariant */]: {
|
|
7987
8148
|
key: "SHOPIFY_UPDATE_PRODUCT_VARIANT" /* UpdateProductVariant */,
|
|
7988
8149
|
type: import_developer_studio_api9.WorkflowDefinitionTaskType.http,
|
|
7989
|
-
url: `${
|
|
8150
|
+
url: `${getWorkflowsEnv(
|
|
8151
|
+
"workflowsApiUr"
|
|
8152
|
+
)}/functions/update-shopify-product-variant`,
|
|
7990
8153
|
customization: {
|
|
7991
8154
|
provider: import_developer_studio_api9.IntegrationNames.Shopify,
|
|
7992
8155
|
product: import_developer_studio_api9.IntegrationDisplayNames.Shopify,
|
|
@@ -8009,7 +8172,9 @@ var shopifyTaskConfigs = {
|
|
|
8009
8172
|
["SHOPIFY_UPDATE_CUSTOMER" /* UpdateCustomer */]: {
|
|
8010
8173
|
key: "SHOPIFY_UPDATE_CUSTOMER" /* UpdateCustomer */,
|
|
8011
8174
|
type: import_developer_studio_api9.WorkflowDefinitionTaskType.http,
|
|
8012
|
-
url: `${
|
|
8175
|
+
url: `${getWorkflowsEnv(
|
|
8176
|
+
"workflowsApiUr"
|
|
8177
|
+
)}/functions/update-shopify-customer`,
|
|
8013
8178
|
customization: {
|
|
8014
8179
|
provider: import_developer_studio_api9.IntegrationNames.Shopify,
|
|
8015
8180
|
product: import_developer_studio_api9.IntegrationDisplayNames.Shopify,
|
|
@@ -8029,14 +8194,16 @@ var shopifyTaskConfigs = {
|
|
|
8029
8194
|
})
|
|
8030
8195
|
}
|
|
8031
8196
|
}
|
|
8032
|
-
};
|
|
8033
|
-
var shopifyTaskTemplates = {
|
|
8197
|
+
});
|
|
8198
|
+
var shopifyTaskTemplates = () => ({
|
|
8034
8199
|
["SHOPIFY_CREATE_CUSTOMER" /* CreateCustomer */]: __spreadProps(__spreadValues({}, workflowHttpTask), {
|
|
8035
8200
|
name: "SHOPIFY_CREATE_CUSTOMER" /* CreateCustomer */,
|
|
8036
8201
|
taskReferenceName: "shopify_create_customer",
|
|
8037
8202
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
8038
8203
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
8039
|
-
uri: `${
|
|
8204
|
+
uri: `${getWorkflowsEnv(
|
|
8205
|
+
"workflowsApiUr"
|
|
8206
|
+
)}/functions/create-shopify-customer`,
|
|
8040
8207
|
method: "POST",
|
|
8041
8208
|
body: {
|
|
8042
8209
|
first_name: "#{first_name}",
|
|
@@ -8056,7 +8223,9 @@ var shopifyTaskTemplates = {
|
|
|
8056
8223
|
taskReferenceName: "shopify_create_order",
|
|
8057
8224
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
8058
8225
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
8059
|
-
uri: `${
|
|
8226
|
+
uri: `${getWorkflowsEnv(
|
|
8227
|
+
"workflowsApiUr"
|
|
8228
|
+
)}/functions/create-shopify-order`,
|
|
8060
8229
|
method: "POST",
|
|
8061
8230
|
body: {},
|
|
8062
8231
|
headers: {
|
|
@@ -8072,7 +8241,9 @@ var shopifyTaskTemplates = {
|
|
|
8072
8241
|
taskReferenceName: "shopify_create_draft_order",
|
|
8073
8242
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
8074
8243
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
8075
|
-
uri: `${
|
|
8244
|
+
uri: `${getWorkflowsEnv(
|
|
8245
|
+
"workflowsApiUr"
|
|
8246
|
+
)}/functions/create-shopify-draft-order`,
|
|
8076
8247
|
method: "POST",
|
|
8077
8248
|
body: {},
|
|
8078
8249
|
headers: {
|
|
@@ -8088,7 +8259,9 @@ var shopifyTaskTemplates = {
|
|
|
8088
8259
|
taskReferenceName: "shopify_create_product",
|
|
8089
8260
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
8090
8261
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
8091
|
-
uri: `${
|
|
8262
|
+
uri: `${getWorkflowsEnv(
|
|
8263
|
+
"workflowsApiUr"
|
|
8264
|
+
)}/functions/create-shopify-product`,
|
|
8092
8265
|
method: "POST",
|
|
8093
8266
|
body: {},
|
|
8094
8267
|
headers: {
|
|
@@ -8104,7 +8277,9 @@ var shopifyTaskTemplates = {
|
|
|
8104
8277
|
taskReferenceName: "shopify_create_product_variant",
|
|
8105
8278
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
8106
8279
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
8107
|
-
uri: `${
|
|
8280
|
+
uri: `${getWorkflowsEnv(
|
|
8281
|
+
"workflowsApiUr"
|
|
8282
|
+
)}/functions/create-shopify-product-variant`,
|
|
8108
8283
|
method: "POST",
|
|
8109
8284
|
body: {},
|
|
8110
8285
|
headers: {
|
|
@@ -8120,7 +8295,9 @@ var shopifyTaskTemplates = {
|
|
|
8120
8295
|
taskReferenceName: "shopify_get_customer",
|
|
8121
8296
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
8122
8297
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
8123
|
-
uri: `${
|
|
8298
|
+
uri: `${getWorkflowsEnv(
|
|
8299
|
+
"workflowsApiUr"
|
|
8300
|
+
)}/functions/get-shopify-customer?email=#{email}`,
|
|
8124
8301
|
method: "GET",
|
|
8125
8302
|
body: {},
|
|
8126
8303
|
headers: {
|
|
@@ -8136,7 +8313,9 @@ var shopifyTaskTemplates = {
|
|
|
8136
8313
|
taskReferenceName: "shopify_get_customer_orders",
|
|
8137
8314
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
8138
8315
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
8139
|
-
uri: `${
|
|
8316
|
+
uri: `${getWorkflowsEnv(
|
|
8317
|
+
"workflowsApiUr"
|
|
8318
|
+
)}/functions/get-shopify-customer-orders?email=#{email}`,
|
|
8140
8319
|
method: "GET",
|
|
8141
8320
|
body: {},
|
|
8142
8321
|
headers: {
|
|
@@ -8152,7 +8331,9 @@ var shopifyTaskTemplates = {
|
|
|
8152
8331
|
taskReferenceName: "shopify_get_customer_last_order",
|
|
8153
8332
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
8154
8333
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
8155
|
-
uri: `${
|
|
8334
|
+
uri: `${getWorkflowsEnv(
|
|
8335
|
+
"workflowsApiUr"
|
|
8336
|
+
)}/functions/get-shopify-customer-last-order?email=#{email}`,
|
|
8156
8337
|
method: "GET",
|
|
8157
8338
|
body: {},
|
|
8158
8339
|
headers: {
|
|
@@ -8168,7 +8349,9 @@ var shopifyTaskTemplates = {
|
|
|
8168
8349
|
taskReferenceName: "shopify_get_product",
|
|
8169
8350
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
8170
8351
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
8171
|
-
uri: `${
|
|
8352
|
+
uri: `${getWorkflowsEnv(
|
|
8353
|
+
"workflowsApiUr"
|
|
8354
|
+
)}/functions/get-shopify-product?product_id=#{product_id}`,
|
|
8172
8355
|
method: "GET",
|
|
8173
8356
|
body: {},
|
|
8174
8357
|
headers: {
|
|
@@ -8184,7 +8367,9 @@ var shopifyTaskTemplates = {
|
|
|
8184
8367
|
taskReferenceName: "shopify_get_product_variant",
|
|
8185
8368
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
8186
8369
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
8187
|
-
uri: `${
|
|
8370
|
+
uri: `${getWorkflowsEnv(
|
|
8371
|
+
"workflowsApiUr"
|
|
8372
|
+
)}/functions/get-shopify-product-variant?product_id=#{product_id}&title=#{title}`,
|
|
8188
8373
|
method: "GET",
|
|
8189
8374
|
body: {},
|
|
8190
8375
|
headers: {
|
|
@@ -8200,7 +8385,9 @@ var shopifyTaskTemplates = {
|
|
|
8200
8385
|
taskReferenceName: "shopify_update_inventory_quantity",
|
|
8201
8386
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
8202
8387
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
8203
|
-
uri: `${
|
|
8388
|
+
uri: `${getWorkflowsEnv(
|
|
8389
|
+
"workflowsApiUr"
|
|
8390
|
+
)}/functions/update-shopify-inventory-quantity`,
|
|
8204
8391
|
method: "PATCH",
|
|
8205
8392
|
body: {
|
|
8206
8393
|
inventory_item_id: "#{inventory_item_id}",
|
|
@@ -8219,7 +8406,9 @@ var shopifyTaskTemplates = {
|
|
|
8219
8406
|
taskReferenceName: "shopify_update_order",
|
|
8220
8407
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
8221
8408
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
8222
|
-
uri: `${
|
|
8409
|
+
uri: `${getWorkflowsEnv(
|
|
8410
|
+
"workflowsApiUr"
|
|
8411
|
+
)}/functions/update-shopify-order`,
|
|
8223
8412
|
method: "PATCH",
|
|
8224
8413
|
body: {},
|
|
8225
8414
|
headers: {
|
|
@@ -8235,7 +8424,9 @@ var shopifyTaskTemplates = {
|
|
|
8235
8424
|
taskReferenceName: "shopify_update_product",
|
|
8236
8425
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
8237
8426
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
8238
|
-
uri: `${
|
|
8427
|
+
uri: `${getWorkflowsEnv(
|
|
8428
|
+
"workflowsApiUr"
|
|
8429
|
+
)}/functions/update-shopify-product`,
|
|
8239
8430
|
method: "PATCH",
|
|
8240
8431
|
body: {},
|
|
8241
8432
|
headers: {
|
|
@@ -8251,7 +8442,9 @@ var shopifyTaskTemplates = {
|
|
|
8251
8442
|
taskReferenceName: "shopify_update_product_variant",
|
|
8252
8443
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
8253
8444
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
8254
|
-
uri: `${
|
|
8445
|
+
uri: `${getWorkflowsEnv(
|
|
8446
|
+
"workflowsApiUr"
|
|
8447
|
+
)}/functions/update-shopify-product-variant`,
|
|
8255
8448
|
method: "PATCH",
|
|
8256
8449
|
body: {},
|
|
8257
8450
|
headers: {
|
|
@@ -8267,7 +8460,9 @@ var shopifyTaskTemplates = {
|
|
|
8267
8460
|
taskReferenceName: "shopify_update_customer",
|
|
8268
8461
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
8269
8462
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
8270
|
-
uri: `${
|
|
8463
|
+
uri: `${getWorkflowsEnv(
|
|
8464
|
+
"workflowsApiUr"
|
|
8465
|
+
)}/functions/update-shopify-customer`,
|
|
8271
8466
|
method: "PATCH",
|
|
8272
8467
|
body: {},
|
|
8273
8468
|
headers: {
|
|
@@ -8278,11 +8473,11 @@ var shopifyTaskTemplates = {
|
|
|
8278
8473
|
})
|
|
8279
8474
|
})
|
|
8280
8475
|
})
|
|
8281
|
-
};
|
|
8476
|
+
});
|
|
8282
8477
|
var ShopifyTriggerNames = {
|
|
8283
8478
|
OrderCreated: `${import_developer_studio_api9.IntegrationNames.Shopify}-${import_developer_studio_api9.ShopifyEventNames.OrderCreated}`
|
|
8284
8479
|
};
|
|
8285
|
-
var shopifyTriggerConfigs = {
|
|
8480
|
+
var shopifyTriggerConfigs = () => ({
|
|
8286
8481
|
[ShopifyTriggerNames.OrderCreated]: {
|
|
8287
8482
|
key: ShopifyTriggerNames.OrderCreated,
|
|
8288
8483
|
name: import_developer_studio_api9.ShopifyEventNames.OrderCreated,
|
|
@@ -8299,8 +8494,8 @@ var shopifyTriggerConfigs = {
|
|
|
8299
8494
|
output: webhookSpecs3.new_paid_order.output
|
|
8300
8495
|
}
|
|
8301
8496
|
}
|
|
8302
|
-
};
|
|
8303
|
-
var shopifyTriggerTemplates = {
|
|
8497
|
+
});
|
|
8498
|
+
var shopifyTriggerTemplates = () => ({
|
|
8304
8499
|
[ShopifyTriggerNames.OrderCreated]: {
|
|
8305
8500
|
type: "webhook",
|
|
8306
8501
|
webhook: {
|
|
@@ -8316,33 +8511,49 @@ var shopifyTriggerTemplates = {
|
|
|
8316
8511
|
}
|
|
8317
8512
|
}
|
|
8318
8513
|
}
|
|
8319
|
-
};
|
|
8514
|
+
});
|
|
8320
8515
|
|
|
8321
8516
|
// src/views/Flows/Definitions/api.mocks.ts
|
|
8322
|
-
var
|
|
8323
|
-
|
|
8324
|
-
|
|
8517
|
+
var WorkflowItemsConfiguration = class {
|
|
8518
|
+
constructor() {
|
|
8519
|
+
this.configs = getWorkflowItemConfigs();
|
|
8520
|
+
this.templates = getWorkflowItemTemplates();
|
|
8521
|
+
}
|
|
8522
|
+
static get config() {
|
|
8523
|
+
const instance = this._instance || (this._instance = new this());
|
|
8524
|
+
return instance.configs;
|
|
8525
|
+
}
|
|
8526
|
+
static get templates() {
|
|
8527
|
+
const instance = this._instance || (this._instance = new this());
|
|
8528
|
+
return instance.templates;
|
|
8529
|
+
}
|
|
8530
|
+
};
|
|
8531
|
+
var getWorkflowItemConfigs = () => {
|
|
8532
|
+
return {
|
|
8533
|
+
tasks: __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, livechatTaskConfigs()), helpdeskTaskConfigs()), mailchimpTaskConfigs()), shopifyTaskConfigs()), hubspotTaskConfigs()), bigCommerceTaskConfigs()), openAiTaskConfigs()), systemTaskConfigs()),
|
|
8534
|
+
triggers: __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, livechatTriggerConfigs()), mailchimpTriggerConfigs()), shopifyTriggerConfigs()), hubspotTriggerConfigs()), bigcommerceTriggerConfigs()), systemTriggerConfigs())
|
|
8535
|
+
};
|
|
8325
8536
|
};
|
|
8326
|
-
var
|
|
8537
|
+
var getWorkflowItemTemplates = () => ({
|
|
8327
8538
|
tasks: {
|
|
8328
|
-
livechat: livechatTaskTemplates,
|
|
8329
|
-
helpdesk: helpdeskTaskTemplates,
|
|
8330
|
-
mailchimp: mailchimpTaskTemplates,
|
|
8331
|
-
hubspot: hubspotTaskTemplates,
|
|
8332
|
-
bigcommerce: bigCommerceTaskTemplates,
|
|
8333
|
-
shopify: shopifyTaskTemplates,
|
|
8334
|
-
openai: openAiTaskTemplates,
|
|
8335
|
-
system: systemTaskTemplates
|
|
8539
|
+
livechat: livechatTaskTemplates(),
|
|
8540
|
+
helpdesk: helpdeskTaskTemplates(),
|
|
8541
|
+
mailchimp: mailchimpTaskTemplates(),
|
|
8542
|
+
hubspot: hubspotTaskTemplates(),
|
|
8543
|
+
bigcommerce: bigCommerceTaskTemplates(),
|
|
8544
|
+
shopify: shopifyTaskTemplates(),
|
|
8545
|
+
openai: openAiTaskTemplates(),
|
|
8546
|
+
system: systemTaskTemplates()
|
|
8336
8547
|
},
|
|
8337
8548
|
triggers: {
|
|
8338
|
-
livechat: livechatTriggerTemplates,
|
|
8339
|
-
mailchimp: mailchimpTriggerTemplates,
|
|
8340
|
-
shopify: shopifyTriggerTemplates,
|
|
8341
|
-
hubspot: hubSpotTriggerTemplates,
|
|
8342
|
-
bigcommerce: bigcommerceTriggerTemplates,
|
|
8343
|
-
system: systemTriggerTemplates
|
|
8549
|
+
livechat: livechatTriggerTemplates(),
|
|
8550
|
+
mailchimp: mailchimpTriggerTemplates(),
|
|
8551
|
+
shopify: shopifyTriggerTemplates(),
|
|
8552
|
+
hubspot: hubSpotTriggerTemplates(),
|
|
8553
|
+
bigcommerce: bigcommerceTriggerTemplates(),
|
|
8554
|
+
system: systemTriggerTemplates()
|
|
8344
8555
|
}
|
|
8345
|
-
};
|
|
8556
|
+
});
|
|
8346
8557
|
|
|
8347
8558
|
// src/views/Flows/Definitions/Common/Builder/config/workflow.ts
|
|
8348
8559
|
var NEW_WORKFLOW_TEMPLATE = {
|
|
@@ -8493,9 +8704,40 @@ var WORKFLOW_TERMINATE_TASK_SCHEMA = {
|
|
|
8493
8704
|
}
|
|
8494
8705
|
}
|
|
8495
8706
|
};
|
|
8496
|
-
var
|
|
8707
|
+
var WORKFLOW_SCHEMA_DEFS = {
|
|
8708
|
+
$defs: {
|
|
8709
|
+
mailchimp_audience: {
|
|
8710
|
+
"x-ref": {
|
|
8711
|
+
request: {
|
|
8712
|
+
url: "http://${credential.server}.mailchimp.com/api/audience",
|
|
8713
|
+
method: "GET",
|
|
8714
|
+
headers: {
|
|
8715
|
+
authorization: "${credential.token}"
|
|
8716
|
+
},
|
|
8717
|
+
body: {}
|
|
8718
|
+
},
|
|
8719
|
+
displayField: "name",
|
|
8720
|
+
valueField: "id"
|
|
8721
|
+
}
|
|
8722
|
+
},
|
|
8723
|
+
mailchimp_campaign: {
|
|
8724
|
+
"x-ref": {
|
|
8725
|
+
request: {
|
|
8726
|
+
url: "http://${credential.server}.mailchimp.com/api/campaign",
|
|
8727
|
+
method: "GET",
|
|
8728
|
+
headers: {
|
|
8729
|
+
authorization: "${credential.token}"
|
|
8730
|
+
},
|
|
8731
|
+
body: {}
|
|
8732
|
+
},
|
|
8733
|
+
displayField: "name",
|
|
8734
|
+
valueField: "id"
|
|
8735
|
+
}
|
|
8736
|
+
}
|
|
8737
|
+
}
|
|
8738
|
+
};
|
|
8739
|
+
var WORKFLOW_SCHEMA = () => ({
|
|
8497
8740
|
$schema: "http://json-schema.org/draft-07/schema",
|
|
8498
|
-
$id: "http://example.com/example.json",
|
|
8499
8741
|
type: "object",
|
|
8500
8742
|
title: "The root schema",
|
|
8501
8743
|
description: "The root schema comprises the entire JSON document.",
|
|
@@ -8641,20 +8883,22 @@ var WORKFLOW_SCHEMA = {
|
|
|
8641
8883
|
},
|
|
8642
8884
|
then: WORKFLOW_HTTP_TASK_SCHEMA()
|
|
8643
8885
|
},
|
|
8644
|
-
...Object.values(
|
|
8645
|
-
|
|
8646
|
-
|
|
8647
|
-
|
|
8648
|
-
|
|
8649
|
-
|
|
8650
|
-
|
|
8651
|
-
|
|
8652
|
-
|
|
8653
|
-
|
|
8654
|
-
|
|
8655
|
-
|
|
8656
|
-
|
|
8657
|
-
|
|
8886
|
+
...Object.values(WorkflowItemsConfiguration.config.tasks).map(
|
|
8887
|
+
(config2) => {
|
|
8888
|
+
var _a, _b;
|
|
8889
|
+
return {
|
|
8890
|
+
if: {
|
|
8891
|
+
properties: {
|
|
8892
|
+
type: { const: import_developer_studio_api10.WorkflowDefinitionTaskType.http },
|
|
8893
|
+
name: { const: config2.key }
|
|
8894
|
+
}
|
|
8895
|
+
},
|
|
8896
|
+
then: WORKFLOW_HTTP_TASK_SCHEMA(config2.key, {
|
|
8897
|
+
body: (_b = (_a = config2.specification.input) == null ? void 0 : _a.properties) == null ? void 0 : _b.body
|
|
8898
|
+
})
|
|
8899
|
+
};
|
|
8900
|
+
}
|
|
8901
|
+
)
|
|
8658
8902
|
]
|
|
8659
8903
|
}
|
|
8660
8904
|
},
|
|
@@ -8742,92 +8986,65 @@ var WORKFLOW_SCHEMA = {
|
|
|
8742
8986
|
description: "This object holds the declaration of your workflow trigger.",
|
|
8743
8987
|
default: {},
|
|
8744
8988
|
allOf: [
|
|
8745
|
-
...Object.values(
|
|
8746
|
-
|
|
8747
|
-
|
|
8748
|
-
|
|
8749
|
-
|
|
8750
|
-
|
|
8751
|
-
|
|
8752
|
-
|
|
8753
|
-
|
|
8754
|
-
|
|
8755
|
-
|
|
8756
|
-
|
|
8757
|
-
|
|
8758
|
-
|
|
8759
|
-
|
|
8760
|
-
|
|
8761
|
-
|
|
8762
|
-
|
|
8763
|
-
|
|
8764
|
-
|
|
8765
|
-
|
|
8766
|
-
|
|
8767
|
-
|
|
8768
|
-
|
|
8769
|
-
|
|
8770
|
-
|
|
8771
|
-
|
|
8772
|
-
|
|
8773
|
-
|
|
8774
|
-
|
|
8989
|
+
...Object.values(WorkflowItemsConfiguration.config.triggers).map(
|
|
8990
|
+
(config2) => {
|
|
8991
|
+
var _a, _b;
|
|
8992
|
+
if (config2.type === "webhook") {
|
|
8993
|
+
return {
|
|
8994
|
+
if: {
|
|
8995
|
+
properties: {
|
|
8996
|
+
type: { const: config2.type }
|
|
8997
|
+
}
|
|
8998
|
+
},
|
|
8999
|
+
then: {
|
|
9000
|
+
required: ["type", "webhook"],
|
|
9001
|
+
properties: {
|
|
9002
|
+
type: { const: "webhook" },
|
|
9003
|
+
webhook: {
|
|
9004
|
+
if: {
|
|
9005
|
+
properties: {
|
|
9006
|
+
source: { const: config2.customization.provider }
|
|
9007
|
+
}
|
|
9008
|
+
},
|
|
9009
|
+
then: {
|
|
9010
|
+
required: ["source", "event", "headers"],
|
|
9011
|
+
properties: {
|
|
9012
|
+
source: { const: config2.customization.provider },
|
|
9013
|
+
event: {
|
|
9014
|
+
if: {
|
|
9015
|
+
properties: {
|
|
9016
|
+
name: { const: config2.name }
|
|
9017
|
+
}
|
|
9018
|
+
},
|
|
9019
|
+
then: (_a = config2.specification.input) != null ? _a : {}
|
|
9020
|
+
}
|
|
8775
9021
|
}
|
|
8776
9022
|
}
|
|
8777
9023
|
}
|
|
8778
9024
|
}
|
|
8779
9025
|
}
|
|
8780
|
-
}
|
|
8781
|
-
}
|
|
8782
|
-
|
|
8783
|
-
|
|
8784
|
-
|
|
8785
|
-
|
|
8786
|
-
|
|
8787
|
-
|
|
8788
|
-
|
|
8789
|
-
}
|
|
8790
|
-
|
|
8791
|
-
|
|
8792
|
-
}
|
|
9026
|
+
};
|
|
9027
|
+
}
|
|
9028
|
+
if (config2.type === "system") {
|
|
9029
|
+
return {
|
|
9030
|
+
if: {
|
|
9031
|
+
properties: {
|
|
9032
|
+
type: { const: config2.type },
|
|
9033
|
+
name: { const: config2.key }
|
|
9034
|
+
}
|
|
9035
|
+
},
|
|
9036
|
+
then: (_b = config2.specification.input) != null ? _b : {}
|
|
9037
|
+
};
|
|
9038
|
+
}
|
|
9039
|
+
throw new Error("Invalid trigger type");
|
|
8793
9040
|
}
|
|
8794
|
-
|
|
8795
|
-
})
|
|
9041
|
+
)
|
|
8796
9042
|
]
|
|
8797
9043
|
}
|
|
8798
9044
|
},
|
|
8799
9045
|
required: ["definition", "trigger"],
|
|
8800
|
-
$defs:
|
|
8801
|
-
|
|
8802
|
-
"x-ref": {
|
|
8803
|
-
request: {
|
|
8804
|
-
url: "http://${credential.server}.mailchimp.com/api/audience",
|
|
8805
|
-
method: "GET",
|
|
8806
|
-
headers: {
|
|
8807
|
-
authorization: "${credential.token}"
|
|
8808
|
-
},
|
|
8809
|
-
body: {}
|
|
8810
|
-
},
|
|
8811
|
-
displayField: "name",
|
|
8812
|
-
valueField: "id"
|
|
8813
|
-
}
|
|
8814
|
-
},
|
|
8815
|
-
mailchimp_campaign: {
|
|
8816
|
-
"x-ref": {
|
|
8817
|
-
request: {
|
|
8818
|
-
url: "http://${credential.server}.mailchimp.com/api/campaign",
|
|
8819
|
-
method: "GET",
|
|
8820
|
-
headers: {
|
|
8821
|
-
authorization: "${credential.token}"
|
|
8822
|
-
},
|
|
8823
|
-
body: {}
|
|
8824
|
-
},
|
|
8825
|
-
displayField: "name",
|
|
8826
|
-
valueField: "id"
|
|
8827
|
-
}
|
|
8828
|
-
}
|
|
8829
|
-
}
|
|
8830
|
-
};
|
|
9046
|
+
$defs: WORKFLOW_SCHEMA_DEFS.$defs
|
|
9047
|
+
});
|
|
8831
9048
|
var JSON_FILE_NAME = "file:///workflow.json";
|
|
8832
9049
|
function configureMonaco(monaco) {
|
|
8833
9050
|
monaco.languages.typescript.javascriptDefaults.setEagerModelSync(true);
|
|
@@ -8844,7 +9061,7 @@ function configureMonaco(monaco) {
|
|
|
8844
9061
|
// id of the first schema
|
|
8845
9062
|
fileMatch: [modelUri.toString()],
|
|
8846
9063
|
// associate with our model
|
|
8847
|
-
schema: WORKFLOW_SCHEMA
|
|
9064
|
+
schema: WORKFLOW_SCHEMA()
|
|
8848
9065
|
}
|
|
8849
9066
|
]
|
|
8850
9067
|
});
|
|
@@ -9454,7 +9671,7 @@ var workflowBuilderUtils = {
|
|
|
9454
9671
|
return result;
|
|
9455
9672
|
},
|
|
9456
9673
|
getTaskConfig(task2) {
|
|
9457
|
-
return
|
|
9674
|
+
return WorkflowItemsConfiguration.config.tasks[task2.name];
|
|
9458
9675
|
},
|
|
9459
9676
|
getTaskConfigByReference(value) {
|
|
9460
9677
|
const segments = value.split(".");
|
|
@@ -9462,7 +9679,7 @@ var workflowBuilderUtils = {
|
|
|
9462
9679
|
return;
|
|
9463
9680
|
}
|
|
9464
9681
|
const referenceName = segments[0].split("_").slice(0, -1).join("_");
|
|
9465
|
-
const task2 = Object.values(
|
|
9682
|
+
const task2 = Object.values(WorkflowItemsConfiguration.templates).flatMap((x) => Object.values(x)).find((task3) => task3.taskReferenceName === referenceName);
|
|
9466
9683
|
if (!task2) {
|
|
9467
9684
|
return;
|
|
9468
9685
|
}
|
|
@@ -9470,9 +9687,9 @@ var workflowBuilderUtils = {
|
|
|
9470
9687
|
},
|
|
9471
9688
|
getTriggerConfig(trigger) {
|
|
9472
9689
|
if (trigger.type === "webhook" && trigger.webhook) {
|
|
9473
|
-
return
|
|
9690
|
+
return WorkflowItemsConfiguration.config.triggers[`${trigger.webhook.source}-${trigger.webhook.event.name}`];
|
|
9474
9691
|
}
|
|
9475
|
-
const triggers = Object.values(
|
|
9692
|
+
const triggers = Object.values(WorkflowItemsConfiguration.config.triggers);
|
|
9476
9693
|
switch (trigger.type) {
|
|
9477
9694
|
case "recurring":
|
|
9478
9695
|
return triggers.find((x) => x.key === "scheduled" /* Scheduled */);
|
|
@@ -9493,10 +9710,10 @@ var workflowBuilderUtils = {
|
|
|
9493
9710
|
}
|
|
9494
9711
|
};
|
|
9495
9712
|
}
|
|
9496
|
-
const
|
|
9713
|
+
const config2 = workflowBuilderUtils.getTriggerConfig({
|
|
9497
9714
|
type: "manual_only"
|
|
9498
9715
|
});
|
|
9499
|
-
return
|
|
9716
|
+
return config2;
|
|
9500
9717
|
},
|
|
9501
9718
|
getItemConfig(item) {
|
|
9502
9719
|
var _a;
|
|
@@ -9862,7 +10079,7 @@ var getWorkflowValidationErrors = (validationErrors) => {
|
|
|
9862
10079
|
return errors;
|
|
9863
10080
|
};
|
|
9864
10081
|
var getSchemaError = (workflow, frames) => {
|
|
9865
|
-
const validate = ajv.compile(WORKFLOW_SCHEMA);
|
|
10082
|
+
const validate = ajv.compile(WORKFLOW_SCHEMA());
|
|
9866
10083
|
const resolved = __spreadProps(__spreadValues({}, workflow), {
|
|
9867
10084
|
definition: __spreadProps(__spreadValues({}, workflow.definition), {
|
|
9868
10085
|
tasks: workflow.definition.tasks.map(
|
|
@@ -9891,7 +10108,7 @@ var getTasksErrors = (workflow, frames, products) => {
|
|
|
9891
10108
|
var _a;
|
|
9892
10109
|
const globalFrame = frames.global;
|
|
9893
10110
|
const frame = frames.tasks[task2.taskReferenceName];
|
|
9894
|
-
const
|
|
10111
|
+
const config2 = (_a = frame.__meta) == null ? void 0 : _a.config;
|
|
9895
10112
|
const resolvingErrors = workflowBuilderUtils.getMatchesInObject(task2).map((match2) => {
|
|
9896
10113
|
const segments = match2.rawValue.split(".");
|
|
9897
10114
|
const resolved = workflowBuilderUtils.resolveTextByContext(
|
|
@@ -9961,10 +10178,10 @@ var getTasksErrors = (workflow, frames, products) => {
|
|
|
9961
10178
|
params: {}
|
|
9962
10179
|
};
|
|
9963
10180
|
});
|
|
9964
|
-
const activationError =
|
|
10181
|
+
const activationError = config2 && config2.customization.provider.startsWith(import_developer_studio_api15.IntegrationNames.Text) && !products.find(({ product }) => product === config2.customization.product) ? {
|
|
9965
10182
|
instancePath: `/definition/tasks/${index}`,
|
|
9966
10183
|
keyword: "activation",
|
|
9967
|
-
message: `${
|
|
10184
|
+
message: `${config2.customization.product} not activated`,
|
|
9968
10185
|
params: {}
|
|
9969
10186
|
} : void 0;
|
|
9970
10187
|
return [
|
|
@@ -9977,7 +10194,7 @@ var getTasksErrors = (workflow, frames, products) => {
|
|
|
9977
10194
|
var getTriggerErrors = (workflow, frames, products) => {
|
|
9978
10195
|
var _a;
|
|
9979
10196
|
const frame = frames.trigger;
|
|
9980
|
-
const
|
|
10197
|
+
const config2 = (_a = frame == null ? void 0 : frame.__meta) == null ? void 0 : _a.config;
|
|
9981
10198
|
const resolvingErrors = workflowBuilderUtils.getMatchesInObject(workflow.trigger).map((match2) => {
|
|
9982
10199
|
const segments = match2.rawValue.split(".");
|
|
9983
10200
|
const resolved = workflowBuilderUtils.resolveTextByContext(
|
|
@@ -10025,13 +10242,12 @@ var getTriggerErrors = (workflow, frames, products) => {
|
|
|
10025
10242
|
params: {}
|
|
10026
10243
|
};
|
|
10027
10244
|
});
|
|
10028
|
-
const activationError =
|
|
10245
|
+
const activationError = config2 && config2.customization.provider.startsWith(import_developer_studio_api15.IntegrationNames.Text) && !products.find(({ product }) => product === config2.customization.product) ? {
|
|
10029
10246
|
instancePath: `/trigger`,
|
|
10030
10247
|
keyword: "activation",
|
|
10031
|
-
message: `${
|
|
10248
|
+
message: `${config2.customization.product} not activated`,
|
|
10032
10249
|
params: {}
|
|
10033
10250
|
} : void 0;
|
|
10034
|
-
console.log("activationError: ", activationError);
|
|
10035
10251
|
return [
|
|
10036
10252
|
...resolvingErrors,
|
|
10037
10253
|
...connectionErrors,
|
|
@@ -10199,11 +10415,12 @@ function WorkflowContextProviderBase({
|
|
|
10199
10415
|
updaters: { setWorkflow, setAction, setSelection }
|
|
10200
10416
|
} = useWorkflowState(workflow, options2);
|
|
10201
10417
|
const autosaveStateRef = (0, import_react8.useRef)(state);
|
|
10202
|
-
const
|
|
10418
|
+
const autosaveWorkflowRef = (0, import_react8.useRef)(
|
|
10203
10419
|
(0, import_lodash.default)(() => __async(this, null, function* () {
|
|
10204
10420
|
yield save(true);
|
|
10205
10421
|
}), 500)
|
|
10206
|
-
)
|
|
10422
|
+
);
|
|
10423
|
+
const autosaveWorkflow = autosaveWorkflowRef.current;
|
|
10207
10424
|
(0, import_react8.useEffect)(() => {
|
|
10208
10425
|
return () => {
|
|
10209
10426
|
autosaveWorkflow.cancel();
|
|
@@ -10297,16 +10514,16 @@ function WorkflowContextProviderBase({
|
|
|
10297
10514
|
const replaceWorkflow = (0, import_react8.useCallback)(
|
|
10298
10515
|
(workflow2) => {
|
|
10299
10516
|
setWorkflow(workflow2);
|
|
10300
|
-
|
|
10517
|
+
autosaveWorkflowRef.current();
|
|
10301
10518
|
},
|
|
10302
|
-
[
|
|
10519
|
+
[autosaveWorkflowRef, setWorkflow]
|
|
10303
10520
|
);
|
|
10304
10521
|
const changeWorkflow = (0, import_react8.useCallback)(
|
|
10305
10522
|
(change) => {
|
|
10306
10523
|
setWorkflow((prevState) => applyChange(prevState, change(prevState)));
|
|
10307
|
-
|
|
10524
|
+
autosaveWorkflowRef.current();
|
|
10308
10525
|
},
|
|
10309
|
-
[
|
|
10526
|
+
[autosaveWorkflowRef, setWorkflow]
|
|
10310
10527
|
);
|
|
10311
10528
|
const goToAddTrigger = (0, import_react8.useCallback)(() => {
|
|
10312
10529
|
navigate(
|
|
@@ -12378,10 +12595,10 @@ var import_developer_studio_ui_react11 = require("@livechat/developer-studio-ui-
|
|
|
12378
12595
|
function convertToTreeNode(obj, meta, nodeName, path) {
|
|
12379
12596
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
12380
12597
|
const index = (_a = obj.__meta) == null ? void 0 : _a.index;
|
|
12381
|
-
const
|
|
12598
|
+
const config2 = (_b = obj.__meta) == null ? void 0 : _b.config;
|
|
12382
12599
|
const properties = (_c = obj.__meta) == null ? void 0 : _c.properties;
|
|
12383
12600
|
const currentSpec = meta.specification;
|
|
12384
|
-
const customization =
|
|
12601
|
+
const customization = config2 == null ? void 0 : config2.customization;
|
|
12385
12602
|
const node2 = meta.dummy ? {
|
|
12386
12603
|
type: typeof obj,
|
|
12387
12604
|
name: nodeName,
|
|
@@ -12399,7 +12616,7 @@ function convertToTreeNode(obj, meta, nodeName, path) {
|
|
|
12399
12616
|
path: `${path != null ? path : ""}`,
|
|
12400
12617
|
relativePath: meta.baseRelativePath && path && path.startsWith(meta.baseRelativePath) ? path.replace(`${meta.baseRelativePath}.`, "") : "",
|
|
12401
12618
|
children: [],
|
|
12402
|
-
canAddChildren: (_g =
|
|
12619
|
+
canAddChildren: (_g = config2 == null ? void 0 : config2.specification) == null ? void 0 : _g.additionalProperties,
|
|
12403
12620
|
__meta: {
|
|
12404
12621
|
source: {
|
|
12405
12622
|
index: index != null ? index : meta.index,
|
|
@@ -12600,6 +12817,7 @@ function CustomTagsPicker({
|
|
|
12600
12817
|
|
|
12601
12818
|
// src/views/Flows/Definitions/Common/Builder/Editors/Visual/Forms/Schema/overrides/Fields/CustomTags/TagsInput/Input.tsx
|
|
12602
12819
|
var import_react24 = require("react");
|
|
12820
|
+
var import_lodash3 = __toESM(require("lodash.debounce"));
|
|
12603
12821
|
var import_design_system_react_components13 = require("@livechat/design-system-react-components");
|
|
12604
12822
|
|
|
12605
12823
|
// src/views/Flows/Definitions/Common/Builder/Editors/Visual/Forms/Schema/overrides/Fields/CustomTags/TagsInput/Tag/Icon.tsx
|
|
@@ -12871,64 +13089,64 @@ function TagifyWrapper({
|
|
|
12871
13089
|
};
|
|
12872
13090
|
}, []);
|
|
12873
13091
|
(0, import_react23.useEffect)(() => {
|
|
12874
|
-
tagify.current.off("change"
|
|
13092
|
+
tagify.current.off("change").on("change", onChange);
|
|
12875
13093
|
}, [onChange]);
|
|
12876
13094
|
(0, import_react23.useEffect)(() => {
|
|
12877
|
-
tagify.current.off("input"
|
|
13095
|
+
tagify.current.off("input").on("input", onInput);
|
|
12878
13096
|
}, [onInput]);
|
|
12879
13097
|
(0, import_react23.useEffect)(() => {
|
|
12880
|
-
tagify.current.off("add"
|
|
13098
|
+
tagify.current.off("add").on("add", onAdd);
|
|
12881
13099
|
}, [onAdd]);
|
|
12882
13100
|
(0, import_react23.useEffect)(() => {
|
|
12883
|
-
tagify.current.off("remove"
|
|
13101
|
+
tagify.current.off("remove").on("remove", onRemove);
|
|
12884
13102
|
}, [onRemove]);
|
|
12885
13103
|
(0, import_react23.useEffect)(() => {
|
|
12886
|
-
tagify.current.off("invalid"
|
|
13104
|
+
tagify.current.off("invalid").on("invalid", onInvalid);
|
|
12887
13105
|
}, [onInvalid]);
|
|
12888
13106
|
(0, import_react23.useEffect)(() => {
|
|
12889
|
-
tagify.current.off("keydown"
|
|
13107
|
+
tagify.current.off("keydown").on("keydown", onKeydown);
|
|
12890
13108
|
}, [onKeydown]);
|
|
12891
13109
|
(0, import_react23.useEffect)(() => {
|
|
12892
|
-
tagify.current.off("focus"
|
|
13110
|
+
tagify.current.off("focus").on("focus", onFocus);
|
|
12893
13111
|
}, [onFocus]);
|
|
12894
13112
|
(0, import_react23.useEffect)(() => {
|
|
12895
|
-
tagify.current.off("blur"
|
|
13113
|
+
tagify.current.off("blur").on("blur", onBlur);
|
|
12896
13114
|
}, [onBlur]);
|
|
12897
13115
|
(0, import_react23.useEffect)(() => {
|
|
12898
|
-
tagify.current.off("click"
|
|
13116
|
+
tagify.current.off("click").on("click", onClick);
|
|
12899
13117
|
}, [onClick]);
|
|
12900
13118
|
(0, import_react23.useEffect)(() => {
|
|
12901
|
-
tagify.current.off("edit:input"
|
|
13119
|
+
tagify.current.off("edit:input").on("edit:input", onEditInput);
|
|
12902
13120
|
}, [onEditInput]);
|
|
12903
13121
|
(0, import_react23.useEffect)(() => {
|
|
12904
|
-
tagify.current.off("edit:beforeUpdate"
|
|
13122
|
+
tagify.current.off("edit:beforeUpdate").on("edit:beforeUpdate", onEditBeforeUpdate);
|
|
12905
13123
|
}, [onEditBeforeUpdate]);
|
|
12906
13124
|
(0, import_react23.useEffect)(() => {
|
|
12907
|
-
tagify.current.off("edit:updated"
|
|
13125
|
+
tagify.current.off("edit:updated").on("edit:updated", onEditUpdated);
|
|
12908
13126
|
}, [onEditUpdated]);
|
|
12909
13127
|
(0, import_react23.useEffect)(() => {
|
|
12910
|
-
tagify.current.off("edit:start"
|
|
13128
|
+
tagify.current.off("edit:start").on("edit:start", onEditStart);
|
|
12911
13129
|
}, [onEditStart]);
|
|
12912
13130
|
(0, import_react23.useEffect)(() => {
|
|
12913
|
-
tagify.current.off("edit:keydown"
|
|
13131
|
+
tagify.current.off("edit:keydown").on("edit:keydown", onEditKeydown);
|
|
12914
13132
|
}, [onEditKeydown]);
|
|
12915
13133
|
(0, import_react23.useEffect)(() => {
|
|
12916
|
-
tagify.current.off("dropdown:show"
|
|
13134
|
+
tagify.current.off("dropdown:show").on("dropdown:show", onDropdownShow);
|
|
12917
13135
|
}, [onDropdownShow]);
|
|
12918
13136
|
(0, import_react23.useEffect)(() => {
|
|
12919
|
-
tagify.current.off("dropdown:hide"
|
|
13137
|
+
tagify.current.off("dropdown:hide").on("dropdown:hide", onDropdownHide);
|
|
12920
13138
|
}, [onDropdownHide]);
|
|
12921
13139
|
(0, import_react23.useEffect)(() => {
|
|
12922
|
-
tagify.current.off("dropdown:select"
|
|
13140
|
+
tagify.current.off("dropdown:select").on("dropdown:select", onDropdownSelect);
|
|
12923
13141
|
}, [onDropdownSelect]);
|
|
12924
13142
|
(0, import_react23.useEffect)(() => {
|
|
12925
|
-
tagify.current.off("dropdown:scroll"
|
|
13143
|
+
tagify.current.off("dropdown:scroll").on("dropdown:scroll", onDropdownScroll);
|
|
12926
13144
|
}, [onDropdownScroll]);
|
|
12927
13145
|
(0, import_react23.useEffect)(() => {
|
|
12928
|
-
tagify.current.off("dropdown:noMatch"
|
|
13146
|
+
tagify.current.off("dropdown:noMatch").on("dropdown:noMatch", onDropdownNoMatch);
|
|
12929
13147
|
}, [onDropdownNoMatch]);
|
|
12930
13148
|
(0, import_react23.useEffect)(() => {
|
|
12931
|
-
tagify.current.off("dropdown:updated"
|
|
13149
|
+
tagify.current.off("dropdown:updated").on("dropdown:updated", onDropdownUpdated);
|
|
12932
13150
|
}, [onDropdownUpdated]);
|
|
12933
13151
|
(0, import_react23.useEffect)(() => {
|
|
12934
13152
|
setFocus();
|
|
@@ -13013,23 +13231,23 @@ var Tags_default = Tags;
|
|
|
13013
13231
|
|
|
13014
13232
|
// src/views/Flows/Definitions/Common/Builder/Editors/Visual/Forms/Schema/overrides/Fields/CustomTags/TagsInput/utils.ts
|
|
13015
13233
|
var createTagFromPath = (path, frame) => {
|
|
13016
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
13234
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
13017
13235
|
const segments = path.split(".");
|
|
13018
13236
|
const relativePath = segments.slice(segments[0] === "workflow" ? 2 : 1).join(".");
|
|
13019
13237
|
const contentRelativePath = segments.slice(segments[0] === "workflow" ? segments[2] === "body" ? 3 : 2 : 4).join(".");
|
|
13020
|
-
const meta = frame ? segments[0] === "workflow" ? segments[1] === "input" ? (_a = frame.workflow.input) == null ? void 0 : _a.__meta : segments[1] === "credentials" ? frame.workflow.credentials.__meta : void 0 : frame[segments[0]].__meta : void 0;
|
|
13021
|
-
const
|
|
13022
|
-
const customization = (
|
|
13023
|
-
const specification = (
|
|
13238
|
+
const meta = frame ? segments[0] === "workflow" ? segments[1] === "input" ? (_a = frame.workflow.input) == null ? void 0 : _a.__meta : segments[1] === "credentials" ? frame.workflow.credentials.__meta : void 0 : (_b = frame[segments[0]]) == null ? void 0 : _b.__meta : void 0;
|
|
13239
|
+
const config2 = workflowBuilderUtils.getItemConfigByReference(path);
|
|
13240
|
+
const customization = (_d = (_c = meta == null ? void 0 : meta.config) == null ? void 0 : _c.customization) != null ? _d : config2 == null ? void 0 : config2.customization;
|
|
13241
|
+
const specification = (_i = workflowBuilderUtils.extractByPath(
|
|
13024
13242
|
relativePath.split(".").join(".properties."),
|
|
13025
|
-
(
|
|
13026
|
-
)) == null ? void 0 :
|
|
13243
|
+
(_h = (_f = (_e = meta == null ? void 0 : meta.config) == null ? void 0 : _e.specification) == null ? void 0 : _f.properties) != null ? _h : (_g = config2 == null ? void 0 : config2.specification.output) == null ? void 0 : _g.properties
|
|
13244
|
+
)) == null ? void 0 : _i[0];
|
|
13027
13245
|
const data = specification ? {
|
|
13028
|
-
title: (
|
|
13246
|
+
title: (_k = (_j = specification.title) != null ? _j : segments.at(-1)) != null ? _k : "",
|
|
13029
13247
|
type: specification.type,
|
|
13030
13248
|
description: specification.description
|
|
13031
13249
|
} : {
|
|
13032
|
-
title: (
|
|
13250
|
+
title: (_l = segments.at(-1)) != null ? _l : ""
|
|
13033
13251
|
};
|
|
13034
13252
|
let invalid = false;
|
|
13035
13253
|
let invalidReason = "";
|
|
@@ -13047,7 +13265,7 @@ var createTagFromPath = (path, frame) => {
|
|
|
13047
13265
|
path: relativePath,
|
|
13048
13266
|
relativePath: contentRelativePath,
|
|
13049
13267
|
name: data.title,
|
|
13050
|
-
type: (
|
|
13268
|
+
type: (_m = data.type) != null ? _m : "",
|
|
13051
13269
|
description: data.description,
|
|
13052
13270
|
invalid,
|
|
13053
13271
|
invalidReason,
|
|
@@ -13136,10 +13354,13 @@ function CustomTagsInput({
|
|
|
13136
13354
|
},
|
|
13137
13355
|
[updateAllIcons]
|
|
13138
13356
|
);
|
|
13139
|
-
const handleChange = (0, import_react24.useCallback)(
|
|
13140
|
-
|
|
13141
|
-
|
|
13142
|
-
|
|
13357
|
+
const handleChange = (0, import_react24.useCallback)(
|
|
13358
|
+
(0, import_lodash3.default)(() => {
|
|
13359
|
+
onChange(getCurrentValue());
|
|
13360
|
+
updateAllIcons();
|
|
13361
|
+
}, 300),
|
|
13362
|
+
[onChange, getCurrentValue, updateAllIcons]
|
|
13363
|
+
);
|
|
13143
13364
|
const handleKeyDown = (0, import_react24.useCallback)(
|
|
13144
13365
|
(e) => {
|
|
13145
13366
|
if (e.detail.event.key !== "Backspace") {
|
|
@@ -14016,7 +14237,7 @@ function CustomSchemaForm(props) {
|
|
|
14016
14237
|
props.onChange(formData);
|
|
14017
14238
|
},
|
|
14018
14239
|
readonly: props.readonly,
|
|
14019
|
-
schema: __spreadProps(__spreadValues({}, (_a = props.schema) != null ? _a : {}), { $defs:
|
|
14240
|
+
schema: __spreadProps(__spreadValues({}, (_a = props.schema) != null ? _a : {}), { $defs: WORKFLOW_SCHEMA_DEFS.$defs }),
|
|
14020
14241
|
showErrorList: false,
|
|
14021
14242
|
templates: customTemplates,
|
|
14022
14243
|
validator: import_validator_ajv8.default,
|
|
@@ -14523,7 +14744,7 @@ function CustomSchemaFormWrapper({
|
|
|
14523
14744
|
preselectedTab,
|
|
14524
14745
|
tabsMetadata
|
|
14525
14746
|
}) {
|
|
14526
|
-
const spec = workflowBuilderUtils.getItemConfig(data);
|
|
14747
|
+
const spec = (0, import_react40.useMemo)(() => workflowBuilderUtils.getItemConfig(data), [data]);
|
|
14527
14748
|
const [selectedTab, setSelectedTab] = (0, import_react40.useState)(
|
|
14528
14749
|
preselectedTab != null ? preselectedTab : !spec || spec.specification.input ? "parameters" : spec && spec.customization.provider !== OTHER_TYPES.SYSTEM ? "connection" : void 0
|
|
14529
14750
|
);
|
|
@@ -14906,8 +15127,8 @@ function SwitchNode({
|
|
|
14906
15127
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
14907
15128
|
const sourceNode = nodes.find((node1) => node1.id === (node2 == null ? void 0 : node2.source));
|
|
14908
15129
|
if (sourceNode) {
|
|
14909
|
-
const
|
|
14910
|
-
const output = (_b = (_a =
|
|
15130
|
+
const config2 = workflowBuilderUtils.getTaskConfig(sourceNode.data);
|
|
15131
|
+
const output = (_b = (_a = config2.specification.output) == null ? void 0 : _a.properties) == null ? void 0 : _b.output;
|
|
14911
15132
|
const body = isJSONSchema7(output) && isJSONSchema7((_c = output.properties) == null ? void 0 : _c.response) && isJSONSchema7((_e = (_d = output.properties) == null ? void 0 : _d.response.properties) == null ? void 0 : _e.body) ? (_h = (_g = (_f = output.properties) == null ? void 0 : _f.response) == null ? void 0 : _g.properties) == null ? void 0 : _h.body : void 0;
|
|
14912
15133
|
const inputParameters = (body == null ? void 0 : body.type) === "object" ? body.properties : {};
|
|
14913
15134
|
const formattedInputParameters = {};
|
|
@@ -15498,7 +15719,7 @@ function EditNodeWrapper() {
|
|
|
15498
15719
|
if (!data) {
|
|
15499
15720
|
return /* @__PURE__ */ jsx2(Fragment4, {});
|
|
15500
15721
|
}
|
|
15501
|
-
const
|
|
15722
|
+
const config2 = (_b = frame == null ? void 0 : frame.__meta) == null ? void 0 : _b.config;
|
|
15502
15723
|
const readonly = !workflow.draft;
|
|
15503
15724
|
const contentHandler = () => {
|
|
15504
15725
|
var _a2, _b2;
|
|
@@ -15583,7 +15804,7 @@ function EditNodeWrapper() {
|
|
|
15583
15804
|
);
|
|
15584
15805
|
}
|
|
15585
15806
|
};
|
|
15586
|
-
const revertIconColor = getWorkflowsEnv("isHeadless") && ((
|
|
15807
|
+
const revertIconColor = getWorkflowsEnv("isHeadless") && ((config2 == null ? void 0 : config2.customization.icon) === import_developer_studio_api23.IntegrationNames.OpenAI || (config2 == null ? void 0 : config2.customization.icon) === import_developer_studio_api23.IntegrationNames.BigCommerce);
|
|
15587
15808
|
return /* @__PURE__ */ jsxs2(Wrapper3, { children: [
|
|
15588
15809
|
/* @__PURE__ */ jsxs2(import_developer_studio_ui_react20.Row, { center: true, setRowPadding: "12px 24px", spaceBetween: true, children: [
|
|
15589
15810
|
/* @__PURE__ */ jsx2(
|
|
@@ -15593,13 +15814,13 @@ function EditNodeWrapper() {
|
|
|
15593
15814
|
max-width: 80%;
|
|
15594
15815
|
`,
|
|
15595
15816
|
children: /* @__PURE__ */ jsxs2(Title6, { children: [
|
|
15596
|
-
(
|
|
15817
|
+
(config2 == null ? void 0 : config2.customization.product) ? /* @__PURE__ */ jsx2(
|
|
15597
15818
|
ProductIcon_default,
|
|
15598
15819
|
{
|
|
15599
15820
|
center: true,
|
|
15600
15821
|
disabled: false,
|
|
15601
15822
|
height: 10,
|
|
15602
|
-
product:
|
|
15823
|
+
product: config2.customization.icon,
|
|
15603
15824
|
revertColors: revertIconColor,
|
|
15604
15825
|
width: 10
|
|
15605
15826
|
}
|
|
@@ -15616,9 +15837,9 @@ function EditNodeWrapper() {
|
|
|
15616
15837
|
/* @__PURE__ */ jsxs2(import_developer_studio_ui_react20.Column, { noFlexBasis: true, notPadded: true, children: [
|
|
15617
15838
|
/* @__PURE__ */ jsxs2("strong", { children: [
|
|
15618
15839
|
((_c = frame == null ? void 0 : frame.__meta) == null ? void 0 : _c.index) !== void 0 ? `${frame.__meta.index}. ` : "",
|
|
15619
|
-
(_d =
|
|
15840
|
+
(_d = config2 == null ? void 0 : config2.customization.displayName) != null ? _d : data.type === NodeTypes.switch ? "Condition" : data.type === NodeTypes.http ? "Custom HTTP" : data.type === NodeTypes.terminate ? "End workflow" : ""
|
|
15620
15841
|
] }),
|
|
15621
|
-
(_e =
|
|
15842
|
+
(_e = config2 == null ? void 0 : config2.customization.description) != null ? _e : data.type === NodeTypes.switch ? "Conditional execution" : data.type === NodeTypes.http ? "Make an HTTP request" : data.type === NodeTypes.terminate ? "End the workflow" : ""
|
|
15622
15843
|
] })
|
|
15623
15844
|
] })
|
|
15624
15845
|
}
|
|
@@ -16210,7 +16431,6 @@ var OneMessagesProvider = ({
|
|
|
16210
16431
|
const { user } = (0, import_developer_studio_ui_react21.useUserContext)();
|
|
16211
16432
|
const isLoading = generateAiResponseMutation.isLoading;
|
|
16212
16433
|
const sendMessage = (message) => __async(void 0, null, function* () {
|
|
16213
|
-
const config12 = getWorkflowsConfig();
|
|
16214
16434
|
setIsError(null);
|
|
16215
16435
|
setEvents((prevEvents) => [
|
|
16216
16436
|
...prevEvents,
|
|
@@ -16230,7 +16450,7 @@ var OneMessagesProvider = ({
|
|
|
16230
16450
|
]);
|
|
16231
16451
|
try {
|
|
16232
16452
|
const response = yield generateAiResponseMutation.mutateAsync({
|
|
16233
|
-
agent_id:
|
|
16453
|
+
agent_id: getWorkflowsEnv("aiAgentId"),
|
|
16234
16454
|
account_id: user == null ? void 0 : user.auth.account_id,
|
|
16235
16455
|
organization: user == null ? void 0 : user.auth.organization_id,
|
|
16236
16456
|
token: user == null ? void 0 : user.auth.access_token,
|
|
@@ -16471,7 +16691,7 @@ var import_react77 = require("react");
|
|
|
16471
16691
|
|
|
16472
16692
|
// src/views/Flows/Definitions/Common/One/hooks/use-scroll.ts
|
|
16473
16693
|
var import_react65 = require("react");
|
|
16474
|
-
var
|
|
16694
|
+
var import_lodash4 = __toESM(require("lodash.debounce"));
|
|
16475
16695
|
var useScroll = ({
|
|
16476
16696
|
oneChatFeedRef,
|
|
16477
16697
|
groupedEvents,
|
|
@@ -16527,7 +16747,7 @@ var useScroll = ({
|
|
|
16527
16747
|
currentScrollPosition.current = (_a = container2.scrollTop) != null ? _a : null;
|
|
16528
16748
|
isScrolledToBottom.current = container2.scrollHeight - container2.scrollTop - container2.clientHeight < 1;
|
|
16529
16749
|
};
|
|
16530
|
-
const debouncedScroll = (0,
|
|
16750
|
+
const debouncedScroll = (0, import_lodash4.default)(handleScroll, 200);
|
|
16531
16751
|
return {
|
|
16532
16752
|
handleScroll: debouncedScroll,
|
|
16533
16753
|
handleScrollToBottom: scrollToBottom
|
|
@@ -18725,117 +18945,148 @@ function AddWorkflowTaskOptions({
|
|
|
18725
18945
|
var Options_default = AddWorkflowTaskOptions;
|
|
18726
18946
|
|
|
18727
18947
|
// src/views/Flows/Definitions/Edit/Tasks/Add.tsx
|
|
18728
|
-
var config9 = [
|
|
18729
|
-
// {
|
|
18730
|
-
// name: 'system',
|
|
18731
|
-
// displayName: 'System tasks',
|
|
18732
|
-
// icon: (
|
|
18733
|
-
// <ProductIcon
|
|
18734
|
-
// product={OTHER_TYPES.SYSTEM}
|
|
18735
|
-
// center={undefined}
|
|
18736
|
-
// height={5}
|
|
18737
|
-
// width={5}
|
|
18738
|
-
// disabled={undefined}
|
|
18739
|
-
// />
|
|
18740
|
-
// ),
|
|
18741
|
-
// values: Object.values(systemTaskConfigs).map((x) => ({
|
|
18742
|
-
// key: x.key,
|
|
18743
|
-
// name: x.customization.displayName,
|
|
18744
|
-
// shortDescription: x.customization.shortDescription,
|
|
18745
|
-
// secondaryText: x.customization.description,
|
|
18746
|
-
// })),
|
|
18747
|
-
// },
|
|
18748
|
-
{
|
|
18749
|
-
name: PRODUCT_TYPE.LC,
|
|
18750
|
-
displayName: PRODUCT_NAMES.livechat,
|
|
18751
|
-
icon: /* @__PURE__ */ jsx2(ProductIcon_default, { height: 5, product: PRODUCT_TYPE.LC, width: 5 }),
|
|
18752
|
-
values: Object.values(livechatTaskConfigs).map((x) => ({
|
|
18753
|
-
key: x.key,
|
|
18754
|
-
name: x.customization.displayName,
|
|
18755
|
-
shortDescription: x.customization.shortDescription,
|
|
18756
|
-
secondaryText: x.customization.description
|
|
18757
|
-
}))
|
|
18758
|
-
},
|
|
18759
|
-
{
|
|
18760
|
-
name: PRODUCT_TYPE.HD,
|
|
18761
|
-
displayName: PRODUCT_NAMES.helpdesk,
|
|
18762
|
-
icon: /* @__PURE__ */ jsx2(ProductIcon_default, { center: true, height: 5, product: PRODUCT_TYPE.HD, width: 5 }),
|
|
18763
|
-
values: Object.values(helpdeskTaskConfigs).map((x) => ({
|
|
18764
|
-
key: x.key,
|
|
18765
|
-
name: x.customization.displayName,
|
|
18766
|
-
shortDescription: x.customization.shortDescription,
|
|
18767
|
-
secondaryText: x.customization.description
|
|
18768
|
-
}))
|
|
18769
|
-
},
|
|
18770
|
-
{
|
|
18771
|
-
name: OTHER_PRODUCT_TYPE.OPENAI,
|
|
18772
|
-
displayName: "OpenAI",
|
|
18773
|
-
icon: /* @__PURE__ */ jsx2(ProductIcon_default, { height: 5, product: OTHER_PRODUCT_TYPE.OPENAI, width: 5 }),
|
|
18774
|
-
values: Object.values(openAiTaskConfigs).map((x) => ({
|
|
18775
|
-
key: x.key,
|
|
18776
|
-
name: x.customization.displayName,
|
|
18777
|
-
shortDescription: x.customization.shortDescription,
|
|
18778
|
-
secondaryText: x.customization.description
|
|
18779
|
-
}))
|
|
18780
|
-
},
|
|
18781
|
-
{
|
|
18782
|
-
name: import_developer_studio_api25.IntegrationNames.Mailchimp,
|
|
18783
|
-
displayName: import_developer_studio_api25.IntegrationDisplayNames.Mailchimp,
|
|
18784
|
-
icon: /* @__PURE__ */ jsx2(ProductIcon_default, { height: 5, product: import_developer_studio_api25.IntegrationNames.Mailchimp, width: 5 }),
|
|
18785
|
-
values: Object.values(mailchimpTaskConfigs).map((x) => ({
|
|
18786
|
-
key: x.key,
|
|
18787
|
-
name: x.customization.displayName,
|
|
18788
|
-
shortDescription: x.customization.shortDescription,
|
|
18789
|
-
secondaryText: x.customization.description
|
|
18790
|
-
}))
|
|
18791
|
-
},
|
|
18792
|
-
{
|
|
18793
|
-
name: import_developer_studio_api25.IntegrationNames.HubSpot,
|
|
18794
|
-
displayName: import_developer_studio_api25.IntegrationDisplayNames.HubSpot,
|
|
18795
|
-
icon: /* @__PURE__ */ jsx2(ProductIcon_default, { height: 5, product: import_developer_studio_api25.IntegrationNames.HubSpot, width: 5 }),
|
|
18796
|
-
values: Object.values(hubspotTaskConfigs).map((x) => ({
|
|
18797
|
-
key: x.key,
|
|
18798
|
-
name: x.customization.displayName,
|
|
18799
|
-
shortDescription: x.customization.shortDescription,
|
|
18800
|
-
secondaryText: x.customization.description
|
|
18801
|
-
}))
|
|
18802
|
-
},
|
|
18803
|
-
{
|
|
18804
|
-
name: import_developer_studio_api25.IntegrationNames.BigCommerce,
|
|
18805
|
-
displayName: import_developer_studio_api25.IntegrationDisplayNames.BigCommerce,
|
|
18806
|
-
icon: /* @__PURE__ */ jsx2(
|
|
18807
|
-
ProductIcon_default,
|
|
18808
|
-
{
|
|
18809
|
-
height: 5,
|
|
18810
|
-
product: import_developer_studio_api25.IntegrationNames.BigCommerce,
|
|
18811
|
-
width: 5
|
|
18812
|
-
}
|
|
18813
|
-
),
|
|
18814
|
-
values: Object.values(bigCommerceTaskConfigs).map((x) => ({
|
|
18815
|
-
key: x.key,
|
|
18816
|
-
name: x.customization.displayName,
|
|
18817
|
-
shortDescription: x.customization.shortDescription,
|
|
18818
|
-
secondaryText: x.customization.description
|
|
18819
|
-
}))
|
|
18820
|
-
},
|
|
18821
|
-
{
|
|
18822
|
-
name: import_developer_studio_api25.IntegrationNames.Shopify,
|
|
18823
|
-
displayName: import_developer_studio_api25.IntegrationDisplayNames.Shopify,
|
|
18824
|
-
icon: /* @__PURE__ */ jsx2(ProductIcon_default, { height: 5, product: import_developer_studio_api25.IntegrationNames.Shopify, width: 5 }),
|
|
18825
|
-
values: Object.values(shopifyTaskConfigs).map((x) => ({
|
|
18826
|
-
key: x.key,
|
|
18827
|
-
name: x.customization.displayName,
|
|
18828
|
-
shortDescription: x.customization.shortDescription,
|
|
18829
|
-
secondaryText: x.customization.description
|
|
18830
|
-
}))
|
|
18831
|
-
}
|
|
18832
|
-
];
|
|
18833
18948
|
function AddWorkflowTask({ basePath, onClose }) {
|
|
18834
18949
|
const [search, setSearch] = (0, import_react87.useState)("");
|
|
18835
18950
|
const location = (0, import_react_router_dom12.useLocation)();
|
|
18836
18951
|
const navigate = (0, import_react_router_dom12.useNavigate)();
|
|
18837
18952
|
const params = (0, import_react_router_dom12.useParams)();
|
|
18838
18953
|
const [state, setState] = (0, import_react87.useState)();
|
|
18954
|
+
const config2 = (0, import_react87.useMemo)(
|
|
18955
|
+
() => [
|
|
18956
|
+
// {
|
|
18957
|
+
// name: 'system',
|
|
18958
|
+
// displayName: 'System tasks',
|
|
18959
|
+
// icon: (
|
|
18960
|
+
// <ProductIcon
|
|
18961
|
+
// product={OTHER_TYPES.SYSTEM}
|
|
18962
|
+
// center={undefined}
|
|
18963
|
+
// height={5}
|
|
18964
|
+
// width={5}
|
|
18965
|
+
// disabled={undefined}
|
|
18966
|
+
// />
|
|
18967
|
+
// ),
|
|
18968
|
+
// values: Object.values(systemTaskConfigs()).map((x) => ({
|
|
18969
|
+
// key: x.key,
|
|
18970
|
+
// name: x.customization.displayName,
|
|
18971
|
+
// shortDescription: x.customization.shortDescription,
|
|
18972
|
+
// secondaryText: x.customization.description,
|
|
18973
|
+
// })),
|
|
18974
|
+
// },
|
|
18975
|
+
{
|
|
18976
|
+
name: PRODUCT_TYPE.LC,
|
|
18977
|
+
displayName: PRODUCT_NAMES.livechat,
|
|
18978
|
+
icon: /* @__PURE__ */ jsx2(ProductIcon_default, { height: 5, product: PRODUCT_TYPE.LC, width: 5 }),
|
|
18979
|
+
values: Object.values(livechatTaskConfigs()).map((x) => ({
|
|
18980
|
+
key: x.key,
|
|
18981
|
+
name: x.customization.displayName,
|
|
18982
|
+
shortDescription: x.customization.shortDescription,
|
|
18983
|
+
secondaryText: x.customization.description
|
|
18984
|
+
}))
|
|
18985
|
+
},
|
|
18986
|
+
{
|
|
18987
|
+
name: PRODUCT_TYPE.HD,
|
|
18988
|
+
displayName: PRODUCT_NAMES.helpdesk,
|
|
18989
|
+
icon: /* @__PURE__ */ jsx2(ProductIcon_default, { center: true, height: 5, product: PRODUCT_TYPE.HD, width: 5 }),
|
|
18990
|
+
values: Object.values(helpdeskTaskConfigs()).map((x) => ({
|
|
18991
|
+
key: x.key,
|
|
18992
|
+
name: x.customization.displayName,
|
|
18993
|
+
shortDescription: x.customization.shortDescription,
|
|
18994
|
+
secondaryText: x.customization.description
|
|
18995
|
+
}))
|
|
18996
|
+
},
|
|
18997
|
+
{
|
|
18998
|
+
name: OTHER_PRODUCT_TYPE.OPENAI,
|
|
18999
|
+
displayName: "OpenAI",
|
|
19000
|
+
icon: /* @__PURE__ */ jsx2(
|
|
19001
|
+
ProductIcon_default,
|
|
19002
|
+
{
|
|
19003
|
+
height: 5,
|
|
19004
|
+
product: OTHER_PRODUCT_TYPE.OPENAI,
|
|
19005
|
+
width: 5
|
|
19006
|
+
}
|
|
19007
|
+
),
|
|
19008
|
+
values: Object.values(openAiTaskConfigs()).map((x) => ({
|
|
19009
|
+
key: x.key,
|
|
19010
|
+
name: x.customization.displayName,
|
|
19011
|
+
shortDescription: x.customization.shortDescription,
|
|
19012
|
+
secondaryText: x.customization.description
|
|
19013
|
+
}))
|
|
19014
|
+
},
|
|
19015
|
+
{
|
|
19016
|
+
name: import_developer_studio_api25.IntegrationNames.Mailchimp,
|
|
19017
|
+
displayName: import_developer_studio_api25.IntegrationDisplayNames.Mailchimp,
|
|
19018
|
+
icon: /* @__PURE__ */ jsx2(
|
|
19019
|
+
ProductIcon_default,
|
|
19020
|
+
{
|
|
19021
|
+
height: 5,
|
|
19022
|
+
product: import_developer_studio_api25.IntegrationNames.Mailchimp,
|
|
19023
|
+
width: 5
|
|
19024
|
+
}
|
|
19025
|
+
),
|
|
19026
|
+
values: Object.values(mailchimpTaskConfigs()).map((x) => ({
|
|
19027
|
+
key: x.key,
|
|
19028
|
+
name: x.customization.displayName,
|
|
19029
|
+
shortDescription: x.customization.shortDescription,
|
|
19030
|
+
secondaryText: x.customization.description
|
|
19031
|
+
}))
|
|
19032
|
+
},
|
|
19033
|
+
{
|
|
19034
|
+
name: import_developer_studio_api25.IntegrationNames.HubSpot,
|
|
19035
|
+
displayName: import_developer_studio_api25.IntegrationDisplayNames.HubSpot,
|
|
19036
|
+
icon: /* @__PURE__ */ jsx2(
|
|
19037
|
+
ProductIcon_default,
|
|
19038
|
+
{
|
|
19039
|
+
height: 5,
|
|
19040
|
+
product: import_developer_studio_api25.IntegrationNames.HubSpot,
|
|
19041
|
+
width: 5
|
|
19042
|
+
}
|
|
19043
|
+
),
|
|
19044
|
+
values: Object.values(hubspotTaskConfigs()).map((x) => ({
|
|
19045
|
+
key: x.key,
|
|
19046
|
+
name: x.customization.displayName,
|
|
19047
|
+
shortDescription: x.customization.shortDescription,
|
|
19048
|
+
secondaryText: x.customization.description
|
|
19049
|
+
}))
|
|
19050
|
+
},
|
|
19051
|
+
{
|
|
19052
|
+
name: import_developer_studio_api25.IntegrationNames.BigCommerce,
|
|
19053
|
+
displayName: import_developer_studio_api25.IntegrationDisplayNames.BigCommerce,
|
|
19054
|
+
icon: /* @__PURE__ */ jsx2(
|
|
19055
|
+
ProductIcon_default,
|
|
19056
|
+
{
|
|
19057
|
+
height: 5,
|
|
19058
|
+
product: import_developer_studio_api25.IntegrationNames.BigCommerce,
|
|
19059
|
+
width: 5
|
|
19060
|
+
}
|
|
19061
|
+
),
|
|
19062
|
+
values: Object.values(bigCommerceTaskConfigs()).map((x) => ({
|
|
19063
|
+
key: x.key,
|
|
19064
|
+
name: x.customization.displayName,
|
|
19065
|
+
shortDescription: x.customization.shortDescription,
|
|
19066
|
+
secondaryText: x.customization.description
|
|
19067
|
+
}))
|
|
19068
|
+
},
|
|
19069
|
+
{
|
|
19070
|
+
name: import_developer_studio_api25.IntegrationNames.Shopify,
|
|
19071
|
+
displayName: import_developer_studio_api25.IntegrationDisplayNames.Shopify,
|
|
19072
|
+
icon: /* @__PURE__ */ jsx2(
|
|
19073
|
+
ProductIcon_default,
|
|
19074
|
+
{
|
|
19075
|
+
height: 5,
|
|
19076
|
+
product: import_developer_studio_api25.IntegrationNames.Shopify,
|
|
19077
|
+
width: 5
|
|
19078
|
+
}
|
|
19079
|
+
),
|
|
19080
|
+
values: Object.values(shopifyTaskConfigs()).map((x) => ({
|
|
19081
|
+
key: x.key,
|
|
19082
|
+
name: x.customization.displayName,
|
|
19083
|
+
shortDescription: x.customization.shortDescription,
|
|
19084
|
+
secondaryText: x.customization.description
|
|
19085
|
+
}))
|
|
19086
|
+
}
|
|
19087
|
+
],
|
|
19088
|
+
[]
|
|
19089
|
+
);
|
|
18839
19090
|
const {
|
|
18840
19091
|
addTask,
|
|
18841
19092
|
state: { workflow }
|
|
@@ -18847,12 +19098,13 @@ function AddWorkflowTask({ basePath, onClose }) {
|
|
|
18847
19098
|
(0, import_react87.useEffect)(() => {
|
|
18848
19099
|
var _a, _b, _c, _d, _e, _f;
|
|
18849
19100
|
if (!params.task) {
|
|
18850
|
-
const firstTask = (_c = (_b = (_a =
|
|
19101
|
+
const firstTask = (_c = (_b = (_a = config2.find((el) => el.name === params.service)) == null ? void 0 : _a.values.sort((a, b) => a.name.localeCompare(b.name))) == null ? void 0 : _b[0]) == null ? void 0 : _c.key;
|
|
18851
19102
|
navigate(`${basePath}/${params.service}/${firstTask}`, {
|
|
18852
19103
|
state: location.state
|
|
18853
19104
|
});
|
|
18854
19105
|
}
|
|
18855
|
-
const
|
|
19106
|
+
const templates = WorkflowItemsConfiguration.templates;
|
|
19107
|
+
const tasks = params.service ? templates.tasks[params.service] : void 0;
|
|
18856
19108
|
const task2 = params.task && tasks ? tasks[params.task] : void 0;
|
|
18857
19109
|
const suggestions = workflowBuilderUtils.stringifyToObjectKeyArray(
|
|
18858
19110
|
(_d = location.state.frame) != null ? _d : {},
|
|
@@ -18956,7 +19208,7 @@ function AddWorkflowTask({ basePath, onClose }) {
|
|
|
18956
19208
|
)
|
|
18957
19209
|
}
|
|
18958
19210
|
),
|
|
18959
|
-
|
|
19211
|
+
config2.map(({ name, displayName, icon: icon2, values }) => {
|
|
18960
19212
|
const revertIconColor = getWorkflowsEnv("isHeadless") && (name === "openai" || name === import_developer_studio_api25.IntegrationNames.BigCommerce);
|
|
18961
19213
|
if (search) {
|
|
18962
19214
|
if (values.some(
|
|
@@ -19032,7 +19284,7 @@ function AddWorkflowTask({ basePath, onClose }) {
|
|
|
19032
19284
|
`,
|
|
19033
19285
|
setColumnPadding: "0 20px 0 16px",
|
|
19034
19286
|
width: 10,
|
|
19035
|
-
children: params.service ?
|
|
19287
|
+
children: params.service ? config2.map(({ name, displayName, values, icon: icon2 }) => {
|
|
19036
19288
|
if (params.service === name.toLowerCase()) {
|
|
19037
19289
|
const options2 = values.map(({ key, name: name2, secondaryText }) => ({
|
|
19038
19290
|
key,
|
|
@@ -19155,86 +19407,110 @@ function AddWorkflowTriggerOptions({
|
|
|
19155
19407
|
var Options_default2 = AddWorkflowTriggerOptions;
|
|
19156
19408
|
|
|
19157
19409
|
// src/views/Flows/Definitions/Edit/Triggers/Add.tsx
|
|
19158
|
-
|
|
19159
|
-
|
|
19160
|
-
|
|
19161
|
-
|
|
19162
|
-
icon: /* @__PURE__ */ jsx2(
|
|
19163
|
-
ProductIcon_default,
|
|
19410
|
+
function AddWorkflowTrigger({ basePath, onClose }) {
|
|
19411
|
+
const [search, setSearch] = (0, import_react90.useState)("");
|
|
19412
|
+
const config2 = (0, import_react90.useMemo)(
|
|
19413
|
+
() => [
|
|
19164
19414
|
{
|
|
19165
|
-
|
|
19166
|
-
|
|
19167
|
-
|
|
19168
|
-
|
|
19169
|
-
|
|
19170
|
-
|
|
19171
|
-
|
|
19172
|
-
|
|
19173
|
-
|
|
19174
|
-
|
|
19175
|
-
|
|
19176
|
-
|
|
19177
|
-
|
|
19178
|
-
|
|
19179
|
-
|
|
19180
|
-
|
|
19181
|
-
|
|
19182
|
-
|
|
19183
|
-
|
|
19184
|
-
|
|
19185
|
-
|
|
19186
|
-
|
|
19187
|
-
|
|
19188
|
-
|
|
19189
|
-
|
|
19190
|
-
|
|
19191
|
-
|
|
19192
|
-
|
|
19193
|
-
|
|
19194
|
-
|
|
19195
|
-
|
|
19196
|
-
|
|
19197
|
-
|
|
19198
|
-
|
|
19199
|
-
|
|
19200
|
-
|
|
19201
|
-
|
|
19202
|
-
|
|
19203
|
-
|
|
19204
|
-
|
|
19205
|
-
|
|
19206
|
-
|
|
19207
|
-
|
|
19208
|
-
|
|
19209
|
-
|
|
19210
|
-
|
|
19211
|
-
|
|
19212
|
-
|
|
19213
|
-
|
|
19214
|
-
|
|
19215
|
-
|
|
19216
|
-
|
|
19217
|
-
|
|
19218
|
-
|
|
19219
|
-
|
|
19220
|
-
|
|
19221
|
-
|
|
19222
|
-
|
|
19415
|
+
name: OTHER_TYPES.SYSTEM,
|
|
19416
|
+
displayName: "General",
|
|
19417
|
+
icon: /* @__PURE__ */ jsx2(
|
|
19418
|
+
ProductIcon_default,
|
|
19419
|
+
{
|
|
19420
|
+
center: void 0,
|
|
19421
|
+
disabled: void 0,
|
|
19422
|
+
height: 5,
|
|
19423
|
+
product: OTHER_TYPES.SYSTEM,
|
|
19424
|
+
width: 5
|
|
19425
|
+
}
|
|
19426
|
+
),
|
|
19427
|
+
values: Object.values(systemTriggerConfigs()).map((x) => ({
|
|
19428
|
+
key: x.key,
|
|
19429
|
+
name: x.customization.displayName,
|
|
19430
|
+
secondaryText: x.customization.description
|
|
19431
|
+
}))
|
|
19432
|
+
},
|
|
19433
|
+
{
|
|
19434
|
+
name: PRODUCT_TYPE.LC,
|
|
19435
|
+
displayName: PRODUCT_NAMES.livechat,
|
|
19436
|
+
icon: /* @__PURE__ */ jsx2(ProductIcon_default, { height: 5, product: PRODUCT_TYPE.LC, width: 5 }),
|
|
19437
|
+
values: Object.values(livechatTriggerConfigs()).map((x) => ({
|
|
19438
|
+
key: x.key,
|
|
19439
|
+
name: x.customization.displayName,
|
|
19440
|
+
secondaryText: x.customization.description
|
|
19441
|
+
}))
|
|
19442
|
+
},
|
|
19443
|
+
{
|
|
19444
|
+
name: import_developer_studio_api26.IntegrationNames.Mailchimp,
|
|
19445
|
+
displayName: import_developer_studio_api26.IntegrationDisplayNames.Mailchimp,
|
|
19446
|
+
icon: /* @__PURE__ */ jsx2(
|
|
19447
|
+
ProductIcon_default,
|
|
19448
|
+
{
|
|
19449
|
+
height: 5,
|
|
19450
|
+
product: import_developer_studio_api26.IntegrationNames.Mailchimp,
|
|
19451
|
+
width: 5
|
|
19452
|
+
}
|
|
19453
|
+
),
|
|
19454
|
+
values: Object.values(mailchimpTriggerConfigs()).map((x) => ({
|
|
19455
|
+
key: x.key,
|
|
19456
|
+
name: x.customization.displayName,
|
|
19457
|
+
secondaryText: x.customization.description
|
|
19458
|
+
}))
|
|
19459
|
+
},
|
|
19460
|
+
{
|
|
19461
|
+
name: import_developer_studio_api26.IntegrationNames.Shopify,
|
|
19462
|
+
displayName: import_developer_studio_api26.IntegrationDisplayNames.Shopify,
|
|
19463
|
+
icon: /* @__PURE__ */ jsx2(
|
|
19464
|
+
ProductIcon_default,
|
|
19465
|
+
{
|
|
19466
|
+
height: 5,
|
|
19467
|
+
product: import_developer_studio_api26.IntegrationNames.Shopify,
|
|
19468
|
+
width: 5
|
|
19469
|
+
}
|
|
19470
|
+
),
|
|
19471
|
+
values: Object.values(shopifyTriggerConfigs()).map((x) => ({
|
|
19472
|
+
key: x.key,
|
|
19473
|
+
name: x.customization.displayName,
|
|
19474
|
+
secondaryText: x.customization.description
|
|
19475
|
+
}))
|
|
19476
|
+
},
|
|
19223
19477
|
{
|
|
19224
|
-
|
|
19225
|
-
|
|
19226
|
-
|
|
19478
|
+
name: import_developer_studio_api26.IntegrationNames.HubSpot,
|
|
19479
|
+
displayName: import_developer_studio_api26.IntegrationDisplayNames.HubSpot,
|
|
19480
|
+
icon: /* @__PURE__ */ jsx2(
|
|
19481
|
+
ProductIcon_default,
|
|
19482
|
+
{
|
|
19483
|
+
height: 5,
|
|
19484
|
+
product: import_developer_studio_api26.IntegrationNames.HubSpot,
|
|
19485
|
+
width: 5
|
|
19486
|
+
}
|
|
19487
|
+
),
|
|
19488
|
+
values: Object.values(hubspotTriggerConfigs()).map((x) => ({
|
|
19489
|
+
key: x.key,
|
|
19490
|
+
name: x.customization.displayName,
|
|
19491
|
+
secondaryText: x.customization.description
|
|
19492
|
+
}))
|
|
19493
|
+
},
|
|
19494
|
+
{
|
|
19495
|
+
name: import_developer_studio_api26.IntegrationNames.BigCommerce,
|
|
19496
|
+
displayName: import_developer_studio_api26.IntegrationDisplayNames.BigCommerce,
|
|
19497
|
+
icon: /* @__PURE__ */ jsx2(
|
|
19498
|
+
ProductIcon_default,
|
|
19499
|
+
{
|
|
19500
|
+
height: 5,
|
|
19501
|
+
product: import_developer_studio_api26.IntegrationNames.BigCommerce,
|
|
19502
|
+
width: 5
|
|
19503
|
+
}
|
|
19504
|
+
),
|
|
19505
|
+
values: Object.values(bigcommerceTriggerConfigs()).map((x) => ({
|
|
19506
|
+
key: x.key,
|
|
19507
|
+
name: x.customization.displayName,
|
|
19508
|
+
secondaryText: x.customization.description
|
|
19509
|
+
}))
|
|
19227
19510
|
}
|
|
19228
|
-
|
|
19229
|
-
|
|
19230
|
-
|
|
19231
|
-
name: x.customization.displayName,
|
|
19232
|
-
secondaryText: x.customization.description
|
|
19233
|
-
}))
|
|
19234
|
-
}
|
|
19235
|
-
];
|
|
19236
|
-
function AddWorkflowTrigger({ basePath, onClose }) {
|
|
19237
|
-
const [search, setSearch] = (0, import_react90.useState)("");
|
|
19511
|
+
],
|
|
19512
|
+
[]
|
|
19513
|
+
);
|
|
19238
19514
|
const location = (0, import_react_router_dom13.useLocation)();
|
|
19239
19515
|
const navigate = (0, import_react_router_dom13.useNavigate)();
|
|
19240
19516
|
const params = (0, import_react_router_dom13.useParams)();
|
|
@@ -19247,10 +19523,11 @@ function AddWorkflowTrigger({ basePath, onClose }) {
|
|
|
19247
19523
|
(0, import_react90.useEffect)(() => {
|
|
19248
19524
|
var _a, _b, _c;
|
|
19249
19525
|
if (!params.trigger) {
|
|
19250
|
-
const firstTrigger = (_c = (_b = (_a =
|
|
19526
|
+
const firstTrigger = (_c = (_b = (_a = config2.find((el) => el.name === params.service)) == null ? void 0 : _a.values.sort((a, b) => a.name.localeCompare(b.name))) == null ? void 0 : _b[0]) == null ? void 0 : _c.key;
|
|
19251
19527
|
navigate(`${basePath}/${params.service}/${firstTrigger}`);
|
|
19252
19528
|
}
|
|
19253
|
-
const
|
|
19529
|
+
const templates = WorkflowItemsConfiguration.templates;
|
|
19530
|
+
const triggers = params.service ? templates.triggers[params.service] : void 0;
|
|
19254
19531
|
const trigger = params.trigger && triggers ? triggers[params.trigger] : void 0;
|
|
19255
19532
|
setState({ trigger });
|
|
19256
19533
|
}, [basePath, navigate, params.service, params.trigger]);
|
|
@@ -19319,7 +19596,7 @@ function AddWorkflowTrigger({ basePath, onClose }) {
|
|
|
19319
19596
|
)
|
|
19320
19597
|
}
|
|
19321
19598
|
),
|
|
19322
|
-
|
|
19599
|
+
config2.map(({ name, displayName, icon: icon2, values }) => {
|
|
19323
19600
|
const revertIconColor = getWorkflowsEnv("isHeadless") && (name === import_developer_studio_api26.IntegrationNames.OpenAI || name === import_developer_studio_api26.IntegrationNames.BigCommerce);
|
|
19324
19601
|
if (search) {
|
|
19325
19602
|
if (values.some(
|
|
@@ -19395,7 +19672,7 @@ function AddWorkflowTrigger({ basePath, onClose }) {
|
|
|
19395
19672
|
`,
|
|
19396
19673
|
setColumnPadding: "0 20px 0 16px",
|
|
19397
19674
|
width: 10,
|
|
19398
|
-
children: params.service ?
|
|
19675
|
+
children: params.service ? config2.map(({ name, displayName, values, icon: icon2 }) => {
|
|
19399
19676
|
var _a;
|
|
19400
19677
|
if (((_a = params.service) == null ? void 0 : _a.toLowerCase()) === name.toLowerCase()) {
|
|
19401
19678
|
const options2 = values.map(({ key, name: name2, secondaryText }) => ({
|
|
@@ -19859,7 +20136,6 @@ var import_react_router_dom17 = require("react-router-dom");
|
|
|
19859
20136
|
// src/views/Flows/Templates/api.mocks.tsx
|
|
19860
20137
|
var import_design_system_icons32 = require("@livechat/design-system-icons");
|
|
19861
20138
|
var import_developer_studio_api27 = require("@livechat/developer-studio-api");
|
|
19862
|
-
var config11 = getWorkflowsConfig();
|
|
19863
20139
|
var flowTemplates = [
|
|
19864
20140
|
{
|
|
19865
20141
|
id: "1",
|
|
@@ -19909,7 +20185,9 @@ var flowTemplates = [
|
|
|
19909
20185
|
type: "HTTP",
|
|
19910
20186
|
inputParameters: {
|
|
19911
20187
|
http_request: {
|
|
19912
|
-
uri: `${
|
|
20188
|
+
uri: `${getWorkflowsEnv(
|
|
20189
|
+
"workflowsApiUr"
|
|
20190
|
+
)}/functions/get-livechat-chat-transcript?chat_id=\${workflow.input.body.chat_id}`,
|
|
19913
20191
|
method: "GET",
|
|
19914
20192
|
headers: {
|
|
19915
20193
|
Accept: "application/json",
|
|
@@ -19925,7 +20203,9 @@ var flowTemplates = [
|
|
|
19925
20203
|
type: "HTTP",
|
|
19926
20204
|
inputParameters: {
|
|
19927
20205
|
http_request: {
|
|
19928
|
-
uri: `${
|
|
20206
|
+
uri: `${getWorkflowsEnv(
|
|
20207
|
+
"workflowsApiUr"
|
|
20208
|
+
)}/functions/summarize-text`,
|
|
19929
20209
|
body: {
|
|
19930
20210
|
text: "${livechat_get_chat_transcript_1.output.response.body.chat_transcript}"
|
|
19931
20211
|
},
|
|
@@ -19944,7 +20224,9 @@ var flowTemplates = [
|
|
|
19944
20224
|
type: "HTTP",
|
|
19945
20225
|
inputParameters: {
|
|
19946
20226
|
http_request: {
|
|
19947
|
-
uri: `${
|
|
20227
|
+
uri: `${getWorkflowsEnv(
|
|
20228
|
+
"workflowsApiUr"
|
|
20229
|
+
)}/functions/create-helpdesk-ticket`,
|
|
19948
20230
|
body: {
|
|
19949
20231
|
message: {
|
|
19950
20232
|
text: "${openai_summarize_text_1.output.response.body.summary}"
|
|
@@ -20021,7 +20303,9 @@ var flowTemplates = [
|
|
|
20021
20303
|
type: "HTTP",
|
|
20022
20304
|
inputParameters: {
|
|
20023
20305
|
http_request: {
|
|
20024
|
-
uri: `${
|
|
20306
|
+
uri: `${getWorkflowsEnv(
|
|
20307
|
+
"workflowsApiUr"
|
|
20308
|
+
)}/functions/get-livechat-chat-transcript?chat_id=\${workflow.input.body.chat_id}`,
|
|
20025
20309
|
method: "GET",
|
|
20026
20310
|
headers: {
|
|
20027
20311
|
Accept: "application/json",
|
|
@@ -20037,7 +20321,9 @@ var flowTemplates = [
|
|
|
20037
20321
|
type: "HTTP",
|
|
20038
20322
|
inputParameters: {
|
|
20039
20323
|
http_request: {
|
|
20040
|
-
uri: `${
|
|
20324
|
+
uri: `${getWorkflowsEnv(
|
|
20325
|
+
"workflowsApiUr"
|
|
20326
|
+
)}/functions/analyze-text-sentiment`,
|
|
20041
20327
|
body: {
|
|
20042
20328
|
text: "${livechat_get_chat_transcript_1.output.response.body.chat_transcript}"
|
|
20043
20329
|
},
|
|
@@ -20056,7 +20342,9 @@ var flowTemplates = [
|
|
|
20056
20342
|
type: "HTTP",
|
|
20057
20343
|
inputParameters: {
|
|
20058
20344
|
http_request: {
|
|
20059
|
-
uri: `${
|
|
20345
|
+
uri: `${getWorkflowsEnv(
|
|
20346
|
+
"workflowsApiUr"
|
|
20347
|
+
)}/functions/create-helpdesk-ticket`,
|
|
20060
20348
|
body: {
|
|
20061
20349
|
message: {
|
|
20062
20350
|
text: "${livechat_get_chat_transcript_1.output.response.body.chat_transcript}"
|
|
@@ -20082,7 +20370,9 @@ var flowTemplates = [
|
|
|
20082
20370
|
type: "HTTP",
|
|
20083
20371
|
inputParameters: {
|
|
20084
20372
|
http_request: {
|
|
20085
|
-
uri: `${
|
|
20373
|
+
uri: `${getWorkflowsEnv(
|
|
20374
|
+
"workflowsApiUr"
|
|
20375
|
+
)}/functions/add-mailchimp-subscriber-event`,
|
|
20086
20376
|
body: {
|
|
20087
20377
|
name: "Competitor Mention",
|
|
20088
20378
|
email: "${livechat_get_chat_transcript_1.output.response.body.customer_email}",
|
|
@@ -20173,7 +20463,9 @@ var flowTemplates = [
|
|
|
20173
20463
|
asyncComplete: false,
|
|
20174
20464
|
http_request: {
|
|
20175
20465
|
method: "GET",
|
|
20176
|
-
uri: `${
|
|
20466
|
+
uri: `${getWorkflowsEnv(
|
|
20467
|
+
"workflowsApiUr"
|
|
20468
|
+
)}/functions/get-livechat-chat-transcript?chat_id=\${workflow.input.body.chat_id}`,
|
|
20177
20469
|
headers: {
|
|
20178
20470
|
Accept: "application/json",
|
|
20179
20471
|
"x-cred-access-token": "${workflow.credentials.text.access_token}"
|
|
@@ -20189,7 +20481,9 @@ var flowTemplates = [
|
|
|
20189
20481
|
asyncComplete: false,
|
|
20190
20482
|
http_request: {
|
|
20191
20483
|
method: "POST",
|
|
20192
|
-
uri: `${
|
|
20484
|
+
uri: `${getWorkflowsEnv(
|
|
20485
|
+
"workflowsApiUr"
|
|
20486
|
+
)}/functions/summarize-text`,
|
|
20193
20487
|
body: {
|
|
20194
20488
|
text: "${livechat_get_chat_transcript_1.output.response.body.chat_transcript}"
|
|
20195
20489
|
},
|
|
@@ -20208,7 +20502,9 @@ var flowTemplates = [
|
|
|
20208
20502
|
asyncComplete: false,
|
|
20209
20503
|
http_request: {
|
|
20210
20504
|
method: "POST",
|
|
20211
|
-
uri: `${
|
|
20505
|
+
uri: `${getWorkflowsEnv(
|
|
20506
|
+
"workflowsApiUr"
|
|
20507
|
+
)}/functions/create-helpdesk-ticket`,
|
|
20212
20508
|
body: {
|
|
20213
20509
|
requester: {
|
|
20214
20510
|
email: "${livechat_get_chat_transcript_1.output.response.body.customer_email}",
|
|
@@ -20231,7 +20527,9 @@ var flowTemplates = [
|
|
|
20231
20527
|
type: "HTTP",
|
|
20232
20528
|
inputParameters: {
|
|
20233
20529
|
http_request: {
|
|
20234
|
-
uri: `${
|
|
20530
|
+
uri: `${getWorkflowsEnv(
|
|
20531
|
+
"workflowsApiUr"
|
|
20532
|
+
)}/functions/add-mailchimp-subscriber-note`,
|
|
20235
20533
|
body: {
|
|
20236
20534
|
note: "Feedback from chat ID ${workflow.input.body.chat_id}",
|
|
20237
20535
|
email: "${livechat_get_chat_transcript_1.output.response.body.customer_email}",
|
|
@@ -20320,7 +20618,9 @@ var flowTemplates = [
|
|
|
20320
20618
|
asyncComplete: false,
|
|
20321
20619
|
http_request: {
|
|
20322
20620
|
method: "GET",
|
|
20323
|
-
uri: `${
|
|
20621
|
+
uri: `${getWorkflowsEnv(
|
|
20622
|
+
"workflowsApiUr"
|
|
20623
|
+
)}/functions/get-livechat-chat-transcript?chat_id=\${workflow.input.body.chat_id}`,
|
|
20324
20624
|
headers: {
|
|
20325
20625
|
Accept: "application/json",
|
|
20326
20626
|
"x-cred-access-token": "${workflow.credentials.text.access_token}"
|
|
@@ -20333,7 +20633,9 @@ var flowTemplates = [
|
|
|
20333
20633
|
type: "HTTP",
|
|
20334
20634
|
inputParameters: {
|
|
20335
20635
|
http_request: {
|
|
20336
|
-
uri: `${
|
|
20636
|
+
uri: `${getWorkflowsEnv(
|
|
20637
|
+
"workflowsApiUr"
|
|
20638
|
+
)}/functions/get-shopify-customer?email=\${livechat_get_chat_transcript_1.output.response.body.customer_email}`,
|
|
20337
20639
|
method: "GET",
|
|
20338
20640
|
headers: {
|
|
20339
20641
|
Accept: "application/json",
|
|
@@ -20350,7 +20652,9 @@ var flowTemplates = [
|
|
|
20350
20652
|
type: "HTTP",
|
|
20351
20653
|
inputParameters: {
|
|
20352
20654
|
http_request: {
|
|
20353
|
-
uri: `${
|
|
20655
|
+
uri: `${getWorkflowsEnv(
|
|
20656
|
+
"workflowsApiUr"
|
|
20657
|
+
)}/functions/analyze-text-sentiment`,
|
|
20354
20658
|
body: {
|
|
20355
20659
|
text: "${livechat_get_chat_transcript_1.output.response.body.chat_transcript}"
|
|
20356
20660
|
},
|
|
@@ -20369,7 +20673,9 @@ var flowTemplates = [
|
|
|
20369
20673
|
type: "HTTP",
|
|
20370
20674
|
inputParameters: {
|
|
20371
20675
|
http_request: {
|
|
20372
|
-
uri: `${
|
|
20676
|
+
uri: `${getWorkflowsEnv(
|
|
20677
|
+
"workflowsApiUr"
|
|
20678
|
+
)}/functions/add-mailchimp-campaign`,
|
|
20373
20679
|
body: {
|
|
20374
20680
|
type: "regular",
|
|
20375
20681
|
settings: {
|
|
@@ -20470,7 +20776,9 @@ var flowTemplates = [
|
|
|
20470
20776
|
asyncComplete: false,
|
|
20471
20777
|
http_request: {
|
|
20472
20778
|
method: "GET",
|
|
20473
|
-
uri: `${
|
|
20779
|
+
uri: `${getWorkflowsEnv(
|
|
20780
|
+
"workflowsApiUr"
|
|
20781
|
+
)}/functions/get-livechat-chat-transcript?chat_id=\${workflow.input.body.chat_id}`,
|
|
20474
20782
|
headers: {
|
|
20475
20783
|
Accept: "application/json",
|
|
20476
20784
|
"x-cred-access-token": "${workflow.credentials.text.access_token}"
|
|
@@ -20486,7 +20794,9 @@ var flowTemplates = [
|
|
|
20486
20794
|
asyncComplete: false,
|
|
20487
20795
|
http_request: {
|
|
20488
20796
|
method: "POST",
|
|
20489
|
-
uri: `${
|
|
20797
|
+
uri: `${getWorkflowsEnv(
|
|
20798
|
+
"workflowsApiUr"
|
|
20799
|
+
)}/functions/analyze-text-sentiment`,
|
|
20490
20800
|
body: {
|
|
20491
20801
|
text: "${livechat_get_chat_transcript_1.output.response.body.chat_transcript}"
|
|
20492
20802
|
},
|
|
@@ -20505,7 +20815,9 @@ var flowTemplates = [
|
|
|
20505
20815
|
asyncComplete: false,
|
|
20506
20816
|
http_request: {
|
|
20507
20817
|
method: "POST",
|
|
20508
|
-
uri: `${
|
|
20818
|
+
uri: `${getWorkflowsEnv(
|
|
20819
|
+
"workflowsApiUr"
|
|
20820
|
+
)}/functions/add-or-update-mailchimp-subscriber`,
|
|
20509
20821
|
body: {
|
|
20510
20822
|
list_id: null,
|
|
20511
20823
|
email: "${livechat_get_chat_transcript_1.output.response.body.customer_email}",
|
|
@@ -20527,7 +20839,9 @@ var flowTemplates = [
|
|
|
20527
20839
|
asyncComplete: false,
|
|
20528
20840
|
http_request: {
|
|
20529
20841
|
method: "POST",
|
|
20530
|
-
uri: `${
|
|
20842
|
+
uri: `${getWorkflowsEnv(
|
|
20843
|
+
"workflowsApiUr"
|
|
20844
|
+
)}/functions/add-mailchimp-subscriber-tag`,
|
|
20531
20845
|
body: {
|
|
20532
20846
|
list_id: null,
|
|
20533
20847
|
email: "${livechat_get_chat_transcript_1.output.response.body.customer_email}",
|
|
@@ -20598,7 +20912,9 @@ var flowTemplates = [
|
|
|
20598
20912
|
type: "HTTP",
|
|
20599
20913
|
inputParameters: {
|
|
20600
20914
|
http_request: {
|
|
20601
|
-
uri: `${
|
|
20915
|
+
uri: `${getWorkflowsEnv(
|
|
20916
|
+
"workflowsApiUr"
|
|
20917
|
+
)}/functions/send-livechat-agent-message`,
|
|
20602
20918
|
body: {
|
|
20603
20919
|
chat_id: "${workflow.input.body.chat.id}",
|
|
20604
20920
|
message: "Welcome to our service! How can we assist you today?",
|
|
@@ -20677,7 +20993,9 @@ var flowTemplates = [
|
|
|
20677
20993
|
inputParameters: {
|
|
20678
20994
|
asyncComplete: false,
|
|
20679
20995
|
http_request: {
|
|
20680
|
-
uri: `${
|
|
20996
|
+
uri: `${getWorkflowsEnv(
|
|
20997
|
+
"workflowsApiUr"
|
|
20998
|
+
)}/functions/get-livechat-chat-transcript?chat_id=\${workflow.input.body.chat_id}`,
|
|
20681
20999
|
method: "GET",
|
|
20682
21000
|
headers: {
|
|
20683
21001
|
Accept: "application/json",
|
|
@@ -20693,7 +21011,9 @@ var flowTemplates = [
|
|
|
20693
21011
|
inputParameters: {
|
|
20694
21012
|
asyncComplete: false,
|
|
20695
21013
|
http_request: {
|
|
20696
|
-
uri: `${
|
|
21014
|
+
uri: `${getWorkflowsEnv(
|
|
21015
|
+
"workflowsApiUr"
|
|
21016
|
+
)}/functions/summarize-text`,
|
|
20697
21017
|
body: {
|
|
20698
21018
|
text: "${livechat_get_chat_transcript_1.output.response.body.chat_transcript}"
|
|
20699
21019
|
},
|
|
@@ -20712,7 +21032,9 @@ var flowTemplates = [
|
|
|
20712
21032
|
inputParameters: {
|
|
20713
21033
|
asyncComplete: false,
|
|
20714
21034
|
http_request: {
|
|
20715
|
-
uri: `${
|
|
21035
|
+
uri: `${getWorkflowsEnv(
|
|
21036
|
+
"workflowsApiUr"
|
|
21037
|
+
)}/functions/create-helpdesk-ticket`,
|
|
20716
21038
|
body: {
|
|
20717
21039
|
message: {
|
|
20718
21040
|
text: "${openai_summarize_text_1.output.response.body.summary}"
|
|
@@ -20801,7 +21123,9 @@ var flowTemplates = [
|
|
|
20801
21123
|
inputParameters: {
|
|
20802
21124
|
asyncComplete: false,
|
|
20803
21125
|
http_request: {
|
|
20804
|
-
uri: `${
|
|
21126
|
+
uri: `${getWorkflowsEnv(
|
|
21127
|
+
"workflowsApiUr"
|
|
21128
|
+
)}/functions/get-livechat-chat-transcript?chat_id=\${workflow.input.body.chat.id}`,
|
|
20805
21129
|
method: "GET",
|
|
20806
21130
|
headers: {
|
|
20807
21131
|
Accept: "application/json",
|
|
@@ -20817,7 +21141,9 @@ var flowTemplates = [
|
|
|
20817
21141
|
inputParameters: {
|
|
20818
21142
|
asyncComplete: false,
|
|
20819
21143
|
http_request: {
|
|
20820
|
-
uri: `${
|
|
21144
|
+
uri: `${getWorkflowsEnv(
|
|
21145
|
+
"workflowsApiUr"
|
|
21146
|
+
)}/functions/get-shopify-customer-last-order?email=\${livechat_get_chat_transcript_1.output.response.body.customer_email}`,
|
|
20821
21147
|
body: {},
|
|
20822
21148
|
method: "GET",
|
|
20823
21149
|
headers: {
|
|
@@ -20835,7 +21161,9 @@ var flowTemplates = [
|
|
|
20835
21161
|
inputParameters: {
|
|
20836
21162
|
asyncComplete: false,
|
|
20837
21163
|
http_request: {
|
|
20838
|
-
uri: `${
|
|
21164
|
+
uri: `${getWorkflowsEnv(
|
|
21165
|
+
"workflowsApiUr"
|
|
21166
|
+
)}/functions/send-livechat-agent-message`,
|
|
20839
21167
|
body: {
|
|
20840
21168
|
chat_id: "${workflow.input.body.chat.id}",
|
|
20841
21169
|
message: "Last Order ID: ${shopify_get_customer_last_order_1.output.response.body.id}, Customer Name: ${shopify_get_customer_last_order_1.output.response.body.customer.first_name}",
|
|
@@ -20910,7 +21238,9 @@ var flowTemplates = [
|
|
|
20910
21238
|
inputParameters: {
|
|
20911
21239
|
asyncComplete: false,
|
|
20912
21240
|
http_request: {
|
|
20913
|
-
uri: `${
|
|
21241
|
+
uri: `${getWorkflowsEnv(
|
|
21242
|
+
"workflowsApiUr"
|
|
21243
|
+
)}/functions/get-livechat-chat-transcript?chat_id=\${workflow.input.body.chat_id}`,
|
|
20914
21244
|
method: "GET",
|
|
20915
21245
|
headers: {
|
|
20916
21246
|
Accept: "application/json",
|
|
@@ -20926,7 +21256,9 @@ var flowTemplates = [
|
|
|
20926
21256
|
inputParameters: {
|
|
20927
21257
|
asyncComplete: false,
|
|
20928
21258
|
http_request: {
|
|
20929
|
-
uri: `${
|
|
21259
|
+
uri: `${getWorkflowsEnv(
|
|
21260
|
+
"workflowsApiUr"
|
|
21261
|
+
)}/functions/create-hubspot-contact`,
|
|
20930
21262
|
body: {
|
|
20931
21263
|
properties: {
|
|
20932
21264
|
email: "${livechat_get_chat_transcript_1.output.response.body.customer_email}",
|
|
@@ -21003,7 +21335,9 @@ var flowTemplates = [
|
|
|
21003
21335
|
inputParameters: {
|
|
21004
21336
|
asyncComplete: false,
|
|
21005
21337
|
http_request: {
|
|
21006
|
-
uri: `${
|
|
21338
|
+
uri: `${getWorkflowsEnv(
|
|
21339
|
+
"workflowsApiUr"
|
|
21340
|
+
)}/functions/get-livechat-chat-transcript?chat_id=\${workflow.input.body.chat.id}`,
|
|
21007
21341
|
method: "GET",
|
|
21008
21342
|
headers: {
|
|
21009
21343
|
Accept: "application/json",
|
|
@@ -21019,7 +21353,9 @@ var flowTemplates = [
|
|
|
21019
21353
|
inputParameters: {
|
|
21020
21354
|
asyncComplete: false,
|
|
21021
21355
|
http_request: {
|
|
21022
|
-
uri: `${
|
|
21356
|
+
uri: `${getWorkflowsEnv(
|
|
21357
|
+
"workflowsApiUr"
|
|
21358
|
+
)}/functions/create-helpdesk-ticket`,
|
|
21023
21359
|
body: {
|
|
21024
21360
|
message: {
|
|
21025
21361
|
text: "A new chat has been initiated with ${livechat_get_chat_transcript_1.output.response.body.customer_first_name} Email: ${livechat_get_chat_transcript_1.output.response.body.customer_email}"
|
|
@@ -21105,7 +21441,9 @@ var flowTemplates = [
|
|
|
21105
21441
|
inputParameters: {
|
|
21106
21442
|
asyncComplete: false,
|
|
21107
21443
|
http_request: {
|
|
21108
|
-
uri: `${
|
|
21444
|
+
uri: `${getWorkflowsEnv(
|
|
21445
|
+
"workflowsApiUr"
|
|
21446
|
+
)}/functions/get-livechat-chat-transcript?chat_id=\${workflow.input.body.chat_id}`,
|
|
21109
21447
|
method: "GET",
|
|
21110
21448
|
headers: {
|
|
21111
21449
|
Accept: "application/json",
|
|
@@ -21121,7 +21459,9 @@ var flowTemplates = [
|
|
|
21121
21459
|
inputParameters: {
|
|
21122
21460
|
asyncComplete: false,
|
|
21123
21461
|
http_request: {
|
|
21124
|
-
uri: `${
|
|
21462
|
+
uri: `${getWorkflowsEnv(
|
|
21463
|
+
"workflowsApiUr"
|
|
21464
|
+
)}/functions/create-hubspot-contact`,
|
|
21125
21465
|
body: {
|
|
21126
21466
|
properties: {
|
|
21127
21467
|
email: "${livechat_get_chat_transcript_1.output.response.body.customer_email}",
|
|
@@ -21145,7 +21485,9 @@ var flowTemplates = [
|
|
|
21145
21485
|
asyncComplete: false,
|
|
21146
21486
|
http_request: {
|
|
21147
21487
|
method: "POST",
|
|
21148
|
-
uri: `${
|
|
21488
|
+
uri: `${getWorkflowsEnv(
|
|
21489
|
+
"workflowsApiUr"
|
|
21490
|
+
)}/functions/add-or-update-mailchimp-subscriber`,
|
|
21149
21491
|
body: {
|
|
21150
21492
|
list_id: null,
|
|
21151
21493
|
email: "${livechat_get_chat_transcript_1.output.response.body.customer_email}",
|
|
@@ -21223,7 +21565,9 @@ var flowTemplates = [
|
|
|
21223
21565
|
inputParameters: {
|
|
21224
21566
|
asyncComplete: false,
|
|
21225
21567
|
http_request: {
|
|
21226
|
-
uri: `${
|
|
21568
|
+
uri: `${getWorkflowsEnv(
|
|
21569
|
+
"workflowsApiUr"
|
|
21570
|
+
)}/functions/supervise-livechat-chat`,
|
|
21227
21571
|
body: {
|
|
21228
21572
|
chat_id: "${workflow.input.body.chat_id}",
|
|
21229
21573
|
user_id: "add your email"
|
|
@@ -21243,7 +21587,9 @@ var flowTemplates = [
|
|
|
21243
21587
|
inputParameters: {
|
|
21244
21588
|
asyncComplete: false,
|
|
21245
21589
|
http_request: {
|
|
21246
|
-
uri: `${
|
|
21590
|
+
uri: `${getWorkflowsEnv(
|
|
21591
|
+
"workflowsApiUr"
|
|
21592
|
+
)}/functions/send-livechat-agent-message`,
|
|
21247
21593
|
body: {
|
|
21248
21594
|
chat_id: "${workflow.input.body.chat_id}",
|
|
21249
21595
|
message: "Hi, please remember to request reviews from customers. Keep up the great work!",
|
|
@@ -21319,7 +21665,9 @@ var flowTemplates = [
|
|
|
21319
21665
|
inputParameters: {
|
|
21320
21666
|
asyncComplete: false,
|
|
21321
21667
|
http_request: {
|
|
21322
|
-
uri: `${
|
|
21668
|
+
uri: `${getWorkflowsEnv(
|
|
21669
|
+
"workflowsApiUr"
|
|
21670
|
+
)}/functions/get-livechat-chat-transcript?chat_id=\${workflow.input.body.chat_id}`,
|
|
21323
21671
|
method: "GET",
|
|
21324
21672
|
headers: {
|
|
21325
21673
|
Accept: "application/json",
|
|
@@ -21335,7 +21683,9 @@ var flowTemplates = [
|
|
|
21335
21683
|
inputParameters: {
|
|
21336
21684
|
asyncComplete: false,
|
|
21337
21685
|
http_request: {
|
|
21338
|
-
uri: `${
|
|
21686
|
+
uri: `${getWorkflowsEnv(
|
|
21687
|
+
"workflowsApiUr"
|
|
21688
|
+
)}/functions/create-helpdesk-ticket`,
|
|
21339
21689
|
body: {
|
|
21340
21690
|
message: {
|
|
21341
21691
|
text: "${livechat_get_chat_transcript_1.output.response.body.chat_transcript}"
|