@activepieces/piece-bigcommerce 0.1.9 → 0.1.10

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.
Files changed (125) hide show
  1. package/package.json +7 -12
  2. package/src/index.js +19 -84
  3. package/src/index.d.ts +0 -6
  4. package/src/index.d.ts.map +0 -1
  5. package/src/index.js.map +0 -1
  6. package/src/lib/actions/create-a-product.d.ts +0 -14
  7. package/src/lib/actions/create-a-product.d.ts.map +0 -1
  8. package/src/lib/actions/create-a-product.js +0 -78
  9. package/src/lib/actions/create-a-product.js.map +0 -1
  10. package/src/lib/actions/create-blog-post.d.ts +0 -16
  11. package/src/lib/actions/create-blog-post.d.ts.map +0 -1
  12. package/src/lib/actions/create-blog-post.js +0 -85
  13. package/src/lib/actions/create-blog-post.js.map +0 -1
  14. package/src/lib/actions/create-customer-address.d.ts +0 -25
  15. package/src/lib/actions/create-customer-address.d.ts.map +0 -1
  16. package/src/lib/actions/create-customer-address.js +0 -83
  17. package/src/lib/actions/create-customer-address.js.map +0 -1
  18. package/src/lib/actions/create-customer.d.ts +0 -13
  19. package/src/lib/actions/create-customer.d.ts.map +0 -1
  20. package/src/lib/actions/create-customer.js +0 -68
  21. package/src/lib/actions/create-customer.js.map +0 -1
  22. package/src/lib/actions/delete-a-product.d.ts +0 -8
  23. package/src/lib/actions/delete-a-product.d.ts.map +0 -1
  24. package/src/lib/actions/delete-a-product.js +0 -34
  25. package/src/lib/actions/delete-a-product.js.map +0 -1
  26. package/src/lib/actions/find-or-create-customer.d.ts +0 -13
  27. package/src/lib/actions/find-or-create-customer.d.ts.map +0 -1
  28. package/src/lib/actions/find-or-create-customer.js +0 -80
  29. package/src/lib/actions/find-or-create-customer.js.map +0 -1
  30. package/src/lib/actions/find-or-create-customers-address.d.ts +0 -25
  31. package/src/lib/actions/find-or-create-customers-address.d.ts.map +0 -1
  32. package/src/lib/actions/find-or-create-customers-address.js +0 -98
  33. package/src/lib/actions/find-or-create-customers-address.js.map +0 -1
  34. package/src/lib/actions/find-or-create-product.d.ts +0 -14
  35. package/src/lib/actions/find-or-create-product.d.ts.map +0 -1
  36. package/src/lib/actions/find-or-create-product.js +0 -82
  37. package/src/lib/actions/find-or-create-product.js.map +0 -1
  38. package/src/lib/actions/get-order.d.ts +0 -8
  39. package/src/lib/actions/get-order.d.ts.map +0 -1
  40. package/src/lib/actions/get-order.js +0 -34
  41. package/src/lib/actions/get-order.js.map +0 -1
  42. package/src/lib/actions/list-categories.d.ts +0 -8
  43. package/src/lib/actions/list-categories.d.ts.map +0 -1
  44. package/src/lib/actions/list-categories.js +0 -37
  45. package/src/lib/actions/list-categories.js.map +0 -1
  46. package/src/lib/actions/list-orders.d.ts +0 -9
  47. package/src/lib/actions/list-orders.d.ts.map +0 -1
  48. package/src/lib/actions/list-orders.js +0 -44
  49. package/src/lib/actions/list-orders.js.map +0 -1
  50. package/src/lib/actions/search-customer-address.d.ts +0 -17
  51. package/src/lib/actions/search-customer-address.d.ts.map +0 -1
  52. package/src/lib/actions/search-customer-address.js +0 -43
  53. package/src/lib/actions/search-customer-address.js.map +0 -1
  54. package/src/lib/actions/search-customer.d.ts +0 -10
  55. package/src/lib/actions/search-customer.d.ts.map +0 -1
  56. package/src/lib/actions/search-customer.js +0 -51
  57. package/src/lib/actions/search-customer.js.map +0 -1
  58. package/src/lib/actions/search-product.d.ts +0 -13
  59. package/src/lib/actions/search-product.d.ts.map +0 -1
  60. package/src/lib/actions/search-product.js +0 -75
  61. package/src/lib/actions/search-product.js.map +0 -1
  62. package/src/lib/actions/update-a-product.d.ts +0 -15
  63. package/src/lib/actions/update-a-product.d.ts.map +0 -1
  64. package/src/lib/actions/update-a-product.js +0 -79
  65. package/src/lib/actions/update-a-product.js.map +0 -1
  66. package/src/lib/common/auth.d.ts +0 -6
  67. package/src/lib/common/auth.d.ts.map +0 -1
  68. package/src/lib/common/auth.js +0 -48
  69. package/src/lib/common/auth.js.map +0 -1
  70. package/src/lib/common/constants.d.ts +0 -11
  71. package/src/lib/common/constants.d.ts.map +0 -1
  72. package/src/lib/common/constants.js +0 -14
  73. package/src/lib/common/constants.js.map +0 -1
  74. package/src/lib/common/props.d.ts +0 -23
  75. package/src/lib/common/props.d.ts.map +0 -1
  76. package/src/lib/common/props.js +0 -83
  77. package/src/lib/common/props.js.map +0 -1
  78. package/src/lib/common/requests.d.ts +0 -65
  79. package/src/lib/common/requests.d.ts.map +0 -1
  80. package/src/lib/common/requests.js +0 -177
  81. package/src/lib/common/requests.js.map +0 -1
  82. package/src/lib/triggers/abandoned-cart.d.ts +0 -19
  83. package/src/lib/triggers/abandoned-cart.d.ts.map +0 -1
  84. package/src/lib/triggers/abandoned-cart.js +0 -64
  85. package/src/lib/triggers/abandoned-cart.js.map +0 -1
  86. package/src/lib/triggers/cart-created.d.ts +0 -19
  87. package/src/lib/triggers/cart-created.d.ts.map +0 -1
  88. package/src/lib/triggers/cart-created.js +0 -66
  89. package/src/lib/triggers/cart-created.js.map +0 -1
  90. package/src/lib/triggers/customer-address-created.d.ts +0 -19
  91. package/src/lib/triggers/customer-address-created.d.ts.map +0 -1
  92. package/src/lib/triggers/customer-address-created.js +0 -66
  93. package/src/lib/triggers/customer-address-created.js.map +0 -1
  94. package/src/lib/triggers/customer-address-updated.d.ts +0 -19
  95. package/src/lib/triggers/customer-address-updated.d.ts.map +0 -1
  96. package/src/lib/triggers/customer-address-updated.js +0 -66
  97. package/src/lib/triggers/customer-address-updated.js.map +0 -1
  98. package/src/lib/triggers/customer-created.d.ts +0 -19
  99. package/src/lib/triggers/customer-created.d.ts.map +0 -1
  100. package/src/lib/triggers/customer-created.js +0 -68
  101. package/src/lib/triggers/customer-created.js.map +0 -1
  102. package/src/lib/triggers/customer-updated.d.ts +0 -19
  103. package/src/lib/triggers/customer-updated.d.ts.map +0 -1
  104. package/src/lib/triggers/customer-updated.js +0 -66
  105. package/src/lib/triggers/customer-updated.js.map +0 -1
  106. package/src/lib/triggers/order-created.d.ts +0 -19
  107. package/src/lib/triggers/order-created.d.ts.map +0 -1
  108. package/src/lib/triggers/order-created.js +0 -66
  109. package/src/lib/triggers/order-created.js.map +0 -1
  110. package/src/lib/triggers/order-status-updated.d.ts +0 -19
  111. package/src/lib/triggers/order-status-updated.d.ts.map +0 -1
  112. package/src/lib/triggers/order-status-updated.js +0 -66
  113. package/src/lib/triggers/order-status-updated.js.map +0 -1
  114. package/src/lib/triggers/order-updated.d.ts +0 -19
  115. package/src/lib/triggers/order-updated.d.ts.map +0 -1
  116. package/src/lib/triggers/order-updated.js +0 -66
  117. package/src/lib/triggers/order-updated.js.map +0 -1
  118. package/src/lib/triggers/product-created.d.ts +0 -19
  119. package/src/lib/triggers/product-created.d.ts.map +0 -1
  120. package/src/lib/triggers/product-created.js +0 -66
  121. package/src/lib/triggers/product-created.js.map +0 -1
  122. package/src/lib/triggers/shipment-created.d.ts +0 -19
  123. package/src/lib/triggers/shipment-created.d.ts.map +0 -1
  124. package/src/lib/triggers/shipment-created.js +0 -66
  125. package/src/lib/triggers/shipment-created.js.map +0 -1
@@ -1,98 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.findOrCreateCustomersAddress = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const auth_1 = require("../common/auth");
7
- const props_1 = require("../common/props");
8
- const requests_1 = require("../common/requests");
9
- exports.findOrCreateCustomersAddress = (0, pieces_framework_1.createAction)({
10
- auth: auth_1.bigcommerceAuth,
11
- name: 'findOrCreateCustomersAddress',
12
- displayName: 'Find or Create Customer’s Address',
13
- description: 'Finds or creates a customer’s address',
14
- audience: 'both',
15
- aiMetadata: {
16
- description: 'For a given customer_id, looks up that customer’s addresses and returns the one matching the supplied address line 1, city, and postal code if it exists, otherwise creates a new address from the supplied details. Use instead of Create Customer Address when the address may already be on file, to avoid duplicates. Idempotent: repeated calls reuse the matching address rather than appending duplicates.',
17
- idempotent: true,
18
- },
19
- props: {
20
- customer_id: (0, props_1.customerDropdown)({
21
- required: true,
22
- }),
23
- first_name: pieces_framework_1.Property.ShortText({
24
- displayName: 'First Name',
25
- required: true,
26
- }),
27
- last_name: pieces_framework_1.Property.ShortText({
28
- displayName: 'Last Name',
29
- required: true,
30
- }),
31
- address1: pieces_framework_1.Property.ShortText({
32
- displayName: 'Address Line 1',
33
- required: true,
34
- }),
35
- address2: pieces_framework_1.Property.ShortText({
36
- displayName: 'Address Line 2',
37
- required: false,
38
- }),
39
- city: pieces_framework_1.Property.ShortText({
40
- displayName: 'City',
41
- required: true,
42
- }),
43
- state_or_province: pieces_framework_1.Property.ShortText({
44
- displayName: 'State/Province',
45
- required: true,
46
- }),
47
- postal_code: pieces_framework_1.Property.ShortText({
48
- displayName: 'Postal Code',
49
- required: true,
50
- }),
51
- country_code: pieces_framework_1.Property.ShortText({
52
- displayName: 'Country Code',
53
- description: 'ISO 3166-1 alpha-2 country code',
54
- required: true,
55
- }),
56
- phone: pieces_framework_1.Property.ShortText({
57
- displayName: 'Phone',
58
- required: false,
59
- }),
60
- },
61
- run(context) {
62
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
63
- const params = new URLSearchParams();
64
- params.append('customer_id:in', context.propsValue.customer_id);
65
- const response = yield requests_1.bigCommerceApiService.fetchCustomerAddresses({
66
- auth: context.auth.props,
67
- queryString: params.toString(),
68
- });
69
- if (response.data && response.data.length > 0) {
70
- const existingAddress = response.data.find((addr) => addr.address1 === context.propsValue.address1 &&
71
- addr.city === context.propsValue.city &&
72
- addr.postal_code === context.propsValue.postal_code);
73
- if (existingAddress) {
74
- return { found: true, data: existingAddress };
75
- }
76
- }
77
- const newAddress = yield requests_1.bigCommerceApiService.createCustomerAddress({
78
- auth: context.auth.props,
79
- payload: [
80
- {
81
- customer_id: context.propsValue.customer_id,
82
- first_name: context.propsValue.first_name,
83
- last_name: context.propsValue.last_name,
84
- address1: context.propsValue.address1,
85
- address2: context.propsValue.address2,
86
- city: context.propsValue.city,
87
- state_or_province: context.propsValue.state_or_province,
88
- postal_code: context.propsValue.postal_code,
89
- country_code: context.propsValue.country_code,
90
- phone: context.propsValue.phone,
91
- },
92
- ],
93
- });
94
- return { found: false, data: newAddress.data };
95
- });
96
- },
97
- });
98
- //# sourceMappingURL=find-or-create-customers-address.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"find-or-create-customers-address.js","sourceRoot":"","sources":["../../../../src/lib/actions/find-or-create-customers-address.ts"],"names":[],"mappings":"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"}
@@ -1,14 +0,0 @@
1
- export declare const findOrCreateProduct: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
- instruction: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
3
- storeHash: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
- accessToken: import("@activepieces/pieces-framework").ShortTextProperty<true>;
5
- }>, {
6
- name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
7
- sku: import("@activepieces/pieces-framework").ShortTextProperty<false>;
8
- type: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
9
- weight: import("@activepieces/pieces-framework").NumberProperty<true>;
10
- price: import("@activepieces/pieces-framework").NumberProperty<true>;
11
- description: import("@activepieces/pieces-framework").LongTextProperty<false>;
12
- brand_id: import("@activepieces/pieces-framework").NumberProperty<false>;
13
- }>;
14
- //# sourceMappingURL=find-or-create-product.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"find-or-create-product.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/find-or-create-product.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;EA4E9B,CAAC"}
@@ -1,82 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.findOrCreateProduct = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const auth_1 = require("../common/auth");
7
- const requests_1 = require("../common/requests");
8
- exports.findOrCreateProduct = (0, pieces_framework_1.createAction)({
9
- auth: auth_1.bigcommerceAuth,
10
- name: 'findOrCreateProduct',
11
- displayName: 'Find or Create Product',
12
- description: 'Finds or creates a product',
13
- audience: 'both',
14
- aiMetadata: {
15
- description: 'Looks up a catalog product by exact name and returns the match if found, otherwise creates a new product from the supplied details (type, weight, and price required). Use instead of Create a Product when the item may already exist, to avoid duplicates. Idempotent: repeated calls match the same existing product by name rather than creating duplicates.',
16
- idempotent: true,
17
- },
18
- props: {
19
- name: pieces_framework_1.Property.ShortText({
20
- displayName: 'Product Name',
21
- required: true,
22
- }),
23
- sku: pieces_framework_1.Property.ShortText({
24
- displayName: 'SKU',
25
- required: false,
26
- }),
27
- type: pieces_framework_1.Property.StaticDropdown({
28
- displayName: 'Product Type',
29
- required: true,
30
- options: {
31
- options: [
32
- { label: 'Physical', value: 'physical' },
33
- { label: 'Digital', value: 'digital' },
34
- ],
35
- },
36
- }),
37
- weight: pieces_framework_1.Property.Number({
38
- displayName: 'Weight',
39
- required: true,
40
- }),
41
- price: pieces_framework_1.Property.Number({
42
- displayName: 'Price',
43
- required: true,
44
- }),
45
- description: pieces_framework_1.Property.LongText({
46
- displayName: 'Description',
47
- required: false,
48
- }),
49
- brand_id: pieces_framework_1.Property.Number({
50
- displayName: 'Brand ID',
51
- description: 'Brand ID',
52
- required: false,
53
- }),
54
- },
55
- run(context) {
56
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
57
- const params = new URLSearchParams();
58
- params.append('name', context.propsValue.name);
59
- const response = yield requests_1.bigCommerceApiService.fetchProducts({
60
- auth: context.auth.props,
61
- queryString: params.toString(),
62
- });
63
- if (response.data && response.data.length > 0) {
64
- return { found: true, data: response.data };
65
- }
66
- const newProduct = yield requests_1.bigCommerceApiService.createProduct({
67
- auth: context.auth.props,
68
- payload: {
69
- name: context.propsValue.name,
70
- type: context.propsValue.type,
71
- sku: context.propsValue.sku,
72
- description: context.propsValue.description,
73
- weight: context.propsValue.weight,
74
- price: context.propsValue.price,
75
- brand_id: context.propsValue.brand_id,
76
- },
77
- });
78
- return { found: false, data: newProduct.data };
79
- });
80
- },
81
- });
82
- //# sourceMappingURL=find-or-create-product.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"find-or-create-product.js","sourceRoot":"","sources":["../../../../src/lib/actions/find-or-create-product.ts"],"names":[],"mappings":"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"}
@@ -1,8 +0,0 @@
1
- export declare const getOrder: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
- instruction: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
3
- storeHash: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
- accessToken: import("@activepieces/pieces-framework").ShortTextProperty<true>;
5
- }>, {
6
- orderId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
7
- }>;
8
- //# sourceMappingURL=get-order.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-order.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-order.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,QAAQ;;;;;;EAwBnB,CAAC"}
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getOrder = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const auth_1 = require("../common/auth");
7
- const requests_1 = require("../common/requests");
8
- exports.getOrder = (0, pieces_framework_1.createAction)({
9
- auth: auth_1.bigcommerceAuth,
10
- name: 'getOrder',
11
- displayName: 'Get Order',
12
- description: 'Gets details of an order',
13
- audience: 'both',
14
- aiMetadata: {
15
- description: 'Retrieves the full details of a single BigCommerce order by its orderId. Use when you already have an order id (e.g. from an order trigger or List Orders) and need its data. Idempotent read-only lookup with no side effects.',
16
- idempotent: true,
17
- },
18
- props: {
19
- orderId: pieces_framework_1.Property.ShortText({
20
- displayName: 'Order ID',
21
- description: 'The ID of the order to retrieve',
22
- required: true,
23
- }),
24
- },
25
- run(context) {
26
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
27
- return yield requests_1.bigCommerceApiService.fetchOrder({
28
- auth: context.auth.props,
29
- orderId: context.propsValue.orderId,
30
- });
31
- });
32
- },
33
- });
34
- //# sourceMappingURL=get-order.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-order.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-order.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAAiD;AACjD,iDAA2D;AAE9C,QAAA,QAAQ,GAAG,IAAA,+BAAY,EAAC;IACnC,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,0BAA0B;IACvC,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EACT,iOAAiO;QACnO,UAAU,EAAE,IAAI;KACjB;IACD,KAAK,EAAE;QACL,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,UAAU;YACvB,WAAW,EAAE,iCAAiC;YAC9C,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,OAAO,MAAM,gCAAqB,CAAC,UAAU,CAAC;gBAC5C,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;gBACxB,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO;aACpC,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,8 +0,0 @@
1
- export declare const listCategories: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
- instruction: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
3
- storeHash: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
- accessToken: import("@activepieces/pieces-framework").ShortTextProperty<true>;
5
- }>, {
6
- name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
- }>;
8
- //# sourceMappingURL=list-categories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list-categories.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/list-categories.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc;;;;;;EA0BzB,CAAC"}
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.listCategories = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const auth_1 = require("../common/auth");
7
- const requests_1 = require("../common/requests");
8
- exports.listCategories = (0, pieces_framework_1.createAction)({
9
- auth: auth_1.bigcommerceAuth,
10
- name: 'listCategories',
11
- displayName: 'List Categories',
12
- description: 'Lists all categories',
13
- audience: 'both',
14
- aiMetadata: {
15
- description: 'Lists product categories from a BigCommerce store. With no name filter it returns all categories; provide a name to filter to matching categories. Use to discover category names or ids before assigning products. Idempotent read-only query with no side effects.',
16
- idempotent: true,
17
- },
18
- props: {
19
- name: pieces_framework_1.Property.ShortText({
20
- displayName: 'Category Name',
21
- description: 'Filter by category name',
22
- required: false,
23
- }),
24
- },
25
- run(context) {
26
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
27
- const qParams = new URLSearchParams();
28
- if (context.propsValue.name)
29
- qParams.append('name', context.propsValue.name);
30
- return yield requests_1.bigCommerceApiService.fetchCategories({
31
- auth: context.auth.props,
32
- queryString: qParams.toString(),
33
- });
34
- });
35
- },
36
- });
37
- //# sourceMappingURL=list-categories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list-categories.js","sourceRoot":"","sources":["../../../../src/lib/actions/list-categories.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAAiD;AACjD,iDAA2D;AAE9C,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACzC,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,sBAAsB;IACnC,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EACT,sQAAsQ;QACxQ,UAAU,EAAE,IAAI;KACjB;IACD,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,eAAe;YAC5B,WAAW,EAAE,yBAAyB;YACtC,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,OAAO,GAAG,IAAI,eAAe,EAAE,CAAC;YACtC,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI;gBAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YAC7E,OAAO,MAAM,gCAAqB,CAAC,eAAe,CAAC;gBACjD,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;gBACxB,WAAW,EAAE,OAAO,CAAC,QAAQ,EAAE;aAChC,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,9 +0,0 @@
1
- export declare const listOrders: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
- instruction: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
3
- storeHash: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
- accessToken: import("@activepieces/pieces-framework").ShortTextProperty<true>;
5
- }>, {
6
- customer_id: import("@activepieces/pieces-framework").NumberProperty<false>;
7
- status_id: import("@activepieces/pieces-framework").NumberProperty<false>;
8
- }>;
9
- //# sourceMappingURL=list-orders.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list-orders.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/list-orders.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU;;;;;;;EAiCrB,CAAC"}
@@ -1,44 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.listOrders = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const auth_1 = require("../common/auth");
7
- const requests_1 = require("../common/requests");
8
- exports.listOrders = (0, pieces_framework_1.createAction)({
9
- auth: auth_1.bigcommerceAuth,
10
- name: 'listOrders',
11
- displayName: 'List Orders',
12
- description: 'Lists all orders',
13
- audience: 'both',
14
- aiMetadata: {
15
- description: 'Lists orders from a BigCommerce store. With no filters it returns all orders; optionally narrow by customer_id and/or status_id to a subset. Use to browse or find orders when you do not have a specific order id. Idempotent read-only query with no side effects.',
16
- idempotent: true,
17
- },
18
- props: {
19
- customer_id: pieces_framework_1.Property.Number({
20
- displayName: 'Customer ID',
21
- description: 'Filter by customer ID',
22
- required: false,
23
- }),
24
- status_id: pieces_framework_1.Property.Number({
25
- displayName: 'Status ID',
26
- description: 'Filter by status ID',
27
- required: false,
28
- }),
29
- },
30
- run(context) {
31
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
32
- const qParams = new URLSearchParams();
33
- if (context.propsValue.customer_id !== undefined && context.propsValue.customer_id !== null)
34
- qParams.append('customer_id', context.propsValue.customer_id.toString());
35
- if (context.propsValue.status_id !== undefined && context.propsValue.status_id !== null)
36
- qParams.append('status_id', context.propsValue.status_id.toString());
37
- return yield requests_1.bigCommerceApiService.fetchOrders({
38
- auth: context.auth.props,
39
- queryString: qParams.toString(),
40
- });
41
- });
42
- },
43
- });
44
- //# sourceMappingURL=list-orders.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list-orders.js","sourceRoot":"","sources":["../../../../src/lib/actions/list-orders.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAAiD;AACjD,iDAA2D;AAE9C,QAAA,UAAU,GAAG,IAAA,+BAAY,EAAC;IACrC,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,kBAAkB;IAC/B,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EACT,sQAAsQ;QACxQ,UAAU,EAAE,IAAI;KACjB;IACD,KAAK,EAAE;QACL,WAAW,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAC3B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,uBAAuB;YACpC,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACzB,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,qBAAqB;YAClC,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,OAAO,GAAG,IAAI,eAAe,EAAE,CAAC;YACtC,IAAI,OAAO,CAAC,UAAU,CAAC,WAAW,KAAK,SAAS,IAAI,OAAO,CAAC,UAAU,CAAC,WAAW,KAAK,IAAI;gBAAE,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,CAAC;YACtK,IAAI,OAAO,CAAC,UAAU,CAAC,SAAS,KAAK,SAAS,IAAI,OAAO,CAAC,UAAU,CAAC,SAAS,KAAK,IAAI;gBAAE,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC;YAE9J,OAAO,MAAM,gCAAqB,CAAC,WAAW,CAAC;gBAC7C,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;gBACxB,WAAW,EAAE,OAAO,CAAC,QAAQ,EAAE;aAChC,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,17 +0,0 @@
1
- export declare const searchCustomerAddress: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
- instruction: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
3
- storeHash: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
- accessToken: import("@activepieces/pieces-framework").ShortTextProperty<true>;
5
- }>, {
6
- customer_ids: import("@activepieces/pieces-framework").MultiSelectDropdownProperty<unknown, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
7
- instruction: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
8
- storeHash: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
- accessToken: import("@activepieces/pieces-framework").ShortTextProperty<true>;
10
- }>> | import("@activepieces/pieces-framework").MultiSelectDropdownProperty<unknown, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
11
- instruction: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
12
- storeHash: import("@activepieces/pieces-framework").ShortTextProperty<true>;
13
- accessToken: import("@activepieces/pieces-framework").ShortTextProperty<true>;
14
- }>>;
15
- name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
16
- }>;
17
- //# sourceMappingURL=search-customer-address.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"search-customer-address.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/search-customer-address.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;EAoChC,CAAC"}
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.searchCustomerAddress = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const requests_1 = require("../common/requests");
7
- const auth_1 = require("../common/auth");
8
- const props_1 = require("../common/props");
9
- exports.searchCustomerAddress = (0, pieces_framework_1.createAction)({
10
- auth: auth_1.bigcommerceAuth,
11
- name: 'searchCustomerAddress',
12
- displayName: 'Search Customer Address',
13
- description: 'Searches for a customer’s address',
14
- audience: 'both',
15
- aiMetadata: {
16
- description: 'Searches customer addresses in a BigCommerce store, optionally filtered by one or more customer ids and/or a name. With no filters it returns all addresses; supplying filters narrows to matches. Use to look up addresses belonging to specific customers. Idempotent read-only query with no side effects.',
17
- idempotent: true,
18
- },
19
- props: {
20
- customer_ids: (0, props_1.multiCustomerDropdown)({
21
- required: false,
22
- }),
23
- name: pieces_framework_1.Property.ShortText({
24
- displayName: 'Name',
25
- description: 'Customer name to search for',
26
- required: false,
27
- }),
28
- },
29
- run(context) {
30
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
31
- const params = new URLSearchParams();
32
- if (context.propsValue.customer_ids)
33
- params.append('customer_ids:in', context.propsValue.customer_ids.join(','));
34
- if (context.propsValue.name)
35
- params.append('name:in', `${context.propsValue.name}`);
36
- return yield requests_1.bigCommerceApiService.fetchCustomerAddresses({
37
- auth: context.auth.props,
38
- queryString: params.toString(),
39
- });
40
- });
41
- },
42
- });
43
- //# sourceMappingURL=search-customer-address.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"search-customer-address.js","sourceRoot":"","sources":["../../../../src/lib/actions/search-customer-address.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,iDAA2D;AAC3D,yCAAiD;AACjD,2CAAwD;AAE3C,QAAA,qBAAqB,GAAG,IAAA,+BAAY,EAAC;IAChD,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE,yBAAyB;IACtC,WAAW,EAAE,mCAAmC;IAChD,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EACT,+SAA+S;QACjT,UAAU,EAAE,IAAI;KACjB;IACD,KAAK,EAAE;QACL,YAAY,EAAE,IAAA,6BAAqB,EAAC;YAClC,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,6BAA6B;YAC1C,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;YACrC,IAAI,OAAO,CAAC,UAAU,CAAC,YAAY;gBACjC,MAAM,CAAC,MAAM,CACX,iBAAiB,EAChB,OAAO,CAAC,UAAU,CAAC,YAAyB,CAAC,IAAI,CAAC,GAAG,CAAC,CACxD,CAAC;YACJ,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI;gBACzB,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC;YAEzD,OAAO,MAAM,gCAAqB,CAAC,sBAAsB,CAAC;gBACxD,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;gBACxB,WAAW,EAAE,MAAM,CAAC,QAAQ,EAAE;aAC/B,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,10 +0,0 @@
1
- export declare const searchCustomer: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
- instruction: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
3
- storeHash: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
- accessToken: import("@activepieces/pieces-framework").ShortTextProperty<true>;
5
- }>, {
6
- email: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
- phone: import("@activepieces/pieces-framework").ShortTextProperty<false>;
8
- name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
9
- }>;
10
- //# sourceMappingURL=search-customer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"search-customer.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/search-customer.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc;;;;;;;;EA0CzB,CAAC"}
@@ -1,51 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.searchCustomer = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const auth_1 = require("../common/auth");
7
- const requests_1 = require("../common/requests");
8
- exports.searchCustomer = (0, pieces_framework_1.createAction)({
9
- auth: auth_1.bigcommerceAuth,
10
- name: 'searchCustomer',
11
- displayName: 'Search Customer',
12
- description: 'Searches for a registered customer',
13
- audience: 'both',
14
- aiMetadata: {
15
- description: 'Searches registered customers in a BigCommerce store by email, phone, and/or name. With no filters it returns all customers; supplying any filter narrows to matches. Use to look up a customer or check whether one exists before creating it. Idempotent read-only query with no side effects.',
16
- idempotent: true,
17
- },
18
- props: {
19
- email: pieces_framework_1.Property.ShortText({
20
- displayName: 'Email',
21
- description: 'Customer email to search for',
22
- required: false,
23
- }),
24
- phone: pieces_framework_1.Property.ShortText({
25
- displayName: 'Phone Number',
26
- description: 'Phone Number to search for',
27
- required: false,
28
- }),
29
- name: pieces_framework_1.Property.ShortText({
30
- displayName: 'Name',
31
- description: 'Customer name to search for',
32
- required: false,
33
- }),
34
- },
35
- run(context) {
36
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
37
- const params = new URLSearchParams();
38
- if (context.propsValue.email)
39
- params.append('email:in', context.propsValue.email);
40
- if (context.propsValue.name)
41
- params.append('name:in', `${context.propsValue.name}`);
42
- if (context.propsValue.phone)
43
- params.append('phone:in', context.propsValue.phone);
44
- return yield requests_1.bigCommerceApiService.fetchCustomers({
45
- auth: context.auth.props,
46
- queryString: params.toString(),
47
- });
48
- });
49
- },
50
- });
51
- //# sourceMappingURL=search-customer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"search-customer.js","sourceRoot":"","sources":["../../../../src/lib/actions/search-customer.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAAiD;AACjD,iDAA2D;AAE9C,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACzC,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,oCAAoC;IACjD,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EACT,kSAAkS;QACpS,UAAU,EAAE,IAAI;KACjB;IACD,KAAK,EAAE;QACL,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,8BAA8B;YAC3C,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,4BAA4B;YACzC,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,6BAA6B;YAC1C,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;YACrC,IAAI,OAAO,CAAC,UAAU,CAAC,KAAK;gBAC1B,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;YACtD,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI;gBACzB,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC;YACzD,IAAI,OAAO,CAAC,UAAU,CAAC,KAAK;gBAC1B,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;YAEtD,OAAO,MAAM,gCAAqB,CAAC,cAAc,CAAC;gBAChD,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;gBACxB,WAAW,EAAE,MAAM,CAAC,QAAQ,EAAE;aAC/B,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,13 +0,0 @@
1
- export declare const searchProduct: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
- instruction: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
3
- storeHash: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
- accessToken: import("@activepieces/pieces-framework").ShortTextProperty<true>;
5
- }>, {
6
- name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
- sku: import("@activepieces/pieces-framework").ShortTextProperty<false>;
8
- type: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
9
- brand_id: import("@activepieces/pieces-framework").ShortTextProperty<false>;
10
- weight: import("@activepieces/pieces-framework").NumberProperty<false>;
11
- price: import("@activepieces/pieces-framework").NumberProperty<false>;
12
- }>;
13
- //# sourceMappingURL=search-product.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"search-product.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/search-product.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa;;;;;;;;;;;EAgExB,CAAC"}
@@ -1,75 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.searchProduct = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const auth_1 = require("../common/auth");
7
- const requests_1 = require("../common/requests");
8
- exports.searchProduct = (0, pieces_framework_1.createAction)({
9
- auth: auth_1.bigcommerceAuth,
10
- name: 'searchProduct',
11
- displayName: 'Search Product',
12
- description: 'Searches for a product in the catalog',
13
- audience: 'both',
14
- aiMetadata: {
15
- description: 'Searches the BigCommerce product catalog by name, SKU, type, brand, weight, and/or price. With no filters it returns all products; supplying any filter narrows to matches. Use to find a product or its id, or to check whether one exists before creating it. Idempotent read-only query with no side effects.',
16
- idempotent: true,
17
- },
18
- props: {
19
- name: pieces_framework_1.Property.ShortText({
20
- displayName: 'Product Name',
21
- description: 'Product name to search for',
22
- required: false,
23
- }),
24
- sku: pieces_framework_1.Property.ShortText({
25
- displayName: 'SKU',
26
- description: 'Product SKU to search for',
27
- required: false,
28
- }),
29
- type: pieces_framework_1.Property.StaticDropdown({
30
- displayName: 'Product Type',
31
- required: false,
32
- options: {
33
- options: [
34
- { label: 'Physical', value: 'physical' },
35
- { label: 'Digital', value: 'digital' },
36
- ],
37
- },
38
- }),
39
- brand_id: pieces_framework_1.Property.ShortText({
40
- displayName: 'Brand ID',
41
- description: 'Brand ID to search for',
42
- required: false,
43
- }),
44
- weight: pieces_framework_1.Property.Number({
45
- displayName: 'Weight',
46
- required: false,
47
- }),
48
- price: pieces_framework_1.Property.Number({
49
- displayName: 'Price',
50
- required: false,
51
- }),
52
- },
53
- run(context) {
54
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
55
- const params = new URLSearchParams();
56
- if (context.propsValue.name)
57
- params.append('name', context.propsValue.name);
58
- if (context.propsValue.sku)
59
- params.append('sku', context.propsValue.sku);
60
- if (context.propsValue.brand_id)
61
- params.append('brand_id', context.propsValue.brand_id);
62
- if (context.propsValue.type)
63
- params.append('type', context.propsValue.type);
64
- if (context.propsValue.price)
65
- params.append('price', String(context.propsValue.price));
66
- if (context.propsValue.weight)
67
- params.append('weight', String(context.propsValue.weight));
68
- return yield requests_1.bigCommerceApiService.fetchProducts({
69
- auth: context.auth.props,
70
- queryString: params.toString(),
71
- });
72
- });
73
- },
74
- });
75
- //# sourceMappingURL=search-product.js.map