@mercurjs/framework 1.3.0

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 (275) hide show
  1. package/README.md +22 -0
  2. package/dist/index.d.ts +6 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +22 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/links/index.d.ts +3 -0
  7. package/dist/links/index.d.ts.map +1 -0
  8. package/dist/links/index.js +19 -0
  9. package/dist/links/index.js.map +1 -0
  10. package/dist/links/link-entrypoints.d.ts +4 -0
  11. package/dist/links/link-entrypoints.d.ts.map +1 -0
  12. package/dist/links/link-entrypoints.js +7 -0
  13. package/dist/links/link-entrypoints.js.map +1 -0
  14. package/dist/links/linkables.d.ts +16 -0
  15. package/dist/links/linkables.d.ts.map +1 -0
  16. package/dist/links/linkables.js +19 -0
  17. package/dist/links/linkables.js.map +1 -0
  18. package/dist/modules/index.d.ts +2 -0
  19. package/dist/modules/index.d.ts.map +1 -0
  20. package/dist/modules/index.js +5 -0
  21. package/dist/modules/index.js.map +1 -0
  22. package/dist/tsconfig.tsbuildinfo +1 -0
  23. package/dist/types/algolia/algolia-entity.d.ts +4 -0
  24. package/dist/types/algolia/algolia-entity.d.ts.map +1 -0
  25. package/dist/types/algolia/algolia-entity.js +3 -0
  26. package/dist/types/algolia/algolia-entity.js.map +1 -0
  27. package/dist/types/algolia/algolia-product.d.ts +347 -0
  28. package/dist/types/algolia/algolia-product.d.ts.map +1 -0
  29. package/dist/types/algolia/algolia-product.js +112 -0
  30. package/dist/types/algolia/algolia-product.js.map +1 -0
  31. package/dist/types/algolia/algolia-review.d.ts +25 -0
  32. package/dist/types/algolia/algolia-review.d.ts.map +1 -0
  33. package/dist/types/algolia/algolia-review.js +13 -0
  34. package/dist/types/algolia/algolia-review.js.map +1 -0
  35. package/dist/types/algolia/events.d.ts +13 -0
  36. package/dist/types/algolia/events.d.ts.map +1 -0
  37. package/dist/types/algolia/events.js +18 -0
  38. package/dist/types/algolia/events.js.map +1 -0
  39. package/dist/types/algolia/index-types.d.ts +5 -0
  40. package/dist/types/algolia/index-types.d.ts.map +1 -0
  41. package/dist/types/algolia/index-types.js +9 -0
  42. package/dist/types/algolia/index-types.js.map +1 -0
  43. package/dist/types/algolia/index.d.ts +6 -0
  44. package/dist/types/algolia/index.d.ts.map +1 -0
  45. package/dist/types/algolia/index.js +22 -0
  46. package/dist/types/algolia/index.js.map +1 -0
  47. package/dist/types/attribute/common.d.ts +41 -0
  48. package/dist/types/attribute/common.d.ts.map +1 -0
  49. package/dist/types/attribute/common.js +13 -0
  50. package/dist/types/attribute/common.js.map +1 -0
  51. package/dist/types/attribute/index.d.ts +3 -0
  52. package/dist/types/attribute/index.d.ts.map +1 -0
  53. package/dist/types/attribute/index.js +19 -0
  54. package/dist/types/attribute/index.js.map +1 -0
  55. package/dist/types/attribute/mutations.d.ts +50 -0
  56. package/dist/types/attribute/mutations.d.ts.map +1 -0
  57. package/dist/types/attribute/mutations.js +3 -0
  58. package/dist/types/attribute/mutations.js.map +1 -0
  59. package/dist/types/brand/index.d.ts +2 -0
  60. package/dist/types/brand/index.d.ts.map +1 -0
  61. package/dist/types/brand/index.js +18 -0
  62. package/dist/types/brand/index.js.map +1 -0
  63. package/dist/types/brand/mutations.d.ts +4 -0
  64. package/dist/types/brand/mutations.d.ts.map +1 -0
  65. package/dist/types/brand/mutations.js +3 -0
  66. package/dist/types/brand/mutations.js.map +1 -0
  67. package/dist/types/commission/common.d.ts +59 -0
  68. package/dist/types/commission/common.d.ts.map +1 -0
  69. package/dist/types/commission/common.js +3 -0
  70. package/dist/types/commission/common.js.map +1 -0
  71. package/dist/types/commission/index.d.ts +3 -0
  72. package/dist/types/commission/index.d.ts.map +1 -0
  73. package/dist/types/commission/index.js +19 -0
  74. package/dist/types/commission/index.js.map +1 -0
  75. package/dist/types/commission/mutations.d.ts +28 -0
  76. package/dist/types/commission/mutations.d.ts.map +1 -0
  77. package/dist/types/commission/mutations.js +3 -0
  78. package/dist/types/commission/mutations.js.map +1 -0
  79. package/dist/types/configuration/common.d.ts +14 -0
  80. package/dist/types/configuration/common.d.ts.map +1 -0
  81. package/dist/types/configuration/common.js +11 -0
  82. package/dist/types/configuration/common.js.map +1 -0
  83. package/dist/types/configuration/index.d.ts +3 -0
  84. package/dist/types/configuration/index.d.ts.map +1 -0
  85. package/dist/types/configuration/index.js +19 -0
  86. package/dist/types/configuration/index.js.map +1 -0
  87. package/dist/types/configuration/mutations.d.ts +10 -0
  88. package/dist/types/configuration/mutations.d.ts.map +1 -0
  89. package/dist/types/configuration/mutations.js +3 -0
  90. package/dist/types/configuration/mutations.js.map +1 -0
  91. package/dist/types/index.d.ts +15 -0
  92. package/dist/types/index.d.ts.map +1 -0
  93. package/dist/types/index.js +31 -0
  94. package/dist/types/index.js.map +1 -0
  95. package/dist/types/marketplace/common.d.ts +29 -0
  96. package/dist/types/marketplace/common.d.ts.map +1 -0
  97. package/dist/types/marketplace/common.js +3 -0
  98. package/dist/types/marketplace/common.js.map +1 -0
  99. package/dist/types/marketplace/events.d.ts +4 -0
  100. package/dist/types/marketplace/events.d.ts.map +1 -0
  101. package/dist/types/marketplace/events.js +8 -0
  102. package/dist/types/marketplace/events.js.map +1 -0
  103. package/dist/types/marketplace/index.d.ts +4 -0
  104. package/dist/types/marketplace/index.d.ts.map +1 -0
  105. package/dist/types/marketplace/index.js +20 -0
  106. package/dist/types/marketplace/index.js.map +1 -0
  107. package/dist/types/marketplace/mutations.d.ts +7 -0
  108. package/dist/types/marketplace/mutations.d.ts.map +1 -0
  109. package/dist/types/marketplace/mutations.js +3 -0
  110. package/dist/types/marketplace/mutations.js.map +1 -0
  111. package/dist/types/order-return-request/common.d.ts +20 -0
  112. package/dist/types/order-return-request/common.d.ts.map +1 -0
  113. package/dist/types/order-return-request/common.js +3 -0
  114. package/dist/types/order-return-request/common.js.map +1 -0
  115. package/dist/types/order-return-request/index.d.ts +3 -0
  116. package/dist/types/order-return-request/index.d.ts.map +1 -0
  117. package/dist/types/order-return-request/index.js +19 -0
  118. package/dist/types/order-return-request/index.js.map +1 -0
  119. package/dist/types/order-return-request/mutations.d.ts +29 -0
  120. package/dist/types/order-return-request/mutations.d.ts.map +1 -0
  121. package/dist/types/order-return-request/mutations.js +3 -0
  122. package/dist/types/order-return-request/mutations.js.map +1 -0
  123. package/dist/types/payment-stripe-connect/index.d.ts +13 -0
  124. package/dist/types/payment-stripe-connect/index.d.ts.map +1 -0
  125. package/dist/types/payment-stripe-connect/index.js +14 -0
  126. package/dist/types/payment-stripe-connect/index.js.map +1 -0
  127. package/dist/types/payout/common.d.ts +30 -0
  128. package/dist/types/payout/common.d.ts.map +1 -0
  129. package/dist/types/payout/common.js +10 -0
  130. package/dist/types/payout/common.js.map +1 -0
  131. package/dist/types/payout/events.d.ts +17 -0
  132. package/dist/types/payout/events.d.ts.map +1 -0
  133. package/dist/types/payout/events.js +24 -0
  134. package/dist/types/payout/events.js.map +1 -0
  135. package/dist/types/payout/index.d.ts +5 -0
  136. package/dist/types/payout/index.d.ts.map +1 -0
  137. package/dist/types/payout/index.js +21 -0
  138. package/dist/types/payout/index.js.map +1 -0
  139. package/dist/types/payout/mutations.d.ts +25 -0
  140. package/dist/types/payout/mutations.d.ts.map +1 -0
  141. package/dist/types/payout/mutations.js +3 -0
  142. package/dist/types/payout/mutations.js.map +1 -0
  143. package/dist/types/payout/provider.d.ts +52 -0
  144. package/dist/types/payout/provider.d.ts.map +1 -0
  145. package/dist/types/payout/provider.js +3 -0
  146. package/dist/types/payout/provider.js.map +1 -0
  147. package/dist/types/requests/common.d.ts +12 -0
  148. package/dist/types/requests/common.d.ts.map +1 -0
  149. package/dist/types/requests/common.js +3 -0
  150. package/dist/types/requests/common.js.map +1 -0
  151. package/dist/types/requests/events.d.ts +49 -0
  152. package/dist/types/requests/events.d.ts.map +1 -0
  153. package/dist/types/requests/events.js +64 -0
  154. package/dist/types/requests/events.js.map +1 -0
  155. package/dist/types/requests/humanize_types.d.ts +11 -0
  156. package/dist/types/requests/humanize_types.d.ts.map +1 -0
  157. package/dist/types/requests/humanize_types.js +14 -0
  158. package/dist/types/requests/humanize_types.js.map +1 -0
  159. package/dist/types/requests/index.d.ts +5 -0
  160. package/dist/types/requests/index.d.ts.map +1 -0
  161. package/dist/types/requests/index.js +21 -0
  162. package/dist/types/requests/index.js.map +1 -0
  163. package/dist/types/requests/mutations.d.ts +28 -0
  164. package/dist/types/requests/mutations.d.ts.map +1 -0
  165. package/dist/types/requests/mutations.js +3 -0
  166. package/dist/types/requests/mutations.js.map +1 -0
  167. package/dist/types/reviews/common.d.ts +11 -0
  168. package/dist/types/reviews/common.d.ts.map +1 -0
  169. package/dist/types/reviews/common.js +3 -0
  170. package/dist/types/reviews/common.js.map +1 -0
  171. package/dist/types/reviews/index.d.ts +3 -0
  172. package/dist/types/reviews/index.d.ts.map +1 -0
  173. package/dist/types/reviews/index.js +19 -0
  174. package/dist/types/reviews/index.js.map +1 -0
  175. package/dist/types/reviews/mutatations.d.ts +15 -0
  176. package/dist/types/reviews/mutatations.d.ts.map +1 -0
  177. package/dist/types/reviews/mutatations.js +3 -0
  178. package/dist/types/reviews/mutatations.js.map +1 -0
  179. package/dist/types/seller/common.d.ts +63 -0
  180. package/dist/types/seller/common.d.ts.map +1 -0
  181. package/dist/types/seller/common.js +16 -0
  182. package/dist/types/seller/common.js.map +1 -0
  183. package/dist/types/seller/events.d.ts +4 -0
  184. package/dist/types/seller/events.d.ts.map +1 -0
  185. package/dist/types/seller/events.js +8 -0
  186. package/dist/types/seller/events.js.map +1 -0
  187. package/dist/types/seller/index.d.ts +4 -0
  188. package/dist/types/seller/index.d.ts.map +1 -0
  189. package/dist/types/seller/index.js +20 -0
  190. package/dist/types/seller/index.js.map +1 -0
  191. package/dist/types/seller/mutations.d.ts +53 -0
  192. package/dist/types/seller/mutations.d.ts.map +1 -0
  193. package/dist/types/seller/mutations.js +3 -0
  194. package/dist/types/seller/mutations.js.map +1 -0
  195. package/dist/types/split-order-payment/common.d.ts +10 -0
  196. package/dist/types/split-order-payment/common.d.ts.map +1 -0
  197. package/dist/types/split-order-payment/common.js +3 -0
  198. package/dist/types/split-order-payment/common.js.map +1 -0
  199. package/dist/types/split-order-payment/index.d.ts +3 -0
  200. package/dist/types/split-order-payment/index.d.ts.map +1 -0
  201. package/dist/types/split-order-payment/index.js +19 -0
  202. package/dist/types/split-order-payment/index.js.map +1 -0
  203. package/dist/types/split-order-payment/mutations.d.ts +19 -0
  204. package/dist/types/split-order-payment/mutations.d.ts.map +1 -0
  205. package/dist/types/split-order-payment/mutations.js +3 -0
  206. package/dist/types/split-order-payment/mutations.js.map +1 -0
  207. package/dist/types/wishlist/common.d.ts +17 -0
  208. package/dist/types/wishlist/common.d.ts.map +1 -0
  209. package/dist/types/wishlist/common.js +3 -0
  210. package/dist/types/wishlist/common.js.map +1 -0
  211. package/dist/types/wishlist/index.d.ts +3 -0
  212. package/dist/types/wishlist/index.d.ts.map +1 -0
  213. package/dist/types/wishlist/index.js +19 -0
  214. package/dist/types/wishlist/index.js.map +1 -0
  215. package/dist/types/wishlist/mutations.d.ts +10 -0
  216. package/dist/types/wishlist/mutations.d.ts.map +1 -0
  217. package/dist/types/wishlist/mutations.js +3 -0
  218. package/dist/types/wishlist/mutations.js.map +1 -0
  219. package/dist/utils/admin.d.ts +3 -0
  220. package/dist/utils/admin.d.ts.map +1 -0
  221. package/dist/utils/admin.js +14 -0
  222. package/dist/utils/admin.js.map +1 -0
  223. package/dist/utils/configuration.d.ts +5 -0
  224. package/dist/utils/configuration.d.ts.map +1 -0
  225. package/dist/utils/configuration.js +32 -0
  226. package/dist/utils/configuration.js.map +1 -0
  227. package/dist/utils/hosts.d.ts +24 -0
  228. package/dist/utils/hosts.d.ts.map +1 -0
  229. package/dist/utils/hosts.js +43 -0
  230. package/dist/utils/hosts.js.map +1 -0
  231. package/dist/utils/index.d.ts +7 -0
  232. package/dist/utils/index.d.ts.map +1 -0
  233. package/dist/utils/index.js +23 -0
  234. package/dist/utils/index.js.map +1 -0
  235. package/dist/utils/middlewares/apply-reference-filter.d.ts +7 -0
  236. package/dist/utils/middlewares/apply-reference-filter.d.ts.map +1 -0
  237. package/dist/utils/middlewares/apply-reference-filter.js +15 -0
  238. package/dist/utils/middlewares/apply-reference-filter.js.map +1 -0
  239. package/dist/utils/middlewares/check-customer-ownership.d.ts +10 -0
  240. package/dist/utils/middlewares/check-customer-ownership.d.ts.map +1 -0
  241. package/dist/utils/middlewares/check-customer-ownership.js +34 -0
  242. package/dist/utils/middlewares/check-customer-ownership.js.map +1 -0
  243. package/dist/utils/middlewares/check-ownership.d.ts +35 -0
  244. package/dist/utils/middlewares/check-ownership.d.ts.map +1 -0
  245. package/dist/utils/middlewares/check-ownership.js +66 -0
  246. package/dist/utils/middlewares/check-ownership.js.map +1 -0
  247. package/dist/utils/middlewares/filter-by-seller-id.d.ts +7 -0
  248. package/dist/utils/middlewares/filter-by-seller-id.d.ts.map +1 -0
  249. package/dist/utils/middlewares/filter-by-seller-id.js +15 -0
  250. package/dist/utils/middlewares/filter-by-seller-id.js.map +1 -0
  251. package/dist/utils/middlewares/index.d.ts +5 -0
  252. package/dist/utils/middlewares/index.d.ts.map +1 -0
  253. package/dist/utils/middlewares/index.js +21 -0
  254. package/dist/utils/middlewares/index.js.map +1 -0
  255. package/dist/utils/money.d.ts +17 -0
  256. package/dist/utils/money.d.ts.map +1 -0
  257. package/dist/utils/money.js +68 -0
  258. package/dist/utils/money.js.map +1 -0
  259. package/dist/utils/seller.d.ts +4 -0
  260. package/dist/utils/seller.d.ts.map +1 -0
  261. package/dist/utils/seller.js +19 -0
  262. package/dist/utils/seller.js.map +1 -0
  263. package/dist/workflows/emit-multiple-events-step.d.ts +7 -0
  264. package/dist/workflows/emit-multiple-events-step.d.ts.map +1 -0
  265. package/dist/workflows/emit-multiple-events-step.js +12 -0
  266. package/dist/workflows/emit-multiple-events-step.js.map +1 -0
  267. package/dist/workflows/index.d.ts +3 -0
  268. package/dist/workflows/index.d.ts.map +1 -0
  269. package/dist/workflows/index.js +19 -0
  270. package/dist/workflows/index.js.map +1 -0
  271. package/dist/workflows/update-product-status.d.ts +10 -0
  272. package/dist/workflows/update-product-status.d.ts.map +1 -0
  273. package/dist/workflows/update-product-status.js +18 -0
  274. package/dist/workflows/update-product-status.js.map +1 -0
  275. package/package.json +55 -0
@@ -0,0 +1,52 @@
1
+ import Stripe from 'stripe';
2
+ import { BigNumberInput } from '@medusajs/framework/types';
3
+ import { PayoutWebhookAction } from './events';
4
+ export type ProcessPayoutInput = {
5
+ amount: BigNumberInput;
6
+ currency: string;
7
+ account_reference_id: string;
8
+ transaction_id: string;
9
+ source_transaction: string;
10
+ };
11
+ export type ReversePayoutInput = {
12
+ transfer_id: string;
13
+ amount: BigNumberInput;
14
+ currency: string;
15
+ };
16
+ export type ProcessPayoutResponse = {
17
+ data: Record<string, unknown>;
18
+ };
19
+ export type CreatePayoutAccountInput = {
20
+ context: Record<string, unknown>;
21
+ account_id: string;
22
+ };
23
+ export type CreatePayoutAccountResponse = {
24
+ data: Record<string, unknown>;
25
+ id: string;
26
+ };
27
+ export type PayoutWebhookActionPayload = {
28
+ data: Record<string, unknown>;
29
+ rawData: string | Buffer;
30
+ headers: Record<string, unknown>;
31
+ };
32
+ export type PayoutWebhookActionAndDataResponse = {
33
+ action: PayoutWebhookAction;
34
+ data: {
35
+ account_id: string;
36
+ };
37
+ };
38
+ export type InitializeOnboardingResponse = {
39
+ data: Record<string, unknown>;
40
+ };
41
+ export interface IPayoutProvider {
42
+ createPayout(input: ProcessPayoutInput): Promise<ProcessPayoutResponse>;
43
+ createPayoutAccount(input: CreatePayoutAccountInput): Promise<CreatePayoutAccountResponse>;
44
+ reversePayout(input: ReversePayoutInput): Promise<Stripe.TransferReversal>;
45
+ /**
46
+ * Initialize the onboarding process for a payout account.
47
+ */
48
+ initializeOnboarding(accountId: string, context: Record<string, unknown>): Promise<InitializeOnboardingResponse>;
49
+ getAccount(accountId: string): Promise<Stripe.Account>;
50
+ getWebhookActionAndData(payload: PayoutWebhookActionPayload): Promise<PayoutWebhookActionAndDataResponse>;
51
+ }
52
+ //# sourceMappingURL=provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../src/types/payout/provider.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAA;AAE3B,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAE9C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,cAAc,CAAA;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,cAAc,EAAE,MAAM,CAAA;IACtB,kBAAkB,EAAE,MAAM,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,cAAc,CAAA;IACtB,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG;IACxC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC7B,EAAE,EAAE,MAAM,CAAA;CACX,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC7B,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACjC,CAAA;AAED,MAAM,MAAM,kCAAkC,GAAG;IAC/C,MAAM,EAAE,mBAAmB,CAAA;IAC3B,IAAI,EAAE;QACJ,UAAU,EAAE,MAAM,CAAA;KACnB,CAAA;CACF,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG;IACzC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC9B,CAAA;AAED,MAAM,WAAW,eAAe;IAC9B,YAAY,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAA;IACvE,mBAAmB,CACjB,KAAK,EAAE,wBAAwB,GAC9B,OAAO,CAAC,2BAA2B,CAAC,CAAA;IACvC,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAA;IAC1E;;OAEG;IACH,oBAAoB,CAClB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,OAAO,CAAC,4BAA4B,CAAC,CAAA;IACxC,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IACtD,uBAAuB,CACrB,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,kCAAkC,CAAC,CAAA;CAC/C"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.js","sourceRoot":"","sources":["../../../src/types/payout/provider.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ export type RequestDTO = {
2
+ id: string;
3
+ type: string;
4
+ data: Record<string, unknown>;
5
+ submitter_id: string;
6
+ reviewer_id: string;
7
+ reviewer_note: string;
8
+ status: 'pending' | 'accepted' | 'rejected';
9
+ created_at: Date;
10
+ updated_at: Date;
11
+ };
12
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/types/requests/common.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC7B,YAAY,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,CAAA;IAC3C,UAAU,EAAE,IAAI,CAAA;IAChB,UAAU,EAAE,IAAI,CAAA;CACjB,CAAA"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/types/requests/common.ts"],"names":[],"mappings":""}
@@ -0,0 +1,49 @@
1
+ export declare enum SellerAccountRequestUpdatedEvent {
2
+ ACCEPTED = "requests.seller.accepted",
3
+ REJECTED = "requests.seller.rejected"
4
+ }
5
+ export declare enum SellerRequest {
6
+ CREATED = "requests.seller.created",
7
+ TO_CREATE = "requests.seller.to_create"
8
+ }
9
+ export declare enum RequestUpdated {
10
+ CREATED = "requests.*.created"
11
+ }
12
+ export declare enum ProductCategoryRequestUpdatedEvent {
13
+ ACCEPTED = "requests.product_category.accepted",
14
+ REJECTED = "requests.product_category.rejected"
15
+ }
16
+ export declare enum ProductCollectionRequestUpdatedEvent {
17
+ ACCEPTED = "requests.product_collection.accepted",
18
+ REJECTED = "requests.product_collection.rejected"
19
+ }
20
+ export declare enum ProductRequestUpdatedEvent {
21
+ CREATED = "requests.product.created",
22
+ ACCEPTED = "requests.product.accepted",
23
+ REJECTED = "requests.product.rejected",
24
+ TO_CREATE = "requests.product.to_create"
25
+ }
26
+ export declare enum ProductUpdateRequestUpdatedEvent {
27
+ CREATED = "requests.product_update.created",
28
+ ACCEPTED = "requests.product_update.accepted",
29
+ REJECTED = "requests.product_update.rejected",
30
+ TO_CREATE = "requests.product_update.to_create"
31
+ }
32
+ export declare enum ImportSellerProductsRequestUpdatedEvent {
33
+ TO_CREATE = "requests.import_seller_products.to_create"
34
+ }
35
+ export declare enum SellerTeamInviteEvent {
36
+ CREATED = "seller.team.invite.created"
37
+ }
38
+ export declare enum ProductTypeRequestUpdatedEvent {
39
+ ACCEPTED = "requests.product_type.accepted",
40
+ REJECTED = "requests.product_type.rejected"
41
+ }
42
+ export declare enum ProductTagRequestUpdatedEvent {
43
+ ACCEPTED = "requests.product_tag.accepted",
44
+ REJECTED = "requests.product_tag.rejected"
45
+ }
46
+ export declare enum RemoveReviewRequestUpdatedEvent {
47
+ REMOVED = "requests.review.removed"
48
+ }
49
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/types/requests/events.ts"],"names":[],"mappings":"AAAA,oBAAY,gCAAgC;IAC1C,QAAQ,6BAA6B;IACrC,QAAQ,6BAA6B;CACtC;AAED,oBAAY,aAAa;IACvB,OAAO,4BAA4B;IACnC,SAAS,8BAA8B;CACxC;AAED,oBAAY,cAAc;IACxB,OAAO,uBAAuB;CAC/B;AAED,oBAAY,kCAAkC;IAC5C,QAAQ,uCAAuC;IAC/C,QAAQ,uCAAuC;CAChD;AAED,oBAAY,oCAAoC;IAC9C,QAAQ,yCAAyC;IACjD,QAAQ,yCAAyC;CAClD;AAED,oBAAY,0BAA0B;IACpC,OAAO,6BAA6B;IACpC,QAAQ,8BAA8B;IACtC,QAAQ,8BAA8B;IACtC,SAAS,+BAA+B;CACzC;AAED,oBAAY,gCAAgC;IAC1C,OAAO,oCAAoC;IAC3C,QAAQ,qCAAqC;IAC7C,QAAQ,qCAAqC;IAC7C,SAAS,sCAAsC;CAChD;AAED,oBAAY,uCAAuC;IACjD,SAAS,8CAA8C;CACxD;AAED,oBAAY,qBAAqB;IAC/B,OAAO,+BAA+B;CACvC;AAED,oBAAY,8BAA8B;IACxC,QAAQ,mCAAmC;IAC3C,QAAQ,mCAAmC;CAC5C;AAED,oBAAY,6BAA6B;IACvC,QAAQ,kCAAkC;IAC1C,QAAQ,kCAAkC;CAC3C;AAED,oBAAY,+BAA+B;IACzC,OAAO,4BAA4B;CACpC"}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RemoveReviewRequestUpdatedEvent = exports.ProductTagRequestUpdatedEvent = exports.ProductTypeRequestUpdatedEvent = exports.SellerTeamInviteEvent = exports.ImportSellerProductsRequestUpdatedEvent = exports.ProductUpdateRequestUpdatedEvent = exports.ProductRequestUpdatedEvent = exports.ProductCollectionRequestUpdatedEvent = exports.ProductCategoryRequestUpdatedEvent = exports.RequestUpdated = exports.SellerRequest = exports.SellerAccountRequestUpdatedEvent = void 0;
4
+ var SellerAccountRequestUpdatedEvent;
5
+ (function (SellerAccountRequestUpdatedEvent) {
6
+ SellerAccountRequestUpdatedEvent["ACCEPTED"] = "requests.seller.accepted";
7
+ SellerAccountRequestUpdatedEvent["REJECTED"] = "requests.seller.rejected";
8
+ })(SellerAccountRequestUpdatedEvent || (exports.SellerAccountRequestUpdatedEvent = SellerAccountRequestUpdatedEvent = {}));
9
+ var SellerRequest;
10
+ (function (SellerRequest) {
11
+ SellerRequest["CREATED"] = "requests.seller.created";
12
+ SellerRequest["TO_CREATE"] = "requests.seller.to_create";
13
+ })(SellerRequest || (exports.SellerRequest = SellerRequest = {}));
14
+ var RequestUpdated;
15
+ (function (RequestUpdated) {
16
+ RequestUpdated["CREATED"] = "requests.*.created";
17
+ })(RequestUpdated || (exports.RequestUpdated = RequestUpdated = {}));
18
+ var ProductCategoryRequestUpdatedEvent;
19
+ (function (ProductCategoryRequestUpdatedEvent) {
20
+ ProductCategoryRequestUpdatedEvent["ACCEPTED"] = "requests.product_category.accepted";
21
+ ProductCategoryRequestUpdatedEvent["REJECTED"] = "requests.product_category.rejected";
22
+ })(ProductCategoryRequestUpdatedEvent || (exports.ProductCategoryRequestUpdatedEvent = ProductCategoryRequestUpdatedEvent = {}));
23
+ var ProductCollectionRequestUpdatedEvent;
24
+ (function (ProductCollectionRequestUpdatedEvent) {
25
+ ProductCollectionRequestUpdatedEvent["ACCEPTED"] = "requests.product_collection.accepted";
26
+ ProductCollectionRequestUpdatedEvent["REJECTED"] = "requests.product_collection.rejected";
27
+ })(ProductCollectionRequestUpdatedEvent || (exports.ProductCollectionRequestUpdatedEvent = ProductCollectionRequestUpdatedEvent = {}));
28
+ var ProductRequestUpdatedEvent;
29
+ (function (ProductRequestUpdatedEvent) {
30
+ ProductRequestUpdatedEvent["CREATED"] = "requests.product.created";
31
+ ProductRequestUpdatedEvent["ACCEPTED"] = "requests.product.accepted";
32
+ ProductRequestUpdatedEvent["REJECTED"] = "requests.product.rejected";
33
+ ProductRequestUpdatedEvent["TO_CREATE"] = "requests.product.to_create";
34
+ })(ProductRequestUpdatedEvent || (exports.ProductRequestUpdatedEvent = ProductRequestUpdatedEvent = {}));
35
+ var ProductUpdateRequestUpdatedEvent;
36
+ (function (ProductUpdateRequestUpdatedEvent) {
37
+ ProductUpdateRequestUpdatedEvent["CREATED"] = "requests.product_update.created";
38
+ ProductUpdateRequestUpdatedEvent["ACCEPTED"] = "requests.product_update.accepted";
39
+ ProductUpdateRequestUpdatedEvent["REJECTED"] = "requests.product_update.rejected";
40
+ ProductUpdateRequestUpdatedEvent["TO_CREATE"] = "requests.product_update.to_create";
41
+ })(ProductUpdateRequestUpdatedEvent || (exports.ProductUpdateRequestUpdatedEvent = ProductUpdateRequestUpdatedEvent = {}));
42
+ var ImportSellerProductsRequestUpdatedEvent;
43
+ (function (ImportSellerProductsRequestUpdatedEvent) {
44
+ ImportSellerProductsRequestUpdatedEvent["TO_CREATE"] = "requests.import_seller_products.to_create";
45
+ })(ImportSellerProductsRequestUpdatedEvent || (exports.ImportSellerProductsRequestUpdatedEvent = ImportSellerProductsRequestUpdatedEvent = {}));
46
+ var SellerTeamInviteEvent;
47
+ (function (SellerTeamInviteEvent) {
48
+ SellerTeamInviteEvent["CREATED"] = "seller.team.invite.created";
49
+ })(SellerTeamInviteEvent || (exports.SellerTeamInviteEvent = SellerTeamInviteEvent = {}));
50
+ var ProductTypeRequestUpdatedEvent;
51
+ (function (ProductTypeRequestUpdatedEvent) {
52
+ ProductTypeRequestUpdatedEvent["ACCEPTED"] = "requests.product_type.accepted";
53
+ ProductTypeRequestUpdatedEvent["REJECTED"] = "requests.product_type.rejected";
54
+ })(ProductTypeRequestUpdatedEvent || (exports.ProductTypeRequestUpdatedEvent = ProductTypeRequestUpdatedEvent = {}));
55
+ var ProductTagRequestUpdatedEvent;
56
+ (function (ProductTagRequestUpdatedEvent) {
57
+ ProductTagRequestUpdatedEvent["ACCEPTED"] = "requests.product_tag.accepted";
58
+ ProductTagRequestUpdatedEvent["REJECTED"] = "requests.product_tag.rejected";
59
+ })(ProductTagRequestUpdatedEvent || (exports.ProductTagRequestUpdatedEvent = ProductTagRequestUpdatedEvent = {}));
60
+ var RemoveReviewRequestUpdatedEvent;
61
+ (function (RemoveReviewRequestUpdatedEvent) {
62
+ RemoveReviewRequestUpdatedEvent["REMOVED"] = "requests.review.removed";
63
+ })(RemoveReviewRequestUpdatedEvent || (exports.RemoveReviewRequestUpdatedEvent = RemoveReviewRequestUpdatedEvent = {}));
64
+ //# sourceMappingURL=events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/types/requests/events.ts"],"names":[],"mappings":";;;AAAA,IAAY,gCAGX;AAHD,WAAY,gCAAgC;IAC1C,yEAAqC,CAAA;IACrC,yEAAqC,CAAA;AACvC,CAAC,EAHW,gCAAgC,gDAAhC,gCAAgC,QAG3C;AAED,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,oDAAmC,CAAA;IACnC,wDAAuC,CAAA;AACzC,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;AAED,IAAY,cAEX;AAFD,WAAY,cAAc;IACxB,gDAA8B,CAAA;AAChC,CAAC,EAFW,cAAc,8BAAd,cAAc,QAEzB;AAED,IAAY,kCAGX;AAHD,WAAY,kCAAkC;IAC5C,qFAA+C,CAAA;IAC/C,qFAA+C,CAAA;AACjD,CAAC,EAHW,kCAAkC,kDAAlC,kCAAkC,QAG7C;AAED,IAAY,oCAGX;AAHD,WAAY,oCAAoC;IAC9C,yFAAiD,CAAA;IACjD,yFAAiD,CAAA;AACnD,CAAC,EAHW,oCAAoC,oDAApC,oCAAoC,QAG/C;AAED,IAAY,0BAKX;AALD,WAAY,0BAA0B;IACpC,kEAAoC,CAAA;IACpC,oEAAsC,CAAA;IACtC,oEAAsC,CAAA;IACtC,sEAAwC,CAAA;AAC1C,CAAC,EALW,0BAA0B,0CAA1B,0BAA0B,QAKrC;AAED,IAAY,gCAKX;AALD,WAAY,gCAAgC;IAC1C,+EAA2C,CAAA;IAC3C,iFAA6C,CAAA;IAC7C,iFAA6C,CAAA;IAC7C,mFAA+C,CAAA;AACjD,CAAC,EALW,gCAAgC,gDAAhC,gCAAgC,QAK3C;AAED,IAAY,uCAEX;AAFD,WAAY,uCAAuC;IACjD,kGAAuD,CAAA;AACzD,CAAC,EAFW,uCAAuC,uDAAvC,uCAAuC,QAElD;AAED,IAAY,qBAEX;AAFD,WAAY,qBAAqB;IAC/B,+DAAsC,CAAA;AACxC,CAAC,EAFW,qBAAqB,qCAArB,qBAAqB,QAEhC;AAED,IAAY,8BAGX;AAHD,WAAY,8BAA8B;IACxC,6EAA2C,CAAA;IAC3C,6EAA2C,CAAA;AAC7C,CAAC,EAHW,8BAA8B,8CAA9B,8BAA8B,QAGzC;AAED,IAAY,6BAGX;AAHD,WAAY,6BAA6B;IACvC,2EAA0C,CAAA;IAC1C,2EAA0C,CAAA;AAC5C,CAAC,EAHW,6BAA6B,6CAA7B,6BAA6B,QAGxC;AAED,IAAY,+BAEX;AAFD,WAAY,+BAA+B;IACzC,sEAAmC,CAAA;AACrC,CAAC,EAFW,+BAA+B,+CAA/B,+BAA+B,QAE1C"}
@@ -0,0 +1,11 @@
1
+ export declare const HumanizeTypes: {
2
+ product_collection: string;
3
+ product_category: string;
4
+ product_update: string;
5
+ product: string;
6
+ seller: string;
7
+ review_remove: string;
8
+ product_type: string;
9
+ product_tag: string;
10
+ };
11
+ //# sourceMappingURL=humanize_types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"humanize_types.d.ts","sourceRoot":"","sources":["../../../src/types/requests/humanize_types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;;;;;;;;;CASzB,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HumanizeTypes = void 0;
4
+ exports.HumanizeTypes = {
5
+ product_collection: "Product Collection",
6
+ product_category: "Product Category",
7
+ product_update: "Product Update",
8
+ product: "Product",
9
+ seller: "Seller",
10
+ review_remove: "Review Remove",
11
+ product_type: "Product Type",
12
+ product_tag: "Product Tag",
13
+ };
14
+ //# sourceMappingURL=humanize_types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"humanize_types.js","sourceRoot":"","sources":["../../../src/types/requests/humanize_types.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAAG;IAC3B,kBAAkB,EAAE,oBAAoB;IACxC,gBAAgB,EAAE,kBAAkB;IACpC,cAAc,EAAE,gBAAgB;IAChC,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,aAAa,EAAE,eAAe;IAC9B,YAAY,EAAE,cAAc;IAC5B,WAAW,EAAE,aAAa;CAC3B,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from "./mutations";
2
+ export * from "./common";
3
+ export * from "./events";
4
+ export * from "./humanize_types";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/requests/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,21 @@
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("./mutations"), exports);
18
+ __exportStar(require("./common"), exports);
19
+ __exportStar(require("./events"), exports);
20
+ __exportStar(require("./humanize_types"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/requests/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,2CAAyB;AACzB,2CAAyB;AACzB,mDAAiC"}
@@ -0,0 +1,28 @@
1
+ export type RequestStatus = 'pending' | 'accepted' | 'rejected' | 'draft';
2
+ export type CreateRequestDTO = {
3
+ type: string;
4
+ data: any;
5
+ submitter_id: string;
6
+ reviewer_id?: string;
7
+ reviewer_note?: string;
8
+ status?: RequestStatus;
9
+ };
10
+ export type UpdateRequestDTO = {
11
+ id: string;
12
+ reviewer_id?: string;
13
+ reviewer_note?: string;
14
+ status: RequestStatus;
15
+ };
16
+ export type UpdateRequestDataDTO = {
17
+ id: string;
18
+ type: string;
19
+ data: any;
20
+ };
21
+ export type AcceptRequestDTO = {
22
+ id: string;
23
+ reviewer_id: string;
24
+ reviewer_note: string;
25
+ data: any;
26
+ status: RequestStatus;
27
+ };
28
+ //# sourceMappingURL=mutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../../src/types/requests/mutations.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAA;AAEzE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,GAAG,CAAA;IACT,YAAY,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,MAAM,CAAC,EAAE,aAAa,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,MAAM,EAAE,aAAa,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,GAAG,CAAA;CACV,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,IAAI,EAAE,GAAG,CAAA;IACT,MAAM,EAAE,aAAa,CAAA;CACtB,CAAA"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=mutations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mutations.js","sourceRoot":"","sources":["../../../src/types/requests/mutations.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ export type ReviewDTO = {
2
+ id: string;
3
+ reference: 'product' | 'seller';
4
+ rating: number;
5
+ customer_note: string | null;
6
+ customer_id: string;
7
+ seller_note: string | null;
8
+ created_at: Date;
9
+ updated_at: Date | null;
10
+ };
11
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/types/reviews/common.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,SAAS,GAAG,QAAQ,CAAA;IAC/B,MAAM,EAAE,MAAM,CAAA;IACd,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,UAAU,EAAE,IAAI,CAAA;IAChB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAA;CACxB,CAAA"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/types/reviews/common.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export * from './common';
2
+ export * from './mutatations';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/reviews/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA"}
@@ -0,0 +1,19 @@
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("./common"), exports);
18
+ __exportStar(require("./mutatations"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/reviews/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB;AACxB,gDAA6B"}
@@ -0,0 +1,15 @@
1
+ export type CreateReviewDTO = {
2
+ order_id: string;
3
+ reference: 'product' | 'seller';
4
+ reference_id: string;
5
+ rating: number;
6
+ customer_note: string | null;
7
+ customer_id: string;
8
+ };
9
+ export type UpdateReviewDTO = {
10
+ id: string;
11
+ rating?: number;
12
+ customer_note?: string;
13
+ seller_note?: string;
14
+ };
15
+ //# sourceMappingURL=mutatations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mutatations.d.ts","sourceRoot":"","sources":["../../../src/types/reviews/mutatations.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,SAAS,GAAG,QAAQ,CAAA;IAC/B,YAAY,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=mutatations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mutatations.js","sourceRoot":"","sources":["../../../src/types/reviews/mutatations.ts"],"names":[],"mappings":""}
@@ -0,0 +1,63 @@
1
+ export declare enum StoreStatus {
2
+ ACTIVE = "ACTIVE",
3
+ INACTIVE = "INACTIVE",
4
+ SUSPENDED = "SUSPENDED"
5
+ }
6
+ export type SellerDTO = {
7
+ id: string;
8
+ store_status: StoreStatus;
9
+ created_at: Date;
10
+ updated_at: Date;
11
+ name: string;
12
+ email: string | null;
13
+ phone: string | null;
14
+ description: string | null;
15
+ address_line: string | null;
16
+ city: string | null;
17
+ state: string | null;
18
+ postal_code: string | null;
19
+ country_code: string | null;
20
+ tax_id: string | null;
21
+ handle: string;
22
+ photo: string | null;
23
+ members?: Partial<MemberDTO>[];
24
+ };
25
+ export type SellerWithPayoutAccountDTO = SellerDTO & {
26
+ payout_account: {
27
+ id: string;
28
+ created_at: Date;
29
+ updated_at: Date;
30
+ reference_id: string;
31
+ data: Record<string, unknown>;
32
+ status: string;
33
+ };
34
+ };
35
+ export declare enum MemberRole {
36
+ OWNER = "owner",
37
+ ADMIN = "admin",
38
+ MEMBER = "member"
39
+ }
40
+ export type MemberDTO = {
41
+ id: string;
42
+ created_at: Date;
43
+ updated_at: Date;
44
+ role: MemberRole;
45
+ email: string | null;
46
+ name: string | null;
47
+ bio: string | null;
48
+ photo: string | null;
49
+ phone: string | null;
50
+ seller?: Partial<SellerDTO>;
51
+ };
52
+ export type MemberInviteDTO = {
53
+ id: string;
54
+ created_at: Date;
55
+ updated_at: Date;
56
+ email: string;
57
+ role: MemberRole;
58
+ seller?: Partial<SellerDTO>;
59
+ token: string;
60
+ expires_at: Date;
61
+ accepted: boolean;
62
+ };
63
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/types/seller/common.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACrB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,SAAS,cAAc;CACxB;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,WAAW,CAAC;IAC1B,UAAU,EAAE,IAAI,CAAC;IACjB,UAAU,EAAE,IAAI,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,SAAS,GAAG;IACnD,cAAc,EAAE;QACd,EAAE,EAAE,MAAM,CAAC;QACX,UAAU,EAAE,IAAI,CAAC;QACjB,UAAU,EAAE,IAAI,CAAC;QACjB,YAAY,EAAE,MAAM,CAAC;QACrB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC9B,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH,CAAC;AAEF,oBAAY,UAAU;IACpB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,MAAM,WAAW;CAClB;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,IAAI,CAAC;IACjB,UAAU,EAAE,IAAI,CAAC;IACjB,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,IAAI,CAAC;IACjB,UAAU,EAAE,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,IAAI,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MemberRole = exports.StoreStatus = void 0;
4
+ var StoreStatus;
5
+ (function (StoreStatus) {
6
+ StoreStatus["ACTIVE"] = "ACTIVE";
7
+ StoreStatus["INACTIVE"] = "INACTIVE";
8
+ StoreStatus["SUSPENDED"] = "SUSPENDED";
9
+ })(StoreStatus || (exports.StoreStatus = StoreStatus = {}));
10
+ var MemberRole;
11
+ (function (MemberRole) {
12
+ MemberRole["OWNER"] = "owner";
13
+ MemberRole["ADMIN"] = "admin";
14
+ MemberRole["MEMBER"] = "member";
15
+ })(MemberRole || (exports.MemberRole = MemberRole = {}));
16
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/types/seller/common.ts"],"names":[],"mappings":";;;AAAA,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,gCAAiB,CAAA;IACjB,oCAAqB,CAAA;IACrB,sCAAuB,CAAA;AACzB,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB;AAiCD,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,6BAAe,CAAA;IACf,6BAAe,CAAA;IACf,+BAAiB,CAAA;AACnB,CAAC,EAJW,UAAU,0BAAV,UAAU,QAIrB"}
@@ -0,0 +1,4 @@
1
+ export declare enum SellerEvents {
2
+ STORE_STATUS_CHANGED = "seller.store_status_changed"
3
+ }
4
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/types/seller/events.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACtB,oBAAoB,gCAAgC;CACrD"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SellerEvents = void 0;
4
+ var SellerEvents;
5
+ (function (SellerEvents) {
6
+ SellerEvents["STORE_STATUS_CHANGED"] = "seller.store_status_changed";
7
+ })(SellerEvents || (exports.SellerEvents = SellerEvents = {}));
8
+ //# sourceMappingURL=events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/types/seller/events.ts"],"names":[],"mappings":";;;AAAA,IAAY,YAEX;AAFD,WAAY,YAAY;IACtB,oEAAoD,CAAA;AACtD,CAAC,EAFW,YAAY,4BAAZ,YAAY,QAEvB"}
@@ -0,0 +1,4 @@
1
+ export * from "./common";
2
+ export * from "./mutations";
3
+ export * from "./events";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/seller/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC"}
@@ -0,0 +1,20 @@
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("./common"), exports);
18
+ __exportStar(require("./mutations"), exports);
19
+ __exportStar(require("./events"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/seller/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,8CAA4B;AAC5B,2CAAyB"}
@@ -0,0 +1,53 @@
1
+ import { MemberInviteDTO, MemberRole, SellerDTO, StoreStatus } from './common';
2
+ export interface CreateSellerDTO extends Omit<Partial<SellerDTO>, 'id' | 'created_at' | 'updated_at' | 'members'> {
3
+ name: string;
4
+ }
5
+ export interface UpdateSellerDTO {
6
+ id: string;
7
+ name?: string;
8
+ email?: string;
9
+ phone?: string;
10
+ description?: string;
11
+ address_line?: string;
12
+ city?: string;
13
+ state?: string;
14
+ postal_code?: string;
15
+ country_code?: string;
16
+ tax_id?: string;
17
+ handle?: string;
18
+ photo?: string;
19
+ store_status?: StoreStatus;
20
+ }
21
+ export interface CreateMemberDTO {
22
+ seller_id: string;
23
+ role?: MemberRole;
24
+ name: string;
25
+ email: string;
26
+ bio?: string;
27
+ photo?: string;
28
+ phone?: string;
29
+ }
30
+ export interface UpdateMemberDTO {
31
+ id: string;
32
+ role?: MemberRole;
33
+ name?: string;
34
+ email?: string;
35
+ bio?: string;
36
+ photo?: string;
37
+ phone?: string;
38
+ }
39
+ export interface CreateMemberInviteDTO extends Omit<MemberInviteDTO, 'id' | 'created_at' | 'updated_at' | 'accepted' | 'expires_at' | 'token'> {
40
+ seller_id: string;
41
+ }
42
+ export interface AcceptMemberInviteDTO {
43
+ token: string;
44
+ name: string;
45
+ }
46
+ export interface UpdateMemberInviteDTO extends Partial<MemberInviteDTO> {
47
+ id: string;
48
+ }
49
+ export interface CreateSellerInvitationDTO {
50
+ email: string;
51
+ registration_url: string;
52
+ }
53
+ //# sourceMappingURL=mutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../../src/types/seller/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAE9E,MAAM,WAAW,eACf,SAAQ,IAAI,CACV,OAAO,CAAC,SAAS,CAAC,EAClB,IAAI,GAAG,YAAY,GAAG,YAAY,GAAG,SAAS,CAC/C;IACD,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,WAAW,CAAA;CAC3B;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,qBACf,SAAQ,IAAI,CACV,eAAe,EACf,IAAI,GAAG,YAAY,GAAG,YAAY,GAAG,UAAU,GAAG,YAAY,GAAG,OAAO,CACzE;IACD,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,qBAAsB,SAAQ,OAAO,CAAC,eAAe,CAAC;IACrE,EAAE,EAAE,MAAM,CAAA;CACX;AAED,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,MAAM,CAAA;IACb,gBAAgB,EAAE,MAAM,CAAA;CACzB"}