@hartl-services/medusa-contracts 1.4.0 → 1.5.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.
- package/dist/affiliate/schemas.d.ts +70 -16
- package/dist/affiliate/schemas.js +24 -13
- package/dist/esm/affiliate/schemas.mjs +22 -11
- package/package.json +1 -1
|
@@ -119,6 +119,22 @@ export declare const AffiliateCouponLabelsResponseSchema: z.ZodObject<{
|
|
|
119
119
|
discount_percentage: z.ZodNumber;
|
|
120
120
|
}, z.core.$strip>>;
|
|
121
121
|
}, z.core.$strip>;
|
|
122
|
+
export declare const ConsignmentNonSaleReasonSchema: z.ZodEnum<{
|
|
123
|
+
expired: "expired";
|
|
124
|
+
damaged: "damaged";
|
|
125
|
+
returned: "returned";
|
|
126
|
+
correction: "correction";
|
|
127
|
+
}>;
|
|
128
|
+
/** A part of a line's not-sold shortage with its reason. */
|
|
129
|
+
export declare const ConsignmentNonSaleQuantitySchema: z.ZodObject<{
|
|
130
|
+
reason: z.ZodEnum<{
|
|
131
|
+
expired: "expired";
|
|
132
|
+
damaged: "damaged";
|
|
133
|
+
returned: "returned";
|
|
134
|
+
correction: "correction";
|
|
135
|
+
}>;
|
|
136
|
+
quantity: z.ZodNumber;
|
|
137
|
+
}, z.core.$strip>;
|
|
122
138
|
export declare const SubmitConsignmentReportSchema: z.ZodObject<{
|
|
123
139
|
period_start: z.ZodString;
|
|
124
140
|
submission_idempotency_key: z.ZodString;
|
|
@@ -126,6 +142,15 @@ export declare const SubmitConsignmentReportSchema: z.ZodObject<{
|
|
|
126
142
|
inventory_item_id: z.ZodString;
|
|
127
143
|
batch_id: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
128
144
|
counted_quantity: z.ZodNumber;
|
|
145
|
+
non_sale_quantities: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
146
|
+
reason: z.ZodEnum<{
|
|
147
|
+
expired: "expired";
|
|
148
|
+
damaged: "damaged";
|
|
149
|
+
returned: "returned";
|
|
150
|
+
correction: "correction";
|
|
151
|
+
}>;
|
|
152
|
+
quantity: z.ZodNumber;
|
|
153
|
+
}, z.core.$strip>>>;
|
|
129
154
|
}, z.core.$strip>>;
|
|
130
155
|
}, z.core.$strip>;
|
|
131
156
|
export declare const SubmitExistingConsignmentReportSchema: z.ZodObject<{
|
|
@@ -134,6 +159,15 @@ export declare const SubmitExistingConsignmentReportSchema: z.ZodObject<{
|
|
|
134
159
|
inventory_item_id: z.ZodString;
|
|
135
160
|
batch_id: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
136
161
|
counted_quantity: z.ZodNumber;
|
|
162
|
+
non_sale_quantities: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
163
|
+
reason: z.ZodEnum<{
|
|
164
|
+
expired: "expired";
|
|
165
|
+
damaged: "damaged";
|
|
166
|
+
returned: "returned";
|
|
167
|
+
correction: "correction";
|
|
168
|
+
}>;
|
|
169
|
+
quantity: z.ZodNumber;
|
|
170
|
+
}, z.core.$strip>>>;
|
|
137
171
|
}, z.core.$strip>>;
|
|
138
172
|
}, z.core.$strip>;
|
|
139
173
|
type ResolvedPartnerPortalDateRange = {
|
|
@@ -412,6 +446,15 @@ export declare const StoreConsignmentReportLineSchema: z.ZodObject<{
|
|
|
412
446
|
confirmed_sale_quantity: z.ZodNumber;
|
|
413
447
|
requires_admin_clarification: z.ZodBoolean;
|
|
414
448
|
non_sale_reason: z.ZodNullable<z.ZodString>;
|
|
449
|
+
non_sale_quantities: z.ZodArray<z.ZodObject<{
|
|
450
|
+
reason: z.ZodEnum<{
|
|
451
|
+
expired: "expired";
|
|
452
|
+
damaged: "damaged";
|
|
453
|
+
returned: "returned";
|
|
454
|
+
correction: "correction";
|
|
455
|
+
}>;
|
|
456
|
+
quantity: z.ZodNumber;
|
|
457
|
+
}, z.core.$strip>>;
|
|
415
458
|
resolved_unit_price: z.ZodNullable<z.ZodNumber>;
|
|
416
459
|
discounted_line_total: z.ZodNullable<z.ZodNumber>;
|
|
417
460
|
currency_code: z.ZodNullable<z.ZodString>;
|
|
@@ -444,6 +487,15 @@ export declare const StoreConsignmentReportSchema: z.ZodObject<{
|
|
|
444
487
|
confirmed_sale_quantity: z.ZodNumber;
|
|
445
488
|
requires_admin_clarification: z.ZodBoolean;
|
|
446
489
|
non_sale_reason: z.ZodNullable<z.ZodString>;
|
|
490
|
+
non_sale_quantities: z.ZodArray<z.ZodObject<{
|
|
491
|
+
reason: z.ZodEnum<{
|
|
492
|
+
expired: "expired";
|
|
493
|
+
damaged: "damaged";
|
|
494
|
+
returned: "returned";
|
|
495
|
+
correction: "correction";
|
|
496
|
+
}>;
|
|
497
|
+
quantity: z.ZodNumber;
|
|
498
|
+
}, z.core.$strip>>;
|
|
447
499
|
resolved_unit_price: z.ZodNullable<z.ZodNumber>;
|
|
448
500
|
discounted_line_total: z.ZodNullable<z.ZodNumber>;
|
|
449
501
|
currency_code: z.ZodNullable<z.ZodString>;
|
|
@@ -478,6 +530,15 @@ export declare const SubmitConsignmentReportResponseSchema: z.ZodObject<{
|
|
|
478
530
|
confirmed_sale_quantity: z.ZodNumber;
|
|
479
531
|
requires_admin_clarification: z.ZodBoolean;
|
|
480
532
|
non_sale_reason: z.ZodNullable<z.ZodString>;
|
|
533
|
+
non_sale_quantities: z.ZodArray<z.ZodObject<{
|
|
534
|
+
reason: z.ZodEnum<{
|
|
535
|
+
expired: "expired";
|
|
536
|
+
damaged: "damaged";
|
|
537
|
+
returned: "returned";
|
|
538
|
+
correction: "correction";
|
|
539
|
+
}>;
|
|
540
|
+
quantity: z.ZodNumber;
|
|
541
|
+
}, z.core.$strip>>;
|
|
481
542
|
resolved_unit_price: z.ZodNullable<z.ZodNumber>;
|
|
482
543
|
discounted_line_total: z.ZodNullable<z.ZodNumber>;
|
|
483
544
|
currency_code: z.ZodNullable<z.ZodString>;
|
|
@@ -516,6 +577,15 @@ export declare const ListConsignmentReportsResponseSchema: z.ZodObject<{
|
|
|
516
577
|
confirmed_sale_quantity: z.ZodNumber;
|
|
517
578
|
requires_admin_clarification: z.ZodBoolean;
|
|
518
579
|
non_sale_reason: z.ZodNullable<z.ZodString>;
|
|
580
|
+
non_sale_quantities: z.ZodArray<z.ZodObject<{
|
|
581
|
+
reason: z.ZodEnum<{
|
|
582
|
+
expired: "expired";
|
|
583
|
+
damaged: "damaged";
|
|
584
|
+
returned: "returned";
|
|
585
|
+
correction: "correction";
|
|
586
|
+
}>;
|
|
587
|
+
quantity: z.ZodNumber;
|
|
588
|
+
}, z.core.$strip>>;
|
|
519
589
|
resolved_unit_price: z.ZodNullable<z.ZodNumber>;
|
|
520
590
|
discounted_line_total: z.ZodNullable<z.ZodNumber>;
|
|
521
591
|
currency_code: z.ZodNullable<z.ZodString>;
|
|
@@ -857,22 +927,6 @@ export declare const TransferConsignmentStockSchema: z.ZodObject<{
|
|
|
857
927
|
quantity: z.ZodNumber;
|
|
858
928
|
}, z.core.$strip>>;
|
|
859
929
|
}, z.core.$strip>;
|
|
860
|
-
export declare const ConsignmentNonSaleReasonSchema: z.ZodEnum<{
|
|
861
|
-
expired: "expired";
|
|
862
|
-
damaged: "damaged";
|
|
863
|
-
returned: "returned";
|
|
864
|
-
correction: "correction";
|
|
865
|
-
}>;
|
|
866
|
-
/** A part of a line's not-sold shortage with its reason. */
|
|
867
|
-
export declare const ConsignmentNonSaleQuantitySchema: z.ZodObject<{
|
|
868
|
-
reason: z.ZodEnum<{
|
|
869
|
-
expired: "expired";
|
|
870
|
-
damaged: "damaged";
|
|
871
|
-
returned: "returned";
|
|
872
|
-
correction: "correction";
|
|
873
|
-
}>;
|
|
874
|
-
quantity: z.ZodNumber;
|
|
875
|
-
}, z.core.$strip>;
|
|
876
930
|
export declare const ApproveConsignmentReportSchema: z.ZodObject<{
|
|
877
931
|
expected_version: z.ZodOptional<z.ZodNumber>;
|
|
878
932
|
confirmed_lines: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
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.
|
|
3
|
+
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.ConsignmentNonSaleQuantitySchema = exports.ConsignmentNonSaleReasonSchema = 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.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.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 = exports.SubmitConsignmentReportResponseSchema = exports.StoreConsignmentReportSchema = void 0;
|
|
5
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 = exports.ListAffiliateApplicationsResponseSchema = void 0;
|
|
6
6
|
const zod_1 = require("@medusajs/framework/zod");
|
|
7
7
|
const primitives_1 = require("../shared/primitives");
|
|
@@ -158,10 +158,30 @@ exports.AffiliateCouponLabelSchema = zod_1.z.object({
|
|
|
158
158
|
exports.AffiliateCouponLabelsResponseSchema = zod_1.z.object({
|
|
159
159
|
labels: zod_1.z.array(exports.AffiliateCouponLabelSchema),
|
|
160
160
|
});
|
|
161
|
+
exports.ConsignmentNonSaleReasonSchema = zod_1.z.enum([
|
|
162
|
+
"damaged",
|
|
163
|
+
"expired",
|
|
164
|
+
"returned",
|
|
165
|
+
"correction",
|
|
166
|
+
]);
|
|
167
|
+
/** A part of a line's not-sold shortage with its reason. */
|
|
168
|
+
exports.ConsignmentNonSaleQuantitySchema = zod_1.z.object({
|
|
169
|
+
reason: exports.ConsignmentNonSaleReasonSchema,
|
|
170
|
+
quantity: zod_1.z.number().int().positive(),
|
|
171
|
+
});
|
|
161
172
|
const ConsignmentCountSchema = zod_1.z.object({
|
|
162
173
|
inventory_item_id: zod_1.z.string().trim().min(1),
|
|
163
174
|
batch_id: zod_1.z.string().trim().min(1).nullable().optional().default(null),
|
|
164
175
|
counted_quantity: zod_1.z.number().int().min(0),
|
|
176
|
+
/**
|
|
177
|
+
* The affiliate's split of the line's shortage (expected minus counted):
|
|
178
|
+
* the not-sold part by reason; the rest counts as sold. Empty or missing
|
|
179
|
+
* means the whole shortage was sold. Only allowed with a shortage.
|
|
180
|
+
*/
|
|
181
|
+
non_sale_quantities: zod_1.z
|
|
182
|
+
.array(exports.ConsignmentNonSaleQuantitySchema)
|
|
183
|
+
.max(20)
|
|
184
|
+
.optional(),
|
|
165
185
|
});
|
|
166
186
|
exports.SubmitConsignmentReportSchema = zod_1.z.object({
|
|
167
187
|
period_start: exports.CalendarMonthSchema,
|
|
@@ -339,6 +359,8 @@ exports.StoreConsignmentReportLineSchema = zod_1.z
|
|
|
339
359
|
confirmed_sale_quantity: zod_1.z.number(),
|
|
340
360
|
requires_admin_clarification: zod_1.z.boolean(),
|
|
341
361
|
non_sale_reason: zod_1.z.string().nullable(),
|
|
362
|
+
/** Not-sold shortage by reason; empty when everything missing was sold. */
|
|
363
|
+
non_sale_quantities: zod_1.z.array(exports.ConsignmentNonSaleQuantitySchema),
|
|
342
364
|
resolved_unit_price: zod_1.z.number().nullable(),
|
|
343
365
|
discounted_line_total: zod_1.z.number().nullable(),
|
|
344
366
|
currency_code: zod_1.z.string().nullable(),
|
|
@@ -627,17 +649,6 @@ exports.TransferConsignmentStockSchema = zod_1.z.object({
|
|
|
627
649
|
.min(1)
|
|
628
650
|
.max(100),
|
|
629
651
|
});
|
|
630
|
-
exports.ConsignmentNonSaleReasonSchema = zod_1.z.enum([
|
|
631
|
-
"damaged",
|
|
632
|
-
"expired",
|
|
633
|
-
"returned",
|
|
634
|
-
"correction",
|
|
635
|
-
]);
|
|
636
|
-
/** A part of a line's not-sold shortage with its reason. */
|
|
637
|
-
exports.ConsignmentNonSaleQuantitySchema = zod_1.z.object({
|
|
638
|
-
reason: exports.ConsignmentNonSaleReasonSchema,
|
|
639
|
-
quantity: zod_1.z.number().int().positive(),
|
|
640
|
-
});
|
|
641
652
|
exports.ApproveConsignmentReportSchema = zod_1.z.object({
|
|
642
653
|
expected_version: zod_1.z.number().int().positive().optional(),
|
|
643
654
|
confirmed_lines: zod_1.z
|
|
@@ -153,10 +153,30 @@ export const AffiliateCouponLabelSchema = z.object({
|
|
|
153
153
|
export const AffiliateCouponLabelsResponseSchema = z.object({
|
|
154
154
|
labels: z.array(AffiliateCouponLabelSchema),
|
|
155
155
|
});
|
|
156
|
+
export const ConsignmentNonSaleReasonSchema = z.enum([
|
|
157
|
+
"damaged",
|
|
158
|
+
"expired",
|
|
159
|
+
"returned",
|
|
160
|
+
"correction",
|
|
161
|
+
]);
|
|
162
|
+
/** A part of a line's not-sold shortage with its reason. */
|
|
163
|
+
export const ConsignmentNonSaleQuantitySchema = z.object({
|
|
164
|
+
reason: ConsignmentNonSaleReasonSchema,
|
|
165
|
+
quantity: z.number().int().positive(),
|
|
166
|
+
});
|
|
156
167
|
const ConsignmentCountSchema = z.object({
|
|
157
168
|
inventory_item_id: z.string().trim().min(1),
|
|
158
169
|
batch_id: z.string().trim().min(1).nullable().optional().default(null),
|
|
159
170
|
counted_quantity: z.number().int().min(0),
|
|
171
|
+
/**
|
|
172
|
+
* The affiliate's split of the line's shortage (expected minus counted):
|
|
173
|
+
* the not-sold part by reason; the rest counts as sold. Empty or missing
|
|
174
|
+
* means the whole shortage was sold. Only allowed with a shortage.
|
|
175
|
+
*/
|
|
176
|
+
non_sale_quantities: z
|
|
177
|
+
.array(ConsignmentNonSaleQuantitySchema)
|
|
178
|
+
.max(20)
|
|
179
|
+
.optional(),
|
|
160
180
|
});
|
|
161
181
|
export const SubmitConsignmentReportSchema = z.object({
|
|
162
182
|
period_start: CalendarMonthSchema,
|
|
@@ -333,6 +353,8 @@ export const StoreConsignmentReportLineSchema = z
|
|
|
333
353
|
confirmed_sale_quantity: z.number(),
|
|
334
354
|
requires_admin_clarification: z.boolean(),
|
|
335
355
|
non_sale_reason: z.string().nullable(),
|
|
356
|
+
/** Not-sold shortage by reason; empty when everything missing was sold. */
|
|
357
|
+
non_sale_quantities: z.array(ConsignmentNonSaleQuantitySchema),
|
|
336
358
|
resolved_unit_price: z.number().nullable(),
|
|
337
359
|
discounted_line_total: z.number().nullable(),
|
|
338
360
|
currency_code: z.string().nullable(),
|
|
@@ -621,17 +643,6 @@ export const TransferConsignmentStockSchema = z.object({
|
|
|
621
643
|
.min(1)
|
|
622
644
|
.max(100),
|
|
623
645
|
});
|
|
624
|
-
export const ConsignmentNonSaleReasonSchema = z.enum([
|
|
625
|
-
"damaged",
|
|
626
|
-
"expired",
|
|
627
|
-
"returned",
|
|
628
|
-
"correction",
|
|
629
|
-
]);
|
|
630
|
-
/** A part of a line's not-sold shortage with its reason. */
|
|
631
|
-
export const ConsignmentNonSaleQuantitySchema = z.object({
|
|
632
|
-
reason: ConsignmentNonSaleReasonSchema,
|
|
633
|
-
quantity: z.number().int().positive(),
|
|
634
|
-
});
|
|
635
646
|
export const ApproveConsignmentReportSchema = z.object({
|
|
636
647
|
expected_version: z.number().int().positive().optional(),
|
|
637
648
|
confirmed_lines: z
|