@esb-market-contracts/backend 1.0.28 → 1.0.29

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 +19 -2
  2. package/package.json +1 -1
  3. package/types.d.ts +11 -4
package/api.d.ts CHANGED
@@ -901,6 +901,7 @@ declare const warehousesRouter: import("hono/hono-base").HonoBase<{
901
901
  id: number;
902
902
  code: string;
903
903
  name: string;
904
+ address: string;
904
905
  status: "active" | "archived";
905
906
  salesEnabled: boolean;
906
907
  updatedAt: Date | null;
@@ -926,6 +927,7 @@ declare const warehousesRouter: import("hono/hono-base").HonoBase<{
926
927
  json: {
927
928
  code: string;
928
929
  name: string;
930
+ address: string;
929
931
  salesEnabled: boolean;
930
932
  };
931
933
  };
@@ -939,6 +941,7 @@ declare const warehousesRouter: import("hono/hono-base").HonoBase<{
939
941
  id: number;
940
942
  code: string;
941
943
  name: string;
944
+ address: string;
942
945
  status: "active" | "archived";
943
946
  salesEnabled: boolean;
944
947
  updatedAt: Date | null;
@@ -973,14 +976,28 @@ declare const warehousesRouter: import("hono/hono-base").HonoBase<{
973
976
  json: {
974
977
  code?: string | undefined;
975
978
  name?: string | undefined;
976
- status?: "active" | "archived" | undefined;
979
+ address?: string | undefined;
977
980
  salesEnabled?: boolean | undefined;
978
981
  warehouseId: number;
979
982
  };
980
983
  };
981
984
  };
982
985
  };
983
- }, "/operations/warehouses", "/operations/warehouses/update">;
986
+ } & {
987
+ "/operations/warehouses/switch-status": {
988
+ $post: {
989
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<Record<string, never>>;
990
+ outputFormat: "json";
991
+ status: 200;
992
+ input: {
993
+ json: {
994
+ status: "active" | "archived";
995
+ warehouseId: number;
996
+ };
997
+ };
998
+ };
999
+ };
1000
+ }, "/operations/warehouses", "/operations/warehouses/switch-status">;
984
1001
  type WarehousesRouter = typeof warehousesRouter;
985
1002
  //#endregion
986
1003
  export type { AuditLogsRouter, BrandsRouter, CategoriesRouter, CountriesRouter, CustomersRouter, ExchangeRatesRouter, ProductVariantsRouter, ProductsRouter, WarehousesRouter };
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.28",
4
+ "version": "1.0.29",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "sideEffects": false,
package/types.d.ts CHANGED
@@ -429,6 +429,7 @@ declare const warehouseSchema: z.ZodObject<{
429
429
  id: z.ZodInt;
430
430
  code: z.ZodString;
431
431
  name: z.ZodString;
432
+ address: z.ZodString;
432
433
  status: z.ZodEnum<{
433
434
  active: "active";
434
435
  archived: "archived";
@@ -469,16 +470,21 @@ declare const warehouseSelectOneQuerySchema: z.ZodObject<{
469
470
  declare const warehouseCreatePayloadSchema: z.ZodObject<{
470
471
  code: z.ZodString;
471
472
  name: z.ZodString;
473
+ address: z.ZodString;
472
474
  salesEnabled: z.ZodBoolean;
473
475
  }, z.core.$strip>;
474
476
  declare const warehouseUpdatePayloadSchema: z.ZodObject<{
475
477
  code: z.ZodOptional<z.ZodString>;
476
478
  name: z.ZodOptional<z.ZodString>;
477
- status: z.ZodOptional<z.ZodEnum<{
479
+ address: z.ZodOptional<z.ZodString>;
480
+ salesEnabled: z.ZodOptional<z.ZodBoolean>;
481
+ warehouseId: z.ZodInt;
482
+ }, z.core.$strip>;
483
+ declare const warehouseSwitchStatusPayloadSchema: z.ZodObject<{
484
+ status: z.ZodEnum<{
478
485
  active: "active";
479
486
  archived: "archived";
480
- }>>;
481
- salesEnabled: z.ZodOptional<z.ZodBoolean>;
487
+ }>;
482
488
  warehouseId: z.ZodInt;
483
489
  }, z.core.$strip>;
484
490
  type WarehouseSearchOptions = z.infer<typeof warehouseSearchOptionsSchema>;
@@ -489,6 +495,7 @@ type WarehouseSearchResult = {
489
495
  type WarehouseSelectOneQuery = z.infer<typeof warehouseSelectOneQuerySchema>;
490
496
  type WarehouseCreatePayload = z.infer<typeof warehouseCreatePayloadSchema>;
491
497
  type WarehouseUpdatePayload = z.infer<typeof warehouseUpdatePayloadSchema>;
498
+ type WarehouseSwitchStatusPayload = z.infer<typeof warehouseSwitchStatusPayloadSchema>;
492
499
  //#endregion
493
500
  //#region src/app/domain/(finance)/currencies/currencies.schemas.d.ts
494
501
  declare const currencySchema: z.ZodObject<{
@@ -774,4 +781,4 @@ type ProductVariantCreateResult = {
774
781
  };
775
782
  type ProductVariantUpdatePayload = z.infer<typeof productVariantUpdatePayloadSchema>;
776
783
  //#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 };
784
+ 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, WarehouseSwitchStatusPayload, WarehouseUpdatePayload };