@esb-market-contracts/backend 1.0.32 → 1.0.34

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
@@ -51,7 +51,7 @@ declare const brandsRouter: import("hono/hono-base").HonoBase<{
51
51
  form: {
52
52
  slug: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue;
53
53
  name: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue;
54
- websiteUrl?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
54
+ websiteUrl: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue;
55
55
  notes?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
56
56
  countryId: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue;
57
57
  logotype: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue;
@@ -512,7 +512,7 @@ declare const productsRouter: import("hono/hono-base").HonoBase<{
512
512
  input: {
513
513
  form: {
514
514
  slug?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
515
- model: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue;
515
+ model?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
516
516
  name?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
517
517
  description?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
518
518
  categoryId?: import("hono/types").ParsedFormValue[] | import("hono/types").ParsedFormValue | undefined;
@@ -680,11 +680,11 @@ 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/flows/(operations)/audit/audit.enums.d.ts
683
+ //#region src/app/flows/(audit)/audit/audit.enums.d.ts
684
684
  declare const auditLogSourcesArray: readonly ['admin', 'backend'];
685
685
  type AuditLogSource = (typeof auditLogSourcesArray)[number];
686
686
  //#endregion
687
- //#region src/app/domain/(operations)/audit-logs/audit-logs.schemas.d.ts
687
+ //#region src/app/domain/(audit)/audit-logs/audit-logs.schemas.d.ts
688
688
  declare const auditLogSchema: import("drizzle-orm/zod").BuildSchema<"select", {
689
689
  id: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").SetIsPrimaryKey<import("drizzle-orm/pg-core").PgSerialBuilder>, {
690
690
  name: string;
@@ -701,11 +701,11 @@ declare const auditLogSchema: import("drizzle-orm/zod").BuildSchema<"select", {
701
701
  identity: undefined;
702
702
  generated: undefined;
703
703
  }>;
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" | "warehouse.activated" | "warehouse.archived" | "warehouse.created" | "warehouse.updated">, {
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">, {
705
705
  name: string;
706
706
  tableName: "audit_logs";
707
707
  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" | "warehouse.activated" | "warehouse.archived" | "warehouse.created" | "warehouse.updated";
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";
709
709
  driverParam: string;
710
710
  notNull: true;
711
711
  hasDefault: false;
@@ -763,12 +763,12 @@ declare const auditLogSchema: import("drizzle-orm/zod").BuildSchema<"select", {
763
763
  }>;
764
764
  }, undefined, undefined>;
765
765
  //#endregion
766
- //#region src/app/flows/(operations)/audit/audit.schemas.d.ts
766
+ //#region src/app/flows/(audit)/audit/audit.schemas.d.ts
767
767
  type AuditLogResult = z.infer<typeof auditLogSchema> & {
768
768
  source: AuditLogSource;
769
769
  };
770
770
  //#endregion
771
- //#region src/app/routes/(operations)/audit-logs.routes.d.ts
771
+ //#region src/app/routes/(audit)/audit-logs.routes.d.ts
772
772
  declare const auditLogsRouter: import("hono/hono-base").HonoBase<{
773
773
  Variables: VariablesWithActor;
774
774
  }, {
@@ -825,7 +825,7 @@ declare const auditLogsRouter: import("hono/hono-base").HonoBase<{
825
825
  }, "/operations/audit-logs", "/operations/audit-logs/search">;
826
826
  type AuditLogsRouter = typeof auditLogsRouter;
827
827
  //#endregion
828
- //#region src/app/routes/(operations)/customers.routes.d.ts
828
+ //#region src/app/routes/(sales)/customers.routes.d.ts
829
829
  declare const customersRouter: import("hono/hono-base").HonoBase<{
830
830
  Variables: VariablesWithActor;
831
831
  }, {
@@ -925,7 +925,129 @@ declare const customersRouter: import("hono/hono-base").HonoBase<{
925
925
  }, "/operations/customers", "/operations/customers/update">;
926
926
  type CustomersRouter = typeof customersRouter;
927
927
  //#endregion
928
- //#region src/app/routes/(operations)/warehouses.routes.d.ts
928
+ //#region src/app/routes/(procurement)/suppliers.routes.d.ts
929
+ declare const suppliersRouter: import("hono/hono-base").HonoBase<{
930
+ Variables: VariablesWithActor;
931
+ }, {
932
+ "/operations/suppliers/one": {
933
+ $get: {
934
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
935
+ supplier: {
936
+ id: number;
937
+ status: "active" | "archived";
938
+ name: string;
939
+ identificationNumber: string | null;
940
+ countryId: number | null;
941
+ emailAddress: string | null;
942
+ phoneNumber: string | null;
943
+ websiteUrl: string | null;
944
+ notes: string | null;
945
+ updatedAt: Date | null;
946
+ createdAt: Date;
947
+ };
948
+ }>;
949
+ outputFormat: "json";
950
+ status: 200;
951
+ input: {
952
+ query: {
953
+ id: string | string[];
954
+ };
955
+ };
956
+ };
957
+ };
958
+ } & {
959
+ "/operations/suppliers/create": {
960
+ $post: {
961
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
962
+ outputFormat: "json";
963
+ status: 201;
964
+ input: {
965
+ json: {
966
+ name: string;
967
+ identificationNumber?: string | null | undefined;
968
+ countryId?: number | null | undefined;
969
+ emailAddress?: string | null | undefined;
970
+ phoneNumber?: string | null | undefined;
971
+ websiteUrl: string | null;
972
+ notes?: string | null | undefined;
973
+ };
974
+ };
975
+ };
976
+ };
977
+ } & {
978
+ "/operations/suppliers/search": {
979
+ $post: {
980
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
981
+ suppliers: {
982
+ id: number;
983
+ status: "active" | "archived";
984
+ name: string;
985
+ identificationNumber: string | null;
986
+ countryId: number | null;
987
+ emailAddress: string | null;
988
+ phoneNumber: string | null;
989
+ websiteUrl: string | null;
990
+ notes: string | null;
991
+ updatedAt: Date | null;
992
+ createdAt: Date;
993
+ }[];
994
+ total: number;
995
+ }>;
996
+ outputFormat: "json";
997
+ status: 200;
998
+ input: {
999
+ json: {
1000
+ where?: {
1001
+ status?: "active" | "archived" | undefined;
1002
+ countryId?: number | null | undefined;
1003
+ } | undefined;
1004
+ query?: string | undefined;
1005
+ pagination: {
1006
+ offset?: unknown;
1007
+ limit?: unknown;
1008
+ };
1009
+ };
1010
+ };
1011
+ };
1012
+ };
1013
+ } & {
1014
+ "/operations/suppliers/update": {
1015
+ $post: {
1016
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
1017
+ outputFormat: "json";
1018
+ status: 200;
1019
+ input: {
1020
+ json: {
1021
+ name?: string | undefined;
1022
+ identificationNumber?: string | null | undefined;
1023
+ countryId?: number | null | undefined;
1024
+ emailAddress?: string | null | undefined;
1025
+ phoneNumber?: string | null | undefined;
1026
+ websiteUrl?: string | null | undefined;
1027
+ notes?: string | null | undefined;
1028
+ supplierId: number;
1029
+ };
1030
+ };
1031
+ };
1032
+ };
1033
+ } & {
1034
+ "/operations/suppliers/switch-status": {
1035
+ $post: {
1036
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
1037
+ outputFormat: "json";
1038
+ status: 200;
1039
+ input: {
1040
+ json: {
1041
+ status: "active" | "archived";
1042
+ supplierId: number;
1043
+ };
1044
+ };
1045
+ };
1046
+ };
1047
+ }, "/operations/suppliers", "/operations/suppliers/switch-status">;
1048
+ type SuppliersRouter = typeof suppliersRouter;
1049
+ //#endregion
1050
+ //#region src/app/routes/(warehouse)/warehouses.routes.d.ts
929
1051
  declare const warehousesRouter: import("hono/hono-base").HonoBase<{
930
1052
  Variables: VariablesWithActor;
931
1053
  }, {
@@ -963,7 +1085,7 @@ declare const warehousesRouter: import("hono/hono-base").HonoBase<{
963
1085
  code: string;
964
1086
  name: string;
965
1087
  address: string;
966
- salesEnabled: boolean;
1088
+ salesEnabled?: boolean | undefined;
967
1089
  };
968
1090
  };
969
1091
  };
@@ -1035,4 +1157,4 @@ declare const warehousesRouter: import("hono/hono-base").HonoBase<{
1035
1157
  }, "/operations/warehouses", "/operations/warehouses/switch-status">;
1036
1158
  type WarehousesRouter = typeof warehousesRouter;
1037
1159
  //#endregion
1038
- export type { AuditLogsRouter, BrandsRouter, CategoriesRouter, CountriesRouter, CustomersRouter, ExchangeRatesRouter, MeasurementUnitsRouter, ProductVariantsRouter, ProductsRouter, WarehousesRouter };
1160
+ export type { AuditLogsRouter, BrandsRouter, CategoriesRouter, CountriesRouter, CustomersRouter, ExchangeRatesRouter, MeasurementUnitsRouter, ProductVariantsRouter, ProductsRouter, SuppliersRouter, WarehousesRouter };
package/enums.d.ts CHANGED
@@ -18,7 +18,7 @@ declare const entityStatusesRecord: Readonly<{
18
18
  }>;
19
19
  type EntityStatus = (typeof entityStatusesArray)[number];
20
20
  //#endregion
21
- //#region src/app/flows/(operations)/audit/audit.enums.d.ts
21
+ //#region src/app/flows/(audit)/audit/audit.enums.d.ts
22
22
  export declare const auditLogSourcesArray: readonly ['admin', 'backend'];
23
23
  declare const auditLogSourcesRecord: Readonly<{
24
24
  ADMIN: "admin";
@@ -26,7 +26,7 @@ declare const auditLogSourcesRecord: Readonly<{
26
26
  }>;
27
27
  type AuditLogSource = (typeof auditLogSourcesArray)[number];
28
28
  //#endregion
29
- //#region src/app/domain/(operations)/customers/customers.enums.d.ts
29
+ //#region src/app/domain/(sales)/customers/customers.enums.d.ts
30
30
  export declare const customerTypesArray: readonly ['individual', 'individual_entrepreneur', 'legal_entity'];
31
31
  declare const customerTypesRecord: Readonly<{
32
32
  INDIVIDUAL: "individual";
package/enums.js CHANGED
@@ -18,14 +18,14 @@ var entityStatusesArray = ["active", "archived"];
18
18
  var entityStatusPGEnum = pgEnum("entity_status", entityStatusesArray);
19
19
  var entityStatusesRecord = createStringEnumRecord2(entityStatusesArray);
20
20
 
21
- // src/app/flows/(operations)/audit/audit.enums.ts
21
+ // src/app/flows/(audit)/audit/audit.enums.ts
22
22
  import { createStringEnumRecord as createStringEnumRecord3 } from "@kalutskii/foundation";
23
23
  import { z as z2 } from "zod";
24
24
  var auditLogSourcesArray = ["admin", "backend"];
25
25
  var auditLogSourcesRecord = createStringEnumRecord3(auditLogSourcesArray);
26
26
  var auditLogSourceSchema = z2.enum(auditLogSourcesArray);
27
27
 
28
- // src/app/domain/(operations)/customers/customers.enums.ts
28
+ // src/app/domain/(sales)/customers/customers.enums.ts
29
29
  import { createStringEnumRecord as createStringEnumRecord4 } from "@kalutskii/foundation";
30
30
  import { pgEnum as pgEnum2 } from "drizzle-orm/pg-core";
31
31
  var customerTypesArray = ["individual", "individual_entrepreneur", "legal_entity"];
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.32",
4
+ "version": "1.0.34",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "sideEffects": false,
package/types.d.ts CHANGED
@@ -11,7 +11,7 @@ declare const brandSchema: z.ZodObject<{
11
11
  ka: "ka";
12
12
  ru: "ru";
13
13
  }> & z.core.$partial, z.ZodString>;
14
- websiteUrl: z.ZodNullable<z.ZodURL>;
14
+ websiteUrl: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodURL>>;
15
15
  notes: z.ZodNullable<z.ZodString>;
16
16
  logotypeUrl: z.ZodString;
17
17
  countryId: z.ZodInt;
@@ -55,11 +55,14 @@ declare const brandCreatePayloadSchema: z.ZodObject<{
55
55
  ka: "ka";
56
56
  ru: "ru";
57
57
  }> & z.core.$partial, z.ZodString>>;
58
- websiteUrl: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodURL>>>;
58
+ websiteUrl: z.ZodPreprocess<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodURL>>>;
59
59
  notes: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
60
60
  countryId: z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>;
61
61
  logotype: z.ZodFile;
62
- }, z.core.$strip>;
62
+ }, {
63
+ out: {};
64
+ in: {};
65
+ }>;
63
66
  declare const brandUpdatePayloadSchema: z.ZodObject<{
64
67
  slug: z.ZodOptional<z.ZodString>;
65
68
  name: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodEnum<{
@@ -67,12 +70,15 @@ declare const brandUpdatePayloadSchema: z.ZodObject<{
67
70
  ka: "ka";
68
71
  ru: "ru";
69
72
  }> & z.core.$partial, z.ZodString>>>;
70
- websiteUrl: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodURL>>>;
73
+ websiteUrl: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodURL>>>>;
71
74
  notes: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
72
75
  countryId: z.ZodOptional<z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>>;
73
76
  logotype: z.ZodOptional<z.ZodFile>;
74
77
  brandId: z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>;
75
- }, z.core.$strip>;
78
+ }, {
79
+ out: {};
80
+ in: {};
81
+ }>;
76
82
  type BrandSearchOptions = z.infer<typeof brandSearchOptionsSchema>;
77
83
  type BrandSearchResult = {
78
84
  brands: Brand[];
@@ -140,13 +146,16 @@ declare const categorySelectOneQuerySchema: z.ZodPipe<z.ZodObject<{
140
146
  }>>;
141
147
  declare const categoryCreatePayloadSchema: z.ZodObject<{
142
148
  slug: z.ZodString;
143
- parentId: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
149
+ parentId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodInt>>>;
144
150
  name: z.ZodRecord<z.ZodEnum<{
145
151
  en: "en";
146
152
  ka: "ka";
147
153
  ru: "ru";
148
154
  }> & z.core.$partial, z.ZodString>;
149
- }, z.core.$strip>;
155
+ }, {
156
+ out: {};
157
+ in: {};
158
+ }>;
150
159
  declare const categoryUpdatePayloadSchema: z.ZodObject<{
151
160
  slug: z.ZodOptional<z.ZodString>;
152
161
  parentId: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
@@ -160,7 +169,10 @@ declare const categoryUpdatePayloadSchema: z.ZodObject<{
160
169
  ru: "ru";
161
170
  }> & z.core.$partial, z.ZodString>>;
162
171
  categoryId: z.ZodInt;
163
- }, z.core.$strip>;
172
+ }, {
173
+ out: {};
174
+ in: {};
175
+ }>;
164
176
  type CategorySearchOptions = z.infer<typeof categorySearchOptionsSchema>;
165
177
  type CategorySearchResult = {
166
178
  categories: Category[];
@@ -211,7 +223,10 @@ declare const countryCreatePayloadSchema: z.ZodObject<{
211
223
  ru: "ru";
212
224
  }> & z.core.$partial, z.ZodString>>;
213
225
  flagImage: z.ZodFile;
214
- }, z.core.$strip>;
226
+ }, {
227
+ out: {};
228
+ in: {};
229
+ }>;
215
230
  declare const countryUpdatePayloadSchema: z.ZodObject<{
216
231
  code: z.ZodOptional<z.ZodString>;
217
232
  name: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodEnum<{
@@ -221,7 +236,10 @@ declare const countryUpdatePayloadSchema: z.ZodObject<{
221
236
  }> & z.core.$partial, z.ZodString>>>;
222
237
  flagImage: z.ZodOptional<z.ZodFile>;
223
238
  countryId: z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>;
224
- }, z.core.$strip>;
239
+ }, {
240
+ out: {};
241
+ in: {};
242
+ }>;
225
243
  type CountrySearchOptions = z.infer<typeof countrySearchOptionsSchema>;
226
244
  type CountrySearchResult = {
227
245
  countries: Country[];
@@ -245,7 +263,7 @@ type MeasurementUnitListResult = {
245
263
  measurementUnits: MeasurementUnit[];
246
264
  };
247
265
  //#endregion
248
- //#region src/app/domain/(operations)/audit-logs/audit-logs.schemas.d.ts
266
+ //#region src/app/domain/(audit)/audit-logs/audit-logs.schemas.d.ts
249
267
  declare const auditLogSchema: import("drizzle-orm/zod").BuildSchema<"select", {
250
268
  id: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").SetIsPrimaryKey<import("drizzle-orm/pg-core").PgSerialBuilder>, {
251
269
  name: string;
@@ -262,11 +280,11 @@ declare const auditLogSchema: import("drizzle-orm/zod").BuildSchema<"select", {
262
280
  identity: undefined;
263
281
  generated: undefined;
264
282
  }>;
265
- 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" | "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" | "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">, {
266
284
  name: string;
267
285
  tableName: "audit_logs";
268
286
  dataType: "string";
269
- 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" | "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" | "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";
270
288
  driverParam: string;
271
289
  notNull: true;
272
290
  hasDefault: false;
@@ -324,11 +342,11 @@ declare const auditLogSchema: import("drizzle-orm/zod").BuildSchema<"select", {
324
342
  }>;
325
343
  }, undefined, undefined>;
326
344
  //#endregion
327
- //#region src/app/flows/(operations)/audit/audit.enums.d.ts
345
+ //#region src/app/flows/(audit)/audit/audit.enums.d.ts
328
346
  declare const auditLogSourcesArray: readonly ['admin', 'backend'];
329
347
  type AuditLogSource = (typeof auditLogSourcesArray)[number];
330
348
  //#endregion
331
- //#region src/app/flows/(operations)/audit/audit.schemas.d.ts
349
+ //#region src/app/flows/(audit)/audit/audit.schemas.d.ts
332
350
  declare const auditLogSearchPayloadSchema: z.ZodObject<{
333
351
  where: z.ZodOptional<z.ZodPipe<z.ZodObject<{
334
352
  event: z.ZodOptional<z.ZodString>;
@@ -369,7 +387,7 @@ type AuditLogSearchResult = {
369
387
  total: number;
370
388
  };
371
389
  //#endregion
372
- //#region src/app/domain/(operations)/customers/customers.schemas.d.ts
390
+ //#region src/app/domain/(sales)/customers/customers.schemas.d.ts
373
391
  declare const customerSchema: z.ZodObject<{
374
392
  id: z.ZodInt;
375
393
  type: z.ZodEnum<{
@@ -387,7 +405,7 @@ declare const customerSchema: z.ZodObject<{
387
405
  }, z.core.$strip>;
388
406
  type Customer = z.infer<typeof customerSchema>;
389
407
  //#endregion
390
- //#region src/app/flows/(operations)/customer/customer.schemas.d.ts
408
+ //#region src/app/flows/(sales)/customer/customer.schemas.d.ts
391
409
  declare const customerSearchOptionsSchema: z.ZodObject<{
392
410
  where: z.ZodOptional<z.ZodPipe<z.ZodObject<{
393
411
  type: z.ZodOptional<z.ZodEnum<{
@@ -420,7 +438,10 @@ declare const customerCreatePayloadSchema: z.ZodObject<{
420
438
  emailAddress: z.ZodOptional<z.ZodNullable<z.ZodString>>;
421
439
  phoneNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
422
440
  notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
423
- }, z.core.$strip>;
441
+ }, {
442
+ out: {};
443
+ in: {};
444
+ }>;
424
445
  declare const customerUpdatePayloadSchema: z.ZodObject<{
425
446
  name: z.ZodOptional<z.ZodString>;
426
447
  identificationNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -428,7 +449,10 @@ declare const customerUpdatePayloadSchema: z.ZodObject<{
428
449
  phoneNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
429
450
  notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
430
451
  customerId: z.ZodInt;
431
- }, z.core.$strip>;
452
+ }, {
453
+ out: {};
454
+ in: {};
455
+ }>;
432
456
  type CustomerSearchOptions = z.infer<typeof customerSearchOptionsSchema>;
433
457
  type CustomerSearchResult = {
434
458
  customers: Customer[];
@@ -438,7 +462,95 @@ type CustomerSelectOneQuery = z.infer<typeof customerSelectOneQuerySchema>;
438
462
  type CustomerCreatePayload = z.infer<typeof customerCreatePayloadSchema>;
439
463
  type CustomerUpdatePayload = z.infer<typeof customerUpdatePayloadSchema>;
440
464
  //#endregion
441
- //#region src/app/domain/(operations)/warehouses/warehouses.schemas.d.ts
465
+ //#region src/app/domain/(procurement)/suppliers/suppliers.schemas.d.ts
466
+ declare const supplierSchema: z.ZodObject<{
467
+ id: z.ZodInt;
468
+ status: z.ZodEnum<{
469
+ active: "active";
470
+ archived: "archived";
471
+ }>;
472
+ name: z.ZodString;
473
+ identificationNumber: z.ZodNullable<z.ZodString>;
474
+ countryId: z.ZodNullable<z.ZodInt>;
475
+ emailAddress: z.ZodNullable<z.ZodString>;
476
+ phoneNumber: z.ZodNullable<z.ZodString>;
477
+ websiteUrl: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodURL>>;
478
+ notes: z.ZodNullable<z.ZodString>;
479
+ updatedAt: z.ZodNullable<z.ZodDate>;
480
+ createdAt: z.ZodDate;
481
+ }, z.core.$strip>;
482
+ type Supplier = z.infer<typeof supplierSchema>;
483
+ //#endregion
484
+ //#region src/app/flows/(procurement)/supplier/supplier.schemas.d.ts
485
+ declare const supplierSearchOptionsSchema: z.ZodObject<{
486
+ where: z.ZodOptional<z.ZodPipe<z.ZodObject<{
487
+ status: z.ZodOptional<z.ZodEnum<{
488
+ active: "active";
489
+ archived: "archived";
490
+ }>>;
491
+ countryId: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
492
+ }, z.core.$strip>, z.ZodTransform<{
493
+ status?: "active" | "archived" | undefined;
494
+ countryId: number | null;
495
+ } | {
496
+ status: "active" | "archived";
497
+ countryId?: number | null | undefined;
498
+ }, {
499
+ status?: "active" | "archived" | undefined;
500
+ countryId?: number | null | undefined;
501
+ }>>>;
502
+ query: z.ZodOptional<z.ZodString>;
503
+ pagination: z.ZodObject<{
504
+ offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
505
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
506
+ }, z.core.$strip>;
507
+ }, z.core.$strict>;
508
+ declare const supplierSelectOneQuerySchema: z.ZodObject<{
509
+ id: z.ZodInt;
510
+ }, z.core.$strip>;
511
+ declare const supplierCreatePayloadSchema: z.ZodObject<{
512
+ name: z.ZodString;
513
+ identificationNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
514
+ countryId: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
515
+ emailAddress: z.ZodOptional<z.ZodNullable<z.ZodString>>;
516
+ phoneNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
517
+ websiteUrl: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodURL>>;
518
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
519
+ }, {
520
+ out: {};
521
+ in: {};
522
+ }>;
523
+ declare const supplierUpdatePayloadSchema: z.ZodObject<{
524
+ name: z.ZodOptional<z.ZodString>;
525
+ identificationNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
526
+ countryId: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
527
+ emailAddress: z.ZodOptional<z.ZodNullable<z.ZodString>>;
528
+ phoneNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
529
+ websiteUrl: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodURL>>>;
530
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
531
+ supplierId: z.ZodInt;
532
+ }, {
533
+ out: {};
534
+ in: {};
535
+ }>;
536
+ declare const supplierSwitchStatusPayloadSchema: z.ZodObject<{
537
+ status: z.ZodEnum<{
538
+ active: "active";
539
+ archived: "archived";
540
+ }>;
541
+ supplierId: z.ZodInt;
542
+ }, z.core.$strip>;
543
+ type SupplierSearchOptions = z.infer<typeof supplierSearchOptionsSchema>;
544
+ type SupplierSearchResult = {
545
+ suppliers: Supplier[];
546
+ total: number;
547
+ };
548
+ type SupplierSelectOneQuery = z.infer<typeof supplierSelectOneQuerySchema>;
549
+ type SupplierCreatePayload = z.infer<typeof supplierCreatePayloadSchema>;
550
+ type SupplierUpdatePayload = z.infer<typeof supplierUpdatePayloadSchema>;
551
+ type SupplierSwitchStatusPayload = z.infer<typeof supplierSwitchStatusPayloadSchema>;
552
+ //#endregion
553
+ //#region src/app/domain/(warehouse)/warehouses/warehouses.schemas.d.ts
442
554
  declare const warehouseSchema: z.ZodObject<{
443
555
  id: z.ZodInt;
444
556
  code: z.ZodString;
@@ -454,7 +566,7 @@ declare const warehouseSchema: z.ZodObject<{
454
566
  }, z.core.$strip>;
455
567
  type Warehouse = z.infer<typeof warehouseSchema>;
456
568
  //#endregion
457
- //#region src/app/flows/(operations)/warehouse/warehouse.schemas.d.ts
569
+ //#region src/app/flows/(warehouse)/warehouse/warehouse.schemas.d.ts
458
570
  declare const warehouseSearchOptionsSchema: z.ZodObject<{
459
571
  where: z.ZodOptional<z.ZodPipe<z.ZodObject<{
460
572
  status: z.ZodOptional<z.ZodEnum<{
@@ -485,15 +597,21 @@ declare const warehouseCreatePayloadSchema: z.ZodObject<{
485
597
  code: z.ZodString;
486
598
  name: z.ZodString;
487
599
  address: z.ZodString;
488
- salesEnabled: z.ZodBoolean;
489
- }, z.core.$strip>;
600
+ salesEnabled: z.ZodOptional<z.ZodBoolean>;
601
+ }, {
602
+ out: {};
603
+ in: {};
604
+ }>;
490
605
  declare const warehouseUpdatePayloadSchema: z.ZodObject<{
491
606
  code: z.ZodOptional<z.ZodString>;
492
607
  name: z.ZodOptional<z.ZodString>;
493
608
  address: z.ZodOptional<z.ZodString>;
494
609
  salesEnabled: z.ZodOptional<z.ZodBoolean>;
495
610
  warehouseId: z.ZodInt;
496
- }, z.core.$strip>;
611
+ }, {
612
+ out: {};
613
+ in: {};
614
+ }>;
497
615
  declare const warehouseSwitchStatusPayloadSchema: z.ZodObject<{
498
616
  status: z.ZodEnum<{
499
617
  active: "active";
@@ -679,7 +797,7 @@ declare const productDeletePayloadSchema: z.ZodObject<{
679
797
  }, z.core.$strip>;
680
798
  declare const productCreatePayloadSchema: z.ZodObject<{
681
799
  slug: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
682
- model: z.ZodPreprocess<z.ZodNullable<z.ZodString>>;
800
+ model: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
683
801
  name: z.ZodOptional<z.ZodPreprocess<z.ZodNullable<z.ZodRecord<z.ZodEnum<{
684
802
  en: "en";
685
803
  ka: "ka";
@@ -694,7 +812,10 @@ declare const productCreatePayloadSchema: z.ZodObject<{
694
812
  brandId: z.ZodOptional<z.ZodPreprocess<z.ZodUnion<readonly [z.ZodNull, z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>]>>>;
695
813
  images: z.ZodOptional<z.ZodPreprocess<z.ZodArray<z.ZodFile>>>;
696
814
  bannerImageIndex: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
697
- }, z.core.$strip>;
815
+ }, {
816
+ out: {};
817
+ in: {};
818
+ }>;
698
819
  declare const productUpdatePayloadSchema: z.ZodObject<{
699
820
  status: z.ZodOptional<z.ZodEnum<{
700
821
  active: "active";
@@ -718,7 +839,10 @@ declare const productUpdatePayloadSchema: z.ZodObject<{
718
839
  images: z.ZodOptional<z.ZodPreprocess<z.ZodArray<z.ZodFile>>>;
719
840
  bannerImageIndex: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
720
841
  productId: z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>;
721
- }, z.core.$strip>;
842
+ }, {
843
+ out: {};
844
+ in: {};
845
+ }>;
722
846
  type ProductSearchOptions = z.infer<typeof productSearchOptionsSchema>;
723
847
  type ProductSearchResult = {
724
848
  products: Product[];
@@ -770,7 +894,10 @@ declare const productVariantCreatePayloadSchema: z.ZodObject<{
770
894
  ka: "ka";
771
895
  ru: "ru";
772
896
  }> & z.core.$partial, z.ZodString>>>;
773
- }, z.core.$strip>;
897
+ }, {
898
+ out: {};
899
+ in: {};
900
+ }>;
774
901
  declare const productVariantUpdatePayloadSchema: z.ZodObject<{
775
902
  measurementUnitId: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
776
903
  status: z.ZodOptional<z.ZodEnum<{
@@ -786,7 +913,10 @@ declare const productVariantUpdatePayloadSchema: z.ZodObject<{
786
913
  ru: "ru";
787
914
  }> & z.core.$partial, z.ZodString>>>;
788
915
  productVariantId: z.ZodInt;
789
- }, z.core.$strip>;
916
+ }, {
917
+ out: {};
918
+ in: {};
919
+ }>;
790
920
  type ProductVariantSearchOptions = z.infer<typeof productVariantSearchOptionsSchema>;
791
921
  type ProductVariantSearchResult = {
792
922
  productVariants: ProductVariant[];
@@ -800,4 +930,4 @@ type ProductVariantCreateResult = {
800
930
  };
801
931
  type ProductVariantUpdatePayload = z.infer<typeof productVariantUpdatePayloadSchema>;
802
932
  //#endregion
803
- 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, Warehouse, WarehouseCreatePayload, WarehouseSearchOptions, WarehouseSearchResult, WarehouseSelectOneQuery, WarehouseSwitchStatusPayload, WarehouseUpdatePayload };
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 };