@medusajs/loyalty-plugin 2.22.5 → 2.22.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. package/.medusa/server/src/admin/index.js +47460 -0
  2. package/.medusa/server/src/admin/index.mjs +47442 -0
  3. package/.medusa/server/src/api/admin/gift-cards/[id]/orders/route.d.ts +2 -0
  4. package/.medusa/server/src/api/admin/gift-cards/[id]/orders/route.js +28 -0
  5. package/.medusa/server/src/api/admin/gift-cards/[id]/route.d.ts +4 -0
  6. package/.medusa/server/src/api/admin/gift-cards/[id]/route.js +41 -0
  7. package/.medusa/server/src/api/admin/gift-cards/middlewares.d.ts +2 -0
  8. package/.medusa/server/src/api/admin/gift-cards/middlewares.js +82 -0
  9. package/.medusa/server/src/api/admin/gift-cards/query-config.d.ts +14 -0
  10. package/.medusa/server/src/api/admin/gift-cards/query-config.js +32 -0
  11. package/.medusa/server/src/api/admin/gift-cards/route.d.ts +4 -0
  12. package/.medusa/server/src/api/admin/gift-cards/route.js +42 -0
  13. package/.medusa/server/src/api/admin/gift-cards/validators.d.ts +139 -0
  14. package/.medusa/server/src/api/admin/gift-cards/validators.js +56 -0
  15. package/.medusa/server/src/api/admin/store-credit-accounts/[id]/credit/route.d.ts +3 -0
  16. package/.medusa/server/src/api/admin/store-credit-accounts/[id]/credit/route.js +30 -0
  17. package/.medusa/server/src/api/admin/store-credit-accounts/[id]/debit/route.d.ts +3 -0
  18. package/.medusa/server/src/api/admin/store-credit-accounts/[id]/debit/route.js +30 -0
  19. package/.medusa/server/src/api/admin/store-credit-accounts/[id]/route.d.ts +3 -0
  20. package/.medusa/server/src/api/admin/store-credit-accounts/[id]/route.js +19 -0
  21. package/.medusa/server/src/api/admin/store-credit-accounts/[id]/transactions/route.d.ts +3 -0
  22. package/.medusa/server/src/api/admin/store-credit-accounts/[id]/transactions/route.js +23 -0
  23. package/.medusa/server/src/api/admin/store-credit-accounts/middlewares.d.ts +2 -0
  24. package/.medusa/server/src/api/admin/store-credit-accounts/middlewares.js +92 -0
  25. package/.medusa/server/src/api/admin/store-credit-accounts/query-config.d.ts +18 -0
  26. package/.medusa/server/src/api/admin/store-credit-accounts/query-config.js +44 -0
  27. package/.medusa/server/src/api/admin/store-credit-accounts/route.d.ts +4 -0
  28. package/.medusa/server/src/api/admin/store-credit-accounts/route.js +52 -0
  29. package/.medusa/server/src/api/admin/store-credit-accounts/validators.d.ts +147 -0
  30. package/.medusa/server/src/api/admin/store-credit-accounts/validators.js +49 -0
  31. package/.medusa/server/src/api/middlewares.d.ts +2 -0
  32. package/.medusa/server/src/api/middlewares.js +25 -0
  33. package/.medusa/server/src/api/store/carts/[id]/gift-cards/route.d.ts +5 -0
  34. package/.medusa/server/src/api/store/carts/[id]/gift-cards/route.js +43 -0
  35. package/.medusa/server/src/api/store/carts/[id]/store-credits/route.d.ts +4 -0
  36. package/.medusa/server/src/api/store/carts/[id]/store-credits/route.js +25 -0
  37. package/.medusa/server/src/api/store/carts/middlewares.d.ts +2 -0
  38. package/.medusa/server/src/api/store/carts/middlewares.js +35 -0
  39. package/.medusa/server/src/api/store/carts/query-config.d.ts +5 -0
  40. package/.medusa/server/src/api/store/carts/query-config.js +14 -0
  41. package/.medusa/server/src/api/store/carts/validators.d.ts +13 -0
  42. package/.medusa/server/src/api/store/carts/validators.js +14 -0
  43. package/.medusa/server/src/api/store/gift-cards/[idOrCode]/route.d.ts +3 -0
  44. package/.medusa/server/src/api/store/gift-cards/[idOrCode]/route.js +24 -0
  45. package/.medusa/server/src/api/store/gift-cards/middlewares.d.ts +2 -0
  46. package/.medusa/server/src/api/store/gift-cards/middlewares.js +16 -0
  47. package/.medusa/server/src/api/store/gift-cards/query-config.d.ts +14 -0
  48. package/.medusa/server/src/api/store/gift-cards/query-config.js +73 -0
  49. package/.medusa/server/src/api/store/gift-cards/validators.d.ts +7 -0
  50. package/.medusa/server/src/api/store/gift-cards/validators.js +8 -0
  51. package/.medusa/server/src/api/store/store-credit-accounts/[id]/route.d.ts +3 -0
  52. package/.medusa/server/src/api/store/store-credit-accounts/[id]/route.js +31 -0
  53. package/.medusa/server/src/api/store/store-credit-accounts/claim/route.d.ts +3 -0
  54. package/.medusa/server/src/api/store/store-credit-accounts/claim/route.js +25 -0
  55. package/.medusa/server/src/api/store/store-credit-accounts/middlewares.d.ts +2 -0
  56. package/.medusa/server/src/api/store/store-credit-accounts/middlewares.js +36 -0
  57. package/.medusa/server/src/api/store/store-credit-accounts/query-config.d.ts +14 -0
  58. package/.medusa/server/src/api/store/store-credit-accounts/query-config.js +51 -0
  59. package/.medusa/server/src/api/store/store-credit-accounts/route.d.ts +3 -0
  60. package/.medusa/server/src/api/store/store-credit-accounts/route.js +40 -0
  61. package/.medusa/server/src/api/store/store-credit-accounts/validators.d.ts +44 -0
  62. package/.medusa/server/src/api/store/store-credit-accounts/validators.js +19 -0
  63. package/.medusa/server/src/links/cart-gift-cards-link.d.ts +2 -0
  64. package/.medusa/server/src/links/cart-gift-cards-link.js +13 -0
  65. package/.medusa/server/src/links/customer-store-credit-account-link.d.ts +1 -0
  66. package/.medusa/server/src/links/customer-store-credit-account-link.js +13 -0
  67. package/.medusa/server/src/links/gift-card-store-credit.d.ts +2 -0
  68. package/.medusa/server/src/links/gift-card-store-credit.js +10 -0
  69. package/.medusa/server/src/links/order-gift-cards-link.d.ts +2 -0
  70. package/.medusa/server/src/links/order-gift-cards-link.js +13 -0
  71. package/.medusa/server/src/links/order-line-item-gift-card-link.d.ts +1 -0
  72. package/.medusa/server/src/links/order-line-item-gift-card-link.js +19 -0
  73. package/.medusa/server/src/migration-scripts/create-loyalty-rbac-policies.d.ts +6 -0
  74. package/.medusa/server/src/migration-scripts/create-loyalty-rbac-policies.js +30 -0
  75. package/.medusa/server/src/modules/loyalty/index.d.ts +21 -0
  76. package/.medusa/server/src/modules/loyalty/index.js +12 -0
  77. package/.medusa/server/src/modules/loyalty/migrations/Migration20250123130553.d.ts +5 -0
  78. package/.medusa/server/src/modules/loyalty/migrations/Migration20250123130553.js +17 -0
  79. package/.medusa/server/src/modules/loyalty/migrations/Migration20250127174331.d.ts +5 -0
  80. package/.medusa/server/src/modules/loyalty/migrations/Migration20250127174331.js +19 -0
  81. package/.medusa/server/src/modules/loyalty/migrations/Migration20250206141026.d.ts +5 -0
  82. package/.medusa/server/src/modules/loyalty/migrations/Migration20250206141026.js +19 -0
  83. package/.medusa/server/src/modules/loyalty/migrations/Migration20250206141429.d.ts +5 -0
  84. package/.medusa/server/src/modules/loyalty/migrations/Migration20250206141429.js +14 -0
  85. package/.medusa/server/src/modules/loyalty/migrations/Migration20250206144714.d.ts +5 -0
  86. package/.medusa/server/src/modules/loyalty/migrations/Migration20250206144714.js +14 -0
  87. package/.medusa/server/src/modules/loyalty/migrations/Migration20250326095923.d.ts +5 -0
  88. package/.medusa/server/src/modules/loyalty/migrations/Migration20250326095923.js +16 -0
  89. package/.medusa/server/src/modules/loyalty/migrations/Migration20250617080328.d.ts +5 -0
  90. package/.medusa/server/src/modules/loyalty/migrations/Migration20250617080328.js +20 -0
  91. package/.medusa/server/src/modules/loyalty/models/gift-card.d.ts +18 -0
  92. package/.medusa/server/src/modules/loyalty/models/gift-card.js +18 -0
  93. package/.medusa/server/src/modules/loyalty/models/index.d.ts +1 -0
  94. package/.medusa/server/src/modules/loyalty/models/index.js +9 -0
  95. package/.medusa/server/src/modules/loyalty/service.d.ts +25 -0
  96. package/.medusa/server/src/modules/loyalty/service.js +20 -0
  97. package/.medusa/server/src/modules/store-credit/index.d.ts +5 -0
  98. package/.medusa/server/src/modules/store-credit/index.js +12 -0
  99. package/.medusa/server/src/modules/store-credit/migrations/Migration20250129115518.d.ts +5 -0
  100. package/.medusa/server/src/modules/store-credit/migrations/Migration20250129115518.js +16 -0
  101. package/.medusa/server/src/modules/store-credit/migrations/Migration20250130213237.d.ts +5 -0
  102. package/.medusa/server/src/modules/store-credit/migrations/Migration20250130213237.js +18 -0
  103. package/.medusa/server/src/modules/store-credit/migrations/Migration20250130220640.d.ts +5 -0
  104. package/.medusa/server/src/modules/store-credit/migrations/Migration20250130220640.js +19 -0
  105. package/.medusa/server/src/modules/store-credit/migrations/Migration20250131205753.d.ts +5 -0
  106. package/.medusa/server/src/modules/store-credit/migrations/Migration20250131205753.js +14 -0
  107. package/.medusa/server/src/modules/store-credit/migrations/Migration20250520081315.d.ts +5 -0
  108. package/.medusa/server/src/modules/store-credit/migrations/Migration20250520081315.js +16 -0
  109. package/.medusa/server/src/modules/store-credit/migrations/Migration20250626081315.d.ts +5 -0
  110. package/.medusa/server/src/modules/store-credit/migrations/Migration20250626081315.js +16 -0
  111. package/.medusa/server/src/modules/store-credit/migrations/Migration20250722080351.d.ts +5 -0
  112. package/.medusa/server/src/modules/store-credit/migrations/Migration20250722080351.js +27 -0
  113. package/.medusa/server/src/modules/store-credit/models/account-transaction.d.ts +28 -0
  114. package/.medusa/server/src/modules/store-credit/models/account-transaction.js +21 -0
  115. package/.medusa/server/src/modules/store-credit/models/index.d.ts +2 -0
  116. package/.medusa/server/src/modules/store-credit/models/index.js +11 -0
  117. package/.medusa/server/src/modules/store-credit/models/store-credit-account.d.ts +27 -0
  118. package/.medusa/server/src/modules/store-credit/models/store-credit-account.js +27 -0
  119. package/.medusa/server/src/modules/store-credit/service.d.ts +56 -0
  120. package/.medusa/server/src/modules/store-credit/service.js +322 -0
  121. package/.medusa/server/src/subscribers/create-gift-card.d.ts +5 -0
  122. package/.medusa/server/src/subscribers/create-gift-card.js +53 -0
  123. package/.medusa/server/src/types/cart/index.d.ts +12 -0
  124. package/.medusa/server/src/types/cart/index.js +3 -0
  125. package/.medusa/server/src/types/http/gift-card.d.ts +42 -0
  126. package/.medusa/server/src/types/http/gift-card.js +3 -0
  127. package/.medusa/server/src/types/http/index.d.ts +3 -0
  128. package/.medusa/server/src/types/http/index.js +20 -0
  129. package/.medusa/server/src/types/http/store-credit-account.d.ts +71 -0
  130. package/.medusa/server/src/types/http/store-credit-account.js +3 -0
  131. package/.medusa/server/src/types/http/transaction.d.ts +19 -0
  132. package/.medusa/server/src/types/http/transaction.js +3 -0
  133. package/.medusa/server/src/types/index.d.ts +5 -0
  134. package/.medusa/server/src/types/index.js +22 -0
  135. package/.medusa/server/src/types/loyalty/index.d.ts +3 -0
  136. package/.medusa/server/src/types/loyalty/index.js +20 -0
  137. package/.medusa/server/src/types/loyalty/module.d.ts +166 -0
  138. package/.medusa/server/src/types/loyalty/module.js +12 -0
  139. package/.medusa/server/src/types/loyalty/service.d.ts +169 -0
  140. package/.medusa/server/src/types/loyalty/service.js +3 -0
  141. package/.medusa/server/src/types/loyalty/workflows.d.ts +3 -0
  142. package/.medusa/server/src/types/loyalty/workflows.js +3 -0
  143. package/.medusa/server/src/types/modules.d.ts +6 -0
  144. package/.medusa/server/src/types/modules.js +12 -0
  145. package/.medusa/server/src/types/rbac.d.ts +7 -0
  146. package/.medusa/server/src/types/rbac.js +8 -0
  147. package/.medusa/server/src/types/store-credit/index.d.ts +2 -0
  148. package/.medusa/server/src/types/store-credit/index.js +19 -0
  149. package/.medusa/server/src/types/store-credit/module.d.ts +315 -0
  150. package/.medusa/server/src/types/store-credit/module.js +13 -0
  151. package/.medusa/server/src/types/store-credit/service.d.ts +325 -0
  152. package/.medusa/server/src/types/store-credit/service.js +3 -0
  153. package/.medusa/server/src/utils/__tests__/code-generator.spec.d.ts +1 -0
  154. package/.medusa/server/src/utils/__tests__/code-generator.spec.js +30 -0
  155. package/.medusa/server/src/utils/__tests__/gift-card.spec.d.ts +1 -0
  156. package/.medusa/server/src/utils/__tests__/gift-card.spec.js +23 -0
  157. package/.medusa/server/src/utils/code-generator.d.ts +1 -0
  158. package/.medusa/server/src/utils/code-generator.js +30 -0
  159. package/.medusa/server/src/utils/gift-card.d.ts +17 -0
  160. package/.medusa/server/src/utils/gift-card.js +25 -0
  161. package/.medusa/server/src/workflows/carts/index.d.ts +5 -0
  162. package/.medusa/server/src/workflows/carts/index.js +22 -0
  163. package/.medusa/server/src/workflows/carts/steps/validate-gift-card-balances.d.ts +37 -0
  164. package/.medusa/server/src/workflows/carts/steps/validate-gift-card-balances.js +36 -0
  165. package/.medusa/server/src/workflows/carts/workflows/__tests__/validate-gift-card-expiry.spec.d.ts +1 -0
  166. package/.medusa/server/src/workflows/carts/workflows/__tests__/validate-gift-card-expiry.spec.js +94 -0
  167. package/.medusa/server/src/workflows/carts/workflows/add-gift-card-to-cart.d.ts +136 -0
  168. package/.medusa/server/src/workflows/carts/workflows/add-gift-card-to-cart.js +204 -0
  169. package/.medusa/server/src/workflows/carts/workflows/add-store-credits-to-cart.d.ts +136 -0
  170. package/.medusa/server/src/workflows/carts/workflows/add-store-credits-to-cart.js +161 -0
  171. package/.medusa/server/src/workflows/carts/workflows/confirm-cart-credit-lines.d.ts +94 -0
  172. package/.medusa/server/src/workflows/carts/workflows/confirm-cart-credit-lines.js +139 -0
  173. package/.medusa/server/src/workflows/carts/workflows/refresh-cart-gift-cards.d.ts +30 -0
  174. package/.medusa/server/src/workflows/carts/workflows/refresh-cart-gift-cards.js +158 -0
  175. package/.medusa/server/src/workflows/carts/workflows/remove-gift-cart-from-cart.d.ts +103 -0
  176. package/.medusa/server/src/workflows/carts/workflows/remove-gift-cart-from-cart.js +124 -0
  177. package/.medusa/server/src/workflows/common/steps/validate-presence-of.d.ts +29 -0
  178. package/.medusa/server/src/workflows/common/steps/validate-presence-of.js +22 -0
  179. package/.medusa/server/src/workflows/gift-cards/index.d.ts +9 -0
  180. package/.medusa/server/src/workflows/gift-cards/index.js +26 -0
  181. package/.medusa/server/src/workflows/gift-cards/steps/create-gift-cards.d.ts +20 -0
  182. package/.medusa/server/src/workflows/gift-cards/steps/create-gift-cards.js +39 -0
  183. package/.medusa/server/src/workflows/gift-cards/steps/delete-gift-cards.d.ts +17 -0
  184. package/.medusa/server/src/workflows/gift-cards/steps/delete-gift-cards.js +24 -0
  185. package/.medusa/server/src/workflows/gift-cards/steps/retrieve-gift-card-balance.d.ts +32 -0
  186. package/.medusa/server/src/workflows/gift-cards/steps/retrieve-gift-card-balance.js +34 -0
  187. package/.medusa/server/src/workflows/gift-cards/steps/update-gift-cards.d.ts +19 -0
  188. package/.medusa/server/src/workflows/gift-cards/steps/update-gift-cards.js +41 -0
  189. package/.medusa/server/src/workflows/gift-cards/workflows/claim-gift-card.d.ts +65 -0
  190. package/.medusa/server/src/workflows/gift-cards/workflows/claim-gift-card.js +101 -0
  191. package/.medusa/server/src/workflows/gift-cards/workflows/create-gift-cards.d.ts +36 -0
  192. package/.medusa/server/src/workflows/gift-cards/workflows/create-gift-cards.js +88 -0
  193. package/.medusa/server/src/workflows/gift-cards/workflows/delete-gift-card.d.ts +28 -0
  194. package/.medusa/server/src/workflows/gift-cards/workflows/delete-gift-card.js +34 -0
  195. package/.medusa/server/src/workflows/gift-cards/workflows/redeem-gift-card.d.ts +60 -0
  196. package/.medusa/server/src/workflows/gift-cards/workflows/redeem-gift-card.js +129 -0
  197. package/.medusa/server/src/workflows/gift-cards/workflows/update-gift-cards.d.ts +28 -0
  198. package/.medusa/server/src/workflows/gift-cards/workflows/update-gift-cards.js +31 -0
  199. package/.medusa/server/src/workflows/hooks/after-order-created.d.ts +1 -0
  200. package/.medusa/server/src/workflows/hooks/after-order-created.js +30 -0
  201. package/.medusa/server/src/workflows/hooks/after-order-credit-lines-created.d.ts +1 -0
  202. package/.medusa/server/src/workflows/hooks/after-order-credit-lines-created.js +31 -0
  203. package/.medusa/server/src/workflows/hooks/before-payment-collection-refresh.d.ts +1 -0
  204. package/.medusa/server/src/workflows/hooks/before-payment-collection-refresh.js +26 -0
  205. package/.medusa/server/src/workflows/hooks/complete-cart-before-payment-authorization.d.ts +1 -0
  206. package/.medusa/server/src/workflows/hooks/complete-cart-before-payment-authorization.js +27 -0
  207. package/.medusa/server/src/workflows/index.d.ts +3 -0
  208. package/.medusa/server/src/workflows/index.js +20 -0
  209. package/.medusa/server/src/workflows/orders/index.d.ts +2 -0
  210. package/.medusa/server/src/workflows/orders/index.js +19 -0
  211. package/.medusa/server/src/workflows/orders/workflows/link-gift-cards-to-order.d.ts +34 -0
  212. package/.medusa/server/src/workflows/orders/workflows/link-gift-cards-to-order.js +75 -0
  213. package/.medusa/server/src/workflows/orders/workflows/refund-credit-lines.d.ts +88 -0
  214. package/.medusa/server/src/workflows/orders/workflows/refund-credit-lines.js +131 -0
  215. package/.medusa/server/src/workflows/store-credit/index.d.ts +9 -0
  216. package/.medusa/server/src/workflows/store-credit/index.js +26 -0
  217. package/.medusa/server/src/workflows/store-credit/steps/create-store-credit-accounts.d.ts +19 -0
  218. package/.medusa/server/src/workflows/store-credit/steps/create-store-credit-accounts.js +37 -0
  219. package/.medusa/server/src/workflows/store-credit/steps/credit-account.d.ts +20 -0
  220. package/.medusa/server/src/workflows/store-credit/steps/credit-account.js +31 -0
  221. package/.medusa/server/src/workflows/store-credit/steps/debit-account.d.ts +20 -0
  222. package/.medusa/server/src/workflows/store-credit/steps/debit-account.js +31 -0
  223. package/.medusa/server/src/workflows/store-credit/workflows/claim-store-credit-account.d.ts +91 -0
  224. package/.medusa/server/src/workflows/store-credit/workflows/claim-store-credit-account.js +170 -0
  225. package/.medusa/server/src/workflows/store-credit/workflows/create-store-credit-accounts.d.ts +50 -0
  226. package/.medusa/server/src/workflows/store-credit/workflows/create-store-credit-accounts.js +50 -0
  227. package/.medusa/server/src/workflows/store-credit/workflows/credit-accounts.d.ts +29 -0
  228. package/.medusa/server/src/workflows/store-credit/workflows/credit-accounts.js +32 -0
  229. package/.medusa/server/src/workflows/store-credit/workflows/credit-store-credit-account.d.ts +29 -0
  230. package/.medusa/server/src/workflows/store-credit/workflows/credit-store-credit-account.js +55 -0
  231. package/.medusa/server/src/workflows/store-credit/workflows/debit-accounts.d.ts +29 -0
  232. package/.medusa/server/src/workflows/store-credit/workflows/debit-accounts.js +32 -0
  233. package/.medusa/server/src/workflows/store-credit/workflows/debit-store-credit-account.d.ts +30 -0
  234. package/.medusa/server/src/workflows/store-credit/workflows/debit-store-credit-account.js +56 -0
  235. package/.medusa/server/tailwind.config.d.ts +3 -0
  236. package/.medusa/server/tailwind.config.js +12 -0
  237. package/package.json +21 -21
  238. package/CHANGELOG.md +0 -432
@@ -0,0 +1,50 @@
1
+ import { ModuleCreateStoreCreditAccount } from "../../../types/store-credit";
2
+ /**
3
+ * This step validates the input for creating store credit accounts. It throws an
4
+ * error if no input is provided or if any entry is missing a currency code.
5
+ *
6
+ * @example
7
+ * const data = validateStoreCreditAccountInputStep([
8
+ * { customer_id: "cust_123", currency_code: "usd" },
9
+ * ])
10
+ */
11
+ export declare const validateStoreCreditAccountInputStep: import("@medusajs/framework/workflows-sdk").StepFunction<ModuleCreateStoreCreditAccount[], unknown>;
12
+ /**
13
+ * Data for creating a store credit account for a customer.
14
+ */
15
+ export type CreateStoreCreditAccountsWorkflowInput = {
16
+ /**
17
+ * An optional code for the store credit account. If not provided, one is auto-generated.
18
+ */
19
+ code?: string;
20
+ /**
21
+ * The ID of the customer who owns the store credit account.
22
+ */
23
+ customer_id: string;
24
+ /**
25
+ * The currency of the store credit account.
26
+ */
27
+ currency_code: string;
28
+ }[];
29
+ /**
30
+ * This workflow creates one or more store credit accounts after validating the input.
31
+ *
32
+ * You can use this workflow within your own customizations or custom workflows,
33
+ * allowing you to wrap custom logic around store credit account creation.
34
+ *
35
+ * @example
36
+ * const { result } = await createStoreCreditAccountsWorkflow(container)
37
+ * .run({
38
+ * input: [
39
+ * {
40
+ * customer_id: "cust_123",
41
+ * currency_code: "usd",
42
+ * },
43
+ * ],
44
+ * })
45
+ *
46
+ * @summary
47
+ *
48
+ * Create store credit accounts.
49
+ */
50
+ export declare const createStoreCreditAccountsWorkflow: import("@medusajs/framework/workflows-sdk").ReturnWorkflow<CreateStoreCreditAccountsWorkflowInput, import("../../../types/store-credit").ModuleStoreCreditAccount[], []>;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createStoreCreditAccountsWorkflow = exports.validateStoreCreditAccountInputStep = void 0;
4
+ const utils_1 = require("@medusajs/framework/utils");
5
+ const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
6
+ const create_store_credit_accounts_1 = require("../steps/create-store-credit-accounts");
7
+ /**
8
+ * This step validates the input for creating store credit accounts. It throws an
9
+ * error if no input is provided or if any entry is missing a currency code.
10
+ *
11
+ * @example
12
+ * const data = validateStoreCreditAccountInputStep([
13
+ * { customer_id: "cust_123", currency_code: "usd" },
14
+ * ])
15
+ */
16
+ exports.validateStoreCreditAccountInputStep = (0, workflows_sdk_1.createStep)("validate-store-credit-account-input", async function (input) {
17
+ if (input.length === 0) {
18
+ throw new utils_1.MedusaError(utils_1.MedusaError.Types.INVALID_DATA, "No input provided");
19
+ }
20
+ if (input.some((i) => !(0, utils_1.isPresent)(i.currency_code))) {
21
+ throw new utils_1.MedusaError(utils_1.MedusaError.Types.INVALID_DATA, "Currency code is required to create a store credit account");
22
+ }
23
+ });
24
+ /**
25
+ * This workflow creates one or more store credit accounts after validating the input.
26
+ *
27
+ * You can use this workflow within your own customizations or custom workflows,
28
+ * allowing you to wrap custom logic around store credit account creation.
29
+ *
30
+ * @example
31
+ * const { result } = await createStoreCreditAccountsWorkflow(container)
32
+ * .run({
33
+ * input: [
34
+ * {
35
+ * customer_id: "cust_123",
36
+ * currency_code: "usd",
37
+ * },
38
+ * ],
39
+ * })
40
+ *
41
+ * @summary
42
+ *
43
+ * Create store credit accounts.
44
+ */
45
+ exports.createStoreCreditAccountsWorkflow = (0, workflows_sdk_1.createWorkflow)("create-store-credit-accounts", function (input) {
46
+ (0, exports.validateStoreCreditAccountInputStep)(input);
47
+ const createdStoreCreditAccounts = (0, create_store_credit_accounts_1.createStoreCreditAccountsStep)(input);
48
+ return new workflows_sdk_1.WorkflowResponse(createdStoreCreditAccounts);
49
+ });
50
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlLXN0b3JlLWNyZWRpdC1hY2NvdW50cy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy93b3JrZmxvd3Mvc3RvcmUtY3JlZGl0L3dvcmtmbG93cy9jcmVhdGUtc3RvcmUtY3JlZGl0LWFjY291bnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHFEQUFtRTtBQUNuRSxxRUFJMkM7QUFFM0Msd0ZBQXNGO0FBRXRGOzs7Ozs7OztHQVFHO0FBQ1UsUUFBQSxtQ0FBbUMsR0FBRyxJQUFBLDBCQUFVLEVBQzNELHFDQUFxQyxFQUNyQyxLQUFLLFdBQVcsS0FBdUM7SUFDckQsSUFBSSxLQUFLLENBQUMsTUFBTSxLQUFLLENBQUMsRUFBRSxDQUFDO1FBQ3ZCLE1BQU0sSUFBSSxtQkFBVyxDQUNuQixtQkFBVyxDQUFDLEtBQUssQ0FBQyxZQUFZLEVBQzlCLG1CQUFtQixDQUNwQixDQUFDO0lBQ0osQ0FBQztJQUVELElBQUksS0FBSyxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsRUFBRSxFQUFFLENBQUMsQ0FBQyxJQUFBLGlCQUFTLEVBQUMsQ0FBQyxDQUFDLGFBQWEsQ0FBQyxDQUFDLEVBQUUsQ0FBQztRQUNuRCxNQUFNLElBQUksbUJBQVcsQ0FDbkIsbUJBQVcsQ0FBQyxLQUFLLENBQUMsWUFBWSxFQUM5Qiw0REFBNEQsQ0FDN0QsQ0FBQztJQUNKLENBQUM7QUFDSCxDQUFDLENBQ0YsQ0FBQztBQW9CRjs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7R0FvQkc7QUFDVSxRQUFBLGlDQUFpQyxHQUFHLElBQUEsOEJBQWMsRUFDN0QsOEJBQThCLEVBQzlCLFVBQVUsS0FBNkM7SUFDckQsSUFBQSwyQ0FBbUMsRUFBQyxLQUFLLENBQUMsQ0FBQztJQUUzQyxNQUFNLDBCQUEwQixHQUFHLElBQUEsNERBQTZCLEVBQUMsS0FBSyxDQUFDLENBQUM7SUFDeEUsT0FBTyxJQUFJLGdDQUFnQixDQUFDLDBCQUEwQixDQUFDLENBQUM7QUFDMUQsQ0FBQyxDQUNGLENBQUMifQ==
@@ -0,0 +1,29 @@
1
+ import { ModuleCreditAccount } from "../../../types/store-credit";
2
+ /**
3
+ * Data for crediting one or more store credit accounts.
4
+ */
5
+ export type CreditAccountsWorkflowInput = ModuleCreditAccount[];
6
+ /**
7
+ * This workflow credits one or more store credit accounts with transactions.
8
+ *
9
+ * You can use this workflow within your own customizations or custom workflows,
10
+ * allowing you to wrap custom logic around crediting store credit accounts.
11
+ *
12
+ * @example
13
+ * const { result } = await creditAccountsWorkflow(container)
14
+ * .run({
15
+ * input: [
16
+ * {
17
+ * account_id: "sca_123",
18
+ * amount: 100,
19
+ * reference: "gift_card",
20
+ * reference_id: "gc_123",
21
+ * },
22
+ * ],
23
+ * })
24
+ *
25
+ * @summary
26
+ *
27
+ * Credit one or more store credit accounts.
28
+ */
29
+ export declare const creditAccountsWorkflow: import("@medusajs/framework/workflows-sdk").ReturnWorkflow<CreditAccountsWorkflowInput, import("../../../types/store-credit").ModuleAccountTransaction[], []>;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.creditAccountsWorkflow = void 0;
4
+ const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
5
+ const credit_account_1 = require("../steps/credit-account");
6
+ /**
7
+ * This workflow credits one or more store credit accounts with transactions.
8
+ *
9
+ * You can use this workflow within your own customizations or custom workflows,
10
+ * allowing you to wrap custom logic around crediting store credit accounts.
11
+ *
12
+ * @example
13
+ * const { result } = await creditAccountsWorkflow(container)
14
+ * .run({
15
+ * input: [
16
+ * {
17
+ * account_id: "sca_123",
18
+ * amount: 100,
19
+ * reference: "gift_card",
20
+ * reference_id: "gc_123",
21
+ * },
22
+ * ],
23
+ * })
24
+ *
25
+ * @summary
26
+ *
27
+ * Credit one or more store credit accounts.
28
+ */
29
+ exports.creditAccountsWorkflow = (0, workflows_sdk_1.createWorkflow)("credit-accounts", function (input) {
30
+ return new workflows_sdk_1.WorkflowResponse((0, credit_account_1.creditAccountStep)(input));
31
+ });
32
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlZGl0LWFjY291bnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL3dvcmtmbG93cy9zdG9yZS1jcmVkaXQvd29ya2Zsb3dzL2NyZWRpdC1hY2NvdW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxxRUFBcUY7QUFFckYsNERBQTREO0FBTzVEOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0dBc0JHO0FBQ1UsUUFBQSxzQkFBc0IsR0FBRyxJQUFBLDhCQUFjLEVBQ2xELGlCQUFpQixFQUNqQixVQUFVLEtBQWtDO0lBQzFDLE9BQU8sSUFBSSxnQ0FBZ0IsQ0FBQyxJQUFBLGtDQUFpQixFQUFDLEtBQUssQ0FBQyxDQUFDLENBQUM7QUFDeEQsQ0FBQyxDQUNGLENBQUMifQ==
@@ -0,0 +1,29 @@
1
+ import { ModuleCreditStoreCreditAccount } from "../../../types/store-credit";
2
+ /**
3
+ * Input to credit a specific store credit account with an amount.
4
+ */
5
+ export type CreditStoreCreditAccountWorkflowInput = ModuleCreditStoreCreditAccount;
6
+ /**
7
+ * This workflow credits a specific store credit account with an amount. It validates
8
+ * that the amount is greater than zero and that the account exists before crediting.
9
+ *
10
+ * You can use this workflow within your own customizations or custom workflows,
11
+ * allowing you to wrap custom logic around crediting a store credit account.
12
+ *
13
+ * @example
14
+ * await creditStoreCreditAccountWorkflow(container)
15
+ * .run({
16
+ * input: {
17
+ * account_id: "sca_123",
18
+ * amount: 100,
19
+ * note: "Loyalty reward",
20
+ * reference: "order",
21
+ * reference_id: "order_123",
22
+ * },
23
+ * })
24
+ *
25
+ * @summary
26
+ *
27
+ * Credit a store credit account.
28
+ */
29
+ export declare const creditStoreCreditAccountWorkflow: import("@medusajs/framework/workflows-sdk").ReturnWorkflow<ModuleCreditStoreCreditAccount, unknown, any[]>;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.creditStoreCreditAccountWorkflow = void 0;
4
+ const utils_1 = require("@medusajs/framework/utils");
5
+ const core_flows_1 = require("@medusajs/medusa/core-flows");
6
+ const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
7
+ const credit_account_1 = require("../steps/credit-account");
8
+ const validateStoreCreditAccountInputStep = (0, workflows_sdk_1.createStep)("validate-store-credit-account-input", async function (input) {
9
+ if (input.amount <= 0) {
10
+ throw new utils_1.MedusaError(utils_1.MedusaError.Types.INVALID_DATA, "Amount must be greater than 0");
11
+ }
12
+ });
13
+ /**
14
+ * This workflow credits a specific store credit account with an amount. It validates
15
+ * that the amount is greater than zero and that the account exists before crediting.
16
+ *
17
+ * You can use this workflow within your own customizations or custom workflows,
18
+ * allowing you to wrap custom logic around crediting a store credit account.
19
+ *
20
+ * @example
21
+ * await creditStoreCreditAccountWorkflow(container)
22
+ * .run({
23
+ * input: {
24
+ * account_id: "sca_123",
25
+ * amount: 100,
26
+ * note: "Loyalty reward",
27
+ * reference: "order",
28
+ * reference_id: "order_123",
29
+ * },
30
+ * })
31
+ *
32
+ * @summary
33
+ *
34
+ * Credit a store credit account.
35
+ */
36
+ exports.creditStoreCreditAccountWorkflow = (0, workflows_sdk_1.createWorkflow)("credit-store-credit-account", function (input) {
37
+ validateStoreCreditAccountInputStep(input);
38
+ const storeCreditAccountData = (0, core_flows_1.useQueryGraphStep)({
39
+ entity: "store_credit_account",
40
+ fields: ["id", "code", "customer_id", "currency_code", "balance"],
41
+ filters: { id: input.account_id },
42
+ options: { throwIfKeyNotFound: true },
43
+ });
44
+ const creditData = (0, workflows_sdk_1.transform)({ storeCreditAccountData, input }, ({ storeCreditAccountData, input }) => {
45
+ return {
46
+ account_id: storeCreditAccountData.data[0].id,
47
+ amount: utils_1.MathBN.convert(input.amount),
48
+ note: input.note || "",
49
+ reference: input.reference || "",
50
+ reference_id: input.reference_id || "",
51
+ };
52
+ });
53
+ (0, credit_account_1.creditAccountStep)([creditData]);
54
+ });
55
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlZGl0LXN0b3JlLWNyZWRpdC1hY2NvdW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL3dvcmtmbG93cy9zdG9yZS1jcmVkaXQvd29ya2Zsb3dzL2NyZWRpdC1zdG9yZS1jcmVkaXQtYWNjb3VudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxxREFBZ0U7QUFDaEUsNERBQWdFO0FBQ2hFLHFFQUEwRjtBQUcxRiw0REFBNEQ7QUFPNUQsTUFBTSxtQ0FBbUMsR0FBRyxJQUFBLDBCQUFVLEVBQ3BELHFDQUFxQyxFQUNyQyxLQUFLLFdBQVcsS0FBcUM7SUFDbkQsSUFBSSxLQUFLLENBQUMsTUFBTSxJQUFJLENBQUMsRUFBRSxDQUFDO1FBQ3RCLE1BQU0sSUFBSSxtQkFBVyxDQUNuQixtQkFBVyxDQUFDLEtBQUssQ0FBQyxZQUFZLEVBQzlCLCtCQUErQixDQUNoQyxDQUFDO0lBQ0osQ0FBQztBQUNILENBQUMsQ0FDRixDQUFDO0FBRUY7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7R0FzQkc7QUFDVSxRQUFBLGdDQUFnQyxHQUFHLElBQUEsOEJBQWMsRUFDNUQsNkJBQTZCLEVBQzdCLFVBQVUsS0FBNEM7SUFDcEQsbUNBQW1DLENBQUMsS0FBSyxDQUFDLENBQUM7SUFFM0MsTUFBTSxzQkFBc0IsR0FBRyxJQUFBLDhCQUFpQixFQUFDO1FBQy9DLE1BQU0sRUFBRSxzQkFBc0I7UUFDOUIsTUFBTSxFQUFFLENBQUMsSUFBSSxFQUFFLE1BQU0sRUFBRSxhQUFhLEVBQUUsZUFBZSxFQUFFLFNBQVMsQ0FBQztRQUNqRSxPQUFPLEVBQUUsRUFBRSxFQUFFLEVBQUUsS0FBSyxDQUFDLFVBQVUsRUFBRTtRQUNqQyxPQUFPLEVBQUUsRUFBRSxrQkFBa0IsRUFBRSxJQUFJLEVBQUU7S0FDdEMsQ0FBQyxDQUFDO0lBRUgsTUFBTSxVQUFVLEdBQUcsSUFBQSx5QkFBUyxFQUMxQixFQUFFLHNCQUFzQixFQUFFLEtBQUssRUFBRSxFQUNqQyxDQUFDLEVBQUUsc0JBQXNCLEVBQUUsS0FBSyxFQUFFLEVBQUUsRUFBRTtRQUNwQyxPQUFPO1lBQ0wsVUFBVSxFQUFFLHNCQUFzQixDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsQ0FBQyxFQUFFO1lBQzdDLE1BQU0sRUFBRSxjQUFNLENBQUMsT0FBTyxDQUFDLEtBQUssQ0FBQyxNQUFNLENBQUM7WUFDcEMsSUFBSSxFQUFFLEtBQUssQ0FBQyxJQUFJLElBQUksRUFBRTtZQUN0QixTQUFTLEVBQUUsS0FBSyxDQUFDLFNBQVMsSUFBSSxFQUFFO1lBQ2hDLFlBQVksRUFBRSxLQUFLLENBQUMsWUFBWSxJQUFJLEVBQUU7U0FDdkMsQ0FBQztJQUNKLENBQUMsQ0FDRixDQUFDO0lBRUYsSUFBQSxrQ0FBaUIsRUFBQyxDQUFDLFVBQVUsQ0FBQyxDQUFDLENBQUM7QUFDbEMsQ0FBQyxDQUNGLENBQUMifQ==
@@ -0,0 +1,29 @@
1
+ import { ModuleDebitAccount } from "../../../types/store-credit";
2
+ /**
3
+ * Data for debiting one or more store credit accounts.
4
+ */
5
+ export type DebitAccountsWorkflowInput = ModuleDebitAccount[];
6
+ /**
7
+ * This workflow debits one or more store credit accounts by creating debit transactions.
8
+ *
9
+ * You can use this workflow within your own customizations or custom workflows,
10
+ * allowing you to wrap custom logic around debiting store credit accounts.
11
+ *
12
+ * @example
13
+ * const { result } = await debitAccountsWorkflow(container)
14
+ * .run({
15
+ * input: [
16
+ * {
17
+ * account_id: "sca_123",
18
+ * amount: 50,
19
+ * reference: "cart",
20
+ * reference_id: "cart_123",
21
+ * },
22
+ * ],
23
+ * })
24
+ *
25
+ * @summary
26
+ *
27
+ * Debit one or more store credit accounts.
28
+ */
29
+ export declare const debitAccountsWorkflow: import("@medusajs/framework/workflows-sdk").ReturnWorkflow<DebitAccountsWorkflowInput, import("../../../types/store-credit").ModuleAccountTransaction[], []>;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.debitAccountsWorkflow = void 0;
4
+ const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
5
+ const debit_account_1 = require("../steps/debit-account");
6
+ /**
7
+ * This workflow debits one or more store credit accounts by creating debit transactions.
8
+ *
9
+ * You can use this workflow within your own customizations or custom workflows,
10
+ * allowing you to wrap custom logic around debiting store credit accounts.
11
+ *
12
+ * @example
13
+ * const { result } = await debitAccountsWorkflow(container)
14
+ * .run({
15
+ * input: [
16
+ * {
17
+ * account_id: "sca_123",
18
+ * amount: 50,
19
+ * reference: "cart",
20
+ * reference_id: "cart_123",
21
+ * },
22
+ * ],
23
+ * })
24
+ *
25
+ * @summary
26
+ *
27
+ * Debit one or more store credit accounts.
28
+ */
29
+ exports.debitAccountsWorkflow = (0, workflows_sdk_1.createWorkflow)("debit-accounts", function (input) {
30
+ return new workflows_sdk_1.WorkflowResponse((0, debit_account_1.debitAccountStep)(input));
31
+ });
32
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGViaXQtYWNjb3VudHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvd29ya2Zsb3dzL3N0b3JlLWNyZWRpdC93b3JrZmxvd3MvZGViaXQtYWNjb3VudHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEscUVBQXFGO0FBRXJGLDBEQUEwRDtBQU8xRDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztHQXNCRztBQUNVLFFBQUEscUJBQXFCLEdBQUcsSUFBQSw4QkFBYyxFQUNqRCxnQkFBZ0IsRUFDaEIsVUFBVSxLQUFpQztJQUN6QyxPQUFPLElBQUksZ0NBQWdCLENBQUMsSUFBQSxnQ0FBZ0IsRUFBQyxLQUFLLENBQUMsQ0FBQyxDQUFDO0FBQ3ZELENBQUMsQ0FDRixDQUFDIn0=
@@ -0,0 +1,30 @@
1
+ import { ModuleDebitStoreCreditAccount } from "../../../types/store-credit";
2
+ /**
3
+ * Input to debit a specific store credit account by an amount.
4
+ */
5
+ export type DebitStoreCreditAccountWorkflowInput = ModuleDebitStoreCreditAccount;
6
+ /**
7
+ * This workflow debits a specific store credit account by an amount. It validates
8
+ * that the amount is greater than zero and that the account exists before debiting.
9
+ * The debit is rejected if the account's balance doesn't cover the amount.
10
+ *
11
+ * You can use this workflow within your own customizations or custom workflows,
12
+ * allowing you to wrap custom logic around debiting a store credit account.
13
+ *
14
+ * @example
15
+ * await debitStoreCreditAccountWorkflow(container)
16
+ * .run({
17
+ * input: {
18
+ * account_id: "sca_123",
19
+ * amount: 100,
20
+ * note: "Credit issued by mistake",
21
+ * reference: "user",
22
+ * reference_id: "user_123",
23
+ * },
24
+ * })
25
+ *
26
+ * @summary
27
+ *
28
+ * Debit a store credit account.
29
+ */
30
+ export declare const debitStoreCreditAccountWorkflow: import("@medusajs/framework/workflows-sdk").ReturnWorkflow<ModuleDebitStoreCreditAccount, unknown, any[]>;
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.debitStoreCreditAccountWorkflow = void 0;
4
+ const utils_1 = require("@medusajs/framework/utils");
5
+ const core_flows_1 = require("@medusajs/medusa/core-flows");
6
+ const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
7
+ const debit_account_1 = require("../steps/debit-account");
8
+ const validateDebitStoreCreditAccountInputStep = (0, workflows_sdk_1.createStep)("validate-debit-store-credit-account-input", async function (input) {
9
+ if (input.amount <= 0) {
10
+ throw new utils_1.MedusaError(utils_1.MedusaError.Types.INVALID_DATA, "Amount must be greater than 0");
11
+ }
12
+ });
13
+ /**
14
+ * This workflow debits a specific store credit account by an amount. It validates
15
+ * that the amount is greater than zero and that the account exists before debiting.
16
+ * The debit is rejected if the account's balance doesn't cover the amount.
17
+ *
18
+ * You can use this workflow within your own customizations or custom workflows,
19
+ * allowing you to wrap custom logic around debiting a store credit account.
20
+ *
21
+ * @example
22
+ * await debitStoreCreditAccountWorkflow(container)
23
+ * .run({
24
+ * input: {
25
+ * account_id: "sca_123",
26
+ * amount: 100,
27
+ * note: "Credit issued by mistake",
28
+ * reference: "user",
29
+ * reference_id: "user_123",
30
+ * },
31
+ * })
32
+ *
33
+ * @summary
34
+ *
35
+ * Debit a store credit account.
36
+ */
37
+ exports.debitStoreCreditAccountWorkflow = (0, workflows_sdk_1.createWorkflow)("debit-store-credit-account", function (input) {
38
+ validateDebitStoreCreditAccountInputStep(input);
39
+ const storeCreditAccountData = (0, core_flows_1.useQueryGraphStep)({
40
+ entity: "store_credit_account",
41
+ fields: ["id", "code", "customer_id", "currency_code", "balance"],
42
+ filters: { id: input.account_id },
43
+ options: { throwIfKeyNotFound: true },
44
+ });
45
+ const debitData = (0, workflows_sdk_1.transform)({ storeCreditAccountData, input }, ({ storeCreditAccountData, input }) => {
46
+ return {
47
+ account_id: storeCreditAccountData.data[0].id,
48
+ amount: utils_1.MathBN.convert(input.amount),
49
+ note: input.note || "",
50
+ reference: input.reference || "",
51
+ reference_id: input.reference_id || "",
52
+ };
53
+ });
54
+ (0, debit_account_1.debitAccountStep)([debitData]);
55
+ });
56
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGViaXQtc3RvcmUtY3JlZGl0LWFjY291bnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvd29ya2Zsb3dzL3N0b3JlLWNyZWRpdC93b3JrZmxvd3MvZGViaXQtc3RvcmUtY3JlZGl0LWFjY291bnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEscURBQWdFO0FBQ2hFLDREQUFnRTtBQUNoRSxxRUFBMEY7QUFHMUYsMERBQTBEO0FBTzFELE1BQU0sd0NBQXdDLEdBQUcsSUFBQSwwQkFBVSxFQUN6RCwyQ0FBMkMsRUFDM0MsS0FBSyxXQUFXLEtBQW9DO0lBQ2xELElBQUksS0FBSyxDQUFDLE1BQU0sSUFBSSxDQUFDLEVBQUUsQ0FBQztRQUN0QixNQUFNLElBQUksbUJBQVcsQ0FDbkIsbUJBQVcsQ0FBQyxLQUFLLENBQUMsWUFBWSxFQUM5QiwrQkFBK0IsQ0FDaEMsQ0FBQztJQUNKLENBQUM7QUFDSCxDQUFDLENBQ0YsQ0FBQztBQUVGOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztHQXVCRztBQUNVLFFBQUEsK0JBQStCLEdBQUcsSUFBQSw4QkFBYyxFQUMzRCw0QkFBNEIsRUFDNUIsVUFBVSxLQUEyQztJQUNuRCx3Q0FBd0MsQ0FBQyxLQUFLLENBQUMsQ0FBQztJQUVoRCxNQUFNLHNCQUFzQixHQUFHLElBQUEsOEJBQWlCLEVBQUM7UUFDL0MsTUFBTSxFQUFFLHNCQUFzQjtRQUM5QixNQUFNLEVBQUUsQ0FBQyxJQUFJLEVBQUUsTUFBTSxFQUFFLGFBQWEsRUFBRSxlQUFlLEVBQUUsU0FBUyxDQUFDO1FBQ2pFLE9BQU8sRUFBRSxFQUFFLEVBQUUsRUFBRSxLQUFLLENBQUMsVUFBVSxFQUFFO1FBQ2pDLE9BQU8sRUFBRSxFQUFFLGtCQUFrQixFQUFFLElBQUksRUFBRTtLQUN0QyxDQUFDLENBQUM7SUFFSCxNQUFNLFNBQVMsR0FBRyxJQUFBLHlCQUFTLEVBQ3pCLEVBQUUsc0JBQXNCLEVBQUUsS0FBSyxFQUFFLEVBQ2pDLENBQUMsRUFBRSxzQkFBc0IsRUFBRSxLQUFLLEVBQUUsRUFBRSxFQUFFO1FBQ3BDLE9BQU87WUFDTCxVQUFVLEVBQUUsc0JBQXNCLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDLEVBQUU7WUFDN0MsTUFBTSxFQUFFLGNBQU0sQ0FBQyxPQUFPLENBQUMsS0FBSyxDQUFDLE1BQU0sQ0FBQztZQUNwQyxJQUFJLEVBQUUsS0FBSyxDQUFDLElBQUksSUFBSSxFQUFFO1lBQ3RCLFNBQVMsRUFBRSxLQUFLLENBQUMsU0FBUyxJQUFJLEVBQUU7WUFDaEMsWUFBWSxFQUFFLEtBQUssQ0FBQyxZQUFZLElBQUksRUFBRTtTQUN2QyxDQUFDO0lBQ0osQ0FBQyxDQUNGLENBQUM7SUFFRixJQUFBLGdDQUFnQixFQUFDLENBQUMsU0FBUyxDQUFDLENBQUMsQ0FBQztBQUNoQyxDQUFDLENBQ0YsQ0FBQyJ9
@@ -0,0 +1,3 @@
1
+ import { Config } from "tailwindcss";
2
+ declare const config: Config;
3
+ export default config;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const ui_preset_1 = __importDefault(require("@medusajs/ui-preset"));
7
+ const config = {
8
+ content: ["./src/admin/**/*.{ts,tsx}"],
9
+ presets: [ui_preset_1.default],
10
+ };
11
+ exports.default = config;
12
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFpbHdpbmQuY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdGFpbHdpbmQuY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsb0VBQXdDO0FBR3hDLE1BQU0sTUFBTSxHQUFXO0lBQ3JCLE9BQU8sRUFBRSxDQUFDLDJCQUEyQixDQUFDO0lBQ3RDLE9BQU8sRUFBRSxDQUFDLG1CQUFNLENBQUM7Q0FDbEIsQ0FBQTtBQUVELGtCQUFlLE1BQU0sQ0FBQSJ9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/loyalty-plugin",
3
- "version": "2.22.5",
3
+ "version": "2.22.6",
4
4
  "description": "Medusa Plugin: Loyalty - Gift Cards",
5
5
  "author": "Medusa (https://medusajs.com)",
6
6
  "license": "MIT",
@@ -13,7 +13,7 @@
13
13
  "url": "https://github.com/medusajs/medusa/issues"
14
14
  },
15
15
  "files": [
16
- ".medusa/server",
16
+ ".medusa/server/**",
17
17
  "AGENTS.md"
18
18
  ],
19
19
  "llms": "https://docs.medusajs.com/llms.txt",
@@ -59,16 +59,16 @@
59
59
  "watch": "medusa plugin:develop"
60
60
  },
61
61
  "devDependencies": {
62
- "@medusajs/admin-sdk": "2.22.5",
63
- "@medusajs/cli": "2.22.5",
64
- "@medusajs/dashboard": "2.22.5",
65
- "@medusajs/framework": "2.22.5",
66
- "@medusajs/icons": "2.22.5",
67
- "@medusajs/medusa": "2.22.5",
68
- "@medusajs/test-utils": "2.22.5",
69
- "@medusajs/types": "2.22.5",
70
- "@medusajs/ui": "4.2.12",
71
- "@medusajs/ui-preset": "2.22.5",
62
+ "@medusajs/admin-sdk": "2.22.6",
63
+ "@medusajs/cli": "2.22.6",
64
+ "@medusajs/dashboard": "2.22.6",
65
+ "@medusajs/framework": "2.22.6",
66
+ "@medusajs/icons": "2.22.6",
67
+ "@medusajs/medusa": "2.22.6",
68
+ "@medusajs/test-utils": "2.22.6",
69
+ "@medusajs/types": "2.22.6",
70
+ "@medusajs/ui": "4.2.13",
71
+ "@medusajs/ui-preset": "2.22.6",
72
72
  "@swc/core": "^1.16.20",
73
73
  "@types/node": "^22.20.5",
74
74
  "cross-env": "^10.1.0",
@@ -76,14 +76,14 @@
76
76
  "typescript": "npm:@typescript/typescript6@^6.0.2"
77
77
  },
78
78
  "peerDependencies": {
79
- "@medusajs/admin-sdk": "2.22.5",
80
- "@medusajs/cli": "2.22.5",
81
- "@medusajs/dashboard": "2.22.5",
82
- "@medusajs/framework": "2.22.5",
83
- "@medusajs/icons": "2.22.5",
84
- "@medusajs/medusa": "2.22.5",
85
- "@medusajs/test-utils": "2.22.5",
86
- "@medusajs/ui": "4.2.12",
79
+ "@medusajs/admin-sdk": "2.22.6",
80
+ "@medusajs/cli": "2.22.6",
81
+ "@medusajs/dashboard": "2.22.6",
82
+ "@medusajs/framework": "2.22.6",
83
+ "@medusajs/icons": "2.22.6",
84
+ "@medusajs/medusa": "2.22.6",
85
+ "@medusajs/test-utils": "2.22.6",
86
+ "@medusajs/ui": "4.2.13",
87
87
  "react": "^18.3.1",
88
88
  "react-dom": "^18.3.1",
89
89
  "react-router-dom": "^6.30.4 || ^7.0.0"
@@ -121,4 +121,4 @@
121
121
  "node": ">=22.22.0"
122
122
  },
123
123
  "packageManager": "yarn@4.18.1"
124
- }
124
+ }