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