@pksep/zod-shared 0.0.563 → 0.0.564
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 +3 -0
- package/dist/ai-mcp/index.js +3 -0
- package/dist/ai-mcp/interfaces/ai-mcp.interface.d.ts +149 -1
- package/dist/ai-mcp/schemas/ai-mcp-entity-editor.schema.d.ts +124 -0
- package/dist/ai-mcp/schemas/ai-mcp-entity-editor.schema.js +123 -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-technology.schema.d.ts +225 -0
- package/dist/ai-mcp/schemas/ai-mcp-technology.schema.js +156 -0
- package/dist/ai-mcp/schemas/ai-mcp.schema.d.ts +4 -1
- package/dist/ai-mcp/schemas/ai-mcp.schema.js +6 -1
- package/dist/bull-queue/index.d.ts +1 -0
- package/dist/bull-queue/index.js +17 -0
- package/dist/bull-queue/schemas/queue-ownership.schema.d.ts +74 -0
- package/dist/bull-queue/schemas/queue-ownership.schema.js +33 -0
- package/dist/deficit/index.d.ts +1 -0
- package/dist/deficit/index.js +1 -0
- package/dist/deficit/schemas/deficit-queue.schema.d.ts +2 -0
- package/dist/deficit/schemas/deficit-queue.schema.js +7 -0
- package/dist/excel-export/excel-export.dto.d.ts +1907 -537
- package/dist/excel-export/excel-export.dto.js +58 -2
- package/dist/excel-export/index.d.ts +1 -0
- package/dist/excel-export/index.js +1 -0
- package/dist/excel-export/warehouse-excel-export.d.ts +269 -0
- package/dist/excel-export/warehouse-excel-export.js +76 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/production-tasks/dto/split-production-task.dto.js +1 -1
- package/dist/production-tasks/interfaces/production-tasks.d.ts +2 -0
- package/dist/production-tasks/methods/methods.d.ts +3 -3
- package/dist/production-tasks/methods/methods.js +3 -3
- package/dist/specification/dto/mutate-specification.dto.d.ts +13 -0
- package/dist/specification/dto/mutate-specification.dto.js +14 -6
- package/package.json +1 -1
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
export declare enum ErpTechnologyReferenceKindEnum {
|
|
3
|
+
operationType = "operationType",
|
|
4
|
+
equipment = "equipment",
|
|
5
|
+
instrument = "instrument",
|
|
6
|
+
tooling = "tooling",
|
|
7
|
+
measuringInstrument = "measuringInstrument"
|
|
8
|
+
}
|
|
9
|
+
export declare const ErpTechnologyGetInputShape: {
|
|
10
|
+
entityType: z.ZodEnum<{
|
|
11
|
+
product: import("../..").IzdType.product;
|
|
12
|
+
cbed: import("../..").IzdType.cbed;
|
|
13
|
+
detal: import("../..").IzdType.detal;
|
|
14
|
+
}>;
|
|
15
|
+
entityName: z.ZodOptional<z.ZodString>;
|
|
16
|
+
entityDesignation: z.ZodOptional<z.ZodString>;
|
|
17
|
+
};
|
|
18
|
+
export declare const ErpTechnologyReferenceSearchInputShape: {
|
|
19
|
+
kind: z.ZodEnum<typeof ErpTechnologyReferenceKindEnum>;
|
|
20
|
+
query: z.ZodDefault<z.ZodString>;
|
|
21
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
22
|
+
};
|
|
23
|
+
export declare const ErpTechnologyOperationAddInputShape: {
|
|
24
|
+
operationTypeName: z.ZodString;
|
|
25
|
+
position: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
mainTime: z.ZodDefault<z.ZodNumber>;
|
|
27
|
+
note: z.ZodDefault<z.ZodString>;
|
|
28
|
+
resources: z.ZodOptional<z.ZodObject<{
|
|
29
|
+
equipment: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
30
|
+
instruments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
31
|
+
tooling: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
32
|
+
measuringInstruments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
33
|
+
}, z.core.$strip>>;
|
|
34
|
+
idempotencyKey: z.ZodString;
|
|
35
|
+
entityType: z.ZodEnum<{
|
|
36
|
+
product: import("../..").IzdType.product;
|
|
37
|
+
cbed: import("../..").IzdType.cbed;
|
|
38
|
+
detal: import("../..").IzdType.detal;
|
|
39
|
+
}>;
|
|
40
|
+
entityName: z.ZodOptional<z.ZodString>;
|
|
41
|
+
entityDesignation: z.ZodOptional<z.ZodString>;
|
|
42
|
+
};
|
|
43
|
+
export declare const ErpTechnologyOperationUpdateInputShape: {
|
|
44
|
+
changes: z.ZodObject<{
|
|
45
|
+
operationTypeName: z.ZodOptional<z.ZodString>;
|
|
46
|
+
mainTime: z.ZodOptional<z.ZodNumber>;
|
|
47
|
+
note: z.ZodOptional<z.ZodString>;
|
|
48
|
+
resources: z.ZodOptional<z.ZodObject<{
|
|
49
|
+
equipment: z.ZodOptional<z.ZodObject<{
|
|
50
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
51
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
52
|
+
}, z.core.$strip>>;
|
|
53
|
+
instruments: z.ZodOptional<z.ZodObject<{
|
|
54
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
55
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
56
|
+
}, z.core.$strip>>;
|
|
57
|
+
tooling: z.ZodOptional<z.ZodObject<{
|
|
58
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
59
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
60
|
+
}, z.core.$strip>>;
|
|
61
|
+
measuringInstruments: z.ZodOptional<z.ZodObject<{
|
|
62
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
63
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
64
|
+
}, z.core.$strip>>;
|
|
65
|
+
}, z.core.$strip>>;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
idempotencyKey: z.ZodString;
|
|
68
|
+
operationName: z.ZodOptional<z.ZodString>;
|
|
69
|
+
operationPosition: z.ZodOptional<z.ZodNumber>;
|
|
70
|
+
entityType: z.ZodEnum<{
|
|
71
|
+
product: import("../..").IzdType.product;
|
|
72
|
+
cbed: import("../..").IzdType.cbed;
|
|
73
|
+
detal: import("../..").IzdType.detal;
|
|
74
|
+
}>;
|
|
75
|
+
entityName: z.ZodOptional<z.ZodString>;
|
|
76
|
+
entityDesignation: z.ZodOptional<z.ZodString>;
|
|
77
|
+
};
|
|
78
|
+
export declare const ErpTechnologyOperationMoveInputShape: {
|
|
79
|
+
position: z.ZodNumber;
|
|
80
|
+
idempotencyKey: z.ZodString;
|
|
81
|
+
operationName: z.ZodOptional<z.ZodString>;
|
|
82
|
+
operationPosition: z.ZodOptional<z.ZodNumber>;
|
|
83
|
+
entityType: z.ZodEnum<{
|
|
84
|
+
product: import("../..").IzdType.product;
|
|
85
|
+
cbed: import("../..").IzdType.cbed;
|
|
86
|
+
detal: import("../..").IzdType.detal;
|
|
87
|
+
}>;
|
|
88
|
+
entityName: z.ZodOptional<z.ZodString>;
|
|
89
|
+
entityDesignation: z.ZodOptional<z.ZodString>;
|
|
90
|
+
};
|
|
91
|
+
export declare const ErpTechnologyOperationRemoveInputShape: {
|
|
92
|
+
idempotencyKey: z.ZodString;
|
|
93
|
+
operationName: z.ZodOptional<z.ZodString>;
|
|
94
|
+
operationPosition: z.ZodOptional<z.ZodNumber>;
|
|
95
|
+
entityType: z.ZodEnum<{
|
|
96
|
+
product: import("../..").IzdType.product;
|
|
97
|
+
cbed: import("../..").IzdType.cbed;
|
|
98
|
+
detal: import("../..").IzdType.detal;
|
|
99
|
+
}>;
|
|
100
|
+
entityName: z.ZodOptional<z.ZodString>;
|
|
101
|
+
entityDesignation: z.ZodOptional<z.ZodString>;
|
|
102
|
+
};
|
|
103
|
+
export declare const ErpTechnologyProcessUpdateInputShape: {
|
|
104
|
+
note: z.ZodString;
|
|
105
|
+
idempotencyKey: z.ZodString;
|
|
106
|
+
entityType: z.ZodEnum<{
|
|
107
|
+
product: import("../..").IzdType.product;
|
|
108
|
+
cbed: import("../..").IzdType.cbed;
|
|
109
|
+
detal: import("../..").IzdType.detal;
|
|
110
|
+
}>;
|
|
111
|
+
entityName: z.ZodOptional<z.ZodString>;
|
|
112
|
+
entityDesignation: z.ZodOptional<z.ZodString>;
|
|
113
|
+
};
|
|
114
|
+
export declare const ErpTechnologyGetInputZod: z.ZodObject<{
|
|
115
|
+
entityType: z.ZodEnum<{
|
|
116
|
+
product: import("../..").IzdType.product;
|
|
117
|
+
cbed: import("../..").IzdType.cbed;
|
|
118
|
+
detal: import("../..").IzdType.detal;
|
|
119
|
+
}>;
|
|
120
|
+
entityName: z.ZodOptional<z.ZodString>;
|
|
121
|
+
entityDesignation: z.ZodOptional<z.ZodString>;
|
|
122
|
+
}, z.core.$strip>;
|
|
123
|
+
export declare const ErpTechnologyReferenceSearchInputZod: z.ZodObject<{
|
|
124
|
+
kind: z.ZodEnum<typeof ErpTechnologyReferenceKindEnum>;
|
|
125
|
+
query: z.ZodDefault<z.ZodString>;
|
|
126
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
127
|
+
}, z.core.$strip>;
|
|
128
|
+
export declare const ErpTechnologyOperationAddInputZod: z.ZodObject<{
|
|
129
|
+
operationTypeName: z.ZodString;
|
|
130
|
+
position: z.ZodOptional<z.ZodNumber>;
|
|
131
|
+
mainTime: z.ZodDefault<z.ZodNumber>;
|
|
132
|
+
note: z.ZodDefault<z.ZodString>;
|
|
133
|
+
resources: z.ZodOptional<z.ZodObject<{
|
|
134
|
+
equipment: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
135
|
+
instruments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
136
|
+
tooling: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
137
|
+
measuringInstruments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
138
|
+
}, z.core.$strip>>;
|
|
139
|
+
idempotencyKey: z.ZodString;
|
|
140
|
+
entityType: z.ZodEnum<{
|
|
141
|
+
product: import("../..").IzdType.product;
|
|
142
|
+
cbed: import("../..").IzdType.cbed;
|
|
143
|
+
detal: import("../..").IzdType.detal;
|
|
144
|
+
}>;
|
|
145
|
+
entityName: z.ZodOptional<z.ZodString>;
|
|
146
|
+
entityDesignation: z.ZodOptional<z.ZodString>;
|
|
147
|
+
}, z.core.$strip>;
|
|
148
|
+
export declare const ErpTechnologyOperationUpdateInputZod: z.ZodObject<{
|
|
149
|
+
changes: z.ZodObject<{
|
|
150
|
+
operationTypeName: z.ZodOptional<z.ZodString>;
|
|
151
|
+
mainTime: z.ZodOptional<z.ZodNumber>;
|
|
152
|
+
note: z.ZodOptional<z.ZodString>;
|
|
153
|
+
resources: z.ZodOptional<z.ZodObject<{
|
|
154
|
+
equipment: z.ZodOptional<z.ZodObject<{
|
|
155
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
156
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
157
|
+
}, z.core.$strip>>;
|
|
158
|
+
instruments: z.ZodOptional<z.ZodObject<{
|
|
159
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
160
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
161
|
+
}, z.core.$strip>>;
|
|
162
|
+
tooling: z.ZodOptional<z.ZodObject<{
|
|
163
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
164
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
165
|
+
}, z.core.$strip>>;
|
|
166
|
+
measuringInstruments: z.ZodOptional<z.ZodObject<{
|
|
167
|
+
add: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
168
|
+
remove: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
169
|
+
}, z.core.$strip>>;
|
|
170
|
+
}, z.core.$strip>>;
|
|
171
|
+
}, z.core.$strip>;
|
|
172
|
+
idempotencyKey: z.ZodString;
|
|
173
|
+
operationName: z.ZodOptional<z.ZodString>;
|
|
174
|
+
operationPosition: z.ZodOptional<z.ZodNumber>;
|
|
175
|
+
entityType: z.ZodEnum<{
|
|
176
|
+
product: import("../..").IzdType.product;
|
|
177
|
+
cbed: import("../..").IzdType.cbed;
|
|
178
|
+
detal: import("../..").IzdType.detal;
|
|
179
|
+
}>;
|
|
180
|
+
entityName: z.ZodOptional<z.ZodString>;
|
|
181
|
+
entityDesignation: z.ZodOptional<z.ZodString>;
|
|
182
|
+
}, z.core.$strip>;
|
|
183
|
+
export declare const ErpTechnologyOperationMoveInputZod: z.ZodObject<{
|
|
184
|
+
position: z.ZodNumber;
|
|
185
|
+
idempotencyKey: z.ZodString;
|
|
186
|
+
operationName: z.ZodOptional<z.ZodString>;
|
|
187
|
+
operationPosition: z.ZodOptional<z.ZodNumber>;
|
|
188
|
+
entityType: z.ZodEnum<{
|
|
189
|
+
product: import("../..").IzdType.product;
|
|
190
|
+
cbed: import("../..").IzdType.cbed;
|
|
191
|
+
detal: import("../..").IzdType.detal;
|
|
192
|
+
}>;
|
|
193
|
+
entityName: z.ZodOptional<z.ZodString>;
|
|
194
|
+
entityDesignation: z.ZodOptional<z.ZodString>;
|
|
195
|
+
}, z.core.$strip>;
|
|
196
|
+
export declare const ErpTechnologyOperationRemoveInputZod: z.ZodObject<{
|
|
197
|
+
idempotencyKey: z.ZodString;
|
|
198
|
+
operationName: z.ZodOptional<z.ZodString>;
|
|
199
|
+
operationPosition: z.ZodOptional<z.ZodNumber>;
|
|
200
|
+
entityType: z.ZodEnum<{
|
|
201
|
+
product: import("../..").IzdType.product;
|
|
202
|
+
cbed: import("../..").IzdType.cbed;
|
|
203
|
+
detal: import("../..").IzdType.detal;
|
|
204
|
+
}>;
|
|
205
|
+
entityName: z.ZodOptional<z.ZodString>;
|
|
206
|
+
entityDesignation: z.ZodOptional<z.ZodString>;
|
|
207
|
+
}, z.core.$strip>;
|
|
208
|
+
export declare const ErpTechnologyProcessUpdateInputZod: z.ZodObject<{
|
|
209
|
+
note: z.ZodString;
|
|
210
|
+
idempotencyKey: z.ZodString;
|
|
211
|
+
entityType: z.ZodEnum<{
|
|
212
|
+
product: import("../..").IzdType.product;
|
|
213
|
+
cbed: import("../..").IzdType.cbed;
|
|
214
|
+
detal: import("../..").IzdType.detal;
|
|
215
|
+
}>;
|
|
216
|
+
entityName: z.ZodOptional<z.ZodString>;
|
|
217
|
+
entityDesignation: z.ZodOptional<z.ZodString>;
|
|
218
|
+
}, z.core.$strip>;
|
|
219
|
+
export type TErpTechnologyGetInput = z.infer<typeof ErpTechnologyGetInputZod>;
|
|
220
|
+
export type TErpTechnologyReferenceSearchInput = z.infer<typeof ErpTechnologyReferenceSearchInputZod>;
|
|
221
|
+
export type TErpTechnologyOperationAddInput = z.infer<typeof ErpTechnologyOperationAddInputZod>;
|
|
222
|
+
export type TErpTechnologyOperationUpdateInput = z.infer<typeof ErpTechnologyOperationUpdateInputZod>;
|
|
223
|
+
export type TErpTechnologyOperationMoveInput = z.infer<typeof ErpTechnologyOperationMoveInputZod>;
|
|
224
|
+
export type TErpTechnologyOperationRemoveInput = z.infer<typeof ErpTechnologyOperationRemoveInputZod>;
|
|
225
|
+
export type TErpTechnologyProcessUpdateInput = z.infer<typeof ErpTechnologyProcessUpdateInputZod>;
|
|
@@ -0,0 +1,156 @@
|
|
|
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.ErpTechnologyProcessUpdateInputZod = exports.ErpTechnologyOperationRemoveInputZod = exports.ErpTechnologyOperationMoveInputZod = exports.ErpTechnologyOperationUpdateInputZod = exports.ErpTechnologyOperationAddInputZod = exports.ErpTechnologyReferenceSearchInputZod = exports.ErpTechnologyGetInputZod = exports.ErpTechnologyProcessUpdateInputShape = exports.ErpTechnologyOperationRemoveInputShape = exports.ErpTechnologyOperationMoveInputShape = exports.ErpTechnologyOperationUpdateInputShape = exports.ErpTechnologyOperationAddInputShape = exports.ErpTechnologyReferenceSearchInputShape = exports.ErpTechnologyGetInputShape = exports.ErpTechnologyReferenceKindEnum = void 0;
|
|
37
|
+
const z = __importStar(require("zod/v4"));
|
|
38
|
+
const ai_mcp_schema_1 = require("./ai-mcp.schema");
|
|
39
|
+
var ErpTechnologyReferenceKindEnum;
|
|
40
|
+
(function (ErpTechnologyReferenceKindEnum) {
|
|
41
|
+
ErpTechnologyReferenceKindEnum["operationType"] = "operationType";
|
|
42
|
+
ErpTechnologyReferenceKindEnum["equipment"] = "equipment";
|
|
43
|
+
ErpTechnologyReferenceKindEnum["instrument"] = "instrument";
|
|
44
|
+
ErpTechnologyReferenceKindEnum["tooling"] = "tooling";
|
|
45
|
+
ErpTechnologyReferenceKindEnum["measuringInstrument"] = "measuringInstrument";
|
|
46
|
+
})(ErpTechnologyReferenceKindEnum || (exports.ErpTechnologyReferenceKindEnum = ErpTechnologyReferenceKindEnum = {}));
|
|
47
|
+
const idempotencyKeyZod = z
|
|
48
|
+
.string()
|
|
49
|
+
.trim()
|
|
50
|
+
.min(8)
|
|
51
|
+
.max(128)
|
|
52
|
+
.regex(/^[a-zA-Z0-9._:-]+$/);
|
|
53
|
+
const entityReferenceShape = {
|
|
54
|
+
entityType: ai_mcp_schema_1.AiMcpEntityTypeZod,
|
|
55
|
+
entityName: z.string().trim().min(1).max(255).optional(),
|
|
56
|
+
entityDesignation: z.string().trim().min(1).max(255).optional()
|
|
57
|
+
};
|
|
58
|
+
const operationReferenceShape = {
|
|
59
|
+
operationName: z.string().trim().min(1).max(255).optional(),
|
|
60
|
+
operationPosition: z.number().int().min(1).optional()
|
|
61
|
+
};
|
|
62
|
+
const resourceNamesZod = z.array(z.string().trim().min(1).max(255)).max(20);
|
|
63
|
+
const hasNames = (names) => Boolean(names === null || names === void 0 ? void 0 : names.length);
|
|
64
|
+
const resourceSelectionZod = z
|
|
65
|
+
.object({
|
|
66
|
+
equipment: resourceNamesZod.optional(),
|
|
67
|
+
instruments: resourceNamesZod.optional(),
|
|
68
|
+
tooling: resourceNamesZod.optional(),
|
|
69
|
+
measuringInstruments: resourceNamesZod.optional()
|
|
70
|
+
})
|
|
71
|
+
.refine(resources => Object.values(resources).some(hasNames), {
|
|
72
|
+
message: 'Укажите хотя бы один производственный ресурс.'
|
|
73
|
+
});
|
|
74
|
+
const resourceMutationZod = z
|
|
75
|
+
.object({
|
|
76
|
+
add: resourceNamesZod.optional(),
|
|
77
|
+
remove: resourceNamesZod.optional()
|
|
78
|
+
})
|
|
79
|
+
.refine(change => hasNames(change.add) || hasNames(change.remove), {
|
|
80
|
+
message: 'Укажите ресурсы для добавления или удаления.'
|
|
81
|
+
});
|
|
82
|
+
const resourceChangesZod = z.object({
|
|
83
|
+
equipment: resourceMutationZod.optional(),
|
|
84
|
+
instruments: resourceMutationZod.optional(),
|
|
85
|
+
tooling: resourceMutationZod.optional(),
|
|
86
|
+
measuringInstruments: resourceMutationZod.optional()
|
|
87
|
+
});
|
|
88
|
+
const validateEntityReference = (input, context) => {
|
|
89
|
+
if (!input.entityName && !input.entityDesignation) {
|
|
90
|
+
context.addIssue({
|
|
91
|
+
code: 'custom',
|
|
92
|
+
path: ['entityName'],
|
|
93
|
+
message: 'Укажите название или обозначение сущности ERP.'
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
const validateOperationReference = (input, context) => {
|
|
98
|
+
if (!input.operationName && !input.operationPosition) {
|
|
99
|
+
context.addIssue({
|
|
100
|
+
code: 'custom',
|
|
101
|
+
path: ['operationName'],
|
|
102
|
+
message: 'Укажите название или позицию операции.'
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
exports.ErpTechnologyGetInputShape = entityReferenceShape;
|
|
107
|
+
exports.ErpTechnologyReferenceSearchInputShape = {
|
|
108
|
+
kind: z.nativeEnum(ErpTechnologyReferenceKindEnum),
|
|
109
|
+
query: z.string().trim().max(200).default(''),
|
|
110
|
+
limit: z.number().int().min(1).max(20).default(10)
|
|
111
|
+
};
|
|
112
|
+
exports.ErpTechnologyOperationAddInputShape = Object.assign(Object.assign({}, entityReferenceShape), { operationTypeName: z.string().trim().min(1).max(255), position: z.number().int().min(1).optional(), mainTime: z.number().min(0).max(1000000).default(0), note: z.string().max(4000).default(''), resources: resourceSelectionZod.optional(), idempotencyKey: idempotencyKeyZod });
|
|
113
|
+
exports.ErpTechnologyOperationUpdateInputShape = Object.assign(Object.assign(Object.assign({}, entityReferenceShape), operationReferenceShape), { changes: z.object({
|
|
114
|
+
operationTypeName: z.string().trim().min(1).max(255).optional(),
|
|
115
|
+
mainTime: z.number().min(0).max(1000000).optional(),
|
|
116
|
+
note: z.string().max(4000).optional(),
|
|
117
|
+
resources: resourceChangesZod.optional()
|
|
118
|
+
}), idempotencyKey: idempotencyKeyZod });
|
|
119
|
+
exports.ErpTechnologyOperationMoveInputShape = Object.assign(Object.assign(Object.assign({}, entityReferenceShape), operationReferenceShape), { position: z.number().int().min(1), idempotencyKey: idempotencyKeyZod });
|
|
120
|
+
exports.ErpTechnologyOperationRemoveInputShape = Object.assign(Object.assign(Object.assign({}, entityReferenceShape), operationReferenceShape), { idempotencyKey: idempotencyKeyZod });
|
|
121
|
+
exports.ErpTechnologyProcessUpdateInputShape = Object.assign(Object.assign({}, entityReferenceShape), { note: z.string().max(4000), idempotencyKey: idempotencyKeyZod });
|
|
122
|
+
exports.ErpTechnologyGetInputZod = z
|
|
123
|
+
.object(exports.ErpTechnologyGetInputShape)
|
|
124
|
+
.superRefine(validateEntityReference);
|
|
125
|
+
exports.ErpTechnologyReferenceSearchInputZod = z.object(exports.ErpTechnologyReferenceSearchInputShape);
|
|
126
|
+
exports.ErpTechnologyOperationAddInputZod = z
|
|
127
|
+
.object(exports.ErpTechnologyOperationAddInputShape)
|
|
128
|
+
.superRefine(validateEntityReference);
|
|
129
|
+
exports.ErpTechnologyOperationUpdateInputZod = z
|
|
130
|
+
.object(exports.ErpTechnologyOperationUpdateInputShape)
|
|
131
|
+
.superRefine((input, context) => {
|
|
132
|
+
validateEntityReference(input, context);
|
|
133
|
+
validateOperationReference(input, context);
|
|
134
|
+
if (Object.keys(input.changes).length === 0) {
|
|
135
|
+
context.addIssue({
|
|
136
|
+
code: 'custom',
|
|
137
|
+
path: ['changes'],
|
|
138
|
+
message: 'Укажите хотя бы одно изменение операции.'
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
exports.ErpTechnologyOperationMoveInputZod = z
|
|
143
|
+
.object(exports.ErpTechnologyOperationMoveInputShape)
|
|
144
|
+
.superRefine((input, context) => {
|
|
145
|
+
validateEntityReference(input, context);
|
|
146
|
+
validateOperationReference(input, context);
|
|
147
|
+
});
|
|
148
|
+
exports.ErpTechnologyOperationRemoveInputZod = z
|
|
149
|
+
.object(exports.ErpTechnologyOperationRemoveInputShape)
|
|
150
|
+
.superRefine((input, context) => {
|
|
151
|
+
validateEntityReference(input, context);
|
|
152
|
+
validateOperationReference(input, context);
|
|
153
|
+
});
|
|
154
|
+
exports.ErpTechnologyProcessUpdateInputZod = z
|
|
155
|
+
.object(exports.ErpTechnologyProcessUpdateInputShape)
|
|
156
|
+
.superRefine(validateEntityReference);
|
|
@@ -7,13 +7,16 @@ export declare enum AiMcpOperationStatusEnum {
|
|
|
7
7
|
export declare enum AiMcpOperationNameEnum {
|
|
8
8
|
createDetailAndAddToCbed = "create-detail-and-add-to-cbed",
|
|
9
9
|
archiveDetail = "archive-detail",
|
|
10
|
+
mutateSpecification = "mutate-specification",
|
|
10
11
|
uploadAndAttachEntityDocument = "upload-and-attach-entity-document",
|
|
11
12
|
attachEntityDocument = "attach-entity-document",
|
|
12
13
|
detachEntityDocument = "detach-entity-document",
|
|
13
14
|
setMainEntityDocument = "set-main-entity-document",
|
|
14
15
|
updateDocument = "update-document",
|
|
15
16
|
archiveDocument = "archive-document",
|
|
16
|
-
restoreDocument = "restore-document"
|
|
17
|
+
restoreDocument = "restore-document",
|
|
18
|
+
updateEntityEditor = "update-entity-editor",
|
|
19
|
+
mutateTechnology = "mutate-technology"
|
|
17
20
|
}
|
|
18
21
|
export declare enum AiMcpCommandStatusEnum {
|
|
19
22
|
queued = "queued"
|
|
@@ -45,6 +45,7 @@ var AiMcpOperationNameEnum;
|
|
|
45
45
|
(function (AiMcpOperationNameEnum) {
|
|
46
46
|
AiMcpOperationNameEnum["createDetailAndAddToCbed"] = "create-detail-and-add-to-cbed";
|
|
47
47
|
AiMcpOperationNameEnum["archiveDetail"] = "archive-detail";
|
|
48
|
+
AiMcpOperationNameEnum["mutateSpecification"] = "mutate-specification";
|
|
48
49
|
AiMcpOperationNameEnum["uploadAndAttachEntityDocument"] = "upload-and-attach-entity-document";
|
|
49
50
|
AiMcpOperationNameEnum["attachEntityDocument"] = "attach-entity-document";
|
|
50
51
|
AiMcpOperationNameEnum["detachEntityDocument"] = "detach-entity-document";
|
|
@@ -52,6 +53,8 @@ var AiMcpOperationNameEnum;
|
|
|
52
53
|
AiMcpOperationNameEnum["updateDocument"] = "update-document";
|
|
53
54
|
AiMcpOperationNameEnum["archiveDocument"] = "archive-document";
|
|
54
55
|
AiMcpOperationNameEnum["restoreDocument"] = "restore-document";
|
|
56
|
+
AiMcpOperationNameEnum["updateEntityEditor"] = "update-entity-editor";
|
|
57
|
+
AiMcpOperationNameEnum["mutateTechnology"] = "mutate-technology";
|
|
55
58
|
})(AiMcpOperationNameEnum || (exports.AiMcpOperationNameEnum = AiMcpOperationNameEnum = {}));
|
|
56
59
|
var AiMcpCommandStatusEnum;
|
|
57
60
|
(function (AiMcpCommandStatusEnum) {
|
|
@@ -179,7 +182,9 @@ exports.ErpEntityFilesListInputShape = {
|
|
|
179
182
|
};
|
|
180
183
|
exports.ErpFilesSearchInputShape = {
|
|
181
184
|
query: z.string().trim().min(1).max(200),
|
|
182
|
-
state: z
|
|
185
|
+
state: z
|
|
186
|
+
.nativeEnum(ErpDocumentStateEnum)
|
|
187
|
+
.default(ErpDocumentStateEnum.active),
|
|
183
188
|
limit: z.number().int().min(1).max(20).default(10)
|
|
184
189
|
};
|
|
185
190
|
exports.ErpEntityFileAttachInputShape = Object.assign(Object.assign(Object.assign({}, erpDocumentEntityReferenceShape), erpDocumentReferenceShape), { makeMain: z.boolean().default(false), idempotencyKey: idempotencyKeyZod });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './schemas/queue-ownership.schema';
|
|
@@ -0,0 +1,17 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./schemas/queue-ownership.schema"), exports);
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const QueueOwnershipKeysSchema: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
3
|
+
export declare const QueueOwnershipBatchIdSchema: z.ZodString;
|
|
4
|
+
export declare const QueueOwnershipReservationSchema: z.ZodObject<{
|
|
5
|
+
batchId: z.ZodString;
|
|
6
|
+
ownershipKeys: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
batchId: string;
|
|
9
|
+
ownershipKeys: string[];
|
|
10
|
+
}, {
|
|
11
|
+
batchId: string;
|
|
12
|
+
ownershipKeys: string[];
|
|
13
|
+
}>;
|
|
14
|
+
export declare const QueueOwnershipClaimSchema: z.ZodObject<{
|
|
15
|
+
registered: z.ZodBoolean;
|
|
16
|
+
batchId: z.ZodNullable<z.ZodString>;
|
|
17
|
+
ownershipKeys: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
batchId: string | null;
|
|
20
|
+
ownershipKeys: string[];
|
|
21
|
+
registered: boolean;
|
|
22
|
+
}, {
|
|
23
|
+
batchId: string | null;
|
|
24
|
+
ownershipKeys: string[];
|
|
25
|
+
registered: boolean;
|
|
26
|
+
}>;
|
|
27
|
+
export declare const QueueOwnershipJobProgressSchema: z.ZodObject<{
|
|
28
|
+
stage: z.ZodLiteral<"deduplication">;
|
|
29
|
+
status: z.ZodEnum<["processed", "partially_skipped", "skipped"]>;
|
|
30
|
+
requestedData: z.ZodUnknown;
|
|
31
|
+
processedData: z.ZodUnknown;
|
|
32
|
+
skippedData: z.ZodUnknown;
|
|
33
|
+
reason: z.ZodNullable<z.ZodLiteral<"superseded_by_newer_job">>;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
status: "processed" | "partially_skipped" | "skipped";
|
|
36
|
+
stage: "deduplication";
|
|
37
|
+
reason: "superseded_by_newer_job" | null;
|
|
38
|
+
requestedData?: unknown;
|
|
39
|
+
processedData?: unknown;
|
|
40
|
+
skippedData?: unknown;
|
|
41
|
+
}, {
|
|
42
|
+
status: "processed" | "partially_skipped" | "skipped";
|
|
43
|
+
stage: "deduplication";
|
|
44
|
+
reason: "superseded_by_newer_job" | null;
|
|
45
|
+
requestedData?: unknown;
|
|
46
|
+
processedData?: unknown;
|
|
47
|
+
skippedData?: unknown;
|
|
48
|
+
}>;
|
|
49
|
+
export declare const ProductDeficitConcurrencyTestResultSchema: z.ZodObject<{
|
|
50
|
+
productId: z.ZodNumber;
|
|
51
|
+
overlapProductId: z.ZodNumber;
|
|
52
|
+
requestedJobs: z.ZodNumber;
|
|
53
|
+
createdJobs: z.ZodNumber;
|
|
54
|
+
jobIds: z.ZodArray<z.ZodString, "many">;
|
|
55
|
+
submittedPayloads: z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">;
|
|
56
|
+
}, "strip", z.ZodTypeAny, {
|
|
57
|
+
productId: number;
|
|
58
|
+
overlapProductId: number;
|
|
59
|
+
requestedJobs: number;
|
|
60
|
+
createdJobs: number;
|
|
61
|
+
jobIds: string[];
|
|
62
|
+
submittedPayloads: number[][];
|
|
63
|
+
}, {
|
|
64
|
+
productId: number;
|
|
65
|
+
overlapProductId: number;
|
|
66
|
+
requestedJobs: number;
|
|
67
|
+
createdJobs: number;
|
|
68
|
+
jobIds: string[];
|
|
69
|
+
submittedPayloads: number[][];
|
|
70
|
+
}>;
|
|
71
|
+
export type QueueOwnershipReservation = z.infer<typeof QueueOwnershipReservationSchema>;
|
|
72
|
+
export type QueueOwnershipClaim = z.infer<typeof QueueOwnershipClaimSchema>;
|
|
73
|
+
export type QueueOwnershipJobProgress = z.infer<typeof QueueOwnershipJobProgressSchema>;
|
|
74
|
+
export type ProductDeficitConcurrencyTestResult = z.infer<typeof ProductDeficitConcurrencyTestResultSchema>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProductDeficitConcurrencyTestResultSchema = exports.QueueOwnershipJobProgressSchema = exports.QueueOwnershipClaimSchema = exports.QueueOwnershipReservationSchema = exports.QueueOwnershipBatchIdSchema = exports.QueueOwnershipKeysSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.QueueOwnershipKeysSchema = zod_1.z
|
|
6
|
+
.array(zod_1.z.string().trim().min(1))
|
|
7
|
+
.transform(ownershipKeys => Array.from(new Set(ownershipKeys)));
|
|
8
|
+
exports.QueueOwnershipBatchIdSchema = zod_1.z.string().uuid();
|
|
9
|
+
exports.QueueOwnershipReservationSchema = zod_1.z.object({
|
|
10
|
+
batchId: exports.QueueOwnershipBatchIdSchema,
|
|
11
|
+
ownershipKeys: exports.QueueOwnershipKeysSchema
|
|
12
|
+
});
|
|
13
|
+
exports.QueueOwnershipClaimSchema = zod_1.z.object({
|
|
14
|
+
registered: zod_1.z.boolean(),
|
|
15
|
+
batchId: exports.QueueOwnershipBatchIdSchema.nullable(),
|
|
16
|
+
ownershipKeys: exports.QueueOwnershipKeysSchema
|
|
17
|
+
});
|
|
18
|
+
exports.QueueOwnershipJobProgressSchema = zod_1.z.object({
|
|
19
|
+
stage: zod_1.z.literal('deduplication'),
|
|
20
|
+
status: zod_1.z.enum(['processed', 'partially_skipped', 'skipped']),
|
|
21
|
+
requestedData: zod_1.z.unknown(),
|
|
22
|
+
processedData: zod_1.z.unknown(),
|
|
23
|
+
skippedData: zod_1.z.unknown(),
|
|
24
|
+
reason: zod_1.z.literal('superseded_by_newer_job').nullable()
|
|
25
|
+
});
|
|
26
|
+
exports.ProductDeficitConcurrencyTestResultSchema = zod_1.z.object({
|
|
27
|
+
productId: zod_1.z.number().int().positive(),
|
|
28
|
+
overlapProductId: zod_1.z.number().int().positive(),
|
|
29
|
+
requestedJobs: zod_1.z.number().int().positive(),
|
|
30
|
+
createdJobs: zod_1.z.number().int().nonnegative(),
|
|
31
|
+
jobIds: zod_1.z.array(zod_1.z.string()),
|
|
32
|
+
submittedPayloads: zod_1.z.array(zod_1.z.array(zod_1.z.number().int().positive()))
|
|
33
|
+
});
|
package/dist/deficit/index.d.ts
CHANGED
package/dist/deficit/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./schemas/deficit.schema"), exports);
|
|
18
|
+
__exportStar(require("./schemas/deficit-queue.schema"), exports);
|
|
18
19
|
__exportStar(require("./interfaces/interface"), exports);
|
|
19
20
|
__exportStar(require("./dto/create-deficite.dto"), exports);
|
|
20
21
|
__exportStar(require("./dto/deficit-material.dto"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeficitQueueEntityIdsSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.DeficitQueueEntityIdsSchema = zod_1.z
|
|
6
|
+
.array(zod_1.z.coerce.number().int().positive())
|
|
7
|
+
.transform(entityIds => Array.from(new Set(entityIds)));
|