@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.mjs
CHANGED
|
@@ -256,7 +256,7 @@ var require_react_is_development = __commonJS({
|
|
|
256
256
|
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
257
257
|
var Element = REACT_ELEMENT_TYPE;
|
|
258
258
|
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
259
|
-
var
|
|
259
|
+
var Fragment17 = REACT_FRAGMENT_TYPE;
|
|
260
260
|
var Lazy = REACT_LAZY_TYPE;
|
|
261
261
|
var Memo = REACT_MEMO_TYPE;
|
|
262
262
|
var Portal = REACT_PORTAL_TYPE;
|
|
@@ -315,7 +315,7 @@ var require_react_is_development = __commonJS({
|
|
|
315
315
|
exports.ContextProvider = ContextProvider;
|
|
316
316
|
exports.Element = Element;
|
|
317
317
|
exports.ForwardRef = ForwardRef;
|
|
318
|
-
exports.Fragment =
|
|
318
|
+
exports.Fragment = Fragment17;
|
|
319
319
|
exports.Lazy = Lazy;
|
|
320
320
|
exports.Memo = Memo;
|
|
321
321
|
exports.Portal = Portal;
|
|
@@ -469,20 +469,22 @@ import {
|
|
|
469
469
|
getConfig,
|
|
470
470
|
setConfig
|
|
471
471
|
} from "@livechat/developer-studio-ui-react";
|
|
472
|
-
var
|
|
472
|
+
var configBase = {
|
|
473
473
|
env: "labs"
|
|
474
474
|
};
|
|
475
|
+
var config = getWorkflowsConfig(configBase);
|
|
475
476
|
function setWorkflowsConfig(newConfig) {
|
|
476
|
-
|
|
477
|
+
configBase = __spreadValues(__spreadValues({}, configBase), newConfig);
|
|
477
478
|
setConfig({
|
|
478
|
-
env:
|
|
479
|
-
basePath:
|
|
479
|
+
env: configBase.env,
|
|
480
|
+
basePath: configBase.basePath
|
|
480
481
|
});
|
|
482
|
+
config = getWorkflowsConfig(configBase);
|
|
481
483
|
}
|
|
482
|
-
function getWorkflowsConfig() {
|
|
483
|
-
const isProd =
|
|
484
|
-
const coreConfig = getConfig();
|
|
485
|
-
return __spreadProps(__spreadValues(__spreadValues({}, coreConfig),
|
|
484
|
+
function getWorkflowsConfig(base) {
|
|
485
|
+
const isProd = base.env === "prod";
|
|
486
|
+
const coreConfig = getConfig(base);
|
|
487
|
+
return __spreadProps(__spreadValues(__spreadValues({}, coreConfig), configBase), {
|
|
486
488
|
// Authorization
|
|
487
489
|
accountsClientId: isProd ? "381b682538d896b6a25f54caf1805650" : "bc52b2c51dc4a5c2491ca49eaa7354d0",
|
|
488
490
|
// Workflows
|
|
@@ -495,7 +497,7 @@ function getWorkflowsConfig() {
|
|
|
495
497
|
});
|
|
496
498
|
}
|
|
497
499
|
var getWorkflowsEnv = (key) => {
|
|
498
|
-
return
|
|
500
|
+
return config[key];
|
|
499
501
|
};
|
|
500
502
|
|
|
501
503
|
// ../../../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
|
|
@@ -1975,9 +1977,7 @@ var WORKFLOW_HTTP_TASK_OUTPUT_SCHEMA = (body) => ({
|
|
|
1975
1977
|
});
|
|
1976
1978
|
|
|
1977
1979
|
// src/views/Flows/Definitions/Mocks/System/index.ts
|
|
1978
|
-
import {
|
|
1979
|
-
WorkflowDefinitionTaskType
|
|
1980
|
-
} from "@livechat/developer-studio-api";
|
|
1980
|
+
import { WorkflowDefinitionTaskType } from "@livechat/developer-studio-api";
|
|
1981
1981
|
|
|
1982
1982
|
// src/constants/products.ts
|
|
1983
1983
|
var OTHER_PRODUCT_TYPE = {
|
|
@@ -1998,7 +1998,7 @@ var PRODUCT_NAMES = {
|
|
|
1998
1998
|
};
|
|
1999
1999
|
|
|
2000
2000
|
// src/views/Flows/Definitions/Mocks/System/index.ts
|
|
2001
|
-
var systemTaskConfigs = {
|
|
2001
|
+
var systemTaskConfigs = () => ({
|
|
2002
2002
|
[WorkflowDefinitionTaskType.http]: {
|
|
2003
2003
|
key: WorkflowDefinitionTaskType.http,
|
|
2004
2004
|
type: "other",
|
|
@@ -2069,7 +2069,7 @@ var systemTaskConfigs = {
|
|
|
2069
2069
|
},
|
|
2070
2070
|
specification: {}
|
|
2071
2071
|
}
|
|
2072
|
-
};
|
|
2072
|
+
});
|
|
2073
2073
|
var workflowForkTask = {
|
|
2074
2074
|
name: "fork",
|
|
2075
2075
|
type: "FORK_JOIN",
|
|
@@ -2127,7 +2127,7 @@ var workflowHttpTask = {
|
|
|
2127
2127
|
}
|
|
2128
2128
|
}
|
|
2129
2129
|
};
|
|
2130
|
-
var systemTaskTemplates = {
|
|
2130
|
+
var systemTaskTemplates = () => ({
|
|
2131
2131
|
[WorkflowDefinitionTaskType.http]: workflowHttpTask,
|
|
2132
2132
|
[WorkflowDefinitionTaskType.switch]: workflowSwitchTask,
|
|
2133
2133
|
[WorkflowDefinitionTaskType.forkJoin]: workflowForkTask,
|
|
@@ -2137,8 +2137,8 @@ var systemTaskTemplates = {
|
|
|
2137
2137
|
[WorkflowDefinitionTaskType.addNode]: workflowAddNodeTask,
|
|
2138
2138
|
[WorkflowDefinitionTaskType.addTrigger]: workflowAddTriggerTask,
|
|
2139
2139
|
[WorkflowDefinitionTaskType.trigger]: workflowTriggerTask
|
|
2140
|
-
};
|
|
2141
|
-
var systemTriggerConfigs = {
|
|
2140
|
+
});
|
|
2141
|
+
var systemTriggerConfigs = () => ({
|
|
2142
2142
|
["scheduled" /* Scheduled */]: {
|
|
2143
2143
|
key: "scheduled" /* Scheduled */,
|
|
2144
2144
|
type: "system",
|
|
@@ -2178,8 +2178,8 @@ var systemTriggerConfigs = {
|
|
|
2178
2178
|
output: {}
|
|
2179
2179
|
}
|
|
2180
2180
|
}
|
|
2181
|
-
};
|
|
2182
|
-
var systemTriggerTemplates = {
|
|
2181
|
+
});
|
|
2182
|
+
var systemTriggerTemplates = () => ({
|
|
2183
2183
|
["manual" /* Manual */]: {
|
|
2184
2184
|
type: "manual_only"
|
|
2185
2185
|
},
|
|
@@ -2187,10 +2187,9 @@ var systemTriggerTemplates = {
|
|
|
2187
2187
|
type: "recurring",
|
|
2188
2188
|
schedule: "* * * * *"
|
|
2189
2189
|
}
|
|
2190
|
-
};
|
|
2190
|
+
});
|
|
2191
2191
|
|
|
2192
2192
|
// src/views/Flows/Definitions/Mocks/BigCommerce/index.ts
|
|
2193
|
-
var config2 = getWorkflowsConfig();
|
|
2194
2193
|
var bigCommerceProductBody = {
|
|
2195
2194
|
id: {
|
|
2196
2195
|
type: "number",
|
|
@@ -2526,11 +2525,13 @@ var bigCommerceCustomerResponse = {
|
|
|
2526
2525
|
}
|
|
2527
2526
|
}
|
|
2528
2527
|
};
|
|
2529
|
-
var bigCommerceTaskConfigs = {
|
|
2528
|
+
var bigCommerceTaskConfigs = () => ({
|
|
2530
2529
|
["BIGCOMMERCE_CREATE_BLOG_POST" /* CreateBlogPost */]: {
|
|
2531
2530
|
key: "BIGCOMMERCE_CREATE_BLOG_POST" /* CreateBlogPost */,
|
|
2532
2531
|
type: WorkflowDefinitionTaskType2.http,
|
|
2533
|
-
url: `${
|
|
2532
|
+
url: `${getWorkflowsEnv(
|
|
2533
|
+
"workflowsApiUr"
|
|
2534
|
+
)}/functions/create-bigcommerce-blog-post`,
|
|
2534
2535
|
customization: {
|
|
2535
2536
|
provider: IntegrationNames.BigCommerce,
|
|
2536
2537
|
product: IntegrationDisplayNames.BigCommerce,
|
|
@@ -2653,7 +2654,9 @@ var bigCommerceTaskConfigs = {
|
|
|
2653
2654
|
["BIGCOMMERCE_CREATE_CUSTOMER" /* CreateCustomer */]: {
|
|
2654
2655
|
key: "BIGCOMMERCE_CREATE_CUSTOMER" /* CreateCustomer */,
|
|
2655
2656
|
type: WorkflowDefinitionTaskType2.http,
|
|
2656
|
-
url: `${
|
|
2657
|
+
url: `${getWorkflowsEnv(
|
|
2658
|
+
"workflowsApiUr"
|
|
2659
|
+
)}/functions/create-bigcommerce-customer`,
|
|
2657
2660
|
customization: {
|
|
2658
2661
|
provider: IntegrationNames.BigCommerce,
|
|
2659
2662
|
product: IntegrationDisplayNames.BigCommerce,
|
|
@@ -2686,7 +2689,9 @@ var bigCommerceTaskConfigs = {
|
|
|
2686
2689
|
["BIGCOMMERCE_UPDATE_CUSTOMER" /* UpdateCustomer */]: {
|
|
2687
2690
|
key: "BIGCOMMERCE_UPDATE_CUSTOMER" /* UpdateCustomer */,
|
|
2688
2691
|
type: WorkflowDefinitionTaskType2.http,
|
|
2689
|
-
url: `${
|
|
2692
|
+
url: `${getWorkflowsEnv(
|
|
2693
|
+
"workflowsApiUr"
|
|
2694
|
+
)}/functions/update-bigcommerce-customer`,
|
|
2690
2695
|
customization: {
|
|
2691
2696
|
provider: IntegrationNames.BigCommerce,
|
|
2692
2697
|
product: IntegrationDisplayNames.BigCommerce,
|
|
@@ -2717,7 +2722,9 @@ var bigCommerceTaskConfigs = {
|
|
|
2717
2722
|
["BIGCOMMERCE_CREATE_PRODUCT" /* CreateProduct */]: {
|
|
2718
2723
|
key: "BIGCOMMERCE_CREATE_PRODUCT" /* CreateProduct */,
|
|
2719
2724
|
type: WorkflowDefinitionTaskType2.http,
|
|
2720
|
-
url: `${
|
|
2725
|
+
url: `${getWorkflowsEnv(
|
|
2726
|
+
"workflowsApiUr"
|
|
2727
|
+
)}/functions/create-bigcommerce-product`,
|
|
2721
2728
|
customization: {
|
|
2722
2729
|
provider: IntegrationNames.BigCommerce,
|
|
2723
2730
|
product: IntegrationDisplayNames.BigCommerce,
|
|
@@ -2747,7 +2754,9 @@ var bigCommerceTaskConfigs = {
|
|
|
2747
2754
|
["BIGCOMMERCE_CREATE_CUSTOMER_ADDRESS" /* CreateCustomerAddress */]: {
|
|
2748
2755
|
key: "BIGCOMMERCE_CREATE_CUSTOMER_ADDRESS" /* CreateCustomerAddress */,
|
|
2749
2756
|
type: WorkflowDefinitionTaskType2.http,
|
|
2750
|
-
url: `${
|
|
2757
|
+
url: `${getWorkflowsEnv(
|
|
2758
|
+
"workflowsApiUr"
|
|
2759
|
+
)}/functions/create-bigcommerce-customer-address`,
|
|
2751
2760
|
customization: {
|
|
2752
2761
|
provider: IntegrationNames.BigCommerce,
|
|
2753
2762
|
product: IntegrationDisplayNames.BigCommerce,
|
|
@@ -2792,7 +2801,9 @@ var bigCommerceTaskConfigs = {
|
|
|
2792
2801
|
["BIGCOMMERCE_GET_CUSTOMER" /* GetCustomer */]: {
|
|
2793
2802
|
key: "BIGCOMMERCE_GET_CUSTOMER" /* GetCustomer */,
|
|
2794
2803
|
type: WorkflowDefinitionTaskType2.http,
|
|
2795
|
-
url: `${
|
|
2804
|
+
url: `${getWorkflowsEnv(
|
|
2805
|
+
"workflowsApiUr"
|
|
2806
|
+
)}/functions/get-bigcommerce-customer`,
|
|
2796
2807
|
customization: {
|
|
2797
2808
|
provider: IntegrationNames.BigCommerce,
|
|
2798
2809
|
product: IntegrationDisplayNames.BigCommerce,
|
|
@@ -2825,7 +2836,9 @@ var bigCommerceTaskConfigs = {
|
|
|
2825
2836
|
["BIGCOMMERCE_GET_CUSTOMER_ADDRESSES" /* GetCustomerAddresses */]: {
|
|
2826
2837
|
key: "BIGCOMMERCE_GET_CUSTOMER_ADDRESSES" /* GetCustomerAddresses */,
|
|
2827
2838
|
type: WorkflowDefinitionTaskType2.http,
|
|
2828
|
-
url: `${
|
|
2839
|
+
url: `${getWorkflowsEnv(
|
|
2840
|
+
"workflowsApiUr"
|
|
2841
|
+
)}/functions/get-bigcommerce-customer-address`,
|
|
2829
2842
|
customization: {
|
|
2830
2843
|
provider: IntegrationNames.BigCommerce,
|
|
2831
2844
|
product: IntegrationDisplayNames.BigCommerce,
|
|
@@ -2857,7 +2870,9 @@ var bigCommerceTaskConfigs = {
|
|
|
2857
2870
|
["BIGCOMMERCE_GET_PRODUCTS" /* GetProducts */]: {
|
|
2858
2871
|
key: "BIGCOMMERCE_GET_PRODUCTS" /* GetProducts */,
|
|
2859
2872
|
type: WorkflowDefinitionTaskType2.http,
|
|
2860
|
-
url: `${
|
|
2873
|
+
url: `${getWorkflowsEnv(
|
|
2874
|
+
"workflowsApiUr"
|
|
2875
|
+
)}/functions/get-bigcommerce-products`,
|
|
2861
2876
|
customization: {
|
|
2862
2877
|
provider: IntegrationNames.BigCommerce,
|
|
2863
2878
|
product: IntegrationDisplayNames.BigCommerce,
|
|
@@ -2876,14 +2891,16 @@ var bigCommerceTaskConfigs = {
|
|
|
2876
2891
|
})
|
|
2877
2892
|
}
|
|
2878
2893
|
}
|
|
2879
|
-
};
|
|
2880
|
-
var bigCommerceTaskTemplates = {
|
|
2894
|
+
});
|
|
2895
|
+
var bigCommerceTaskTemplates = () => ({
|
|
2881
2896
|
["BIGCOMMERCE_CREATE_BLOG_POST" /* CreateBlogPost */]: __spreadProps(__spreadValues({}, workflowHttpTask), {
|
|
2882
2897
|
name: "BIGCOMMERCE_CREATE_BLOG_POST" /* CreateBlogPost */,
|
|
2883
2898
|
taskReferenceName: "bigcommerce_create_blog_post",
|
|
2884
2899
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
2885
2900
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
2886
|
-
uri: `${
|
|
2901
|
+
uri: `${getWorkflowsEnv(
|
|
2902
|
+
"workflowsApiUr"
|
|
2903
|
+
)}/functions/create-bigcommerce-blog-post`,
|
|
2887
2904
|
method: "POST",
|
|
2888
2905
|
body: {
|
|
2889
2906
|
title: "Blog post title",
|
|
@@ -2902,7 +2919,9 @@ var bigCommerceTaskTemplates = {
|
|
|
2902
2919
|
taskReferenceName: "bigcommerce_create_customer",
|
|
2903
2920
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
2904
2921
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
2905
|
-
uri: `${
|
|
2922
|
+
uri: `${getWorkflowsEnv(
|
|
2923
|
+
"workflowsApiUr"
|
|
2924
|
+
)}/functions/create-bigcommerce-customer`,
|
|
2906
2925
|
method: "POST",
|
|
2907
2926
|
body: {
|
|
2908
2927
|
first_name: "#{first_name}",
|
|
@@ -2922,7 +2941,9 @@ var bigCommerceTaskTemplates = {
|
|
|
2922
2941
|
taskReferenceName: "bigcommerce_update_customer",
|
|
2923
2942
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
2924
2943
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
2925
|
-
uri: `${
|
|
2944
|
+
uri: `${getWorkflowsEnv(
|
|
2945
|
+
"workflowsApiUr"
|
|
2946
|
+
)}/functions/update-bigcommerce-customer`,
|
|
2926
2947
|
method: "PATCH",
|
|
2927
2948
|
body: {
|
|
2928
2949
|
id: "#{customer_id}"
|
|
@@ -2940,7 +2961,9 @@ var bigCommerceTaskTemplates = {
|
|
|
2940
2961
|
taskReferenceName: "bigcommerce_create_product",
|
|
2941
2962
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
2942
2963
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
2943
|
-
uri: `${
|
|
2964
|
+
uri: `${getWorkflowsEnv(
|
|
2965
|
+
"workflowsApiUr"
|
|
2966
|
+
)}/functions/create-bigcommerce-product`,
|
|
2944
2967
|
method: "POST",
|
|
2945
2968
|
body: {
|
|
2946
2969
|
name: "Product name",
|
|
@@ -2961,7 +2984,9 @@ var bigCommerceTaskTemplates = {
|
|
|
2961
2984
|
taskReferenceName: "bigcommerce_create_customer_address",
|
|
2962
2985
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
2963
2986
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
2964
|
-
uri: `${
|
|
2987
|
+
uri: `${getWorkflowsEnv(
|
|
2988
|
+
"workflowsApiUr"
|
|
2989
|
+
)}/functions/create-bigcommerce-customer-address`,
|
|
2965
2990
|
method: "POST",
|
|
2966
2991
|
body: {
|
|
2967
2992
|
customer_id: "#{customer_id}",
|
|
@@ -2989,7 +3014,9 @@ var bigCommerceTaskTemplates = {
|
|
|
2989
3014
|
taskReferenceName: "bigcommerce_get_customer",
|
|
2990
3015
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
2991
3016
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
2992
|
-
uri: `${
|
|
3017
|
+
uri: `${getWorkflowsEnv(
|
|
3018
|
+
"workflowsApiUr"
|
|
3019
|
+
)}/functions/get-bigcommerce-customer?customer_id=#{customer_id}&customer_email=#{customer_email}`,
|
|
2993
3020
|
method: "GET",
|
|
2994
3021
|
headers: {
|
|
2995
3022
|
Accept: "application/json",
|
|
@@ -3004,7 +3031,9 @@ var bigCommerceTaskTemplates = {
|
|
|
3004
3031
|
taskReferenceName: "bigcommerce_get_customer_addresses",
|
|
3005
3032
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
3006
3033
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
3007
|
-
uri: `${
|
|
3034
|
+
uri: `${getWorkflowsEnv(
|
|
3035
|
+
"workflowsApiUr"
|
|
3036
|
+
)}/functions/get-bigcommerce-customer-addresses?customer_id=#{customer_id}`,
|
|
3008
3037
|
method: "GET",
|
|
3009
3038
|
headers: {
|
|
3010
3039
|
Accept: "application/json",
|
|
@@ -3019,7 +3048,9 @@ var bigCommerceTaskTemplates = {
|
|
|
3019
3048
|
taskReferenceName: "bigcommerce_get_products",
|
|
3020
3049
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
3021
3050
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
3022
|
-
uri: `${
|
|
3051
|
+
uri: `${getWorkflowsEnv(
|
|
3052
|
+
"workflowsApiUr"
|
|
3053
|
+
)}/functions/get-bigcommerce-products?limit=200&page=1`,
|
|
3023
3054
|
method: "GET",
|
|
3024
3055
|
headers: {
|
|
3025
3056
|
Accept: "application/json",
|
|
@@ -3029,7 +3060,7 @@ var bigCommerceTaskTemplates = {
|
|
|
3029
3060
|
})
|
|
3030
3061
|
})
|
|
3031
3062
|
})
|
|
3032
|
-
};
|
|
3063
|
+
});
|
|
3033
3064
|
var BigCommerceTriggerNames = {
|
|
3034
3065
|
CartCreated: `${IntegrationNames.BigCommerce}-${BigCommerceEventNames.CartCreated}`,
|
|
3035
3066
|
CartUpdated: `${IntegrationNames.BigCommerce}-${BigCommerceEventNames.CartUpdated}`,
|
|
@@ -3038,7 +3069,7 @@ var BigCommerceTriggerNames = {
|
|
|
3038
3069
|
ProductCreated: `${IntegrationNames.BigCommerce}-${BigCommerceEventNames.ProductCreated}`,
|
|
3039
3070
|
ProductUpdated: `${IntegrationNames.BigCommerce}-${BigCommerceEventNames.ProductUpdated}`
|
|
3040
3071
|
};
|
|
3041
|
-
var bigcommerceTriggerConfigs = {
|
|
3072
|
+
var bigcommerceTriggerConfigs = () => ({
|
|
3042
3073
|
[BigCommerceTriggerNames.CartCreated]: {
|
|
3043
3074
|
key: BigCommerceTriggerNames.CartCreated,
|
|
3044
3075
|
name: BigCommerceEventNames.CartCreated,
|
|
@@ -3195,8 +3226,8 @@ var bigcommerceTriggerConfigs = {
|
|
|
3195
3226
|
}
|
|
3196
3227
|
}
|
|
3197
3228
|
}
|
|
3198
|
-
};
|
|
3199
|
-
var bigcommerceTriggerTemplates = {
|
|
3229
|
+
});
|
|
3230
|
+
var bigcommerceTriggerTemplates = () => ({
|
|
3200
3231
|
[BigCommerceTriggerNames.CartCreated]: {
|
|
3201
3232
|
type: "webhook",
|
|
3202
3233
|
webhook: {
|
|
@@ -3299,14 +3330,13 @@ var bigcommerceTriggerTemplates = {
|
|
|
3299
3330
|
}
|
|
3300
3331
|
}
|
|
3301
3332
|
}
|
|
3302
|
-
};
|
|
3333
|
+
});
|
|
3303
3334
|
|
|
3304
3335
|
// src/views/Flows/Definitions/Mocks/HelpDesk/index.ts
|
|
3305
3336
|
import {
|
|
3306
3337
|
IntegrationNames as IntegrationNames2,
|
|
3307
3338
|
WorkflowDefinitionTaskType as WorkflowDefinitionTaskType3
|
|
3308
3339
|
} from "@livechat/developer-studio-api";
|
|
3309
|
-
var config3 = getWorkflowsConfig();
|
|
3310
3340
|
var helpdeskTicketResponse = WORKFLOW_HTTP_TASK_OUTPUT_SCHEMA({
|
|
3311
3341
|
type: "object",
|
|
3312
3342
|
properties: {
|
|
@@ -3459,11 +3489,13 @@ var helpdeskTicketInput = {
|
|
|
3459
3489
|
title: "Transaction ID"
|
|
3460
3490
|
}
|
|
3461
3491
|
};
|
|
3462
|
-
var helpdeskTaskConfigs = {
|
|
3492
|
+
var helpdeskTaskConfigs = () => ({
|
|
3463
3493
|
["HELPDESK_ADD_FOLLOWERS_TO_TICKET" /* AddFollowersToTicket */]: {
|
|
3464
3494
|
key: "HELPDESK_ADD_FOLLOWERS_TO_TICKET" /* AddFollowersToTicket */,
|
|
3465
3495
|
type: WorkflowDefinitionTaskType3.http,
|
|
3466
|
-
url: `${
|
|
3496
|
+
url: `${getWorkflowsEnv(
|
|
3497
|
+
"workflowsApiUr"
|
|
3498
|
+
)}/functions/add-followers-to-helpdesk-ticket`,
|
|
3467
3499
|
customization: {
|
|
3468
3500
|
provider: `${IntegrationNames2.Text}-${PRODUCT_TYPE.HD}`,
|
|
3469
3501
|
product: PRODUCT_NAMES.helpdesk,
|
|
@@ -3498,7 +3530,9 @@ var helpdeskTaskConfigs = {
|
|
|
3498
3530
|
["HELPDESK_ADD_TAGS_TO_TICKET" /* AddTagsToTicket */]: {
|
|
3499
3531
|
key: "HELPDESK_ADD_TAGS_TO_TICKET" /* AddTagsToTicket */,
|
|
3500
3532
|
type: WorkflowDefinitionTaskType3.http,
|
|
3501
|
-
url: `${
|
|
3533
|
+
url: `${getWorkflowsEnv(
|
|
3534
|
+
"workflowsApiUr"
|
|
3535
|
+
)}/functions/add-tags-to-helpdesk-ticket`,
|
|
3502
3536
|
customization: {
|
|
3503
3537
|
provider: `${IntegrationNames2.Text}-${PRODUCT_TYPE.HD}`,
|
|
3504
3538
|
product: PRODUCT_NAMES.helpdesk,
|
|
@@ -3532,7 +3566,9 @@ var helpdeskTaskConfigs = {
|
|
|
3532
3566
|
["HELPDESK_CREATE_TICKET" /* CreateTicket */]: {
|
|
3533
3567
|
key: "HELPDESK_CREATE_TICKET" /* CreateTicket */,
|
|
3534
3568
|
type: WorkflowDefinitionTaskType3.http,
|
|
3535
|
-
url: `${
|
|
3569
|
+
url: `${getWorkflowsEnv(
|
|
3570
|
+
"workflowsApiUr"
|
|
3571
|
+
)}/functions/create-helpdesk-ticket`,
|
|
3536
3572
|
customization: {
|
|
3537
3573
|
provider: `${IntegrationNames2.Text}-${PRODUCT_TYPE.HD}`,
|
|
3538
3574
|
product: PRODUCT_NAMES.helpdesk,
|
|
@@ -3553,7 +3589,9 @@ var helpdeskTaskConfigs = {
|
|
|
3553
3589
|
["HELPDESK_CREATE_TRANSACTION" /* CreateTransaction */]: {
|
|
3554
3590
|
type: WorkflowDefinitionTaskType3.http,
|
|
3555
3591
|
key: "HELPDESK_CREATE_TRANSACTION" /* CreateTransaction */,
|
|
3556
|
-
url: `${
|
|
3592
|
+
url: `${getWorkflowsEnv(
|
|
3593
|
+
"workflowsApiUr"
|
|
3594
|
+
)}/functions/create-helpdesk-transaction`,
|
|
3557
3595
|
customization: {
|
|
3558
3596
|
provider: `${IntegrationNames2.Text}-${PRODUCT_TYPE.HD}`,
|
|
3559
3597
|
product: PRODUCT_NAMES.helpdesk,
|
|
@@ -3640,7 +3678,7 @@ var helpdeskTaskConfigs = {
|
|
|
3640
3678
|
["HELPDESK_FIND_TICKET" /* FindTicket */]: {
|
|
3641
3679
|
key: "HELPDESK_FIND_TICKET" /* FindTicket */,
|
|
3642
3680
|
type: WorkflowDefinitionTaskType3.http,
|
|
3643
|
-
url: `${
|
|
3681
|
+
url: `${getWorkflowsEnv("workflowsApiUr")}/functions/find-helpdesk-ticket`,
|
|
3644
3682
|
customization: {
|
|
3645
3683
|
provider: `${IntegrationNames2.Text}-${PRODUCT_TYPE.HD}`,
|
|
3646
3684
|
product: PRODUCT_NAMES.helpdesk,
|
|
@@ -3667,7 +3705,9 @@ var helpdeskTaskConfigs = {
|
|
|
3667
3705
|
["HELPDESK_UPDATE_TICKET" /* UpdateTicket */]: {
|
|
3668
3706
|
key: "HELPDESK_UPDATE_TICKET" /* UpdateTicket */,
|
|
3669
3707
|
type: WorkflowDefinitionTaskType3.http,
|
|
3670
|
-
url: `${
|
|
3708
|
+
url: `${getWorkflowsEnv(
|
|
3709
|
+
"workflowsApiUr"
|
|
3710
|
+
)}/functions/update-helpdesk-ticket`,
|
|
3671
3711
|
customization: {
|
|
3672
3712
|
provider: `${IntegrationNames2.Text}-${PRODUCT_TYPE.HD}`,
|
|
3673
3713
|
product: PRODUCT_NAMES.helpdesk,
|
|
@@ -3698,14 +3738,16 @@ var helpdeskTaskConfigs = {
|
|
|
3698
3738
|
output: helpdeskTicketResponse
|
|
3699
3739
|
}
|
|
3700
3740
|
}
|
|
3701
|
-
};
|
|
3702
|
-
var helpdeskTaskTemplates = {
|
|
3741
|
+
});
|
|
3742
|
+
var helpdeskTaskTemplates = () => ({
|
|
3703
3743
|
["HELPDESK_CREATE_TICKET" /* CreateTicket */]: __spreadProps(__spreadValues({}, workflowHttpTask), {
|
|
3704
3744
|
name: "HELPDESK_CREATE_TICKET" /* CreateTicket */,
|
|
3705
3745
|
taskReferenceName: "helpdesk_create_ticket",
|
|
3706
3746
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
3707
3747
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
3708
|
-
uri: `${
|
|
3748
|
+
uri: `${getWorkflowsEnv(
|
|
3749
|
+
"workflowsApiUr"
|
|
3750
|
+
)}/functions/create-helpdesk-ticket`,
|
|
3709
3751
|
method: "POST",
|
|
3710
3752
|
body: {
|
|
3711
3753
|
requester: {
|
|
@@ -3729,7 +3771,9 @@ var helpdeskTaskTemplates = {
|
|
|
3729
3771
|
taskReferenceName: "helpdesk_add_followers_to_ticket",
|
|
3730
3772
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
3731
3773
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
3732
|
-
uri: `${
|
|
3774
|
+
uri: `${getWorkflowsEnv(
|
|
3775
|
+
"workflowsApiUr"
|
|
3776
|
+
)}/functions/add-followers-to-helpdesk-ticket`,
|
|
3733
3777
|
method: "POST",
|
|
3734
3778
|
body: {
|
|
3735
3779
|
id: "#{id}",
|
|
@@ -3747,7 +3791,9 @@ var helpdeskTaskTemplates = {
|
|
|
3747
3791
|
taskReferenceName: "helpdesk_add_tags_to_ticket",
|
|
3748
3792
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
3749
3793
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
3750
|
-
uri: `${
|
|
3794
|
+
uri: `${getWorkflowsEnv(
|
|
3795
|
+
"workflowsApiUr"
|
|
3796
|
+
)}/functions/add-tags-to-helpdesk-ticket`,
|
|
3751
3797
|
method: "POST",
|
|
3752
3798
|
body: {
|
|
3753
3799
|
id: "#{id}",
|
|
@@ -3765,7 +3811,9 @@ var helpdeskTaskTemplates = {
|
|
|
3765
3811
|
taskReferenceName: "helpdesk_create_transaction",
|
|
3766
3812
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
3767
3813
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
3768
|
-
uri: `${
|
|
3814
|
+
uri: `${getWorkflowsEnv(
|
|
3815
|
+
"workflowsApiUr"
|
|
3816
|
+
)}/functions/create-helpdesk-transaction`,
|
|
3769
3817
|
method: "POST",
|
|
3770
3818
|
body: {
|
|
3771
3819
|
ticketID: "#{ticket_id}",
|
|
@@ -3783,7 +3831,9 @@ var helpdeskTaskTemplates = {
|
|
|
3783
3831
|
taskReferenceName: "helpdesk_find_ticket",
|
|
3784
3832
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
3785
3833
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
3786
|
-
uri: `${
|
|
3834
|
+
uri: `${getWorkflowsEnv(
|
|
3835
|
+
"workflowsApiUr"
|
|
3836
|
+
)}/functions/find-helpdesk-ticket?id=#{ticket_id}`,
|
|
3787
3837
|
method: "GET",
|
|
3788
3838
|
headers: {
|
|
3789
3839
|
Accept: "application/json",
|
|
@@ -3797,7 +3847,9 @@ var helpdeskTaskTemplates = {
|
|
|
3797
3847
|
taskReferenceName: "helpdesk_update_ticket",
|
|
3798
3848
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
3799
3849
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
3800
|
-
uri: `${
|
|
3850
|
+
uri: `${getWorkflowsEnv(
|
|
3851
|
+
"workflowsApiUr"
|
|
3852
|
+
)}/functions/update-helpdesk-ticket?id=#{ticket_id}`,
|
|
3801
3853
|
method: "PATCH",
|
|
3802
3854
|
headers: {
|
|
3803
3855
|
Accept: "application/json",
|
|
@@ -3806,7 +3858,7 @@ var helpdeskTaskTemplates = {
|
|
|
3806
3858
|
})
|
|
3807
3859
|
})
|
|
3808
3860
|
})
|
|
3809
|
-
};
|
|
3861
|
+
});
|
|
3810
3862
|
|
|
3811
3863
|
// src/views/Flows/Definitions/Mocks/HubSpot/index.ts
|
|
3812
3864
|
import {
|
|
@@ -3815,7 +3867,6 @@ import {
|
|
|
3815
3867
|
IntegrationNames as IntegrationNames3,
|
|
3816
3868
|
WorkflowDefinitionTaskType as WorkflowDefinitionTaskType4
|
|
3817
3869
|
} from "@livechat/developer-studio-api";
|
|
3818
|
-
var config4 = getWorkflowsConfig();
|
|
3819
3870
|
var hubspotContactProperties = {
|
|
3820
3871
|
company: {
|
|
3821
3872
|
type: "string",
|
|
@@ -3849,11 +3900,13 @@ var hubspotContactBody = {
|
|
|
3849
3900
|
properties: hubspotContactProperties
|
|
3850
3901
|
}
|
|
3851
3902
|
};
|
|
3852
|
-
var hubspotTaskConfigs = {
|
|
3903
|
+
var hubspotTaskConfigs = () => ({
|
|
3853
3904
|
["HUBSPOT_CREATE_CONTACT" /* CreateContact */]: {
|
|
3854
3905
|
key: "HUBSPOT_CREATE_CONTACT" /* CreateContact */,
|
|
3855
3906
|
type: WorkflowDefinitionTaskType4.http,
|
|
3856
|
-
url: `${
|
|
3907
|
+
url: `${getWorkflowsEnv(
|
|
3908
|
+
"workflowsApiUr"
|
|
3909
|
+
)}/functions/create-hubspot-contact`,
|
|
3857
3910
|
customization: {
|
|
3858
3911
|
provider: IntegrationNames3.HubSpot,
|
|
3859
3912
|
product: IntegrationDisplayNames2.HubSpot,
|
|
@@ -3878,7 +3931,7 @@ var hubspotTaskConfigs = {
|
|
|
3878
3931
|
// [HubSpotTaskNames.DeleteContact]: {
|
|
3879
3932
|
// key: HubSpotTaskNames.DeleteContact,
|
|
3880
3933
|
// type: WorkflowDefinitionTaskType.http,
|
|
3881
|
-
// url: `${
|
|
3934
|
+
// url: `${getWorkflowsEnv("workflowsApiUr")}/functions/delete-hubspot-contact`,
|
|
3882
3935
|
// customization: {
|
|
3883
3936
|
// provider: IntegrationNames.HubSpot,
|
|
3884
3937
|
// product: IntegrationDisplayNames.HubSpot,
|
|
@@ -3903,7 +3956,7 @@ var hubspotTaskConfigs = {
|
|
|
3903
3956
|
["HUBSPOT_GET_CONTACT" /* GetContact */]: {
|
|
3904
3957
|
key: "HUBSPOT_GET_CONTACT" /* GetContact */,
|
|
3905
3958
|
type: WorkflowDefinitionTaskType4.http,
|
|
3906
|
-
url: `${
|
|
3959
|
+
url: `${getWorkflowsEnv("workflowsApiUr")}/functions/get-hubspot-contact`,
|
|
3907
3960
|
customization: {
|
|
3908
3961
|
provider: IntegrationNames3.HubSpot,
|
|
3909
3962
|
product: IntegrationDisplayNames2.HubSpot,
|
|
@@ -3932,7 +3985,9 @@ var hubspotTaskConfigs = {
|
|
|
3932
3985
|
["HUBSPOT_UPDATE_CONTACT" /* UpdateContact */]: {
|
|
3933
3986
|
key: "HUBSPOT_UPDATE_CONTACT" /* UpdateContact */,
|
|
3934
3987
|
type: WorkflowDefinitionTaskType4.http,
|
|
3935
|
-
url: `${
|
|
3988
|
+
url: `${getWorkflowsEnv(
|
|
3989
|
+
"workflowsApiUr"
|
|
3990
|
+
)}/functions/update-hubspot-contact`,
|
|
3936
3991
|
customization: {
|
|
3937
3992
|
provider: IntegrationNames3.HubSpot,
|
|
3938
3993
|
product: IntegrationDisplayNames2.HubSpot,
|
|
@@ -3965,14 +4020,16 @@ var hubspotTaskConfigs = {
|
|
|
3965
4020
|
})
|
|
3966
4021
|
}
|
|
3967
4022
|
}
|
|
3968
|
-
};
|
|
3969
|
-
var hubspotTaskTemplates = {
|
|
4023
|
+
});
|
|
4024
|
+
var hubspotTaskTemplates = () => ({
|
|
3970
4025
|
["HUBSPOT_CREATE_CONTACT" /* CreateContact */]: __spreadProps(__spreadValues({}, workflowHttpTask), {
|
|
3971
4026
|
name: "HUBSPOT_CREATE_CONTACT" /* CreateContact */,
|
|
3972
4027
|
taskReferenceName: "hubspot_create_contact",
|
|
3973
4028
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
3974
4029
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
3975
|
-
uri: `${
|
|
4030
|
+
uri: `${getWorkflowsEnv(
|
|
4031
|
+
"workflowsApiUr"
|
|
4032
|
+
)}/functions/create-hubspot-contact`,
|
|
3976
4033
|
method: "POST",
|
|
3977
4034
|
body: {
|
|
3978
4035
|
properties: {
|
|
@@ -3996,7 +4053,7 @@ var hubspotTaskTemplates = {
|
|
|
3996
4053
|
// ...workflowHttpTask.inputParameters,
|
|
3997
4054
|
// http_request: {
|
|
3998
4055
|
// ...workflowHttpTask.inputParameters.http_request,
|
|
3999
|
-
// uri: `${
|
|
4056
|
+
// uri: `${getWorkflowsEnv("workflowsApiUr")}/functions/delete-hubspot-contact?contactId=#{contactId}`,
|
|
4000
4057
|
// method: 'DELETE',
|
|
4001
4058
|
// headers: {
|
|
4002
4059
|
// Accept: 'application/json',
|
|
@@ -4010,7 +4067,9 @@ var hubspotTaskTemplates = {
|
|
|
4010
4067
|
taskReferenceName: "hubspot_get_contact",
|
|
4011
4068
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
4012
4069
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
4013
|
-
uri: `${
|
|
4070
|
+
uri: `${getWorkflowsEnv(
|
|
4071
|
+
"workflowsApiUr"
|
|
4072
|
+
)}/functions/get-hubspot-contact?contactId=#{contactId}`,
|
|
4014
4073
|
method: "GET",
|
|
4015
4074
|
headers: {
|
|
4016
4075
|
Accept: "application/json",
|
|
@@ -4024,7 +4083,9 @@ var hubspotTaskTemplates = {
|
|
|
4024
4083
|
taskReferenceName: "hubspot_update_contact",
|
|
4025
4084
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
4026
4085
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
4027
|
-
uri: `${
|
|
4086
|
+
uri: `${getWorkflowsEnv(
|
|
4087
|
+
"workflowsApiUr"
|
|
4088
|
+
)}/functions/update-hubspot-contact?contactId=#{contactId}`,
|
|
4028
4089
|
method: "PATCH",
|
|
4029
4090
|
body: {
|
|
4030
4091
|
properties: {
|
|
@@ -4040,12 +4101,12 @@ var hubspotTaskTemplates = {
|
|
|
4040
4101
|
})
|
|
4041
4102
|
})
|
|
4042
4103
|
})
|
|
4043
|
-
};
|
|
4104
|
+
});
|
|
4044
4105
|
var HubSpotTriggerNames = {
|
|
4045
4106
|
ContactCreated: `${IntegrationNames3.HubSpot}-${HubspotEventNames.ContactCreated}`,
|
|
4046
4107
|
ContactDeleted: `${IntegrationNames3.HubSpot}-${HubspotEventNames.ContactDeleted}`
|
|
4047
4108
|
};
|
|
4048
|
-
var hubspotTriggerConfigs = {
|
|
4109
|
+
var hubspotTriggerConfigs = () => ({
|
|
4049
4110
|
[HubSpotTriggerNames.ContactCreated]: {
|
|
4050
4111
|
key: HubSpotTriggerNames.ContactCreated,
|
|
4051
4112
|
name: HubspotEventNames.ContactCreated,
|
|
@@ -4084,8 +4145,8 @@ var hubspotTriggerConfigs = {
|
|
|
4084
4145
|
}
|
|
4085
4146
|
}
|
|
4086
4147
|
}
|
|
4087
|
-
};
|
|
4088
|
-
var hubSpotTriggerTemplates = {
|
|
4148
|
+
});
|
|
4149
|
+
var hubSpotTriggerTemplates = () => ({
|
|
4089
4150
|
[HubSpotTriggerNames.ContactCreated]: {
|
|
4090
4151
|
type: "webhook",
|
|
4091
4152
|
webhook: {
|
|
@@ -4114,7 +4175,7 @@ var hubSpotTriggerTemplates = {
|
|
|
4114
4175
|
}
|
|
4115
4176
|
}
|
|
4116
4177
|
}
|
|
4117
|
-
};
|
|
4178
|
+
});
|
|
4118
4179
|
|
|
4119
4180
|
// src/views/Flows/Definitions/Mocks/LiveChat/index.ts
|
|
4120
4181
|
import {
|
|
@@ -4122,7 +4183,6 @@ import {
|
|
|
4122
4183
|
TextLivechatEventNames,
|
|
4123
4184
|
WorkflowDefinitionTaskType as WorkflowDefinitionTaskType5
|
|
4124
4185
|
} from "@livechat/developer-studio-api";
|
|
4125
|
-
var config5 = getWorkflowsConfig();
|
|
4126
4186
|
var webhookSpecs = {
|
|
4127
4187
|
new_chat: {
|
|
4128
4188
|
output: {
|
|
@@ -4687,11 +4747,13 @@ var webhookSpecs = {
|
|
|
4687
4747
|
}
|
|
4688
4748
|
}
|
|
4689
4749
|
};
|
|
4690
|
-
var livechatTaskConfigs = {
|
|
4750
|
+
var livechatTaskConfigs = () => ({
|
|
4691
4751
|
["LIVECHAT_TRANSFER_CHAT" /* TransferChat */]: {
|
|
4692
4752
|
key: "LIVECHAT_TRANSFER_CHAT" /* TransferChat */,
|
|
4693
4753
|
type: WorkflowDefinitionTaskType5.http,
|
|
4694
|
-
url: `${
|
|
4754
|
+
url: `${getWorkflowsEnv(
|
|
4755
|
+
"workflowsApiUr"
|
|
4756
|
+
)}/functions/transfer-livechat-chat`,
|
|
4695
4757
|
customization: {
|
|
4696
4758
|
provider: `${IntegrationNames4.Text}-${PRODUCT_TYPE.LC}`,
|
|
4697
4759
|
product: PRODUCT_NAMES.livechat,
|
|
@@ -4734,7 +4796,7 @@ var livechatTaskConfigs = {
|
|
|
4734
4796
|
["LIVECHAT_TAG_CHAT" /* TagChat */]: {
|
|
4735
4797
|
key: "LIVECHAT_TAG_CHAT" /* TagChat */,
|
|
4736
4798
|
type: WorkflowDefinitionTaskType5.http,
|
|
4737
|
-
url: `${
|
|
4799
|
+
url: `${getWorkflowsEnv("workflowsApiUr")}/functions/tag-livechat-chat`,
|
|
4738
4800
|
customization: {
|
|
4739
4801
|
provider: `${IntegrationNames4.Text}-${PRODUCT_TYPE.LC}`,
|
|
4740
4802
|
product: PRODUCT_NAMES.livechat,
|
|
@@ -4770,7 +4832,9 @@ var livechatTaskConfigs = {
|
|
|
4770
4832
|
["LIVECHAT_CHAT_TRANSCRIPT" /* GetChatTranscript */]: {
|
|
4771
4833
|
key: "LIVECHAT_CHAT_TRANSCRIPT" /* GetChatTranscript */,
|
|
4772
4834
|
type: WorkflowDefinitionTaskType5.http,
|
|
4773
|
-
url: `${
|
|
4835
|
+
url: `${getWorkflowsEnv(
|
|
4836
|
+
"workflowsApiUr"
|
|
4837
|
+
)}/functions/get-livechat-chat-transcript`,
|
|
4774
4838
|
customization: {
|
|
4775
4839
|
provider: `${IntegrationNames4.Text}-${PRODUCT_TYPE.LC}`,
|
|
4776
4840
|
product: PRODUCT_NAMES.livechat,
|
|
@@ -4819,7 +4883,9 @@ var livechatTaskConfigs = {
|
|
|
4819
4883
|
["LIVECHAT_SEND_MESSAGE" /* SendMessage */]: {
|
|
4820
4884
|
key: "LIVECHAT_SEND_MESSAGE" /* SendMessage */,
|
|
4821
4885
|
type: WorkflowDefinitionTaskType5.http,
|
|
4822
|
-
url: `${
|
|
4886
|
+
url: `${getWorkflowsEnv(
|
|
4887
|
+
"workflowsApiUr"
|
|
4888
|
+
)}/functions/send-livechat-agent-message`,
|
|
4823
4889
|
customization: {
|
|
4824
4890
|
provider: `${IntegrationNames4.Text}-${PRODUCT_TYPE.LC}`,
|
|
4825
4891
|
product: PRODUCT_NAMES.livechat,
|
|
@@ -4858,7 +4924,9 @@ var livechatTaskConfigs = {
|
|
|
4858
4924
|
["LIVECHAT_SUPERVISE_CHAT" /* SuperviseChat */]: {
|
|
4859
4925
|
key: "LIVECHAT_SUPERVISE_CHAT" /* SuperviseChat */,
|
|
4860
4926
|
type: WorkflowDefinitionTaskType5.http,
|
|
4861
|
-
url: `${
|
|
4927
|
+
url: `${getWorkflowsEnv(
|
|
4928
|
+
"workflowsApiUr"
|
|
4929
|
+
)}/functions/supervise-livechat-chat`,
|
|
4862
4930
|
customization: {
|
|
4863
4931
|
provider: `${IntegrationNames4.Text}-${PRODUCT_TYPE.LC}`,
|
|
4864
4932
|
product: PRODUCT_NAMES.livechat,
|
|
@@ -4884,14 +4952,14 @@ var livechatTaskConfigs = {
|
|
|
4884
4952
|
})
|
|
4885
4953
|
}
|
|
4886
4954
|
}
|
|
4887
|
-
};
|
|
4888
|
-
var livechatTaskTemplates = {
|
|
4955
|
+
});
|
|
4956
|
+
var livechatTaskTemplates = () => ({
|
|
4889
4957
|
["LIVECHAT_TAG_CHAT" /* TagChat */]: __spreadProps(__spreadValues({}, workflowHttpTask), {
|
|
4890
4958
|
name: "LIVECHAT_TAG_CHAT" /* TagChat */,
|
|
4891
4959
|
taskReferenceName: "livechat_tag_chat",
|
|
4892
4960
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
4893
4961
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
4894
|
-
uri: `${
|
|
4962
|
+
uri: `${getWorkflowsEnv("workflowsApiUr")}/functions/tag-livechat-chat`,
|
|
4895
4963
|
method: "POST",
|
|
4896
4964
|
body: {
|
|
4897
4965
|
chat_id: "#{chat_id}",
|
|
@@ -4910,7 +4978,9 @@ var livechatTaskTemplates = {
|
|
|
4910
4978
|
taskReferenceName: "livechat_transfer_chat",
|
|
4911
4979
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
4912
4980
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
4913
|
-
uri: `${
|
|
4981
|
+
uri: `${getWorkflowsEnv(
|
|
4982
|
+
"workflowsApiUr"
|
|
4983
|
+
)}/functions/transfer-livechat-chat`,
|
|
4914
4984
|
method: "POST",
|
|
4915
4985
|
body: {
|
|
4916
4986
|
chat_id: "#{chat_id}",
|
|
@@ -4929,7 +4999,9 @@ var livechatTaskTemplates = {
|
|
|
4929
4999
|
taskReferenceName: "livechat_get_chat_transcript",
|
|
4930
5000
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
4931
5001
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
4932
|
-
uri: `${
|
|
5002
|
+
uri: `${getWorkflowsEnv(
|
|
5003
|
+
"workflowsApiUr"
|
|
5004
|
+
)}/functions/get-livechat-chat-transcript?chat_id=#{chat_id}`,
|
|
4933
5005
|
method: "GET",
|
|
4934
5006
|
headers: {
|
|
4935
5007
|
Accept: "application/json",
|
|
@@ -4943,7 +5015,9 @@ var livechatTaskTemplates = {
|
|
|
4943
5015
|
taskReferenceName: "livechat_send_message",
|
|
4944
5016
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
4945
5017
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
4946
|
-
uri: `${
|
|
5018
|
+
uri: `${getWorkflowsEnv(
|
|
5019
|
+
"workflowsApiUr"
|
|
5020
|
+
)}/functions/send-livechat-agent-message`,
|
|
4947
5021
|
method: "POST",
|
|
4948
5022
|
body: {
|
|
4949
5023
|
chat_id: "#{chat_id}",
|
|
@@ -4962,7 +5036,9 @@ var livechatTaskTemplates = {
|
|
|
4962
5036
|
taskReferenceName: "livechat_supervise_chat",
|
|
4963
5037
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
4964
5038
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
4965
|
-
uri: `${
|
|
5039
|
+
uri: `${getWorkflowsEnv(
|
|
5040
|
+
"workflowsApiUr"
|
|
5041
|
+
)}/functions/supervise-livechat-chat`,
|
|
4966
5042
|
method: "POST",
|
|
4967
5043
|
body: {
|
|
4968
5044
|
chat_id: "#{chat_id}",
|
|
@@ -4975,7 +5051,7 @@ var livechatTaskTemplates = {
|
|
|
4975
5051
|
})
|
|
4976
5052
|
})
|
|
4977
5053
|
})
|
|
4978
|
-
};
|
|
5054
|
+
});
|
|
4979
5055
|
var TextLiveChatTriggerNames = {
|
|
4980
5056
|
ChatStarted: `${IntegrationNames4.Text}-${PRODUCT_TYPE.LC}-${TextLivechatEventNames.ChatStarted}`,
|
|
4981
5057
|
ChatEnded: `${IntegrationNames4.Text}-${PRODUCT_TYPE.LC}-${TextLivechatEventNames.ChatEnded}`,
|
|
@@ -4987,7 +5063,7 @@ var TextLiveChatTriggerNames = {
|
|
|
4987
5063
|
UserAddedToChat: `${IntegrationNames4.Text}-${PRODUCT_TYPE.LC}-${TextLivechatEventNames.UserAddedToChat}`,
|
|
4988
5064
|
UserRemovedFromChat: `${IntegrationNames4.Text}-${PRODUCT_TYPE.LC}-${TextLivechatEventNames.UserRemovedFromChat}`
|
|
4989
5065
|
};
|
|
4990
|
-
var livechatTriggerConfigs = {
|
|
5066
|
+
var livechatTriggerConfigs = () => ({
|
|
4991
5067
|
[TextLiveChatTriggerNames.ChatStarted]: {
|
|
4992
5068
|
key: TextLiveChatTriggerNames.ChatStarted,
|
|
4993
5069
|
name: TextLivechatEventNames.ChatStarted,
|
|
@@ -5149,8 +5225,8 @@ var livechatTriggerConfigs = {
|
|
|
5149
5225
|
output: webhookSpecs.chat_tagged.output
|
|
5150
5226
|
}
|
|
5151
5227
|
}
|
|
5152
|
-
};
|
|
5153
|
-
var livechatTriggerTemplates = {
|
|
5228
|
+
});
|
|
5229
|
+
var livechatTriggerTemplates = () => ({
|
|
5154
5230
|
[TextLiveChatTriggerNames.ChatEnded]: {
|
|
5155
5231
|
type: "webhook",
|
|
5156
5232
|
webhook: {
|
|
@@ -5263,7 +5339,7 @@ var livechatTriggerTemplates = {
|
|
|
5263
5339
|
}
|
|
5264
5340
|
}
|
|
5265
5341
|
}
|
|
5266
|
-
};
|
|
5342
|
+
});
|
|
5267
5343
|
|
|
5268
5344
|
// src/views/Flows/Definitions/Mocks/MailChimp/index.ts
|
|
5269
5345
|
import {
|
|
@@ -5272,7 +5348,6 @@ import {
|
|
|
5272
5348
|
MailchimpEventNames,
|
|
5273
5349
|
WorkflowDefinitionTaskType as WorkflowDefinitionTaskType6
|
|
5274
5350
|
} from "@livechat/developer-studio-api";
|
|
5275
|
-
var config6 = getWorkflowsConfig();
|
|
5276
5351
|
var mailchimpCampaignTrackingBody = {
|
|
5277
5352
|
type: "object",
|
|
5278
5353
|
required: ["opens", "html_clicks", "text_clicks"],
|
|
@@ -5455,11 +5530,13 @@ var webhookSpecs2 = {
|
|
|
5455
5530
|
}
|
|
5456
5531
|
}
|
|
5457
5532
|
};
|
|
5458
|
-
var mailchimpTaskConfigs = {
|
|
5533
|
+
var mailchimpTaskConfigs = () => ({
|
|
5459
5534
|
["MAILCHIMP_ADD_SUBSCRIBER" /* AddSubscriber */]: {
|
|
5460
5535
|
key: "MAILCHIMP_ADD_SUBSCRIBER" /* AddSubscriber */,
|
|
5461
5536
|
type: WorkflowDefinitionTaskType6.http,
|
|
5462
|
-
url: `${
|
|
5537
|
+
url: `${getWorkflowsEnv(
|
|
5538
|
+
"workflowsApiUr"
|
|
5539
|
+
)}/functions/add-mailchimp-subscriber`,
|
|
5463
5540
|
customization: {
|
|
5464
5541
|
provider: IntegrationNames5.Mailchimp,
|
|
5465
5542
|
product: IntegrationDisplayNames3.Mailchimp,
|
|
@@ -5502,7 +5579,9 @@ var mailchimpTaskConfigs = {
|
|
|
5502
5579
|
["MAILCHIMP_ADD_CAMPAIGN" /* AddCampaign */]: {
|
|
5503
5580
|
key: "MAILCHIMP_ADD_CAMPAIGN" /* AddCampaign */,
|
|
5504
5581
|
type: WorkflowDefinitionTaskType6.http,
|
|
5505
|
-
url: `${
|
|
5582
|
+
url: `${getWorkflowsEnv(
|
|
5583
|
+
"workflowsApiUr"
|
|
5584
|
+
)}/functions/add-mailchimp-campaign`,
|
|
5506
5585
|
customization: {
|
|
5507
5586
|
provider: IntegrationNames5.Mailchimp,
|
|
5508
5587
|
product: IntegrationDisplayNames3.Mailchimp,
|
|
@@ -5547,7 +5626,9 @@ var mailchimpTaskConfigs = {
|
|
|
5547
5626
|
["MAILCHIMP_SEND_CAMPAIGN" /* SendCampaign */]: {
|
|
5548
5627
|
key: "MAILCHIMP_SEND_CAMPAIGN" /* SendCampaign */,
|
|
5549
5628
|
type: WorkflowDefinitionTaskType6.http,
|
|
5550
|
-
url: `${
|
|
5629
|
+
url: `${getWorkflowsEnv(
|
|
5630
|
+
"workflowsApiUr"
|
|
5631
|
+
)}/functions/send-mailchimp-campaign`,
|
|
5551
5632
|
customization: {
|
|
5552
5633
|
provider: IntegrationNames5.Mailchimp,
|
|
5553
5634
|
product: IntegrationDisplayNames3.Mailchimp,
|
|
@@ -5578,7 +5659,9 @@ var mailchimpTaskConfigs = {
|
|
|
5578
5659
|
["MAILCHIMP_ADD_OR_UPDATE_SUBSCRIBER" /* AddOrUpdateSubscriber */]: {
|
|
5579
5660
|
key: "MAILCHIMP_ADD_OR_UPDATE_SUBSCRIBER" /* AddOrUpdateSubscriber */,
|
|
5580
5661
|
type: WorkflowDefinitionTaskType6.http,
|
|
5581
|
-
url: `${
|
|
5662
|
+
url: `${getWorkflowsEnv(
|
|
5663
|
+
"workflowsApiUr"
|
|
5664
|
+
)}/functions/add-or-update-mailchimp-subscriber`,
|
|
5582
5665
|
customization: {
|
|
5583
5666
|
provider: IntegrationNames5.Mailchimp,
|
|
5584
5667
|
product: IntegrationDisplayNames3.Mailchimp,
|
|
@@ -5626,7 +5709,9 @@ var mailchimpTaskConfigs = {
|
|
|
5626
5709
|
["MAILCHIMP_UPDATE_SUBSCRIBER" /* UpdateSubscriber */]: {
|
|
5627
5710
|
key: "MAILCHIMP_UPDATE_SUBSCRIBER" /* UpdateSubscriber */,
|
|
5628
5711
|
type: WorkflowDefinitionTaskType6.http,
|
|
5629
|
-
url: `${
|
|
5712
|
+
url: `${getWorkflowsEnv(
|
|
5713
|
+
"workflowsApiUr"
|
|
5714
|
+
)}/functions/update-mailchimp-subscriber`,
|
|
5630
5715
|
customization: {
|
|
5631
5716
|
provider: IntegrationNames5.Mailchimp,
|
|
5632
5717
|
product: IntegrationDisplayNames3.Mailchimp,
|
|
@@ -5674,7 +5759,9 @@ var mailchimpTaskConfigs = {
|
|
|
5674
5759
|
["MAILCHIMP_ARCHIVE_SUBSCRIBER" /* ArchiveSubscriber */]: {
|
|
5675
5760
|
key: "MAILCHIMP_ARCHIVE_SUBSCRIBER" /* ArchiveSubscriber */,
|
|
5676
5761
|
type: WorkflowDefinitionTaskType6.http,
|
|
5677
|
-
url: `${
|
|
5762
|
+
url: `${getWorkflowsEnv(
|
|
5763
|
+
"workflowsApiUr"
|
|
5764
|
+
)}/functions/archive-mailchimp-subscriber`,
|
|
5678
5765
|
customization: {
|
|
5679
5766
|
provider: IntegrationNames5.Mailchimp,
|
|
5680
5767
|
product: IntegrationDisplayNames3.Mailchimp,
|
|
@@ -5709,7 +5796,9 @@ var mailchimpTaskConfigs = {
|
|
|
5709
5796
|
["MAILCHIMP_DELETE_SUBSCRIBER" /* DeleteSubscriber */]: {
|
|
5710
5797
|
key: "MAILCHIMP_DELETE_SUBSCRIBER" /* DeleteSubscriber */,
|
|
5711
5798
|
type: WorkflowDefinitionTaskType6.http,
|
|
5712
|
-
url: `${
|
|
5799
|
+
url: `${getWorkflowsEnv(
|
|
5800
|
+
"workflowsApiUr"
|
|
5801
|
+
)}/functions/delete-mailchimp-subscriber`,
|
|
5713
5802
|
customization: {
|
|
5714
5803
|
provider: IntegrationNames5.Mailchimp,
|
|
5715
5804
|
product: IntegrationDisplayNames3.Mailchimp,
|
|
@@ -5744,7 +5833,9 @@ var mailchimpTaskConfigs = {
|
|
|
5744
5833
|
["MAILCHIMP_ADD_SUBSCRIBER_TAG" /* AddSubscriberTag */]: {
|
|
5745
5834
|
key: "MAILCHIMP_ADD_SUBSCRIBER_TAG" /* AddSubscriberTag */,
|
|
5746
5835
|
type: WorkflowDefinitionTaskType6.http,
|
|
5747
|
-
url: `${
|
|
5836
|
+
url: `${getWorkflowsEnv(
|
|
5837
|
+
"workflowsApiUr"
|
|
5838
|
+
)}/functions/add-mailchimp-subscriber-tag`,
|
|
5748
5839
|
customization: {
|
|
5749
5840
|
provider: IntegrationNames5.Mailchimp,
|
|
5750
5841
|
product: IntegrationDisplayNames3.Mailchimp,
|
|
@@ -5784,7 +5875,9 @@ var mailchimpTaskConfigs = {
|
|
|
5784
5875
|
["MAILCHIMP_ADD_SUBSCRIBER_EVENT" /* AddSubscriberEvent */]: {
|
|
5785
5876
|
key: "MAILCHIMP_ADD_SUBSCRIBER_EVENT" /* AddSubscriberEvent */,
|
|
5786
5877
|
type: WorkflowDefinitionTaskType6.http,
|
|
5787
|
-
url: `${
|
|
5878
|
+
url: `${getWorkflowsEnv(
|
|
5879
|
+
"workflowsApiUr"
|
|
5880
|
+
)}/functions/add-mailchimp-subscriber-event`,
|
|
5788
5881
|
customization: {
|
|
5789
5882
|
provider: IntegrationNames5.Mailchimp,
|
|
5790
5883
|
product: IntegrationDisplayNames3.Mailchimp,
|
|
@@ -5840,7 +5933,9 @@ var mailchimpTaskConfigs = {
|
|
|
5840
5933
|
["MAILCHIMP_ADD_SUBSCRIBER_NOTE" /* AddSubscriberNote */]: {
|
|
5841
5934
|
key: "MAILCHIMP_ADD_SUBSCRIBER_NOTE" /* AddSubscriberNote */,
|
|
5842
5935
|
type: WorkflowDefinitionTaskType6.http,
|
|
5843
|
-
url: `${
|
|
5936
|
+
url: `${getWorkflowsEnv(
|
|
5937
|
+
"workflowsApiUr"
|
|
5938
|
+
)}/functions/add-mailchimp-subscriber-note`,
|
|
5844
5939
|
customization: {
|
|
5845
5940
|
provider: IntegrationNames5.Mailchimp,
|
|
5846
5941
|
product: IntegrationDisplayNames3.Mailchimp,
|
|
@@ -5880,7 +5975,9 @@ var mailchimpTaskConfigs = {
|
|
|
5880
5975
|
["MAILCHIMP_DELETE_SUBSCRIBER_TAG" /* DeleteSubscriberTag */]: {
|
|
5881
5976
|
key: "MAILCHIMP_DELETE_SUBSCRIBER_TAG" /* DeleteSubscriberTag */,
|
|
5882
5977
|
type: WorkflowDefinitionTaskType6.http,
|
|
5883
|
-
url: `${
|
|
5978
|
+
url: `${getWorkflowsEnv(
|
|
5979
|
+
"workflowsApiUr"
|
|
5980
|
+
)}/functions/delete-mailchimp-subscriber-tag`,
|
|
5884
5981
|
customization: {
|
|
5885
5982
|
provider: IntegrationNames5.Mailchimp,
|
|
5886
5983
|
product: IntegrationDisplayNames3.Mailchimp,
|
|
@@ -5919,7 +6016,9 @@ var mailchimpTaskConfigs = {
|
|
|
5919
6016
|
["MAILCHIMP_GET_SUBSCRIBER_TAGS" /* GetSubscriberTags */]: {
|
|
5920
6017
|
key: "MAILCHIMP_GET_SUBSCRIBER_TAGS" /* GetSubscriberTags */,
|
|
5921
6018
|
type: WorkflowDefinitionTaskType6.http,
|
|
5922
|
-
url: `${
|
|
6019
|
+
url: `${getWorkflowsEnv(
|
|
6020
|
+
"workflowsApiUr"
|
|
6021
|
+
)}/functions/get-mailchimp-subscriber-tags`,
|
|
5923
6022
|
customization: {
|
|
5924
6023
|
provider: IntegrationNames5.Mailchimp,
|
|
5925
6024
|
product: IntegrationDisplayNames3.Mailchimp,
|
|
@@ -5984,7 +6083,9 @@ var mailchimpTaskConfigs = {
|
|
|
5984
6083
|
["MAILCHIMP_GET_SUBSCRIBER" /* GetSubscriber */]: {
|
|
5985
6084
|
key: "MAILCHIMP_GET_SUBSCRIBER" /* GetSubscriber */,
|
|
5986
6085
|
type: WorkflowDefinitionTaskType6.http,
|
|
5987
|
-
url: `${
|
|
6086
|
+
url: `${getWorkflowsEnv(
|
|
6087
|
+
"workflowsApiUr"
|
|
6088
|
+
)}/functions/get-mailchimp-subscriber`,
|
|
5988
6089
|
customization: {
|
|
5989
6090
|
provider: IntegrationNames5.Mailchimp,
|
|
5990
6091
|
product: IntegrationDisplayNames3.Mailchimp,
|
|
@@ -6159,7 +6260,9 @@ var mailchimpTaskConfigs = {
|
|
|
6159
6260
|
["MAILCHIMP_GET_SUBSCRIBERS" /* GetSubscribers */]: {
|
|
6160
6261
|
key: "MAILCHIMP_GET_SUBSCRIBERS" /* GetSubscribers */,
|
|
6161
6262
|
type: WorkflowDefinitionTaskType6.http,
|
|
6162
|
-
url: `${
|
|
6263
|
+
url: `${getWorkflowsEnv(
|
|
6264
|
+
"workflowsApiUr"
|
|
6265
|
+
)}/functions/find-mailchimp-subscribers`,
|
|
6163
6266
|
customization: {
|
|
6164
6267
|
provider: IntegrationNames5.Mailchimp,
|
|
6165
6268
|
product: IntegrationDisplayNames3.Mailchimp,
|
|
@@ -6335,7 +6438,9 @@ var mailchimpTaskConfigs = {
|
|
|
6335
6438
|
["MAILCHIMP_FIND_CAMPAIGN" /* FindCampaign */]: {
|
|
6336
6439
|
key: "MAILCHIMP_FIND_CAMPAIGN" /* FindCampaign */,
|
|
6337
6440
|
type: WorkflowDefinitionTaskType6.http,
|
|
6338
|
-
url: `${
|
|
6441
|
+
url: `${getWorkflowsEnv(
|
|
6442
|
+
"workflowsApiUr"
|
|
6443
|
+
)}/functions/find-mailchimp-campaign`,
|
|
6339
6444
|
customization: {
|
|
6340
6445
|
provider: IntegrationNames5.Mailchimp,
|
|
6341
6446
|
product: IntegrationDisplayNames3.Mailchimp,
|
|
@@ -6490,14 +6595,16 @@ var mailchimpTaskConfigs = {
|
|
|
6490
6595
|
})
|
|
6491
6596
|
}
|
|
6492
6597
|
}
|
|
6493
|
-
};
|
|
6494
|
-
var mailchimpTaskTemplates = {
|
|
6598
|
+
});
|
|
6599
|
+
var mailchimpTaskTemplates = () => ({
|
|
6495
6600
|
["MAILCHIMP_ADD_SUBSCRIBER" /* AddSubscriber */]: __spreadProps(__spreadValues({}, workflowHttpTask), {
|
|
6496
6601
|
name: "MAILCHIMP_ADD_SUBSCRIBER" /* AddSubscriber */,
|
|
6497
6602
|
taskReferenceName: "mailchimp_add_contact",
|
|
6498
6603
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
6499
6604
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
6500
|
-
uri: `${
|
|
6605
|
+
uri: `${getWorkflowsEnv(
|
|
6606
|
+
"workflowsApiUr"
|
|
6607
|
+
)}/functions/add-mailchimp-subscriber`,
|
|
6501
6608
|
method: "POST",
|
|
6502
6609
|
body: {
|
|
6503
6610
|
list_id: null,
|
|
@@ -6517,7 +6624,9 @@ var mailchimpTaskTemplates = {
|
|
|
6517
6624
|
taskReferenceName: "mailchimp_add_campaign",
|
|
6518
6625
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
6519
6626
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
6520
|
-
uri: `${
|
|
6627
|
+
uri: `${getWorkflowsEnv(
|
|
6628
|
+
"workflowsApiUr"
|
|
6629
|
+
)}/functions/add-mailchimp-campaign`,
|
|
6521
6630
|
method: "POST",
|
|
6522
6631
|
body: {
|
|
6523
6632
|
type: null,
|
|
@@ -6548,7 +6657,9 @@ var mailchimpTaskTemplates = {
|
|
|
6548
6657
|
taskReferenceName: "mailchimp_send_campaign",
|
|
6549
6658
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
6550
6659
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
6551
|
-
uri: `${
|
|
6660
|
+
uri: `${getWorkflowsEnv(
|
|
6661
|
+
"workflowsApiUr"
|
|
6662
|
+
)}/functions/send-mailchimp-campaign`,
|
|
6552
6663
|
method: "POST",
|
|
6553
6664
|
body: {
|
|
6554
6665
|
campaign_id: null
|
|
@@ -6565,7 +6676,9 @@ var mailchimpTaskTemplates = {
|
|
|
6565
6676
|
taskReferenceName: "mailchimp_add_or_update_subscriber",
|
|
6566
6677
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
6567
6678
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
6568
|
-
uri: `${
|
|
6679
|
+
uri: `${getWorkflowsEnv(
|
|
6680
|
+
"workflowsApiUr"
|
|
6681
|
+
)}/functions/add-or-update-mailchimp-subscriber`,
|
|
6569
6682
|
method: "POST",
|
|
6570
6683
|
body: {
|
|
6571
6684
|
list_id: null,
|
|
@@ -6585,7 +6698,9 @@ var mailchimpTaskTemplates = {
|
|
|
6585
6698
|
taskReferenceName: "mailchimp_update_subscriber",
|
|
6586
6699
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
6587
6700
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
6588
|
-
uri: `${
|
|
6701
|
+
uri: `${getWorkflowsEnv(
|
|
6702
|
+
"workflowsApiUr"
|
|
6703
|
+
)}/functions/update-mailchimp-subscriber`,
|
|
6589
6704
|
method: "POST",
|
|
6590
6705
|
body: {
|
|
6591
6706
|
list_id: null,
|
|
@@ -6605,7 +6720,9 @@ var mailchimpTaskTemplates = {
|
|
|
6605
6720
|
taskReferenceName: "mailchimp_archive_subscriber",
|
|
6606
6721
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
6607
6722
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
6608
|
-
uri: `${
|
|
6723
|
+
uri: `${getWorkflowsEnv(
|
|
6724
|
+
"workflowsApiUr"
|
|
6725
|
+
)}/functions/archive-mailchimp-subscriber`,
|
|
6609
6726
|
method: "POST",
|
|
6610
6727
|
body: {
|
|
6611
6728
|
list_id: null,
|
|
@@ -6623,7 +6740,9 @@ var mailchimpTaskTemplates = {
|
|
|
6623
6740
|
taskReferenceName: "mailchimp_delete_subscriber",
|
|
6624
6741
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
6625
6742
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
6626
|
-
uri: `${
|
|
6743
|
+
uri: `${getWorkflowsEnv(
|
|
6744
|
+
"workflowsApiUr"
|
|
6745
|
+
)}/functions/delete-mailchimp-subscriber`,
|
|
6627
6746
|
method: "POST",
|
|
6628
6747
|
body: {
|
|
6629
6748
|
list_id: null,
|
|
@@ -6641,7 +6760,9 @@ var mailchimpTaskTemplates = {
|
|
|
6641
6760
|
taskReferenceName: "mailchimp_add_subscriber_tag",
|
|
6642
6761
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
6643
6762
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
6644
|
-
uri: `${
|
|
6763
|
+
uri: `${getWorkflowsEnv(
|
|
6764
|
+
"workflowsApiUr"
|
|
6765
|
+
)}/functions/add-mailchimp-subscriber-tag`,
|
|
6645
6766
|
method: "POST",
|
|
6646
6767
|
body: {
|
|
6647
6768
|
list_id: null,
|
|
@@ -6660,7 +6781,9 @@ var mailchimpTaskTemplates = {
|
|
|
6660
6781
|
taskReferenceName: "mailchimp_add_subscriber_event",
|
|
6661
6782
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
6662
6783
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
6663
|
-
uri: `${
|
|
6784
|
+
uri: `${getWorkflowsEnv(
|
|
6785
|
+
"workflowsApiUr"
|
|
6786
|
+
)}/functions/add-mailchimp-subscriber-event`,
|
|
6664
6787
|
method: "POST",
|
|
6665
6788
|
body: {
|
|
6666
6789
|
list_id: null,
|
|
@@ -6679,7 +6802,9 @@ var mailchimpTaskTemplates = {
|
|
|
6679
6802
|
taskReferenceName: "mailchimp_add_subscriber_note",
|
|
6680
6803
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
6681
6804
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
6682
|
-
uri: `${
|
|
6805
|
+
uri: `${getWorkflowsEnv(
|
|
6806
|
+
"workflowsApiUr"
|
|
6807
|
+
)}/functions/add-mailchimp-subscriber-note`,
|
|
6683
6808
|
method: "POST",
|
|
6684
6809
|
body: {
|
|
6685
6810
|
list_id: null,
|
|
@@ -6698,7 +6823,9 @@ var mailchimpTaskTemplates = {
|
|
|
6698
6823
|
taskReferenceName: "mailchimp_delete_subscriber_tag",
|
|
6699
6824
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
6700
6825
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
6701
|
-
uri: `${
|
|
6826
|
+
uri: `${getWorkflowsEnv(
|
|
6827
|
+
"workflowsApiUr"
|
|
6828
|
+
)}/functions/delete-mailchimp-subscriber-tag`,
|
|
6702
6829
|
method: "POST",
|
|
6703
6830
|
body: {
|
|
6704
6831
|
list_id: null,
|
|
@@ -6717,7 +6844,9 @@ var mailchimpTaskTemplates = {
|
|
|
6717
6844
|
taskReferenceName: "mailchimp_get_subscriber_tags",
|
|
6718
6845
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
6719
6846
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
6720
|
-
uri: `${
|
|
6847
|
+
uri: `${getWorkflowsEnv(
|
|
6848
|
+
"workflowsApiUr"
|
|
6849
|
+
)}/functions/get-mailchimp-subscriber-tags?list_id=#{list_id}&email=#{email}`,
|
|
6721
6850
|
method: "GET",
|
|
6722
6851
|
body: {},
|
|
6723
6852
|
headers: {
|
|
@@ -6732,7 +6861,9 @@ var mailchimpTaskTemplates = {
|
|
|
6732
6861
|
taskReferenceName: "mailchimp_get_subscriber",
|
|
6733
6862
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
6734
6863
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
6735
|
-
uri: `${
|
|
6864
|
+
uri: `${getWorkflowsEnv(
|
|
6865
|
+
"workflowsApiUr"
|
|
6866
|
+
)}/functions/get-mailchimp-subscriber?list_id=#{list_id}&email=#{email}`,
|
|
6736
6867
|
method: "GET",
|
|
6737
6868
|
body: {},
|
|
6738
6869
|
headers: {
|
|
@@ -6747,7 +6878,9 @@ var mailchimpTaskTemplates = {
|
|
|
6747
6878
|
taskReferenceName: "mailchimp_get_subscribers",
|
|
6748
6879
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
6749
6880
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
6750
|
-
uri: `${
|
|
6881
|
+
uri: `${getWorkflowsEnv(
|
|
6882
|
+
"workflowsApiUr"
|
|
6883
|
+
)}/functions/find-mailchimp-subscribers?list_id=#{list_id}&query=#{query}`,
|
|
6751
6884
|
method: "GET",
|
|
6752
6885
|
body: {},
|
|
6753
6886
|
headers: {
|
|
@@ -6762,7 +6895,9 @@ var mailchimpTaskTemplates = {
|
|
|
6762
6895
|
taskReferenceName: "mailchimp_find_campaign",
|
|
6763
6896
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
6764
6897
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
6765
|
-
uri: `${
|
|
6898
|
+
uri: `${getWorkflowsEnv(
|
|
6899
|
+
"workflowsApiUr"
|
|
6900
|
+
)}/functions/find-mailchimp-campaign?campaign_id=#{campaign_id}`,
|
|
6766
6901
|
method: "POST",
|
|
6767
6902
|
body: {},
|
|
6768
6903
|
headers: {
|
|
@@ -6772,12 +6907,12 @@ var mailchimpTaskTemplates = {
|
|
|
6772
6907
|
})
|
|
6773
6908
|
})
|
|
6774
6909
|
})
|
|
6775
|
-
};
|
|
6910
|
+
});
|
|
6776
6911
|
var MailchimpTriggerNames = {
|
|
6777
6912
|
Subscribed: `${IntegrationNames5.Mailchimp}-${MailchimpEventNames.Subscribed}`,
|
|
6778
6913
|
Unsubscribed: `${IntegrationNames5.Mailchimp}-${MailchimpEventNames.Unsubscribed}`
|
|
6779
6914
|
};
|
|
6780
|
-
var mailchimpTriggerConfigs = {
|
|
6915
|
+
var mailchimpTriggerConfigs = () => ({
|
|
6781
6916
|
[MailchimpTriggerNames.Subscribed]: {
|
|
6782
6917
|
key: MailchimpTriggerNames.Subscribed,
|
|
6783
6918
|
name: MailchimpEventNames.Subscribed,
|
|
@@ -6832,8 +6967,8 @@ var mailchimpTriggerConfigs = {
|
|
|
6832
6967
|
output: webhookSpecs2.new_unsubscriber.output
|
|
6833
6968
|
}
|
|
6834
6969
|
}
|
|
6835
|
-
};
|
|
6836
|
-
var mailchimpTriggerTemplates = {
|
|
6970
|
+
});
|
|
6971
|
+
var mailchimpTriggerTemplates = () => ({
|
|
6837
6972
|
[MailchimpTriggerNames.Subscribed]: {
|
|
6838
6973
|
type: "webhook",
|
|
6839
6974
|
webhook: {
|
|
@@ -6870,16 +7005,17 @@ var mailchimpTriggerTemplates = {
|
|
|
6870
7005
|
}
|
|
6871
7006
|
}
|
|
6872
7007
|
}
|
|
6873
|
-
};
|
|
7008
|
+
});
|
|
6874
7009
|
|
|
6875
7010
|
// src/views/Flows/Definitions/Mocks/OpenAI/index.ts
|
|
6876
7011
|
import { WorkflowDefinitionTaskType as WorkflowDefinitionTaskType7 } from "@livechat/developer-studio-api";
|
|
6877
|
-
var
|
|
6878
|
-
var openAiTaskConfigs = {
|
|
7012
|
+
var openAiTaskConfigs = () => ({
|
|
6879
7013
|
["OPENAI_EXTRACT_ORDER_REQUEST" /* ExtractOrderRequest */]: {
|
|
6880
7014
|
key: "OPENAI_EXTRACT_ORDER_REQUEST" /* ExtractOrderRequest */,
|
|
6881
7015
|
type: WorkflowDefinitionTaskType7.http,
|
|
6882
|
-
url: `${
|
|
7016
|
+
url: `${getWorkflowsEnv(
|
|
7017
|
+
"workflowsApiUr"
|
|
7018
|
+
)}/functions/extract-order-from-text`,
|
|
6883
7019
|
customization: {
|
|
6884
7020
|
provider: OTHER_PRODUCT_TYPE.OPENAI,
|
|
6885
7021
|
product: "OpenAI",
|
|
@@ -6968,7 +7104,9 @@ var openAiTaskConfigs = {
|
|
|
6968
7104
|
["OPENAI_ANALYZE_TEXT_SENTIMENT" /* AnalyzeTextSentiment */]: {
|
|
6969
7105
|
key: "OPENAI_ANALYZE_TEXT_SENTIMENT" /* AnalyzeTextSentiment */,
|
|
6970
7106
|
type: WorkflowDefinitionTaskType7.http,
|
|
6971
|
-
url: `${
|
|
7107
|
+
url: `${getWorkflowsEnv(
|
|
7108
|
+
"workflowsApiUr"
|
|
7109
|
+
)}/functions/analyze-text-sentiment`,
|
|
6972
7110
|
customization: {
|
|
6973
7111
|
provider: OTHER_PRODUCT_TYPE.OPENAI,
|
|
6974
7112
|
product: "OpenAI",
|
|
@@ -7003,7 +7141,7 @@ var openAiTaskConfigs = {
|
|
|
7003
7141
|
["OPENAI_SUMMARIZE_TEXT" /* SummarizeText */]: {
|
|
7004
7142
|
key: "OPENAI_SUMMARIZE_TEXT" /* SummarizeText */,
|
|
7005
7143
|
type: WorkflowDefinitionTaskType7.http,
|
|
7006
|
-
url: `${
|
|
7144
|
+
url: `${getWorkflowsEnv("workflowsApiUr")}/functions/summarize-text`,
|
|
7007
7145
|
customization: {
|
|
7008
7146
|
provider: OTHER_PRODUCT_TYPE.OPENAI,
|
|
7009
7147
|
product: "OpenAI",
|
|
@@ -7038,7 +7176,7 @@ var openAiTaskConfigs = {
|
|
|
7038
7176
|
["OPENAI_MODERATE_TEXT" /* ModerateText */]: {
|
|
7039
7177
|
key: "OPENAI_MODERATE_TEXT" /* ModerateText */,
|
|
7040
7178
|
type: WorkflowDefinitionTaskType7.http,
|
|
7041
|
-
url: `${
|
|
7179
|
+
url: `${getWorkflowsEnv("workflowsApiUr")}/functions/moderate-text`,
|
|
7042
7180
|
customization: {
|
|
7043
7181
|
provider: OTHER_PRODUCT_TYPE.OPENAI,
|
|
7044
7182
|
product: "OpenAI",
|
|
@@ -7072,7 +7210,7 @@ var openAiTaskConfigs = {
|
|
|
7072
7210
|
["OPENAI_CATEGORIZE_TEXT" /* CategorizeText */]: {
|
|
7073
7211
|
key: "OPENAI_CATEGORIZE_TEXT" /* CategorizeText */,
|
|
7074
7212
|
type: WorkflowDefinitionTaskType7.http,
|
|
7075
|
-
url: `${
|
|
7213
|
+
url: `${getWorkflowsEnv("workflowsApiUr")}/functions/categorize-text`,
|
|
7076
7214
|
customization: {
|
|
7077
7215
|
provider: OTHER_PRODUCT_TYPE.OPENAI,
|
|
7078
7216
|
product: "OpenAI",
|
|
@@ -7112,14 +7250,16 @@ var openAiTaskConfigs = {
|
|
|
7112
7250
|
})
|
|
7113
7251
|
}
|
|
7114
7252
|
}
|
|
7115
|
-
};
|
|
7116
|
-
var openAiTaskTemplates = {
|
|
7253
|
+
});
|
|
7254
|
+
var openAiTaskTemplates = () => ({
|
|
7117
7255
|
["OPENAI_EXTRACT_ORDER_REQUEST" /* ExtractOrderRequest */]: __spreadProps(__spreadValues({}, workflowHttpTask), {
|
|
7118
7256
|
name: "OPENAI_EXTRACT_ORDER_REQUEST" /* ExtractOrderRequest */,
|
|
7119
7257
|
taskReferenceName: "openai_extract_order_request",
|
|
7120
7258
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
7121
7259
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
7122
|
-
uri: `${
|
|
7260
|
+
uri: `${getWorkflowsEnv(
|
|
7261
|
+
"workflowsApiUr"
|
|
7262
|
+
)}/functions/extract-order-from-text`,
|
|
7123
7263
|
method: "POST",
|
|
7124
7264
|
body: {
|
|
7125
7265
|
text: "#{chat_transcript}"
|
|
@@ -7136,7 +7276,9 @@ var openAiTaskTemplates = {
|
|
|
7136
7276
|
taskReferenceName: "openai_text_sentiment",
|
|
7137
7277
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
7138
7278
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
7139
|
-
uri: `${
|
|
7279
|
+
uri: `${getWorkflowsEnv(
|
|
7280
|
+
"workflowsApiUr"
|
|
7281
|
+
)}/functions/analyze-text-sentiment`,
|
|
7140
7282
|
method: "POST",
|
|
7141
7283
|
body: {
|
|
7142
7284
|
text: "#{chat_transcript}"
|
|
@@ -7153,7 +7295,7 @@ var openAiTaskTemplates = {
|
|
|
7153
7295
|
taskReferenceName: "openai_summarize_text",
|
|
7154
7296
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
7155
7297
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
7156
|
-
uri: `${
|
|
7298
|
+
uri: `${getWorkflowsEnv("workflowsApiUr")}/functions/summarize-text`,
|
|
7157
7299
|
method: "POST",
|
|
7158
7300
|
body: {
|
|
7159
7301
|
text: "#{chat_transcript}"
|
|
@@ -7170,7 +7312,7 @@ var openAiTaskTemplates = {
|
|
|
7170
7312
|
taskReferenceName: "openai_moderate_text",
|
|
7171
7313
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
7172
7314
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
7173
|
-
uri: `${
|
|
7315
|
+
uri: `${getWorkflowsEnv("workflowsApiUr")}/functions/moderate-text`,
|
|
7174
7316
|
method: "POST",
|
|
7175
7317
|
body: {
|
|
7176
7318
|
text: "#{chat_transcript}"
|
|
@@ -7187,7 +7329,7 @@ var openAiTaskTemplates = {
|
|
|
7187
7329
|
taskReferenceName: "openai_categorize_text",
|
|
7188
7330
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
7189
7331
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
7190
|
-
uri: `${
|
|
7332
|
+
uri: `${getWorkflowsEnv("workflowsApiUr")}/functions/categorize-text`,
|
|
7191
7333
|
method: "POST",
|
|
7192
7334
|
body: {
|
|
7193
7335
|
text: "#{chat_transcript}"
|
|
@@ -7199,7 +7341,7 @@ var openAiTaskTemplates = {
|
|
|
7199
7341
|
})
|
|
7200
7342
|
})
|
|
7201
7343
|
})
|
|
7202
|
-
};
|
|
7344
|
+
});
|
|
7203
7345
|
|
|
7204
7346
|
// src/views/Flows/Definitions/Mocks/Shopify/index.ts
|
|
7205
7347
|
import {
|
|
@@ -7208,7 +7350,6 @@ import {
|
|
|
7208
7350
|
ShopifyEventNames,
|
|
7209
7351
|
WorkflowDefinitionTaskType as WorkflowDefinitionTaskType8
|
|
7210
7352
|
} from "@livechat/developer-studio-api";
|
|
7211
|
-
var config8 = getWorkflowsConfig();
|
|
7212
7353
|
var shopifyCustomerAddressBody = {
|
|
7213
7354
|
id: {
|
|
7214
7355
|
type: "number",
|
|
@@ -7628,11 +7769,13 @@ var webhookSpecs3 = {
|
|
|
7628
7769
|
}
|
|
7629
7770
|
}
|
|
7630
7771
|
};
|
|
7631
|
-
var shopifyTaskConfigs = {
|
|
7772
|
+
var shopifyTaskConfigs = () => ({
|
|
7632
7773
|
["SHOPIFY_CREATE_CUSTOMER" /* CreateCustomer */]: {
|
|
7633
7774
|
key: "SHOPIFY_CREATE_CUSTOMER" /* CreateCustomer */,
|
|
7634
7775
|
type: WorkflowDefinitionTaskType8.http,
|
|
7635
|
-
url: `${
|
|
7776
|
+
url: `${getWorkflowsEnv(
|
|
7777
|
+
"workflowsApiUr"
|
|
7778
|
+
)}/functions/create-shopify-customer`,
|
|
7636
7779
|
customization: {
|
|
7637
7780
|
provider: IntegrationNames6.Shopify,
|
|
7638
7781
|
product: IntegrationDisplayNames4.Shopify,
|
|
@@ -7656,7 +7799,7 @@ var shopifyTaskConfigs = {
|
|
|
7656
7799
|
["SHOPIFY_CREATE_ORDER" /* CreateOrder */]: {
|
|
7657
7800
|
key: "SHOPIFY_CREATE_ORDER" /* CreateOrder */,
|
|
7658
7801
|
type: WorkflowDefinitionTaskType8.http,
|
|
7659
|
-
url: `${
|
|
7802
|
+
url: `${getWorkflowsEnv("workflowsApiUr")}/functions/create-shopify-order`,
|
|
7660
7803
|
customization: {
|
|
7661
7804
|
provider: IntegrationNames6.Shopify,
|
|
7662
7805
|
product: IntegrationDisplayNames4.Shopify,
|
|
@@ -7679,7 +7822,9 @@ var shopifyTaskConfigs = {
|
|
|
7679
7822
|
["SHOPIFY_CREATE_DRAFT_ORDER" /* CreateDraftOrder */]: {
|
|
7680
7823
|
key: "SHOPIFY_CREATE_DRAFT_ORDER" /* CreateDraftOrder */,
|
|
7681
7824
|
type: WorkflowDefinitionTaskType8.http,
|
|
7682
|
-
url: `${
|
|
7825
|
+
url: `${getWorkflowsEnv(
|
|
7826
|
+
"workflowsApiUr"
|
|
7827
|
+
)}/functions/create-shopify-draft-order`,
|
|
7683
7828
|
customization: {
|
|
7684
7829
|
provider: IntegrationNames6.Shopify,
|
|
7685
7830
|
product: IntegrationDisplayNames4.Shopify,
|
|
@@ -7702,7 +7847,9 @@ var shopifyTaskConfigs = {
|
|
|
7702
7847
|
["SHOPIFY_CREATE_PRODUCT" /* CreateProduct */]: {
|
|
7703
7848
|
key: "SHOPIFY_CREATE_PRODUCT" /* CreateProduct */,
|
|
7704
7849
|
type: WorkflowDefinitionTaskType8.http,
|
|
7705
|
-
url: `${
|
|
7850
|
+
url: `${getWorkflowsEnv(
|
|
7851
|
+
"workflowsApiUr"
|
|
7852
|
+
)}/functions/create-shopify-product`,
|
|
7706
7853
|
customization: {
|
|
7707
7854
|
provider: IntegrationNames6.Shopify,
|
|
7708
7855
|
product: IntegrationDisplayNames4.Shopify,
|
|
@@ -7725,7 +7872,9 @@ var shopifyTaskConfigs = {
|
|
|
7725
7872
|
["SHOPIFY_CREATE_PRODUCT_VARIANT" /* CreateProductVariant */]: {
|
|
7726
7873
|
type: WorkflowDefinitionTaskType8.http,
|
|
7727
7874
|
key: "SHOPIFY_CREATE_PRODUCT_VARIANT" /* CreateProductVariant */,
|
|
7728
|
-
url: `${
|
|
7875
|
+
url: `${getWorkflowsEnv(
|
|
7876
|
+
"workflowsApiUr"
|
|
7877
|
+
)}/functions/create-shopify-product-variant`,
|
|
7729
7878
|
customization: {
|
|
7730
7879
|
provider: IntegrationNames6.Shopify,
|
|
7731
7880
|
product: IntegrationDisplayNames4.Shopify,
|
|
@@ -7748,7 +7897,7 @@ var shopifyTaskConfigs = {
|
|
|
7748
7897
|
["SHOPIFY_GET_CUSTOMER" /* GetCustomer */]: {
|
|
7749
7898
|
key: "SHOPIFY_GET_CUSTOMER" /* GetCustomer */,
|
|
7750
7899
|
type: WorkflowDefinitionTaskType8.http,
|
|
7751
|
-
url: `${
|
|
7900
|
+
url: `${getWorkflowsEnv("workflowsApiUr")}/functions/get-shopify-customer`,
|
|
7752
7901
|
customization: {
|
|
7753
7902
|
provider: IntegrationNames6.Shopify,
|
|
7754
7903
|
product: IntegrationDisplayNames4.Shopify,
|
|
@@ -7777,7 +7926,9 @@ var shopifyTaskConfigs = {
|
|
|
7777
7926
|
["SHOPIFY_GET_CUSTOMER_ORDERS" /* GetCustomerOrders */]: {
|
|
7778
7927
|
key: "SHOPIFY_GET_CUSTOMER_ORDERS" /* GetCustomerOrders */,
|
|
7779
7928
|
type: WorkflowDefinitionTaskType8.http,
|
|
7780
|
-
url: `${
|
|
7929
|
+
url: `${getWorkflowsEnv(
|
|
7930
|
+
"workflowsApiUr"
|
|
7931
|
+
)}/functions/get-shopify-customer-orders`,
|
|
7781
7932
|
customization: {
|
|
7782
7933
|
provider: IntegrationNames6.Shopify,
|
|
7783
7934
|
product: IntegrationDisplayNames4.Shopify,
|
|
@@ -7809,7 +7960,9 @@ var shopifyTaskConfigs = {
|
|
|
7809
7960
|
["SHOPIFY_GET_CUSTOMER_LAST_ORDER" /* GetCustomerLastOrder */]: {
|
|
7810
7961
|
key: "SHOPIFY_GET_CUSTOMER_LAST_ORDER" /* GetCustomerLastOrder */,
|
|
7811
7962
|
type: WorkflowDefinitionTaskType8.http,
|
|
7812
|
-
url: `${
|
|
7963
|
+
url: `${getWorkflowsEnv(
|
|
7964
|
+
"workflowsApiUr"
|
|
7965
|
+
)}/functions/get-shopify-customer-last-order`,
|
|
7813
7966
|
customization: {
|
|
7814
7967
|
provider: IntegrationNames6.Shopify,
|
|
7815
7968
|
product: IntegrationDisplayNames4.Shopify,
|
|
@@ -7838,7 +7991,7 @@ var shopifyTaskConfigs = {
|
|
|
7838
7991
|
["SHOPIFY_GET_PRODUCT" /* GetProduct */]: {
|
|
7839
7992
|
type: WorkflowDefinitionTaskType8.http,
|
|
7840
7993
|
key: "SHOPIFY_GET_PRODUCT" /* GetProduct */,
|
|
7841
|
-
url: `${
|
|
7994
|
+
url: `${getWorkflowsEnv("workflowsApiUr")}/functions/get-shopify-product`,
|
|
7842
7995
|
customization: {
|
|
7843
7996
|
provider: IntegrationNames6.Shopify,
|
|
7844
7997
|
product: IntegrationDisplayNames4.Shopify,
|
|
@@ -7868,7 +8021,9 @@ var shopifyTaskConfigs = {
|
|
|
7868
8021
|
["SHOPIFY_GET_PRODUCT_VARIANT" /* GetProductVariant */]: {
|
|
7869
8022
|
key: "SHOPIFY_GET_PRODUCT_VARIANT" /* GetProductVariant */,
|
|
7870
8023
|
type: WorkflowDefinitionTaskType8.http,
|
|
7871
|
-
url: `${
|
|
8024
|
+
url: `${getWorkflowsEnv(
|
|
8025
|
+
"workflowsApiUr"
|
|
8026
|
+
)}/functions/get-shopify-product-variant`,
|
|
7872
8027
|
customization: {
|
|
7873
8028
|
provider: IntegrationNames6.Shopify,
|
|
7874
8029
|
product: IntegrationDisplayNames4.Shopify,
|
|
@@ -7901,7 +8056,9 @@ var shopifyTaskConfigs = {
|
|
|
7901
8056
|
["SHOPIFY_UPDATE_INVENTORY_QUANTITY" /* UpdateInventoryQuantity */]: {
|
|
7902
8057
|
key: "SHOPIFY_UPDATE_INVENTORY_QUANTITY" /* UpdateInventoryQuantity */,
|
|
7903
8058
|
type: WorkflowDefinitionTaskType8.http,
|
|
7904
|
-
url: `${
|
|
8059
|
+
url: `${getWorkflowsEnv(
|
|
8060
|
+
"workflowsApiUr"
|
|
8061
|
+
)}/functions/update-shopify-inventory-quantity`,
|
|
7905
8062
|
customization: {
|
|
7906
8063
|
provider: IntegrationNames6.Shopify,
|
|
7907
8064
|
product: IntegrationDisplayNames4.Shopify,
|
|
@@ -7967,7 +8124,7 @@ var shopifyTaskConfigs = {
|
|
|
7967
8124
|
["SHOPIFY_UPDATE_ORDER" /* UpdateOrder */]: {
|
|
7968
8125
|
type: WorkflowDefinitionTaskType8.http,
|
|
7969
8126
|
key: "SHOPIFY_UPDATE_ORDER" /* UpdateOrder */,
|
|
7970
|
-
url: `${
|
|
8127
|
+
url: `${getWorkflowsEnv("workflowsApiUr")}/functions/update-shopify-order`,
|
|
7971
8128
|
customization: {
|
|
7972
8129
|
provider: IntegrationNames6.Shopify,
|
|
7973
8130
|
product: IntegrationDisplayNames4.Shopify,
|
|
@@ -7990,7 +8147,9 @@ var shopifyTaskConfigs = {
|
|
|
7990
8147
|
["SHOPIFY_UPDATE_PRODUCT" /* UpdateProduct */]: {
|
|
7991
8148
|
key: "SHOPIFY_UPDATE_PRODUCT" /* UpdateProduct */,
|
|
7992
8149
|
type: WorkflowDefinitionTaskType8.http,
|
|
7993
|
-
url: `${
|
|
8150
|
+
url: `${getWorkflowsEnv(
|
|
8151
|
+
"workflowsApiUr"
|
|
8152
|
+
)}/functions/update-shopify-product`,
|
|
7994
8153
|
customization: {
|
|
7995
8154
|
provider: IntegrationNames6.Shopify,
|
|
7996
8155
|
product: IntegrationDisplayNames4.Shopify,
|
|
@@ -8013,7 +8172,9 @@ var shopifyTaskConfigs = {
|
|
|
8013
8172
|
["SHOPIFY_UPDATE_PRODUCT_VARIANT" /* UpdateProductVariant */]: {
|
|
8014
8173
|
key: "SHOPIFY_UPDATE_PRODUCT_VARIANT" /* UpdateProductVariant */,
|
|
8015
8174
|
type: WorkflowDefinitionTaskType8.http,
|
|
8016
|
-
url: `${
|
|
8175
|
+
url: `${getWorkflowsEnv(
|
|
8176
|
+
"workflowsApiUr"
|
|
8177
|
+
)}/functions/update-shopify-product-variant`,
|
|
8017
8178
|
customization: {
|
|
8018
8179
|
provider: IntegrationNames6.Shopify,
|
|
8019
8180
|
product: IntegrationDisplayNames4.Shopify,
|
|
@@ -8036,7 +8197,9 @@ var shopifyTaskConfigs = {
|
|
|
8036
8197
|
["SHOPIFY_UPDATE_CUSTOMER" /* UpdateCustomer */]: {
|
|
8037
8198
|
key: "SHOPIFY_UPDATE_CUSTOMER" /* UpdateCustomer */,
|
|
8038
8199
|
type: WorkflowDefinitionTaskType8.http,
|
|
8039
|
-
url: `${
|
|
8200
|
+
url: `${getWorkflowsEnv(
|
|
8201
|
+
"workflowsApiUr"
|
|
8202
|
+
)}/functions/update-shopify-customer`,
|
|
8040
8203
|
customization: {
|
|
8041
8204
|
provider: IntegrationNames6.Shopify,
|
|
8042
8205
|
product: IntegrationDisplayNames4.Shopify,
|
|
@@ -8056,14 +8219,16 @@ var shopifyTaskConfigs = {
|
|
|
8056
8219
|
})
|
|
8057
8220
|
}
|
|
8058
8221
|
}
|
|
8059
|
-
};
|
|
8060
|
-
var shopifyTaskTemplates = {
|
|
8222
|
+
});
|
|
8223
|
+
var shopifyTaskTemplates = () => ({
|
|
8061
8224
|
["SHOPIFY_CREATE_CUSTOMER" /* CreateCustomer */]: __spreadProps(__spreadValues({}, workflowHttpTask), {
|
|
8062
8225
|
name: "SHOPIFY_CREATE_CUSTOMER" /* CreateCustomer */,
|
|
8063
8226
|
taskReferenceName: "shopify_create_customer",
|
|
8064
8227
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
8065
8228
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
8066
|
-
uri: `${
|
|
8229
|
+
uri: `${getWorkflowsEnv(
|
|
8230
|
+
"workflowsApiUr"
|
|
8231
|
+
)}/functions/create-shopify-customer`,
|
|
8067
8232
|
method: "POST",
|
|
8068
8233
|
body: {
|
|
8069
8234
|
first_name: "#{first_name}",
|
|
@@ -8083,7 +8248,9 @@ var shopifyTaskTemplates = {
|
|
|
8083
8248
|
taskReferenceName: "shopify_create_order",
|
|
8084
8249
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
8085
8250
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
8086
|
-
uri: `${
|
|
8251
|
+
uri: `${getWorkflowsEnv(
|
|
8252
|
+
"workflowsApiUr"
|
|
8253
|
+
)}/functions/create-shopify-order`,
|
|
8087
8254
|
method: "POST",
|
|
8088
8255
|
body: {},
|
|
8089
8256
|
headers: {
|
|
@@ -8099,7 +8266,9 @@ var shopifyTaskTemplates = {
|
|
|
8099
8266
|
taskReferenceName: "shopify_create_draft_order",
|
|
8100
8267
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
8101
8268
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
8102
|
-
uri: `${
|
|
8269
|
+
uri: `${getWorkflowsEnv(
|
|
8270
|
+
"workflowsApiUr"
|
|
8271
|
+
)}/functions/create-shopify-draft-order`,
|
|
8103
8272
|
method: "POST",
|
|
8104
8273
|
body: {},
|
|
8105
8274
|
headers: {
|
|
@@ -8115,7 +8284,9 @@ var shopifyTaskTemplates = {
|
|
|
8115
8284
|
taskReferenceName: "shopify_create_product",
|
|
8116
8285
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
8117
8286
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
8118
|
-
uri: `${
|
|
8287
|
+
uri: `${getWorkflowsEnv(
|
|
8288
|
+
"workflowsApiUr"
|
|
8289
|
+
)}/functions/create-shopify-product`,
|
|
8119
8290
|
method: "POST",
|
|
8120
8291
|
body: {},
|
|
8121
8292
|
headers: {
|
|
@@ -8131,7 +8302,9 @@ var shopifyTaskTemplates = {
|
|
|
8131
8302
|
taskReferenceName: "shopify_create_product_variant",
|
|
8132
8303
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
8133
8304
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
8134
|
-
uri: `${
|
|
8305
|
+
uri: `${getWorkflowsEnv(
|
|
8306
|
+
"workflowsApiUr"
|
|
8307
|
+
)}/functions/create-shopify-product-variant`,
|
|
8135
8308
|
method: "POST",
|
|
8136
8309
|
body: {},
|
|
8137
8310
|
headers: {
|
|
@@ -8147,7 +8320,9 @@ var shopifyTaskTemplates = {
|
|
|
8147
8320
|
taskReferenceName: "shopify_get_customer",
|
|
8148
8321
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
8149
8322
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
8150
|
-
uri: `${
|
|
8323
|
+
uri: `${getWorkflowsEnv(
|
|
8324
|
+
"workflowsApiUr"
|
|
8325
|
+
)}/functions/get-shopify-customer?email=#{email}`,
|
|
8151
8326
|
method: "GET",
|
|
8152
8327
|
body: {},
|
|
8153
8328
|
headers: {
|
|
@@ -8163,7 +8338,9 @@ var shopifyTaskTemplates = {
|
|
|
8163
8338
|
taskReferenceName: "shopify_get_customer_orders",
|
|
8164
8339
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
8165
8340
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
8166
|
-
uri: `${
|
|
8341
|
+
uri: `${getWorkflowsEnv(
|
|
8342
|
+
"workflowsApiUr"
|
|
8343
|
+
)}/functions/get-shopify-customer-orders?email=#{email}`,
|
|
8167
8344
|
method: "GET",
|
|
8168
8345
|
body: {},
|
|
8169
8346
|
headers: {
|
|
@@ -8179,7 +8356,9 @@ var shopifyTaskTemplates = {
|
|
|
8179
8356
|
taskReferenceName: "shopify_get_customer_last_order",
|
|
8180
8357
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
8181
8358
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
8182
|
-
uri: `${
|
|
8359
|
+
uri: `${getWorkflowsEnv(
|
|
8360
|
+
"workflowsApiUr"
|
|
8361
|
+
)}/functions/get-shopify-customer-last-order?email=#{email}`,
|
|
8183
8362
|
method: "GET",
|
|
8184
8363
|
body: {},
|
|
8185
8364
|
headers: {
|
|
@@ -8195,7 +8374,9 @@ var shopifyTaskTemplates = {
|
|
|
8195
8374
|
taskReferenceName: "shopify_get_product",
|
|
8196
8375
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
8197
8376
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
8198
|
-
uri: `${
|
|
8377
|
+
uri: `${getWorkflowsEnv(
|
|
8378
|
+
"workflowsApiUr"
|
|
8379
|
+
)}/functions/get-shopify-product?product_id=#{product_id}`,
|
|
8199
8380
|
method: "GET",
|
|
8200
8381
|
body: {},
|
|
8201
8382
|
headers: {
|
|
@@ -8211,7 +8392,9 @@ var shopifyTaskTemplates = {
|
|
|
8211
8392
|
taskReferenceName: "shopify_get_product_variant",
|
|
8212
8393
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
8213
8394
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
8214
|
-
uri: `${
|
|
8395
|
+
uri: `${getWorkflowsEnv(
|
|
8396
|
+
"workflowsApiUr"
|
|
8397
|
+
)}/functions/get-shopify-product-variant?product_id=#{product_id}&title=#{title}`,
|
|
8215
8398
|
method: "GET",
|
|
8216
8399
|
body: {},
|
|
8217
8400
|
headers: {
|
|
@@ -8227,7 +8410,9 @@ var shopifyTaskTemplates = {
|
|
|
8227
8410
|
taskReferenceName: "shopify_update_inventory_quantity",
|
|
8228
8411
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
8229
8412
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
8230
|
-
uri: `${
|
|
8413
|
+
uri: `${getWorkflowsEnv(
|
|
8414
|
+
"workflowsApiUr"
|
|
8415
|
+
)}/functions/update-shopify-inventory-quantity`,
|
|
8231
8416
|
method: "PATCH",
|
|
8232
8417
|
body: {
|
|
8233
8418
|
inventory_item_id: "#{inventory_item_id}",
|
|
@@ -8246,7 +8431,9 @@ var shopifyTaskTemplates = {
|
|
|
8246
8431
|
taskReferenceName: "shopify_update_order",
|
|
8247
8432
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
8248
8433
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
8249
|
-
uri: `${
|
|
8434
|
+
uri: `${getWorkflowsEnv(
|
|
8435
|
+
"workflowsApiUr"
|
|
8436
|
+
)}/functions/update-shopify-order`,
|
|
8250
8437
|
method: "PATCH",
|
|
8251
8438
|
body: {},
|
|
8252
8439
|
headers: {
|
|
@@ -8262,7 +8449,9 @@ var shopifyTaskTemplates = {
|
|
|
8262
8449
|
taskReferenceName: "shopify_update_product",
|
|
8263
8450
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
8264
8451
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
8265
|
-
uri: `${
|
|
8452
|
+
uri: `${getWorkflowsEnv(
|
|
8453
|
+
"workflowsApiUr"
|
|
8454
|
+
)}/functions/update-shopify-product`,
|
|
8266
8455
|
method: "PATCH",
|
|
8267
8456
|
body: {},
|
|
8268
8457
|
headers: {
|
|
@@ -8278,7 +8467,9 @@ var shopifyTaskTemplates = {
|
|
|
8278
8467
|
taskReferenceName: "shopify_update_product_variant",
|
|
8279
8468
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
8280
8469
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
8281
|
-
uri: `${
|
|
8470
|
+
uri: `${getWorkflowsEnv(
|
|
8471
|
+
"workflowsApiUr"
|
|
8472
|
+
)}/functions/update-shopify-product-variant`,
|
|
8282
8473
|
method: "PATCH",
|
|
8283
8474
|
body: {},
|
|
8284
8475
|
headers: {
|
|
@@ -8294,7 +8485,9 @@ var shopifyTaskTemplates = {
|
|
|
8294
8485
|
taskReferenceName: "shopify_update_customer",
|
|
8295
8486
|
inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
|
|
8296
8487
|
http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
|
|
8297
|
-
uri: `${
|
|
8488
|
+
uri: `${getWorkflowsEnv(
|
|
8489
|
+
"workflowsApiUr"
|
|
8490
|
+
)}/functions/update-shopify-customer`,
|
|
8298
8491
|
method: "PATCH",
|
|
8299
8492
|
body: {},
|
|
8300
8493
|
headers: {
|
|
@@ -8305,11 +8498,11 @@ var shopifyTaskTemplates = {
|
|
|
8305
8498
|
})
|
|
8306
8499
|
})
|
|
8307
8500
|
})
|
|
8308
|
-
};
|
|
8501
|
+
});
|
|
8309
8502
|
var ShopifyTriggerNames = {
|
|
8310
8503
|
OrderCreated: `${IntegrationNames6.Shopify}-${ShopifyEventNames.OrderCreated}`
|
|
8311
8504
|
};
|
|
8312
|
-
var shopifyTriggerConfigs = {
|
|
8505
|
+
var shopifyTriggerConfigs = () => ({
|
|
8313
8506
|
[ShopifyTriggerNames.OrderCreated]: {
|
|
8314
8507
|
key: ShopifyTriggerNames.OrderCreated,
|
|
8315
8508
|
name: ShopifyEventNames.OrderCreated,
|
|
@@ -8326,8 +8519,8 @@ var shopifyTriggerConfigs = {
|
|
|
8326
8519
|
output: webhookSpecs3.new_paid_order.output
|
|
8327
8520
|
}
|
|
8328
8521
|
}
|
|
8329
|
-
};
|
|
8330
|
-
var shopifyTriggerTemplates = {
|
|
8522
|
+
});
|
|
8523
|
+
var shopifyTriggerTemplates = () => ({
|
|
8331
8524
|
[ShopifyTriggerNames.OrderCreated]: {
|
|
8332
8525
|
type: "webhook",
|
|
8333
8526
|
webhook: {
|
|
@@ -8343,33 +8536,49 @@ var shopifyTriggerTemplates = {
|
|
|
8343
8536
|
}
|
|
8344
8537
|
}
|
|
8345
8538
|
}
|
|
8346
|
-
};
|
|
8539
|
+
});
|
|
8347
8540
|
|
|
8348
8541
|
// src/views/Flows/Definitions/api.mocks.ts
|
|
8349
|
-
var
|
|
8350
|
-
|
|
8351
|
-
|
|
8542
|
+
var WorkflowItemsConfiguration = class {
|
|
8543
|
+
constructor() {
|
|
8544
|
+
this.configs = getWorkflowItemConfigs();
|
|
8545
|
+
this.templates = getWorkflowItemTemplates();
|
|
8546
|
+
}
|
|
8547
|
+
static get config() {
|
|
8548
|
+
const instance = this._instance || (this._instance = new this());
|
|
8549
|
+
return instance.configs;
|
|
8550
|
+
}
|
|
8551
|
+
static get templates() {
|
|
8552
|
+
const instance = this._instance || (this._instance = new this());
|
|
8553
|
+
return instance.templates;
|
|
8554
|
+
}
|
|
8352
8555
|
};
|
|
8353
|
-
var
|
|
8556
|
+
var getWorkflowItemConfigs = () => {
|
|
8557
|
+
return {
|
|
8558
|
+
tasks: __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, livechatTaskConfigs()), helpdeskTaskConfigs()), mailchimpTaskConfigs()), shopifyTaskConfigs()), hubspotTaskConfigs()), bigCommerceTaskConfigs()), openAiTaskConfigs()), systemTaskConfigs()),
|
|
8559
|
+
triggers: __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, livechatTriggerConfigs()), mailchimpTriggerConfigs()), shopifyTriggerConfigs()), hubspotTriggerConfigs()), bigcommerceTriggerConfigs()), systemTriggerConfigs())
|
|
8560
|
+
};
|
|
8561
|
+
};
|
|
8562
|
+
var getWorkflowItemTemplates = () => ({
|
|
8354
8563
|
tasks: {
|
|
8355
|
-
livechat: livechatTaskTemplates,
|
|
8356
|
-
helpdesk: helpdeskTaskTemplates,
|
|
8357
|
-
mailchimp: mailchimpTaskTemplates,
|
|
8358
|
-
hubspot: hubspotTaskTemplates,
|
|
8359
|
-
bigcommerce: bigCommerceTaskTemplates,
|
|
8360
|
-
shopify: shopifyTaskTemplates,
|
|
8361
|
-
openai: openAiTaskTemplates,
|
|
8362
|
-
system: systemTaskTemplates
|
|
8564
|
+
livechat: livechatTaskTemplates(),
|
|
8565
|
+
helpdesk: helpdeskTaskTemplates(),
|
|
8566
|
+
mailchimp: mailchimpTaskTemplates(),
|
|
8567
|
+
hubspot: hubspotTaskTemplates(),
|
|
8568
|
+
bigcommerce: bigCommerceTaskTemplates(),
|
|
8569
|
+
shopify: shopifyTaskTemplates(),
|
|
8570
|
+
openai: openAiTaskTemplates(),
|
|
8571
|
+
system: systemTaskTemplates()
|
|
8363
8572
|
},
|
|
8364
8573
|
triggers: {
|
|
8365
|
-
livechat: livechatTriggerTemplates,
|
|
8366
|
-
mailchimp: mailchimpTriggerTemplates,
|
|
8367
|
-
shopify: shopifyTriggerTemplates,
|
|
8368
|
-
hubspot: hubSpotTriggerTemplates,
|
|
8369
|
-
bigcommerce: bigcommerceTriggerTemplates,
|
|
8370
|
-
system: systemTriggerTemplates
|
|
8574
|
+
livechat: livechatTriggerTemplates(),
|
|
8575
|
+
mailchimp: mailchimpTriggerTemplates(),
|
|
8576
|
+
shopify: shopifyTriggerTemplates(),
|
|
8577
|
+
hubspot: hubSpotTriggerTemplates(),
|
|
8578
|
+
bigcommerce: bigcommerceTriggerTemplates(),
|
|
8579
|
+
system: systemTriggerTemplates()
|
|
8371
8580
|
}
|
|
8372
|
-
};
|
|
8581
|
+
});
|
|
8373
8582
|
|
|
8374
8583
|
// src/views/Flows/Definitions/Common/Builder/config/workflow.ts
|
|
8375
8584
|
var NEW_WORKFLOW_TEMPLATE = {
|
|
@@ -8520,9 +8729,40 @@ var WORKFLOW_TERMINATE_TASK_SCHEMA = {
|
|
|
8520
8729
|
}
|
|
8521
8730
|
}
|
|
8522
8731
|
};
|
|
8523
|
-
var
|
|
8732
|
+
var WORKFLOW_SCHEMA_DEFS = {
|
|
8733
|
+
$defs: {
|
|
8734
|
+
mailchimp_audience: {
|
|
8735
|
+
"x-ref": {
|
|
8736
|
+
request: {
|
|
8737
|
+
url: "http://${credential.server}.mailchimp.com/api/audience",
|
|
8738
|
+
method: "GET",
|
|
8739
|
+
headers: {
|
|
8740
|
+
authorization: "${credential.token}"
|
|
8741
|
+
},
|
|
8742
|
+
body: {}
|
|
8743
|
+
},
|
|
8744
|
+
displayField: "name",
|
|
8745
|
+
valueField: "id"
|
|
8746
|
+
}
|
|
8747
|
+
},
|
|
8748
|
+
mailchimp_campaign: {
|
|
8749
|
+
"x-ref": {
|
|
8750
|
+
request: {
|
|
8751
|
+
url: "http://${credential.server}.mailchimp.com/api/campaign",
|
|
8752
|
+
method: "GET",
|
|
8753
|
+
headers: {
|
|
8754
|
+
authorization: "${credential.token}"
|
|
8755
|
+
},
|
|
8756
|
+
body: {}
|
|
8757
|
+
},
|
|
8758
|
+
displayField: "name",
|
|
8759
|
+
valueField: "id"
|
|
8760
|
+
}
|
|
8761
|
+
}
|
|
8762
|
+
}
|
|
8763
|
+
};
|
|
8764
|
+
var WORKFLOW_SCHEMA = () => ({
|
|
8524
8765
|
$schema: "http://json-schema.org/draft-07/schema",
|
|
8525
|
-
$id: "http://example.com/example.json",
|
|
8526
8766
|
type: "object",
|
|
8527
8767
|
title: "The root schema",
|
|
8528
8768
|
description: "The root schema comprises the entire JSON document.",
|
|
@@ -8668,20 +8908,22 @@ var WORKFLOW_SCHEMA = {
|
|
|
8668
8908
|
},
|
|
8669
8909
|
then: WORKFLOW_HTTP_TASK_SCHEMA()
|
|
8670
8910
|
},
|
|
8671
|
-
...Object.values(
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
|
-
|
|
8675
|
-
|
|
8676
|
-
|
|
8677
|
-
|
|
8678
|
-
|
|
8679
|
-
|
|
8680
|
-
|
|
8681
|
-
|
|
8682
|
-
|
|
8683
|
-
|
|
8684
|
-
|
|
8911
|
+
...Object.values(WorkflowItemsConfiguration.config.tasks).map(
|
|
8912
|
+
(config2) => {
|
|
8913
|
+
var _a, _b;
|
|
8914
|
+
return {
|
|
8915
|
+
if: {
|
|
8916
|
+
properties: {
|
|
8917
|
+
type: { const: WorkflowDefinitionTaskType9.http },
|
|
8918
|
+
name: { const: config2.key }
|
|
8919
|
+
}
|
|
8920
|
+
},
|
|
8921
|
+
then: WORKFLOW_HTTP_TASK_SCHEMA(config2.key, {
|
|
8922
|
+
body: (_b = (_a = config2.specification.input) == null ? void 0 : _a.properties) == null ? void 0 : _b.body
|
|
8923
|
+
})
|
|
8924
|
+
};
|
|
8925
|
+
}
|
|
8926
|
+
)
|
|
8685
8927
|
]
|
|
8686
8928
|
}
|
|
8687
8929
|
},
|
|
@@ -8769,92 +9011,65 @@ var WORKFLOW_SCHEMA = {
|
|
|
8769
9011
|
description: "This object holds the declaration of your workflow trigger.",
|
|
8770
9012
|
default: {},
|
|
8771
9013
|
allOf: [
|
|
8772
|
-
...Object.values(
|
|
8773
|
-
|
|
8774
|
-
|
|
8775
|
-
|
|
8776
|
-
|
|
8777
|
-
|
|
8778
|
-
|
|
8779
|
-
|
|
8780
|
-
|
|
8781
|
-
|
|
8782
|
-
|
|
8783
|
-
|
|
8784
|
-
|
|
8785
|
-
|
|
8786
|
-
|
|
8787
|
-
|
|
8788
|
-
|
|
8789
|
-
|
|
8790
|
-
|
|
8791
|
-
|
|
8792
|
-
|
|
8793
|
-
|
|
8794
|
-
|
|
8795
|
-
|
|
8796
|
-
|
|
8797
|
-
|
|
8798
|
-
|
|
8799
|
-
|
|
8800
|
-
|
|
8801
|
-
|
|
9014
|
+
...Object.values(WorkflowItemsConfiguration.config.triggers).map(
|
|
9015
|
+
(config2) => {
|
|
9016
|
+
var _a, _b;
|
|
9017
|
+
if (config2.type === "webhook") {
|
|
9018
|
+
return {
|
|
9019
|
+
if: {
|
|
9020
|
+
properties: {
|
|
9021
|
+
type: { const: config2.type }
|
|
9022
|
+
}
|
|
9023
|
+
},
|
|
9024
|
+
then: {
|
|
9025
|
+
required: ["type", "webhook"],
|
|
9026
|
+
properties: {
|
|
9027
|
+
type: { const: "webhook" },
|
|
9028
|
+
webhook: {
|
|
9029
|
+
if: {
|
|
9030
|
+
properties: {
|
|
9031
|
+
source: { const: config2.customization.provider }
|
|
9032
|
+
}
|
|
9033
|
+
},
|
|
9034
|
+
then: {
|
|
9035
|
+
required: ["source", "event", "headers"],
|
|
9036
|
+
properties: {
|
|
9037
|
+
source: { const: config2.customization.provider },
|
|
9038
|
+
event: {
|
|
9039
|
+
if: {
|
|
9040
|
+
properties: {
|
|
9041
|
+
name: { const: config2.name }
|
|
9042
|
+
}
|
|
9043
|
+
},
|
|
9044
|
+
then: (_a = config2.specification.input) != null ? _a : {}
|
|
9045
|
+
}
|
|
8802
9046
|
}
|
|
8803
9047
|
}
|
|
8804
9048
|
}
|
|
8805
9049
|
}
|
|
8806
9050
|
}
|
|
8807
|
-
}
|
|
8808
|
-
}
|
|
8809
|
-
|
|
8810
|
-
|
|
8811
|
-
|
|
8812
|
-
|
|
8813
|
-
|
|
8814
|
-
|
|
8815
|
-
|
|
8816
|
-
}
|
|
8817
|
-
|
|
8818
|
-
|
|
8819
|
-
}
|
|
9051
|
+
};
|
|
9052
|
+
}
|
|
9053
|
+
if (config2.type === "system") {
|
|
9054
|
+
return {
|
|
9055
|
+
if: {
|
|
9056
|
+
properties: {
|
|
9057
|
+
type: { const: config2.type },
|
|
9058
|
+
name: { const: config2.key }
|
|
9059
|
+
}
|
|
9060
|
+
},
|
|
9061
|
+
then: (_b = config2.specification.input) != null ? _b : {}
|
|
9062
|
+
};
|
|
9063
|
+
}
|
|
9064
|
+
throw new Error("Invalid trigger type");
|
|
8820
9065
|
}
|
|
8821
|
-
|
|
8822
|
-
})
|
|
9066
|
+
)
|
|
8823
9067
|
]
|
|
8824
9068
|
}
|
|
8825
9069
|
},
|
|
8826
9070
|
required: ["definition", "trigger"],
|
|
8827
|
-
$defs:
|
|
8828
|
-
|
|
8829
|
-
"x-ref": {
|
|
8830
|
-
request: {
|
|
8831
|
-
url: "http://${credential.server}.mailchimp.com/api/audience",
|
|
8832
|
-
method: "GET",
|
|
8833
|
-
headers: {
|
|
8834
|
-
authorization: "${credential.token}"
|
|
8835
|
-
},
|
|
8836
|
-
body: {}
|
|
8837
|
-
},
|
|
8838
|
-
displayField: "name",
|
|
8839
|
-
valueField: "id"
|
|
8840
|
-
}
|
|
8841
|
-
},
|
|
8842
|
-
mailchimp_campaign: {
|
|
8843
|
-
"x-ref": {
|
|
8844
|
-
request: {
|
|
8845
|
-
url: "http://${credential.server}.mailchimp.com/api/campaign",
|
|
8846
|
-
method: "GET",
|
|
8847
|
-
headers: {
|
|
8848
|
-
authorization: "${credential.token}"
|
|
8849
|
-
},
|
|
8850
|
-
body: {}
|
|
8851
|
-
},
|
|
8852
|
-
displayField: "name",
|
|
8853
|
-
valueField: "id"
|
|
8854
|
-
}
|
|
8855
|
-
}
|
|
8856
|
-
}
|
|
8857
|
-
};
|
|
9071
|
+
$defs: WORKFLOW_SCHEMA_DEFS.$defs
|
|
9072
|
+
});
|
|
8858
9073
|
var JSON_FILE_NAME = "file:///workflow.json";
|
|
8859
9074
|
function configureMonaco(monaco) {
|
|
8860
9075
|
monaco.languages.typescript.javascriptDefaults.setEagerModelSync(true);
|
|
@@ -8871,7 +9086,7 @@ function configureMonaco(monaco) {
|
|
|
8871
9086
|
// id of the first schema
|
|
8872
9087
|
fileMatch: [modelUri.toString()],
|
|
8873
9088
|
// associate with our model
|
|
8874
|
-
schema: WORKFLOW_SCHEMA
|
|
9089
|
+
schema: WORKFLOW_SCHEMA()
|
|
8875
9090
|
}
|
|
8876
9091
|
]
|
|
8877
9092
|
});
|
|
@@ -9274,9 +9489,7 @@ function useWorkflowData(workflow) {
|
|
|
9274
9489
|
}
|
|
9275
9490
|
|
|
9276
9491
|
// src/views/Flows/Definitions/Common/Builder/Context/state/metadata/framing/utils.ts
|
|
9277
|
-
import {
|
|
9278
|
-
IntegrationNames as IntegrationNames8
|
|
9279
|
-
} from "@livechat/developer-studio-api";
|
|
9492
|
+
import { IntegrationNames as IntegrationNames8 } from "@livechat/developer-studio-api";
|
|
9280
9493
|
|
|
9281
9494
|
// src/views/Flows/Definitions/Common/Builder/config/utils.ts
|
|
9282
9495
|
import { JSONPath } from "jsonpath-plus";
|
|
@@ -9497,7 +9710,7 @@ var workflowBuilderUtils = {
|
|
|
9497
9710
|
return result;
|
|
9498
9711
|
},
|
|
9499
9712
|
getTaskConfig(task2) {
|
|
9500
|
-
return
|
|
9713
|
+
return WorkflowItemsConfiguration.config.tasks[task2.name];
|
|
9501
9714
|
},
|
|
9502
9715
|
getTaskConfigByReference(value) {
|
|
9503
9716
|
const segments = value.split(".");
|
|
@@ -9505,7 +9718,7 @@ var workflowBuilderUtils = {
|
|
|
9505
9718
|
return;
|
|
9506
9719
|
}
|
|
9507
9720
|
const referenceName = segments[0].split("_").slice(0, -1).join("_");
|
|
9508
|
-
const task2 = Object.values(
|
|
9721
|
+
const task2 = Object.values(WorkflowItemsConfiguration.templates).flatMap((x) => Object.values(x)).find((task3) => task3.taskReferenceName === referenceName);
|
|
9509
9722
|
if (!task2) {
|
|
9510
9723
|
return;
|
|
9511
9724
|
}
|
|
@@ -9513,9 +9726,9 @@ var workflowBuilderUtils = {
|
|
|
9513
9726
|
},
|
|
9514
9727
|
getTriggerConfig(trigger) {
|
|
9515
9728
|
if (trigger.type === "webhook" && trigger.webhook) {
|
|
9516
|
-
return
|
|
9729
|
+
return WorkflowItemsConfiguration.config.triggers[`${trigger.webhook.source}-${trigger.webhook.event.name}`];
|
|
9517
9730
|
}
|
|
9518
|
-
const triggers = Object.values(
|
|
9731
|
+
const triggers = Object.values(WorkflowItemsConfiguration.config.triggers);
|
|
9519
9732
|
switch (trigger.type) {
|
|
9520
9733
|
case "recurring":
|
|
9521
9734
|
return triggers.find((x) => x.key === "scheduled" /* Scheduled */);
|
|
@@ -9536,10 +9749,10 @@ var workflowBuilderUtils = {
|
|
|
9536
9749
|
}
|
|
9537
9750
|
};
|
|
9538
9751
|
}
|
|
9539
|
-
const
|
|
9752
|
+
const config2 = workflowBuilderUtils.getTriggerConfig({
|
|
9540
9753
|
type: "manual_only"
|
|
9541
9754
|
});
|
|
9542
|
-
return
|
|
9755
|
+
return config2;
|
|
9543
9756
|
},
|
|
9544
9757
|
getItemConfig(item) {
|
|
9545
9758
|
var _a;
|
|
@@ -9856,9 +10069,7 @@ var useUpdateOrganizationProducts = () => {
|
|
|
9856
10069
|
// src/views/Flows/Definitions/Common/Builder/Context/state/metadata/validation/utils.ts
|
|
9857
10070
|
import Ajv from "ajv";
|
|
9858
10071
|
import AjvWithErrors from "ajv-errors";
|
|
9859
|
-
import {
|
|
9860
|
-
IntegrationNames as IntegrationNames9
|
|
9861
|
-
} from "@livechat/developer-studio-api";
|
|
10072
|
+
import { IntegrationNames as IntegrationNames9 } from "@livechat/developer-studio-api";
|
|
9862
10073
|
var ajv = AjvWithErrors(
|
|
9863
10074
|
new Ajv({
|
|
9864
10075
|
strict: false,
|
|
@@ -9907,7 +10118,7 @@ var getWorkflowValidationErrors = (validationErrors) => {
|
|
|
9907
10118
|
return errors;
|
|
9908
10119
|
};
|
|
9909
10120
|
var getSchemaError = (workflow, frames) => {
|
|
9910
|
-
const validate = ajv.compile(WORKFLOW_SCHEMA);
|
|
10121
|
+
const validate = ajv.compile(WORKFLOW_SCHEMA());
|
|
9911
10122
|
const resolved = __spreadProps(__spreadValues({}, workflow), {
|
|
9912
10123
|
definition: __spreadProps(__spreadValues({}, workflow.definition), {
|
|
9913
10124
|
tasks: workflow.definition.tasks.map(
|
|
@@ -9936,7 +10147,7 @@ var getTasksErrors = (workflow, frames, products) => {
|
|
|
9936
10147
|
var _a;
|
|
9937
10148
|
const globalFrame = frames.global;
|
|
9938
10149
|
const frame = frames.tasks[task2.taskReferenceName];
|
|
9939
|
-
const
|
|
10150
|
+
const config2 = (_a = frame.__meta) == null ? void 0 : _a.config;
|
|
9940
10151
|
const resolvingErrors = workflowBuilderUtils.getMatchesInObject(task2).map((match2) => {
|
|
9941
10152
|
const segments = match2.rawValue.split(".");
|
|
9942
10153
|
const resolved = workflowBuilderUtils.resolveTextByContext(
|
|
@@ -10006,10 +10217,10 @@ var getTasksErrors = (workflow, frames, products) => {
|
|
|
10006
10217
|
params: {}
|
|
10007
10218
|
};
|
|
10008
10219
|
});
|
|
10009
|
-
const activationError =
|
|
10220
|
+
const activationError = config2 && config2.customization.provider.startsWith(IntegrationNames9.Text) && !products.find(({ product }) => product === config2.customization.product) ? {
|
|
10010
10221
|
instancePath: `/definition/tasks/${index}`,
|
|
10011
10222
|
keyword: "activation",
|
|
10012
|
-
message: `${
|
|
10223
|
+
message: `${config2.customization.product} not activated`,
|
|
10013
10224
|
params: {}
|
|
10014
10225
|
} : void 0;
|
|
10015
10226
|
return [
|
|
@@ -10022,7 +10233,7 @@ var getTasksErrors = (workflow, frames, products) => {
|
|
|
10022
10233
|
var getTriggerErrors = (workflow, frames, products) => {
|
|
10023
10234
|
var _a;
|
|
10024
10235
|
const frame = frames.trigger;
|
|
10025
|
-
const
|
|
10236
|
+
const config2 = (_a = frame == null ? void 0 : frame.__meta) == null ? void 0 : _a.config;
|
|
10026
10237
|
const resolvingErrors = workflowBuilderUtils.getMatchesInObject(workflow.trigger).map((match2) => {
|
|
10027
10238
|
const segments = match2.rawValue.split(".");
|
|
10028
10239
|
const resolved = workflowBuilderUtils.resolveTextByContext(
|
|
@@ -10070,13 +10281,12 @@ var getTriggerErrors = (workflow, frames, products) => {
|
|
|
10070
10281
|
params: {}
|
|
10071
10282
|
};
|
|
10072
10283
|
});
|
|
10073
|
-
const activationError =
|
|
10284
|
+
const activationError = config2 && config2.customization.provider.startsWith(IntegrationNames9.Text) && !products.find(({ product }) => product === config2.customization.product) ? {
|
|
10074
10285
|
instancePath: `/trigger`,
|
|
10075
10286
|
keyword: "activation",
|
|
10076
|
-
message: `${
|
|
10287
|
+
message: `${config2.customization.product} not activated`,
|
|
10077
10288
|
params: {}
|
|
10078
10289
|
} : void 0;
|
|
10079
|
-
console.log("activationError: ", activationError);
|
|
10080
10290
|
return [
|
|
10081
10291
|
...resolvingErrors,
|
|
10082
10292
|
...connectionErrors,
|
|
@@ -10247,11 +10457,12 @@ function WorkflowContextProviderBase({
|
|
|
10247
10457
|
updaters: { setWorkflow, setAction, setSelection }
|
|
10248
10458
|
} = useWorkflowState(workflow, options2);
|
|
10249
10459
|
const autosaveStateRef = useRef2(state);
|
|
10250
|
-
const
|
|
10460
|
+
const autosaveWorkflowRef = useRef2(
|
|
10251
10461
|
debounce(() => __async(this, null, function* () {
|
|
10252
10462
|
yield save(true);
|
|
10253
10463
|
}), 500)
|
|
10254
|
-
)
|
|
10464
|
+
);
|
|
10465
|
+
const autosaveWorkflow = autosaveWorkflowRef.current;
|
|
10255
10466
|
useEffect2(() => {
|
|
10256
10467
|
return () => {
|
|
10257
10468
|
autosaveWorkflow.cancel();
|
|
@@ -10345,16 +10556,16 @@ function WorkflowContextProviderBase({
|
|
|
10345
10556
|
const replaceWorkflow = useCallback2(
|
|
10346
10557
|
(workflow2) => {
|
|
10347
10558
|
setWorkflow(workflow2);
|
|
10348
|
-
|
|
10559
|
+
autosaveWorkflowRef.current();
|
|
10349
10560
|
},
|
|
10350
|
-
[
|
|
10561
|
+
[autosaveWorkflowRef, setWorkflow]
|
|
10351
10562
|
);
|
|
10352
10563
|
const changeWorkflow = useCallback2(
|
|
10353
10564
|
(change) => {
|
|
10354
10565
|
setWorkflow((prevState) => applyChange(prevState, change(prevState)));
|
|
10355
|
-
|
|
10566
|
+
autosaveWorkflowRef.current();
|
|
10356
10567
|
},
|
|
10357
|
-
[
|
|
10568
|
+
[autosaveWorkflowRef, setWorkflow]
|
|
10358
10569
|
);
|
|
10359
10570
|
const goToAddTrigger = useCallback2(() => {
|
|
10360
10571
|
navigate(
|
|
@@ -12505,10 +12716,10 @@ import { Row as Row6 } from "@livechat/developer-studio-ui-react";
|
|
|
12505
12716
|
function convertToTreeNode(obj, meta, nodeName, path) {
|
|
12506
12717
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
12507
12718
|
const index = (_a = obj.__meta) == null ? void 0 : _a.index;
|
|
12508
|
-
const
|
|
12719
|
+
const config2 = (_b = obj.__meta) == null ? void 0 : _b.config;
|
|
12509
12720
|
const properties = (_c = obj.__meta) == null ? void 0 : _c.properties;
|
|
12510
12721
|
const currentSpec = meta.specification;
|
|
12511
|
-
const customization =
|
|
12722
|
+
const customization = config2 == null ? void 0 : config2.customization;
|
|
12512
12723
|
const node2 = meta.dummy ? {
|
|
12513
12724
|
type: typeof obj,
|
|
12514
12725
|
name: nodeName,
|
|
@@ -12526,7 +12737,7 @@ function convertToTreeNode(obj, meta, nodeName, path) {
|
|
|
12526
12737
|
path: `${path != null ? path : ""}`,
|
|
12527
12738
|
relativePath: meta.baseRelativePath && path && path.startsWith(meta.baseRelativePath) ? path.replace(`${meta.baseRelativePath}.`, "") : "",
|
|
12528
12739
|
children: [],
|
|
12529
|
-
canAddChildren: (_g =
|
|
12740
|
+
canAddChildren: (_g = config2 == null ? void 0 : config2.specification) == null ? void 0 : _g.additionalProperties,
|
|
12530
12741
|
__meta: {
|
|
12531
12742
|
source: {
|
|
12532
12743
|
index: index != null ? index : meta.index,
|
|
@@ -12727,6 +12938,7 @@ function CustomTagsPicker({
|
|
|
12727
12938
|
|
|
12728
12939
|
// src/views/Flows/Definitions/Common/Builder/Editors/Visual/Forms/Schema/overrides/Fields/CustomTags/TagsInput/Input.tsx
|
|
12729
12940
|
import { useCallback as useCallback5, useEffect as useEffect4, useRef as useRef5 } from "react";
|
|
12941
|
+
import debounce3 from "lodash.debounce";
|
|
12730
12942
|
import { Tooltip as Tooltip3 } from "@livechat/design-system-react-components";
|
|
12731
12943
|
|
|
12732
12944
|
// src/views/Flows/Definitions/Common/Builder/Editors/Visual/Forms/Schema/overrides/Fields/CustomTags/TagsInput/Tag/Icon.tsx
|
|
@@ -13007,64 +13219,64 @@ function TagifyWrapper({
|
|
|
13007
13219
|
};
|
|
13008
13220
|
}, []);
|
|
13009
13221
|
useEffect3(() => {
|
|
13010
|
-
tagify.current.off("change"
|
|
13222
|
+
tagify.current.off("change").on("change", onChange);
|
|
13011
13223
|
}, [onChange]);
|
|
13012
13224
|
useEffect3(() => {
|
|
13013
|
-
tagify.current.off("input"
|
|
13225
|
+
tagify.current.off("input").on("input", onInput);
|
|
13014
13226
|
}, [onInput]);
|
|
13015
13227
|
useEffect3(() => {
|
|
13016
|
-
tagify.current.off("add"
|
|
13228
|
+
tagify.current.off("add").on("add", onAdd);
|
|
13017
13229
|
}, [onAdd]);
|
|
13018
13230
|
useEffect3(() => {
|
|
13019
|
-
tagify.current.off("remove"
|
|
13231
|
+
tagify.current.off("remove").on("remove", onRemove);
|
|
13020
13232
|
}, [onRemove]);
|
|
13021
13233
|
useEffect3(() => {
|
|
13022
|
-
tagify.current.off("invalid"
|
|
13234
|
+
tagify.current.off("invalid").on("invalid", onInvalid);
|
|
13023
13235
|
}, [onInvalid]);
|
|
13024
13236
|
useEffect3(() => {
|
|
13025
|
-
tagify.current.off("keydown"
|
|
13237
|
+
tagify.current.off("keydown").on("keydown", onKeydown);
|
|
13026
13238
|
}, [onKeydown]);
|
|
13027
13239
|
useEffect3(() => {
|
|
13028
|
-
tagify.current.off("focus"
|
|
13240
|
+
tagify.current.off("focus").on("focus", onFocus);
|
|
13029
13241
|
}, [onFocus]);
|
|
13030
13242
|
useEffect3(() => {
|
|
13031
|
-
tagify.current.off("blur"
|
|
13243
|
+
tagify.current.off("blur").on("blur", onBlur);
|
|
13032
13244
|
}, [onBlur]);
|
|
13033
13245
|
useEffect3(() => {
|
|
13034
|
-
tagify.current.off("click"
|
|
13246
|
+
tagify.current.off("click").on("click", onClick);
|
|
13035
13247
|
}, [onClick]);
|
|
13036
13248
|
useEffect3(() => {
|
|
13037
|
-
tagify.current.off("edit:input"
|
|
13249
|
+
tagify.current.off("edit:input").on("edit:input", onEditInput);
|
|
13038
13250
|
}, [onEditInput]);
|
|
13039
13251
|
useEffect3(() => {
|
|
13040
|
-
tagify.current.off("edit:beforeUpdate"
|
|
13252
|
+
tagify.current.off("edit:beforeUpdate").on("edit:beforeUpdate", onEditBeforeUpdate);
|
|
13041
13253
|
}, [onEditBeforeUpdate]);
|
|
13042
13254
|
useEffect3(() => {
|
|
13043
|
-
tagify.current.off("edit:updated"
|
|
13255
|
+
tagify.current.off("edit:updated").on("edit:updated", onEditUpdated);
|
|
13044
13256
|
}, [onEditUpdated]);
|
|
13045
13257
|
useEffect3(() => {
|
|
13046
|
-
tagify.current.off("edit:start"
|
|
13258
|
+
tagify.current.off("edit:start").on("edit:start", onEditStart);
|
|
13047
13259
|
}, [onEditStart]);
|
|
13048
13260
|
useEffect3(() => {
|
|
13049
|
-
tagify.current.off("edit:keydown"
|
|
13261
|
+
tagify.current.off("edit:keydown").on("edit:keydown", onEditKeydown);
|
|
13050
13262
|
}, [onEditKeydown]);
|
|
13051
13263
|
useEffect3(() => {
|
|
13052
|
-
tagify.current.off("dropdown:show"
|
|
13264
|
+
tagify.current.off("dropdown:show").on("dropdown:show", onDropdownShow);
|
|
13053
13265
|
}, [onDropdownShow]);
|
|
13054
13266
|
useEffect3(() => {
|
|
13055
|
-
tagify.current.off("dropdown:hide"
|
|
13267
|
+
tagify.current.off("dropdown:hide").on("dropdown:hide", onDropdownHide);
|
|
13056
13268
|
}, [onDropdownHide]);
|
|
13057
13269
|
useEffect3(() => {
|
|
13058
|
-
tagify.current.off("dropdown:select"
|
|
13270
|
+
tagify.current.off("dropdown:select").on("dropdown:select", onDropdownSelect);
|
|
13059
13271
|
}, [onDropdownSelect]);
|
|
13060
13272
|
useEffect3(() => {
|
|
13061
|
-
tagify.current.off("dropdown:scroll"
|
|
13273
|
+
tagify.current.off("dropdown:scroll").on("dropdown:scroll", onDropdownScroll);
|
|
13062
13274
|
}, [onDropdownScroll]);
|
|
13063
13275
|
useEffect3(() => {
|
|
13064
|
-
tagify.current.off("dropdown:noMatch"
|
|
13276
|
+
tagify.current.off("dropdown:noMatch").on("dropdown:noMatch", onDropdownNoMatch);
|
|
13065
13277
|
}, [onDropdownNoMatch]);
|
|
13066
13278
|
useEffect3(() => {
|
|
13067
|
-
tagify.current.off("dropdown:updated"
|
|
13279
|
+
tagify.current.off("dropdown:updated").on("dropdown:updated", onDropdownUpdated);
|
|
13068
13280
|
}, [onDropdownUpdated]);
|
|
13069
13281
|
useEffect3(() => {
|
|
13070
13282
|
setFocus();
|
|
@@ -13149,23 +13361,23 @@ var Tags_default = Tags;
|
|
|
13149
13361
|
|
|
13150
13362
|
// src/views/Flows/Definitions/Common/Builder/Editors/Visual/Forms/Schema/overrides/Fields/CustomTags/TagsInput/utils.ts
|
|
13151
13363
|
var createTagFromPath = (path, frame) => {
|
|
13152
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
13364
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
13153
13365
|
const segments = path.split(".");
|
|
13154
13366
|
const relativePath = segments.slice(segments[0] === "workflow" ? 2 : 1).join(".");
|
|
13155
13367
|
const contentRelativePath = segments.slice(segments[0] === "workflow" ? segments[2] === "body" ? 3 : 2 : 4).join(".");
|
|
13156
|
-
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;
|
|
13157
|
-
const
|
|
13158
|
-
const customization = (
|
|
13159
|
-
const specification = (
|
|
13368
|
+
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;
|
|
13369
|
+
const config2 = workflowBuilderUtils.getItemConfigByReference(path);
|
|
13370
|
+
const customization = (_d = (_c = meta == null ? void 0 : meta.config) == null ? void 0 : _c.customization) != null ? _d : config2 == null ? void 0 : config2.customization;
|
|
13371
|
+
const specification = (_i = workflowBuilderUtils.extractByPath(
|
|
13160
13372
|
relativePath.split(".").join(".properties."),
|
|
13161
|
-
(
|
|
13162
|
-
)) == null ? void 0 :
|
|
13373
|
+
(_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
|
|
13374
|
+
)) == null ? void 0 : _i[0];
|
|
13163
13375
|
const data = specification ? {
|
|
13164
|
-
title: (
|
|
13376
|
+
title: (_k = (_j = specification.title) != null ? _j : segments.at(-1)) != null ? _k : "",
|
|
13165
13377
|
type: specification.type,
|
|
13166
13378
|
description: specification.description
|
|
13167
13379
|
} : {
|
|
13168
|
-
title: (
|
|
13380
|
+
title: (_l = segments.at(-1)) != null ? _l : ""
|
|
13169
13381
|
};
|
|
13170
13382
|
let invalid = false;
|
|
13171
13383
|
let invalidReason = "";
|
|
@@ -13183,7 +13395,7 @@ var createTagFromPath = (path, frame) => {
|
|
|
13183
13395
|
path: relativePath,
|
|
13184
13396
|
relativePath: contentRelativePath,
|
|
13185
13397
|
name: data.title,
|
|
13186
|
-
type: (
|
|
13398
|
+
type: (_m = data.type) != null ? _m : "",
|
|
13187
13399
|
description: data.description,
|
|
13188
13400
|
invalid,
|
|
13189
13401
|
invalidReason,
|
|
@@ -13272,10 +13484,13 @@ function CustomTagsInput({
|
|
|
13272
13484
|
},
|
|
13273
13485
|
[updateAllIcons]
|
|
13274
13486
|
);
|
|
13275
|
-
const handleChange = useCallback5(
|
|
13276
|
-
|
|
13277
|
-
|
|
13278
|
-
|
|
13487
|
+
const handleChange = useCallback5(
|
|
13488
|
+
debounce3(() => {
|
|
13489
|
+
onChange(getCurrentValue());
|
|
13490
|
+
updateAllIcons();
|
|
13491
|
+
}, 300),
|
|
13492
|
+
[onChange, getCurrentValue, updateAllIcons]
|
|
13493
|
+
);
|
|
13279
13494
|
const handleKeyDown = useCallback5(
|
|
13280
13495
|
(e) => {
|
|
13281
13496
|
if (e.detail.event.key !== "Backspace") {
|
|
@@ -14183,7 +14398,7 @@ function CustomSchemaForm(props) {
|
|
|
14183
14398
|
props.onChange(formData);
|
|
14184
14399
|
},
|
|
14185
14400
|
readonly: props.readonly,
|
|
14186
|
-
schema: __spreadProps(__spreadValues({}, (_a = props.schema) != null ? _a : {}), { $defs:
|
|
14401
|
+
schema: __spreadProps(__spreadValues({}, (_a = props.schema) != null ? _a : {}), { $defs: WORKFLOW_SCHEMA_DEFS.$defs }),
|
|
14187
14402
|
showErrorList: false,
|
|
14188
14403
|
templates: customTemplates,
|
|
14189
14404
|
validator,
|
|
@@ -14310,7 +14525,7 @@ import {
|
|
|
14310
14525
|
DesignToken as DesignToken11,
|
|
14311
14526
|
RadiusToken as RadiusToken3
|
|
14312
14527
|
} from "@livechat/design-system-react-components";
|
|
14313
|
-
import { Fragment as
|
|
14528
|
+
import { Fragment as Fragment7, jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
14314
14529
|
var Wrapper2 = newStyled.div`
|
|
14315
14530
|
&:hover {
|
|
14316
14531
|
cursor: pointer;
|
|
@@ -14386,7 +14601,7 @@ function CustomNode({
|
|
|
14386
14601
|
id,
|
|
14387
14602
|
data
|
|
14388
14603
|
}) {
|
|
14389
|
-
return /* @__PURE__ */ jsxs3(
|
|
14604
|
+
return /* @__PURE__ */ jsxs3(Fragment7, { children: [
|
|
14390
14605
|
/* @__PURE__ */ jsxs3("div", { className: "custom-node__header", children: [
|
|
14391
14606
|
"This is a ",
|
|
14392
14607
|
/* @__PURE__ */ jsx5("strong", { children: "custom node" })
|
|
@@ -14719,7 +14934,7 @@ function CustomSchemaFormWrapper({
|
|
|
14719
14934
|
preselectedTab,
|
|
14720
14935
|
tabsMetadata
|
|
14721
14936
|
}) {
|
|
14722
|
-
const spec = workflowBuilderUtils.getItemConfig(data);
|
|
14937
|
+
const spec = useMemo3(() => workflowBuilderUtils.getItemConfig(data), [data]);
|
|
14723
14938
|
const [selectedTab, setSelectedTab] = useState12(
|
|
14724
14939
|
preselectedTab != null ? preselectedTab : !spec || spec.specification.input ? "parameters" : spec && spec.customization.provider !== OTHER_TYPES.SYSTEM ? "connection" : void 0
|
|
14725
14940
|
);
|
|
@@ -15110,8 +15325,8 @@ function SwitchNode({
|
|
|
15110
15325
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
15111
15326
|
const sourceNode = nodes.find((node1) => node1.id === (node2 == null ? void 0 : node2.source));
|
|
15112
15327
|
if (sourceNode) {
|
|
15113
|
-
const
|
|
15114
|
-
const output = (_b = (_a =
|
|
15328
|
+
const config2 = workflowBuilderUtils.getTaskConfig(sourceNode.data);
|
|
15329
|
+
const output = (_b = (_a = config2.specification.output) == null ? void 0 : _a.properties) == null ? void 0 : _b.output;
|
|
15115
15330
|
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;
|
|
15116
15331
|
const inputParameters = (body == null ? void 0 : body.type) === "object" ? body.properties : {};
|
|
15117
15332
|
const formattedInputParameters = {};
|
|
@@ -15711,7 +15926,7 @@ function EditNodeWrapper() {
|
|
|
15711
15926
|
if (!data) {
|
|
15712
15927
|
return /* @__PURE__ */ jsx2(Fragment4, {});
|
|
15713
15928
|
}
|
|
15714
|
-
const
|
|
15929
|
+
const config2 = (_b = frame == null ? void 0 : frame.__meta) == null ? void 0 : _b.config;
|
|
15715
15930
|
const readonly = !workflow.draft;
|
|
15716
15931
|
const contentHandler = () => {
|
|
15717
15932
|
var _a2, _b2;
|
|
@@ -15796,7 +16011,7 @@ function EditNodeWrapper() {
|
|
|
15796
16011
|
);
|
|
15797
16012
|
}
|
|
15798
16013
|
};
|
|
15799
|
-
const revertIconColor = getWorkflowsEnv("isHeadless") && ((
|
|
16014
|
+
const revertIconColor = getWorkflowsEnv("isHeadless") && ((config2 == null ? void 0 : config2.customization.icon) === IntegrationNames14.OpenAI || (config2 == null ? void 0 : config2.customization.icon) === IntegrationNames14.BigCommerce);
|
|
15800
16015
|
return /* @__PURE__ */ jsxs2(Wrapper3, { children: [
|
|
15801
16016
|
/* @__PURE__ */ jsxs2(Row11, { center: true, setRowPadding: "12px 24px", spaceBetween: true, children: [
|
|
15802
16017
|
/* @__PURE__ */ jsx2(
|
|
@@ -15806,13 +16021,13 @@ function EditNodeWrapper() {
|
|
|
15806
16021
|
max-width: 80%;
|
|
15807
16022
|
`,
|
|
15808
16023
|
children: /* @__PURE__ */ jsxs2(Title6, { children: [
|
|
15809
|
-
(
|
|
16024
|
+
(config2 == null ? void 0 : config2.customization.product) ? /* @__PURE__ */ jsx2(
|
|
15810
16025
|
ProductIcon_default,
|
|
15811
16026
|
{
|
|
15812
16027
|
center: true,
|
|
15813
16028
|
disabled: false,
|
|
15814
16029
|
height: 10,
|
|
15815
|
-
product:
|
|
16030
|
+
product: config2.customization.icon,
|
|
15816
16031
|
revertColors: revertIconColor,
|
|
15817
16032
|
width: 10
|
|
15818
16033
|
}
|
|
@@ -15829,9 +16044,9 @@ function EditNodeWrapper() {
|
|
|
15829
16044
|
/* @__PURE__ */ jsxs2(Column10, { noFlexBasis: true, notPadded: true, children: [
|
|
15830
16045
|
/* @__PURE__ */ jsxs2("strong", { children: [
|
|
15831
16046
|
((_c = frame == null ? void 0 : frame.__meta) == null ? void 0 : _c.index) !== void 0 ? `${frame.__meta.index}. ` : "",
|
|
15832
|
-
(_d =
|
|
16047
|
+
(_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" : ""
|
|
15833
16048
|
] }),
|
|
15834
|
-
(_e =
|
|
16049
|
+
(_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" : ""
|
|
15835
16050
|
] })
|
|
15836
16051
|
] })
|
|
15837
16052
|
}
|
|
@@ -16470,7 +16685,6 @@ var OneMessagesProvider = ({
|
|
|
16470
16685
|
const { user } = useUserContext3();
|
|
16471
16686
|
const isLoading = generateAiResponseMutation.isLoading;
|
|
16472
16687
|
const sendMessage = (message) => __async(void 0, null, function* () {
|
|
16473
|
-
const config12 = getWorkflowsConfig();
|
|
16474
16688
|
setIsError(null);
|
|
16475
16689
|
setEvents((prevEvents) => [
|
|
16476
16690
|
...prevEvents,
|
|
@@ -16490,7 +16704,7 @@ var OneMessagesProvider = ({
|
|
|
16490
16704
|
]);
|
|
16491
16705
|
try {
|
|
16492
16706
|
const response = yield generateAiResponseMutation.mutateAsync({
|
|
16493
|
-
agent_id:
|
|
16707
|
+
agent_id: getWorkflowsEnv("aiAgentId"),
|
|
16494
16708
|
account_id: user == null ? void 0 : user.auth.account_id,
|
|
16495
16709
|
organization: user == null ? void 0 : user.auth.organization_id,
|
|
16496
16710
|
token: user == null ? void 0 : user.auth.access_token,
|
|
@@ -16733,7 +16947,7 @@ import { useRef as useRef8 } from "react";
|
|
|
16733
16947
|
|
|
16734
16948
|
// src/views/Flows/Definitions/Common/One/hooks/use-scroll.ts
|
|
16735
16949
|
import { useCallback as useCallback11, useEffect as useEffect11, useRef as useRef7 } from "react";
|
|
16736
|
-
import
|
|
16950
|
+
import debounce4 from "lodash.debounce";
|
|
16737
16951
|
var useScroll = ({
|
|
16738
16952
|
oneChatFeedRef,
|
|
16739
16953
|
groupedEvents,
|
|
@@ -16789,7 +17003,7 @@ var useScroll = ({
|
|
|
16789
17003
|
currentScrollPosition.current = (_a = container2.scrollTop) != null ? _a : null;
|
|
16790
17004
|
isScrolledToBottom.current = container2.scrollHeight - container2.scrollTop - container2.clientHeight < 1;
|
|
16791
17005
|
};
|
|
16792
|
-
const debouncedScroll =
|
|
17006
|
+
const debouncedScroll = debounce4(handleScroll, 200);
|
|
16793
17007
|
return {
|
|
16794
17008
|
handleScroll: debouncedScroll,
|
|
16795
17009
|
handleScrollToBottom: scrollToBottom
|
|
@@ -18237,7 +18451,7 @@ import { useState as useState24 } from "react";
|
|
|
18237
18451
|
import { useLocation as useLocation3, useNavigate as useNavigate5 } from "react-router-dom";
|
|
18238
18452
|
import { Controls as Controls2 } from "reactflow";
|
|
18239
18453
|
import { SegmentedControl } from "@livechat/design-system-react-components";
|
|
18240
|
-
import { Fragment as
|
|
18454
|
+
import { Fragment as Fragment14, jsx as jsx9 } from "react/jsx-runtime";
|
|
18241
18455
|
function SwitcherControls({
|
|
18242
18456
|
isDraft,
|
|
18243
18457
|
hasRelatedWorkflow,
|
|
@@ -18280,7 +18494,7 @@ function SwitcherControls({
|
|
|
18280
18494
|
}
|
|
18281
18495
|
};
|
|
18282
18496
|
if (!visibility.switcher || !isDraft && !hasRelatedWorkflow) {
|
|
18283
|
-
return /* @__PURE__ */ jsx9(
|
|
18497
|
+
return /* @__PURE__ */ jsx9(Fragment14, {});
|
|
18284
18498
|
}
|
|
18285
18499
|
const handleVersionClick = (id) => {
|
|
18286
18500
|
if (id === "draft" && isDraft) {
|
|
@@ -18379,7 +18593,7 @@ var Edges_default = CustomEdge_default;
|
|
|
18379
18593
|
|
|
18380
18594
|
// src/views/Flows/Definitions/Common/Builder/Editors/Visual/Diagram/Diagram.tsx
|
|
18381
18595
|
import "reactflow/dist/style.css";
|
|
18382
|
-
import { Fragment as
|
|
18596
|
+
import { Fragment as Fragment16, jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
18383
18597
|
var nodeConfig = {
|
|
18384
18598
|
[WorkflowDefinitionTaskType14.http]: Node_default2,
|
|
18385
18599
|
[WorkflowDefinitionTaskType14.forkJoin]: Node_default,
|
|
@@ -18468,7 +18682,7 @@ function Diagram({
|
|
|
18468
18682
|
if (!workflow.draft && isRawEditorVisible) {
|
|
18469
18683
|
onRawEditorToggle && onRawEditorToggle();
|
|
18470
18684
|
}
|
|
18471
|
-
return /* @__PURE__ */ jsxs5(
|
|
18685
|
+
return /* @__PURE__ */ jsxs5(Fragment16, { children: [
|
|
18472
18686
|
/* @__PURE__ */ jsxs5(
|
|
18473
18687
|
ReactFlow,
|
|
18474
18688
|
{
|
|
@@ -18964,7 +19178,7 @@ function ExecuteWorkflow({ workflow, onClose }) {
|
|
|
18964
19178
|
var Execute_default = ExecuteWorkflow;
|
|
18965
19179
|
|
|
18966
19180
|
// src/views/Flows/Definitions/Edit/Tasks/Add.tsx
|
|
18967
|
-
import { useEffect as useEffect15, useState as useState26 } from "react";
|
|
19181
|
+
import { useEffect as useEffect15, useMemo as useMemo5, useState as useState26 } from "react";
|
|
18968
19182
|
import { NavLink, useLocation as useLocation5, useNavigate as useNavigate8, useParams as useParams2 } from "react-router-dom";
|
|
18969
19183
|
import {
|
|
18970
19184
|
Button as Button26,
|
|
@@ -19075,117 +19289,148 @@ function AddWorkflowTaskOptions({
|
|
|
19075
19289
|
var Options_default = AddWorkflowTaskOptions;
|
|
19076
19290
|
|
|
19077
19291
|
// src/views/Flows/Definitions/Edit/Tasks/Add.tsx
|
|
19078
|
-
var config9 = [
|
|
19079
|
-
// {
|
|
19080
|
-
// name: 'system',
|
|
19081
|
-
// displayName: 'System tasks',
|
|
19082
|
-
// icon: (
|
|
19083
|
-
// <ProductIcon
|
|
19084
|
-
// product={OTHER_TYPES.SYSTEM}
|
|
19085
|
-
// center={undefined}
|
|
19086
|
-
// height={5}
|
|
19087
|
-
// width={5}
|
|
19088
|
-
// disabled={undefined}
|
|
19089
|
-
// />
|
|
19090
|
-
// ),
|
|
19091
|
-
// values: Object.values(systemTaskConfigs).map((x) => ({
|
|
19092
|
-
// key: x.key,
|
|
19093
|
-
// name: x.customization.displayName,
|
|
19094
|
-
// shortDescription: x.customization.shortDescription,
|
|
19095
|
-
// secondaryText: x.customization.description,
|
|
19096
|
-
// })),
|
|
19097
|
-
// },
|
|
19098
|
-
{
|
|
19099
|
-
name: PRODUCT_TYPE.LC,
|
|
19100
|
-
displayName: PRODUCT_NAMES.livechat,
|
|
19101
|
-
icon: /* @__PURE__ */ jsx2(ProductIcon_default, { height: 5, product: PRODUCT_TYPE.LC, width: 5 }),
|
|
19102
|
-
values: Object.values(livechatTaskConfigs).map((x) => ({
|
|
19103
|
-
key: x.key,
|
|
19104
|
-
name: x.customization.displayName,
|
|
19105
|
-
shortDescription: x.customization.shortDescription,
|
|
19106
|
-
secondaryText: x.customization.description
|
|
19107
|
-
}))
|
|
19108
|
-
},
|
|
19109
|
-
{
|
|
19110
|
-
name: PRODUCT_TYPE.HD,
|
|
19111
|
-
displayName: PRODUCT_NAMES.helpdesk,
|
|
19112
|
-
icon: /* @__PURE__ */ jsx2(ProductIcon_default, { center: true, height: 5, product: PRODUCT_TYPE.HD, width: 5 }),
|
|
19113
|
-
values: Object.values(helpdeskTaskConfigs).map((x) => ({
|
|
19114
|
-
key: x.key,
|
|
19115
|
-
name: x.customization.displayName,
|
|
19116
|
-
shortDescription: x.customization.shortDescription,
|
|
19117
|
-
secondaryText: x.customization.description
|
|
19118
|
-
}))
|
|
19119
|
-
},
|
|
19120
|
-
{
|
|
19121
|
-
name: OTHER_PRODUCT_TYPE.OPENAI,
|
|
19122
|
-
displayName: "OpenAI",
|
|
19123
|
-
icon: /* @__PURE__ */ jsx2(ProductIcon_default, { height: 5, product: OTHER_PRODUCT_TYPE.OPENAI, width: 5 }),
|
|
19124
|
-
values: Object.values(openAiTaskConfigs).map((x) => ({
|
|
19125
|
-
key: x.key,
|
|
19126
|
-
name: x.customization.displayName,
|
|
19127
|
-
shortDescription: x.customization.shortDescription,
|
|
19128
|
-
secondaryText: x.customization.description
|
|
19129
|
-
}))
|
|
19130
|
-
},
|
|
19131
|
-
{
|
|
19132
|
-
name: IntegrationNames15.Mailchimp,
|
|
19133
|
-
displayName: IntegrationDisplayNames5.Mailchimp,
|
|
19134
|
-
icon: /* @__PURE__ */ jsx2(ProductIcon_default, { height: 5, product: IntegrationNames15.Mailchimp, width: 5 }),
|
|
19135
|
-
values: Object.values(mailchimpTaskConfigs).map((x) => ({
|
|
19136
|
-
key: x.key,
|
|
19137
|
-
name: x.customization.displayName,
|
|
19138
|
-
shortDescription: x.customization.shortDescription,
|
|
19139
|
-
secondaryText: x.customization.description
|
|
19140
|
-
}))
|
|
19141
|
-
},
|
|
19142
|
-
{
|
|
19143
|
-
name: IntegrationNames15.HubSpot,
|
|
19144
|
-
displayName: IntegrationDisplayNames5.HubSpot,
|
|
19145
|
-
icon: /* @__PURE__ */ jsx2(ProductIcon_default, { height: 5, product: IntegrationNames15.HubSpot, width: 5 }),
|
|
19146
|
-
values: Object.values(hubspotTaskConfigs).map((x) => ({
|
|
19147
|
-
key: x.key,
|
|
19148
|
-
name: x.customization.displayName,
|
|
19149
|
-
shortDescription: x.customization.shortDescription,
|
|
19150
|
-
secondaryText: x.customization.description
|
|
19151
|
-
}))
|
|
19152
|
-
},
|
|
19153
|
-
{
|
|
19154
|
-
name: IntegrationNames15.BigCommerce,
|
|
19155
|
-
displayName: IntegrationDisplayNames5.BigCommerce,
|
|
19156
|
-
icon: /* @__PURE__ */ jsx2(
|
|
19157
|
-
ProductIcon_default,
|
|
19158
|
-
{
|
|
19159
|
-
height: 5,
|
|
19160
|
-
product: IntegrationNames15.BigCommerce,
|
|
19161
|
-
width: 5
|
|
19162
|
-
}
|
|
19163
|
-
),
|
|
19164
|
-
values: Object.values(bigCommerceTaskConfigs).map((x) => ({
|
|
19165
|
-
key: x.key,
|
|
19166
|
-
name: x.customization.displayName,
|
|
19167
|
-
shortDescription: x.customization.shortDescription,
|
|
19168
|
-
secondaryText: x.customization.description
|
|
19169
|
-
}))
|
|
19170
|
-
},
|
|
19171
|
-
{
|
|
19172
|
-
name: IntegrationNames15.Shopify,
|
|
19173
|
-
displayName: IntegrationDisplayNames5.Shopify,
|
|
19174
|
-
icon: /* @__PURE__ */ jsx2(ProductIcon_default, { height: 5, product: IntegrationNames15.Shopify, width: 5 }),
|
|
19175
|
-
values: Object.values(shopifyTaskConfigs).map((x) => ({
|
|
19176
|
-
key: x.key,
|
|
19177
|
-
name: x.customization.displayName,
|
|
19178
|
-
shortDescription: x.customization.shortDescription,
|
|
19179
|
-
secondaryText: x.customization.description
|
|
19180
|
-
}))
|
|
19181
|
-
}
|
|
19182
|
-
];
|
|
19183
19292
|
function AddWorkflowTask({ basePath, onClose }) {
|
|
19184
19293
|
const [search, setSearch] = useState26("");
|
|
19185
19294
|
const location = useLocation5();
|
|
19186
19295
|
const navigate = useNavigate8();
|
|
19187
19296
|
const params = useParams2();
|
|
19188
19297
|
const [state, setState] = useState26();
|
|
19298
|
+
const config2 = useMemo5(
|
|
19299
|
+
() => [
|
|
19300
|
+
// {
|
|
19301
|
+
// name: 'system',
|
|
19302
|
+
// displayName: 'System tasks',
|
|
19303
|
+
// icon: (
|
|
19304
|
+
// <ProductIcon
|
|
19305
|
+
// product={OTHER_TYPES.SYSTEM}
|
|
19306
|
+
// center={undefined}
|
|
19307
|
+
// height={5}
|
|
19308
|
+
// width={5}
|
|
19309
|
+
// disabled={undefined}
|
|
19310
|
+
// />
|
|
19311
|
+
// ),
|
|
19312
|
+
// values: Object.values(systemTaskConfigs()).map((x) => ({
|
|
19313
|
+
// key: x.key,
|
|
19314
|
+
// name: x.customization.displayName,
|
|
19315
|
+
// shortDescription: x.customization.shortDescription,
|
|
19316
|
+
// secondaryText: x.customization.description,
|
|
19317
|
+
// })),
|
|
19318
|
+
// },
|
|
19319
|
+
{
|
|
19320
|
+
name: PRODUCT_TYPE.LC,
|
|
19321
|
+
displayName: PRODUCT_NAMES.livechat,
|
|
19322
|
+
icon: /* @__PURE__ */ jsx2(ProductIcon_default, { height: 5, product: PRODUCT_TYPE.LC, width: 5 }),
|
|
19323
|
+
values: Object.values(livechatTaskConfigs()).map((x) => ({
|
|
19324
|
+
key: x.key,
|
|
19325
|
+
name: x.customization.displayName,
|
|
19326
|
+
shortDescription: x.customization.shortDescription,
|
|
19327
|
+
secondaryText: x.customization.description
|
|
19328
|
+
}))
|
|
19329
|
+
},
|
|
19330
|
+
{
|
|
19331
|
+
name: PRODUCT_TYPE.HD,
|
|
19332
|
+
displayName: PRODUCT_NAMES.helpdesk,
|
|
19333
|
+
icon: /* @__PURE__ */ jsx2(ProductIcon_default, { center: true, height: 5, product: PRODUCT_TYPE.HD, width: 5 }),
|
|
19334
|
+
values: Object.values(helpdeskTaskConfigs()).map((x) => ({
|
|
19335
|
+
key: x.key,
|
|
19336
|
+
name: x.customization.displayName,
|
|
19337
|
+
shortDescription: x.customization.shortDescription,
|
|
19338
|
+
secondaryText: x.customization.description
|
|
19339
|
+
}))
|
|
19340
|
+
},
|
|
19341
|
+
{
|
|
19342
|
+
name: OTHER_PRODUCT_TYPE.OPENAI,
|
|
19343
|
+
displayName: "OpenAI",
|
|
19344
|
+
icon: /* @__PURE__ */ jsx2(
|
|
19345
|
+
ProductIcon_default,
|
|
19346
|
+
{
|
|
19347
|
+
height: 5,
|
|
19348
|
+
product: OTHER_PRODUCT_TYPE.OPENAI,
|
|
19349
|
+
width: 5
|
|
19350
|
+
}
|
|
19351
|
+
),
|
|
19352
|
+
values: Object.values(openAiTaskConfigs()).map((x) => ({
|
|
19353
|
+
key: x.key,
|
|
19354
|
+
name: x.customization.displayName,
|
|
19355
|
+
shortDescription: x.customization.shortDescription,
|
|
19356
|
+
secondaryText: x.customization.description
|
|
19357
|
+
}))
|
|
19358
|
+
},
|
|
19359
|
+
{
|
|
19360
|
+
name: IntegrationNames15.Mailchimp,
|
|
19361
|
+
displayName: IntegrationDisplayNames5.Mailchimp,
|
|
19362
|
+
icon: /* @__PURE__ */ jsx2(
|
|
19363
|
+
ProductIcon_default,
|
|
19364
|
+
{
|
|
19365
|
+
height: 5,
|
|
19366
|
+
product: IntegrationNames15.Mailchimp,
|
|
19367
|
+
width: 5
|
|
19368
|
+
}
|
|
19369
|
+
),
|
|
19370
|
+
values: Object.values(mailchimpTaskConfigs()).map((x) => ({
|
|
19371
|
+
key: x.key,
|
|
19372
|
+
name: x.customization.displayName,
|
|
19373
|
+
shortDescription: x.customization.shortDescription,
|
|
19374
|
+
secondaryText: x.customization.description
|
|
19375
|
+
}))
|
|
19376
|
+
},
|
|
19377
|
+
{
|
|
19378
|
+
name: IntegrationNames15.HubSpot,
|
|
19379
|
+
displayName: IntegrationDisplayNames5.HubSpot,
|
|
19380
|
+
icon: /* @__PURE__ */ jsx2(
|
|
19381
|
+
ProductIcon_default,
|
|
19382
|
+
{
|
|
19383
|
+
height: 5,
|
|
19384
|
+
product: IntegrationNames15.HubSpot,
|
|
19385
|
+
width: 5
|
|
19386
|
+
}
|
|
19387
|
+
),
|
|
19388
|
+
values: Object.values(hubspotTaskConfigs()).map((x) => ({
|
|
19389
|
+
key: x.key,
|
|
19390
|
+
name: x.customization.displayName,
|
|
19391
|
+
shortDescription: x.customization.shortDescription,
|
|
19392
|
+
secondaryText: x.customization.description
|
|
19393
|
+
}))
|
|
19394
|
+
},
|
|
19395
|
+
{
|
|
19396
|
+
name: IntegrationNames15.BigCommerce,
|
|
19397
|
+
displayName: IntegrationDisplayNames5.BigCommerce,
|
|
19398
|
+
icon: /* @__PURE__ */ jsx2(
|
|
19399
|
+
ProductIcon_default,
|
|
19400
|
+
{
|
|
19401
|
+
height: 5,
|
|
19402
|
+
product: IntegrationNames15.BigCommerce,
|
|
19403
|
+
width: 5
|
|
19404
|
+
}
|
|
19405
|
+
),
|
|
19406
|
+
values: Object.values(bigCommerceTaskConfigs()).map((x) => ({
|
|
19407
|
+
key: x.key,
|
|
19408
|
+
name: x.customization.displayName,
|
|
19409
|
+
shortDescription: x.customization.shortDescription,
|
|
19410
|
+
secondaryText: x.customization.description
|
|
19411
|
+
}))
|
|
19412
|
+
},
|
|
19413
|
+
{
|
|
19414
|
+
name: IntegrationNames15.Shopify,
|
|
19415
|
+
displayName: IntegrationDisplayNames5.Shopify,
|
|
19416
|
+
icon: /* @__PURE__ */ jsx2(
|
|
19417
|
+
ProductIcon_default,
|
|
19418
|
+
{
|
|
19419
|
+
height: 5,
|
|
19420
|
+
product: IntegrationNames15.Shopify,
|
|
19421
|
+
width: 5
|
|
19422
|
+
}
|
|
19423
|
+
),
|
|
19424
|
+
values: Object.values(shopifyTaskConfigs()).map((x) => ({
|
|
19425
|
+
key: x.key,
|
|
19426
|
+
name: x.customization.displayName,
|
|
19427
|
+
shortDescription: x.customization.shortDescription,
|
|
19428
|
+
secondaryText: x.customization.description
|
|
19429
|
+
}))
|
|
19430
|
+
}
|
|
19431
|
+
],
|
|
19432
|
+
[]
|
|
19433
|
+
);
|
|
19189
19434
|
const {
|
|
19190
19435
|
addTask,
|
|
19191
19436
|
state: { workflow }
|
|
@@ -19197,12 +19442,13 @@ function AddWorkflowTask({ basePath, onClose }) {
|
|
|
19197
19442
|
useEffect15(() => {
|
|
19198
19443
|
var _a, _b, _c, _d, _e, _f;
|
|
19199
19444
|
if (!params.task) {
|
|
19200
|
-
const firstTask = (_c = (_b = (_a =
|
|
19445
|
+
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;
|
|
19201
19446
|
navigate(`${basePath}/${params.service}/${firstTask}`, {
|
|
19202
19447
|
state: location.state
|
|
19203
19448
|
});
|
|
19204
19449
|
}
|
|
19205
|
-
const
|
|
19450
|
+
const templates = WorkflowItemsConfiguration.templates;
|
|
19451
|
+
const tasks = params.service ? templates.tasks[params.service] : void 0;
|
|
19206
19452
|
const task2 = params.task && tasks ? tasks[params.task] : void 0;
|
|
19207
19453
|
const suggestions = workflowBuilderUtils.stringifyToObjectKeyArray(
|
|
19208
19454
|
(_d = location.state.frame) != null ? _d : {},
|
|
@@ -19306,7 +19552,7 @@ function AddWorkflowTask({ basePath, onClose }) {
|
|
|
19306
19552
|
)
|
|
19307
19553
|
}
|
|
19308
19554
|
),
|
|
19309
|
-
|
|
19555
|
+
config2.map(({ name, displayName, icon: icon2, values }) => {
|
|
19310
19556
|
const revertIconColor = getWorkflowsEnv("isHeadless") && (name === "openai" || name === IntegrationNames15.BigCommerce);
|
|
19311
19557
|
if (search) {
|
|
19312
19558
|
if (values.some(
|
|
@@ -19382,7 +19628,7 @@ function AddWorkflowTask({ basePath, onClose }) {
|
|
|
19382
19628
|
`,
|
|
19383
19629
|
setColumnPadding: "0 20px 0 16px",
|
|
19384
19630
|
width: 10,
|
|
19385
|
-
children: params.service ?
|
|
19631
|
+
children: params.service ? config2.map(({ name, displayName, values, icon: icon2 }) => {
|
|
19386
19632
|
if (params.service === name.toLowerCase()) {
|
|
19387
19633
|
const options2 = values.map(({ key, name: name2, secondaryText }) => ({
|
|
19388
19634
|
key,
|
|
@@ -19416,7 +19662,7 @@ function AddWorkflowTask({ basePath, onClose }) {
|
|
|
19416
19662
|
var Add_default = AddWorkflowTask;
|
|
19417
19663
|
|
|
19418
19664
|
// src/views/Flows/Definitions/Edit/Triggers/Add.tsx
|
|
19419
|
-
import { useEffect as useEffect16, useState as useState27 } from "react";
|
|
19665
|
+
import { useEffect as useEffect16, useMemo as useMemo6, useState as useState27 } from "react";
|
|
19420
19666
|
import { NavLink as NavLink2, useLocation as useLocation6, useNavigate as useNavigate9, useParams as useParams3 } from "react-router-dom";
|
|
19421
19667
|
import {
|
|
19422
19668
|
Button as Button27,
|
|
@@ -19527,86 +19773,110 @@ function AddWorkflowTriggerOptions({
|
|
|
19527
19773
|
var Options_default2 = AddWorkflowTriggerOptions;
|
|
19528
19774
|
|
|
19529
19775
|
// src/views/Flows/Definitions/Edit/Triggers/Add.tsx
|
|
19530
|
-
|
|
19531
|
-
|
|
19532
|
-
|
|
19533
|
-
|
|
19534
|
-
icon: /* @__PURE__ */ jsx2(
|
|
19535
|
-
ProductIcon_default,
|
|
19776
|
+
function AddWorkflowTrigger({ basePath, onClose }) {
|
|
19777
|
+
const [search, setSearch] = useState27("");
|
|
19778
|
+
const config2 = useMemo6(
|
|
19779
|
+
() => [
|
|
19536
19780
|
{
|
|
19537
|
-
|
|
19538
|
-
|
|
19539
|
-
|
|
19540
|
-
|
|
19541
|
-
|
|
19542
|
-
|
|
19543
|
-
|
|
19544
|
-
|
|
19545
|
-
|
|
19546
|
-
|
|
19547
|
-
|
|
19548
|
-
|
|
19549
|
-
|
|
19550
|
-
|
|
19551
|
-
|
|
19552
|
-
|
|
19553
|
-
|
|
19554
|
-
|
|
19555
|
-
|
|
19556
|
-
|
|
19557
|
-
|
|
19558
|
-
|
|
19559
|
-
|
|
19560
|
-
|
|
19561
|
-
|
|
19562
|
-
|
|
19563
|
-
|
|
19564
|
-
|
|
19565
|
-
key: x.key,
|
|
19566
|
-
name: x.customization.displayName,
|
|
19567
|
-
secondaryText: x.customization.description
|
|
19568
|
-
}))
|
|
19569
|
-
},
|
|
19570
|
-
{
|
|
19571
|
-
name: IntegrationNames16.Shopify,
|
|
19572
|
-
displayName: IntegrationDisplayNames6.Shopify,
|
|
19573
|
-
icon: /* @__PURE__ */ jsx2(ProductIcon_default, { height: 5, product: IntegrationNames16.Shopify, width: 5 }),
|
|
19574
|
-
values: Object.values(shopifyTriggerConfigs).map((x) => ({
|
|
19575
|
-
key: x.key,
|
|
19576
|
-
name: x.customization.displayName,
|
|
19577
|
-
secondaryText: x.customization.description
|
|
19578
|
-
}))
|
|
19579
|
-
},
|
|
19580
|
-
{
|
|
19581
|
-
name: IntegrationNames16.HubSpot,
|
|
19582
|
-
displayName: IntegrationDisplayNames6.HubSpot,
|
|
19583
|
-
icon: /* @__PURE__ */ jsx2(ProductIcon_default, { height: 5, product: IntegrationNames16.HubSpot, width: 5 }),
|
|
19584
|
-
values: Object.values(hubspotTriggerConfigs).map((x) => ({
|
|
19585
|
-
key: x.key,
|
|
19586
|
-
name: x.customization.displayName,
|
|
19587
|
-
secondaryText: x.customization.description
|
|
19588
|
-
}))
|
|
19589
|
-
},
|
|
19590
|
-
{
|
|
19591
|
-
name: IntegrationNames16.BigCommerce,
|
|
19592
|
-
displayName: IntegrationDisplayNames6.BigCommerce,
|
|
19593
|
-
icon: /* @__PURE__ */ jsx2(
|
|
19594
|
-
ProductIcon_default,
|
|
19781
|
+
name: OTHER_TYPES.SYSTEM,
|
|
19782
|
+
displayName: "General",
|
|
19783
|
+
icon: /* @__PURE__ */ jsx2(
|
|
19784
|
+
ProductIcon_default,
|
|
19785
|
+
{
|
|
19786
|
+
center: void 0,
|
|
19787
|
+
disabled: void 0,
|
|
19788
|
+
height: 5,
|
|
19789
|
+
product: OTHER_TYPES.SYSTEM,
|
|
19790
|
+
width: 5
|
|
19791
|
+
}
|
|
19792
|
+
),
|
|
19793
|
+
values: Object.values(systemTriggerConfigs()).map((x) => ({
|
|
19794
|
+
key: x.key,
|
|
19795
|
+
name: x.customization.displayName,
|
|
19796
|
+
secondaryText: x.customization.description
|
|
19797
|
+
}))
|
|
19798
|
+
},
|
|
19799
|
+
{
|
|
19800
|
+
name: PRODUCT_TYPE.LC,
|
|
19801
|
+
displayName: PRODUCT_NAMES.livechat,
|
|
19802
|
+
icon: /* @__PURE__ */ jsx2(ProductIcon_default, { height: 5, product: PRODUCT_TYPE.LC, width: 5 }),
|
|
19803
|
+
values: Object.values(livechatTriggerConfigs()).map((x) => ({
|
|
19804
|
+
key: x.key,
|
|
19805
|
+
name: x.customization.displayName,
|
|
19806
|
+
secondaryText: x.customization.description
|
|
19807
|
+
}))
|
|
19808
|
+
},
|
|
19595
19809
|
{
|
|
19596
|
-
|
|
19597
|
-
|
|
19598
|
-
|
|
19810
|
+
name: IntegrationNames16.Mailchimp,
|
|
19811
|
+
displayName: IntegrationDisplayNames6.Mailchimp,
|
|
19812
|
+
icon: /* @__PURE__ */ jsx2(
|
|
19813
|
+
ProductIcon_default,
|
|
19814
|
+
{
|
|
19815
|
+
height: 5,
|
|
19816
|
+
product: IntegrationNames16.Mailchimp,
|
|
19817
|
+
width: 5
|
|
19818
|
+
}
|
|
19819
|
+
),
|
|
19820
|
+
values: Object.values(mailchimpTriggerConfigs()).map((x) => ({
|
|
19821
|
+
key: x.key,
|
|
19822
|
+
name: x.customization.displayName,
|
|
19823
|
+
secondaryText: x.customization.description
|
|
19824
|
+
}))
|
|
19825
|
+
},
|
|
19826
|
+
{
|
|
19827
|
+
name: IntegrationNames16.Shopify,
|
|
19828
|
+
displayName: IntegrationDisplayNames6.Shopify,
|
|
19829
|
+
icon: /* @__PURE__ */ jsx2(
|
|
19830
|
+
ProductIcon_default,
|
|
19831
|
+
{
|
|
19832
|
+
height: 5,
|
|
19833
|
+
product: IntegrationNames16.Shopify,
|
|
19834
|
+
width: 5
|
|
19835
|
+
}
|
|
19836
|
+
),
|
|
19837
|
+
values: Object.values(shopifyTriggerConfigs()).map((x) => ({
|
|
19838
|
+
key: x.key,
|
|
19839
|
+
name: x.customization.displayName,
|
|
19840
|
+
secondaryText: x.customization.description
|
|
19841
|
+
}))
|
|
19842
|
+
},
|
|
19843
|
+
{
|
|
19844
|
+
name: IntegrationNames16.HubSpot,
|
|
19845
|
+
displayName: IntegrationDisplayNames6.HubSpot,
|
|
19846
|
+
icon: /* @__PURE__ */ jsx2(
|
|
19847
|
+
ProductIcon_default,
|
|
19848
|
+
{
|
|
19849
|
+
height: 5,
|
|
19850
|
+
product: IntegrationNames16.HubSpot,
|
|
19851
|
+
width: 5
|
|
19852
|
+
}
|
|
19853
|
+
),
|
|
19854
|
+
values: Object.values(hubspotTriggerConfigs()).map((x) => ({
|
|
19855
|
+
key: x.key,
|
|
19856
|
+
name: x.customization.displayName,
|
|
19857
|
+
secondaryText: x.customization.description
|
|
19858
|
+
}))
|
|
19859
|
+
},
|
|
19860
|
+
{
|
|
19861
|
+
name: IntegrationNames16.BigCommerce,
|
|
19862
|
+
displayName: IntegrationDisplayNames6.BigCommerce,
|
|
19863
|
+
icon: /* @__PURE__ */ jsx2(
|
|
19864
|
+
ProductIcon_default,
|
|
19865
|
+
{
|
|
19866
|
+
height: 5,
|
|
19867
|
+
product: IntegrationNames16.BigCommerce,
|
|
19868
|
+
width: 5
|
|
19869
|
+
}
|
|
19870
|
+
),
|
|
19871
|
+
values: Object.values(bigcommerceTriggerConfigs()).map((x) => ({
|
|
19872
|
+
key: x.key,
|
|
19873
|
+
name: x.customization.displayName,
|
|
19874
|
+
secondaryText: x.customization.description
|
|
19875
|
+
}))
|
|
19599
19876
|
}
|
|
19600
|
-
|
|
19601
|
-
|
|
19602
|
-
|
|
19603
|
-
name: x.customization.displayName,
|
|
19604
|
-
secondaryText: x.customization.description
|
|
19605
|
-
}))
|
|
19606
|
-
}
|
|
19607
|
-
];
|
|
19608
|
-
function AddWorkflowTrigger({ basePath, onClose }) {
|
|
19609
|
-
const [search, setSearch] = useState27("");
|
|
19877
|
+
],
|
|
19878
|
+
[]
|
|
19879
|
+
);
|
|
19610
19880
|
const location = useLocation6();
|
|
19611
19881
|
const navigate = useNavigate9();
|
|
19612
19882
|
const params = useParams3();
|
|
@@ -19619,10 +19889,11 @@ function AddWorkflowTrigger({ basePath, onClose }) {
|
|
|
19619
19889
|
useEffect16(() => {
|
|
19620
19890
|
var _a, _b, _c;
|
|
19621
19891
|
if (!params.trigger) {
|
|
19622
|
-
const firstTrigger = (_c = (_b = (_a =
|
|
19892
|
+
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;
|
|
19623
19893
|
navigate(`${basePath}/${params.service}/${firstTrigger}`);
|
|
19624
19894
|
}
|
|
19625
|
-
const
|
|
19895
|
+
const templates = WorkflowItemsConfiguration.templates;
|
|
19896
|
+
const triggers = params.service ? templates.triggers[params.service] : void 0;
|
|
19626
19897
|
const trigger = params.trigger && triggers ? triggers[params.trigger] : void 0;
|
|
19627
19898
|
setState({ trigger });
|
|
19628
19899
|
}, [basePath, navigate, params.service, params.trigger]);
|
|
@@ -19691,7 +19962,7 @@ function AddWorkflowTrigger({ basePath, onClose }) {
|
|
|
19691
19962
|
)
|
|
19692
19963
|
}
|
|
19693
19964
|
),
|
|
19694
|
-
|
|
19965
|
+
config2.map(({ name, displayName, icon: icon2, values }) => {
|
|
19695
19966
|
const revertIconColor = getWorkflowsEnv("isHeadless") && (name === IntegrationNames16.OpenAI || name === IntegrationNames16.BigCommerce);
|
|
19696
19967
|
if (search) {
|
|
19697
19968
|
if (values.some(
|
|
@@ -19767,7 +20038,7 @@ function AddWorkflowTrigger({ basePath, onClose }) {
|
|
|
19767
20038
|
`,
|
|
19768
20039
|
setColumnPadding: "0 20px 0 16px",
|
|
19769
20040
|
width: 10,
|
|
19770
|
-
children: params.service ?
|
|
20041
|
+
children: params.service ? config2.map(({ name, displayName, values, icon: icon2 }) => {
|
|
19771
20042
|
var _a;
|
|
19772
20043
|
if (((_a = params.service) == null ? void 0 : _a.toLowerCase()) === name.toLowerCase()) {
|
|
19773
20044
|
const options2 = values.map(({ key, name: name2, secondaryText }) => ({
|
|
@@ -20256,7 +20527,6 @@ import {
|
|
|
20256
20527
|
IntegrationNames as IntegrationNames17,
|
|
20257
20528
|
TextLivechatEventNames as TextLivechatEventNames2
|
|
20258
20529
|
} from "@livechat/developer-studio-api";
|
|
20259
|
-
var config11 = getWorkflowsConfig();
|
|
20260
20530
|
var flowTemplates = [
|
|
20261
20531
|
{
|
|
20262
20532
|
id: "1",
|
|
@@ -20306,7 +20576,9 @@ var flowTemplates = [
|
|
|
20306
20576
|
type: "HTTP",
|
|
20307
20577
|
inputParameters: {
|
|
20308
20578
|
http_request: {
|
|
20309
|
-
uri: `${
|
|
20579
|
+
uri: `${getWorkflowsEnv(
|
|
20580
|
+
"workflowsApiUr"
|
|
20581
|
+
)}/functions/get-livechat-chat-transcript?chat_id=\${workflow.input.body.chat_id}`,
|
|
20310
20582
|
method: "GET",
|
|
20311
20583
|
headers: {
|
|
20312
20584
|
Accept: "application/json",
|
|
@@ -20322,7 +20594,9 @@ var flowTemplates = [
|
|
|
20322
20594
|
type: "HTTP",
|
|
20323
20595
|
inputParameters: {
|
|
20324
20596
|
http_request: {
|
|
20325
|
-
uri: `${
|
|
20597
|
+
uri: `${getWorkflowsEnv(
|
|
20598
|
+
"workflowsApiUr"
|
|
20599
|
+
)}/functions/summarize-text`,
|
|
20326
20600
|
body: {
|
|
20327
20601
|
text: "${livechat_get_chat_transcript_1.output.response.body.chat_transcript}"
|
|
20328
20602
|
},
|
|
@@ -20341,7 +20615,9 @@ var flowTemplates = [
|
|
|
20341
20615
|
type: "HTTP",
|
|
20342
20616
|
inputParameters: {
|
|
20343
20617
|
http_request: {
|
|
20344
|
-
uri: `${
|
|
20618
|
+
uri: `${getWorkflowsEnv(
|
|
20619
|
+
"workflowsApiUr"
|
|
20620
|
+
)}/functions/create-helpdesk-ticket`,
|
|
20345
20621
|
body: {
|
|
20346
20622
|
message: {
|
|
20347
20623
|
text: "${openai_summarize_text_1.output.response.body.summary}"
|
|
@@ -20418,7 +20694,9 @@ var flowTemplates = [
|
|
|
20418
20694
|
type: "HTTP",
|
|
20419
20695
|
inputParameters: {
|
|
20420
20696
|
http_request: {
|
|
20421
|
-
uri: `${
|
|
20697
|
+
uri: `${getWorkflowsEnv(
|
|
20698
|
+
"workflowsApiUr"
|
|
20699
|
+
)}/functions/get-livechat-chat-transcript?chat_id=\${workflow.input.body.chat_id}`,
|
|
20422
20700
|
method: "GET",
|
|
20423
20701
|
headers: {
|
|
20424
20702
|
Accept: "application/json",
|
|
@@ -20434,7 +20712,9 @@ var flowTemplates = [
|
|
|
20434
20712
|
type: "HTTP",
|
|
20435
20713
|
inputParameters: {
|
|
20436
20714
|
http_request: {
|
|
20437
|
-
uri: `${
|
|
20715
|
+
uri: `${getWorkflowsEnv(
|
|
20716
|
+
"workflowsApiUr"
|
|
20717
|
+
)}/functions/analyze-text-sentiment`,
|
|
20438
20718
|
body: {
|
|
20439
20719
|
text: "${livechat_get_chat_transcript_1.output.response.body.chat_transcript}"
|
|
20440
20720
|
},
|
|
@@ -20453,7 +20733,9 @@ var flowTemplates = [
|
|
|
20453
20733
|
type: "HTTP",
|
|
20454
20734
|
inputParameters: {
|
|
20455
20735
|
http_request: {
|
|
20456
|
-
uri: `${
|
|
20736
|
+
uri: `${getWorkflowsEnv(
|
|
20737
|
+
"workflowsApiUr"
|
|
20738
|
+
)}/functions/create-helpdesk-ticket`,
|
|
20457
20739
|
body: {
|
|
20458
20740
|
message: {
|
|
20459
20741
|
text: "${livechat_get_chat_transcript_1.output.response.body.chat_transcript}"
|
|
@@ -20479,7 +20761,9 @@ var flowTemplates = [
|
|
|
20479
20761
|
type: "HTTP",
|
|
20480
20762
|
inputParameters: {
|
|
20481
20763
|
http_request: {
|
|
20482
|
-
uri: `${
|
|
20764
|
+
uri: `${getWorkflowsEnv(
|
|
20765
|
+
"workflowsApiUr"
|
|
20766
|
+
)}/functions/add-mailchimp-subscriber-event`,
|
|
20483
20767
|
body: {
|
|
20484
20768
|
name: "Competitor Mention",
|
|
20485
20769
|
email: "${livechat_get_chat_transcript_1.output.response.body.customer_email}",
|
|
@@ -20570,7 +20854,9 @@ var flowTemplates = [
|
|
|
20570
20854
|
asyncComplete: false,
|
|
20571
20855
|
http_request: {
|
|
20572
20856
|
method: "GET",
|
|
20573
|
-
uri: `${
|
|
20857
|
+
uri: `${getWorkflowsEnv(
|
|
20858
|
+
"workflowsApiUr"
|
|
20859
|
+
)}/functions/get-livechat-chat-transcript?chat_id=\${workflow.input.body.chat_id}`,
|
|
20574
20860
|
headers: {
|
|
20575
20861
|
Accept: "application/json",
|
|
20576
20862
|
"x-cred-access-token": "${workflow.credentials.text.access_token}"
|
|
@@ -20586,7 +20872,9 @@ var flowTemplates = [
|
|
|
20586
20872
|
asyncComplete: false,
|
|
20587
20873
|
http_request: {
|
|
20588
20874
|
method: "POST",
|
|
20589
|
-
uri: `${
|
|
20875
|
+
uri: `${getWorkflowsEnv(
|
|
20876
|
+
"workflowsApiUr"
|
|
20877
|
+
)}/functions/summarize-text`,
|
|
20590
20878
|
body: {
|
|
20591
20879
|
text: "${livechat_get_chat_transcript_1.output.response.body.chat_transcript}"
|
|
20592
20880
|
},
|
|
@@ -20605,7 +20893,9 @@ var flowTemplates = [
|
|
|
20605
20893
|
asyncComplete: false,
|
|
20606
20894
|
http_request: {
|
|
20607
20895
|
method: "POST",
|
|
20608
|
-
uri: `${
|
|
20896
|
+
uri: `${getWorkflowsEnv(
|
|
20897
|
+
"workflowsApiUr"
|
|
20898
|
+
)}/functions/create-helpdesk-ticket`,
|
|
20609
20899
|
body: {
|
|
20610
20900
|
requester: {
|
|
20611
20901
|
email: "${livechat_get_chat_transcript_1.output.response.body.customer_email}",
|
|
@@ -20628,7 +20918,9 @@ var flowTemplates = [
|
|
|
20628
20918
|
type: "HTTP",
|
|
20629
20919
|
inputParameters: {
|
|
20630
20920
|
http_request: {
|
|
20631
|
-
uri: `${
|
|
20921
|
+
uri: `${getWorkflowsEnv(
|
|
20922
|
+
"workflowsApiUr"
|
|
20923
|
+
)}/functions/add-mailchimp-subscriber-note`,
|
|
20632
20924
|
body: {
|
|
20633
20925
|
note: "Feedback from chat ID ${workflow.input.body.chat_id}",
|
|
20634
20926
|
email: "${livechat_get_chat_transcript_1.output.response.body.customer_email}",
|
|
@@ -20717,7 +21009,9 @@ var flowTemplates = [
|
|
|
20717
21009
|
asyncComplete: false,
|
|
20718
21010
|
http_request: {
|
|
20719
21011
|
method: "GET",
|
|
20720
|
-
uri: `${
|
|
21012
|
+
uri: `${getWorkflowsEnv(
|
|
21013
|
+
"workflowsApiUr"
|
|
21014
|
+
)}/functions/get-livechat-chat-transcript?chat_id=\${workflow.input.body.chat_id}`,
|
|
20721
21015
|
headers: {
|
|
20722
21016
|
Accept: "application/json",
|
|
20723
21017
|
"x-cred-access-token": "${workflow.credentials.text.access_token}"
|
|
@@ -20730,7 +21024,9 @@ var flowTemplates = [
|
|
|
20730
21024
|
type: "HTTP",
|
|
20731
21025
|
inputParameters: {
|
|
20732
21026
|
http_request: {
|
|
20733
|
-
uri: `${
|
|
21027
|
+
uri: `${getWorkflowsEnv(
|
|
21028
|
+
"workflowsApiUr"
|
|
21029
|
+
)}/functions/get-shopify-customer?email=\${livechat_get_chat_transcript_1.output.response.body.customer_email}`,
|
|
20734
21030
|
method: "GET",
|
|
20735
21031
|
headers: {
|
|
20736
21032
|
Accept: "application/json",
|
|
@@ -20747,7 +21043,9 @@ var flowTemplates = [
|
|
|
20747
21043
|
type: "HTTP",
|
|
20748
21044
|
inputParameters: {
|
|
20749
21045
|
http_request: {
|
|
20750
|
-
uri: `${
|
|
21046
|
+
uri: `${getWorkflowsEnv(
|
|
21047
|
+
"workflowsApiUr"
|
|
21048
|
+
)}/functions/analyze-text-sentiment`,
|
|
20751
21049
|
body: {
|
|
20752
21050
|
text: "${livechat_get_chat_transcript_1.output.response.body.chat_transcript}"
|
|
20753
21051
|
},
|
|
@@ -20766,7 +21064,9 @@ var flowTemplates = [
|
|
|
20766
21064
|
type: "HTTP",
|
|
20767
21065
|
inputParameters: {
|
|
20768
21066
|
http_request: {
|
|
20769
|
-
uri: `${
|
|
21067
|
+
uri: `${getWorkflowsEnv(
|
|
21068
|
+
"workflowsApiUr"
|
|
21069
|
+
)}/functions/add-mailchimp-campaign`,
|
|
20770
21070
|
body: {
|
|
20771
21071
|
type: "regular",
|
|
20772
21072
|
settings: {
|
|
@@ -20867,7 +21167,9 @@ var flowTemplates = [
|
|
|
20867
21167
|
asyncComplete: false,
|
|
20868
21168
|
http_request: {
|
|
20869
21169
|
method: "GET",
|
|
20870
|
-
uri: `${
|
|
21170
|
+
uri: `${getWorkflowsEnv(
|
|
21171
|
+
"workflowsApiUr"
|
|
21172
|
+
)}/functions/get-livechat-chat-transcript?chat_id=\${workflow.input.body.chat_id}`,
|
|
20871
21173
|
headers: {
|
|
20872
21174
|
Accept: "application/json",
|
|
20873
21175
|
"x-cred-access-token": "${workflow.credentials.text.access_token}"
|
|
@@ -20883,7 +21185,9 @@ var flowTemplates = [
|
|
|
20883
21185
|
asyncComplete: false,
|
|
20884
21186
|
http_request: {
|
|
20885
21187
|
method: "POST",
|
|
20886
|
-
uri: `${
|
|
21188
|
+
uri: `${getWorkflowsEnv(
|
|
21189
|
+
"workflowsApiUr"
|
|
21190
|
+
)}/functions/analyze-text-sentiment`,
|
|
20887
21191
|
body: {
|
|
20888
21192
|
text: "${livechat_get_chat_transcript_1.output.response.body.chat_transcript}"
|
|
20889
21193
|
},
|
|
@@ -20902,7 +21206,9 @@ var flowTemplates = [
|
|
|
20902
21206
|
asyncComplete: false,
|
|
20903
21207
|
http_request: {
|
|
20904
21208
|
method: "POST",
|
|
20905
|
-
uri: `${
|
|
21209
|
+
uri: `${getWorkflowsEnv(
|
|
21210
|
+
"workflowsApiUr"
|
|
21211
|
+
)}/functions/add-or-update-mailchimp-subscriber`,
|
|
20906
21212
|
body: {
|
|
20907
21213
|
list_id: null,
|
|
20908
21214
|
email: "${livechat_get_chat_transcript_1.output.response.body.customer_email}",
|
|
@@ -20924,7 +21230,9 @@ var flowTemplates = [
|
|
|
20924
21230
|
asyncComplete: false,
|
|
20925
21231
|
http_request: {
|
|
20926
21232
|
method: "POST",
|
|
20927
|
-
uri: `${
|
|
21233
|
+
uri: `${getWorkflowsEnv(
|
|
21234
|
+
"workflowsApiUr"
|
|
21235
|
+
)}/functions/add-mailchimp-subscriber-tag`,
|
|
20928
21236
|
body: {
|
|
20929
21237
|
list_id: null,
|
|
20930
21238
|
email: "${livechat_get_chat_transcript_1.output.response.body.customer_email}",
|
|
@@ -20995,7 +21303,9 @@ var flowTemplates = [
|
|
|
20995
21303
|
type: "HTTP",
|
|
20996
21304
|
inputParameters: {
|
|
20997
21305
|
http_request: {
|
|
20998
|
-
uri: `${
|
|
21306
|
+
uri: `${getWorkflowsEnv(
|
|
21307
|
+
"workflowsApiUr"
|
|
21308
|
+
)}/functions/send-livechat-agent-message`,
|
|
20999
21309
|
body: {
|
|
21000
21310
|
chat_id: "${workflow.input.body.chat.id}",
|
|
21001
21311
|
message: "Welcome to our service! How can we assist you today?",
|
|
@@ -21074,7 +21384,9 @@ var flowTemplates = [
|
|
|
21074
21384
|
inputParameters: {
|
|
21075
21385
|
asyncComplete: false,
|
|
21076
21386
|
http_request: {
|
|
21077
|
-
uri: `${
|
|
21387
|
+
uri: `${getWorkflowsEnv(
|
|
21388
|
+
"workflowsApiUr"
|
|
21389
|
+
)}/functions/get-livechat-chat-transcript?chat_id=\${workflow.input.body.chat_id}`,
|
|
21078
21390
|
method: "GET",
|
|
21079
21391
|
headers: {
|
|
21080
21392
|
Accept: "application/json",
|
|
@@ -21090,7 +21402,9 @@ var flowTemplates = [
|
|
|
21090
21402
|
inputParameters: {
|
|
21091
21403
|
asyncComplete: false,
|
|
21092
21404
|
http_request: {
|
|
21093
|
-
uri: `${
|
|
21405
|
+
uri: `${getWorkflowsEnv(
|
|
21406
|
+
"workflowsApiUr"
|
|
21407
|
+
)}/functions/summarize-text`,
|
|
21094
21408
|
body: {
|
|
21095
21409
|
text: "${livechat_get_chat_transcript_1.output.response.body.chat_transcript}"
|
|
21096
21410
|
},
|
|
@@ -21109,7 +21423,9 @@ var flowTemplates = [
|
|
|
21109
21423
|
inputParameters: {
|
|
21110
21424
|
asyncComplete: false,
|
|
21111
21425
|
http_request: {
|
|
21112
|
-
uri: `${
|
|
21426
|
+
uri: `${getWorkflowsEnv(
|
|
21427
|
+
"workflowsApiUr"
|
|
21428
|
+
)}/functions/create-helpdesk-ticket`,
|
|
21113
21429
|
body: {
|
|
21114
21430
|
message: {
|
|
21115
21431
|
text: "${openai_summarize_text_1.output.response.body.summary}"
|
|
@@ -21198,7 +21514,9 @@ var flowTemplates = [
|
|
|
21198
21514
|
inputParameters: {
|
|
21199
21515
|
asyncComplete: false,
|
|
21200
21516
|
http_request: {
|
|
21201
|
-
uri: `${
|
|
21517
|
+
uri: `${getWorkflowsEnv(
|
|
21518
|
+
"workflowsApiUr"
|
|
21519
|
+
)}/functions/get-livechat-chat-transcript?chat_id=\${workflow.input.body.chat.id}`,
|
|
21202
21520
|
method: "GET",
|
|
21203
21521
|
headers: {
|
|
21204
21522
|
Accept: "application/json",
|
|
@@ -21214,7 +21532,9 @@ var flowTemplates = [
|
|
|
21214
21532
|
inputParameters: {
|
|
21215
21533
|
asyncComplete: false,
|
|
21216
21534
|
http_request: {
|
|
21217
|
-
uri: `${
|
|
21535
|
+
uri: `${getWorkflowsEnv(
|
|
21536
|
+
"workflowsApiUr"
|
|
21537
|
+
)}/functions/get-shopify-customer-last-order?email=\${livechat_get_chat_transcript_1.output.response.body.customer_email}`,
|
|
21218
21538
|
body: {},
|
|
21219
21539
|
method: "GET",
|
|
21220
21540
|
headers: {
|
|
@@ -21232,7 +21552,9 @@ var flowTemplates = [
|
|
|
21232
21552
|
inputParameters: {
|
|
21233
21553
|
asyncComplete: false,
|
|
21234
21554
|
http_request: {
|
|
21235
|
-
uri: `${
|
|
21555
|
+
uri: `${getWorkflowsEnv(
|
|
21556
|
+
"workflowsApiUr"
|
|
21557
|
+
)}/functions/send-livechat-agent-message`,
|
|
21236
21558
|
body: {
|
|
21237
21559
|
chat_id: "${workflow.input.body.chat.id}",
|
|
21238
21560
|
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}",
|
|
@@ -21307,7 +21629,9 @@ var flowTemplates = [
|
|
|
21307
21629
|
inputParameters: {
|
|
21308
21630
|
asyncComplete: false,
|
|
21309
21631
|
http_request: {
|
|
21310
|
-
uri: `${
|
|
21632
|
+
uri: `${getWorkflowsEnv(
|
|
21633
|
+
"workflowsApiUr"
|
|
21634
|
+
)}/functions/get-livechat-chat-transcript?chat_id=\${workflow.input.body.chat_id}`,
|
|
21311
21635
|
method: "GET",
|
|
21312
21636
|
headers: {
|
|
21313
21637
|
Accept: "application/json",
|
|
@@ -21323,7 +21647,9 @@ var flowTemplates = [
|
|
|
21323
21647
|
inputParameters: {
|
|
21324
21648
|
asyncComplete: false,
|
|
21325
21649
|
http_request: {
|
|
21326
|
-
uri: `${
|
|
21650
|
+
uri: `${getWorkflowsEnv(
|
|
21651
|
+
"workflowsApiUr"
|
|
21652
|
+
)}/functions/create-hubspot-contact`,
|
|
21327
21653
|
body: {
|
|
21328
21654
|
properties: {
|
|
21329
21655
|
email: "${livechat_get_chat_transcript_1.output.response.body.customer_email}",
|
|
@@ -21400,7 +21726,9 @@ var flowTemplates = [
|
|
|
21400
21726
|
inputParameters: {
|
|
21401
21727
|
asyncComplete: false,
|
|
21402
21728
|
http_request: {
|
|
21403
|
-
uri: `${
|
|
21729
|
+
uri: `${getWorkflowsEnv(
|
|
21730
|
+
"workflowsApiUr"
|
|
21731
|
+
)}/functions/get-livechat-chat-transcript?chat_id=\${workflow.input.body.chat.id}`,
|
|
21404
21732
|
method: "GET",
|
|
21405
21733
|
headers: {
|
|
21406
21734
|
Accept: "application/json",
|
|
@@ -21416,7 +21744,9 @@ var flowTemplates = [
|
|
|
21416
21744
|
inputParameters: {
|
|
21417
21745
|
asyncComplete: false,
|
|
21418
21746
|
http_request: {
|
|
21419
|
-
uri: `${
|
|
21747
|
+
uri: `${getWorkflowsEnv(
|
|
21748
|
+
"workflowsApiUr"
|
|
21749
|
+
)}/functions/create-helpdesk-ticket`,
|
|
21420
21750
|
body: {
|
|
21421
21751
|
message: {
|
|
21422
21752
|
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}"
|
|
@@ -21502,7 +21832,9 @@ var flowTemplates = [
|
|
|
21502
21832
|
inputParameters: {
|
|
21503
21833
|
asyncComplete: false,
|
|
21504
21834
|
http_request: {
|
|
21505
|
-
uri: `${
|
|
21835
|
+
uri: `${getWorkflowsEnv(
|
|
21836
|
+
"workflowsApiUr"
|
|
21837
|
+
)}/functions/get-livechat-chat-transcript?chat_id=\${workflow.input.body.chat_id}`,
|
|
21506
21838
|
method: "GET",
|
|
21507
21839
|
headers: {
|
|
21508
21840
|
Accept: "application/json",
|
|
@@ -21518,7 +21850,9 @@ var flowTemplates = [
|
|
|
21518
21850
|
inputParameters: {
|
|
21519
21851
|
asyncComplete: false,
|
|
21520
21852
|
http_request: {
|
|
21521
|
-
uri: `${
|
|
21853
|
+
uri: `${getWorkflowsEnv(
|
|
21854
|
+
"workflowsApiUr"
|
|
21855
|
+
)}/functions/create-hubspot-contact`,
|
|
21522
21856
|
body: {
|
|
21523
21857
|
properties: {
|
|
21524
21858
|
email: "${livechat_get_chat_transcript_1.output.response.body.customer_email}",
|
|
@@ -21542,7 +21876,9 @@ var flowTemplates = [
|
|
|
21542
21876
|
asyncComplete: false,
|
|
21543
21877
|
http_request: {
|
|
21544
21878
|
method: "POST",
|
|
21545
|
-
uri: `${
|
|
21879
|
+
uri: `${getWorkflowsEnv(
|
|
21880
|
+
"workflowsApiUr"
|
|
21881
|
+
)}/functions/add-or-update-mailchimp-subscriber`,
|
|
21546
21882
|
body: {
|
|
21547
21883
|
list_id: null,
|
|
21548
21884
|
email: "${livechat_get_chat_transcript_1.output.response.body.customer_email}",
|
|
@@ -21620,7 +21956,9 @@ var flowTemplates = [
|
|
|
21620
21956
|
inputParameters: {
|
|
21621
21957
|
asyncComplete: false,
|
|
21622
21958
|
http_request: {
|
|
21623
|
-
uri: `${
|
|
21959
|
+
uri: `${getWorkflowsEnv(
|
|
21960
|
+
"workflowsApiUr"
|
|
21961
|
+
)}/functions/supervise-livechat-chat`,
|
|
21624
21962
|
body: {
|
|
21625
21963
|
chat_id: "${workflow.input.body.chat_id}",
|
|
21626
21964
|
user_id: "add your email"
|
|
@@ -21640,7 +21978,9 @@ var flowTemplates = [
|
|
|
21640
21978
|
inputParameters: {
|
|
21641
21979
|
asyncComplete: false,
|
|
21642
21980
|
http_request: {
|
|
21643
|
-
uri: `${
|
|
21981
|
+
uri: `${getWorkflowsEnv(
|
|
21982
|
+
"workflowsApiUr"
|
|
21983
|
+
)}/functions/send-livechat-agent-message`,
|
|
21644
21984
|
body: {
|
|
21645
21985
|
chat_id: "${workflow.input.body.chat_id}",
|
|
21646
21986
|
message: "Hi, please remember to request reviews from customers. Keep up the great work!",
|
|
@@ -21716,7 +22056,9 @@ var flowTemplates = [
|
|
|
21716
22056
|
inputParameters: {
|
|
21717
22057
|
asyncComplete: false,
|
|
21718
22058
|
http_request: {
|
|
21719
|
-
uri: `${
|
|
22059
|
+
uri: `${getWorkflowsEnv(
|
|
22060
|
+
"workflowsApiUr"
|
|
22061
|
+
)}/functions/get-livechat-chat-transcript?chat_id=\${workflow.input.body.chat_id}`,
|
|
21720
22062
|
method: "GET",
|
|
21721
22063
|
headers: {
|
|
21722
22064
|
Accept: "application/json",
|
|
@@ -21732,7 +22074,9 @@ var flowTemplates = [
|
|
|
21732
22074
|
inputParameters: {
|
|
21733
22075
|
asyncComplete: false,
|
|
21734
22076
|
http_request: {
|
|
21735
|
-
uri: `${
|
|
22077
|
+
uri: `${getWorkflowsEnv(
|
|
22078
|
+
"workflowsApiUr"
|
|
22079
|
+
)}/functions/create-helpdesk-ticket`,
|
|
21736
22080
|
body: {
|
|
21737
22081
|
message: {
|
|
21738
22082
|
text: "${livechat_get_chat_transcript_1.output.response.body.chat_transcript}"
|