@esb-market-contracts/backend 1.0.26 → 1.0.27
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 +96 -3
- package/package.json +1 -1
- package/types.d.ts +81 -3
package/api.d.ts
CHANGED
|
@@ -666,11 +666,11 @@ declare const auditLogSchema: import("drizzle-orm/zod").BuildSchema<"select", {
|
|
|
666
666
|
identity: undefined;
|
|
667
667
|
generated: undefined;
|
|
668
668
|
}>;
|
|
669
|
-
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">, {
|
|
669
|
+
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">, {
|
|
670
670
|
name: string;
|
|
671
671
|
tableName: "audit_logs";
|
|
672
672
|
dataType: "string";
|
|
673
|
-
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";
|
|
673
|
+
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";
|
|
674
674
|
driverParam: string;
|
|
675
675
|
notNull: true;
|
|
676
676
|
hasDefault: false;
|
|
@@ -890,4 +890,97 @@ declare const customersRouter: import("hono/hono-base").HonoBase<{
|
|
|
890
890
|
}, "/operations/customers", "/operations/customers/update">;
|
|
891
891
|
type CustomersRouter = typeof customersRouter;
|
|
892
892
|
//#endregion
|
|
893
|
-
|
|
893
|
+
//#region src/app/routes/(operations)/warehouses.routes.d.ts
|
|
894
|
+
declare const warehousesRouter: import("hono/hono-base").HonoBase<{
|
|
895
|
+
Variables: VariablesWithActor;
|
|
896
|
+
}, {
|
|
897
|
+
"/operations/warehouses/one": {
|
|
898
|
+
$get: {
|
|
899
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
900
|
+
warehouse: {
|
|
901
|
+
id: number;
|
|
902
|
+
code: string;
|
|
903
|
+
name: Partial<Record<"en" | "ka" | "ru", string>>;
|
|
904
|
+
status: "active" | "archived";
|
|
905
|
+
salesEnabled: boolean;
|
|
906
|
+
updatedAt: Date | null;
|
|
907
|
+
createdAt: Date;
|
|
908
|
+
};
|
|
909
|
+
}>;
|
|
910
|
+
outputFormat: "json";
|
|
911
|
+
status: 200;
|
|
912
|
+
input: {
|
|
913
|
+
query: {
|
|
914
|
+
id: string | string[];
|
|
915
|
+
};
|
|
916
|
+
};
|
|
917
|
+
};
|
|
918
|
+
};
|
|
919
|
+
} & {
|
|
920
|
+
"/operations/warehouses/create": {
|
|
921
|
+
$post: {
|
|
922
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
|
|
923
|
+
outputFormat: "json";
|
|
924
|
+
status: 201;
|
|
925
|
+
input: {
|
|
926
|
+
json: {
|
|
927
|
+
code: string;
|
|
928
|
+
name: Partial<Record<"en" | "ka" | "ru", string>>;
|
|
929
|
+
salesEnabled: boolean;
|
|
930
|
+
};
|
|
931
|
+
};
|
|
932
|
+
};
|
|
933
|
+
};
|
|
934
|
+
} & {
|
|
935
|
+
"/operations/warehouses/search": {
|
|
936
|
+
$post: {
|
|
937
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
938
|
+
warehouses: {
|
|
939
|
+
id: number;
|
|
940
|
+
code: string;
|
|
941
|
+
name: Partial<Record<"en" | "ka" | "ru", string>>;
|
|
942
|
+
status: "active" | "archived";
|
|
943
|
+
salesEnabled: boolean;
|
|
944
|
+
updatedAt: Date | null;
|
|
945
|
+
createdAt: Date;
|
|
946
|
+
}[];
|
|
947
|
+
total: number;
|
|
948
|
+
}>;
|
|
949
|
+
outputFormat: "json";
|
|
950
|
+
status: 200;
|
|
951
|
+
input: {
|
|
952
|
+
json: {
|
|
953
|
+
where?: {
|
|
954
|
+
status?: "active" | "archived" | undefined;
|
|
955
|
+
salesEnabled?: boolean | undefined;
|
|
956
|
+
} | undefined;
|
|
957
|
+
query?: string | undefined;
|
|
958
|
+
pagination: {
|
|
959
|
+
offset?: unknown;
|
|
960
|
+
limit?: unknown;
|
|
961
|
+
};
|
|
962
|
+
};
|
|
963
|
+
};
|
|
964
|
+
};
|
|
965
|
+
};
|
|
966
|
+
} & {
|
|
967
|
+
"/operations/warehouses/update": {
|
|
968
|
+
$post: {
|
|
969
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
|
|
970
|
+
outputFormat: "json";
|
|
971
|
+
status: 200;
|
|
972
|
+
input: {
|
|
973
|
+
json: {
|
|
974
|
+
code?: string | undefined;
|
|
975
|
+
name?: Partial<Record<"en" | "ka" | "ru", string>> | undefined;
|
|
976
|
+
status?: "active" | "archived" | undefined;
|
|
977
|
+
salesEnabled?: boolean | undefined;
|
|
978
|
+
warehouseId: number;
|
|
979
|
+
};
|
|
980
|
+
};
|
|
981
|
+
};
|
|
982
|
+
};
|
|
983
|
+
}, "/operations/warehouses", "/operations/warehouses/update">;
|
|
984
|
+
type WarehousesRouter = typeof warehousesRouter;
|
|
985
|
+
//#endregion
|
|
986
|
+
export type { AuditLogsRouter, BrandsRouter, CategoriesRouter, CountriesRouter, CustomersRouter, ExchangeRatesRouter, ProductVariantsRouter, ProductsRouter, WarehousesRouter };
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -248,11 +248,11 @@ declare const auditLogSchema: import("drizzle-orm/zod").BuildSchema<"select", {
|
|
|
248
248
|
identity: undefined;
|
|
249
249
|
generated: undefined;
|
|
250
250
|
}>;
|
|
251
|
-
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">, {
|
|
251
|
+
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">, {
|
|
252
252
|
name: string;
|
|
253
253
|
tableName: "audit_logs";
|
|
254
254
|
dataType: "string";
|
|
255
|
-
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";
|
|
255
|
+
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";
|
|
256
256
|
driverParam: string;
|
|
257
257
|
notNull: true;
|
|
258
258
|
hasDefault: false;
|
|
@@ -424,6 +424,84 @@ type CustomerSelectOneQuery = z.infer<typeof customerSelectOneQuerySchema>;
|
|
|
424
424
|
type CustomerCreatePayload = z.infer<typeof customerCreatePayloadSchema>;
|
|
425
425
|
type CustomerUpdatePayload = z.infer<typeof customerUpdatePayloadSchema>;
|
|
426
426
|
//#endregion
|
|
427
|
+
//#region src/app/domain/(operations)/warehouses/warehouses.schemas.d.ts
|
|
428
|
+
declare const warehouseSchema: z.ZodObject<{
|
|
429
|
+
id: z.ZodInt;
|
|
430
|
+
code: z.ZodString;
|
|
431
|
+
name: z.ZodRecord<z.ZodEnum<{
|
|
432
|
+
en: "en";
|
|
433
|
+
ka: "ka";
|
|
434
|
+
ru: "ru";
|
|
435
|
+
}> & z.core.$partial, z.ZodString>;
|
|
436
|
+
status: z.ZodEnum<{
|
|
437
|
+
active: "active";
|
|
438
|
+
archived: "archived";
|
|
439
|
+
}>;
|
|
440
|
+
salesEnabled: z.ZodBoolean;
|
|
441
|
+
updatedAt: z.ZodNullable<z.ZodDate>;
|
|
442
|
+
createdAt: z.ZodDate;
|
|
443
|
+
}, z.core.$strip>;
|
|
444
|
+
type Warehouse = z.infer<typeof warehouseSchema>;
|
|
445
|
+
//#endregion
|
|
446
|
+
//#region src/app/flows/warehouse/warehouse.schemas.d.ts
|
|
447
|
+
declare const warehouseSearchOptionsSchema: z.ZodObject<{
|
|
448
|
+
where: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
449
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
450
|
+
active: "active";
|
|
451
|
+
archived: "archived";
|
|
452
|
+
}>>;
|
|
453
|
+
salesEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
454
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
455
|
+
status?: "active" | "archived" | undefined;
|
|
456
|
+
salesEnabled: boolean;
|
|
457
|
+
} | {
|
|
458
|
+
status: "active" | "archived";
|
|
459
|
+
salesEnabled?: boolean | undefined;
|
|
460
|
+
}, {
|
|
461
|
+
status?: "active" | "archived" | undefined;
|
|
462
|
+
salesEnabled?: boolean | undefined;
|
|
463
|
+
}>>>;
|
|
464
|
+
query: z.ZodOptional<z.ZodString>;
|
|
465
|
+
pagination: z.ZodObject<{
|
|
466
|
+
offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
467
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
468
|
+
}, z.core.$strip>;
|
|
469
|
+
}, z.core.$strict>;
|
|
470
|
+
declare const warehouseSelectOneQuerySchema: z.ZodObject<{
|
|
471
|
+
id: z.ZodInt;
|
|
472
|
+
}, z.core.$strip>;
|
|
473
|
+
declare const warehouseCreatePayloadSchema: z.ZodObject<{
|
|
474
|
+
code: z.ZodString;
|
|
475
|
+
name: z.ZodRecord<z.ZodEnum<{
|
|
476
|
+
en: "en";
|
|
477
|
+
ka: "ka";
|
|
478
|
+
ru: "ru";
|
|
479
|
+
}> & z.core.$partial, z.ZodString>;
|
|
480
|
+
salesEnabled: z.ZodBoolean;
|
|
481
|
+
}, z.core.$strip>;
|
|
482
|
+
declare const warehouseUpdatePayloadSchema: z.ZodObject<{
|
|
483
|
+
code: z.ZodOptional<z.ZodString>;
|
|
484
|
+
name: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
485
|
+
en: "en";
|
|
486
|
+
ka: "ka";
|
|
487
|
+
ru: "ru";
|
|
488
|
+
}> & z.core.$partial, z.ZodString>>;
|
|
489
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
490
|
+
active: "active";
|
|
491
|
+
archived: "archived";
|
|
492
|
+
}>>;
|
|
493
|
+
salesEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
494
|
+
warehouseId: z.ZodInt;
|
|
495
|
+
}, z.core.$strip>;
|
|
496
|
+
type WarehouseSearchOptions = z.infer<typeof warehouseSearchOptionsSchema>;
|
|
497
|
+
type WarehouseSearchResult = {
|
|
498
|
+
warehouses: Warehouse[];
|
|
499
|
+
total: number;
|
|
500
|
+
};
|
|
501
|
+
type WarehouseSelectOneQuery = z.infer<typeof warehouseSelectOneQuerySchema>;
|
|
502
|
+
type WarehouseCreatePayload = z.infer<typeof warehouseCreatePayloadSchema>;
|
|
503
|
+
type WarehouseUpdatePayload = z.infer<typeof warehouseUpdatePayloadSchema>;
|
|
504
|
+
//#endregion
|
|
427
505
|
//#region src/app/domain/(finance)/currencies/currencies.schemas.d.ts
|
|
428
506
|
declare const currencySchema: z.ZodObject<{
|
|
429
507
|
id: z.ZodInt;
|
|
@@ -708,4 +786,4 @@ type ProductVariantCreateResult = {
|
|
|
708
786
|
};
|
|
709
787
|
type ProductVariantUpdatePayload = z.infer<typeof productVariantUpdatePayloadSchema>;
|
|
710
788
|
//#endregion
|
|
711
|
-
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, Product, ProductCreatePayload, ProductCreateResult, ProductDeletePayload, ProductImage, ProductImages, ProductSearchOptions, ProductSearchResult, ProductSelectOneQuery, ProductUpdatePayload, ProductVariant, ProductVariantCreatePayload, ProductVariantCreateResult, ProductVariantDeletePayload, ProductVariantSearchOptions, ProductVariantSearchResult, ProductVariantSelectOneQuery, ProductVariantUpdatePayload };
|
|
789
|
+
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, Product, ProductCreatePayload, ProductCreateResult, ProductDeletePayload, ProductImage, ProductImages, ProductSearchOptions, ProductSearchResult, ProductSelectOneQuery, ProductUpdatePayload, ProductVariant, ProductVariantCreatePayload, ProductVariantCreateResult, ProductVariantDeletePayload, ProductVariantSearchOptions, ProductVariantSearchResult, ProductVariantSelectOneQuery, ProductVariantUpdatePayload, Warehouse, WarehouseCreatePayload, WarehouseSearchOptions, WarehouseSearchResult, WarehouseSelectOneQuery, WarehouseUpdatePayload };
|