aivilife-contracts 4.3.0 → 4.4.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/README.md +18 -0
- package/dist/catalog/index.d.mts +565 -2
- package/dist/catalog/index.d.ts +565 -2
- package/dist/catalog/index.js +17 -8
- package/dist/catalog/index.js.map +1 -1
- package/dist/catalog/index.mjs +17 -8
- package/dist/catalog/index.mjs.map +1 -1
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +394 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +360 -9
- package/dist/index.mjs.map +1 -1
- package/dist/pagination.types-BRhyN9z6.d.mts +27 -0
- package/dist/pagination.types-BRhyN9z6.d.ts +27 -0
- package/dist/warehouse/index.d.mts +635 -0
- package/dist/warehouse/index.d.ts +635 -0
- package/dist/warehouse/index.js +405 -0
- package/dist/warehouse/index.js.map +1 -0
- package/dist/warehouse/index.mjs +369 -0
- package/dist/warehouse/index.mjs.map +1 -0
- package/package.json +6 -1
- package/dist/index-_kOAmyGe.d.mts +0 -585
- package/dist/index-_kOAmyGe.d.ts +0 -585
package/dist/index.mjs
CHANGED
|
@@ -509,7 +509,7 @@ var ProductTranslationInputSchema = z.object({
|
|
|
509
509
|
usageInstructions: z.string().trim().max(2e4).nullable().optional(),
|
|
510
510
|
features: z.string().trim().max(2e4).nullable().optional(),
|
|
511
511
|
contraindications: z.string().trim().max(2e4).nullable().optional(),
|
|
512
|
-
shelfLife: z.string().trim().
|
|
512
|
+
shelfLife: z.string().trim().min(1).max(255),
|
|
513
513
|
packageContents: z.string().trim().max(2e3).nullable().optional()
|
|
514
514
|
});
|
|
515
515
|
var UniqueLocalesSchema = (schema) => z.array(schema).min(1).max(4).refine(
|
|
@@ -528,7 +528,7 @@ var UpdateProductCategoryRequestSchema = z.object({
|
|
|
528
528
|
translations: UniqueLocalesSchema(ProductCategoryTranslationInputSchema),
|
|
529
529
|
version: z.number().int().positive()
|
|
530
530
|
}).partial().required({ version: true });
|
|
531
|
-
var
|
|
531
|
+
var ProductVariantFieldsSchema = z.object({
|
|
532
532
|
sku: CodeSchema,
|
|
533
533
|
barcode: z.string().trim().min(1).max(64).nullable().optional(),
|
|
534
534
|
quantity: PositiveDecimalSchema,
|
|
@@ -540,9 +540,14 @@ var ProductVariantInputSchema = z.object({
|
|
|
540
540
|
lengthMm: PositiveDecimalSchema.nullable().optional(),
|
|
541
541
|
widthMm: PositiveDecimalSchema.nullable().optional(),
|
|
542
542
|
heightMm: PositiveDecimalSchema.nullable().optional(),
|
|
543
|
-
isDefault: z.boolean()
|
|
544
|
-
isActive: z.boolean()
|
|
545
|
-
sortOrder: z.number().int().min(0).max(1e6)
|
|
543
|
+
isDefault: z.boolean(),
|
|
544
|
+
isActive: z.boolean(),
|
|
545
|
+
sortOrder: z.number().int().min(0).max(1e6)
|
|
546
|
+
});
|
|
547
|
+
var ProductVariantInputSchema = ProductVariantFieldsSchema.extend({
|
|
548
|
+
isDefault: ProductVariantFieldsSchema.shape.isDefault.default(false),
|
|
549
|
+
isActive: ProductVariantFieldsSchema.shape.isActive.default(true),
|
|
550
|
+
sortOrder: ProductVariantFieldsSchema.shape.sortOrder.default(0)
|
|
546
551
|
});
|
|
547
552
|
var CreateProductRequestSchema = z.object({
|
|
548
553
|
code: CodeSchema,
|
|
@@ -585,7 +590,7 @@ var UpdateProductRequestSchema = z.object({
|
|
|
585
590
|
}
|
|
586
591
|
);
|
|
587
592
|
var CreateProductVariantRequestSchema = ProductVariantInputSchema;
|
|
588
|
-
var UpdateProductVariantRequestSchema =
|
|
593
|
+
var UpdateProductVariantRequestSchema = ProductVariantFieldsSchema.partial().extend({
|
|
589
594
|
version: z.number().int().positive()
|
|
590
595
|
});
|
|
591
596
|
var ProductPublicIdParamSchema = z.object({
|
|
@@ -600,10 +605,14 @@ var ProductMediaPublicIdParamSchema = z.object({
|
|
|
600
605
|
publicId: PublicIdSchema,
|
|
601
606
|
mediaPublicId: PublicIdSchema
|
|
602
607
|
});
|
|
608
|
+
var QueryBooleanSchema = z.union([
|
|
609
|
+
z.boolean(),
|
|
610
|
+
z.enum(["true", "false"]).transform((value) => value === "true")
|
|
611
|
+
]);
|
|
603
612
|
var ProductListQuerySchema = BaseListQuerySchema.extend({
|
|
604
613
|
status: z.enum(ProductStatus).optional(),
|
|
605
614
|
category: SlugSchema.optional(),
|
|
606
|
-
featured:
|
|
615
|
+
featured: QueryBooleanSchema.optional()
|
|
607
616
|
});
|
|
608
617
|
var CreateExternalProductVideoRequestSchema = z.object({
|
|
609
618
|
url: z.url().max(2e3).refine((value) => {
|
|
@@ -695,11 +704,353 @@ var LocalizedProductSchema = ProductSchema.omit({
|
|
|
695
704
|
usageInstructions: z.string().nullable(),
|
|
696
705
|
features: z.string().nullable(),
|
|
697
706
|
contraindications: z.string().nullable(),
|
|
698
|
-
shelfLife: z.string()
|
|
707
|
+
shelfLife: z.string(),
|
|
699
708
|
packageContents: z.string().nullable(),
|
|
700
709
|
categories: z.array(LocalizedProductCategorySchema)
|
|
701
710
|
});
|
|
702
711
|
|
|
703
|
-
|
|
712
|
+
// src/warehouse/warehouse.enums.ts
|
|
713
|
+
var WarehouseStatus = {
|
|
714
|
+
DRAFT: "DRAFT",
|
|
715
|
+
ACTIVE: "ACTIVE",
|
|
716
|
+
SUSPENDED: "SUSPENDED",
|
|
717
|
+
ARCHIVED: "ARCHIVED"
|
|
718
|
+
};
|
|
719
|
+
var WarehouseAssignmentType = {
|
|
720
|
+
STAFF: "STAFF",
|
|
721
|
+
CUSTOMER_DEFAULT: "CUSTOMER_DEFAULT"
|
|
722
|
+
};
|
|
723
|
+
var WarehouseRequestType = {
|
|
724
|
+
REPLENISHMENT: "REPLENISHMENT",
|
|
725
|
+
WRITE_OFF: "WRITE_OFF",
|
|
726
|
+
TRANSFER: "TRANSFER"
|
|
727
|
+
};
|
|
728
|
+
var WarehouseRequestStatus = {
|
|
729
|
+
DRAFT: "DRAFT",
|
|
730
|
+
PENDING_REVIEW: "PENDING_REVIEW",
|
|
731
|
+
APPROVED: "APPROVED",
|
|
732
|
+
READY_TO_SHIP: "READY_TO_SHIP",
|
|
733
|
+
IN_TRANSIT: "IN_TRANSIT",
|
|
734
|
+
COMPLETED: "COMPLETED",
|
|
735
|
+
REJECTED: "REJECTED",
|
|
736
|
+
CANCELLED: "CANCELLED",
|
|
737
|
+
DISCREPANCY_REPORTED: "DISCREPANCY_REPORTED",
|
|
738
|
+
FAILED: "FAILED"
|
|
739
|
+
};
|
|
740
|
+
var WarehouseMovementType = {
|
|
741
|
+
REPLENISHMENT: "REPLENISHMENT",
|
|
742
|
+
WRITE_OFF: "WRITE_OFF",
|
|
743
|
+
TRANSFER_OUT: "TRANSFER_OUT",
|
|
744
|
+
TRANSFER_IN: "TRANSFER_IN",
|
|
745
|
+
ORDER_ISSUE: "ORDER_ISSUE"
|
|
746
|
+
};
|
|
747
|
+
var WarehouseWriteOffReason = {
|
|
748
|
+
DEFECT: "DEFECT",
|
|
749
|
+
DAMAGED: "DAMAGED",
|
|
750
|
+
EXPIRED: "EXPIRED",
|
|
751
|
+
LOST: "LOST",
|
|
752
|
+
INVENTORY_SHORTAGE: "INVENTORY_SHORTAGE",
|
|
753
|
+
OTHER: "OTHER"
|
|
754
|
+
};
|
|
755
|
+
var WarehouseWeekday = {
|
|
756
|
+
MONDAY: "MONDAY",
|
|
757
|
+
TUESDAY: "TUESDAY",
|
|
758
|
+
WEDNESDAY: "WEDNESDAY",
|
|
759
|
+
THURSDAY: "THURSDAY",
|
|
760
|
+
FRIDAY: "FRIDAY",
|
|
761
|
+
SATURDAY: "SATURDAY",
|
|
762
|
+
SUNDAY: "SUNDAY"
|
|
763
|
+
};
|
|
764
|
+
var PublicIdSchema2 = z.uuid();
|
|
765
|
+
var CodeSchema2 = z.string().trim().toUpperCase().regex(/^[A-Z0-9][A-Z0-9_-]{1,63}$/);
|
|
766
|
+
var DateSchema = z.iso.date();
|
|
767
|
+
var DateTimeSchema = z.iso.datetime();
|
|
768
|
+
var TimeSchema = z.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/);
|
|
769
|
+
var NullableTrimmedSchema = (max) => z.string().trim().min(1).max(max).nullable().optional();
|
|
770
|
+
var WarehouseDayScheduleSchema = z.object({
|
|
771
|
+
isOpen: z.boolean(),
|
|
772
|
+
opensAt: TimeSchema.nullable(),
|
|
773
|
+
closesAt: TimeSchema.nullable()
|
|
774
|
+
}).superRefine((value, context) => {
|
|
775
|
+
if (value.isOpen && (!value.opensAt || !value.closesAt)) {
|
|
776
|
+
context.addIssue({
|
|
777
|
+
code: "custom",
|
|
778
|
+
message: "\u0414\u043B\u044F \u0440\u0430\u0431\u043E\u0447\u0435\u0433\u043E \u0434\u043D\u044F \u0443\u043A\u0430\u0436\u0438\u0442\u0435 \u0432\u0440\u0435\u043C\u044F \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u044F \u0438 \u0437\u0430\u043A\u0440\u044B\u0442\u0438\u044F"
|
|
779
|
+
});
|
|
780
|
+
}
|
|
781
|
+
if (!value.isOpen && (value.opensAt || value.closesAt)) {
|
|
782
|
+
context.addIssue({
|
|
783
|
+
code: "custom",
|
|
784
|
+
message: "\u0414\u043B\u044F \u0432\u044B\u0445\u043E\u0434\u043D\u043E\u0433\u043E \u0434\u043D\u044F \u0432\u0440\u0435\u043C\u044F \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043F\u0443\u0441\u0442\u044B\u043C"
|
|
785
|
+
});
|
|
786
|
+
}
|
|
787
|
+
if (value.isOpen && value.opensAt && value.closesAt && value.opensAt >= value.closesAt) {
|
|
788
|
+
context.addIssue({
|
|
789
|
+
code: "custom",
|
|
790
|
+
message: "\u0412\u0440\u0435\u043C\u044F \u0437\u0430\u043A\u0440\u044B\u0442\u0438\u044F \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043F\u043E\u0437\u0436\u0435 \u0432\u0440\u0435\u043C\u0435\u043D\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u044F"
|
|
791
|
+
});
|
|
792
|
+
}
|
|
793
|
+
});
|
|
794
|
+
var WarehouseWeeklyScheduleSchema = z.record(
|
|
795
|
+
z.enum(WarehouseWeekday),
|
|
796
|
+
WarehouseDayScheduleSchema
|
|
797
|
+
);
|
|
798
|
+
var WarehouseFieldsSchema = z.object({
|
|
799
|
+
name: z.string().trim().min(2).max(160),
|
|
800
|
+
countryCode: z.string().trim().toUpperCase().length(2),
|
|
801
|
+
country: z.string().trim().min(2).max(120),
|
|
802
|
+
city: z.string().trim().min(1).max(160),
|
|
803
|
+
address: z.string().trim().min(3).max(500),
|
|
804
|
+
phoneNumber: z.string().trim().min(7).max(32),
|
|
805
|
+
mapUrl: z.url().max(2e3).refine((value) => new URL(value).protocol === "https:", {
|
|
806
|
+
message: "\u0421\u0441\u044B\u043B\u043A\u0430 \u043D\u0430 \u043A\u0430\u0440\u0442\u0443 \u0434\u043E\u043B\u0436\u043D\u0430 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C HTTPS"
|
|
807
|
+
}),
|
|
808
|
+
timezone: z.string().trim().min(1).max(64),
|
|
809
|
+
schedule: WarehouseWeeklyScheduleSchema,
|
|
810
|
+
isPickupPoint: z.boolean()
|
|
811
|
+
});
|
|
812
|
+
var CreateWarehouseRequestSchema = WarehouseFieldsSchema.extend({
|
|
813
|
+
code: CodeSchema2,
|
|
814
|
+
isPickupPoint: WarehouseFieldsSchema.shape.isPickupPoint.default(true)
|
|
815
|
+
});
|
|
816
|
+
var UpdateWarehouseRequestSchema = WarehouseFieldsSchema.partial().extend({ version: z.number().int().positive() }).required({ version: true });
|
|
817
|
+
var WarehousePublicIdParamSchema = z.object({
|
|
818
|
+
publicId: PublicIdSchema2
|
|
819
|
+
});
|
|
820
|
+
var WarehouseAssignmentParamSchema = z.object({
|
|
821
|
+
publicId: PublicIdSchema2,
|
|
822
|
+
assignmentPublicId: PublicIdSchema2
|
|
823
|
+
});
|
|
824
|
+
var WarehouseListQuerySchema = BaseListQuerySchema.extend({
|
|
825
|
+
status: z.enum(WarehouseStatus).optional(),
|
|
826
|
+
countryCode: z.string().trim().toUpperCase().length(2).optional(),
|
|
827
|
+
city: z.string().trim().min(1).max(160).optional()
|
|
828
|
+
});
|
|
829
|
+
var WarehouseUserSearchQuerySchema = z.object({
|
|
830
|
+
search: z.string().trim().min(2).max(100),
|
|
831
|
+
page: z.coerce.number().int().min(1).default(1),
|
|
832
|
+
limit: z.coerce.number().int().min(1).max(20).default(20)
|
|
833
|
+
});
|
|
834
|
+
var AssignWarehouseUserRequestSchema = z.object({
|
|
835
|
+
userUuid: z.string().trim().min(3).max(32),
|
|
836
|
+
type: z.enum(WarehouseAssignmentType)
|
|
837
|
+
});
|
|
838
|
+
var WarehouseRequestLineInputSchema = z.object({
|
|
839
|
+
variantPublicId: PublicIdSchema2,
|
|
840
|
+
quantity: z.number().int().positive().max(1e9),
|
|
841
|
+
expiresAt: DateSchema.nullable().optional(),
|
|
842
|
+
batchNumber: NullableTrimmedSchema(120),
|
|
843
|
+
comment: NullableTrimmedSchema(1e3)
|
|
844
|
+
});
|
|
845
|
+
var CreateWarehouseOperationRequestSchema = z.object({
|
|
846
|
+
type: z.enum(WarehouseRequestType),
|
|
847
|
+
sourceWarehousePublicId: PublicIdSchema2.nullable().optional(),
|
|
848
|
+
destinationWarehousePublicId: PublicIdSchema2.nullable().optional(),
|
|
849
|
+
writeOffReason: z.enum(WarehouseWriteOffReason).nullable().optional(),
|
|
850
|
+
comment: z.string().trim().max(2e3).nullable().optional(),
|
|
851
|
+
lines: z.array(WarehouseRequestLineInputSchema).min(1).max(500)
|
|
852
|
+
}).superRefine((value, context) => {
|
|
853
|
+
const source = value.sourceWarehousePublicId ?? null;
|
|
854
|
+
const destination = value.destinationWarehousePublicId ?? null;
|
|
855
|
+
if (value.type === WarehouseRequestType.REPLENISHMENT) {
|
|
856
|
+
if (!destination || source) {
|
|
857
|
+
context.addIssue({
|
|
858
|
+
code: "custom",
|
|
859
|
+
path: ["destinationWarehousePublicId"],
|
|
860
|
+
message: "\u0414\u043B\u044F \u043F\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044F \u043D\u0443\u0436\u0435\u043D \u0442\u043E\u043B\u044C\u043A\u043E \u0441\u043A\u043B\u0430\u0434 \u043D\u0430\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F"
|
|
861
|
+
});
|
|
862
|
+
}
|
|
863
|
+
value.lines.forEach((line, index) => {
|
|
864
|
+
if (!line.expiresAt) {
|
|
865
|
+
context.addIssue({
|
|
866
|
+
code: "custom",
|
|
867
|
+
path: ["lines", index, "expiresAt"],
|
|
868
|
+
message: "\u0421\u0440\u043E\u043A \u0433\u043E\u0434\u043D\u043E\u0441\u0442\u0438 \u043F\u043E\u0441\u0442\u0443\u043F\u043B\u0435\u043D\u0438\u044F \u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u0435\u043D"
|
|
869
|
+
});
|
|
870
|
+
}
|
|
871
|
+
});
|
|
872
|
+
}
|
|
873
|
+
if (value.type === WarehouseRequestType.WRITE_OFF) {
|
|
874
|
+
if (!source || destination) {
|
|
875
|
+
context.addIssue({
|
|
876
|
+
code: "custom",
|
|
877
|
+
path: ["sourceWarehousePublicId"],
|
|
878
|
+
message: "\u0414\u043B\u044F \u0441\u043F\u0438\u0441\u0430\u043D\u0438\u044F \u043D\u0443\u0436\u0435\u043D \u0442\u043E\u043B\u044C\u043A\u043E \u0438\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u0441\u043A\u043B\u0430\u0434"
|
|
879
|
+
});
|
|
880
|
+
}
|
|
881
|
+
if (!value.writeOffReason) {
|
|
882
|
+
context.addIssue({
|
|
883
|
+
code: "custom",
|
|
884
|
+
path: ["writeOffReason"],
|
|
885
|
+
message: "\u041F\u0440\u0438\u0447\u0438\u043D\u0430 \u0441\u043F\u0438\u0441\u0430\u043D\u0438\u044F \u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u0430"
|
|
886
|
+
});
|
|
887
|
+
}
|
|
888
|
+
if (!value.comment?.trim()) {
|
|
889
|
+
context.addIssue({
|
|
890
|
+
code: "custom",
|
|
891
|
+
path: ["comment"],
|
|
892
|
+
message: "\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439 \u043A \u0441\u043F\u0438\u0441\u0430\u043D\u0438\u044E \u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u0435\u043D"
|
|
893
|
+
});
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
if (value.type === WarehouseRequestType.TRANSFER) {
|
|
897
|
+
if (!source || !destination || source === destination) {
|
|
898
|
+
context.addIssue({
|
|
899
|
+
code: "custom",
|
|
900
|
+
path: ["destinationWarehousePublicId"],
|
|
901
|
+
message: "\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0440\u0430\u0437\u043D\u044B\u0435 \u0438\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u0441\u043A\u043B\u0430\u0434 \u0438 \u0441\u043A\u043B\u0430\u0434 \u043D\u0430\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F"
|
|
902
|
+
});
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
});
|
|
906
|
+
var WarehouseOperationPublicIdParamSchema = z.object({
|
|
907
|
+
publicId: PublicIdSchema2
|
|
908
|
+
});
|
|
909
|
+
var WarehouseOperationAttachmentParamSchema = z.object({
|
|
910
|
+
publicId: PublicIdSchema2,
|
|
911
|
+
attachmentPublicId: PublicIdSchema2
|
|
912
|
+
});
|
|
913
|
+
var WarehouseOperationListQuerySchema = BaseListQuerySchema.extend({
|
|
914
|
+
type: z.enum(WarehouseRequestType).optional(),
|
|
915
|
+
status: z.enum(WarehouseRequestStatus).optional(),
|
|
916
|
+
warehousePublicId: PublicIdSchema2.optional(),
|
|
917
|
+
createdByUserId: z.coerce.number().int().positive().optional()
|
|
918
|
+
});
|
|
919
|
+
var WarehouseOperationCommentSchema = z.object({
|
|
920
|
+
comment: z.string().trim().max(2e3).nullable().optional()
|
|
921
|
+
});
|
|
922
|
+
var RejectWarehouseOperationRequestSchema = z.object({
|
|
923
|
+
comment: z.string().trim().min(1).max(2e3)
|
|
924
|
+
});
|
|
925
|
+
var ExecuteWarehouseOperationRequestSchema = z.object({
|
|
926
|
+
idempotencyKey: z.uuid(),
|
|
927
|
+
comment: z.string().trim().max(2e3).nullable().optional()
|
|
928
|
+
});
|
|
929
|
+
var ReportWarehouseDiscrepancyRequestSchema = z.object({
|
|
930
|
+
comment: z.string().trim().min(1).max(2e3)
|
|
931
|
+
});
|
|
932
|
+
var WarehouseStockListQuerySchema = BaseListQuerySchema.extend({
|
|
933
|
+
warehousePublicId: PublicIdSchema2.optional(),
|
|
934
|
+
variantPublicId: PublicIdSchema2.optional(),
|
|
935
|
+
expired: z.union([z.boolean(), z.enum(["true", "false"]).transform((v) => v === "true")]).optional(),
|
|
936
|
+
expiresBefore: DateSchema.optional()
|
|
937
|
+
});
|
|
938
|
+
var WarehouseSchema = z.object({
|
|
939
|
+
publicId: PublicIdSchema2,
|
|
940
|
+
code: CodeSchema2,
|
|
941
|
+
name: z.string(),
|
|
942
|
+
status: z.enum(WarehouseStatus),
|
|
943
|
+
countryCode: z.string().length(2),
|
|
944
|
+
country: z.string(),
|
|
945
|
+
city: z.string(),
|
|
946
|
+
address: z.string(),
|
|
947
|
+
phoneNumber: z.string(),
|
|
948
|
+
mapUrl: z.string(),
|
|
949
|
+
timezone: z.string(),
|
|
950
|
+
schedule: WarehouseWeeklyScheduleSchema,
|
|
951
|
+
isPickupPoint: z.boolean(),
|
|
952
|
+
version: z.number().int().positive(),
|
|
953
|
+
createdAt: DateTimeSchema,
|
|
954
|
+
updatedAt: DateTimeSchema
|
|
955
|
+
});
|
|
956
|
+
var WarehouseUserLookupSchema = z.object({
|
|
957
|
+
id: z.number().int().positive(),
|
|
958
|
+
uuid: z.string(),
|
|
959
|
+
login: z.string(),
|
|
960
|
+
firstName: z.string(),
|
|
961
|
+
lastName: z.string(),
|
|
962
|
+
email: z.email(),
|
|
963
|
+
role: z.string()
|
|
964
|
+
});
|
|
965
|
+
var WarehouseAssignmentSchema = z.object({
|
|
966
|
+
publicId: PublicIdSchema2,
|
|
967
|
+
warehousePublicId: PublicIdSchema2,
|
|
968
|
+
type: z.enum(WarehouseAssignmentType),
|
|
969
|
+
user: WarehouseUserLookupSchema,
|
|
970
|
+
assignedByLogin: z.string(),
|
|
971
|
+
assignedAt: DateTimeSchema
|
|
972
|
+
});
|
|
973
|
+
var WarehouseOperationLineSchema = z.object({
|
|
974
|
+
publicId: PublicIdSchema2,
|
|
975
|
+
variantPublicId: PublicIdSchema2,
|
|
976
|
+
sku: z.string(),
|
|
977
|
+
quantity: z.number().int().positive(),
|
|
978
|
+
expiresAt: DateSchema.nullable(),
|
|
979
|
+
batchNumber: z.string().nullable(),
|
|
980
|
+
comment: z.string().nullable()
|
|
981
|
+
});
|
|
982
|
+
var WarehouseOperationEventSchema = z.object({
|
|
983
|
+
publicId: PublicIdSchema2,
|
|
984
|
+
fromStatus: z.enum(WarehouseRequestStatus).nullable(),
|
|
985
|
+
toStatus: z.enum(WarehouseRequestStatus),
|
|
986
|
+
actorUserId: z.number().int().positive(),
|
|
987
|
+
actorLogin: z.string(),
|
|
988
|
+
comment: z.string().nullable(),
|
|
989
|
+
createdAt: DateTimeSchema
|
|
990
|
+
});
|
|
991
|
+
var WarehouseOperationAttachmentSchema = z.object({
|
|
992
|
+
publicId: PublicIdSchema2,
|
|
993
|
+
mimeType: z.string(),
|
|
994
|
+
sizeBytes: z.number().int().positive(),
|
|
995
|
+
originalName: z.string().nullable(),
|
|
996
|
+
uploadedByLogin: z.string(),
|
|
997
|
+
contentUrl: z.string(),
|
|
998
|
+
createdAt: DateTimeSchema
|
|
999
|
+
});
|
|
1000
|
+
var WarehouseOperationSchema = z.object({
|
|
1001
|
+
publicId: PublicIdSchema2,
|
|
1002
|
+
type: z.enum(WarehouseRequestType),
|
|
1003
|
+
status: z.enum(WarehouseRequestStatus),
|
|
1004
|
+
sourceWarehouse: WarehouseSchema.nullable(),
|
|
1005
|
+
destinationWarehouse: WarehouseSchema.nullable(),
|
|
1006
|
+
writeOffReason: z.enum(WarehouseWriteOffReason).nullable(),
|
|
1007
|
+
comment: z.string().nullable(),
|
|
1008
|
+
rejectionComment: z.string().nullable(),
|
|
1009
|
+
createdByUserId: z.number().int().positive(),
|
|
1010
|
+
createdByLogin: z.string(),
|
|
1011
|
+
approvedByUserId: z.number().int().positive().nullable(),
|
|
1012
|
+
approvedByLogin: z.string().nullable(),
|
|
1013
|
+
approvedAt: DateTimeSchema.nullable(),
|
|
1014
|
+
completedByUserId: z.number().int().positive().nullable(),
|
|
1015
|
+
completedByLogin: z.string().nullable(),
|
|
1016
|
+
completedAt: DateTimeSchema.nullable(),
|
|
1017
|
+
version: z.number().int().positive(),
|
|
1018
|
+
lines: z.array(WarehouseOperationLineSchema),
|
|
1019
|
+
events: z.array(WarehouseOperationEventSchema),
|
|
1020
|
+
attachments: z.array(WarehouseOperationAttachmentSchema),
|
|
1021
|
+
createdAt: DateTimeSchema,
|
|
1022
|
+
updatedAt: DateTimeSchema
|
|
1023
|
+
});
|
|
1024
|
+
var WarehouseStockSchema = z.object({
|
|
1025
|
+
publicId: PublicIdSchema2,
|
|
1026
|
+
warehouse: WarehouseSchema,
|
|
1027
|
+
variantPublicId: PublicIdSchema2,
|
|
1028
|
+
sku: z.string(),
|
|
1029
|
+
productPublicId: PublicIdSchema2,
|
|
1030
|
+
productCode: z.string(),
|
|
1031
|
+
batchNumber: z.string().nullable(),
|
|
1032
|
+
expiresAt: DateSchema,
|
|
1033
|
+
onHand: z.number().int().nonnegative(),
|
|
1034
|
+
reserved: z.number().int().nonnegative(),
|
|
1035
|
+
available: z.number().int().nonnegative(),
|
|
1036
|
+
expired: z.boolean(),
|
|
1037
|
+
version: z.number().int().positive(),
|
|
1038
|
+
updatedAt: DateTimeSchema
|
|
1039
|
+
});
|
|
1040
|
+
var WarehouseMovementSchema = z.object({
|
|
1041
|
+
publicId: PublicIdSchema2,
|
|
1042
|
+
warehousePublicId: PublicIdSchema2,
|
|
1043
|
+
operationPublicId: PublicIdSchema2,
|
|
1044
|
+
variantPublicId: PublicIdSchema2,
|
|
1045
|
+
inventoryBatchPublicId: PublicIdSchema2.nullable(),
|
|
1046
|
+
type: z.enum(WarehouseMovementType),
|
|
1047
|
+
quantityDelta: z.number().int(),
|
|
1048
|
+
balanceAfter: z.number().int().nonnegative(),
|
|
1049
|
+
actorUserId: z.number().int().positive(),
|
|
1050
|
+
actorLogin: z.string(),
|
|
1051
|
+
createdAt: DateTimeSchema
|
|
1052
|
+
});
|
|
1053
|
+
|
|
1054
|
+
export { AppLocale, AppLocaleSchema, AssignWarehouseUserRequestSchema, AuthUserSchema, BaseListQuerySchema, BinaryBranch, BinaryBranchSchema, ChangePasswordRequestSchema, CitiesResponseSchema, CityResponseSchema, ConfirmEmailChangeSchema, ConfirmEmailSchema, CountriesResponseSchema, CountryResponseSchema, CreateCurrencyRequestSchema, CreateExternalProductVideoRequestSchema, CreateMarketingInvitationRequestSchema, CreateMarketingInvitationResponseSchema, CreateProductCategoryRequestSchema, CreateProductRequestSchema, CreateProductVariantRequestSchema, CreateUserRequestSchema, CreateWalletTransactionRequestSchema, CreateWarehouseOperationRequestSchema, CreateWarehouseRequestSchema, CurrencyCodeParamSchema, CurrencyCodeSchema, CurrencyListResponseSchema, CurrencySchema, DateFromSchema, DateToSchema, DbIdSchema, ExchangeRateListResponseSchema, ExchangeRateSchema, ExchangeRateSourceSchema, ExecuteWarehouseOperationRequestSchema, FileIdParamSchema, ForgotPasswordSchema, GetCitiesQuerySchema, GetUserWalletByTypeParamsSchema, GetUserWalletTransactionsParamsSchema, GetUserWalletsParamsSchema, INT4_MAX, InvitationMarketingPlacementSchema, LimitSchema, LocalizedProductCategorySchema, LocalizedProductSchema, ManualMarketingPlacementSchema, MarketingInvitationTokenSchema, MarketingMemberStatus, MarketingMemberStatusSchema, MarketingPlacementIdentitySchema, MarketingPlacementPreviewSchema, MarketingPublicIdentifierSchema, MoneyAmountSchema, MoneyAmountStringSchema, MoneyViewSchema, PageSchema, PaginationQuerySchema, ProductCategorySchema, ProductCategoryTranslationInputSchema, ProductListQuerySchema, ProductMediaPublicIdParamSchema, ProductMediaRole, ProductMediaSchema, ProductMediaType, ProductPublicIdParamSchema, ProductSchema, ProductSlugParamSchema, ProductStatus, ProductTranslationInputSchema, ProductUnit, ProductVariantInputSchema, ProductVariantPublicIdParamSchema, ProductVariantSchema, RatePerBaseSchema, RefreshResponseSchema, RegistrationAvailabilityRequestSchema, RegistrationAvailabilityResponseSchema, RegistrationEmailSchema, RegistrationLoginSchema, RegistrationPasswordSchema, RegistrationPhoneNumberSchema, RejectWarehouseOperationRequestSchema, ReportWarehouseDiscrepancyRequestSchema, RequestEmailChangeSchema, RequestEmailVerificationSchema, ResetPasswordSchema, SearchSchema, SignInRequestSchema, SignInResponseSchema, SignUpRequestSchema, SortOrderSchema, SupportedLocales, UpdateCurrencyRequestSchema, UpdateExchangeRateRequestSchema, UpdateProductCategoryRequestSchema, UpdateProductMediaRequestSchema, UpdateProductRequestSchema, UpdateProductVariantRequestSchema, UpdateUserRequestSchema, UpdateWarehouseRequestSchema, UploadProductImageRequestSchema, UploadProductVideoRequestSchema, UserFileListSchema, UserFileSchema, UserFileType, UserListResponseSchema, UserRole, UserSchema, WalletCurrency, WalletCurrencySchema, WalletListResponseSchema, WalletOperationKeySchema, WalletSchema, WalletStatus, WalletStatusSchema, WalletTransactionDetailsListResponseSchema, WalletTransactionDetailsSchema, WalletTransactionDirection, WalletTransactionDirectionSchema, WalletTransactionListResponseSchema, WalletTransactionReason, WalletTransactionReasonSchema, WalletTransactionSchema, WalletTransactionSourceUserSchema, WalletTransactionStatus, WalletTransactionStatusSchema, WalletTransactionsListQuerySchema, WalletType, WalletTypeSchema, WarehouseAssignmentParamSchema, WarehouseAssignmentSchema, WarehouseAssignmentType, WarehouseDayScheduleSchema, WarehouseListQuerySchema, WarehouseMovementSchema, WarehouseMovementType, WarehouseOperationAttachmentParamSchema, WarehouseOperationAttachmentSchema, WarehouseOperationCommentSchema, WarehouseOperationEventSchema, WarehouseOperationLineSchema, WarehouseOperationListQuerySchema, WarehouseOperationPublicIdParamSchema, WarehouseOperationSchema, WarehousePublicIdParamSchema, WarehouseRequestLineInputSchema, WarehouseRequestStatus, WarehouseRequestType, WarehouseSchema, WarehouseStatus, WarehouseStockListQuerySchema, WarehouseStockSchema, WarehouseUserLookupSchema, WarehouseUserSearchQuerySchema, WarehouseWeekday, WarehouseWeeklyScheduleSchema, WarehouseWriteOffReason };
|
|
704
1055
|
//# sourceMappingURL=index.mjs.map
|
|
705
1056
|
//# sourceMappingURL=index.mjs.map
|