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