@agnocon/piece-bigcommerce 0.1.11

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 (157) hide show
  1. package/LICENSE.MIT-AP +24 -0
  2. package/dist/index.d.ts +6 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +86 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/lib/actions/create-a-product.d.ts +14 -0
  7. package/dist/lib/actions/create-a-product.d.ts.map +1 -0
  8. package/dist/lib/actions/create-a-product.js +80 -0
  9. package/dist/lib/actions/create-a-product.js.map +1 -0
  10. package/dist/lib/actions/create-blog-post.d.ts +16 -0
  11. package/dist/lib/actions/create-blog-post.d.ts.map +1 -0
  12. package/dist/lib/actions/create-blog-post.js +87 -0
  13. package/dist/lib/actions/create-blog-post.js.map +1 -0
  14. package/dist/lib/actions/create-customer-address.d.ts +25 -0
  15. package/dist/lib/actions/create-customer-address.d.ts.map +1 -0
  16. package/dist/lib/actions/create-customer-address.js +85 -0
  17. package/dist/lib/actions/create-customer-address.js.map +1 -0
  18. package/dist/lib/actions/create-customer.d.ts +13 -0
  19. package/dist/lib/actions/create-customer.d.ts.map +1 -0
  20. package/dist/lib/actions/create-customer.js +70 -0
  21. package/dist/lib/actions/create-customer.js.map +1 -0
  22. package/dist/lib/actions/delete-a-product.d.ts +8 -0
  23. package/dist/lib/actions/delete-a-product.d.ts.map +1 -0
  24. package/dist/lib/actions/delete-a-product.js +36 -0
  25. package/dist/lib/actions/delete-a-product.js.map +1 -0
  26. package/dist/lib/actions/find-or-create-customer.d.ts +13 -0
  27. package/dist/lib/actions/find-or-create-customer.d.ts.map +1 -0
  28. package/dist/lib/actions/find-or-create-customer.js +82 -0
  29. package/dist/lib/actions/find-or-create-customer.js.map +1 -0
  30. package/dist/lib/actions/find-or-create-customers-address.d.ts +25 -0
  31. package/dist/lib/actions/find-or-create-customers-address.d.ts.map +1 -0
  32. package/dist/lib/actions/find-or-create-customers-address.js +100 -0
  33. package/dist/lib/actions/find-or-create-customers-address.js.map +1 -0
  34. package/dist/lib/actions/find-or-create-product.d.ts +14 -0
  35. package/dist/lib/actions/find-or-create-product.d.ts.map +1 -0
  36. package/dist/lib/actions/find-or-create-product.js +84 -0
  37. package/dist/lib/actions/find-or-create-product.js.map +1 -0
  38. package/dist/lib/actions/get-order.d.ts +8 -0
  39. package/dist/lib/actions/get-order.d.ts.map +1 -0
  40. package/dist/lib/actions/get-order.js +36 -0
  41. package/dist/lib/actions/get-order.js.map +1 -0
  42. package/dist/lib/actions/list-categories.d.ts +8 -0
  43. package/dist/lib/actions/list-categories.d.ts.map +1 -0
  44. package/dist/lib/actions/list-categories.js +39 -0
  45. package/dist/lib/actions/list-categories.js.map +1 -0
  46. package/dist/lib/actions/list-orders.d.ts +9 -0
  47. package/dist/lib/actions/list-orders.d.ts.map +1 -0
  48. package/dist/lib/actions/list-orders.js +46 -0
  49. package/dist/lib/actions/list-orders.js.map +1 -0
  50. package/dist/lib/actions/search-customer-address.d.ts +17 -0
  51. package/dist/lib/actions/search-customer-address.d.ts.map +1 -0
  52. package/dist/lib/actions/search-customer-address.js +45 -0
  53. package/dist/lib/actions/search-customer-address.js.map +1 -0
  54. package/dist/lib/actions/search-customer.d.ts +10 -0
  55. package/dist/lib/actions/search-customer.d.ts.map +1 -0
  56. package/dist/lib/actions/search-customer.js +53 -0
  57. package/dist/lib/actions/search-customer.js.map +1 -0
  58. package/dist/lib/actions/search-product.d.ts +13 -0
  59. package/dist/lib/actions/search-product.d.ts.map +1 -0
  60. package/dist/lib/actions/search-product.js +77 -0
  61. package/dist/lib/actions/search-product.js.map +1 -0
  62. package/dist/lib/actions/update-a-product.d.ts +15 -0
  63. package/dist/lib/actions/update-a-product.d.ts.map +1 -0
  64. package/dist/lib/actions/update-a-product.js +81 -0
  65. package/dist/lib/actions/update-a-product.js.map +1 -0
  66. package/dist/lib/common/auth.d.ts +6 -0
  67. package/dist/lib/common/auth.d.ts.map +1 -0
  68. package/dist/lib/common/auth.js +50 -0
  69. package/dist/lib/common/auth.js.map +1 -0
  70. package/dist/lib/common/constants.d.ts +11 -0
  71. package/dist/lib/common/constants.d.ts.map +1 -0
  72. package/dist/lib/common/constants.js +14 -0
  73. package/dist/lib/common/constants.js.map +1 -0
  74. package/dist/lib/common/props.d.ts +23 -0
  75. package/dist/lib/common/props.d.ts.map +1 -0
  76. package/dist/lib/common/props.js +85 -0
  77. package/dist/lib/common/props.js.map +1 -0
  78. package/dist/lib/common/requests.d.ts +65 -0
  79. package/dist/lib/common/requests.d.ts.map +1 -0
  80. package/dist/lib/common/requests.js +179 -0
  81. package/dist/lib/common/requests.js.map +1 -0
  82. package/dist/lib/triggers/abandoned-cart.d.ts +19 -0
  83. package/dist/lib/triggers/abandoned-cart.d.ts.map +1 -0
  84. package/dist/lib/triggers/abandoned-cart.js +66 -0
  85. package/dist/lib/triggers/abandoned-cart.js.map +1 -0
  86. package/dist/lib/triggers/cart-created.d.ts +19 -0
  87. package/dist/lib/triggers/cart-created.d.ts.map +1 -0
  88. package/dist/lib/triggers/cart-created.js +68 -0
  89. package/dist/lib/triggers/cart-created.js.map +1 -0
  90. package/dist/lib/triggers/customer-address-created.d.ts +19 -0
  91. package/dist/lib/triggers/customer-address-created.d.ts.map +1 -0
  92. package/dist/lib/triggers/customer-address-created.js +68 -0
  93. package/dist/lib/triggers/customer-address-created.js.map +1 -0
  94. package/dist/lib/triggers/customer-address-updated.d.ts +19 -0
  95. package/dist/lib/triggers/customer-address-updated.d.ts.map +1 -0
  96. package/dist/lib/triggers/customer-address-updated.js +68 -0
  97. package/dist/lib/triggers/customer-address-updated.js.map +1 -0
  98. package/dist/lib/triggers/customer-created.d.ts +19 -0
  99. package/dist/lib/triggers/customer-created.d.ts.map +1 -0
  100. package/dist/lib/triggers/customer-created.js +70 -0
  101. package/dist/lib/triggers/customer-created.js.map +1 -0
  102. package/dist/lib/triggers/customer-updated.d.ts +19 -0
  103. package/dist/lib/triggers/customer-updated.d.ts.map +1 -0
  104. package/dist/lib/triggers/customer-updated.js +68 -0
  105. package/dist/lib/triggers/customer-updated.js.map +1 -0
  106. package/dist/lib/triggers/order-created.d.ts +19 -0
  107. package/dist/lib/triggers/order-created.d.ts.map +1 -0
  108. package/dist/lib/triggers/order-created.js +68 -0
  109. package/dist/lib/triggers/order-created.js.map +1 -0
  110. package/dist/lib/triggers/order-status-updated.d.ts +19 -0
  111. package/dist/lib/triggers/order-status-updated.d.ts.map +1 -0
  112. package/dist/lib/triggers/order-status-updated.js +68 -0
  113. package/dist/lib/triggers/order-status-updated.js.map +1 -0
  114. package/dist/lib/triggers/order-updated.d.ts +19 -0
  115. package/dist/lib/triggers/order-updated.d.ts.map +1 -0
  116. package/dist/lib/triggers/order-updated.js +68 -0
  117. package/dist/lib/triggers/order-updated.js.map +1 -0
  118. package/dist/lib/triggers/product-created.d.ts +19 -0
  119. package/dist/lib/triggers/product-created.d.ts.map +1 -0
  120. package/dist/lib/triggers/product-created.js +68 -0
  121. package/dist/lib/triggers/product-created.js.map +1 -0
  122. package/dist/lib/triggers/shipment-created.d.ts +19 -0
  123. package/dist/lib/triggers/shipment-created.d.ts.map +1 -0
  124. package/dist/lib/triggers/shipment-created.js +68 -0
  125. package/dist/lib/triggers/shipment-created.js.map +1 -0
  126. package/package.json +46 -0
  127. package/src/index.ts +81 -0
  128. package/src/lib/actions/create-a-product.ts +73 -0
  129. package/src/lib/actions/create-blog-post.ts +82 -0
  130. package/src/lib/actions/create-customer-address.ts +78 -0
  131. package/src/lib/actions/create-customer.ts +63 -0
  132. package/src/lib/actions/delete-a-product.ts +29 -0
  133. package/src/lib/actions/find-or-create-customer.ts +81 -0
  134. package/src/lib/actions/find-or-create-customers-address.ts +101 -0
  135. package/src/lib/actions/find-or-create-product.ts +81 -0
  136. package/src/lib/actions/get-order.ts +29 -0
  137. package/src/lib/actions/list-categories.ts +31 -0
  138. package/src/lib/actions/list-orders.ts +38 -0
  139. package/src/lib/actions/search-customer-address.ts +42 -0
  140. package/src/lib/actions/search-customer.ts +47 -0
  141. package/src/lib/actions/search-product.ts +69 -0
  142. package/src/lib/actions/update-a-product.ts +78 -0
  143. package/src/lib/common/auth.ts +44 -0
  144. package/src/lib/common/constants.ts +15 -0
  145. package/src/lib/common/props.ts +90 -0
  146. package/src/lib/common/requests.ts +252 -0
  147. package/src/lib/triggers/abandoned-cart.ts +58 -0
  148. package/src/lib/triggers/cart-created.ts +60 -0
  149. package/src/lib/triggers/customer-address-created.ts +60 -0
  150. package/src/lib/triggers/customer-address-updated.ts +60 -0
  151. package/src/lib/triggers/customer-created.ts +62 -0
  152. package/src/lib/triggers/customer-updated.ts +60 -0
  153. package/src/lib/triggers/order-created.ts +60 -0
  154. package/src/lib/triggers/order-status-updated.ts +60 -0
  155. package/src/lib/triggers/order-updated.ts +60 -0
  156. package/src/lib/triggers/product-created.ts +60 -0
  157. package/src/lib/triggers/shipment-created.ts +61 -0
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.searchCustomer = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/bigcommerce/src/lib/actions/search-customer.ts (MIT).
6
+ // Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
7
+ const pieces_framework_1 = require("@agnocon/pieces-framework");
8
+ const auth_1 = require("../common/auth");
9
+ const requests_1 = require("../common/requests");
10
+ exports.searchCustomer = (0, pieces_framework_1.createAction)({
11
+ auth: auth_1.bigcommerceAuth,
12
+ name: 'searchCustomer',
13
+ displayName: 'Search Customer',
14
+ description: 'Searches for a registered customer',
15
+ audience: 'both',
16
+ aiMetadata: {
17
+ 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.',
18
+ idempotent: true,
19
+ },
20
+ props: {
21
+ email: pieces_framework_1.Property.ShortText({
22
+ displayName: 'Email',
23
+ description: 'Customer email to search for',
24
+ required: false,
25
+ }),
26
+ phone: pieces_framework_1.Property.ShortText({
27
+ displayName: 'Phone Number',
28
+ description: 'Phone Number to search for',
29
+ required: false,
30
+ }),
31
+ name: pieces_framework_1.Property.ShortText({
32
+ displayName: 'Name',
33
+ description: 'Customer name to search for',
34
+ required: false,
35
+ }),
36
+ },
37
+ run(context) {
38
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
39
+ const params = new URLSearchParams();
40
+ if (context.propsValue.email)
41
+ params.append('email:in', context.propsValue.email);
42
+ if (context.propsValue.name)
43
+ params.append('name:in', `${context.propsValue.name}`);
44
+ if (context.propsValue.phone)
45
+ params.append('phone:in', context.propsValue.phone);
46
+ return yield requests_1.bigCommerceApiService.fetchCustomers({
47
+ auth: context.auth.props,
48
+ queryString: params.toString(),
49
+ });
50
+ });
51
+ },
52
+ });
53
+ //# sourceMappingURL=search-customer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-customer.js","sourceRoot":"","sources":["../../../src/lib/actions/search-customer.ts"],"names":[],"mappings":";;;;AAAA,6GAA6G;AAC7G,qEAAqE;AACrE,gEAAmE;AACnE,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"}
@@ -0,0 +1,13 @@
1
+ export declare const searchProduct: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").CustomAuthProperty<{
2
+ instruction: import("@agnocon/pieces-framework/dist/lib/property/input/markdown-property").MarkDownProperty;
3
+ storeHash: import("@agnocon/pieces-framework").ShortTextProperty<true>;
4
+ accessToken: import("@agnocon/pieces-framework").ShortTextProperty<true>;
5
+ }>, {
6
+ name: import("@agnocon/pieces-framework").ShortTextProperty<false>;
7
+ sku: import("@agnocon/pieces-framework").ShortTextProperty<false>;
8
+ type: import("@agnocon/pieces-framework").StaticDropdownProperty<string, false>;
9
+ brand_id: import("@agnocon/pieces-framework").ShortTextProperty<false>;
10
+ weight: import("@agnocon/pieces-framework").NumberProperty<false>;
11
+ price: import("@agnocon/pieces-framework").NumberProperty<false>;
12
+ }>;
13
+ //# sourceMappingURL=search-product.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-product.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/search-product.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa;;;;;;;;;;;EAgExB,CAAC"}
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.searchProduct = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/bigcommerce/src/lib/actions/search-product.ts (MIT).
6
+ // Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
7
+ const pieces_framework_1 = require("@agnocon/pieces-framework");
8
+ const auth_1 = require("../common/auth");
9
+ const requests_1 = require("../common/requests");
10
+ exports.searchProduct = (0, pieces_framework_1.createAction)({
11
+ auth: auth_1.bigcommerceAuth,
12
+ name: 'searchProduct',
13
+ displayName: 'Search Product',
14
+ description: 'Searches for a product in the catalog',
15
+ audience: 'both',
16
+ aiMetadata: {
17
+ 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.',
18
+ idempotent: true,
19
+ },
20
+ props: {
21
+ name: pieces_framework_1.Property.ShortText({
22
+ displayName: 'Product Name',
23
+ description: 'Product name to search for',
24
+ required: false,
25
+ }),
26
+ sku: pieces_framework_1.Property.ShortText({
27
+ displayName: 'SKU',
28
+ description: 'Product SKU to search for',
29
+ required: false,
30
+ }),
31
+ type: pieces_framework_1.Property.StaticDropdown({
32
+ displayName: 'Product Type',
33
+ required: false,
34
+ options: {
35
+ options: [
36
+ { label: 'Physical', value: 'physical' },
37
+ { label: 'Digital', value: 'digital' },
38
+ ],
39
+ },
40
+ }),
41
+ brand_id: pieces_framework_1.Property.ShortText({
42
+ displayName: 'Brand ID',
43
+ description: 'Brand ID to search for',
44
+ required: false,
45
+ }),
46
+ weight: pieces_framework_1.Property.Number({
47
+ displayName: 'Weight',
48
+ required: false,
49
+ }),
50
+ price: pieces_framework_1.Property.Number({
51
+ displayName: 'Price',
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
+ if (context.propsValue.name)
59
+ params.append('name', context.propsValue.name);
60
+ if (context.propsValue.sku)
61
+ params.append('sku', context.propsValue.sku);
62
+ if (context.propsValue.brand_id)
63
+ params.append('brand_id', context.propsValue.brand_id);
64
+ if (context.propsValue.type)
65
+ params.append('type', context.propsValue.type);
66
+ if (context.propsValue.price)
67
+ params.append('price', String(context.propsValue.price));
68
+ if (context.propsValue.weight)
69
+ params.append('weight', String(context.propsValue.weight));
70
+ return yield requests_1.bigCommerceApiService.fetchProducts({
71
+ auth: context.auth.props,
72
+ queryString: params.toString(),
73
+ });
74
+ });
75
+ },
76
+ });
77
+ //# sourceMappingURL=search-product.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-product.js","sourceRoot":"","sources":["../../../src/lib/actions/search-product.ts"],"names":[],"mappings":";;;;AAAA,4GAA4G;AAC5G,qEAAqE;AACrE,gEAAmE;AACnE,yCAAiD;AACjD,iDAA2D;AAE9C,QAAA,aAAa,GAAG,IAAA,+BAAY,EAAC;IACxC,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,uCAAuC;IACpD,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EACT,kTAAkT;QACpT,UAAU,EAAE,IAAI;KACjB;IACD,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,cAAc;YA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OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;YACzD,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI;gBACzB,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YACjD,IAAI,OAAO,CAAC,UAAU,CAAC,KAAK;gBAC1B,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;YAC3D,IAAI,OAAO,CAAC,UAAU,CAAC,MAAM;gBAC3B,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;YAE7D,OAAO,MAAM,gCAAqB,CAAC,aAAa,CAAC;gBAC/C,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;gBACxB,WAAW,EAAE,MAAM,CAAC,QAAQ,EAAE;aAC/B,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,15 @@
1
+ export declare const updateAProduct: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").CustomAuthProperty<{
2
+ instruction: import("@agnocon/pieces-framework/dist/lib/property/input/markdown-property").MarkDownProperty;
3
+ storeHash: import("@agnocon/pieces-framework").ShortTextProperty<true>;
4
+ accessToken: import("@agnocon/pieces-framework").ShortTextProperty<true>;
5
+ }>, {
6
+ productId: import("@agnocon/pieces-framework").ShortTextProperty<true>;
7
+ name: import("@agnocon/pieces-framework").ShortTextProperty<false>;
8
+ type: import("@agnocon/pieces-framework").StaticDropdownProperty<string, false>;
9
+ sku: import("@agnocon/pieces-framework").ShortTextProperty<false>;
10
+ description: import("@agnocon/pieces-framework").LongTextProperty<false>;
11
+ weight: import("@agnocon/pieces-framework").NumberProperty<false>;
12
+ price: import("@agnocon/pieces-framework").NumberProperty<false>;
13
+ brand_id: import("@agnocon/pieces-framework").NumberProperty<false>;
14
+ }>;
15
+ //# sourceMappingURL=update-a-product.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-a-product.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/update-a-product.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc;;;;;;;;;;;;;EAyEzB,CAAC"}
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateAProduct = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/bigcommerce/src/lib/actions/update-a-product.ts (MIT).
6
+ // Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
7
+ const pieces_framework_1 = require("@agnocon/pieces-framework");
8
+ const auth_1 = require("../common/auth");
9
+ const requests_1 = require("../common/requests");
10
+ exports.updateAProduct = (0, pieces_framework_1.createAction)({
11
+ auth: auth_1.bigcommerceAuth,
12
+ name: 'updateAProduct',
13
+ displayName: 'Update a Product',
14
+ description: 'Updates an existing Product',
15
+ audience: 'both',
16
+ aiMetadata: {
17
+ description: 'Updates an existing catalog product in a BigCommerce store, identified by its productId. Only the fields you supply are sent (null/undefined values are dropped so existing data is preserved), so use it for partial edits to name, type, SKU, description, weight, price, or brand. Idempotent: re-applying the same field values leaves the product in the same state.',
18
+ idempotent: true,
19
+ },
20
+ props: {
21
+ productId: pieces_framework_1.Property.ShortText({
22
+ displayName: 'Product ID',
23
+ description: 'The ID of the product to update',
24
+ required: true,
25
+ }),
26
+ name: pieces_framework_1.Property.ShortText({
27
+ displayName: 'Product Name',
28
+ description: 'Name of the product',
29
+ required: false,
30
+ }),
31
+ type: pieces_framework_1.Property.StaticDropdown({
32
+ displayName: 'Product Type',
33
+ description: 'Type of product',
34
+ required: false,
35
+ options: {
36
+ options: [
37
+ { label: 'Physical', value: 'physical' },
38
+ { label: 'Digital', value: 'digital' },
39
+ ],
40
+ },
41
+ }),
42
+ sku: pieces_framework_1.Property.ShortText({
43
+ displayName: 'SKU',
44
+ description: 'Product SKU',
45
+ required: false,
46
+ }),
47
+ description: pieces_framework_1.Property.LongText({
48
+ displayName: 'Description',
49
+ description: 'Product description',
50
+ required: false,
51
+ }),
52
+ weight: pieces_framework_1.Property.Number({
53
+ displayName: 'Weight',
54
+ description: 'Product weight',
55
+ required: false,
56
+ }),
57
+ price: pieces_framework_1.Property.Number({
58
+ displayName: 'Price',
59
+ description: 'Product price',
60
+ required: false,
61
+ }),
62
+ brand_id: pieces_framework_1.Property.Number({
63
+ displayName: 'Brand ID',
64
+ description: 'Brand ID',
65
+ required: false,
66
+ }),
67
+ },
68
+ run(context) {
69
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
70
+ const _a = context.propsValue, { productId } = _a, payload = tslib_1.__rest(_a, ["productId"]);
71
+ // Filter out null/undefined values to prevent overwriting existing data with nulls
72
+ const filteredPayload = Object.fromEntries(Object.entries(payload).filter(([_, v]) => v !== null && v !== undefined));
73
+ return yield requests_1.bigCommerceApiService.updateProduct({
74
+ auth: context.auth.props,
75
+ productId,
76
+ payload: filteredPayload,
77
+ });
78
+ });
79
+ },
80
+ });
81
+ //# sourceMappingURL=update-a-product.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-a-product.js","sourceRoot":"","sources":["../../../src/lib/actions/update-a-product.ts"],"names":[],"mappings":";;;;AAAA,8GAA8G;AAC9G,qEAAqE;AACrE,gEAAmE;AACnE,yCAAiD;AACjD,iDAA2D;AAE9C,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACzC,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,6BAA6B;IAC1C,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EACT,2WAA2W;QAC7W,UAAU,EAAE,IAAI;KACjB;IACD,KAAK,EAAE;QACL,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAA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AU,EAA9C,EAAE,SAAS,OAAmC,EAA9B,OAAO,sBAAvB,aAAyB,CAAqB,CAAC;YAErD,mFAAmF;YACnF,MAAM,eAAe,GAAG,MAAM,CAAC,WAAW,CACxC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,SAAS,CAAC,CAC1E,CAAC;YAEF,OAAO,MAAM,gCAAqB,CAAC,aAAa,CAAC;gBAC/C,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;gBACxB,SAAS;gBACT,OAAO,EAAE,eAAe;aACzB,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const bigcommerceAuth: import("@agnocon/pieces-framework").CustomAuthProperty<{
2
+ instruction: import("@agnocon/pieces-framework/dist/lib/property/input/markdown-property").MarkDownProperty;
3
+ storeHash: import("@agnocon/pieces-framework").ShortTextProperty<true>;
4
+ accessToken: import("@agnocon/pieces-framework").ShortTextProperty<true>;
5
+ }>;
6
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/lib/common/auth.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,eAAe;;;;EAwC1B,CAAC"}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.bigcommerceAuth = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/bigcommerce/src/lib/common/auth.ts (MIT).
6
+ // Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
7
+ const pieces_framework_1 = require("@agnocon/pieces-framework");
8
+ const requests_1 = require("./requests");
9
+ exports.bigcommerceAuth = pieces_framework_1.PieceAuth.CustomAuth({
10
+ description: 'Enter your BigCommerce API credentials. ',
11
+ props: {
12
+ instruction: pieces_framework_1.Property.MarkDown({
13
+ value: `1. Login to https://www.bigcommerce.com/essentials/
14
+ 2. Go to Settings
15
+ 3. Scroll down to API
16
+ 4. Click on "Store Level API Accounts"
17
+ 5. Click "Create API Account" button
18
+ 6. Enter a name and add required scopes
19
+ 7. Save - you will get a downloaded file containing your access token and store hash`,
20
+ }),
21
+ storeHash: pieces_framework_1.Property.ShortText({
22
+ displayName: 'Store Hash',
23
+ description: 'Your BigCommerce store hash (e.g., abcd1234)',
24
+ required: true,
25
+ }),
26
+ accessToken: pieces_framework_1.Property.ShortText({
27
+ displayName: 'Access Token',
28
+ description: 'Your BigCommerce API access token',
29
+ required: true,
30
+ }),
31
+ },
32
+ required: true,
33
+ validate(context) {
34
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
35
+ try {
36
+ yield requests_1.bigCommerceApiService.fetchProducts({
37
+ auth: context.auth,
38
+ });
39
+ return { valid: true };
40
+ }
41
+ catch (_a) {
42
+ return {
43
+ valid: false,
44
+ error: 'Could not validate credentials. please check your credentials are correct.',
45
+ };
46
+ }
47
+ });
48
+ },
49
+ });
50
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/lib/common/auth.ts"],"names":[],"mappings":";;;;AAAA,iGAAiG;AACjG,qEAAqE;AACrE,gEAAgE;AAChE,yCAAmD;AAEtC,QAAA,eAAe,GAAG,4BAAS,CAAC,UAAU,CAAC;IAClD,WAAW,EACT,0CAA0C;IAE5C,KAAK,EAAE;QACL,WAAW,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC7B,KAAK,EAAE;;;;;;qFAMwE;SAChF,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,8CAA8C;YAC3D,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,WAAW,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC9B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,mCAAmC;YAChD,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACD,QAAQ,EAAE,IAAI;IACR,QAAQ,CAAC,OAAO;;YACpB,IAAI,CAAC;gBACH,MAAM,gCAAqB,CAAC,aAAa,CAAC;oBACxC,IAAI,EAAE,OAAO,CAAC,IAAI;iBACnB,CAAC,CAAC;gBACH,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;YACzB,CAAC;YAAC,WAAM,CAAC;gBACP,OAAO;oBACL,KAAK,EAAE,KAAK;oBACZ,KAAK,EACH,4EAA4E;iBAC/E,CAAC;YACJ,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ export type bigCommerceAuth = {
2
+ storeHash: string;
3
+ accessToken: string;
4
+ };
5
+ export declare const GET_BASE_URL: (storeHash: string) => string;
6
+ export declare function handleDropdownError(msg: string): {
7
+ disabled: boolean;
8
+ options: never[];
9
+ placeholder: string;
10
+ };
11
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/lib/common/constants.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,eAAe,GAAG;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACvB,CAAA;AAED,eAAO,MAAM,YAAY,cAAe,MAAM,WACK,CAAC;AAEpD,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM;;;;EAM9C"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GET_BASE_URL = void 0;
4
+ exports.handleDropdownError = handleDropdownError;
5
+ const GET_BASE_URL = (storeHash) => `https://api.bigcommerce.com/stores/${storeHash}`;
6
+ exports.GET_BASE_URL = GET_BASE_URL;
7
+ function handleDropdownError(msg) {
8
+ return {
9
+ disabled: true,
10
+ options: [],
11
+ placeholder: msg,
12
+ };
13
+ }
14
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/lib/common/constants.ts"],"names":[],"mappings":";;;AAUA,kDAMC;AATM,MAAM,YAAY,GAAG,CAAC,SAAiB,EAAE,EAAE,CAChD,sCAAsC,SAAS,EAAE,CAAC;AADvC,QAAA,YAAY,gBAC2B;AAEpD,SAAgB,mBAAmB,CAAC,GAAW;IAC7C,OAAO;QACL,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,GAAG;KACjB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,23 @@
1
+ export declare const customerDropdown: ({ required }: {
2
+ required: boolean;
3
+ }) => import("@agnocon/pieces-framework").DropdownProperty<unknown, false, import("@agnocon/pieces-framework").CustomAuthProperty<{
4
+ instruction: import("@agnocon/pieces-framework/dist/lib/property/input/markdown-property").MarkDownProperty;
5
+ storeHash: import("@agnocon/pieces-framework").ShortTextProperty<true>;
6
+ accessToken: import("@agnocon/pieces-framework").ShortTextProperty<true>;
7
+ }>> | import("@agnocon/pieces-framework").DropdownProperty<unknown, true, import("@agnocon/pieces-framework").CustomAuthProperty<{
8
+ instruction: import("@agnocon/pieces-framework/dist/lib/property/input/markdown-property").MarkDownProperty;
9
+ storeHash: import("@agnocon/pieces-framework").ShortTextProperty<true>;
10
+ accessToken: import("@agnocon/pieces-framework").ShortTextProperty<true>;
11
+ }>>;
12
+ export declare const multiCustomerDropdown: ({ required }: {
13
+ required: boolean;
14
+ }) => import("@agnocon/pieces-framework").MultiSelectDropdownProperty<unknown, false, import("@agnocon/pieces-framework").CustomAuthProperty<{
15
+ instruction: import("@agnocon/pieces-framework/dist/lib/property/input/markdown-property").MarkDownProperty;
16
+ storeHash: import("@agnocon/pieces-framework").ShortTextProperty<true>;
17
+ accessToken: import("@agnocon/pieces-framework").ShortTextProperty<true>;
18
+ }>> | import("@agnocon/pieces-framework").MultiSelectDropdownProperty<unknown, true, import("@agnocon/pieces-framework").CustomAuthProperty<{
19
+ instruction: import("@agnocon/pieces-framework/dist/lib/property/input/markdown-property").MarkDownProperty;
20
+ storeHash: import("@agnocon/pieces-framework").ShortTextProperty<true>;
21
+ accessToken: import("@agnocon/pieces-framework").ShortTextProperty<true>;
22
+ }>>;
23
+ //# sourceMappingURL=props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/lib/common/props.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,gBAAgB,iBAAkB;IAAE,QAAQ,EAAE,OAAO,CAAA;CAAE;;;;;;;;GAyChE,CAAC;AAEL,eAAO,MAAM,qBAAqB,iBAAkB;IAAE,QAAQ,EAAE,OAAO,CAAA;CAAE;;;;;;;;GAyCrE,CAAC"}
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.multiCustomerDropdown = exports.customerDropdown = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Vendored from Activepieces packages/pieces/community/bigcommerce/src/lib/common/props.ts (MIT).
6
+ // Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
7
+ const pieces_framework_1 = require("@agnocon/pieces-framework");
8
+ const constants_1 = require("./constants");
9
+ const requests_1 = require("./requests");
10
+ const auth_1 = require("./auth");
11
+ const customerDropdown = ({ required }) => pieces_framework_1.Property.Dropdown({
12
+ auth: auth_1.bigcommerceAuth,
13
+ displayName: 'Customer',
14
+ description: 'Select the customer',
15
+ required,
16
+ refreshers: ['auth'],
17
+ options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
18
+ if (!auth)
19
+ return (0, constants_1.handleDropdownError)('Please connect your account first');
20
+ try {
21
+ const response = yield requests_1.bigCommerceApiService.fetchCustomers({ auth: auth.props });
22
+ const data = Array.isArray(response === null || response === void 0 ? void 0 : response.data) ? response.data : [];
23
+ if (data.length === 0) {
24
+ return (0, constants_1.handleDropdownError)('No customers found');
25
+ }
26
+ const options = data.map((user) => {
27
+ const fullName = [user.first_name, user.last_name]
28
+ .filter((p) => typeof p === 'string' && p.trim() !== '')
29
+ .join(' ') ||
30
+ user.email ||
31
+ user.id;
32
+ return {
33
+ label: fullName,
34
+ value: user.id,
35
+ };
36
+ });
37
+ return {
38
+ disabled: false,
39
+ options,
40
+ };
41
+ }
42
+ catch (error) {
43
+ return (0, constants_1.handleDropdownError)('Failed to load customers');
44
+ }
45
+ }),
46
+ });
47
+ exports.customerDropdown = customerDropdown;
48
+ const multiCustomerDropdown = ({ required }) => pieces_framework_1.Property.MultiSelectDropdown({
49
+ auth: auth_1.bigcommerceAuth,
50
+ displayName: 'Customers',
51
+ description: 'Select the customers',
52
+ required,
53
+ refreshers: ['auth'],
54
+ options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
55
+ if (!auth)
56
+ return (0, constants_1.handleDropdownError)('Please connect your account first');
57
+ try {
58
+ const response = yield requests_1.bigCommerceApiService.fetchCustomers({ auth: auth.props });
59
+ const data = Array.isArray(response === null || response === void 0 ? void 0 : response.data) ? response.data : [];
60
+ if (data.length === 0) {
61
+ return (0, constants_1.handleDropdownError)('No customers found');
62
+ }
63
+ const options = data.map((user) => {
64
+ const fullName = [user.first_name, user.last_name]
65
+ .filter((p) => typeof p === 'string' && p.trim() !== '')
66
+ .join(' ') ||
67
+ user.email ||
68
+ user.id;
69
+ return {
70
+ label: fullName,
71
+ value: user.id,
72
+ };
73
+ });
74
+ return {
75
+ disabled: false,
76
+ options,
77
+ };
78
+ }
79
+ catch (error) {
80
+ return (0, constants_1.handleDropdownError)('Failed to load customers');
81
+ }
82
+ }),
83
+ });
84
+ exports.multiCustomerDropdown = multiCustomerDropdown;
85
+ //# sourceMappingURL=props.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.js","sourceRoot":"","sources":["../../../src/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,GACZ,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC;qBAC9B,MAAM,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC;qBAC5D,IAAI,CAAC,GAAG,CAAC;oBACZ,IAAI,CAAC,KAAK;oBACV,IAAI,CAAC,EAAE,CAAC;gBAEV,OAAO;oBACL,KAAK,EAAE,QAAQ;oBACf,KAAK,EAAE,IAAI,CAAC,EAAE;iBACf,CAAC;YACJ,CAAC,CAAC,CAAC;YAEH,OAAO;gBACL,QAAQ,EAAE,KAAK;gBACf,OAAO;aACR,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,IAAA,+BAAmB,EAAC,0BAA0B,CAAC,CAAC;QACzD,CAAC;IACH,CAAC,CAAA;CACF,CAAC,CAAC;AAzCQ,QAAA,qBAAqB,yBAyC7B"}
@@ -0,0 +1,65 @@
1
+ import { bigCommerceAuth } from './constants';
2
+ export declare const bigCommerceApiService: {
3
+ createWebhook({ auth, payload, }: {
4
+ auth: bigCommerceAuth;
5
+ payload: {
6
+ scope: string;
7
+ destination: string;
8
+ is_active: boolean;
9
+ };
10
+ }): Promise<any>;
11
+ createCustomer({ auth, payload, }: {
12
+ auth: bigCommerceAuth;
13
+ payload: unknown;
14
+ }): Promise<any>;
15
+ fetchCustomers({ auth, queryString, }: {
16
+ auth: bigCommerceAuth;
17
+ queryString?: string;
18
+ }): Promise<any>;
19
+ fetchCustomerAddresses({ auth, queryString, }: {
20
+ auth: bigCommerceAuth;
21
+ queryString?: string;
22
+ }): Promise<any>;
23
+ fetchProducts({ auth, queryString, }: {
24
+ auth: bigCommerceAuth;
25
+ queryString?: string;
26
+ }): Promise<any>;
27
+ createProduct({ auth, payload, }: {
28
+ auth: bigCommerceAuth;
29
+ payload: unknown;
30
+ }): Promise<any>;
31
+ updateProduct({ auth, productId, payload, }: {
32
+ auth: bigCommerceAuth;
33
+ productId: string | number;
34
+ payload: unknown;
35
+ }): Promise<any>;
36
+ deleteProduct({ auth, productId, }: {
37
+ auth: bigCommerceAuth;
38
+ productId: string | number;
39
+ }): Promise<any>;
40
+ fetchOrders({ auth, queryString, }: {
41
+ auth: bigCommerceAuth;
42
+ queryString?: string;
43
+ }): Promise<any>;
44
+ fetchOrder({ auth, orderId, }: {
45
+ auth: bigCommerceAuth;
46
+ orderId: string | number;
47
+ }): Promise<any>;
48
+ fetchCategories({ auth, queryString, }: {
49
+ auth: bigCommerceAuth;
50
+ queryString?: string;
51
+ }): Promise<any>;
52
+ createBlogPost({ auth, payload, }: {
53
+ auth: bigCommerceAuth;
54
+ payload: unknown;
55
+ }): Promise<any>;
56
+ createCustomerAddress({ auth, payload, }: {
57
+ auth: bigCommerceAuth;
58
+ payload: unknown;
59
+ }): Promise<any>;
60
+ deleteWebhook({ auth, webhookId, }: {
61
+ auth: bigCommerceAuth;
62
+ webhookId: string;
63
+ }): Promise<any>;
64
+ };
65
+ //# sourceMappingURL=requests.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requests.d.ts","sourceRoot":"","sources":["../../../src/lib/common/requests.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAgB,MAAM,aAAa,CAAC;AAyC5D,eAAO,MAAM,qBAAqB;sCAI7B;QACD,IAAI,EAAE,eAAe,CAAC;QACtB,OAAO,EAAE;YACP,KAAK,EAAE,MAAM,CAAC;YACd,WAAW,EAAE,MAAM,CAAC;YACpB,SAAS,EAAE,OAAO,CAAC;SACpB,CAAC;KACH;uCAWE;QACD,IAAI,EAAE,eAAe,CAAC;QACtB,OAAO,EAAE,OAAO,CAAC;KAClB;2CAWE;QACD,IAAI,EAAE,eAAe,CAAC;QACtB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB;mDAUE;QACD,IAAI,EAAE,eAAe,CAAC;QACtB,WAAW,CAAC,EAAE,MAAM,CA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