@medusajs/types 2.11.0-snapshot-20250829134337 → 2.11.0-snapshot-20251016104801

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 (137) hide show
  1. package/dist/bundles.d.ts +1 -0
  2. package/dist/bundles.d.ts.map +1 -1
  3. package/dist/bundles.js +2 -1
  4. package/dist/bundles.js.map +1 -1
  5. package/dist/caching/index.d.ts +532 -0
  6. package/dist/caching/index.d.ts.map +1 -0
  7. package/dist/caching/index.js +3 -0
  8. package/dist/caching/index.js.map +1 -0
  9. package/dist/common/medusa-container.d.ts +1 -1
  10. package/dist/common/medusa-container.d.ts.map +1 -1
  11. package/dist/dal/index.d.ts +1 -1
  12. package/dist/dal/index.d.ts.map +1 -1
  13. package/dist/dal/repository-service.d.ts +1 -1
  14. package/dist/dal/repository-service.d.ts.map +1 -1
  15. package/dist/event-bus/common.d.ts +4 -0
  16. package/dist/event-bus/common.d.ts.map +1 -1
  17. package/dist/event-bus/event-bus-module.d.ts +26 -1
  18. package/dist/event-bus/event-bus-module.d.ts.map +1 -1
  19. package/dist/fulfillment/workflows.d.ts +6 -0
  20. package/dist/fulfillment/workflows.d.ts.map +1 -1
  21. package/dist/http/campaign/admin/payloads.d.ts +11 -0
  22. package/dist/http/campaign/admin/payloads.d.ts.map +1 -1
  23. package/dist/http/campaign/admin/responses.d.ts +10 -0
  24. package/dist/http/campaign/admin/responses.d.ts.map +1 -1
  25. package/dist/http/cart/common.d.ts +57 -19
  26. package/dist/http/cart/common.d.ts.map +1 -1
  27. package/dist/http/collection/store/queries.d.ts +4 -2
  28. package/dist/http/collection/store/queries.d.ts.map +1 -1
  29. package/dist/http/fulfillment/store/index.d.ts +99 -0
  30. package/dist/http/fulfillment/store/index.d.ts.map +1 -1
  31. package/dist/http/index.d.ts +1 -0
  32. package/dist/http/index.d.ts.map +1 -1
  33. package/dist/http/index.js +1 -0
  34. package/dist/http/index.js.map +1 -1
  35. package/dist/http/order/common.d.ts +4 -0
  36. package/dist/http/order/common.d.ts.map +1 -1
  37. package/dist/http/payment/admin/entities.d.ts +1 -3
  38. package/dist/http/payment/admin/entities.d.ts.map +1 -1
  39. package/dist/http/payment/admin/payloads.d.ts +0 -4
  40. package/dist/http/payment/admin/payloads.d.ts.map +1 -1
  41. package/dist/http/payment/admin/queries.d.ts +1 -1
  42. package/dist/http/payment/admin/queries.d.ts.map +1 -1
  43. package/dist/http/payment/admin/responses.d.ts +2 -2
  44. package/dist/http/payment/admin/responses.d.ts.map +1 -1
  45. package/dist/http/payment/common.d.ts +2 -27
  46. package/dist/http/payment/common.d.ts.map +1 -1
  47. package/dist/http/product/common.d.ts +1 -1
  48. package/dist/http/product/common.d.ts.map +1 -1
  49. package/dist/http/promotion/admin/queries.d.ts +4 -0
  50. package/dist/http/promotion/admin/queries.d.ts.map +1 -1
  51. package/dist/http/refund-reason/admin/entities.d.ts +4 -0
  52. package/dist/http/refund-reason/admin/entities.d.ts.map +1 -0
  53. package/dist/http/refund-reason/admin/entities.js +3 -0
  54. package/dist/http/refund-reason/admin/entities.js.map +1 -0
  55. package/dist/http/refund-reason/admin/index.d.ts +5 -0
  56. package/dist/http/refund-reason/admin/index.d.ts.map +1 -0
  57. package/dist/http/refund-reason/admin/index.js +21 -0
  58. package/dist/http/refund-reason/admin/index.js.map +1 -0
  59. package/dist/http/refund-reason/admin/payloads.d.ts +30 -0
  60. package/dist/http/refund-reason/admin/payloads.d.ts.map +1 -0
  61. package/dist/http/refund-reason/admin/payloads.js +3 -0
  62. package/dist/http/refund-reason/admin/payloads.js.map +1 -0
  63. package/dist/http/refund-reason/admin/queries.d.ts +12 -0
  64. package/dist/http/refund-reason/admin/queries.d.ts.map +1 -0
  65. package/dist/http/refund-reason/admin/queries.js +3 -0
  66. package/dist/http/refund-reason/admin/queries.js.map +1 -0
  67. package/dist/http/refund-reason/admin/responses.d.ts +18 -0
  68. package/dist/http/refund-reason/admin/responses.d.ts.map +1 -0
  69. package/dist/http/refund-reason/admin/responses.js +3 -0
  70. package/dist/http/refund-reason/admin/responses.js.map +1 -0
  71. package/dist/http/refund-reason/common.d.ts +69 -0
  72. package/dist/http/refund-reason/common.d.ts.map +1 -0
  73. package/dist/http/refund-reason/common.js +3 -0
  74. package/dist/http/refund-reason/common.js.map +1 -0
  75. package/dist/http/refund-reason/index.d.ts +2 -0
  76. package/dist/http/refund-reason/index.d.ts.map +1 -0
  77. package/dist/http/refund-reason/index.js +18 -0
  78. package/dist/http/refund-reason/index.js.map +1 -0
  79. package/dist/http/shipping-option/admin/payloads.d.ts +32 -29
  80. package/dist/http/shipping-option/admin/payloads.d.ts.map +1 -1
  81. package/dist/http/shipping-option/store/responses.d.ts +2 -2
  82. package/dist/http/shipping-option/store/responses.d.ts.map +1 -1
  83. package/dist/http/view-configuration/admin/payloads.d.ts +2 -6
  84. package/dist/http/view-configuration/admin/payloads.d.ts.map +1 -1
  85. package/dist/http/view-configuration/admin/responses.d.ts.map +1 -1
  86. package/dist/http/workflow-execution/admin/entities.d.ts +9 -0
  87. package/dist/http/workflow-execution/admin/entities.d.ts.map +1 -1
  88. package/dist/index.d.ts +1 -0
  89. package/dist/index.d.ts.map +1 -1
  90. package/dist/index.js +1 -0
  91. package/dist/index.js.map +1 -1
  92. package/dist/joiner/index.d.ts +41 -0
  93. package/dist/joiner/index.d.ts.map +1 -1
  94. package/dist/modules-sdk/index.d.ts +1 -0
  95. package/dist/modules-sdk/index.d.ts.map +1 -1
  96. package/dist/modules-sdk/remote-query-object-from-string.d.ts +2 -2
  97. package/dist/modules-sdk/remote-query-object-from-string.d.ts.map +1 -1
  98. package/dist/modules-sdk/remote-query.d.ts +1 -1
  99. package/dist/modules-sdk/remote-query.d.ts.map +1 -1
  100. package/dist/modules-sdk/to-remote-query.d.ts +6 -2
  101. package/dist/modules-sdk/to-remote-query.d.ts.map +1 -1
  102. package/dist/order/mutations.d.ts +11 -11
  103. package/dist/order/mutations.d.ts.map +1 -1
  104. package/dist/payment/mutations.d.ts +4 -0
  105. package/dist/payment/mutations.d.ts.map +1 -1
  106. package/dist/payment/service.d.ts +5 -2
  107. package/dist/payment/service.d.ts.map +1 -1
  108. package/dist/pricing/common/price-preference.d.ts +4 -4
  109. package/dist/pricing/common/price-preference.d.ts.map +1 -1
  110. package/dist/pricing/common/price-rule.d.ts +8 -4
  111. package/dist/pricing/common/price-rule.d.ts.map +1 -1
  112. package/dist/product/service.d.ts +37 -0
  113. package/dist/product/service.d.ts.map +1 -1
  114. package/dist/promotion/common/campaign-budget.d.ts +22 -1
  115. package/dist/promotion/common/campaign-budget.d.ts.map +1 -1
  116. package/dist/promotion/common/campaing-budget-usage.d.ts +58 -0
  117. package/dist/promotion/common/campaing-budget-usage.d.ts.map +1 -0
  118. package/dist/promotion/common/campaing-budget-usage.js +3 -0
  119. package/dist/promotion/common/campaing-budget-usage.js.map +1 -0
  120. package/dist/promotion/common/compute-actions.d.ts +7 -1
  121. package/dist/promotion/common/compute-actions.d.ts.map +1 -1
  122. package/dist/promotion/common/index.d.ts +1 -0
  123. package/dist/promotion/common/index.d.ts.map +1 -1
  124. package/dist/promotion/common/index.js +1 -0
  125. package/dist/promotion/common/index.js.map +1 -1
  126. package/dist/promotion/mutations.d.ts +10 -0
  127. package/dist/promotion/mutations.d.ts.map +1 -1
  128. package/dist/promotion/service.d.ts +6 -4
  129. package/dist/promotion/service.d.ts.map +1 -1
  130. package/dist/tsconfig.tsbuildinfo +1 -1
  131. package/dist/workflow/fulfillment/create-shipping-options.d.ts +3 -0
  132. package/dist/workflow/fulfillment/create-shipping-options.d.ts.map +1 -1
  133. package/dist/workflow/order/request-item-return.d.ts +8 -0
  134. package/dist/workflow/order/request-item-return.d.ts.map +1 -1
  135. package/dist/workflows-sdk/service.d.ts +4 -0
  136. package/dist/workflows-sdk/service.d.ts.map +1 -1
  137. package/package.json +2 -3
package/dist/bundles.d.ts CHANGED
@@ -3,6 +3,7 @@ export * as AnalyticsTypes from "./analytics";
3
3
  export * as ApiKeyTypes from "./api-key";
4
4
  export * as AuthTypes from "./auth";
5
5
  export * as CacheTypes from "./cache";
6
+ export * as CachingTypes from "./caching";
6
7
  export * as CartTypes from "./cart";
7
8
  export * as CommonTypes from "./common";
8
9
  export * as CurrencyTypes from "./currency";
@@ -1 +1 @@
1
- {"version":3,"file":"bundles.d.ts","sourceRoot":"","sources":["../src/bundles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,SAAS,CAAA;AACrC,OAAO,KAAK,cAAc,MAAM,aAAa,CAAA;AAC7C,OAAO,KAAK,WAAW,MAAM,WAAW,CAAA;AACxC,OAAO,KAAK,SAAS,MAAM,QAAQ,CAAA;AACnC,OAAO,KAAK,UAAU,MAAM,SAAS,CAAA;AACrC,OAAO,KAAK,SAAS,MAAM,QAAQ,CAAA;AACnC,OAAO,KAAK,WAAW,MAAM,UAAU,CAAA;AACvC,OAAO,KAAK,aAAa,MAAM,YAAY,CAAA;AAC3C,OAAO,KAAK,aAAa,MAAM,YAAY,CAAA;AAC3C,OAAO,KAAK,GAAG,MAAM,OAAO,CAAA;AAC5B,OAAO,KAAK,QAAQ,MAAM,OAAO,CAAA;AACjC,OAAO,KAAK,aAAa,MAAM,aAAa,CAAA;AAC5C,OAAO,KAAK,gBAAgB,MAAM,gBAAgB,CAAA;AAClD,OAAO,KAAK,SAAS,MAAM,QAAQ,CAAA;AACnC,OAAO,KAAK,gBAAgB,MAAM,eAAe,CAAA;AACjD,OAAO,KAAK,SAAS,MAAM,QAAQ,CAAA;AACnC,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAA;AAChD,OAAO,KAAK,cAAc,MAAM,aAAa,CAAA;AAC7C,OAAO,KAAK,WAAW,MAAM,UAAU,CAAA;AACvC,OAAO,KAAK,eAAe,MAAM,eAAe,CAAA;AAChD,OAAO,KAAK,iBAAiB,MAAM,gBAAgB,CAAA;AACnD,OAAO,KAAK,UAAU,MAAM,SAAS,CAAA;AACrC,OAAO,KAAK,YAAY,MAAM,WAAW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AgB,MAAM,gBAAgB,CAAA;AAClD,OAAO,KAAK,SAAS,MAAM,QAAQ,CAAA;AACnC,OAAO,KAAK,gBAAgB,MAAM,eAAe,CAAA;AACjD,OAAO,KAAK,SAAS,MAAM,QAAQ,CAAA;AACnC,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAA;AAChD,OAAO,KAAK,cAAc,MAAM,aAAa,CAAA;AAC7C,OAAO,KAAK,WAAW,MAAM,UAAU,CAAA;AACvC,OAAO,KAAK,eAAe,MAAM,eAAe,CAAA;AAChD,OAAO,KAAK,iBAAiB,MAAM,gBAAgB,CAAA;AACnD,OAAO,KAAK,UAAU,MAAM,SAAS,CAAA;AACrC,OAAO,KAAK,YAAY,MAAM,WAAW,CAAA;AACzC,OAAO,KAAK,YAAY,MAAM,WAAW,CAAA;AACzC,OAAO,KAAK,cAAc,MAAM,aAAa,CAAA;AAC7C,OAAO,KAAK,WAAW,MAAM,UAAU,CAAA;AACvC,OAAO,KAAK,iBAAiB,MAAM,iBAAiB,CAAA;AACpD,OAAO,KAAK,WAAW,MAAM,UAAU,CAAA;AACvC,OAAO,KAAK,aAAa,MAAM,YAAY,CAAA;AAC3C,OAAO,KAAK,kBAAkB,MAAM,kBAAkB,CAAA;AACtD,OAAO,KAAK,UAAU,MAAM,SAAS,CAAA;AACrC,OAAO,KAAK,QAAQ,MAAM,OAAO,CAAA;AACjC,OAAO,KAAK,oBAAoB,MAAM,oBAAoB,CAAA;AAC1D,OAAO,KAAK,SAAS,MAAM,QAAQ,CAAA;AACnC,OAAO,KAAK,aAAa,MAAM,YAAY,CAAA;AAC3C,OAAO,KAAK,iBAAiB,MAAM,iBAAiB,CAAA"}
package/dist/bundles.js CHANGED
@@ -23,12 +23,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.WorkflowsSdkTypes = exports.WorkflowTypes = exports.UserTypes = exports.TransactionBaseTypes = exports.TaxTypes = exports.StoreTypes = exports.StockLocationTypes = exports.SettingsTypes = exports.SearchTypes = exports.SalesChannelTypes = exports.RegionTypes = exports.PromotionTypes = exports.ProductTypes = exports.PricingTypes = exports.OrderTypes = exports.NotificationTypes = exports.ModulesSdkTypes = exports.LoggerTypes = exports.InventoryTypes = exports.IndexTypes = exports.HttpTypes = exports.FulfillmentTypes = exports.FileTypes = exports.FeatureFlagTypes = exports.EventBusTypes = exports.DmlTypes = exports.DAL = exports.CustomerTypes = exports.CurrencyTypes = exports.CommonTypes = exports.CartTypes = exports.CacheTypes = exports.AuthTypes = exports.ApiKeyTypes = exports.AnalyticsTypes = exports.AdminTypes = void 0;
26
+ exports.WorkflowsSdkTypes = exports.WorkflowTypes = exports.UserTypes = exports.TransactionBaseTypes = exports.TaxTypes = exports.StoreTypes = exports.StockLocationTypes = exports.SettingsTypes = exports.SearchTypes = exports.SalesChannelTypes = exports.RegionTypes = exports.PromotionTypes = exports.ProductTypes = exports.PricingTypes = exports.OrderTypes = exports.NotificationTypes = exports.ModulesSdkTypes = exports.LoggerTypes = exports.InventoryTypes = exports.IndexTypes = exports.HttpTypes = exports.FulfillmentTypes = exports.FileTypes = exports.FeatureFlagTypes = exports.EventBusTypes = exports.DmlTypes = exports.DAL = exports.CustomerTypes = exports.CurrencyTypes = exports.CommonTypes = exports.CartTypes = exports.CachingTypes = exports.CacheTypes = exports.AuthTypes = exports.ApiKeyTypes = exports.AnalyticsTypes = exports.AdminTypes = void 0;
27
27
  exports.AdminTypes = __importStar(require("./admin"));
28
28
  exports.AnalyticsTypes = __importStar(require("./analytics"));
29
29
  exports.ApiKeyTypes = __importStar(require("./api-key"));
30
30
  exports.AuthTypes = __importStar(require("./auth"));
31
31
  exports.CacheTypes = __importStar(require("./cache"));
32
+ exports.CachingTypes = __importStar(require("./caching"));
32
33
  exports.CartTypes = __importStar(require("./cart"));
33
34
  exports.CommonTypes = __importStar(require("./common"));
34
35
  exports.CurrencyTypes = __importStar(require("./currency"));
@@ -1 +1 @@
1
- {"version":3,"file":"bundles.js","sourceRoot":"","sources":["../src/bundles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAAqC;AACrC,8DAA6C;AAC7C,yDAAwC;AACxC,oDAAmC;AACnC,sDAAqC;AACrC,oDAAmC;AACnC,wDAAuC;AACvC,4DAA2C;AAC3C,4DAA2C;AAC3C,6CAA4B;AAC5B,kDAAiC;AACjC,6DAA4C;AAC5C,mEAAkD;AAClD,oDAAmC;AACnC,kEAAiD;AACjD,oDAAmC;AACnC,iEAAgD;AAChD,8DAA6C;AAC7C,wDAAuC;AACvC,iEAAgD;AAChD,oEAAmD;AACnD,sDAAqC;AACrC,0DAAyC;AACzC,0DAAyC;AACzC,8DAA6C;AAC7C,wDAAuC;AACvC,qEAAoD;AACpD,wDAAuC;AACvC,4DAA2C;AAC3C,uEAAsD;AACtD,sDAAqC;AACrC,kDAAiC;AACjC,2EAA0D;AAC1D,oDAAmC;AACnC,4DAA2C;AAC3C,qEAAoD"}
1
+ {"version":3,"file":"bundles.js","sourceRoot":"","sources":["../src/bundles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAAqC;AACrC,8DAA6C;AAC7C,yDAAwC;AACxC,oDAAmC;AACnC,sDAAqC;AACrC,0DAAyC;AACzC,oDAAmC;AACnC,wDAAuC;AACvC,4DAA2C;AAC3C,4DAA2C;AAC3C,6CAA4B;AAC5B,kDAAiC;AACjC,6DAA4C;AAC5C,mEAAkD;AAClD,oDAAmC;AACnC,kEAAiD;AACjD,oDAAmC;AACnC,iEAAgD;AAChD,8DAA6C;AAC7C,wDAAuC;AACvC,iEAAgD;AAChD,oEAAmD;AACnD,sDAAqC;AACrC,0DAAyC;AACzC,0DAAyC;AACzC,8DAA6C;AAC7C,wDAAuC;AACvC,qEAAoD;AACpD,wDAAuC;AACvC,4DAA2C;AAC3C,uEAAsD;AACtD,sDAAqC;AACrC,kDAAiC;AACjC,2EAA0D;AAC1D,oDAAmC;AACnC,4DAA2C;AAC3C,qEAAoD"}
@@ -0,0 +1,532 @@
1
+ import { IModuleService, ModuleJoinerConfig } from "../modules-sdk";
2
+ type Providers = string[] | {
3
+ /**
4
+ * The ID of the provider to use, as set in `medusa-config.ts`.
5
+ */
6
+ id: string;
7
+ /**
8
+ * Optional custom time-to-live (TTL) (in seconds) for this provider. If not provided, the default TTL configured
9
+ * in the provider is used, or the default TTL of the Caching Module if not configured in the provider.
10
+ */
11
+ ttl?: number;
12
+ }[];
13
+ /**
14
+ * @since v2.11.0
15
+ */
16
+ export interface ICachingModuleService extends IModuleService {
17
+ /**
18
+ * This method retrieves data from the cache. If neither `key` nor `tags` are provided, or the item is not found, `null` is returned.
19
+ *
20
+ * @param param0 - The options for retrieving the item.
21
+ * @returns The item(s) that was stored in the cache. If no item was found, or neither `key` nor `tags` were provided, `null` is returned.
22
+ *
23
+ * @example
24
+ * To retrieve by key:
25
+ *
26
+ * ```ts
27
+ * const data = await cacheModuleService.get({
28
+ * key: "products", // this key would typically be a hash
29
+ * }) as { id: string; title: string; }
30
+ * ```
31
+ *
32
+ * To retrieve by tags:
33
+ *
34
+ * ```ts
35
+ * const data = await cacheModuleService.get({
36
+ * tags: ["Product:list:*"],
37
+ * }) as { id: string; title: string; }[]
38
+ * ```
39
+ *
40
+ * To retrieve by key from specific providers:
41
+ *
42
+ * ```ts
43
+ * const data = await cacheModuleService.get({
44
+ * key: "products", // this key would typically be a hash
45
+ * providers: ["caching-redis", "caching-memcached"]
46
+ * }) as { id: string; title: string; }
47
+ * ```
48
+ *
49
+ * This example will try to get the data from the `caching-redis` provider first, and if not found, it will try to get it from the `caching-memcached` provider.
50
+ */
51
+ get({ key, tags, providers, }: {
52
+ /**
53
+ * The key of the item to retrieve.
54
+ * If both `key` and `tags` are provided, `key` takes precedence over `tags`.
55
+ */
56
+ key?: string;
57
+ /**
58
+ * The tags of the items to retrieve. Tags
59
+ * are useful to retrieve multiple related items at once.
60
+ */
61
+ tags?: string[];
62
+ /**
63
+ * The providers to retrieve the item(s) from. You can specify an array of provider IDs.
64
+ * They're checked in the order they're provided in, so make sure to order them based on your priority.
65
+ * If not provided, the [default provider](https://docs.medusajs.com/infrastructure-modules/caching/providers#default-caching-module-provider) is used.
66
+ */
67
+ providers?: string[];
68
+ }): Promise<any | null>;
69
+ /**
70
+ * This method stores data in the cache using the
71
+ * [default Caching Module Provider](https://docs.medusajs.com/infrastructure-modules/caching/providers#default-caching-module-provider).
72
+ *
73
+ * @param param0 - The options for storing the item.
74
+ * @returns A promise that resolves when the item has been stored.
75
+ *
76
+ * @example
77
+ * To store with key:
78
+ *
79
+ * ```ts
80
+ * const data = { id: "prod_123", title: "Product 123" }
81
+ * const key = await cacheModuleService.computeKey(data)
82
+ * await cacheModuleService.set({
83
+ * key,
84
+ * data
85
+ * })
86
+ * ```
87
+ *
88
+ * To store with tags:
89
+ *
90
+ * :::note
91
+ *
92
+ * Tags should follow [conventions](https://docs.medusajs.com/infrastructure-modules/caching/concepts#caching-tags-convention) to ensure they're automatically invalidated.
93
+ *
94
+ * :::
95
+ *
96
+ * ```ts
97
+ * const data = [{ id: "prod_123", title: "Product 123" }]
98
+ * const key = await cacheModuleService.computeKey(data)
99
+ * await cacheModuleService.set({
100
+ * key,
101
+ * data,
102
+ * tags: [`Product:${data[0].id}`, "Product:list:*"]
103
+ * })
104
+ * ```
105
+ *
106
+ * To disable auto-invalidation for the item:
107
+ *
108
+ * ```ts
109
+ * const data = [{ id: "prod_123", title: "Product 123" }]
110
+ * const key = await cacheModuleService.computeKey(data)
111
+ * await cacheModuleService.set({
112
+ * key,
113
+ * data,
114
+ * options: { autoInvalidate: false }
115
+ * })
116
+ * ```
117
+ *
118
+ * The item is now only invalidated when calling the `clear` method directly with the same key or tags.
119
+ *
120
+ * To store with specific providers:
121
+ *
122
+ * ```ts
123
+ * const data = { id: "prod_123", title: "Product 123" }
124
+ * const key = await cacheModuleService.computeKey(data)
125
+ * await cacheModuleService.set({
126
+ * key,
127
+ * data,
128
+ * providers: [
129
+ * "caching-redis",
130
+ * { id: "caching-memcached", ttl: 120 } // custom TTL for this provider
131
+ * ]
132
+ * })
133
+ * ```
134
+ *
135
+ * This example will store the item in both the `caching-redis` and `caching-memcached` providers, with a custom TTL of `120` seconds for the `caching-memcached` provider.
136
+ *
137
+ */
138
+ set({ key, data, ttl, tags, options, providers, }: {
139
+ /**
140
+ * The key of the item to store.
141
+ */
142
+ key: string;
143
+ /**
144
+ * The data to store in the cache.
145
+ */
146
+ data: object;
147
+ /**
148
+ * The time-to-live (TTL in seconds) value in seconds.
149
+ * If not provided, the default TTL value configured in the provider should be used.
150
+ */
151
+ ttl?: number;
152
+ /**
153
+ * The tags of the items to store. Tags are useful to group related items
154
+ * together for retrieval or invalidation.
155
+ */
156
+ tags?: string[];
157
+ /**
158
+ * Options for storing the item. The options are stored with the item, allowing you to later match against them when clearing the item.
159
+ * For example, if you set `autoInvalidate: false`, the item will only be invalidated when calling the `clear` method directly with the same key or tags.
160
+ */
161
+ options?: {
162
+ /**
163
+ * Whether to automatically invalidate the item when related data changes.
164
+ *
165
+ * @defaultValue true
166
+ */
167
+ autoInvalidate?: boolean;
168
+ };
169
+ /**
170
+ * The providers to store the item(s) in. You can specify an array of provider IDs or an array of objects with provider ID and TTL.
171
+ * If not provided, the [default provider](https://docs.medusajs.com/infrastructure-modules/caching/providers#default-caching-module-provider) is used.
172
+ */
173
+ providers?: Providers;
174
+ }): Promise<void>;
175
+ /**
176
+ * This method clears data from the cache. If neither `key` nor `tags` are provided, nothing is cleared.
177
+ *
178
+ * By default, all items matching the key or tags are cleared regardless of their options. If you provide `options.autoInvalidate: true`,
179
+ * only items that were set with `options.autoInvalidate: true` are cleared.
180
+ *
181
+ * For example, if you set `options.autoInvalidate: true`, only items that were set with `options.autoInvalidate: true` are cleared.
182
+ * Items that were set with `options.autoInvalidate: false` are only cleared when you don't provide any options.
183
+ *
184
+ * @param param0 - The options for clearing the item(s).
185
+ * @returns A promise that resolves when the item(s) have been cleared.
186
+ *
187
+ * @example
188
+ * To invalidate cache by key:
189
+ *
190
+ * ```ts
191
+ * await cacheModuleService.clear({
192
+ * key: "products" // this key would typically be a hash
193
+ * })
194
+ * ```
195
+ *
196
+ * This example will clear the item with the key `products` regardless of its `options.autoInvalidate` value.
197
+ *
198
+ * To invalidate cache by tags:
199
+ *
200
+ * ```ts
201
+ * await cacheModuleService.clear({
202
+ * tags: ["Product:list:*"]
203
+ * })
204
+ * ```
205
+ *
206
+ * This example will clear all items with the tag `Product:list:*` regardless of their `options.autoInvalidate` value.
207
+ *
208
+ * To invalidate only the cache data that were set to automatically invalidate:
209
+ *
210
+ * ```ts
211
+ * await cacheModuleService.clear({
212
+ * tags: ["Product:list:*"],
213
+ * options: { autoInvalidate: true }
214
+ * })
215
+ * ```
216
+ *
217
+ * This example will only clear items with the tag `Product:list:*` that were set with `options.autoInvalidate: true`.
218
+ * Items that were set with `options.autoInvalidate: false` will not be cleared.
219
+ *
220
+ * :::note
221
+ *
222
+ * Setting `options.autoInvalidate: false` when calling the `clear` method will not clear any items.
223
+ * To clear items that were set with `options.autoInvalidate: false`, you must call the `clear` method without any options.
224
+ *
225
+ * :::
226
+ *
227
+ * To invalidate cache from specific providers:
228
+ *
229
+ * ```ts
230
+ * await cacheModuleService.clear({
231
+ * key: "products",
232
+ * providers: ["caching-redis", "caching-memcached"]
233
+ * })
234
+ * ```
235
+ *
236
+ * This example will try to clear the data from both the `caching-redis` and `caching-memcached` providers.
237
+ */
238
+ clear({ key, tags, options, providers, }: {
239
+ /**
240
+ * The key of the item to clear.
241
+ */
242
+ key?: string;
243
+ /**
244
+ * The tags of the items to clear. Tags
245
+ * are useful to clear multiple related items at once.
246
+ */
247
+ tags?: string[];
248
+ /**
249
+ * Options for clearing the item(s). The options are matched against the stored options when the item was set.
250
+ * For example, if the item was set with `autoInvalidate: true`, it will only be cleared if the `autoInvalidate` option is also set to `true`.
251
+ * If not provided, all items matching the key or tags are cleared regardless of their options.
252
+ */
253
+ options?: {
254
+ /**
255
+ * Whether to clear item(s) that were set to automatically invalidate.
256
+ */
257
+ autoInvalidate?: boolean;
258
+ };
259
+ /**
260
+ * The providers from which to clear the item(s). You can specify an array of provider IDs.
261
+ * If not provided, the [default provider](https://docs.medusajs.com/infrastructure-modules/caching/providers#default-caching-module-provider) is used.
262
+ */
263
+ providers?: string[];
264
+ }): Promise<void>;
265
+ /**
266
+ * This method computes a cache key based on the input object. It's useful to generate consistent and unique keys for caching.
267
+ *
268
+ * @param input - The input object to compute the key from.
269
+ * @returns The computed cache key.
270
+ *
271
+ * @example
272
+ * const key = await cacheModuleService.computeKey({
273
+ * id: "prod_123",
274
+ * title: "Product 123"
275
+ * })
276
+ * // key will be a hash string like "a1b2c3d4e5f6g7h8i9j0"
277
+ */
278
+ computeKey(input: object): Promise<string>;
279
+ /**
280
+ * This method computes cache tags based on the input object. It's useful to generate consistent and relevant tags for caching.
281
+ *
282
+ * @param input - The input object to compute the tags from.
283
+ * @param options - Additional options to influence tag computation.
284
+ * @returns An array of computed cache tags.
285
+ *
286
+ * @example
287
+ * const tags = await cacheModuleService.computeTags({
288
+ * products: [{ id: "prod_123" }, { id: "prod_456" }],
289
+ * }, {
290
+ * operation: "updated"
291
+ * })
292
+ * // tags might be ["Product:prod_123", "Product:prod_456", "Product:list:*"]
293
+ */
294
+ computeTags(input: object, options?: Record<string, any>): Promise<string[]>;
295
+ }
296
+ /**
297
+ * ### constructor
298
+ *
299
+ * The constructor allows you to access resources from the module's container using the first parameter,
300
+ * and the module's options using the second parameter.
301
+ *
302
+ * If you're creating a client or establishing a connection with a third-party service, do it in a [Loader](https://docs.medusajs.com/learn/fundamentals/modules/loaders)
303
+ * and store it in the Module's container. Then, you can access it in your service using the container.
304
+ *
305
+ * :::note[Loader Example]
306
+ *
307
+ * [Initialize MongoDB client in loader and access it in service](https://docs.medusajs.com/learn/fundamentals/modules/loaders#example-register-custom-mongodb-connection).
308
+ *
309
+ * :::
310
+ *
311
+ * #### Example
312
+ *
313
+ * ```ts
314
+ * import { ICachingProviderService } from "@medusajs/framework/types"
315
+ * import { Logger } from "@medusajs/framework/types"
316
+ *
317
+ * type InjectedDependencies = {
318
+ * logger: Logger
319
+ * // assuming you initialized a client
320
+ * // in a Loader and stored it in the container
321
+ * client: Client
322
+ * }
323
+ *
324
+ * type Options = {
325
+ * url: string
326
+ * }
327
+ *
328
+ * class MyCachingModuleProvider implements ICachingProviderService {
329
+ * static identifier = "my-cache"
330
+ * protected logger_: Logger
331
+ * protected options_: Options
332
+ * protected client
333
+ *
334
+ * constructor (
335
+ * { logger, client }: InjectedDependencies,
336
+ * options: Options
337
+ * ) {
338
+ * this.logger_ = logger
339
+ * this.options_ = options
340
+ * // set the service's client to
341
+ * // the client from the container
342
+ * this.client = client
343
+ * }
344
+ *
345
+ * // ...
346
+ * }
347
+ *
348
+ * export default MyCachingModuleProvider
349
+ * ```
350
+ *
351
+ * ### Identifier
352
+ *
353
+ * Every caching module provider must have an `identifier` static property. The provider's ID
354
+ * will be stored as `lp_{identifier}_{id}`, where `id` is the ID you set in your `medusa-config.ts` file.
355
+ *
356
+ * For example:
357
+ *
358
+ * ```ts
359
+ * class MyCachingModuleProvider implements ICachingProviderService {
360
+ * static identifier = "my-cache"
361
+ * // ...
362
+ * }
363
+ * ```
364
+ */
365
+ export interface ICachingProviderService {
366
+ /**
367
+ * This method retrieves data from the cache either by `key` or `tags`. If neither `key` nor `tags` are provided, `null` should be returned.
368
+ * If both `key` and `tags` are provided, `key` should take precedence over `tags`.
369
+ *
370
+ * @param param0 - The parameters for retrieving the item.
371
+ * @returns The item(s) that was stored in the cache, or `null` if not found.
372
+ *
373
+ * @example
374
+ * class MyCachingModuleProvider implements ICachingProviderService {
375
+ * // ...
376
+ * async get({ key, tags }: { key?: string; tags?: string[] }): Promise<any> {
377
+ * // Assuming you're using a client to get data
378
+ * if (key) {
379
+ * return await this.client.get({ key })
380
+ * }
381
+ * if (tags) {
382
+ * return await this.client.getByTags({ tags })
383
+ * }
384
+ * return null
385
+ * }
386
+ * }
387
+ */
388
+ get({ key, tags }: {
389
+ /**
390
+ * The key of the item to retrieve. If both are provided, `key` should take precedence over `tags`.
391
+ */
392
+ key?: string;
393
+ /**
394
+ * The tags of the items to retrieve. All items with any of the provided tags should be retrieved.
395
+ */
396
+ tags?: string[];
397
+ }): Promise<any>;
398
+ /**
399
+ * This method stores data in the cache. It should also store the options with the item,
400
+ * allowing you to later to check the `autoInvalidate` option when clearing the item.
401
+ *
402
+ * @param param0 - The parameters for storing the item.
403
+ * @return A promise that resolves when the item has been stored.
404
+ *
405
+ * @example
406
+ * class MyCachingModuleProvider implements ICachingProviderService {
407
+ * // ...
408
+ * async set({ key, data, ttl, tags, options }: {
409
+ * key: string;
410
+ * data: any;
411
+ * ttl?: number;
412
+ * tags?: string[];
413
+ * options?: { autoInvalidate?: boolean }
414
+ * }): Promise<void> {
415
+ * // Assuming you're using a client to set data
416
+ * await this.client.set({ key, data, ttl, tags })
417
+ * await this.client.set({ key, data: options, pipeline: "options" })
418
+ * }
419
+ * }
420
+ */
421
+ set({ key, data, ttl, tags, options, }: {
422
+ /**
423
+ * The key of the item to store.
424
+ */
425
+ key: string;
426
+ /**
427
+ * The data to store in the cache.
428
+ */
429
+ data: object;
430
+ /**
431
+ * The time-to-live (TTL in seconds) value in seconds.
432
+ * If not provided, the default TTL value configured in the provider should be used.
433
+ */
434
+ ttl?: number;
435
+ /**
436
+ * The tags of the items to store. Items should be grouped together using tags for retrieval or invalidation.
437
+ */
438
+ tags?: string[];
439
+ /**
440
+ * Options for storing the item. The options should be stored with the item, allowing you to later match against them when clearing the item.
441
+ * For example, if you set `autoInvalidate: false`, the item will only be invalidated when calling the `clear` method directly with the same key or tags.
442
+ */
443
+ options?: {
444
+ /**
445
+ * Whether to automatically invalidate the item when related data changes.
446
+ */
447
+ autoInvalidate?: boolean;
448
+ };
449
+ }): Promise<void>;
450
+ /**
451
+ * This method clears data from the cache. If no options are specified, all items matching the key or tags should be cleared.
452
+ * Otherwise, if `options.autoInvalidate` is `true`, only items that were set with `options.autoInvalidate: true` should be cleared.
453
+ *
454
+ * Items with `options.autoInvalidate: false` should only be cleared when no options are provided.
455
+ *
456
+ * If neither `key` nor `tags` are provided, nothing should be cleared.
457
+ *
458
+ * @param param0 - The parameters for clearing the item(s).
459
+ * @returns A promise that resolves when the item(s) have been cleared.
460
+ *
461
+ * @example
462
+ * async clear({ key, tags, options, }: {
463
+ * key?: string;
464
+ * tags?: string[];
465
+ * options?: { autoInvalidate?: boolean }
466
+ * }): Promise<void> {
467
+ * if (!options) {
468
+ * // clear all items
469
+ * await this.client.invalidate({ key, tags })
470
+ * } else if (options.autoInvalidate) {
471
+ * // clear only items with autoInvalidate option set to true
472
+ * const keysToDelete: string[] = []
473
+ * const storedOptions = await this.client.get({ key, tags, pipeline: "options" })
474
+ * storedOptions.forEach((item) => {
475
+ * if (item.autoInvalidate) {
476
+ * keysToDelete.push(item.key as string)
477
+ * }
478
+ * })
479
+ * await this.client.invalidate({ keys: keysToDelete })
480
+ * }
481
+ * }
482
+ */
483
+ clear({ key, tags, options, }: {
484
+ /**
485
+ * The key of the item to clear.
486
+ */
487
+ key?: string;
488
+ /**
489
+ * The tags of the items to clear. All items with any of the provided tags should be cleared.
490
+ */
491
+ tags?: string[];
492
+ /**
493
+ * Options for clearing the item(s). The options should be matched against the stored options when the item was set.
494
+ * For example, if the item was set with `autoInvalidate: true`, it will only be cleared if the `autoInvalidate` option is also set to `true`.
495
+ * If not provided, all items matching the key or tags should be cleared regardless of their options.
496
+ */
497
+ options?: {
498
+ /**
499
+ * Whether to clear item(s) that were set to automatically invalidate.
500
+ */
501
+ autoInvalidate?: boolean;
502
+ };
503
+ }): Promise<void>;
504
+ }
505
+ /**
506
+ * @ignore
507
+ */
508
+ export interface EntityReference {
509
+ type: string;
510
+ id: string | number;
511
+ field?: string;
512
+ }
513
+ /**
514
+ * @ignore
515
+ */
516
+ export interface ICachingStrategy {
517
+ /**
518
+ * This method is called when the application starts. It can be useful to set up some auto
519
+ * invalidation logic that reacts to something.
520
+ *
521
+ * @param container MedusaContainer
522
+ * @param schema GraphQLSchema
523
+ * @param cacheModule ICachingModuleService
524
+ */
525
+ onApplicationStart?(schema: any, joinerConfigs: ModuleJoinerConfig[]): Promise<void>;
526
+ onApplicationPrepareShutdown?(): Promise<void>;
527
+ onApplicationShutdown?(): Promise<void>;
528
+ computeKey(input: object): Promise<string>;
529
+ computeTags(input: object, options?: Record<string, any>): Promise<string[]>;
530
+ }
531
+ export {};
532
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/caching/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAEnE,KAAK,SAAS,GAAG,MAAM,EAAE,GAAG;IAC1B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,EAAE,CAAA;AAEH;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,cAAc;IAsB3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,GAAG,CAAC,EACF,GAAG,EACH,IAAI,EACJ,SAAS,GACV,EAAE;QACD;;;WAGG;QACH,GAAG,CAAC,EAAE,MAAM,CAAA;QACZ;;;WAGG;QACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;QACf;;;;WAIG;QACH,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;KACrB,GAAG,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,CAAA;IAEvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoEG;IACH,GAAG,CAAC,EACF,GAAG,EACH,IAAI,EACJ,GAAG,EACH,IAAI,EACJ,OAAO,EACP,SAAS,GACV,EA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IACH,kBAAkB,CAAC,CACjB,MAAM,EAAE,GAAG,EACX,aAAa,EAAE,kBAAkB,EAAE,GAClC,OAAO,CAAC,IAAI,CAAC,CAAA;IAEhB,4BAA4B,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IAE9C,qBAAqB,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IAEvC,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IAE1C,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;CAC7E"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/caching/index.ts"],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- import { AwilixContainer, ResolveOptions } from "awilix";
1
+ import type { AwilixContainer, ResolveOptions } from "@medusajs/deps/awilix";
2
2
  /**
3
3
  * The following interface acts as a bucket that other modules or the
4
4
  * utils package can fill using declaration merging
@@ -1 +1 @@
1
- {"version":3,"file":"medusa-container.d.ts","sourceRoot":"","sources":["../../src/common/medusa-container.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AAExD;;;GAGG;AACH,MAAM,WAAW,qBAAqB;CAAG;AAEzC;;;GAGG;AACH,MAAM,MAAM,eAAe,CAAC,MAAM,SAAS,MAAM,GAAG,qBAAqB,IACvE,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,GAAG;IACjC,OAAO,CAAC,CAAC,SAAS,MAAM,MAAM,EAC5B,GAAG,EAAE,CAAC,EACN,cAAc,CAAC,EAAE,cAAc,GAC9B,MAAM,CAAC,CAAC,C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C,CAAA"}
@@ -51,7 +51,7 @@ export interface OptionsQuery<T> {
51
51
  /**
52
52
  * Load strategy (e.g for mikro orm it accept select-in or joined)
53
53
  */
54
- strategy?: "select-in" | "joined" | (string & {});
54
+ strategy?: "select-in" | "joined" | "balanced" | (string & {});
55
55
  }
56
56
  /**
57
57
  * @interface
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAExD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAElD;;;;GAIG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC;IAC/B;;OAEG;IACH,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IAEhC;;OAEG;IACH,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA;IAC/B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC3B;;OAEG;IACH,OAAO,CAAC,EAAE,UAAU,CAAC,OAAO,GAAG,UAAU,CAAC,GAAG,MAAM,EAAE,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A;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA;IAC/B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC3B;;OAEG;IACH,OAAO,CAAC,EAAE,UAAU,CAAC,OAAO,GAAG,UAAU,CAAC,GAAG,MAAM,EAAE,GAAG,OAAO,CAAA;IAC/D;;OAEG;IACH,QAAQ,CAAC,EAAE,WAAW,GAAG,QAAQ,GAAG,UAAU,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;CAC/D;AAED;;;;GAIG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,GAAG,IAAI;IACjC;;OAEG;IACH,KAAK,EAAE,WAAW,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,GACpC,cAAc,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAEjD;;OAEG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAA;CAC3C,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,CAAC,CAAC,IAAI;IACvC;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAA;CACxB,CAAA;AAED,cAAc,sBAAsB,CAAA;AACpC,cAAc,UAAU,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { RepositoryTransformOptions } from "../common";
2
2
  import { Context } from "../shared-context";
3
3
  import { FilterQuery as InternalFilterQuery, FindOptions, UpsertWithReplaceConfig } from "./index";
4
- import { EntityClass } from "@mikro-orm/core";
4
+ import type { EntityClass } from "@medusajs/deps/mikro-orm/core";
5
5
  import { IDmlEntity, InferTypeOf } from "../dml";
6
6
  type EntityClassName = string;
7
7
  type EntityValues = {
@@ -1 +1 @@
1
- {"version":3,"file":"repository-service.d.ts","sourceRoot":"","sources":["../../src/dal/repository-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC3C,OAAO,EACL,WAAW,IAAI,mBAAmB,EAClC,WAAW,EACX,uBAAuB,EACxB,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AAEhD,KAAK,eAAe,GAAG,MAAM,CAAA;AAC7B,KAAK,YAAY,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,CAAA;AAEpC;;GAEG;AACH,MAAM,MAAM,yBAAyB,CAAC,CAAC,IAAI,CAAC,SAAS,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,GACrE,WAAW,CAAC,CAAC,CAAC,GACd,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAA;AAE/B,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAC,eAAe,EAAE,YAAY,CAAC,CAAA;IAC9C,OAAO,EAAE,MAAM,CAAC,eAAe,EAAE,YAAY,CAAC,CAAA;IAC9C,OAAO,EAAE,MAAM,CAAC,eAAe,EAAE,YAAY,CAAC,CAAA;CAC/C,CAAA;AAED;;;;GAIG;AACH,UAAU,qBAAqB;IAC7B,WAAW,CAAC,QAAQ,GAAG,OAAO,EAC5B,IAAI,EAAE,CAAC,kBAAkB,EAAE,QAAQ,KAAK,OAAO,CAAC,GAAG,CAAC,EACpD,OAAO,CAAC,EAAE;QACR,cAAc,CAAC,EAAE,MAAM,CAAA;QACvB,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}
@@ -51,4 +51,8 @@ export type RawMessageFormat<TData = any> = {
51
51
  context?: Pick<Context, "eventGroupId">;
52
52
  options?: Record<string, any>;
53
53
  };
54
+ export type InterceptorSubscriber<T = unknown> = (message: Message<T>, context?: {
55
+ isGrouped?: boolean;
56
+ eventGroupId?: string;
57
+ }) => Promise<void> | void;
54
58
  //# sourceMappingURL=common.d.ts.map