@naisys/erp 3.0.0 → 3.0.2
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/client-dist/assets/{index-D6lSIioV.js → index-D5R6NBeW.js} +731 -721
- package/client-dist/assets/{rolldown-runtime-CvHMtSRF.js → rolldown-runtime-B-1-B7_t.js} +1 -1
- package/client-dist/assets/{vendor-CJ0ET9hP.js → vendor-CbiEATh3.js} +70925 -72255
- package/client-dist/assets/{vendor-CLUPjUnv.css → vendor-D8d_HnwE.css} +1254 -397
- package/client-dist/index.html +4 -4
- package/dist/erpServer.js +7 -1
- package/dist/generated/prisma/internal/class.js +2 -2
- package/dist/generated/prisma/internal/prismaNamespace.js +4 -4
- package/dist/services/production/labor-ticket-backfill.js +1 -1
- package/npm-shrinkwrap.json +257 -316
- package/package.json +22 -22
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as __toESM } from "./rolldown-runtime-
|
|
2
|
-
import { $ as
|
|
1
|
+
import { r as __toESM } from "./rolldown-runtime-B-1-B7_t.js";
|
|
2
|
+
import { $ as Stack, $t as string, A as require_semver, At as UnstyledButton, B as useOutletContext, Bt as number$1, C as IconCopy, Ct as Text, D as IconApi, Dt as ActionIcon, E as IconArrowBackUp, Et as Group, F as Outlet, Ft as require_jsx_runtime, G as DateTimePicker, Gt as _undefined, H as useSearchParams, Ht as ZodIssueCode, I as Route, It as useDisclosure, J as Title, Jt as boolean, K as DateInput, Kt as any, L as Routes, Lt as useDebouncedValue, M as BrowserRouter, Mt as Box, N as Link, Nt as MantineProvider, O as IconAlertTriangle, Ot as Loader, P as Navigate, Pt as v8CssVariablesResolver, Q as Switch, Qt as record, R as useLocation, Rt as require_client, S as IconDownload, St as Anchor, T as IconCheck, Tt as Accordion, U as Notifications, Ut as _enum, V as useParams, Vt as string$1, W as notifications, Wt as _null, X as Tabs, Xt as number, Y as TextInput, Yt as literal, Z as Table, Zt as object, _ as IconLayoutSidebarLeftCollapse, _t as Button, a as IconX, at as NumberInput, b as IconEye, bt as Checkbox, c as IconTrash, ct as Textarea, d as IconPlus, dt as Drawer, en as union, et as Select, f as IconPhoto, ft as Divider, g as IconLayoutSidebarLeftExpand, gt as Card, h as IconListDetails, ht as Center, i as useForm, it as Pagination, j as require_dist, jt as ScrollArea, k as IconAlertCircle, kt as Popover, l as IconRobot, lt as Image, m as IconLogout, mt as Code, n as remarkGfm, nn as datetime, nt as Tooltip, o as IconUser, ot as Modal, p as IconNote, pt as Container, q as DatesProvider, qt as array, r as Markdown, rn as config, rt as PasswordInput, s as IconUpload, st as Menu, t as diffWordsWithSpace, tn as unknown, tt as SegmentedControl, u as IconRefresh, ut as FileButton, v as IconInfoCircle, vt as Badge, w as IconChevronDown, wt as Alert, x as IconEyeOff, xt as AppShell, y as IconFile, yt as Autocomplete, z as useNavigate, zt as require_react } from "./vendor-CbiEATh3.js";
|
|
3
3
|
//#region \0vite/modulepreload-polyfill.js
|
|
4
4
|
(function polyfill() {
|
|
5
5
|
const relList = document.createElement("link").relList;
|
|
@@ -31,6 +31,9 @@ import { $ as record, $t as Loader, A as IconPlus, At as NumberInput, B as IconC
|
|
|
31
31
|
}
|
|
32
32
|
})();
|
|
33
33
|
//#endregion
|
|
34
|
+
//#region src/zodConfig.ts
|
|
35
|
+
config({ jitless: true });
|
|
36
|
+
//#endregion
|
|
34
37
|
//#region ../../../packages/common/dist/auth/urlSafeKey.js
|
|
35
38
|
var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
|
|
36
39
|
var import_client = /* @__PURE__ */ __toESM(require_client(), 1);
|
|
@@ -501,6 +504,7 @@ var api = {
|
|
|
501
504
|
method: "DELETE",
|
|
502
505
|
headers: { Prefer: "return=representation" }
|
|
503
506
|
}),
|
|
507
|
+
/** Upload a file via multipart/form-data */
|
|
504
508
|
upload: (path, file, extraFields) => {
|
|
505
509
|
const formData = new FormData();
|
|
506
510
|
formData.append("file", file);
|
|
@@ -1191,222 +1195,227 @@ function paginationQuery(defaultPageSize = 20) {
|
|
|
1191
1195
|
pageSize: pageSizeSchema(defaultPageSize)
|
|
1192
1196
|
};
|
|
1193
1197
|
}
|
|
1194
|
-
object
|
|
1195
|
-
erpVersion: string
|
|
1196
|
-
erpDbPath: string
|
|
1197
|
-
erpDbSize: number
|
|
1198
|
-
erpDbVersion: number
|
|
1199
|
-
targetVersion: string
|
|
1200
|
-
_actions: array
|
|
1198
|
+
object({
|
|
1199
|
+
erpVersion: string(),
|
|
1200
|
+
erpDbPath: string(),
|
|
1201
|
+
erpDbSize: number().optional(),
|
|
1202
|
+
erpDbVersion: number(),
|
|
1203
|
+
targetVersion: string().optional(),
|
|
1204
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1201
1205
|
});
|
|
1202
|
-
var AdminAttachmentItemSchema = object
|
|
1203
|
-
id: string
|
|
1204
|
-
filename: string
|
|
1205
|
-
fileSize: number
|
|
1206
|
-
fileHash: string
|
|
1207
|
-
uploadedBy: string
|
|
1208
|
-
createdAt: string
|
|
1206
|
+
var AdminAttachmentItemSchema = object({
|
|
1207
|
+
id: string(),
|
|
1208
|
+
filename: string(),
|
|
1209
|
+
fileSize: number(),
|
|
1210
|
+
fileHash: string(),
|
|
1211
|
+
uploadedBy: string(),
|
|
1212
|
+
createdAt: string()
|
|
1209
1213
|
});
|
|
1210
|
-
object
|
|
1211
|
-
object
|
|
1212
|
-
attachments: array
|
|
1213
|
-
total: number
|
|
1214
|
-
page: number
|
|
1215
|
-
pageSize: number
|
|
1216
|
-
_links: array
|
|
1214
|
+
object({ ...paginationQuery(50) });
|
|
1215
|
+
object({
|
|
1216
|
+
attachments: array(AdminAttachmentItemSchema),
|
|
1217
|
+
total: number(),
|
|
1218
|
+
page: number(),
|
|
1219
|
+
pageSize: number(),
|
|
1220
|
+
_links: array(HateoasLinkSchema)
|
|
1217
1221
|
});
|
|
1218
|
-
var PinoLogEntrySchema = object
|
|
1219
|
-
level: number
|
|
1220
|
-
time: number
|
|
1221
|
-
msg: string
|
|
1222
|
-
detail: string
|
|
1222
|
+
var PinoLogEntrySchema = object({
|
|
1223
|
+
level: number(),
|
|
1224
|
+
time: number(),
|
|
1225
|
+
msg: string(),
|
|
1226
|
+
detail: string().optional()
|
|
1223
1227
|
});
|
|
1224
|
-
object
|
|
1228
|
+
object({
|
|
1225
1229
|
lines: number$1().optional().default(200),
|
|
1226
1230
|
minLevel: number$1().optional()
|
|
1227
1231
|
});
|
|
1228
|
-
object
|
|
1229
|
-
entries: array
|
|
1230
|
-
fileName: string
|
|
1231
|
-
fileSize: number
|
|
1232
|
+
object({
|
|
1233
|
+
entries: array(PinoLogEntrySchema),
|
|
1234
|
+
fileName: string(),
|
|
1235
|
+
fileSize: number().optional()
|
|
1232
1236
|
});
|
|
1233
|
-
object
|
|
1234
|
-
object
|
|
1235
|
-
id: number
|
|
1236
|
-
entityType: string
|
|
1237
|
-
entityId: number
|
|
1238
|
-
action: string
|
|
1239
|
-
field: string
|
|
1240
|
-
oldValue: string
|
|
1241
|
-
newValue: string
|
|
1242
|
-
userId: number
|
|
1237
|
+
object({ message: string() });
|
|
1238
|
+
object({ items: array(object({
|
|
1239
|
+
id: number(),
|
|
1240
|
+
entityType: string(),
|
|
1241
|
+
entityId: number(),
|
|
1242
|
+
action: string(),
|
|
1243
|
+
field: string(),
|
|
1244
|
+
oldValue: string().nullable(),
|
|
1245
|
+
newValue: string().nullable(),
|
|
1246
|
+
userId: number(),
|
|
1243
1247
|
createdAt: datetime()
|
|
1244
1248
|
})) });
|
|
1245
|
-
object
|
|
1246
|
-
entityType: string
|
|
1249
|
+
object({
|
|
1250
|
+
entityType: string(),
|
|
1247
1251
|
entityId: number$1().int()
|
|
1248
1252
|
});
|
|
1249
|
-
object
|
|
1250
|
-
statusCode: number
|
|
1251
|
-
error: string
|
|
1252
|
-
message: string
|
|
1253
|
-
|
|
1253
|
+
object({
|
|
1254
|
+
statusCode: number().int(),
|
|
1255
|
+
error: string(),
|
|
1256
|
+
message: string(),
|
|
1257
|
+
/**
|
|
1258
|
+
* For 403 responses raised by a permission check, the name of the
|
|
1259
|
+
* missing permission. Lets clients react structurally without having
|
|
1260
|
+
* to parse the human-readable `message`.
|
|
1261
|
+
*/
|
|
1262
|
+
missingPermission: string().optional()
|
|
1254
1263
|
});
|
|
1255
|
-
object
|
|
1264
|
+
object({
|
|
1256
1265
|
...paginationQuery(),
|
|
1257
|
-
search: string
|
|
1266
|
+
search: string().optional()
|
|
1258
1267
|
});
|
|
1259
|
-
object
|
|
1260
|
-
items: array
|
|
1261
|
-
id: number
|
|
1262
|
-
itemKey: string
|
|
1263
|
-
key: string
|
|
1264
|
-
quantity: number
|
|
1265
|
-
orderKey: string
|
|
1266
|
-
orderRunNo: number
|
|
1268
|
+
object({
|
|
1269
|
+
items: array(object({
|
|
1270
|
+
id: number(),
|
|
1271
|
+
itemKey: string(),
|
|
1272
|
+
key: string(),
|
|
1273
|
+
quantity: number().nullable(),
|
|
1274
|
+
orderKey: string().nullable(),
|
|
1275
|
+
orderRunNo: number().nullable(),
|
|
1267
1276
|
createdAt: datetime()
|
|
1268
1277
|
})),
|
|
1269
|
-
total: number
|
|
1270
|
-
page: number
|
|
1271
|
-
pageSize: number
|
|
1272
|
-
_links: array
|
|
1273
|
-
_actionTemplates: array
|
|
1278
|
+
total: number(),
|
|
1279
|
+
page: number(),
|
|
1280
|
+
pageSize: number(),
|
|
1281
|
+
_links: array(HateoasLinkSchema),
|
|
1282
|
+
_actionTemplates: array(HateoasActionTemplateSchema).optional()
|
|
1274
1283
|
});
|
|
1275
1284
|
//#endregion
|
|
1276
1285
|
//#region ../shared/dist/steps/step-run-types.js
|
|
1277
|
-
var FieldValidationSchema = object
|
|
1278
|
-
valid: boolean
|
|
1279
|
-
error: string
|
|
1286
|
+
var FieldValidationSchema = object({
|
|
1287
|
+
valid: boolean(),
|
|
1288
|
+
error: string().optional()
|
|
1280
1289
|
});
|
|
1281
|
-
var FieldAttachmentSchema = object
|
|
1282
|
-
id: string
|
|
1283
|
-
filename: string
|
|
1284
|
-
fileSize: number
|
|
1285
|
-
downloadHref: string
|
|
1290
|
+
var FieldAttachmentSchema = object({
|
|
1291
|
+
id: string(),
|
|
1292
|
+
filename: string(),
|
|
1293
|
+
fileSize: number(),
|
|
1294
|
+
downloadHref: string().optional()
|
|
1286
1295
|
});
|
|
1287
|
-
var coercedString = string$
|
|
1288
|
-
var FieldValueSchema = union
|
|
1289
|
-
var FieldValueEntrySchema = object
|
|
1290
|
-
fieldId: number
|
|
1291
|
-
fieldSeqNo: number
|
|
1292
|
-
label: string
|
|
1293
|
-
type: string
|
|
1294
|
-
valueFormat: string
|
|
1295
|
-
required: boolean
|
|
1296
|
-
setIndex: number
|
|
1296
|
+
var coercedString = string$1();
|
|
1297
|
+
var FieldValueSchema = union([array(coercedString), coercedString]);
|
|
1298
|
+
var FieldValueEntrySchema = object({
|
|
1299
|
+
fieldId: number(),
|
|
1300
|
+
fieldSeqNo: number(),
|
|
1301
|
+
label: string(),
|
|
1302
|
+
type: string(),
|
|
1303
|
+
valueFormat: string(),
|
|
1304
|
+
required: boolean(),
|
|
1305
|
+
setIndex: number(),
|
|
1297
1306
|
value: FieldValueSchema,
|
|
1298
|
-
attachments: array
|
|
1307
|
+
attachments: array(FieldAttachmentSchema).optional(),
|
|
1299
1308
|
validation: FieldValidationSchema
|
|
1300
1309
|
});
|
|
1301
|
-
object
|
|
1302
|
-
attachmentId: string
|
|
1303
|
-
filename: string
|
|
1304
|
-
fileSize: number
|
|
1310
|
+
object({
|
|
1311
|
+
attachmentId: string(),
|
|
1312
|
+
filename: string(),
|
|
1313
|
+
fileSize: number()
|
|
1305
1314
|
});
|
|
1306
|
-
var StepRunSchema = object
|
|
1307
|
-
id: number
|
|
1308
|
-
operationRunId: number
|
|
1309
|
-
stepId: number
|
|
1310
|
-
seqNo: number
|
|
1311
|
-
title: string
|
|
1312
|
-
instructions: string
|
|
1313
|
-
multiSet: boolean
|
|
1314
|
-
completed: boolean
|
|
1315
|
-
note: string
|
|
1316
|
-
fieldCount: number
|
|
1317
|
-
fieldValues: array
|
|
1315
|
+
var StepRunSchema = object({
|
|
1316
|
+
id: number(),
|
|
1317
|
+
operationRunId: number(),
|
|
1318
|
+
stepId: number(),
|
|
1319
|
+
seqNo: number(),
|
|
1320
|
+
title: string(),
|
|
1321
|
+
instructions: string(),
|
|
1322
|
+
multiSet: boolean(),
|
|
1323
|
+
completed: boolean(),
|
|
1324
|
+
note: string().nullable(),
|
|
1325
|
+
fieldCount: number().optional(),
|
|
1326
|
+
fieldValues: array(FieldValueEntrySchema).optional(),
|
|
1318
1327
|
createdAt: datetime(),
|
|
1319
|
-
createdBy: string
|
|
1328
|
+
createdBy: string(),
|
|
1320
1329
|
updatedAt: datetime(),
|
|
1321
|
-
updatedBy: string
|
|
1322
|
-
_links: array
|
|
1323
|
-
_actions: array
|
|
1324
|
-
_actionTemplates: array
|
|
1330
|
+
updatedBy: string(),
|
|
1331
|
+
_links: array(HateoasLinkSchema).optional(),
|
|
1332
|
+
_actions: array(HateoasActionSchema).optional(),
|
|
1333
|
+
_actionTemplates: array(HateoasActionTemplateSchema).optional()
|
|
1325
1334
|
});
|
|
1326
|
-
var coercedStringMax = string$
|
|
1327
|
-
object
|
|
1328
|
-
object
|
|
1329
|
-
fieldSeqNo: number
|
|
1330
|
-
value: union
|
|
1335
|
+
var coercedStringMax = string$1().max(2e3);
|
|
1336
|
+
object({ value: union([array(coercedStringMax), coercedStringMax]) }).strict();
|
|
1337
|
+
object({ fieldValues: array(object({
|
|
1338
|
+
fieldSeqNo: number().int(),
|
|
1339
|
+
value: union([array(coercedStringMax), coercedStringMax])
|
|
1331
1340
|
})) }).strict();
|
|
1332
|
-
var BatchFieldValueResponseSchema = object
|
|
1333
|
-
items: array
|
|
1334
|
-
total: number
|
|
1341
|
+
var BatchFieldValueResponseSchema = object({
|
|
1342
|
+
items: array(FieldValueEntrySchema),
|
|
1343
|
+
total: number()
|
|
1335
1344
|
});
|
|
1336
1345
|
FieldValueEntrySchema.extend({
|
|
1337
|
-
_actions: array
|
|
1338
|
-
_actionTemplates: array
|
|
1346
|
+
_actions: array(HateoasActionSchema).optional(),
|
|
1347
|
+
_actionTemplates: array(HateoasActionTemplateSchema).optional()
|
|
1339
1348
|
});
|
|
1340
1349
|
BatchFieldValueResponseSchema.extend({
|
|
1341
|
-
_actions: array
|
|
1342
|
-
_actionTemplates: array
|
|
1350
|
+
_actions: array(HateoasActionSchema).optional(),
|
|
1351
|
+
_actionTemplates: array(HateoasActionTemplateSchema).optional()
|
|
1343
1352
|
});
|
|
1344
|
-
object
|
|
1345
|
-
setCount: number
|
|
1346
|
-
_actions: array
|
|
1347
|
-
_actionTemplates: array
|
|
1353
|
+
object({
|
|
1354
|
+
setCount: number(),
|
|
1355
|
+
_actions: array(HateoasActionSchema).optional(),
|
|
1356
|
+
_actionTemplates: array(HateoasActionTemplateSchema).optional()
|
|
1348
1357
|
});
|
|
1349
|
-
object
|
|
1350
|
-
id: number
|
|
1351
|
-
completed: boolean
|
|
1352
|
-
note: string
|
|
1358
|
+
object({
|
|
1359
|
+
id: number(),
|
|
1360
|
+
completed: boolean(),
|
|
1361
|
+
note: string().nullable(),
|
|
1353
1362
|
updatedAt: datetime(),
|
|
1354
|
-
updatedBy: string
|
|
1355
|
-
_actions: array
|
|
1356
|
-
_actionTemplates: array
|
|
1363
|
+
updatedBy: string(),
|
|
1364
|
+
_actions: array(HateoasActionSchema).optional(),
|
|
1365
|
+
_actionTemplates: array(HateoasActionTemplateSchema).optional()
|
|
1357
1366
|
});
|
|
1358
|
-
object
|
|
1359
|
-
object
|
|
1360
|
-
items: array
|
|
1361
|
-
total: number
|
|
1362
|
-
_links: array
|
|
1363
|
-
_linkTemplates: array
|
|
1364
|
-
_actions: array
|
|
1367
|
+
object({ includeFields: union([literal("true"), literal("false")]).transform((v) => v === "true").optional() });
|
|
1368
|
+
object({
|
|
1369
|
+
items: array(StepRunSchema),
|
|
1370
|
+
total: number(),
|
|
1371
|
+
_links: array(HateoasLinkSchema),
|
|
1372
|
+
_linkTemplates: array(HateoasLinkTemplateSchema).optional(),
|
|
1373
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1365
1374
|
});
|
|
1366
1375
|
//#endregion
|
|
1367
1376
|
//#region ../shared/dist/items/item-instance-types.js
|
|
1368
|
-
var ItemInstanceSchema = object
|
|
1369
|
-
id: number
|
|
1370
|
-
itemKey: string
|
|
1371
|
-
orderKey: string
|
|
1372
|
-
orderRunNo: number
|
|
1373
|
-
key: string
|
|
1374
|
-
quantity: number
|
|
1375
|
-
fieldValues: array
|
|
1376
|
-
createdBy: string
|
|
1377
|
+
var ItemInstanceSchema = object({
|
|
1378
|
+
id: number(),
|
|
1379
|
+
itemKey: string(),
|
|
1380
|
+
orderKey: string().nullable(),
|
|
1381
|
+
orderRunNo: number().nullable(),
|
|
1382
|
+
key: string(),
|
|
1383
|
+
quantity: number().nullable(),
|
|
1384
|
+
fieldValues: array(FieldValueEntrySchema),
|
|
1385
|
+
createdBy: string(),
|
|
1377
1386
|
createdAt: datetime(),
|
|
1378
|
-
updatedBy: string
|
|
1387
|
+
updatedBy: string(),
|
|
1379
1388
|
updatedAt: datetime(),
|
|
1380
|
-
_links: array
|
|
1381
|
-
_actions: array
|
|
1382
|
-
_actionTemplates: array
|
|
1389
|
+
_links: array(HateoasLinkSchema).optional(),
|
|
1390
|
+
_actions: array(HateoasActionSchema).optional(),
|
|
1391
|
+
_actionTemplates: array(HateoasActionTemplateSchema).optional()
|
|
1383
1392
|
});
|
|
1384
|
-
object
|
|
1385
|
-
key: string
|
|
1386
|
-
quantity: number
|
|
1387
|
-
orderRunId: number
|
|
1393
|
+
object({
|
|
1394
|
+
key: string().min(1).max(200),
|
|
1395
|
+
quantity: number().nullable().optional(),
|
|
1396
|
+
orderRunId: number().nullable().optional()
|
|
1388
1397
|
}).strict();
|
|
1389
|
-
object
|
|
1390
|
-
key: string
|
|
1391
|
-
quantity: number
|
|
1392
|
-
orderRunId: number
|
|
1398
|
+
object({
|
|
1399
|
+
key: string().min(1).max(200).optional(),
|
|
1400
|
+
quantity: number().nullable().optional(),
|
|
1401
|
+
orderRunId: number().nullable().optional()
|
|
1393
1402
|
}).strict();
|
|
1394
|
-
object
|
|
1403
|
+
object({
|
|
1395
1404
|
...paginationQuery(),
|
|
1396
|
-
search: string
|
|
1405
|
+
search: string().optional()
|
|
1397
1406
|
});
|
|
1398
|
-
object
|
|
1399
|
-
items: array
|
|
1400
|
-
total: number
|
|
1401
|
-
page: number
|
|
1402
|
-
pageSize: number
|
|
1403
|
-
_links: array
|
|
1404
|
-
_linkTemplates: array
|
|
1405
|
-
_actions: array
|
|
1407
|
+
object({
|
|
1408
|
+
items: array(ItemInstanceSchema),
|
|
1409
|
+
total: number(),
|
|
1410
|
+
page: number(),
|
|
1411
|
+
pageSize: number(),
|
|
1412
|
+
_links: array(HateoasLinkSchema),
|
|
1413
|
+
_linkTemplates: array(HateoasLinkTemplateSchema).optional(),
|
|
1414
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1406
1415
|
});
|
|
1407
1416
|
//#endregion
|
|
1408
1417
|
//#region ../shared/dist/production/field-types.js
|
|
1409
|
-
var FieldTypeEnum = _enum
|
|
1418
|
+
var FieldTypeEnum = _enum([
|
|
1410
1419
|
"string",
|
|
1411
1420
|
"number",
|
|
1412
1421
|
"date",
|
|
@@ -1416,180 +1425,180 @@ var FieldTypeEnum = _enum$1([
|
|
|
1416
1425
|
"attachment"
|
|
1417
1426
|
]);
|
|
1418
1427
|
var FieldType = FieldTypeEnum.enum;
|
|
1419
|
-
var FieldSchema = object
|
|
1420
|
-
id: number
|
|
1421
|
-
fieldSetId: number
|
|
1422
|
-
seqNo: number
|
|
1423
|
-
label: string
|
|
1428
|
+
var FieldSchema = object({
|
|
1429
|
+
id: number(),
|
|
1430
|
+
fieldSetId: number(),
|
|
1431
|
+
seqNo: number(),
|
|
1432
|
+
label: string(),
|
|
1424
1433
|
type: FieldTypeEnum,
|
|
1425
|
-
isArray: boolean
|
|
1426
|
-
required: boolean
|
|
1434
|
+
isArray: boolean(),
|
|
1435
|
+
required: boolean(),
|
|
1427
1436
|
createdAt: datetime(),
|
|
1428
|
-
createdBy: string
|
|
1437
|
+
createdBy: string(),
|
|
1429
1438
|
updatedAt: datetime(),
|
|
1430
|
-
updatedBy: string
|
|
1431
|
-
_links: array
|
|
1432
|
-
_actions: array
|
|
1439
|
+
updatedBy: string(),
|
|
1440
|
+
_links: array(HateoasLinkSchema).optional(),
|
|
1441
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1433
1442
|
});
|
|
1434
|
-
var CreateFieldSchema = object
|
|
1435
|
-
seqNo: number
|
|
1436
|
-
label: string
|
|
1443
|
+
var CreateFieldSchema = object({
|
|
1444
|
+
seqNo: number().int().min(1).optional(),
|
|
1445
|
+
label: string().min(1).max(200),
|
|
1437
1446
|
type: FieldTypeEnum.optional(),
|
|
1438
|
-
isArray: boolean
|
|
1439
|
-
required: boolean
|
|
1447
|
+
isArray: boolean().optional(),
|
|
1448
|
+
required: boolean().optional()
|
|
1440
1449
|
}).strict();
|
|
1441
|
-
object
|
|
1442
|
-
var UpdateFieldSchema = object
|
|
1443
|
-
seqNo: number
|
|
1444
|
-
label: string
|
|
1450
|
+
object({ items: array(CreateFieldSchema).min(1).max(100) });
|
|
1451
|
+
var UpdateFieldSchema = object({
|
|
1452
|
+
seqNo: number().int().min(1).optional(),
|
|
1453
|
+
label: string().min(1).max(200).optional(),
|
|
1445
1454
|
type: FieldTypeEnum.optional(),
|
|
1446
|
-
isArray: boolean
|
|
1447
|
-
required: boolean
|
|
1455
|
+
isArray: boolean().optional(),
|
|
1456
|
+
required: boolean().optional()
|
|
1448
1457
|
}).strict();
|
|
1449
|
-
var FieldListResponseSchema = object
|
|
1450
|
-
items: array
|
|
1451
|
-
total: number
|
|
1452
|
-
nextSeqNo: number
|
|
1453
|
-
_links: array
|
|
1454
|
-
_linkTemplates: array
|
|
1455
|
-
_actions: array
|
|
1458
|
+
var FieldListResponseSchema = object({
|
|
1459
|
+
items: array(FieldSchema),
|
|
1460
|
+
total: number(),
|
|
1461
|
+
nextSeqNo: number(),
|
|
1462
|
+
_links: array(HateoasLinkSchema),
|
|
1463
|
+
_linkTemplates: array(HateoasLinkTemplateSchema).optional(),
|
|
1464
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1456
1465
|
});
|
|
1457
1466
|
//#endregion
|
|
1458
1467
|
//#region ../shared/dist/items/item-types.js
|
|
1459
|
-
var ItemSchema = object
|
|
1460
|
-
id: number
|
|
1461
|
-
key: string
|
|
1462
|
-
description: string
|
|
1468
|
+
var ItemSchema = object({
|
|
1469
|
+
id: number(),
|
|
1470
|
+
key: string(),
|
|
1471
|
+
description: string(),
|
|
1463
1472
|
fields: FieldListResponseSchema,
|
|
1464
|
-
createdBy: string
|
|
1473
|
+
createdBy: string(),
|
|
1465
1474
|
createdAt: datetime(),
|
|
1466
|
-
updatedBy: string
|
|
1475
|
+
updatedBy: string(),
|
|
1467
1476
|
updatedAt: datetime(),
|
|
1468
|
-
_links: array
|
|
1469
|
-
_actions: array
|
|
1477
|
+
_links: array(HateoasLinkSchema).optional(),
|
|
1478
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1470
1479
|
});
|
|
1471
|
-
object
|
|
1472
|
-
key: string
|
|
1473
|
-
description: string
|
|
1480
|
+
object({
|
|
1481
|
+
key: string().min(1).max(100).regex(/^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$/, "Key must be alphanumeric with hyphens"),
|
|
1482
|
+
description: string().max(2e3).optional().default("")
|
|
1474
1483
|
}).strict();
|
|
1475
|
-
object
|
|
1476
|
-
key: string
|
|
1477
|
-
description: string
|
|
1484
|
+
object({
|
|
1485
|
+
key: string().min(1).max(100).regex(/^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$/, "Key must be alphanumeric with hyphens").optional(),
|
|
1486
|
+
description: string().max(2e3).optional()
|
|
1478
1487
|
}).strict();
|
|
1479
|
-
object
|
|
1488
|
+
object({
|
|
1480
1489
|
...paginationQuery(),
|
|
1481
|
-
search: string
|
|
1490
|
+
search: string().optional()
|
|
1482
1491
|
});
|
|
1483
|
-
object
|
|
1484
|
-
items: array
|
|
1485
|
-
total: number
|
|
1486
|
-
page: number
|
|
1487
|
-
pageSize: number
|
|
1488
|
-
_links: array
|
|
1489
|
-
_linkTemplates: array
|
|
1490
|
-
_actions: array
|
|
1492
|
+
object({
|
|
1493
|
+
items: array(ItemSchema),
|
|
1494
|
+
total: number(),
|
|
1495
|
+
page: number(),
|
|
1496
|
+
pageSize: number(),
|
|
1497
|
+
_links: array(HateoasLinkSchema),
|
|
1498
|
+
_linkTemplates: array(HateoasLinkTemplateSchema).optional(),
|
|
1499
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1491
1500
|
});
|
|
1492
1501
|
//#endregion
|
|
1493
1502
|
//#region ../shared/dist/production/field-ref-types.js
|
|
1494
|
-
var FieldRefFieldSchema = object
|
|
1495
|
-
seqNo: number
|
|
1496
|
-
label: string
|
|
1503
|
+
var FieldRefFieldSchema = object({
|
|
1504
|
+
seqNo: number(),
|
|
1505
|
+
label: string(),
|
|
1497
1506
|
type: FieldTypeEnum
|
|
1498
1507
|
});
|
|
1499
|
-
var FieldRefSchema = object
|
|
1500
|
-
id: number
|
|
1501
|
-
seqNo: number
|
|
1502
|
-
title: string
|
|
1503
|
-
sourceOpSeqNo: number
|
|
1504
|
-
sourceOpTitle: string
|
|
1505
|
-
sourceStepSeqNo: number
|
|
1506
|
-
sourceStepTitle: string
|
|
1507
|
-
fields: array
|
|
1508
|
+
var FieldRefSchema = object({
|
|
1509
|
+
id: number(),
|
|
1510
|
+
seqNo: number(),
|
|
1511
|
+
title: string(),
|
|
1512
|
+
sourceOpSeqNo: number(),
|
|
1513
|
+
sourceOpTitle: string(),
|
|
1514
|
+
sourceStepSeqNo: number(),
|
|
1515
|
+
sourceStepTitle: string(),
|
|
1516
|
+
fields: array(FieldRefFieldSchema),
|
|
1508
1517
|
createdAt: datetime(),
|
|
1509
|
-
createdBy: string
|
|
1510
|
-
_links: array
|
|
1511
|
-
_actions: array
|
|
1518
|
+
createdBy: string(),
|
|
1519
|
+
_links: array(HateoasLinkSchema).optional(),
|
|
1520
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1512
1521
|
});
|
|
1513
|
-
object
|
|
1514
|
-
seqNo: number
|
|
1515
|
-
title: string
|
|
1516
|
-
sourceOpSeqNo: number
|
|
1517
|
-
sourceStepSeqNo: number
|
|
1522
|
+
object({
|
|
1523
|
+
seqNo: number().int().min(1).optional(),
|
|
1524
|
+
title: string().min(1).max(200),
|
|
1525
|
+
sourceOpSeqNo: number().int().min(1),
|
|
1526
|
+
sourceStepSeqNo: number().int().min(1)
|
|
1518
1527
|
}).strict();
|
|
1519
|
-
object
|
|
1520
|
-
items: array
|
|
1521
|
-
total: number
|
|
1522
|
-
nextSeqNo: number
|
|
1523
|
-
_links: array
|
|
1524
|
-
_linkTemplates: array
|
|
1525
|
-
_actions: array
|
|
1528
|
+
object({
|
|
1529
|
+
items: array(FieldRefSchema),
|
|
1530
|
+
total: number(),
|
|
1531
|
+
nextSeqNo: number(),
|
|
1532
|
+
_links: array(HateoasLinkSchema),
|
|
1533
|
+
_linkTemplates: array(HateoasLinkTemplateSchema).optional(),
|
|
1534
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1526
1535
|
});
|
|
1527
|
-
var FieldRefValueSummarySchema = object
|
|
1528
|
-
seqNo: number
|
|
1529
|
-
title: string
|
|
1530
|
-
sourceOpSeqNo: number
|
|
1531
|
-
sourceOpTitle: string
|
|
1532
|
-
sourceStepSeqNo: number
|
|
1533
|
-
sourceStepTitle: string
|
|
1534
|
-
multiSet: boolean
|
|
1535
|
-
fieldValues: array
|
|
1536
|
+
var FieldRefValueSummarySchema = object({
|
|
1537
|
+
seqNo: number(),
|
|
1538
|
+
title: string(),
|
|
1539
|
+
sourceOpSeqNo: number(),
|
|
1540
|
+
sourceOpTitle: string(),
|
|
1541
|
+
sourceStepSeqNo: number(),
|
|
1542
|
+
sourceStepTitle: string(),
|
|
1543
|
+
multiSet: boolean(),
|
|
1544
|
+
fieldValues: array(FieldValueEntrySchema)
|
|
1536
1545
|
});
|
|
1537
1546
|
//#endregion
|
|
1538
1547
|
//#region ../shared/dist/operations/operation-types.js
|
|
1539
|
-
var OperationPredecessorSchema = object
|
|
1540
|
-
seqNo: number
|
|
1541
|
-
title: string
|
|
1548
|
+
var OperationPredecessorSchema = object({
|
|
1549
|
+
seqNo: number(),
|
|
1550
|
+
title: string()
|
|
1542
1551
|
});
|
|
1543
|
-
var StepSummarySchema = object
|
|
1544
|
-
seqNo: number
|
|
1545
|
-
title: string
|
|
1552
|
+
var StepSummarySchema = object({
|
|
1553
|
+
seqNo: number(),
|
|
1554
|
+
title: string()
|
|
1546
1555
|
});
|
|
1547
|
-
var OperationSchema = object
|
|
1548
|
-
id: number
|
|
1549
|
-
orderRevId: number
|
|
1550
|
-
seqNo: number
|
|
1551
|
-
title: string
|
|
1552
|
-
description: string
|
|
1553
|
-
workCenterKey: string
|
|
1554
|
-
stepCount: number
|
|
1555
|
-
stepSummary: array
|
|
1556
|
-
predecessors: array
|
|
1556
|
+
var OperationSchema = object({
|
|
1557
|
+
id: number(),
|
|
1558
|
+
orderRevId: number(),
|
|
1559
|
+
seqNo: number(),
|
|
1560
|
+
title: string(),
|
|
1561
|
+
description: string(),
|
|
1562
|
+
workCenterKey: string().nullable(),
|
|
1563
|
+
stepCount: number().optional(),
|
|
1564
|
+
stepSummary: array(StepSummarySchema).optional(),
|
|
1565
|
+
predecessors: array(OperationPredecessorSchema).optional(),
|
|
1557
1566
|
createdAt: datetime(),
|
|
1558
|
-
createdBy: string
|
|
1567
|
+
createdBy: string(),
|
|
1559
1568
|
updatedAt: datetime(),
|
|
1560
|
-
updatedBy: string
|
|
1561
|
-
_links: array
|
|
1562
|
-
_actions: array
|
|
1569
|
+
updatedBy: string(),
|
|
1570
|
+
_links: array(HateoasLinkSchema).optional(),
|
|
1571
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1563
1572
|
});
|
|
1564
|
-
var CreateOperationSchema = object
|
|
1565
|
-
seqNo: number
|
|
1566
|
-
title: string
|
|
1567
|
-
description: string
|
|
1568
|
-
workCenterKey: string
|
|
1569
|
-
predecessorSeqNos: array
|
|
1573
|
+
var CreateOperationSchema = object({
|
|
1574
|
+
seqNo: number().int().min(1).optional(),
|
|
1575
|
+
title: string().min(1).max(200),
|
|
1576
|
+
description: string().max(2e3).optional(),
|
|
1577
|
+
workCenterKey: string().max(100).nullable().optional(),
|
|
1578
|
+
predecessorSeqNos: array(number().int().min(1)).optional()
|
|
1570
1579
|
}).strict();
|
|
1571
|
-
var UpdateOperationSchema = object
|
|
1572
|
-
title: string
|
|
1573
|
-
description: string
|
|
1574
|
-
workCenterKey: string
|
|
1575
|
-
seqNo: number
|
|
1580
|
+
var UpdateOperationSchema = object({
|
|
1581
|
+
title: string().min(1).max(200).optional(),
|
|
1582
|
+
description: string().max(2e3).optional(),
|
|
1583
|
+
workCenterKey: string().max(100).nullable().optional(),
|
|
1584
|
+
seqNo: number().int().min(1).optional()
|
|
1576
1585
|
}).strict();
|
|
1577
|
-
object
|
|
1578
|
-
items: array
|
|
1579
|
-
total: number
|
|
1580
|
-
nextSeqNo: number
|
|
1581
|
-
_links: array
|
|
1582
|
-
_linkTemplates: array
|
|
1583
|
-
_actions: array
|
|
1586
|
+
object({
|
|
1587
|
+
items: array(OperationSchema),
|
|
1588
|
+
total: number(),
|
|
1589
|
+
nextSeqNo: number(),
|
|
1590
|
+
_links: array(HateoasLinkSchema),
|
|
1591
|
+
_linkTemplates: array(HateoasLinkTemplateSchema).optional(),
|
|
1592
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1584
1593
|
});
|
|
1585
1594
|
//#endregion
|
|
1586
1595
|
//#region ../shared/dist/operations/operation-run-types.js
|
|
1587
|
-
var StepRunSummarySchema = object
|
|
1588
|
-
seqNo: number
|
|
1589
|
-
title: string
|
|
1590
|
-
completed: boolean
|
|
1596
|
+
var StepRunSummarySchema = object({
|
|
1597
|
+
seqNo: number(),
|
|
1598
|
+
title: string(),
|
|
1599
|
+
completed: boolean()
|
|
1591
1600
|
});
|
|
1592
|
-
var OperationRunStatusEnum = _enum
|
|
1601
|
+
var OperationRunStatusEnum = _enum([
|
|
1593
1602
|
"blocked",
|
|
1594
1603
|
"pending",
|
|
1595
1604
|
"in_progress",
|
|
@@ -1598,586 +1607,586 @@ var OperationRunStatusEnum = _enum$1([
|
|
|
1598
1607
|
"failed"
|
|
1599
1608
|
]);
|
|
1600
1609
|
var OperationRunStatus = OperationRunStatusEnum.enum;
|
|
1601
|
-
var OperationRunSchema = object
|
|
1602
|
-
id: number
|
|
1603
|
-
orderRunId: number
|
|
1604
|
-
operationId: number
|
|
1605
|
-
revNo: number
|
|
1606
|
-
orderDescription: string
|
|
1607
|
-
seqNo: number
|
|
1608
|
-
title: string
|
|
1609
|
-
description: string
|
|
1610
|
-
workCenterKey: string
|
|
1611
|
-
stepCount: number
|
|
1612
|
-
predecessors: array
|
|
1610
|
+
var OperationRunSchema = object({
|
|
1611
|
+
id: number(),
|
|
1612
|
+
orderRunId: number(),
|
|
1613
|
+
operationId: number(),
|
|
1614
|
+
revNo: number(),
|
|
1615
|
+
orderDescription: string(),
|
|
1616
|
+
seqNo: number(),
|
|
1617
|
+
title: string(),
|
|
1618
|
+
description: string(),
|
|
1619
|
+
workCenterKey: string().nullable(),
|
|
1620
|
+
stepCount: number().optional(),
|
|
1621
|
+
predecessors: array(OperationPredecessorSchema).optional(),
|
|
1613
1622
|
status: OperationRunStatusEnum,
|
|
1614
|
-
assignedTo: string
|
|
1615
|
-
cost: number
|
|
1616
|
-
tokens: number
|
|
1617
|
-
note: string
|
|
1623
|
+
assignedTo: string().nullable(),
|
|
1624
|
+
cost: number().nullable(),
|
|
1625
|
+
tokens: number().nullable(),
|
|
1626
|
+
note: string().nullable(),
|
|
1618
1627
|
completedAt: datetime().nullable(),
|
|
1619
|
-
stepSummary: array
|
|
1620
|
-
fieldRefSummary: array
|
|
1628
|
+
stepSummary: array(StepRunSummarySchema).optional(),
|
|
1629
|
+
fieldRefSummary: array(FieldRefValueSummarySchema).optional(),
|
|
1621
1630
|
createdAt: datetime(),
|
|
1622
|
-
createdBy: string
|
|
1631
|
+
createdBy: string(),
|
|
1623
1632
|
updatedAt: datetime(),
|
|
1624
|
-
updatedBy: string
|
|
1625
|
-
_links: array
|
|
1626
|
-
_actions: array
|
|
1633
|
+
updatedBy: string(),
|
|
1634
|
+
_links: array(HateoasLinkSchema).optional(),
|
|
1635
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1627
1636
|
});
|
|
1628
|
-
object
|
|
1629
|
-
union
|
|
1630
|
-
object
|
|
1637
|
+
object({ assignedToId: number().int().nullable().optional() }).strict();
|
|
1638
|
+
union([
|
|
1639
|
+
object({ note: string().max(2e3).optional() }).strict(),
|
|
1631
1640
|
_null(),
|
|
1632
1641
|
_undefined()
|
|
1633
1642
|
]).transform((v) => v ?? {});
|
|
1634
|
-
object
|
|
1635
|
-
id: number
|
|
1643
|
+
object({
|
|
1644
|
+
id: number(),
|
|
1636
1645
|
status: OperationRunStatusEnum,
|
|
1637
|
-
assignedTo: string
|
|
1638
|
-
cost: number
|
|
1639
|
-
tokens: number
|
|
1640
|
-
note: string
|
|
1646
|
+
assignedTo: string().nullable(),
|
|
1647
|
+
cost: number().nullable(),
|
|
1648
|
+
tokens: number().nullable(),
|
|
1649
|
+
note: string().nullable(),
|
|
1641
1650
|
completedAt: datetime().nullable(),
|
|
1642
1651
|
updatedAt: datetime(),
|
|
1643
|
-
updatedBy: string
|
|
1644
|
-
_actions: array
|
|
1652
|
+
updatedBy: string(),
|
|
1653
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1645
1654
|
});
|
|
1646
|
-
object
|
|
1647
|
-
items: array
|
|
1648
|
-
total: number
|
|
1649
|
-
_links: array
|
|
1650
|
-
_linkTemplates: array
|
|
1651
|
-
_actions: array
|
|
1655
|
+
object({
|
|
1656
|
+
items: array(OperationRunSchema),
|
|
1657
|
+
total: number(),
|
|
1658
|
+
_links: array(HateoasLinkSchema),
|
|
1659
|
+
_linkTemplates: array(HateoasLinkTemplateSchema).optional(),
|
|
1660
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1652
1661
|
});
|
|
1653
1662
|
//#endregion
|
|
1654
1663
|
//#region ../shared/dist/orders/order-revision-types.js
|
|
1655
|
-
var RevisionOperationSummarySchema = object
|
|
1656
|
-
seqNo: number
|
|
1657
|
-
title: string
|
|
1664
|
+
var RevisionOperationSummarySchema = object({
|
|
1665
|
+
seqNo: number(),
|
|
1666
|
+
title: string()
|
|
1658
1667
|
});
|
|
1659
|
-
var RevisionStatusEnum = _enum
|
|
1668
|
+
var RevisionStatusEnum = _enum([
|
|
1660
1669
|
"draft",
|
|
1661
1670
|
"approved",
|
|
1662
1671
|
"obsolete"
|
|
1663
1672
|
]);
|
|
1664
1673
|
var RevisionStatus = RevisionStatusEnum.enum;
|
|
1665
|
-
var OrderRevisionSchema = object
|
|
1666
|
-
id: number
|
|
1667
|
-
orderId: number
|
|
1668
|
-
revNo: number
|
|
1674
|
+
var OrderRevisionSchema = object({
|
|
1675
|
+
id: number(),
|
|
1676
|
+
orderId: number(),
|
|
1677
|
+
revNo: number(),
|
|
1669
1678
|
status: RevisionStatusEnum,
|
|
1670
|
-
description: string
|
|
1671
|
-
changeSummary: string
|
|
1672
|
-
itemKey: string
|
|
1673
|
-
operationSummary: array
|
|
1679
|
+
description: string(),
|
|
1680
|
+
changeSummary: string().nullable(),
|
|
1681
|
+
itemKey: string().nullable(),
|
|
1682
|
+
operationSummary: array(RevisionOperationSummarySchema).optional(),
|
|
1674
1683
|
createdAt: datetime(),
|
|
1675
|
-
createdBy: string
|
|
1684
|
+
createdBy: string(),
|
|
1676
1685
|
updatedAt: datetime(),
|
|
1677
|
-
updatedBy: string
|
|
1678
|
-
_links: array
|
|
1679
|
-
_actions: array
|
|
1686
|
+
updatedBy: string(),
|
|
1687
|
+
_links: array(HateoasLinkSchema).optional(),
|
|
1688
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1680
1689
|
});
|
|
1681
|
-
object
|
|
1682
|
-
description: string
|
|
1683
|
-
changeSummary: string
|
|
1690
|
+
object({
|
|
1691
|
+
description: string().max(2e3).optional(),
|
|
1692
|
+
changeSummary: string().max(2e3).optional()
|
|
1684
1693
|
}).strict();
|
|
1685
|
-
var UpdateOrderRevisionSchema = object
|
|
1686
|
-
description: string
|
|
1687
|
-
changeSummary: string
|
|
1694
|
+
var UpdateOrderRevisionSchema = object({
|
|
1695
|
+
description: string().max(2e3).optional(),
|
|
1696
|
+
changeSummary: string().max(2e3).optional()
|
|
1688
1697
|
}).strict();
|
|
1689
|
-
object
|
|
1698
|
+
object({
|
|
1690
1699
|
...paginationQuery(),
|
|
1691
1700
|
status: RevisionStatusEnum.optional(),
|
|
1692
|
-
includeObsolete: _enum
|
|
1701
|
+
includeObsolete: _enum(["true", "false"]).transform((v) => v === "true").optional().default(false)
|
|
1693
1702
|
});
|
|
1694
|
-
object
|
|
1695
|
-
items: array
|
|
1696
|
-
total: number
|
|
1697
|
-
page: number
|
|
1698
|
-
pageSize: number
|
|
1699
|
-
_links: array
|
|
1700
|
-
_linkTemplates: array
|
|
1701
|
-
_actions: array
|
|
1703
|
+
object({
|
|
1704
|
+
items: array(OrderRevisionSchema),
|
|
1705
|
+
total: number(),
|
|
1706
|
+
page: number(),
|
|
1707
|
+
pageSize: number(),
|
|
1708
|
+
_links: array(HateoasLinkSchema),
|
|
1709
|
+
_linkTemplates: array(HateoasLinkTemplateSchema).optional(),
|
|
1710
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1702
1711
|
});
|
|
1703
1712
|
//#endregion
|
|
1704
1713
|
//#region ../shared/dist/orders/order-run-types.js
|
|
1705
|
-
var OperationRunSummarySchema = object
|
|
1706
|
-
seqNo: number
|
|
1707
|
-
title: string
|
|
1714
|
+
var OperationRunSummarySchema = object({
|
|
1715
|
+
seqNo: number(),
|
|
1716
|
+
title: string(),
|
|
1708
1717
|
status: OperationRunStatusEnum
|
|
1709
1718
|
});
|
|
1710
|
-
var OrderRunStatusEnum = _enum
|
|
1719
|
+
var OrderRunStatusEnum = _enum([
|
|
1711
1720
|
"released",
|
|
1712
1721
|
"started",
|
|
1713
1722
|
"closed",
|
|
1714
1723
|
"cancelled"
|
|
1715
1724
|
]);
|
|
1716
1725
|
var OrderRunStatus = OrderRunStatusEnum.enum;
|
|
1717
|
-
var OrderRunPriorityEnum = _enum
|
|
1726
|
+
var OrderRunPriorityEnum = _enum([
|
|
1718
1727
|
"low",
|
|
1719
1728
|
"medium",
|
|
1720
1729
|
"high",
|
|
1721
1730
|
"critical"
|
|
1722
1731
|
]);
|
|
1723
1732
|
var OrderRunPriority = OrderRunPriorityEnum.enum;
|
|
1724
|
-
var OrderRunSchema = object
|
|
1725
|
-
id: number
|
|
1726
|
-
runNo: number
|
|
1727
|
-
orderId: number
|
|
1728
|
-
orderKey: string
|
|
1729
|
-
revNo: number
|
|
1730
|
-
description: string
|
|
1731
|
-
itemKey: string
|
|
1732
|
-
instanceId: number
|
|
1733
|
-
instanceKey: string
|
|
1733
|
+
var OrderRunSchema = object({
|
|
1734
|
+
id: number(),
|
|
1735
|
+
runNo: number(),
|
|
1736
|
+
orderId: number(),
|
|
1737
|
+
orderKey: string(),
|
|
1738
|
+
revNo: number(),
|
|
1739
|
+
description: string(),
|
|
1740
|
+
itemKey: string().nullable(),
|
|
1741
|
+
instanceId: number().nullable(),
|
|
1742
|
+
instanceKey: string().nullable(),
|
|
1734
1743
|
status: OrderRunStatusEnum,
|
|
1735
1744
|
priority: OrderRunPriorityEnum,
|
|
1736
|
-
cost: number
|
|
1737
|
-
dueAt: string
|
|
1738
|
-
releaseNote: string
|
|
1739
|
-
operationSummary: array
|
|
1745
|
+
cost: number().nullable(),
|
|
1746
|
+
dueAt: string().nullable(),
|
|
1747
|
+
releaseNote: string().nullable(),
|
|
1748
|
+
operationSummary: array(OperationRunSummarySchema).optional(),
|
|
1740
1749
|
createdAt: datetime(),
|
|
1741
|
-
createdBy: string
|
|
1750
|
+
createdBy: string(),
|
|
1742
1751
|
updatedAt: datetime(),
|
|
1743
|
-
updatedBy: string
|
|
1744
|
-
_links: array
|
|
1745
|
-
_actions: array
|
|
1752
|
+
updatedBy: string(),
|
|
1753
|
+
_links: array(HateoasLinkSchema).optional(),
|
|
1754
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1746
1755
|
});
|
|
1747
|
-
var CreateOrderRunSchema = object
|
|
1748
|
-
revNo: number
|
|
1756
|
+
var CreateOrderRunSchema = object({
|
|
1757
|
+
revNo: number().int().min(1).optional(),
|
|
1749
1758
|
priority: OrderRunPriorityEnum.optional().default("medium"),
|
|
1750
|
-
dueAt: string
|
|
1751
|
-
releaseNote: string
|
|
1759
|
+
dueAt: string().regex(/^\d{4}-\d{2}-\d{2}$/, "Must be YYYY-MM-DD"),
|
|
1760
|
+
releaseNote: string().max(2e3).optional()
|
|
1752
1761
|
}).strict();
|
|
1753
|
-
var UpdateOrderRunSchema = object
|
|
1762
|
+
var UpdateOrderRunSchema = object({
|
|
1754
1763
|
priority: OrderRunPriorityEnum.optional(),
|
|
1755
|
-
dueAt: string
|
|
1756
|
-
releaseNote: string
|
|
1764
|
+
dueAt: string().regex(/^\d{4}-\d{2}-\d{2}$/, "Must be YYYY-MM-DD").nullable().optional(),
|
|
1765
|
+
releaseNote: string().max(2e3).nullable().optional()
|
|
1757
1766
|
}).strict();
|
|
1758
|
-
object
|
|
1759
|
-
instanceKey: string
|
|
1760
|
-
quantity: number
|
|
1761
|
-
fieldValues: array
|
|
1762
|
-
fieldSeqNo: number
|
|
1763
|
-
value: string
|
|
1764
|
-
setIndex: number
|
|
1767
|
+
object({
|
|
1768
|
+
instanceKey: string().max(200).optional(),
|
|
1769
|
+
quantity: number().nullable().optional(),
|
|
1770
|
+
fieldValues: array(object({
|
|
1771
|
+
fieldSeqNo: number().int(),
|
|
1772
|
+
value: string().max(2e3),
|
|
1773
|
+
setIndex: number().int().min(0).optional()
|
|
1765
1774
|
})).optional()
|
|
1766
1775
|
}).strict();
|
|
1767
|
-
object
|
|
1776
|
+
object({
|
|
1768
1777
|
...paginationQuery(),
|
|
1769
1778
|
status: OrderRunStatusEnum.optional(),
|
|
1770
1779
|
priority: OrderRunPriorityEnum.optional(),
|
|
1771
|
-
search: string
|
|
1780
|
+
search: string().optional()
|
|
1772
1781
|
});
|
|
1773
|
-
object
|
|
1774
|
-
items: array
|
|
1775
|
-
total: number
|
|
1776
|
-
page: number
|
|
1777
|
-
pageSize: number
|
|
1778
|
-
_links: array
|
|
1779
|
-
_linkTemplates: array
|
|
1780
|
-
_actions: array
|
|
1782
|
+
object({
|
|
1783
|
+
items: array(OrderRunSchema),
|
|
1784
|
+
total: number(),
|
|
1785
|
+
page: number(),
|
|
1786
|
+
pageSize: number(),
|
|
1787
|
+
_links: array(HateoasLinkSchema),
|
|
1788
|
+
_linkTemplates: array(HateoasLinkTemplateSchema).optional(),
|
|
1789
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1781
1790
|
});
|
|
1782
|
-
object
|
|
1791
|
+
object({
|
|
1783
1792
|
...paginationQuery(),
|
|
1784
1793
|
status: OperationRunStatusEnum.optional(),
|
|
1785
1794
|
priority: OrderRunPriorityEnum.optional(),
|
|
1786
|
-
search: string
|
|
1787
|
-
viewAs: string
|
|
1788
|
-
canWork: union
|
|
1789
|
-
clockedIn: union
|
|
1795
|
+
search: string().optional(),
|
|
1796
|
+
viewAs: string().optional(),
|
|
1797
|
+
canWork: union([literal("true"), literal("false")]).transform((v) => v === "true").optional(),
|
|
1798
|
+
clockedIn: union([literal("true"), literal("false")]).transform((v) => v === "true").optional()
|
|
1790
1799
|
});
|
|
1791
|
-
object
|
|
1792
|
-
items: array
|
|
1793
|
-
id: number
|
|
1794
|
-
orderKey: string
|
|
1795
|
-
revNo: number
|
|
1796
|
-
runNo: number
|
|
1797
|
-
seqNo: number
|
|
1798
|
-
title: string
|
|
1799
|
-
workCenterKey: string
|
|
1800
|
-
canWork: boolean
|
|
1800
|
+
object({
|
|
1801
|
+
items: array(object({
|
|
1802
|
+
id: number(),
|
|
1803
|
+
orderKey: string(),
|
|
1804
|
+
revNo: number(),
|
|
1805
|
+
runNo: number(),
|
|
1806
|
+
seqNo: number(),
|
|
1807
|
+
title: string(),
|
|
1808
|
+
workCenterKey: string().nullable(),
|
|
1809
|
+
canWork: boolean(),
|
|
1801
1810
|
status: OperationRunStatusEnum,
|
|
1802
1811
|
priority: OrderRunPriorityEnum,
|
|
1803
|
-
assignedTo: string
|
|
1804
|
-
dueAt: string
|
|
1812
|
+
assignedTo: string().nullable(),
|
|
1813
|
+
dueAt: string().nullable(),
|
|
1805
1814
|
createdAt: datetime()
|
|
1806
1815
|
})),
|
|
1807
|
-
total: number
|
|
1808
|
-
page: number
|
|
1809
|
-
pageSize: number
|
|
1810
|
-
_links: array
|
|
1811
|
-
_linkTemplates: array
|
|
1812
|
-
_actionTemplates: array
|
|
1816
|
+
total: number(),
|
|
1817
|
+
page: number(),
|
|
1818
|
+
pageSize: number(),
|
|
1819
|
+
_links: array(HateoasLinkSchema),
|
|
1820
|
+
_linkTemplates: array(HateoasLinkTemplateSchema).optional(),
|
|
1821
|
+
_actionTemplates: array(HateoasActionTemplateSchema).optional()
|
|
1813
1822
|
});
|
|
1814
|
-
object
|
|
1823
|
+
object({
|
|
1815
1824
|
...paginationQuery(),
|
|
1816
1825
|
priority: OrderRunPriorityEnum.optional(),
|
|
1817
|
-
search: string
|
|
1826
|
+
search: string().optional()
|
|
1818
1827
|
});
|
|
1819
|
-
object
|
|
1820
|
-
items: array
|
|
1821
|
-
id: number
|
|
1822
|
-
orderKey: string
|
|
1823
|
-
revNo: number
|
|
1824
|
-
runNo: number
|
|
1825
|
-
description: string
|
|
1828
|
+
object({
|
|
1829
|
+
items: array(object({
|
|
1830
|
+
id: number(),
|
|
1831
|
+
orderKey: string(),
|
|
1832
|
+
revNo: number(),
|
|
1833
|
+
runNo: number(),
|
|
1834
|
+
description: string(),
|
|
1826
1835
|
status: OrderRunStatusEnum,
|
|
1827
1836
|
priority: OrderRunPriorityEnum,
|
|
1828
|
-
dueAt: string
|
|
1829
|
-
opCount: number
|
|
1837
|
+
dueAt: string().nullable(),
|
|
1838
|
+
opCount: number(),
|
|
1830
1839
|
createdAt: datetime()
|
|
1831
1840
|
})),
|
|
1832
|
-
total: number
|
|
1833
|
-
page: number
|
|
1834
|
-
pageSize: number
|
|
1835
|
-
_links: array
|
|
1836
|
-
_linkTemplates: array
|
|
1841
|
+
total: number(),
|
|
1842
|
+
page: number(),
|
|
1843
|
+
pageSize: number(),
|
|
1844
|
+
_links: array(HateoasLinkSchema),
|
|
1845
|
+
_linkTemplates: array(HateoasLinkTemplateSchema).optional()
|
|
1837
1846
|
});
|
|
1838
1847
|
/** POST create — server-generated id + self link + actions */
|
|
1839
|
-
var CreateResponseSchema = object
|
|
1840
|
-
id: number
|
|
1841
|
-
_links: array
|
|
1848
|
+
var CreateResponseSchema = object({ _actions: array(HateoasActionSchema).optional() }).extend({
|
|
1849
|
+
id: number(),
|
|
1850
|
+
_links: array(HateoasLinkSchema).optional()
|
|
1842
1851
|
});
|
|
1843
|
-
CreateResponseSchema.extend({ key: string
|
|
1844
|
-
CreateResponseSchema.extend({ seqNo: number
|
|
1845
|
-
object
|
|
1846
|
-
items: array
|
|
1847
|
-
id: number
|
|
1848
|
-
seqNo: number
|
|
1852
|
+
CreateResponseSchema.extend({ key: string() });
|
|
1853
|
+
CreateResponseSchema.extend({ seqNo: number() });
|
|
1854
|
+
object({
|
|
1855
|
+
items: array(object({
|
|
1856
|
+
id: number(),
|
|
1857
|
+
seqNo: number()
|
|
1849
1858
|
})),
|
|
1850
|
-
total: number
|
|
1851
|
-
_actions: array
|
|
1859
|
+
total: number(),
|
|
1860
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1852
1861
|
});
|
|
1853
|
-
CreateResponseSchema.extend({ revNo: number
|
|
1854
|
-
CreateResponseSchema.extend({ runNo: number
|
|
1855
|
-
object
|
|
1856
|
-
id: number
|
|
1857
|
-
username: string
|
|
1858
|
-
_links: array
|
|
1859
|
-
_actions: array
|
|
1862
|
+
CreateResponseSchema.extend({ revNo: number() });
|
|
1863
|
+
CreateResponseSchema.extend({ runNo: number() });
|
|
1864
|
+
object({
|
|
1865
|
+
id: number(),
|
|
1866
|
+
username: string(),
|
|
1867
|
+
_links: array(HateoasLinkSchema).optional(),
|
|
1868
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1860
1869
|
});
|
|
1861
|
-
object
|
|
1870
|
+
object({
|
|
1862
1871
|
status: OrderRunStatusEnum,
|
|
1863
|
-
_actions: array
|
|
1872
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1864
1873
|
});
|
|
1865
|
-
object
|
|
1874
|
+
object({
|
|
1866
1875
|
status: OperationRunStatusEnum,
|
|
1867
|
-
_actions: array
|
|
1876
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1868
1877
|
});
|
|
1869
|
-
object
|
|
1870
|
-
completed: boolean
|
|
1871
|
-
_actions: array
|
|
1878
|
+
object({
|
|
1879
|
+
completed: boolean(),
|
|
1880
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1872
1881
|
});
|
|
1873
|
-
object
|
|
1882
|
+
object({
|
|
1874
1883
|
status: RevisionStatusEnum,
|
|
1875
|
-
_actions: array
|
|
1884
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1876
1885
|
});
|
|
1877
|
-
object
|
|
1886
|
+
object({
|
|
1878
1887
|
value: FieldValueSchema,
|
|
1879
1888
|
validation: FieldValidationSchema,
|
|
1880
|
-
_actions: array
|
|
1889
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1881
1890
|
});
|
|
1882
|
-
object
|
|
1883
|
-
items: array
|
|
1884
|
-
fieldSeqNo: number
|
|
1891
|
+
object({
|
|
1892
|
+
items: array(object({
|
|
1893
|
+
fieldSeqNo: number(),
|
|
1885
1894
|
value: FieldValueSchema,
|
|
1886
1895
|
validation: FieldValidationSchema
|
|
1887
1896
|
})),
|
|
1888
|
-
total: number
|
|
1889
|
-
_actions: array
|
|
1897
|
+
total: number(),
|
|
1898
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1890
1899
|
});
|
|
1891
|
-
object
|
|
1892
|
-
setCount: number
|
|
1893
|
-
_actions: array
|
|
1900
|
+
object({
|
|
1901
|
+
setCount: number(),
|
|
1902
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1894
1903
|
});
|
|
1895
1904
|
//#endregion
|
|
1896
1905
|
//#region ../shared/dist/operations/operation-dependency-types.js
|
|
1897
|
-
var OperationDependencySchema = object
|
|
1898
|
-
id: number
|
|
1899
|
-
predecessorSeqNo: number
|
|
1900
|
-
predecessorTitle: string
|
|
1906
|
+
var OperationDependencySchema = object({
|
|
1907
|
+
id: number(),
|
|
1908
|
+
predecessorSeqNo: number(),
|
|
1909
|
+
predecessorTitle: string(),
|
|
1901
1910
|
createdAt: datetime(),
|
|
1902
|
-
createdBy: string
|
|
1911
|
+
createdBy: string()
|
|
1903
1912
|
});
|
|
1904
|
-
var CreateOperationDependencySchema = object
|
|
1905
|
-
object
|
|
1906
|
-
items: array
|
|
1907
|
-
total: number
|
|
1908
|
-
_links: array
|
|
1909
|
-
_actions: array
|
|
1910
|
-
_actionTemplates: array
|
|
1913
|
+
var CreateOperationDependencySchema = object({ predecessorSeqNo: number().int().min(1) }).strict();
|
|
1914
|
+
object({
|
|
1915
|
+
items: array(OperationDependencySchema),
|
|
1916
|
+
total: number(),
|
|
1917
|
+
_links: array(HateoasLinkSchema),
|
|
1918
|
+
_actions: array(HateoasActionSchema).optional(),
|
|
1919
|
+
_actionTemplates: array(HateoasActionTemplateSchema).optional()
|
|
1911
1920
|
});
|
|
1912
1921
|
//#endregion
|
|
1913
1922
|
//#region ../shared/dist/operations/operation-run-comment-types.js
|
|
1914
|
-
var OperationRunCommentTypeEnum = _enum
|
|
1923
|
+
var OperationRunCommentTypeEnum = _enum([
|
|
1915
1924
|
"note",
|
|
1916
1925
|
"issue",
|
|
1917
1926
|
"feedback"
|
|
1918
1927
|
]);
|
|
1919
1928
|
OperationRunCommentTypeEnum.enum;
|
|
1920
|
-
var OperationRunCommentSchema = object
|
|
1921
|
-
id: number
|
|
1922
|
-
operationRunId: number
|
|
1929
|
+
var OperationRunCommentSchema = object({
|
|
1930
|
+
id: number(),
|
|
1931
|
+
operationRunId: number(),
|
|
1923
1932
|
type: OperationRunCommentTypeEnum,
|
|
1924
|
-
body: string
|
|
1933
|
+
body: string(),
|
|
1925
1934
|
createdAt: datetime(),
|
|
1926
|
-
createdBy: string
|
|
1927
|
-
_links: array
|
|
1935
|
+
createdBy: string(),
|
|
1936
|
+
_links: array(HateoasLinkSchema).optional()
|
|
1928
1937
|
});
|
|
1929
|
-
object
|
|
1938
|
+
object({
|
|
1930
1939
|
type: OperationRunCommentTypeEnum.optional(),
|
|
1931
|
-
body: string
|
|
1940
|
+
body: string().min(1).max(5e3)
|
|
1932
1941
|
}).strict();
|
|
1933
|
-
object
|
|
1934
|
-
items: array
|
|
1935
|
-
total: number
|
|
1936
|
-
_links: array
|
|
1937
|
-
_linkTemplates: array
|
|
1938
|
-
_actions: array
|
|
1942
|
+
object({
|
|
1943
|
+
items: array(OperationRunCommentSchema),
|
|
1944
|
+
total: number(),
|
|
1945
|
+
_links: array(HateoasLinkSchema),
|
|
1946
|
+
_linkTemplates: array(HateoasLinkTemplateSchema).optional(),
|
|
1947
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1939
1948
|
});
|
|
1940
1949
|
//#endregion
|
|
1941
1950
|
//#region ../shared/dist/orders/order-types.js
|
|
1942
|
-
var OrderStatusEnum = _enum
|
|
1951
|
+
var OrderStatusEnum = _enum(["active", "archived"]);
|
|
1943
1952
|
var OrderStatus = OrderStatusEnum.enum;
|
|
1944
|
-
var OrderSchema = object
|
|
1945
|
-
id: number
|
|
1946
|
-
key: string
|
|
1947
|
-
description: string
|
|
1953
|
+
var OrderSchema = object({
|
|
1954
|
+
id: number(),
|
|
1955
|
+
key: string(),
|
|
1956
|
+
description: string(),
|
|
1948
1957
|
status: OrderStatusEnum,
|
|
1949
|
-
itemKey: string
|
|
1950
|
-
latestApprovedRevNo: number
|
|
1951
|
-
createdBy: string
|
|
1958
|
+
itemKey: string().nullable(),
|
|
1959
|
+
latestApprovedRevNo: number().int().nullable().optional(),
|
|
1960
|
+
createdBy: string(),
|
|
1952
1961
|
createdAt: datetime(),
|
|
1953
|
-
updatedBy: string
|
|
1962
|
+
updatedBy: string(),
|
|
1954
1963
|
updatedAt: datetime(),
|
|
1955
|
-
_links: array
|
|
1956
|
-
_actions: array
|
|
1964
|
+
_links: array(HateoasLinkSchema).optional(),
|
|
1965
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1957
1966
|
});
|
|
1958
|
-
var CreateOrderSchema = object
|
|
1959
|
-
key: string
|
|
1960
|
-
description: string
|
|
1961
|
-
itemKey: string
|
|
1967
|
+
var CreateOrderSchema = object({
|
|
1968
|
+
key: string().min(1).max(100).regex(/^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$/, "Key must be alphanumeric with hyphens"),
|
|
1969
|
+
description: string().max(2e3).optional().default(""),
|
|
1970
|
+
itemKey: string().max(100).optional()
|
|
1962
1971
|
}).strict();
|
|
1963
|
-
var UpdateOrderSchema = object
|
|
1964
|
-
key: string
|
|
1965
|
-
description: string
|
|
1972
|
+
var UpdateOrderSchema = object({
|
|
1973
|
+
key: string().min(1).max(100).regex(/^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$/, "Key must be alphanumeric with hyphens").optional(),
|
|
1974
|
+
description: string().max(2e3).optional(),
|
|
1966
1975
|
status: OrderStatusEnum.optional(),
|
|
1967
|
-
itemKey: string
|
|
1976
|
+
itemKey: string().max(100).nullable().optional()
|
|
1968
1977
|
}).strict();
|
|
1969
|
-
object
|
|
1978
|
+
object({
|
|
1970
1979
|
...paginationQuery(),
|
|
1971
|
-
status: _enum
|
|
1972
|
-
search: string
|
|
1980
|
+
status: _enum(["active", "archived"]).optional(),
|
|
1981
|
+
search: string().optional()
|
|
1973
1982
|
});
|
|
1974
|
-
object
|
|
1975
|
-
items: array
|
|
1976
|
-
total: number
|
|
1977
|
-
page: number
|
|
1978
|
-
pageSize: number
|
|
1979
|
-
_links: array
|
|
1980
|
-
_linkTemplates: array
|
|
1981
|
-
_actions: array
|
|
1983
|
+
object({
|
|
1984
|
+
items: array(OrderSchema),
|
|
1985
|
+
total: number(),
|
|
1986
|
+
page: number(),
|
|
1987
|
+
pageSize: number(),
|
|
1988
|
+
_links: array(HateoasLinkSchema),
|
|
1989
|
+
_linkTemplates: array(HateoasLinkTemplateSchema).optional(),
|
|
1990
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1982
1991
|
});
|
|
1983
1992
|
//#endregion
|
|
1984
1993
|
//#region ../shared/dist/production/work-center-types.js
|
|
1985
|
-
var WorkCenterUserSchema = object
|
|
1986
|
-
userId: number
|
|
1987
|
-
username: string
|
|
1988
|
-
createdAt: string
|
|
1989
|
-
createdBy: string
|
|
1990
|
-
_actions: array
|
|
1994
|
+
var WorkCenterUserSchema = object({
|
|
1995
|
+
userId: number(),
|
|
1996
|
+
username: string(),
|
|
1997
|
+
createdAt: string(),
|
|
1998
|
+
createdBy: string().nullable(),
|
|
1999
|
+
_actions: array(HateoasActionSchema).optional()
|
|
1991
2000
|
});
|
|
1992
|
-
object
|
|
1993
|
-
id: number
|
|
1994
|
-
key: string
|
|
1995
|
-
description: string
|
|
1996
|
-
userAssignments: array
|
|
2001
|
+
object({
|
|
2002
|
+
id: number(),
|
|
2003
|
+
key: string(),
|
|
2004
|
+
description: string(),
|
|
2005
|
+
userAssignments: array(WorkCenterUserSchema),
|
|
1997
2006
|
createdAt: datetime(),
|
|
1998
|
-
createdBy: string
|
|
2007
|
+
createdBy: string(),
|
|
1999
2008
|
updatedAt: datetime(),
|
|
2000
|
-
updatedBy: string
|
|
2001
|
-
_links: array
|
|
2002
|
-
_actions: array
|
|
2009
|
+
updatedBy: string(),
|
|
2010
|
+
_links: array(HateoasLinkSchema),
|
|
2011
|
+
_actions: array(HateoasActionSchema).optional()
|
|
2003
2012
|
});
|
|
2004
|
-
object
|
|
2005
|
-
key: string
|
|
2006
|
-
description: string
|
|
2013
|
+
object({
|
|
2014
|
+
key: string().min(1).max(100).regex(/^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$/, "Key must be alphanumeric with hyphens"),
|
|
2015
|
+
description: string().max(2e3).optional().default("")
|
|
2007
2016
|
}).strict();
|
|
2008
|
-
object
|
|
2009
|
-
key: string
|
|
2010
|
-
description: string
|
|
2017
|
+
object({
|
|
2018
|
+
key: string().min(1).max(100).regex(/^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$/, "Key must be alphanumeric with hyphens").optional(),
|
|
2019
|
+
description: string().max(2e3).optional()
|
|
2011
2020
|
}).strict();
|
|
2012
|
-
object
|
|
2013
|
-
object
|
|
2021
|
+
object({ username: string().min(1) }).strict();
|
|
2022
|
+
object({
|
|
2014
2023
|
...paginationQuery(),
|
|
2015
|
-
search: string
|
|
2024
|
+
search: string().optional()
|
|
2016
2025
|
});
|
|
2017
|
-
object
|
|
2018
|
-
items: array
|
|
2019
|
-
id: number
|
|
2020
|
-
key: string
|
|
2021
|
-
description: string
|
|
2022
|
-
userCount: number
|
|
2026
|
+
object({
|
|
2027
|
+
items: array(object({
|
|
2028
|
+
id: number(),
|
|
2029
|
+
key: string(),
|
|
2030
|
+
description: string(),
|
|
2031
|
+
userCount: number(),
|
|
2023
2032
|
createdAt: datetime(),
|
|
2024
|
-
createdBy: string
|
|
2033
|
+
createdBy: string(),
|
|
2025
2034
|
updatedAt: datetime(),
|
|
2026
|
-
updatedBy: string
|
|
2035
|
+
updatedBy: string()
|
|
2027
2036
|
})),
|
|
2028
|
-
total: number
|
|
2029
|
-
page: number
|
|
2030
|
-
pageSize: number
|
|
2031
|
-
_links: array
|
|
2032
|
-
_linkTemplates: array
|
|
2033
|
-
_actions: array
|
|
2037
|
+
total: number(),
|
|
2038
|
+
page: number(),
|
|
2039
|
+
pageSize: number(),
|
|
2040
|
+
_links: array(HateoasLinkSchema),
|
|
2041
|
+
_linkTemplates: array(HateoasLinkTemplateSchema).optional(),
|
|
2042
|
+
_actions: array(HateoasActionSchema).optional()
|
|
2034
2043
|
});
|
|
2035
2044
|
//#endregion
|
|
2036
2045
|
//#region ../shared/dist/revision-diff-types.js
|
|
2037
|
-
var PropertyChangeSchema = object
|
|
2038
|
-
field: string
|
|
2039
|
-
from: union
|
|
2040
|
-
string
|
|
2041
|
-
number
|
|
2042
|
-
boolean
|
|
2046
|
+
var PropertyChangeSchema = object({
|
|
2047
|
+
field: string(),
|
|
2048
|
+
from: union([
|
|
2049
|
+
string(),
|
|
2050
|
+
number(),
|
|
2051
|
+
boolean(),
|
|
2043
2052
|
_null()
|
|
2044
2053
|
]),
|
|
2045
|
-
to: union
|
|
2046
|
-
string
|
|
2047
|
-
number
|
|
2048
|
-
boolean
|
|
2054
|
+
to: union([
|
|
2055
|
+
string(),
|
|
2056
|
+
number(),
|
|
2057
|
+
boolean(),
|
|
2049
2058
|
_null()
|
|
2050
2059
|
])
|
|
2051
2060
|
});
|
|
2052
|
-
var DiffStatusEnum = _enum
|
|
2061
|
+
var DiffStatusEnum = _enum([
|
|
2053
2062
|
"added",
|
|
2054
2063
|
"removed",
|
|
2055
2064
|
"modified",
|
|
2056
2065
|
"unchanged"
|
|
2057
2066
|
]);
|
|
2058
|
-
var FieldDiffSchema = object
|
|
2059
|
-
seqNo: number
|
|
2060
|
-
label: string
|
|
2067
|
+
var FieldDiffSchema = object({
|
|
2068
|
+
seqNo: number(),
|
|
2069
|
+
label: string(),
|
|
2061
2070
|
status: DiffStatusEnum,
|
|
2062
|
-
changes: array
|
|
2071
|
+
changes: array(PropertyChangeSchema).optional()
|
|
2063
2072
|
});
|
|
2064
|
-
var StepDiffSchema = object
|
|
2065
|
-
seqNo: number
|
|
2066
|
-
title: string
|
|
2073
|
+
var StepDiffSchema = object({
|
|
2074
|
+
seqNo: number(),
|
|
2075
|
+
title: string(),
|
|
2067
2076
|
status: DiffStatusEnum,
|
|
2068
|
-
changes: array
|
|
2069
|
-
fields: array
|
|
2077
|
+
changes: array(PropertyChangeSchema).optional(),
|
|
2078
|
+
fields: array(FieldDiffSchema).optional()
|
|
2070
2079
|
});
|
|
2071
|
-
var DependencyDiffSchema = object
|
|
2072
|
-
predecessorSeqNo: number
|
|
2073
|
-
predecessorTitle: string
|
|
2074
|
-
status: _enum
|
|
2080
|
+
var DependencyDiffSchema = object({
|
|
2081
|
+
predecessorSeqNo: number(),
|
|
2082
|
+
predecessorTitle: string(),
|
|
2083
|
+
status: _enum([
|
|
2075
2084
|
"added",
|
|
2076
2085
|
"removed",
|
|
2077
2086
|
"unchanged"
|
|
2078
2087
|
])
|
|
2079
2088
|
});
|
|
2080
|
-
var OperationDiffSchema = object
|
|
2081
|
-
seqNo: number
|
|
2082
|
-
title: string
|
|
2089
|
+
var OperationDiffSchema = object({
|
|
2090
|
+
seqNo: number(),
|
|
2091
|
+
title: string(),
|
|
2083
2092
|
status: DiffStatusEnum,
|
|
2084
|
-
changes: array
|
|
2085
|
-
steps: array
|
|
2086
|
-
dependencies: array
|
|
2093
|
+
changes: array(PropertyChangeSchema).optional(),
|
|
2094
|
+
steps: array(StepDiffSchema).optional(),
|
|
2095
|
+
dependencies: array(DependencyDiffSchema).optional()
|
|
2087
2096
|
});
|
|
2088
|
-
object
|
|
2089
|
-
fromRevNo: number
|
|
2090
|
-
toRevNo: number
|
|
2091
|
-
revisionChanges: array
|
|
2092
|
-
operations: array
|
|
2097
|
+
object({
|
|
2098
|
+
fromRevNo: number(),
|
|
2099
|
+
toRevNo: number(),
|
|
2100
|
+
revisionChanges: array(PropertyChangeSchema),
|
|
2101
|
+
operations: array(OperationDiffSchema)
|
|
2093
2102
|
});
|
|
2094
|
-
object
|
|
2103
|
+
object({
|
|
2095
2104
|
from: number$1().int().min(1),
|
|
2096
2105
|
to: number$1().int().min(1)
|
|
2097
2106
|
});
|
|
2098
2107
|
//#endregion
|
|
2099
2108
|
//#region ../shared/dist/steps/labor-ticket-types.js
|
|
2100
|
-
var LaborTicketSchema = object
|
|
2101
|
-
id: number
|
|
2102
|
-
operationRunId: number
|
|
2103
|
-
userId: number
|
|
2104
|
-
username: string
|
|
2105
|
-
runId: number
|
|
2109
|
+
var LaborTicketSchema = object({
|
|
2110
|
+
id: number(),
|
|
2111
|
+
operationRunId: number(),
|
|
2112
|
+
userId: number(),
|
|
2113
|
+
username: string(),
|
|
2114
|
+
runId: number().nullable(),
|
|
2106
2115
|
clockIn: datetime(),
|
|
2107
2116
|
clockOut: datetime().nullable(),
|
|
2108
|
-
cost: number
|
|
2109
|
-
tokens: number
|
|
2117
|
+
cost: number().nullable(),
|
|
2118
|
+
tokens: number().nullable(),
|
|
2110
2119
|
createdAt: datetime(),
|
|
2111
|
-
createdBy: string
|
|
2120
|
+
createdBy: string(),
|
|
2112
2121
|
updatedAt: datetime(),
|
|
2113
|
-
updatedBy: string
|
|
2114
|
-
_links: array
|
|
2122
|
+
updatedBy: string(),
|
|
2123
|
+
_links: array(HateoasLinkSchema).optional()
|
|
2115
2124
|
});
|
|
2116
|
-
object
|
|
2117
|
-
userId: number
|
|
2118
|
-
ticketId: number
|
|
2125
|
+
object({
|
|
2126
|
+
userId: number().int().optional(),
|
|
2127
|
+
ticketId: number().int().optional()
|
|
2119
2128
|
}).strict();
|
|
2120
|
-
object
|
|
2121
|
-
items: array
|
|
2122
|
-
total: number
|
|
2123
|
-
_links: array
|
|
2124
|
-
_linkTemplates: array
|
|
2125
|
-
_actions: array
|
|
2126
|
-
_actionTemplates: array
|
|
2129
|
+
object({
|
|
2130
|
+
items: array(LaborTicketSchema),
|
|
2131
|
+
total: number(),
|
|
2132
|
+
_links: array(HateoasLinkSchema),
|
|
2133
|
+
_linkTemplates: array(HateoasLinkTemplateSchema).optional(),
|
|
2134
|
+
_actions: array(HateoasActionSchema).optional(),
|
|
2135
|
+
_actionTemplates: array(HateoasActionTemplateSchema).optional()
|
|
2127
2136
|
});
|
|
2128
2137
|
//#endregion
|
|
2129
2138
|
//#region ../shared/dist/steps/step-types.js
|
|
2130
|
-
var StepSchema = object
|
|
2131
|
-
id: number
|
|
2132
|
-
operationId: number
|
|
2133
|
-
seqNo: number
|
|
2134
|
-
title: string
|
|
2135
|
-
instructions: string
|
|
2136
|
-
multiSet: boolean
|
|
2137
|
-
fieldCount: number
|
|
2139
|
+
var StepSchema = object({
|
|
2140
|
+
id: number(),
|
|
2141
|
+
operationId: number(),
|
|
2142
|
+
seqNo: number(),
|
|
2143
|
+
title: string(),
|
|
2144
|
+
instructions: string(),
|
|
2145
|
+
multiSet: boolean(),
|
|
2146
|
+
fieldCount: number().optional(),
|
|
2138
2147
|
createdAt: datetime(),
|
|
2139
|
-
createdBy: string
|
|
2148
|
+
createdBy: string(),
|
|
2140
2149
|
updatedAt: datetime(),
|
|
2141
|
-
updatedBy: string
|
|
2150
|
+
updatedBy: string(),
|
|
2142
2151
|
fields: FieldListResponseSchema,
|
|
2143
|
-
_links: array
|
|
2144
|
-
_actions: array
|
|
2152
|
+
_links: array(HateoasLinkSchema).optional(),
|
|
2153
|
+
_actions: array(HateoasActionSchema).optional()
|
|
2145
2154
|
});
|
|
2146
|
-
var CreateStepSchema = object
|
|
2147
|
-
seqNo: number
|
|
2148
|
-
title: string
|
|
2149
|
-
instructions: string
|
|
2150
|
-
multiSet: boolean
|
|
2155
|
+
var CreateStepSchema = object({
|
|
2156
|
+
seqNo: number().int().min(1).optional(),
|
|
2157
|
+
title: string().max(200).optional(),
|
|
2158
|
+
instructions: string().max(1e4).optional(),
|
|
2159
|
+
multiSet: boolean().optional()
|
|
2151
2160
|
}).strict();
|
|
2152
|
-
object
|
|
2153
|
-
var UpdateStepSchema = object
|
|
2154
|
-
seqNo: number
|
|
2155
|
-
title: string
|
|
2156
|
-
instructions: string
|
|
2157
|
-
multiSet: boolean
|
|
2161
|
+
object({ items: array(CreateStepSchema).min(1).max(100) });
|
|
2162
|
+
var UpdateStepSchema = object({
|
|
2163
|
+
seqNo: number().int().min(1).optional(),
|
|
2164
|
+
title: string().max(200).optional(),
|
|
2165
|
+
instructions: string().max(1e4).optional(),
|
|
2166
|
+
multiSet: boolean().optional()
|
|
2158
2167
|
}).strict();
|
|
2159
|
-
object
|
|
2160
|
-
items: array
|
|
2161
|
-
total: number
|
|
2162
|
-
nextSeqNo: number
|
|
2163
|
-
_links: array
|
|
2164
|
-
_linkTemplates: array
|
|
2165
|
-
_actions: array
|
|
2168
|
+
object({
|
|
2169
|
+
items: array(StepSchema),
|
|
2170
|
+
total: number(),
|
|
2171
|
+
nextSeqNo: number(),
|
|
2172
|
+
_links: array(HateoasLinkSchema),
|
|
2173
|
+
_linkTemplates: array(HateoasLinkTemplateSchema).optional(),
|
|
2174
|
+
_actions: array(HateoasActionSchema).optional()
|
|
2166
2175
|
});
|
|
2167
2176
|
//#endregion
|
|
2168
2177
|
//#region ../shared/dist/users/auth-types.js
|
|
2169
|
-
var LoginRequestSchema = object
|
|
2170
|
-
username: string
|
|
2171
|
-
password: string
|
|
2178
|
+
var LoginRequestSchema = object({
|
|
2179
|
+
username: string().min(1),
|
|
2180
|
+
password: string().min(1)
|
|
2172
2181
|
}).strict();
|
|
2173
|
-
object
|
|
2174
|
-
id: number
|
|
2175
|
-
username: string
|
|
2176
|
-
permissions: array
|
|
2182
|
+
object({ user: object({
|
|
2183
|
+
id: number(),
|
|
2184
|
+
username: string(),
|
|
2185
|
+
permissions: array(string()).optional()
|
|
2177
2186
|
}) });
|
|
2178
2187
|
//#endregion
|
|
2179
2188
|
//#region ../shared/dist/users/user-types.js
|
|
2180
|
-
var ErpPermissionEnum = _enum
|
|
2189
|
+
var ErpPermissionEnum = _enum([
|
|
2181
2190
|
"erp_admin",
|
|
2182
2191
|
"order_planner",
|
|
2183
2192
|
"order_executor",
|
|
@@ -2185,53 +2194,53 @@ var ErpPermissionEnum = _enum$1([
|
|
|
2185
2194
|
"item_manager"
|
|
2186
2195
|
]);
|
|
2187
2196
|
ErpPermissionEnum.enum;
|
|
2188
|
-
var urlSafeUsername = string
|
|
2189
|
-
object
|
|
2197
|
+
var urlSafeUsername = string().min(1).max(64).regex(/^[a-zA-Z0-9_-]+$/, "Must contain only letters, numbers, hyphens, and underscores");
|
|
2198
|
+
object({
|
|
2190
2199
|
username: urlSafeUsername,
|
|
2191
|
-
password: string
|
|
2200
|
+
password: string().min(6)
|
|
2192
2201
|
}).strict();
|
|
2193
|
-
object
|
|
2202
|
+
object({
|
|
2194
2203
|
username: urlSafeUsername.optional(),
|
|
2195
|
-
password: string
|
|
2204
|
+
password: string().min(6).optional()
|
|
2196
2205
|
}).strict();
|
|
2197
|
-
object
|
|
2198
|
-
object
|
|
2199
|
-
object
|
|
2200
|
-
var UserPermissionSchema = object
|
|
2206
|
+
object({ permission: ErpPermissionEnum }).strict();
|
|
2207
|
+
object({ agentId: number().int() }).strict();
|
|
2208
|
+
object({ password: string().min(6) }).strict();
|
|
2209
|
+
var UserPermissionSchema = object({
|
|
2201
2210
|
permission: ErpPermissionEnum,
|
|
2202
|
-
grantedAt: string
|
|
2203
|
-
grantedBy: number
|
|
2204
|
-
_actions: array
|
|
2211
|
+
grantedAt: string(),
|
|
2212
|
+
grantedBy: number().nullable(),
|
|
2213
|
+
_actions: array(any()).optional()
|
|
2205
2214
|
});
|
|
2206
|
-
object
|
|
2207
|
-
id: number
|
|
2208
|
-
username: string
|
|
2209
|
-
isAgent: boolean
|
|
2210
|
-
createdAt: string
|
|
2211
|
-
updatedAt: string
|
|
2212
|
-
hasApiKey: boolean
|
|
2213
|
-
permissions: array
|
|
2214
|
-
_links: array
|
|
2215
|
-
_actions: array
|
|
2215
|
+
object({
|
|
2216
|
+
id: number(),
|
|
2217
|
+
username: string(),
|
|
2218
|
+
isAgent: boolean(),
|
|
2219
|
+
createdAt: string(),
|
|
2220
|
+
updatedAt: string(),
|
|
2221
|
+
hasApiKey: boolean(),
|
|
2222
|
+
permissions: array(UserPermissionSchema),
|
|
2223
|
+
_links: array(any()).optional(),
|
|
2224
|
+
_actions: array(any()).optional()
|
|
2216
2225
|
});
|
|
2217
|
-
object
|
|
2218
|
-
items: array
|
|
2219
|
-
id: number
|
|
2220
|
-
username: string
|
|
2221
|
-
isAgent: boolean
|
|
2222
|
-
createdAt: string
|
|
2223
|
-
permissionCount: number
|
|
2226
|
+
object({
|
|
2227
|
+
items: array(object({
|
|
2228
|
+
id: number(),
|
|
2229
|
+
username: string(),
|
|
2230
|
+
isAgent: boolean(),
|
|
2231
|
+
createdAt: string(),
|
|
2232
|
+
permissionCount: number()
|
|
2224
2233
|
})),
|
|
2225
|
-
total: number
|
|
2226
|
-
page: number
|
|
2227
|
-
pageSize: number
|
|
2228
|
-
_links: array
|
|
2229
|
-
_linkTemplates: array
|
|
2230
|
-
_actions: array
|
|
2234
|
+
total: number(),
|
|
2235
|
+
page: number(),
|
|
2236
|
+
pageSize: number(),
|
|
2237
|
+
_links: array(any()).optional(),
|
|
2238
|
+
_linkTemplates: array(any()).optional(),
|
|
2239
|
+
_actions: array(any()).optional()
|
|
2231
2240
|
});
|
|
2232
|
-
object
|
|
2241
|
+
object({
|
|
2233
2242
|
...paginationQuery(),
|
|
2234
|
-
search: string
|
|
2243
|
+
search: string().optional()
|
|
2235
2244
|
});
|
|
2236
2245
|
//#endregion
|
|
2237
2246
|
//#region src/components/forms/LoginModal.tsx
|
|
@@ -2554,7 +2563,7 @@ var AppLayout = ({ supervisorAuth }) => {
|
|
|
2554
2563
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(AppShell.Main, { children: [!user && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Alert, {
|
|
2555
2564
|
variant: "light",
|
|
2556
2565
|
color: "violet",
|
|
2557
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IconEye
|
|
2566
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IconEye, { size: "1rem" }),
|
|
2558
2567
|
py: 4,
|
|
2559
2568
|
radius: 0,
|
|
2560
2569
|
styles: {
|
|
@@ -11149,6 +11158,7 @@ var AppContent = () => {
|
|
|
11149
11158
|
var App = () => {
|
|
11150
11159
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MantineProvider, {
|
|
11151
11160
|
defaultColorScheme: "dark",
|
|
11161
|
+
cssVariablesResolver: v8CssVariablesResolver,
|
|
11152
11162
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DatesProvider, {
|
|
11153
11163
|
settings: { consistentWeeks: true },
|
|
11154
11164
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Notifications, { position: "top-right" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BrowserRouter, {
|