@esb-market-contracts/backend 1.0.42 → 1.0.43

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
@@ -706,7 +706,7 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
706
706
  id: number;
707
707
  deliveryId: number;
708
708
  productVariantId: number;
709
- quantity: number;
709
+ quantity: number | null;
710
710
  unitCost: string | null;
711
711
  unitCostBase: string | null;
712
712
  updatedAt: Date | null;
@@ -762,7 +762,7 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
762
762
  id: number;
763
763
  deliveryId: number;
764
764
  productVariantId: number;
765
- quantity: number;
765
+ quantity: number | null;
766
766
  unitCost: string | null;
767
767
  unitCostBase: string | null;
768
768
  updatedAt: Date | null;
@@ -895,7 +895,7 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
895
895
  id: number;
896
896
  deliveryId: number;
897
897
  productVariantId: number;
898
- quantity: number;
898
+ quantity: number | null;
899
899
  unitCost: string | null;
900
900
  unitCostBase: string | null;
901
901
  updatedAt: Date | null;
@@ -940,7 +940,7 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
940
940
  id: number;
941
941
  deliveryId: number;
942
942
  productVariantId: number;
943
- quantity: number;
943
+ quantity: number | null;
944
944
  unitCost: string | null;
945
945
  unitCostBase: string | null;
946
946
  updatedAt: Date | null;
@@ -966,25 +966,6 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
966
966
  } | {
967
967
  outcome: "product-variant-not-found";
968
968
  barcode: string;
969
- } | {
970
- product: {
971
- id: number;
972
- model: string | null;
973
- name: Partial<Record<"en" | "ka" | "ru", string>> | null;
974
- };
975
- measurementUnit: {
976
- id: number;
977
- code: string;
978
- name: string;
979
- decimalPlaces: number;
980
- };
981
- productVariant: {
982
- id: number;
983
- sku: string | null;
984
- name: Partial<Record<"en" | "ka" | "ru", string>> | null;
985
- barcode: string;
986
- };
987
- outcome: "quantity-required";
988
969
  }>;
989
970
  outputFormat: "json";
990
971
  status: 200;
@@ -1004,7 +985,7 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
1004
985
  id: number;
1005
986
  deliveryId: number;
1006
987
  productVariantId: number;
1007
- quantity: number;
988
+ quantity: number | null;
1008
989
  unitCost: string | null;
1009
990
  unitCostBase: string | null;
1010
991
  updatedAt: Date | null;
@@ -1032,7 +1013,7 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
1032
1013
  status: 200;
1033
1014
  input: {
1034
1015
  json: {
1035
- quantity?: number | undefined;
1016
+ quantity?: number | null | undefined;
1036
1017
  unitCost?: string | null | undefined;
1037
1018
  deliveryItemId: number;
1038
1019
  };
@@ -1047,7 +1028,7 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
1047
1028
  id: number;
1048
1029
  deliveryId: number;
1049
1030
  productVariantId: number;
1050
- quantity: number;
1031
+ quantity: number | null;
1051
1032
  unitCost: string | null;
1052
1033
  unitCostBase: string | null;
1053
1034
  updatedAt: Date | null;
package/enums.d.ts CHANGED
@@ -28,11 +28,10 @@ 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', 'quantity-required', 'product-variant-not-found'];
31
+ export declare const deliveryItemScanOutcomesArray: readonly ['added', '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
- QUANTITY_REQUIRED: "quantity-required";
36
35
  }>;
37
36
  type DeliveryItemScanOutcome = (typeof deliveryItemScanOutcomesArray)[number];
38
37
  //#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", "quantity-required", "product-variant-not-found"];
31
+ var deliveryItemScanOutcomesArray = ["added", "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.42",
4
+ "version": "1.0.43",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "sideEffects": false,
package/types.d.ts CHANGED
@@ -527,7 +527,7 @@ declare const deliveryItemAddPayloadSchema: z.ZodObject<{
527
527
  in: {};
528
528
  }>;
529
529
  declare const deliveryItemUpdatePayloadSchema: z.ZodObject<{
530
- quantity: z.ZodOptional<z.ZodNumber>;
530
+ quantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
531
531
  unitCost: z.ZodOptional<z.ZodNullable<z.ZodString>>;
532
532
  deliveryItemId: z.ZodInt;
533
533
  }, {
@@ -568,7 +568,7 @@ declare const deliveryItemDetailsSchema: z.ZodObject<{
568
568
  id: z.ZodInt;
569
569
  deliveryId: z.ZodInt;
570
570
  productVariantId: z.ZodInt;
571
- quantity: z.ZodNumber;
571
+ quantity: z.ZodNullable<z.ZodNumber>;
572
572
  unitCost: z.ZodNullable<z.ZodString>;
573
573
  unitCostBase: z.ZodNullable<z.ZodString>;
574
574
  updatedAt: z.ZodNullable<z.ZodDate>;
@@ -599,33 +599,6 @@ declare const deliveryItemDetailsSchema: z.ZodObject<{
599
599
  decimalPlaces: z.ZodInt;
600
600
  }, z.core.$strip>;
601
601
  }, z.core.$strip>;
602
- declare const deliveryItemScanMatchSchema: z.ZodObject<{
603
- product: z.ZodObject<{
604
- id: z.ZodInt;
605
- model: z.ZodNullable<z.ZodString>;
606
- name: z.ZodNullable<z.ZodRecord<z.ZodEnum<{
607
- en: "en";
608
- ka: "ka";
609
- ru: "ru";
610
- }> & z.core.$partial, z.ZodString>>;
611
- }, z.core.$strip>;
612
- measurementUnit: z.ZodObject<{
613
- id: z.ZodInt;
614
- code: z.ZodString;
615
- name: z.ZodString;
616
- decimalPlaces: z.ZodInt;
617
- }, z.core.$strip>;
618
- productVariant: z.ZodObject<{
619
- id: z.ZodInt;
620
- sku: z.ZodNullable<z.ZodString>;
621
- name: z.ZodNullable<z.ZodRecord<z.ZodEnum<{
622
- en: "en";
623
- ka: "ka";
624
- ru: "ru";
625
- }> & z.core.$partial, z.ZodString>>;
626
- barcode: z.ZodString;
627
- }, z.core.$strip>;
628
- }, z.core.$strip>;
629
602
  declare const deliveryItemScanPayloadSchema: z.ZodObject<{
630
603
  deliveryId: z.ZodInt;
631
604
  barcode: z.ZodString;
@@ -636,7 +609,7 @@ declare const deliveryItemScanResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject
636
609
  id: z.ZodInt;
637
610
  deliveryId: z.ZodInt;
638
611
  productVariantId: z.ZodInt;
639
- quantity: z.ZodNumber;
612
+ quantity: z.ZodNullable<z.ZodNumber>;
640
613
  unitCost: z.ZodNullable<z.ZodString>;
641
614
  unitCostBase: z.ZodNullable<z.ZodString>;
642
615
  updatedAt: z.ZodNullable<z.ZodDate>;
@@ -667,33 +640,6 @@ declare const deliveryItemScanResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject
667
640
  decimalPlaces: z.ZodInt;
668
641
  }, z.core.$strip>;
669
642
  }, z.core.$strip>;
670
- }, z.core.$strip>, z.ZodObject<{
671
- product: z.ZodObject<{
672
- id: z.ZodInt;
673
- model: z.ZodNullable<z.ZodString>;
674
- name: z.ZodNullable<z.ZodRecord<z.ZodEnum<{
675
- en: "en";
676
- ka: "ka";
677
- ru: "ru";
678
- }> & z.core.$partial, z.ZodString>>;
679
- }, z.core.$strip>;
680
- measurementUnit: z.ZodObject<{
681
- id: z.ZodInt;
682
- code: z.ZodString;
683
- name: z.ZodString;
684
- decimalPlaces: z.ZodInt;
685
- }, z.core.$strip>;
686
- productVariant: z.ZodObject<{
687
- id: z.ZodInt;
688
- sku: z.ZodNullable<z.ZodString>;
689
- name: z.ZodNullable<z.ZodRecord<z.ZodEnum<{
690
- en: "en";
691
- ka: "ka";
692
- ru: "ru";
693
- }> & z.core.$partial, z.ZodString>>;
694
- barcode: z.ZodString;
695
- }, z.core.$strip>;
696
- outcome: z.ZodLiteral<"quantity-required">;
697
643
  }, z.core.$strip>, z.ZodObject<{
698
644
  outcome: z.ZodLiteral<"product-variant-not-found">;
699
645
  barcode: z.ZodString;
@@ -720,7 +666,7 @@ declare const deliveryDetailsSchema: z.ZodObject<{
720
666
  id: z.ZodInt;
721
667
  deliveryId: z.ZodInt;
722
668
  productVariantId: z.ZodInt;
723
- quantity: z.ZodNumber;
669
+ quantity: z.ZodNullable<z.ZodNumber>;
724
670
  unitCost: z.ZodNullable<z.ZodString>;
725
671
  unitCostBase: z.ZodNullable<z.ZodString>;
726
672
  updatedAt: z.ZodNullable<z.ZodDate>;
@@ -761,7 +707,6 @@ type DeliveryItemScanPayload = z.infer<typeof deliveryItemScanPayloadSchema>;
761
707
  type DeliveryItemScanResult = z.infer<typeof deliveryItemScanResultSchema>;
762
708
  type DeliveryItemCatalogDetails = z.infer<typeof deliveryItemCatalogDetailsSchema>;
763
709
  type DeliveryItemDetails = z.infer<typeof deliveryItemDetailsSchema>;
764
- type DeliveryItemScanMatch = z.infer<typeof deliveryItemScanMatchSchema>;
765
710
  type DeliveryItemResult = {
766
711
  deliveryItem: DeliveryItemDetails;
767
712
  };
@@ -1246,7 +1191,7 @@ declare const deliveryItemSchema: z.ZodObject<{
1246
1191
  id: z.ZodInt;
1247
1192
  deliveryId: z.ZodInt;
1248
1193
  productVariantId: z.ZodInt;
1249
- quantity: z.ZodNumber;
1194
+ quantity: z.ZodNullable<z.ZodNumber>;
1250
1195
  unitCost: z.ZodNullable<z.ZodString>;
1251
1196
  unitCostBase: z.ZodNullable<z.ZodString>;
1252
1197
  updatedAt: z.ZodNullable<z.ZodDate>;
@@ -1276,4 +1221,4 @@ declare const deliverySchema: z.ZodObject<{
1276
1221
  }, z.core.$strip>;
1277
1222
  type Delivery = z.infer<typeof deliverySchema>;
1278
1223
  //#endregion
1279
- export type { AuditLogResult, AuditLogSearchPayload, AuditLogSearchResult, AuditLogSelectOneQuery, Brand, BrandCreatePayload, BrandSearchOptions, BrandSearchResult, BrandSelectOneQuery, BrandUpdatePayload, Category, CategoryCreatePayload, CategorySearchOptions, CategorySearchResult, CategorySelectOneQuery, CategoryUpdatePayload, Country, CountryCreatePayload, CountrySearchOptions, CountrySearchResult, CountrySelectOneQuery, CountryUpdatePayload, Currency, CurrencyListResult, Customer, CustomerCreatePayload, CustomerSearchOptions, CustomerSearchResult, CustomerSelectOneQuery, CustomerUpdatePayload, Delivery, DeliveryCreatePayload, DeliveryCreateResult, DeliveryDeletePayload, DeliveryDetails, DeliveryItem, DeliveryItemAddPayload, DeliveryItemCatalogDetails, DeliveryItemDeletePayload, DeliveryItemDetails, DeliveryItemResult, DeliveryItemScanMatch, DeliveryItemScanPayload, DeliveryItemScanResult, DeliveryItemUpdatePayload, DeliveryPostPayload, DeliverySearchItem, DeliverySearchOptions, DeliverySearchResult, DeliverySelectOneQuery, DeliverySelectOneResult, DeliveryUpdatePayload, ExchangeRate, ExchangeRateDateSearchResult, ExchangeRateSearchOptions, ExchangeRateSearchResult, MeasurementUnit, MeasurementUnitListResult, Product, ProductCreatePayload, ProductCreateResult, ProductDeletePayload, ProductImage, ProductImages, ProductSearchOptions, ProductSearchResult, ProductSelectOneQuery, ProductUpdatePayload, ProductVariant, ProductVariantCreatePayload, ProductVariantCreateResult, ProductVariantDeletePayload, ProductVariantSearchOptions, ProductVariantSearchResult, ProductVariantSelectOneQuery, ProductVariantUpdatePayload, Supplier, SupplierCreatePayload, SupplierSearchOptions, SupplierSearchResult, SupplierSelectOneQuery, SupplierSwitchStatusPayload, SupplierUpdatePayload, Warehouse, WarehouseCreatePayload, WarehouseSearchOptions, WarehouseSearchResult, WarehouseSelectOneQuery, WarehouseSwitchStatusPayload, WarehouseUpdatePayload };
1224
+ export type { AuditLogResult, AuditLogSearchPayload, AuditLogSearchResult, AuditLogSelectOneQuery, Brand, BrandCreatePayload, BrandSearchOptions, BrandSearchResult, BrandSelectOneQuery, BrandUpdatePayload, Category, CategoryCreatePayload, CategorySearchOptions, CategorySearchResult, CategorySelectOneQuery, CategoryUpdatePayload, Country, CountryCreatePayload, CountrySearchOptions, CountrySearchResult, CountrySelectOneQuery, CountryUpdatePayload, Currency, CurrencyListResult, Customer, CustomerCreatePayload, CustomerSearchOptions, CustomerSearchResult, CustomerSelectOneQuery, CustomerUpdatePayload, Delivery, DeliveryCreatePayload, DeliveryCreateResult, DeliveryDeletePayload, DeliveryDetails, DeliveryItem, DeliveryItemAddPayload, DeliveryItemCatalogDetails, DeliveryItemDeletePayload, DeliveryItemDetails, DeliveryItemResult, DeliveryItemScanPayload, DeliveryItemScanResult, DeliveryItemUpdatePayload, DeliveryPostPayload, DeliverySearchItem, DeliverySearchOptions, DeliverySearchResult, DeliverySelectOneQuery, DeliverySelectOneResult, DeliveryUpdatePayload, ExchangeRate, ExchangeRateDateSearchResult, ExchangeRateSearchOptions, ExchangeRateSearchResult, MeasurementUnit, MeasurementUnitListResult, Product, ProductCreatePayload, ProductCreateResult, ProductDeletePayload, ProductImage, ProductImages, ProductSearchOptions, ProductSearchResult, ProductSelectOneQuery, ProductUpdatePayload, ProductVariant, ProductVariantCreatePayload, ProductVariantCreateResult, ProductVariantDeletePayload, ProductVariantSearchOptions, ProductVariantSearchResult, ProductVariantSelectOneQuery, ProductVariantUpdatePayload, Supplier, SupplierCreatePayload, SupplierSearchOptions, SupplierSearchResult, SupplierSelectOneQuery, SupplierSwitchStatusPayload, SupplierUpdatePayload, Warehouse, WarehouseCreatePayload, WarehouseSearchOptions, WarehouseSearchResult, WarehouseSelectOneQuery, WarehouseSwitchStatusPayload, WarehouseUpdatePayload };