@livechat/platform-workflows 0.1.4 → 0.1.6

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.
@@ -0,0 +1,1623 @@
1
+ import {
2
+ __spreadProps,
3
+ __spreadValues
4
+ } from "./chunk-PWFJOGII.mjs";
5
+
6
+ // src/constants/specification/BigCommerce/index.ts
7
+ import {
8
+ BigCommerceEventNames,
9
+ IntegrationDisplayNames,
10
+ IntegrationNames,
11
+ WorkflowDefinitionTaskType as WorkflowDefinitionTaskType3
12
+ } from "@livechat/developer-studio-api";
13
+
14
+ // src/config.ts
15
+ import {
16
+ setConfig
17
+ } from "@livechat/developer-studio-ui-react/dist/config";
18
+ var config = {
19
+ config: void 0
20
+ };
21
+ function setWorkflowsConfig(newConfig) {
22
+ config.config = __spreadValues(__spreadValues({}, config.config), newConfig);
23
+ setConfig(newConfig);
24
+ }
25
+ var getWorkflowsEnv = (key) => {
26
+ return config.config[key];
27
+ };
28
+
29
+ // src/constants/specification/common.ts
30
+ import { WorkflowDefinitionTaskType } from "@livechat/developer-studio-api";
31
+ function isJSONSchema7(schema) {
32
+ if (schema === void 0) {
33
+ return false;
34
+ }
35
+ return schema && typeof schema !== "boolean";
36
+ }
37
+ var WORKFLOW_TRIGGER_OUTPUT_SCHEMA = (body) => ({
38
+ type: "object",
39
+ required: ["body"],
40
+ properties: {
41
+ body
42
+ }
43
+ });
44
+ var WORKFLOW_HTTP_TASK_SCHEMA = (name = WorkflowDefinitionTaskType.http, overrides) => {
45
+ var _a, _b, _c;
46
+ return {
47
+ required: ["type", "name", "inputParameters"],
48
+ properties: {
49
+ type: { const: WorkflowDefinitionTaskType.http },
50
+ name: { const: name },
51
+ inputParameters: {
52
+ type: "object",
53
+ required: ["http_request"],
54
+ properties: {
55
+ http_request: {
56
+ type: "object",
57
+ required: [
58
+ "uri",
59
+ "method",
60
+ (overrides == null ? void 0 : overrides.headers) ? "headers" : void 0,
61
+ (overrides == null ? void 0 : overrides.body) ? "body" : void 0
62
+ ].filter(Boolean),
63
+ properties: {
64
+ uri: (_a = overrides == null ? void 0 : overrides.uri) != null ? _a : {
65
+ type: "string",
66
+ title: "URI"
67
+ },
68
+ method: {
69
+ type: "string",
70
+ title: "Method",
71
+ enum: ["GET", "POST", "PATCH", "PUT", "DELETE"]
72
+ },
73
+ headers: (_b = overrides == null ? void 0 : overrides.headers) != null ? _b : {
74
+ type: "object",
75
+ title: "Headers",
76
+ properties: {},
77
+ additionalProperties: {
78
+ type: "string"
79
+ }
80
+ },
81
+ body: (_c = overrides == null ? void 0 : overrides.body) != null ? _c : {
82
+ type: "object",
83
+ title: "Body",
84
+ properties: {},
85
+ additionalProperties: {
86
+ type: ["string", "number", "array", "object"],
87
+ items: {
88
+ type: ["string", "number"]
89
+ },
90
+ properties: {
91
+ [Symbol.toStringTag]: {
92
+ type: ["string", "number"]
93
+ }
94
+ }
95
+ }
96
+ }
97
+ }
98
+ }
99
+ }
100
+ }
101
+ }
102
+ };
103
+ };
104
+ var WORKFLOW_HTTP_TASK_INPUT_SCHEMA = (body, query) => ({
105
+ type: "object",
106
+ required: [
107
+ "uri",
108
+ body ? "body" : void 0,
109
+ query ? "query" : void 0
110
+ ].filter(Boolean),
111
+ properties: __spreadValues(__spreadValues({
112
+ uri: query ? {
113
+ type: "string",
114
+ queryParams: query
115
+ } : {
116
+ type: "string"
117
+ }
118
+ }, query ? {
119
+ query
120
+ } : {}), body ? {
121
+ body
122
+ } : {})
123
+ });
124
+ var WORKFLOW_HTTP_TASK_OUTPUT_SCHEMA = (body) => ({
125
+ type: "object",
126
+ required: ["output"],
127
+ properties: {
128
+ output: {
129
+ type: "object",
130
+ required: ["response"],
131
+ properties: {
132
+ response: {
133
+ type: "object",
134
+ title: "response",
135
+ required: ["body"],
136
+ properties: {
137
+ body
138
+ }
139
+ }
140
+ }
141
+ }
142
+ }
143
+ });
144
+ var WORKFLOW_SWITCH_TASK_SCHEMA = {
145
+ required: ["type", "inputParameters", "expression", "decisionCases"],
146
+ properties: {
147
+ type: { const: WorkflowDefinitionTaskType.switch },
148
+ inputParameters: {
149
+ type: "object",
150
+ properties: {
151
+ switchCaseValue: {
152
+ type: "string"
153
+ }
154
+ }
155
+ },
156
+ evaluatorType: {
157
+ type: "string",
158
+ oneOf: [
159
+ { const: "javascript", title: "Javascript" },
160
+ { const: "value-param", title: "Value - params" }
161
+ ]
162
+ },
163
+ expression: {
164
+ type: "string",
165
+ title: "Expression"
166
+ },
167
+ defaultCase: {
168
+ $ref: "#/definitions/tasks",
169
+ minItems: 0
170
+ },
171
+ decisionCases: {
172
+ type: "object",
173
+ title: "Conditions",
174
+ properties: {},
175
+ additionalProperties: {
176
+ $ref: "#/definitions/tasks"
177
+ }
178
+ }
179
+ }
180
+ };
181
+ var WORKFLOW_FORK_TASK_SCHEMA = {
182
+ required: ["type", "forkTasks"],
183
+ properties: {
184
+ type: { const: WorkflowDefinitionTaskType.forkJoin },
185
+ forkTasks: {
186
+ title: "Fork branches",
187
+ type: "array",
188
+ items: {
189
+ $ref: "#/definitions/tasks"
190
+ }
191
+ }
192
+ }
193
+ };
194
+ var WORKFLOW_JOIN_TASK_SCHEMA = {
195
+ required: ["type", "joinOn"],
196
+ properties: {
197
+ type: { const: WorkflowDefinitionTaskType.join },
198
+ joinOn: {
199
+ type: "array",
200
+ items: {
201
+ type: "string",
202
+ title: "Join On"
203
+ }
204
+ }
205
+ }
206
+ };
207
+ var WORKFLOW_TERMINATE_TASK_SCHEMA = {
208
+ required: ["type", "inputParameters"],
209
+ properties: {
210
+ type: { const: WorkflowDefinitionTaskType.terminate },
211
+ inputParameters: {
212
+ type: "object",
213
+ required: ["terminationStatus", "terminationReason"],
214
+ properties: {
215
+ terminationStatus: {
216
+ type: "string",
217
+ title: "Termination status",
218
+ oneOf: [
219
+ { const: "COMPLETED", title: "Completed" },
220
+ { const: "FAILED", title: "Failed" },
221
+ { const: "TERMINATED", title: "Terminated" }
222
+ ]
223
+ },
224
+ terminationReason: {
225
+ type: "string",
226
+ title: "Termination reason"
227
+ }
228
+ }
229
+ }
230
+ }
231
+ };
232
+
233
+ // src/constants/specification/System/index.ts
234
+ import { WorkflowDefinitionTaskType as WorkflowDefinitionTaskType2 } from "@livechat/developer-studio-api";
235
+
236
+ // src/constants/products.ts
237
+ var OTHER_TYPES = {
238
+ SYSTEM: "system",
239
+ SCHEDULED: "scheduled",
240
+ MANUAL: "manual"
241
+ };
242
+ var OTHER_TYPES_DISPLAY = {
243
+ SYSTEM: "System"
244
+ };
245
+
246
+ // src/constants/specification/System/index.ts
247
+ var workflowHttpTask = {
248
+ name: WorkflowDefinitionTaskType2.http,
249
+ type: WorkflowDefinitionTaskType2.http,
250
+ taskReferenceName: "http",
251
+ inputParameters: {
252
+ asyncComplete: false,
253
+ http_request: {
254
+ method: "GET",
255
+ uri: "https://orkes-api-tester.orkesconductor.com/get"
256
+ }
257
+ }
258
+ };
259
+ var systemTaskConfigs = () => ({
260
+ [WorkflowDefinitionTaskType2.http]: {
261
+ kind: "task",
262
+ type: "other",
263
+ key: WorkflowDefinitionTaskType2.http,
264
+ customization: {
265
+ provider: OTHER_TYPES.SYSTEM,
266
+ providerDisplay: OTHER_TYPES_DISPLAY.SYSTEM,
267
+ displayName: "HTTP request",
268
+ shortDescription: "Make an HTTP request",
269
+ description: "Makes an HTTP request to an external API. You can specify the request method, URL, headers, and body."
270
+ },
271
+ specification: {
272
+ output: WORKFLOW_HTTP_TASK_OUTPUT_SCHEMA({
273
+ type: "object",
274
+ properties: {}
275
+ })
276
+ },
277
+ template: workflowHttpTask,
278
+ isEditable: true
279
+ },
280
+ [WorkflowDefinitionTaskType2.switch]: {
281
+ kind: "task",
282
+ type: "other",
283
+ key: WorkflowDefinitionTaskType2.switch,
284
+ customization: {
285
+ provider: OTHER_TYPES.SYSTEM,
286
+ providerDisplay: OTHER_TYPES_DISPLAY.SYSTEM,
287
+ displayName: "Condition",
288
+ shortDescription: "Conditional execution",
289
+ description: "Executes different branches of your workflow based on a condition. You can specify the condition and the tasks to be executed for each possible workflow path."
290
+ },
291
+ specification: {},
292
+ template: {
293
+ name: WorkflowDefinitionTaskType2.switch,
294
+ type: WorkflowDefinitionTaskType2.switch,
295
+ taskReferenceName: "condition",
296
+ inputParameters: {
297
+ switchCaseValue: ""
298
+ },
299
+ expression: "",
300
+ evaluatorType: "value-param",
301
+ decisionCases: {
302
+ "case-1": [],
303
+ "case-2": []
304
+ },
305
+ defaultCase: []
306
+ },
307
+ isEditable: false
308
+ },
309
+ [WorkflowDefinitionTaskType2.forkJoin]: {
310
+ kind: "task",
311
+ type: "other",
312
+ key: WorkflowDefinitionTaskType2.forkJoin,
313
+ customization: {
314
+ provider: OTHER_TYPES.SYSTEM,
315
+ providerDisplay: OTHER_TYPES_DISPLAY.SYSTEM,
316
+ displayName: "Path fork",
317
+ shortDescription: "Parallel execution",
318
+ description: "Executes multiple branches of your workflow in parallel. You can specify the tasks for each branch, and they will all be executed at the same time."
319
+ },
320
+ specification: {},
321
+ template: {
322
+ name: WorkflowDefinitionTaskType2.forkJoin,
323
+ type: WorkflowDefinitionTaskType2.forkJoin,
324
+ taskReferenceName: "fork",
325
+ forkTasks: [[]]
326
+ },
327
+ isEditable: false
328
+ },
329
+ [WorkflowDefinitionTaskType2.join]: {
330
+ kind: "task",
331
+ type: "other",
332
+ key: WorkflowDefinitionTaskType2.join,
333
+ customization: {
334
+ provider: OTHER_TYPES.SYSTEM,
335
+ providerDisplay: OTHER_TYPES_DISPLAY.SYSTEM,
336
+ displayName: "Join",
337
+ shortDescription: "",
338
+ description: ""
339
+ },
340
+ specification: {},
341
+ template: {
342
+ name: WorkflowDefinitionTaskType2.join,
343
+ type: WorkflowDefinitionTaskType2.join,
344
+ taskReferenceName: "join",
345
+ joinOn: []
346
+ },
347
+ isEditable: false
348
+ },
349
+ [WorkflowDefinitionTaskType2.terminate]: {
350
+ kind: "task",
351
+ type: "other",
352
+ key: WorkflowDefinitionTaskType2.terminate,
353
+ customization: {
354
+ provider: OTHER_TYPES.SYSTEM,
355
+ providerDisplay: OTHER_TYPES.SYSTEM,
356
+ displayName: "End workflow",
357
+ shortDescription: "End the workflow",
358
+ description: "Ends the workflow. You might use this if you have a condition that, if met, should stop the execution of the workflow."
359
+ },
360
+ specification: {},
361
+ template: {
362
+ name: WorkflowDefinitionTaskType2.terminate,
363
+ type: WorkflowDefinitionTaskType2.terminate,
364
+ taskReferenceName: "end_workflow",
365
+ inputParameters: {
366
+ terminationStatus: "",
367
+ terminationReason: ""
368
+ }
369
+ },
370
+ isEditable: false
371
+ }
372
+ });
373
+ var WorkflowSystemTriggers = /* @__PURE__ */ ((WorkflowSystemTriggers2) => {
374
+ WorkflowSystemTriggers2["Scheduled"] = "scheduled";
375
+ WorkflowSystemTriggers2["Manual"] = "manual";
376
+ return WorkflowSystemTriggers2;
377
+ })(WorkflowSystemTriggers || {});
378
+ var systemTriggerConfigs = () => ({
379
+ ["scheduled" /* Scheduled */]: {
380
+ kind: "trigger",
381
+ type: "system",
382
+ key: "scheduled" /* Scheduled */,
383
+ customization: {
384
+ provider: OTHER_TYPES.SYSTEM,
385
+ providerDisplay: OTHER_TYPES_DISPLAY.SYSTEM,
386
+ displayName: "Time schedule",
387
+ shortDescription: "Time schedule",
388
+ description: "Triggers the workflow only at a specified time or schedule."
389
+ },
390
+ specification: {
391
+ input: {
392
+ type: "object",
393
+ required: ["schedule"],
394
+ properties: {
395
+ schedule: {
396
+ type: "string",
397
+ title: "Schedule"
398
+ }
399
+ }
400
+ }
401
+ },
402
+ template: {
403
+ type: "recurring",
404
+ schedule: "* * * * *"
405
+ },
406
+ isEditable: true
407
+ },
408
+ ["manual" /* Manual */]: {
409
+ kind: "trigger",
410
+ type: "system",
411
+ key: "manual" /* Manual */,
412
+ customization: {
413
+ provider: OTHER_TYPES.SYSTEM,
414
+ providerDisplay: OTHER_TYPES_DISPLAY.SYSTEM,
415
+ displayName: "Manual trigger",
416
+ shortDescription: "Manual trigger",
417
+ description: "Executes the workflow only when a user initiates it."
418
+ },
419
+ specification: {
420
+ output: {}
421
+ },
422
+ template: {
423
+ name: "scheduled" /* Scheduled */,
424
+ type: "manual_only"
425
+ },
426
+ isEditable: false
427
+ }
428
+ });
429
+
430
+ // src/constants/specification/BigCommerce/index.ts
431
+ var bigCommerceProductBody = {
432
+ id: {
433
+ type: "number",
434
+ title: "Product ID"
435
+ },
436
+ name: {
437
+ type: "string",
438
+ title: "Product name"
439
+ },
440
+ type: {
441
+ type: "string",
442
+ title: "Product type",
443
+ description: "The product type. One of: physical (a physical stock unit) or a digital (a digital download)."
444
+ },
445
+ price: {
446
+ type: "number",
447
+ title: "Product price"
448
+ },
449
+ sku: {
450
+ type: "string",
451
+ title: "Product SKU"
452
+ },
453
+ description: {
454
+ type: "string",
455
+ title: "Product description"
456
+ },
457
+ width: {
458
+ type: "number",
459
+ title: "Product width"
460
+ },
461
+ height: {
462
+ type: "number",
463
+ title: "Product height"
464
+ },
465
+ depth: {
466
+ type: "number",
467
+ title: "Product depth"
468
+ },
469
+ weight: {
470
+ type: "number",
471
+ title: "Product weight",
472
+ description: "Weight of the product, which can be used when calculating shipping costs. Based on the unit set on the store."
473
+ },
474
+ cost_price: {
475
+ type: "number",
476
+ title: "Product cost price"
477
+ },
478
+ retail_price: {
479
+ type: "number",
480
+ title: "Product retail price"
481
+ },
482
+ sale_price: {
483
+ type: "number",
484
+ title: "Product sale price"
485
+ },
486
+ inventory_level: {
487
+ type: "number",
488
+ title: "Product inventory level"
489
+ },
490
+ inventory_warning_level: {
491
+ type: "number",
492
+ title: "Product inventory warning level"
493
+ },
494
+ inventory_tracking: {
495
+ type: "string",
496
+ title: "Product inventory tracking"
497
+ },
498
+ availability: {
499
+ type: "string",
500
+ title: "Product availability"
501
+ },
502
+ availability_description: {
503
+ type: "string",
504
+ title: "Product availability description"
505
+ },
506
+ gift_wrapping_options_type: {
507
+ type: "string",
508
+ title: "Product gift wrapping options type"
509
+ },
510
+ sort_order: {
511
+ type: "number",
512
+ title: "Product sort order"
513
+ },
514
+ condition: {
515
+ type: "string",
516
+ title: "Product condition"
517
+ },
518
+ is_condition_shown: {
519
+ type: "boolean",
520
+ title: "Product is condition shown"
521
+ },
522
+ brand_id: {
523
+ type: "number",
524
+ title: "Product brand ID"
525
+ },
526
+ meta_keywords: {
527
+ type: "array",
528
+ title: "Product meta keywords",
529
+ items: {
530
+ type: "string"
531
+ }
532
+ },
533
+ categories: {
534
+ type: "array",
535
+ title: "Product categories",
536
+ items: {
537
+ type: "number"
538
+ }
539
+ },
540
+ meta_description: {
541
+ type: "string",
542
+ title: "Product meta description"
543
+ },
544
+ option_set_id: {
545
+ type: "number",
546
+ title: "Product option set ID"
547
+ },
548
+ option_set_display: {
549
+ type: "string",
550
+ title: "Product option set display"
551
+ },
552
+ upc: {
553
+ type: "string",
554
+ title: "Product UPC"
555
+ },
556
+ search_keywords: {
557
+ type: "string",
558
+ title: "Product search keywords"
559
+ },
560
+ tax_class_id: {
561
+ type: "number",
562
+ title: "Product tax class ID"
563
+ },
564
+ view_count: {
565
+ type: "number",
566
+ title: "Product view count"
567
+ },
568
+ preorder_release_date: {
569
+ type: "string",
570
+ title: "Product preorder release date"
571
+ },
572
+ preorder_message: {
573
+ type: "string",
574
+ title: "Product preorder message"
575
+ },
576
+ order_quantity_minimum: {
577
+ type: "number",
578
+ title: "Product order quantity minimum"
579
+ },
580
+ order_quantity_maximum: {
581
+ type: "number",
582
+ title: "Product order quantity maximum"
583
+ },
584
+ page_title: {
585
+ type: "string",
586
+ title: "Product page title"
587
+ },
588
+ warranty: {
589
+ type: "string",
590
+ title: "Product warranty"
591
+ },
592
+ bin_picking_number: {
593
+ type: "string",
594
+ title: "Product bin picking number"
595
+ },
596
+ layout_file: {
597
+ type: "string",
598
+ title: "Product layout file"
599
+ }
600
+ };
601
+ var bigCommerceCustomerBody = {
602
+ first_name: {
603
+ type: "string",
604
+ title: "First name"
605
+ },
606
+ last_name: {
607
+ type: "string",
608
+ title: "Last name"
609
+ },
610
+ email: {
611
+ type: "string",
612
+ title: "Email"
613
+ },
614
+ company: { type: "string", title: "Company" },
615
+ phone: { type: "string", title: "Phone" },
616
+ notes: { type: "string", title: "Notes" },
617
+ tax_exempt_category: { type: "string", title: "Tax exempt category" },
618
+ customer_group_id: { type: "number", title: "Customer group ID" },
619
+ addresses: {
620
+ type: "array",
621
+ title: "Addresses",
622
+ items: {
623
+ type: "object",
624
+ properties: {
625
+ id: { type: "number", title: "Address ID" },
626
+ first_name: { type: "string", title: "First name" },
627
+ last_name: { type: "string", title: "Last name" },
628
+ company: { type: "string", title: "Company" },
629
+ phone: { type: "string", title: "Phone" },
630
+ email: { type: "string", title: "Email" },
631
+ address1: { type: "string", title: "Address 1" },
632
+ address2: { type: "string", title: "Address 2" },
633
+ city: { type: "string", title: "City" },
634
+ state_or_province: { type: "string", title: "State or province" },
635
+ postal_code: { type: "string", title: "Postal code" },
636
+ country_code: { type: "string", title: "Country code" }
637
+ }
638
+ }
639
+ }
640
+ };
641
+ var bigCommerceCustomerAddressBody = {
642
+ customer_id: {
643
+ type: "string",
644
+ title: "Customer ID"
645
+ },
646
+ first_name: {
647
+ type: "string",
648
+ title: "First name"
649
+ },
650
+ last_name: {
651
+ type: "string",
652
+ title: "Last name"
653
+ },
654
+ company: {
655
+ type: "string",
656
+ title: "Company"
657
+ },
658
+ phone: {
659
+ type: "string",
660
+ title: "Phone"
661
+ },
662
+ email: {
663
+ type: "string",
664
+ title: "Email"
665
+ },
666
+ address1: {
667
+ type: "string",
668
+ title: "Address 1"
669
+ },
670
+ address2: {
671
+ type: "string",
672
+ title: "Address 2"
673
+ },
674
+ city: {
675
+ type: "string",
676
+ title: "City"
677
+ },
678
+ state_or_province: {
679
+ type: "string",
680
+ title: "State or province"
681
+ },
682
+ postal_code: {
683
+ type: "string",
684
+ title: "Postal code"
685
+ },
686
+ country_code: {
687
+ type: "string",
688
+ title: "Country code"
689
+ }
690
+ };
691
+ var bigCommerceCustomerResponse = {
692
+ id: {
693
+ type: "number",
694
+ title: "Customer ID"
695
+ },
696
+ company: {
697
+ type: "string",
698
+ title: "Company"
699
+ },
700
+ first_name: {
701
+ type: "string",
702
+ title: "First name"
703
+ },
704
+ last_name: {
705
+ type: "string",
706
+ title: "Last name"
707
+ },
708
+ email: {
709
+ type: "string",
710
+ title: "Email"
711
+ },
712
+ phone: {
713
+ type: "string",
714
+ title: "Phone"
715
+ },
716
+ notes: {
717
+ type: "string",
718
+ title: "Notes"
719
+ },
720
+ date_created: {
721
+ type: "string",
722
+ title: "Date created"
723
+ },
724
+ date_modified: {
725
+ type: "string",
726
+ title: "Date modified"
727
+ },
728
+ store_credit: {
729
+ type: "number",
730
+ title: "Store credit"
731
+ },
732
+ registration_ip_address: {
733
+ type: "string",
734
+ title: "Registration IP address"
735
+ },
736
+ tax_exempt_category: {
737
+ type: "string",
738
+ title: "Tax exempt category"
739
+ },
740
+ customer_group_id: {
741
+ type: "number",
742
+ title: "Customer group ID"
743
+ },
744
+ addresses: {
745
+ type: "array",
746
+ title: "Addresses",
747
+ items: {
748
+ type: "object",
749
+ properties: {
750
+ id: { type: "number", title: "Address ID" },
751
+ first_name: { type: "string", title: "First name" },
752
+ last_name: { type: "string", title: "Last name" },
753
+ company: { type: "string", title: "Company" },
754
+ phone: { type: "string", title: "Phone" },
755
+ email: { type: "string", title: "Email" },
756
+ address1: { type: "string", title: "Address 1" },
757
+ address2: { type: "string", title: "Address 2" },
758
+ city: { type: "string", title: "City" },
759
+ state_or_province: { type: "string", title: "State or province" },
760
+ postal_code: { type: "string", title: "Postal code" },
761
+ country_code: { type: "string", title: "Country code" }
762
+ }
763
+ }
764
+ }
765
+ };
766
+ var BigCommerceTaskNames = /* @__PURE__ */ ((BigCommerceTaskNames2) => {
767
+ BigCommerceTaskNames2["CreateBlogPost"] = "BIGCOMMERCE_CREATE_BLOG_POST";
768
+ BigCommerceTaskNames2["CreateCustomer"] = "BIGCOMMERCE_CREATE_CUSTOMER";
769
+ BigCommerceTaskNames2["UpdateCustomer"] = "BIGCOMMERCE_UPDATE_CUSTOMER";
770
+ BigCommerceTaskNames2["CreateProduct"] = "BIGCOMMERCE_CREATE_PRODUCT";
771
+ BigCommerceTaskNames2["CreateCustomerAddress"] = "BIGCOMMERCE_CREATE_CUSTOMER_ADDRESS";
772
+ BigCommerceTaskNames2["GetCustomer"] = "BIGCOMMERCE_GET_CUSTOMER";
773
+ BigCommerceTaskNames2["GetCustomerAddresses"] = "BIGCOMMERCE_GET_CUSTOMER_ADDRESSES";
774
+ BigCommerceTaskNames2["GetProducts"] = "BIGCOMMERCE_GET_PRODUCTS";
775
+ return BigCommerceTaskNames2;
776
+ })(BigCommerceTaskNames || {});
777
+ var bigCommerceTaskConfigs = () => ({
778
+ ["BIGCOMMERCE_CREATE_BLOG_POST" /* CreateBlogPost */]: {
779
+ kind: "task",
780
+ type: WorkflowDefinitionTaskType3.http,
781
+ key: "BIGCOMMERCE_CREATE_BLOG_POST" /* CreateBlogPost */,
782
+ url: `${getWorkflowsEnv(
783
+ "workflowsFunctionsUrl"
784
+ )}/functions/create-bigcommerce-blog-post`,
785
+ customization: {
786
+ provider: IntegrationNames.BigCommerce,
787
+ providerDisplay: IntegrationDisplayNames.BigCommerce,
788
+ displayName: "Create blog post",
789
+ shortDescription: "Create blog post",
790
+ description: "Creates a new blog post on your site."
791
+ },
792
+ specification: {
793
+ input: WORKFLOW_HTTP_TASK_INPUT_SCHEMA({
794
+ type: "object",
795
+ required: ["title", "body"],
796
+ properties: {
797
+ title: {
798
+ type: "string",
799
+ title: "Title"
800
+ },
801
+ body: {
802
+ type: "string",
803
+ title: "Text body"
804
+ },
805
+ tags: {
806
+ type: "array",
807
+ title: "Tags",
808
+ items: {
809
+ type: "string"
810
+ }
811
+ },
812
+ is_published: {
813
+ type: "boolean",
814
+ title: "Is published"
815
+ },
816
+ meta_description: {
817
+ type: "string",
818
+ title: "Meta description"
819
+ },
820
+ author: {
821
+ type: "string",
822
+ title: "Author"
823
+ },
824
+ meta_keywords: {
825
+ type: "string",
826
+ title: "Meta keywords"
827
+ },
828
+ published_date: {
829
+ type: "string",
830
+ title: "Published date"
831
+ },
832
+ thumbnailPath: {
833
+ type: "string",
834
+ title: "Thumbnail path"
835
+ }
836
+ }
837
+ }),
838
+ output: WORKFLOW_HTTP_TASK_OUTPUT_SCHEMA({
839
+ type: "object",
840
+ required: ["post"],
841
+ properties: {
842
+ post: {
843
+ type: "object",
844
+ required: ["id", "title", "url", "body", "summary", "author"],
845
+ properties: {
846
+ id: {
847
+ type: "number",
848
+ title: "Post ID"
849
+ },
850
+ title: {
851
+ type: "string",
852
+ title: "Post title"
853
+ },
854
+ url: {
855
+ type: "string",
856
+ title: "Post URL"
857
+ },
858
+ preview_url: {
859
+ type: "string",
860
+ title: "Post preview URL"
861
+ },
862
+ body: {
863
+ type: "string",
864
+ title: "Post body"
865
+ },
866
+ tags: {
867
+ type: "array",
868
+ title: "Post tags",
869
+ items: {
870
+ type: "string"
871
+ }
872
+ },
873
+ summary: {
874
+ type: "string",
875
+ title: "Post summary"
876
+ },
877
+ published_date: {
878
+ type: "string",
879
+ title: "Post published date"
880
+ },
881
+ author: {
882
+ type: "string",
883
+ title: "Post author"
884
+ },
885
+ thumbnail_path: {
886
+ type: "string",
887
+ title: "Post thumbnail path"
888
+ },
889
+ meta_description: {
890
+ type: "string",
891
+ title: "Post meta description"
892
+ },
893
+ meta_keywords: {
894
+ type: "string",
895
+ title: "Post meta keywords"
896
+ }
897
+ }
898
+ }
899
+ }
900
+ })
901
+ },
902
+ template: __spreadProps(__spreadValues({}, workflowHttpTask), {
903
+ name: "BIGCOMMERCE_CREATE_BLOG_POST" /* CreateBlogPost */,
904
+ taskReferenceName: "bigcommerce_create_blog_post",
905
+ inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
906
+ http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
907
+ uri: `${getWorkflowsEnv(
908
+ "workflowsFunctionsUrl"
909
+ )}/functions/create-bigcommerce-blog-post`,
910
+ method: "POST",
911
+ body: {
912
+ title: "Blog post title",
913
+ body: "#{chat_transcript}"
914
+ },
915
+ headers: {
916
+ Accept: "application/json",
917
+ "x-cred-access-token": "${workflow.credentials.bigcommerce.access_token}",
918
+ "x-cred-bigcommerce-store-hash": "${workflow.credentials.bigcommerce.shop}"
919
+ }
920
+ })
921
+ })
922
+ }),
923
+ isEditable: true
924
+ },
925
+ ["BIGCOMMERCE_CREATE_CUSTOMER" /* CreateCustomer */]: {
926
+ kind: "task",
927
+ type: WorkflowDefinitionTaskType3.http,
928
+ key: "BIGCOMMERCE_CREATE_CUSTOMER" /* CreateCustomer */,
929
+ url: `${getWorkflowsEnv(
930
+ "workflowsFunctionsUrl"
931
+ )}/functions/create-bigcommerce-customer`,
932
+ customization: {
933
+ provider: IntegrationNames.BigCommerce,
934
+ providerDisplay: IntegrationDisplayNames.BigCommerce,
935
+ displayName: "Create customer",
936
+ shortDescription: "Create customer",
937
+ description: "Creates a new customer profile in Bigcommerce."
938
+ },
939
+ specification: {
940
+ input: WORKFLOW_HTTP_TASK_INPUT_SCHEMA({
941
+ type: "object",
942
+ required: [
943
+ "address1",
944
+ "city",
945
+ "country_code",
946
+ "first_name",
947
+ "last_name",
948
+ "email",
949
+ "postal_code",
950
+ "state_or_province"
951
+ ],
952
+ properties: bigCommerceCustomerBody
953
+ }),
954
+ output: WORKFLOW_HTTP_TASK_OUTPUT_SCHEMA({
955
+ type: "object",
956
+ properties: bigCommerceCustomerResponse
957
+ })
958
+ },
959
+ template: __spreadProps(__spreadValues({}, workflowHttpTask), {
960
+ name: "BIGCOMMERCE_CREATE_CUSTOMER" /* CreateCustomer */,
961
+ taskReferenceName: "bigcommerce_create_customer",
962
+ inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
963
+ http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
964
+ uri: `${getWorkflowsEnv(
965
+ "workflowsFunctionsUrl"
966
+ )}/functions/create-bigcommerce-customer`,
967
+ method: "POST",
968
+ body: {
969
+ first_name: "#{first_name}",
970
+ last_name: "#{last_name}",
971
+ email: "#{email}"
972
+ },
973
+ headers: {
974
+ Accept: "application/json",
975
+ "x-cred-access-token": "${workflow.credentials.bigcommerce.access_token}",
976
+ "x-cred-bigcommerce-store-hash": "${workflow.credentials.bigcommerce.shop}"
977
+ }
978
+ })
979
+ })
980
+ }),
981
+ isEditable: true
982
+ },
983
+ ["BIGCOMMERCE_UPDATE_CUSTOMER" /* UpdateCustomer */]: {
984
+ kind: "task",
985
+ type: WorkflowDefinitionTaskType3.http,
986
+ key: "BIGCOMMERCE_UPDATE_CUSTOMER" /* UpdateCustomer */,
987
+ url: `${getWorkflowsEnv(
988
+ "workflowsFunctionsUrl"
989
+ )}/functions/update-bigcommerce-customer`,
990
+ customization: {
991
+ provider: IntegrationNames.BigCommerce,
992
+ providerDisplay: IntegrationDisplayNames.BigCommerce,
993
+ displayName: "Update customer",
994
+ shortDescription: "Update customer",
995
+ description: "Modifies the details of an existing customer in your Bigcommerce."
996
+ },
997
+ specification: {
998
+ input: WORKFLOW_HTTP_TASK_INPUT_SCHEMA({
999
+ type: "object",
1000
+ required: ["customer"],
1001
+ properties: {
1002
+ customer: {
1003
+ type: "object",
1004
+ title: "Customer",
1005
+ properties: bigCommerceCustomerBody
1006
+ }
1007
+ }
1008
+ }),
1009
+ output: WORKFLOW_HTTP_TASK_OUTPUT_SCHEMA({
1010
+ type: "object",
1011
+ required: ["id"],
1012
+ properties: bigCommerceCustomerResponse
1013
+ })
1014
+ },
1015
+ template: __spreadProps(__spreadValues({}, workflowHttpTask), {
1016
+ name: "BIGCOMMERCE_CREATE_CUSTOMER" /* CreateCustomer */,
1017
+ taskReferenceName: "bigcommerce_update_customer",
1018
+ inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
1019
+ http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
1020
+ uri: `${getWorkflowsEnv(
1021
+ "workflowsFunctionsUrl"
1022
+ )}/functions/update-bigcommerce-customer`,
1023
+ method: "PATCH",
1024
+ body: {
1025
+ id: "#{customer_id}"
1026
+ },
1027
+ headers: {
1028
+ Accept: "application/json",
1029
+ "x-cred-access-token": "${workflow.credentials.bigcommerce.access_token}",
1030
+ "x-cred-bigcommerce-store-hash": "${workflow.credentials.bigcommerce.shop}"
1031
+ }
1032
+ })
1033
+ })
1034
+ }),
1035
+ isEditable: true
1036
+ },
1037
+ ["BIGCOMMERCE_CREATE_PRODUCT" /* CreateProduct */]: {
1038
+ kind: "task",
1039
+ type: WorkflowDefinitionTaskType3.http,
1040
+ key: "BIGCOMMERCE_CREATE_PRODUCT" /* CreateProduct */,
1041
+ url: `${getWorkflowsEnv(
1042
+ "workflowsFunctionsUrl"
1043
+ )}/functions/create-bigcommerce-product`,
1044
+ customization: {
1045
+ provider: IntegrationNames.BigCommerce,
1046
+ providerDisplay: IntegrationDisplayNames.BigCommerce,
1047
+ displayName: "Create product",
1048
+ shortDescription: "Create product",
1049
+ description: "Adds a new product to your catalog."
1050
+ },
1051
+ specification: {
1052
+ input: WORKFLOW_HTTP_TASK_INPUT_SCHEMA({
1053
+ type: "object",
1054
+ required: ["name", "type", "price", "weight"],
1055
+ properties: bigCommerceProductBody
1056
+ }),
1057
+ output: WORKFLOW_HTTP_TASK_OUTPUT_SCHEMA({
1058
+ type: "object",
1059
+ required: ["id"],
1060
+ properties: {
1061
+ id: {
1062
+ type: "number",
1063
+ title: "Product ID"
1064
+ }
1065
+ }
1066
+ })
1067
+ },
1068
+ template: __spreadProps(__spreadValues({}, workflowHttpTask), {
1069
+ name: "BIGCOMMERCE_CREATE_PRODUCT" /* CreateProduct */,
1070
+ taskReferenceName: "bigcommerce_create_product",
1071
+ inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
1072
+ http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
1073
+ uri: `${getWorkflowsEnv(
1074
+ "workflowsFunctionsUrl"
1075
+ )}/functions/create-bigcommerce-product`,
1076
+ method: "POST",
1077
+ body: {
1078
+ name: "Product name",
1079
+ type: "Product type",
1080
+ price: 100,
1081
+ weight: 1
1082
+ },
1083
+ headers: {
1084
+ Accept: "application/json",
1085
+ "x-cred-access-token": "${workflow.credentials.bigcommerce.access_token}",
1086
+ "x-cred-bigcommerce-store-hash": "${workflow.credentials.bigcommerce.shop}"
1087
+ }
1088
+ })
1089
+ })
1090
+ }),
1091
+ isEditable: true
1092
+ },
1093
+ ["BIGCOMMERCE_CREATE_CUSTOMER_ADDRESS" /* CreateCustomerAddress */]: {
1094
+ kind: "task",
1095
+ type: WorkflowDefinitionTaskType3.http,
1096
+ key: "BIGCOMMERCE_CREATE_CUSTOMER_ADDRESS" /* CreateCustomerAddress */,
1097
+ url: `${getWorkflowsEnv(
1098
+ "workflowsFunctionsUrl"
1099
+ )}/functions/create-bigcommerce-customer-address`,
1100
+ customization: {
1101
+ provider: IntegrationNames.BigCommerce,
1102
+ providerDisplay: IntegrationDisplayNames.BigCommerce,
1103
+ displayName: "Create customer address",
1104
+ shortDescription: "Create customer address",
1105
+ description: "Adds a new address to an existing customer's profile."
1106
+ },
1107
+ specification: {
1108
+ input: WORKFLOW_HTTP_TASK_INPUT_SCHEMA({
1109
+ type: "object",
1110
+ required: ["address"],
1111
+ properties: {
1112
+ address: {
1113
+ type: "object",
1114
+ title: "Address",
1115
+ required: [
1116
+ "first_name",
1117
+ "last_name",
1118
+ "city",
1119
+ "country_code",
1120
+ "address1",
1121
+ "state_or_province",
1122
+ "postal_code"
1123
+ ],
1124
+ properties: bigCommerceCustomerAddressBody
1125
+ }
1126
+ }
1127
+ }),
1128
+ output: WORKFLOW_HTTP_TASK_OUTPUT_SCHEMA({
1129
+ type: "object",
1130
+ required: ["id"],
1131
+ properties: {
1132
+ id: {
1133
+ type: "number",
1134
+ title: "Address ID"
1135
+ }
1136
+ }
1137
+ })
1138
+ },
1139
+ template: __spreadProps(__spreadValues({}, workflowHttpTask), {
1140
+ name: "BIGCOMMERCE_CREATE_CUSTOMER_ADDRESS" /* CreateCustomerAddress */,
1141
+ taskReferenceName: "bigcommerce_create_customer_address",
1142
+ inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
1143
+ http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
1144
+ uri: `${getWorkflowsEnv(
1145
+ "workflowsFunctionsUrl"
1146
+ )}/functions/create-bigcommerce-customer-address`,
1147
+ method: "POST",
1148
+ body: {
1149
+ customer_id: "#{customer_id}",
1150
+ address: {
1151
+ customer_id: 1,
1152
+ first_name: "#{first_name}",
1153
+ last_name: "#{last_name}",
1154
+ city: "City",
1155
+ country_code: "US",
1156
+ address1: "Address",
1157
+ state_or_province: "CA",
1158
+ postal_code: "12345"
1159
+ }
1160
+ },
1161
+ headers: {
1162
+ Accept: "application/json",
1163
+ "x-cred-access-token": "${workflow.credentials.bigcommerce.access_token}",
1164
+ "x-cred-bigcommerce-store-hash": "${workflow.credentials.bigcommerce.shop}"
1165
+ }
1166
+ })
1167
+ })
1168
+ }),
1169
+ isEditable: true
1170
+ },
1171
+ ["BIGCOMMERCE_GET_CUSTOMER" /* GetCustomer */]: {
1172
+ kind: "task",
1173
+ type: WorkflowDefinitionTaskType3.http,
1174
+ key: "BIGCOMMERCE_GET_CUSTOMER" /* GetCustomer */,
1175
+ url: `${getWorkflowsEnv(
1176
+ "workflowsFunctionsUrl"
1177
+ )}/functions/get-bigcommerce-customer`,
1178
+ customization: {
1179
+ provider: IntegrationNames.BigCommerce,
1180
+ providerDisplay: IntegrationDisplayNames.BigCommerce,
1181
+ displayName: "Find customer",
1182
+ shortDescription: "Find customer",
1183
+ description: "Searches for an existing customer in your Bigcommerce records."
1184
+ },
1185
+ specification: {
1186
+ input: WORKFLOW_HTTP_TASK_INPUT_SCHEMA(void 0, {
1187
+ type: "object",
1188
+ required: [],
1189
+ properties: {
1190
+ customer_email: {
1191
+ type: "string",
1192
+ title: "Customer email"
1193
+ },
1194
+ customer_id: {
1195
+ type: "string",
1196
+ title: "Customer ID"
1197
+ }
1198
+ }
1199
+ }),
1200
+ output: WORKFLOW_HTTP_TASK_OUTPUT_SCHEMA({
1201
+ type: "object",
1202
+ properties: bigCommerceCustomerResponse
1203
+ })
1204
+ },
1205
+ template: __spreadProps(__spreadValues({}, workflowHttpTask), {
1206
+ name: "BIGCOMMERCE_GET_CUSTOMER" /* GetCustomer */,
1207
+ taskReferenceName: "bigcommerce_get_customer",
1208
+ inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
1209
+ http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
1210
+ uri: `${getWorkflowsEnv(
1211
+ "workflowsFunctionsUrl"
1212
+ )}/functions/get-bigcommerce-customer?customer_id=#{customer_id}&customer_email=#{customer_email}`,
1213
+ method: "GET",
1214
+ headers: {
1215
+ Accept: "application/json",
1216
+ "x-cred-access-token": "${workflow.credentials.bigcommerce.access_token}",
1217
+ "x-cred-bigcommerce-store-hash": "${workflow.credentials.bigcommerce.shop}"
1218
+ }
1219
+ })
1220
+ })
1221
+ }),
1222
+ isEditable: true
1223
+ },
1224
+ ["BIGCOMMERCE_GET_CUSTOMER_ADDRESSES" /* GetCustomerAddresses */]: {
1225
+ kind: "task",
1226
+ type: WorkflowDefinitionTaskType3.http,
1227
+ key: "BIGCOMMERCE_GET_CUSTOMER_ADDRESSES" /* GetCustomerAddresses */,
1228
+ url: `${getWorkflowsEnv(
1229
+ "workflowsFunctionsUrl"
1230
+ )}/functions/get-bigcommerce-customer-address`,
1231
+ customization: {
1232
+ provider: IntegrationNames.BigCommerce,
1233
+ providerDisplay: IntegrationDisplayNames.BigCommerce,
1234
+ displayName: "Get customer address",
1235
+ shortDescription: "Get customer address",
1236
+ description: "Searches for an address of an existing customer."
1237
+ },
1238
+ specification: {
1239
+ input: WORKFLOW_HTTP_TASK_INPUT_SCHEMA(void 0, {
1240
+ type: "object",
1241
+ required: ["customer_id"],
1242
+ properties: {
1243
+ customer_id: {
1244
+ type: "string",
1245
+ title: "Customer ID"
1246
+ }
1247
+ }
1248
+ }),
1249
+ output: WORKFLOW_HTTP_TASK_OUTPUT_SCHEMA({
1250
+ type: "array",
1251
+ items: {
1252
+ type: "object",
1253
+ properties: bigCommerceCustomerAddressBody
1254
+ }
1255
+ })
1256
+ },
1257
+ template: __spreadProps(__spreadValues({}, workflowHttpTask), {
1258
+ name: "BIGCOMMERCE_GET_CUSTOMER_ADDRESSES" /* GetCustomerAddresses */,
1259
+ taskReferenceName: "bigcommerce_get_customer_addresses",
1260
+ inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
1261
+ http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
1262
+ uri: `${getWorkflowsEnv(
1263
+ "workflowsFunctionsUrl"
1264
+ )}/functions/get-bigcommerce-customer-addresses?customer_id=#{customer_id}`,
1265
+ method: "GET",
1266
+ headers: {
1267
+ Accept: "application/json",
1268
+ "x-cred-access-token": "${workflow.credentials.bigcommerce.access_token}",
1269
+ "x-cred-bigcommerce-store-hash": "${workflow.credentials.bigcommerce.shop}"
1270
+ }
1271
+ })
1272
+ })
1273
+ }),
1274
+ isEditable: true
1275
+ },
1276
+ ["BIGCOMMERCE_GET_PRODUCTS" /* GetProducts */]: {
1277
+ kind: "task",
1278
+ type: WorkflowDefinitionTaskType3.http,
1279
+ key: "BIGCOMMERCE_GET_PRODUCTS" /* GetProducts */,
1280
+ url: `${getWorkflowsEnv(
1281
+ "workflowsFunctionsUrl"
1282
+ )}/functions/get-bigcommerce-products`,
1283
+ customization: {
1284
+ provider: IntegrationNames.BigCommerce,
1285
+ providerDisplay: IntegrationDisplayNames.BigCommerce,
1286
+ displayName: "Get products",
1287
+ shortDescription: "Get products",
1288
+ description: "Lists all products in your store."
1289
+ },
1290
+ specification: {
1291
+ output: WORKFLOW_HTTP_TASK_OUTPUT_SCHEMA({
1292
+ type: "array",
1293
+ items: {
1294
+ type: "object",
1295
+ properties: bigCommerceProductBody
1296
+ }
1297
+ })
1298
+ },
1299
+ template: __spreadProps(__spreadValues({}, workflowHttpTask), {
1300
+ name: "BIGCOMMERCE_GET_PRODUCTS" /* GetProducts */,
1301
+ taskReferenceName: "bigcommerce_get_products",
1302
+ inputParameters: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters), {
1303
+ http_request: __spreadProps(__spreadValues({}, workflowHttpTask.inputParameters.http_request), {
1304
+ uri: `${getWorkflowsEnv(
1305
+ "workflowsFunctionsUrl"
1306
+ )}/functions/get-bigcommerce-products?limit=200&page=1`,
1307
+ method: "GET",
1308
+ headers: {
1309
+ Accept: "application/json",
1310
+ "x-cred-access-token": "${workflow.credentials.bigcommerce.access_token}",
1311
+ "x-cred-bigcommerce-store-hash": "${workflow.credentials.bigcommerce.shop}"
1312
+ }
1313
+ })
1314
+ })
1315
+ }),
1316
+ isEditable: true
1317
+ }
1318
+ });
1319
+ var BigCommerceTriggerNames = {
1320
+ CartCreated: `${IntegrationNames.BigCommerce}-${BigCommerceEventNames.CartCreated}`,
1321
+ CartUpdated: `${IntegrationNames.BigCommerce}-${BigCommerceEventNames.CartUpdated}`,
1322
+ OrderCreated: `${IntegrationNames.BigCommerce}-${BigCommerceEventNames.OrderCreated}`,
1323
+ OrderUpdated: `${IntegrationNames.BigCommerce}-${BigCommerceEventNames.OrderUpdated}`,
1324
+ ProductCreated: `${IntegrationNames.BigCommerce}-${BigCommerceEventNames.ProductCreated}`,
1325
+ ProductUpdated: `${IntegrationNames.BigCommerce}-${BigCommerceEventNames.ProductUpdated}`
1326
+ };
1327
+ var bigcommerceTriggerConfigs = () => ({
1328
+ [BigCommerceTriggerNames.CartCreated]: {
1329
+ kind: "trigger",
1330
+ type: "webhook",
1331
+ key: BigCommerceTriggerNames.CartCreated,
1332
+ name: BigCommerceEventNames.CartCreated,
1333
+ customization: {
1334
+ provider: IntegrationNames.BigCommerce,
1335
+ providerDisplay: IntegrationDisplayNames.BigCommerce,
1336
+ displayName: "Card created",
1337
+ shortDescription: "Card created",
1338
+ description: "Triggers when a new card is created"
1339
+ },
1340
+ specification: {
1341
+ output: {
1342
+ type: "object",
1343
+ properties: {
1344
+ card: {
1345
+ type: "string"
1346
+ },
1347
+ id: {
1348
+ type: "string"
1349
+ }
1350
+ }
1351
+ }
1352
+ },
1353
+ template: {
1354
+ type: "webhook",
1355
+ name: BigCommerceTriggerNames.CartCreated,
1356
+ webhook: {
1357
+ source: IntegrationNames.BigCommerce,
1358
+ event: {
1359
+ name: BigCommerceEventNames.CartCreated
1360
+ },
1361
+ headers: {
1362
+ "x-adapter-bigcommerce-token": [
1363
+ "${workflow.credentials.bigcommerce.access_token}"
1364
+ ],
1365
+ "x-adapter-bigcommerce-shop": [
1366
+ "${workflow.credentials.bigcommerce.shop}"
1367
+ ]
1368
+ }
1369
+ }
1370
+ },
1371
+ isEditable: true
1372
+ },
1373
+ [BigCommerceTriggerNames.CartUpdated]: {
1374
+ kind: "trigger",
1375
+ type: "webhook",
1376
+ key: BigCommerceTriggerNames.CartUpdated,
1377
+ name: BigCommerceEventNames.CartUpdated,
1378
+ customization: {
1379
+ provider: IntegrationNames.BigCommerce,
1380
+ providerDisplay: IntegrationDisplayNames.BigCommerce,
1381
+ displayName: "Card updated",
1382
+ shortDescription: "Card updated",
1383
+ description: "Triggers when a card is updated"
1384
+ },
1385
+ specification: {
1386
+ output: {
1387
+ type: "object",
1388
+ properties: {
1389
+ card: {
1390
+ type: "string"
1391
+ },
1392
+ id: {
1393
+ type: "string"
1394
+ }
1395
+ }
1396
+ }
1397
+ },
1398
+ template: {
1399
+ type: "webhook",
1400
+ name: BigCommerceTriggerNames.CartUpdated,
1401
+ webhook: {
1402
+ source: IntegrationNames.BigCommerce,
1403
+ event: {
1404
+ name: BigCommerceEventNames.CartUpdated
1405
+ },
1406
+ headers: {
1407
+ "x-adapter-bigcommerce-token": [
1408
+ "${workflow.credentials.bigcommerce.access_token}"
1409
+ ],
1410
+ "x-adapter-bigcommerce-shop": [
1411
+ "${workflow.credentials.bigcommerce.shop}"
1412
+ ]
1413
+ }
1414
+ }
1415
+ },
1416
+ isEditable: true
1417
+ },
1418
+ [BigCommerceTriggerNames.OrderCreated]: {
1419
+ kind: "trigger",
1420
+ type: "webhook",
1421
+ key: BigCommerceTriggerNames.OrderCreated,
1422
+ name: BigCommerceEventNames.OrderCreated,
1423
+ customization: {
1424
+ provider: IntegrationNames.BigCommerce,
1425
+ providerDisplay: IntegrationDisplayNames.BigCommerce,
1426
+ displayName: "Order created",
1427
+ shortDescription: "Order created",
1428
+ description: "Triggers when a new order is created"
1429
+ },
1430
+ specification: {
1431
+ output: {
1432
+ type: "object",
1433
+ properties: {
1434
+ id: {
1435
+ type: "number"
1436
+ },
1437
+ email: {
1438
+ type: "string"
1439
+ }
1440
+ }
1441
+ }
1442
+ },
1443
+ template: {
1444
+ type: "webhook",
1445
+ name: BigCommerceTriggerNames.OrderCreated,
1446
+ webhook: {
1447
+ source: IntegrationNames.BigCommerce,
1448
+ event: {
1449
+ name: BigCommerceEventNames.OrderCreated
1450
+ },
1451
+ headers: {
1452
+ "x-adapter-bigcommerce-token": [
1453
+ "${workflow.credentials.bigcommerce.access_token}"
1454
+ ],
1455
+ "x-adapter-bigcommerce-shop": [
1456
+ "${workflow.credentials.bigcommerce.shop}"
1457
+ ]
1458
+ }
1459
+ }
1460
+ },
1461
+ isEditable: true
1462
+ },
1463
+ [BigCommerceTriggerNames.OrderUpdated]: {
1464
+ kind: "trigger",
1465
+ type: "webhook",
1466
+ key: BigCommerceTriggerNames.OrderUpdated,
1467
+ name: BigCommerceEventNames.OrderUpdated,
1468
+ customization: {
1469
+ provider: IntegrationNames.BigCommerce,
1470
+ providerDisplay: IntegrationDisplayNames.BigCommerce,
1471
+ displayName: "Order updated",
1472
+ shortDescription: "Order updated",
1473
+ description: "Triggers when a order is updated"
1474
+ },
1475
+ specification: {
1476
+ output: {
1477
+ type: "object",
1478
+ properties: {
1479
+ id: {
1480
+ type: "number"
1481
+ },
1482
+ email: {
1483
+ type: "string"
1484
+ }
1485
+ }
1486
+ }
1487
+ },
1488
+ template: {
1489
+ type: "webhook",
1490
+ name: BigCommerceTriggerNames.OrderUpdated,
1491
+ webhook: {
1492
+ source: IntegrationNames.BigCommerce,
1493
+ event: {
1494
+ name: BigCommerceEventNames.OrderUpdated
1495
+ },
1496
+ headers: {
1497
+ "x-adapter-bigcommerce-token": [
1498
+ "${workflow.credentials.bigcommerce.access_token}"
1499
+ ],
1500
+ "x-adapter-bigcommerce-shop": [
1501
+ "${workflow.credentials.bigcommerce.shop}"
1502
+ ]
1503
+ }
1504
+ }
1505
+ },
1506
+ isEditable: true
1507
+ },
1508
+ [BigCommerceTriggerNames.ProductCreated]: {
1509
+ kind: "trigger",
1510
+ type: "webhook",
1511
+ key: BigCommerceTriggerNames.ProductCreated,
1512
+ name: BigCommerceEventNames.ProductCreated,
1513
+ customization: {
1514
+ provider: IntegrationNames.BigCommerce,
1515
+ providerDisplay: IntegrationDisplayNames.BigCommerce,
1516
+ displayName: "Product created",
1517
+ shortDescription: "Product created",
1518
+ description: "Triggers when a new product is created"
1519
+ },
1520
+ specification: {
1521
+ output: {
1522
+ type: "object",
1523
+ properties: {
1524
+ id: {
1525
+ type: "number"
1526
+ },
1527
+ type: {
1528
+ type: "string"
1529
+ }
1530
+ }
1531
+ }
1532
+ },
1533
+ template: {
1534
+ type: "webhook",
1535
+ name: BigCommerceTriggerNames.ProductCreated,
1536
+ webhook: {
1537
+ source: IntegrationNames.BigCommerce,
1538
+ event: {
1539
+ name: BigCommerceEventNames.ProductCreated
1540
+ },
1541
+ headers: {
1542
+ "x-adapter-bigcommerce-token": [
1543
+ "${workflow.credentials.bigcommerce.access_token}"
1544
+ ],
1545
+ "x-adapter-bigcommerce-shop": [
1546
+ "${workflow.credentials.bigcommerce.shop}"
1547
+ ]
1548
+ }
1549
+ }
1550
+ },
1551
+ isEditable: true
1552
+ },
1553
+ [BigCommerceTriggerNames.ProductUpdated]: {
1554
+ kind: "trigger",
1555
+ type: "webhook",
1556
+ key: BigCommerceTriggerNames.ProductUpdated,
1557
+ name: BigCommerceEventNames.ProductUpdated,
1558
+ customization: {
1559
+ provider: IntegrationNames.BigCommerce,
1560
+ providerDisplay: IntegrationDisplayNames.BigCommerce,
1561
+ displayName: "Product updated",
1562
+ shortDescription: "Product updated",
1563
+ description: "Triggers when a product is updated"
1564
+ },
1565
+ specification: {
1566
+ output: {
1567
+ type: "object",
1568
+ properties: {
1569
+ id: {
1570
+ type: "number"
1571
+ },
1572
+ type: {
1573
+ type: "string"
1574
+ }
1575
+ }
1576
+ }
1577
+ },
1578
+ template: {
1579
+ type: "webhook",
1580
+ name: BigCommerceTriggerNames.ProductUpdated,
1581
+ webhook: {
1582
+ source: IntegrationNames.BigCommerce,
1583
+ event: {
1584
+ name: BigCommerceEventNames.ProductUpdated
1585
+ },
1586
+ headers: {
1587
+ "x-adapter-bigcommerce-token": [
1588
+ "${workflow.credentials.bigcommerce.access_token}"
1589
+ ],
1590
+ "x-adapter-bigcommerce-shop": [
1591
+ "${workflow.credentials.bigcommerce.shop}"
1592
+ ]
1593
+ }
1594
+ }
1595
+ },
1596
+ isEditable: true
1597
+ }
1598
+ });
1599
+
1600
+ export {
1601
+ config,
1602
+ setWorkflowsConfig,
1603
+ getWorkflowsEnv,
1604
+ OTHER_TYPES,
1605
+ OTHER_TYPES_DISPLAY,
1606
+ isJSONSchema7,
1607
+ WORKFLOW_TRIGGER_OUTPUT_SCHEMA,
1608
+ WORKFLOW_HTTP_TASK_SCHEMA,
1609
+ WORKFLOW_HTTP_TASK_INPUT_SCHEMA,
1610
+ WORKFLOW_HTTP_TASK_OUTPUT_SCHEMA,
1611
+ WORKFLOW_SWITCH_TASK_SCHEMA,
1612
+ WORKFLOW_FORK_TASK_SCHEMA,
1613
+ WORKFLOW_JOIN_TASK_SCHEMA,
1614
+ WORKFLOW_TERMINATE_TASK_SCHEMA,
1615
+ workflowHttpTask,
1616
+ systemTaskConfigs,
1617
+ WorkflowSystemTriggers,
1618
+ systemTriggerConfigs,
1619
+ BigCommerceTaskNames,
1620
+ bigCommerceTaskConfigs,
1621
+ BigCommerceTriggerNames,
1622
+ bigcommerceTriggerConfigs
1623
+ };