@esb-market-contracts/backend 1.0.47 → 1.0.49

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 +62 -6
  2. package/package.json +1 -1
  3. package/types.d.ts +82 -6
package/api.d.ts CHANGED
@@ -705,7 +705,6 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
705
705
  warehouseId: number;
706
706
  currencyId: number;
707
707
  status: "draft" | "posted" | "reversed";
708
- notes: string | null;
709
708
  exchangeRateId: number | null;
710
709
  exchangeRate: string | null;
711
710
  exchangeRateValidFromDate: string | null;
@@ -767,7 +766,6 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
767
766
  warehouseId: number;
768
767
  currencyId: number;
769
768
  status: "draft" | "posted" | "reversed";
770
- notes: string | null;
771
769
  exchangeRateId: number | null;
772
770
  exchangeRate: string | null;
773
771
  exchangeRateValidFromDate: string | null;
@@ -816,7 +814,6 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
816
814
  supplierId: number;
817
815
  warehouseId: number;
818
816
  currencyId: number;
819
- notes?: string | null | undefined;
820
817
  exchangeRateId?: number | null | undefined;
821
818
  };
822
819
  };
@@ -833,7 +830,6 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
833
830
  warehouseId: number;
834
831
  currencyId: number;
835
832
  status: "draft" | "posted" | "reversed";
836
- notes: string | null;
837
833
  exchangeRateId: number | null;
838
834
  exchangeRate: string | null;
839
835
  exchangeRateValidFromDate: string | null;
@@ -878,7 +874,6 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
878
874
  supplierId?: number | undefined;
879
875
  warehouseId?: number | undefined;
880
876
  currencyId?: number | undefined;
881
- notes?: string | null | undefined;
882
877
  exchangeRateId?: number | null | undefined;
883
878
  deliveryId: number;
884
879
  };
@@ -1448,6 +1443,67 @@ declare const suppliersRouter: import("hono/hono-base").HonoBase<{
1448
1443
  }, "/operations/suppliers", "/operations/suppliers/switch-status">;
1449
1444
  type SuppliersRouter = typeof suppliersRouter;
1450
1445
  //#endregion
1446
+ //#region src/app/routes/(warehouse)/stock-balances.routes.d.ts
1447
+ declare const stockBalancesRouter: import("hono/hono-base").HonoBase<{
1448
+ Variables: VariablesWithActor;
1449
+ }, {
1450
+ "/operations/stock-balances/search": {
1451
+ $post: {
1452
+ output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
1453
+ stockBalances: {
1454
+ id: number;
1455
+ warehouseId: number;
1456
+ productVariantId: number;
1457
+ onHand: number;
1458
+ reserved: number;
1459
+ averageUnitCostBase: string | null;
1460
+ updatedAt: Date | null;
1461
+ createdAt: Date;
1462
+ available: number;
1463
+ product: {
1464
+ id: number;
1465
+ model: string | null;
1466
+ name: Partial<Record<"en" | "ka" | "ru", string>> | null;
1467
+ image: {
1468
+ src: string;
1469
+ isBanner: boolean;
1470
+ } | null;
1471
+ };
1472
+ productVariant: {
1473
+ id: number;
1474
+ sku: string | null;
1475
+ barcode: string | null;
1476
+ name: Partial<Record<"en" | "ka" | "ru", string>> | null;
1477
+ };
1478
+ measurementUnit: {
1479
+ id: number;
1480
+ code: string;
1481
+ name: string;
1482
+ decimalPlaces: number;
1483
+ };
1484
+ }[];
1485
+ total: number;
1486
+ }>;
1487
+ outputFormat: "json";
1488
+ status: 200;
1489
+ input: {
1490
+ json: {
1491
+ where?: {
1492
+ warehouseId?: number | undefined;
1493
+ productVariantId?: number | undefined;
1494
+ } | undefined;
1495
+ query?: string | undefined;
1496
+ pagination: {
1497
+ offset?: unknown;
1498
+ limit?: unknown;
1499
+ };
1500
+ };
1501
+ };
1502
+ };
1503
+ };
1504
+ }, "/operations/stock-balances", "/operations/stock-balances/search">;
1505
+ type StockBalancesRouter = typeof stockBalancesRouter;
1506
+ //#endregion
1451
1507
  //#region src/app/routes/(warehouse)/warehouses.routes.d.ts
1452
1508
  declare const warehousesRouter: import("hono/hono-base").HonoBase<{
1453
1509
  Variables: VariablesWithActor;
@@ -1558,4 +1614,4 @@ declare const warehousesRouter: import("hono/hono-base").HonoBase<{
1558
1614
  }, "/operations/warehouses", "/operations/warehouses/switch-status">;
1559
1615
  type WarehousesRouter = typeof warehousesRouter;
1560
1616
  //#endregion
1561
- export type { AuditLogsRouter, BrandsRouter, CategoriesRouter, CountriesRouter, CustomersRouter, DeliveriesRouter, ExchangeRatesRouter, MeasurementUnitsRouter, ProductVariantsRouter, ProductsRouter, SuppliersRouter, WarehousesRouter };
1617
+ export type { AuditLogsRouter, BrandsRouter, CategoriesRouter, CountriesRouter, CustomersRouter, DeliveriesRouter, ExchangeRatesRouter, MeasurementUnitsRouter, ProductVariantsRouter, ProductsRouter, StockBalancesRouter, SuppliersRouter, 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.47",
4
+ "version": "1.0.49",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "sideEffects": false,
package/types.d.ts CHANGED
@@ -394,7 +394,6 @@ declare const deliveryCreatePayloadSchema: z.ZodObject<{
394
394
  supplierId: z.ZodInt;
395
395
  warehouseId: z.ZodInt;
396
396
  currencyId: z.ZodInt;
397
- notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
398
397
  exchangeRateId: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
399
398
  }, {
400
399
  out: {};
@@ -407,7 +406,6 @@ declare const deliveryUpdatePayloadSchema: z.ZodObject<{
407
406
  supplierId: z.ZodOptional<z.ZodInt>;
408
407
  warehouseId: z.ZodOptional<z.ZodInt>;
409
408
  currencyId: z.ZodOptional<z.ZodInt>;
410
- notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
411
409
  exchangeRateId: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
412
410
  deliveryId: z.ZodInt;
413
411
  }, {
@@ -493,7 +491,6 @@ declare const deliverySearchItemSchema: z.ZodObject<{
493
491
  posted: "posted";
494
492
  reversed: "reversed";
495
493
  }>;
496
- notes: z.ZodNullable<z.ZodString>;
497
494
  exchangeRateId: z.ZodNullable<z.ZodInt>;
498
495
  exchangeRate: z.ZodNullable<z.ZodString>;
499
496
  exchangeRateValidFromDate: z.ZodNullable<z.ZodISODate>;
@@ -720,7 +717,6 @@ declare const deliveryDetailsSchema: z.ZodObject<{
720
717
  posted: "posted";
721
718
  reversed: "reversed";
722
719
  }>;
723
- notes: z.ZodNullable<z.ZodString>;
724
720
  exchangeRateId: z.ZodNullable<z.ZodInt>;
725
721
  exchangeRate: z.ZodNullable<z.ZodString>;
726
722
  exchangeRateValidFromDate: z.ZodNullable<z.ZodISODate>;
@@ -877,6 +873,74 @@ type SupplierCreatePayload = z.infer<typeof supplierCreatePayloadSchema>;
877
873
  type SupplierUpdatePayload = z.infer<typeof supplierUpdatePayloadSchema>;
878
874
  type SupplierSwitchStatusPayload = z.infer<typeof supplierSwitchStatusPayloadSchema>;
879
875
  //#endregion
876
+ //#region src/app/flows/(warehouse)/stock-balance/stock-balance.schemas.d.ts
877
+ declare const stockBalanceSearchOptionsSchema: z.ZodObject<{
878
+ where: z.ZodOptional<z.ZodPipe<z.ZodObject<{
879
+ warehouseId: z.ZodOptional<z.ZodInt>;
880
+ productVariantId: z.ZodOptional<z.ZodInt>;
881
+ }, z.core.$strip>, z.ZodTransform<{
882
+ warehouseId?: number | undefined;
883
+ productVariantId: number;
884
+ } | {
885
+ warehouseId: number;
886
+ productVariantId?: number | undefined;
887
+ }, {
888
+ warehouseId?: number | undefined;
889
+ productVariantId?: number | undefined;
890
+ }>>>;
891
+ query: z.ZodOptional<z.ZodString>;
892
+ pagination: z.ZodObject<{
893
+ offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
894
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
895
+ }, z.core.$strip>;
896
+ }, z.core.$strict>;
897
+ declare const stockBalanceSearchItemSchema: z.ZodObject<{
898
+ id: z.ZodInt;
899
+ warehouseId: z.ZodInt;
900
+ productVariantId: z.ZodInt;
901
+ onHand: z.ZodNumber;
902
+ reserved: z.ZodNumber;
903
+ averageUnitCostBase: z.ZodNullable<z.ZodString>;
904
+ updatedAt: z.ZodNullable<z.ZodDate>;
905
+ createdAt: z.ZodDate;
906
+ available: z.ZodNumber;
907
+ product: z.ZodObject<{
908
+ id: z.ZodInt;
909
+ model: z.ZodNullable<z.ZodString>;
910
+ name: z.ZodNullable<z.ZodRecord<z.ZodEnum<{
911
+ en: "en";
912
+ ka: "ka";
913
+ ru: "ru";
914
+ }> & z.core.$partial, z.ZodString>>;
915
+ image: z.ZodNullable<z.ZodObject<{
916
+ src: z.ZodURL;
917
+ isBanner: z.ZodBoolean;
918
+ }, z.core.$strip>>;
919
+ }, z.core.$strip>;
920
+ productVariant: z.ZodObject<{
921
+ id: z.ZodInt;
922
+ sku: z.ZodNullable<z.ZodString>;
923
+ barcode: z.ZodNullable<z.ZodString>;
924
+ name: z.ZodNullable<z.ZodRecord<z.ZodEnum<{
925
+ en: "en";
926
+ ka: "ka";
927
+ ru: "ru";
928
+ }> & z.core.$partial, z.ZodString>>;
929
+ }, z.core.$strip>;
930
+ measurementUnit: z.ZodObject<{
931
+ id: z.ZodInt;
932
+ code: z.ZodString;
933
+ name: z.ZodString;
934
+ decimalPlaces: z.ZodInt;
935
+ }, z.core.$strip>;
936
+ }, z.core.$strip>;
937
+ type StockBalanceSearchOptions = z.infer<typeof stockBalanceSearchOptionsSchema>;
938
+ type StockBalanceSearchItem = z.infer<typeof stockBalanceSearchItemSchema>;
939
+ type StockBalanceSearchResult = {
940
+ stockBalances: StockBalanceSearchItem[];
941
+ total: number;
942
+ };
943
+ //#endregion
880
944
  //#region src/app/domain/(warehouse)/warehouses/warehouses.schemas.d.ts
881
945
  declare const warehouseSchema: z.ZodObject<{
882
946
  id: z.ZodInt;
@@ -1290,7 +1354,6 @@ declare const deliverySchema: z.ZodObject<{
1290
1354
  posted: "posted";
1291
1355
  reversed: "reversed";
1292
1356
  }>;
1293
- notes: z.ZodNullable<z.ZodString>;
1294
1357
  exchangeRateId: z.ZodNullable<z.ZodInt>;
1295
1358
  exchangeRate: z.ZodNullable<z.ZodString>;
1296
1359
  exchangeRateValidFromDate: z.ZodNullable<z.ZodISODate>;
@@ -1300,4 +1363,17 @@ declare const deliverySchema: z.ZodObject<{
1300
1363
  }, z.core.$strip>;
1301
1364
  type Delivery = z.infer<typeof deliverySchema>;
1302
1365
  //#endregion
1303
- 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, Delivery, DeliveryCreatePayload, DeliveryCreateResult, DeliveryDeletePayload, DeliveryDetails, DeliveryItem, DeliveryItemAddPayload, DeliveryItemCatalogDetails, DeliveryItemDeletePayload, DeliveryItemDetails, DeliveryItemResult, DeliveryItemScanPayload, DeliveryItemScanResult, DeliveryItemUpdatePayload, DeliveryPostPayload, DeliverySearchItem, DeliverySearchOptions, DeliverySearchResult, DeliverySelectOneQuery, DeliverySelectOneResult, DeliveryUpdatePayload, ExchangeRate, ExchangeRateDateSearchResult, ExchangeRateSearchOptions, ExchangeRateSearchResult, MeasurementUnit, MeasurementUnitListResult, Product, ProductCreatePayload, ProductCreateResult, ProductDeletePayload, ProductImage, ProductImages, ProductSearchOptions, ProductSearchResult, ProductSelectOneQuery, ProductUpdatePayload, ProductVariant, ProductVariantCreatePayload, ProductVariantCreateResult, ProductVariantDeletePayload, ProductVariantSearchOptions, ProductVariantSearchResult, ProductVariantSelectOneQuery, ProductVariantUpdatePayload, Supplier, SupplierCreatePayload, SupplierSearchOptions, SupplierSearchResult, SupplierSelectOneQuery, SupplierSwitchStatusPayload, SupplierUpdatePayload, Warehouse, WarehouseCreatePayload, WarehouseSearchOptions, WarehouseSearchResult, WarehouseSelectOneQuery, WarehouseSwitchStatusPayload, WarehouseUpdatePayload };
1366
+ //#region src/app/domain/(warehouse)/stock/stock-balances/stock-balances.schemas.d.ts
1367
+ declare const stockBalanceSchema: z.ZodObject<{
1368
+ id: z.ZodInt;
1369
+ warehouseId: z.ZodInt;
1370
+ productVariantId: z.ZodInt;
1371
+ onHand: z.ZodNumber;
1372
+ reserved: z.ZodNumber;
1373
+ averageUnitCostBase: z.ZodNullable<z.ZodString>;
1374
+ updatedAt: z.ZodNullable<z.ZodDate>;
1375
+ createdAt: z.ZodDate;
1376
+ }, z.core.$strip>;
1377
+ type StockBalance = z.infer<typeof stockBalanceSchema>;
1378
+ //#endregion
1379
+ 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, Delivery, DeliveryCreatePayload, DeliveryCreateResult, DeliveryDeletePayload, DeliveryDetails, DeliveryItem, DeliveryItemAddPayload, DeliveryItemCatalogDetails, DeliveryItemDeletePayload, DeliveryItemDetails, DeliveryItemResult, DeliveryItemScanPayload, DeliveryItemScanResult, DeliveryItemUpdatePayload, DeliveryPostPayload, DeliverySearchItem, DeliverySearchOptions, DeliverySearchResult, DeliverySelectOneQuery, DeliverySelectOneResult, DeliveryUpdatePayload, ExchangeRate, ExchangeRateDateSearchResult, ExchangeRateSearchOptions, ExchangeRateSearchResult, MeasurementUnit, MeasurementUnitListResult, Product, ProductCreatePayload, ProductCreateResult, ProductDeletePayload, ProductImage, ProductImages, ProductSearchOptions, ProductSearchResult, ProductSelectOneQuery, ProductUpdatePayload, ProductVariant, ProductVariantCreatePayload, ProductVariantCreateResult, ProductVariantDeletePayload, ProductVariantSearchOptions, ProductVariantSearchResult, ProductVariantSelectOneQuery, ProductVariantUpdatePayload, StockBalance, StockBalanceSearchItem, StockBalanceSearchOptions, StockBalanceSearchResult, Supplier, SupplierCreatePayload, SupplierSearchOptions, SupplierSearchResult, SupplierSelectOneQuery, SupplierSwitchStatusPayload, SupplierUpdatePayload, Warehouse, WarehouseCreatePayload, WarehouseSearchOptions, WarehouseSearchResult, WarehouseSelectOneQuery, WarehouseSwitchStatusPayload, WarehouseUpdatePayload };