@esb-market-contracts/backend 1.0.40 → 1.0.42

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
@@ -966,6 +966,25 @@ 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";
969
988
  }>;
970
989
  outputFormat: "json";
971
990
  status: 200;
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', 'quantity-required', '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";
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", "quantity-required", "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.40",
4
+ "version": "1.0.42",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "sideEffects": false,
package/types.d.ts CHANGED
@@ -494,7 +494,7 @@ declare const deliverySearchItemSchema: z.ZodObject<{
494
494
  notes: z.ZodNullable<z.ZodString>;
495
495
  exchangeRateId: z.ZodNullable<z.ZodInt>;
496
496
  exchangeRate: z.ZodNullable<z.ZodString>;
497
- exchangeRateValidFromDate: z.ZodNullable<z.ZodNullable<z.ZodISODate>>;
497
+ exchangeRateValidFromDate: z.ZodNullable<z.ZodISODate>;
498
498
  postedAt: z.ZodNullable<z.ZodDate>;
499
499
  updatedAt: z.ZodNullable<z.ZodDate>;
500
500
  createdAt: z.ZodDate;
@@ -537,6 +537,33 @@ declare const deliveryItemUpdatePayloadSchema: z.ZodObject<{
537
537
  declare const deliveryItemDeletePayloadSchema: z.ZodObject<{
538
538
  deliveryItemId: z.ZodInt;
539
539
  }, z.core.$strip>;
540
+ declare const deliveryItemCatalogDetailsSchema: z.ZodObject<{
541
+ product: z.ZodObject<{
542
+ id: z.ZodInt;
543
+ model: z.ZodNullable<z.ZodString>;
544
+ name: z.ZodNullable<z.ZodRecord<z.ZodEnum<{
545
+ en: "en";
546
+ ka: "ka";
547
+ ru: "ru";
548
+ }> & z.core.$partial, z.ZodString>>;
549
+ }, z.core.$strip>;
550
+ productVariant: z.ZodObject<{
551
+ id: z.ZodInt;
552
+ sku: z.ZodNullable<z.ZodString>;
553
+ barcode: z.ZodNullable<z.ZodString>;
554
+ name: z.ZodNullable<z.ZodRecord<z.ZodEnum<{
555
+ en: "en";
556
+ ka: "ka";
557
+ ru: "ru";
558
+ }> & z.core.$partial, z.ZodString>>;
559
+ }, z.core.$strip>;
560
+ measurementUnit: z.ZodObject<{
561
+ id: z.ZodInt;
562
+ code: z.ZodString;
563
+ name: z.ZodString;
564
+ decimalPlaces: z.ZodInt;
565
+ }, z.core.$strip>;
566
+ }, z.core.$strip>;
540
567
  declare const deliveryItemDetailsSchema: z.ZodObject<{
541
568
  id: z.ZodInt;
542
569
  deliveryId: z.ZodInt;
@@ -572,6 +599,33 @@ declare const deliveryItemDetailsSchema: z.ZodObject<{
572
599
  decimalPlaces: z.ZodInt;
573
600
  }, z.core.$strip>;
574
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>;
575
629
  declare const deliveryItemScanPayloadSchema: z.ZodObject<{
576
630
  deliveryId: z.ZodInt;
577
631
  barcode: z.ZodString;
@@ -613,6 +667,33 @@ declare const deliveryItemScanResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject
613
667
  decimalPlaces: z.ZodInt;
614
668
  }, z.core.$strip>;
615
669
  }, 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">;
616
697
  }, z.core.$strip>, z.ZodObject<{
617
698
  outcome: z.ZodLiteral<"product-variant-not-found">;
618
699
  barcode: z.ZodString;
@@ -631,7 +712,7 @@ declare const deliveryDetailsSchema: z.ZodObject<{
631
712
  notes: z.ZodNullable<z.ZodString>;
632
713
  exchangeRateId: z.ZodNullable<z.ZodInt>;
633
714
  exchangeRate: z.ZodNullable<z.ZodString>;
634
- exchangeRateValidFromDate: z.ZodNullable<z.ZodNullable<z.ZodISODate>>;
715
+ exchangeRateValidFromDate: z.ZodNullable<z.ZodISODate>;
635
716
  postedAt: z.ZodNullable<z.ZodDate>;
636
717
  updatedAt: z.ZodNullable<z.ZodDate>;
637
718
  createdAt: z.ZodDate;
@@ -678,7 +759,9 @@ type DeliveryItemUpdatePayload = z.infer<typeof deliveryItemUpdatePayloadSchema>
678
759
  type DeliveryItemDeletePayload = z.infer<typeof deliveryItemDeletePayloadSchema>;
679
760
  type DeliveryItemScanPayload = z.infer<typeof deliveryItemScanPayloadSchema>;
680
761
  type DeliveryItemScanResult = z.infer<typeof deliveryItemScanResultSchema>;
762
+ type DeliveryItemCatalogDetails = z.infer<typeof deliveryItemCatalogDetailsSchema>;
681
763
  type DeliveryItemDetails = z.infer<typeof deliveryItemDetailsSchema>;
764
+ type DeliveryItemScanMatch = z.infer<typeof deliveryItemScanMatchSchema>;
682
765
  type DeliveryItemResult = {
683
766
  deliveryItem: DeliveryItemDetails;
684
767
  };
@@ -1186,11 +1269,11 @@ declare const deliverySchema: z.ZodObject<{
1186
1269
  notes: z.ZodNullable<z.ZodString>;
1187
1270
  exchangeRateId: z.ZodNullable<z.ZodInt>;
1188
1271
  exchangeRate: z.ZodNullable<z.ZodString>;
1189
- exchangeRateValidFromDate: z.ZodNullable<z.ZodNullable<z.ZodISODate>>;
1272
+ exchangeRateValidFromDate: z.ZodNullable<z.ZodISODate>;
1190
1273
  postedAt: z.ZodNullable<z.ZodDate>;
1191
1274
  updatedAt: z.ZodNullable<z.ZodDate>;
1192
1275
  createdAt: z.ZodDate;
1193
1276
  }, z.core.$strip>;
1194
1277
  type Delivery = z.infer<typeof deliverySchema>;
1195
1278
  //#endregion
1196
- 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, 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 };
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 };