@esb-market-contracts/backend 1.0.34 → 1.0.36
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 +220 -82
- package/enums.d.ts +10 -1
- package/enums.js +18 -10
- package/package.json +1 -1
- package/types.d.ts +169 -110
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:
|
|
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?:
|
|
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:
|
|
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?:
|
|
671
|
+
validFromDate?: string | undefined;
|
|
671
672
|
} | undefined;
|
|
672
673
|
pagination: {
|
|
673
674
|
offset?: unknown;
|
|
@@ -680,88 +681,225 @@ declare const exchangeRatesRouter: import("hono/hono-base").HonoBase<{
|
|
|
680
681
|
}, "/finance/exchange-rates", "/finance/exchange-rates/search">;
|
|
681
682
|
type ExchangeRatesRouter = typeof exchangeRatesRouter;
|
|
682
683
|
//#endregion
|
|
684
|
+
//#region src/app/routes/(procurement)/deliveries.routes.d.ts
|
|
685
|
+
declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
|
|
686
|
+
Variables: VariablesWithActor;
|
|
687
|
+
}, {
|
|
688
|
+
"/operations/deliveries/one": {
|
|
689
|
+
$get: {
|
|
690
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
691
|
+
delivery: {
|
|
692
|
+
id: number;
|
|
693
|
+
code: string;
|
|
694
|
+
supplierId: number;
|
|
695
|
+
warehouseId: number;
|
|
696
|
+
currencyId: number;
|
|
697
|
+
status: "draft" | "posted" | "reversed";
|
|
698
|
+
notes: string | null;
|
|
699
|
+
exchangeRateId: number | null;
|
|
700
|
+
exchangeRate: string | null;
|
|
701
|
+
exchangeRateValidFromDate: string | null;
|
|
702
|
+
postedAt: Date | null;
|
|
703
|
+
updatedAt: Date | null;
|
|
704
|
+
createdAt: Date;
|
|
705
|
+
items: {
|
|
706
|
+
id: number;
|
|
707
|
+
deliveryId: number;
|
|
708
|
+
productVariantId: number;
|
|
709
|
+
quantity: number;
|
|
710
|
+
unitCost: string | null;
|
|
711
|
+
unitCostBase: string | null;
|
|
712
|
+
updatedAt: Date | null;
|
|
713
|
+
createdAt: Date;
|
|
714
|
+
}[];
|
|
715
|
+
};
|
|
716
|
+
}>;
|
|
717
|
+
outputFormat: "json";
|
|
718
|
+
status: 200;
|
|
719
|
+
input: {
|
|
720
|
+
query: {
|
|
721
|
+
id: string | string[];
|
|
722
|
+
};
|
|
723
|
+
};
|
|
724
|
+
};
|
|
725
|
+
};
|
|
726
|
+
} & {
|
|
727
|
+
"/operations/deliveries/create": {
|
|
728
|
+
$post: {
|
|
729
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
730
|
+
delivery: {
|
|
731
|
+
id: number;
|
|
732
|
+
code: string;
|
|
733
|
+
supplierId: number;
|
|
734
|
+
warehouseId: number;
|
|
735
|
+
currencyId: number;
|
|
736
|
+
status: "draft" | "posted" | "reversed";
|
|
737
|
+
notes: string | null;
|
|
738
|
+
exchangeRateId: number | null;
|
|
739
|
+
exchangeRate: string | null;
|
|
740
|
+
exchangeRateValidFromDate: string | null;
|
|
741
|
+
postedAt: Date | null;
|
|
742
|
+
updatedAt: Date | null;
|
|
743
|
+
createdAt: Date;
|
|
744
|
+
items: {
|
|
745
|
+
id: number;
|
|
746
|
+
deliveryId: number;
|
|
747
|
+
productVariantId: number;
|
|
748
|
+
quantity: number;
|
|
749
|
+
unitCost: string | null;
|
|
750
|
+
unitCostBase: string | null;
|
|
751
|
+
updatedAt: Date | null;
|
|
752
|
+
createdAt: Date;
|
|
753
|
+
}[];
|
|
754
|
+
};
|
|
755
|
+
}>;
|
|
756
|
+
outputFormat: "json";
|
|
757
|
+
status: 201;
|
|
758
|
+
input: {
|
|
759
|
+
json: {
|
|
760
|
+
supplierId: number;
|
|
761
|
+
warehouseId: number;
|
|
762
|
+
currencyId: number;
|
|
763
|
+
notes?: string | null | undefined;
|
|
764
|
+
};
|
|
765
|
+
};
|
|
766
|
+
};
|
|
767
|
+
};
|
|
768
|
+
} & {
|
|
769
|
+
"/operations/deliveries/update": {
|
|
770
|
+
$post: {
|
|
771
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
|
|
772
|
+
outputFormat: "json";
|
|
773
|
+
status: 200;
|
|
774
|
+
input: {
|
|
775
|
+
json: {
|
|
776
|
+
supplierId?: number | undefined;
|
|
777
|
+
warehouseId?: number | undefined;
|
|
778
|
+
currencyId?: number | undefined;
|
|
779
|
+
notes?: string | null | undefined;
|
|
780
|
+
deliveryId: number;
|
|
781
|
+
};
|
|
782
|
+
};
|
|
783
|
+
};
|
|
784
|
+
};
|
|
785
|
+
} & {
|
|
786
|
+
"/operations/deliveries/delete": {
|
|
787
|
+
$post: {
|
|
788
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
|
|
789
|
+
outputFormat: "json";
|
|
790
|
+
status: 200;
|
|
791
|
+
input: {
|
|
792
|
+
json: {
|
|
793
|
+
deliveryId: number;
|
|
794
|
+
};
|
|
795
|
+
};
|
|
796
|
+
};
|
|
797
|
+
};
|
|
798
|
+
} & {
|
|
799
|
+
"/operations/deliveries/post": {
|
|
800
|
+
$post: {
|
|
801
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
|
|
802
|
+
outputFormat: "json";
|
|
803
|
+
status: 200;
|
|
804
|
+
input: {
|
|
805
|
+
json: {
|
|
806
|
+
deliveryId: number;
|
|
807
|
+
};
|
|
808
|
+
};
|
|
809
|
+
};
|
|
810
|
+
};
|
|
811
|
+
} & {
|
|
812
|
+
"/operations/deliveries/item/add": {
|
|
813
|
+
$post: {
|
|
814
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
815
|
+
deliveryItem: {
|
|
816
|
+
id: number;
|
|
817
|
+
deliveryId: number;
|
|
818
|
+
productVariantId: number;
|
|
819
|
+
quantity: number;
|
|
820
|
+
unitCost: string | null;
|
|
821
|
+
unitCostBase: string | null;
|
|
822
|
+
updatedAt: Date | null;
|
|
823
|
+
createdAt: Date;
|
|
824
|
+
};
|
|
825
|
+
}>;
|
|
826
|
+
outputFormat: "json";
|
|
827
|
+
status: 200;
|
|
828
|
+
input: {
|
|
829
|
+
json: {
|
|
830
|
+
deliveryId: number;
|
|
831
|
+
productVariantId: number;
|
|
832
|
+
unitCost: string | null;
|
|
833
|
+
quantity?: number | undefined;
|
|
834
|
+
};
|
|
835
|
+
};
|
|
836
|
+
};
|
|
837
|
+
};
|
|
838
|
+
} & {
|
|
839
|
+
"/operations/deliveries/item/update": {
|
|
840
|
+
$post: {
|
|
841
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
842
|
+
deliveryItem: {
|
|
843
|
+
id: number;
|
|
844
|
+
deliveryId: number;
|
|
845
|
+
productVariantId: number;
|
|
846
|
+
quantity: number;
|
|
847
|
+
unitCost: string | null;
|
|
848
|
+
unitCostBase: string | null;
|
|
849
|
+
updatedAt: Date | null;
|
|
850
|
+
createdAt: Date;
|
|
851
|
+
};
|
|
852
|
+
}>;
|
|
853
|
+
outputFormat: "json";
|
|
854
|
+
status: 200;
|
|
855
|
+
input: {
|
|
856
|
+
json: {
|
|
857
|
+
quantity?: number | undefined;
|
|
858
|
+
unitCost?: string | null | undefined;
|
|
859
|
+
deliveryItemId: number;
|
|
860
|
+
};
|
|
861
|
+
};
|
|
862
|
+
};
|
|
863
|
+
};
|
|
864
|
+
} & {
|
|
865
|
+
"/operations/deliveries/item/delete": {
|
|
866
|
+
$post: {
|
|
867
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
868
|
+
deliveryItem: {
|
|
869
|
+
id: number;
|
|
870
|
+
deliveryId: number;
|
|
871
|
+
productVariantId: number;
|
|
872
|
+
quantity: number;
|
|
873
|
+
unitCost: string | null;
|
|
874
|
+
unitCostBase: string | null;
|
|
875
|
+
updatedAt: Date | null;
|
|
876
|
+
createdAt: Date;
|
|
877
|
+
};
|
|
878
|
+
}>;
|
|
879
|
+
outputFormat: "json";
|
|
880
|
+
status: 200;
|
|
881
|
+
input: {
|
|
882
|
+
json: {
|
|
883
|
+
deliveryItemId: number;
|
|
884
|
+
};
|
|
885
|
+
};
|
|
886
|
+
};
|
|
887
|
+
};
|
|
888
|
+
}, "/operations/deliveries", "/operations/deliveries/item/delete">;
|
|
889
|
+
type DeliveriesRouter = typeof deliveriesRouter;
|
|
890
|
+
//#endregion
|
|
683
891
|
//#region src/app/flows/(audit)/audit/audit.enums.d.ts
|
|
684
892
|
declare const auditLogSourcesArray: readonly ['admin', 'backend'];
|
|
685
893
|
type AuditLogSource = (typeof auditLogSourcesArray)[number];
|
|
686
894
|
//#endregion
|
|
687
895
|
//#region src/app/domain/(audit)/audit-logs/audit-logs.schemas.d.ts
|
|
688
|
-
declare const auditLogSchema:
|
|
689
|
-
id:
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
notNull: true;
|
|
696
|
-
hasDefault: true;
|
|
697
|
-
isPrimaryKey: false;
|
|
698
|
-
isAutoincrement: false;
|
|
699
|
-
hasRuntimeDefault: false;
|
|
700
|
-
enumValues: undefined;
|
|
701
|
-
identity: undefined;
|
|
702
|
-
generated: undefined;
|
|
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" | "supplier.activated" | "supplier.archived" | "supplier.created" | "supplier.updated" | "warehouse.activated" | "warehouse.archived" | "warehouse.created" | "warehouse.updated">, {
|
|
705
|
-
name: string;
|
|
706
|
-
tableName: "audit_logs";
|
|
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" | "supplier.activated" | "supplier.archived" | "supplier.created" | "supplier.updated" | "warehouse.activated" | "warehouse.archived" | "warehouse.created" | "warehouse.updated";
|
|
709
|
-
driverParam: string;
|
|
710
|
-
notNull: true;
|
|
711
|
-
hasDefault: false;
|
|
712
|
-
isPrimaryKey: false;
|
|
713
|
-
isAutoincrement: false;
|
|
714
|
-
hasRuntimeDefault: false;
|
|
715
|
-
enumValues: undefined;
|
|
716
|
-
identity: undefined;
|
|
717
|
-
generated: undefined;
|
|
718
|
-
}>;
|
|
719
|
-
actorEmployeeId: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").PgIntegerBuilder, {
|
|
720
|
-
name: string;
|
|
721
|
-
tableName: "audit_logs";
|
|
722
|
-
dataType: "number int32";
|
|
723
|
-
data: number;
|
|
724
|
-
driverParam: string | number;
|
|
725
|
-
notNull: false;
|
|
726
|
-
hasDefault: false;
|
|
727
|
-
isPrimaryKey: false;
|
|
728
|
-
isAutoincrement: false;
|
|
729
|
-
hasRuntimeDefault: false;
|
|
730
|
-
enumValues: undefined;
|
|
731
|
-
identity: undefined;
|
|
732
|
-
generated: undefined;
|
|
733
|
-
}>;
|
|
734
|
-
payload: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgJsonbBuilder>, {
|
|
735
|
-
name: string;
|
|
736
|
-
tableName: "audit_logs";
|
|
737
|
-
dataType: "object json";
|
|
738
|
-
data: unknown;
|
|
739
|
-
driverParam: unknown;
|
|
740
|
-
notNull: true;
|
|
741
|
-
hasDefault: false;
|
|
742
|
-
isPrimaryKey: false;
|
|
743
|
-
isAutoincrement: false;
|
|
744
|
-
hasRuntimeDefault: false;
|
|
745
|
-
enumValues: undefined;
|
|
746
|
-
identity: undefined;
|
|
747
|
-
generated: undefined;
|
|
748
|
-
}>;
|
|
749
|
-
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>>, {
|
|
750
|
-
name: string;
|
|
751
|
-
tableName: "audit_logs";
|
|
752
|
-
dataType: "object date";
|
|
753
|
-
data: Date;
|
|
754
|
-
driverParam: string;
|
|
755
|
-
notNull: true;
|
|
756
|
-
hasDefault: true;
|
|
757
|
-
isPrimaryKey: false;
|
|
758
|
-
isAutoincrement: false;
|
|
759
|
-
hasRuntimeDefault: false;
|
|
760
|
-
enumValues: undefined;
|
|
761
|
-
identity: undefined;
|
|
762
|
-
generated: undefined;
|
|
763
|
-
}>;
|
|
764
|
-
}, undefined, undefined>;
|
|
896
|
+
declare const auditLogSchema: z.ZodObject<{
|
|
897
|
+
id: z.ZodInt;
|
|
898
|
+
event: z.ZodString;
|
|
899
|
+
actorEmployeeId: z.ZodNullable<z.ZodInt>;
|
|
900
|
+
payload: z.ZodType<import("drizzle-orm").Json, unknown, z.core.$ZodTypeInternals<import("drizzle-orm").Json, unknown>>;
|
|
901
|
+
createdAt: z.ZodDate;
|
|
902
|
+
}, z.core.$strip>;
|
|
765
903
|
//#endregion
|
|
766
904
|
//#region src/app/flows/(audit)/audit/audit.schemas.d.ts
|
|
767
905
|
type AuditLogResult = z.infer<typeof auditLogSchema> & {
|
|
@@ -1157,4 +1295,4 @@ declare const warehousesRouter: import("hono/hono-base").HonoBase<{
|
|
|
1157
1295
|
}, "/operations/warehouses", "/operations/warehouses/switch-status">;
|
|
1158
1296
|
type WarehousesRouter = typeof warehousesRouter;
|
|
1159
1297
|
//#endregion
|
|
1160
|
-
export type { AuditLogsRouter, BrandsRouter, CategoriesRouter, CountriesRouter, CustomersRouter, ExchangeRatesRouter, MeasurementUnitsRouter, ProductVariantsRouter, ProductsRouter, SuppliersRouter, WarehousesRouter };
|
|
1298
|
+
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/
|
|
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 =
|
|
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
|
|
30
|
-
import { pgEnum as
|
|
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 =
|
|
33
|
-
var customerTypesRecord =
|
|
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
|
|
37
|
-
import { pgEnum as
|
|
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 =
|
|
40
|
-
var productStatusesRecord =
|
|
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
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
|
}, {
|
|
@@ -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:
|
|
268
|
-
id:
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
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" | "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" | "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;
|
|
@@ -462,6 +389,116 @@ type CustomerSelectOneQuery = z.infer<typeof customerSelectOneQuerySchema>;
|
|
|
462
389
|
type CustomerCreatePayload = z.infer<typeof customerCreatePayloadSchema>;
|
|
463
390
|
type CustomerUpdatePayload = z.infer<typeof customerUpdatePayloadSchema>;
|
|
464
391
|
//#endregion
|
|
392
|
+
//#region src/app/domain/(procurement)/delivery-items/delivery-items.schemas.d.ts
|
|
393
|
+
declare const deliveryItemSchema: z.ZodObject<{
|
|
394
|
+
id: z.ZodInt;
|
|
395
|
+
deliveryId: z.ZodInt;
|
|
396
|
+
productVariantId: z.ZodInt;
|
|
397
|
+
quantity: z.ZodNumber;
|
|
398
|
+
unitCost: z.ZodNullable<z.ZodString>;
|
|
399
|
+
unitCostBase: z.ZodNullable<z.ZodString>;
|
|
400
|
+
updatedAt: z.ZodNullable<z.ZodDate>;
|
|
401
|
+
createdAt: z.ZodDate;
|
|
402
|
+
}, z.core.$strip>;
|
|
403
|
+
type DeliveryItem = z.infer<typeof deliveryItemSchema>;
|
|
404
|
+
//#endregion
|
|
405
|
+
//#region src/app/flows/(procurement)/delivery/delivery.schemas.d.ts
|
|
406
|
+
declare const deliverySelectOneQuerySchema: z.ZodObject<{
|
|
407
|
+
id: z.ZodInt;
|
|
408
|
+
}, z.core.$strip>;
|
|
409
|
+
declare const deliveryDeletePayloadSchema: z.ZodObject<{
|
|
410
|
+
deliveryId: z.ZodInt;
|
|
411
|
+
}, z.core.$strip>;
|
|
412
|
+
declare const deliveryPostPayloadSchema: z.ZodObject<{
|
|
413
|
+
deliveryId: z.ZodInt;
|
|
414
|
+
}, z.core.$strip>;
|
|
415
|
+
declare const deliveryCreatePayloadSchema: z.ZodObject<{
|
|
416
|
+
supplierId: z.ZodInt;
|
|
417
|
+
warehouseId: z.ZodInt;
|
|
418
|
+
currencyId: z.ZodInt;
|
|
419
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
420
|
+
}, {
|
|
421
|
+
out: {};
|
|
422
|
+
in: {};
|
|
423
|
+
}>;
|
|
424
|
+
declare const deliveryUpdatePayloadSchema: z.ZodObject<{
|
|
425
|
+
supplierId: z.ZodOptional<z.ZodInt>;
|
|
426
|
+
warehouseId: z.ZodOptional<z.ZodInt>;
|
|
427
|
+
currencyId: z.ZodOptional<z.ZodInt>;
|
|
428
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
429
|
+
deliveryId: z.ZodInt;
|
|
430
|
+
}, {
|
|
431
|
+
out: {};
|
|
432
|
+
in: {};
|
|
433
|
+
}>;
|
|
434
|
+
declare const deliveryItemAddPayloadSchema: z.ZodObject<{
|
|
435
|
+
deliveryId: z.ZodInt;
|
|
436
|
+
productVariantId: z.ZodInt;
|
|
437
|
+
unitCost: z.ZodNullable<z.ZodString>;
|
|
438
|
+
quantity: z.ZodDefault<z.ZodNumber>;
|
|
439
|
+
}, {
|
|
440
|
+
out: {};
|
|
441
|
+
in: {};
|
|
442
|
+
}>;
|
|
443
|
+
declare const deliveryItemUpdatePayloadSchema: z.ZodObject<{
|
|
444
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
445
|
+
unitCost: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
446
|
+
deliveryItemId: z.ZodInt;
|
|
447
|
+
}, {
|
|
448
|
+
out: {};
|
|
449
|
+
in: {};
|
|
450
|
+
}>;
|
|
451
|
+
declare const deliveryItemDeletePayloadSchema: z.ZodObject<{
|
|
452
|
+
deliveryItemId: z.ZodInt;
|
|
453
|
+
}, z.core.$strip>;
|
|
454
|
+
declare const deliveryDetailsSchema: z.ZodObject<{
|
|
455
|
+
id: z.ZodInt;
|
|
456
|
+
code: z.ZodString;
|
|
457
|
+
supplierId: z.ZodInt;
|
|
458
|
+
warehouseId: z.ZodInt;
|
|
459
|
+
currencyId: z.ZodInt;
|
|
460
|
+
status: z.ZodEnum<{
|
|
461
|
+
draft: "draft";
|
|
462
|
+
posted: "posted";
|
|
463
|
+
reversed: "reversed";
|
|
464
|
+
}>;
|
|
465
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
466
|
+
exchangeRateId: z.ZodNullable<z.ZodInt>;
|
|
467
|
+
exchangeRate: z.ZodNullable<z.ZodString>;
|
|
468
|
+
exchangeRateValidFromDate: z.ZodNullable<z.ZodNullable<z.ZodISODate>>;
|
|
469
|
+
postedAt: z.ZodNullable<z.ZodDate>;
|
|
470
|
+
updatedAt: z.ZodNullable<z.ZodDate>;
|
|
471
|
+
createdAt: z.ZodDate;
|
|
472
|
+
items: z.ZodArray<z.ZodObject<{
|
|
473
|
+
id: z.ZodInt;
|
|
474
|
+
deliveryId: z.ZodInt;
|
|
475
|
+
productVariantId: z.ZodInt;
|
|
476
|
+
quantity: z.ZodNumber;
|
|
477
|
+
unitCost: z.ZodNullable<z.ZodString>;
|
|
478
|
+
unitCostBase: z.ZodNullable<z.ZodString>;
|
|
479
|
+
updatedAt: z.ZodNullable<z.ZodDate>;
|
|
480
|
+
createdAt: z.ZodDate;
|
|
481
|
+
}, z.core.$strip>>;
|
|
482
|
+
}, z.core.$strip>;
|
|
483
|
+
type DeliverySelectOneQuery = z.infer<typeof deliverySelectOneQuerySchema>;
|
|
484
|
+
type DeliveryCreatePayload = z.infer<typeof deliveryCreatePayloadSchema>;
|
|
485
|
+
type DeliveryUpdatePayload = z.infer<typeof deliveryUpdatePayloadSchema>;
|
|
486
|
+
type DeliveryDeletePayload = z.infer<typeof deliveryDeletePayloadSchema>;
|
|
487
|
+
type DeliveryPostPayload = z.infer<typeof deliveryPostPayloadSchema>;
|
|
488
|
+
type DeliveryItemAddPayload = z.infer<typeof deliveryItemAddPayloadSchema>;
|
|
489
|
+
type DeliveryItemUpdatePayload = z.infer<typeof deliveryItemUpdatePayloadSchema>;
|
|
490
|
+
type DeliveryItemDeletePayload = z.infer<typeof deliveryItemDeletePayloadSchema>;
|
|
491
|
+
type DeliveryItemResult = {
|
|
492
|
+
deliveryItem: DeliveryItem;
|
|
493
|
+
};
|
|
494
|
+
type DeliveryDetails = z.infer<typeof deliveryDetailsSchema>;
|
|
495
|
+
type DeliveryCreateResult = {
|
|
496
|
+
delivery: DeliveryDetails;
|
|
497
|
+
};
|
|
498
|
+
type DeliverySelectOneResult = {
|
|
499
|
+
delivery: DeliveryDetails;
|
|
500
|
+
};
|
|
501
|
+
//#endregion
|
|
465
502
|
//#region src/app/domain/(procurement)/suppliers/suppliers.schemas.d.ts
|
|
466
503
|
declare const supplierSchema: z.ZodObject<{
|
|
467
504
|
id: z.ZodInt;
|
|
@@ -643,7 +680,7 @@ declare const exchangeRateSchema: z.ZodObject<{
|
|
|
643
680
|
id: z.ZodInt;
|
|
644
681
|
currencyId: z.ZodInt;
|
|
645
682
|
rate: z.ZodString;
|
|
646
|
-
validFromDate: z.
|
|
683
|
+
validFromDate: z.ZodISODate;
|
|
647
684
|
}, z.core.$strip>;
|
|
648
685
|
type ExchangeRate = z.infer<typeof exchangeRateSchema>;
|
|
649
686
|
//#endregion
|
|
@@ -651,16 +688,16 @@ type ExchangeRate = z.infer<typeof exchangeRateSchema>;
|
|
|
651
688
|
declare const exchangeRateSearchOptionsSchema: z.ZodObject<{
|
|
652
689
|
where: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
653
690
|
currencyId: z.ZodOptional<z.ZodInt>;
|
|
654
|
-
validFromDate: z.ZodOptional<z.
|
|
691
|
+
validFromDate: z.ZodOptional<z.ZodISODate>;
|
|
655
692
|
}, z.core.$strip>, z.ZodTransform<{
|
|
656
693
|
currencyId: number;
|
|
657
|
-
validFromDate?:
|
|
694
|
+
validFromDate?: string | undefined;
|
|
658
695
|
} | {
|
|
659
696
|
currencyId?: number | undefined;
|
|
660
|
-
validFromDate:
|
|
697
|
+
validFromDate: string;
|
|
661
698
|
}, {
|
|
662
699
|
currencyId?: number | undefined;
|
|
663
|
-
validFromDate?:
|
|
700
|
+
validFromDate?: string | undefined;
|
|
664
701
|
}>>>;
|
|
665
702
|
pagination: z.ZodObject<{
|
|
666
703
|
offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
@@ -673,7 +710,7 @@ type ExchangeRateSearchResult = {
|
|
|
673
710
|
total: number;
|
|
674
711
|
};
|
|
675
712
|
type ExchangeRateDateSearchResult = {
|
|
676
|
-
dates:
|
|
713
|
+
dates: string[];
|
|
677
714
|
total: number;
|
|
678
715
|
};
|
|
679
716
|
type CurrencyListResult = {
|
|
@@ -796,21 +833,21 @@ declare const productDeletePayloadSchema: z.ZodObject<{
|
|
|
796
833
|
productId: z.ZodInt;
|
|
797
834
|
}, z.core.$strip>;
|
|
798
835
|
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
|
|
836
|
+
slug: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodString>>, unknown>;
|
|
837
|
+
model: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodString>>, unknown>;
|
|
801
838
|
name: z.ZodOptional<z.ZodPreprocess<z.ZodNullable<z.ZodRecord<z.ZodEnum<{
|
|
802
839
|
en: "en";
|
|
803
840
|
ka: "ka";
|
|
804
841
|
ru: "ru";
|
|
805
|
-
}> & z.core.$partial, z.ZodString
|
|
842
|
+
}> & z.core.$partial, z.ZodString>>, unknown>>;
|
|
806
843
|
description: z.ZodOptional<z.ZodPreprocess<z.ZodNullable<z.ZodRecord<z.ZodEnum<{
|
|
807
844
|
en: "en";
|
|
808
845
|
ka: "ka";
|
|
809
846
|
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
|
|
847
|
+
}> & z.core.$partial, z.ZodString>>, unknown>>;
|
|
848
|
+
categoryId: z.ZodOptional<z.ZodPreprocess<z.ZodUnion<readonly [z.ZodNull, z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>]>, unknown>>;
|
|
849
|
+
brandId: z.ZodOptional<z.ZodPreprocess<z.ZodUnion<readonly [z.ZodNull, z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>]>, unknown>>;
|
|
850
|
+
images: z.ZodOptional<z.ZodPreprocess<z.ZodArray<z.ZodFile>, unknown>>;
|
|
814
851
|
bannerImageIndex: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
815
852
|
}, {
|
|
816
853
|
out: {};
|
|
@@ -822,21 +859,21 @@ declare const productUpdatePayloadSchema: z.ZodObject<{
|
|
|
822
859
|
archived: "archived";
|
|
823
860
|
draft: "draft";
|
|
824
861
|
}>>;
|
|
825
|
-
slug: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodString
|
|
826
|
-
model: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodString
|
|
862
|
+
slug: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodString>>, unknown>;
|
|
863
|
+
model: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodString>>, unknown>>;
|
|
827
864
|
name: z.ZodOptional<z.ZodPreprocess<z.ZodNullable<z.ZodRecord<z.ZodEnum<{
|
|
828
865
|
en: "en";
|
|
829
866
|
ka: "ka";
|
|
830
867
|
ru: "ru";
|
|
831
|
-
}> & z.core.$partial, z.ZodString
|
|
868
|
+
}> & z.core.$partial, z.ZodString>>, unknown>>;
|
|
832
869
|
description: z.ZodOptional<z.ZodPreprocess<z.ZodNullable<z.ZodRecord<z.ZodEnum<{
|
|
833
870
|
en: "en";
|
|
834
871
|
ka: "ka";
|
|
835
872
|
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
|
|
873
|
+
}> & z.core.$partial, z.ZodString>>, unknown>>;
|
|
874
|
+
categoryId: z.ZodOptional<z.ZodPreprocess<z.ZodUnion<readonly [z.ZodNull, z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>]>, unknown>>;
|
|
875
|
+
brandId: z.ZodOptional<z.ZodPreprocess<z.ZodUnion<readonly [z.ZodNull, z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>]>, unknown>>;
|
|
876
|
+
images: z.ZodOptional<z.ZodPreprocess<z.ZodArray<z.ZodFile>, unknown>>;
|
|
840
877
|
bannerImageIndex: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
841
878
|
productId: z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>;
|
|
842
879
|
}, {
|
|
@@ -930,4 +967,26 @@ type ProductVariantCreateResult = {
|
|
|
930
967
|
};
|
|
931
968
|
type ProductVariantUpdatePayload = z.infer<typeof productVariantUpdatePayloadSchema>;
|
|
932
969
|
//#endregion
|
|
933
|
-
|
|
970
|
+
//#region src/app/domain/(procurement)/deliveries/deliveries.schemas.d.ts
|
|
971
|
+
declare const deliverySchema: z.ZodObject<{
|
|
972
|
+
id: z.ZodInt;
|
|
973
|
+
code: z.ZodString;
|
|
974
|
+
supplierId: z.ZodInt;
|
|
975
|
+
warehouseId: z.ZodInt;
|
|
976
|
+
currencyId: z.ZodInt;
|
|
977
|
+
status: z.ZodEnum<{
|
|
978
|
+
draft: "draft";
|
|
979
|
+
posted: "posted";
|
|
980
|
+
reversed: "reversed";
|
|
981
|
+
}>;
|
|
982
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
983
|
+
exchangeRateId: z.ZodNullable<z.ZodInt>;
|
|
984
|
+
exchangeRate: z.ZodNullable<z.ZodString>;
|
|
985
|
+
exchangeRateValidFromDate: z.ZodNullable<z.ZodNullable<z.ZodISODate>>;
|
|
986
|
+
postedAt: z.ZodNullable<z.ZodDate>;
|
|
987
|
+
updatedAt: z.ZodNullable<z.ZodDate>;
|
|
988
|
+
createdAt: z.ZodDate;
|
|
989
|
+
}, z.core.$strip>;
|
|
990
|
+
type Delivery = z.infer<typeof deliverySchema>;
|
|
991
|
+
//#endregion
|
|
992
|
+
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, 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 };
|