@hartl-services/medusa-contracts 1.2.0 → 1.3.0
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.
|
@@ -370,10 +370,25 @@ export declare const GetOwnOrderDiscountResponseSchema: z.ZodObject<{
|
|
|
370
370
|
export declare const ApplyOwnOrderPromotionResponseSchema: z.ZodObject<{
|
|
371
371
|
applied: z.ZodBoolean;
|
|
372
372
|
}, z.core.$strip>;
|
|
373
|
+
/**
|
|
374
|
+
* Display labels of a consignment line, resolved when the response is built.
|
|
375
|
+
* Every field is null when the product or batch can no longer be resolved;
|
|
376
|
+
* the ids stay the fallback.
|
|
377
|
+
*/
|
|
378
|
+
export declare const ConsignmentLineLabelsSchema: z.ZodObject<{
|
|
379
|
+
product_title: z.ZodNullable<z.ZodString>;
|
|
380
|
+
variant_title: z.ZodNullable<z.ZodString>;
|
|
381
|
+
batch_name: z.ZodNullable<z.ZodString>;
|
|
382
|
+
batch_expiry_date: z.ZodNullable<z.ZodString>;
|
|
383
|
+
}, z.core.$strip>;
|
|
373
384
|
export declare const StoreConsignmentInventoryLineSchema: z.ZodObject<{
|
|
374
385
|
inventory_item_id: z.ZodString;
|
|
375
386
|
batch_id: z.ZodNullable<z.ZodString>;
|
|
376
387
|
expected_quantity: z.ZodNumber;
|
|
388
|
+
product_title: z.ZodNullable<z.ZodString>;
|
|
389
|
+
variant_title: z.ZodNullable<z.ZodString>;
|
|
390
|
+
batch_name: z.ZodNullable<z.ZodString>;
|
|
391
|
+
batch_expiry_date: z.ZodNullable<z.ZodString>;
|
|
377
392
|
}, z.core.$strip>;
|
|
378
393
|
export declare const GetConsignmentInventoryResponseSchema: z.ZodObject<{
|
|
379
394
|
period_start: z.ZodString;
|
|
@@ -381,6 +396,10 @@ export declare const GetConsignmentInventoryResponseSchema: z.ZodObject<{
|
|
|
381
396
|
inventory_item_id: z.ZodString;
|
|
382
397
|
batch_id: z.ZodNullable<z.ZodString>;
|
|
383
398
|
expected_quantity: z.ZodNumber;
|
|
399
|
+
product_title: z.ZodNullable<z.ZodString>;
|
|
400
|
+
variant_title: z.ZodNullable<z.ZodString>;
|
|
401
|
+
batch_name: z.ZodNullable<z.ZodString>;
|
|
402
|
+
batch_expiry_date: z.ZodNullable<z.ZodString>;
|
|
384
403
|
}, z.core.$strip>>;
|
|
385
404
|
}, z.core.$strip>;
|
|
386
405
|
export declare const StoreConsignmentReportLineSchema: z.ZodObject<{
|
|
@@ -396,6 +415,10 @@ export declare const StoreConsignmentReportLineSchema: z.ZodObject<{
|
|
|
396
415
|
resolved_unit_price: z.ZodNullable<z.ZodNumber>;
|
|
397
416
|
discounted_line_total: z.ZodNullable<z.ZodNumber>;
|
|
398
417
|
currency_code: z.ZodNullable<z.ZodString>;
|
|
418
|
+
product_title: z.ZodNullable<z.ZodString>;
|
|
419
|
+
variant_title: z.ZodNullable<z.ZodString>;
|
|
420
|
+
batch_name: z.ZodNullable<z.ZodString>;
|
|
421
|
+
batch_expiry_date: z.ZodNullable<z.ZodString>;
|
|
399
422
|
}, z.core.$strip>;
|
|
400
423
|
export declare const StoreConsignmentReportSchema: z.ZodObject<{
|
|
401
424
|
id: z.ZodString;
|
|
@@ -424,6 +447,10 @@ export declare const StoreConsignmentReportSchema: z.ZodObject<{
|
|
|
424
447
|
resolved_unit_price: z.ZodNullable<z.ZodNumber>;
|
|
425
448
|
discounted_line_total: z.ZodNullable<z.ZodNumber>;
|
|
426
449
|
currency_code: z.ZodNullable<z.ZodString>;
|
|
450
|
+
product_title: z.ZodNullable<z.ZodString>;
|
|
451
|
+
variant_title: z.ZodNullable<z.ZodString>;
|
|
452
|
+
batch_name: z.ZodNullable<z.ZodString>;
|
|
453
|
+
batch_expiry_date: z.ZodNullable<z.ZodString>;
|
|
427
454
|
}, z.core.$strip>>;
|
|
428
455
|
}, z.core.$strip>;
|
|
429
456
|
export declare const SubmitConsignmentReportResponseSchema: z.ZodObject<{
|
|
@@ -454,6 +481,10 @@ export declare const SubmitConsignmentReportResponseSchema: z.ZodObject<{
|
|
|
454
481
|
resolved_unit_price: z.ZodNullable<z.ZodNumber>;
|
|
455
482
|
discounted_line_total: z.ZodNullable<z.ZodNumber>;
|
|
456
483
|
currency_code: z.ZodNullable<z.ZodString>;
|
|
484
|
+
product_title: z.ZodNullable<z.ZodString>;
|
|
485
|
+
variant_title: z.ZodNullable<z.ZodString>;
|
|
486
|
+
batch_name: z.ZodNullable<z.ZodString>;
|
|
487
|
+
batch_expiry_date: z.ZodNullable<z.ZodString>;
|
|
457
488
|
}, z.core.$strip>>;
|
|
458
489
|
}, z.core.$strip>;
|
|
459
490
|
draft_order: z.ZodNullable<z.ZodObject<{
|
|
@@ -488,6 +519,10 @@ export declare const ListConsignmentReportsResponseSchema: z.ZodObject<{
|
|
|
488
519
|
resolved_unit_price: z.ZodNullable<z.ZodNumber>;
|
|
489
520
|
discounted_line_total: z.ZodNullable<z.ZodNumber>;
|
|
490
521
|
currency_code: z.ZodNullable<z.ZodString>;
|
|
522
|
+
product_title: z.ZodNullable<z.ZodString>;
|
|
523
|
+
variant_title: z.ZodNullable<z.ZodString>;
|
|
524
|
+
batch_name: z.ZodNullable<z.ZodString>;
|
|
525
|
+
batch_expiry_date: z.ZodNullable<z.ZodString>;
|
|
491
526
|
}, z.core.$strip>>;
|
|
492
527
|
}, z.core.$strip>>;
|
|
493
528
|
}, z.core.$strip>;
|
|
@@ -2549,6 +2584,7 @@ export declare const AdminConsignmentReportSchema: z.ZodObject<{
|
|
|
2549
2584
|
draft_order_id: z.ZodNullable<z.ZodString>;
|
|
2550
2585
|
order_id: z.ZodNullable<z.ZodString>;
|
|
2551
2586
|
order_display_id: z.ZodNullable<z.ZodNumber>;
|
|
2587
|
+
draft_order_display_id: z.ZodNullable<z.ZodNumber>;
|
|
2552
2588
|
fulfillment_id: z.ZodNullable<z.ZodString>;
|
|
2553
2589
|
submitted_at: z.ZodNullable<z.ZodString>;
|
|
2554
2590
|
approved_at: z.ZodNullable<z.ZodString>;
|
|
@@ -2609,6 +2645,7 @@ export declare const ListAdminConsignmentReportsResponseSchema: z.ZodObject<{
|
|
|
2609
2645
|
draft_order_id: z.ZodNullable<z.ZodString>;
|
|
2610
2646
|
order_id: z.ZodNullable<z.ZodString>;
|
|
2611
2647
|
order_display_id: z.ZodNullable<z.ZodNumber>;
|
|
2648
|
+
draft_order_display_id: z.ZodNullable<z.ZodNumber>;
|
|
2612
2649
|
fulfillment_id: z.ZodNullable<z.ZodString>;
|
|
2613
2650
|
submitted_at: z.ZodNullable<z.ZodString>;
|
|
2614
2651
|
approved_at: z.ZodNullable<z.ZodString>;
|
|
@@ -2673,6 +2710,7 @@ export declare const AdminConsignmentReportResponseSchema: z.ZodObject<{
|
|
|
2673
2710
|
draft_order_id: z.ZodNullable<z.ZodString>;
|
|
2674
2711
|
order_id: z.ZodNullable<z.ZodString>;
|
|
2675
2712
|
order_display_id: z.ZodNullable<z.ZodNumber>;
|
|
2713
|
+
draft_order_display_id: z.ZodNullable<z.ZodNumber>;
|
|
2676
2714
|
fulfillment_id: z.ZodNullable<z.ZodString>;
|
|
2677
2715
|
submitted_at: z.ZodNullable<z.ZodString>;
|
|
2678
2716
|
approved_at: z.ZodNullable<z.ZodString>;
|
|
@@ -2711,6 +2749,7 @@ export declare const AdminConsignmentReportResponseSchema: z.ZodObject<{
|
|
|
2711
2749
|
}, z.core.$strip>>;
|
|
2712
2750
|
}, z.core.$strip>;
|
|
2713
2751
|
}, z.core.$strip>;
|
|
2752
|
+
/** Order, fulfillment and reservations are null/empty for a report approved without any sale. */
|
|
2714
2753
|
export declare const ApproveConsignmentReportResponseSchema: z.ZodObject<{
|
|
2715
2754
|
report: z.ZodObject<{
|
|
2716
2755
|
id: z.ZodString;
|
|
@@ -2734,6 +2773,7 @@ export declare const ApproveConsignmentReportResponseSchema: z.ZodObject<{
|
|
|
2734
2773
|
draft_order_id: z.ZodNullable<z.ZodString>;
|
|
2735
2774
|
order_id: z.ZodNullable<z.ZodString>;
|
|
2736
2775
|
order_display_id: z.ZodNullable<z.ZodNumber>;
|
|
2776
|
+
draft_order_display_id: z.ZodNullable<z.ZodNumber>;
|
|
2737
2777
|
fulfillment_id: z.ZodNullable<z.ZodString>;
|
|
2738
2778
|
submitted_at: z.ZodNullable<z.ZodString>;
|
|
2739
2779
|
approved_at: z.ZodNullable<z.ZodString>;
|
|
@@ -2771,12 +2811,12 @@ export declare const ApproveConsignmentReportResponseSchema: z.ZodObject<{
|
|
|
2771
2811
|
}, z.core.$strip>>;
|
|
2772
2812
|
}, z.core.$strip>>;
|
|
2773
2813
|
}, z.core.$strip>;
|
|
2774
|
-
order_id: z.ZodString
|
|
2775
|
-
fulfillment_id: z.ZodString
|
|
2776
|
-
order: z.ZodObject<{
|
|
2814
|
+
order_id: z.ZodNullable<z.ZodString>;
|
|
2815
|
+
fulfillment_id: z.ZodNullable<z.ZodString>;
|
|
2816
|
+
order: z.ZodNullable<z.ZodObject<{
|
|
2777
2817
|
id: z.ZodString;
|
|
2778
2818
|
is_draft_order: z.ZodBoolean;
|
|
2779
|
-
}, z.core.$strip
|
|
2819
|
+
}, z.core.$strip>>;
|
|
2780
2820
|
reservations: z.ZodArray<z.ZodObject<{
|
|
2781
2821
|
id: z.ZodString;
|
|
2782
2822
|
inventory_item_id: z.ZodString;
|
|
@@ -2784,14 +2824,14 @@ export declare const ApproveConsignmentReportResponseSchema: z.ZodObject<{
|
|
|
2784
2824
|
line_item_id: z.ZodNullable<z.ZodString>;
|
|
2785
2825
|
quantity: z.ZodNumber;
|
|
2786
2826
|
}, z.core.$strip>>;
|
|
2787
|
-
fulfillment: z.ZodObject<{
|
|
2827
|
+
fulfillment: z.ZodNullable<z.ZodObject<{
|
|
2788
2828
|
id: z.ZodString;
|
|
2789
2829
|
location_id: z.ZodString;
|
|
2790
2830
|
items: z.ZodArray<z.ZodObject<{
|
|
2791
2831
|
line_item_id: z.ZodString;
|
|
2792
2832
|
quantity: z.ZodNumber;
|
|
2793
2833
|
}, z.core.$strip>>;
|
|
2794
|
-
}, z.core.$strip
|
|
2834
|
+
}, z.core.$strip>>;
|
|
2795
2835
|
batch_inventory: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2796
2836
|
id: z.ZodString;
|
|
2797
2837
|
quantity: z.ZodNumber;
|
|
@@ -2822,6 +2862,7 @@ export declare const RejectConsignmentReportResponseSchema: z.ZodObject<{
|
|
|
2822
2862
|
draft_order_id: z.ZodNullable<z.ZodString>;
|
|
2823
2863
|
order_id: z.ZodNullable<z.ZodString>;
|
|
2824
2864
|
order_display_id: z.ZodNullable<z.ZodNumber>;
|
|
2865
|
+
draft_order_display_id: z.ZodNullable<z.ZodNumber>;
|
|
2825
2866
|
fulfillment_id: z.ZodNullable<z.ZodString>;
|
|
2826
2867
|
submitted_at: z.ZodNullable<z.ZodString>;
|
|
2827
2868
|
approved_at: z.ZodNullable<z.ZodString>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.CorrectConsignmentReportResponseSchema = exports.RejectConsignmentReportResponseSchema = exports.ApproveConsignmentReportResponseSchema = exports.AdminConsignmentReportResponseSchema = exports.ListAdminConsignmentReportsResponseSchema = exports.AdminConsignmentReportSchema = exports.AdminConsignmentReportCorrectionSchema = exports.AdminConsignmentReportLineSchema = exports.RequestConsignmentReminderResponseSchema = exports.ConsignmentTransferResponseSchema = exports.ConsignmentTransferSchema = exports.AffiliateDistributionResponseSchema = exports.AffiliateDistributionSettingsSchema = exports.AffiliateDistributionReportsResponseSchema = exports.AffiliateDistributionReportItemSchema = exports.AffiliateDistributionCurrencyTotalSchema = exports.AffiliateProgramSettingsResponseSchema = exports.AffiliateProgramSettingsSchema = exports.AffiliateReportDetailResponseSchema = exports.AffiliateReportEntrySchema = exports.AffiliateReportTotalsSchema = exports.AffiliateReportOverviewResponseSchema = exports.AffiliateReportOverviewItemSchema = exports.OrderAffiliateAttributionResponseSchema = exports.AffiliateOrderAttributionSchema = exports.CustomerAffiliateAssignmentResponseSchema = exports.ReconcileAdminAffiliateCouponCodeResponseSchema = exports.RotateAdminAffiliateCouponCodeResponseSchema = exports.AdminAffiliateCouponCodeResponseSchema = exports.ListAdminAffiliateCouponCodesResponseSchema = exports.RotateStoreAffiliateCouponCodeResponseSchema = exports.StoreAffiliateCouponCodeResponseSchema = exports.ListStoreAffiliateCouponCodesResponseSchema = exports.AppliedAffiliateCouponSnapshotSchema = exports.AdminAffiliateCouponCodeSchema = exports.StoreAffiliateCouponCodeSchema = exports.ListAffiliateSlugsResponseSchema = exports.AffiliateSlugResponseSchema = exports.AffiliateResponseSchema = exports.ListAffiliatesResponseSchema = exports.ApproveAffiliateApplicationResponseSchema = void 0;
|
|
3
|
+
exports.SubmitConsignmentReportResponseSchema = exports.StoreConsignmentReportSchema = exports.StoreConsignmentReportLineSchema = exports.GetConsignmentInventoryResponseSchema = exports.StoreConsignmentInventoryLineSchema = exports.ConsignmentLineLabelsSchema = exports.ApplyOwnOrderPromotionResponseSchema = exports.GetOwnOrderDiscountResponseSchema = exports.GetAffiliateCartReferralResponseSchema = exports.ApplyAffiliateCouponResponseSchema = exports.CaptureAffiliateReferralResponseSchema = exports.StoreAffiliateReferralSchema = exports.ResolveAffiliateReferralResponseSchema = exports.SubmitAffiliateApplicationResponseSchema = exports.StoreAffiliateApplicationSchema = exports.StoreAffiliateSlugSchema = exports.StoreAffiliateSchema = exports.UpdatePartnerPortalSlugSchema = exports.CreatePartnerPortalSlugSchema = exports.PartnerPortalEmptyQuerySchema = exports.PartnerPortalCommissionsQuerySchema = exports.PartnerPortalDateRangeQuerySchema = exports.createPartnerPortalDateRangeQuerySchema = exports.SubmitExistingConsignmentReportSchema = exports.SubmitConsignmentReportSchema = exports.AffiliateCouponLabelsResponseSchema = exports.AffiliateCouponLabelSchema = exports.ResolveAffiliateCouponLabelsPayloadSchema = exports.ApplyAffiliateCouponSchema = exports.CaptureAffiliateReferralSchema = exports.ApplyOwnOrderPromotionSchema = exports.ResolveReferralQuerySchema = exports.SubmitAffiliateApplicationSchema = exports.CalendarMonthSchema = exports.CalendarDateSchema = exports.CommissionEntryTypeSchema = exports.AffiliateReferralResultStatusSchema = exports.AffiliateCartReferralRecordStatusSchema = exports.AffiliateCouponOriginSchema = exports.AffiliateCouponWireStatusSchema = exports.AffiliateCouponProvisioningStatusSchema = exports.AffiliateCouponLifecycleStatusSchema = exports.AffiliateReferralSignalSourceSchema = exports.AffiliateReferralOverwritePolicySchema = exports.PersistedAffiliateCustomerAssignmentModeSchema = exports.AffiliateCustomerAssignmentModeSchema = exports.AssignmentSourceSchema = exports.AffiliateApplicationStatusSchema = exports.AffiliateStatusSchema = exports.WireDateSchema = void 0;
|
|
4
|
+
exports.ListAffiliateApplicationsResponseSchema = exports.CommissionEntrySchema = exports.CustomerAffiliateAssignmentSchema = exports.AffiliateApplicationSchema = exports.AffiliateApplicationCompanyVerificationSchema = exports.AffiliateSchema = exports.AffiliateCustomerSummarySchema = exports.AffiliateSlugSchema = exports.ListConsignmentReportsQuerySchema = exports.AffiliateDistributionReportQuerySchema = exports.UpdateAffiliateProgramSettingsSchema = exports.ReportDetailQuerySchema = exports.ReportDateRangeQuerySchema = exports.RequestConsignmentReminderSchema = exports.CorrectConsignmentReportSchema = exports.RejectConsignmentReportSchema = exports.ApproveConsignmentReportSchema = exports.ConsignmentNonSaleReasonSchema = exports.TransferConsignmentStockSchema = exports.EnableAffiliateDistributionSchema = exports.SetCustomerAffiliateAssignmentSchema = exports.SetOrderAffiliateAttributionSchema = exports.UpdateAffiliateSlugSchema = exports.CreateAffiliateSlugSchema = exports.UpdateAffiliateSchema = exports.CreateAffiliateSchema = exports.ListAffiliatesQuerySchema = exports.RejectAffiliateApplicationSchema = exports.ApproveAffiliateApplicationSchema = exports.ListAffiliateApplicationsQuerySchema = exports.OwnOrderDiscountQuerySchema = exports.PaginationQuerySchema = exports.RotateAdminAffiliateCouponCodeSchema = exports.CreateAdminAffiliateCouponCodeSchema = exports.ListAdminAffiliateCouponCodesQuerySchema = exports.RotateStoreAffiliateCouponCodeSchema = exports.CreateStoreAffiliateCouponCodeSchema = exports.ListStoreAffiliateCouponCodesQuerySchema = exports.GetAffiliatePortalCommissionsResponseSchema = exports.StoreAffiliatePortalCommissionSchema = exports.GetAffiliatePortalDashboardResponseSchema = exports.PortalCurrencyTotalsSchema = exports.UpdatePartnerPortalSlugResponseSchema = exports.CreatePartnerPortalSlugResponseSchema = exports.ListPartnerPortalSlugsResponseSchema = exports.StoreAffiliatePortalContextResponseSchema = exports.StoreAffiliatePortalSlugSchema = exports.StoreAffiliatePortalAffiliateSchema = exports.StoreAffiliatePortalApplicationSchema = exports.ListConsignmentReportsResponseSchema = void 0;
|
|
5
|
+
exports.CorrectConsignmentReportResponseSchema = exports.RejectConsignmentReportResponseSchema = exports.ApproveConsignmentReportResponseSchema = exports.AdminConsignmentReportResponseSchema = exports.ListAdminConsignmentReportsResponseSchema = exports.AdminConsignmentReportSchema = exports.AdminConsignmentReportCorrectionSchema = exports.AdminConsignmentReportLineSchema = exports.RequestConsignmentReminderResponseSchema = exports.ConsignmentTransferResponseSchema = exports.ConsignmentTransferSchema = exports.AffiliateDistributionResponseSchema = exports.AffiliateDistributionSettingsSchema = exports.AffiliateDistributionReportsResponseSchema = exports.AffiliateDistributionReportItemSchema = exports.AffiliateDistributionCurrencyTotalSchema = exports.AffiliateProgramSettingsResponseSchema = exports.AffiliateProgramSettingsSchema = exports.AffiliateReportDetailResponseSchema = exports.AffiliateReportEntrySchema = exports.AffiliateReportTotalsSchema = exports.AffiliateReportOverviewResponseSchema = exports.AffiliateReportOverviewItemSchema = exports.OrderAffiliateAttributionResponseSchema = exports.AffiliateOrderAttributionSchema = exports.CustomerAffiliateAssignmentResponseSchema = exports.ReconcileAdminAffiliateCouponCodeResponseSchema = exports.RotateAdminAffiliateCouponCodeResponseSchema = exports.AdminAffiliateCouponCodeResponseSchema = exports.ListAdminAffiliateCouponCodesResponseSchema = exports.RotateStoreAffiliateCouponCodeResponseSchema = exports.StoreAffiliateCouponCodeResponseSchema = exports.ListStoreAffiliateCouponCodesResponseSchema = exports.AppliedAffiliateCouponSnapshotSchema = exports.AdminAffiliateCouponCodeSchema = exports.StoreAffiliateCouponCodeSchema = exports.ListAffiliateSlugsResponseSchema = exports.AffiliateSlugResponseSchema = exports.AffiliateResponseSchema = exports.ListAffiliatesResponseSchema = exports.ApproveAffiliateApplicationResponseSchema = exports.AffiliateApplicationResponseSchema = void 0;
|
|
6
6
|
const zod_1 = require("@medusajs/framework/zod");
|
|
7
7
|
const primitives_1 = require("../shared/primitives");
|
|
8
8
|
Object.defineProperty(exports, "WireDateSchema", { enumerable: true, get: function () { return primitives_1.WireDateSchema; } });
|
|
@@ -306,16 +306,30 @@ exports.GetOwnOrderDiscountResponseSchema = zod_1.z.object({
|
|
|
306
306
|
exports.ApplyOwnOrderPromotionResponseSchema = zod_1.z.object({
|
|
307
307
|
applied: zod_1.z.boolean(),
|
|
308
308
|
});
|
|
309
|
-
|
|
309
|
+
/**
|
|
310
|
+
* Display labels of a consignment line, resolved when the response is built.
|
|
311
|
+
* Every field is null when the product or batch can no longer be resolved;
|
|
312
|
+
* the ids stay the fallback.
|
|
313
|
+
*/
|
|
314
|
+
exports.ConsignmentLineLabelsSchema = zod_1.z.object({
|
|
315
|
+
product_title: zod_1.z.string().nullable(),
|
|
316
|
+
variant_title: zod_1.z.string().nullable(),
|
|
317
|
+
batch_name: zod_1.z.string().nullable(),
|
|
318
|
+
batch_expiry_date: exports.CalendarDateSchema.nullable(),
|
|
319
|
+
});
|
|
320
|
+
exports.StoreConsignmentInventoryLineSchema = zod_1.z
|
|
321
|
+
.object({
|
|
310
322
|
inventory_item_id: zod_1.z.string().trim().min(1),
|
|
311
323
|
batch_id: zod_1.z.string().trim().min(1).nullable(),
|
|
312
324
|
expected_quantity: zod_1.z.number(),
|
|
313
|
-
})
|
|
325
|
+
})
|
|
326
|
+
.extend(exports.ConsignmentLineLabelsSchema.shape);
|
|
314
327
|
exports.GetConsignmentInventoryResponseSchema = zod_1.z.object({
|
|
315
328
|
period_start: exports.CalendarMonthSchema,
|
|
316
329
|
inventory: zod_1.z.array(exports.StoreConsignmentInventoryLineSchema),
|
|
317
330
|
});
|
|
318
|
-
exports.StoreConsignmentReportLineSchema = zod_1.z
|
|
331
|
+
exports.StoreConsignmentReportLineSchema = zod_1.z
|
|
332
|
+
.object({
|
|
319
333
|
id: zod_1.z.string().trim().min(1),
|
|
320
334
|
inventory_item_id: zod_1.z.string().trim().min(1),
|
|
321
335
|
batch_id: zod_1.z.string().trim().min(1).nullable(),
|
|
@@ -328,7 +342,8 @@ exports.StoreConsignmentReportLineSchema = zod_1.z.object({
|
|
|
328
342
|
resolved_unit_price: zod_1.z.number().nullable(),
|
|
329
343
|
discounted_line_total: zod_1.z.number().nullable(),
|
|
330
344
|
currency_code: zod_1.z.string().nullable(),
|
|
331
|
-
})
|
|
345
|
+
})
|
|
346
|
+
.extend(exports.ConsignmentLineLabelsSchema.shape);
|
|
332
347
|
exports.StoreConsignmentReportSchema = zod_1.z.object({
|
|
333
348
|
id: zod_1.z.string().trim().min(1),
|
|
334
349
|
affiliate_id: zod_1.z.string().trim().min(1),
|
|
@@ -1115,6 +1130,8 @@ exports.AdminConsignmentReportSchema = zod_1.z.object({
|
|
|
1115
1130
|
order_id: zod_1.z.string().nullable(),
|
|
1116
1131
|
/** Customer-facing display id of `order_id`; null without an order. */
|
|
1117
1132
|
order_display_id: zod_1.z.number().int().nullable(),
|
|
1133
|
+
/** Display id of `draft_order_id`; null without a draft order. */
|
|
1134
|
+
draft_order_display_id: zod_1.z.number().int().nullable(),
|
|
1118
1135
|
fulfillment_id: zod_1.z.string().nullable(),
|
|
1119
1136
|
submitted_at: primitives_1.WireDateSchema.nullable(),
|
|
1120
1137
|
approved_at: primitives_1.WireDateSchema.nullable(),
|
|
@@ -1148,13 +1165,14 @@ const ConsignmentFulfillmentSchema = zod_1.z.object({
|
|
|
1148
1165
|
location_id: zod_1.z.string(),
|
|
1149
1166
|
items: zod_1.z.array(zod_1.z.object({ line_item_id: zod_1.z.string(), quantity: zod_1.z.number() })),
|
|
1150
1167
|
});
|
|
1168
|
+
/** Order, fulfillment and reservations are null/empty for a report approved without any sale. */
|
|
1151
1169
|
exports.ApproveConsignmentReportResponseSchema = zod_1.z.object({
|
|
1152
1170
|
report: exports.AdminConsignmentReportSchema,
|
|
1153
|
-
order_id: zod_1.z.string(),
|
|
1154
|
-
fulfillment_id: zod_1.z.string(),
|
|
1155
|
-
order: zod_1.z.object({ id: zod_1.z.string(), is_draft_order: zod_1.z.boolean() }),
|
|
1171
|
+
order_id: zod_1.z.string().nullable(),
|
|
1172
|
+
fulfillment_id: zod_1.z.string().nullable(),
|
|
1173
|
+
order: zod_1.z.object({ id: zod_1.z.string(), is_draft_order: zod_1.z.boolean() }).nullable(),
|
|
1156
1174
|
reservations: zod_1.z.array(ConsignmentReservationSchema),
|
|
1157
|
-
fulfillment: ConsignmentFulfillmentSchema,
|
|
1175
|
+
fulfillment: ConsignmentFulfillmentSchema.nullable(),
|
|
1158
1176
|
batch_inventory: zod_1.z
|
|
1159
1177
|
.array(zod_1.z.object({ id: zod_1.z.string(), quantity: zod_1.z.number() }))
|
|
1160
1178
|
.optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type { AffiliateCartReferralRecordStatus, AffiliateCouponLifecycleStatus, AffiliateCouponOrigin, AffiliateCouponWireStatus, AffiliateCustomerAssignmentMode, AffiliateReferralOverwritePolicy, AffiliateReferralResultStatus, AffiliateReferralSignalSource, AffiliateCouponLabel, AffiliateCouponLabelsResponse, ApplyAffiliateCouponRequest, ApplyAffiliateCouponResponse, ApplyOwnOrderPromotionRequest, ApplyOwnOrderPromotionResponse, CaptureAffiliateReferralRequest, CaptureAffiliateReferralResponse, CreateStoreAffiliateCouponCodeRequest, CreatePartnerPortalSlugRequest, CreatePartnerPortalSlugResponse, GetAffiliatePortalCommissionsResponse, GetAffiliatePortalDashboardResponse, GetAffiliateCartReferralResponse, GetConsignmentInventoryResponse, GetOwnOrderDiscountResponse, ListConsignmentReportsResponse, ListPartnerPortalSlugsResponse, ListStoreAffiliateCouponCodesQuery, ListStoreAffiliateCouponCodesRequest, ListStoreAffiliateCouponCodesResponse, PartnerPortalCommissionsQuery, PartnerPortalCommissionsRequest, PartnerPortalDateRangeQuery, PartnerPortalDateRangeRequest, PortalCurrencyTotals, ResolveAffiliateCouponLabelsPayload, ResolveAffiliateReferralRequest, ResolveAffiliateReferralResponse, RotateStoreAffiliateCouponCodeRequest, RotateStoreAffiliateCouponCodeResponse, StoreAffiliateApplication, StoreAffiliateCouponCode, StoreAffiliateCouponCodeResponse, StoreAffiliateReferral, StoreAffiliatePortalAffiliate, StoreAffiliatePortalApplication, StoreAffiliatePortalCommission, StoreAffiliatePortalContextResponse, StoreAffiliatePortalSlug, StoreConsignmentInventoryLine, StoreConsignmentReport, SubmitAffiliateApplicationRequest, SubmitAffiliateApplicationResponse, SubmitConsignmentReportRequest, SubmitConsignmentReportResponse, SubmitExistingConsignmentReportRequest, UpdatePartnerPortalSlugRequest, UpdatePartnerPortalSlugResponse, } from "./types";
|
|
1
|
+
export type { AffiliateCartReferralRecordStatus, AffiliateCouponLifecycleStatus, AffiliateCouponOrigin, AffiliateCouponWireStatus, AffiliateCustomerAssignmentMode, AffiliateReferralOverwritePolicy, AffiliateReferralResultStatus, AffiliateReferralSignalSource, AffiliateCouponLabel, AffiliateCouponLabelsResponse, ApplyAffiliateCouponRequest, ApplyAffiliateCouponResponse, ApplyOwnOrderPromotionRequest, ApplyOwnOrderPromotionResponse, CaptureAffiliateReferralRequest, CaptureAffiliateReferralResponse, CreateStoreAffiliateCouponCodeRequest, CreatePartnerPortalSlugRequest, CreatePartnerPortalSlugResponse, GetAffiliatePortalCommissionsResponse, GetAffiliatePortalDashboardResponse, GetAffiliateCartReferralResponse, GetConsignmentInventoryResponse, GetOwnOrderDiscountResponse, ListConsignmentReportsResponse, ListPartnerPortalSlugsResponse, ListStoreAffiliateCouponCodesQuery, ListStoreAffiliateCouponCodesRequest, ListStoreAffiliateCouponCodesResponse, PartnerPortalCommissionsQuery, PartnerPortalCommissionsRequest, PartnerPortalDateRangeQuery, PartnerPortalDateRangeRequest, PortalCurrencyTotals, ResolveAffiliateCouponLabelsPayload, ResolveAffiliateReferralRequest, ResolveAffiliateReferralResponse, RotateStoreAffiliateCouponCodeRequest, RotateStoreAffiliateCouponCodeResponse, StoreAffiliateApplication, StoreAffiliateCouponCode, StoreAffiliateCouponCodeResponse, StoreAffiliateReferral, StoreAffiliatePortalAffiliate, StoreAffiliatePortalApplication, StoreAffiliatePortalCommission, StoreAffiliatePortalContextResponse, StoreAffiliatePortalSlug, ConsignmentLineLabels, StoreConsignmentInventoryLine, StoreConsignmentReport, StoreConsignmentReportLine, SubmitAffiliateApplicationRequest, SubmitAffiliateApplicationResponse, SubmitConsignmentReportRequest, SubmitConsignmentReportResponse, SubmitExistingConsignmentReportRequest, UpdatePartnerPortalSlugRequest, UpdatePartnerPortalSlugResponse, } from "./types";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { z } from "@medusajs/framework/zod";
|
|
2
|
-
import type { AdminAffiliateCouponCodeResponseSchema, AdminAffiliateCouponCodeSchema, AdminConsignmentReportResponseSchema, AdminConsignmentReportSchema, AffiliateCartReferralRecordStatusSchema, AffiliateCouponLifecycleStatusSchema, AffiliateCouponOriginSchema, AffiliateCouponProvisioningStatusSchema, AffiliateCouponWireStatusSchema, AffiliateCustomerAssignmentModeSchema, AffiliateOrderAttributionSchema, AffiliateReferralOverwritePolicySchema, AffiliateReferralResultStatusSchema, AffiliateReferralSignalSourceSchema, AffiliateApplicationCompanyVerificationSchema, AffiliateCustomerSummarySchema, AffiliateApplicationResponseSchema, AffiliateDistributionReportsResponseSchema, AffiliateDistributionReportQuerySchema, AffiliateDistributionResponseSchema, AffiliateProgramSettingsResponseSchema, AffiliateReportDetailResponseSchema, AffiliateReportEntrySchema, AffiliateReportOverviewItemSchema, AffiliateReportOverviewResponseSchema, AffiliateReportTotalsSchema, AffiliateResponseSchema, AffiliateSchema, AffiliateSlugResponseSchema, ApplyOwnOrderPromotionResponseSchema, ApplyOwnOrderPromotionSchema, ApplyAffiliateCouponResponseSchema, ApplyAffiliateCouponSchema, AppliedAffiliateCouponSnapshotSchema, AffiliateCouponLabelSchema, AffiliateCouponLabelsResponseSchema, ResolveAffiliateCouponLabelsPayloadSchema, ApproveAffiliateApplicationResponseSchema, ApproveAffiliateApplicationSchema, ApproveConsignmentReportResponseSchema, ApproveConsignmentReportSchema, CaptureAffiliateReferralResponseSchema, CaptureAffiliateReferralSchema, ConsignmentTransferResponseSchema, CorrectConsignmentReportResponseSchema, CorrectConsignmentReportSchema, CreateAdminAffiliateCouponCodeSchema, CreateAffiliateSchema, CreateAffiliateSlugSchema, CreatePartnerPortalSlugResponseSchema, CreatePartnerPortalSlugSchema, CreateStoreAffiliateCouponCodeSchema, CustomerAffiliateAssignmentResponseSchema, CustomerAffiliateAssignmentSchema, EnableAffiliateDistributionSchema, GetAffiliatePortalCommissionsResponseSchema, GetAffiliatePortalDashboardResponseSchema, GetAffiliateCartReferralResponseSchema, GetConsignmentInventoryResponseSchema, GetOwnOrderDiscountResponseSchema, ListAdminConsignmentReportsResponseSchema, ListAdminAffiliateCouponCodesQuerySchema, ListAdminAffiliateCouponCodesResponseSchema, ListAffiliateApplicationsQuerySchema, ListAffiliateApplicationsResponseSchema, ListAffiliatesQuerySchema, ListAffiliatesResponseSchema, ListAffiliateSlugsResponseSchema, ListConsignmentReportsQuerySchema, ListConsignmentReportsResponseSchema, ListPartnerPortalSlugsResponseSchema, ListStoreAffiliateCouponCodesQuerySchema, ListStoreAffiliateCouponCodesResponseSchema, PartnerPortalCommissionsQuerySchema, PartnerPortalDateRangeQuerySchema, OrderAffiliateAttributionResponseSchema, PortalCurrencyTotalsSchema, PersistedAffiliateCustomerAssignmentModeSchema, RejectAffiliateApplicationSchema, RejectConsignmentReportResponseSchema, RejectConsignmentReportSchema, ReconcileAdminAffiliateCouponCodeResponseSchema, ReportDateRangeQuerySchema, ReportDetailQuerySchema, ResolveAffiliateReferralResponseSchema, ResolveReferralQuerySchema, RotateAdminAffiliateCouponCodeResponseSchema, RotateAdminAffiliateCouponCodeSchema, RotateStoreAffiliateCouponCodeResponseSchema, RotateStoreAffiliateCouponCodeSchema, RequestConsignmentReminderResponseSchema, RequestConsignmentReminderSchema, SetCustomerAffiliateAssignmentSchema, SetOrderAffiliateAttributionSchema, StoreAffiliateApplicationSchema, StoreAffiliateCouponCodeResponseSchema, StoreAffiliateCouponCodeSchema, StoreAffiliateReferralSchema, StoreAffiliatePortalAffiliateSchema, StoreAffiliatePortalApplicationSchema, StoreAffiliatePortalCommissionSchema, StoreAffiliatePortalContextResponseSchema, StoreAffiliatePortalSlugSchema, StoreConsignmentInventoryLineSchema, StoreConsignmentReportSchema, SubmitAffiliateApplicationResponseSchema, SubmitAffiliateApplicationSchema, SubmitConsignmentReportResponseSchema, SubmitConsignmentReportSchema, SubmitExistingConsignmentReportSchema, TransferConsignmentStockSchema, UpdateAffiliateProgramSettingsSchema, UpdateAffiliateSchema, UpdateAffiliateSlugSchema, UpdatePartnerPortalSlugResponseSchema, UpdatePartnerPortalSlugSchema } from "./schemas";
|
|
2
|
+
import type { AdminAffiliateCouponCodeResponseSchema, AdminAffiliateCouponCodeSchema, AdminConsignmentReportResponseSchema, AdminConsignmentReportSchema, AffiliateCartReferralRecordStatusSchema, AffiliateCouponLifecycleStatusSchema, AffiliateCouponOriginSchema, AffiliateCouponProvisioningStatusSchema, AffiliateCouponWireStatusSchema, AffiliateCustomerAssignmentModeSchema, AffiliateOrderAttributionSchema, AffiliateReferralOverwritePolicySchema, AffiliateReferralResultStatusSchema, AffiliateReferralSignalSourceSchema, AffiliateApplicationCompanyVerificationSchema, AffiliateCustomerSummarySchema, AffiliateApplicationResponseSchema, AffiliateDistributionReportsResponseSchema, AffiliateDistributionReportQuerySchema, AffiliateDistributionResponseSchema, AffiliateProgramSettingsResponseSchema, AffiliateReportDetailResponseSchema, AffiliateReportEntrySchema, AffiliateReportOverviewItemSchema, AffiliateReportOverviewResponseSchema, AffiliateReportTotalsSchema, AffiliateResponseSchema, AffiliateSchema, AffiliateSlugResponseSchema, ApplyOwnOrderPromotionResponseSchema, ApplyOwnOrderPromotionSchema, ApplyAffiliateCouponResponseSchema, ApplyAffiliateCouponSchema, AppliedAffiliateCouponSnapshotSchema, AffiliateCouponLabelSchema, AffiliateCouponLabelsResponseSchema, ResolveAffiliateCouponLabelsPayloadSchema, ApproveAffiliateApplicationResponseSchema, ApproveAffiliateApplicationSchema, ApproveConsignmentReportResponseSchema, ApproveConsignmentReportSchema, CaptureAffiliateReferralResponseSchema, CaptureAffiliateReferralSchema, ConsignmentTransferResponseSchema, CorrectConsignmentReportResponseSchema, CorrectConsignmentReportSchema, CreateAdminAffiliateCouponCodeSchema, CreateAffiliateSchema, CreateAffiliateSlugSchema, CreatePartnerPortalSlugResponseSchema, CreatePartnerPortalSlugSchema, CreateStoreAffiliateCouponCodeSchema, CustomerAffiliateAssignmentResponseSchema, CustomerAffiliateAssignmentSchema, EnableAffiliateDistributionSchema, GetAffiliatePortalCommissionsResponseSchema, GetAffiliatePortalDashboardResponseSchema, GetAffiliateCartReferralResponseSchema, GetConsignmentInventoryResponseSchema, GetOwnOrderDiscountResponseSchema, ListAdminConsignmentReportsResponseSchema, ListAdminAffiliateCouponCodesQuerySchema, ListAdminAffiliateCouponCodesResponseSchema, ListAffiliateApplicationsQuerySchema, ListAffiliateApplicationsResponseSchema, ListAffiliatesQuerySchema, ListAffiliatesResponseSchema, ListAffiliateSlugsResponseSchema, ListConsignmentReportsQuerySchema, ListConsignmentReportsResponseSchema, ListPartnerPortalSlugsResponseSchema, ListStoreAffiliateCouponCodesQuerySchema, ListStoreAffiliateCouponCodesResponseSchema, PartnerPortalCommissionsQuerySchema, PartnerPortalDateRangeQuerySchema, OrderAffiliateAttributionResponseSchema, PortalCurrencyTotalsSchema, PersistedAffiliateCustomerAssignmentModeSchema, RejectAffiliateApplicationSchema, RejectConsignmentReportResponseSchema, RejectConsignmentReportSchema, ReconcileAdminAffiliateCouponCodeResponseSchema, ReportDateRangeQuerySchema, ReportDetailQuerySchema, ResolveAffiliateReferralResponseSchema, ResolveReferralQuerySchema, RotateAdminAffiliateCouponCodeResponseSchema, RotateAdminAffiliateCouponCodeSchema, RotateStoreAffiliateCouponCodeResponseSchema, RotateStoreAffiliateCouponCodeSchema, RequestConsignmentReminderResponseSchema, RequestConsignmentReminderSchema, SetCustomerAffiliateAssignmentSchema, SetOrderAffiliateAttributionSchema, StoreAffiliateApplicationSchema, StoreAffiliateCouponCodeResponseSchema, StoreAffiliateCouponCodeSchema, StoreAffiliateReferralSchema, StoreAffiliatePortalAffiliateSchema, StoreAffiliatePortalApplicationSchema, StoreAffiliatePortalCommissionSchema, StoreAffiliatePortalContextResponseSchema, StoreAffiliatePortalSlugSchema, StoreConsignmentInventoryLineSchema, StoreConsignmentReportLineSchema, StoreConsignmentReportSchema, ConsignmentLineLabelsSchema, SubmitAffiliateApplicationResponseSchema, SubmitAffiliateApplicationSchema, SubmitConsignmentReportResponseSchema, SubmitConsignmentReportSchema, SubmitExistingConsignmentReportSchema, TransferConsignmentStockSchema, UpdateAffiliateProgramSettingsSchema, UpdateAffiliateSchema, UpdateAffiliateSlugSchema, UpdatePartnerPortalSlugResponseSchema, UpdatePartnerPortalSlugSchema } from "./schemas";
|
|
3
3
|
export type AffiliateCouponLifecycleStatus = z.infer<typeof AffiliateCouponLifecycleStatusSchema>;
|
|
4
4
|
export type AffiliateCouponProvisioningStatus = z.infer<typeof AffiliateCouponProvisioningStatusSchema>;
|
|
5
5
|
export type AffiliateCouponWireStatus = z.infer<typeof AffiliateCouponWireStatusSchema>;
|
|
@@ -48,6 +48,8 @@ export type ApplyOwnOrderPromotionRequest = z.input<typeof ApplyOwnOrderPromotio
|
|
|
48
48
|
export type ApplyOwnOrderPromotionResponse = z.infer<typeof ApplyOwnOrderPromotionResponseSchema>;
|
|
49
49
|
export type GetOwnOrderDiscountResponse = z.infer<typeof GetOwnOrderDiscountResponseSchema>;
|
|
50
50
|
export type StoreConsignmentInventoryLine = z.infer<typeof StoreConsignmentInventoryLineSchema>;
|
|
51
|
+
export type StoreConsignmentReportLine = z.infer<typeof StoreConsignmentReportLineSchema>;
|
|
52
|
+
export type ConsignmentLineLabels = z.infer<typeof ConsignmentLineLabelsSchema>;
|
|
51
53
|
export type GetConsignmentInventoryResponse = z.infer<typeof GetConsignmentInventoryResponseSchema>;
|
|
52
54
|
export type SubmitConsignmentReportRequest = z.input<typeof SubmitConsignmentReportSchema>;
|
|
53
55
|
export type SubmitExistingConsignmentReportRequest = z.input<typeof SubmitExistingConsignmentReportSchema>;
|
|
@@ -300,16 +300,30 @@ export const GetOwnOrderDiscountResponseSchema = z.object({
|
|
|
300
300
|
export const ApplyOwnOrderPromotionResponseSchema = z.object({
|
|
301
301
|
applied: z.boolean(),
|
|
302
302
|
});
|
|
303
|
-
|
|
303
|
+
/**
|
|
304
|
+
* Display labels of a consignment line, resolved when the response is built.
|
|
305
|
+
* Every field is null when the product or batch can no longer be resolved;
|
|
306
|
+
* the ids stay the fallback.
|
|
307
|
+
*/
|
|
308
|
+
export const ConsignmentLineLabelsSchema = z.object({
|
|
309
|
+
product_title: z.string().nullable(),
|
|
310
|
+
variant_title: z.string().nullable(),
|
|
311
|
+
batch_name: z.string().nullable(),
|
|
312
|
+
batch_expiry_date: CalendarDateSchema.nullable(),
|
|
313
|
+
});
|
|
314
|
+
export const StoreConsignmentInventoryLineSchema = z
|
|
315
|
+
.object({
|
|
304
316
|
inventory_item_id: z.string().trim().min(1),
|
|
305
317
|
batch_id: z.string().trim().min(1).nullable(),
|
|
306
318
|
expected_quantity: z.number(),
|
|
307
|
-
})
|
|
319
|
+
})
|
|
320
|
+
.extend(ConsignmentLineLabelsSchema.shape);
|
|
308
321
|
export const GetConsignmentInventoryResponseSchema = z.object({
|
|
309
322
|
period_start: CalendarMonthSchema,
|
|
310
323
|
inventory: z.array(StoreConsignmentInventoryLineSchema),
|
|
311
324
|
});
|
|
312
|
-
export const StoreConsignmentReportLineSchema = z
|
|
325
|
+
export const StoreConsignmentReportLineSchema = z
|
|
326
|
+
.object({
|
|
313
327
|
id: z.string().trim().min(1),
|
|
314
328
|
inventory_item_id: z.string().trim().min(1),
|
|
315
329
|
batch_id: z.string().trim().min(1).nullable(),
|
|
@@ -322,7 +336,8 @@ export const StoreConsignmentReportLineSchema = z.object({
|
|
|
322
336
|
resolved_unit_price: z.number().nullable(),
|
|
323
337
|
discounted_line_total: z.number().nullable(),
|
|
324
338
|
currency_code: z.string().nullable(),
|
|
325
|
-
})
|
|
339
|
+
})
|
|
340
|
+
.extend(ConsignmentLineLabelsSchema.shape);
|
|
326
341
|
export const StoreConsignmentReportSchema = z.object({
|
|
327
342
|
id: z.string().trim().min(1),
|
|
328
343
|
affiliate_id: z.string().trim().min(1),
|
|
@@ -1109,6 +1124,8 @@ export const AdminConsignmentReportSchema = z.object({
|
|
|
1109
1124
|
order_id: z.string().nullable(),
|
|
1110
1125
|
/** Customer-facing display id of `order_id`; null without an order. */
|
|
1111
1126
|
order_display_id: z.number().int().nullable(),
|
|
1127
|
+
/** Display id of `draft_order_id`; null without a draft order. */
|
|
1128
|
+
draft_order_display_id: z.number().int().nullable(),
|
|
1112
1129
|
fulfillment_id: z.string().nullable(),
|
|
1113
1130
|
submitted_at: WireDateSchema.nullable(),
|
|
1114
1131
|
approved_at: WireDateSchema.nullable(),
|
|
@@ -1142,13 +1159,14 @@ const ConsignmentFulfillmentSchema = z.object({
|
|
|
1142
1159
|
location_id: z.string(),
|
|
1143
1160
|
items: z.array(z.object({ line_item_id: z.string(), quantity: z.number() })),
|
|
1144
1161
|
});
|
|
1162
|
+
/** Order, fulfillment and reservations are null/empty for a report approved without any sale. */
|
|
1145
1163
|
export const ApproveConsignmentReportResponseSchema = z.object({
|
|
1146
1164
|
report: AdminConsignmentReportSchema,
|
|
1147
|
-
order_id: z.string(),
|
|
1148
|
-
fulfillment_id: z.string(),
|
|
1149
|
-
order: z.object({ id: z.string(), is_draft_order: z.boolean() }),
|
|
1165
|
+
order_id: z.string().nullable(),
|
|
1166
|
+
fulfillment_id: z.string().nullable(),
|
|
1167
|
+
order: z.object({ id: z.string(), is_draft_order: z.boolean() }).nullable(),
|
|
1150
1168
|
reservations: z.array(ConsignmentReservationSchema),
|
|
1151
|
-
fulfillment: ConsignmentFulfillmentSchema,
|
|
1169
|
+
fulfillment: ConsignmentFulfillmentSchema.nullable(),
|
|
1152
1170
|
batch_inventory: z
|
|
1153
1171
|
.array(z.object({ id: z.string(), quantity: z.number() }))
|
|
1154
1172
|
.optional(),
|