@esb-market-contracts/backend 1.0.39 → 1.0.41

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.
Files changed (3) hide show
  1. package/api.d.ts +102 -0
  2. package/package.json +1 -1
  3. package/types.d.ts +104 -18
package/api.d.ts CHANGED
@@ -711,6 +711,23 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
711
711
  unitCostBase: string | null;
712
712
  updatedAt: Date | null;
713
713
  createdAt: Date;
714
+ product: {
715
+ id: number;
716
+ model: string | null;
717
+ name: Partial<Record<"en" | "ka" | "ru", string>> | null;
718
+ };
719
+ productVariant: {
720
+ id: number;
721
+ sku: string | null;
722
+ barcode: string | null;
723
+ name: Partial<Record<"en" | "ka" | "ru", string>> | null;
724
+ };
725
+ measurementUnit: {
726
+ id: number;
727
+ code: string;
728
+ name: string;
729
+ decimalPlaces: number;
730
+ };
714
731
  }[];
715
732
  };
716
733
  }>;
@@ -750,6 +767,23 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
750
767
  unitCostBase: string | null;
751
768
  updatedAt: Date | null;
752
769
  createdAt: Date;
770
+ product: {
771
+ id: number;
772
+ model: string | null;
773
+ name: Partial<Record<"en" | "ka" | "ru", string>> | null;
774
+ };
775
+ productVariant: {
776
+ id: number;
777
+ sku: string | null;
778
+ barcode: string | null;
779
+ name: Partial<Record<"en" | "ka" | "ru", string>> | null;
780
+ };
781
+ measurementUnit: {
782
+ id: number;
783
+ code: string;
784
+ name: string;
785
+ decimalPlaces: number;
786
+ };
753
787
  }[];
754
788
  };
755
789
  }>;
@@ -866,6 +900,23 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
866
900
  unitCostBase: string | null;
867
901
  updatedAt: Date | null;
868
902
  createdAt: Date;
903
+ product: {
904
+ id: number;
905
+ model: string | null;
906
+ name: Partial<Record<"en" | "ka" | "ru", string>> | null;
907
+ };
908
+ productVariant: {
909
+ id: number;
910
+ sku: string | null;
911
+ barcode: string | null;
912
+ name: Partial<Record<"en" | "ka" | "ru", string>> | null;
913
+ };
914
+ measurementUnit: {
915
+ id: number;
916
+ code: string;
917
+ name: string;
918
+ decimalPlaces: number;
919
+ };
869
920
  };
870
921
  }>;
871
922
  outputFormat: "json";
@@ -894,6 +945,23 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
894
945
  unitCostBase: string | null;
895
946
  updatedAt: Date | null;
896
947
  createdAt: Date;
948
+ product: {
949
+ id: number;
950
+ model: string | null;
951
+ name: Partial<Record<"en" | "ka" | "ru", string>> | null;
952
+ };
953
+ productVariant: {
954
+ id: number;
955
+ sku: string | null;
956
+ barcode: string | null;
957
+ name: Partial<Record<"en" | "ka" | "ru", string>> | null;
958
+ };
959
+ measurementUnit: {
960
+ id: number;
961
+ code: string;
962
+ name: string;
963
+ decimalPlaces: number;
964
+ };
897
965
  };
898
966
  } | {
899
967
  outcome: "product-variant-not-found";
@@ -922,6 +990,23 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
922
990
  unitCostBase: string | null;
923
991
  updatedAt: Date | null;
924
992
  createdAt: Date;
993
+ product: {
994
+ id: number;
995
+ model: string | null;
996
+ name: Partial<Record<"en" | "ka" | "ru", string>> | null;
997
+ };
998
+ productVariant: {
999
+ id: number;
1000
+ sku: string | null;
1001
+ barcode: string | null;
1002
+ name: Partial<Record<"en" | "ka" | "ru", string>> | null;
1003
+ };
1004
+ measurementUnit: {
1005
+ id: number;
1006
+ code: string;
1007
+ name: string;
1008
+ decimalPlaces: number;
1009
+ };
925
1010
  };
926
1011
  }>;
927
1012
  outputFormat: "json";
@@ -948,6 +1033,23 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
948
1033
  unitCostBase: string | null;
949
1034
  updatedAt: Date | null;
950
1035
  createdAt: Date;
1036
+ product: {
1037
+ id: number;
1038
+ model: string | null;
1039
+ name: Partial<Record<"en" | "ka" | "ru", string>> | null;
1040
+ };
1041
+ productVariant: {
1042
+ id: number;
1043
+ sku: string | null;
1044
+ barcode: string | null;
1045
+ name: Partial<Record<"en" | "ka" | "ru", string>> | null;
1046
+ };
1047
+ measurementUnit: {
1048
+ id: number;
1049
+ code: string;
1050
+ name: string;
1051
+ decimalPlaces: number;
1052
+ };
951
1053
  };
952
1054
  }>;
953
1055
  outputFormat: "json";
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.39",
4
+ "version": "1.0.41",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "sideEffects": false,
package/types.d.ts CHANGED
@@ -389,19 +389,6 @@ type CustomerSelectOneQuery = z.infer<typeof customerSelectOneQuerySchema>;
389
389
  type CustomerCreatePayload = z.infer<typeof customerCreatePayloadSchema>;
390
390
  type CustomerUpdatePayload = z.infer<typeof customerUpdatePayloadSchema>;
391
391
  //#endregion
392
- //#region src/app/domain/(procurement)/delivery-items/delivery-items.schemas.d.ts
393
- declare const deliveryItemSchema: z.ZodObject<{
394
- id: z.ZodInt;
395
- deliveryId: z.ZodInt;
396
- productVariantId: z.ZodInt;
397
- quantity: z.ZodNumber;
398
- unitCost: z.ZodNullable<z.ZodString>;
399
- unitCostBase: z.ZodNullable<z.ZodString>;
400
- updatedAt: z.ZodNullable<z.ZodDate>;
401
- createdAt: z.ZodDate;
402
- }, z.core.$strip>;
403
- type DeliveryItem = z.infer<typeof deliveryItemSchema>;
404
- //#endregion
405
392
  //#region src/app/flows/(procurement)/delivery/delivery.schemas.d.ts
406
393
  declare const deliveryCreatePayloadSchema: z.ZodObject<{
407
394
  supplierId: z.ZodInt;
@@ -507,7 +494,7 @@ declare const deliverySearchItemSchema: z.ZodObject<{
507
494
  notes: z.ZodNullable<z.ZodString>;
508
495
  exchangeRateId: z.ZodNullable<z.ZodInt>;
509
496
  exchangeRate: z.ZodNullable<z.ZodString>;
510
- exchangeRateValidFromDate: z.ZodNullable<z.ZodNullable<z.ZodISODate>>;
497
+ exchangeRateValidFromDate: z.ZodNullable<z.ZodISODate>;
511
498
  postedAt: z.ZodNullable<z.ZodDate>;
512
499
  updatedAt: z.ZodNullable<z.ZodDate>;
513
500
  createdAt: z.ZodDate;
@@ -550,6 +537,41 @@ declare const deliveryItemUpdatePayloadSchema: z.ZodObject<{
550
537
  declare const deliveryItemDeletePayloadSchema: z.ZodObject<{
551
538
  deliveryItemId: z.ZodInt;
552
539
  }, z.core.$strip>;
540
+ declare const deliveryItemDetailsSchema: z.ZodObject<{
541
+ id: z.ZodInt;
542
+ deliveryId: z.ZodInt;
543
+ productVariantId: z.ZodInt;
544
+ quantity: z.ZodNumber;
545
+ unitCost: z.ZodNullable<z.ZodString>;
546
+ unitCostBase: z.ZodNullable<z.ZodString>;
547
+ updatedAt: z.ZodNullable<z.ZodDate>;
548
+ createdAt: z.ZodDate;
549
+ product: z.ZodObject<{
550
+ id: z.ZodInt;
551
+ model: z.ZodNullable<z.ZodString>;
552
+ name: z.ZodNullable<z.ZodRecord<z.ZodEnum<{
553
+ en: "en";
554
+ ka: "ka";
555
+ ru: "ru";
556
+ }> & z.core.$partial, z.ZodString>>;
557
+ }, z.core.$strip>;
558
+ productVariant: z.ZodObject<{
559
+ id: z.ZodInt;
560
+ sku: z.ZodNullable<z.ZodString>;
561
+ barcode: z.ZodNullable<z.ZodString>;
562
+ name: z.ZodNullable<z.ZodRecord<z.ZodEnum<{
563
+ en: "en";
564
+ ka: "ka";
565
+ ru: "ru";
566
+ }> & z.core.$partial, z.ZodString>>;
567
+ }, z.core.$strip>;
568
+ measurementUnit: z.ZodObject<{
569
+ id: z.ZodInt;
570
+ code: z.ZodString;
571
+ name: z.ZodString;
572
+ decimalPlaces: z.ZodInt;
573
+ }, z.core.$strip>;
574
+ }, z.core.$strip>;
553
575
  declare const deliveryItemScanPayloadSchema: z.ZodObject<{
554
576
  deliveryId: z.ZodInt;
555
577
  barcode: z.ZodString;
@@ -565,6 +587,31 @@ declare const deliveryItemScanResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject
565
587
  unitCostBase: z.ZodNullable<z.ZodString>;
566
588
  updatedAt: z.ZodNullable<z.ZodDate>;
567
589
  createdAt: z.ZodDate;
590
+ product: z.ZodObject<{
591
+ id: z.ZodInt;
592
+ model: z.ZodNullable<z.ZodString>;
593
+ name: z.ZodNullable<z.ZodRecord<z.ZodEnum<{
594
+ en: "en";
595
+ ka: "ka";
596
+ ru: "ru";
597
+ }> & z.core.$partial, z.ZodString>>;
598
+ }, z.core.$strip>;
599
+ productVariant: z.ZodObject<{
600
+ id: z.ZodInt;
601
+ sku: z.ZodNullable<z.ZodString>;
602
+ barcode: z.ZodNullable<z.ZodString>;
603
+ name: z.ZodNullable<z.ZodRecord<z.ZodEnum<{
604
+ en: "en";
605
+ ka: "ka";
606
+ ru: "ru";
607
+ }> & z.core.$partial, z.ZodString>>;
608
+ }, z.core.$strip>;
609
+ measurementUnit: z.ZodObject<{
610
+ id: z.ZodInt;
611
+ code: z.ZodString;
612
+ name: z.ZodString;
613
+ decimalPlaces: z.ZodInt;
614
+ }, z.core.$strip>;
568
615
  }, z.core.$strip>;
569
616
  }, z.core.$strip>, z.ZodObject<{
570
617
  outcome: z.ZodLiteral<"product-variant-not-found">;
@@ -584,7 +631,7 @@ declare const deliveryDetailsSchema: z.ZodObject<{
584
631
  notes: z.ZodNullable<z.ZodString>;
585
632
  exchangeRateId: z.ZodNullable<z.ZodInt>;
586
633
  exchangeRate: z.ZodNullable<z.ZodString>;
587
- exchangeRateValidFromDate: z.ZodNullable<z.ZodNullable<z.ZodISODate>>;
634
+ exchangeRateValidFromDate: z.ZodNullable<z.ZodISODate>;
588
635
  postedAt: z.ZodNullable<z.ZodDate>;
589
636
  updatedAt: z.ZodNullable<z.ZodDate>;
590
637
  createdAt: z.ZodDate;
@@ -597,6 +644,31 @@ declare const deliveryDetailsSchema: z.ZodObject<{
597
644
  unitCostBase: z.ZodNullable<z.ZodString>;
598
645
  updatedAt: z.ZodNullable<z.ZodDate>;
599
646
  createdAt: z.ZodDate;
647
+ product: z.ZodObject<{
648
+ id: z.ZodInt;
649
+ model: z.ZodNullable<z.ZodString>;
650
+ name: z.ZodNullable<z.ZodRecord<z.ZodEnum<{
651
+ en: "en";
652
+ ka: "ka";
653
+ ru: "ru";
654
+ }> & z.core.$partial, z.ZodString>>;
655
+ }, z.core.$strip>;
656
+ productVariant: z.ZodObject<{
657
+ id: z.ZodInt;
658
+ sku: z.ZodNullable<z.ZodString>;
659
+ barcode: z.ZodNullable<z.ZodString>;
660
+ name: z.ZodNullable<z.ZodRecord<z.ZodEnum<{
661
+ en: "en";
662
+ ka: "ka";
663
+ ru: "ru";
664
+ }> & z.core.$partial, z.ZodString>>;
665
+ }, z.core.$strip>;
666
+ measurementUnit: z.ZodObject<{
667
+ id: z.ZodInt;
668
+ code: z.ZodString;
669
+ name: z.ZodString;
670
+ decimalPlaces: z.ZodInt;
671
+ }, z.core.$strip>;
600
672
  }, z.core.$strip>>;
601
673
  }, z.core.$strip>;
602
674
  type DeliveryDeletePayload = z.infer<typeof deliveryDeletePayloadSchema>;
@@ -606,8 +678,9 @@ type DeliveryItemUpdatePayload = z.infer<typeof deliveryItemUpdatePayloadSchema>
606
678
  type DeliveryItemDeletePayload = z.infer<typeof deliveryItemDeletePayloadSchema>;
607
679
  type DeliveryItemScanPayload = z.infer<typeof deliveryItemScanPayloadSchema>;
608
680
  type DeliveryItemScanResult = z.infer<typeof deliveryItemScanResultSchema>;
681
+ type DeliveryItemDetails = z.infer<typeof deliveryItemDetailsSchema>;
609
682
  type DeliveryItemResult = {
610
- deliveryItem: DeliveryItem;
683
+ deliveryItem: DeliveryItemDetails;
611
684
  };
612
685
  type DeliveryDetails = z.infer<typeof deliveryDetailsSchema>;
613
686
  type DeliveryCreateResult = {
@@ -1085,6 +1158,19 @@ type ProductVariantCreateResult = {
1085
1158
  };
1086
1159
  type ProductVariantUpdatePayload = z.infer<typeof productVariantUpdatePayloadSchema>;
1087
1160
  //#endregion
1161
+ //#region src/app/domain/(procurement)/delivery-items/delivery-items.schemas.d.ts
1162
+ declare const deliveryItemSchema: z.ZodObject<{
1163
+ id: z.ZodInt;
1164
+ deliveryId: z.ZodInt;
1165
+ productVariantId: z.ZodInt;
1166
+ quantity: z.ZodNumber;
1167
+ unitCost: z.ZodNullable<z.ZodString>;
1168
+ unitCostBase: z.ZodNullable<z.ZodString>;
1169
+ updatedAt: z.ZodNullable<z.ZodDate>;
1170
+ createdAt: z.ZodDate;
1171
+ }, z.core.$strip>;
1172
+ type DeliveryItem = z.infer<typeof deliveryItemSchema>;
1173
+ //#endregion
1088
1174
  //#region src/app/domain/(procurement)/deliveries/deliveries.schemas.d.ts
1089
1175
  declare const deliverySchema: z.ZodObject<{
1090
1176
  id: z.ZodInt;
@@ -1100,11 +1186,11 @@ declare const deliverySchema: z.ZodObject<{
1100
1186
  notes: z.ZodNullable<z.ZodString>;
1101
1187
  exchangeRateId: z.ZodNullable<z.ZodInt>;
1102
1188
  exchangeRate: z.ZodNullable<z.ZodString>;
1103
- exchangeRateValidFromDate: z.ZodNullable<z.ZodNullable<z.ZodISODate>>;
1189
+ exchangeRateValidFromDate: z.ZodNullable<z.ZodISODate>;
1104
1190
  postedAt: z.ZodNullable<z.ZodDate>;
1105
1191
  updatedAt: z.ZodNullable<z.ZodDate>;
1106
1192
  createdAt: z.ZodDate;
1107
1193
  }, z.core.$strip>;
1108
1194
  type Delivery = z.infer<typeof deliverySchema>;
1109
1195
  //#endregion
1110
- 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, 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 };
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 };