@esb-market-contracts/backend 1.0.43 → 1.0.44

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
@@ -963,6 +963,35 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
963
963
  decimalPlaces: number;
964
964
  };
965
965
  };
966
+ } | {
967
+ outcome: "unchanged";
968
+ deliveryItem: {
969
+ id: number;
970
+ deliveryId: number;
971
+ productVariantId: number;
972
+ quantity: number | null;
973
+ unitCost: string | null;
974
+ unitCostBase: string | null;
975
+ updatedAt: Date | null;
976
+ createdAt: Date;
977
+ product: {
978
+ id: number;
979
+ model: string | null;
980
+ name: Partial<Record<"en" | "ka" | "ru", string>> | null;
981
+ };
982
+ productVariant: {
983
+ id: number;
984
+ sku: string | null;
985
+ barcode: string | null;
986
+ name: Partial<Record<"en" | "ka" | "ru", string>> | null;
987
+ };
988
+ measurementUnit: {
989
+ id: number;
990
+ code: string;
991
+ name: string;
992
+ decimalPlaces: number;
993
+ };
994
+ };
966
995
  } | {
967
996
  outcome: "product-variant-not-found";
968
997
  barcode: string;
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.44",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "sideEffects": false,
package/types.d.ts CHANGED
@@ -521,7 +521,7 @@ 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
+ quantity: z.ZodOptional<z.ZodNumber>;
525
525
  }, {
526
526
  out: {};
527
527
  in: {};
@@ -640,6 +640,43 @@ declare const deliveryItemScanResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject
640
640
  decimalPlaces: z.ZodInt;
641
641
  }, z.core.$strip>;
642
642
  }, z.core.$strip>;
643
+ }, z.core.$strip>, z.ZodObject<{
644
+ outcome: z.ZodLiteral<"unchanged">;
645
+ deliveryItem: z.ZodObject<{
646
+ id: z.ZodInt;
647
+ deliveryId: z.ZodInt;
648
+ productVariantId: z.ZodInt;
649
+ quantity: z.ZodNullable<z.ZodNumber>;
650
+ unitCost: z.ZodNullable<z.ZodString>;
651
+ unitCostBase: z.ZodNullable<z.ZodString>;
652
+ updatedAt: z.ZodNullable<z.ZodDate>;
653
+ createdAt: z.ZodDate;
654
+ product: z.ZodObject<{
655
+ id: z.ZodInt;
656
+ model: z.ZodNullable<z.ZodString>;
657
+ name: z.ZodNullable<z.ZodRecord<z.ZodEnum<{
658
+ en: "en";
659
+ ka: "ka";
660
+ ru: "ru";
661
+ }> & z.core.$partial, z.ZodString>>;
662
+ }, z.core.$strip>;
663
+ productVariant: z.ZodObject<{
664
+ id: z.ZodInt;
665
+ sku: z.ZodNullable<z.ZodString>;
666
+ barcode: z.ZodNullable<z.ZodString>;
667
+ name: z.ZodNullable<z.ZodRecord<z.ZodEnum<{
668
+ en: "en";
669
+ ka: "ka";
670
+ ru: "ru";
671
+ }> & z.core.$partial, z.ZodString>>;
672
+ }, z.core.$strip>;
673
+ measurementUnit: z.ZodObject<{
674
+ id: z.ZodInt;
675
+ code: z.ZodString;
676
+ name: z.ZodString;
677
+ decimalPlaces: z.ZodInt;
678
+ }, z.core.$strip>;
679
+ }, z.core.$strip>;
643
680
  }, z.core.$strip>, z.ZodObject<{
644
681
  outcome: z.ZodLiteral<"product-variant-not-found">;
645
682
  barcode: z.ZodString;