@esb-market-contracts/backend 1.0.35 → 1.0.37

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 +78 -81
  2. package/package.json +1 -1
  3. package/types.d.ts +127 -115
package/api.d.ts CHANGED
@@ -3,6 +3,7 @@ import "hono";
3
3
  import "ky";
4
4
  import "hono/http-exception";
5
5
  import { z } from "zod";
6
+ import "postgres";
6
7
  import "drizzle-orm";
7
8
  //#region src/app/flows/global/authentication/authentication.middleware.d.ts
8
9
  type VariablesWithActor = {
@@ -630,7 +631,7 @@ declare const exchangeRatesRouter: import("hono/hono-base").HonoBase<{
630
631
  "/finance/exchange-rates/dates/search": {
631
632
  $post: {
632
633
  output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
633
- dates: Date[];
634
+ dates: string[];
634
635
  total: number;
635
636
  }>;
636
637
  outputFormat: "json";
@@ -639,7 +640,7 @@ declare const exchangeRatesRouter: import("hono/hono-base").HonoBase<{
639
640
  json: {
640
641
  where?: {
641
642
  currencyId?: number | undefined;
642
- validFromDate?: unknown;
643
+ validFromDate?: string | undefined;
643
644
  } | undefined;
644
645
  pagination: {
645
646
  offset?: unknown;
@@ -657,7 +658,7 @@ declare const exchangeRatesRouter: import("hono/hono-base").HonoBase<{
657
658
  id: number;
658
659
  currencyId: number;
659
660
  rate: string;
660
- validFromDate: Date;
661
+ validFromDate: string;
661
662
  }[];
662
663
  total: number;
663
664
  }>;
@@ -667,7 +668,7 @@ declare const exchangeRatesRouter: import("hono/hono-base").HonoBase<{
667
668
  json: {
668
669
  where?: {
669
670
  currencyId?: number | undefined;
670
- validFromDate?: unknown;
671
+ validFromDate?: string | undefined;
671
672
  } | undefined;
672
673
  pagination: {
673
674
  offset?: unknown;
@@ -695,6 +696,9 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
695
696
  currencyId: number;
696
697
  status: "draft" | "posted" | "reversed";
697
698
  notes: string | null;
699
+ exchangeRateId: number | null;
700
+ exchangeRate: string | null;
701
+ exchangeRateValidFromDate: string | null;
698
702
  postedAt: Date | null;
699
703
  updatedAt: Date | null;
700
704
  createdAt: Date;
@@ -704,6 +708,7 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
704
708
  productVariantId: number;
705
709
  quantity: number;
706
710
  unitCost: string | null;
711
+ unitCostBase: string | null;
707
712
  updatedAt: Date | null;
708
713
  createdAt: Date;
709
714
  }[];
@@ -730,6 +735,9 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
730
735
  currencyId: number;
731
736
  status: "draft" | "posted" | "reversed";
732
737
  notes: string | null;
738
+ exchangeRateId: number | null;
739
+ exchangeRate: string | null;
740
+ exchangeRateValidFromDate: string | null;
733
741
  postedAt: Date | null;
734
742
  updatedAt: Date | null;
735
743
  createdAt: Date;
@@ -739,6 +747,7 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
739
747
  productVariantId: number;
740
748
  quantity: number;
741
749
  unitCost: string | null;
750
+ unitCostBase: string | null;
742
751
  updatedAt: Date | null;
743
752
  createdAt: Date;
744
753
  }[];
@@ -756,6 +765,48 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
756
765
  };
757
766
  };
758
767
  };
768
+ } & {
769
+ "/operations/deliveries/search": {
770
+ $post: {
771
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
772
+ deliveries: {
773
+ id: number;
774
+ code: string;
775
+ supplierId: number;
776
+ warehouseId: number;
777
+ currencyId: number;
778
+ status: "draft" | "posted" | "reversed";
779
+ notes: string | null;
780
+ exchangeRateId: number | null;
781
+ exchangeRate: string | null;
782
+ exchangeRateValidFromDate: string | null;
783
+ postedAt: Date | null;
784
+ updatedAt: Date | null;
785
+ createdAt: Date;
786
+ }[];
787
+ total: number;
788
+ }>;
789
+ outputFormat: "json";
790
+ status: 200;
791
+ input: {
792
+ json: {
793
+ where?: {
794
+ supplierId?: number | undefined;
795
+ warehouseId?: number | undefined;
796
+ currencyId?: number | undefined;
797
+ status?: "draft" | "posted" | "reversed" | undefined;
798
+ createdAtFrom?: unknown;
799
+ createdAtTo?: unknown;
800
+ } | undefined;
801
+ query?: string | undefined;
802
+ pagination: {
803
+ offset?: unknown;
804
+ limit?: unknown;
805
+ };
806
+ };
807
+ };
808
+ };
809
+ };
759
810
  } & {
760
811
  "/operations/deliveries/update": {
761
812
  $post: {
@@ -786,6 +837,19 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
786
837
  };
787
838
  };
788
839
  };
840
+ } & {
841
+ "/operations/deliveries/post": {
842
+ $post: {
843
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
844
+ outputFormat: "json";
845
+ status: 200;
846
+ input: {
847
+ json: {
848
+ deliveryId: number;
849
+ };
850
+ };
851
+ };
852
+ };
789
853
  } & {
790
854
  "/operations/deliveries/item/add": {
791
855
  $post: {
@@ -796,6 +860,7 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
796
860
  productVariantId: number;
797
861
  quantity: number;
798
862
  unitCost: string | null;
863
+ unitCostBase: string | null;
799
864
  updatedAt: Date | null;
800
865
  createdAt: Date;
801
866
  };
@@ -822,6 +887,7 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
822
887
  productVariantId: number;
823
888
  quantity: number;
824
889
  unitCost: string | null;
890
+ unitCostBase: string | null;
825
891
  updatedAt: Date | null;
826
892
  createdAt: Date;
827
893
  };
@@ -847,6 +913,7 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
847
913
  productVariantId: number;
848
914
  quantity: number;
849
915
  unitCost: string | null;
916
+ unitCostBase: string | null;
850
917
  updatedAt: Date | null;
851
918
  createdAt: Date;
852
919
  };
@@ -868,83 +935,13 @@ declare const auditLogSourcesArray: readonly ['admin', 'backend'];
868
935
  type AuditLogSource = (typeof auditLogSourcesArray)[number];
869
936
  //#endregion
870
937
  //#region src/app/domain/(audit)/audit-logs/audit-logs.schemas.d.ts
871
- declare const auditLogSchema: import("drizzle-orm/zod").BuildSchema<"select", {
872
- id: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").SetIsPrimaryKey<import("drizzle-orm/pg-core").PgSerialBuilder>, {
873
- name: string;
874
- tableName: "audit_logs";
875
- dataType: "number int32";
876
- data: number;
877
- driverParam: number;
878
- notNull: true;
879
- hasDefault: true;
880
- isPrimaryKey: false;
881
- isAutoincrement: false;
882
- hasRuntimeDefault: false;
883
- enumValues: undefined;
884
- identity: undefined;
885
- generated: undefined;
886
- }>;
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">, {
888
- name: string;
889
- tableName: "audit_logs";
890
- dataType: "string";
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";
892
- driverParam: string;
893
- notNull: true;
894
- hasDefault: false;
895
- isPrimaryKey: false;
896
- isAutoincrement: false;
897
- hasRuntimeDefault: false;
898
- enumValues: undefined;
899
- identity: undefined;
900
- generated: undefined;
901
- }>;
902
- actorEmployeeId: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").PgIntegerBuilder, {
903
- name: string;
904
- tableName: "audit_logs";
905
- dataType: "number int32";
906
- data: number;
907
- driverParam: string | number;
908
- notNull: false;
909
- hasDefault: false;
910
- isPrimaryKey: false;
911
- isAutoincrement: false;
912
- hasRuntimeDefault: false;
913
- enumValues: undefined;
914
- identity: undefined;
915
- generated: undefined;
916
- }>;
917
- payload: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgJsonbBuilder>, {
918
- name: string;
919
- tableName: "audit_logs";
920
- dataType: "object json";
921
- data: unknown;
922
- driverParam: unknown;
923
- notNull: true;
924
- hasDefault: false;
925
- isPrimaryKey: false;
926
- isAutoincrement: false;
927
- hasRuntimeDefault: false;
928
- enumValues: undefined;
929
- identity: undefined;
930
- generated: undefined;
931
- }>;
932
- createdAt: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").SetHasDefault<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgTimestampBuilder>>, {
933
- name: string;
934
- tableName: "audit_logs";
935
- dataType: "object date";
936
- data: Date;
937
- driverParam: string;
938
- notNull: true;
939
- hasDefault: true;
940
- isPrimaryKey: false;
941
- isAutoincrement: false;
942
- hasRuntimeDefault: false;
943
- enumValues: undefined;
944
- identity: undefined;
945
- generated: undefined;
946
- }>;
947
- }, undefined, undefined>;
938
+ declare const auditLogSchema: z.ZodObject<{
939
+ id: z.ZodInt;
940
+ event: z.ZodString;
941
+ actorEmployeeId: z.ZodNullable<z.ZodInt>;
942
+ payload: z.ZodType<import("drizzle-orm").Json, unknown, z.core.$ZodTypeInternals<import("drizzle-orm").Json, unknown>>;
943
+ createdAt: z.ZodDate;
944
+ }, z.core.$strip>;
948
945
  //#endregion
949
946
  //#region src/app/flows/(audit)/audit/audit.schemas.d.ts
950
947
  type AuditLogResult = z.infer<typeof auditLogSchema> & {
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.35",
4
+ "version": "1.0.37",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "sideEffects": false,
package/types.d.ts CHANGED
@@ -264,83 +264,13 @@ type MeasurementUnitListResult = {
264
264
  };
265
265
  //#endregion
266
266
  //#region src/app/domain/(audit)/audit-logs/audit-logs.schemas.d.ts
267
- declare const auditLogSchema: import("drizzle-orm/zod").BuildSchema<"select", {
268
- id: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").SetIsPrimaryKey<import("drizzle-orm/pg-core").PgSerialBuilder>, {
269
- name: string;
270
- tableName: "audit_logs";
271
- dataType: "number int32";
272
- data: number;
273
- driverParam: number;
274
- notNull: true;
275
- hasDefault: true;
276
- isPrimaryKey: false;
277
- isAutoincrement: false;
278
- hasRuntimeDefault: false;
279
- enumValues: undefined;
280
- identity: undefined;
281
- generated: undefined;
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" | "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
- name: string;
285
- tableName: "audit_logs";
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" | "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
- driverParam: string;
289
- notNull: true;
290
- hasDefault: false;
291
- isPrimaryKey: false;
292
- isAutoincrement: false;
293
- hasRuntimeDefault: false;
294
- enumValues: undefined;
295
- identity: undefined;
296
- generated: undefined;
297
- }>;
298
- actorEmployeeId: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").PgIntegerBuilder, {
299
- name: string;
300
- tableName: "audit_logs";
301
- dataType: "number int32";
302
- data: number;
303
- driverParam: string | number;
304
- notNull: false;
305
- hasDefault: false;
306
- isPrimaryKey: false;
307
- isAutoincrement: false;
308
- hasRuntimeDefault: false;
309
- enumValues: undefined;
310
- identity: undefined;
311
- generated: undefined;
312
- }>;
313
- payload: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgJsonbBuilder>, {
314
- name: string;
315
- tableName: "audit_logs";
316
- dataType: "object json";
317
- data: unknown;
318
- driverParam: unknown;
319
- notNull: true;
320
- hasDefault: false;
321
- isPrimaryKey: false;
322
- isAutoincrement: false;
323
- hasRuntimeDefault: false;
324
- enumValues: undefined;
325
- identity: undefined;
326
- generated: undefined;
327
- }>;
328
- createdAt: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").SetHasDefault<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgTimestampBuilder>>, {
329
- name: string;
330
- tableName: "audit_logs";
331
- dataType: "object date";
332
- data: Date;
333
- driverParam: string;
334
- notNull: true;
335
- hasDefault: true;
336
- isPrimaryKey: false;
337
- isAutoincrement: false;
338
- hasRuntimeDefault: false;
339
- enumValues: undefined;
340
- identity: undefined;
341
- generated: undefined;
342
- }>;
343
- }, undefined, undefined>;
267
+ declare const auditLogSchema: z.ZodObject<{
268
+ id: z.ZodInt;
269
+ event: z.ZodString;
270
+ actorEmployeeId: z.ZodNullable<z.ZodInt>;
271
+ payload: z.ZodType<import("drizzle-orm").Json, unknown, z.core.$ZodTypeInternals<import("drizzle-orm").Json, unknown>>;
272
+ createdAt: z.ZodDate;
273
+ }, z.core.$strip>;
344
274
  //#endregion
345
275
  //#region src/app/flows/(audit)/audit/audit.enums.d.ts
346
276
  declare const auditLogSourcesArray: readonly ['admin', 'backend'];
@@ -373,10 +303,7 @@ declare const auditLogSelectOneQuerySchema: z.ZodObject<{
373
303
  admin: "admin";
374
304
  backend: "backend";
375
305
  }>;
376
- }, {
377
- out: {};
378
- in: {};
379
- }>;
306
+ }, z.core.$strip>;
380
307
  type AuditLogSearchPayload = z.infer<typeof auditLogSearchPayloadSchema>;
381
308
  type AuditLogResult = z.infer<typeof auditLogSchema> & {
382
309
  source: AuditLogSource;
@@ -469,18 +396,35 @@ declare const deliveryItemSchema: z.ZodObject<{
469
396
  productVariantId: z.ZodInt;
470
397
  quantity: z.ZodNumber;
471
398
  unitCost: z.ZodNullable<z.ZodString>;
399
+ unitCostBase: z.ZodNullable<z.ZodString>;
472
400
  updatedAt: z.ZodNullable<z.ZodDate>;
473
401
  createdAt: z.ZodDate;
474
402
  }, z.core.$strip>;
475
403
  type DeliveryItem = z.infer<typeof deliveryItemSchema>;
476
404
  //#endregion
477
- //#region src/app/flows/(procurement)/delivery/delivery.schemas.d.ts
478
- declare const deliverySelectOneQuerySchema: z.ZodObject<{
405
+ //#region src/app/domain/(procurement)/deliveries/deliveries.schemas.d.ts
406
+ declare const deliverySchema: z.ZodObject<{
479
407
  id: z.ZodInt;
408
+ code: z.ZodString;
409
+ supplierId: z.ZodInt;
410
+ warehouseId: z.ZodInt;
411
+ currencyId: z.ZodInt;
412
+ status: z.ZodEnum<{
413
+ draft: "draft";
414
+ posted: "posted";
415
+ reversed: "reversed";
416
+ }>;
417
+ notes: z.ZodNullable<z.ZodString>;
418
+ exchangeRateId: z.ZodNullable<z.ZodInt>;
419
+ exchangeRate: z.ZodNullable<z.ZodString>;
420
+ exchangeRateValidFromDate: z.ZodNullable<z.ZodNullable<z.ZodISODate>>;
421
+ postedAt: z.ZodNullable<z.ZodDate>;
422
+ updatedAt: z.ZodNullable<z.ZodDate>;
423
+ createdAt: z.ZodDate;
480
424
  }, z.core.$strip>;
481
- declare const deliveryDeletePayloadSchema: z.ZodObject<{
482
- deliveryId: z.ZodInt;
483
- }, z.core.$strip>;
425
+ type Delivery = z.infer<typeof deliverySchema>;
426
+ //#endregion
427
+ //#region src/app/flows/(procurement)/delivery/delivery.schemas.d.ts
484
428
  declare const deliveryCreatePayloadSchema: z.ZodObject<{
485
429
  supplierId: z.ZodInt;
486
430
  warehouseId: z.ZodInt;
@@ -490,6 +434,77 @@ declare const deliveryCreatePayloadSchema: z.ZodObject<{
490
434
  out: {};
491
435
  in: {};
492
436
  }>;
437
+ declare const deliverySelectOneQuerySchema: z.ZodObject<{
438
+ id: z.ZodInt;
439
+ }, z.core.$strip>;
440
+ declare const deliverySearchOptionsSchema: z.ZodObject<{
441
+ where: z.ZodOptional<z.ZodPipe<z.ZodObject<{
442
+ supplierId: z.ZodOptional<z.ZodInt>;
443
+ warehouseId: z.ZodOptional<z.ZodInt>;
444
+ currencyId: z.ZodOptional<z.ZodInt>;
445
+ status: z.ZodOptional<z.ZodEnum<{
446
+ draft: "draft";
447
+ posted: "posted";
448
+ reversed: "reversed";
449
+ }>>;
450
+ createdAtFrom: z.ZodOptional<z.ZodCoercedDate<unknown>>;
451
+ createdAtTo: z.ZodOptional<z.ZodCoercedDate<unknown>>;
452
+ }, z.core.$strip>, z.ZodTransform<{
453
+ supplierId?: number | undefined;
454
+ warehouseId?: number | undefined;
455
+ currencyId?: number | undefined;
456
+ status?: "draft" | "posted" | "reversed" | undefined;
457
+ createdAtFrom: Date;
458
+ createdAtTo?: Date | undefined;
459
+ } | {
460
+ supplierId?: number | undefined;
461
+ warehouseId?: number | undefined;
462
+ currencyId?: number | undefined;
463
+ status?: "draft" | "posted" | "reversed" | undefined;
464
+ createdAtFrom?: Date | undefined;
465
+ createdAtTo: Date;
466
+ } | {
467
+ supplierId?: number | undefined;
468
+ warehouseId?: number | undefined;
469
+ currencyId: number;
470
+ status?: "draft" | "posted" | "reversed" | undefined;
471
+ createdAtFrom?: Date | undefined;
472
+ createdAtTo?: Date | undefined;
473
+ } | {
474
+ supplierId?: number | undefined;
475
+ warehouseId?: number | undefined;
476
+ currencyId?: number | undefined;
477
+ status: "draft" | "posted" | "reversed";
478
+ createdAtFrom?: Date | undefined;
479
+ createdAtTo?: Date | undefined;
480
+ } | {
481
+ supplierId: number;
482
+ warehouseId?: number | undefined;
483
+ currencyId?: number | undefined;
484
+ status?: "draft" | "posted" | "reversed" | undefined;
485
+ createdAtFrom?: Date | undefined;
486
+ createdAtTo?: Date | undefined;
487
+ } | {
488
+ supplierId?: number | undefined;
489
+ warehouseId: number;
490
+ currencyId?: number | undefined;
491
+ status?: "draft" | "posted" | "reversed" | undefined;
492
+ createdAtFrom?: Date | undefined;
493
+ createdAtTo?: Date | undefined;
494
+ }, {
495
+ supplierId?: number | undefined;
496
+ warehouseId?: number | undefined;
497
+ currencyId?: number | undefined;
498
+ status?: "draft" | "posted" | "reversed" | undefined;
499
+ createdAtFrom?: Date | undefined;
500
+ createdAtTo?: Date | 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>;
493
508
  declare const deliveryUpdatePayloadSchema: z.ZodObject<{
494
509
  supplierId: z.ZodOptional<z.ZodInt>;
495
510
  warehouseId: z.ZodOptional<z.ZodInt>;
@@ -500,6 +515,20 @@ declare const deliveryUpdatePayloadSchema: z.ZodObject<{
500
515
  out: {};
501
516
  in: {};
502
517
  }>;
518
+ type DeliveryCreatePayload = z.infer<typeof deliveryCreatePayloadSchema>;
519
+ type DeliverySelectOneQuery = z.infer<typeof deliverySelectOneQuerySchema>;
520
+ type DeliverySearchOptions = z.infer<typeof deliverySearchOptionsSchema>;
521
+ type DeliverySearchResult = {
522
+ deliveries: Delivery[];
523
+ total: number;
524
+ };
525
+ type DeliveryUpdatePayload = z.infer<typeof deliveryUpdatePayloadSchema>;
526
+ declare const deliveryDeletePayloadSchema: z.ZodObject<{
527
+ deliveryId: z.ZodInt;
528
+ }, z.core.$strip>;
529
+ declare const deliveryPostPayloadSchema: z.ZodObject<{
530
+ deliveryId: z.ZodInt;
531
+ }, z.core.$strip>;
503
532
  declare const deliveryItemAddPayloadSchema: z.ZodObject<{
504
533
  deliveryId: z.ZodInt;
505
534
  productVariantId: z.ZodInt;
@@ -532,6 +561,9 @@ declare const deliveryDetailsSchema: z.ZodObject<{
532
561
  reversed: "reversed";
533
562
  }>;
534
563
  notes: z.ZodNullable<z.ZodString>;
564
+ exchangeRateId: z.ZodNullable<z.ZodInt>;
565
+ exchangeRate: z.ZodNullable<z.ZodString>;
566
+ exchangeRateValidFromDate: z.ZodNullable<z.ZodNullable<z.ZodISODate>>;
535
567
  postedAt: z.ZodNullable<z.ZodDate>;
536
568
  updatedAt: z.ZodNullable<z.ZodDate>;
537
569
  createdAt: z.ZodDate;
@@ -541,14 +573,13 @@ declare const deliveryDetailsSchema: z.ZodObject<{
541
573
  productVariantId: z.ZodInt;
542
574
  quantity: z.ZodNumber;
543
575
  unitCost: z.ZodNullable<z.ZodString>;
576
+ unitCostBase: z.ZodNullable<z.ZodString>;
544
577
  updatedAt: z.ZodNullable<z.ZodDate>;
545
578
  createdAt: z.ZodDate;
546
579
  }, z.core.$strip>>;
547
580
  }, 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
581
  type DeliveryDeletePayload = z.infer<typeof deliveryDeletePayloadSchema>;
582
+ type DeliveryPostPayload = z.infer<typeof deliveryPostPayloadSchema>;
552
583
  type DeliveryItemAddPayload = z.infer<typeof deliveryItemAddPayloadSchema>;
553
584
  type DeliveryItemUpdatePayload = z.infer<typeof deliveryItemUpdatePayloadSchema>;
554
585
  type DeliveryItemDeletePayload = z.infer<typeof deliveryItemDeletePayloadSchema>;
@@ -744,7 +775,7 @@ declare const exchangeRateSchema: z.ZodObject<{
744
775
  id: z.ZodInt;
745
776
  currencyId: z.ZodInt;
746
777
  rate: z.ZodString;
747
- validFromDate: z.ZodDate;
778
+ validFromDate: z.ZodISODate;
748
779
  }, z.core.$strip>;
749
780
  type ExchangeRate = z.infer<typeof exchangeRateSchema>;
750
781
  //#endregion
@@ -752,16 +783,16 @@ type ExchangeRate = z.infer<typeof exchangeRateSchema>;
752
783
  declare const exchangeRateSearchOptionsSchema: z.ZodObject<{
753
784
  where: z.ZodOptional<z.ZodPipe<z.ZodObject<{
754
785
  currencyId: z.ZodOptional<z.ZodInt>;
755
- validFromDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
786
+ validFromDate: z.ZodOptional<z.ZodISODate>;
756
787
  }, z.core.$strip>, z.ZodTransform<{
757
788
  currencyId: number;
758
- validFromDate?: Date | undefined;
789
+ validFromDate?: string | undefined;
759
790
  } | {
760
791
  currencyId?: number | undefined;
761
- validFromDate: Date;
792
+ validFromDate: string;
762
793
  }, {
763
794
  currencyId?: number | undefined;
764
- validFromDate?: Date | undefined;
795
+ validFromDate?: string | undefined;
765
796
  }>>>;
766
797
  pagination: z.ZodObject<{
767
798
  offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
@@ -774,7 +805,7 @@ type ExchangeRateSearchResult = {
774
805
  total: number;
775
806
  };
776
807
  type ExchangeRateDateSearchResult = {
777
- dates: Date[];
808
+ dates: string[];
778
809
  total: number;
779
810
  };
780
811
  type CurrencyListResult = {
@@ -1031,23 +1062,4 @@ type ProductVariantCreateResult = {
1031
1062
  };
1032
1063
  type ProductVariantUpdatePayload = z.infer<typeof productVariantUpdatePayloadSchema>;
1033
1064
  //#endregion
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 };
1065
+ 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, DeliveryPostPayload, 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 };