@medusajs/types 1.12.0-snapshot-20240325085803 → 1.12.0-snapshot-20240328204235

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 (45) hide show
  1. package/dist/common/config-module.d.ts +7 -4
  2. package/dist/common/config-module.d.ts.map +1 -1
  3. package/dist/dal/index.d.ts +11 -0
  4. package/dist/dal/index.d.ts.map +1 -1
  5. package/dist/dal/index.js.map +1 -1
  6. package/dist/dal/repository-service.d.ts +2 -1
  7. package/dist/dal/repository-service.d.ts.map +1 -1
  8. package/dist/modules-sdk/internal-module-service.d.ts +2 -1
  9. package/dist/modules-sdk/internal-module-service.d.ts.map +1 -1
  10. package/dist/order/service.d.ts +1450 -0
  11. package/dist/order/service.d.ts.map +1 -1
  12. package/dist/pricing/common/index.d.ts +1 -1
  13. package/dist/pricing/common/index.d.ts.map +1 -1
  14. package/dist/pricing/common/index.js +1 -1
  15. package/dist/pricing/common/index.js.map +1 -1
  16. package/dist/pricing/common/money-amount.d.ts +0 -5
  17. package/dist/pricing/common/money-amount.d.ts.map +1 -1
  18. package/dist/pricing/common/price-list.d.ts +2 -2
  19. package/dist/pricing/common/price-list.d.ts.map +1 -1
  20. package/dist/pricing/common/price-rule.d.ts +7 -7
  21. package/dist/pricing/common/price-rule.d.ts.map +1 -1
  22. package/dist/pricing/common/price-set-rule-type.d.ts +2 -2
  23. package/dist/pricing/common/price-set-rule-type.d.ts.map +1 -1
  24. package/dist/pricing/common/price.d.ts +137 -0
  25. package/dist/pricing/common/price.d.ts.map +1 -0
  26. package/dist/pricing/common/{price-set-money-amount.js → price.js} +1 -1
  27. package/dist/pricing/common/price.js.map +1 -0
  28. package/dist/pricing/service.d.ts +68 -68
  29. package/dist/pricing/service.d.ts.map +1 -1
  30. package/dist/sales-channel/mutations.d.ts +5 -1
  31. package/dist/sales-channel/mutations.d.ts.map +1 -1
  32. package/dist/sales-channel/service.d.ts +127 -62
  33. package/dist/sales-channel/service.d.ts.map +1 -1
  34. package/dist/shared-context.d.ts +4 -0
  35. package/dist/shared-context.d.ts.map +1 -1
  36. package/dist/stock-location/common.d.ts +11 -10
  37. package/dist/stock-location/common.d.ts.map +1 -1
  38. package/dist/stock-location/service-next.d.ts +22 -3
  39. package/dist/stock-location/service-next.d.ts.map +1 -1
  40. package/dist/workflow/invite/accept-invite.d.ts +1 -0
  41. package/dist/workflow/invite/accept-invite.d.ts.map +1 -1
  42. package/package.json +1 -1
  43. package/dist/pricing/common/price-set-money-amount.d.ts +0 -93
  44. package/dist/pricing/common/price-set-money-amount.d.ts.map +0 -1
  45. package/dist/pricing/common/price-set-money-amount.js.map +0 -1
@@ -5,18 +5,22 @@ import { Context } from "../shared-context";
5
5
  import { FilterableSalesChannelProps, SalesChannelDTO } from "./common";
6
6
  import { CreateSalesChannelDTO, UpdateSalesChannelDTO, UpsertSalesChannelDTO } from "./mutations";
7
7
  /**
8
- * The main service interface for the sales channel module.
8
+ * The main service interface for the Sales Channel Module.
9
9
  */
10
10
  export interface ISalesChannelModuleService extends IModuleService {
11
11
  /**
12
12
  * This method creates sales channels.
13
13
  *
14
- * @param {CreateSalesChannelDTO[]} data - The sales channel to be created.
14
+ * @param {CreateSalesChannelDTO[]} data - The sales channels to be created.
15
15
  * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
16
16
  * @returns {Promise<SalesChannelDTO[]>} The created sales channels.
17
17
  *
18
18
  * @example
19
- * {example-code}
19
+ * const salesChannels = await salesChannelModuleService.create([
20
+ * {
21
+ * name: "B2B",
22
+ * },
23
+ * ])
20
24
  */
21
25
  create(data: CreateSalesChannelDTO[], sharedContext?: Context): Promise<SalesChannelDTO[]>;
22
26
  /**
@@ -24,25 +28,91 @@ export interface ISalesChannelModuleService extends IModuleService {
24
28
  *
25
29
  * @param {CreateSalesChannelDTO} data - The sales channel to be created.
26
30
  * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
27
- * @returns {Promise<SalesChannelDTO>} The created a sales channel.
31
+ * @returns {Promise<SalesChannelDTO>} The created sales channel.
28
32
  *
29
33
  * @example
30
- * {example-code}
34
+ * const salesChannel = await salesChannelModuleService.create({
35
+ * name: "B2B",
36
+ * })
31
37
  */
32
38
  create(data: CreateSalesChannelDTO, sharedContext?: Context): Promise<SalesChannelDTO>;
39
+ /**
40
+ * This method updates an existing sales channel.
41
+ *
42
+ * @param {string} channelId - The sales channel's ID.
43
+ * @param {UpdateSalesChannelDTO} data - The attributes to update in the sales channel.
44
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
45
+ * @returns {Promise<SalesChannelDTO>} The updated sales channel.
46
+ *
47
+ * @example
48
+ * const salesChannel = await salesChannelModuleService.update(
49
+ * "sc_123",
50
+ * {
51
+ * description: "Sales channel for B2B customers",
52
+ * }
53
+ * )
54
+ */
33
55
  update(channelId: string, data: UpdateSalesChannelDTO, sharedContext?: Context): Promise<SalesChannelDTO>;
56
+ /**
57
+ * This method updates existing sales channels matching the specified filters
58
+ *
59
+ * @param {FilterableSalesChannelProps} selector - The filters specifying which sales channels to update.
60
+ * @param {UpdateSalesChannelDTO} data - The attributes to update in the sales channel.
61
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
62
+ * @returns {Promise<SalesChannelDTO[]>} The updated sales channels.
63
+ *
64
+ * @example
65
+ * const salesChannels = await salesChannelModuleService.update(
66
+ * {
67
+ * name: "B2B",
68
+ * },
69
+ * {
70
+ * description: "Sales channel for B2B customers",
71
+ * }
72
+ * )
73
+ */
34
74
  update(selector: FilterableSalesChannelProps, data: UpdateSalesChannelDTO, sharedContext?: Context): Promise<SalesChannelDTO[]>;
75
+ /**
76
+ * This method updates or creates a sales channel if it doesn't exist.
77
+ *
78
+ * @param {UpsertSalesChannelDTO} data - The attributes in the sales channel to be created or updated.
79
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
80
+ * @returns {Promise<SalesChannelDTO>} The created or updated sales channel.
81
+ *
82
+ * @example
83
+ * const salesChannel = await salesChannelModuleService.upsert({
84
+ * name: "B2B",
85
+ * })
86
+ */
35
87
  upsert(data: UpsertSalesChannelDTO, sharedContext?: Context): Promise<SalesChannelDTO>;
88
+ /**
89
+ * This method updates or creates sales channels if they don't exist.
90
+ *
91
+ * @param {UpsertSalesChannelDTO[]} data - The attributes in the sales channels to be created or updated.
92
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
93
+ * @returns {Promise<SalesChannelDTO[]>} The created or updated sales channels.
94
+ *
95
+ * @example
96
+ * const salesChannels = await salesChannelModuleService.upsert([
97
+ * {
98
+ * name: "B2B",
99
+ * },
100
+ * {
101
+ * id: "sc_123",
102
+ * description: "Sales channel for B2B customers",
103
+ * },
104
+ * ])
105
+ */
36
106
  upsert(data: UpsertSalesChannelDTO[], sharedContext?: Context): Promise<SalesChannelDTO[]>;
37
107
  /**
38
- * This method deletes sales channels by their IDs.
108
+ * This method deletes sales channel by their IDs.
39
109
  *
40
- * @param {string[]} ids - The list of IDs of sales channels to delete.
110
+ * @param {string[]} ids - The IDs of the sales channel.
41
111
  * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
42
- * @returns {Promise<void>} Resolves when the sales channels are deleted.
112
+ * @returns {Promise<void>} Resolves when the sales channels are deleted successfully.
43
113
  *
44
114
  * @example
45
- * {example-code}
115
+ * await salesChannelModuleService.delete(["sc_123", "sc_321"])
46
116
  */
47
117
  delete(ids: string[], sharedContext?: Context): Promise<void>;
48
118
  /**
@@ -50,124 +120,119 @@ export interface ISalesChannelModuleService extends IModuleService {
50
120
  *
51
121
  * @param {string} id - The ID of the sales channel.
52
122
  * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
53
- * @returns {Promise<void>} Resolves when the sales channel is deleted.
123
+ * @returns {Promise<void>} Resolves when the sales channel is deleted successfully.
54
124
  *
55
125
  * @example
56
- * {example-code}
126
+ * await salesChannelModuleService.delete("sc_123")
57
127
  */
58
128
  delete(id: string, sharedContext?: Context): Promise<void>;
59
129
  /**
60
130
  * This method retrieves a sales channel by its ID.
61
131
  *
62
- * @param {string} id - The ID of the retrieve.
132
+ * @param {string} id - The ID of the sales channel.
63
133
  * @param {FindConfig<SalesChannelDTO>} config - The configurations determining how the sales channel is retrieved. Its properties, such as `select` or `relations`, accept the
64
134
  * attributes or relations associated with a sales channel.
65
135
  * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
66
- * @returns {Promise<SalesChannelDTO>} The retrieved sales channels.
136
+ * @returns {Promise<SalesChannelDTO>} The retrieved sales channel.
67
137
  *
68
138
  * @example
69
- * A simple example that retrieves a {type name} by its ID:
70
- *
71
- * ```ts
72
- * {example-code}
73
- * ```
74
- *
75
- * To specify relations that should be retrieved:
76
- *
77
- * ```ts
78
- * {example-code}
79
- * ```
80
- *
81
- *
139
+ * const salesChannel =
140
+ * await salesChannelModuleService.retrieve("sc_123")
82
141
  */
83
142
  retrieve(id: string, config?: FindConfig<SalesChannelDTO>, sharedContext?: Context): Promise<SalesChannelDTO>;
84
143
  /**
85
144
  * This method retrieves a paginated list of sales channels based on optional filters and configuration.
86
145
  *
87
- * @param {FilterableSalesChannelProps} filters - The filters to apply on the retrieved sales channel.
146
+ * @param {FilterableSalesChannelProps} filters - The filters to apply on the retrieved sales channels.
88
147
  * @param {FindConfig<SalesChannelDTO>} config - The configurations determining how the sales channel is retrieved. Its properties, such as `select` or `relations`, accept the
89
148
  * attributes or relations associated with a sales channel.
90
149
  * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
91
150
  * @returns {Promise<SalesChannelDTO[]>} The list of sales channels.
92
151
  *
93
152
  * @example
94
- * To retrieve a list of {type name} using their IDs:
153
+ * To retrieve a list of sales channels using their IDs:
95
154
  *
96
155
  * ```ts
97
- * {example-code}
156
+ * const salesChannels = await salesChannelModuleService.list({
157
+ * id: ["sc_123", "sc_321"],
158
+ * })
98
159
  * ```
99
160
  *
100
- * To specify relations that should be retrieved within the {type name}:
161
+ * By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
101
162
  *
102
163
  * ```ts
103
- * {example-code}
164
+ * const salesChannels = await salesChannelModuleService.list(
165
+ * {
166
+ * id: ["sc_123", "sc_321"],
167
+ * },
168
+ * {
169
+ * take: 20,
170
+ * skip: 2,
171
+ * }
172
+ * )
104
173
  * ```
105
- *
106
- * By default, only the first `{default limit}` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
107
- *
108
- * ```ts
109
- * {example-code}
110
- * ```
111
- *
112
- *
113
174
  */
114
175
  list(filters?: FilterableSalesChannelProps, config?: FindConfig<SalesChannelDTO>, sharedContext?: Context): Promise<SalesChannelDTO[]>;
115
176
  /**
116
177
  * This method retrieves a paginated list of sales channels along with the total count of available sales channels satisfying the provided filters.
117
178
  *
118
- * @param {FilterableSalesChannelProps} filters - The filters to apply on the retrieved sales channel.
179
+ * @param {FilterableSalesChannelProps} filters - The filters to apply on the retrieved sales channels.
119
180
  * @param {FindConfig<SalesChannelDTO>} config - The configurations determining how the sales channel is retrieved. Its properties, such as `select` or `relations`, accept the
120
181
  * attributes or relations associated with a sales channel.
121
182
  * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
122
183
  * @returns {Promise<[SalesChannelDTO[], number]>} The list of sales channels along with their total count.
123
184
  *
124
185
  * @example
125
- * To retrieve a list of {type name} using their IDs:
186
+ * To retrieve a list of sales channels using their IDs:
126
187
  *
127
188
  * ```ts
128
- * {example-code}
189
+ * const [salesChannels, count] =
190
+ * await salesChannelModuleService.listAndCount({
191
+ * id: ["sc_123", "sc_321"],
192
+ * })
129
193
  * ```
130
194
  *
131
- * To specify relations that should be retrieved within the {type name}:
195
+ * By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
132
196
  *
133
197
  * ```ts
134
- * {example-code}
198
+ * const [salesChannels, count] =
199
+ * await salesChannelModuleService.listAndCount(
200
+ * {
201
+ * id: ["sc_123", "sc_321"],
202
+ * },
203
+ * {
204
+ * take: 20,
205
+ * skip: 2,
206
+ * }
207
+ * )
135
208
  * ```
136
- *
137
- * By default, only the first `{default limit}` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
138
- *
139
- * ```ts
140
- * {example-code}
141
- * ```
142
- *
143
- *
144
209
  */
145
210
  listAndCount(filters?: FilterableSalesChannelProps, config?: FindConfig<SalesChannelDTO>, sharedContext?: Context): Promise<[SalesChannelDTO[], number]>;
146
211
  /**
147
212
  * This method soft deletes sales channels by their IDs.
148
213
  *
149
- * @param {string[]} salesChannelIds - The list of IDs of sales channels to soft delete.
214
+ * @param {string[]} salesChannelIds - The sales channels' ID.
150
215
  * @param {SoftDeleteReturn<TReturnableLinkableKeys>} config - An object that is used to specify an entity's related entities that should be soft-deleted when the main entity is soft-deleted.
151
216
  * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
152
- * @returns {Promise<void | Record<string, string[]>>} Resolves when the sales channels are soft deleted.
217
+ * @returns {Promise<void | Record<string, string[]>>} An object that includes the IDs of related records that were also soft deleted.
218
+ * If there are no related records, the promise resolves to `void`.
153
219
  *
154
220
  * @example
155
- * {example-code}
221
+ * await salesChannelModuleService.delete(["sc_123", "sc_321"])
156
222
  */
157
223
  softDelete<TReturnableLinkableKeys extends string = string>(salesChannelIds: string[], config?: SoftDeleteReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
158
224
  /**
159
- * This method restores soft deleted sales channels by their IDs.
225
+ * This method restores a soft deleted sales channel by its IDs.
160
226
  *
161
- * @param {string[]} salesChannelIds - The list of IDs of sales channels to restore.
162
- * @param {RestoreReturn<TReturnableLinkableKeys>} config - Configurations determining which relations to restore along with each of the sales channels. You can pass to its `returnLinkableKeys`
163
- * property any of the sales channels's relation attribute names.
227
+ * @param {string[]} salesChannelIds - The list of {summary}
228
+ * @param {RestoreReturn<TReturnableLinkableKeys>} config - Configurations determining which relations to restore along with each of the sales channel. You can pass to its `returnLinkableKeys`
229
+ * property any of the sales channel's relation attribute names.
164
230
  * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
165
231
  * @returns {Promise<void | Record<string, string[]>>} An object that includes the IDs of related records that were restored.
166
- * The object's keys are the ID attribute names of the sales channels entity's relations,
167
- * and its value is an array of strings, each being the ID of the record associated with the sales channel through this relation.
232
+ * If there are no related records restored, the promise resolves to `void`.
168
233
  *
169
234
  * @example
170
- * {example-code}
235
+ * await salesChannelModuleService.restore(["sc_123", "sc_321"])
171
236
  */
172
237
  restore<TReturnableLinkableKeys extends string = string>(salesChannelIds: string[], config?: RestoreReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
173
238
  }
@@ -1 +1 @@
1
- {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/sales-channel/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC3C,OAAO,EAAE,2BAA2B,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AACvE,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAEjG;;GAEG;AACH,MAAM,WAAW,0BAA2B,SAAQ,cAAc;IAChE;;;;;;;;;OASG;IACH,MAAM,CACJ,IAAI,EAAE,qBAAqB,EAAE,EAC7B,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,eAAe,EAAE,CAAC,CAAA;IAE7B;;;;;;;;;OASG;IACH,MAAM,CACJ,IAAI,EAAE,qBAAqB,EAC3B,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAA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CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,eAAe,CAAC,CAAA;IAE3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,IAAI,CACF,OAAO,CAAC,EAAE,2BAA2B,EACrC,MAAM,CAAC,EAAE,UAAU,CAAC,eAAe,CAAC,EACpC,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,eAAe,EAAE,CAAC,CAAA;IAE7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,YAAY,CACV,OAAO,CAAC,EAAE,2BAA2B,EACrC,MAAM,CAAC,EAAE,UAAU,CAAC,eAAe,CAAC,EACpC,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,CAAC,eAAe,EAAE,EAAE,MAAM,CAAC,CAAC,CAAA;IAEvC;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,uBAAuB,SAAS,MAAM,GAAG,MAAM,EACxD,eAAe,EAAE,MAAM,EAAE,EACzB,MAAM,CAAC,EAAE,gBAAgB,CAAC,uBAAuB,CAAC,EAClD,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC,CAAA;IAE3C;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,uBAAuB,SAAS,MAAM,GAAG,MAAM,EACrD,eAAe,EAAE,MAAM,EAAE,EACzB,MAAM,CAAC,EAAE,aAAa,CAAC,uBAAuB,CAAC,EAC/C,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC,CAAA;CAC5C"}
@@ -67,5 +67,9 @@ export type Context<TManager = unknown> = {
67
67
  * A string indicating the ID of the current request.
68
68
  */
69
69
  requestId?: string;
70
+ /**
71
+ * A string indicating the idempotencyKey of the current workflow execution.
72
+ */
73
+ idempotencyKey?: string;
70
74
  };
71
75
  //# sourceMappingURL=shared-context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shared-context.d.ts","sourceRoot":"","sources":["../src/shared-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAErC;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,kBAAkB,CAAC,EAAE,aAAa,CAAA;IAClC;;OAEG;IACH,OAAO,CAAC,EAAE,aAAa,CAAA;CACxB,CAAA;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,MAAM,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACvD;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,EAAE,GAAG,IAAI,CAAA;IACpC,WAAW,CAAC,MAAM,CAAC,EAAE,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAAA;IACxE,aAAa,IAAI,IAAI,CAAA;IACrB,kBAAkB,CAAC,CAAC,EAClB,WAAW,EACP,aAAa,CAAC,aAAa,CAAC,CAAC,CAAC,GAC9B,aAAa,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,EACpC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,IAAI,CAAA;CACR;AAED;;;GAGG;AACH,MAAM,MAAM,OAAO,CAAC,QAAQ,GAAG,OAAO,IAAI;IACxC,MAAM,CAAC,EAAE,eAAe,CAAA;IACxB;;OAEG;IACH,kBAAkB,CAAC,EAAE,QAAQ,CAAA;IAC7B;;OAEG;IACH,OAAO,CAAC,EAAE,Q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AC,EAAE,EACpC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,IAAI,CAAA;CACR;AAED;;;GAGG;AACH,MAAM,MAAM,OAAO,CAAC,QAAQ,GAAG,OAAO,IAAI;IACxC,MAAM,CAAC,EAAE,eAAe,CAAA;IACxB;;OAEG;IACH,kBAAkB,CAAC,EAAE,QAAQ,CAAA;IAC7B;;OAEG;IACH,OAAO,CAAC,EAAE,QAAQ,CAAA;IAClB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;OAEG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAA;IAClC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB;;OAEG;IACH,iBAAiB,CAAC,EAAE,kBAAkB,CAAA;IAEtC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA"}
@@ -1,4 +1,4 @@
1
- import { StringComparisonOperator } from "../common/common";
1
+ import { BaseFilterable, OperatorMap } from "../dal";
2
2
  /**
3
3
  * @schema StockLocationAddressDTO
4
4
  * title: "Stock Location Address"
@@ -218,7 +218,7 @@ export type StockLocationExpandedDTO = StockLocationDTO & {
218
218
  *
219
219
  * The filters to apply on the retrieved stock locations.
220
220
  */
221
- export type FilterableStockLocationProps = {
221
+ export interface FilterableStockLocationProps extends BaseFilterable<FilterableStockLocationProps> {
222
222
  /**
223
223
  * Search parameter for stock location names
224
224
  */
@@ -230,8 +230,8 @@ export type FilterableStockLocationProps = {
230
230
  /**
231
231
  * The names to filter stock locations by.
232
232
  */
233
- name?: string | string[] | StringComparisonOperator;
234
- };
233
+ name?: string | string[] | OperatorMap<string>;
234
+ }
235
235
  /**
236
236
  * @schema StockLocationAddressInput
237
237
  * title: "Stock Location Address Input"
@@ -282,7 +282,7 @@ export type StockLocationAddressInput = {
282
282
  /**
283
283
  * The second line of the stock location address.
284
284
  */
285
- address_2?: string;
285
+ address_2?: string | null;
286
286
  /**
287
287
  * The country code of the stock location address.
288
288
  */
@@ -290,23 +290,23 @@ export type StockLocationAddressInput = {
290
290
  /**
291
291
  * The city of the stock location address.
292
292
  */
293
- city?: string;
293
+ city?: string | null;
294
294
  /**
295
295
  * The phone of the stock location address.
296
296
  */
297
- phone?: string;
297
+ phone?: string | null;
298
298
  /**
299
299
  * The province of the stock location address.
300
300
  */
301
- province?: string;
301
+ province?: string | null;
302
302
  /**
303
303
  * The postal code of the stock location address.
304
304
  */
305
- postal_code?: string;
305
+ postal_code?: string | null;
306
306
  /**
307
307
  * Holds custom data in key-value pairs.
308
308
  */
309
- metadata?: Record<string, unknown>;
309
+ metadata?: Record<string, unknown> | null;
310
310
  };
311
311
  /**
312
312
  * @schema CreateStockLocationInput
@@ -393,4 +393,5 @@ export type UpdateStockLocationInput = {
393
393
  export type UpdateStockLocationNextInput = UpdateStockLocationInput & {
394
394
  id: string;
395
395
  };
396
+ export type UpsertStockLocationInput = Partial<UpdateStockLocationNextInput>;
396
397
  //# sourceMappingURL=common.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/stock-location/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAA;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IAEX;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IAEjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAEzB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAEvB;;OAEG;IACH,YAAY,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NextInput } from "./common";
1
+ import { CreateStockLocationInput, FilterableStockLocationProps, StockLocationDTO, UpdateStockLocationInput, UpsertStockLocationInput } from "./common";
2
+ import { RestoreReturn, SoftDeleteReturn } from "../dal";
2
3
  import { Context } from "../shared-context";
3
4
  import { FindConfig } from "../common/common";
4
5
  import { IModuleService } from "../modules-sdk";
@@ -220,6 +221,8 @@ export interface IStockLocationServiceNext extends IModuleService {
220
221
  */
221
222
  create(input: CreateStockLocationInput, context?: Context): Promise<StockLocationDTO>;
222
223
  create(input: CreateStockLocationInput[], context?: Context): Promise<StockLocationDTO[]>;
224
+ upsert(data: UpsertStockLocationInput[], sharedContext?: Context): Promise<StockLocationDTO[]>;
225
+ upsert(data: UpsertStockLocationInput, sharedContext?: Context): Promise<StockLocationDTO>;
223
226
  /**
224
227
  * This method is used to update a stock location.
225
228
  *
@@ -243,8 +246,8 @@ export interface IStockLocationServiceNext extends IModuleService {
243
246
  * // do something with the stock location or return it
244
247
  * }
245
248
  */
246
- update(input: UpdateStockLocationNextInput[], context?: Context): Promise<StockLocationDTO[]>;
247
- update(input: UpdateStockLocationNextInput, context?: Context): Promise<StockLocationDTO>;
249
+ update(id: string, input: UpdateStockLocationInput, context?: Context): Promise<StockLocationDTO>;
250
+ update(selector: FilterableStockLocationProps, input: UpdateStockLocationInput, context?: Context): Promise<StockLocationDTO[]>;
248
251
  /**
249
252
  * This method is used to delete a stock location.
250
253
  *
@@ -264,5 +267,21 @@ export interface IStockLocationServiceNext extends IModuleService {
264
267
  * }
265
268
  */
266
269
  delete(id: string, context?: Context): Promise<void>;
270
+ /**
271
+ * Soft delete stock locations
272
+ * @param stockLocationIds
273
+ * @param config
274
+ * @param sharedContext
275
+ */
276
+ softDelete<TReturnableLinkableKeys extends string = string>(stockLocationIds: string[], config?: SoftDeleteReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
277
+ /**
278
+ * This method is used to restore a stock location or multiple stock locations that were previously deleted using the {@link softDelete} method.
279
+ *
280
+ * @param {string[]} stockLocationIds - The ID(s) of the stock location(s) to restore.
281
+ * @param {RestoreReturn<TReturnableLinkableKeys>} config - Restore config
282
+ * @param {Context} context - A context used to share resources, such as transaction manager, between the application and the module.
283
+ * @returns {Promise<void>} Resolves when the stock location(s) are successfully restored.
284
+ */
285
+ restore<TReturnableLinkableKeys extends string = string>(stockLocationIds: string[], config?: RestoreReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<string, string[]> | void>;
267
286
  }
268
287
  //# sourceMappingURL=service-next.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"service-next.d.ts","sourceRoot":"","sources":["../../src/stock-location/service-next.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,gBAAgB,EAEhB,4BAA4B,EAC7B,MAAM,UAAU,CAAA;AAEjB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE/C;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,cAAc;IAC/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsEG;IACH,IAAI,CACF,QAAQ,EAAE,4BAA4B,EACtC,MAAM,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,EACrC,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAA;IAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsEG;IACH,YAAY,CACV,QAAQ,EAAE,4BAA4B,EACtC,MAAM,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,EACrC,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,CA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
2
  invite_token: string;
3
3
  auth_user_id: string;
4
4
  user: {
5
+ email?: string;
5
6
  first_name?: string | null;
6
7
  last_name?: string | null;
7
8
  avatar_url?: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"accept-invite.d.ts","sourceRoot":"","sources":["../../../src/workflow/invite/accept-invite.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,4BAA4B;IAC3C,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,IAAI,EAAE;QACJ,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;QAC1B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;QACzB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;QAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;KAC1C,CAAA;CACF"}
1
+ {"version":3,"file":"accept-invite.d.ts","sourceRoot":"","sources":["../../../src/workflow/invite/accept-invite.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,4BAA4B;IAC3C,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,IAAI,EAAE;QACJ,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;QAC1B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;QACzB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;QAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;KAC1C,CAAA;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/types",
3
- "version": "1.12.0-snapshot-20240325085803",
3
+ "version": "1.12.0-snapshot-20240328204235",
4
4
  "description": "Medusa Types definition",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,93 +0,0 @@
1
- import { BaseFilterable } from "../../dal";
2
- import { MoneyAmountDTO } from "./money-amount";
3
- import { PriceListDTO } from "./price-list";
4
- import { PriceRuleDTO } from "./price-rule";
5
- import { PriceSetDTO } from "./price-set";
6
- /**
7
- * @interface
8
- *
9
- * A price set money amount's data.
10
- */
11
- export interface PriceSetMoneyAmountDTO {
12
- /**
13
- * The ID of a price set money amount.
14
- */
15
- id: string;
16
- /**
17
- * The title of the price set money amount.
18
- */
19
- title?: string;
20
- /**
21
- * The price set associated with the price set money amount.
22
- *
23
- * @expandable
24
- */
25
- price_set?: PriceSetDTO;
26
- /**
27
- * The price list associated with the price set money amount.
28
- *
29
- * @expandable
30
- */
31
- price_list?: PriceListDTO;
32
- /**
33
- * The ID of the associated price set.
34
- */
35
- price_set_id?: string;
36
- /**
37
- * The price rules associated with the price set money amount.
38
- *
39
- * @expandable
40
- */
41
- price_rules?: PriceRuleDTO[];
42
- /**
43
- * The money amount associated with the price set money amount.
44
- *
45
- * @expandable
46
- */
47
- money_amount?: MoneyAmountDTO;
48
- /**
49
- * When the price_set_money_amount was created.
50
- */
51
- created_at: Date;
52
- /**
53
- * When the price_set_money_amount was updated.
54
- */
55
- updated_at: Date;
56
- /**
57
- * When the price_set_money_amount was deleted.
58
- */
59
- deleted_at: null | Date;
60
- }
61
- export interface UpdatePriceSetMoneyAmountDTO {
62
- id: string;
63
- title?: string;
64
- price_set?: PriceSetDTO;
65
- money_amount?: MoneyAmountDTO;
66
- }
67
- export interface CreatePriceSetMoneyAmountDTO {
68
- title?: string;
69
- price_set?: PriceSetDTO | string;
70
- price_list?: PriceListDTO | string;
71
- money_amount?: MoneyAmountDTO | string;
72
- rules_count?: number;
73
- }
74
- /**
75
- * @interface
76
- *
77
- * Filters to apply on price set money amounts.
78
- */
79
- export interface FilterablePriceSetMoneyAmountProps extends BaseFilterable<FilterablePriceSetMoneyAmountProps> {
80
- /**
81
- * The IDs to filter the price set money amounts by.
82
- */
83
- id?: string[];
84
- /**
85
- * The IDs to filter the price set money amount's associated price set.
86
- */
87
- price_set_id?: string[];
88
- /**
89
- * The IDs to filter the price set money amount's associated price list.
90
- */
91
- price_list_id?: string[];
92
- }
93
- //# sourceMappingURL=price-set-money-amount.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"price-set-money-amount.d.ts","sourceRoot":"","sources":["../../../src/pricing/common/price-set-money-amount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IACV;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;OAIG;IACH,SAAS,CAAC,EAAE,WAAW,CAAA;IACvB;;;;OAIG;IACH,UAAU,CAAC,EAAE,YAAY,CAAA;IACzB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;;OAIG;IACH,WAAW,CAAC,EAAE,YAAY,EAAE,CAAA;IAC5B;;;;OAIG;IACH,YAAY,CAAC,EAAE,cAAc,CAAA;IAC7B;;OAEG;IACH,UAAU,EAAE,IAAI,CAAA;IAChB;;OAEG;IACH,UAAU,EAAE,IAAI,CAAA;IAChB;;OAEG;IACH,UAAU,EAAE,IAAI,GAAG,IAAI,CAAA;CACxB;AAED,MAAM,WAAW,4BAA4B;IAC3C,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,WAAW,CAAA;IACvB,YAAY,CAAC,EAAE,cAAc,CAAA;CAC9B;AAED,MAAM,WAAW,4BAA4B;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,WAAW,GAAG,MAAM,CAAA;IAChC,UAAU,CAAC,EAAE,YAAY,GAAG,MAAM,CAAA;IAClC,YAAY,CAAC,EAAE,cAAc,GAAG,MAAM,CAAA;IACtC,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,kCACf,SAAQ,cAAc,CAAC,kCAAkC,CAAC;IAC1D;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,EAAE,CAAA;IACb;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;CACzB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"price-set-money-amount.js","sourceRoot":"","sources":["../../../src/pricing/common/price-set-money-amount.ts"],"names":[],"mappings":""}