@acmekit/core-flows 2.13.13 → 2.13.15

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 (216) hide show
  1. package/dist/api-key/steps/create-api-keys.d.ts +2 -2
  2. package/dist/api-key/steps/create-api-keys.js +2 -2
  3. package/dist/api-key/workflows/create-api-keys.d.ts +5 -15
  4. package/dist/api-key/workflows/create-api-keys.d.ts.map +1 -1
  5. package/dist/api-key/workflows/create-api-keys.js +5 -15
  6. package/dist/api-key/workflows/create-api-keys.js.map +1 -1
  7. package/dist/api-key/workflows/delete-api-keys.d.ts +2 -2
  8. package/dist/api-key/workflows/delete-api-keys.d.ts.map +1 -1
  9. package/dist/api-key/workflows/delete-api-keys.js +2 -3
  10. package/dist/api-key/workflows/delete-api-keys.js.map +1 -1
  11. package/dist/api-key/workflows/revoke-api-keys.d.ts +2 -2
  12. package/dist/api-key/workflows/revoke-api-keys.js +2 -2
  13. package/dist/api-key/workflows/update-api-keys.d.ts +2 -2
  14. package/dist/api-key/workflows/update-api-keys.js +2 -2
  15. package/dist/defaults/steps/index.d.ts +1 -1
  16. package/dist/defaults/steps/index.d.ts.map +1 -1
  17. package/dist/defaults/steps/index.js +1 -15
  18. package/dist/defaults/steps/index.js.map +1 -1
  19. package/dist/defaults/workflows/create-defaults.d.ts +7 -11
  20. package/dist/defaults/workflows/create-defaults.d.ts.map +1 -1
  21. package/dist/defaults/workflows/create-defaults.js +12 -20
  22. package/dist/defaults/workflows/create-defaults.js.map +1 -1
  23. package/dist/index.d.ts +0 -3
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +0 -3
  26. package/dist/index.js.map +1 -1
  27. package/dist/tsconfig.tsbuildinfo +1 -1
  28. package/package.json +3 -3
  29. package/dist/customer/index.d.ts +0 -3
  30. package/dist/customer/index.d.ts.map +0 -1
  31. package/dist/customer/index.js +0 -19
  32. package/dist/customer/index.js.map +0 -1
  33. package/dist/customer/steps/create-addresses.d.ts +0 -25
  34. package/dist/customer/steps/create-addresses.d.ts.map +0 -1
  35. package/dist/customer/steps/create-addresses.js +0 -35
  36. package/dist/customer/steps/create-addresses.js.map +0 -1
  37. package/dist/customer/steps/create-customers.d.ts +0 -20
  38. package/dist/customer/steps/create-customers.d.ts.map +0 -1
  39. package/dist/customer/steps/create-customers.js +0 -30
  40. package/dist/customer/steps/create-customers.js.map +0 -1
  41. package/dist/customer/steps/delete-addresses.d.ts +0 -10
  42. package/dist/customer/steps/delete-addresses.d.ts.map +0 -1
  43. package/dist/customer/steps/delete-addresses.js +0 -24
  44. package/dist/customer/steps/delete-addresses.js.map +0 -1
  45. package/dist/customer/steps/delete-customers.d.ts +0 -10
  46. package/dist/customer/steps/delete-customers.d.ts.map +0 -1
  47. package/dist/customer/steps/delete-customers.js +0 -21
  48. package/dist/customer/steps/delete-customers.js.map +0 -1
  49. package/dist/customer/steps/index.d.ts +0 -10
  50. package/dist/customer/steps/index.d.ts.map +0 -1
  51. package/dist/customer/steps/index.js +0 -26
  52. package/dist/customer/steps/index.js.map +0 -1
  53. package/dist/customer/steps/maybe-unset-default-billing-addresses.d.ts +0 -57
  54. package/dist/customer/steps/maybe-unset-default-billing-addresses.d.ts.map +0 -1
  55. package/dist/customer/steps/maybe-unset-default-billing-addresses.js +0 -51
  56. package/dist/customer/steps/maybe-unset-default-billing-addresses.js.map +0 -1
  57. package/dist/customer/steps/maybe-unset-default-shipping-addresses.d.ts +0 -57
  58. package/dist/customer/steps/maybe-unset-default-shipping-addresses.d.ts.map +0 -1
  59. package/dist/customer/steps/maybe-unset-default-shipping-addresses.js +0 -51
  60. package/dist/customer/steps/maybe-unset-default-shipping-addresses.js.map +0 -1
  61. package/dist/customer/steps/update-addresses.d.ts +0 -30
  62. package/dist/customer/steps/update-addresses.d.ts.map +0 -1
  63. package/dist/customer/steps/update-addresses.js +0 -38
  64. package/dist/customer/steps/update-addresses.js.map +0 -1
  65. package/dist/customer/steps/update-customers.d.ts +0 -30
  66. package/dist/customer/steps/update-customers.d.ts.map +0 -1
  67. package/dist/customer/steps/update-customers.js +0 -44
  68. package/dist/customer/steps/update-customers.js.map +0 -1
  69. package/dist/customer/steps/utils/index.d.ts +0 -3
  70. package/dist/customer/steps/utils/index.d.ts.map +0 -1
  71. package/dist/customer/steps/utils/index.js +0 -19
  72. package/dist/customer/steps/utils/index.js.map +0 -1
  73. package/dist/customer/steps/utils/unset-address-for-create.d.ts +0 -4
  74. package/dist/customer/steps/utils/unset-address-for-create.d.ts.map +0 -1
  75. package/dist/customer/steps/utils/unset-address-for-create.js +0 -20
  76. package/dist/customer/steps/utils/unset-address-for-create.js.map +0 -1
  77. package/dist/customer/steps/utils/unset-address-for-update.d.ts +0 -7
  78. package/dist/customer/steps/utils/unset-address-for-update.d.ts.map +0 -1
  79. package/dist/customer/steps/utils/unset-address-for-update.js +0 -21
  80. package/dist/customer/steps/utils/unset-address-for-update.js.map +0 -1
  81. package/dist/customer/steps/validate-customer-account-creation.d.ts +0 -22
  82. package/dist/customer/steps/validate-customer-account-creation.d.ts.map +0 -1
  83. package/dist/customer/steps/validate-customer-account-creation.js +0 -43
  84. package/dist/customer/steps/validate-customer-account-creation.js.map +0 -1
  85. package/dist/customer/workflows/create-addresses.d.ts +0 -66
  86. package/dist/customer/workflows/create-addresses.d.ts.map +0 -1
  87. package/dist/customer/workflows/create-addresses.js +0 -66
  88. package/dist/customer/workflows/create-addresses.js.map +0 -1
  89. package/dist/customer/workflows/create-customer-account.d.ts +0 -44
  90. package/dist/customer/workflows/create-customer-account.d.ts.map +0 -1
  91. package/dist/customer/workflows/create-customer-account.js +0 -57
  92. package/dist/customer/workflows/create-customer-account.js.map +0 -1
  93. package/dist/customer/workflows/create-customers.d.ts +0 -51
  94. package/dist/customer/workflows/create-customers.d.ts.map +0 -1
  95. package/dist/customer/workflows/create-customers.js +0 -58
  96. package/dist/customer/workflows/create-customers.js.map +0 -1
  97. package/dist/customer/workflows/delete-addresses.d.ts +0 -47
  98. package/dist/customer/workflows/delete-addresses.d.ts.map +0 -1
  99. package/dist/customer/workflows/delete-addresses.js +0 -48
  100. package/dist/customer/workflows/delete-addresses.js.map +0 -1
  101. package/dist/customer/workflows/delete-customers.d.ts +0 -38
  102. package/dist/customer/workflows/delete-customers.d.ts.map +0 -1
  103. package/dist/customer/workflows/delete-customers.js +0 -50
  104. package/dist/customer/workflows/delete-customers.js.map +0 -1
  105. package/dist/customer/workflows/index.d.ts +0 -9
  106. package/dist/customer/workflows/index.d.ts.map +0 -1
  107. package/dist/customer/workflows/index.js +0 -25
  108. package/dist/customer/workflows/index.js.map +0 -1
  109. package/dist/customer/workflows/remove-customer-account.d.ts +0 -32
  110. package/dist/customer/workflows/remove-customer-account.d.ts.map +0 -1
  111. package/dist/customer/workflows/remove-customer-account.js +0 -78
  112. package/dist/customer/workflows/remove-customer-account.js.map +0 -1
  113. package/dist/customer/workflows/update-addresses.d.ts +0 -56
  114. package/dist/customer/workflows/update-addresses.d.ts.map +0 -1
  115. package/dist/customer/workflows/update-addresses.js +0 -52
  116. package/dist/customer/workflows/update-addresses.js.map +0 -1
  117. package/dist/customer/workflows/update-customers.d.ts +0 -53
  118. package/dist/customer/workflows/update-customers.d.ts.map +0 -1
  119. package/dist/customer/workflows/update-customers.js +0 -59
  120. package/dist/customer/workflows/update-customers.js.map +0 -1
  121. package/dist/customer-group/index.d.ts +0 -3
  122. package/dist/customer-group/index.d.ts.map +0 -1
  123. package/dist/customer-group/index.js +0 -19
  124. package/dist/customer-group/index.js.map +0 -1
  125. package/dist/customer-group/steps/create-customer-groups.d.ts +0 -11
  126. package/dist/customer-group/steps/create-customer-groups.d.ts.map +0 -1
  127. package/dist/customer-group/steps/create-customer-groups.js +0 -21
  128. package/dist/customer-group/steps/create-customer-groups.js.map +0 -1
  129. package/dist/customer-group/steps/delete-customer-group-customers.d.ts +0 -7
  130. package/dist/customer-group/steps/delete-customer-group-customers.d.ts.map +0 -1
  131. package/dist/customer-group/steps/delete-customer-group-customers.js +0 -21
  132. package/dist/customer-group/steps/delete-customer-group-customers.js.map +0 -1
  133. package/dist/customer-group/steps/delete-customer-groups.d.ts +0 -10
  134. package/dist/customer-group/steps/delete-customer-groups.d.ts.map +0 -1
  135. package/dist/customer-group/steps/delete-customer-groups.js +0 -21
  136. package/dist/customer-group/steps/delete-customer-groups.js.map +0 -1
  137. package/dist/customer-group/steps/index.d.ts +0 -6
  138. package/dist/customer-group/steps/index.d.ts.map +0 -1
  139. package/dist/customer-group/steps/index.js +0 -22
  140. package/dist/customer-group/steps/index.js.map +0 -1
  141. package/dist/customer-group/steps/link-customer-groups-customer.d.ts +0 -14
  142. package/dist/customer-group/steps/link-customer-groups-customer.d.ts.map +0 -1
  143. package/dist/customer-group/steps/link-customer-groups-customer.js +0 -52
  144. package/dist/customer-group/steps/link-customer-groups-customer.js.map +0 -1
  145. package/dist/customer-group/steps/link-customers-customer-group.d.ts +0 -14
  146. package/dist/customer-group/steps/link-customers-customer-group.d.ts.map +0 -1
  147. package/dist/customer-group/steps/link-customers-customer-group.js +0 -52
  148. package/dist/customer-group/steps/link-customers-customer-group.js.map +0 -1
  149. package/dist/customer-group/steps/update-customer-groups.d.ts +0 -30
  150. package/dist/customer-group/steps/update-customer-groups.d.ts.map +0 -1
  151. package/dist/customer-group/steps/update-customer-groups.js +0 -41
  152. package/dist/customer-group/steps/update-customer-groups.js.map +0 -1
  153. package/dist/customer-group/workflows/create-customer-groups.d.ts +0 -41
  154. package/dist/customer-group/workflows/create-customer-groups.d.ts.map +0 -1
  155. package/dist/customer-group/workflows/create-customer-groups.js +0 -34
  156. package/dist/customer-group/workflows/create-customer-groups.js.map +0 -1
  157. package/dist/customer-group/workflows/delete-customer-groups.d.ts +0 -31
  158. package/dist/customer-group/workflows/delete-customer-groups.d.ts.map +0 -1
  159. package/dist/customer-group/workflows/delete-customer-groups.js +0 -29
  160. package/dist/customer-group/workflows/delete-customer-groups.js.map +0 -1
  161. package/dist/customer-group/workflows/index.d.ts +0 -6
  162. package/dist/customer-group/workflows/index.d.ts.map +0 -1
  163. package/dist/customer-group/workflows/index.js +0 -22
  164. package/dist/customer-group/workflows/index.js.map +0 -1
  165. package/dist/customer-group/workflows/link-customer-groups-customer.d.ts +0 -33
  166. package/dist/customer-group/workflows/link-customer-groups-customer.d.ts.map +0 -1
  167. package/dist/customer-group/workflows/link-customer-groups-customer.js +0 -31
  168. package/dist/customer-group/workflows/link-customer-groups-customer.js.map +0 -1
  169. package/dist/customer-group/workflows/link-customers-customer-group.d.ts +0 -33
  170. package/dist/customer-group/workflows/link-customers-customer-group.d.ts.map +0 -1
  171. package/dist/customer-group/workflows/link-customers-customer-group.js +0 -31
  172. package/dist/customer-group/workflows/link-customers-customer-group.js.map +0 -1
  173. package/dist/customer-group/workflows/update-customer-groups.d.ts +0 -45
  174. package/dist/customer-group/workflows/update-customer-groups.d.ts.map +0 -1
  175. package/dist/customer-group/workflows/update-customer-groups.js +0 -34
  176. package/dist/customer-group/workflows/update-customer-groups.js.map +0 -1
  177. package/dist/defaults/steps/create-default-store.d.ts +0 -31
  178. package/dist/defaults/steps/create-default-store.d.ts.map +0 -1
  179. package/dist/defaults/steps/create-default-store.js +0 -67
  180. package/dist/defaults/steps/create-default-store.js.map +0 -1
  181. package/dist/store/index.d.ts +0 -3
  182. package/dist/store/index.d.ts.map +0 -1
  183. package/dist/store/index.js +0 -19
  184. package/dist/store/index.js.map +0 -1
  185. package/dist/store/steps/create-stores.d.ts +0 -12
  186. package/dist/store/steps/create-stores.d.ts.map +0 -1
  187. package/dist/store/steps/create-stores.js +0 -26
  188. package/dist/store/steps/create-stores.js.map +0 -1
  189. package/dist/store/steps/delete-stores.d.ts +0 -10
  190. package/dist/store/steps/delete-stores.d.ts.map +0 -1
  191. package/dist/store/steps/delete-stores.js +0 -21
  192. package/dist/store/steps/delete-stores.js.map +0 -1
  193. package/dist/store/steps/index.d.ts +0 -4
  194. package/dist/store/steps/index.d.ts.map +0 -1
  195. package/dist/store/steps/index.js +0 -20
  196. package/dist/store/steps/index.js.map +0 -1
  197. package/dist/store/steps/update-stores.d.ts +0 -30
  198. package/dist/store/steps/update-stores.d.ts.map +0 -1
  199. package/dist/store/steps/update-stores.js +0 -41
  200. package/dist/store/steps/update-stores.js.map +0 -1
  201. package/dist/store/workflows/create-stores.d.ts +0 -53
  202. package/dist/store/workflows/create-stores.d.ts.map +0 -1
  203. package/dist/store/workflows/create-stores.js +0 -51
  204. package/dist/store/workflows/create-stores.js.map +0 -1
  205. package/dist/store/workflows/delete-stores.d.ts +0 -38
  206. package/dist/store/workflows/delete-stores.d.ts.map +0 -1
  207. package/dist/store/workflows/delete-stores.js +0 -44
  208. package/dist/store/workflows/delete-stores.js.map +0 -1
  209. package/dist/store/workflows/index.d.ts +0 -4
  210. package/dist/store/workflows/index.d.ts.map +0 -1
  211. package/dist/store/workflows/index.js +0 -20
  212. package/dist/store/workflows/index.js.map +0 -1
  213. package/dist/store/workflows/update-stores.d.ts +0 -32
  214. package/dist/store/workflows/update-stores.d.ts.map +0 -1
  215. package/dist/store/workflows/update-stores.js +0 -52
  216. package/dist/store/workflows/update-stores.js.map +0 -1
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.linkCustomersToCustomerGroupWorkflow = exports.linkCustomersToCustomerGroupWorkflowId = void 0;
4
- const workflows_sdk_1 = require("@acmekit/framework/workflows-sdk");
5
- const steps_1 = require("../steps");
6
- exports.linkCustomersToCustomerGroupWorkflowId = "link-customers-to-customer-group";
7
- /**
8
- * This workflow manages the customers of a customer group. It's used by the
9
- * [Manage Customers of Group Admin API Route](https://docs.acmekit.com/api/admin#customer-groups_postcustomergroupsidcustomers).
10
- *
11
- * You can use this workflow within your customizations or your own custom workflows, allowing you to
12
- * manage the customers of a customer group within your custom flows.
13
- *
14
- * @example
15
- * const { result } = await linkCustomersToCustomerGroupWorkflow(container)
16
- * .run({
17
- * input: {
18
- * id: "cusgrp_123",
19
- * add: ["cus_123"],
20
- * remove: ["cus_456"]
21
- * }
22
- * })
23
- *
24
- * @summary
25
- *
26
- * Manage the customers of a customer group.
27
- */
28
- exports.linkCustomersToCustomerGroupWorkflow = (0, workflows_sdk_1.createWorkflow)(exports.linkCustomersToCustomerGroupWorkflowId, (input) => {
29
- return (0, steps_1.linkCustomersToCustomerGroupStep)(input);
30
- });
31
- //# sourceMappingURL=link-customers-customer-group.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"link-customers-customer-group.js","sourceRoot":"","sources":["../../../src/customer-group/workflows/link-customers-customer-group.ts"],"names":[],"mappings":";;;AACA,oEAA+E;AAC/E,oCAA2D;AAW9C,QAAA,sCAAsC,GACjD,kCAAkC,CAAA;AACpC;;;;;;;;;;;;;;;;;;;;GAoBG;AACU,QAAA,oCAAoC,GAAG,IAAA,8BAAc,EAChE,8CAAsC,EACtC,CACE,KAAyD,EACrC,EAAE;IACtB,OAAO,IAAA,wCAAgC,EAAC,KAAK,CAAC,CAAA;AAChD,CAAC,CACF,CAAA"}
@@ -1,45 +0,0 @@
1
- import { CustomerGroupDTO, FilterableCustomerGroupProps, CustomerGroupUpdatableFields } from "@acmekit/framework/types";
2
- /**
3
- * The data to update customer groups.
4
- */
5
- export type UpdateCustomerGroupsWorkflowInput = {
6
- /**
7
- * The filter to select the customer groups to update.
8
- */
9
- selector: FilterableCustomerGroupProps;
10
- /**
11
- * The data to update in the customer group.
12
- */
13
- update: CustomerGroupUpdatableFields;
14
- };
15
- /**
16
- * The updated customer groups.
17
- */
18
- export type UpdateCustomerGroupsWorkflowOutput = CustomerGroupDTO[];
19
- export declare const updateCustomerGroupsWorkflowId = "update-customer-groups";
20
- /**
21
- * This workflow updates one or more customer groups. It's used by the
22
- * [Update Customer Group Admin API Route](https://docs.acmekit.com/api/admin#customer-groups_postcustomergroupsid).
23
- *
24
- * You can use this workflow within your customizations or your own custom workflows, allowing you to
25
- * update customer groups within your custom flows.
26
- *
27
- * @example
28
- * const { result } = await updateCustomerGroupsWorkflow(container)
29
- * .run({
30
- * input: {
31
- * selector: {
32
- * id: "cusgrp_123"
33
- * },
34
- * update: {
35
- * name: "VIP"
36
- * }
37
- * }
38
- * })
39
- *
40
- * @summary
41
- *
42
- * Update one or more customer groups.
43
- */
44
- export declare const updateCustomerGroupsWorkflow: import("@acmekit/framework/workflows-sdk").ReturnWorkflow<UpdateCustomerGroupsWorkflowInput, UpdateCustomerGroupsWorkflowOutput, []>;
45
- //# sourceMappingURL=update-customer-groups.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update-customer-groups.d.ts","sourceRoot":"","sources":["../../../src/customer-group/workflows/update-customer-groups.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,4BAA4B,EAC5B,4BAA4B,EAC7B,MAAM,0BAA0B,CAAA;AAQjC;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG;IAC9C;;OAEG;IACH,QAAQ,EAAE,4BAA4B,CAAA;IACtC;;OAEG;IACH,MAAM,EAAE,4BAA4B,CAAA;CACrC,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,gBAAgB,EAAE,CAAA;AAEnE,eAAO,MAAM,8BAA8B,2BAA2B,CAAA;AACtE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,4BAA4B,sIAOxC,CAAA"}
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updateCustomerGroupsWorkflow = exports.updateCustomerGroupsWorkflowId = void 0;
4
- const workflows_sdk_1 = require("@acmekit/framework/workflows-sdk");
5
- const steps_1 = require("../steps");
6
- exports.updateCustomerGroupsWorkflowId = "update-customer-groups";
7
- /**
8
- * This workflow updates one or more customer groups. It's used by the
9
- * [Update Customer Group Admin API Route](https://docs.acmekit.com/api/admin#customer-groups_postcustomergroupsid).
10
- *
11
- * You can use this workflow within your customizations or your own custom workflows, allowing you to
12
- * update customer groups within your custom flows.
13
- *
14
- * @example
15
- * const { result } = await updateCustomerGroupsWorkflow(container)
16
- * .run({
17
- * input: {
18
- * selector: {
19
- * id: "cusgrp_123"
20
- * },
21
- * update: {
22
- * name: "VIP"
23
- * }
24
- * }
25
- * })
26
- *
27
- * @summary
28
- *
29
- * Update one or more customer groups.
30
- */
31
- exports.updateCustomerGroupsWorkflow = (0, workflows_sdk_1.createWorkflow)(exports.updateCustomerGroupsWorkflowId, (input) => {
32
- return new workflows_sdk_1.WorkflowResponse((0, steps_1.updateCustomerGroupsStep)(input));
33
- });
34
- //# sourceMappingURL=update-customer-groups.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update-customer-groups.js","sourceRoot":"","sources":["../../../src/customer-group/workflows/update-customer-groups.ts"],"names":[],"mappings":";;;AAKA,oEAIyC;AACzC,oCAAmD;AAqBtC,QAAA,8BAA8B,GAAG,wBAAwB,CAAA;AACtE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACU,QAAA,4BAA4B,GAAG,IAAA,8BAAc,EACxD,sCAA8B,EAC9B,CACE,KAAsD,EACA,EAAE;IACxD,OAAO,IAAI,gCAAgB,CAAC,IAAA,gCAAwB,EAAC,KAAK,CAAC,CAAC,CAAA;AAC9D,CAAC,CACF,CAAA"}
@@ -1,31 +0,0 @@
1
- import { CreateStoreDTO, StoreDTO } from "@acmekit/framework/types";
2
- /**
3
- * The data to create a default store.
4
- */
5
- type CreateDefaultStoreStepInput = {
6
- /**
7
- * The store to create.
8
- */
9
- store: CreateStoreDTO;
10
- };
11
- export declare const createDefaultStoreStepId = "create-default-store";
12
- /**
13
- * This step creates a default store. Useful if creating a workflow
14
- * that seeds data into AcmeKit.
15
- *
16
- * @example
17
- * const data = createDefaultStoreStep({
18
- * store: {
19
- * name: "Acme",
20
- * supported_currencies: [
21
- * {
22
- * currency_code: "usd",
23
- * is_default: true
24
- * }
25
- * ],
26
- * }
27
- * })
28
- */
29
- export declare const createDefaultStoreStep: import("@acmekit/framework/workflows-sdk").StepFunction<CreateDefaultStoreStepInput, StoreDTO | undefined>;
30
- export {};
31
- //# sourceMappingURL=create-default-store.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-default-store.d.ts","sourceRoot":"","sources":["../../../src/defaults/steps/create-default-store.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EAEd,QAAQ,EACT,MAAM,0BAA0B,CAAA;AAKjC;;GAEG;AACH,KAAK,2BAA2B,GAAG;IACjC;;OAEG;IACH,KAAK,EAAE,cAAc,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,wBAAwB,yBAAyB,CAAA;AAC9D;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,sBAAsB,4GAoDlC,CAAA"}
@@ -1,67 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createDefaultStoreStep = exports.createDefaultStoreStepId = void 0;
4
- const utils_1 = require("@acmekit/framework/utils");
5
- const workflows_sdk_1 = require("@acmekit/framework/workflows-sdk");
6
- const store_1 = require("../../store");
7
- exports.createDefaultStoreStepId = "create-default-store";
8
- /**
9
- * This step creates a default store. Useful if creating a workflow
10
- * that seeds data into AcmeKit.
11
- *
12
- * @example
13
- * const data = createDefaultStoreStep({
14
- * store: {
15
- * name: "Acme",
16
- * supported_currencies: [
17
- * {
18
- * currency_code: "usd",
19
- * is_default: true
20
- * }
21
- * ],
22
- * }
23
- * })
24
- */
25
- exports.createDefaultStoreStep = (0, workflows_sdk_1.createStep)(exports.createDefaultStoreStepId, async (data, { container }) => {
26
- const storeService = container.resolve(utils_1.Modules.STORE);
27
- if (!storeService) {
28
- return new workflows_sdk_1.StepResponse(void 0);
29
- }
30
- let shouldDelete = false;
31
- let [store] = await storeService.listStores({}, { take: 1 });
32
- /**
33
- * @todo
34
- * Seems like we are missing an integration test when the
35
- * following conditional as true.
36
- */
37
- if (!store) {
38
- const stores = await (0, store_1.createStoresWorkflow)(container).run({
39
- input: {
40
- stores: [
41
- {
42
- // TODO: Revisit for a more sophisticated approach
43
- ...data.store,
44
- supported_currencies: [
45
- { currency_code: "eur", is_default: true },
46
- ],
47
- },
48
- ],
49
- },
50
- });
51
- /**
52
- * As per types, the result from "createStoresWorkflow.run" was
53
- * an array of "StoreDTO". But at runtime it turns out to be
54
- * a "StoreDTO"
55
- */
56
- store = stores;
57
- shouldDelete = true;
58
- }
59
- return new workflows_sdk_1.StepResponse(store, { storeId: store.id, shouldDelete });
60
- }, async (data, { container }) => {
61
- if (!data || !data.shouldDelete) {
62
- return;
63
- }
64
- const service = container.resolve(utils_1.Modules.STORE);
65
- await service.deleteStores(data.storeId);
66
- });
67
- //# sourceMappingURL=create-default-store.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-default-store.js","sourceRoot":"","sources":["../../../src/defaults/steps/create-default-store.ts"],"names":[],"mappings":";;;AAKA,oDAAkD;AAClD,oEAA2E;AAC3E,uCAAkD;AAYrC,QAAA,wBAAwB,GAAG,sBAAsB,CAAA;AAC9D;;;;;;;;;;;;;;;;GAgBG;AACU,QAAA,sBAAsB,GAAG,IAAA,0BAAU,EAC9C,gCAAwB,EACxB,KAAK,EAAE,IAAiC,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IACzD,MAAM,YAAY,GAAG,SAAS,CAAC,OAAO,CAAC,eAAO,CAAC,KAAK,CAAC,CAAA;IAErD,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,IAAI,4BAAY,CAAC,KAAK,CAAC,CAAC,CAAA;IACjC,CAAC;IAED,IAAI,YAAY,GAAG,KAAK,CAAA;IACxB,IAAI,CAAC,KAAK,CAAC,GAAG,MAAM,YAAY,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAA;IAE5D;;;;OAIG;IACH,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,MAAM,GAAG,MAAM,IAAA,4BAAoB,EAAC,SAAS,CAAC,CAAC,GAAG,CAAC;YACvD,KAAK,EAAE;gBACL,MAAM,EAAE;oBACN;wBACE,kDAAkD;wBAClD,GAAG,IAAI,CAAC,KAAK;wBACb,oBAAoB,EAAE;4BACpB,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;yBAC3C;qBACF;iBACF;aACF;SACF,CAAC,CAAA;QAEF;;;;WAIG;QACH,KAAK,GAAG,MAA6B,CAAA;QACrC,YAAY,GAAG,IAAI,CAAA;IACrB,CAAC;IAED,OAAO,IAAI,4BAAY,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,EAAE,YAAY,EAAE,CAAC,CAAA;AACrE,CAAC,EACD,KAAK,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IAC5B,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;QAChC,OAAM;IACR,CAAC;IAED,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAsB,eAAO,CAAC,KAAK,CAAC,CAAA;IAErE,MAAM,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;AAC1C,CAAC,CACF,CAAA"}
@@ -1,3 +0,0 @@
1
- export * from "./steps";
2
- export * from "./workflows";
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./steps"), exports);
18
- __exportStar(require("./workflows"), exports);
19
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,8CAA2B"}
@@ -1,12 +0,0 @@
1
- import type { CreateStoreDTO } from "@acmekit/framework/types";
2
- export declare const createStoresStepId = "create-stores";
3
- /**
4
- * This step creates one or more stores.
5
- *
6
- * @example
7
- * const data = createStoresStep([{
8
- * name: "Acme"
9
- * }])
10
- */
11
- export declare const createStoresStep: import("@acmekit/framework/workflows-sdk").StepFunction<CreateStoreDTO[], import("@acmekit/framework/types").StoreDTO[]>;
12
- //# sourceMappingURL=create-stores.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-stores.d.ts","sourceRoot":"","sources":["../../../src/store/steps/create-stores.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EAEf,MAAM,0BAA0B,CAAA;AAIjC,eAAO,MAAM,kBAAkB,kBAAkB,CAAA;AACjD;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,0HAoB5B,CAAA"}
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createStoresStep = exports.createStoresStepId = void 0;
4
- const utils_1 = require("@acmekit/framework/utils");
5
- const workflows_sdk_1 = require("@acmekit/framework/workflows-sdk");
6
- exports.createStoresStepId = "create-stores";
7
- /**
8
- * This step creates one or more stores.
9
- *
10
- * @example
11
- * const data = createStoresStep([{
12
- * name: "Acme"
13
- * }])
14
- */
15
- exports.createStoresStep = (0, workflows_sdk_1.createStep)(exports.createStoresStepId, async (data, { container }) => {
16
- const service = container.resolve(utils_1.Modules.STORE);
17
- const created = await service.createStores(data);
18
- return new workflows_sdk_1.StepResponse(created, created.map((store) => store.id));
19
- }, async (createdIds, { container }) => {
20
- if (!createdIds?.length) {
21
- return;
22
- }
23
- const service = container.resolve(utils_1.Modules.STORE);
24
- await service.deleteStores(createdIds);
25
- });
26
- //# sourceMappingURL=create-stores.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-stores.js","sourceRoot":"","sources":["../../../src/store/steps/create-stores.ts"],"names":[],"mappings":";;;AAIA,oDAAkD;AAClD,oEAA2E;AAE9D,QAAA,kBAAkB,GAAG,eAAe,CAAA;AACjD;;;;;;;GAOG;AACU,QAAA,gBAAgB,GAAG,IAAA,0BAAU,EACxC,0BAAkB,EAClB,KAAK,EAAE,IAAsB,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IAC9C,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAsB,eAAO,CAAC,KAAK,CAAC,CAAA;IAErE,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAA;IAChD,OAAO,IAAI,4BAAY,CACrB,OAAO,EACP,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CACjC,CAAA;AACH,CAAC,EACD,KAAK,EAAE,UAAU,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IAClC,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC;QACxB,OAAM;IACR,CAAC;IAED,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAsB,eAAO,CAAC,KAAK,CAAC,CAAA;IAErE,MAAM,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,CAAA;AACxC,CAAC,CACF,CAAA"}
@@ -1,10 +0,0 @@
1
- /**
2
- * The IDs of the stores to delete.
3
- */
4
- export type DeleteStoresStepInput = string[];
5
- export declare const deleteStoresStepId = "delete-stores";
6
- /**
7
- * This step deletes one or more stores.
8
- */
9
- export declare const deleteStoresStep: import("@acmekit/framework/workflows-sdk").StepFunction<DeleteStoresStepInput, undefined>;
10
- //# sourceMappingURL=delete-stores.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"delete-stores.d.ts","sourceRoot":"","sources":["../../../src/store/steps/delete-stores.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,MAAM,EAAE,CAAA;AAE5C,eAAO,MAAM,kBAAkB,kBAAkB,CAAA;AACjD;;GAEG;AACH,eAAO,MAAM,gBAAgB,2FAiB5B,CAAA"}
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deleteStoresStep = exports.deleteStoresStepId = void 0;
4
- const utils_1 = require("@acmekit/framework/utils");
5
- const workflows_sdk_1 = require("@acmekit/framework/workflows-sdk");
6
- exports.deleteStoresStepId = "delete-stores";
7
- /**
8
- * This step deletes one or more stores.
9
- */
10
- exports.deleteStoresStep = (0, workflows_sdk_1.createStep)(exports.deleteStoresStepId, async (ids, { container }) => {
11
- const storeModule = container.resolve(utils_1.Modules.STORE);
12
- await storeModule.softDeleteStores(ids);
13
- return new workflows_sdk_1.StepResponse(void 0, ids);
14
- }, async (idsToRestore, { container }) => {
15
- if (!idsToRestore?.length) {
16
- return;
17
- }
18
- const storeModule = container.resolve(utils_1.Modules.STORE);
19
- await storeModule.restoreStores(idsToRestore);
20
- });
21
- //# sourceMappingURL=delete-stores.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"delete-stores.js","sourceRoot":"","sources":["../../../src/store/steps/delete-stores.ts"],"names":[],"mappings":";;;AACA,oDAAkD;AAClD,oEAA2E;AAO9D,QAAA,kBAAkB,GAAG,eAAe,CAAA;AACjD;;GAEG;AACU,QAAA,gBAAgB,GAAG,IAAA,0BAAU,EACxC,0BAAkB,EAClB,KAAK,EAAE,GAA0B,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IAClD,MAAM,WAAW,GAAG,SAAS,CAAC,OAAO,CAAsB,eAAO,CAAC,KAAK,CAAC,CAAA;IAEzE,MAAM,WAAW,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAA;IACvC,OAAO,IAAI,4BAAY,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,CAAA;AACtC,CAAC,EACD,KAAK,EAAE,YAAY,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IACpC,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,CAAC;QAC1B,OAAM;IACR,CAAC;IAED,MAAM,WAAW,GAAG,SAAS,CAAC,OAAO,CAAsB,eAAO,CAAC,KAAK,CAAC,CAAA;IAEzE,MAAM,WAAW,CAAC,aAAa,CAAC,YAAY,CAAC,CAAA;AAC/C,CAAC,CACF,CAAA"}
@@ -1,4 +0,0 @@
1
- export * from "./create-stores";
2
- export * from "./delete-stores";
3
- export * from "./update-stores";
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/store/steps/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA"}
@@ -1,20 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./create-stores"), exports);
18
- __exportStar(require("./delete-stores"), exports);
19
- __exportStar(require("./update-stores"), exports);
20
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/store/steps/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA+B;AAC/B,kDAA+B;AAC/B,kDAA+B"}
@@ -1,30 +0,0 @@
1
- import { FilterableStoreProps, UpdateStoreDTO } from "@acmekit/framework/types";
2
- /**
3
- * The data to update in a store.
4
- */
5
- export type UpdateStoresStepInput = {
6
- /**
7
- * The filters to select the stores to update.
8
- */
9
- selector: FilterableStoreProps;
10
- /**
11
- * The data to update in the stores.
12
- */
13
- update: UpdateStoreDTO;
14
- };
15
- export declare const updateStoresStepId = "update-stores";
16
- /**
17
- * This step updates stores matching the specified filters.
18
- *
19
- * @example
20
- * const data = updateStoresStep({
21
- * selector: {
22
- * id: "store_123"
23
- * },
24
- * update: {
25
- * name: "Acme"
26
- * }
27
- * })
28
- */
29
- export declare const updateStoresStep: import("@acmekit/framework/workflows-sdk").StepFunction<UpdateStoresStepInput, import("@acmekit/framework/types").StoreDTO[]>;
30
- //# sourceMappingURL=update-stores.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update-stores.d.ts","sourceRoot":"","sources":["../../../src/store/steps/update-stores.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EAEpB,cAAc,EACf,MAAM,0BAA0B,CAAA;AAOjC;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,QAAQ,EAAE,oBAAoB,CAAA;IAC9B;;OAEG;IACH,MAAM,EAAE,cAAc,CAAA;CACvB,CAAA;AAED,eAAO,MAAM,kBAAkB,kBAAkB,CAAA;AACjD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB,+HA+B5B,CAAA"}
@@ -1,41 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updateStoresStep = exports.updateStoresStepId = void 0;
4
- const utils_1 = require("@acmekit/framework/utils");
5
- const workflows_sdk_1 = require("@acmekit/framework/workflows-sdk");
6
- exports.updateStoresStepId = "update-stores";
7
- /**
8
- * This step updates stores matching the specified filters.
9
- *
10
- * @example
11
- * const data = updateStoresStep({
12
- * selector: {
13
- * id: "store_123"
14
- * },
15
- * update: {
16
- * name: "Acme"
17
- * }
18
- * })
19
- */
20
- exports.updateStoresStep = (0, workflows_sdk_1.createStep)(exports.updateStoresStepId, async (data, { container }) => {
21
- const service = container.resolve(utils_1.Modules.STORE);
22
- const { selects, relations } = (0, utils_1.getSelectsAndRelationsFromObjectArray)([
23
- data.update,
24
- ]);
25
- const prevData = await service.listStores(data.selector, {
26
- select: selects,
27
- relations,
28
- });
29
- const stores = await service.updateStores(data.selector, data.update);
30
- return new workflows_sdk_1.StepResponse(stores, prevData);
31
- }, async (prevData, { container }) => {
32
- if (!prevData?.length) {
33
- return;
34
- }
35
- const service = container.resolve(utils_1.Modules.STORE);
36
- await service.upsertStores(prevData.map((r) => ({
37
- ...r,
38
- metadata: r.metadata || undefined,
39
- })));
40
- });
41
- //# sourceMappingURL=update-stores.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update-stores.js","sourceRoot":"","sources":["../../../src/store/steps/update-stores.ts"],"names":[],"mappings":";;;AAKA,oDAGiC;AACjC,oEAA2E;AAgB9D,QAAA,kBAAkB,GAAG,eAAe,CAAA;AACjD;;;;;;;;;;;;GAYG;AACU,QAAA,gBAAgB,GAAG,IAAA,0BAAU,EACxC,0BAAkB,EAClB,KAAK,EAAE,IAA2B,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IACnD,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAsB,eAAO,CAAC,KAAK,CAAC,CAAA;IAErE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,IAAA,6CAAqC,EAAC;QACnE,IAAI,CAAC,MAAM;KACZ,CAAC,CAAA;IAEF,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE;QACvD,MAAM,EAAE,OAAO;QACf,SAAS;KACV,CAAC,CAAA;IAEF,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;IACrE,OAAO,IAAI,4BAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;AAC3C,CAAC,EACD,KAAK,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IAChC,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;QACtB,OAAM;IACR,CAAC;IAED,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAsB,eAAO,CAAC,KAAK,CAAC,CAAA;IAErE,MAAM,OAAO,CAAC,YAAY,CACxB,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACnB,GAAG,CAAC;QACJ,QAAQ,EAAE,CAAC,CAAC,QAAQ,IAAI,SAAS;KAClC,CAAC,CAAC,CACJ,CAAA;AACH,CAAC,CACF,CAAA"}
@@ -1,53 +0,0 @@
1
- import type { StoreDTO } from "@acmekit/framework/types";
2
- /**
3
- * The data to create stores.
4
- */
5
- export type CreateStoresWorkflowInput = {
6
- /**
7
- * The stores to create.
8
- */
9
- stores: Array<{
10
- name?: string;
11
- supported_currencies?: Array<{
12
- currency_code: string;
13
- is_default?: boolean;
14
- }>;
15
- supported_locales?: Array<{
16
- locale_code: string;
17
- }>;
18
- }>;
19
- };
20
- /**
21
- * The created stores.
22
- */
23
- export type CreateStoresWorkflowOutput = StoreDTO[];
24
- export declare const createStoresWorkflowId = "create-stores";
25
- /**
26
- * This workflow creates one or more stores. By default, AcmeKit uses a single store. This is useful
27
- * if you're building a multi-tenant application or a marketplace where each tenant has its own store.
28
- *
29
- * You can use this workflow within your customizations or your own custom workflows, allowing you to
30
- * create stores within your custom flows.
31
- *
32
- * @example
33
- * const { result } = await createStoresWorkflow(container)
34
- * .run({
35
- * input: {
36
- * stores: [
37
- * {
38
- * name: "Acme",
39
- * supported_currencies: [{
40
- * currency_code: "usd",
41
- * is_default: true
42
- * }]
43
- * }
44
- * ]
45
- * }
46
- * })
47
- *
48
- * @summary
49
- *
50
- * Create one or more stores.
51
- */
52
- export declare const createStoresWorkflow: import("@acmekit/framework/workflows-sdk").ReturnWorkflow<CreateStoresWorkflowInput, CreateStoresWorkflowOutput, []>;
53
- //# sourceMappingURL=create-stores.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-stores.d.ts","sourceRoot":"","sources":["../../../src/store/workflows/create-stores.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AASxD;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,MAAM,EAAE,KAAK,CAAC;QACZ,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,oBAAoB,CAAC,EAAE,KAAK,CAAC;YAAE,aAAa,EAAE,MAAM,CAAC;YAAC,UAAU,CAAC,EAAE,OAAO,CAAA;SAAE,CAAC,CAAA;QAC7E,iBAAiB,CAAC,EAAE,KAAK,CAAC;YAAE,WAAW,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KACnD,CAAC,CAAA;CACH,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,QAAQ,EAAE,CAAA;AAEnD,eAAO,MAAM,sBAAsB,kBAAkB,CAAA;AACrD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,oBAAoB,sHAsBhC,CAAA"}
@@ -1,51 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createStoresWorkflow = exports.createStoresWorkflowId = void 0;
4
- const workflows_sdk_1 = require("@acmekit/framework/workflows-sdk");
5
- const steps_1 = require("../steps");
6
- exports.createStoresWorkflowId = "create-stores";
7
- /**
8
- * This workflow creates one or more stores. By default, AcmeKit uses a single store. This is useful
9
- * if you're building a multi-tenant application or a marketplace where each tenant has its own store.
10
- *
11
- * You can use this workflow within your customizations or your own custom workflows, allowing you to
12
- * create stores within your custom flows.
13
- *
14
- * @example
15
- * const { result } = await createStoresWorkflow(container)
16
- * .run({
17
- * input: {
18
- * stores: [
19
- * {
20
- * name: "Acme",
21
- * supported_currencies: [{
22
- * currency_code: "usd",
23
- * is_default: true
24
- * }]
25
- * }
26
- * ]
27
- * }
28
- * })
29
- *
30
- * @summary
31
- *
32
- * Create one or more stores.
33
- */
34
- exports.createStoresWorkflow = (0, workflows_sdk_1.createWorkflow)(exports.createStoresWorkflowId, (input) => {
35
- const normalizedInput = (0, workflows_sdk_1.transform)({ input }, (data) => {
36
- return data.input.stores.map((store) => {
37
- return {
38
- ...store,
39
- supported_currencies: store.supported_currencies?.map((currency) => {
40
- return {
41
- currency_code: currency.currency_code,
42
- is_default: currency.is_default,
43
- };
44
- }),
45
- };
46
- });
47
- });
48
- const stores = (0, steps_1.createStoresStep)(normalizedInput);
49
- return new workflows_sdk_1.WorkflowResponse(stores);
50
- });
51
- //# sourceMappingURL=create-stores.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-stores.js","sourceRoot":"","sources":["../../../src/store/workflows/create-stores.ts"],"names":[],"mappings":";;;AACA,oEAKyC;AACzC,oCAA2C;AAqB9B,QAAA,sBAAsB,GAAG,eAAe,CAAA;AACrD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACU,QAAA,oBAAoB,GAAG,IAAA,8BAAc,EAChD,8BAAsB,EACtB,CACE,KAA8C,EACA,EAAE;IAChD,MAAM,eAAe,GAAG,IAAA,yBAAS,EAAC,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE;QACpD,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;YACrC,OAAO;gBACL,GAAG,KAAK;gBACR,oBAAoB,EAAE,KAAK,CAAC,oBAAoB,EAAE,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE;oBACjE,OAAO;wBACL,aAAa,EAAE,QAAQ,CAAC,aAAa;wBACrC,UAAU,EAAE,QAAQ,CAAC,UAAU;qBAChC,CAAA;gBACH,CAAC,CAAC;aACH,CAAA;QACH,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,MAAM,MAAM,GAAG,IAAA,wBAAgB,EAAC,eAAe,CAAC,CAAA;IAChD,OAAO,IAAI,gCAAgB,CAAC,MAAM,CAAC,CAAA;AACrC,CAAC,CACF,CAAA"}
@@ -1,38 +0,0 @@
1
- /**
2
- * The data to delete stores.
3
- */
4
- export type DeleteStoresWorkflowInput = {
5
- /**
6
- * The IDs of the stores to delete.
7
- */
8
- ids: string[];
9
- };
10
- export declare const deleteStoresWorkflowId = "delete-stores";
11
- /**
12
- * This workflow deletes one or more stores.
13
- *
14
- * :::note
15
- *
16
- * By default, AcmeKit uses a single store. This is useful
17
- * if you're building a multi-tenant application or a marketplace where each tenant has its own store.
18
- * If you delete the only store in your application, the AcmeKit application will re-create it on application start-up.
19
- *
20
- * :::
21
- *
22
- * You can use this workflow within your customizations or your own custom workflows, allowing you to
23
- * delete stores within your custom flows.
24
- *
25
- * @example
26
- * const { result } = await deleteStoresWorkflow(container)
27
- * .run({
28
- * input: {
29
- * ids: ["store_123"]
30
- * }
31
- * })
32
- *
33
- * @summary
34
- *
35
- * Delete one or more stores.
36
- */
37
- export declare const deleteStoresWorkflow: import("@acmekit/framework/workflows-sdk").ReturnWorkflow<DeleteStoresWorkflowInput, unknown, any[]>;
38
- //# sourceMappingURL=delete-stores.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"delete-stores.d.ts","sourceRoot":"","sources":["../../../src/store/workflows/delete-stores.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,GAAG,EAAE,MAAM,EAAE,CAAA;CACd,CAAA;AAED,eAAO,MAAM,sBAAsB,kBAAkB,CAAA;AACrD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,oBAAoB,sGAahC,CAAA"}