@pksep/zod-shared 0.0.565 → 0.0.566
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.
|
@@ -29,7 +29,9 @@ export declare enum ExcelExportStatus {
|
|
|
29
29
|
queued = "queued",
|
|
30
30
|
processing = "processing",
|
|
31
31
|
completed = "completed",
|
|
32
|
-
failed = "failed"
|
|
32
|
+
failed = "failed",
|
|
33
|
+
cancelling = "cancelling",
|
|
34
|
+
cancelled = "cancelled"
|
|
33
35
|
}
|
|
34
36
|
export declare const ExcelExportColumnDefinitionSchema: z.ZodObject<{
|
|
35
37
|
header: z.ZodString;
|
|
@@ -5558,17 +5560,225 @@ export declare const ExcelExportResultSchema: z.ZodObject<{
|
|
|
5558
5560
|
fileName: z.ZodString;
|
|
5559
5561
|
contentType: z.ZodString;
|
|
5560
5562
|
rowCount: z.ZodNumber;
|
|
5563
|
+
sizeBytes: z.ZodOptional<z.ZodNumber>;
|
|
5561
5564
|
}, "strip", z.ZodTypeAny, {
|
|
5562
5565
|
rowCount: number;
|
|
5563
5566
|
objectName: string;
|
|
5564
5567
|
fileName: string;
|
|
5565
5568
|
contentType: string;
|
|
5569
|
+
sizeBytes?: number | undefined;
|
|
5566
5570
|
}, {
|
|
5567
5571
|
rowCount: number;
|
|
5568
5572
|
objectName: string;
|
|
5569
5573
|
fileName: string;
|
|
5570
5574
|
contentType: string;
|
|
5575
|
+
sizeBytes?: number | undefined;
|
|
5571
5576
|
}>;
|
|
5577
|
+
/** Срок считается от готовности, скачивания не продлевают хранение. */
|
|
5578
|
+
export declare const EXCEL_EXPORT_RETENTION_MS: number;
|
|
5579
|
+
export declare const ExcelExportHistoryEntrySchema: z.ZodObject<{
|
|
5580
|
+
id: z.ZodString;
|
|
5581
|
+
status: z.ZodNativeEnum<typeof ExcelExportStatus>;
|
|
5582
|
+
rowCount: z.ZodOptional<z.ZodNumber>;
|
|
5583
|
+
error: z.ZodOptional<z.ZodString>;
|
|
5584
|
+
} & {
|
|
5585
|
+
reportType: z.ZodNativeEnum<typeof ExcelExportReportType>;
|
|
5586
|
+
createdAt: z.ZodNumber;
|
|
5587
|
+
finishedAt: z.ZodOptional<z.ZodNumber>;
|
|
5588
|
+
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
5589
|
+
fileName: z.ZodOptional<z.ZodString>;
|
|
5590
|
+
sizeBytes: z.ZodOptional<z.ZodNumber>;
|
|
5591
|
+
}, "strip", z.ZodTypeAny, {
|
|
5592
|
+
status: ExcelExportStatus;
|
|
5593
|
+
id: string;
|
|
5594
|
+
createdAt: number;
|
|
5595
|
+
reportType: ExcelExportReportType;
|
|
5596
|
+
error?: string | undefined;
|
|
5597
|
+
rowCount?: number | undefined;
|
|
5598
|
+
fileName?: string | undefined;
|
|
5599
|
+
sizeBytes?: number | undefined;
|
|
5600
|
+
finishedAt?: number | undefined;
|
|
5601
|
+
expiresAt?: number | undefined;
|
|
5602
|
+
}, {
|
|
5603
|
+
status: ExcelExportStatus;
|
|
5604
|
+
id: string;
|
|
5605
|
+
createdAt: number;
|
|
5606
|
+
reportType: ExcelExportReportType;
|
|
5607
|
+
error?: string | undefined;
|
|
5608
|
+
rowCount?: number | undefined;
|
|
5609
|
+
fileName?: string | undefined;
|
|
5610
|
+
sizeBytes?: number | undefined;
|
|
5611
|
+
finishedAt?: number | undefined;
|
|
5612
|
+
expiresAt?: number | undefined;
|
|
5613
|
+
}>;
|
|
5614
|
+
export declare const ExcelExportHistoryRecordSchema: z.ZodObject<{
|
|
5615
|
+
id: z.ZodString;
|
|
5616
|
+
status: z.ZodNativeEnum<typeof ExcelExportStatus>;
|
|
5617
|
+
rowCount: z.ZodOptional<z.ZodNumber>;
|
|
5618
|
+
error: z.ZodOptional<z.ZodString>;
|
|
5619
|
+
} & {
|
|
5620
|
+
reportType: z.ZodNativeEnum<typeof ExcelExportReportType>;
|
|
5621
|
+
createdAt: z.ZodNumber;
|
|
5622
|
+
finishedAt: z.ZodOptional<z.ZodNumber>;
|
|
5623
|
+
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
5624
|
+
fileName: z.ZodOptional<z.ZodString>;
|
|
5625
|
+
sizeBytes: z.ZodOptional<z.ZodNumber>;
|
|
5626
|
+
} & {
|
|
5627
|
+
userId: z.ZodNumber;
|
|
5628
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
5629
|
+
objectName: z.ZodString;
|
|
5630
|
+
fileName: z.ZodString;
|
|
5631
|
+
contentType: z.ZodString;
|
|
5632
|
+
rowCount: z.ZodNumber;
|
|
5633
|
+
sizeBytes: z.ZodOptional<z.ZodNumber>;
|
|
5634
|
+
}, "strip", z.ZodTypeAny, {
|
|
5635
|
+
rowCount: number;
|
|
5636
|
+
objectName: string;
|
|
5637
|
+
fileName: string;
|
|
5638
|
+
contentType: string;
|
|
5639
|
+
sizeBytes?: number | undefined;
|
|
5640
|
+
}, {
|
|
5641
|
+
rowCount: number;
|
|
5642
|
+
objectName: string;
|
|
5643
|
+
fileName: string;
|
|
5644
|
+
contentType: string;
|
|
5645
|
+
sizeBytes?: number | undefined;
|
|
5646
|
+
}>>;
|
|
5647
|
+
}, "strip", z.ZodTypeAny, {
|
|
5648
|
+
userId: number;
|
|
5649
|
+
status: ExcelExportStatus;
|
|
5650
|
+
id: string;
|
|
5651
|
+
createdAt: number;
|
|
5652
|
+
reportType: ExcelExportReportType;
|
|
5653
|
+
error?: string | undefined;
|
|
5654
|
+
result?: {
|
|
5655
|
+
rowCount: number;
|
|
5656
|
+
objectName: string;
|
|
5657
|
+
fileName: string;
|
|
5658
|
+
contentType: string;
|
|
5659
|
+
sizeBytes?: number | undefined;
|
|
5660
|
+
} | undefined;
|
|
5661
|
+
rowCount?: number | undefined;
|
|
5662
|
+
fileName?: string | undefined;
|
|
5663
|
+
sizeBytes?: number | undefined;
|
|
5664
|
+
finishedAt?: number | undefined;
|
|
5665
|
+
expiresAt?: number | undefined;
|
|
5666
|
+
}, {
|
|
5667
|
+
userId: number;
|
|
5668
|
+
status: ExcelExportStatus;
|
|
5669
|
+
id: string;
|
|
5670
|
+
createdAt: number;
|
|
5671
|
+
reportType: ExcelExportReportType;
|
|
5672
|
+
error?: string | undefined;
|
|
5673
|
+
result?: {
|
|
5674
|
+
rowCount: number;
|
|
5675
|
+
objectName: string;
|
|
5676
|
+
fileName: string;
|
|
5677
|
+
contentType: string;
|
|
5678
|
+
sizeBytes?: number | undefined;
|
|
5679
|
+
} | undefined;
|
|
5680
|
+
rowCount?: number | undefined;
|
|
5681
|
+
fileName?: string | undefined;
|
|
5682
|
+
sizeBytes?: number | undefined;
|
|
5683
|
+
finishedAt?: number | undefined;
|
|
5684
|
+
expiresAt?: number | undefined;
|
|
5685
|
+
}>;
|
|
5686
|
+
export declare const ExcelExportHistoryQuerySchema: z.ZodObject<{
|
|
5687
|
+
before: z.ZodOptional<z.ZodNumber>;
|
|
5688
|
+
}, "strip", z.ZodTypeAny, {
|
|
5689
|
+
before?: number | undefined;
|
|
5690
|
+
}, {
|
|
5691
|
+
before?: number | undefined;
|
|
5692
|
+
}>;
|
|
5693
|
+
export declare const ExcelExportHistorySchema: z.ZodObject<{
|
|
5694
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
5695
|
+
id: z.ZodString;
|
|
5696
|
+
status: z.ZodNativeEnum<typeof ExcelExportStatus>;
|
|
5697
|
+
rowCount: z.ZodOptional<z.ZodNumber>;
|
|
5698
|
+
error: z.ZodOptional<z.ZodString>;
|
|
5699
|
+
} & {
|
|
5700
|
+
reportType: z.ZodNativeEnum<typeof ExcelExportReportType>;
|
|
5701
|
+
createdAt: z.ZodNumber;
|
|
5702
|
+
finishedAt: z.ZodOptional<z.ZodNumber>;
|
|
5703
|
+
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
5704
|
+
fileName: z.ZodOptional<z.ZodString>;
|
|
5705
|
+
sizeBytes: z.ZodOptional<z.ZodNumber>;
|
|
5706
|
+
}, "strip", z.ZodTypeAny, {
|
|
5707
|
+
status: ExcelExportStatus;
|
|
5708
|
+
id: string;
|
|
5709
|
+
createdAt: number;
|
|
5710
|
+
reportType: ExcelExportReportType;
|
|
5711
|
+
error?: string | undefined;
|
|
5712
|
+
rowCount?: number | undefined;
|
|
5713
|
+
fileName?: string | undefined;
|
|
5714
|
+
sizeBytes?: number | undefined;
|
|
5715
|
+
finishedAt?: number | undefined;
|
|
5716
|
+
expiresAt?: number | undefined;
|
|
5717
|
+
}, {
|
|
5718
|
+
status: ExcelExportStatus;
|
|
5719
|
+
id: string;
|
|
5720
|
+
createdAt: number;
|
|
5721
|
+
reportType: ExcelExportReportType;
|
|
5722
|
+
error?: string | undefined;
|
|
5723
|
+
rowCount?: number | undefined;
|
|
5724
|
+
fileName?: string | undefined;
|
|
5725
|
+
sizeBytes?: number | undefined;
|
|
5726
|
+
finishedAt?: number | undefined;
|
|
5727
|
+
expiresAt?: number | undefined;
|
|
5728
|
+
}>, "many">;
|
|
5729
|
+
nextCursor: z.ZodNullable<z.ZodNumber>;
|
|
5730
|
+
unreadCount: z.ZodNumber;
|
|
5731
|
+
activeCount: z.ZodNumber;
|
|
5732
|
+
}, "strip", z.ZodTypeAny, {
|
|
5733
|
+
rows: {
|
|
5734
|
+
status: ExcelExportStatus;
|
|
5735
|
+
id: string;
|
|
5736
|
+
createdAt: number;
|
|
5737
|
+
reportType: ExcelExportReportType;
|
|
5738
|
+
error?: string | undefined;
|
|
5739
|
+
rowCount?: number | undefined;
|
|
5740
|
+
fileName?: string | undefined;
|
|
5741
|
+
sizeBytes?: number | undefined;
|
|
5742
|
+
finishedAt?: number | undefined;
|
|
5743
|
+
expiresAt?: number | undefined;
|
|
5744
|
+
}[];
|
|
5745
|
+
nextCursor: number | null;
|
|
5746
|
+
unreadCount: number;
|
|
5747
|
+
activeCount: number;
|
|
5748
|
+
}, {
|
|
5749
|
+
rows: {
|
|
5750
|
+
status: ExcelExportStatus;
|
|
5751
|
+
id: string;
|
|
5752
|
+
createdAt: number;
|
|
5753
|
+
reportType: ExcelExportReportType;
|
|
5754
|
+
error?: string | undefined;
|
|
5755
|
+
rowCount?: number | undefined;
|
|
5756
|
+
fileName?: string | undefined;
|
|
5757
|
+
sizeBytes?: number | undefined;
|
|
5758
|
+
finishedAt?: number | undefined;
|
|
5759
|
+
expiresAt?: number | undefined;
|
|
5760
|
+
}[];
|
|
5761
|
+
nextCursor: number | null;
|
|
5762
|
+
unreadCount: number;
|
|
5763
|
+
activeCount: number;
|
|
5764
|
+
}>;
|
|
5765
|
+
export declare const ExcelExportSeenSchema: z.ZodObject<{
|
|
5766
|
+
ids: z.ZodArray<z.ZodString, "many">;
|
|
5767
|
+
}, "strip", z.ZodTypeAny, {
|
|
5768
|
+
ids: string[];
|
|
5769
|
+
}, {
|
|
5770
|
+
ids: string[];
|
|
5771
|
+
}>;
|
|
5772
|
+
export type ExcelExportHistoryEntry = z.infer<typeof ExcelExportHistoryEntrySchema>;
|
|
5773
|
+
export type ExcelExportHistoryRecord = z.infer<typeof ExcelExportHistoryRecordSchema>;
|
|
5774
|
+
export type ExcelExportHistory = z.infer<typeof ExcelExportHistorySchema>;
|
|
5775
|
+
export type ExcelExportHistoryQuery = z.infer<typeof ExcelExportHistoryQuerySchema>;
|
|
5776
|
+
export type ExcelExportSeen = z.infer<typeof ExcelExportSeenSchema>;
|
|
5777
|
+
export interface ExcelExportExecutionContext {
|
|
5778
|
+
signal: AbortSignal;
|
|
5779
|
+
checkpoint: () => Promise<void>;
|
|
5780
|
+
}
|
|
5781
|
+
export declare const ExcelExportReportTitles: Record<ExcelExportReportType, string>;
|
|
5572
5782
|
export type AssemblyExcelExportColumn = z.infer<typeof AssemblyExcelExportColumnSchema>;
|
|
5573
5783
|
export type MetalloworkingExcelExportColumn = z.infer<typeof MetalloworkingExcelExportColumnSchema>;
|
|
5574
5784
|
export type MetalloworkingOperationExcelExportColumn = z.infer<typeof MetalloworkingOperationExcelExportColumnSchema>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CreateExcelExportRequestSchema = exports.CreateMovementObjectExcelExportSchema = exports.CreateWarehouseReceiptExcelExportSchema = exports.CreateOrderToWayExcelExportSchema = exports.CreateWarehouseConsumptionExcelExportSchema = exports.CreateShippedOrderExcelExportSchema = exports.CreateWarehouseShipmentExcelExportSchema = exports.CreateMaterialDeficitExcelExportDtoZod = exports.CreateDetalDeficitExcelExportDtoZod = exports.CreateCbedDeficitExcelExportDtoZod = exports.CreateProductDeficitExcelExportDtoZod = exports.CreateAssemblyStockOrderExcelExportDtoZod = exports.CreateOperationPathExcelExportDtoZod = exports.CreateAssemblyOperationExcelExportDtoZod = exports.CreateResultWorkExcelExportDtoZod = exports.CreateMetalloworkingStockOrderExcelExportDtoZod = exports.CreateMetalloworkingComplectationExcelExportDtoZod = exports.CreateMetalloworkingOperationExcelExportDtoZod = exports.CreateMetalloworkingExcelExportDtoZod = exports.CreateAssemblyExcelExportDtoZod = exports.MaterialDeficitExcelExportColumnSchema = exports.DetalDeficitExcelExportColumnSchema = exports.CbedDeficitExcelExportColumnSchema = exports.ProductDeficitExcelExportColumnSchema = exports.AssemblyStockOrderExcelExportColumnSchema = exports.OperationPathExcelExportColumnSchema = exports.AssemblyOperationExcelExportColumnSchema = exports.ResultWorkExcelExportColumnSchema = exports.MetalloworkingStockOrderExcelExportColumnSchema = exports.MetalloworkingComplectationExcelExportColumnSchema = exports.MetalloworkingOperationExcelExportColumnSchema = exports.MetalloworkingExcelExportColumnSchema = exports.AssemblyExcelExportColumnSchema = exports.MaterialDeficitExcelExportColumnDefinitions = exports.DetalDeficitExcelExportColumnDefinitions = exports.CbedDeficitExcelExportColumnDefinitions = exports.ProductDeficitExcelExportColumnDefinitions = exports.AssemblyStockOrderExcelExportColumnDefinitions = exports.OperationPathExcelExportColumnDefinitions = exports.AssemblyOperationExcelExportColumnDefinitions = exports.ResultWorkExcelExportColumnDefinitions = exports.MetalloworkingStockOrderExcelExportColumnDefinitions = exports.MetalloworkingComplectationExcelExportColumnDefinitions = exports.MetalloworkingOperationExcelExportColumnDefinitions = exports.MetalloworkingExcelExportColumnDefinitions = exports.AssemblyExcelExportColumnDefinitions = exports.ExcelExportColumnDefinitionSchema = exports.ExcelExportStatus = exports.OperationPathExcelExportSourceType = exports.ExcelExportReportType = void 0;
|
|
4
|
-
exports.ExcelExportResultSchema = exports.ExcelExportJobDataSchema = exports.ExcelExportStatusSchema = exports.ExcelExportCreatedSchema = exports.CreateExcelExportDtoZod = void 0;
|
|
4
|
+
exports.ExcelExportReportTitles = exports.ExcelExportSeenSchema = exports.ExcelExportHistorySchema = exports.ExcelExportHistoryQuerySchema = exports.ExcelExportHistoryRecordSchema = exports.ExcelExportHistoryEntrySchema = exports.EXCEL_EXPORT_RETENTION_MS = exports.ExcelExportResultSchema = exports.ExcelExportJobDataSchema = exports.ExcelExportStatusSchema = exports.ExcelExportCreatedSchema = exports.CreateExcelExportDtoZod = void 0;
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
const warehouse_excel_export_1 = require("./warehouse-excel-export");
|
|
7
7
|
const assemble_1 = require("../assemble");
|
|
@@ -49,6 +49,8 @@ var ExcelExportStatus;
|
|
|
49
49
|
ExcelExportStatus["processing"] = "processing";
|
|
50
50
|
ExcelExportStatus["completed"] = "completed";
|
|
51
51
|
ExcelExportStatus["failed"] = "failed";
|
|
52
|
+
ExcelExportStatus["cancelling"] = "cancelling";
|
|
53
|
+
ExcelExportStatus["cancelled"] = "cancelled";
|
|
52
54
|
})(ExcelExportStatus || (exports.ExcelExportStatus = ExcelExportStatus = {}));
|
|
53
55
|
exports.ExcelExportColumnDefinitionSchema = zod_1.z.object({
|
|
54
56
|
header: zod_1.z.string().min(1),
|
|
@@ -611,5 +613,53 @@ exports.ExcelExportResultSchema = zod_1.z.object({
|
|
|
611
613
|
objectName: zod_1.z.string().min(1),
|
|
612
614
|
fileName: zod_1.z.string().min(1),
|
|
613
615
|
contentType: zod_1.z.string().min(1),
|
|
614
|
-
rowCount: zod_1.z.number().int().nonnegative()
|
|
616
|
+
rowCount: zod_1.z.number().int().nonnegative(),
|
|
617
|
+
sizeBytes: zod_1.z.number().int().nonnegative().optional()
|
|
615
618
|
});
|
|
619
|
+
/** Срок считается от готовности, скачивания не продлевают хранение. */
|
|
620
|
+
exports.EXCEL_EXPORT_RETENTION_MS = 5 * 24 * 60 * 60 * 1000;
|
|
621
|
+
exports.ExcelExportHistoryEntrySchema = exports.ExcelExportStatusSchema.extend({
|
|
622
|
+
reportType: zod_1.z.nativeEnum(ExcelExportReportType),
|
|
623
|
+
createdAt: zod_1.z.number().int().nonnegative(),
|
|
624
|
+
finishedAt: zod_1.z.number().int().nonnegative().optional(),
|
|
625
|
+
expiresAt: zod_1.z.number().int().nonnegative().optional(),
|
|
626
|
+
fileName: zod_1.z.string().optional(),
|
|
627
|
+
sizeBytes: zod_1.z.number().int().nonnegative().optional()
|
|
628
|
+
});
|
|
629
|
+
exports.ExcelExportHistoryRecordSchema = exports.ExcelExportHistoryEntrySchema.extend({
|
|
630
|
+
userId: zod_1.z.number().int().positive(),
|
|
631
|
+
result: exports.ExcelExportResultSchema.optional()
|
|
632
|
+
});
|
|
633
|
+
exports.ExcelExportHistoryQuerySchema = zod_1.z.object({
|
|
634
|
+
before: zod_1.z.coerce.number().int().positive().optional()
|
|
635
|
+
});
|
|
636
|
+
exports.ExcelExportHistorySchema = zod_1.z.object({
|
|
637
|
+
rows: zod_1.z.array(exports.ExcelExportHistoryEntrySchema),
|
|
638
|
+
nextCursor: zod_1.z.number().int().positive().nullable(),
|
|
639
|
+
unreadCount: zod_1.z.number().int().nonnegative(),
|
|
640
|
+
activeCount: zod_1.z.number().int().nonnegative()
|
|
641
|
+
});
|
|
642
|
+
exports.ExcelExportSeenSchema = zod_1.z.object({
|
|
643
|
+
ids: zod_1.z.array(zod_1.z.string().regex(/^\d+$/)).max(50)
|
|
644
|
+
});
|
|
645
|
+
exports.ExcelExportReportTitles = {
|
|
646
|
+
[ExcelExportReportType.assemblyList]: 'Сборка',
|
|
647
|
+
[ExcelExportReportType.assemblyOperationList]: 'Сборка по операциям',
|
|
648
|
+
[ExcelExportReportType.operationPath]: 'Производственный путь',
|
|
649
|
+
[ExcelExportReportType.assemblyStockOrderList]: 'Заказ склада на сборку',
|
|
650
|
+
[ExcelExportReportType.metalloworkingList]: 'Металлообработка',
|
|
651
|
+
[ExcelExportReportType.metalloworkingOperationList]: 'Металлообработка по операциям',
|
|
652
|
+
[ExcelExportReportType.metalloworkingComplectationList]: 'Комплектация металлообработки',
|
|
653
|
+
[ExcelExportReportType.metalloworkingStockOrderList]: 'Заказ склада на металлообработку',
|
|
654
|
+
[ExcelExportReportType.resultWorkList]: 'Результат работ',
|
|
655
|
+
[ExcelExportReportType.productDeficitList]: 'Дефицит продукции',
|
|
656
|
+
[ExcelExportReportType.cbedDeficitList]: 'Дефицит сборочных единиц',
|
|
657
|
+
[ExcelExportReportType.detalDeficitList]: 'Дефицит деталей',
|
|
658
|
+
[ExcelExportReportType.materialDeficitList]: 'Дефицит материалов',
|
|
659
|
+
[ExcelExportReportType.warehouseShipmentList]: 'Склад: задачи на отгрузку',
|
|
660
|
+
[ExcelExportReportType.shippedOrderList]: 'Отгруженные заказы',
|
|
661
|
+
[ExcelExportReportType.warehouseConsumptionList]: 'Расход со склада',
|
|
662
|
+
[ExcelExportReportType.orderToWayList]: 'Заказано / В пути',
|
|
663
|
+
[ExcelExportReportType.warehouseReceiptList]: 'Приход на склад',
|
|
664
|
+
[ExcelExportReportType.movementObjectList]: 'Движение объектов'
|
|
665
|
+
};
|