@medusajs/utils 3.0.0-snapshot-20250410105645 → 3.0.0-snapshot-20251104004624

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 (460) hide show
  1. package/dist/analytics/abstract-analytics-provider.d.ts +110 -0
  2. package/dist/analytics/abstract-analytics-provider.d.ts.map +1 -0
  3. package/dist/analytics/abstract-analytics-provider.js +107 -0
  4. package/dist/analytics/abstract-analytics-provider.js.map +1 -0
  5. package/dist/analytics/index.d.ts +2 -0
  6. package/dist/analytics/index.d.ts.map +1 -0
  7. package/dist/{feature-flags/utils → analytics}/index.js +1 -1
  8. package/dist/analytics/index.js.map +1 -0
  9. package/dist/auth/token.d.ts +4 -2
  10. package/dist/auth/token.d.ts.map +1 -1
  11. package/dist/auth/token.js +5 -2
  12. package/dist/auth/token.js.map +1 -1
  13. package/dist/bundles.d.ts +1 -0
  14. package/dist/bundles.d.ts.map +1 -1
  15. package/dist/bundles.js +19 -8
  16. package/dist/bundles.js.map +1 -1
  17. package/dist/caching/index.d.ts +59 -0
  18. package/dist/caching/index.d.ts.map +1 -0
  19. package/dist/caching/index.js +132 -0
  20. package/dist/caching/index.js.map +1 -0
  21. package/dist/common/build-query.d.ts +1 -1
  22. package/dist/common/build-query.d.ts.map +1 -1
  23. package/dist/common/camel-to-snake-case.d.ts.map +1 -1
  24. package/dist/common/compress-name.d.ts +2 -0
  25. package/dist/common/compress-name.d.ts.map +1 -0
  26. package/dist/common/compress-name.js +34 -0
  27. package/dist/common/compress-name.js.map +1 -0
  28. package/dist/common/container.d.ts +1 -1
  29. package/dist/common/container.js +1 -1
  30. package/dist/common/create-container-like.d.ts.map +1 -1
  31. package/dist/common/create-container-like.js +9 -1
  32. package/dist/common/create-container-like.js.map +1 -1
  33. package/dist/common/create-psql-index-helper.d.ts +2 -2
  34. package/dist/common/create-psql-index-helper.d.ts.map +1 -1
  35. package/dist/common/create-psql-index-helper.js +4 -2
  36. package/dist/common/create-psql-index-helper.js.map +1 -1
  37. package/dist/common/deep-copy.js +20 -10
  38. package/dist/common/deep-copy.js.map +1 -1
  39. package/dist/common/define-config.d.ts.map +1 -1
  40. package/dist/common/define-config.js +122 -6
  41. package/dist/common/define-config.js.map +1 -1
  42. package/dist/common/define-file-config.d.ts +7 -0
  43. package/dist/common/define-file-config.d.ts.map +1 -0
  44. package/dist/common/define-file-config.js +31 -0
  45. package/dist/common/define-file-config.js.map +1 -0
  46. package/dist/common/dynamic-import.d.ts.map +1 -1
  47. package/dist/common/dynamic-import.js +6 -1
  48. package/dist/common/dynamic-import.js.map +1 -1
  49. package/dist/common/execute-with-concurrency.d.ts +7 -0
  50. package/dist/common/execute-with-concurrency.d.ts.map +1 -0
  51. package/dist/common/execute-with-concurrency.js +26 -0
  52. package/dist/common/execute-with-concurrency.js.map +1 -0
  53. package/dist/common/get-duplicates.d.ts.map +1 -1
  54. package/dist/common/get-iso-string-from-date.d.ts.map +1 -1
  55. package/dist/common/get-resolved-plugins.js +1 -1
  56. package/dist/common/get-resolved-plugins.js.map +1 -1
  57. package/dist/common/get-selects-and-relations-from-object-array.d.ts +2 -1
  58. package/dist/common/get-selects-and-relations-from-object-array.d.ts.map +1 -1
  59. package/dist/common/get-selects-and-relations-from-object-array.js +7 -5
  60. package/dist/common/get-selects-and-relations-from-object-array.js.map +1 -1
  61. package/dist/common/index.d.ts +9 -2
  62. package/dist/common/index.d.ts.map +1 -1
  63. package/dist/common/index.js +9 -2
  64. package/dist/common/index.js.map +1 -1
  65. package/dist/common/medusa-container.js +1 -1
  66. package/dist/common/medusa-container.js.map +1 -1
  67. package/dist/common/normalize-csv-value.d.ts +6 -0
  68. package/dist/common/normalize-csv-value.d.ts.map +1 -0
  69. package/dist/common/normalize-csv-value.js +14 -0
  70. package/dist/common/normalize-csv-value.js.map +1 -0
  71. package/dist/common/normalize-import-path-with-source.d.ts +1 -1
  72. package/dist/common/normalize-import-path-with-source.d.ts.map +1 -1
  73. package/dist/common/normalize-import-path-with-source.js +2 -2
  74. package/dist/common/normalize-import-path-with-source.js.map +1 -1
  75. package/dist/common/optional-numeric-serializer.d.ts.map +1 -1
  76. package/dist/common/parse-stringify-if-necessary.d.ts +11 -0
  77. package/dist/common/parse-stringify-if-necessary.d.ts.map +1 -0
  78. package/dist/common/parse-stringify-if-necessary.js +44 -0
  79. package/dist/common/parse-stringify-if-necessary.js.map +1 -0
  80. package/dist/common/partition-array.d.ts.map +1 -1
  81. package/dist/common/read-dir-recursive.d.ts +2 -1
  82. package/dist/common/read-dir-recursive.d.ts.map +1 -1
  83. package/dist/common/read-dir-recursive.js +4 -3
  84. package/dist/common/read-dir-recursive.js.map +1 -1
  85. package/dist/common/remove-undefined.d.ts.map +1 -1
  86. package/dist/common/retry-execution.d.ts +18 -0
  87. package/dist/common/retry-execution.d.ts.map +1 -0
  88. package/dist/common/retry-execution.js +50 -0
  89. package/dist/common/retry-execution.js.map +1 -0
  90. package/dist/common/to-handle.d.ts.map +1 -1
  91. package/dist/common/to-kebab-case.d.ts.map +1 -1
  92. package/dist/common/try-convert-to-boolean.d.ts +7 -0
  93. package/dist/common/try-convert-to-boolean.d.ts.map +1 -0
  94. package/dist/common/try-convert-to-boolean.js +15 -0
  95. package/dist/common/try-convert-to-boolean.js.map +1 -0
  96. package/dist/common/try-convert-to-number.d.ts +7 -0
  97. package/dist/common/try-convert-to-number.d.ts.map +1 -0
  98. package/dist/common/try-convert-to-number.js +10 -0
  99. package/dist/common/try-convert-to-number.js.map +1 -0
  100. package/dist/common/validate-handle.d.ts.map +1 -1
  101. package/dist/common/wrap-handler.d.ts.map +1 -1
  102. package/dist/core-flows/events.d.ts +783 -0
  103. package/dist/core-flows/events.d.ts.map +1 -1
  104. package/dist/core-flows/events.js +784 -1
  105. package/dist/core-flows/events.js.map +1 -1
  106. package/dist/dal/index.d.ts +4 -3
  107. package/dist/dal/index.d.ts.map +1 -1
  108. package/dist/dal/index.js +4 -3
  109. package/dist/dal/index.js.map +1 -1
  110. package/dist/dal/mikro-orm/base-entity.d.ts +1 -1
  111. package/dist/dal/mikro-orm/base-entity.d.ts.map +1 -1
  112. package/dist/dal/mikro-orm/base-entity.js +1 -1
  113. package/dist/dal/mikro-orm/base-entity.js.map +1 -1
  114. package/dist/dal/mikro-orm/big-number-field.d.ts +1 -1
  115. package/dist/dal/mikro-orm/big-number-field.d.ts.map +1 -1
  116. package/dist/dal/mikro-orm/big-number-field.js +38 -2
  117. package/dist/dal/mikro-orm/big-number-field.js.map +1 -1
  118. package/dist/dal/mikro-orm/custom-db-migrator.d.ts +8 -0
  119. package/dist/dal/mikro-orm/custom-db-migrator.d.ts.map +1 -0
  120. package/dist/dal/mikro-orm/custom-db-migrator.js +47 -0
  121. package/dist/dal/mikro-orm/custom-db-migrator.js.map +1 -0
  122. package/dist/dal/mikro-orm/db-error-mapper.d.ts.map +1 -1
  123. package/dist/dal/mikro-orm/db-error-mapper.js +1 -1
  124. package/dist/dal/mikro-orm/db-error-mapper.js.map +1 -1
  125. package/dist/dal/mikro-orm/decorators/foreign-key.d.ts.map +1 -1
  126. package/dist/dal/mikro-orm/decorators/foreign-key.js +1 -1
  127. package/dist/dal/mikro-orm/decorators/foreign-key.js.map +1 -1
  128. package/dist/dal/mikro-orm/decorators/searchable.d.ts.map +1 -1
  129. package/dist/dal/mikro-orm/decorators/searchable.js +1 -1
  130. package/dist/dal/mikro-orm/decorators/searchable.js.map +1 -1
  131. package/dist/dal/mikro-orm/mikro-orm-create-connection.d.ts +3 -3
  132. package/dist/dal/mikro-orm/mikro-orm-create-connection.d.ts.map +1 -1
  133. package/dist/dal/mikro-orm/mikro-orm-create-connection.js +32 -4
  134. package/dist/dal/mikro-orm/mikro-orm-create-connection.js.map +1 -1
  135. package/dist/dal/mikro-orm/mikro-orm-free-text-search-filter.d.ts +2 -2
  136. package/dist/dal/mikro-orm/mikro-orm-free-text-search-filter.d.ts.map +1 -1
  137. package/dist/dal/mikro-orm/mikro-orm-free-text-search-filter.js +3 -3
  138. package/dist/dal/mikro-orm/mikro-orm-free-text-search-filter.js.map +1 -1
  139. package/dist/dal/mikro-orm/mikro-orm-repository.d.ts +2 -1
  140. package/dist/dal/mikro-orm/mikro-orm-repository.d.ts.map +1 -1
  141. package/dist/dal/mikro-orm/mikro-orm-repository.js +282 -65
  142. package/dist/dal/mikro-orm/mikro-orm-repository.js.map +1 -1
  143. package/dist/dal/mikro-orm/mikro-orm-serializer-old.d.ts +29 -0
  144. package/dist/dal/mikro-orm/mikro-orm-serializer-old.d.ts.map +1 -0
  145. package/dist/dal/mikro-orm/mikro-orm-serializer-old.js +443 -0
  146. package/dist/dal/mikro-orm/mikro-orm-serializer-old.js.map +1 -0
  147. package/dist/dal/mikro-orm/mikro-orm-serializer.d.ts +25 -10
  148. package/dist/dal/mikro-orm/mikro-orm-serializer.d.ts.map +1 -1
  149. package/dist/dal/mikro-orm/mikro-orm-serializer.js +384 -175
  150. package/dist/dal/mikro-orm/mikro-orm-serializer.js.map +1 -1
  151. package/dist/dal/mikro-orm/utils.d.ts +1 -1
  152. package/dist/dal/mikro-orm/utils.d.ts.map +1 -1
  153. package/dist/defaults/countries.js +6 -6
  154. package/dist/defaults/countries.js.map +1 -1
  155. package/dist/defaults/currencies.d.ts.map +1 -1
  156. package/dist/defaults/currencies.js +27 -0
  157. package/dist/defaults/currencies.js.map +1 -1
  158. package/dist/dml/entity-builder.d.ts +1 -1
  159. package/dist/dml/entity-builder.js +1 -1
  160. package/dist/dml/helpers/create-graphql.d.ts.map +1 -1
  161. package/dist/dml/helpers/create-graphql.js +10 -3
  162. package/dist/dml/helpers/create-graphql.js.map +1 -1
  163. package/dist/dml/helpers/create-mikro-orm-entity.d.ts +0 -3
  164. package/dist/dml/helpers/create-mikro-orm-entity.d.ts.map +1 -1
  165. package/dist/dml/helpers/create-mikro-orm-entity.js +5 -4
  166. package/dist/dml/helpers/create-mikro-orm-entity.js.map +1 -1
  167. package/dist/dml/helpers/entity-builder/create-big-number-properties.d.ts.map +1 -1
  168. package/dist/dml/helpers/entity-builder/create-big-number-properties.js +16 -4
  169. package/dist/dml/helpers/entity-builder/create-big-number-properties.js.map +1 -1
  170. package/dist/dml/helpers/entity-builder/define-property.js +1 -1
  171. package/dist/dml/helpers/entity-builder/define-property.js.map +1 -1
  172. package/dist/dml/helpers/entity-builder/define-relationship.js +1 -1
  173. package/dist/dml/helpers/entity-builder/define-relationship.js.map +1 -1
  174. package/dist/dml/helpers/graphql-builder/get-attribute.d.ts.map +1 -1
  175. package/dist/dml/helpers/graphql-builder/get-attribute.js +3 -2
  176. package/dist/dml/helpers/graphql-builder/get-attribute.js.map +1 -1
  177. package/dist/dml/helpers/mikro-orm/apply-checks.js +1 -1
  178. package/dist/dml/helpers/mikro-orm/apply-checks.js.map +1 -1
  179. package/dist/dml/helpers/mikro-orm/build-indexes.js +1 -1
  180. package/dist/dml/helpers/mikro-orm/build-indexes.js.map +1 -1
  181. package/dist/dml/properties/autoincrement.d.ts +20 -1
  182. package/dist/dml/properties/autoincrement.d.ts.map +1 -1
  183. package/dist/dml/properties/autoincrement.js +19 -0
  184. package/dist/dml/properties/autoincrement.js.map +1 -1
  185. package/dist/dml/properties/big-number.d.ts +2 -0
  186. package/dist/dml/properties/big-number.d.ts.map +1 -1
  187. package/dist/dml/properties/big-number.js +4 -0
  188. package/dist/dml/properties/big-number.js.map +1 -1
  189. package/dist/dml/properties/id.d.ts +1 -1
  190. package/dist/dml/properties/id.d.ts.map +1 -1
  191. package/dist/dml/properties/id.js.map +1 -1
  192. package/dist/dml/properties/primary-key.d.ts +1 -0
  193. package/dist/dml/properties/primary-key.d.ts.map +1 -1
  194. package/dist/dml/properties/primary-key.js +8 -5
  195. package/dist/dml/properties/primary-key.js.map +1 -1
  196. package/dist/dml/relations/belongs-to.d.ts.map +1 -1
  197. package/dist/dml/relations/has-many.d.ts.map +1 -1
  198. package/dist/dml/relations/has-one-fk.d.ts.map +1 -1
  199. package/dist/dml/relations/has-one.d.ts.map +1 -1
  200. package/dist/dml/relations/many-to-many.d.ts.map +1 -1
  201. package/dist/event-bus/index.d.ts +30 -2
  202. package/dist/event-bus/index.d.ts.map +1 -1
  203. package/dist/event-bus/index.js +39 -0
  204. package/dist/event-bus/index.js.map +1 -1
  205. package/dist/event-bus/message-aggregator.d.ts +1 -1
  206. package/dist/event-bus/message-aggregator.d.ts.map +1 -1
  207. package/dist/event-bus/message-aggregator.js +30 -8
  208. package/dist/event-bus/message-aggregator.js.map +1 -1
  209. package/dist/event-bus/utils.d.ts.map +1 -1
  210. package/dist/event-bus/utils.js +1 -2
  211. package/dist/event-bus/utils.js.map +1 -1
  212. package/dist/exceptions/is-duplicate-error.d.ts.map +1 -1
  213. package/dist/feature-flags/discover-and-register-feature-flags.d.ts +15 -0
  214. package/dist/feature-flags/discover-and-register-feature-flags.d.ts.map +1 -0
  215. package/dist/feature-flags/discover-and-register-feature-flags.js +23 -0
  216. package/dist/feature-flags/discover-and-register-feature-flags.js.map +1 -0
  217. package/dist/feature-flags/discover-feature-flags.d.ts +6 -0
  218. package/dist/feature-flags/discover-feature-flags.d.ts.map +1 -0
  219. package/dist/feature-flags/discover-feature-flags.js +53 -0
  220. package/dist/feature-flags/discover-feature-flags.js.map +1 -0
  221. package/dist/feature-flags/{utils/flag-router.d.ts → flag-router.d.ts} +1 -0
  222. package/dist/feature-flags/flag-router.d.ts.map +1 -0
  223. package/dist/feature-flags/{utils/flag-router.js → flag-router.js} +3 -2
  224. package/dist/feature-flags/flag-router.js.map +1 -0
  225. package/dist/feature-flags/index.d.ts +4 -10
  226. package/dist/feature-flags/index.d.ts.map +1 -1
  227. package/dist/feature-flags/index.js +4 -10
  228. package/dist/feature-flags/index.js.map +1 -1
  229. package/dist/feature-flags/register-flag.d.ts +18 -0
  230. package/dist/feature-flags/register-flag.d.ts.map +1 -0
  231. package/dist/feature-flags/register-flag.js +41 -0
  232. package/dist/feature-flags/register-flag.js.map +1 -0
  233. package/dist/file/abstract-file-provider.d.ts +61 -9
  234. package/dist/file/abstract-file-provider.d.ts.map +1 -1
  235. package/dist/file/abstract-file-provider.js +64 -9
  236. package/dist/file/abstract-file-provider.js.map +1 -1
  237. package/dist/fulfillment/events.d.ts +6 -0
  238. package/dist/fulfillment/events.d.ts.map +1 -1
  239. package/dist/fulfillment/events.js +6 -0
  240. package/dist/fulfillment/events.js.map +1 -1
  241. package/dist/fulfillment/provider.d.ts +4 -4
  242. package/dist/fulfillment/provider.js +4 -4
  243. package/dist/graphql/graphql-to-ts-types.d.ts.map +1 -1
  244. package/dist/graphql/graphql-to-ts-types.js +40 -9
  245. package/dist/graphql/graphql-to-ts-types.js.map +1 -1
  246. package/dist/index.d.ts +2 -0
  247. package/dist/index.d.ts.map +1 -1
  248. package/dist/index.js +2 -0
  249. package/dist/index.js.map +1 -1
  250. package/dist/link/compose-link-name.d.ts.map +1 -1
  251. package/dist/migrations/index.d.ts +3 -3
  252. package/dist/migrations/index.d.ts.map +1 -1
  253. package/dist/migrations/index.js +37 -3
  254. package/dist/migrations/index.js.map +1 -1
  255. package/dist/modules-sdk/build-query.d.ts.map +1 -1
  256. package/dist/modules-sdk/build-query.js +5 -11
  257. package/dist/modules-sdk/build-query.js.map +1 -1
  258. package/dist/modules-sdk/create-medusa-mikro-orm-event-subscriber.d.ts +16 -0
  259. package/dist/modules-sdk/create-medusa-mikro-orm-event-subscriber.d.ts.map +1 -0
  260. package/dist/modules-sdk/create-medusa-mikro-orm-event-subscriber.js +50 -0
  261. package/dist/modules-sdk/create-medusa-mikro-orm-event-subscriber.js.map +1 -0
  262. package/dist/modules-sdk/create-pg-connection.d.ts +1 -1
  263. package/dist/modules-sdk/create-pg-connection.d.ts.map +1 -1
  264. package/dist/modules-sdk/create-pg-connection.js +13 -2
  265. package/dist/modules-sdk/create-pg-connection.js.map +1 -1
  266. package/dist/modules-sdk/decorators/context-parameter.d.ts.map +1 -1
  267. package/dist/modules-sdk/decorators/emit-events.d.ts.map +1 -1
  268. package/dist/modules-sdk/decorators/inject-manager.d.ts.map +1 -1
  269. package/dist/modules-sdk/decorators/inject-manager.js +4 -3
  270. package/dist/modules-sdk/decorators/inject-manager.js.map +1 -1
  271. package/dist/modules-sdk/decorators/inject-transaction-manager.d.ts.map +1 -1
  272. package/dist/modules-sdk/decorators/inject-transaction-manager.js +7 -9
  273. package/dist/modules-sdk/decorators/inject-transaction-manager.js.map +1 -1
  274. package/dist/modules-sdk/define-link.d.ts +2 -0
  275. package/dist/modules-sdk/define-link.d.ts.map +1 -1
  276. package/dist/modules-sdk/define-link.js +11 -0
  277. package/dist/modules-sdk/define-link.js.map +1 -1
  278. package/dist/modules-sdk/definition.d.ts +9 -0
  279. package/dist/modules-sdk/definition.d.ts.map +1 -1
  280. package/dist/modules-sdk/definition.js +6 -0
  281. package/dist/modules-sdk/definition.js.map +1 -1
  282. package/dist/modules-sdk/event-builder-factory.d.ts.map +1 -1
  283. package/dist/modules-sdk/index.d.ts +1 -0
  284. package/dist/modules-sdk/index.d.ts.map +1 -1
  285. package/dist/modules-sdk/index.js +1 -0
  286. package/dist/modules-sdk/index.js.map +1 -1
  287. package/dist/modules-sdk/joiner-config-builder.d.ts +7 -1
  288. package/dist/modules-sdk/joiner-config-builder.d.ts.map +1 -1
  289. package/dist/modules-sdk/joiner-config-builder.js +42 -8
  290. package/dist/modules-sdk/joiner-config-builder.js.map +1 -1
  291. package/dist/modules-sdk/load-module-database-config.d.ts.map +1 -1
  292. package/dist/modules-sdk/load-module-database-config.js +15 -1
  293. package/dist/modules-sdk/load-module-database-config.js.map +1 -1
  294. package/dist/modules-sdk/loaders/container-loader-factory.js +1 -1
  295. package/dist/modules-sdk/loaders/container-loader-factory.js.map +1 -1
  296. package/dist/modules-sdk/loaders/mikro-orm-connection-loader.d.ts.map +1 -1
  297. package/dist/modules-sdk/loaders/mikro-orm-connection-loader.js +1 -1
  298. package/dist/modules-sdk/loaders/mikro-orm-connection-loader.js.map +1 -1
  299. package/dist/modules-sdk/medusa-internal-service.d.ts +14 -3
  300. package/dist/modules-sdk/medusa-internal-service.d.ts.map +1 -1
  301. package/dist/modules-sdk/medusa-internal-service.js +126 -3
  302. package/dist/modules-sdk/medusa-internal-service.js.map +1 -1
  303. package/dist/modules-sdk/medusa-service.d.ts.map +1 -1
  304. package/dist/modules-sdk/medusa-service.js +89 -56
  305. package/dist/modules-sdk/medusa-service.js.map +1 -1
  306. package/dist/modules-sdk/migration-scripts/migration-down.d.ts.map +1 -1
  307. package/dist/modules-sdk/migration-scripts/migration-down.js +4 -2
  308. package/dist/modules-sdk/migration-scripts/migration-down.js.map +1 -1
  309. package/dist/modules-sdk/migration-scripts/migration-generate.d.ts +1 -1
  310. package/dist/modules-sdk/migration-scripts/migration-generate.d.ts.map +1 -1
  311. package/dist/modules-sdk/migration-scripts/migration-generate.js +3 -3
  312. package/dist/modules-sdk/migration-scripts/migration-generate.js.map +1 -1
  313. package/dist/modules-sdk/migration-scripts/migration-up.d.ts.map +1 -1
  314. package/dist/modules-sdk/migration-scripts/migration-up.js +4 -2
  315. package/dist/modules-sdk/migration-scripts/migration-up.js.map +1 -1
  316. package/dist/modules-sdk/migration-scripts/seed.d.ts.map +1 -1
  317. package/dist/modules-sdk/migration-scripts/seed.js +4 -1
  318. package/dist/modules-sdk/migration-scripts/seed.js.map +1 -1
  319. package/dist/modules-sdk/mikro-orm-cli-config-builder.d.ts +1 -1
  320. package/dist/modules-sdk/mikro-orm-cli-config-builder.d.ts.map +1 -1
  321. package/dist/modules-sdk/mikro-orm-cli-config-builder.js +2 -1
  322. package/dist/modules-sdk/mikro-orm-cli-config-builder.js.map +1 -1
  323. package/dist/modules-sdk/module.d.ts.map +1 -1
  324. package/dist/modules-sdk/module.js +2 -0
  325. package/dist/modules-sdk/module.js.map +1 -1
  326. package/dist/modules-sdk/modules-to-container-types.d.ts.map +1 -1
  327. package/dist/modules-sdk/modules-to-container-types.js +2 -1
  328. package/dist/modules-sdk/modules-to-container-types.js.map +1 -1
  329. package/dist/modules-sdk/query-context.d.ts +2 -2
  330. package/dist/modules-sdk/query-context.d.ts.map +1 -1
  331. package/dist/modules-sdk/query-context.js.map +1 -1
  332. package/dist/modules-sdk/types/medusa-service.d.ts +15 -1
  333. package/dist/modules-sdk/types/medusa-service.d.ts.map +1 -1
  334. package/dist/payment/abstract-payment-provider.d.ts +145 -32
  335. package/dist/payment/abstract-payment-provider.d.ts.map +1 -1
  336. package/dist/payment/abstract-payment-provider.js +6 -3
  337. package/dist/payment/abstract-payment-provider.js.map +1 -1
  338. package/dist/payment/index.d.ts +0 -1
  339. package/dist/payment/index.d.ts.map +1 -1
  340. package/dist/payment/index.js +0 -1
  341. package/dist/payment/index.js.map +1 -1
  342. package/dist/pg/index.d.ts +1 -1
  343. package/dist/pg/index.d.ts.map +1 -1
  344. package/dist/pg/index.js +1 -1
  345. package/dist/pg/index.js.map +1 -1
  346. package/dist/product/csv-normalizer.d.ts +43 -0
  347. package/dist/product/csv-normalizer.d.ts.map +1 -0
  348. package/dist/product/csv-normalizer.js +382 -0
  349. package/dist/product/csv-normalizer.js.map +1 -0
  350. package/dist/product/enums.d.ts +7 -0
  351. package/dist/product/enums.d.ts.map +1 -0
  352. package/dist/product/enums.js +11 -0
  353. package/dist/product/enums.js.map +1 -0
  354. package/dist/product/events.d.ts +6 -0
  355. package/dist/product/events.d.ts.map +1 -1
  356. package/dist/product/events.js +1 -0
  357. package/dist/product/events.js.map +1 -1
  358. package/dist/product/get-variant-availability.d.ts +3 -3
  359. package/dist/product/get-variant-availability.d.ts.map +1 -1
  360. package/dist/product/get-variant-availability.js +13 -2
  361. package/dist/product/get-variant-availability.js.map +1 -1
  362. package/dist/product/index.d.ts +3 -6
  363. package/dist/product/index.d.ts.map +1 -1
  364. package/dist/product/index.js +26 -8
  365. package/dist/product/index.js.map +1 -1
  366. package/dist/product/validators.d.ts +894 -0
  367. package/dist/product/validators.d.ts.map +1 -0
  368. package/dist/product/validators.js +163 -0
  369. package/dist/product/validators.js.map +1 -0
  370. package/dist/promotion/index.d.ts +5 -2
  371. package/dist/promotion/index.d.ts.map +1 -1
  372. package/dist/promotion/index.js +3 -0
  373. package/dist/promotion/index.js.map +1 -1
  374. package/dist/totals/adjustment/index.d.ts +11 -6
  375. package/dist/totals/adjustment/index.d.ts.map +1 -1
  376. package/dist/totals/adjustment/index.js +25 -19
  377. package/dist/totals/adjustment/index.js.map +1 -1
  378. package/dist/totals/big-number.d.ts +5 -1
  379. package/dist/totals/big-number.d.ts.map +1 -1
  380. package/dist/totals/big-number.js +26 -14
  381. package/dist/totals/big-number.js.map +1 -1
  382. package/dist/totals/cart/index.d.ts +1 -0
  383. package/dist/totals/cart/index.d.ts.map +1 -1
  384. package/dist/totals/cart/index.js +19 -4
  385. package/dist/totals/cart/index.js.map +1 -1
  386. package/dist/totals/credit-lines/index.d.ts +3 -3
  387. package/dist/totals/credit-lines/index.d.ts.map +1 -1
  388. package/dist/totals/credit-lines/index.js +4 -3
  389. package/dist/totals/credit-lines/index.js.map +1 -1
  390. package/dist/totals/line-item/index.d.ts +2 -1
  391. package/dist/totals/line-item/index.d.ts.map +1 -1
  392. package/dist/totals/line-item/index.js +42 -18
  393. package/dist/totals/line-item/index.js.map +1 -1
  394. package/dist/totals/math.d.ts +4 -2
  395. package/dist/totals/math.d.ts.map +1 -1
  396. package/dist/totals/math.js +18 -10
  397. package/dist/totals/math.js.map +1 -1
  398. package/dist/totals/promotion/index.d.ts +2 -2
  399. package/dist/totals/promotion/index.d.ts.map +1 -1
  400. package/dist/totals/promotion/index.js +46 -26
  401. package/dist/totals/promotion/index.js.map +1 -1
  402. package/dist/totals/shipping-method/index.d.ts +1 -0
  403. package/dist/totals/shipping-method/index.d.ts.map +1 -1
  404. package/dist/totals/shipping-method/index.js +3 -1
  405. package/dist/totals/shipping-method/index.js.map +1 -1
  406. package/dist/totals/tax/index.d.ts +1 -1
  407. package/dist/totals/tax/index.d.ts.map +1 -1
  408. package/dist/totals/tax/index.js +0 -3
  409. package/dist/totals/tax/index.js.map +1 -1
  410. package/dist/tsconfig.tsbuildinfo +1 -1
  411. package/package.json +11 -29
  412. package/dist/common/set-metadata.d.ts +0 -10
  413. package/dist/common/set-metadata.d.ts.map +0 -1
  414. package/dist/common/set-metadata.js +0 -37
  415. package/dist/common/set-metadata.js.map +0 -1
  416. package/dist/feature-flags/analytics.d.ts +0 -3
  417. package/dist/feature-flags/analytics.d.ts.map +0 -1
  418. package/dist/feature-flags/analytics.js +0 -10
  419. package/dist/feature-flags/analytics.js.map +0 -1
  420. package/dist/feature-flags/many-to-many-inventory.d.ts +0 -3
  421. package/dist/feature-flags/many-to-many-inventory.d.ts.map +0 -1
  422. package/dist/feature-flags/many-to-many-inventory.js +0 -10
  423. package/dist/feature-flags/many-to-many-inventory.js.map +0 -1
  424. package/dist/feature-flags/medusa-v2.d.ts +0 -3
  425. package/dist/feature-flags/medusa-v2.d.ts.map +0 -1
  426. package/dist/feature-flags/medusa-v2.js +0 -10
  427. package/dist/feature-flags/medusa-v2.js.map +0 -1
  428. package/dist/feature-flags/order-editing.d.ts +0 -3
  429. package/dist/feature-flags/order-editing.d.ts.map +0 -1
  430. package/dist/feature-flags/order-editing.js +0 -10
  431. package/dist/feature-flags/order-editing.js.map +0 -1
  432. package/dist/feature-flags/product-categories.d.ts +0 -3
  433. package/dist/feature-flags/product-categories.d.ts.map +0 -1
  434. package/dist/feature-flags/product-categories.js +0 -10
  435. package/dist/feature-flags/product-categories.js.map +0 -1
  436. package/dist/feature-flags/publishable-api-keys.d.ts +0 -3
  437. package/dist/feature-flags/publishable-api-keys.d.ts.map +0 -1
  438. package/dist/feature-flags/publishable-api-keys.js +0 -10
  439. package/dist/feature-flags/publishable-api-keys.js.map +0 -1
  440. package/dist/feature-flags/sales-channels.d.ts +0 -3
  441. package/dist/feature-flags/sales-channels.d.ts.map +0 -1
  442. package/dist/feature-flags/sales-channels.js +0 -10
  443. package/dist/feature-flags/sales-channels.js.map +0 -1
  444. package/dist/feature-flags/tax-inclusive-pricing.d.ts +0 -3
  445. package/dist/feature-flags/tax-inclusive-pricing.d.ts.map +0 -1
  446. package/dist/feature-flags/tax-inclusive-pricing.js +0 -10
  447. package/dist/feature-flags/tax-inclusive-pricing.js.map +0 -1
  448. package/dist/feature-flags/utils/flag-router.d.ts.map +0 -1
  449. package/dist/feature-flags/utils/flag-router.js.map +0 -1
  450. package/dist/feature-flags/utils/index.d.ts +0 -2
  451. package/dist/feature-flags/utils/index.d.ts.map +0 -1
  452. package/dist/feature-flags/utils/index.js.map +0 -1
  453. package/dist/feature-flags/workflows.d.ts +0 -3
  454. package/dist/feature-flags/workflows.d.ts.map +0 -1
  455. package/dist/feature-flags/workflows.js +0 -10
  456. package/dist/feature-flags/workflows.js.map +0 -1
  457. package/dist/payment/events.d.ts +0 -5
  458. package/dist/payment/events.d.ts.map +0 -1
  459. package/dist/payment/events.js +0 -8
  460. package/dist/payment/events.js.map +0 -1
@@ -1,88 +1,871 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RegionWorkflowEvents = exports.InviteWorkflowEvents = exports.ProductOptionWorkflowEvents = exports.ProductTagWorkflowEvents = exports.ProductTypeWorkflowEvents = exports.ProductWorkflowEvents = exports.ProductVariantWorkflowEvents = exports.ProductCollectionWorkflowEvents = exports.ProductCategoryWorkflowEvents = exports.SalesChannelWorkflowEvents = exports.AuthWorkflowEvents = exports.UserWorkflowEvents = exports.OrderWorkflowEvents = exports.CustomerWorkflowEvents = exports.CartWorkflowEvents = void 0;
3
+ exports.PaymentEvents = exports.ShippingOptionTypeWorkflowEvents = exports.FulfillmentWorkflowEvents = exports.RegionWorkflowEvents = exports.InviteWorkflowEvents = exports.ProductOptionWorkflowEvents = exports.ProductTagWorkflowEvents = exports.ProductTypeWorkflowEvents = exports.ProductWorkflowEvents = exports.ProductVariantWorkflowEvents = exports.ProductCollectionWorkflowEvents = exports.ProductCategoryWorkflowEvents = exports.SalesChannelWorkflowEvents = exports.AuthWorkflowEvents = exports.UserWorkflowEvents = exports.OrderEditWorkflowEvents = exports.OrderWorkflowEvents = exports.CustomerWorkflowEvents = exports.CartWorkflowEvents = void 0;
4
+ /**
5
+ * @category Cart
6
+ * @customNamespace Cart
7
+ */
4
8
  exports.CartWorkflowEvents = {
9
+ /**
10
+ * Emitted when a cart is created.
11
+ *
12
+ * @eventPayload
13
+ * ```ts
14
+ * {
15
+ * id, // The ID of the cart
16
+ * }
17
+ * ```
18
+ */
5
19
  CREATED: "cart.created",
20
+ /**
21
+ * Emitted when a cart's details are updated.
22
+ *
23
+ * @eventPayload
24
+ * ```ts
25
+ * {
26
+ * id, // The ID of the cart
27
+ * }
28
+ * ```
29
+ */
6
30
  UPDATED: "cart.updated",
31
+ /**
32
+ * Emitted when the customer in the cart is updated.
33
+ *
34
+ * @eventPayload
35
+ * ```ts
36
+ * {
37
+ * id, // The ID of the cart
38
+ * }
39
+ * ```
40
+ */
7
41
  CUSTOMER_UPDATED: "cart.customer_updated",
42
+ /**
43
+ * Emitted when the cart's region is updated. This
44
+ * event is emitted alongside the `cart.updated` event.
45
+ *
46
+ * @eventPayload
47
+ * ```ts
48
+ * {
49
+ * id, // The ID of the cart
50
+ * }
51
+ * ```
52
+ */
8
53
  REGION_UPDATED: "cart.region_updated",
54
+ /**
55
+ * Emitted when the customer in the cart is transferred.
56
+ *
57
+ * @since 2.8.0
58
+ *
59
+ * @eventPayload
60
+ * ```ts
61
+ * {
62
+ * id, // The ID of the cart
63
+ * customer_id, // The ID of the customer
64
+ * }
65
+ * ```
66
+ */
67
+ CUSTOMER_TRANSFERRED: "cart.customer_transferred",
9
68
  };
69
+ /**
70
+ * @category Customer
71
+ * @customNamespace Customer
72
+ */
10
73
  exports.CustomerWorkflowEvents = {
74
+ /**
75
+ * Emitted when a customer is created.
76
+ *
77
+ * @eventPayload
78
+ * ```ts
79
+ * [{
80
+ * id, // The ID of the customer
81
+ * }]
82
+ * ```
83
+ */
11
84
  CREATED: "customer.created",
85
+ /**
86
+ * Emitted when a customer is updated.
87
+ *
88
+ * @eventPayload
89
+ * ```ts
90
+ * [{
91
+ * id, // The ID of the customer
92
+ * }]
93
+ * ```
94
+ */
12
95
  UPDATED: "customer.updated",
96
+ /**
97
+ * Emitted when a customer is deleted.
98
+ *
99
+ * @eventPayload
100
+ * ```ts
101
+ * [{
102
+ * id, // The ID of the customer
103
+ * }]
104
+ * ```
105
+ */
13
106
  DELETED: "customer.deleted",
14
107
  };
108
+ /**
109
+ * @category Order
110
+ * @customNamespace Order
111
+ */
15
112
  exports.OrderWorkflowEvents = {
113
+ /**
114
+ * Emitted when the details of an order or draft order is updated. This
115
+ * doesn't include updates made by an edit.
116
+ *
117
+ * @eventPayload
118
+ * ```ts
119
+ * {
120
+ * id, // The ID of the order
121
+ * }
122
+ * ```
123
+ */
16
124
  UPDATED: "order.updated",
125
+ /**
126
+ * Emitted when an order is placed, or when a draft order is converted to an
127
+ * order.
128
+ *
129
+ * @eventPayload
130
+ * ```ts
131
+ * {
132
+ * id, // The ID of the order
133
+ * }
134
+ * ```
135
+ */
17
136
  PLACED: "order.placed",
137
+ /**
138
+ * Emitted when an order is canceld.
139
+ *
140
+ * @eventPayload
141
+ * ```ts
142
+ * {
143
+ * id, // The ID of the order
144
+ * }
145
+ * ```
146
+ */
18
147
  CANCELED: "order.canceled",
148
+ /**
149
+ * Emitted when orders are completed.
150
+ *
151
+ * @eventPayload
152
+ * ```ts
153
+ * [{
154
+ * id, // The ID of the order
155
+ * }]
156
+ * ```
157
+ */
19
158
  COMPLETED: "order.completed",
159
+ /**
160
+ * Emitted when an order is archived.
161
+ *
162
+ * @eventPayload
163
+ * ```ts
164
+ * [{
165
+ * id, // The ID of the order
166
+ * }]
167
+ * ```
168
+ */
20
169
  ARCHIVED: "order.archived",
170
+ /**
171
+ * Emitted when a fulfillment is created for an order.
172
+ *
173
+ * @eventPayload
174
+ * ```ts
175
+ * {
176
+ * order_id, // The ID of the order
177
+ * fulfillment_id, // The ID of the fulfillment
178
+ * no_notification, // (boolean) Whether to notify the customer
179
+ * }
180
+ * ```
181
+ */
21
182
  FULFILLMENT_CREATED: "order.fulfillment_created",
183
+ /**
184
+ * Emitted when an order's fulfillment is canceled.
185
+ *
186
+ * @eventPayload
187
+ * ```ts
188
+ * {
189
+ * order_id, // The ID of the order
190
+ * fulfillment_id, // The ID of the fulfillment
191
+ * no_notification, // (boolean) Whether to notify the customer
192
+ * }
193
+ * ```
194
+ */
22
195
  FULFILLMENT_CANCELED: "order.fulfillment_canceled",
196
+ /**
197
+ * Emitted when a return request is confirmed.
198
+ *
199
+ * @eventPayload
200
+ * ```ts
201
+ * {
202
+ * order_id, // The ID of the order
203
+ * return_id, // The ID of the return
204
+ * }
205
+ * ```
206
+ */
23
207
  RETURN_REQUESTED: "order.return_requested",
208
+ /**
209
+ * Emitted when a return is marked as received.
210
+ *
211
+ * @eventPayload
212
+ * ```ts
213
+ * {
214
+ * order_id, // The ID of the order
215
+ * return_id, // The ID of the return
216
+ * }
217
+ * ```
218
+ */
24
219
  RETURN_RECEIVED: "order.return_received",
220
+ /**
221
+ * Emitted when a claim is created for an order.
222
+ *
223
+ * @eventPayload
224
+ * ```ts
225
+ * {
226
+ * order_id, // The ID of the order
227
+ * claim_id, // The ID of the claim
228
+ * }
229
+ * ```
230
+ */
25
231
  CLAIM_CREATED: "order.claim_created",
232
+ /**
233
+ * Emitted when an exchange is created for an order.
234
+ *
235
+ * @eventPayload
236
+ * ```ts
237
+ * {
238
+ * order_id, // The ID of the order
239
+ * exchange_id, // The ID of the exchange
240
+ * }
241
+ * ```
242
+ */
26
243
  EXCHANGE_CREATED: "order.exchange_created",
244
+ /**
245
+ * Emitted when an order is requested to be transferred to
246
+ * another customer.
247
+ *
248
+ * @eventPayload
249
+ * ```ts
250
+ * {
251
+ * id, // The ID of the order
252
+ * order_change_id, // The ID of the order change created for the transfer
253
+ * }
254
+ * ```
255
+ */
27
256
  TRANSFER_REQUESTED: "order.transfer_requested",
28
257
  };
258
+ /**
259
+ * @category Order Edit
260
+ * @customNamespace Order
261
+ */
262
+ exports.OrderEditWorkflowEvents = {
263
+ /**
264
+ * Emitted when an order edit is requested.
265
+ *
266
+ * @since 2.8.0
267
+ *
268
+ * @eventPayload
269
+ * ```ts
270
+ * {
271
+ * order_id, // The ID of the order
272
+ * actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order
273
+ * }
274
+ * ```
275
+ */
276
+ REQUESTED: "order-edit.requested",
277
+ /**
278
+ * Emitted when an order edit request is confirmed.
279
+ *
280
+ * @since 2.8.0
281
+ *
282
+ * @eventPayload
283
+ * ```ts
284
+ * {
285
+ * order_id, // The ID of the order
286
+ * actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order
287
+ * }
288
+ * ```
289
+ */
290
+ CONFIRMED: "order-edit.confirmed",
291
+ /**
292
+ * Emitted when an order edit request is canceled.
293
+ *
294
+ * @since 2.8.0
295
+ *
296
+ * @eventPayload
297
+ * ```ts
298
+ * {
299
+ * order_id, // The ID of the order
300
+ * actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order
301
+ * }
302
+ * ```
303
+ */
304
+ CANCELED: "order-edit.canceled",
305
+ };
306
+ /**
307
+ * @category User
308
+ * @customNamespace User
309
+ */
29
310
  exports.UserWorkflowEvents = {
311
+ /**
312
+ * Emitted when users are created.
313
+ *
314
+ * @eventPayload
315
+ * ```ts
316
+ * [{
317
+ * id, // The ID of the user
318
+ * }]
319
+ * ```
320
+ */
30
321
  CREATED: "user.created",
322
+ /**
323
+ * Emitted when users are updated.
324
+ *
325
+ * @eventPayload
326
+ * ```ts
327
+ * [{
328
+ * id, // The ID of the user
329
+ * }]
330
+ * ```
331
+ */
31
332
  UPDATED: "user.updated",
333
+ /**
334
+ * Emitted when users are deleted.
335
+ *
336
+ * @eventPayload
337
+ * ```ts
338
+ * [{
339
+ * id, // The ID of the user
340
+ * }]
341
+ * ```
342
+ */
32
343
  DELETED: "user.deleted",
33
344
  };
345
+ /**
346
+ * @category Auth
347
+ * @customNamespace Auth
348
+ */
34
349
  exports.AuthWorkflowEvents = {
350
+ /**
351
+ * Emitted when a reset password token is generated. You can listen to this event
352
+ * to send a reset password email to the user or customer, for example.
353
+ *
354
+ * @eventPayload
355
+ * ```ts
356
+ * {
357
+ * entity_id, // The identifier of the user or customer. For example, an email address.
358
+ * actor_type, // The type of actor. For example, "customer", "user", or custom.
359
+ * token, // The generated token.
360
+ * }
361
+ * ```
362
+ */
35
363
  PASSWORD_RESET: "auth.password_reset",
36
364
  };
365
+ /**
366
+ * @category Sales Channel
367
+ * @customNamespace Sales Channel
368
+ */
37
369
  exports.SalesChannelWorkflowEvents = {
370
+ /**
371
+ * Emitted when sales channels are created.
372
+ *
373
+ * @eventPayload
374
+ * ```ts
375
+ * [{
376
+ * id, // The ID of the sales channel
377
+ * }]
378
+ * ```
379
+ */
38
380
  CREATED: "sales-channel.created",
381
+ /**
382
+ * Emitted when sales channels are updated.
383
+ *
384
+ * @eventPayload
385
+ * ```ts
386
+ * [{
387
+ * id, // The ID of the sales channel
388
+ * }]
389
+ * ```
390
+ */
39
391
  UPDATED: "sales-channel.updated",
392
+ /**
393
+ * Emitted when sales channels are deleted.
394
+ *
395
+ * @eventPayload
396
+ * ```ts
397
+ * [{
398
+ * id, // The ID of the sales channel
399
+ * }]
400
+ * ```
401
+ */
40
402
  DELETED: "sales-channel.deleted",
41
403
  };
404
+ /**
405
+ * @category Product Category
406
+ * @customNamespace Product
407
+ */
42
408
  exports.ProductCategoryWorkflowEvents = {
409
+ /**
410
+ * Emitted when product categories are created.
411
+ *
412
+ * @eventPayload
413
+ * ```ts
414
+ * [{
415
+ * id, // The ID of the product category
416
+ * }]
417
+ * ```
418
+ */
43
419
  CREATED: "product-category.created",
420
+ /**
421
+ * Emitted when product categories are updated.
422
+ *
423
+ * @eventPayload
424
+ * ```ts
425
+ * [{
426
+ * id, // The ID of the product category
427
+ * }]
428
+ * ```
429
+ */
44
430
  UPDATED: "product-category.updated",
431
+ /**
432
+ * Emitted when product categories are deleted.
433
+ *
434
+ * @eventPayload
435
+ * ```ts
436
+ * [{
437
+ * id, // The ID of the product category
438
+ * }]
439
+ * ```
440
+ */
45
441
  DELETED: "product-category.deleted",
46
442
  };
443
+ /**
444
+ * @category Product Collection
445
+ * @customNamespace Product
446
+ */
47
447
  exports.ProductCollectionWorkflowEvents = {
448
+ /**
449
+ * Emitted when product collections are created.
450
+ *
451
+ * @eventPayload
452
+ * ```ts
453
+ * [{
454
+ * id, // The ID of the product collection
455
+ * }]
456
+ * ```
457
+ */
48
458
  CREATED: "product-collection.created",
459
+ /**
460
+ * Emitted when product collections are updated.
461
+ *
462
+ * @eventPayload
463
+ * ```ts
464
+ * [{
465
+ * id, // The ID of the product collection
466
+ * }]
467
+ * ```
468
+ */
49
469
  UPDATED: "product-collection.updated",
470
+ /**
471
+ * Emitted when product collections are deleted.
472
+ *
473
+ * @eventPayload
474
+ * ```ts
475
+ * [{
476
+ * id, // The ID of the product collection
477
+ * }]
478
+ * ```
479
+ */
50
480
  DELETED: "product-collection.deleted",
51
481
  };
482
+ /**
483
+ * @category Product Variant
484
+ * @customNamespace Product
485
+ */
52
486
  exports.ProductVariantWorkflowEvents = {
487
+ /**
488
+ * Emitted when product variants are updated.
489
+ *
490
+ * @eventPayload
491
+ * ```ts
492
+ * [{
493
+ * id, // The ID of the product variant
494
+ * }]
495
+ * ```
496
+ */
53
497
  UPDATED: "product-variant.updated",
498
+ /**
499
+ * Emitted when product variants are created.
500
+ *
501
+ * @eventPayload
502
+ * ```ts
503
+ * [{
504
+ * id, // The ID of the product variant
505
+ * }]
506
+ * ```
507
+ */
54
508
  CREATED: "product-variant.created",
509
+ /**
510
+ * Emitted when product variants are deleted.
511
+ *
512
+ * @eventPayload
513
+ * ```ts
514
+ * [{
515
+ * id, // The ID of the product variant
516
+ * }]
517
+ * ```
518
+ */
55
519
  DELETED: "product-variant.deleted",
56
520
  };
521
+ /**
522
+ * @category Product
523
+ * @customNamespace Product
524
+ */
57
525
  exports.ProductWorkflowEvents = {
526
+ /**
527
+ * Emitted when products are updated.
528
+ *
529
+ * @eventPayload
530
+ * ```ts
531
+ * [{
532
+ * id, // The ID of the product
533
+ * }]
534
+ * ```
535
+ */
58
536
  UPDATED: "product.updated",
537
+ /**
538
+ * Emitted when products are created.
539
+ *
540
+ * @eventPayload
541
+ * ```ts
542
+ * [{
543
+ * id, // The ID of the product
544
+ * }]
545
+ * ```
546
+ */
59
547
  CREATED: "product.created",
548
+ /**
549
+ * Emitted when products are deleted.
550
+ *
551
+ * @eventPayload
552
+ * ```ts
553
+ * [{
554
+ * id, // The ID of the product
555
+ * }]
556
+ * ```
557
+ */
60
558
  DELETED: "product.deleted",
61
559
  };
560
+ /**
561
+ * @category Product Type
562
+ * @customNamespace Product
563
+ */
62
564
  exports.ProductTypeWorkflowEvents = {
565
+ /**
566
+ * Emitted when product types are updated.
567
+ *
568
+ * @eventPayload
569
+ * ```ts
570
+ * [{
571
+ * id, // The ID of the product type
572
+ * }]
573
+ * ```
574
+ */
63
575
  UPDATED: "product-type.updated",
576
+ /**
577
+ * Emitted when product types are created.
578
+ *
579
+ * @eventPayload
580
+ * ```ts
581
+ * [{
582
+ * id, // The ID of the product type
583
+ * }]
584
+ * ```
585
+ */
64
586
  CREATED: "product-type.created",
587
+ /**
588
+ * Emitted when product types are deleted.
589
+ *
590
+ * @eventPayload
591
+ * ```ts
592
+ * [{
593
+ * id, // The ID of the product type
594
+ * }]
595
+ * ```
596
+ */
65
597
  DELETED: "product-type.deleted",
66
598
  };
599
+ /**
600
+ * @category Product Tag
601
+ * @customNamespace Product
602
+ */
67
603
  exports.ProductTagWorkflowEvents = {
604
+ /**
605
+ * Emitted when product tags are updated.
606
+ *
607
+ * @eventPayload
608
+ * ```ts
609
+ * [{
610
+ * id, // The ID of the product tag
611
+ * }]
612
+ * ```
613
+ */
68
614
  UPDATED: "product-tag.updated",
615
+ /**
616
+ * Emitted when product tags are created.
617
+ *
618
+ * @eventPayload
619
+ * ```ts
620
+ * [{
621
+ * id, // The ID of the product tag
622
+ * }]
623
+ * ```
624
+ */
69
625
  CREATED: "product-tag.created",
626
+ /**
627
+ * Emitted when product tags are deleted.
628
+ *
629
+ * @eventPayload
630
+ * ```ts
631
+ * [{
632
+ * id, // The ID of the product tag
633
+ * }]
634
+ * ```
635
+ */
70
636
  DELETED: "product-tag.deleted",
71
637
  };
638
+ /**
639
+ * @category Product Option
640
+ * @customNamespace Product
641
+ */
72
642
  exports.ProductOptionWorkflowEvents = {
643
+ /**
644
+ * Emitted when product options are updated.
645
+ *
646
+ * @eventPayload
647
+ * ```ts
648
+ * [{
649
+ * id, // The ID of the product option
650
+ * }]
651
+ * ```
652
+ */
73
653
  UPDATED: "product-option.updated",
654
+ /**
655
+ * Emitted when product options are created.
656
+ *
657
+ * @eventPayload
658
+ * ```ts
659
+ * [{
660
+ * id, // The ID of the product option
661
+ * }]
662
+ * ```
663
+ */
74
664
  CREATED: "product-option.created",
665
+ /**
666
+ * Emitted when product options are deleted.
667
+ *
668
+ * @eventPayload
669
+ * ```ts
670
+ * [{
671
+ * id, // The ID of the product option
672
+ * }]
673
+ * ```
674
+ */
75
675
  DELETED: "product-option.deleted",
76
676
  };
677
+ /**
678
+ * @category Invite
679
+ * @customNamespace User
680
+ */
77
681
  exports.InviteWorkflowEvents = {
682
+ /**
683
+ * Emitted when an invite is accepted.
684
+ *
685
+ * @eventPayload
686
+ * ```ts
687
+ * {
688
+ * id, // The ID of the invite
689
+ * }
690
+ * ```
691
+ */
78
692
  ACCEPTED: "invite.accepted",
693
+ /**
694
+ * Emitted when invites are created. You can listen to this event
695
+ * to send an email to the invited users, for example.
696
+ *
697
+ * @eventPayload
698
+ * ```ts
699
+ * [{
700
+ * id, // The ID of the invite
701
+ * }]
702
+ * ```
703
+ */
79
704
  CREATED: "invite.created",
705
+ /**
706
+ * Emitted when invites are deleted.
707
+ *
708
+ * @eventPayload
709
+ * ```ts
710
+ * [{
711
+ * id, // The ID of the invite
712
+ * }]
713
+ * ```
714
+ */
80
715
  DELETED: "invite.deleted",
716
+ /**
717
+ * Emitted when invites should be resent because their token was
718
+ * refreshed. You can listen to this event to send an email to the invited users,
719
+ * for example.
720
+ *
721
+ * @eventPayload
722
+ * ```ts
723
+ * [{
724
+ * id, // The ID of the invite
725
+ * }]
726
+ * ```
727
+ */
81
728
  RESENT: "invite.resent",
82
729
  };
730
+ /**
731
+ * @category Region
732
+ * @customNamespace Region
733
+ */
83
734
  exports.RegionWorkflowEvents = {
735
+ /**
736
+ * Emitted when regions are updated.
737
+ *
738
+ * @eventPayload
739
+ * ```ts
740
+ * [{
741
+ * id, // The ID of the region
742
+ * }]
743
+ * ```
744
+ */
84
745
  UPDATED: "region.updated",
746
+ /**
747
+ * Emitted when regions are created.
748
+ *
749
+ * @eventPayload
750
+ * ```ts
751
+ * [{
752
+ * id, // The ID of the region
753
+ * }]
754
+ * ```
755
+ */
85
756
  CREATED: "region.created",
757
+ /**
758
+ * Emitted when regions are deleted.
759
+ *
760
+ * @eventPayload
761
+ * ```ts
762
+ * [{
763
+ * id, // The ID of the region
764
+ * }]
765
+ * ```
766
+ */
86
767
  DELETED: "region.deleted",
87
768
  };
769
+ /**
770
+ * @category Fulfillment
771
+ * @customNamespace Fulfillment
772
+ */
773
+ exports.FulfillmentWorkflowEvents = {
774
+ /**
775
+ * Emitted when a shipment is created for an order.
776
+ *
777
+ * @eventPayload
778
+ * ```ts
779
+ * {
780
+ * id, // the ID of the fulfillment
781
+ * no_notification, // (boolean) whether to notify the customer
782
+ * }
783
+ * ```
784
+ */
785
+ SHIPMENT_CREATED: "shipment.created",
786
+ /**
787
+ * Emitted when a fulfillment is marked as delivered.
788
+ *
789
+ * @eventPayload
790
+ * ```ts
791
+ * {
792
+ * id, // the ID of the fulfillment
793
+ * }
794
+ * ```
795
+ */
796
+ DELIVERY_CREATED: "delivery.created",
797
+ };
798
+ /**
799
+ * @category Shipping Option Type
800
+ * @customNamespace Fulfillment
801
+ */
802
+ exports.ShippingOptionTypeWorkflowEvents = {
803
+ /**
804
+ * Emitted when shipping option types are updated.
805
+ *
806
+ * @since 2.10.0
807
+ *
808
+ * @eventPayload
809
+ * ```ts
810
+ * [{
811
+ * id, // The ID of the shipping option type
812
+ * }]
813
+ * ```
814
+ */
815
+ UPDATED: "shipping-option-type.updated",
816
+ /**
817
+ * Emitted when shipping option types are created.
818
+ *
819
+ * @since 2.10.0
820
+ *
821
+ * @eventPayload
822
+ * ```ts
823
+ * [{
824
+ * id, // The ID of the shipping option type
825
+ * }]
826
+ * ```
827
+ */
828
+ CREATED: "shipping-option-type.created",
829
+ /**
830
+ * Emitted when shipping option types are deleted.
831
+ *
832
+ * @since 2.10.0
833
+ *
834
+ * @eventPayload
835
+ * ```ts
836
+ * [{
837
+ * id, // The ID of the shipping option type
838
+ * }]
839
+ * ```
840
+ */
841
+ DELETED: "shipping-option-type.deleted",
842
+ };
843
+ /**
844
+ * @category Payment
845
+ * @customNamespace Payment
846
+ */
847
+ exports.PaymentEvents = {
848
+ /**
849
+ * Emitted when a payment is captured.
850
+ *
851
+ * @eventPayload
852
+ * ```ts
853
+ * {
854
+ * id, // the ID of the payment
855
+ * }
856
+ * ```
857
+ */
858
+ CAPTURED: "payment.captured",
859
+ /**
860
+ * Emitted when a payment is refunded.
861
+ *
862
+ * @eventPayload
863
+ * ```ts
864
+ * {
865
+ * id, // the ID of the payment
866
+ * }
867
+ * ```
868
+ */
869
+ REFUNDED: "payment.refunded",
870
+ };
88
871
  //# sourceMappingURL=events.js.map