@pksep/zod-shared 0.0.570 → 0.0.571
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/interfaces/ai-mcp.interface.d.ts +7 -1
- package/dist/ai-mcp/schemas/ai-mcp-entity-editor.schema.d.ts +27 -0
- package/dist/ai-mcp/schemas/ai-mcp-entity-editor.schema.js +21 -1
- package/dist/ai-mcp/schemas/ai-mcp.schema.d.ts +1 -0
- package/dist/ai-mcp/schemas/ai-mcp.schema.js +1 -0
- package/dist/production-tasks/interfaces/production-tasks.d.ts +2 -0
- package/dist/production-tasks/schemas/orders-summary-by-entity.schema.d.ts +14 -0
- package/dist/production-tasks/schemas/orders-summary-by-entity.schema.js +3 -0
- package/package.json +1 -1
|
@@ -529,6 +529,12 @@ export interface IErpEntityEditorUpdateResult {
|
|
|
529
529
|
changedFields: string[];
|
|
530
530
|
message: string;
|
|
531
531
|
}
|
|
532
|
+
export interface IErpEntityEditorCreateResult {
|
|
533
|
+
created: true;
|
|
534
|
+
replayed: boolean;
|
|
535
|
+
entity: IErpEntityEditorUpdateResult['entity'];
|
|
536
|
+
message: string;
|
|
537
|
+
}
|
|
532
538
|
export interface IErpTechnologyResult {
|
|
533
539
|
dataAsOf: string;
|
|
534
540
|
entity: {
|
|
@@ -661,7 +667,7 @@ export interface IErpShipmentCreateResult {
|
|
|
661
667
|
} | null;
|
|
662
668
|
message: string;
|
|
663
669
|
}
|
|
664
|
-
export type TAiMcpOperationResult = ICreateDetailAndAddToCbedResult | IArchiveDetailResult | IErpSpecificationMutationResult | IErpDocumentActionResult | IErpEntityEditorUpdateResult | IErpTechnologyMutationResult | IErpShipmentCreateResult;
|
|
670
|
+
export type TAiMcpOperationResult = ICreateDetailAndAddToCbedResult | IArchiveDetailResult | IErpSpecificationMutationResult | IErpDocumentActionResult | IErpEntityEditorUpdateResult | IErpEntityEditorCreateResult | IErpTechnologyMutationResult | IErpShipmentCreateResult;
|
|
665
671
|
export interface IAiMcpOperationExecution<T extends TAiMcpOperationResult = TAiMcpOperationResult> {
|
|
666
672
|
operation: AiMcpOperationNameEnum;
|
|
667
673
|
idempotencyKey: string;
|
|
@@ -9,6 +9,33 @@ export declare const ErpEntityEditorGetInputShape: {
|
|
|
9
9
|
entityName: z.ZodOptional<z.ZodString>;
|
|
10
10
|
entityDesignation: z.ZodOptional<z.ZodString>;
|
|
11
11
|
};
|
|
12
|
+
export declare const ErpEntityEditorCreateInputShape: {
|
|
13
|
+
type: z.ZodEnum<{
|
|
14
|
+
product: import("../..").IzdType.product;
|
|
15
|
+
cbed: import("../..").IzdType.cbed;
|
|
16
|
+
detal: import("../..").IzdType.detal;
|
|
17
|
+
}>;
|
|
18
|
+
entityName: z.ZodString;
|
|
19
|
+
entityDesignation: z.ZodString;
|
|
20
|
+
responsibleName: z.ZodOptional<z.ZodString>;
|
|
21
|
+
article: z.ZodOptional<z.ZodString>;
|
|
22
|
+
description: z.ZodDefault<z.ZodString>;
|
|
23
|
+
idempotencyKey: z.ZodString;
|
|
24
|
+
};
|
|
25
|
+
export declare const ErpEntityEditorCreateInputZod: z.ZodObject<{
|
|
26
|
+
type: z.ZodEnum<{
|
|
27
|
+
product: import("../..").IzdType.product;
|
|
28
|
+
cbed: import("../..").IzdType.cbed;
|
|
29
|
+
detal: import("../..").IzdType.detal;
|
|
30
|
+
}>;
|
|
31
|
+
entityName: z.ZodString;
|
|
32
|
+
entityDesignation: z.ZodString;
|
|
33
|
+
responsibleName: z.ZodOptional<z.ZodString>;
|
|
34
|
+
article: z.ZodOptional<z.ZodString>;
|
|
35
|
+
description: z.ZodDefault<z.ZodString>;
|
|
36
|
+
idempotencyKey: z.ZodString;
|
|
37
|
+
}, z.core.$strict>;
|
|
38
|
+
export type TErpEntityEditorCreateInput = z.infer<typeof ErpEntityEditorCreateInputZod>;
|
|
12
39
|
export declare const ErpEntityEditorUpdateInputShape: {
|
|
13
40
|
changes: z.ZodObject<{
|
|
14
41
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.ErpEntityEditorUpdateInputZod = exports.ErpEntityEditorGetInputZod = exports.ErpEntityEditorUpdateInputShape = exports.ErpEntityEditorGetInputShape = void 0;
|
|
36
|
+
exports.ErpEntityEditorUpdateInputZod = exports.ErpEntityEditorGetInputZod = exports.ErpEntityEditorUpdateInputShape = exports.ErpEntityEditorCreateInputZod = exports.ErpEntityEditorCreateInputShape = exports.ErpEntityEditorGetInputShape = void 0;
|
|
37
37
|
const z = __importStar(require("zod/v4"));
|
|
38
38
|
const ai_mcp_schema_1 = require("./ai-mcp.schema");
|
|
39
39
|
const entityReferenceShape = {
|
|
@@ -73,6 +73,26 @@ const detailWorkpieceCharacteristicsZod = z
|
|
|
73
73
|
message: 'Укажите хотя бы одну редактируемую характеристику заготовки. Масса и отходы рассчитываются автоматически.'
|
|
74
74
|
});
|
|
75
75
|
exports.ErpEntityEditorGetInputShape = Object.assign(Object.assign({}, entityReferenceShape), { includeArchived: z.boolean().default(false) });
|
|
76
|
+
exports.ErpEntityEditorCreateInputShape = {
|
|
77
|
+
type: ai_mcp_schema_1.AiMcpEntityTypeZod,
|
|
78
|
+
entityName: z.string().trim().min(1).max(255),
|
|
79
|
+
entityDesignation: z.string().trim().min(1).max(255),
|
|
80
|
+
responsibleName: z.string().trim().min(1).max(255).optional(),
|
|
81
|
+
article: z.string().trim().max(255).optional(),
|
|
82
|
+
description: z.string().max(4000).default(''),
|
|
83
|
+
idempotencyKey: z
|
|
84
|
+
.string()
|
|
85
|
+
.trim()
|
|
86
|
+
.min(8)
|
|
87
|
+
.max(128)
|
|
88
|
+
.regex(/^[a-zA-Z0-9._:-]+$/)
|
|
89
|
+
};
|
|
90
|
+
exports.ErpEntityEditorCreateInputZod = z
|
|
91
|
+
.object(exports.ErpEntityEditorCreateInputShape)
|
|
92
|
+
.strict()
|
|
93
|
+
.refine(input => input.type === 'product' || input.article === undefined, {
|
|
94
|
+
message: 'Артикул можно указать только для изделия.'
|
|
95
|
+
});
|
|
76
96
|
exports.ErpEntityEditorUpdateInputShape = Object.assign(Object.assign({}, entityReferenceShape), { changes: z.object({
|
|
77
97
|
name: z.string().trim().min(1).max(255).optional(),
|
|
78
98
|
designation: z.string().trim().max(255).optional(),
|
|
@@ -17,6 +17,7 @@ export declare enum AiMcpOperationNameEnum {
|
|
|
17
17
|
archiveDocument = "archive-document",
|
|
18
18
|
restoreDocument = "restore-document",
|
|
19
19
|
updateEntityEditor = "update-entity-editor",
|
|
20
|
+
createEntityEditor = "create-entity-editor",
|
|
20
21
|
mutateTechnology = "mutate-technology",
|
|
21
22
|
createShipment = "create-shipment"
|
|
22
23
|
}
|
|
@@ -56,6 +56,7 @@ var AiMcpOperationNameEnum;
|
|
|
56
56
|
AiMcpOperationNameEnum["archiveDocument"] = "archive-document";
|
|
57
57
|
AiMcpOperationNameEnum["restoreDocument"] = "restore-document";
|
|
58
58
|
AiMcpOperationNameEnum["updateEntityEditor"] = "update-entity-editor";
|
|
59
|
+
AiMcpOperationNameEnum["createEntityEditor"] = "create-entity-editor";
|
|
59
60
|
AiMcpOperationNameEnum["mutateTechnology"] = "mutate-technology";
|
|
60
61
|
AiMcpOperationNameEnum["createShipment"] = "create-shipment";
|
|
61
62
|
})(AiMcpOperationNameEnum || (exports.AiMcpOperationNameEnum = AiMcpOperationNameEnum = {}));
|
|
@@ -71,6 +71,8 @@ export interface IWorkStartReadinessDelay {
|
|
|
71
71
|
workStartReadinessDelay?: number | null;
|
|
72
72
|
}
|
|
73
73
|
export interface IGetByOperation extends IWorkStartReadinessDelay {
|
|
74
|
+
parentProductionTaskId: number | null;
|
|
75
|
+
transferableQuantity: number;
|
|
74
76
|
productionTaskDueData: Date | null;
|
|
75
77
|
productionTaskId: number;
|
|
76
78
|
productionTaskDescription: string;
|
|
@@ -33,6 +33,7 @@ export declare const OrdersSummaryProductionTaskZod: z.ZodObject<{
|
|
|
33
33
|
export declare const OrdersSummaryShipmentZod: z.ZodObject<{
|
|
34
34
|
shipmentId: z.ZodNullable<z.ZodNumber>;
|
|
35
35
|
parentPTNumber: z.ZodNullable<z.ZodNumber>;
|
|
36
|
+
parentGlobalOrderIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
36
37
|
parentPTQuantity: z.ZodNullable<z.ZodNumber>;
|
|
37
38
|
parentPTNeed: z.ZodNullable<z.ZodNumber>;
|
|
38
39
|
parentWarehouseReadinessDate: z.ZodNullable<z.ZodUnion<[z.ZodDate, z.ZodString]>>;
|
|
@@ -54,6 +55,7 @@ export declare const OrdersSummaryShipmentZod: z.ZodObject<{
|
|
|
54
55
|
shipmentNumber: string | null;
|
|
55
56
|
shipmentWarehouseReadinessDate: string | Date | null;
|
|
56
57
|
shipmentReadinessDate: string | Date | null;
|
|
58
|
+
parentGlobalOrderIndex?: number | null | undefined;
|
|
57
59
|
}, {
|
|
58
60
|
quantity: number;
|
|
59
61
|
shipmentId: number | null;
|
|
@@ -66,6 +68,7 @@ export declare const OrdersSummaryShipmentZod: z.ZodObject<{
|
|
|
66
68
|
shipmentNumber: string | null;
|
|
67
69
|
shipmentWarehouseReadinessDate: string | Date | null;
|
|
68
70
|
shipmentReadinessDate: string | Date | null;
|
|
71
|
+
parentGlobalOrderIndex?: number | null | undefined;
|
|
69
72
|
}>;
|
|
70
73
|
export declare const OrdersSummaryStockOrderZod: z.ZodObject<{
|
|
71
74
|
stockOrderItemId: z.ZodNumber;
|
|
@@ -95,6 +98,7 @@ export declare const OrdersSummaryDemandRowZod: z.ZodObject<{
|
|
|
95
98
|
planReadyDate: z.ZodNullable<z.ZodUnion<[z.ZodDate, z.ZodString]>>;
|
|
96
99
|
shipmentId: z.ZodNullable<z.ZodNumber>;
|
|
97
100
|
parentPTNumber: z.ZodNullable<z.ZodNumber>;
|
|
101
|
+
parentGlobalOrderIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
98
102
|
parentPTQuantity: z.ZodNullable<z.ZodNumber>;
|
|
99
103
|
parentPTNeed: z.ZodNullable<z.ZodNumber>;
|
|
100
104
|
parentWarehouseReadinessDate: z.ZodNullable<z.ZodUnion<[z.ZodDate, z.ZodString]>>;
|
|
@@ -123,6 +127,7 @@ export declare const OrdersSummaryDemandRowZod: z.ZodObject<{
|
|
|
123
127
|
quantityByShipment: number | null;
|
|
124
128
|
shipmentNeed: number | null;
|
|
125
129
|
demandQuantity: number;
|
|
130
|
+
parentGlobalOrderIndex?: number | null | undefined;
|
|
126
131
|
}, {
|
|
127
132
|
productionTaskId: number | null;
|
|
128
133
|
shipmentId: number | null;
|
|
@@ -140,6 +145,7 @@ export declare const OrdersSummaryDemandRowZod: z.ZodObject<{
|
|
|
140
145
|
quantityByShipment: number | null;
|
|
141
146
|
shipmentNeed: number | null;
|
|
142
147
|
demandQuantity: number;
|
|
148
|
+
parentGlobalOrderIndex?: number | null | undefined;
|
|
143
149
|
}>;
|
|
144
150
|
export declare const OrdersSummaryByEntityRowZod: z.ZodObject<{
|
|
145
151
|
productionTaskId: z.ZodNullable<z.ZodNumber>;
|
|
@@ -152,6 +158,7 @@ export declare const OrdersSummaryByEntityRowZod: z.ZodObject<{
|
|
|
152
158
|
positionNumber: z.ZodNullable<z.ZodNumber>;
|
|
153
159
|
shipmentId: z.ZodNullable<z.ZodNumber>;
|
|
154
160
|
parentPTNumber: z.ZodNullable<z.ZodNumber>;
|
|
161
|
+
parentGlobalOrderIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
155
162
|
parentPTQuantity: z.ZodNullable<z.ZodNumber>;
|
|
156
163
|
parentPTNeed: z.ZodNullable<z.ZodNumber>;
|
|
157
164
|
parentWarehouseReadinessDate: z.ZodNullable<z.ZodUnion<[z.ZodDate, z.ZodString]>>;
|
|
@@ -201,6 +208,7 @@ export declare const OrdersSummaryByEntityRowZod: z.ZodObject<{
|
|
|
201
208
|
subtaskNumber?: number | null | undefined;
|
|
202
209
|
subtaskOrder?: number | undefined;
|
|
203
210
|
globalOrderIndex?: number | null | undefined;
|
|
211
|
+
parentGlobalOrderIndex?: number | null | undefined;
|
|
204
212
|
}, {
|
|
205
213
|
deficit: number;
|
|
206
214
|
warehouseReadinessDate: string | Date | null;
|
|
@@ -231,6 +239,7 @@ export declare const OrdersSummaryByEntityRowZod: z.ZodObject<{
|
|
|
231
239
|
subtaskNumber?: number | null | undefined;
|
|
232
240
|
subtaskOrder?: number | undefined;
|
|
233
241
|
globalOrderIndex?: number | null | undefined;
|
|
242
|
+
parentGlobalOrderIndex?: number | null | undefined;
|
|
234
243
|
}>;
|
|
235
244
|
export declare const OrdersSummaryByEntityResponseZod: z.ZodObject<{
|
|
236
245
|
rows: z.ZodArray<z.ZodObject<{
|
|
@@ -244,6 +253,7 @@ export declare const OrdersSummaryByEntityResponseZod: z.ZodObject<{
|
|
|
244
253
|
positionNumber: z.ZodNullable<z.ZodNumber>;
|
|
245
254
|
shipmentId: z.ZodNullable<z.ZodNumber>;
|
|
246
255
|
parentPTNumber: z.ZodNullable<z.ZodNumber>;
|
|
256
|
+
parentGlobalOrderIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
247
257
|
parentPTQuantity: z.ZodNullable<z.ZodNumber>;
|
|
248
258
|
parentPTNeed: z.ZodNullable<z.ZodNumber>;
|
|
249
259
|
parentWarehouseReadinessDate: z.ZodNullable<z.ZodUnion<[z.ZodDate, z.ZodString]>>;
|
|
@@ -293,6 +303,7 @@ export declare const OrdersSummaryByEntityResponseZod: z.ZodObject<{
|
|
|
293
303
|
subtaskNumber?: number | null | undefined;
|
|
294
304
|
subtaskOrder?: number | undefined;
|
|
295
305
|
globalOrderIndex?: number | null | undefined;
|
|
306
|
+
parentGlobalOrderIndex?: number | null | undefined;
|
|
296
307
|
}, {
|
|
297
308
|
deficit: number;
|
|
298
309
|
warehouseReadinessDate: string | Date | null;
|
|
@@ -323,6 +334,7 @@ export declare const OrdersSummaryByEntityResponseZod: z.ZodObject<{
|
|
|
323
334
|
subtaskNumber?: number | null | undefined;
|
|
324
335
|
subtaskOrder?: number | undefined;
|
|
325
336
|
globalOrderIndex?: number | null | undefined;
|
|
337
|
+
parentGlobalOrderIndex?: number | null | undefined;
|
|
326
338
|
}>, "many">;
|
|
327
339
|
totalOrderNeed: z.ZodNumber;
|
|
328
340
|
totalQuantityByStockOrder: z.ZodNumber;
|
|
@@ -360,6 +372,7 @@ export declare const OrdersSummaryByEntityResponseZod: z.ZodObject<{
|
|
|
360
372
|
subtaskNumber?: number | null | undefined;
|
|
361
373
|
subtaskOrder?: number | undefined;
|
|
362
374
|
globalOrderIndex?: number | null | undefined;
|
|
375
|
+
parentGlobalOrderIndex?: number | null | undefined;
|
|
363
376
|
}[];
|
|
364
377
|
totalOrderNeed: number;
|
|
365
378
|
totalQuantityByStockOrder: number;
|
|
@@ -397,6 +410,7 @@ export declare const OrdersSummaryByEntityResponseZod: z.ZodObject<{
|
|
|
397
410
|
subtaskNumber?: number | null | undefined;
|
|
398
411
|
subtaskOrder?: number | undefined;
|
|
399
412
|
globalOrderIndex?: number | null | undefined;
|
|
413
|
+
parentGlobalOrderIndex?: number | null | undefined;
|
|
400
414
|
}[];
|
|
401
415
|
totalOrderNeed: number;
|
|
402
416
|
totalQuantityByStockOrder: number;
|
|
@@ -17,6 +17,7 @@ exports.OrdersSummaryProductionTaskZod = zod_1.z.object({
|
|
|
17
17
|
exports.OrdersSummaryShipmentZod = zod_1.z.object({
|
|
18
18
|
shipmentId: zod_1.z.number().nullable(),
|
|
19
19
|
parentPTNumber: zod_1.z.number().nullable(),
|
|
20
|
+
parentGlobalOrderIndex: zod_1.z.number().int().nullish(),
|
|
20
21
|
parentPTQuantity: zod_1.z.number().nullable(),
|
|
21
22
|
parentPTNeed: zod_1.z.number().nullable(),
|
|
22
23
|
parentWarehouseReadinessDate: OrdersSummaryDateZod,
|
|
@@ -41,6 +42,7 @@ exports.OrdersSummaryDemandRowZod = zod_1.z.object({
|
|
|
41
42
|
planReadyDate: OrdersSummaryDateZod,
|
|
42
43
|
shipmentId: zod_1.z.number().nullable(),
|
|
43
44
|
parentPTNumber: zod_1.z.number().nullable(),
|
|
45
|
+
parentGlobalOrderIndex: zod_1.z.number().int().nullish(),
|
|
44
46
|
parentPTQuantity: zod_1.z.number().nullable(),
|
|
45
47
|
parentPTNeed: zod_1.z.number().nullable(),
|
|
46
48
|
parentWarehouseReadinessDate: OrdersSummaryDateZod,
|
|
@@ -64,6 +66,7 @@ exports.OrdersSummaryByEntityRowZod = zod_1.z.object({
|
|
|
64
66
|
positionNumber: zod_1.z.number().nullable(),
|
|
65
67
|
shipmentId: zod_1.z.number().nullable(),
|
|
66
68
|
parentPTNumber: zod_1.z.number().nullable(),
|
|
69
|
+
parentGlobalOrderIndex: zod_1.z.number().int().nullish(),
|
|
67
70
|
parentPTQuantity: zod_1.z.number().nullable(),
|
|
68
71
|
parentPTNeed: zod_1.z.number().nullable(),
|
|
69
72
|
parentWarehouseReadinessDate: OrdersSummaryDateZod,
|