@esb-market-contracts/backend 1.0.34 → 1.0.35

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 (5) hide show
  1. package/api.d.ts +186 -3
  2. package/enums.d.ts +10 -1
  3. package/enums.js +18 -10
  4. package/package.json +1 -1
  5. package/types.d.ts +145 -25
package/api.d.ts CHANGED
@@ -680,6 +680,189 @@ declare const exchangeRatesRouter: import("hono/hono-base").HonoBase<{
680
680
  }, "/finance/exchange-rates", "/finance/exchange-rates/search">;
681
681
  type ExchangeRatesRouter = typeof exchangeRatesRouter;
682
682
  //#endregion
683
+ //#region src/app/routes/(procurement)/deliveries.routes.d.ts
684
+ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
685
+ Variables: VariablesWithActor;
686
+ }, {
687
+ "/operations/deliveries/one": {
688
+ $get: {
689
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
690
+ delivery: {
691
+ id: number;
692
+ code: string;
693
+ supplierId: number;
694
+ warehouseId: number;
695
+ currencyId: number;
696
+ status: "draft" | "posted" | "reversed";
697
+ notes: string | null;
698
+ postedAt: Date | null;
699
+ updatedAt: Date | null;
700
+ createdAt: Date;
701
+ items: {
702
+ id: number;
703
+ deliveryId: number;
704
+ productVariantId: number;
705
+ quantity: number;
706
+ unitCost: string | null;
707
+ updatedAt: Date | null;
708
+ createdAt: Date;
709
+ }[];
710
+ };
711
+ }>;
712
+ outputFormat: "json";
713
+ status: 200;
714
+ input: {
715
+ query: {
716
+ id: string | string[];
717
+ };
718
+ };
719
+ };
720
+ };
721
+ } & {
722
+ "/operations/deliveries/create": {
723
+ $post: {
724
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
725
+ delivery: {
726
+ id: number;
727
+ code: string;
728
+ supplierId: number;
729
+ warehouseId: number;
730
+ currencyId: number;
731
+ status: "draft" | "posted" | "reversed";
732
+ notes: string | null;
733
+ postedAt: Date | null;
734
+ updatedAt: Date | null;
735
+ createdAt: Date;
736
+ items: {
737
+ id: number;
738
+ deliveryId: number;
739
+ productVariantId: number;
740
+ quantity: number;
741
+ unitCost: string | null;
742
+ updatedAt: Date | null;
743
+ createdAt: Date;
744
+ }[];
745
+ };
746
+ }>;
747
+ outputFormat: "json";
748
+ status: 201;
749
+ input: {
750
+ json: {
751
+ supplierId: number;
752
+ warehouseId: number;
753
+ currencyId: number;
754
+ notes?: string | null | undefined;
755
+ };
756
+ };
757
+ };
758
+ };
759
+ } & {
760
+ "/operations/deliveries/update": {
761
+ $post: {
762
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
763
+ outputFormat: "json";
764
+ status: 200;
765
+ input: {
766
+ json: {
767
+ supplierId?: number | undefined;
768
+ warehouseId?: number | undefined;
769
+ currencyId?: number | undefined;
770
+ notes?: string | null | undefined;
771
+ deliveryId: number;
772
+ };
773
+ };
774
+ };
775
+ };
776
+ } & {
777
+ "/operations/deliveries/delete": {
778
+ $post: {
779
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
780
+ outputFormat: "json";
781
+ status: 200;
782
+ input: {
783
+ json: {
784
+ deliveryId: number;
785
+ };
786
+ };
787
+ };
788
+ };
789
+ } & {
790
+ "/operations/deliveries/item/add": {
791
+ $post: {
792
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
793
+ deliveryItem: {
794
+ id: number;
795
+ deliveryId: number;
796
+ productVariantId: number;
797
+ quantity: number;
798
+ unitCost: string | null;
799
+ updatedAt: Date | null;
800
+ createdAt: Date;
801
+ };
802
+ }>;
803
+ outputFormat: "json";
804
+ status: 200;
805
+ input: {
806
+ json: {
807
+ deliveryId: number;
808
+ productVariantId: number;
809
+ unitCost: string | null;
810
+ quantity?: number | undefined;
811
+ };
812
+ };
813
+ };
814
+ };
815
+ } & {
816
+ "/operations/deliveries/item/update": {
817
+ $post: {
818
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
819
+ deliveryItem: {
820
+ id: number;
821
+ deliveryId: number;
822
+ productVariantId: number;
823
+ quantity: number;
824
+ unitCost: string | null;
825
+ updatedAt: Date | null;
826
+ createdAt: Date;
827
+ };
828
+ }>;
829
+ outputFormat: "json";
830
+ status: 200;
831
+ input: {
832
+ json: {
833
+ quantity?: number | undefined;
834
+ unitCost?: string | null | undefined;
835
+ deliveryItemId: number;
836
+ };
837
+ };
838
+ };
839
+ };
840
+ } & {
841
+ "/operations/deliveries/item/delete": {
842
+ $post: {
843
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
844
+ deliveryItem: {
845
+ id: number;
846
+ deliveryId: number;
847
+ productVariantId: number;
848
+ quantity: number;
849
+ unitCost: string | null;
850
+ updatedAt: Date | null;
851
+ createdAt: Date;
852
+ };
853
+ }>;
854
+ outputFormat: "json";
855
+ status: 200;
856
+ input: {
857
+ json: {
858
+ deliveryItemId: number;
859
+ };
860
+ };
861
+ };
862
+ };
863
+ }, "/operations/deliveries", "/operations/deliveries/item/delete">;
864
+ type DeliveriesRouter = typeof deliveriesRouter;
865
+ //#endregion
683
866
  //#region src/app/flows/(audit)/audit/audit.enums.d.ts
684
867
  declare const auditLogSourcesArray: readonly ['admin', 'backend'];
685
868
  type AuditLogSource = (typeof auditLogSourcesArray)[number];
@@ -701,11 +884,11 @@ declare const auditLogSchema: import("drizzle-orm/zod").BuildSchema<"select", {
701
884
  identity: undefined;
702
885
  generated: undefined;
703
886
  }>;
704
- event: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>>, "brand.created" | "brand.updated" | "category.activated" | "category.archived" | "category.created" | "category.updated" | "country.created" | "country.updated" | "customer.created" | "customer.updated" | "product.created" | "product.deleted" | "product.updated" | "productVariant.created" | "productVariant.deleted" | "productVariant.updated" | "supplier.activated" | "supplier.archived" | "supplier.created" | "supplier.updated" | "warehouse.activated" | "warehouse.archived" | "warehouse.created" | "warehouse.updated">, {
887
+ event: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>>, "brand.created" | "brand.updated" | "category.activated" | "category.archived" | "category.created" | "category.updated" | "country.created" | "country.updated" | "customer.created" | "customer.updated" | "delivery.created" | "delivery.deleted" | "delivery.itemAdded" | "delivery.itemDeleted" | "delivery.itemUpdated" | "delivery.updated" | "product.created" | "product.deleted" | "product.updated" | "productVariant.created" | "productVariant.deleted" | "productVariant.updated" | "supplier.activated" | "supplier.archived" | "supplier.created" | "supplier.updated" | "warehouse.activated" | "warehouse.archived" | "warehouse.created" | "warehouse.updated">, {
705
888
  name: string;
706
889
  tableName: "audit_logs";
707
890
  dataType: "string";
708
- data: "brand.created" | "brand.updated" | "category.activated" | "category.archived" | "category.created" | "category.updated" | "country.created" | "country.updated" | "customer.created" | "customer.updated" | "product.created" | "product.deleted" | "product.updated" | "productVariant.created" | "productVariant.deleted" | "productVariant.updated" | "supplier.activated" | "supplier.archived" | "supplier.created" | "supplier.updated" | "warehouse.activated" | "warehouse.archived" | "warehouse.created" | "warehouse.updated";
891
+ data: "brand.created" | "brand.updated" | "category.activated" | "category.archived" | "category.created" | "category.updated" | "country.created" | "country.updated" | "customer.created" | "customer.updated" | "delivery.created" | "delivery.deleted" | "delivery.itemAdded" | "delivery.itemDeleted" | "delivery.itemUpdated" | "delivery.updated" | "product.created" | "product.deleted" | "product.updated" | "productVariant.created" | "productVariant.deleted" | "productVariant.updated" | "supplier.activated" | "supplier.archived" | "supplier.created" | "supplier.updated" | "warehouse.activated" | "warehouse.archived" | "warehouse.created" | "warehouse.updated";
709
892
  driverParam: string;
710
893
  notNull: true;
711
894
  hasDefault: false;
@@ -1157,4 +1340,4 @@ declare const warehousesRouter: import("hono/hono-base").HonoBase<{
1157
1340
  }, "/operations/warehouses", "/operations/warehouses/switch-status">;
1158
1341
  type WarehousesRouter = typeof warehousesRouter;
1159
1342
  //#endregion
1160
- export type { AuditLogsRouter, BrandsRouter, CategoriesRouter, CountriesRouter, CustomersRouter, ExchangeRatesRouter, MeasurementUnitsRouter, ProductVariantsRouter, ProductsRouter, SuppliersRouter, WarehousesRouter };
1343
+ export type { AuditLogsRouter, BrandsRouter, CategoriesRouter, CountriesRouter, CustomersRouter, DeliveriesRouter, ExchangeRatesRouter, MeasurementUnitsRouter, ProductVariantsRouter, ProductsRouter, SuppliersRouter, WarehousesRouter };
package/enums.d.ts CHANGED
@@ -18,6 +18,15 @@ declare const entityStatusesRecord: Readonly<{
18
18
  }>;
19
19
  type EntityStatus = (typeof entityStatusesArray)[number];
20
20
  //#endregion
21
+ //#region src/app/domain/(procurement)/deliveries/deliveries.enums.d.ts
22
+ declare const deliveryStatusesArray: readonly ['draft', 'posted', 'reversed'];
23
+ declare const deliveryStatusesRecord: Readonly<{
24
+ DRAFT: "draft";
25
+ POSTED: "posted";
26
+ REVERSED: "reversed";
27
+ }>;
28
+ type DeliveryStatus = (typeof deliveryStatusesArray)[number];
29
+ //#endregion
21
30
  //#region src/app/flows/(audit)/audit/audit.enums.d.ts
22
31
  export declare const auditLogSourcesArray: readonly ['admin', 'backend'];
23
32
  declare const auditLogSourcesRecord: Readonly<{
@@ -44,4 +53,4 @@ declare const productStatusesRecord: Readonly<{
44
53
  }>;
45
54
  type ProductStatus = (typeof productStatusesArray)[number];
46
55
  //#endregion
47
- export { type AuditLogSource, type CustomerType, type EntityStatus, type Locale, type ProductStatus, auditLogSourcesRecord as auditLogSource, customerTypesRecord as customerType, entityStatusesRecord as entityStatus, productStatusesRecord as productStatus };
56
+ export { type AuditLogSource, type CustomerType, type DeliveryStatus, type EntityStatus, type Locale, type ProductStatus, auditLogSourcesRecord as auditLogSource, customerTypesRecord as customerType, deliveryStatusesRecord as deliveryStatus, entityStatusesRecord as entityStatus, productStatusesRecord as productStatus };
package/enums.js CHANGED
@@ -18,31 +18,39 @@ var entityStatusesArray = ["active", "archived"];
18
18
  var entityStatusPGEnum = pgEnum("entity_status", entityStatusesArray);
19
19
  var entityStatusesRecord = createStringEnumRecord2(entityStatusesArray);
20
20
 
21
- // src/app/flows/(audit)/audit/audit.enums.ts
21
+ // src/app/domain/(procurement)/deliveries/deliveries.enums.ts
22
22
  import { createStringEnumRecord as createStringEnumRecord3 } from "@kalutskii/foundation";
23
+ import { pgEnum as pgEnum2 } from "drizzle-orm/pg-core";
24
+ var deliveryStatusesArray = ["draft", "posted", "reversed"];
25
+ var deliveryStatusPGEnum = pgEnum2("delivery_status", deliveryStatusesArray);
26
+ var deliveryStatusesRecord = createStringEnumRecord3(deliveryStatusesArray);
27
+
28
+ // src/app/flows/(audit)/audit/audit.enums.ts
29
+ import { createStringEnumRecord as createStringEnumRecord4 } from "@kalutskii/foundation";
23
30
  import { z as z2 } from "zod";
24
31
  var auditLogSourcesArray = ["admin", "backend"];
25
- var auditLogSourcesRecord = createStringEnumRecord3(auditLogSourcesArray);
32
+ var auditLogSourcesRecord = createStringEnumRecord4(auditLogSourcesArray);
26
33
  var auditLogSourceSchema = z2.enum(auditLogSourcesArray);
27
34
 
28
35
  // src/app/domain/(sales)/customers/customers.enums.ts
29
- import { createStringEnumRecord as createStringEnumRecord4 } from "@kalutskii/foundation";
30
- import { pgEnum as pgEnum2 } from "drizzle-orm/pg-core";
36
+ import { createStringEnumRecord as createStringEnumRecord5 } from "@kalutskii/foundation";
37
+ import { pgEnum as pgEnum3 } from "drizzle-orm/pg-core";
31
38
  var customerTypesArray = ["individual", "individual_entrepreneur", "legal_entity"];
32
- var customerTypePGEnum = pgEnum2("customer_type", customerTypesArray);
33
- var customerTypesRecord = createStringEnumRecord4(customerTypesArray);
39
+ var customerTypePGEnum = pgEnum3("customer_type", customerTypesArray);
40
+ var customerTypesRecord = createStringEnumRecord5(customerTypesArray);
34
41
 
35
42
  // src/app/domain/(catalog)/products/products.enums.ts
36
- import { createStringEnumRecord as createStringEnumRecord5 } from "@kalutskii/foundation";
37
- import { pgEnum as pgEnum3 } from "drizzle-orm/pg-core";
43
+ import { createStringEnumRecord as createStringEnumRecord6 } from "@kalutskii/foundation";
44
+ import { pgEnum as pgEnum4 } from "drizzle-orm/pg-core";
38
45
  var productStatusesArray = ["draft", "active", "archived"];
39
- var productStatusPGEnum = pgEnum3("product_status", productStatusesArray);
40
- var productStatusesRecord = createStringEnumRecord5(productStatusesArray);
46
+ var productStatusPGEnum = pgEnum4("product_status", productStatusesArray);
47
+ var productStatusesRecord = createStringEnumRecord6(productStatusesArray);
41
48
  export {
42
49
  auditLogSourcesRecord as auditLogSource,
43
50
  auditLogSourcesArray,
44
51
  customerTypesRecord as customerType,
45
52
  customerTypesArray,
53
+ deliveryStatusesRecord as deliveryStatus,
46
54
  entityStatusesRecord as entityStatus,
47
55
  locale,
48
56
  localesArray,
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.34",
4
+ "version": "1.0.35",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "sideEffects": false,
package/types.d.ts CHANGED
@@ -54,9 +54,9 @@ declare const brandCreatePayloadSchema: z.ZodObject<{
54
54
  en: "en";
55
55
  ka: "ka";
56
56
  ru: "ru";
57
- }> & z.core.$partial, z.ZodString>>;
58
- websiteUrl: z.ZodPreprocess<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodURL>>>;
59
- notes: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
57
+ }> & z.core.$partial, z.ZodString>, unknown>;
58
+ websiteUrl: z.ZodPreprocess<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodURL>>, unknown>;
59
+ notes: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodString>>, unknown>;
60
60
  countryId: z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>;
61
61
  logotype: z.ZodFile;
62
62
  }, {
@@ -69,9 +69,9 @@ declare const brandUpdatePayloadSchema: z.ZodObject<{
69
69
  en: "en";
70
70
  ka: "ka";
71
71
  ru: "ru";
72
- }> & z.core.$partial, z.ZodString>>>;
73
- websiteUrl: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodURL>>>>;
74
- notes: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
72
+ }> & z.core.$partial, z.ZodString>, unknown>>;
73
+ websiteUrl: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodURL>>>, unknown>;
74
+ notes: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodString>>, unknown>;
75
75
  countryId: z.ZodOptional<z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>>;
76
76
  logotype: z.ZodOptional<z.ZodFile>;
77
77
  brandId: z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>;
@@ -221,7 +221,7 @@ declare const countryCreatePayloadSchema: z.ZodObject<{
221
221
  en: "en";
222
222
  ka: "ka";
223
223
  ru: "ru";
224
- }> & z.core.$partial, z.ZodString>>;
224
+ }> & z.core.$partial, z.ZodString>, unknown>;
225
225
  flagImage: z.ZodFile;
226
226
  }, {
227
227
  out: {};
@@ -233,7 +233,7 @@ declare const countryUpdatePayloadSchema: z.ZodObject<{
233
233
  en: "en";
234
234
  ka: "ka";
235
235
  ru: "ru";
236
- }> & z.core.$partial, z.ZodString>>>;
236
+ }> & z.core.$partial, z.ZodString>, unknown>>;
237
237
  flagImage: z.ZodOptional<z.ZodFile>;
238
238
  countryId: z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>;
239
239
  }, {
@@ -280,11 +280,11 @@ declare const auditLogSchema: import("drizzle-orm/zod").BuildSchema<"select", {
280
280
  identity: undefined;
281
281
  generated: undefined;
282
282
  }>;
283
- event: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>>, "brand.created" | "brand.updated" | "category.activated" | "category.archived" | "category.created" | "category.updated" | "country.created" | "country.updated" | "customer.created" | "customer.updated" | "product.created" | "product.deleted" | "product.updated" | "productVariant.created" | "productVariant.deleted" | "productVariant.updated" | "supplier.activated" | "supplier.archived" | "supplier.created" | "supplier.updated" | "warehouse.activated" | "warehouse.archived" | "warehouse.created" | "warehouse.updated">, {
283
+ event: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>>, "brand.created" | "brand.updated" | "category.activated" | "category.archived" | "category.created" | "category.updated" | "country.created" | "country.updated" | "customer.created" | "customer.updated" | "delivery.created" | "delivery.deleted" | "delivery.itemAdded" | "delivery.itemDeleted" | "delivery.itemUpdated" | "delivery.updated" | "product.created" | "product.deleted" | "product.updated" | "productVariant.created" | "productVariant.deleted" | "productVariant.updated" | "supplier.activated" | "supplier.archived" | "supplier.created" | "supplier.updated" | "warehouse.activated" | "warehouse.archived" | "warehouse.created" | "warehouse.updated">, {
284
284
  name: string;
285
285
  tableName: "audit_logs";
286
286
  dataType: "string";
287
- data: "brand.created" | "brand.updated" | "category.activated" | "category.archived" | "category.created" | "category.updated" | "country.created" | "country.updated" | "customer.created" | "customer.updated" | "product.created" | "product.deleted" | "product.updated" | "productVariant.created" | "productVariant.deleted" | "productVariant.updated" | "supplier.activated" | "supplier.archived" | "supplier.created" | "supplier.updated" | "warehouse.activated" | "warehouse.archived" | "warehouse.created" | "warehouse.updated";
287
+ data: "brand.created" | "brand.updated" | "category.activated" | "category.archived" | "category.created" | "category.updated" | "country.created" | "country.updated" | "customer.created" | "customer.updated" | "delivery.created" | "delivery.deleted" | "delivery.itemAdded" | "delivery.itemDeleted" | "delivery.itemUpdated" | "delivery.updated" | "product.created" | "product.deleted" | "product.updated" | "productVariant.created" | "productVariant.deleted" | "productVariant.updated" | "supplier.activated" | "supplier.archived" | "supplier.created" | "supplier.updated" | "warehouse.activated" | "warehouse.archived" | "warehouse.created" | "warehouse.updated";
288
288
  driverParam: string;
289
289
  notNull: true;
290
290
  hasDefault: false;
@@ -462,6 +462,107 @@ type CustomerSelectOneQuery = z.infer<typeof customerSelectOneQuerySchema>;
462
462
  type CustomerCreatePayload = z.infer<typeof customerCreatePayloadSchema>;
463
463
  type CustomerUpdatePayload = z.infer<typeof customerUpdatePayloadSchema>;
464
464
  //#endregion
465
+ //#region src/app/domain/(procurement)/delivery-items/delivery-items.schemas.d.ts
466
+ declare const deliveryItemSchema: z.ZodObject<{
467
+ id: z.ZodInt;
468
+ deliveryId: z.ZodInt;
469
+ productVariantId: z.ZodInt;
470
+ quantity: z.ZodNumber;
471
+ unitCost: z.ZodNullable<z.ZodString>;
472
+ updatedAt: z.ZodNullable<z.ZodDate>;
473
+ createdAt: z.ZodDate;
474
+ }, z.core.$strip>;
475
+ type DeliveryItem = z.infer<typeof deliveryItemSchema>;
476
+ //#endregion
477
+ //#region src/app/flows/(procurement)/delivery/delivery.schemas.d.ts
478
+ declare const deliverySelectOneQuerySchema: z.ZodObject<{
479
+ id: z.ZodInt;
480
+ }, z.core.$strip>;
481
+ declare const deliveryDeletePayloadSchema: z.ZodObject<{
482
+ deliveryId: z.ZodInt;
483
+ }, z.core.$strip>;
484
+ declare const deliveryCreatePayloadSchema: z.ZodObject<{
485
+ supplierId: z.ZodInt;
486
+ warehouseId: z.ZodInt;
487
+ currencyId: z.ZodInt;
488
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
489
+ }, {
490
+ out: {};
491
+ in: {};
492
+ }>;
493
+ declare const deliveryUpdatePayloadSchema: z.ZodObject<{
494
+ supplierId: z.ZodOptional<z.ZodInt>;
495
+ warehouseId: z.ZodOptional<z.ZodInt>;
496
+ currencyId: z.ZodOptional<z.ZodInt>;
497
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
498
+ deliveryId: z.ZodInt;
499
+ }, {
500
+ out: {};
501
+ in: {};
502
+ }>;
503
+ declare const deliveryItemAddPayloadSchema: z.ZodObject<{
504
+ deliveryId: z.ZodInt;
505
+ productVariantId: z.ZodInt;
506
+ unitCost: z.ZodNullable<z.ZodString>;
507
+ quantity: z.ZodDefault<z.ZodNumber>;
508
+ }, {
509
+ out: {};
510
+ in: {};
511
+ }>;
512
+ declare const deliveryItemUpdatePayloadSchema: z.ZodObject<{
513
+ quantity: z.ZodOptional<z.ZodNumber>;
514
+ unitCost: z.ZodOptional<z.ZodNullable<z.ZodString>>;
515
+ deliveryItemId: z.ZodInt;
516
+ }, {
517
+ out: {};
518
+ in: {};
519
+ }>;
520
+ declare const deliveryItemDeletePayloadSchema: z.ZodObject<{
521
+ deliveryItemId: z.ZodInt;
522
+ }, z.core.$strip>;
523
+ declare const deliveryDetailsSchema: z.ZodObject<{
524
+ id: z.ZodInt;
525
+ code: z.ZodString;
526
+ supplierId: z.ZodInt;
527
+ warehouseId: z.ZodInt;
528
+ currencyId: z.ZodInt;
529
+ status: z.ZodEnum<{
530
+ draft: "draft";
531
+ posted: "posted";
532
+ reversed: "reversed";
533
+ }>;
534
+ notes: z.ZodNullable<z.ZodString>;
535
+ postedAt: z.ZodNullable<z.ZodDate>;
536
+ updatedAt: z.ZodNullable<z.ZodDate>;
537
+ createdAt: z.ZodDate;
538
+ items: z.ZodArray<z.ZodObject<{
539
+ id: z.ZodInt;
540
+ deliveryId: z.ZodInt;
541
+ productVariantId: z.ZodInt;
542
+ quantity: z.ZodNumber;
543
+ unitCost: z.ZodNullable<z.ZodString>;
544
+ updatedAt: z.ZodNullable<z.ZodDate>;
545
+ createdAt: z.ZodDate;
546
+ }, z.core.$strip>>;
547
+ }, z.core.$strip>;
548
+ type DeliverySelectOneQuery = z.infer<typeof deliverySelectOneQuerySchema>;
549
+ type DeliveryCreatePayload = z.infer<typeof deliveryCreatePayloadSchema>;
550
+ type DeliveryUpdatePayload = z.infer<typeof deliveryUpdatePayloadSchema>;
551
+ type DeliveryDeletePayload = z.infer<typeof deliveryDeletePayloadSchema>;
552
+ type DeliveryItemAddPayload = z.infer<typeof deliveryItemAddPayloadSchema>;
553
+ type DeliveryItemUpdatePayload = z.infer<typeof deliveryItemUpdatePayloadSchema>;
554
+ type DeliveryItemDeletePayload = z.infer<typeof deliveryItemDeletePayloadSchema>;
555
+ type DeliveryItemResult = {
556
+ deliveryItem: DeliveryItem;
557
+ };
558
+ type DeliveryDetails = z.infer<typeof deliveryDetailsSchema>;
559
+ type DeliveryCreateResult = {
560
+ delivery: DeliveryDetails;
561
+ };
562
+ type DeliverySelectOneResult = {
563
+ delivery: DeliveryDetails;
564
+ };
565
+ //#endregion
465
566
  //#region src/app/domain/(procurement)/suppliers/suppliers.schemas.d.ts
466
567
  declare const supplierSchema: z.ZodObject<{
467
568
  id: z.ZodInt;
@@ -796,21 +897,21 @@ declare const productDeletePayloadSchema: z.ZodObject<{
796
897
  productId: z.ZodInt;
797
898
  }, z.core.$strip>;
798
899
  declare const productCreatePayloadSchema: z.ZodObject<{
799
- slug: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
800
- model: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
900
+ slug: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodString>>, unknown>;
901
+ model: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodString>>, unknown>;
801
902
  name: z.ZodOptional<z.ZodPreprocess<z.ZodNullable<z.ZodRecord<z.ZodEnum<{
802
903
  en: "en";
803
904
  ka: "ka";
804
905
  ru: "ru";
805
- }> & z.core.$partial, z.ZodString>>>>;
906
+ }> & z.core.$partial, z.ZodString>>, unknown>>;
806
907
  description: z.ZodOptional<z.ZodPreprocess<z.ZodNullable<z.ZodRecord<z.ZodEnum<{
807
908
  en: "en";
808
909
  ka: "ka";
809
910
  ru: "ru";
810
- }> & z.core.$partial, z.ZodString>>>>;
811
- categoryId: z.ZodOptional<z.ZodPreprocess<z.ZodUnion<readonly [z.ZodNull, z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>]>>>;
812
- brandId: z.ZodOptional<z.ZodPreprocess<z.ZodUnion<readonly [z.ZodNull, z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>]>>>;
813
- images: z.ZodOptional<z.ZodPreprocess<z.ZodArray<z.ZodFile>>>;
911
+ }> & z.core.$partial, z.ZodString>>, unknown>>;
912
+ categoryId: z.ZodOptional<z.ZodPreprocess<z.ZodUnion<readonly [z.ZodNull, z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>]>, unknown>>;
913
+ brandId: z.ZodOptional<z.ZodPreprocess<z.ZodUnion<readonly [z.ZodNull, z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>]>, unknown>>;
914
+ images: z.ZodOptional<z.ZodPreprocess<z.ZodArray<z.ZodFile>, unknown>>;
814
915
  bannerImageIndex: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
815
916
  }, {
816
917
  out: {};
@@ -822,21 +923,21 @@ declare const productUpdatePayloadSchema: z.ZodObject<{
822
923
  archived: "archived";
823
924
  draft: "draft";
824
925
  }>>;
825
- slug: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
826
- model: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodString>>>>;
926
+ slug: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodString>>, unknown>;
927
+ model: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodString>>, unknown>>;
827
928
  name: z.ZodOptional<z.ZodPreprocess<z.ZodNullable<z.ZodRecord<z.ZodEnum<{
828
929
  en: "en";
829
930
  ka: "ka";
830
931
  ru: "ru";
831
- }> & z.core.$partial, z.ZodString>>>>;
932
+ }> & z.core.$partial, z.ZodString>>, unknown>>;
832
933
  description: z.ZodOptional<z.ZodPreprocess<z.ZodNullable<z.ZodRecord<z.ZodEnum<{
833
934
  en: "en";
834
935
  ka: "ka";
835
936
  ru: "ru";
836
- }> & z.core.$partial, z.ZodString>>>>;
837
- categoryId: z.ZodOptional<z.ZodPreprocess<z.ZodUnion<readonly [z.ZodNull, z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>]>>>;
838
- brandId: z.ZodOptional<z.ZodPreprocess<z.ZodUnion<readonly [z.ZodNull, z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>]>>>;
839
- images: z.ZodOptional<z.ZodPreprocess<z.ZodArray<z.ZodFile>>>;
937
+ }> & z.core.$partial, z.ZodString>>, unknown>>;
938
+ categoryId: z.ZodOptional<z.ZodPreprocess<z.ZodUnion<readonly [z.ZodNull, z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>]>, unknown>>;
939
+ brandId: z.ZodOptional<z.ZodPreprocess<z.ZodUnion<readonly [z.ZodNull, z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>]>, unknown>>;
940
+ images: z.ZodOptional<z.ZodPreprocess<z.ZodArray<z.ZodFile>, unknown>>;
840
941
  bannerImageIndex: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
841
942
  productId: z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>;
842
943
  }, {
@@ -930,4 +1031,23 @@ type ProductVariantCreateResult = {
930
1031
  };
931
1032
  type ProductVariantUpdatePayload = z.infer<typeof productVariantUpdatePayloadSchema>;
932
1033
  //#endregion
933
- 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, 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 };
1034
+ //#region src/app/domain/(procurement)/deliveries/deliveries.schemas.d.ts
1035
+ declare const deliverySchema: z.ZodObject<{
1036
+ id: z.ZodInt;
1037
+ code: z.ZodString;
1038
+ supplierId: z.ZodInt;
1039
+ warehouseId: z.ZodInt;
1040
+ currencyId: z.ZodInt;
1041
+ status: z.ZodEnum<{
1042
+ draft: "draft";
1043
+ posted: "posted";
1044
+ reversed: "reversed";
1045
+ }>;
1046
+ notes: z.ZodNullable<z.ZodString>;
1047
+ postedAt: z.ZodNullable<z.ZodDate>;
1048
+ updatedAt: z.ZodNullable<z.ZodDate>;
1049
+ createdAt: z.ZodDate;
1050
+ }, z.core.$strip>;
1051
+ type Delivery = z.infer<typeof deliverySchema>;
1052
+ //#endregion
1053
+ 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, DeliveryItemUpdatePayload, 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 };