@esb-market-contracts/backend 1.0.28 → 1.0.30
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 +48 -3
- package/package.json +1 -1
- package/types.d.ts +29 -4
package/api.d.ts
CHANGED
|
@@ -299,6 +299,28 @@ declare const countriesRouter: import("hono/hono-base").HonoBase<{
|
|
|
299
299
|
}, "/catalog/countries", "/catalog/countries/update">;
|
|
300
300
|
type CountriesRouter = typeof countriesRouter;
|
|
301
301
|
//#endregion
|
|
302
|
+
//#region src/app/routes/(catalog)/measurement-units.routes.d.ts
|
|
303
|
+
declare const measurementUnitsRouter: import("hono/hono-base").HonoBase<{
|
|
304
|
+
Variables: VariablesWithActor;
|
|
305
|
+
}, {
|
|
306
|
+
"/catalog/measurement-units/list": {
|
|
307
|
+
$get: {
|
|
308
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
309
|
+
measurementUnits: {
|
|
310
|
+
id: number;
|
|
311
|
+
code: string;
|
|
312
|
+
name: string;
|
|
313
|
+
decimalPlaces: number;
|
|
314
|
+
}[];
|
|
315
|
+
}>;
|
|
316
|
+
outputFormat: "json";
|
|
317
|
+
status: 200;
|
|
318
|
+
input: {};
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
}, "/catalog/measurement-units", "/catalog/measurement-units/list">;
|
|
322
|
+
type MeasurementUnitsRouter = typeof measurementUnitsRouter;
|
|
323
|
+
//#endregion
|
|
302
324
|
//#region src/app/routes/(catalog)/product-variants.routes.d.ts
|
|
303
325
|
declare const productVariantsRouter: import("hono/hono-base").HonoBase<{
|
|
304
326
|
Variables: VariablesWithActor;
|
|
@@ -309,6 +331,7 @@ declare const productVariantsRouter: import("hono/hono-base").HonoBase<{
|
|
|
309
331
|
productVariant: {
|
|
310
332
|
id: number;
|
|
311
333
|
productId: number;
|
|
334
|
+
measurementUnitId: number | null;
|
|
312
335
|
status: "active" | "archived" | "draft";
|
|
313
336
|
sku: string | null;
|
|
314
337
|
barcode: string | null;
|
|
@@ -333,6 +356,7 @@ declare const productVariantsRouter: import("hono/hono-base").HonoBase<{
|
|
|
333
356
|
productVariant: {
|
|
334
357
|
id: number;
|
|
335
358
|
productId: number;
|
|
359
|
+
measurementUnitId: number | null;
|
|
336
360
|
status: "active" | "archived" | "draft";
|
|
337
361
|
sku: string | null;
|
|
338
362
|
barcode: string | null;
|
|
@@ -346,6 +370,7 @@ declare const productVariantsRouter: import("hono/hono-base").HonoBase<{
|
|
|
346
370
|
input: {
|
|
347
371
|
json: {
|
|
348
372
|
productId: number;
|
|
373
|
+
measurementUnitId?: number | null | undefined;
|
|
349
374
|
status?: "active" | "archived" | "draft" | undefined;
|
|
350
375
|
sku?: string | null | undefined;
|
|
351
376
|
barcode?: string | null | undefined;
|
|
@@ -361,6 +386,7 @@ declare const productVariantsRouter: import("hono/hono-base").HonoBase<{
|
|
|
361
386
|
productVariants: {
|
|
362
387
|
id: number;
|
|
363
388
|
productId: number;
|
|
389
|
+
measurementUnitId: number | null;
|
|
364
390
|
status: "active" | "archived" | "draft";
|
|
365
391
|
sku: string | null;
|
|
366
392
|
barcode: string | null;
|
|
@@ -376,6 +402,7 @@ declare const productVariantsRouter: import("hono/hono-base").HonoBase<{
|
|
|
376
402
|
json: {
|
|
377
403
|
where: {
|
|
378
404
|
productId: number;
|
|
405
|
+
measurementUnitId?: number | null | undefined;
|
|
379
406
|
status?: "active" | "archived" | "draft" | undefined;
|
|
380
407
|
};
|
|
381
408
|
query?: string | undefined;
|
|
@@ -395,6 +422,7 @@ declare const productVariantsRouter: import("hono/hono-base").HonoBase<{
|
|
|
395
422
|
status: 200;
|
|
396
423
|
input: {
|
|
397
424
|
json: {
|
|
425
|
+
measurementUnitId?: number | null | undefined;
|
|
398
426
|
status?: "active" | "archived" | "draft" | undefined;
|
|
399
427
|
sku?: string | null | undefined;
|
|
400
428
|
barcode?: string | null | undefined;
|
|
@@ -901,6 +929,7 @@ declare const warehousesRouter: import("hono/hono-base").HonoBase<{
|
|
|
901
929
|
id: number;
|
|
902
930
|
code: string;
|
|
903
931
|
name: string;
|
|
932
|
+
address: string;
|
|
904
933
|
status: "active" | "archived";
|
|
905
934
|
salesEnabled: boolean;
|
|
906
935
|
updatedAt: Date | null;
|
|
@@ -926,6 +955,7 @@ declare const warehousesRouter: import("hono/hono-base").HonoBase<{
|
|
|
926
955
|
json: {
|
|
927
956
|
code: string;
|
|
928
957
|
name: string;
|
|
958
|
+
address: string;
|
|
929
959
|
salesEnabled: boolean;
|
|
930
960
|
};
|
|
931
961
|
};
|
|
@@ -939,6 +969,7 @@ declare const warehousesRouter: import("hono/hono-base").HonoBase<{
|
|
|
939
969
|
id: number;
|
|
940
970
|
code: string;
|
|
941
971
|
name: string;
|
|
972
|
+
address: string;
|
|
942
973
|
status: "active" | "archived";
|
|
943
974
|
salesEnabled: boolean;
|
|
944
975
|
updatedAt: Date | null;
|
|
@@ -973,14 +1004,28 @@ declare const warehousesRouter: import("hono/hono-base").HonoBase<{
|
|
|
973
1004
|
json: {
|
|
974
1005
|
code?: string | undefined;
|
|
975
1006
|
name?: string | undefined;
|
|
976
|
-
|
|
1007
|
+
address?: string | undefined;
|
|
977
1008
|
salesEnabled?: boolean | undefined;
|
|
978
1009
|
warehouseId: number;
|
|
979
1010
|
};
|
|
980
1011
|
};
|
|
981
1012
|
};
|
|
982
1013
|
};
|
|
983
|
-
}
|
|
1014
|
+
} & {
|
|
1015
|
+
"/operations/warehouses/switch-status": {
|
|
1016
|
+
$post: {
|
|
1017
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
|
|
1018
|
+
outputFormat: "json";
|
|
1019
|
+
status: 200;
|
|
1020
|
+
input: {
|
|
1021
|
+
json: {
|
|
1022
|
+
status: "active" | "archived";
|
|
1023
|
+
warehouseId: number;
|
|
1024
|
+
};
|
|
1025
|
+
};
|
|
1026
|
+
};
|
|
1027
|
+
};
|
|
1028
|
+
}, "/operations/warehouses", "/operations/warehouses/switch-status">;
|
|
984
1029
|
type WarehousesRouter = typeof warehousesRouter;
|
|
985
1030
|
//#endregion
|
|
986
|
-
export type { AuditLogsRouter, BrandsRouter, CategoriesRouter, CountriesRouter, CustomersRouter, ExchangeRatesRouter, ProductVariantsRouter, ProductsRouter, WarehousesRouter };
|
|
1031
|
+
export type { AuditLogsRouter, BrandsRouter, CategoriesRouter, CountriesRouter, CustomersRouter, ExchangeRatesRouter, MeasurementUnitsRouter, ProductVariantsRouter, ProductsRouter, WarehousesRouter };
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -231,6 +231,20 @@ type CountrySelectOneQuery = z.infer<typeof countrySelectOneQuerySchema>;
|
|
|
231
231
|
type CountryCreatePayload = z.infer<typeof countryCreatePayloadSchema>;
|
|
232
232
|
type CountryUpdatePayload = z.infer<typeof countryUpdatePayloadSchema>;
|
|
233
233
|
//#endregion
|
|
234
|
+
//#region src/app/domain/(catalog)/measurement-units/measurement-units.schemas.d.ts
|
|
235
|
+
declare const measurementUnitSchema: z.ZodObject<{
|
|
236
|
+
id: z.ZodInt;
|
|
237
|
+
code: z.ZodString;
|
|
238
|
+
name: z.ZodString;
|
|
239
|
+
decimalPlaces: z.ZodInt;
|
|
240
|
+
}, z.core.$strip>;
|
|
241
|
+
type MeasurementUnit = z.infer<typeof measurementUnitSchema>;
|
|
242
|
+
//#endregion
|
|
243
|
+
//#region src/app/flows/measurement-unit/measurement-unit.schemas.d.ts
|
|
244
|
+
type MeasurementUnitListResult = {
|
|
245
|
+
measurementUnits: MeasurementUnit[];
|
|
246
|
+
};
|
|
247
|
+
//#endregion
|
|
234
248
|
//#region src/app/domain/(operations)/audit-logs/audit-logs.schemas.d.ts
|
|
235
249
|
declare const auditLogSchema: import("drizzle-orm/zod").BuildSchema<"select", {
|
|
236
250
|
id: import("drizzle-orm/pg-core").PgBuildColumn<"audit_logs", import("drizzle-orm/pg-core").SetIsPrimaryKey<import("drizzle-orm/pg-core").PgSerialBuilder>, {
|
|
@@ -429,6 +443,7 @@ declare const warehouseSchema: z.ZodObject<{
|
|
|
429
443
|
id: z.ZodInt;
|
|
430
444
|
code: z.ZodString;
|
|
431
445
|
name: z.ZodString;
|
|
446
|
+
address: z.ZodString;
|
|
432
447
|
status: z.ZodEnum<{
|
|
433
448
|
active: "active";
|
|
434
449
|
archived: "archived";
|
|
@@ -469,16 +484,21 @@ declare const warehouseSelectOneQuerySchema: z.ZodObject<{
|
|
|
469
484
|
declare const warehouseCreatePayloadSchema: z.ZodObject<{
|
|
470
485
|
code: z.ZodString;
|
|
471
486
|
name: z.ZodString;
|
|
487
|
+
address: z.ZodString;
|
|
472
488
|
salesEnabled: z.ZodBoolean;
|
|
473
489
|
}, z.core.$strip>;
|
|
474
490
|
declare const warehouseUpdatePayloadSchema: z.ZodObject<{
|
|
475
491
|
code: z.ZodOptional<z.ZodString>;
|
|
476
492
|
name: z.ZodOptional<z.ZodString>;
|
|
477
|
-
|
|
493
|
+
address: z.ZodOptional<z.ZodString>;
|
|
494
|
+
salesEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
495
|
+
warehouseId: z.ZodInt;
|
|
496
|
+
}, z.core.$strip>;
|
|
497
|
+
declare const warehouseSwitchStatusPayloadSchema: z.ZodObject<{
|
|
498
|
+
status: z.ZodEnum<{
|
|
478
499
|
active: "active";
|
|
479
500
|
archived: "archived";
|
|
480
|
-
}
|
|
481
|
-
salesEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
501
|
+
}>;
|
|
482
502
|
warehouseId: z.ZodInt;
|
|
483
503
|
}, z.core.$strip>;
|
|
484
504
|
type WarehouseSearchOptions = z.infer<typeof warehouseSearchOptionsSchema>;
|
|
@@ -489,6 +509,7 @@ type WarehouseSearchResult = {
|
|
|
489
509
|
type WarehouseSelectOneQuery = z.infer<typeof warehouseSelectOneQuerySchema>;
|
|
490
510
|
type WarehouseCreatePayload = z.infer<typeof warehouseCreatePayloadSchema>;
|
|
491
511
|
type WarehouseUpdatePayload = z.infer<typeof warehouseUpdatePayloadSchema>;
|
|
512
|
+
type WarehouseSwitchStatusPayload = z.infer<typeof warehouseSwitchStatusPayloadSchema>;
|
|
492
513
|
//#endregion
|
|
493
514
|
//#region src/app/domain/(finance)/currencies/currencies.schemas.d.ts
|
|
494
515
|
declare const currencySchema: z.ZodObject<{
|
|
@@ -557,6 +578,7 @@ type ProductImages = z.infer<typeof productImagesSchema>;
|
|
|
557
578
|
declare const productVariantSchema: z.ZodObject<{
|
|
558
579
|
id: z.ZodInt;
|
|
559
580
|
productId: z.ZodInt;
|
|
581
|
+
measurementUnitId: z.ZodNullable<z.ZodInt>;
|
|
560
582
|
status: z.ZodEnum<{
|
|
561
583
|
active: "active";
|
|
562
584
|
archived: "archived";
|
|
@@ -713,6 +735,7 @@ type ProductUpdatePayload = z.infer<typeof productUpdatePayloadSchema>;
|
|
|
713
735
|
declare const productVariantSearchOptionsSchema: z.ZodObject<{
|
|
714
736
|
where: z.ZodNonOptional<z.ZodOptional<z.ZodObject<{
|
|
715
737
|
productId: z.ZodInt;
|
|
738
|
+
measurementUnitId: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
716
739
|
status: z.ZodOptional<z.ZodEnum<{
|
|
717
740
|
active: "active";
|
|
718
741
|
archived: "archived";
|
|
@@ -733,6 +756,7 @@ declare const productVariantDeletePayloadSchema: z.ZodObject<{
|
|
|
733
756
|
}, z.core.$strip>;
|
|
734
757
|
declare const productVariantCreatePayloadSchema: z.ZodObject<{
|
|
735
758
|
productId: z.ZodInt;
|
|
759
|
+
measurementUnitId: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
736
760
|
status: z.ZodOptional<z.ZodEnum<{
|
|
737
761
|
active: "active";
|
|
738
762
|
archived: "archived";
|
|
@@ -747,6 +771,7 @@ declare const productVariantCreatePayloadSchema: z.ZodObject<{
|
|
|
747
771
|
}> & z.core.$partial, z.ZodString>>>;
|
|
748
772
|
}, z.core.$strip>;
|
|
749
773
|
declare const productVariantUpdatePayloadSchema: z.ZodObject<{
|
|
774
|
+
measurementUnitId: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
750
775
|
status: z.ZodOptional<z.ZodEnum<{
|
|
751
776
|
active: "active";
|
|
752
777
|
archived: "archived";
|
|
@@ -774,4 +799,4 @@ type ProductVariantCreateResult = {
|
|
|
774
799
|
};
|
|
775
800
|
type ProductVariantUpdatePayload = z.infer<typeof productVariantUpdatePayloadSchema>;
|
|
776
801
|
//#endregion
|
|
777
|
-
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 };
|
|
802
|
+
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 };
|