@medusajs/types 1.12.0-preview-20240701060617 → 1.12.0-preview-20240701090555

Sign up to get free protection for your applications and to get access to all the features.
@@ -42,6 +42,11 @@ export type PropertyType<T> = {
42
42
  * Options accepted by all the relationships
43
43
  */
44
44
  export type RelationshipOptions = {
45
+ /**
46
+ * The name of the relationship as defined
47
+ * in the other data model. This is only required
48
+ * by the `belongsTo` relationship method.
49
+ */
45
50
  mappedBy?: string;
46
51
  } & Record<string, any>;
47
52
  /**
@@ -103,6 +108,10 @@ export type ExtractEntityRelations<Schema extends Record<string, any>, OfType ex
103
108
  * relationship.
104
109
  */
105
110
  export type EntityCascades<Relationships> = {
111
+ /**
112
+ * The related models to delete when a record of this data model
113
+ * is deleted.
114
+ */
106
115
  delete?: Relationships;
107
116
  };
108
117
  /**
@@ -122,9 +131,23 @@ export type InferIndexableProperties<T> = keyof (T extends IDmlEntity<infer Sche
122
131
  } ? Type extends RelationshipTypes ? never : K : K]: string;
123
132
  } & InferForeignKeys<T> : never);
124
133
  export type EntityIndex<TSchema extends DMLSchema = DMLSchema, TWhere = string> = {
134
+ /**
135
+ * The name of the index. If not provided,
136
+ * Medusa generates the name.
137
+ */
125
138
  name?: string;
139
+ /**
140
+ * When enabled, a unique index is created on the specified
141
+ * properties.
142
+ */
126
143
  unique?: boolean;
144
+ /**
145
+ * The list of properties to create the index on.
146
+ */
127
147
  on: InferIndexableProperties<IDmlEntity<TSchema>>[];
148
+ /**
149
+ * Conditions to restrict which records are indexed.
150
+ */
128
151
  where?: TWhere;
129
152
  };
130
153
  export type SimpleQueryValue = string | number | boolean | null;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dml/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,eAA4B,CAAA;AAEpD,MAAM,MAAM,SAAS,GAAG,MAAM,CAC5B,MAAM,EACN,YAAY,CAAC,GAAG,CAAC,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAC1C,CAAA;AAED,MAAM,W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OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;OAEG;IACH,EAAE,EAAE,wBAAwB,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,CAAA;IACnD;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAA;AAC/D,MAAM,MAAM,YAAY,GAAG;IAAE,GAAG,EAAE,gBAAgB,CAAA;CAAE,CAAA;AACpD,MAAM,MAAM,UAAU,GAAG,gBAAgB,GAAG,YAAY,CAAA;AAExD,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,IAAI;KAC3D,CAAC,IAAI,MAAM,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GACtD,UAAU,GACV,cAAc,CAAC,CAAC,CAAC;CACtB,CAAA"}
@@ -65,7 +65,7 @@ export interface FilterableReservationItemProps {
65
65
  /**
66
66
  * @ignore
67
67
  *
68
- * @privateRemark
68
+ * @privateRemarks
69
69
  * This property is not used.
70
70
  */
71
71
  type?: string | string[];
@@ -3,7 +3,5 @@ export * from "./price";
3
3
  export * from "./price-list";
4
4
  export * from "./price-rule";
5
5
  export * from "./price-set";
6
- export * from "./price-set-rule-type";
7
6
  export * from "./pricing-context";
8
- export * from "./rule-type";
9
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pricing/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,uBAAuB,CAAA;AACrC,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pricing/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA"}
@@ -19,7 +19,5 @@ __exportStar(require("./price"), exports);
19
19
  __exportStar(require("./price-list"), exports);
20
20
  __exportStar(require("./price-rule"), exports);
21
21
  __exportStar(require("./price-set"), exports);
22
- __exportStar(require("./price-set-rule-type"), exports);
23
22
  __exportStar(require("./pricing-context"), exports);
24
- __exportStar(require("./rule-type"), exports);
25
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pricing/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA8B;AAC9B,0CAAuB;AACvB,+CAA4B;AAC5B,+CAA4B;AAC5B,8CAA2B;AAC3B,wDAAqC;AACrC,oDAAiC;AACjC,8CAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pricing/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA8B;AAC9B,0CAAuB;AACvB,+CAA4B;AAC5B,+CAA4B;AAC5B,8CAA2B;AAC3B,oDAAiC"}
@@ -1,7 +1,6 @@
1
1
  import { BaseFilterable, OperatorMap } from "../../dal";
2
2
  import { CreateMoneyAmountDTO, MoneyAmountDTO, UpdateMoneyAmountDTO } from "./money-amount";
3
3
  import { PriceDTO } from "./price";
4
- import { RuleTypeDTO } from "./rule-type";
5
4
  /**
6
5
  * @enum
7
6
  *
@@ -55,7 +54,7 @@ export interface PriceListDTO {
55
54
  */
56
55
  rules_count?: number;
57
56
  /**
58
- * The associated price set money amounts.
57
+ * The associated price list money amounts.
59
58
  *
60
59
  * @expandable
61
60
  */
@@ -67,22 +66,7 @@ export interface PriceListDTO {
67
66
  */
68
67
  money_amounts?: MoneyAmountDTO[];
69
68
  /**
70
- * The associated rule types.
71
- *
72
- * @expandable
73
- */
74
- rule_types?: RuleTypeDTO[];
75
- /**
76
- * The price set's rules.
77
- *
78
- * @expandable
79
- */
80
- rules?: PriceListRuleDTO[];
81
- /**
82
- * The price set's rules.
83
- *
84
- * @privateRemarks
85
- * Do we need both this and `rules`?
69
+ * The price list's rules.
86
70
  *
87
71
  * @expandable
88
72
  */
@@ -99,9 +83,9 @@ export interface CreatePriceListPriceDTO extends CreateMoneyAmountDTO {
99
83
  */
100
84
  price_set_id: string;
101
85
  /**
102
- * The rules to add to the price. The object's keys are rule types' `rule_attribute` attribute, and values are the value of that rule associated with this price.
86
+ * The rules to add to the price. The object's keys are the attribute, and values are the value of that rule associated with this price.
103
87
  */
104
- rules?: CreatePriceSetPriceRules;
88
+ rules?: CreatePriceListPriceRules;
105
89
  }
106
90
  export interface UpdatePriceListPriceDTO extends UpdateMoneyAmountDTO {
107
91
  /**
@@ -109,24 +93,24 @@ export interface UpdatePriceListPriceDTO extends UpdateMoneyAmountDTO {
109
93
  */
110
94
  price_set_id: string;
111
95
  /**
112
- * The rules to add to the price. The object's keys are rule types' `rule_attribute` attribute, and values are the value of that rule associated with this price.
96
+ * The rules to add to the price. The object's keys are the attribute, and values are the value of that rule associated with this price.
113
97
  */
114
- rules?: CreatePriceSetPriceRules;
98
+ rules?: CreatePriceListPriceRules;
115
99
  }
116
100
  /**
117
101
  * @interface
118
102
  *
119
- * The price rules to be set for each price in the price set.
103
+ * The price rules to be set for each price in the price list.
120
104
  *
121
- * Each key of the object is a rule type's `rule_attribute`, and its value
105
+ * Each key of the object is an attribute, and its value
122
106
  * is the values of the rule.
123
107
  */
124
- export interface CreatePriceSetPriceRules extends Record<string, string> {
108
+ export interface CreatePriceListPriceRules extends Record<string, string> {
125
109
  }
126
110
  /**
127
111
  * @interface
128
112
  *
129
- * The price list's rules to be set. Each key of the object is a rule type's `rule_attribute`, and its value
113
+ * The price list's rules to be set. Each key of the object the attribute, and its value
130
114
  * is the values of the rule.
131
115
  */
132
116
  export interface CreatePriceListRules extends Record<string, string[]> {
@@ -161,10 +145,6 @@ export interface CreatePriceListDTO {
161
145
  * The price list's type.
162
146
  */
163
147
  type?: PriceListType;
164
- /**
165
- * The number of rules associated with the price list.
166
- */
167
- rules_count?: number;
168
148
  /**
169
149
  * The rules to be created and associated with the price list.
170
150
  */
@@ -204,10 +184,6 @@ export interface UpdatePriceListDTO {
204
184
  * The price list's status.
205
185
  */
206
186
  status?: PriceListStatus;
207
- /**
208
- * The number of rules associated with the price list.
209
- */
210
- rules_count?: number;
211
187
  /**
212
188
  * The rules to be created and associated with the price list.
213
189
  */
@@ -258,20 +234,11 @@ export interface FilterablePriceListRuleProps extends BaseFilterable<FilterableP
258
234
  * The values to filter price list rules by.
259
235
  */
260
236
  value?: string[];
261
- /**
262
- * Filter price list rules by the ID of their associated rule types.
263
- */
264
- rule_type?: string[];
265
237
  /**
266
238
  * Filter price list rules by the ID of their associated price lists.
267
239
  */
268
240
  price_list_id?: string[];
269
241
  }
270
- export interface FilterablePriceListRuleValueProps extends BaseFilterable<FilterablePriceListRuleValueProps> {
271
- id?: string[];
272
- value?: string[];
273
- price_list_rule_id?: string[];
274
- }
275
242
  /**
276
243
  * @interface
277
244
  *
@@ -283,30 +250,21 @@ export interface PriceListRuleDTO {
283
250
  */
284
251
  id: string;
285
252
  /**
286
- * The value of the rule.
253
+ * The attribute of the rule.
287
254
  *
288
- * @privateRemarks
289
- * Shouldn't this be in PriceListRuleValueDTO only?
290
255
  */
291
- value: string;
256
+ attribute: string;
292
257
  /**
293
- * The associated rule type.
258
+ * The value of the rule.
294
259
  *
295
- * @expandable
296
260
  */
297
- rule_type: RuleTypeDTO;
261
+ value: string | string[];
298
262
  /**
299
263
  * The associated price list.
300
264
  *
301
265
  * @expandable
302
266
  */
303
267
  price_list: PriceListDTO;
304
- /**
305
- * The associated rule values.
306
- *
307
- * @expandable
308
- */
309
- price_list_rule_values?: PriceListRuleValueDTO[];
310
268
  }
311
269
  /**
312
270
  * @interface
@@ -314,14 +272,6 @@ export interface PriceListRuleDTO {
314
272
  * The price list rule to create.
315
273
  */
316
274
  export interface CreatePriceListRuleDTO {
317
- /**
318
- * The ID of a rule type to be associated with the price list rule.
319
- */
320
- rule_type_id?: string;
321
- /**
322
- * The ID of a rule type or the details of an existing rule type to be associated with the price list rule.
323
- */
324
- rule_type?: string | RuleTypeDTO;
325
275
  /**
326
276
  * The ID of a price list to be associated with the price list rule.
327
277
  */
@@ -331,64 +281,6 @@ export interface CreatePriceListRuleDTO {
331
281
  */
332
282
  price_list?: string | PriceListDTO;
333
283
  }
334
- /**
335
- * @interface
336
- *
337
- * The attributes to update in a price list rule.
338
- */
339
- export interface UpdatePriceListRuleDTO {
340
- /**
341
- * The ID of the price list rule to update.
342
- */
343
- id: string;
344
- /**
345
- * The ID of a price list to be associated with the price list rule.
346
- */
347
- price_list_id?: string;
348
- /**
349
- * The ID of a rule type to be associated with the price list rule.
350
- */
351
- rule_type_id?: string;
352
- /**
353
- * The ID of a price list to be associated with the price list rule.
354
- */
355
- price_list?: string;
356
- /**
357
- * The ID of a rule type or the details of an existing rule type to be associated with the price list rule.
358
- */
359
- rule_type?: string;
360
- }
361
- /**
362
- * @interface
363
- *
364
- * The price list rule value's details.
365
- */
366
- export interface PriceListRuleValueDTO {
367
- /**
368
- * The price list rule value's ID.
369
- */
370
- id: string;
371
- /**
372
- * The rule's value.
373
- */
374
- value: string;
375
- /**
376
- * The associated price list rule.
377
- *
378
- * @expandable
379
- */
380
- price_list_rule: PriceListRuleDTO;
381
- }
382
- export interface CreatePriceListRuleValueDTO {
383
- value: string;
384
- price_list_rule_id?: string;
385
- price_list_rule?: PriceListRuleDTO | string;
386
- }
387
- export interface UpdatePriceListRuleValueDTO {
388
- id: string;
389
- value: string;
390
- price_list_rule_id: string;
391
- }
392
284
  /**
393
285
  * @interface
394
286
  *
@@ -430,7 +322,7 @@ export interface SetPriceListRulesDTO {
430
322
  */
431
323
  price_list_id: string;
432
324
  /**
433
- * The rules to add to the price list. Each key of the object is a rule type's `rule_attribute`, and its value
325
+ * The rules to add to the price list. Each key of the object is the attribute, and its value
434
326
  * is the value(s) of the rule.
435
327
  */
436
328
  rules: Record<string, string | string[]>;
@@ -446,7 +338,7 @@ export interface RemovePriceListRulesDTO {
446
338
  */
447
339
  price_list_id: string;
448
340
  /**
449
- * The rules to remove from the price list. Each item being a rule type's `rule_attribute`.
341
+ * The rules to remove from the price list. Each item being the attribute.
450
342
  */
451
343
  rules: string[];
452
344
  }
@@ -1 +1 @@
1
- {"version":3,"file":"price-list.d.ts","sourceRoot":"","sources":["../../../src/pricing/common/price-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvD,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,oBAAoB,EACrB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,OAAO,CAAA;AAEhD;;;;;;GAMG;AAEH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,UAAU,CAAA;AAE/C;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IACV;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB;;OAEG;IACH,MAAM,CAAC,EAAE,eAAe,CAAA;IACxB;;OAEG;IACH,I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E,EAAE,MAAM,CAAA;IACV;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;;;OAIG;IACH,eAAe,EAAE,gBAAgB,CAAA;CAClC;AAED,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,MAAM,CAAA;IACb,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,eAAe,CAAC,EAAE,gBAAgB,GAAG,MAAM,CAAA;CAC5C;AAED,MAAM,WAAW,2BAA2B;IAC1C,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,kBAAkB,EAAE,MAAM,CAAA;CAC3B;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAA;IACrB;;OAEG;IACH,MAAM,EAAE,uBAAuB,EAAE,CAAA;CAClC;AAED;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAA;IACrB;;OAEG;IACH,MAAM,EAAE,uBAAuB,EAAE,CAAA;CAClC;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAA;IACrB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAA;CACzC;AAED;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAA;IACrB;;OAEG;IACH,KAAK,EAAE,MAAM,EAAE,CAAA;CAChB"}
1
+ {"version":3,"file":"price-list.d.ts","sourceRoot":"","sources":["../../../src/pricing/common/price-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvD,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,oBAAoB,EACrB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,QAAQ,EAAE,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uB;IACtC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAA;IACrB;;OAEG;IACH,KAAK,EAAE,MAAM,EAAE,CAAA;CAChB"}
@@ -1,6 +1,5 @@
1
1
  import { BaseFilterable } from "../../dal";
2
2
  import { PriceSetDTO } from "./price-set";
3
- import { RuleTypeDTO } from "./rule-type";
4
3
  /**
5
4
  * @interface
6
5
  *
@@ -21,15 +20,9 @@ export interface PriceRuleDTO {
21
20
  */
22
21
  price_set: PriceSetDTO;
23
22
  /**
24
- * The ID of the associated rule type.
23
+ * The attribute of the price rule
25
24
  */
26
- rule_type_id: string;
27
- /**
28
- * The associated rule type.
29
- *
30
- * @expandable
31
- */
32
- rule_type: RuleTypeDTO;
25
+ attribute: string;
33
26
  /**
34
27
  * The value of the price rule.
35
28
  */
@@ -71,9 +64,9 @@ export interface CreatePriceRuleDTO {
71
64
  */
72
65
  price_set_id?: string;
73
66
  /**
74
- * The ID of the associated rule type.
67
+ * The attribute of the price rule
75
68
  */
76
- rule_type_id?: string;
69
+ attribute: string;
77
70
  /**
78
71
  * The value of the price rule.
79
72
  */
@@ -96,7 +89,10 @@ export interface CreatePriceRuleDTO {
96
89
  export interface UpdatePriceRuleDTO {
97
90
  id: string;
98
91
  price_set_id?: string;
99
- rule_type_id?: string;
92
+ /**
93
+ * The attribute of the price rule
94
+ */
95
+ attribute?: string;
100
96
  /**
101
97
  * The value of the price rule.
102
98
  */
@@ -131,9 +127,5 @@ export interface FilterablePriceRuleProps extends BaseFilterable<FilterablePrice
131
127
  * The IDs to filter the price rule's associated price set.
132
128
  */
133
129
  price_set_id?: string[];
134
- /**
135
- * The IDs to filter the price rule's associated rule type.
136
- */
137
- rule_type_id?: string[];
138
130
  }
139
131
  //# sourceMappingURL=price-rule.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"price-rule.d.ts","sourceRoot":"","sources":["../../../src/pricing/common/price-rule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,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AM,CAAA;IACjB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,wBACf,SAAQ,cAAc,CAAC,wBAAwB,CAAC;IAChD;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,EAAE,CAAA;IACb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;CACxB"}
1
+ {"version":3,"file":"price-rule.d.ts","sourceRoot":"","sources":["../../../src/pricing/common/price-rule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IACV;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,SAAS,EAAE,WAAW,CAAA;IACtB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAA;IACrB;;OAEG;IACH,UAAU,EAAE,IAAI,CAAA;IAChB;;OAEG;IACH,UAAU,EAAE,IAAI,CAAA;IAChB;;OAEG;IACH,UAAU,EAAE,IAAI,GAAG,IAAI,CAAA;CACxB;AAED;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,wBACf,SAAQ,cAAc,CAAC,wBAAwB,CAAC;IAChD;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,EAAE,CAAA;IACb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;CACxB"}
@@ -2,8 +2,6 @@ import { BaseFilterable } from "../../dal";
2
2
  import { Context } from "../../shared-context";
3
3
  import { BigNumberInput, BigNumberValue } from "../../totals";
4
4
  import { CreateMoneyAmountDTO, FilterableMoneyAmountProps, MoneyAmountDTO } from "./money-amount";
5
- import { CreatePriceSetPriceRules } from "./price-list";
6
- import { RuleTypeDTO } from "./rule-type";
7
5
  export interface PricingRepositoryService {
8
6
  calculatePrices(pricingFilters: PricingFilters, pricingContext: PricingContext, context: Context): Promise<CalculatedPriceSetDTO[]>;
9
7
  }
@@ -50,10 +48,6 @@ export interface PriceSetDTO {
50
48
  * The calculated price based on the context.
51
49
  */
52
50
  calculated_price?: CalculatedPriceSet;
53
- /**
54
- * The rule types applied on this price set.
55
- */
56
- rule_types?: RuleTypeDTO[];
57
51
  }
58
52
  /**
59
53
  * @interface
@@ -183,22 +177,12 @@ export interface CalculatedPriceSet {
183
177
  /**
184
178
  * @interface
185
179
  *
186
- * The rules to add to a price set.
180
+ * The price rules to be set for each price in the price set.
181
+ *
182
+ * Each key of the object is a the attribute, and its value
183
+ * is the values of the rule.
187
184
  */
188
- export interface AddRulesDTO {
189
- /**
190
- * The ID of the price set to add the rules to.
191
- */
192
- priceSetId: string;
193
- /**
194
- * The rules to add to a price set.
195
- */
196
- rules: {
197
- /**
198
- * The value of the rule's `rule_attribute` attribute.
199
- */
200
- attribute: string;
201
- }[];
185
+ export interface CreatePriceSetPriceRules extends Record<string, string> {
202
186
  }
203
187
  /**
204
188
  * @interface
@@ -207,7 +191,7 @@ export interface AddRulesDTO {
207
191
  */
208
192
  export interface CreatePricesDTO extends CreateMoneyAmountDTO {
209
193
  /**
210
- * The rules to add to the price. The object's keys are rule types' `rule_attribute` attribute, and values are the value of that rule associated with this price.
194
+ * The rules to add to the price. The object's keys are the attribute, and values are the value of that rule associated with this price.
211
195
  */
212
196
  rules?: CreatePriceSetPriceRules;
213
197
  }
@@ -226,36 +210,12 @@ export interface AddPricesDTO {
226
210
  */
227
211
  prices: CreatePricesDTO[];
228
212
  }
229
- /**
230
- * @interface
231
- *
232
- * The rules to remove from a price set.
233
- */
234
- export interface RemovePriceSetRulesDTO {
235
- /**
236
- * The ID of the price set.
237
- */
238
- id: string;
239
- /**
240
- * The rules to remove. Each string is the `rule_attribute` of a rule to remove.
241
- */
242
- rules: string[];
243
- }
244
213
  /**
245
214
  * @interface
246
215
  *
247
216
  * A price set to create.
248
217
  */
249
218
  export interface CreatePriceSetDTO {
250
- /**
251
- * The rules to associate with the price set.
252
- */
253
- rules?: {
254
- /**
255
- * the value of the rule's `rule_attribute` attribute.
256
- */
257
- rule_attribute: string;
258
- }[];
259
219
  /**
260
220
  * The prices to create and add to this price set.
261
221
  */
@@ -279,15 +239,6 @@ export interface UpsertPriceSetDTO extends UpdatePriceSetDTO {
279
239
  * The data to update in a price set.
280
240
  */
281
241
  export interface UpdatePriceSetDTO {
282
- /**
283
- * The rules to associate with the price set.
284
- */
285
- rules?: {
286
- /**
287
- * the value of the rule's `rule_attribute` attribute.
288
- */
289
- rule_attribute: string;
290
- }[];
291
242
  /**
292
243
  * The prices to create and add to this price set.
293
244
  */
@@ -1 +1 @@
1
- {"version":3,"file":"price-set.d.ts","sourceRoot":"","sources":["../../../src/pricing/common/price-set.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7D,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,cAAc,EACf,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAA;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC,MAAM,WAAW,wBAAwB;IACvC,eAAe,CACb,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAAA;CACpC;AAED;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,CAAC,CAAA;CAClD;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,EAAE,EAAE,MAAM,EAAE,CAAA;CACb;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IACV;;OAEG;IACH,MAAM,CAAC,EAAE,cAAc,EAAE,CAAA;IAEzB;;OAEG;IACH,gBAAgB,CAAC,EAAE,kBAAkB,CAAA;IAErC;;OAEG;IACH,UAAU,CAAC,EAAE,WAAW,EAAE,CAAA;CAC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;IACH;;OAEG;IACH,MAAM,CAAC,EAAE,eAAe,EAAE,CAAA;CAC3B;AAED;;;;GAIG;AACH,MAAM,WAAW,uBACf,SAAQ,cAAc,CAAC,uBAAuB,CAAC,EAC7C,cAAc;IAChB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,EAAE,CAAA;IACb;;OAEG;IACH,aAAa,CAAC,EAAE,0BAA0B,CAAA;CAC3C"}
1
+ {"version":3,"file":"price-set.d.ts","sourceRoot":"","sources":["../../../src/pricing/common/price-set.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7D,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,cAAc,EACf,MAAM,gBAAgB,CAAA;AAEvB,MAAM,WAAW,wBAAwB;IACvC,eAAe,CACb,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAAA;CACpC;AAED;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,CAAC,CAAA;CAClD;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,EAAE,EAAE,MAAM,EAAE,CAAA;CACb;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IACV;;OAEG;IACH,MAAM,CAAC,EAAE,cAAc,EAAE,CAAA;IAEzB;;OAEG;IACH,gBAAgB,CAAC,EAAE,kBAAkB,CAAA;CACtC;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,EAAE,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eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;QAC9B;;WAEG;QACH,YAAY,EAAE,cAAc,GAAG,IAAI,CAAA;QACnC;;WAEG;QACH,YAAY,EAAE,cAAc,GAAG,IAAI,CAAA;KACpC,CAAA;CACF;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,wBAAyB,SAAQ,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;CAAG;AAE3E;;;;GAIG;AACH,MAAM,WAAW,eAAgB,SAAQ,oBAAoB;IAC3D;;OAEG;IACH,KAAK,CAAC,EAAE,wBAAwB,CAAA;CACjC;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,MAAM,EAAE,eAAe,EAAE,CAAA;CAC1B;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,MAAM,CAAC,EAAE,eAAe,EAAE,CAAA;CAC3B;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,MAAM,CAAC,EAAE,eAAe,EAAE,CAAA;CAC3B;AAED;;;;GAIG;AACH,MAAM,WAAW,uBACf,SAAQ,cAAc,CAAC,uBAAuB,CAAC,EAC7C,cAAc;IAChB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,EAAE,CAAA;IACb;;OAEG;IACH,aAAa,CAAC,EAAE,0BAA0B,CAAA;CAC3C"}
@@ -2,7 +2,7 @@ import { FindConfig } from "../common";
2
2
  import { RestoreReturn, SoftDeleteReturn } from "../dal";
3
3
  import { IModuleService } from "../modules-sdk";
4
4
  import { Context } from "../shared-context";
5
- import { AddPriceListPricesDTO, AddPricesDTO, CalculatedPriceSet, CreatePriceListDTO, CreatePriceRuleDTO, CreatePriceSetDTO, CreateRuleTypeDTO, FilterablePriceListProps, FilterablePriceListRuleProps, FilterablePriceProps, FilterablePriceRuleProps, FilterablePriceSetProps, FilterableRuleTypeProps, PriceDTO, PriceListDTO, PriceListRuleDTO, PriceRuleDTO, PriceSetDTO, PricingContext, PricingFilters, RemovePriceListRulesDTO, RuleTypeDTO, SetPriceListRulesDTO, UpdatePriceListDTO, UpdatePriceListPricesDTO, UpdatePriceRuleDTO, UpdatePriceSetDTO, UpdateRuleTypeDTO, UpsertPriceSetDTO } from "./common";
5
+ import { AddPriceListPricesDTO, AddPricesDTO, CalculatedPriceSet, CreatePriceListDTO, CreatePriceRuleDTO, CreatePriceSetDTO, FilterablePriceListProps, FilterablePriceListRuleProps, FilterablePriceProps, FilterablePriceRuleProps, FilterablePriceSetProps, PriceDTO, PriceListDTO, PriceListRuleDTO, PriceRuleDTO, PriceSetDTO, PricingContext, PricingFilters, RemovePriceListRulesDTO, SetPriceListRulesDTO, UpdatePriceListDTO, UpdatePriceListPricesDTO, UpdatePriceRuleDTO, UpdatePriceSetDTO, UpsertPriceSetDTO } from "./common";
6
6
  /**
7
7
  * The main service interface for the Pricing Module.
8
8
  */
@@ -233,10 +233,6 @@ export interface IPricingModuleService extends IModuleService {
233
233
  *
234
234
  * ```ts
235
235
  * const priceSet = await pricingModuleService.createPriceSets({
236
- * rules: [
237
- * { rule_attribute: "region_id" },
238
- * { rule_attribute: "city" },
239
- * ],
240
236
  * prices: [
241
237
  * {
242
238
  * amount: 300,
@@ -296,10 +292,6 @@ export interface IPricingModuleService extends IModuleService {
296
292
  * },
297
293
  * // price set with rules
298
294
  * {
299
- * rules: [
300
- * { rule_attribute: "region_id" },
301
- * { rule_attribute: "city" },
302
- * ],
303
295
  * prices: [
304
296
  * {
305
297
  * amount: 300,
@@ -345,10 +337,6 @@ export interface IPricingModuleService extends IModuleService {
345
337
  * },
346
338
  * ],
347
339
  * },
348
- * {
349
- * id: "pset_123",
350
- * rules: [{ rule_attribute: "region_id" }],
351
- * },
352
340
  * ])
353
341
  */
354
342
  upsertPriceSets(data: UpsertPriceSetDTO[], sharedContext?: Context): Promise<PriceSetDTO[]>;
@@ -362,7 +350,7 @@ export interface IPricingModuleService extends IModuleService {
362
350
  * @example
363
351
  * const priceSet = await pricingModuleService.upsertPriceSets({
364
352
  * id: "pset_123",
365
- * rules: [{ rule_attribute: "region_id" }],
353
+ * prices: [{ amount: 100, currency_code: "USD" }],
366
354
  * })
367
355
  */
368
356
  upsertPriceSets(data: UpsertPriceSetDTO, sharedContext?: Context): Promise<PriceSetDTO>;
@@ -378,7 +366,7 @@ export interface IPricingModuleService extends IModuleService {
378
366
  * const priceSet = await pricingModuleService.updatePriceSets(
379
367
  * "pset_123",
380
368
  * {
381
- * rules: [{ rule_attribute: "region_id" }],
369
+ * prices: [{ amount: 100, currency_code: "USD" }],
382
370
  * }
383
371
  * )
384
372
  */
@@ -397,7 +385,7 @@ export interface IPricingModuleService extends IModuleService {
397
385
  * id: ["pset_123", "pset_321"],
398
386
  * },
399
387
  * {
400
- * rules: [{ rule_attribute: "region_id" }],
388
+ * prices: [{ amount: 100, currency_code: "USD" }],
401
389
  * }
402
390
  * )
403
391
  */
@@ -510,191 +498,6 @@ export interface IPricingModuleService extends IModuleService {
510
498
  * ])
511
499
  */
512
500
  addPrices(data: AddPricesDTO[], sharedContext?: Context): Promise<PriceSetDTO[]>;
513
- /**
514
- * This method is used to retrieve a rule type by its ID and and optionally based on the provided configurations.
515
- *
516
- * @param {string} id - The ID of the rule type to retrieve.
517
- * @param {FindConfig<RuleTypeDTO>} config -
518
- * The configurations determining how the rule type is retrieved. Its properties, such as `select` or `relations`, accept the
519
- * attributes or relations associated with a rule type.
520
- * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
521
- * @returns {Promise<RuleTypeDTO>} The retrieved rule type.
522
- *
523
- * @example
524
- * A simple example that retrieves a rule type by its code:
525
- *
526
- * ```ts
527
- * const ruleType =
528
- * await pricingModuleService.retrieveRuleType("rul-typ_123")
529
- * ```
530
- *
531
- * To specify relations that should be retrieved:
532
- *
533
- * ```ts
534
- * const ruleType = await pricingModuleService.retrieveRuleType(
535
- * "rul-typ_123",
536
- * {
537
- * relations: ["price_sets"],
538
- * }
539
- * )
540
- * ```
541
- */
542
- retrieveRuleType(id: string, config?: FindConfig<RuleTypeDTO>, sharedContext?: Context): Promise<RuleTypeDTO>;
543
- /**
544
- * This method is used to retrieve a paginated list of rule types based on optional filters and configuration.
545
- *
546
- * @param {FilterableRuleTypeProps} filters - The filters to apply on the retrieved rule types.
547
- * @param {FindConfig<RuleTypeDTO>} config -
548
- * The configurations determining how the rule types are retrieved. Its properties, such as `select` or `relations`, accept the
549
- * attributes or relations associated with a rule type.
550
- * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
551
- * @returns {Promise<RuleTypeDTO[]>} The list of rule types.
552
- *
553
- * @example
554
- *
555
- * To retrieve a list of rule types using their IDs:
556
- *
557
- * ```ts
558
- * const ruleTypes = await pricingModuleService.listRuleTypes({
559
- * id: ["rul-typ_123", "rul-typ_321"],
560
- * })
561
- * ```
562
- *
563
- * To specify relations that should be retrieved:
564
- *
565
- * ```ts
566
- * const ruleTypes = await pricingModuleService.listRuleTypes(
567
- * {
568
- * id: ["rul-typ_123", "rul-typ_321"],
569
- * },
570
- * {
571
- * relations: ["price_sets"],
572
- * }
573
- * )
574
- * ```
575
- *
576
- * By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
577
- *
578
- * ```ts
579
- * const ruleTypes = await pricingModuleService.listRuleTypes(
580
- * {
581
- * id: ["rul-typ_123", "rul-typ_321"],
582
- * },
583
- * {
584
- * relations: ["price_sets"],
585
- * take: 20,
586
- * skip: 2,
587
- * }
588
- * )
589
- * ```
590
- */
591
- listRuleTypes(filters?: FilterableRuleTypeProps, config?: FindConfig<RuleTypeDTO>, sharedContext?: Context): Promise<RuleTypeDTO[]>;
592
- /**
593
- * This method is used to retrieve a paginated list of rule types along with the total count of available rule types satisfying the provided filters.
594
- *
595
- * @param {FilterableRuleTypeProps} filters - The filters to apply on the retrieved rule types.
596
- * @param {FindConfig<RuleTypeDTO>} config -
597
- * The configurations determining how the rule types are retrieved. Its properties, such as `select` or `relations`, accept the
598
- * attributes or relations associated with a rule type.
599
- * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
600
- * @returns {Promise<[RuleTypeDTO[], number]>} The list of rule types along with their total count.
601
- *
602
- * @example
603
- *
604
- * To retrieve a list of rule types using their IDs:
605
- *
606
- * ```ts
607
- * const [ruleTypes, count] =
608
- * await pricingModuleService.listAndCountRuleTypes({
609
- * id: ["rul-typ_123", "rul-typ_321"],
610
- * })
611
- * ```
612
- *
613
- * To specify attributes that should be retrieved within the rule types:
614
- *
615
- * ```ts
616
- * const [ruleTypes, count] =
617
- * await pricingModuleService.listAndCountRuleTypes(
618
- * {
619
- * id: ["rul-typ_123", "rul-typ_321"],
620
- * },
621
- * {
622
- * relations: ["price_sets"],
623
- * }
624
- * )
625
- * ```
626
- *
627
- * By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
628
- *
629
- * ```ts
630
- * const [ruleTypes, count] =
631
- * await pricingModuleService.listAndCountRuleTypes(
632
- * {
633
- * id: ["rul-typ_123", "rul-typ_321"],
634
- * },
635
- * {
636
- * relations: ["price_sets"],
637
- * take: 20,
638
- * skip: 2,
639
- * }
640
- * )
641
- * ```
642
- */
643
- listAndCountRuleTypes(filters?: FilterableRuleTypeProps, config?: FindConfig<RuleTypeDTO>, sharedContext?: Context): Promise<[RuleTypeDTO[], number]>;
644
- /**
645
- * This method is used to create new rule types.
646
- *
647
- * @param {CreateRuleTypeDTO[]} data - The rule types to create.
648
- * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
649
- * @returns {Promise<RuleTypeDTO[]>} The list of created rule types.
650
- *
651
- * @example
652
- * const ruleTypes = await pricingModuleService.createRuleTypes([
653
- * {
654
- * name: "Region",
655
- * rule_attribute: "region_id",
656
- * },
657
- * {
658
- * name: "Customer Group",
659
- * rule_attribute: "customer_group_id",
660
- * },
661
- * ])
662
- */
663
- createRuleTypes(data: CreateRuleTypeDTO[], sharedContext?: Context): Promise<RuleTypeDTO[]>;
664
- /**
665
- * This method is used to update existing rule types with the provided data.
666
- *
667
- * @param {UpdateRuleTypeDTO[]} data - The rule types to update, each having the attributes that should be updated in a rule type.
668
- * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
669
- * @returns {Promise<RuleTypeDTO[]>} The list of updated rule types.
670
- *
671
- * @example
672
- * const ruleTypes = await pricingModuleService.updateRuleTypes([
673
- * {
674
- * id: "rul-typ_123",
675
- * name: "Region",
676
- * },
677
- * {
678
- * id: "rul-typ_321",
679
- * name: "Customer Group",
680
- * },
681
- * ])
682
- */
683
- updateRuleTypes(data: UpdateRuleTypeDTO[], sharedContext?: Context): Promise<RuleTypeDTO[]>;
684
- /**
685
- * This method is used to delete rule types based on the provided IDs.
686
- *
687
- * @param {string[]} ruleTypeIds - The IDs of the rule types to delete.
688
- * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
689
- * @returns {Promise<void>} Resolves once the rule types are deleted.
690
- *
691
- * @example
692
- * const ruleTypes = await pricingModuleService.deleteRuleTypes([
693
- * "rul-typ_123",
694
- * "rul-typ_321",
695
- * ])
696
- */
697
- deleteRuleTypes(ruleTypeIds: string[], sharedContext?: Context): Promise<void>;
698
501
  /**
699
502
  * This method is used to retrieve a paginated list of prices based on optional filters and configuration.
700
503
  *
@@ -977,7 +780,7 @@ export interface IPricingModuleService extends IModuleService {
977
780
  * await pricingModuleService.createPriceRules([
978
781
  * {
979
782
  * value: "VIP",
980
- * rule_type_id: "rul-typ_123",
783
+ * attribute: "customer_group",
981
784
  * price_set_id: "pset_123",
982
785
  * },
983
786
  * ])
@@ -1 +1 @@
1
- {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/pricing/service.ts"],"names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CACxB,OAAO,CAAC,EAAE,4BAA4B,EACtC,MAAM,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,EACrC,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,CAAC,gBAAgB,EAAE,EAAE,MAAM,CAAC,CAAC,CAAA;IAExC;;;;;;;;;;;;OAYG;IACH,oBAAoB,CAClB,gBAAgB,EAAE,MAAM,EAAE,EAC1B,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,IAAI,CAAC,CAAA;IAEhB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,kBAAkB,CAChB,IAAI,EAAE,qBAAqB,EAAE,EAC7B,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAA;IAEtB;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,qBAAqB,CACnB,IAAI,EAAE,wBAAwB,EAAE,EAChC,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAA;IAEtB;;;;;;;;;;;;;;;;OAgBG;IACH,iBAAiB,CACf,IAAI,EAAE,oBAAoB,EAC1B,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,YAAY,CAAC,CAAA;IAExB;;;;;;;;;;;;;;OAcG;IACH,oBAAoB,CAClB,IAAI,EAAE,uBAAuB,EAC7B,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,YAAY,CAAC,CAAA;IAExB;;;;;;;;;;;;OAYG;IACH,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACpE"}
@@ -3,7 +3,6 @@ export interface CreatePriceListDTO {
3
3
  starts_at?: string;
4
4
  ends_at?: string;
5
5
  status?: PriceListStatus;
6
- rules_count?: number;
7
6
  rules?: PriceListRuleDTO[];
8
7
  prices?: {
9
8
  amount: number;
@@ -17,7 +16,7 @@ export interface CreatePriceListDTO {
17
16
  }[];
18
17
  }
19
18
  export interface CreatePriceListRuleDTO {
20
- rule_attribute: string;
19
+ attribute: string;
21
20
  value: string[];
22
21
  }
23
22
  export interface CreatePriceListPriceDTO {
@@ -1 +1 @@
1
- {"version":3,"file":"create-price-list.d.ts","sourceRoot":"","sources":["../../../src/workflow/price-list/create-price-list.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EAChB,MAAM,eAAe,CAAA;AAEtB,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,eAAe,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,gBAAgB,EAAE,CAAA;IAC1B,MAAM,CAAC,EAAE;QACP,MAAM,EAAE,MAAM,CAAA;QACd,aAAa,EAAE,MAAM,CAAA;QACrB,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,YAAY,CAAC,EAAE,MAAM,CAAA;QACrB,YAAY,CAAC,EAAE,MAAM,CAAA;KACtB,EAAE,CAAA;IACH,eAAe,CAAC,EAAE;QAChB,EAAE,EAAE,MAAM,CAAA;KACX,EAAE,CAAA;CACJ;AAED,MAAM,WAAW,sBAAsB;IACrC,cAAc,EAAE,MAAM,CAAA;IACtB,KAAK,EAAE,MAAM,EAAE,CAAA;CAChB;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAA;IACd,aAAa,EAAE,MAAM,CAAA;IACrB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,+BAA+B;IAC9C,WAAW,EAAE,0BAA0B,EAAE,CAAA;CAC1C;AAED,MAAM,WAAW,uCAAuC;IACtD,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,uCAAuC;IACtD,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,qCAAqC;IACpD,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,0BAA0B;IACzC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,IAAI,CAAA;IAChB,OAAO,CAAC,EAAE,IAAI,CAAA;IACd,MAAM,CAAC,EAAE,eAAe,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,UAAU,EAAE,CAAA;IACpB,KAAK,CAAC,EAAE,oBAAoB,CAAA;CAC7B;AAED,UAAU,UAAU;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB"}
1
+ {"version":3,"file":"create-price-list.d.ts","sourceRoot":"","sources":["../../../src/workflow/price-list/create-price-list.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EAChB,MAAM,eAAe,CAAA;AAEtB,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,eAAe,CAAA;IACxB,KAAK,CAAC,EAAE,gBAAgB,EAA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,MAAM,CAAC,EAAE,eAAe,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,UAAU,EAAE,CAAA;IACpB,KAAK,CAAC,EAAE,oBAAoB,CAAA;CAC7B;AAED,UAAU,UAAU;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/types",
3
- "version": "1.12.0-preview-20240701060617",
3
+ "version": "1.12.0-preview-20240701090555",
4
4
  "description": "Medusa Types definition",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,24 +0,0 @@
1
- import { BaseFilterable } from "../../dal";
2
- import { PriceSetDTO } from "./price-set";
3
- import { RuleTypeDTO } from "./rule-type";
4
- export interface PriceSetRuleTypeDTO {
5
- id: string;
6
- price_set: PriceSetDTO;
7
- rule_type: RuleTypeDTO;
8
- value: string;
9
- }
10
- export interface CreatePriceSetRuleTypeDTO {
11
- price_set_id: string;
12
- rule_type_id: string;
13
- }
14
- export interface UpdatePriceSetRuleTypeDTO {
15
- id: string;
16
- price_set?: string;
17
- rule_type?: string;
18
- }
19
- export interface FilterablePriceSetRuleTypeProps extends BaseFilterable<FilterablePriceSetRuleTypeProps> {
20
- id?: string[];
21
- rule_type_id?: string[];
22
- price_set_id?: string[];
23
- }
24
- //# sourceMappingURL=price-set-rule-type.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"price-set-rule-type.d.ts","sourceRoot":"","sources":["../../../src/pricing/common/price-set-rule-type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,WAAW,CAAA;IACtB,SAAS,EAAE,WAAW,CAAA;IACtB,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,yBAAyB;IACxC,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,yBAAyB;IACxC,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,+BACf,SAAQ,cAAc,CAAC,+BAA+B,CAAC;IACvD,EAAE,CAAC,EAAE,MAAM,EAAE,CAAA;IACb,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;CACxB"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=price-set-rule-type.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"price-set-rule-type.js","sourceRoot":"","sources":["../../../src/pricing/common/price-set-rule-type.ts"],"names":[],"mappings":""}
@@ -1,102 +0,0 @@
1
- import { BaseFilterable } from "../../dal";
2
- /**
3
- * @interface
4
- *
5
- * A rule type's data.
6
- */
7
- export interface RuleTypeDTO {
8
- /**
9
- * The ID of the rule type.
10
- */
11
- id: string;
12
- /**
13
- * The display name of the rule type.
14
- */
15
- name: string;
16
- /**
17
- * The unique name used to later identify the rule_attribute. For example, it can be used in the `context` parameter of
18
- * the `calculatePrices` method to specify a rule for calculating the price.
19
- */
20
- rule_attribute: string;
21
- /**
22
- * The priority of the rule type. This is useful when calculating the price of a price set, and multiple rules satisfy
23
- * the provided context. The higher the value, the higher the priority of the rule type.
24
- */
25
- default_priority: number;
26
- /**
27
- * The creation date of the rule type.
28
- */
29
- created_at?: Date | string;
30
- /**
31
- * The update date of the rule type.
32
- */
33
- updated_at?: Date | string;
34
- }
35
- /**
36
- * @interface
37
- *
38
- * The rule type to create.
39
- */
40
- export interface CreateRuleTypeDTO {
41
- /**
42
- * The ID of the rule type.
43
- */
44
- id?: string;
45
- /**
46
- * The display name of the rule type.
47
- */
48
- name: string;
49
- /**
50
- * The unique name used to later identify the rule_attribute. For example, it can be used in the `context` parameter of the `calculatePrices`
51
- * method to specify a rule for calculating the price.
52
- */
53
- rule_attribute: string;
54
- /**
55
- * The priority of the rule type. This is useful when calculating the price of a price set, and multiple rules satisfy the provided context.
56
- * The higher the value, the higher the priority of the rule type.
57
- */
58
- default_priority?: number;
59
- }
60
- /**
61
- * @interface
62
- *
63
- * The data to update in a rule type. The `id` is used to identify which price set to update.
64
- */
65
- export interface UpdateRuleTypeDTO {
66
- /**
67
- * The ID of the rule type to update.
68
- */
69
- id: string;
70
- /**
71
- * The display name of the rule type.
72
- */
73
- name?: string;
74
- /**
75
- * The unique name used to later identify the rule_attribute. For example, it can be used in the `context` parameter of the `calculatePrices` method to specify a rule for calculating the price.
76
- */
77
- rule_attribute?: string;
78
- /**
79
- * The priority of the rule type. This is useful when calculating the price of a price set, and multiple rules satisfy the provided context. The higher the value, the higher the priority of the rule type.
80
- */
81
- default_priority?: number;
82
- }
83
- /**
84
- * @interface
85
- *
86
- * Filters to apply on rule types.
87
- */
88
- export interface FilterableRuleTypeProps extends BaseFilterable<FilterableRuleTypeProps> {
89
- /**
90
- * The IDs to filter rule types by.
91
- */
92
- id?: string[];
93
- /**
94
- * The names to filter rule types by.
95
- */
96
- name?: string[];
97
- /**
98
- * The rule attributes to filter rule types by.
99
- */
100
- rule_attribute?: string[];
101
- }
102
- //# sourceMappingURL=rule-type.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rule-type.d.ts","sourceRoot":"","sources":["../../../src/pricing/common/rule-type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAE1C;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IACV;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;;OAGG;IACH,cAAc,EAAE,MAAM,CAAA;IACtB;;;OAGG;IACH,gBAAgB,EAAE,MAAM,CAAA;IACxB;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,GAAG,MAAM,CAAA;IAC1B;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,GAAG,MAAM,CAAA;CAC3B;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;;OAGG;IACH,cAAc,EAAE,MAAM,CAAA;IACtB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IACV;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED;;;;GAIG;AACH,MAAM,WAAW,uBACf,SAAQ,cAAc,CAAC,uBAAuB,CAAC;IAC/C;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,EAAE,CAAA;IACb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;CAC1B"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=rule-type.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rule-type.js","sourceRoot":"","sources":["../../../src/pricing/common/rule-type.ts"],"names":[],"mappings":""}