@esb-market-contracts/backend 1.0.26 → 1.0.28

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 +96 -3
  2. package/package.json +1 -1
  3. package/types.d.ts +69 -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
- export type { AuditLogsRouter, BrandsRouter, CategoriesRouter, CountriesRouter, CustomersRouter, ExchangeRatesRouter, ProductVariantsRouter, ProductsRouter };
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: 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: 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: 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?: 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
@@ -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.26",
4
+ "version": "1.0.28",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "sideEffects": false,
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,72 @@ 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.ZodString;
432
+ status: z.ZodEnum<{
433
+ active: "active";
434
+ archived: "archived";
435
+ }>;
436
+ salesEnabled: z.ZodBoolean;
437
+ updatedAt: z.ZodNullable<z.ZodDate>;
438
+ createdAt: z.ZodDate;
439
+ }, z.core.$strip>;
440
+ type Warehouse = z.infer<typeof warehouseSchema>;
441
+ //#endregion
442
+ //#region src/app/flows/warehouse/warehouse.schemas.d.ts
443
+ declare const warehouseSearchOptionsSchema: z.ZodObject<{
444
+ where: z.ZodOptional<z.ZodPipe<z.ZodObject<{
445
+ status: z.ZodOptional<z.ZodEnum<{
446
+ active: "active";
447
+ archived: "archived";
448
+ }>>;
449
+ salesEnabled: z.ZodOptional<z.ZodBoolean>;
450
+ }, z.core.$strip>, z.ZodTransform<{
451
+ status?: "active" | "archived" | undefined;
452
+ salesEnabled: boolean;
453
+ } | {
454
+ status: "active" | "archived";
455
+ salesEnabled?: boolean | undefined;
456
+ }, {
457
+ status?: "active" | "archived" | undefined;
458
+ salesEnabled?: boolean | undefined;
459
+ }>>>;
460
+ query: z.ZodOptional<z.ZodString>;
461
+ pagination: z.ZodObject<{
462
+ offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
463
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
464
+ }, z.core.$strip>;
465
+ }, z.core.$strict>;
466
+ declare const warehouseSelectOneQuerySchema: z.ZodObject<{
467
+ id: z.ZodInt;
468
+ }, z.core.$strip>;
469
+ declare const warehouseCreatePayloadSchema: z.ZodObject<{
470
+ code: z.ZodString;
471
+ name: z.ZodString;
472
+ salesEnabled: z.ZodBoolean;
473
+ }, z.core.$strip>;
474
+ declare const warehouseUpdatePayloadSchema: z.ZodObject<{
475
+ code: z.ZodOptional<z.ZodString>;
476
+ name: z.ZodOptional<z.ZodString>;
477
+ status: z.ZodOptional<z.ZodEnum<{
478
+ active: "active";
479
+ archived: "archived";
480
+ }>>;
481
+ salesEnabled: z.ZodOptional<z.ZodBoolean>;
482
+ warehouseId: z.ZodInt;
483
+ }, z.core.$strip>;
484
+ type WarehouseSearchOptions = z.infer<typeof warehouseSearchOptionsSchema>;
485
+ type WarehouseSearchResult = {
486
+ warehouses: Warehouse[];
487
+ total: number;
488
+ };
489
+ type WarehouseSelectOneQuery = z.infer<typeof warehouseSelectOneQuerySchema>;
490
+ type WarehouseCreatePayload = z.infer<typeof warehouseCreatePayloadSchema>;
491
+ type WarehouseUpdatePayload = z.infer<typeof warehouseUpdatePayloadSchema>;
492
+ //#endregion
427
493
  //#region src/app/domain/(finance)/currencies/currencies.schemas.d.ts
428
494
  declare const currencySchema: z.ZodObject<{
429
495
  id: z.ZodInt;
@@ -708,4 +774,4 @@ type ProductVariantCreateResult = {
708
774
  };
709
775
  type ProductVariantUpdatePayload = z.infer<typeof productVariantUpdatePayloadSchema>;
710
776
  //#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 };
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 };