@esb-market-contracts/backend 1.0.36 → 1.0.37
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 +42 -0
- package/package.json +1 -1
- package/types.d.ts +107 -34
package/api.d.ts
CHANGED
|
@@ -765,6 +765,48 @@ declare const deliveriesRouter: import("hono/hono-base").HonoBase<{
|
|
|
765
765
|
};
|
|
766
766
|
};
|
|
767
767
|
};
|
|
768
|
+
} & {
|
|
769
|
+
"/operations/deliveries/search": {
|
|
770
|
+
$post: {
|
|
771
|
+
output: import("@kalutskii/foundation").APIError | import("@kalutskii/foundation").APISuccess<{
|
|
772
|
+
deliveries: {
|
|
773
|
+
id: number;
|
|
774
|
+
code: string;
|
|
775
|
+
supplierId: number;
|
|
776
|
+
warehouseId: number;
|
|
777
|
+
currencyId: number;
|
|
778
|
+
status: "draft" | "posted" | "reversed";
|
|
779
|
+
notes: string | null;
|
|
780
|
+
exchangeRateId: number | null;
|
|
781
|
+
exchangeRate: string | null;
|
|
782
|
+
exchangeRateValidFromDate: string | null;
|
|
783
|
+
postedAt: Date | null;
|
|
784
|
+
updatedAt: Date | null;
|
|
785
|
+
createdAt: Date;
|
|
786
|
+
}[];
|
|
787
|
+
total: number;
|
|
788
|
+
}>;
|
|
789
|
+
outputFormat: "json";
|
|
790
|
+
status: 200;
|
|
791
|
+
input: {
|
|
792
|
+
json: {
|
|
793
|
+
where?: {
|
|
794
|
+
supplierId?: number | undefined;
|
|
795
|
+
warehouseId?: number | undefined;
|
|
796
|
+
currencyId?: number | undefined;
|
|
797
|
+
status?: "draft" | "posted" | "reversed" | undefined;
|
|
798
|
+
createdAtFrom?: unknown;
|
|
799
|
+
createdAtTo?: unknown;
|
|
800
|
+
} | undefined;
|
|
801
|
+
query?: string | undefined;
|
|
802
|
+
pagination: {
|
|
803
|
+
offset?: unknown;
|
|
804
|
+
limit?: unknown;
|
|
805
|
+
};
|
|
806
|
+
};
|
|
807
|
+
};
|
|
808
|
+
};
|
|
809
|
+
};
|
|
768
810
|
} & {
|
|
769
811
|
"/operations/deliveries/update": {
|
|
770
812
|
$post: {
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -402,16 +402,29 @@ declare const deliveryItemSchema: z.ZodObject<{
|
|
|
402
402
|
}, z.core.$strip>;
|
|
403
403
|
type DeliveryItem = z.infer<typeof deliveryItemSchema>;
|
|
404
404
|
//#endregion
|
|
405
|
-
//#region src/app/
|
|
406
|
-
declare const
|
|
405
|
+
//#region src/app/domain/(procurement)/deliveries/deliveries.schemas.d.ts
|
|
406
|
+
declare const deliverySchema: z.ZodObject<{
|
|
407
407
|
id: z.ZodInt;
|
|
408
|
+
code: z.ZodString;
|
|
409
|
+
supplierId: z.ZodInt;
|
|
410
|
+
warehouseId: z.ZodInt;
|
|
411
|
+
currencyId: z.ZodInt;
|
|
412
|
+
status: z.ZodEnum<{
|
|
413
|
+
draft: "draft";
|
|
414
|
+
posted: "posted";
|
|
415
|
+
reversed: "reversed";
|
|
416
|
+
}>;
|
|
417
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
418
|
+
exchangeRateId: z.ZodNullable<z.ZodInt>;
|
|
419
|
+
exchangeRate: z.ZodNullable<z.ZodString>;
|
|
420
|
+
exchangeRateValidFromDate: z.ZodNullable<z.ZodNullable<z.ZodISODate>>;
|
|
421
|
+
postedAt: z.ZodNullable<z.ZodDate>;
|
|
422
|
+
updatedAt: z.ZodNullable<z.ZodDate>;
|
|
423
|
+
createdAt: z.ZodDate;
|
|
408
424
|
}, z.core.$strip>;
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
declare const deliveryPostPayloadSchema: z.ZodObject<{
|
|
413
|
-
deliveryId: z.ZodInt;
|
|
414
|
-
}, z.core.$strip>;
|
|
425
|
+
type Delivery = z.infer<typeof deliverySchema>;
|
|
426
|
+
//#endregion
|
|
427
|
+
//#region src/app/flows/(procurement)/delivery/delivery.schemas.d.ts
|
|
415
428
|
declare const deliveryCreatePayloadSchema: z.ZodObject<{
|
|
416
429
|
supplierId: z.ZodInt;
|
|
417
430
|
warehouseId: z.ZodInt;
|
|
@@ -421,6 +434,77 @@ declare const deliveryCreatePayloadSchema: z.ZodObject<{
|
|
|
421
434
|
out: {};
|
|
422
435
|
in: {};
|
|
423
436
|
}>;
|
|
437
|
+
declare const deliverySelectOneQuerySchema: z.ZodObject<{
|
|
438
|
+
id: z.ZodInt;
|
|
439
|
+
}, z.core.$strip>;
|
|
440
|
+
declare const deliverySearchOptionsSchema: z.ZodObject<{
|
|
441
|
+
where: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
442
|
+
supplierId: z.ZodOptional<z.ZodInt>;
|
|
443
|
+
warehouseId: z.ZodOptional<z.ZodInt>;
|
|
444
|
+
currencyId: z.ZodOptional<z.ZodInt>;
|
|
445
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
446
|
+
draft: "draft";
|
|
447
|
+
posted: "posted";
|
|
448
|
+
reversed: "reversed";
|
|
449
|
+
}>>;
|
|
450
|
+
createdAtFrom: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
451
|
+
createdAtTo: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
452
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
453
|
+
supplierId?: number | undefined;
|
|
454
|
+
warehouseId?: number | undefined;
|
|
455
|
+
currencyId?: number | undefined;
|
|
456
|
+
status?: "draft" | "posted" | "reversed" | undefined;
|
|
457
|
+
createdAtFrom: Date;
|
|
458
|
+
createdAtTo?: Date | undefined;
|
|
459
|
+
} | {
|
|
460
|
+
supplierId?: number | undefined;
|
|
461
|
+
warehouseId?: number | undefined;
|
|
462
|
+
currencyId?: number | undefined;
|
|
463
|
+
status?: "draft" | "posted" | "reversed" | undefined;
|
|
464
|
+
createdAtFrom?: Date | undefined;
|
|
465
|
+
createdAtTo: Date;
|
|
466
|
+
} | {
|
|
467
|
+
supplierId?: number | undefined;
|
|
468
|
+
warehouseId?: number | undefined;
|
|
469
|
+
currencyId: number;
|
|
470
|
+
status?: "draft" | "posted" | "reversed" | undefined;
|
|
471
|
+
createdAtFrom?: Date | undefined;
|
|
472
|
+
createdAtTo?: Date | undefined;
|
|
473
|
+
} | {
|
|
474
|
+
supplierId?: number | undefined;
|
|
475
|
+
warehouseId?: number | undefined;
|
|
476
|
+
currencyId?: number | undefined;
|
|
477
|
+
status: "draft" | "posted" | "reversed";
|
|
478
|
+
createdAtFrom?: Date | undefined;
|
|
479
|
+
createdAtTo?: Date | undefined;
|
|
480
|
+
} | {
|
|
481
|
+
supplierId: number;
|
|
482
|
+
warehouseId?: number | undefined;
|
|
483
|
+
currencyId?: number | undefined;
|
|
484
|
+
status?: "draft" | "posted" | "reversed" | undefined;
|
|
485
|
+
createdAtFrom?: Date | undefined;
|
|
486
|
+
createdAtTo?: Date | undefined;
|
|
487
|
+
} | {
|
|
488
|
+
supplierId?: number | undefined;
|
|
489
|
+
warehouseId: number;
|
|
490
|
+
currencyId?: number | undefined;
|
|
491
|
+
status?: "draft" | "posted" | "reversed" | undefined;
|
|
492
|
+
createdAtFrom?: Date | undefined;
|
|
493
|
+
createdAtTo?: Date | undefined;
|
|
494
|
+
}, {
|
|
495
|
+
supplierId?: number | undefined;
|
|
496
|
+
warehouseId?: number | undefined;
|
|
497
|
+
currencyId?: number | undefined;
|
|
498
|
+
status?: "draft" | "posted" | "reversed" | undefined;
|
|
499
|
+
createdAtFrom?: Date | undefined;
|
|
500
|
+
createdAtTo?: Date | undefined;
|
|
501
|
+
}>>>;
|
|
502
|
+
query: z.ZodOptional<z.ZodString>;
|
|
503
|
+
pagination: z.ZodObject<{
|
|
504
|
+
offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
505
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
506
|
+
}, z.core.$strip>;
|
|
507
|
+
}, z.core.$strict>;
|
|
424
508
|
declare const deliveryUpdatePayloadSchema: z.ZodObject<{
|
|
425
509
|
supplierId: z.ZodOptional<z.ZodInt>;
|
|
426
510
|
warehouseId: z.ZodOptional<z.ZodInt>;
|
|
@@ -431,6 +515,20 @@ declare const deliveryUpdatePayloadSchema: z.ZodObject<{
|
|
|
431
515
|
out: {};
|
|
432
516
|
in: {};
|
|
433
517
|
}>;
|
|
518
|
+
type DeliveryCreatePayload = z.infer<typeof deliveryCreatePayloadSchema>;
|
|
519
|
+
type DeliverySelectOneQuery = z.infer<typeof deliverySelectOneQuerySchema>;
|
|
520
|
+
type DeliverySearchOptions = z.infer<typeof deliverySearchOptionsSchema>;
|
|
521
|
+
type DeliverySearchResult = {
|
|
522
|
+
deliveries: Delivery[];
|
|
523
|
+
total: number;
|
|
524
|
+
};
|
|
525
|
+
type DeliveryUpdatePayload = z.infer<typeof deliveryUpdatePayloadSchema>;
|
|
526
|
+
declare const deliveryDeletePayloadSchema: z.ZodObject<{
|
|
527
|
+
deliveryId: z.ZodInt;
|
|
528
|
+
}, z.core.$strip>;
|
|
529
|
+
declare const deliveryPostPayloadSchema: z.ZodObject<{
|
|
530
|
+
deliveryId: z.ZodInt;
|
|
531
|
+
}, z.core.$strip>;
|
|
434
532
|
declare const deliveryItemAddPayloadSchema: z.ZodObject<{
|
|
435
533
|
deliveryId: z.ZodInt;
|
|
436
534
|
productVariantId: z.ZodInt;
|
|
@@ -480,9 +578,6 @@ declare const deliveryDetailsSchema: z.ZodObject<{
|
|
|
480
578
|
createdAt: z.ZodDate;
|
|
481
579
|
}, z.core.$strip>>;
|
|
482
580
|
}, z.core.$strip>;
|
|
483
|
-
type DeliverySelectOneQuery = z.infer<typeof deliverySelectOneQuerySchema>;
|
|
484
|
-
type DeliveryCreatePayload = z.infer<typeof deliveryCreatePayloadSchema>;
|
|
485
|
-
type DeliveryUpdatePayload = z.infer<typeof deliveryUpdatePayloadSchema>;
|
|
486
581
|
type DeliveryDeletePayload = z.infer<typeof deliveryDeletePayloadSchema>;
|
|
487
582
|
type DeliveryPostPayload = z.infer<typeof deliveryPostPayloadSchema>;
|
|
488
583
|
type DeliveryItemAddPayload = z.infer<typeof deliveryItemAddPayloadSchema>;
|
|
@@ -967,26 +1062,4 @@ type ProductVariantCreateResult = {
|
|
|
967
1062
|
};
|
|
968
1063
|
type ProductVariantUpdatePayload = z.infer<typeof productVariantUpdatePayloadSchema>;
|
|
969
1064
|
//#endregion
|
|
970
|
-
|
|
971
|
-
declare const deliverySchema: z.ZodObject<{
|
|
972
|
-
id: z.ZodInt;
|
|
973
|
-
code: z.ZodString;
|
|
974
|
-
supplierId: z.ZodInt;
|
|
975
|
-
warehouseId: z.ZodInt;
|
|
976
|
-
currencyId: z.ZodInt;
|
|
977
|
-
status: z.ZodEnum<{
|
|
978
|
-
draft: "draft";
|
|
979
|
-
posted: "posted";
|
|
980
|
-
reversed: "reversed";
|
|
981
|
-
}>;
|
|
982
|
-
notes: z.ZodNullable<z.ZodString>;
|
|
983
|
-
exchangeRateId: z.ZodNullable<z.ZodInt>;
|
|
984
|
-
exchangeRate: z.ZodNullable<z.ZodString>;
|
|
985
|
-
exchangeRateValidFromDate: z.ZodNullable<z.ZodNullable<z.ZodISODate>>;
|
|
986
|
-
postedAt: z.ZodNullable<z.ZodDate>;
|
|
987
|
-
updatedAt: z.ZodNullable<z.ZodDate>;
|
|
988
|
-
createdAt: z.ZodDate;
|
|
989
|
-
}, z.core.$strip>;
|
|
990
|
-
type Delivery = z.infer<typeof deliverySchema>;
|
|
991
|
-
//#endregion
|
|
992
|
-
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, DeliveryItemDeletePayload, DeliveryItemResult, DeliveryItemUpdatePayload, DeliveryPostPayload, 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 };
|
|
1065
|
+
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, DeliveryItemDeletePayload, DeliveryItemResult, DeliveryItemUpdatePayload, DeliveryPostPayload, 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 };
|