@esb-market-contracts/backend 1.0.43 → 1.0.45

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/api.d.ts CHANGED
@@ -334,6 +334,7 @@ declare const productVariantsRouter: import("hono/hono-base").HonoBase<{
334
334
  id: number;
335
335
  productId: number;
336
336
  measurementUnitId: number | null;
337
+ taxCategoryId: number | null;
337
338
  status: "active" | "archived" | "draft";
338
339
  sku: string | null;
339
340
  barcode: string | null;
@@ -359,6 +360,7 @@ declare const productVariantsRouter: import("hono/hono-base").HonoBase<{
359
360
  id: number;
360
361
  productId: number;
361
362
  measurementUnitId: number | null;
363
+ taxCategoryId: number | null;
362
364
  status: "active" | "archived" | "draft";
363
365
  sku: string | null;
364
366
  barcode: string | null;
@@ -373,6 +375,7 @@ declare const productVariantsRouter: import("hono/hono-base").HonoBase<{
373
375
  json: {
374
376
  productId: number;
375
377
  measurementUnitId?: number | null | undefined;
378
+ taxCategoryId?: number | null | undefined;
376
379
  status?: "active" | "archived" | "draft" | undefined;
377
380
  sku?: string | null | undefined;
378
381
  barcode?: string | null | undefined;
@@ -389,6 +392,7 @@ declare const productVariantsRouter: import("hono/hono-base").HonoBase<{
389
392
  id: number;
390
393
  productId: number;
391
394
  measurementUnitId: number | null;
395
+ taxCategoryId: number | null;
392
396
  status: "active" | "archived" | "draft";
393
397
  sku: string | null;
394
398
  barcode: string | null;
@@ -425,6 +429,7 @@ declare const productVariantsRouter: import("hono/hono-base").HonoBase<{
425
429
  input: {
426
430
  json: {
427
431
  measurementUnitId?: number | null | undefined;
432
+ taxCategoryId?: number | null | undefined;
428
433
  status?: "active" | "archived" | "draft" | undefined;
429
434
  sku?: string | null | undefined;
430
435
  barcode?: string | null | undefined;
@@ -470,6 +475,7 @@ declare const productsRouter: import("hono/hono-base").HonoBase<{
470
475
  }[];
471
476
  categoryId: number | null;
472
477
  brandId: number | null;
478
+ taxCategoryId: number | null;
473
479
  updatedAt: Date | null;
474
480
  createdAt: Date;
475
481
  };
@@ -504,6 +510,7 @@ declare const productsRouter: import("hono/hono-base").HonoBase<{
504
510
  }[];
505
511
  categoryId: number | null;
506
512
  brandId: number | null;
513
+ taxCategoryId: number | null;
507
514
  updatedAt: Date | null;
508
515
  createdAt: Date;
509
516
  };
@@ -518,6 +525,7 @@ declare const productsRouter: import("hono/hono-base").HonoBase<{
518
525
  description?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
519
526
  categoryId?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
520
527
  brandId?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
528
+ taxCategoryId?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
521
529
  images?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
522
530
  bannerImageIndex?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
523
531
  };
@@ -541,6 +549,7 @@ declare const productsRouter: import("hono/hono-base").HonoBase<{
541
549
  }[];
542
550
  categoryId: number | null;
543
551
  brandId: number | null;
552
+ taxCategoryId: number | null;
544
553
  updatedAt: Date | null;
545
554
  createdAt: Date;
546
555
  }[];
@@ -579,6 +588,7 @@ declare const productsRouter: import("hono/hono-base").HonoBase<{
579
588
  description?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
580
589
  categoryId?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
581
590
  brandId?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
591
+ taxCategoryId?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
582
592
  images?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
583
593
  bannerImageIndex?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
584
594
  productId: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue;
@@ -709,6 +719,8 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
709
719
  quantity: number | null;
710
720
  unitCost: string | null;
711
721
  unitCostBase: string | null;
722
+ supplierLotNumber: string | null;
723
+ expiresOn: string | null;
712
724
  updatedAt: Date | null;
713
725
  createdAt: Date;
714
726
  product: {
@@ -765,6 +777,8 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
765
777
  quantity: number | null;
766
778
  unitCost: string | null;
767
779
  unitCostBase: string | null;
780
+ supplierLotNumber: string | null;
781
+ expiresOn: string | null;
768
782
  updatedAt: Date | null;
769
783
  createdAt: Date;
770
784
  product: {
@@ -898,6 +912,8 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
898
912
  quantity: number | null;
899
913
  unitCost: string | null;
900
914
  unitCostBase: string | null;
915
+ supplierLotNumber: string | null;
916
+ expiresOn: string | null;
901
917
  updatedAt: Date | null;
902
918
  createdAt: Date;
903
919
  product: {
@@ -926,6 +942,8 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
926
942
  deliveryId: number;
927
943
  productVariantId: number;
928
944
  unitCost: string | null;
945
+ supplierLotNumber?: string | null | undefined;
946
+ expiresOn?: string | null | undefined;
929
947
  quantity?: number | undefined;
930
948
  };
931
949
  };
@@ -943,6 +961,39 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
943
961
  quantity: number | null;
944
962
  unitCost: string | null;
945
963
  unitCostBase: string | null;
964
+ supplierLotNumber: string | null;
965
+ expiresOn: string | null;
966
+ updatedAt: Date | null;
967
+ createdAt: Date;
968
+ product: {
969
+ id: number;
970
+ model: string | null;
971
+ name: Partial<Record<"en" | "ka" | "ru", string>> | null;
972
+ };
973
+ productVariant: {
974
+ id: number;
975
+ sku: string | null;
976
+ barcode: string | null;
977
+ name: Partial<Record<"en" | "ka" | "ru", string>> | null;
978
+ };
979
+ measurementUnit: {
980
+ id: number;
981
+ code: string;
982
+ name: string;
983
+ decimalPlaces: number;
984
+ };
985
+ };
986
+ } | {
987
+ outcome: "unchanged";
988
+ deliveryItem: {
989
+ id: number;
990
+ deliveryId: number;
991
+ productVariantId: number;
992
+ quantity: number | null;
993
+ unitCost: string | null;
994
+ unitCostBase: string | null;
995
+ supplierLotNumber: string | null;
996
+ expiresOn: string | null;
946
997
  updatedAt: Date | null;
947
998
  createdAt: Date;
948
999
  product: {
@@ -988,6 +1039,8 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
988
1039
  quantity: number | null;
989
1040
  unitCost: string | null;
990
1041
  unitCostBase: string | null;
1042
+ supplierLotNumber: string | null;
1043
+ expiresOn: string | null;
991
1044
  updatedAt: Date | null;
992
1045
  createdAt: Date;
993
1046
  product: {
@@ -1015,6 +1068,8 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
1015
1068
  json: {
1016
1069
  quantity?: number | null | undefined;
1017
1070
  unitCost?: string | null | undefined;
1071
+ supplierLotNumber?: string | null | undefined;
1072
+ expiresOn?: string | null | undefined;
1018
1073
  deliveryItemId: number;
1019
1074
  };
1020
1075
  };
@@ -1031,6 +1086,8 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
1031
1086
  quantity: number | null;
1032
1087
  unitCost: string | null;
1033
1088
  unitCostBase: string | null;
1089
+ supplierLotNumber: string | null;
1090
+ expiresOn: string | null;
1034
1091
  updatedAt: Date | null;
1035
1092
  createdAt: Date;
1036
1093
  product: {
package/enums.d.ts CHANGED
@@ -28,10 +28,11 @@ declare const deliveryStatusesRecord: Readonly<{
28
28
  type DeliveryStatus = (typeof deliveryStatusesArray)[number];
29
29
  //#endregion
30
30
  //#region src/app/flows/(procurement)/delivery/delivery.enums.d.ts
31
- export declare const deliveryItemScanOutcomesArray: readonly ['added', 'product-variant-not-found'];
31
+ export declare const deliveryItemScanOutcomesArray: readonly ['added', 'unchanged', 'product-variant-not-found'];
32
32
  declare const deliveryItemScanOutcomesRecord: Readonly<{
33
33
  ADDED: "added";
34
34
  PRODUCT_VARIANT_NOT_FOUND: "product-variant-not-found";
35
+ UNCHANGED: "unchanged";
35
36
  }>;
36
37
  type DeliveryItemScanOutcome = (typeof deliveryItemScanOutcomesArray)[number];
37
38
  //#endregion
package/enums.js CHANGED
@@ -28,7 +28,7 @@ var deliveryStatusesRecord = createStringEnumRecord3(deliveryStatusesArray);
28
28
  // src/app/flows/(procurement)/delivery/delivery.enums.ts
29
29
  import { createStringEnumRecord as createStringEnumRecord4 } from "@kalutskii/foundation";
30
30
  import { z as z2 } from "zod";
31
- var deliveryItemScanOutcomesArray = ["added", "product-variant-not-found"];
31
+ var deliveryItemScanOutcomesArray = ["added", "unchanged", "product-variant-not-found"];
32
32
  var deliveryItemScanOutcomesRecord = createStringEnumRecord4(deliveryItemScanOutcomesArray);
33
33
  var deliveryItemScanOutcomeSchema = z2.enum(deliveryItemScanOutcomesArray);
34
34
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@esb-market-contracts/backend",
3
3
  "description": "Shared TypeScript contract definitions for backend.",
4
- "version": "1.0.43",
4
+ "version": "1.0.45",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "sideEffects": false,
package/types.d.ts CHANGED
@@ -521,7 +521,9 @@ declare const deliveryItemAddPayloadSchema: z.ZodObject<{
521
521
  deliveryId: z.ZodInt;
522
522
  productVariantId: z.ZodInt;
523
523
  unitCost: z.ZodNullable<z.ZodString>;
524
- quantity: z.ZodDefault<z.ZodNumber>;
524
+ supplierLotNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
525
+ expiresOn: z.ZodOptional<z.ZodNullable<z.ZodISODate>>;
526
+ quantity: z.ZodOptional<z.ZodNumber>;
525
527
  }, {
526
528
  out: {};
527
529
  in: {};
@@ -529,6 +531,8 @@ declare const deliveryItemAddPayloadSchema: z.ZodObject<{
529
531
  declare const deliveryItemUpdatePayloadSchema: z.ZodObject<{
530
532
  quantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
531
533
  unitCost: z.ZodOptional<z.ZodNullable<z.ZodString>>;
534
+ supplierLotNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
535
+ expiresOn: z.ZodOptional<z.ZodNullable<z.ZodISODate>>;
532
536
  deliveryItemId: z.ZodInt;
533
537
  }, {
534
538
  out: {};
@@ -571,6 +575,8 @@ declare const deliveryItemDetailsSchema: z.ZodObject<{
571
575
  quantity: z.ZodNullable<z.ZodNumber>;
572
576
  unitCost: z.ZodNullable<z.ZodString>;
573
577
  unitCostBase: z.ZodNullable<z.ZodString>;
578
+ supplierLotNumber: z.ZodNullable<z.ZodString>;
579
+ expiresOn: z.ZodNullable<z.ZodISODate>;
574
580
  updatedAt: z.ZodNullable<z.ZodDate>;
575
581
  createdAt: z.ZodDate;
576
582
  product: z.ZodObject<{
@@ -612,6 +618,47 @@ declare const deliveryItemScanResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject
612
618
  quantity: z.ZodNullable<z.ZodNumber>;
613
619
  unitCost: z.ZodNullable<z.ZodString>;
614
620
  unitCostBase: z.ZodNullable<z.ZodString>;
621
+ supplierLotNumber: z.ZodNullable<z.ZodString>;
622
+ expiresOn: z.ZodNullable<z.ZodISODate>;
623
+ updatedAt: z.ZodNullable<z.ZodDate>;
624
+ createdAt: z.ZodDate;
625
+ product: z.ZodObject<{
626
+ id: z.ZodInt;
627
+ model: z.ZodNullable<z.ZodString>;
628
+ name: z.ZodNullable<z.ZodRecord<z.ZodEnum<{
629
+ en: "en";
630
+ ka: "ka";
631
+ ru: "ru";
632
+ }> & z.core.$partial, z.ZodString>>;
633
+ }, z.core.$strip>;
634
+ productVariant: z.ZodObject<{
635
+ id: z.ZodInt;
636
+ sku: z.ZodNullable<z.ZodString>;
637
+ barcode: z.ZodNullable<z.ZodString>;
638
+ name: z.ZodNullable<z.ZodRecord<z.ZodEnum<{
639
+ en: "en";
640
+ ka: "ka";
641
+ ru: "ru";
642
+ }> & z.core.$partial, z.ZodString>>;
643
+ }, z.core.$strip>;
644
+ measurementUnit: z.ZodObject<{
645
+ id: z.ZodInt;
646
+ code: z.ZodString;
647
+ name: z.ZodString;
648
+ decimalPlaces: z.ZodInt;
649
+ }, z.core.$strip>;
650
+ }, z.core.$strip>;
651
+ }, z.core.$strip>, z.ZodObject<{
652
+ outcome: z.ZodLiteral<"unchanged">;
653
+ deliveryItem: z.ZodObject<{
654
+ id: z.ZodInt;
655
+ deliveryId: z.ZodInt;
656
+ productVariantId: z.ZodInt;
657
+ quantity: z.ZodNullable<z.ZodNumber>;
658
+ unitCost: z.ZodNullable<z.ZodString>;
659
+ unitCostBase: z.ZodNullable<z.ZodString>;
660
+ supplierLotNumber: z.ZodNullable<z.ZodString>;
661
+ expiresOn: z.ZodNullable<z.ZodISODate>;
615
662
  updatedAt: z.ZodNullable<z.ZodDate>;
616
663
  createdAt: z.ZodDate;
617
664
  product: z.ZodObject<{
@@ -669,6 +716,8 @@ declare const deliveryDetailsSchema: z.ZodObject<{
669
716
  quantity: z.ZodNullable<z.ZodNumber>;
670
717
  unitCost: z.ZodNullable<z.ZodString>;
671
718
  unitCostBase: z.ZodNullable<z.ZodString>;
719
+ supplierLotNumber: z.ZodNullable<z.ZodString>;
720
+ expiresOn: z.ZodNullable<z.ZodISODate>;
672
721
  updatedAt: z.ZodNullable<z.ZodDate>;
673
722
  createdAt: z.ZodDate;
674
723
  product: z.ZodObject<{
@@ -954,6 +1003,7 @@ declare const productVariantSchema: z.ZodObject<{
954
1003
  id: z.ZodInt;
955
1004
  productId: z.ZodInt;
956
1005
  measurementUnitId: z.ZodNullable<z.ZodInt>;
1006
+ taxCategoryId: z.ZodNullable<z.ZodInt>;
957
1007
  status: z.ZodEnum<{
958
1008
  active: "active";
959
1009
  archived: "archived";
@@ -997,6 +1047,7 @@ declare const productSchema: z.ZodObject<{
997
1047
  }, z.core.$strip>>;
998
1048
  categoryId: z.ZodNullable<z.ZodInt>;
999
1049
  brandId: z.ZodNullable<z.ZodInt>;
1050
+ taxCategoryId: z.ZodNullable<z.ZodInt>;
1000
1051
  updatedAt: z.ZodNullable<z.ZodDate>;
1001
1052
  createdAt: z.ZodDate;
1002
1053
  }, z.core.$strip>;
@@ -1066,6 +1117,7 @@ declare const productCreatePayloadSchema: z.ZodObject<{
1066
1117
  }> & z.core.$partial, z.ZodString>>, unknown>>;
1067
1118
  categoryId: z.ZodOptional<z.ZodPreprocess<z.ZodUnion<readonly [z.ZodNull, z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>]>, unknown>>;
1068
1119
  brandId: z.ZodOptional<z.ZodPreprocess<z.ZodUnion<readonly [z.ZodNull, z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>]>, unknown>>;
1120
+ taxCategoryId: z.ZodOptional<z.ZodPreprocess<z.ZodUnion<readonly [z.ZodNull, z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>]>, unknown>>;
1069
1121
  images: z.ZodOptional<z.ZodPreprocess<z.ZodArray<z.ZodFile>, unknown>>;
1070
1122
  bannerImageIndex: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
1071
1123
  }, {
@@ -1092,6 +1144,7 @@ declare const productUpdatePayloadSchema: z.ZodObject<{
1092
1144
  }> & z.core.$partial, z.ZodString>>, unknown>>;
1093
1145
  categoryId: z.ZodOptional<z.ZodPreprocess<z.ZodUnion<readonly [z.ZodNull, z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>]>, unknown>>;
1094
1146
  brandId: z.ZodOptional<z.ZodPreprocess<z.ZodUnion<readonly [z.ZodNull, z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>]>, unknown>>;
1147
+ taxCategoryId: z.ZodOptional<z.ZodPreprocess<z.ZodUnion<readonly [z.ZodNull, z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>]>, unknown>>;
1095
1148
  images: z.ZodOptional<z.ZodPreprocess<z.ZodArray<z.ZodFile>, unknown>>;
1096
1149
  bannerImageIndex: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
1097
1150
  productId: z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>;
@@ -1138,6 +1191,7 @@ declare const productVariantDeletePayloadSchema: z.ZodObject<{
1138
1191
  declare const productVariantCreatePayloadSchema: z.ZodObject<{
1139
1192
  productId: z.ZodInt;
1140
1193
  measurementUnitId: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1194
+ taxCategoryId: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1141
1195
  status: z.ZodOptional<z.ZodEnum<{
1142
1196
  active: "active";
1143
1197
  archived: "archived";
@@ -1156,6 +1210,7 @@ declare const productVariantCreatePayloadSchema: z.ZodObject<{
1156
1210
  }>;
1157
1211
  declare const productVariantUpdatePayloadSchema: z.ZodObject<{
1158
1212
  measurementUnitId: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1213
+ taxCategoryId: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
1159
1214
  status: z.ZodOptional<z.ZodEnum<{
1160
1215
  active: "active";
1161
1216
  archived: "archived";
@@ -1194,6 +1249,8 @@ declare const deliveryItemSchema: z.ZodObject<{
1194
1249
  quantity: z.ZodNullable<z.ZodNumber>;
1195
1250
  unitCost: z.ZodNullable<z.ZodString>;
1196
1251
  unitCostBase: z.ZodNullable<z.ZodString>;
1252
+ supplierLotNumber: z.ZodNullable<z.ZodString>;
1253
+ expiresOn: z.ZodNullable<z.ZodISODate>;
1197
1254
  updatedAt: z.ZodNullable<z.ZodDate>;
1198
1255
  createdAt: z.ZodDate;
1199
1256
  }, z.core.$strip>;