@esb-market-contracts/backend 1.0.27 → 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 +23 -6
  2. package/package.json +1 -1
  3. package/types.d.ts +14 -19
package/api.d.ts CHANGED
@@ -900,7 +900,8 @@ declare const warehousesRouter: import("hono/hono-base").HonoBase<{
900
900
  warehouse: {
901
901
  id: number;
902
902
  code: string;
903
- name: Partial<Record<"en" | "ka" | "ru", string>>;
903
+ name: string;
904
+ address: string;
904
905
  status: "active" | "archived";
905
906
  salesEnabled: boolean;
906
907
  updatedAt: Date | null;
@@ -925,7 +926,8 @@ declare const warehousesRouter: import("hono/hono-base").HonoBase<{
925
926
  input: {
926
927
  json: {
927
928
  code: string;
928
- name: Partial<Record<"en" | "ka" | "ru", string>>;
929
+ name: string;
930
+ address: string;
929
931
  salesEnabled: boolean;
930
932
  };
931
933
  };
@@ -938,7 +940,8 @@ declare const warehousesRouter: import("hono/hono-base").HonoBase<{
938
940
  warehouses: {
939
941
  id: number;
940
942
  code: string;
941
- name: Partial<Record<"en" | "ka" | "ru", string>>;
943
+ name: string;
944
+ address: string;
942
945
  status: "active" | "archived";
943
946
  salesEnabled: boolean;
944
947
  updatedAt: Date | null;
@@ -972,15 +975,29 @@ declare const warehousesRouter: import("hono/hono-base").HonoBase<{
972
975
  input: {
973
976
  json: {
974
977
  code?: string | undefined;
975
- name?: Partial<Record<"en" | "ka" | "ru", string>> | undefined;
976
- status?: "active" | "archived" | undefined;
978
+ name?: string | 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.27",
4
+ "version": "1.0.29",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "sideEffects": false,
package/types.d.ts CHANGED
@@ -428,11 +428,8 @@ type CustomerUpdatePayload = z.infer<typeof customerUpdatePayloadSchema>;
428
428
  declare const warehouseSchema: z.ZodObject<{
429
429
  id: z.ZodInt;
430
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>;
431
+ name: z.ZodString;
432
+ address: z.ZodString;
436
433
  status: z.ZodEnum<{
437
434
  active: "active";
438
435
  archived: "archived";
@@ -472,25 +469,22 @@ declare const warehouseSelectOneQuerySchema: z.ZodObject<{
472
469
  }, z.core.$strip>;
473
470
  declare const warehouseCreatePayloadSchema: z.ZodObject<{
474
471
  code: z.ZodString;
475
- name: z.ZodRecord<z.ZodEnum<{
476
- en: "en";
477
- ka: "ka";
478
- ru: "ru";
479
- }> & z.core.$partial, z.ZodString>;
472
+ name: z.ZodString;
473
+ address: z.ZodString;
480
474
  salesEnabled: z.ZodBoolean;
481
475
  }, z.core.$strip>;
482
476
  declare const warehouseUpdatePayloadSchema: z.ZodObject<{
483
477
  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<{
478
+ name: z.ZodOptional<z.ZodString>;
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<{
490
485
  active: "active";
491
486
  archived: "archived";
492
- }>>;
493
- salesEnabled: z.ZodOptional<z.ZodBoolean>;
487
+ }>;
494
488
  warehouseId: z.ZodInt;
495
489
  }, z.core.$strip>;
496
490
  type WarehouseSearchOptions = z.infer<typeof warehouseSearchOptionsSchema>;
@@ -501,6 +495,7 @@ type WarehouseSearchResult = {
501
495
  type WarehouseSelectOneQuery = z.infer<typeof warehouseSelectOneQuerySchema>;
502
496
  type WarehouseCreatePayload = z.infer<typeof warehouseCreatePayloadSchema>;
503
497
  type WarehouseUpdatePayload = z.infer<typeof warehouseUpdatePayloadSchema>;
498
+ type WarehouseSwitchStatusPayload = z.infer<typeof warehouseSwitchStatusPayloadSchema>;
504
499
  //#endregion
505
500
  //#region src/app/domain/(finance)/currencies/currencies.schemas.d.ts
506
501
  declare const currencySchema: z.ZodObject<{
@@ -786,4 +781,4 @@ type ProductVariantCreateResult = {
786
781
  };
787
782
  type ProductVariantUpdatePayload = z.infer<typeof productVariantUpdatePayloadSchema>;
788
783
  //#endregion
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 };
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 };