@medusajs/pricing 2.18.0 → 2.19.0-preview-20260811102316
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.
- package/dist/models/price-list-rule.d.ts +2 -2
- package/dist/models/price-list.d.ts +2 -2
- package/dist/models/price-rule.d.ts +4 -4
- package/dist/models/price-set.d.ts +4 -4
- package/dist/models/price.d.ts +4 -4
- package/dist/services/pricing-module.d.ts +8 -8
- package/dist/services/pricing-module.js +1 -1
- package/package.json +4 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const PriceListRule: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
2
2
|
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
3
3
|
attribute: import("@medusajs/framework/utils").TextProperty;
|
|
4
|
-
value: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown
|
|
4
|
+
value: import("@medusajs/framework/utils").NullableModifier<NoInfer<Record<string, unknown>>, import("@medusajs/framework/utils").JSONProperty<NoInfer<Record<string, unknown>>>>;
|
|
5
5
|
price_list: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
6
6
|
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
7
7
|
title: import("@medusajs/framework/utils").TextProperty;
|
|
@@ -34,7 +34,7 @@ declare const PriceListRule: import("@medusajs/framework/utils").DmlEntity<impor
|
|
|
34
34
|
price_list: import("@medusajs/framework/utils").RelationNullableModifier<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "PriceList">, import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "PriceList">, undefined>, true>;
|
|
35
35
|
}>, "Price">>;
|
|
36
36
|
price_list_rules: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "PriceListRule">>;
|
|
37
|
-
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown
|
|
37
|
+
metadata: import("@medusajs/framework/utils").NullableModifier<NoInfer<Record<string, unknown>>, import("@medusajs/framework/utils").JSONProperty<NoInfer<Record<string, unknown>>>>;
|
|
38
38
|
}>, "PriceList">, undefined>;
|
|
39
39
|
}>, "PriceListRule">;
|
|
40
40
|
export default PriceListRule;
|
|
@@ -33,10 +33,10 @@ declare const PriceList: import("@medusajs/framework/utils").DmlEntity<import("@
|
|
|
33
33
|
price_list_rules: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
34
34
|
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
35
35
|
attribute: import("@medusajs/framework/utils").TextProperty;
|
|
36
|
-
value: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown
|
|
36
|
+
value: import("@medusajs/framework/utils").NullableModifier<NoInfer<Record<string, unknown>>, import("@medusajs/framework/utils").JSONProperty<NoInfer<Record<string, unknown>>>>;
|
|
37
37
|
price_list: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "PriceList">, undefined>;
|
|
38
38
|
}>, "PriceListRule">>;
|
|
39
|
-
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown
|
|
39
|
+
metadata: import("@medusajs/framework/utils").NullableModifier<NoInfer<Record<string, unknown>>, import("@medusajs/framework/utils").JSONProperty<NoInfer<Record<string, unknown>>>>;
|
|
40
40
|
}>, "PriceList">;
|
|
41
41
|
export default PriceList;
|
|
42
42
|
//# sourceMappingURL=price-list.d.ts.map
|
|
@@ -31,10 +31,10 @@ declare const PriceRule: import("@medusajs/framework/utils").DmlEntity<import("@
|
|
|
31
31
|
price_list_rules: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
32
32
|
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
33
33
|
attribute: import("@medusajs/framework/utils").TextProperty;
|
|
34
|
-
value: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown
|
|
34
|
+
value: import("@medusajs/framework/utils").NullableModifier<NoInfer<Record<string, unknown>>, import("@medusajs/framework/utils").JSONProperty<NoInfer<Record<string, unknown>>>>;
|
|
35
35
|
price_list: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "PriceList">, undefined>;
|
|
36
36
|
}>, "PriceListRule">>;
|
|
37
|
-
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown
|
|
37
|
+
metadata: import("@medusajs/framework/utils").NullableModifier<NoInfer<Record<string, unknown>>, import("@medusajs/framework/utils").JSONProperty<NoInfer<Record<string, unknown>>>>;
|
|
38
38
|
}>, "PriceList">, import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
39
39
|
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
40
40
|
title: import("@medusajs/framework/utils").TextProperty;
|
|
@@ -48,10 +48,10 @@ declare const PriceRule: import("@medusajs/framework/utils").DmlEntity<import("@
|
|
|
48
48
|
price_list_rules: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
49
49
|
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
50
50
|
attribute: import("@medusajs/framework/utils").TextProperty;
|
|
51
|
-
value: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown
|
|
51
|
+
value: import("@medusajs/framework/utils").NullableModifier<NoInfer<Record<string, unknown>>, import("@medusajs/framework/utils").JSONProperty<NoInfer<Record<string, unknown>>>>;
|
|
52
52
|
price_list: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "PriceList">, undefined>;
|
|
53
53
|
}>, "PriceListRule">>;
|
|
54
|
-
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown
|
|
54
|
+
metadata: import("@medusajs/framework/utils").NullableModifier<NoInfer<Record<string, unknown>>, import("@medusajs/framework/utils").JSONProperty<NoInfer<Record<string, unknown>>>>;
|
|
55
55
|
}>, "PriceList">, undefined>, true>;
|
|
56
56
|
}>, "Price">, undefined>;
|
|
57
57
|
}>, "PriceRule">;
|
|
@@ -30,10 +30,10 @@ declare const PriceSet: import("@medusajs/framework/utils").DmlEntity<import("@m
|
|
|
30
30
|
price_list_rules: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
31
31
|
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
32
32
|
attribute: import("@medusajs/framework/utils").TextProperty;
|
|
33
|
-
value: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown
|
|
33
|
+
value: import("@medusajs/framework/utils").NullableModifier<NoInfer<Record<string, unknown>>, import("@medusajs/framework/utils").JSONProperty<NoInfer<Record<string, unknown>>>>;
|
|
34
34
|
price_list: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "PriceList">, undefined>;
|
|
35
35
|
}>, "PriceListRule">>;
|
|
36
|
-
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown
|
|
36
|
+
metadata: import("@medusajs/framework/utils").NullableModifier<NoInfer<Record<string, unknown>>, import("@medusajs/framework/utils").JSONProperty<NoInfer<Record<string, unknown>>>>;
|
|
37
37
|
}>, "PriceList">, import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
38
38
|
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
39
39
|
title: import("@medusajs/framework/utils").TextProperty;
|
|
@@ -47,10 +47,10 @@ declare const PriceSet: import("@medusajs/framework/utils").DmlEntity<import("@m
|
|
|
47
47
|
price_list_rules: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
48
48
|
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
49
49
|
attribute: import("@medusajs/framework/utils").TextProperty;
|
|
50
|
-
value: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown
|
|
50
|
+
value: import("@medusajs/framework/utils").NullableModifier<NoInfer<Record<string, unknown>>, import("@medusajs/framework/utils").JSONProperty<NoInfer<Record<string, unknown>>>>;
|
|
51
51
|
price_list: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "PriceList">, undefined>;
|
|
52
52
|
}>, "PriceListRule">>;
|
|
53
|
-
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown
|
|
53
|
+
metadata: import("@medusajs/framework/utils").NullableModifier<NoInfer<Record<string, unknown>>, import("@medusajs/framework/utils").JSONProperty<NoInfer<Record<string, unknown>>>>;
|
|
54
54
|
}>, "PriceList">, undefined>, true>;
|
|
55
55
|
}>, "Price">>;
|
|
56
56
|
}>, "PriceSet">;
|
package/dist/models/price.d.ts
CHANGED
|
@@ -31,10 +31,10 @@ declare const Price: import("@medusajs/framework/utils").DmlEntity<import("@medu
|
|
|
31
31
|
price_list_rules: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
32
32
|
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
33
33
|
attribute: import("@medusajs/framework/utils").TextProperty;
|
|
34
|
-
value: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown
|
|
34
|
+
value: import("@medusajs/framework/utils").NullableModifier<NoInfer<Record<string, unknown>>, import("@medusajs/framework/utils").JSONProperty<NoInfer<Record<string, unknown>>>>;
|
|
35
35
|
price_list: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "PriceList">, undefined>;
|
|
36
36
|
}>, "PriceListRule">>;
|
|
37
|
-
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown
|
|
37
|
+
metadata: import("@medusajs/framework/utils").NullableModifier<NoInfer<Record<string, unknown>>, import("@medusajs/framework/utils").JSONProperty<NoInfer<Record<string, unknown>>>>;
|
|
38
38
|
}>, "PriceList">, import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
39
39
|
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
40
40
|
title: import("@medusajs/framework/utils").TextProperty;
|
|
@@ -48,10 +48,10 @@ declare const Price: import("@medusajs/framework/utils").DmlEntity<import("@medu
|
|
|
48
48
|
price_list_rules: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
49
49
|
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
50
50
|
attribute: import("@medusajs/framework/utils").TextProperty;
|
|
51
|
-
value: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown
|
|
51
|
+
value: import("@medusajs/framework/utils").NullableModifier<NoInfer<Record<string, unknown>>, import("@medusajs/framework/utils").JSONProperty<NoInfer<Record<string, unknown>>>>;
|
|
52
52
|
price_list: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "PriceList">, undefined>;
|
|
53
53
|
}>, "PriceListRule">>;
|
|
54
|
-
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown
|
|
54
|
+
metadata: import("@medusajs/framework/utils").NullableModifier<NoInfer<Record<string, unknown>>, import("@medusajs/framework/utils").JSONProperty<NoInfer<Record<string, unknown>>>>;
|
|
55
55
|
}>, "PriceList">, undefined>, true>;
|
|
56
56
|
}>, "Price">;
|
|
57
57
|
export default Price;
|
|
@@ -142,14 +142,14 @@ export default class PricingModuleService extends BaseClass implements PricingTy
|
|
|
142
142
|
price_list_rules: {
|
|
143
143
|
id: string;
|
|
144
144
|
attribute: string;
|
|
145
|
-
value: Record<string, unknown
|
|
145
|
+
value: NoInfer<Record<string, unknown>> | null;
|
|
146
146
|
price_list: /*elided*/ any;
|
|
147
147
|
created_at: Date;
|
|
148
148
|
updated_at: Date;
|
|
149
149
|
deleted_at: Date | null;
|
|
150
150
|
price_list_id: string;
|
|
151
151
|
}[];
|
|
152
|
-
metadata: Record<string, unknown
|
|
152
|
+
metadata: NoInfer<Record<string, unknown>> | null;
|
|
153
153
|
raw_rules_count: Record<string, unknown> | null;
|
|
154
154
|
created_at: Date;
|
|
155
155
|
updated_at: Date;
|
|
@@ -209,14 +209,14 @@ export default class PricingModuleService extends BaseClass implements PricingTy
|
|
|
209
209
|
price_list_rules: {
|
|
210
210
|
id: string;
|
|
211
211
|
attribute: string;
|
|
212
|
-
value: Record<string, unknown
|
|
212
|
+
value: NoInfer<Record<string, unknown>> | null;
|
|
213
213
|
price_list: /*elided*/ any;
|
|
214
214
|
created_at: Date;
|
|
215
215
|
updated_at: Date;
|
|
216
216
|
deleted_at: Date | null;
|
|
217
217
|
price_list_id: string;
|
|
218
218
|
}[];
|
|
219
|
-
metadata: Record<string, unknown
|
|
219
|
+
metadata: NoInfer<Record<string, unknown>> | null;
|
|
220
220
|
raw_rules_count: Record<string, unknown> | null;
|
|
221
221
|
created_at: Date;
|
|
222
222
|
updated_at: Date;
|
|
@@ -282,14 +282,14 @@ export default class PricingModuleService extends BaseClass implements PricingTy
|
|
|
282
282
|
price_list_rules: {
|
|
283
283
|
id: string;
|
|
284
284
|
attribute: string;
|
|
285
|
-
value: Record<string, unknown
|
|
285
|
+
value: NoInfer<Record<string, unknown>> | null;
|
|
286
286
|
price_list: /*elided*/ any;
|
|
287
287
|
created_at: Date;
|
|
288
288
|
updated_at: Date;
|
|
289
289
|
deleted_at: Date | null;
|
|
290
290
|
price_list_id: string;
|
|
291
291
|
}[];
|
|
292
|
-
metadata: Record<string, unknown
|
|
292
|
+
metadata: NoInfer<Record<string, unknown>> | null;
|
|
293
293
|
raw_rules_count: Record<string, unknown> | null;
|
|
294
294
|
created_at: Date;
|
|
295
295
|
updated_at: Date;
|
|
@@ -345,14 +345,14 @@ export default class PricingModuleService extends BaseClass implements PricingTy
|
|
|
345
345
|
price_list_rules: {
|
|
346
346
|
id: string;
|
|
347
347
|
attribute: string;
|
|
348
|
-
value: Record<string, unknown
|
|
348
|
+
value: NoInfer<Record<string, unknown>> | null;
|
|
349
349
|
price_list: /*elided*/ any;
|
|
350
350
|
created_at: Date;
|
|
351
351
|
updated_at: Date;
|
|
352
352
|
deleted_at: Date | null;
|
|
353
353
|
price_list_id: string;
|
|
354
354
|
}[];
|
|
355
|
-
metadata: Record<string, unknown
|
|
355
|
+
metadata: NoInfer<Record<string, unknown>> | null;
|
|
356
356
|
raw_rules_count: Record<string, unknown> | null;
|
|
357
357
|
created_at: Date;
|
|
358
358
|
updated_at: Date;
|
|
@@ -479,7 +479,7 @@ class PricingModuleService extends BaseClass {
|
|
|
479
479
|
};
|
|
480
480
|
});
|
|
481
481
|
const entry = price;
|
|
482
|
-
const hasRulesInput = (0, utils_1.
|
|
482
|
+
const hasRulesInput = (0, utils_1.isDefined)(price.rules);
|
|
483
483
|
entry.price_list_id = priceListId;
|
|
484
484
|
if (hasRulesInput) {
|
|
485
485
|
entry.price_rules = rules;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medusajs/pricing",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.19.0-preview-20260811102316",
|
|
4
4
|
"description": "Medusa Pricing module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"orm:cache:clear": "MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts MIKRO_ORM_ALLOW_GLOBAL_CLI=true medusa-mikro-orm cache:clear"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@medusajs/framework": "2.
|
|
43
|
-
"@medusajs/test-utils": "2.
|
|
42
|
+
"@medusajs/framework": "2.19.0-preview-20260811102316",
|
|
43
|
+
"@medusajs/test-utils": "2.19.0-preview-20260811102316"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"@medusajs/framework": "2.
|
|
46
|
+
"@medusajs/framework": "2.19.0-preview-20260811102316"
|
|
47
47
|
}
|
|
48
48
|
}
|