@pksep/zod-shared 0.0.560 → 0.0.561
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 +2 -0
- package/dist/{library → ai-mcp}/index.js +2 -5
- package/dist/ai-mcp/interfaces/ai-mcp.interface.d.ts +358 -0
- package/dist/ai-mcp/schemas/ai-mcp-entity-editor.schema.d.ts +130 -0
- package/dist/ai-mcp/schemas/ai-mcp-entity-editor.schema.js +118 -0
- package/dist/ai-mcp/schemas/ai-mcp-specification.schema.d.ts +123 -0
- package/dist/ai-mcp/schemas/ai-mcp-specification.schema.js +110 -0
- package/dist/ai-mcp/schemas/ai-mcp.schema.d.ts +384 -0
- package/dist/ai-mcp/schemas/ai-mcp.schema.js +210 -0
- package/dist/assemble/dto/get-assemble-operation-count.dto.d.ts +28 -0
- package/dist/assemble/dto/set-date-shipment.dto.d.ts +2 -2
- package/dist/assemble/interfaces/interfaces.d.ts +8 -0
- package/dist/assemble/schemas/assemble-coming.schema.d.ts +20 -0
- package/dist/assemble/schemas/assemble.schema.d.ts +20 -0
- package/dist/cbed/dto/up-create-cbed.dto.d.ts +3 -0
- package/dist/cbed/dto/up-create-cbed.dto.js +1 -0
- package/dist/deliveries/dto/create-deliveries.dto.d.ts +6 -6
- package/dist/detal/dto/archive-detal.dto.d.ts +17 -0
- package/dist/detal/dto/archive-detal.dto.js +10 -0
- package/dist/detal/dto/update-detal.dto.d.ts +342 -17
- package/dist/detal/dto/update-detal.dto.js +88 -27
- package/dist/detal/index.d.ts +1 -0
- package/dist/detal/index.js +1 -0
- package/dist/document/dto/entity-document-command.dto.d.ts +184 -0
- package/dist/document/dto/entity-document-command.dto.js +59 -0
- package/dist/document/index.d.ts +2 -0
- package/dist/document/index.js +2 -0
- package/dist/document/interfaces/entity-document.interface.d.ts +30 -0
- package/dist/excel-export/excel-export.dto.d.ts +1666 -0
- package/dist/excel-export/excel-export.dto.js +237 -0
- package/dist/excel-export/index.d.ts +1 -0
- package/dist/{issue → excel-export}/index.js +1 -5
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/marks/type/type.d.ts +4 -4
- package/dist/material/dto/create-material.dto.d.ts +3 -0
- package/dist/material/dto/create-material.dto.js +2 -1
- package/dist/product/dto/up-create-product.dto.d.ts +3 -0
- package/dist/product/dto/up-create-product.dto.js +1 -0
- package/dist/production-tasks/dto/change-due-date.dto.d.ts +2 -2
- package/dist/production-tasks/dto/get-production-task-display-numbers.dto.d.ts +20 -0
- package/dist/production-tasks/dto/get-production-task-display-numbers.dto.js +11 -0
- package/dist/production-tasks/dto/plan-production-task.dto.d.ts +34 -0
- package/dist/production-tasks/dto/plan-production-task.dto.js +21 -2
- package/dist/production-tasks/dto/split-production-task.dto.d.ts +203 -0
- package/dist/production-tasks/dto/split-production-task.dto.js +71 -0
- package/dist/production-tasks/dto/update.dto.d.ts +2 -2
- package/dist/production-tasks/dto/workload-by-entity.dto.d.ts +2 -2
- package/dist/production-tasks/enums/production-tasks.d.ts +10 -0
- package/dist/production-tasks/enums/production-tasks.js +12 -1
- package/dist/production-tasks/index.d.ts +3 -0
- package/dist/production-tasks/index.js +3 -0
- package/dist/production-tasks/interfaces/production-tasks.d.ts +4 -0
- package/dist/production-tasks/methods/methods.d.ts +9 -0
- package/dist/production-tasks/methods/methods.js +16 -1
- package/dist/production-tasks/schemas/orders-summary-by-entity.schema.d.ts +55 -8
- package/dist/production-tasks/schemas/orders-summary-by-entity.schema.js +9 -0
- package/dist/production-tasks/schemas/production-task-subtask.schema.d.ts +81 -0
- package/dist/production-tasks/schemas/production-task.schema.d.ts +14 -0
- package/dist/production-tasks/schemas/production-task.schema.js +4 -0
- package/dist/specification/dto/mutate-specification.dto.d.ts +58 -0
- package/dist/specification/dto/mutate-specification.dto.js +65 -0
- package/dist/specification/index.d.ts +1 -0
- package/dist/specification/index.js +1 -0
- package/dist/specification/interface/interface.d.ts +17 -0
- package/dist/utils/methods/sequelize.d.ts +2 -0
- package/dist/utils/methods/sequelize.js +4 -1
- package/dist/utils/methods.js +30 -10
- package/dist/utils/tables-config/enum.d.ts +5 -0
- package/dist/utils/tables-config/enum.js +10 -0
- package/dist/utils/types/types.d.ts +10 -1
- package/dist/utils/validation/transform.d.ts +2 -0
- package/dist/utils/validation/transform.js +25 -1
- package/package.json +38 -38
- package/dist/issue/dto/up-create-issue.dto.d.ts +0 -49
- package/dist/issue/dto/up-create-issue.dto.js +0 -21
- package/dist/issue/index.d.ts +0 -5
- package/dist/issue/interfaces/interface.d.ts +0 -4
- package/dist/issue/schemas/issue-user-controller.schema.d.ts +0 -15
- package/dist/issue/schemas/issue-user-controller.schema.js +0 -9
- package/dist/issue/schemas/issue-user.schema.d.ts +0 -15
- package/dist/issue/schemas/issue-user.schema.js +0 -9
- package/dist/issue/schemas/issue.schema.d.ts +0 -51
- package/dist/issue/schemas/issue.schema.js +0 -21
- package/dist/library/dto/create-chapter.dto.d.ts +0 -12
- package/dist/library/dto/create-chapter.dto.js +0 -8
- package/dist/library/dto/create-link.dto.d.ts +0 -30
- package/dist/library/dto/create-link.dto.js +0 -14
- package/dist/library/index.d.ts +0 -5
- package/dist/library/interfaces/interface.d.ts +0 -3
- package/dist/library/schemas/links-user.schema.d.ts +0 -15
- package/dist/library/schemas/links-user.schema.js +0 -9
- package/dist/library/schemas/links.schema.d.ts +0 -30
- package/dist/library/schemas/links.schema.js +0 -14
- package/dist/production-tasks/dto/update-marks.dto.d.ts +0 -13
- package/dist/production-tasks/dto/update-marks.dto.js +0 -8
- package/dist/production-tasks/dto/update-responsible.dto.d.ts +0 -12
- package/dist/production-tasks/dto/update-responsible.dto.js +0 -8
- package/dist/production-tasks/dto/update-status.dto.d.ts +0 -13
- package/dist/production-tasks/dto/update-status.dto.js +0 -9
- package/dist/shipments/dto/change-date-urgency.dto.d.ts +0 -12
- package/dist/shipments/dto/change-date-urgency.dto.js +0 -8
- package/dist/tech-process/schemas/tech-process-with-options.schema.d.ts +0 -306
- package/dist/tech-process/schemas/tech-process-with-options.schema.js +0 -8
- package/dist/utils/interface/mat.interface.d.ts +0 -10
- /package/dist/{issue/interfaces/interface.js → ai-mcp/interfaces/ai-mcp.interface.js} +0 -0
- /package/dist/{library/interfaces/interface.js → document/interfaces/entity-document.interface.js} +0 -0
- /package/dist/{utils/interface/mat.interface.js → production-tasks/schemas/production-task-subtask.schema.js} +0 -0
|
@@ -14,8 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./schemas/
|
|
18
|
-
__exportStar(require("./
|
|
19
|
-
__exportStar(require("./interfaces/interface"), exports);
|
|
20
|
-
__exportStar(require("./dto/create-chapter.dto"), exports);
|
|
21
|
-
__exportStar(require("./dto/create-link.dto"), exports);
|
|
17
|
+
__exportStar(require("./schemas/ai-mcp.schema"), exports);
|
|
18
|
+
__exportStar(require("./interfaces/ai-mcp.interface"), exports);
|
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
import { EntityCommonSpecificationArray, ProductionTimeType, UnitsEnum } from '../../utils';
|
|
2
|
+
import { AiMcpCommandStatusEnum, AiMcpOperationNameEnum, AiMcpOperationStatusEnum, ErpProductSpecificationKindEnum, ErpProductSpecificationViewEnum, ErpProductStateEnum, ErpProductTechnologyStateEnum, TErpEntityFilesListInput } from '../schemas/ai-mcp.schema';
|
|
3
|
+
import { TAiMcpEntityType } from '../schemas/ai-mcp.schema';
|
|
4
|
+
export interface IAiMcpAuthContext {
|
|
5
|
+
actorUserId?: number;
|
|
6
|
+
clientId: string;
|
|
7
|
+
correlationId: string;
|
|
8
|
+
}
|
|
9
|
+
export interface IErpEntitySearchItem {
|
|
10
|
+
id: number;
|
|
11
|
+
type: TAiMcpEntityType;
|
|
12
|
+
name: string;
|
|
13
|
+
designation: string | null;
|
|
14
|
+
article: string | null;
|
|
15
|
+
description: string | null;
|
|
16
|
+
discontinued: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface IErpEntitySearchInput {
|
|
19
|
+
query: string;
|
|
20
|
+
types?: TAiMcpEntityType[];
|
|
21
|
+
limit?: number;
|
|
22
|
+
}
|
|
23
|
+
export interface IErpEntityCard extends IErpEntitySearchItem {
|
|
24
|
+
responsibleId: number | null;
|
|
25
|
+
quantity: number;
|
|
26
|
+
minRemaining: number;
|
|
27
|
+
deficit: number;
|
|
28
|
+
shipmentsDeficit: number;
|
|
29
|
+
productionOrdered: number;
|
|
30
|
+
calculateNeedsTime: Date | string | null;
|
|
31
|
+
}
|
|
32
|
+
export interface IErpEntitySearchResult {
|
|
33
|
+
query: string;
|
|
34
|
+
count: number;
|
|
35
|
+
dataAsOf: string;
|
|
36
|
+
items: IErpEntitySearchItem[];
|
|
37
|
+
}
|
|
38
|
+
export interface IErpEntityCardResult {
|
|
39
|
+
dataAsOf: string;
|
|
40
|
+
item: IErpEntityCard;
|
|
41
|
+
}
|
|
42
|
+
export interface IAiMcpEntityRow {
|
|
43
|
+
id: number;
|
|
44
|
+
name: string;
|
|
45
|
+
designation?: string | null;
|
|
46
|
+
articl?: string | null;
|
|
47
|
+
description?: string | null;
|
|
48
|
+
discontinued?: boolean;
|
|
49
|
+
responsibleId?: number | null;
|
|
50
|
+
quantity?: number;
|
|
51
|
+
min_remaining?: number;
|
|
52
|
+
deficit?: number;
|
|
53
|
+
shipments_deficit?: number;
|
|
54
|
+
production_ordered?: number;
|
|
55
|
+
calculate_needs_time?: Date | string | null;
|
|
56
|
+
}
|
|
57
|
+
export interface IAiMcpCommandContext extends IAiMcpAuthContext {
|
|
58
|
+
}
|
|
59
|
+
export interface IAiMcpOperationAttributes {
|
|
60
|
+
id: number;
|
|
61
|
+
clientId: string;
|
|
62
|
+
idempotencyKey: string;
|
|
63
|
+
operation: AiMcpOperationNameEnum;
|
|
64
|
+
requestHash: string;
|
|
65
|
+
status: AiMcpOperationStatusEnum;
|
|
66
|
+
result: TAiMcpOperationResult | null;
|
|
67
|
+
}
|
|
68
|
+
export type TAiMcpOperationCreationAttributes = Omit<IAiMcpOperationAttributes, 'id' | 'status' | 'result'> & Partial<Pick<IAiMcpOperationAttributes, 'id' | 'status' | 'result'>>;
|
|
69
|
+
export interface ICreateDetailAndAddToCbedResult {
|
|
70
|
+
created: true;
|
|
71
|
+
replayed: boolean;
|
|
72
|
+
detail: {
|
|
73
|
+
name: string;
|
|
74
|
+
designation: string;
|
|
75
|
+
};
|
|
76
|
+
assembly: {
|
|
77
|
+
name: string;
|
|
78
|
+
designation: string | null;
|
|
79
|
+
};
|
|
80
|
+
specification: {
|
|
81
|
+
quantity: number;
|
|
82
|
+
unit: UnitsEnum.pc;
|
|
83
|
+
position: number | null;
|
|
84
|
+
};
|
|
85
|
+
message: string;
|
|
86
|
+
}
|
|
87
|
+
export interface IArchiveDetailResult {
|
|
88
|
+
accepted: true;
|
|
89
|
+
replayed: boolean;
|
|
90
|
+
status: AiMcpCommandStatusEnum.queued;
|
|
91
|
+
detail: {
|
|
92
|
+
name: string;
|
|
93
|
+
designation: string | null;
|
|
94
|
+
};
|
|
95
|
+
message: string;
|
|
96
|
+
}
|
|
97
|
+
export interface IErpFileItem {
|
|
98
|
+
id: number;
|
|
99
|
+
name: string;
|
|
100
|
+
type: string | null;
|
|
101
|
+
description: string | null;
|
|
102
|
+
version: number;
|
|
103
|
+
archived: boolean;
|
|
104
|
+
main: boolean;
|
|
105
|
+
}
|
|
106
|
+
export interface IErpEntityFilesResult {
|
|
107
|
+
dataAsOf: string;
|
|
108
|
+
entity: {
|
|
109
|
+
id: number;
|
|
110
|
+
type: TErpEntityFilesListInput['entityType'];
|
|
111
|
+
name: string;
|
|
112
|
+
designation: string | null;
|
|
113
|
+
};
|
|
114
|
+
count: number;
|
|
115
|
+
items: IErpFileItem[];
|
|
116
|
+
}
|
|
117
|
+
export interface IErpFilesSearchResult {
|
|
118
|
+
query: string;
|
|
119
|
+
count: number;
|
|
120
|
+
dataAsOf: string;
|
|
121
|
+
items: IErpFileItem[];
|
|
122
|
+
}
|
|
123
|
+
export interface IErpDocumentActionResult {
|
|
124
|
+
changed: boolean;
|
|
125
|
+
replayed: boolean;
|
|
126
|
+
document: IErpFileItem;
|
|
127
|
+
entity?: {
|
|
128
|
+
type: TAiMcpEntityType;
|
|
129
|
+
name: string;
|
|
130
|
+
designation: string | null;
|
|
131
|
+
};
|
|
132
|
+
message: string;
|
|
133
|
+
}
|
|
134
|
+
export interface IErpProductSearchInput {
|
|
135
|
+
query?: string;
|
|
136
|
+
state?: ErpProductStateEnum;
|
|
137
|
+
responsibleQuery?: string;
|
|
138
|
+
attention?: boolean;
|
|
139
|
+
technology?: ErpProductTechnologyStateEnum;
|
|
140
|
+
limit?: number;
|
|
141
|
+
offset?: number;
|
|
142
|
+
}
|
|
143
|
+
export interface IErpProductSpecificationInput {
|
|
144
|
+
id: number;
|
|
145
|
+
view?: ErpProductSpecificationViewEnum;
|
|
146
|
+
maxDepth?: number;
|
|
147
|
+
maxNodes?: number;
|
|
148
|
+
includeArchived?: boolean;
|
|
149
|
+
}
|
|
150
|
+
export interface IErpProductProductionStateInput {
|
|
151
|
+
id: number;
|
|
152
|
+
includeClosed?: boolean;
|
|
153
|
+
limit?: number;
|
|
154
|
+
offset?: number;
|
|
155
|
+
}
|
|
156
|
+
export interface IErpProductHistoryInput {
|
|
157
|
+
id: number;
|
|
158
|
+
limit?: number;
|
|
159
|
+
offset?: number;
|
|
160
|
+
}
|
|
161
|
+
export interface IErpProductSearchItem {
|
|
162
|
+
id: number;
|
|
163
|
+
name: string;
|
|
164
|
+
designation: string | null;
|
|
165
|
+
article: string | null;
|
|
166
|
+
description: string | null;
|
|
167
|
+
responsibleName: string | null;
|
|
168
|
+
attention: boolean;
|
|
169
|
+
discontinued: boolean;
|
|
170
|
+
archived: boolean;
|
|
171
|
+
createdAt: Date | string | null;
|
|
172
|
+
updatedAt: Date | string | null;
|
|
173
|
+
}
|
|
174
|
+
export interface IErpProductSearchResult {
|
|
175
|
+
query: string;
|
|
176
|
+
count: number;
|
|
177
|
+
limit: number;
|
|
178
|
+
offset: number;
|
|
179
|
+
dataAsOf: string;
|
|
180
|
+
items: IErpProductSearchItem[];
|
|
181
|
+
}
|
|
182
|
+
export interface IErpProductVariable {
|
|
183
|
+
name: string;
|
|
184
|
+
unit: string;
|
|
185
|
+
value: string | number;
|
|
186
|
+
}
|
|
187
|
+
export interface IErpProductCardResult {
|
|
188
|
+
dataAsOf: string;
|
|
189
|
+
item: IErpProductSearchItem & {
|
|
190
|
+
custom: boolean;
|
|
191
|
+
characteristics: IErpProductVariable[];
|
|
192
|
+
parameters: IErpProductVariable[];
|
|
193
|
+
inventory: {
|
|
194
|
+
quantity: number;
|
|
195
|
+
minimumRemaining: number;
|
|
196
|
+
recommendedRemaining: number | null;
|
|
197
|
+
deficit: number;
|
|
198
|
+
shipmentDeficit: number;
|
|
199
|
+
shipmentDemand: number;
|
|
200
|
+
productionOrdered: number;
|
|
201
|
+
inKits: number;
|
|
202
|
+
};
|
|
203
|
+
productionTime: {
|
|
204
|
+
assembly: ProductionTimeType | null;
|
|
205
|
+
metalworking: ProductionTimeType | null;
|
|
206
|
+
};
|
|
207
|
+
calculatedNeedsAt: Date | string | null;
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
export interface IErpProductSpecificationNode {
|
|
211
|
+
id: number;
|
|
212
|
+
kind: ErpProductSpecificationKindEnum;
|
|
213
|
+
name: string;
|
|
214
|
+
designation: string | null;
|
|
215
|
+
quantity: number;
|
|
216
|
+
measureId: number | null;
|
|
217
|
+
discontinued: boolean;
|
|
218
|
+
archived: boolean;
|
|
219
|
+
cycle?: boolean;
|
|
220
|
+
children?: IErpProductSpecificationNode[];
|
|
221
|
+
}
|
|
222
|
+
export interface IErpProductSpecificationResult {
|
|
223
|
+
dataAsOf: string;
|
|
224
|
+
product: {
|
|
225
|
+
id: number;
|
|
226
|
+
name: string;
|
|
227
|
+
designation: string | null;
|
|
228
|
+
};
|
|
229
|
+
view: ErpProductSpecificationViewEnum;
|
|
230
|
+
truncated: boolean;
|
|
231
|
+
direct: Record<ErpProductSpecificationKindEnum, IErpProductSpecificationNode[]>;
|
|
232
|
+
tree?: IErpProductSpecificationNode[];
|
|
233
|
+
}
|
|
234
|
+
export interface IErpProductProductionStateResult {
|
|
235
|
+
dataAsOf: string;
|
|
236
|
+
product: {
|
|
237
|
+
id: number;
|
|
238
|
+
name: string;
|
|
239
|
+
designation: string | null;
|
|
240
|
+
};
|
|
241
|
+
inventory: {
|
|
242
|
+
quantity: number;
|
|
243
|
+
minimumRemaining: number;
|
|
244
|
+
deficit: number;
|
|
245
|
+
shipmentDeficit: number;
|
|
246
|
+
shipmentDemand: number;
|
|
247
|
+
productionOrdered: number;
|
|
248
|
+
calculatedNeedsAt: Date | string | null;
|
|
249
|
+
};
|
|
250
|
+
shipments: {
|
|
251
|
+
count: number;
|
|
252
|
+
items: Array<{
|
|
253
|
+
number: string | null;
|
|
254
|
+
status: string | null;
|
|
255
|
+
orderedAt: Date | string | null;
|
|
256
|
+
shipmentAt: Date | string | null;
|
|
257
|
+
warehouseReadinessAt: Date | string | null;
|
|
258
|
+
quantity: number;
|
|
259
|
+
shipped: number;
|
|
260
|
+
customerName: string | null;
|
|
261
|
+
managerName: string | null;
|
|
262
|
+
description: string | null;
|
|
263
|
+
}>;
|
|
264
|
+
};
|
|
265
|
+
stockOrders: {
|
|
266
|
+
count: number;
|
|
267
|
+
items: Array<{
|
|
268
|
+
number: string | null;
|
|
269
|
+
orderedAt: Date | string | null;
|
|
270
|
+
closingAt: Date | string | null;
|
|
271
|
+
requested: number;
|
|
272
|
+
created: number;
|
|
273
|
+
remaining: number;
|
|
274
|
+
description: string | null;
|
|
275
|
+
}>;
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
export interface IErpProductTechnologyResult {
|
|
279
|
+
dataAsOf: string;
|
|
280
|
+
product: {
|
|
281
|
+
id: number;
|
|
282
|
+
name: string;
|
|
283
|
+
designation: string | null;
|
|
284
|
+
};
|
|
285
|
+
configured: boolean;
|
|
286
|
+
description: string | null;
|
|
287
|
+
operations: Array<{
|
|
288
|
+
order: number;
|
|
289
|
+
name: string;
|
|
290
|
+
description: string | null;
|
|
291
|
+
preparationTime: number;
|
|
292
|
+
helperTime: number;
|
|
293
|
+
mainTime: number;
|
|
294
|
+
totalTime: string | null;
|
|
295
|
+
equipment: string | null;
|
|
296
|
+
instrument: string | null;
|
|
297
|
+
}>;
|
|
298
|
+
}
|
|
299
|
+
export interface IErpProductHistoryResult {
|
|
300
|
+
dataAsOf: string;
|
|
301
|
+
product: {
|
|
302
|
+
id: number;
|
|
303
|
+
name: string;
|
|
304
|
+
designation: string | null;
|
|
305
|
+
};
|
|
306
|
+
count: number;
|
|
307
|
+
limit: number;
|
|
308
|
+
offset: number;
|
|
309
|
+
items: Array<{
|
|
310
|
+
occurredAt: Date | string | null;
|
|
311
|
+
actorName: string | null;
|
|
312
|
+
changes: string[];
|
|
313
|
+
}>;
|
|
314
|
+
}
|
|
315
|
+
export interface IAiMcpProductRow {
|
|
316
|
+
id: number;
|
|
317
|
+
name: string;
|
|
318
|
+
designation?: string | null;
|
|
319
|
+
articl?: string | null;
|
|
320
|
+
description?: string | null;
|
|
321
|
+
responsibleId?: number | null;
|
|
322
|
+
attention?: boolean;
|
|
323
|
+
discontinued?: boolean;
|
|
324
|
+
ban?: boolean;
|
|
325
|
+
is_custom?: boolean;
|
|
326
|
+
characteristic?: IAiMcpVariableRow[] | null;
|
|
327
|
+
parametrs?: IAiMcpVariableRow[] | null;
|
|
328
|
+
listCbed?: EntityCommonSpecificationArray | null;
|
|
329
|
+
listDetal?: EntityCommonSpecificationArray | null;
|
|
330
|
+
listPokDet?: EntityCommonSpecificationArray | null;
|
|
331
|
+
materialList?: EntityCommonSpecificationArray | null;
|
|
332
|
+
quantity?: number;
|
|
333
|
+
min_remaining?: number;
|
|
334
|
+
deficit?: number;
|
|
335
|
+
shipments_deficit?: number;
|
|
336
|
+
shipments_kolvo?: number;
|
|
337
|
+
production_ordered?: number;
|
|
338
|
+
in_kit?: number;
|
|
339
|
+
production_time_assemble?: ProductionTimeType | null;
|
|
340
|
+
production_time_metalloworking?: ProductionTimeType | null;
|
|
341
|
+
calculate_needs_time?: Date | string | null;
|
|
342
|
+
createdAt?: Date | string | null;
|
|
343
|
+
updatedAt?: Date | string | null;
|
|
344
|
+
}
|
|
345
|
+
export interface IAiMcpVariableRow {
|
|
346
|
+
name?: string | null;
|
|
347
|
+
ez?: string | null;
|
|
348
|
+
znach?: string | number | null;
|
|
349
|
+
}
|
|
350
|
+
export interface IAiMcpComponentRow extends IAiMcpProductRow {
|
|
351
|
+
units_measurement?: object | null;
|
|
352
|
+
}
|
|
353
|
+
export interface IAiMcpUserRow {
|
|
354
|
+
id: number;
|
|
355
|
+
login?: string | null;
|
|
356
|
+
initial?: string | null;
|
|
357
|
+
}
|
|
358
|
+
export type TAiMcpOperationResult = ICreateDetailAndAddToCbedResult | IArchiveDetailResult | IErpDocumentActionResult;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
export declare const ErpEntityEditorGetInputShape: {
|
|
3
|
+
includeArchived: z.ZodDefault<z.ZodBoolean>;
|
|
4
|
+
type: z.ZodEnum<{
|
|
5
|
+
product: import("../..").IzdType.product;
|
|
6
|
+
cbed: import("../..").IzdType.cbed;
|
|
7
|
+
detal: import("../..").IzdType.detal;
|
|
8
|
+
}>;
|
|
9
|
+
entityName: z.ZodOptional<z.ZodString>;
|
|
10
|
+
entityDesignation: z.ZodOptional<z.ZodString>;
|
|
11
|
+
};
|
|
12
|
+
export declare const ErpEntityEditorUpdateInputShape: {
|
|
13
|
+
changes: z.ZodObject<{
|
|
14
|
+
name: z.ZodOptional<z.ZodString>;
|
|
15
|
+
designation: z.ZodOptional<z.ZodString>;
|
|
16
|
+
article: z.ZodOptional<z.ZodString>;
|
|
17
|
+
responsibleName: z.ZodOptional<z.ZodString>;
|
|
18
|
+
description: z.ZodOptional<z.ZodString>;
|
|
19
|
+
attention: z.ZodOptional<z.ZodBoolean>;
|
|
20
|
+
custom: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
+
discontinued: z.ZodOptional<z.ZodBoolean>;
|
|
22
|
+
parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
23
|
+
name: z.ZodString;
|
|
24
|
+
unit: z.ZodString;
|
|
25
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
26
|
+
}, z.core.$strip>>>;
|
|
27
|
+
characteristics: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
28
|
+
name: z.ZodString;
|
|
29
|
+
unit: z.ZodString;
|
|
30
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
31
|
+
}, z.core.$strip>>>;
|
|
32
|
+
detailProductionTimes: z.ZodOptional<z.ZodObject<{
|
|
33
|
+
preparation: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
34
|
+
helper: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
35
|
+
main: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
36
|
+
}, z.core.$strip>>;
|
|
37
|
+
workpieceCharacteristics: z.ZodOptional<z.ZodObject<{
|
|
38
|
+
diameter: z.ZodNumber;
|
|
39
|
+
billetLength: z.ZodNumber;
|
|
40
|
+
length: z.ZodNumber;
|
|
41
|
+
width: z.ZodNumber;
|
|
42
|
+
height: z.ZodNumber;
|
|
43
|
+
wallThickness: z.ZodNumber;
|
|
44
|
+
outsideDiameter: z.ZodNumber;
|
|
45
|
+
thickness: z.ZodNumber;
|
|
46
|
+
crossSectionArea: z.ZodNumber;
|
|
47
|
+
acrossFlats: z.ZodNumber;
|
|
48
|
+
massPerMeter: z.ZodNumber;
|
|
49
|
+
density: z.ZodNumber;
|
|
50
|
+
mass: z.ZodNumber;
|
|
51
|
+
waste: z.ZodNumber;
|
|
52
|
+
}, z.core.$strip>>;
|
|
53
|
+
mainMaterialName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
54
|
+
replacementMaterialName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
idempotencyKey: z.ZodString;
|
|
57
|
+
type: z.ZodEnum<{
|
|
58
|
+
product: import("../..").IzdType.product;
|
|
59
|
+
cbed: import("../..").IzdType.cbed;
|
|
60
|
+
detal: import("../..").IzdType.detal;
|
|
61
|
+
}>;
|
|
62
|
+
entityName: z.ZodOptional<z.ZodString>;
|
|
63
|
+
entityDesignation: z.ZodOptional<z.ZodString>;
|
|
64
|
+
};
|
|
65
|
+
export declare const ErpEntityEditorGetInputZod: z.ZodObject<{
|
|
66
|
+
includeArchived: z.ZodDefault<z.ZodBoolean>;
|
|
67
|
+
type: z.ZodEnum<{
|
|
68
|
+
product: import("../..").IzdType.product;
|
|
69
|
+
cbed: import("../..").IzdType.cbed;
|
|
70
|
+
detal: import("../..").IzdType.detal;
|
|
71
|
+
}>;
|
|
72
|
+
entityName: z.ZodOptional<z.ZodString>;
|
|
73
|
+
entityDesignation: z.ZodOptional<z.ZodString>;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
export declare const ErpEntityEditorUpdateInputZod: z.ZodObject<{
|
|
76
|
+
changes: z.ZodObject<{
|
|
77
|
+
name: z.ZodOptional<z.ZodString>;
|
|
78
|
+
designation: z.ZodOptional<z.ZodString>;
|
|
79
|
+
article: z.ZodOptional<z.ZodString>;
|
|
80
|
+
responsibleName: z.ZodOptional<z.ZodString>;
|
|
81
|
+
description: z.ZodOptional<z.ZodString>;
|
|
82
|
+
attention: z.ZodOptional<z.ZodBoolean>;
|
|
83
|
+
custom: z.ZodOptional<z.ZodBoolean>;
|
|
84
|
+
discontinued: z.ZodOptional<z.ZodBoolean>;
|
|
85
|
+
parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
86
|
+
name: z.ZodString;
|
|
87
|
+
unit: z.ZodString;
|
|
88
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
89
|
+
}, z.core.$strip>>>;
|
|
90
|
+
characteristics: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
91
|
+
name: z.ZodString;
|
|
92
|
+
unit: z.ZodString;
|
|
93
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
94
|
+
}, z.core.$strip>>>;
|
|
95
|
+
detailProductionTimes: z.ZodOptional<z.ZodObject<{
|
|
96
|
+
preparation: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
97
|
+
helper: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
98
|
+
main: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
99
|
+
}, z.core.$strip>>;
|
|
100
|
+
workpieceCharacteristics: z.ZodOptional<z.ZodObject<{
|
|
101
|
+
diameter: z.ZodNumber;
|
|
102
|
+
billetLength: z.ZodNumber;
|
|
103
|
+
length: z.ZodNumber;
|
|
104
|
+
width: z.ZodNumber;
|
|
105
|
+
height: z.ZodNumber;
|
|
106
|
+
wallThickness: z.ZodNumber;
|
|
107
|
+
outsideDiameter: z.ZodNumber;
|
|
108
|
+
thickness: z.ZodNumber;
|
|
109
|
+
crossSectionArea: z.ZodNumber;
|
|
110
|
+
acrossFlats: z.ZodNumber;
|
|
111
|
+
massPerMeter: z.ZodNumber;
|
|
112
|
+
density: z.ZodNumber;
|
|
113
|
+
mass: z.ZodNumber;
|
|
114
|
+
waste: z.ZodNumber;
|
|
115
|
+
}, z.core.$strip>>;
|
|
116
|
+
mainMaterialName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
117
|
+
replacementMaterialName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
118
|
+
}, z.core.$strip>;
|
|
119
|
+
idempotencyKey: z.ZodString;
|
|
120
|
+
type: z.ZodEnum<{
|
|
121
|
+
product: import("../..").IzdType.product;
|
|
122
|
+
cbed: import("../..").IzdType.cbed;
|
|
123
|
+
detal: import("../..").IzdType.detal;
|
|
124
|
+
}>;
|
|
125
|
+
entityName: z.ZodOptional<z.ZodString>;
|
|
126
|
+
entityDesignation: z.ZodOptional<z.ZodString>;
|
|
127
|
+
}, z.core.$strip>;
|
|
128
|
+
export type TErpEntityEditorGetInput = z.infer<typeof ErpEntityEditorGetInputZod>;
|
|
129
|
+
export type TErpEntityEditorUpdateInput = z.infer<typeof ErpEntityEditorUpdateInputZod>;
|
|
130
|
+
export type TErpEntityEditorChanges = TErpEntityEditorUpdateInput['changes'];
|
|
@@ -0,0 +1,118 @@
|
|
|
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.ErpEntityEditorUpdateInputZod = exports.ErpEntityEditorGetInputZod = exports.ErpEntityEditorUpdateInputShape = exports.ErpEntityEditorGetInputShape = void 0;
|
|
37
|
+
const z = __importStar(require("zod/v4"));
|
|
38
|
+
const ai_mcp_schema_1 = require("./ai-mcp.schema");
|
|
39
|
+
const entityReferenceShape = {
|
|
40
|
+
type: ai_mcp_schema_1.AiMcpEntityTypeZod,
|
|
41
|
+
entityName: z.string().trim().min(1).max(255).optional(),
|
|
42
|
+
entityDesignation: z.string().trim().min(1).max(255).optional()
|
|
43
|
+
};
|
|
44
|
+
const editableVariableZod = z.object({
|
|
45
|
+
name: z.string().trim().min(1).max(255),
|
|
46
|
+
unit: z.string().trim().max(50),
|
|
47
|
+
value: z.union([z.string().max(1000), z.number()])
|
|
48
|
+
});
|
|
49
|
+
const detailProductionTimesZod = z.object({
|
|
50
|
+
preparation: z.union([z.string().max(100), z.number()]),
|
|
51
|
+
helper: z.union([z.string().max(100), z.number()]),
|
|
52
|
+
main: z.union([z.string().max(100), z.number()])
|
|
53
|
+
});
|
|
54
|
+
const detailWorkpieceCharacteristicsZod = z.object({
|
|
55
|
+
diameter: z.number(),
|
|
56
|
+
billetLength: z.number(),
|
|
57
|
+
length: z.number(),
|
|
58
|
+
width: z.number(),
|
|
59
|
+
height: z.number(),
|
|
60
|
+
wallThickness: z.number(),
|
|
61
|
+
outsideDiameter: z.number(),
|
|
62
|
+
thickness: z.number(),
|
|
63
|
+
crossSectionArea: z.number(),
|
|
64
|
+
acrossFlats: z.number(),
|
|
65
|
+
massPerMeter: z.number(),
|
|
66
|
+
density: z.number(),
|
|
67
|
+
mass: z.number(),
|
|
68
|
+
waste: z.number()
|
|
69
|
+
});
|
|
70
|
+
exports.ErpEntityEditorGetInputShape = Object.assign(Object.assign({}, entityReferenceShape), { includeArchived: z.boolean().default(false) });
|
|
71
|
+
exports.ErpEntityEditorUpdateInputShape = Object.assign(Object.assign({}, entityReferenceShape), { changes: z.object({
|
|
72
|
+
name: z.string().trim().min(1).max(255).optional(),
|
|
73
|
+
designation: z.string().trim().max(255).optional(),
|
|
74
|
+
article: z.string().trim().max(255).optional(),
|
|
75
|
+
responsibleName: z.string().trim().min(1).max(255).optional(),
|
|
76
|
+
description: z.string().max(4000).optional(),
|
|
77
|
+
attention: z.boolean().optional(),
|
|
78
|
+
custom: z.boolean().optional(),
|
|
79
|
+
discontinued: z.boolean().optional(),
|
|
80
|
+
parameters: z.array(editableVariableZod).max(100).optional(),
|
|
81
|
+
characteristics: z.array(editableVariableZod).min(1).max(100).optional(),
|
|
82
|
+
detailProductionTimes: detailProductionTimesZod.optional(),
|
|
83
|
+
workpieceCharacteristics: detailWorkpieceCharacteristicsZod.optional(),
|
|
84
|
+
mainMaterialName: z.string().trim().min(1).max(255).nullable().optional(),
|
|
85
|
+
replacementMaterialName: z
|
|
86
|
+
.string()
|
|
87
|
+
.trim()
|
|
88
|
+
.min(1)
|
|
89
|
+
.max(255)
|
|
90
|
+
.nullable()
|
|
91
|
+
.optional()
|
|
92
|
+
}), idempotencyKey: z
|
|
93
|
+
.string()
|
|
94
|
+
.trim()
|
|
95
|
+
.min(8)
|
|
96
|
+
.max(128)
|
|
97
|
+
.regex(/^[a-zA-Z0-9._:-]+$/) });
|
|
98
|
+
exports.ErpEntityEditorGetInputZod = z
|
|
99
|
+
.object(exports.ErpEntityEditorGetInputShape)
|
|
100
|
+
.refine(input => input.entityName || input.entityDesignation, {
|
|
101
|
+
message: 'Укажите название или обозначение сущности ERP.'
|
|
102
|
+
});
|
|
103
|
+
exports.ErpEntityEditorUpdateInputZod = z
|
|
104
|
+
.object(exports.ErpEntityEditorUpdateInputShape)
|
|
105
|
+
.superRefine((input, context) => {
|
|
106
|
+
if (!input.entityName && !input.entityDesignation) {
|
|
107
|
+
context.addIssue({
|
|
108
|
+
code: 'custom',
|
|
109
|
+
message: 'Укажите название или обозначение сущности ERP.'
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
if (Object.keys(input.changes).length === 0) {
|
|
113
|
+
context.addIssue({
|
|
114
|
+
code: 'custom',
|
|
115
|
+
message: 'Укажите хотя бы одно изменение карточки ERP.'
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
});
|