@mercurjs/core 2.2.0-canary.38 → 2.2.0-canary.39
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/.medusa/server/src/api/admin/collections/validators.d.ts +2 -2
- package/.medusa/server/src/api/admin/commission-rates/validators.d.ts +8 -8
- package/.medusa/server/src/api/admin/offers/middlewares.js +3 -1
- package/.medusa/server/src/api/admin/offers/query-config.js +2 -1
- package/.medusa/server/src/api/admin/offers/validators.d.ts +56 -36
- package/.medusa/server/src/api/admin/offers/validators.js +8 -1
- package/.medusa/server/src/api/admin/product-attributes/validators.d.ts +28 -28
- package/.medusa/server/src/api/admin/product-categories/validators.d.ts +4 -4
- package/.medusa/server/src/api/admin/products/[id]/route.js +2 -2
- package/.medusa/server/src/api/admin/products/validators.d.ts +53 -49
- package/.medusa/server/src/api/admin/products/validators.js +4 -2
- package/.medusa/server/src/api/admin/sellers/validators.d.ts +2 -2
- package/.medusa/server/src/api/store/offers/validators.d.ts +2 -2
- package/.medusa/server/src/api/utils/offers.d.ts +1 -0
- package/.medusa/server/src/api/utils/offers.js +50 -2
- package/.medusa/server/src/api/vendor/collections/validators.d.ts +2 -2
- package/.medusa/server/src/api/vendor/inventory-items/validators.d.ts +4 -4
- package/.medusa/server/src/api/vendor/offers/validators.d.ts +24 -24
- package/.medusa/server/src/api/vendor/price-lists/validators.d.ts +10 -10
- package/.medusa/server/src/api/vendor/product-attributes/validators.d.ts +16 -16
- package/.medusa/server/src/api/vendor/products/validators.d.ts +14 -14
- package/.medusa/server/src/api/vendor/sellers/validators.d.ts +2 -2
- package/.medusa/server/src/api/vendor/shipping-options/validators.d.ts +24 -24
- package/.medusa/server/src/links/product-attribute-category-link.d.ts +0 -9
- package/.medusa/server/src/links/product-attribute-category-link.js +5 -12
- package/.medusa/server/src/modules/offer/models/offer.d.ts +1 -0
- package/.medusa/server/src/modules/offer/models/offer.js +2 -1
- package/.medusa/server/src/modules/offer/service.d.ts +9 -0
- package/.medusa/server/src/modules/offer/service.js +100 -1
- package/.medusa/server/src/workflows/offer/steps/create-offers.d.ts +1 -0
- package/.medusa/server/src/workflows/offer/steps/update-offers.d.ts +1 -0
- package/package.json +3 -3
|
@@ -459,9 +459,9 @@ declare const CreateProduct: z.ZodObject<{
|
|
|
459
459
|
metadata?: Record<string, unknown> | null | undefined;
|
|
460
460
|
value?: string | number | boolean | undefined;
|
|
461
461
|
type?: "single_select" | "multi_select" | "text" | "toggle" | "unit" | undefined;
|
|
462
|
-
description?: string | null | undefined;
|
|
463
462
|
is_variant_axis?: boolean | undefined;
|
|
464
463
|
is_required?: boolean | undefined;
|
|
464
|
+
description?: string | null | undefined;
|
|
465
465
|
is_filterable?: boolean | undefined;
|
|
466
466
|
}, {
|
|
467
467
|
title: string;
|
|
@@ -469,9 +469,9 @@ declare const CreateProduct: z.ZodObject<{
|
|
|
469
469
|
metadata?: Record<string, unknown> | null | undefined;
|
|
470
470
|
value?: string | number | boolean | undefined;
|
|
471
471
|
type?: "single_select" | "multi_select" | "text" | "toggle" | "unit" | undefined;
|
|
472
|
-
description?: string | null | undefined;
|
|
473
472
|
is_variant_axis?: boolean | undefined;
|
|
474
473
|
is_required?: boolean | undefined;
|
|
474
|
+
description?: string | null | undefined;
|
|
475
475
|
is_filterable?: boolean | undefined;
|
|
476
476
|
}>]>, "many">>;
|
|
477
477
|
variants: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -675,10 +675,10 @@ declare const UpdateProduct: z.ZodObject<{
|
|
|
675
675
|
length?: number | null | undefined;
|
|
676
676
|
metadata?: Record<string, unknown> | null | undefined;
|
|
677
677
|
id?: string | undefined;
|
|
678
|
+
title?: string | undefined;
|
|
678
679
|
sku?: string | null | undefined;
|
|
679
680
|
ean?: string | null | undefined;
|
|
680
681
|
upc?: string | null | undefined;
|
|
681
|
-
title?: string | undefined;
|
|
682
682
|
thumbnail?: string | null | undefined;
|
|
683
683
|
weight?: number | null | undefined;
|
|
684
684
|
height?: number | null | undefined;
|
|
@@ -697,10 +697,10 @@ declare const UpdateProduct: z.ZodObject<{
|
|
|
697
697
|
length?: number | null | undefined;
|
|
698
698
|
metadata?: Record<string, unknown> | null | undefined;
|
|
699
699
|
id?: string | undefined;
|
|
700
|
+
title?: string | undefined;
|
|
700
701
|
sku?: string | null | undefined;
|
|
701
702
|
ean?: string | null | undefined;
|
|
702
703
|
upc?: string | null | undefined;
|
|
703
|
-
title?: string | undefined;
|
|
704
704
|
thumbnail?: string | null | undefined;
|
|
705
705
|
weight?: number | null | undefined;
|
|
706
706
|
height?: number | null | undefined;
|
|
@@ -1105,10 +1105,10 @@ export declare const VendorUpdateProductVariant: z.ZodObject<{
|
|
|
1105
1105
|
options?: Record<string, string> | undefined;
|
|
1106
1106
|
length?: number | null | undefined;
|
|
1107
1107
|
metadata?: Record<string, unknown> | null | undefined;
|
|
1108
|
+
title?: string | undefined;
|
|
1108
1109
|
sku?: string | null | undefined;
|
|
1109
1110
|
ean?: string | null | undefined;
|
|
1110
1111
|
upc?: string | null | undefined;
|
|
1111
|
-
title?: string | undefined;
|
|
1112
1112
|
thumbnail?: string | null | undefined;
|
|
1113
1113
|
weight?: number | null | undefined;
|
|
1114
1114
|
height?: number | null | undefined;
|
|
@@ -1132,10 +1132,10 @@ export declare const VendorUpdateProductVariant: z.ZodObject<{
|
|
|
1132
1132
|
options?: Record<string, string> | undefined;
|
|
1133
1133
|
length?: number | null | undefined;
|
|
1134
1134
|
metadata?: Record<string, unknown> | null | undefined;
|
|
1135
|
+
title?: string | undefined;
|
|
1135
1136
|
sku?: string | null | undefined;
|
|
1136
1137
|
ean?: string | null | undefined;
|
|
1137
1138
|
upc?: string | null | undefined;
|
|
1138
|
-
title?: string | undefined;
|
|
1139
1139
|
thumbnail?: string | null | undefined;
|
|
1140
1140
|
weight?: number | null | undefined;
|
|
1141
1141
|
height?: number | null | undefined;
|
|
@@ -1194,9 +1194,9 @@ export declare const VendorBatchProductAttributes: z.ZodObject<{
|
|
|
1194
1194
|
metadata?: Record<string, unknown> | null | undefined;
|
|
1195
1195
|
value?: string | number | boolean | undefined;
|
|
1196
1196
|
type?: "single_select" | "multi_select" | "text" | "toggle" | "unit" | undefined;
|
|
1197
|
-
description?: string | null | undefined;
|
|
1198
1197
|
is_variant_axis?: boolean | undefined;
|
|
1199
1198
|
is_required?: boolean | undefined;
|
|
1199
|
+
description?: string | null | undefined;
|
|
1200
1200
|
is_filterable?: boolean | undefined;
|
|
1201
1201
|
}, {
|
|
1202
1202
|
title: string;
|
|
@@ -1204,9 +1204,9 @@ export declare const VendorBatchProductAttributes: z.ZodObject<{
|
|
|
1204
1204
|
metadata?: Record<string, unknown> | null | undefined;
|
|
1205
1205
|
value?: string | number | boolean | undefined;
|
|
1206
1206
|
type?: "single_select" | "multi_select" | "text" | "toggle" | "unit" | undefined;
|
|
1207
|
-
description?: string | null | undefined;
|
|
1208
1207
|
is_variant_axis?: boolean | undefined;
|
|
1209
1208
|
is_required?: boolean | undefined;
|
|
1209
|
+
description?: string | null | undefined;
|
|
1210
1210
|
is_filterable?: boolean | undefined;
|
|
1211
1211
|
}>, {
|
|
1212
1212
|
title: string;
|
|
@@ -1214,9 +1214,9 @@ export declare const VendorBatchProductAttributes: z.ZodObject<{
|
|
|
1214
1214
|
metadata?: Record<string, unknown> | null | undefined;
|
|
1215
1215
|
value?: string | number | boolean | undefined;
|
|
1216
1216
|
type?: "single_select" | "multi_select" | "text" | "toggle" | "unit" | undefined;
|
|
1217
|
-
description?: string | null | undefined;
|
|
1218
1217
|
is_variant_axis?: boolean | undefined;
|
|
1219
1218
|
is_required?: boolean | undefined;
|
|
1219
|
+
description?: string | null | undefined;
|
|
1220
1220
|
is_filterable?: boolean | undefined;
|
|
1221
1221
|
}, {
|
|
1222
1222
|
title: string;
|
|
@@ -1224,9 +1224,9 @@ export declare const VendorBatchProductAttributes: z.ZodObject<{
|
|
|
1224
1224
|
metadata?: Record<string, unknown> | null | undefined;
|
|
1225
1225
|
value?: string | number | boolean | undefined;
|
|
1226
1226
|
type?: "single_select" | "multi_select" | "text" | "toggle" | "unit" | undefined;
|
|
1227
|
-
description?: string | null | undefined;
|
|
1228
1227
|
is_variant_axis?: boolean | undefined;
|
|
1229
1228
|
is_required?: boolean | undefined;
|
|
1229
|
+
description?: string | null | undefined;
|
|
1230
1230
|
is_filterable?: boolean | undefined;
|
|
1231
1231
|
}>, {
|
|
1232
1232
|
title: string;
|
|
@@ -1234,9 +1234,9 @@ export declare const VendorBatchProductAttributes: z.ZodObject<{
|
|
|
1234
1234
|
metadata?: Record<string, unknown> | null | undefined;
|
|
1235
1235
|
value?: string | number | boolean | undefined;
|
|
1236
1236
|
type?: "single_select" | "multi_select" | "text" | "toggle" | "unit" | undefined;
|
|
1237
|
-
description?: string | null | undefined;
|
|
1238
1237
|
is_variant_axis?: boolean | undefined;
|
|
1239
1238
|
is_required?: boolean | undefined;
|
|
1239
|
+
description?: string | null | undefined;
|
|
1240
1240
|
is_filterable?: boolean | undefined;
|
|
1241
1241
|
}, {
|
|
1242
1242
|
title: string;
|
|
@@ -1244,9 +1244,9 @@ export declare const VendorBatchProductAttributes: z.ZodObject<{
|
|
|
1244
1244
|
metadata?: Record<string, unknown> | null | undefined;
|
|
1245
1245
|
value?: string | number | boolean | undefined;
|
|
1246
1246
|
type?: "single_select" | "multi_select" | "text" | "toggle" | "unit" | undefined;
|
|
1247
|
-
description?: string | null | undefined;
|
|
1248
1247
|
is_variant_axis?: boolean | undefined;
|
|
1249
1248
|
is_required?: boolean | undefined;
|
|
1249
|
+
description?: string | null | undefined;
|
|
1250
1250
|
is_filterable?: boolean | undefined;
|
|
1251
1251
|
}>]>, "many">>;
|
|
1252
1252
|
remove: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -1299,9 +1299,9 @@ export declare const VendorBatchProductAttributes: z.ZodObject<{
|
|
|
1299
1299
|
metadata?: Record<string, unknown> | null | undefined;
|
|
1300
1300
|
value?: string | number | boolean | undefined;
|
|
1301
1301
|
type?: "single_select" | "multi_select" | "text" | "toggle" | "unit" | undefined;
|
|
1302
|
-
description?: string | null | undefined;
|
|
1303
1302
|
is_variant_axis?: boolean | undefined;
|
|
1304
1303
|
is_required?: boolean | undefined;
|
|
1304
|
+
description?: string | null | undefined;
|
|
1305
1305
|
is_filterable?: boolean | undefined;
|
|
1306
1306
|
})[] | undefined;
|
|
1307
1307
|
remove?: string[] | undefined;
|
|
@@ -1325,9 +1325,9 @@ export declare const VendorBatchProductAttributes: z.ZodObject<{
|
|
|
1325
1325
|
metadata?: Record<string, unknown> | null | undefined;
|
|
1326
1326
|
value?: string | number | boolean | undefined;
|
|
1327
1327
|
type?: "single_select" | "multi_select" | "text" | "toggle" | "unit" | undefined;
|
|
1328
|
-
description?: string | null | undefined;
|
|
1329
1328
|
is_variant_axis?: boolean | undefined;
|
|
1330
1329
|
is_required?: boolean | undefined;
|
|
1330
|
+
description?: string | null | undefined;
|
|
1331
1331
|
is_filterable?: boolean | undefined;
|
|
1332
1332
|
})[] | undefined;
|
|
1333
1333
|
remove?: string[] | undefined;
|
|
@@ -241,11 +241,11 @@ export declare const VendorInviteMember: z.ZodObject<{
|
|
|
241
241
|
email: z.ZodString;
|
|
242
242
|
role_id: z.ZodNativeEnum<typeof SellerRole>;
|
|
243
243
|
}, "strip", z.ZodTypeAny, {
|
|
244
|
-
email: string;
|
|
245
244
|
role_id: SellerRole;
|
|
246
|
-
}, {
|
|
247
245
|
email: string;
|
|
246
|
+
}, {
|
|
248
247
|
role_id: SellerRole;
|
|
248
|
+
email: string;
|
|
249
249
|
}>;
|
|
250
250
|
export type VendorUpdateMemberRoleType = z.infer<typeof VendorUpdateMemberRole>;
|
|
251
251
|
export declare const VendorUpdateMemberRole: z.ZodObject<{
|
|
@@ -203,16 +203,16 @@ export declare const VendorCreateShippingOptionPriceWithCurrency: z.ZodObject<{
|
|
|
203
203
|
operator: PricingRuleOperator;
|
|
204
204
|
}>, "many">>;
|
|
205
205
|
}, "strict", z.ZodTypeAny, {
|
|
206
|
-
amount: number;
|
|
207
206
|
currency_code: string;
|
|
207
|
+
amount: number;
|
|
208
208
|
rules?: {
|
|
209
209
|
value: number;
|
|
210
210
|
attribute: "item_total";
|
|
211
211
|
operator: PricingRuleOperator;
|
|
212
212
|
}[] | undefined;
|
|
213
213
|
}, {
|
|
214
|
-
amount: number;
|
|
215
214
|
currency_code: string;
|
|
215
|
+
amount: number;
|
|
216
216
|
rules?: {
|
|
217
217
|
value: number;
|
|
218
218
|
attribute: "item_total";
|
|
@@ -271,8 +271,8 @@ export declare const VendorUpdateShippingOptionPriceWithCurrency: z.ZodObject<{
|
|
|
271
271
|
}>, "many">>;
|
|
272
272
|
}, "strict", z.ZodTypeAny, {
|
|
273
273
|
id?: string | undefined;
|
|
274
|
-
amount?: number | undefined;
|
|
275
274
|
currency_code?: string | undefined;
|
|
275
|
+
amount?: number | undefined;
|
|
276
276
|
rules?: {
|
|
277
277
|
value: number;
|
|
278
278
|
attribute: "item_total";
|
|
@@ -280,8 +280,8 @@ export declare const VendorUpdateShippingOptionPriceWithCurrency: z.ZodObject<{
|
|
|
280
280
|
}[] | undefined;
|
|
281
281
|
}, {
|
|
282
282
|
id?: string | undefined;
|
|
283
|
-
amount?: number | undefined;
|
|
284
283
|
currency_code?: string | undefined;
|
|
284
|
+
amount?: number | undefined;
|
|
285
285
|
rules?: {
|
|
286
286
|
value: number;
|
|
287
287
|
attribute: "item_total";
|
|
@@ -363,16 +363,16 @@ export declare const VendorCreateShippingOption: z.ZodEffects<z.ZodObject<{
|
|
|
363
363
|
operator: PricingRuleOperator;
|
|
364
364
|
}>, "many">>;
|
|
365
365
|
}, "strict", z.ZodTypeAny, {
|
|
366
|
-
amount: number;
|
|
367
366
|
currency_code: string;
|
|
367
|
+
amount: number;
|
|
368
368
|
rules?: {
|
|
369
369
|
value: number;
|
|
370
370
|
attribute: "item_total";
|
|
371
371
|
operator: PricingRuleOperator;
|
|
372
372
|
}[] | undefined;
|
|
373
373
|
}, {
|
|
374
|
-
amount: number;
|
|
375
374
|
currency_code: string;
|
|
375
|
+
amount: number;
|
|
376
376
|
rules?: {
|
|
377
377
|
value: number;
|
|
378
378
|
attribute: "item_total";
|
|
@@ -429,8 +429,8 @@ export declare const VendorCreateShippingOption: z.ZodEffects<z.ZodObject<{
|
|
|
429
429
|
name: string;
|
|
430
430
|
shipping_profile_id: string;
|
|
431
431
|
prices: ({
|
|
432
|
-
amount: number;
|
|
433
432
|
currency_code: string;
|
|
433
|
+
amount: number;
|
|
434
434
|
rules?: {
|
|
435
435
|
value: number;
|
|
436
436
|
attribute: "item_total";
|
|
@@ -455,18 +455,18 @@ export declare const VendorCreateShippingOption: z.ZodEffects<z.ZodObject<{
|
|
|
455
455
|
label: string;
|
|
456
456
|
description?: string | undefined;
|
|
457
457
|
} | undefined;
|
|
458
|
+
type_id?: string | undefined;
|
|
458
459
|
rules?: {
|
|
459
460
|
value: string | string[];
|
|
460
461
|
attribute: string;
|
|
461
462
|
operator: RuleOperator;
|
|
462
463
|
}[] | undefined;
|
|
463
|
-
type_id?: string | undefined;
|
|
464
464
|
}, {
|
|
465
465
|
name: string;
|
|
466
466
|
shipping_profile_id: string;
|
|
467
467
|
prices: ({
|
|
468
|
-
amount: number;
|
|
469
468
|
currency_code: string;
|
|
469
|
+
amount: number;
|
|
470
470
|
rules?: {
|
|
471
471
|
value: number;
|
|
472
472
|
attribute: "item_total";
|
|
@@ -491,18 +491,18 @@ export declare const VendorCreateShippingOption: z.ZodEffects<z.ZodObject<{
|
|
|
491
491
|
label: string;
|
|
492
492
|
description?: string | undefined;
|
|
493
493
|
} | undefined;
|
|
494
|
+
type_id?: string | undefined;
|
|
494
495
|
rules?: {
|
|
495
496
|
value: string | string[];
|
|
496
497
|
attribute: string;
|
|
497
498
|
operator: RuleOperator;
|
|
498
499
|
}[] | undefined;
|
|
499
|
-
type_id?: string | undefined;
|
|
500
500
|
}>, {
|
|
501
501
|
name: string;
|
|
502
502
|
shipping_profile_id: string;
|
|
503
503
|
prices: ({
|
|
504
|
-
amount: number;
|
|
505
504
|
currency_code: string;
|
|
505
|
+
amount: number;
|
|
506
506
|
rules?: {
|
|
507
507
|
value: number;
|
|
508
508
|
attribute: "item_total";
|
|
@@ -527,18 +527,18 @@ export declare const VendorCreateShippingOption: z.ZodEffects<z.ZodObject<{
|
|
|
527
527
|
label: string;
|
|
528
528
|
description?: string | undefined;
|
|
529
529
|
} | undefined;
|
|
530
|
+
type_id?: string | undefined;
|
|
530
531
|
rules?: {
|
|
531
532
|
value: string | string[];
|
|
532
533
|
attribute: string;
|
|
533
534
|
operator: RuleOperator;
|
|
534
535
|
}[] | undefined;
|
|
535
|
-
type_id?: string | undefined;
|
|
536
536
|
}, {
|
|
537
537
|
name: string;
|
|
538
538
|
shipping_profile_id: string;
|
|
539
539
|
prices: ({
|
|
540
|
-
amount: number;
|
|
541
540
|
currency_code: string;
|
|
541
|
+
amount: number;
|
|
542
542
|
rules?: {
|
|
543
543
|
value: number;
|
|
544
544
|
attribute: "item_total";
|
|
@@ -563,12 +563,12 @@ export declare const VendorCreateShippingOption: z.ZodEffects<z.ZodObject<{
|
|
|
563
563
|
label: string;
|
|
564
564
|
description?: string | undefined;
|
|
565
565
|
} | undefined;
|
|
566
|
+
type_id?: string | undefined;
|
|
566
567
|
rules?: {
|
|
567
568
|
value: string | string[];
|
|
568
569
|
attribute: string;
|
|
569
570
|
operator: RuleOperator;
|
|
570
571
|
}[] | undefined;
|
|
571
|
-
type_id?: string | undefined;
|
|
572
572
|
}>;
|
|
573
573
|
export type VendorUpdateShippingOptionType = z.infer<typeof VendorUpdateShippingOption>;
|
|
574
574
|
export declare const VendorUpdateShippingOption: z.ZodEffects<z.ZodObject<{
|
|
@@ -610,8 +610,8 @@ export declare const VendorUpdateShippingOption: z.ZodEffects<z.ZodObject<{
|
|
|
610
610
|
}>, "many">>;
|
|
611
611
|
}, "strict", z.ZodTypeAny, {
|
|
612
612
|
id?: string | undefined;
|
|
613
|
-
amount?: number | undefined;
|
|
614
613
|
currency_code?: string | undefined;
|
|
614
|
+
amount?: number | undefined;
|
|
615
615
|
rules?: {
|
|
616
616
|
value: number;
|
|
617
617
|
attribute: "item_total";
|
|
@@ -619,8 +619,8 @@ export declare const VendorUpdateShippingOption: z.ZodEffects<z.ZodObject<{
|
|
|
619
619
|
}[] | undefined;
|
|
620
620
|
}, {
|
|
621
621
|
id?: string | undefined;
|
|
622
|
-
amount?: number | undefined;
|
|
623
622
|
currency_code?: string | undefined;
|
|
623
|
+
amount?: number | undefined;
|
|
624
624
|
rules?: {
|
|
625
625
|
value: number;
|
|
626
626
|
attribute: "item_total";
|
|
@@ -701,6 +701,7 @@ export declare const VendorUpdateShippingOption: z.ZodEffects<z.ZodObject<{
|
|
|
701
701
|
} | undefined;
|
|
702
702
|
name?: string | undefined;
|
|
703
703
|
shipping_profile_id?: string | undefined;
|
|
704
|
+
type_id?: string | undefined;
|
|
704
705
|
rules?: ({
|
|
705
706
|
value: string | string[];
|
|
706
707
|
attribute: string;
|
|
@@ -713,8 +714,8 @@ export declare const VendorUpdateShippingOption: z.ZodEffects<z.ZodObject<{
|
|
|
713
714
|
})[] | undefined;
|
|
714
715
|
prices?: ({
|
|
715
716
|
id?: string | undefined;
|
|
716
|
-
amount?: number | undefined;
|
|
717
717
|
currency_code?: string | undefined;
|
|
718
|
+
amount?: number | undefined;
|
|
718
719
|
rules?: {
|
|
719
720
|
value: number;
|
|
720
721
|
attribute: "item_total";
|
|
@@ -730,7 +731,6 @@ export declare const VendorUpdateShippingOption: z.ZodEffects<z.ZodObject<{
|
|
|
730
731
|
operator: PricingRuleOperator;
|
|
731
732
|
}[] | undefined;
|
|
732
733
|
})[] | undefined;
|
|
733
|
-
type_id?: string | undefined;
|
|
734
734
|
provider_id?: string | undefined;
|
|
735
735
|
price_type?: ShippingOptionPriceTypeEnum | undefined;
|
|
736
736
|
}, {
|
|
@@ -743,6 +743,7 @@ export declare const VendorUpdateShippingOption: z.ZodEffects<z.ZodObject<{
|
|
|
743
743
|
} | undefined;
|
|
744
744
|
name?: string | undefined;
|
|
745
745
|
shipping_profile_id?: string | undefined;
|
|
746
|
+
type_id?: string | undefined;
|
|
746
747
|
rules?: ({
|
|
747
748
|
value: string | string[];
|
|
748
749
|
attribute: string;
|
|
@@ -755,8 +756,8 @@ export declare const VendorUpdateShippingOption: z.ZodEffects<z.ZodObject<{
|
|
|
755
756
|
})[] | undefined;
|
|
756
757
|
prices?: ({
|
|
757
758
|
id?: string | undefined;
|
|
758
|
-
amount?: number | undefined;
|
|
759
759
|
currency_code?: string | undefined;
|
|
760
|
+
amount?: number | undefined;
|
|
760
761
|
rules?: {
|
|
761
762
|
value: number;
|
|
762
763
|
attribute: "item_total";
|
|
@@ -772,7 +773,6 @@ export declare const VendorUpdateShippingOption: z.ZodEffects<z.ZodObject<{
|
|
|
772
773
|
operator: PricingRuleOperator;
|
|
773
774
|
}[] | undefined;
|
|
774
775
|
})[] | undefined;
|
|
775
|
-
type_id?: string | undefined;
|
|
776
776
|
provider_id?: string | undefined;
|
|
777
777
|
price_type?: ShippingOptionPriceTypeEnum | undefined;
|
|
778
778
|
}>, {
|
|
@@ -785,6 +785,7 @@ export declare const VendorUpdateShippingOption: z.ZodEffects<z.ZodObject<{
|
|
|
785
785
|
} | undefined;
|
|
786
786
|
name?: string | undefined;
|
|
787
787
|
shipping_profile_id?: string | undefined;
|
|
788
|
+
type_id?: string | undefined;
|
|
788
789
|
rules?: ({
|
|
789
790
|
value: string | string[];
|
|
790
791
|
attribute: string;
|
|
@@ -797,8 +798,8 @@ export declare const VendorUpdateShippingOption: z.ZodEffects<z.ZodObject<{
|
|
|
797
798
|
})[] | undefined;
|
|
798
799
|
prices?: ({
|
|
799
800
|
id?: string | undefined;
|
|
800
|
-
amount?: number | undefined;
|
|
801
801
|
currency_code?: string | undefined;
|
|
802
|
+
amount?: number | undefined;
|
|
802
803
|
rules?: {
|
|
803
804
|
value: number;
|
|
804
805
|
attribute: "item_total";
|
|
@@ -814,7 +815,6 @@ export declare const VendorUpdateShippingOption: z.ZodEffects<z.ZodObject<{
|
|
|
814
815
|
operator: PricingRuleOperator;
|
|
815
816
|
}[] | undefined;
|
|
816
817
|
})[] | undefined;
|
|
817
|
-
type_id?: string | undefined;
|
|
818
818
|
provider_id?: string | undefined;
|
|
819
819
|
price_type?: ShippingOptionPriceTypeEnum | undefined;
|
|
820
820
|
}, {
|
|
@@ -827,6 +827,7 @@ export declare const VendorUpdateShippingOption: z.ZodEffects<z.ZodObject<{
|
|
|
827
827
|
} | undefined;
|
|
828
828
|
name?: string | undefined;
|
|
829
829
|
shipping_profile_id?: string | undefined;
|
|
830
|
+
type_id?: string | undefined;
|
|
830
831
|
rules?: ({
|
|
831
832
|
value: string | string[];
|
|
832
833
|
attribute: string;
|
|
@@ -839,8 +840,8 @@ export declare const VendorUpdateShippingOption: z.ZodEffects<z.ZodObject<{
|
|
|
839
840
|
})[] | undefined;
|
|
840
841
|
prices?: ({
|
|
841
842
|
id?: string | undefined;
|
|
842
|
-
amount?: number | undefined;
|
|
843
843
|
currency_code?: string | undefined;
|
|
844
|
+
amount?: number | undefined;
|
|
844
845
|
rules?: {
|
|
845
846
|
value: number;
|
|
846
847
|
attribute: "item_total";
|
|
@@ -856,7 +857,6 @@ export declare const VendorUpdateShippingOption: z.ZodEffects<z.ZodObject<{
|
|
|
856
857
|
operator: PricingRuleOperator;
|
|
857
858
|
}[] | undefined;
|
|
858
859
|
})[] | undefined;
|
|
859
|
-
type_id?: string | undefined;
|
|
860
860
|
provider_id?: string | undefined;
|
|
861
861
|
price_type?: ShippingOptionPriceTypeEnum | undefined;
|
|
862
862
|
}>;
|
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ProductAttribute → ProductCategory pivot link.
|
|
3
|
-
*
|
|
4
|
-
* Direction: the ProductAttribute is the owner — an attribute declares which
|
|
5
|
-
* categories it applies to. Surfaced on the attribute as the `categories`
|
|
6
|
-
* relation (explicit alias). The pivot table keeps both FK columns
|
|
7
|
-
* (`product_attribute_id`, `product_category_id`), so the direction flip is a
|
|
8
|
-
* pure relabel — no schema/migration change.
|
|
9
|
-
*/
|
|
10
1
|
declare const _default: import("@medusajs/framework/utils").DefineLinkExport;
|
|
11
2
|
export default _default;
|
|
@@ -6,25 +6,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const utils_1 = require("@medusajs/framework/utils");
|
|
7
7
|
const product_1 = __importDefault(require("@medusajs/medusa/product"));
|
|
8
8
|
const product_attribute_1 = __importDefault(require("../modules/product-attribute"));
|
|
9
|
-
/**
|
|
10
|
-
* ProductAttribute → ProductCategory pivot link.
|
|
11
|
-
*
|
|
12
|
-
* Direction: the ProductAttribute is the owner — an attribute declares which
|
|
13
|
-
* categories it applies to. Surfaced on the attribute as the `categories`
|
|
14
|
-
* relation (explicit alias). The pivot table keeps both FK columns
|
|
15
|
-
* (`product_attribute_id`, `product_category_id`), so the direction flip is a
|
|
16
|
-
* pure relabel — no schema/migration change.
|
|
17
|
-
*/
|
|
18
9
|
exports.default = (0, utils_1.defineLink)({
|
|
19
10
|
linkable: product_attribute_1.default.linkable.productAttribute.id,
|
|
20
11
|
isList: true,
|
|
21
12
|
}, {
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
linkable: {
|
|
14
|
+
...product_1.default.linkable.productCategory.id,
|
|
15
|
+
alias: "categories",
|
|
16
|
+
},
|
|
24
17
|
isList: true,
|
|
25
18
|
}, {
|
|
26
19
|
database: {
|
|
27
20
|
table: "product_category_attribute",
|
|
28
21
|
},
|
|
29
22
|
});
|
|
30
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
23
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZHVjdC1hdHRyaWJ1dGUtY2F0ZWdvcnktbGluay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9saW5rcy9wcm9kdWN0LWF0dHJpYnV0ZS1jYXRlZ29yeS1saW5rLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEscURBQXNEO0FBQ3RELHVFQUFvRDtBQUVwRCxxRkFBaUU7QUFHakUsa0JBQWUsSUFBQSxrQkFBVSxFQUN2QjtJQUNFLFFBQVEsRUFBRSwyQkFBc0IsQ0FBQyxRQUFRLENBQUMsZ0JBQWdCLENBQUMsRUFBRTtJQUM3RCxNQUFNLEVBQUUsSUFBSTtDQUNiLEVBQ0Q7SUFDRSxRQUFRLEVBQUU7UUFDUixHQUFHLGlCQUFhLENBQUMsUUFBUSxDQUFDLGVBQWUsQ0FBQyxFQUFFO1FBQzVDLEtBQUssRUFBRSxZQUFZO0tBQ3BCO0lBQ0QsTUFBTSxFQUFFLElBQUk7Q0FDYixFQUNEO0lBQ0UsUUFBUSxFQUFFO1FBQ1IsS0FBSyxFQUFFLDRCQUE0QjtLQUNwQztDQUNGLENBQ0YsQ0FBQSJ9
|
|
@@ -8,6 +8,7 @@ declare const Offer: import("@medusajs/framework/utils").DmlEntity<import("@medu
|
|
|
8
8
|
ean: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
9
9
|
upc: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
10
10
|
created_by: import("@medusajs/framework/utils").TextProperty;
|
|
11
|
+
variant_count: import("@medusajs/framework/utils").ComputedProperty<number | null, import("@medusajs/framework/utils").NumberProperty>;
|
|
11
12
|
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
12
13
|
}>, "Offer">;
|
|
13
14
|
export default Offer;
|
|
@@ -12,6 +12,7 @@ const Offer = utils_1.model
|
|
|
12
12
|
ean: utils_1.model.text().searchable().nullable(),
|
|
13
13
|
upc: utils_1.model.text().searchable().nullable(),
|
|
14
14
|
created_by: utils_1.model.text(),
|
|
15
|
+
variant_count: utils_1.model.number().computed(),
|
|
15
16
|
metadata: utils_1.model.json().nullable(),
|
|
16
17
|
})
|
|
17
18
|
.indexes([
|
|
@@ -53,4 +54,4 @@ const Offer = utils_1.model
|
|
|
53
54
|
},
|
|
54
55
|
]);
|
|
55
56
|
exports.default = Offer;
|
|
56
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
57
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib2ZmZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9vZmZlci9tb2RlbHMvb2ZmZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxxREFBaUQ7QUFFakQsTUFBTSxLQUFLLEdBQUcsYUFBSztLQUNoQixNQUFNLENBQUMsT0FBTyxFQUFFO0lBQ2YsRUFBRSxFQUFFLGFBQUssQ0FBQyxFQUFFLENBQUMsRUFBRSxNQUFNLEVBQUUsT0FBTyxFQUFFLENBQUMsQ0FBQyxVQUFVLEVBQUU7SUFDOUMsU0FBUyxFQUFFLGFBQUssQ0FBQyxJQUFJLEVBQUU7SUFDdkIsVUFBVSxFQUFFLGFBQUssQ0FBQyxJQUFJLEVBQUU7SUFDeEIsVUFBVSxFQUFFLGFBQUssQ0FBQyxJQUFJLEVBQUU7SUFDeEIsbUJBQW1CLEVBQUUsYUFBSyxDQUFDLElBQUksRUFBRTtJQUNqQyxHQUFHLEVBQUUsYUFBSyxDQUFDLElBQUksRUFBRSxDQUFDLFVBQVUsRUFBRTtJQUM5QixHQUFHLEVBQUUsYUFBSyxDQUFDLElBQUksRUFBRSxDQUFDLFVBQVUsRUFBRSxDQUFDLFFBQVEsRUFBRTtJQUN6QyxHQUFHLEVBQUUsYUFBSyxDQUFDLElBQUksRUFBRSxDQUFDLFVBQVUsRUFBRSxDQUFDLFFBQVEsRUFBRTtJQUN6QyxVQ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BRSx3Q0FBd0M7S0FDaEQ7Q0FDRixDQUFDLENBQUE7QUFFSixrQkFBZSxLQUFLLENBQUEifQ==
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import { Context, FindConfig } from "@medusajs/framework/types";
|
|
2
|
+
import { OfferDTO } from "@mercurjs/types";
|
|
3
|
+
type OfferFilters = Record<string, unknown> & {
|
|
4
|
+
group_by_seller?: boolean;
|
|
5
|
+
};
|
|
1
6
|
declare const OfferModuleService_base: import("@medusajs/framework/utils").MedusaServiceReturnType<import("@medusajs/framework/utils").ModelConfigurationsToConfigTemplate<{
|
|
2
7
|
readonly Offer: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
3
8
|
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
@@ -9,9 +14,13 @@ declare const OfferModuleService_base: import("@medusajs/framework/utils").Medus
|
|
|
9
14
|
ean: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
10
15
|
upc: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
11
16
|
created_by: import("@medusajs/framework/utils").TextProperty;
|
|
17
|
+
variant_count: import("@medusajs/framework/utils").ComputedProperty<number | null, import("@medusajs/framework/utils").NumberProperty>;
|
|
12
18
|
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
13
19
|
}>, "Offer">;
|
|
14
20
|
}>>;
|
|
15
21
|
declare class OfferModuleService extends OfferModuleService_base {
|
|
22
|
+
listOffers(filters?: OfferFilters, config?: FindConfig<OfferDTO>, sharedContext?: Context): Promise<OfferDTO[]>;
|
|
23
|
+
listAndCountOffers(filters?: OfferFilters, config?: FindConfig<OfferDTO>, sharedContext?: Context): Promise<[OfferDTO[], number]>;
|
|
24
|
+
private listGroupedOffersBySeller_;
|
|
16
25
|
}
|
|
17
26
|
export default OfferModuleService;
|
|
@@ -1,10 +1,109 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
2
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
15
|
const utils_1 = require("@medusajs/framework/utils");
|
|
4
16
|
const models_1 = require("./models");
|
|
17
|
+
const toArray = (value) => (Array.isArray(value) ? value : [value]).map(String);
|
|
5
18
|
class OfferModuleService extends (0, utils_1.MedusaService)({
|
|
6
19
|
Offer: models_1.Offer,
|
|
7
20
|
}) {
|
|
21
|
+
// @ts-ignore - override narrows the generated signature
|
|
22
|
+
async listOffers(filters = {}, config = {}, sharedContext = {}) {
|
|
23
|
+
if (!filters.group_by_seller) {
|
|
24
|
+
return super.listOffers(filters, config, sharedContext);
|
|
25
|
+
}
|
|
26
|
+
const [offers] = await this.listGroupedOffersBySeller_(filters, config, sharedContext);
|
|
27
|
+
return offers;
|
|
28
|
+
}
|
|
29
|
+
// @ts-ignore - override narrows the generated signature
|
|
30
|
+
async listAndCountOffers(filters = {}, config = {}, sharedContext = {}) {
|
|
31
|
+
if (!filters.group_by_seller) {
|
|
32
|
+
return super.listAndCountOffers(filters, config, sharedContext);
|
|
33
|
+
}
|
|
34
|
+
return this.listGroupedOffersBySeller_(filters, config, sharedContext);
|
|
35
|
+
}
|
|
36
|
+
async listGroupedOffersBySeller_(filters, config, sharedContext) {
|
|
37
|
+
const { group_by_seller: _flag, ...rest } = filters;
|
|
38
|
+
const skip = config.skip ?? 0;
|
|
39
|
+
const take = config.take ?? 20;
|
|
40
|
+
const { baseRepository_ } = this;
|
|
41
|
+
const manager = baseRepository_.getActiveManager(sharedContext);
|
|
42
|
+
const knex = manager.getKnex();
|
|
43
|
+
const scoped = () => {
|
|
44
|
+
const qb = knex("offer").whereNull("deleted_at");
|
|
45
|
+
if (rest.product_id !== undefined) {
|
|
46
|
+
qb.whereIn("product_id", toArray(rest.product_id));
|
|
47
|
+
}
|
|
48
|
+
if (rest.seller_id !== undefined) {
|
|
49
|
+
qb.whereIn("seller_id", toArray(rest.seller_id));
|
|
50
|
+
}
|
|
51
|
+
return qb;
|
|
52
|
+
};
|
|
53
|
+
const idRows = (await scoped()
|
|
54
|
+
.distinctOn("product_id", "seller_id")
|
|
55
|
+
.select("id")
|
|
56
|
+
.orderBy([
|
|
57
|
+
{ column: "product_id" },
|
|
58
|
+
{ column: "seller_id" },
|
|
59
|
+
{ column: "created_at", order: "desc" },
|
|
60
|
+
])
|
|
61
|
+
.limit(take)
|
|
62
|
+
.offset(skip));
|
|
63
|
+
const countRow = (await knex
|
|
64
|
+
.count({ count: "*" })
|
|
65
|
+
.from(scoped().groupBy("product_id", "seller_id").select(knex.raw("1")).as("groups"))
|
|
66
|
+
.first());
|
|
67
|
+
const count = Number(countRow?.count ?? 0);
|
|
68
|
+
const ids = idRows.map((row) => row.id);
|
|
69
|
+
if (!ids.length) {
|
|
70
|
+
return [[], count];
|
|
71
|
+
}
|
|
72
|
+
const offers = (await super.listOffers({ id: ids }, { ...config, skip: 0, take: ids.length }, sharedContext));
|
|
73
|
+
const rank = new Map(ids.map((id, index) => [id, index]));
|
|
74
|
+
offers.sort((a, b) => (rank.get(a.id) ?? 0) - (rank.get(b.id) ?? 0));
|
|
75
|
+
const countRows = (await scoped()
|
|
76
|
+
.groupBy("product_id", "seller_id")
|
|
77
|
+
.select("product_id", "seller_id")
|
|
78
|
+
.count({ variant_count: "*" }));
|
|
79
|
+
const variantCountByGroup = new Map(countRows.map((row) => [
|
|
80
|
+
`${row.product_id}:${row.seller_id}`,
|
|
81
|
+
Number(row.variant_count),
|
|
82
|
+
]));
|
|
83
|
+
for (const offer of offers) {
|
|
84
|
+
offer.variant_count =
|
|
85
|
+
variantCountByGroup.get(`${offer.product_id}:${offer.seller_id}`) ?? 0;
|
|
86
|
+
}
|
|
87
|
+
return [offers, count];
|
|
88
|
+
}
|
|
8
89
|
}
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, utils_1.InjectManager)()
|
|
92
|
+
// @ts-ignore - override narrows the generated signature
|
|
93
|
+
,
|
|
94
|
+
__param(2, (0, utils_1.MedusaContext)()),
|
|
95
|
+
__metadata("design:type", Function),
|
|
96
|
+
__metadata("design:paramtypes", [Object, Object, Object]),
|
|
97
|
+
__metadata("design:returntype", Promise)
|
|
98
|
+
], OfferModuleService.prototype, "listOffers", null);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, utils_1.InjectManager)()
|
|
101
|
+
// @ts-ignore - override narrows the generated signature
|
|
102
|
+
,
|
|
103
|
+
__param(2, (0, utils_1.MedusaContext)()),
|
|
104
|
+
__metadata("design:type", Function),
|
|
105
|
+
__metadata("design:paramtypes", [Object, Object, Object]),
|
|
106
|
+
__metadata("design:returntype", Promise)
|
|
107
|
+
], OfferModuleService.prototype, "listAndCountOffers", null);
|
|
9
108
|
exports.default = OfferModuleService;
|
|
10
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
109
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS5qcyIsInN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
|
ean: string | null;
|
|
11
11
|
upc: string | null;
|
|
12
12
|
created_by: string;
|
|
13
|
+
variant_count: number | null;
|
|
13
14
|
metadata: Record<string, unknown> | null;
|
|
14
15
|
created_at: Date;
|
|
15
16
|
updated_at: Date;
|