@esb-market-contracts/backend 1.0.36 → 1.0.38
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 +45 -0
- package/package.json +1 -1
- package/types.d.ts +109 -13
package/api.d.ts
CHANGED
|
@@ -765,6 +765,51 @@ 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
|
+
supplierName: string;
|
|
787
|
+
warehouseName: string;
|
|
788
|
+
currencyCode: string;
|
|
789
|
+
}[];
|
|
790
|
+
total: number;
|
|
791
|
+
}>;
|
|
792
|
+
outputFormat: "json";
|
|
793
|
+
status: 200;
|
|
794
|
+
input: {
|
|
795
|
+
json: {
|
|
796
|
+
where?: {
|
|
797
|
+
supplierId?: number | undefined;
|
|
798
|
+
warehouseId?: number | undefined;
|
|
799
|
+
currencyId?: number | undefined;
|
|
800
|
+
status?: "draft" | "posted" | "reversed" | undefined;
|
|
801
|
+
createdAtFrom?: unknown;
|
|
802
|
+
createdAtTo?: unknown;
|
|
803
|
+
} | undefined;
|
|
804
|
+
query?: string | undefined;
|
|
805
|
+
pagination: {
|
|
806
|
+
offset?: unknown;
|
|
807
|
+
limit?: unknown;
|
|
808
|
+
};
|
|
809
|
+
};
|
|
810
|
+
};
|
|
811
|
+
};
|
|
812
|
+
};
|
|
768
813
|
} & {
|
|
769
814
|
"/operations/deliveries/update": {
|
|
770
815
|
$post: {
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -403,15 +403,6 @@ declare const deliveryItemSchema: z.ZodObject<{
|
|
|
403
403
|
type DeliveryItem = z.infer<typeof deliveryItemSchema>;
|
|
404
404
|
//#endregion
|
|
405
405
|
//#region src/app/flows/(procurement)/delivery/delivery.schemas.d.ts
|
|
406
|
-
declare const deliverySelectOneQuerySchema: z.ZodObject<{
|
|
407
|
-
id: z.ZodInt;
|
|
408
|
-
}, z.core.$strip>;
|
|
409
|
-
declare const deliveryDeletePayloadSchema: z.ZodObject<{
|
|
410
|
-
deliveryId: z.ZodInt;
|
|
411
|
-
}, z.core.$strip>;
|
|
412
|
-
declare const deliveryPostPayloadSchema: z.ZodObject<{
|
|
413
|
-
deliveryId: z.ZodInt;
|
|
414
|
-
}, z.core.$strip>;
|
|
415
406
|
declare const deliveryCreatePayloadSchema: z.ZodObject<{
|
|
416
407
|
supplierId: z.ZodInt;
|
|
417
408
|
warehouseId: z.ZodInt;
|
|
@@ -421,6 +412,9 @@ declare const deliveryCreatePayloadSchema: z.ZodObject<{
|
|
|
421
412
|
out: {};
|
|
422
413
|
in: {};
|
|
423
414
|
}>;
|
|
415
|
+
declare const deliverySelectOneQuerySchema: z.ZodObject<{
|
|
416
|
+
id: z.ZodInt;
|
|
417
|
+
}, z.core.$strip>;
|
|
424
418
|
declare const deliveryUpdatePayloadSchema: z.ZodObject<{
|
|
425
419
|
supplierId: z.ZodOptional<z.ZodInt>;
|
|
426
420
|
warehouseId: z.ZodOptional<z.ZodInt>;
|
|
@@ -431,6 +425,111 @@ declare const deliveryUpdatePayloadSchema: z.ZodObject<{
|
|
|
431
425
|
out: {};
|
|
432
426
|
in: {};
|
|
433
427
|
}>;
|
|
428
|
+
declare const deliverySearchOptionsSchema: z.ZodObject<{
|
|
429
|
+
where: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
430
|
+
supplierId: z.ZodOptional<z.ZodInt>;
|
|
431
|
+
warehouseId: z.ZodOptional<z.ZodInt>;
|
|
432
|
+
currencyId: z.ZodOptional<z.ZodInt>;
|
|
433
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
434
|
+
draft: "draft";
|
|
435
|
+
posted: "posted";
|
|
436
|
+
reversed: "reversed";
|
|
437
|
+
}>>;
|
|
438
|
+
createdAtFrom: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
439
|
+
createdAtTo: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
440
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
441
|
+
supplierId?: number | undefined;
|
|
442
|
+
warehouseId?: number | undefined;
|
|
443
|
+
currencyId?: number | undefined;
|
|
444
|
+
status?: "draft" | "posted" | "reversed" | undefined;
|
|
445
|
+
createdAtFrom: Date;
|
|
446
|
+
createdAtTo?: Date | undefined;
|
|
447
|
+
} | {
|
|
448
|
+
supplierId?: number | undefined;
|
|
449
|
+
warehouseId?: number | undefined;
|
|
450
|
+
currencyId?: number | undefined;
|
|
451
|
+
status?: "draft" | "posted" | "reversed" | undefined;
|
|
452
|
+
createdAtFrom?: Date | undefined;
|
|
453
|
+
createdAtTo: Date;
|
|
454
|
+
} | {
|
|
455
|
+
supplierId?: number | undefined;
|
|
456
|
+
warehouseId?: number | undefined;
|
|
457
|
+
currencyId: number;
|
|
458
|
+
status?: "draft" | "posted" | "reversed" | undefined;
|
|
459
|
+
createdAtFrom?: Date | undefined;
|
|
460
|
+
createdAtTo?: Date | undefined;
|
|
461
|
+
} | {
|
|
462
|
+
supplierId?: number | undefined;
|
|
463
|
+
warehouseId?: number | undefined;
|
|
464
|
+
currencyId?: number | undefined;
|
|
465
|
+
status: "draft" | "posted" | "reversed";
|
|
466
|
+
createdAtFrom?: Date | undefined;
|
|
467
|
+
createdAtTo?: Date | undefined;
|
|
468
|
+
} | {
|
|
469
|
+
supplierId: number;
|
|
470
|
+
warehouseId?: number | undefined;
|
|
471
|
+
currencyId?: number | undefined;
|
|
472
|
+
status?: "draft" | "posted" | "reversed" | undefined;
|
|
473
|
+
createdAtFrom?: Date | undefined;
|
|
474
|
+
createdAtTo?: Date | undefined;
|
|
475
|
+
} | {
|
|
476
|
+
supplierId?: number | undefined;
|
|
477
|
+
warehouseId: number;
|
|
478
|
+
currencyId?: number | undefined;
|
|
479
|
+
status?: "draft" | "posted" | "reversed" | undefined;
|
|
480
|
+
createdAtFrom?: Date | undefined;
|
|
481
|
+
createdAtTo?: Date | undefined;
|
|
482
|
+
}, {
|
|
483
|
+
supplierId?: number | undefined;
|
|
484
|
+
warehouseId?: number | undefined;
|
|
485
|
+
currencyId?: number | undefined;
|
|
486
|
+
status?: "draft" | "posted" | "reversed" | undefined;
|
|
487
|
+
createdAtFrom?: Date | undefined;
|
|
488
|
+
createdAtTo?: Date | undefined;
|
|
489
|
+
}>>>;
|
|
490
|
+
query: z.ZodOptional<z.ZodString>;
|
|
491
|
+
pagination: z.ZodObject<{
|
|
492
|
+
offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
493
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
494
|
+
}, z.core.$strip>;
|
|
495
|
+
}, z.core.$strict>;
|
|
496
|
+
declare const deliverySearchItemSchema: z.ZodObject<{
|
|
497
|
+
id: z.ZodInt;
|
|
498
|
+
code: z.ZodString;
|
|
499
|
+
supplierId: z.ZodInt;
|
|
500
|
+
warehouseId: z.ZodInt;
|
|
501
|
+
currencyId: z.ZodInt;
|
|
502
|
+
status: z.ZodEnum<{
|
|
503
|
+
draft: "draft";
|
|
504
|
+
posted: "posted";
|
|
505
|
+
reversed: "reversed";
|
|
506
|
+
}>;
|
|
507
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
508
|
+
exchangeRateId: z.ZodNullable<z.ZodInt>;
|
|
509
|
+
exchangeRate: z.ZodNullable<z.ZodString>;
|
|
510
|
+
exchangeRateValidFromDate: z.ZodNullable<z.ZodNullable<z.ZodISODate>>;
|
|
511
|
+
postedAt: z.ZodNullable<z.ZodDate>;
|
|
512
|
+
updatedAt: z.ZodNullable<z.ZodDate>;
|
|
513
|
+
createdAt: z.ZodDate;
|
|
514
|
+
supplierName: z.ZodString;
|
|
515
|
+
warehouseName: z.ZodString;
|
|
516
|
+
currencyCode: z.ZodString;
|
|
517
|
+
}, z.core.$strip>;
|
|
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: DeliverySearchItem[];
|
|
523
|
+
total: number;
|
|
524
|
+
};
|
|
525
|
+
type DeliveryUpdatePayload = z.infer<typeof deliveryUpdatePayloadSchema>;
|
|
526
|
+
type DeliverySearchItem = z.infer<typeof deliverySearchItemSchema>;
|
|
527
|
+
declare const deliveryDeletePayloadSchema: z.ZodObject<{
|
|
528
|
+
deliveryId: z.ZodInt;
|
|
529
|
+
}, z.core.$strip>;
|
|
530
|
+
declare const deliveryPostPayloadSchema: z.ZodObject<{
|
|
531
|
+
deliveryId: z.ZodInt;
|
|
532
|
+
}, z.core.$strip>;
|
|
434
533
|
declare const deliveryItemAddPayloadSchema: z.ZodObject<{
|
|
435
534
|
deliveryId: z.ZodInt;
|
|
436
535
|
productVariantId: z.ZodInt;
|
|
@@ -480,9 +579,6 @@ declare const deliveryDetailsSchema: z.ZodObject<{
|
|
|
480
579
|
createdAt: z.ZodDate;
|
|
481
580
|
}, z.core.$strip>>;
|
|
482
581
|
}, 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
582
|
type DeliveryDeletePayload = z.infer<typeof deliveryDeletePayloadSchema>;
|
|
487
583
|
type DeliveryPostPayload = z.infer<typeof deliveryPostPayloadSchema>;
|
|
488
584
|
type DeliveryItemAddPayload = z.infer<typeof deliveryItemAddPayloadSchema>;
|
|
@@ -989,4 +1085,4 @@ declare const deliverySchema: z.ZodObject<{
|
|
|
989
1085
|
}, z.core.$strip>;
|
|
990
1086
|
type Delivery = z.infer<typeof deliverySchema>;
|
|
991
1087
|
//#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 };
|
|
1088
|
+
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, 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 };
|