@pksep/zod-shared 0.0.566 → 0.0.568
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/dist/ai-mcp/index.d.ts +1 -0
- package/dist/ai-mcp/index.js +1 -0
- package/dist/ai-mcp/interfaces/ai-mcp.interface.d.ts +172 -3
- package/dist/ai-mcp/schemas/ai-mcp-shipment.schema.d.ts +109 -0
- package/dist/ai-mcp/schemas/ai-mcp-shipment.schema.js +110 -0
- package/dist/ai-mcp/schemas/ai-mcp.schema.d.ts +59 -2
- package/dist/ai-mcp/schemas/ai-mcp.schema.js +31 -3
- package/dist/assemble/interfaces/interfaces.d.ts +4 -0
- package/dist/document/dto/entity-document-command.dto.d.ts +14 -14
- package/dist/document/dto/entity-document-command.dto.js +2 -1
- package/dist/document/types/uploaded-file-map.type.d.ts +5 -0
- package/dist/document/types/uploaded-file-map.type.js +2 -0
- package/dist/excel-export/excel-export.dto.d.ts +990 -2555
- package/dist/excel-export/excel-export.dto.js +15 -116
- package/dist/excel-export/index.d.ts +0 -1
- package/dist/excel-export/index.js +0 -1
- package/dist/marks/dto/get-result-work.dto.d.ts +18 -4
- package/dist/marks/dto/get-result-work.dto.js +2 -1
- package/dist/production-tasks/dto/repair-production-task-priority.dto.d.ts +30 -0
- package/dist/production-tasks/dto/repair-production-task-priority.dto.js +18 -0
- package/dist/production-tasks/interfaces/production-tasks.d.ts +28 -8
- package/dist/role/constants/permission.constants.d.ts +9 -0
- package/dist/role/constants/permission.constants.js +13 -0
- package/dist/role/dto/update-role-permissions.dto.d.ts +15 -0
- package/dist/role/dto/update-role-permissions.dto.js +9 -0
- package/dist/role/enums/permission.enum.d.ts +116 -0
- package/dist/role/enums/permission.enum.js +123 -0
- package/dist/role/schemas/permission.schema.d.ts +169 -0
- package/dist/role/schemas/permission.schema.js +44 -0
- package/dist/role/types/permission.types.d.ts +38 -0
- package/dist/role/types/permission.types.js +2 -0
- package/dist/sclad/schemas/revision.schema.d.ts +5 -5
- package/dist/stock-order/dto/get-stock-order-items-by-entity.dto.d.ts +19 -0
- package/dist/stock-order/dto/get-stock-order-items-by-entity.dto.js +11 -0
- package/dist/tech-process/types/tech-process-load-options.d.ts +3 -0
- package/dist/tech-process/types/tech-process-load-options.js +2 -0
- package/dist/utils/enums.d.ts +1 -0
- package/dist/utils/enums.js +1 -0
- package/dist/utils/sorting.d.ts +2 -1
- package/dist/utils/sorting.js +1 -0
- package/dist/utils/tables-config/enum.d.ts +2 -0
- package/dist/utils/tables-config/enum.js +2 -0
- package/dist/utils/tables-config/tables-array.js +8 -0
- package/package.json +2 -2
- package/dist/excel-export/warehouse-excel-export.d.ts +0 -269
- package/dist/excel-export/warehouse-excel-export.js +0 -76
package/dist/ai-mcp/index.d.ts
CHANGED
|
@@ -2,4 +2,5 @@ export * from './schemas/ai-mcp.schema';
|
|
|
2
2
|
export * from './schemas/ai-mcp-specification.schema';
|
|
3
3
|
export * from './schemas/ai-mcp-entity-editor.schema';
|
|
4
4
|
export * from './schemas/ai-mcp-technology.schema';
|
|
5
|
+
export * from './schemas/ai-mcp-shipment.schema';
|
|
5
6
|
export * from './interfaces/ai-mcp.interface';
|
package/dist/ai-mcp/index.js
CHANGED
|
@@ -18,4 +18,5 @@ __exportStar(require("./schemas/ai-mcp.schema"), exports);
|
|
|
18
18
|
__exportStar(require("./schemas/ai-mcp-specification.schema"), exports);
|
|
19
19
|
__exportStar(require("./schemas/ai-mcp-entity-editor.schema"), exports);
|
|
20
20
|
__exportStar(require("./schemas/ai-mcp-technology.schema"), exports);
|
|
21
|
+
__exportStar(require("./schemas/ai-mcp-shipment.schema"), exports);
|
|
21
22
|
__exportStar(require("./interfaces/ai-mcp.interface"), exports);
|
|
@@ -1,15 +1,90 @@
|
|
|
1
1
|
import { EntityCommonSpecificationArray, ProductionTimeType, UnitsEnum } from '../../utils';
|
|
2
|
-
import { AiMcpCommandStatusEnum, AiMcpOperationNameEnum, AiMcpOperationStatusEnum, ErpProductSpecificationKindEnum, ErpProductSpecificationViewEnum, ErpProductStateEnum, ErpProductTechnologyStateEnum, TErpEntityFilesListInput } from '../schemas/ai-mcp.schema';
|
|
2
|
+
import { AiMcpCommandStatusEnum, AiMcpOperationNameEnum, AiMcpOperationStatusEnum, ErpProductSpecificationKindEnum, ErpProductSpecificationViewEnum, ErpProductStateEnum, ErpProductTechnologyStateEnum, TAiMcpDocumentEntityType, TErpEntityFilesListInput, TErpWorkResultsInput } from '../schemas/ai-mcp.schema';
|
|
3
3
|
import { TAiMcpEntityType } from '../schemas/ai-mcp.schema';
|
|
4
4
|
import { SpecificationMutationOperation, SpecificationParentType } from '../../specification/dto/mutate-specification.dto';
|
|
5
5
|
import { SpetificationEntityKeys } from '../../utils';
|
|
6
6
|
import { Transaction } from 'sequelize';
|
|
7
7
|
import { ErpTechnologyReferenceKindEnum } from '../schemas/ai-mcp-technology.schema';
|
|
8
|
+
import { ExcelExportReportType, ExcelExportStatusType } from '../../excel-export';
|
|
8
9
|
export interface IAiMcpAuthContext {
|
|
9
10
|
actorUserId?: number;
|
|
10
11
|
clientId: string;
|
|
11
12
|
correlationId: string;
|
|
12
13
|
}
|
|
14
|
+
export interface IAiMcpFileArtifact {
|
|
15
|
+
kind: 'file';
|
|
16
|
+
downloadUrl: string;
|
|
17
|
+
fileName: string;
|
|
18
|
+
contentType: string;
|
|
19
|
+
size?: number;
|
|
20
|
+
}
|
|
21
|
+
export interface IErpBusinessExcelExportResult {
|
|
22
|
+
reportType: ExcelExportReportType;
|
|
23
|
+
artifact: {
|
|
24
|
+
kind: 'file-job';
|
|
25
|
+
statusUrl: string;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export interface IErpBusinessExcelExportStatus extends ExcelExportStatusType {
|
|
29
|
+
artifact?: IAiMcpFileArtifact;
|
|
30
|
+
}
|
|
31
|
+
export interface IErpProductCadArchiveExportResult {
|
|
32
|
+
product: {
|
|
33
|
+
id: number;
|
|
34
|
+
name: string;
|
|
35
|
+
designation: string | null;
|
|
36
|
+
};
|
|
37
|
+
artifact: IAiMcpFileArtifact;
|
|
38
|
+
}
|
|
39
|
+
export interface IErpWorkResultReference {
|
|
40
|
+
name: string;
|
|
41
|
+
tabel?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface IErpWorkResultsResult {
|
|
44
|
+
status: 'ready' | 'needs_clarification' | 'not_found';
|
|
45
|
+
dataAsOf: string;
|
|
46
|
+
period: Pick<TErpWorkResultsInput, 'startDate' | 'endDate'>;
|
|
47
|
+
message?: string;
|
|
48
|
+
clarification?: {
|
|
49
|
+
field: 'employee' | 'operation';
|
|
50
|
+
options: IErpWorkResultReference[];
|
|
51
|
+
};
|
|
52
|
+
filters?: {
|
|
53
|
+
employee: IErpWorkResultReference | null;
|
|
54
|
+
operation: IErpWorkResultReference | null;
|
|
55
|
+
entityQuery: string | null;
|
|
56
|
+
};
|
|
57
|
+
page?: number;
|
|
58
|
+
pageSize?: number;
|
|
59
|
+
total?: number;
|
|
60
|
+
hasMore?: boolean;
|
|
61
|
+
pageNormativeTimeMinutes?: number;
|
|
62
|
+
returnedTotals?: {
|
|
63
|
+
recordCount: number;
|
|
64
|
+
completedQuantity: number;
|
|
65
|
+
actualTimeMinutes: number;
|
|
66
|
+
normativeTimeMinutes: number;
|
|
67
|
+
};
|
|
68
|
+
items?: Array<{
|
|
69
|
+
workDate: string;
|
|
70
|
+
employee: IErpWorkResultReference;
|
|
71
|
+
operation: string | null;
|
|
72
|
+
entity: {
|
|
73
|
+
type: string | null;
|
|
74
|
+
name: string | null;
|
|
75
|
+
designation: string | null;
|
|
76
|
+
};
|
|
77
|
+
quantity: number;
|
|
78
|
+
actualTimeMinutes: number;
|
|
79
|
+
normativeTimeMinutes: number;
|
|
80
|
+
normativeTimePerUnitMinutes: {
|
|
81
|
+
preparatory: number;
|
|
82
|
+
auxiliary: number;
|
|
83
|
+
main: number;
|
|
84
|
+
};
|
|
85
|
+
note: string | null;
|
|
86
|
+
}>;
|
|
87
|
+
}
|
|
13
88
|
export interface IErpEntitySearchItem {
|
|
14
89
|
id: number;
|
|
15
90
|
type: TAiMcpEntityType;
|
|
@@ -74,12 +149,16 @@ export interface ICreateDetailAndAddToCbedResult {
|
|
|
74
149
|
created: true;
|
|
75
150
|
replayed: boolean;
|
|
76
151
|
detail: {
|
|
152
|
+
id: number;
|
|
77
153
|
name: string;
|
|
78
154
|
designation: string;
|
|
155
|
+
webUrl: string | null;
|
|
79
156
|
};
|
|
80
157
|
assembly: {
|
|
158
|
+
id: number;
|
|
81
159
|
name: string;
|
|
82
160
|
designation: string | null;
|
|
161
|
+
webUrl: string | null;
|
|
83
162
|
};
|
|
84
163
|
specification: {
|
|
85
164
|
quantity: number;
|
|
@@ -93,8 +172,10 @@ export interface IArchiveDetailResult {
|
|
|
93
172
|
replayed: boolean;
|
|
94
173
|
status: AiMcpCommandStatusEnum.queued;
|
|
95
174
|
detail: {
|
|
175
|
+
id: number;
|
|
96
176
|
name: string;
|
|
97
177
|
designation: string | null;
|
|
178
|
+
webUrl: string | null;
|
|
98
179
|
};
|
|
99
180
|
message: string;
|
|
100
181
|
}
|
|
@@ -103,9 +184,11 @@ export interface IErpSpecificationMutationResult {
|
|
|
103
184
|
replayed: boolean;
|
|
104
185
|
operation: SpecificationMutationOperation;
|
|
105
186
|
parent: {
|
|
187
|
+
id: number;
|
|
106
188
|
type: SpecificationParentType;
|
|
107
189
|
name: string;
|
|
108
190
|
designation: string | null;
|
|
191
|
+
webUrl: string | null;
|
|
109
192
|
};
|
|
110
193
|
item: {
|
|
111
194
|
section: SpetificationEntityKeys;
|
|
@@ -156,9 +239,11 @@ export interface IErpDocumentActionResult {
|
|
|
156
239
|
replayed: boolean;
|
|
157
240
|
document: IErpFileItem;
|
|
158
241
|
entity?: {
|
|
159
|
-
|
|
242
|
+
id: number;
|
|
243
|
+
type: TAiMcpDocumentEntityType;
|
|
160
244
|
name: string;
|
|
161
245
|
designation: string | null;
|
|
246
|
+
webUrl: string | null;
|
|
162
247
|
};
|
|
163
248
|
message: string;
|
|
164
249
|
}
|
|
@@ -435,9 +520,11 @@ export interface IErpEntityEditorUpdateResult {
|
|
|
435
520
|
applied: true;
|
|
436
521
|
replayed: boolean;
|
|
437
522
|
entity: {
|
|
523
|
+
id: number;
|
|
438
524
|
type: TAiMcpEntityType;
|
|
439
525
|
name: string;
|
|
440
526
|
designation: string | null;
|
|
527
|
+
webUrl: string | null;
|
|
441
528
|
};
|
|
442
529
|
changedFields: string[];
|
|
443
530
|
message: string;
|
|
@@ -445,9 +532,11 @@ export interface IErpEntityEditorUpdateResult {
|
|
|
445
532
|
export interface IErpTechnologyResult {
|
|
446
533
|
dataAsOf: string;
|
|
447
534
|
entity: {
|
|
535
|
+
id: number;
|
|
448
536
|
type: TAiMcpEntityType;
|
|
449
537
|
name: string;
|
|
450
538
|
designation: string | null;
|
|
539
|
+
webUrl: string | null;
|
|
451
540
|
};
|
|
452
541
|
configured: boolean;
|
|
453
542
|
editable: boolean;
|
|
@@ -483,16 +572,96 @@ export interface IErpTechnologyMutationResult {
|
|
|
483
572
|
replayed: boolean;
|
|
484
573
|
operation: ErpTechnologyMutationOperation;
|
|
485
574
|
entity: {
|
|
575
|
+
id: number;
|
|
486
576
|
type: TAiMcpEntityType;
|
|
487
577
|
name: string;
|
|
488
578
|
designation: string | null;
|
|
579
|
+
webUrl: string | null;
|
|
489
580
|
};
|
|
490
581
|
operationName: string | null;
|
|
491
582
|
position: number | null;
|
|
492
583
|
changedFields: string[];
|
|
493
584
|
message: string;
|
|
494
585
|
}
|
|
495
|
-
export
|
|
586
|
+
export interface IErpShipmentItem {
|
|
587
|
+
id: number;
|
|
588
|
+
number: string;
|
|
589
|
+
status: string;
|
|
590
|
+
processing: boolean;
|
|
591
|
+
orderedAt: Date | string | null;
|
|
592
|
+
plannedShipmentAt: Date | string | null;
|
|
593
|
+
warehouseReadinessAt: Date | string | null;
|
|
594
|
+
quantity: number;
|
|
595
|
+
shipped: number;
|
|
596
|
+
reserved: boolean;
|
|
597
|
+
basis: string;
|
|
598
|
+
description: string;
|
|
599
|
+
product: {
|
|
600
|
+
id: number;
|
|
601
|
+
name: string;
|
|
602
|
+
designation: string | null;
|
|
603
|
+
article: string | null;
|
|
604
|
+
} | null;
|
|
605
|
+
buyer: {
|
|
606
|
+
id: number;
|
|
607
|
+
name: string;
|
|
608
|
+
} | null;
|
|
609
|
+
manager: {
|
|
610
|
+
id: number;
|
|
611
|
+
name: string;
|
|
612
|
+
} | null;
|
|
613
|
+
documents: IErpFileItem[];
|
|
614
|
+
webUrl: string | null;
|
|
615
|
+
}
|
|
616
|
+
export interface IErpShipmentSearchResult {
|
|
617
|
+
query: string;
|
|
618
|
+
count: number;
|
|
619
|
+
page: number;
|
|
620
|
+
limit: number;
|
|
621
|
+
dataAsOf: string;
|
|
622
|
+
appliedFilters: {
|
|
623
|
+
statuses: string[];
|
|
624
|
+
plannedDateFrom: string | null;
|
|
625
|
+
plannedDateTo: string | null;
|
|
626
|
+
buyer: string | null;
|
|
627
|
+
warehouseReadinessDateFilter: string;
|
|
628
|
+
};
|
|
629
|
+
availableFilters: string[];
|
|
630
|
+
items: IErpShipmentItem[];
|
|
631
|
+
}
|
|
632
|
+
export interface IErpShipmentCardResult {
|
|
633
|
+
dataAsOf: string;
|
|
634
|
+
item: IErpShipmentItem;
|
|
635
|
+
}
|
|
636
|
+
export interface IErpShipmentCreateResult {
|
|
637
|
+
accepted: true;
|
|
638
|
+
replayed: boolean;
|
|
639
|
+
status: AiMcpCommandStatusEnum.queued;
|
|
640
|
+
shipment: {
|
|
641
|
+
id: number;
|
|
642
|
+
number: string;
|
|
643
|
+
status: string;
|
|
644
|
+
webUrl: string | null;
|
|
645
|
+
};
|
|
646
|
+
product: {
|
|
647
|
+
id: number;
|
|
648
|
+
name: string;
|
|
649
|
+
designation: string | null;
|
|
650
|
+
};
|
|
651
|
+
buyer: {
|
|
652
|
+
id: number;
|
|
653
|
+
name: string;
|
|
654
|
+
};
|
|
655
|
+
quantity: number;
|
|
656
|
+
orderedAt: string;
|
|
657
|
+
plannedShipmentAt: string;
|
|
658
|
+
basisDocument: {
|
|
659
|
+
id: number;
|
|
660
|
+
name: string;
|
|
661
|
+
} | null;
|
|
662
|
+
message: string;
|
|
663
|
+
}
|
|
664
|
+
export type TAiMcpOperationResult = ICreateDetailAndAddToCbedResult | IArchiveDetailResult | IErpSpecificationMutationResult | IErpDocumentActionResult | IErpEntityEditorUpdateResult | IErpTechnologyMutationResult | IErpShipmentCreateResult;
|
|
496
665
|
export interface IAiMcpOperationExecution<T extends TAiMcpOperationResult = TAiMcpOperationResult> {
|
|
497
666
|
operation: AiMcpOperationNameEnum;
|
|
498
667
|
idempotencyKey: string;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
import { statusShipment, WarehouseReadinessDateFilterEnum } from '../../utils';
|
|
3
|
+
export declare const ErpShipmentSearchInputShape: {
|
|
4
|
+
query: z.ZodDefault<z.ZodString>;
|
|
5
|
+
statuses: z.ZodDefault<z.ZodArray<z.ZodEnum<typeof statusShipment>>>;
|
|
6
|
+
plannedDateFrom: z.ZodOptional<z.ZodString>;
|
|
7
|
+
plannedDateTo: z.ZodOptional<z.ZodString>;
|
|
8
|
+
buyerQuery: z.ZodOptional<z.ZodString>;
|
|
9
|
+
warehouseReadinessDateFilter: z.ZodDefault<z.ZodEnum<typeof WarehouseReadinessDateFilterEnum>>;
|
|
10
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
11
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
12
|
+
};
|
|
13
|
+
export declare const ErpShipmentGetInputShape: {
|
|
14
|
+
id: z.ZodNumber;
|
|
15
|
+
};
|
|
16
|
+
export declare const ErpShipmentCreateCommonInputShape: {
|
|
17
|
+
productName: z.ZodOptional<z.ZodString>;
|
|
18
|
+
productDesignation: z.ZodOptional<z.ZodString>;
|
|
19
|
+
productArticle: z.ZodOptional<z.ZodString>;
|
|
20
|
+
buyerName: z.ZodString;
|
|
21
|
+
quantity: z.ZodNumber;
|
|
22
|
+
orderedAt: z.ZodOptional<z.ZodString>;
|
|
23
|
+
plannedShipmentAt: z.ZodString;
|
|
24
|
+
warehouseReadinessAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
25
|
+
reserved: z.ZodDefault<z.ZodBoolean>;
|
|
26
|
+
description: z.ZodDefault<z.ZodString>;
|
|
27
|
+
idempotencyKey: z.ZodString;
|
|
28
|
+
};
|
|
29
|
+
export declare const ErpShipmentCreateInputShape: {
|
|
30
|
+
basisDocumentId: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
basisDocumentName: z.ZodOptional<z.ZodString>;
|
|
32
|
+
productName: z.ZodOptional<z.ZodString>;
|
|
33
|
+
productDesignation: z.ZodOptional<z.ZodString>;
|
|
34
|
+
productArticle: z.ZodOptional<z.ZodString>;
|
|
35
|
+
buyerName: z.ZodString;
|
|
36
|
+
quantity: z.ZodNumber;
|
|
37
|
+
orderedAt: z.ZodOptional<z.ZodString>;
|
|
38
|
+
plannedShipmentAt: z.ZodString;
|
|
39
|
+
warehouseReadinessAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
40
|
+
reserved: z.ZodDefault<z.ZodBoolean>;
|
|
41
|
+
description: z.ZodDefault<z.ZodString>;
|
|
42
|
+
idempotencyKey: z.ZodString;
|
|
43
|
+
};
|
|
44
|
+
export declare const ErpShipmentCreateWithFileInputShape: {
|
|
45
|
+
type: z.ZodDefault<z.ZodString>;
|
|
46
|
+
fileDescription: z.ZodDefault<z.ZodString>;
|
|
47
|
+
version: z.ZodDefault<z.ZodNumber>;
|
|
48
|
+
newVersion: z.ZodDefault<z.ZodBoolean>;
|
|
49
|
+
productName: z.ZodOptional<z.ZodString>;
|
|
50
|
+
productDesignation: z.ZodOptional<z.ZodString>;
|
|
51
|
+
productArticle: z.ZodOptional<z.ZodString>;
|
|
52
|
+
buyerName: z.ZodString;
|
|
53
|
+
quantity: z.ZodNumber;
|
|
54
|
+
orderedAt: z.ZodOptional<z.ZodString>;
|
|
55
|
+
plannedShipmentAt: z.ZodString;
|
|
56
|
+
warehouseReadinessAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
57
|
+
reserved: z.ZodDefault<z.ZodBoolean>;
|
|
58
|
+
description: z.ZodDefault<z.ZodString>;
|
|
59
|
+
idempotencyKey: z.ZodString;
|
|
60
|
+
};
|
|
61
|
+
export declare const ErpShipmentSearchInputZod: z.ZodObject<{
|
|
62
|
+
query: z.ZodDefault<z.ZodString>;
|
|
63
|
+
statuses: z.ZodDefault<z.ZodArray<z.ZodEnum<typeof statusShipment>>>;
|
|
64
|
+
plannedDateFrom: z.ZodOptional<z.ZodString>;
|
|
65
|
+
plannedDateTo: z.ZodOptional<z.ZodString>;
|
|
66
|
+
buyerQuery: z.ZodOptional<z.ZodString>;
|
|
67
|
+
warehouseReadinessDateFilter: z.ZodDefault<z.ZodEnum<typeof WarehouseReadinessDateFilterEnum>>;
|
|
68
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
69
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
70
|
+
}, z.core.$strip>;
|
|
71
|
+
export declare const ErpShipmentGetInputZod: z.ZodObject<{
|
|
72
|
+
id: z.ZodNumber;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
export declare const ErpShipmentCreateInputZod: z.ZodObject<{
|
|
75
|
+
basisDocumentId: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
basisDocumentName: z.ZodOptional<z.ZodString>;
|
|
77
|
+
productName: z.ZodOptional<z.ZodString>;
|
|
78
|
+
productDesignation: z.ZodOptional<z.ZodString>;
|
|
79
|
+
productArticle: z.ZodOptional<z.ZodString>;
|
|
80
|
+
buyerName: z.ZodString;
|
|
81
|
+
quantity: z.ZodNumber;
|
|
82
|
+
orderedAt: z.ZodOptional<z.ZodString>;
|
|
83
|
+
plannedShipmentAt: z.ZodString;
|
|
84
|
+
warehouseReadinessAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
85
|
+
reserved: z.ZodDefault<z.ZodBoolean>;
|
|
86
|
+
description: z.ZodDefault<z.ZodString>;
|
|
87
|
+
idempotencyKey: z.ZodString;
|
|
88
|
+
}, z.core.$strip>;
|
|
89
|
+
export declare const ErpShipmentCreateWithFileInputZod: z.ZodObject<{
|
|
90
|
+
type: z.ZodDefault<z.ZodString>;
|
|
91
|
+
fileDescription: z.ZodDefault<z.ZodString>;
|
|
92
|
+
version: z.ZodDefault<z.ZodNumber>;
|
|
93
|
+
newVersion: z.ZodDefault<z.ZodBoolean>;
|
|
94
|
+
productName: z.ZodOptional<z.ZodString>;
|
|
95
|
+
productDesignation: z.ZodOptional<z.ZodString>;
|
|
96
|
+
productArticle: z.ZodOptional<z.ZodString>;
|
|
97
|
+
buyerName: z.ZodString;
|
|
98
|
+
quantity: z.ZodNumber;
|
|
99
|
+
orderedAt: z.ZodOptional<z.ZodString>;
|
|
100
|
+
plannedShipmentAt: z.ZodString;
|
|
101
|
+
warehouseReadinessAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
102
|
+
reserved: z.ZodDefault<z.ZodBoolean>;
|
|
103
|
+
description: z.ZodDefault<z.ZodString>;
|
|
104
|
+
idempotencyKey: z.ZodString;
|
|
105
|
+
}, z.core.$strip>;
|
|
106
|
+
export type TErpShipmentSearchInput = z.infer<typeof ErpShipmentSearchInputZod>;
|
|
107
|
+
export type TErpShipmentGetInput = z.infer<typeof ErpShipmentGetInputZod>;
|
|
108
|
+
export type TErpShipmentCreateInput = z.infer<typeof ErpShipmentCreateInputZod>;
|
|
109
|
+
export type TErpShipmentCreateWithFileInput = z.infer<typeof ErpShipmentCreateWithFileInputZod>;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.ErpShipmentCreateWithFileInputZod = exports.ErpShipmentCreateInputZod = exports.ErpShipmentGetInputZod = exports.ErpShipmentSearchInputZod = exports.ErpShipmentCreateWithFileInputShape = exports.ErpShipmentCreateInputShape = exports.ErpShipmentCreateCommonInputShape = exports.ErpShipmentGetInputShape = exports.ErpShipmentSearchInputShape = void 0;
|
|
37
|
+
const z = __importStar(require("zod/v4"));
|
|
38
|
+
const utils_1 = require("../../utils");
|
|
39
|
+
const shipmentDateZod = z
|
|
40
|
+
.string()
|
|
41
|
+
.trim()
|
|
42
|
+
.refine(value => /^\d{4}-\d{2}-\d{2}$/.test(value) ||
|
|
43
|
+
(/(?:Z|[+-]\d{2}:\d{2})$/.test(value) &&
|
|
44
|
+
z.string().datetime({ offset: true }).safeParse(value).success), 'Укажите дату YYYY-MM-DD или ISO 8601 с часовым поясом');
|
|
45
|
+
exports.ErpShipmentSearchInputShape = {
|
|
46
|
+
query: z.string().trim().max(200).default(''),
|
|
47
|
+
statuses: z
|
|
48
|
+
.array(z.nativeEnum(utils_1.statusShipment))
|
|
49
|
+
.max(Object.values(utils_1.statusShipment).length)
|
|
50
|
+
.default([utils_1.statusShipment.order, utils_1.statusShipment.overbue]),
|
|
51
|
+
plannedDateFrom: shipmentDateZod.optional(),
|
|
52
|
+
plannedDateTo: shipmentDateZod.optional(),
|
|
53
|
+
buyerQuery: z.string().trim().min(1).max(200).optional(),
|
|
54
|
+
warehouseReadinessDateFilter: z
|
|
55
|
+
.nativeEnum(utils_1.WarehouseReadinessDateFilterEnum)
|
|
56
|
+
.default(utils_1.WarehouseReadinessDateFilterEnum.all),
|
|
57
|
+
page: z.number().int().min(1).max(400).default(1),
|
|
58
|
+
limit: z.number().int().min(1).max(25).default(10)
|
|
59
|
+
};
|
|
60
|
+
exports.ErpShipmentGetInputShape = {
|
|
61
|
+
id: z.number().int().positive()
|
|
62
|
+
};
|
|
63
|
+
exports.ErpShipmentCreateCommonInputShape = {
|
|
64
|
+
productName: z.string().trim().min(1).max(255).optional(),
|
|
65
|
+
productDesignation: z.string().trim().min(1).max(255).optional(),
|
|
66
|
+
productArticle: z.string().trim().min(1).max(255).optional(),
|
|
67
|
+
buyerName: z.string().trim().min(1).max(255),
|
|
68
|
+
quantity: z.number().positive().max(1000000),
|
|
69
|
+
orderedAt: shipmentDateZod.optional(),
|
|
70
|
+
plannedShipmentAt: shipmentDateZod,
|
|
71
|
+
warehouseReadinessAt: shipmentDateZod.nullable().optional(),
|
|
72
|
+
reserved: z.boolean().default(false),
|
|
73
|
+
description: z.string().trim().max(4000).default(''),
|
|
74
|
+
idempotencyKey: z
|
|
75
|
+
.string()
|
|
76
|
+
.trim()
|
|
77
|
+
.min(8)
|
|
78
|
+
.max(128)
|
|
79
|
+
.regex(/^[a-zA-Z0-9._:-]+$/)
|
|
80
|
+
};
|
|
81
|
+
exports.ErpShipmentCreateInputShape = Object.assign(Object.assign({}, exports.ErpShipmentCreateCommonInputShape), { basisDocumentId: z.number().int().positive().optional(), basisDocumentName: z.string().trim().min(1).max(255).optional() });
|
|
82
|
+
exports.ErpShipmentCreateWithFileInputShape = Object.assign(Object.assign({}, exports.ErpShipmentCreateCommonInputShape), { type: z.string().trim().max(255).default(''), fileDescription: z.string().trim().max(4000).default(''), version: z.number().int().positive().max(1000000).default(1), newVersion: z.boolean().default(false) });
|
|
83
|
+
const assertProductReference = (value, context) => {
|
|
84
|
+
if (!value.productName &&
|
|
85
|
+
!value.productDesignation &&
|
|
86
|
+
!value.productArticle) {
|
|
87
|
+
context.addIssue({
|
|
88
|
+
code: 'custom',
|
|
89
|
+
path: ['productName'],
|
|
90
|
+
message: 'Укажите название, обозначение или артикул изделия'
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
exports.ErpShipmentSearchInputZod = z.object(exports.ErpShipmentSearchInputShape);
|
|
95
|
+
exports.ErpShipmentGetInputZod = z.object(exports.ErpShipmentGetInputShape);
|
|
96
|
+
exports.ErpShipmentCreateInputZod = z
|
|
97
|
+
.object(exports.ErpShipmentCreateInputShape)
|
|
98
|
+
.superRefine((value, context) => {
|
|
99
|
+
assertProductReference(value, context);
|
|
100
|
+
if (Boolean(value.basisDocumentId) !== Boolean(value.basisDocumentName)) {
|
|
101
|
+
context.addIssue({
|
|
102
|
+
code: 'custom',
|
|
103
|
+
path: ['basisDocumentId'],
|
|
104
|
+
message: 'Для основания укажите одновременно ID и точное название документа'
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
exports.ErpShipmentCreateWithFileInputZod = z
|
|
109
|
+
.object(exports.ErpShipmentCreateWithFileInputShape)
|
|
110
|
+
.superRefine(assertProductReference);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as z from 'zod/v4';
|
|
2
|
-
import { IzdType } from '../../utils';
|
|
2
|
+
import { IzdType, ModuleIncludeForDocumentEnum } from '../../utils';
|
|
3
|
+
import { ExcelExportReportType } from '../../excel-export';
|
|
3
4
|
export declare enum AiMcpOperationStatusEnum {
|
|
4
5
|
pending = "pending",
|
|
5
6
|
completed = "completed"
|
|
@@ -16,7 +17,8 @@ export declare enum AiMcpOperationNameEnum {
|
|
|
16
17
|
archiveDocument = "archive-document",
|
|
17
18
|
restoreDocument = "restore-document",
|
|
18
19
|
updateEntityEditor = "update-entity-editor",
|
|
19
|
-
mutateTechnology = "mutate-technology"
|
|
20
|
+
mutateTechnology = "mutate-technology",
|
|
21
|
+
createShipment = "create-shipment"
|
|
20
22
|
}
|
|
21
23
|
export declare enum AiMcpCommandStatusEnum {
|
|
22
24
|
queued = "queued"
|
|
@@ -54,6 +56,14 @@ export declare const AiMcpEntityTypeZod: z.ZodEnum<{
|
|
|
54
56
|
cbed: IzdType.cbed;
|
|
55
57
|
detal: IzdType.detal;
|
|
56
58
|
}>;
|
|
59
|
+
export declare const AI_MCP_DOCUMENT_ENTITY_TYPES: readonly [IzdType.product, IzdType.cbed, IzdType.detal, ModuleIncludeForDocumentEnum.shipments];
|
|
60
|
+
export type TAiMcpDocumentEntityType = (typeof AI_MCP_DOCUMENT_ENTITY_TYPES)[number];
|
|
61
|
+
export declare const AiMcpDocumentEntityTypeZod: z.ZodEnum<{
|
|
62
|
+
product: IzdType.product;
|
|
63
|
+
cbed: IzdType.cbed;
|
|
64
|
+
detal: IzdType.detal;
|
|
65
|
+
shipments: ModuleIncludeForDocumentEnum.shipments;
|
|
66
|
+
}>;
|
|
57
67
|
export declare const ErpEntitySearchInputShape: {
|
|
58
68
|
query: z.ZodString;
|
|
59
69
|
types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
@@ -105,6 +115,23 @@ export declare const ErpProductHistoryGetInputShape: {
|
|
|
105
115
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
106
116
|
offset: z.ZodDefault<z.ZodNumber>;
|
|
107
117
|
};
|
|
118
|
+
export declare const ErpBusinessExcelExportInputShape: {
|
|
119
|
+
reportType: z.ZodEnum<typeof ExcelExportReportType>;
|
|
120
|
+
columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
121
|
+
filters: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
122
|
+
};
|
|
123
|
+
export declare const ErpProductCadArchiveExportInputShape: {
|
|
124
|
+
productId: z.ZodNumber;
|
|
125
|
+
includeArchivedFiles: z.ZodDefault<z.ZodBoolean>;
|
|
126
|
+
};
|
|
127
|
+
export declare const ErpWorkResultsInputShape: {
|
|
128
|
+
startDate: z.ZodISODate;
|
|
129
|
+
endDate: z.ZodISODate;
|
|
130
|
+
employeeQuery: z.ZodOptional<z.ZodString>;
|
|
131
|
+
operationQuery: z.ZodOptional<z.ZodString>;
|
|
132
|
+
entityQuery: z.ZodOptional<z.ZodString>;
|
|
133
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
134
|
+
};
|
|
108
135
|
export declare const ErpDetailCreateAndAddToCbedInputShape: {
|
|
109
136
|
detailName: z.ZodString;
|
|
110
137
|
detailDesignation: z.ZodString;
|
|
@@ -125,6 +152,7 @@ export declare const ErpEntityFilesListInputShape: {
|
|
|
125
152
|
product: IzdType.product;
|
|
126
153
|
cbed: IzdType.cbed;
|
|
127
154
|
detal: IzdType.detal;
|
|
155
|
+
shipments: ModuleIncludeForDocumentEnum.shipments;
|
|
128
156
|
}>;
|
|
129
157
|
entityId: z.ZodNumber;
|
|
130
158
|
includeArchived: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -143,6 +171,7 @@ export declare const ErpEntityFileAttachInputShape: {
|
|
|
143
171
|
product: IzdType.product;
|
|
144
172
|
cbed: IzdType.cbed;
|
|
145
173
|
detal: IzdType.detal;
|
|
174
|
+
shipments: ModuleIncludeForDocumentEnum.shipments;
|
|
146
175
|
}>;
|
|
147
176
|
entityId: z.ZodNumber;
|
|
148
177
|
entityName: z.ZodString;
|
|
@@ -159,6 +188,7 @@ export declare const ErpEntityFileUploadInputShape: {
|
|
|
159
188
|
product: IzdType.product;
|
|
160
189
|
cbed: IzdType.cbed;
|
|
161
190
|
detal: IzdType.detal;
|
|
191
|
+
shipments: ModuleIncludeForDocumentEnum.shipments;
|
|
162
192
|
}>;
|
|
163
193
|
entityId: z.ZodNumber;
|
|
164
194
|
entityName: z.ZodString;
|
|
@@ -172,6 +202,7 @@ export declare const ErpEntityFileDetachInputShape: {
|
|
|
172
202
|
product: IzdType.product;
|
|
173
203
|
cbed: IzdType.cbed;
|
|
174
204
|
detal: IzdType.detal;
|
|
205
|
+
shipments: ModuleIncludeForDocumentEnum.shipments;
|
|
175
206
|
}>;
|
|
176
207
|
entityId: z.ZodNumber;
|
|
177
208
|
entityName: z.ZodString;
|
|
@@ -186,6 +217,7 @@ export declare const ErpEntityFileMainSetInputShape: {
|
|
|
186
217
|
product: IzdType.product;
|
|
187
218
|
cbed: IzdType.cbed;
|
|
188
219
|
detal: IzdType.detal;
|
|
220
|
+
shipments: ModuleIncludeForDocumentEnum.shipments;
|
|
189
221
|
}>;
|
|
190
222
|
entityId: z.ZodNumber;
|
|
191
223
|
entityName: z.ZodString;
|
|
@@ -261,6 +293,23 @@ export declare const ErpProductHistoryGetInputZod: z.ZodObject<{
|
|
|
261
293
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
262
294
|
offset: z.ZodDefault<z.ZodNumber>;
|
|
263
295
|
}, z.core.$strip>;
|
|
296
|
+
export declare const ErpBusinessExcelExportInputZod: z.ZodObject<{
|
|
297
|
+
reportType: z.ZodEnum<typeof ExcelExportReportType>;
|
|
298
|
+
columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
299
|
+
filters: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
300
|
+
}, z.core.$strip>;
|
|
301
|
+
export declare const ErpProductCadArchiveExportInputZod: z.ZodObject<{
|
|
302
|
+
productId: z.ZodNumber;
|
|
303
|
+
includeArchivedFiles: z.ZodDefault<z.ZodBoolean>;
|
|
304
|
+
}, z.core.$strip>;
|
|
305
|
+
export declare const ErpWorkResultsInputZod: z.ZodObject<{
|
|
306
|
+
startDate: z.ZodISODate;
|
|
307
|
+
endDate: z.ZodISODate;
|
|
308
|
+
employeeQuery: z.ZodOptional<z.ZodString>;
|
|
309
|
+
operationQuery: z.ZodOptional<z.ZodString>;
|
|
310
|
+
entityQuery: z.ZodOptional<z.ZodString>;
|
|
311
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
312
|
+
}, z.core.$strip>;
|
|
264
313
|
export declare const ErpDetailCreateAndAddToCbedInputZod: z.ZodObject<{
|
|
265
314
|
detailName: z.ZodString;
|
|
266
315
|
detailDesignation: z.ZodString;
|
|
@@ -281,6 +330,7 @@ export declare const ErpEntityFilesListInputZod: z.ZodObject<{
|
|
|
281
330
|
product: IzdType.product;
|
|
282
331
|
cbed: IzdType.cbed;
|
|
283
332
|
detal: IzdType.detal;
|
|
333
|
+
shipments: ModuleIncludeForDocumentEnum.shipments;
|
|
284
334
|
}>;
|
|
285
335
|
entityId: z.ZodNumber;
|
|
286
336
|
includeArchived: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -299,6 +349,7 @@ export declare const ErpEntityFileAttachInputZod: z.ZodObject<{
|
|
|
299
349
|
product: IzdType.product;
|
|
300
350
|
cbed: IzdType.cbed;
|
|
301
351
|
detal: IzdType.detal;
|
|
352
|
+
shipments: ModuleIncludeForDocumentEnum.shipments;
|
|
302
353
|
}>;
|
|
303
354
|
entityId: z.ZodNumber;
|
|
304
355
|
entityName: z.ZodString;
|
|
@@ -315,6 +366,7 @@ export declare const ErpEntityFileUploadInputZod: z.ZodObject<{
|
|
|
315
366
|
product: IzdType.product;
|
|
316
367
|
cbed: IzdType.cbed;
|
|
317
368
|
detal: IzdType.detal;
|
|
369
|
+
shipments: ModuleIncludeForDocumentEnum.shipments;
|
|
318
370
|
}>;
|
|
319
371
|
entityId: z.ZodNumber;
|
|
320
372
|
entityName: z.ZodString;
|
|
@@ -328,6 +380,7 @@ export declare const ErpEntityFileDetachInputZod: z.ZodObject<{
|
|
|
328
380
|
product: IzdType.product;
|
|
329
381
|
cbed: IzdType.cbed;
|
|
330
382
|
detal: IzdType.detal;
|
|
383
|
+
shipments: ModuleIncludeForDocumentEnum.shipments;
|
|
331
384
|
}>;
|
|
332
385
|
entityId: z.ZodNumber;
|
|
333
386
|
entityName: z.ZodString;
|
|
@@ -342,6 +395,7 @@ export declare const ErpEntityFileMainSetInputZod: z.ZodObject<{
|
|
|
342
395
|
product: IzdType.product;
|
|
343
396
|
cbed: IzdType.cbed;
|
|
344
397
|
detal: IzdType.detal;
|
|
398
|
+
shipments: ModuleIncludeForDocumentEnum.shipments;
|
|
345
399
|
}>;
|
|
346
400
|
entityId: z.ZodNumber;
|
|
347
401
|
entityName: z.ZodString;
|
|
@@ -374,6 +428,9 @@ export type TErpProductSpecificationGetInput = z.infer<typeof ErpProductSpecific
|
|
|
374
428
|
export type TErpProductProductionStateGetInput = z.infer<typeof ErpProductProductionStateGetInputZod>;
|
|
375
429
|
export type TErpProductTechnologyGetInput = z.infer<typeof ErpProductTechnologyGetInputZod>;
|
|
376
430
|
export type TErpProductHistoryGetInput = z.infer<typeof ErpProductHistoryGetInputZod>;
|
|
431
|
+
export type TErpBusinessExcelExportInput = z.infer<typeof ErpBusinessExcelExportInputZod>;
|
|
432
|
+
export type TErpProductCadArchiveExportInput = z.infer<typeof ErpProductCadArchiveExportInputZod>;
|
|
433
|
+
export type TErpWorkResultsInput = z.infer<typeof ErpWorkResultsInputZod>;
|
|
377
434
|
export type TCreateDetailAndAddToCbedInput = z.infer<typeof ErpDetailCreateAndAddToCbedInputZod>;
|
|
378
435
|
export type TArchiveDetailInput = z.infer<typeof ErpDetailArchiveInputZod>;
|
|
379
436
|
export type TErpEntityFilesListInput = z.infer<typeof ErpEntityFilesListInputZod>;
|