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