busroot-sdk 0.0.8-dev.2849643122 → 0.0.8-dev.2849999519
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/build/index.d.ts +98 -80
- package/build/index.js +132 -94
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -182,7 +182,7 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
182
182
|
code: z.ZodString;
|
|
183
183
|
title: z.ZodString;
|
|
184
184
|
description: z.ZodOptional<z.ZodString>;
|
|
185
|
-
|
|
185
|
+
trigger: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
186
186
|
type: z.ZodLiteral<"schedule">;
|
|
187
187
|
}, "strict", z.ZodTypeAny, {
|
|
188
188
|
type: "schedule";
|
|
@@ -201,11 +201,11 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
201
201
|
pattern: string;
|
|
202
202
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
203
203
|
}>, z.ZodObject<{
|
|
204
|
-
type: z.ZodLiteral<"
|
|
204
|
+
type: z.ZodLiteral<"on_demand">;
|
|
205
205
|
}, "strict", z.ZodTypeAny, {
|
|
206
|
-
type: "
|
|
206
|
+
type: "on_demand";
|
|
207
207
|
}, {
|
|
208
|
-
type: "
|
|
208
|
+
type: "on_demand";
|
|
209
209
|
}>]>>;
|
|
210
210
|
requireNotes: z.ZodOptional<z.ZodBoolean>;
|
|
211
211
|
taskListCodes: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
|
|
@@ -226,14 +226,14 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
226
226
|
title: string;
|
|
227
227
|
description?: string | undefined;
|
|
228
228
|
requireNotes?: boolean | undefined;
|
|
229
|
-
|
|
229
|
+
trigger?: {
|
|
230
230
|
type: "schedule";
|
|
231
231
|
} | {
|
|
232
232
|
type: "cron";
|
|
233
233
|
pattern: string;
|
|
234
234
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
235
235
|
} | {
|
|
236
|
-
type: "
|
|
236
|
+
type: "on_demand";
|
|
237
237
|
} | undefined;
|
|
238
238
|
taskListCodes?: {
|
|
239
239
|
code: string;
|
|
@@ -244,14 +244,14 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
244
244
|
title: string;
|
|
245
245
|
description?: string | undefined;
|
|
246
246
|
requireNotes?: boolean | undefined;
|
|
247
|
-
|
|
247
|
+
trigger?: {
|
|
248
248
|
type: "schedule";
|
|
249
249
|
} | {
|
|
250
250
|
type: "cron";
|
|
251
251
|
pattern: string;
|
|
252
252
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
253
253
|
} | {
|
|
254
|
-
type: "
|
|
254
|
+
type: "on_demand";
|
|
255
255
|
} | undefined;
|
|
256
256
|
taskListCodes?: unknown;
|
|
257
257
|
}>, "many">>;
|
|
@@ -259,7 +259,7 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
259
259
|
code: z.ZodString;
|
|
260
260
|
name: z.ZodString;
|
|
261
261
|
description: z.ZodOptional<z.ZodString>;
|
|
262
|
-
|
|
262
|
+
trigger: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
263
263
|
type: z.ZodLiteral<"schedule">;
|
|
264
264
|
}, "strict", z.ZodTypeAny, {
|
|
265
265
|
type: "schedule";
|
|
@@ -278,37 +278,37 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
278
278
|
pattern: string;
|
|
279
279
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
280
280
|
}>, z.ZodObject<{
|
|
281
|
-
type: z.ZodLiteral<"
|
|
281
|
+
type: z.ZodLiteral<"on_demand">;
|
|
282
282
|
}, "strict", z.ZodTypeAny, {
|
|
283
|
-
type: "
|
|
283
|
+
type: "on_demand";
|
|
284
284
|
}, {
|
|
285
|
-
type: "
|
|
285
|
+
type: "on_demand";
|
|
286
286
|
}>]>>;
|
|
287
287
|
}, "strict", z.ZodTypeAny, {
|
|
288
288
|
code: string;
|
|
289
289
|
name: string;
|
|
290
290
|
description?: string | undefined;
|
|
291
|
-
|
|
291
|
+
trigger?: {
|
|
292
292
|
type: "schedule";
|
|
293
293
|
} | {
|
|
294
294
|
type: "cron";
|
|
295
295
|
pattern: string;
|
|
296
296
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
297
297
|
} | {
|
|
298
|
-
type: "
|
|
298
|
+
type: "on_demand";
|
|
299
299
|
} | undefined;
|
|
300
300
|
}, {
|
|
301
301
|
code: string;
|
|
302
302
|
name: string;
|
|
303
303
|
description?: string | undefined;
|
|
304
|
-
|
|
304
|
+
trigger?: {
|
|
305
305
|
type: "schedule";
|
|
306
306
|
} | {
|
|
307
307
|
type: "cron";
|
|
308
308
|
pattern: string;
|
|
309
309
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
310
310
|
} | {
|
|
311
|
-
type: "
|
|
311
|
+
type: "on_demand";
|
|
312
312
|
} | undefined;
|
|
313
313
|
}>, "many">>;
|
|
314
314
|
skus: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -1057,14 +1057,14 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
1057
1057
|
title: string;
|
|
1058
1058
|
description?: string | undefined;
|
|
1059
1059
|
requireNotes?: boolean | undefined;
|
|
1060
|
-
|
|
1060
|
+
trigger?: {
|
|
1061
1061
|
type: "schedule";
|
|
1062
1062
|
} | {
|
|
1063
1063
|
type: "cron";
|
|
1064
1064
|
pattern: string;
|
|
1065
1065
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
1066
1066
|
} | {
|
|
1067
|
-
type: "
|
|
1067
|
+
type: "on_demand";
|
|
1068
1068
|
} | undefined;
|
|
1069
1069
|
taskListCodes?: {
|
|
1070
1070
|
code: string;
|
|
@@ -1075,14 +1075,14 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
1075
1075
|
code: string;
|
|
1076
1076
|
name: string;
|
|
1077
1077
|
description?: string | undefined;
|
|
1078
|
-
|
|
1078
|
+
trigger?: {
|
|
1079
1079
|
type: "schedule";
|
|
1080
1080
|
} | {
|
|
1081
1081
|
type: "cron";
|
|
1082
1082
|
pattern: string;
|
|
1083
1083
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
1084
1084
|
} | {
|
|
1085
|
-
type: "
|
|
1085
|
+
type: "on_demand";
|
|
1086
1086
|
} | undefined;
|
|
1087
1087
|
}[] | undefined;
|
|
1088
1088
|
skus?: {
|
|
@@ -1256,14 +1256,14 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
1256
1256
|
title: string;
|
|
1257
1257
|
description?: string | undefined;
|
|
1258
1258
|
requireNotes?: boolean | undefined;
|
|
1259
|
-
|
|
1259
|
+
trigger?: {
|
|
1260
1260
|
type: "schedule";
|
|
1261
1261
|
} | {
|
|
1262
1262
|
type: "cron";
|
|
1263
1263
|
pattern: string;
|
|
1264
1264
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
1265
1265
|
} | {
|
|
1266
|
-
type: "
|
|
1266
|
+
type: "on_demand";
|
|
1267
1267
|
} | undefined;
|
|
1268
1268
|
taskListCodes?: unknown;
|
|
1269
1269
|
}[] | undefined;
|
|
@@ -1271,14 +1271,14 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
1271
1271
|
code: string;
|
|
1272
1272
|
name: string;
|
|
1273
1273
|
description?: string | undefined;
|
|
1274
|
-
|
|
1274
|
+
trigger?: {
|
|
1275
1275
|
type: "schedule";
|
|
1276
1276
|
} | {
|
|
1277
1277
|
type: "cron";
|
|
1278
1278
|
pattern: string;
|
|
1279
1279
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
1280
1280
|
} | {
|
|
1281
|
-
type: "
|
|
1281
|
+
type: "on_demand";
|
|
1282
1282
|
} | undefined;
|
|
1283
1283
|
}[] | undefined;
|
|
1284
1284
|
skus?: {
|
|
@@ -1454,14 +1454,14 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
1454
1454
|
title: string;
|
|
1455
1455
|
description?: string | undefined;
|
|
1456
1456
|
requireNotes?: boolean | undefined;
|
|
1457
|
-
|
|
1457
|
+
trigger?: {
|
|
1458
1458
|
type: "schedule";
|
|
1459
1459
|
} | {
|
|
1460
1460
|
type: "cron";
|
|
1461
1461
|
pattern: string;
|
|
1462
1462
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
1463
1463
|
} | {
|
|
1464
|
-
type: "
|
|
1464
|
+
type: "on_demand";
|
|
1465
1465
|
} | undefined;
|
|
1466
1466
|
taskListCodes?: {
|
|
1467
1467
|
code: string;
|
|
@@ -1472,14 +1472,14 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
1472
1472
|
code: string;
|
|
1473
1473
|
name: string;
|
|
1474
1474
|
description?: string | undefined;
|
|
1475
|
-
|
|
1475
|
+
trigger?: {
|
|
1476
1476
|
type: "schedule";
|
|
1477
1477
|
} | {
|
|
1478
1478
|
type: "cron";
|
|
1479
1479
|
pattern: string;
|
|
1480
1480
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
1481
1481
|
} | {
|
|
1482
|
-
type: "
|
|
1482
|
+
type: "on_demand";
|
|
1483
1483
|
} | undefined;
|
|
1484
1484
|
}[] | undefined;
|
|
1485
1485
|
skus?: {
|
|
@@ -1656,14 +1656,14 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
1656
1656
|
title: string;
|
|
1657
1657
|
description?: string | undefined;
|
|
1658
1658
|
requireNotes?: boolean | undefined;
|
|
1659
|
-
|
|
1659
|
+
trigger?: {
|
|
1660
1660
|
type: "schedule";
|
|
1661
1661
|
} | {
|
|
1662
1662
|
type: "cron";
|
|
1663
1663
|
pattern: string;
|
|
1664
1664
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
1665
1665
|
} | {
|
|
1666
|
-
type: "
|
|
1666
|
+
type: "on_demand";
|
|
1667
1667
|
} | undefined;
|
|
1668
1668
|
taskListCodes?: unknown;
|
|
1669
1669
|
}[] | undefined;
|
|
@@ -1671,14 +1671,14 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
1671
1671
|
code: string;
|
|
1672
1672
|
name: string;
|
|
1673
1673
|
description?: string | undefined;
|
|
1674
|
-
|
|
1674
|
+
trigger?: {
|
|
1675
1675
|
type: "schedule";
|
|
1676
1676
|
} | {
|
|
1677
1677
|
type: "cron";
|
|
1678
1678
|
pattern: string;
|
|
1679
1679
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
1680
1680
|
} | {
|
|
1681
|
-
type: "
|
|
1681
|
+
type: "on_demand";
|
|
1682
1682
|
} | undefined;
|
|
1683
1683
|
}[] | undefined;
|
|
1684
1684
|
skus?: {
|
|
@@ -1855,14 +1855,14 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
1855
1855
|
title: string;
|
|
1856
1856
|
description?: string | undefined;
|
|
1857
1857
|
requireNotes?: boolean | undefined;
|
|
1858
|
-
|
|
1858
|
+
trigger?: {
|
|
1859
1859
|
type: "schedule";
|
|
1860
1860
|
} | {
|
|
1861
1861
|
type: "cron";
|
|
1862
1862
|
pattern: string;
|
|
1863
1863
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
1864
1864
|
} | {
|
|
1865
|
-
type: "
|
|
1865
|
+
type: "on_demand";
|
|
1866
1866
|
} | undefined;
|
|
1867
1867
|
taskListCodes?: {
|
|
1868
1868
|
code: string;
|
|
@@ -1873,14 +1873,14 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
1873
1873
|
code: string;
|
|
1874
1874
|
name: string;
|
|
1875
1875
|
description?: string | undefined;
|
|
1876
|
-
|
|
1876
|
+
trigger?: {
|
|
1877
1877
|
type: "schedule";
|
|
1878
1878
|
} | {
|
|
1879
1879
|
type: "cron";
|
|
1880
1880
|
pattern: string;
|
|
1881
1881
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
1882
1882
|
} | {
|
|
1883
|
-
type: "
|
|
1883
|
+
type: "on_demand";
|
|
1884
1884
|
} | undefined;
|
|
1885
1885
|
}[] | undefined;
|
|
1886
1886
|
skus?: {
|
|
@@ -2057,14 +2057,14 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
2057
2057
|
title: string;
|
|
2058
2058
|
description?: string | undefined;
|
|
2059
2059
|
requireNotes?: boolean | undefined;
|
|
2060
|
-
|
|
2060
|
+
trigger?: {
|
|
2061
2061
|
type: "schedule";
|
|
2062
2062
|
} | {
|
|
2063
2063
|
type: "cron";
|
|
2064
2064
|
pattern: string;
|
|
2065
2065
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
2066
2066
|
} | {
|
|
2067
|
-
type: "
|
|
2067
|
+
type: "on_demand";
|
|
2068
2068
|
} | undefined;
|
|
2069
2069
|
taskListCodes?: unknown;
|
|
2070
2070
|
}[] | undefined;
|
|
@@ -2072,14 +2072,14 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
2072
2072
|
code: string;
|
|
2073
2073
|
name: string;
|
|
2074
2074
|
description?: string | undefined;
|
|
2075
|
-
|
|
2075
|
+
trigger?: {
|
|
2076
2076
|
type: "schedule";
|
|
2077
2077
|
} | {
|
|
2078
2078
|
type: "cron";
|
|
2079
2079
|
pattern: string;
|
|
2080
2080
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
2081
2081
|
} | {
|
|
2082
|
-
type: "
|
|
2082
|
+
type: "on_demand";
|
|
2083
2083
|
} | undefined;
|
|
2084
2084
|
}[] | undefined;
|
|
2085
2085
|
skus?: {
|
|
@@ -2260,14 +2260,14 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
2260
2260
|
title: string;
|
|
2261
2261
|
description?: string | undefined;
|
|
2262
2262
|
requireNotes?: boolean | undefined;
|
|
2263
|
-
|
|
2263
|
+
trigger?: {
|
|
2264
2264
|
type: "schedule";
|
|
2265
2265
|
} | {
|
|
2266
2266
|
type: "cron";
|
|
2267
2267
|
pattern: string;
|
|
2268
2268
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
2269
2269
|
} | {
|
|
2270
|
-
type: "
|
|
2270
|
+
type: "on_demand";
|
|
2271
2271
|
} | undefined;
|
|
2272
2272
|
taskListCodes?: {
|
|
2273
2273
|
code: string;
|
|
@@ -2278,14 +2278,14 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
2278
2278
|
code: string;
|
|
2279
2279
|
name: string;
|
|
2280
2280
|
description?: string | undefined;
|
|
2281
|
-
|
|
2281
|
+
trigger?: {
|
|
2282
2282
|
type: "schedule";
|
|
2283
2283
|
} | {
|
|
2284
2284
|
type: "cron";
|
|
2285
2285
|
pattern: string;
|
|
2286
2286
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
2287
2287
|
} | {
|
|
2288
|
-
type: "
|
|
2288
|
+
type: "on_demand";
|
|
2289
2289
|
} | undefined;
|
|
2290
2290
|
}[] | undefined;
|
|
2291
2291
|
skus?: {
|
|
@@ -2499,14 +2499,14 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
2499
2499
|
title: string;
|
|
2500
2500
|
description?: string | undefined;
|
|
2501
2501
|
requireNotes?: boolean | undefined;
|
|
2502
|
-
|
|
2502
|
+
trigger?: {
|
|
2503
2503
|
type: "schedule";
|
|
2504
2504
|
} | {
|
|
2505
2505
|
type: "cron";
|
|
2506
2506
|
pattern: string;
|
|
2507
2507
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
2508
2508
|
} | {
|
|
2509
|
-
type: "
|
|
2509
|
+
type: "on_demand";
|
|
2510
2510
|
} | undefined;
|
|
2511
2511
|
taskListCodes?: unknown;
|
|
2512
2512
|
}[] | undefined;
|
|
@@ -2514,14 +2514,14 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
2514
2514
|
code: string;
|
|
2515
2515
|
name: string;
|
|
2516
2516
|
description?: string | undefined;
|
|
2517
|
-
|
|
2517
|
+
trigger?: {
|
|
2518
2518
|
type: "schedule";
|
|
2519
2519
|
} | {
|
|
2520
2520
|
type: "cron";
|
|
2521
2521
|
pattern: string;
|
|
2522
2522
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
2523
2523
|
} | {
|
|
2524
|
-
type: "
|
|
2524
|
+
type: "on_demand";
|
|
2525
2525
|
} | undefined;
|
|
2526
2526
|
}[] | undefined;
|
|
2527
2527
|
skus?: {
|
|
@@ -2888,14 +2888,14 @@ declare class BusrootClient {
|
|
|
2888
2888
|
title: string;
|
|
2889
2889
|
description?: string | undefined;
|
|
2890
2890
|
requireNotes?: boolean | undefined;
|
|
2891
|
-
|
|
2891
|
+
trigger?: {
|
|
2892
2892
|
type: "schedule";
|
|
2893
2893
|
} | {
|
|
2894
2894
|
type: "cron";
|
|
2895
2895
|
pattern: string;
|
|
2896
2896
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
2897
2897
|
} | {
|
|
2898
|
-
type: "
|
|
2898
|
+
type: "on_demand";
|
|
2899
2899
|
} | undefined;
|
|
2900
2900
|
taskListCodes?: unknown;
|
|
2901
2901
|
}[] | undefined;
|
|
@@ -2903,14 +2903,14 @@ declare class BusrootClient {
|
|
|
2903
2903
|
code: string;
|
|
2904
2904
|
name: string;
|
|
2905
2905
|
description?: string | undefined;
|
|
2906
|
-
|
|
2906
|
+
trigger?: {
|
|
2907
2907
|
type: "schedule";
|
|
2908
2908
|
} | {
|
|
2909
2909
|
type: "cron";
|
|
2910
2910
|
pattern: string;
|
|
2911
2911
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
2912
2912
|
} | {
|
|
2913
|
-
type: "
|
|
2913
|
+
type: "on_demand";
|
|
2914
2914
|
} | undefined;
|
|
2915
2915
|
}[] | undefined;
|
|
2916
2916
|
skus?: {
|
|
@@ -3130,14 +3130,14 @@ declare class BusrootClient {
|
|
|
3130
3130
|
title: string;
|
|
3131
3131
|
description?: string | undefined;
|
|
3132
3132
|
requireNotes?: boolean | undefined;
|
|
3133
|
-
|
|
3133
|
+
trigger?: {
|
|
3134
3134
|
type: "schedule";
|
|
3135
3135
|
} | {
|
|
3136
3136
|
type: "cron";
|
|
3137
3137
|
pattern: string;
|
|
3138
3138
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
3139
3139
|
} | {
|
|
3140
|
-
type: "
|
|
3140
|
+
type: "on_demand";
|
|
3141
3141
|
} | undefined;
|
|
3142
3142
|
taskListCodes?: unknown;
|
|
3143
3143
|
}[] | undefined;
|
|
@@ -3145,14 +3145,14 @@ declare class BusrootClient {
|
|
|
3145
3145
|
code: string;
|
|
3146
3146
|
name: string;
|
|
3147
3147
|
description?: string | undefined;
|
|
3148
|
-
|
|
3148
|
+
trigger?: {
|
|
3149
3149
|
type: "schedule";
|
|
3150
3150
|
} | {
|
|
3151
3151
|
type: "cron";
|
|
3152
3152
|
pattern: string;
|
|
3153
3153
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
3154
3154
|
} | {
|
|
3155
|
-
type: "
|
|
3155
|
+
type: "on_demand";
|
|
3156
3156
|
} | undefined;
|
|
3157
3157
|
}[] | undefined;
|
|
3158
3158
|
skus?: {
|
|
@@ -3645,14 +3645,14 @@ declare class BusrootClient {
|
|
|
3645
3645
|
requiredTasks?: {
|
|
3646
3646
|
code: string;
|
|
3647
3647
|
title: string;
|
|
3648
|
-
|
|
3648
|
+
trigger: {
|
|
3649
3649
|
type: "schedule";
|
|
3650
3650
|
} | {
|
|
3651
3651
|
type: "cron";
|
|
3652
3652
|
pattern: string;
|
|
3653
3653
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
3654
3654
|
} | {
|
|
3655
|
-
type: "
|
|
3655
|
+
type: "on_demand";
|
|
3656
3656
|
};
|
|
3657
3657
|
taskListCode: string;
|
|
3658
3658
|
description?: string | undefined;
|
|
@@ -4217,37 +4217,55 @@ declare class BusrootClient {
|
|
|
4217
4217
|
stationCodes?: string[] | null | undefined;
|
|
4218
4218
|
stationGroupCodes?: string[] | null | undefined;
|
|
4219
4219
|
}>;
|
|
4220
|
-
"
|
|
4220
|
+
"taskList.createUpdate": (args_0: {
|
|
4221
4221
|
code: string;
|
|
4222
|
-
|
|
4222
|
+
name: string;
|
|
4223
|
+
trigger: {
|
|
4224
|
+
type: "schedule";
|
|
4225
|
+
} | {
|
|
4226
|
+
type: "cron";
|
|
4227
|
+
pattern: string;
|
|
4228
|
+
availableBeforeDeadlineMinutes?: number | undefined;
|
|
4229
|
+
} | {
|
|
4230
|
+
type: "on_demand";
|
|
4231
|
+
};
|
|
4223
4232
|
description?: string | undefined;
|
|
4224
|
-
|
|
4225
|
-
|
|
4233
|
+
}, ...args: unknown[]) => Promise<{
|
|
4234
|
+
code: string;
|
|
4235
|
+
name: string;
|
|
4236
|
+
description?: string | undefined;
|
|
4237
|
+
trigger?: {
|
|
4226
4238
|
type: "schedule";
|
|
4227
4239
|
} | {
|
|
4228
4240
|
type: "cron";
|
|
4229
4241
|
pattern: string;
|
|
4230
4242
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
4231
4243
|
} | {
|
|
4232
|
-
type: "
|
|
4244
|
+
type: "on_demand";
|
|
4233
4245
|
} | undefined;
|
|
4234
|
-
|
|
4246
|
+
}>;
|
|
4247
|
+
"task.createUpdate": (args_0: {
|
|
4248
|
+
code: string;
|
|
4249
|
+
title: string;
|
|
4250
|
+
taskListCodes: {
|
|
4235
4251
|
code: string;
|
|
4236
|
-
order
|
|
4237
|
-
}[]
|
|
4252
|
+
order: number;
|
|
4253
|
+
}[];
|
|
4254
|
+
description?: string | undefined;
|
|
4255
|
+
requireNotes?: boolean | undefined;
|
|
4238
4256
|
}, ...args: unknown[]) => Promise<{
|
|
4239
4257
|
code: string;
|
|
4240
4258
|
title: string;
|
|
4241
4259
|
description?: string | undefined;
|
|
4242
4260
|
requireNotes?: boolean | undefined;
|
|
4243
|
-
|
|
4261
|
+
trigger?: {
|
|
4244
4262
|
type: "schedule";
|
|
4245
4263
|
} | {
|
|
4246
4264
|
type: "cron";
|
|
4247
4265
|
pattern: string;
|
|
4248
4266
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
4249
4267
|
} | {
|
|
4250
|
-
type: "
|
|
4268
|
+
type: "on_demand";
|
|
4251
4269
|
} | undefined;
|
|
4252
4270
|
taskListCodes?: unknown;
|
|
4253
4271
|
}>;
|
|
@@ -6431,7 +6449,7 @@ declare const StationViewModel: z.ZodObject<{
|
|
|
6431
6449
|
taskListCode: z.ZodString;
|
|
6432
6450
|
taskListName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6433
6451
|
taskListDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6434
|
-
|
|
6452
|
+
trigger: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
6435
6453
|
type: z.ZodLiteral<"schedule">;
|
|
6436
6454
|
}, "strict", z.ZodTypeAny, {
|
|
6437
6455
|
type: "schedule";
|
|
@@ -6450,11 +6468,11 @@ declare const StationViewModel: z.ZodObject<{
|
|
|
6450
6468
|
pattern: string;
|
|
6451
6469
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
6452
6470
|
}>, z.ZodObject<{
|
|
6453
|
-
type: z.ZodLiteral<"
|
|
6471
|
+
type: z.ZodLiteral<"on_demand">;
|
|
6454
6472
|
}, "strict", z.ZodTypeAny, {
|
|
6455
|
-
type: "
|
|
6473
|
+
type: "on_demand";
|
|
6456
6474
|
}, {
|
|
6457
|
-
type: "
|
|
6475
|
+
type: "on_demand";
|
|
6458
6476
|
}>]>;
|
|
6459
6477
|
order: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
6460
6478
|
completedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -6465,14 +6483,14 @@ declare const StationViewModel: z.ZodObject<{
|
|
|
6465
6483
|
}, "strict", z.ZodTypeAny, {
|
|
6466
6484
|
code: string;
|
|
6467
6485
|
title: string;
|
|
6468
|
-
|
|
6486
|
+
trigger: {
|
|
6469
6487
|
type: "schedule";
|
|
6470
6488
|
} | {
|
|
6471
6489
|
type: "cron";
|
|
6472
6490
|
pattern: string;
|
|
6473
6491
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
6474
6492
|
} | {
|
|
6475
|
-
type: "
|
|
6493
|
+
type: "on_demand";
|
|
6476
6494
|
};
|
|
6477
6495
|
taskListCode: string;
|
|
6478
6496
|
description?: string | undefined;
|
|
@@ -6492,14 +6510,14 @@ declare const StationViewModel: z.ZodObject<{
|
|
|
6492
6510
|
}, {
|
|
6493
6511
|
code: string;
|
|
6494
6512
|
title: string;
|
|
6495
|
-
|
|
6513
|
+
trigger: {
|
|
6496
6514
|
type: "schedule";
|
|
6497
6515
|
} | {
|
|
6498
6516
|
type: "cron";
|
|
6499
6517
|
pattern: string;
|
|
6500
6518
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
6501
6519
|
} | {
|
|
6502
|
-
type: "
|
|
6520
|
+
type: "on_demand";
|
|
6503
6521
|
};
|
|
6504
6522
|
taskListCode: string;
|
|
6505
6523
|
description?: string | undefined;
|
|
@@ -6661,14 +6679,14 @@ declare const StationViewModel: z.ZodObject<{
|
|
|
6661
6679
|
requiredTasks?: {
|
|
6662
6680
|
code: string;
|
|
6663
6681
|
title: string;
|
|
6664
|
-
|
|
6682
|
+
trigger: {
|
|
6665
6683
|
type: "schedule";
|
|
6666
6684
|
} | {
|
|
6667
6685
|
type: "cron";
|
|
6668
6686
|
pattern: string;
|
|
6669
6687
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
6670
6688
|
} | {
|
|
6671
|
-
type: "
|
|
6689
|
+
type: "on_demand";
|
|
6672
6690
|
};
|
|
6673
6691
|
taskListCode: string;
|
|
6674
6692
|
description?: string | undefined;
|
|
@@ -6833,14 +6851,14 @@ declare const StationViewModel: z.ZodObject<{
|
|
|
6833
6851
|
requiredTasks?: {
|
|
6834
6852
|
code: string;
|
|
6835
6853
|
title: string;
|
|
6836
|
-
|
|
6854
|
+
trigger: {
|
|
6837
6855
|
type: "schedule";
|
|
6838
6856
|
} | {
|
|
6839
6857
|
type: "cron";
|
|
6840
6858
|
pattern: string;
|
|
6841
6859
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
6842
6860
|
} | {
|
|
6843
|
-
type: "
|
|
6861
|
+
type: "on_demand";
|
|
6844
6862
|
};
|
|
6845
6863
|
taskListCode: string;
|
|
6846
6864
|
description?: string | undefined;
|
package/build/index.js
CHANGED
|
@@ -152,17 +152,17 @@ var require_task = __commonJS({
|
|
|
152
152
|
"../../packages/common/build/schemas/task.js"(exports2) {
|
|
153
153
|
"use strict";
|
|
154
154
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
155
|
-
exports2.TaskSchema = exports2.TaskListMembershipsSchema = exports2.TaskListMembershipSchema = exports2.TASK_LIST_ORDER_RANGE_MESSAGE = exports2.TASK_LIST_ORDER_MAX = exports2.TaskListSchema = exports2.TaskDescriptionSchema = exports2.TaskNameSchema = exports2.TaskCodeSchema = exports2.
|
|
155
|
+
exports2.TaskSchema = exports2.TaskListMembershipsSchema = exports2.TaskListMembershipSchema = exports2.TASK_LIST_ORDER_RANGE_MESSAGE = exports2.TASK_LIST_ORDER_MAX = exports2.TaskListSchema = exports2.TaskDescriptionSchema = exports2.TaskNameSchema = exports2.TaskCodeSchema = exports2.TaskTriggerSchema = exports2.TASK_TRIGGER_TYPE_ON_DEMAND = exports2.TASK_TRIGGER_TYPE_CRON = exports2.TASK_TRIGGER_TYPE_SCHEDULE = void 0;
|
|
156
156
|
var zod_1 = require("zod");
|
|
157
|
-
exports2.
|
|
158
|
-
exports2.
|
|
159
|
-
exports2.
|
|
160
|
-
exports2.
|
|
157
|
+
exports2.TASK_TRIGGER_TYPE_SCHEDULE = "schedule";
|
|
158
|
+
exports2.TASK_TRIGGER_TYPE_CRON = "cron";
|
|
159
|
+
exports2.TASK_TRIGGER_TYPE_ON_DEMAND = "on_demand";
|
|
160
|
+
exports2.TaskTriggerSchema = zod_1.z.discriminatedUnion("type", [
|
|
161
161
|
zod_1.z.object({
|
|
162
|
-
type: zod_1.z.literal(exports2.
|
|
162
|
+
type: zod_1.z.literal(exports2.TASK_TRIGGER_TYPE_SCHEDULE).describe("Once per production schedule: pending from when the schedule starts, missed if it ends first.")
|
|
163
163
|
}).strict(),
|
|
164
164
|
zod_1.z.object({
|
|
165
|
-
type: zod_1.z.literal(exports2.
|
|
165
|
+
type: zod_1.z.literal(exports2.TASK_TRIGGER_TYPE_CRON),
|
|
166
166
|
pattern: zod_1.z.string().min(1).describe("Standard 5-field cron pattern (minute hour day-of-month month day-of-week), evaluated in the station's plant timezone"),
|
|
167
167
|
// Optional at the schema level so pre-existing cron Tasks (written before this
|
|
168
168
|
// field existed) still parse — the admin form/API require it for new/edited
|
|
@@ -173,9 +173,9 @@ var require_task = __commonJS({
|
|
|
173
173
|
// again the moment it is completed, so it has no "Missed" or "Pending" notion and the
|
|
174
174
|
// expectation tick deliberately writes nothing for it.
|
|
175
175
|
zod_1.z.object({
|
|
176
|
-
type: zod_1.z.literal(exports2.
|
|
176
|
+
type: zod_1.z.literal(exports2.TASK_TRIGGER_TYPE_ON_DEMAND).describe("On Demand: no deadline; the operator starts the list from the tablet whenever it is needed.")
|
|
177
177
|
}).strict()
|
|
178
|
-
]).describe("
|
|
178
|
+
]).describe("What makes this Task pending. 'schedule' = once per production schedule; 'cron' = at every fire of a cron pattern (Timer); 'on_demand' = whenever the operator starts the list from the tablet; never missed for time.");
|
|
179
179
|
exports2.TaskCodeSchema = zod_1.z.string().trim().min(1).max(32).regex(/^([a-zA-Z0-9-_]+)$/, {
|
|
180
180
|
message: "Only allowed 0-9, A-Z, and -_"
|
|
181
181
|
});
|
|
@@ -187,9 +187,9 @@ var require_task = __commonJS({
|
|
|
187
187
|
// Optional at the schema level so a list saved without one still parses. Lengths and the
|
|
188
188
|
// required-ness of `name`/`code` are enforced on the write path — see `TaskCodeSchema`.
|
|
189
189
|
description: zod_1.z.string().optional().describe("Detailed description of what this Task list groups together"),
|
|
190
|
-
// Optional at the schema level so lists written before
|
|
190
|
+
// Optional at the schema level so lists written before trigger moved here still parse; the
|
|
191
191
|
// write path requires it. A list without one behaves as per-schedule, the pre-move default.
|
|
192
|
-
|
|
192
|
+
trigger: exports2.TaskTriggerSchema.optional().describe("What makes every Task in this list pending. Set on the list, not the Task \u2014 all Tasks in a list share it.")
|
|
193
193
|
}).strict();
|
|
194
194
|
exports2.TASK_LIST_ORDER_MAX = 100;
|
|
195
195
|
exports2.TASK_LIST_ORDER_RANGE_MESSAGE = `Order must be greater than 0 and at most ${exports2.TASK_LIST_ORDER_MAX}`;
|
|
@@ -206,14 +206,14 @@ var require_task = __commonJS({
|
|
|
206
206
|
// Optional at the schema level so a Task saved without one still parses. Lengths and the
|
|
207
207
|
// required-ness of `title`/`code` are enforced on the write path — see `TaskCodeSchema`.
|
|
208
208
|
description: zod_1.z.string().optional().describe("Detailed description of the Task and its purpose"),
|
|
209
|
-
// Legacy:
|
|
209
|
+
// Legacy: trigger now lives on the Task list, so every Task in a list shares it. Kept here
|
|
210
210
|
// so stored manifests still parse and so Task History can still label a completion whose list
|
|
211
211
|
// has since been deleted — nothing else reads it, and no write path sets it any more.
|
|
212
212
|
//
|
|
213
|
-
// `.optional()`, not `.default()`: a default would put a meaningless per-schedule
|
|
213
|
+
// `.optional()`, not `.default()`: a default would put a meaningless per-schedule trigger on
|
|
214
214
|
// every Task the code constructs, and make the field look required to every caller building a
|
|
215
215
|
// Task. Absent is the honest value for a Task written since the move.
|
|
216
|
-
|
|
216
|
+
trigger: exports2.TaskTriggerSchema.optional(),
|
|
217
217
|
// Optional at the schema level so pre-existing Tasks (written before this field existed) still
|
|
218
218
|
// parse — absent means notes are not required, the pre-feature behaviour.
|
|
219
219
|
requireNotes: zod_1.z.boolean().optional().describe("When enabled, operators must enter notes before this Task can be confirmed as complete."),
|
|
@@ -225,6 +225,61 @@ var require_task = __commonJS({
|
|
|
225
225
|
}
|
|
226
226
|
});
|
|
227
227
|
|
|
228
|
+
// ../../packages/common/build/api-schemas/task.js
|
|
229
|
+
var require_task2 = __commonJS({
|
|
230
|
+
"../../packages/common/build/api-schemas/task.js"(exports2) {
|
|
231
|
+
"use strict";
|
|
232
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
233
|
+
exports2.TaskDeleteRequest = exports2.TaskPostRequest = void 0;
|
|
234
|
+
var zod_1 = require("zod");
|
|
235
|
+
var task_1 = require_task();
|
|
236
|
+
exports2.TaskPostRequest = task_1.TaskSchema.omit({ trigger: true }).extend({
|
|
237
|
+
code: task_1.TaskCodeSchema.describe("Unique Task code used to reference this procedure (e.g., 'TASK-001', 'STARTUP-CHECK'). Must be unique within the account."),
|
|
238
|
+
title: task_1.TaskNameSchema.describe("Human-readable title of the Task (e.g., 'Machine Startup Checklist', 'Quality Inspection Procedure')"),
|
|
239
|
+
description: task_1.TaskDescriptionSchema.describe("Detailed description of the Task and its purpose"),
|
|
240
|
+
// Membership is what scopes a Task to a station and what gives it a trigger, so a Task with no
|
|
241
|
+
// list would be invisible everywhere — rejected here rather than saved into limbo. The manifest
|
|
242
|
+
// schema stays permissive so pre-existing listless Tasks keep parsing; only new writes conform.
|
|
243
|
+
//
|
|
244
|
+
// `order` is required per entry for the same reason it is optional in the manifest: the display
|
|
245
|
+
// order has to exist for new Tasks, but back-filling it onto stored ones would be a migration.
|
|
246
|
+
// It is bounded here and nowhere in the manifest schema, so a stored order outside the bounds
|
|
247
|
+
// keeps loading and only has to conform when the Task is next saved.
|
|
248
|
+
// `TaskService.save` fills in the next whole number when a caller omits the whole membership
|
|
249
|
+
// list entry, which is what makes the SDK path workable.
|
|
250
|
+
taskListCodes: zod_1.z.array(task_1.TaskListMembershipSchema.required({ order: true }).extend({
|
|
251
|
+
order: zod_1.z.number().gt(0, task_1.TASK_LIST_ORDER_RANGE_MESSAGE).max(task_1.TASK_LIST_ORDER_MAX, task_1.TASK_LIST_ORDER_RANGE_MESSAGE)
|
|
252
|
+
})).min(1, "A Task must belong to at least one Task list").describe("The Task lists this Task belongs to, with its display order within each. At least one is required.")
|
|
253
|
+
});
|
|
254
|
+
exports2.TaskDeleteRequest = zod_1.z.object({
|
|
255
|
+
code: zod_1.z.string()
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
// ../../packages/common/build/api-schemas/task-list.js
|
|
261
|
+
var require_task_list = __commonJS({
|
|
262
|
+
"../../packages/common/build/api-schemas/task-list.js"(exports2) {
|
|
263
|
+
"use strict";
|
|
264
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
265
|
+
exports2.TaskListDeleteRequest = exports2.TaskListPostRequest = void 0;
|
|
266
|
+
var zod_1 = require("zod");
|
|
267
|
+
var task_1 = require_task();
|
|
268
|
+
exports2.TaskListPostRequest = task_1.TaskListSchema.extend({
|
|
269
|
+
code: task_1.TaskCodeSchema.describe("Unique Task list code used to reference this list (e.g., 'DAILY-CHECKS'). Must be unique within the account."),
|
|
270
|
+
name: task_1.TaskNameSchema.describe("Human-readable name of the Task list (e.g., 'Daily Checks')"),
|
|
271
|
+
description: task_1.TaskDescriptionSchema.describe("Detailed description of what this Task list groups together"),
|
|
272
|
+
// Required here, optional on the manifest schema: every Task in the list follows this, so a list
|
|
273
|
+
// without one would leave its Tasks with no defined timing. Lists stored before trigger moved
|
|
274
|
+
// here keep parsing and fall back to per-schedule (see `taskListUtils.taskListTrigger`).
|
|
275
|
+
trigger: task_1.TaskTriggerSchema.describe("What makes every Task in this list pending: each production schedule, a timer (cron pattern), or the operator starting the list on demand.")
|
|
276
|
+
});
|
|
277
|
+
exports2.TaskListDeleteRequest = zod_1.z.object({
|
|
278
|
+
code: zod_1.z.string()
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
|
|
228
283
|
// ../../packages/common/build/feature-flags/types.js
|
|
229
284
|
var require_types = __commonJS({
|
|
230
285
|
"../../packages/common/build/feature-flags/types.js"(exports2) {
|
|
@@ -2559,7 +2614,7 @@ var require_schedule = __commonJS({
|
|
|
2559
2614
|
"../../packages/common/build/schemas/schedule.js"(exports2) {
|
|
2560
2615
|
"use strict";
|
|
2561
2616
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2562
|
-
exports2.ScheduleLogSchema = exports2.ScheduleQueryResult = exports2.ScheduleSchema = exports2.ScheduleIdSchema = exports2.SCHEDULE_LOG_MODEL = exports2.SCHEDULE_MODEL = exports2.MAX_PARTS_PER_CYCLE = void 0;
|
|
2617
|
+
exports2.ScheduleLogSchema = exports2.ScheduleQueryResult = exports2.ScheduleSchema = exports2.ScheduleIdSchema = exports2.SCHEDULE_LOG_MODEL = exports2.SCHEDULE_MODEL = exports2.MAX_PLANNED_QUANTITY = exports2.MAX_PARTS_PER_CYCLE = void 0;
|
|
2563
2618
|
var zod_1 = require("zod");
|
|
2564
2619
|
var shared_1 = require_shared();
|
|
2565
2620
|
var time_1 = require_time();
|
|
@@ -2567,6 +2622,7 @@ var require_schedule = __commonJS({
|
|
|
2567
2622
|
var sku_1 = require_sku();
|
|
2568
2623
|
var base_reason_1 = require_base_reason();
|
|
2569
2624
|
exports2.MAX_PARTS_PER_CYCLE = 99999;
|
|
2625
|
+
exports2.MAX_PLANNED_QUANTITY = 9999999;
|
|
2570
2626
|
exports2.SCHEDULE_MODEL = "schedule";
|
|
2571
2627
|
exports2.SCHEDULE_LOG_MODEL = "schedule_log";
|
|
2572
2628
|
exports2.ScheduleIdSchema = zod_1.z.coerce.number().int().gt(0);
|
|
@@ -2576,7 +2632,7 @@ var require_schedule = __commonJS({
|
|
|
2576
2632
|
stationCode: base_station_1.StationCodeSchema.describe("Station: Select the Station to be scheduled."),
|
|
2577
2633
|
plannedStartAt: shared_1.BusrootDateTime.nullish().describe("Planned Start: Enter the planned start time."),
|
|
2578
2634
|
plannedEndAt: shared_1.BusrootDateTime.nullish().describe("Planned End: Enter the planned end time."),
|
|
2579
|
-
plannedQuantity: zod_1.z.number().int().gt(0).lte(
|
|
2635
|
+
plannedQuantity: zod_1.z.number().int().gt(0).lte(exports2.MAX_PLANNED_QUANTITY).nullish().describe("Qty: Enter the target quantity."),
|
|
2580
2636
|
skuCode: sku_1.SkuCodeSchema.nullish().describe("Individual SKU: Select the SKU to be produced."),
|
|
2581
2637
|
workOrderReference: zod_1.z.string().trim().nullish().describe("Work Order Ref.: Add a reference to the schedule. Schedules with the same reference will be grouped in Production by WO Ref."),
|
|
2582
2638
|
workOrderItemReference: zod_1.z.string().trim().nullish().describe("Work Order Item Ref.: A per-row unique identifier for the schedule. On upload, rows with a workOrderItemReference that already exists in the account are ignored so re-uploads do not duplicate schedules."),
|
|
@@ -2620,15 +2676,11 @@ var require_task_completion = __commonJS({
|
|
|
2620
2676
|
"../../packages/common/build/schemas/task-completion.js"(exports2) {
|
|
2621
2677
|
"use strict";
|
|
2622
2678
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2623
|
-
exports2.TaskCompletionSchema = exports2.
|
|
2679
|
+
exports2.TaskCompletionSchema = exports2.TaskCompletionTriggerTypeSchema = exports2.TASK_COMPLETION_MODEL = void 0;
|
|
2624
2680
|
var zod_1 = require("zod");
|
|
2625
2681
|
var task_1 = require_task();
|
|
2626
2682
|
exports2.TASK_COMPLETION_MODEL = "task_completion";
|
|
2627
|
-
exports2.
|
|
2628
|
-
task_1.TASK_FREQUENCY_TYPE_SCHEDULE,
|
|
2629
|
-
task_1.TASK_FREQUENCY_TYPE_CRON,
|
|
2630
|
-
task_1.TASK_FREQUENCY_TYPE_ALWAYS
|
|
2631
|
-
]);
|
|
2683
|
+
exports2.TaskCompletionTriggerTypeSchema = zod_1.z.enum([task_1.TASK_TRIGGER_TYPE_SCHEDULE, task_1.TASK_TRIGGER_TYPE_CRON, task_1.TASK_TRIGGER_TYPE_ON_DEMAND]);
|
|
2632
2684
|
exports2.TaskCompletionSchema = zod_1.z.object({
|
|
2633
2685
|
id: zod_1.z.number(),
|
|
2634
2686
|
accountId: zod_1.z.string(),
|
|
@@ -2639,10 +2691,10 @@ var require_task_completion = __commonJS({
|
|
|
2639
2691
|
// Nullish only because rows written before Task lists became the unit of operation kept their
|
|
2640
2692
|
// NULL — see migration 20260909143000. Every write path sets it.
|
|
2641
2693
|
taskListCode: zod_1.z.string().nullish(),
|
|
2642
|
-
|
|
2643
|
-
// Set iff `
|
|
2694
|
+
triggerType: exports2.TaskCompletionTriggerTypeSchema,
|
|
2695
|
+
// Set iff `triggerType` is `schedule`.
|
|
2644
2696
|
scheduleId: zod_1.z.number().nullish(),
|
|
2645
|
-
// The deadline. Set iff `
|
|
2697
|
+
// The deadline. Set iff `triggerType` is `cron` — a per-schedule or On Demand row has no
|
|
2646
2698
|
// specific end time, so `createdAt` is the only timing it carries.
|
|
2647
2699
|
expectedAt: zod_1.z.string().nullish(),
|
|
2648
2700
|
completedAt: zod_1.z.string().nullish(),
|
|
@@ -2652,7 +2704,7 @@ var require_task_completion = __commonJS({
|
|
|
2652
2704
|
completedUserId: zod_1.z.number().nullish(),
|
|
2653
2705
|
completedOperatorInitials: zod_1.z.string().nullish(),
|
|
2654
2706
|
// Free-text detail recorded at completion time. Mandatory when the Task has `requireNotes` —
|
|
2655
|
-
// enforced at the completion API, not here, so
|
|
2707
|
+
// enforced at the completion API, not here, so pending rows can be written noteless.
|
|
2656
2708
|
note: zod_1.z.string().nullish(),
|
|
2657
2709
|
createdAt: zod_1.z.string(),
|
|
2658
2710
|
updatedAt: zod_1.z.string()
|
|
@@ -6641,74 +6693,20 @@ var require_note2 = __commonJS({
|
|
|
6641
6693
|
}
|
|
6642
6694
|
});
|
|
6643
6695
|
|
|
6644
|
-
// ../../packages/common/build/api-schemas/task.js
|
|
6645
|
-
var require_task2 = __commonJS({
|
|
6646
|
-
"../../packages/common/build/api-schemas/task.js"(exports2) {
|
|
6647
|
-
"use strict";
|
|
6648
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6649
|
-
exports2.TaskDeleteRequest = exports2.TaskPostRequest = void 0;
|
|
6650
|
-
var zod_1 = require("zod");
|
|
6651
|
-
var task_1 = require_task();
|
|
6652
|
-
exports2.TaskPostRequest = task_1.TaskSchema.omit({ frequency: true }).extend({
|
|
6653
|
-
code: task_1.TaskCodeSchema.describe("Unique Task code used to reference this procedure (e.g., 'TASK-001', 'STARTUP-CHECK'). Must be unique within the account."),
|
|
6654
|
-
title: task_1.TaskNameSchema.describe("Human-readable title of the Task (e.g., 'Machine Startup Checklist', 'Quality Inspection Procedure')"),
|
|
6655
|
-
description: task_1.TaskDescriptionSchema.describe("Detailed description of the Task and its purpose"),
|
|
6656
|
-
// Membership is what scopes a Task to a station and what gives it a frequency, so a Task with no
|
|
6657
|
-
// list would be invisible everywhere — rejected here rather than saved into limbo. The manifest
|
|
6658
|
-
// schema stays permissive so pre-existing listless Tasks keep parsing; only new writes conform.
|
|
6659
|
-
//
|
|
6660
|
-
// `order` is required per entry for the same reason it is optional in the manifest: the display
|
|
6661
|
-
// order has to exist for new Tasks, but back-filling it onto stored ones would be a migration.
|
|
6662
|
-
// It is bounded here and nowhere in the manifest schema, so a stored order outside the bounds
|
|
6663
|
-
// keeps loading and only has to conform when the Task is next saved.
|
|
6664
|
-
// `TaskService.save` fills in the next whole number when a caller omits the whole membership
|
|
6665
|
-
// list entry, which is what makes the SDK path workable.
|
|
6666
|
-
taskListCodes: zod_1.z.array(task_1.TaskListMembershipSchema.required({ order: true }).extend({
|
|
6667
|
-
order: zod_1.z.number().gt(0, task_1.TASK_LIST_ORDER_RANGE_MESSAGE).max(task_1.TASK_LIST_ORDER_MAX, task_1.TASK_LIST_ORDER_RANGE_MESSAGE)
|
|
6668
|
-
})).min(1, "A Task must belong to at least one Task list").describe("The Task lists this Task belongs to, with its display order within each. At least one is required.")
|
|
6669
|
-
});
|
|
6670
|
-
exports2.TaskDeleteRequest = zod_1.z.object({
|
|
6671
|
-
code: zod_1.z.string()
|
|
6672
|
-
});
|
|
6673
|
-
}
|
|
6674
|
-
});
|
|
6675
|
-
|
|
6676
|
-
// ../../packages/common/build/api-schemas/task-list.js
|
|
6677
|
-
var require_task_list = __commonJS({
|
|
6678
|
-
"../../packages/common/build/api-schemas/task-list.js"(exports2) {
|
|
6679
|
-
"use strict";
|
|
6680
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6681
|
-
exports2.TaskListDeleteRequest = exports2.TaskListPostRequest = void 0;
|
|
6682
|
-
var zod_1 = require("zod");
|
|
6683
|
-
var task_1 = require_task();
|
|
6684
|
-
exports2.TaskListPostRequest = task_1.TaskListSchema.extend({
|
|
6685
|
-
code: task_1.TaskCodeSchema.describe("Unique Task list code used to reference this list (e.g., 'DAILY-CHECKS'). Must be unique within the account."),
|
|
6686
|
-
name: task_1.TaskNameSchema.describe("Human-readable name of the Task list (e.g., 'Daily Checks')"),
|
|
6687
|
-
description: task_1.TaskDescriptionSchema.describe("Detailed description of what this Task list groups together"),
|
|
6688
|
-
// Required here, optional on the manifest schema: every Task in the list follows this, so a list
|
|
6689
|
-
// without one would leave its Tasks with no defined timing. Lists stored before frequency moved
|
|
6690
|
-
// here keep parsing and fall back to per-schedule (see `taskListUtils.taskListFrequency`).
|
|
6691
|
-
frequency: task_1.TaskFrequencySchema.describe("How often every Task in this list must be completed.")
|
|
6692
|
-
});
|
|
6693
|
-
exports2.TaskListDeleteRequest = zod_1.z.object({
|
|
6694
|
-
code: zod_1.z.string()
|
|
6695
|
-
});
|
|
6696
|
-
}
|
|
6697
|
-
});
|
|
6698
|
-
|
|
6699
6696
|
// ../../packages/common/build/api-schemas/task-completion.js
|
|
6700
6697
|
var require_task_completion2 = __commonJS({
|
|
6701
6698
|
"../../packages/common/build/api-schemas/task-completion.js"(exports2) {
|
|
6702
6699
|
"use strict";
|
|
6703
6700
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6704
|
-
exports2.TaskCompletionStartListRequest = exports2.TaskCompletionCompleteRequest = exports2.TaskCompletionIdRequest = void 0;
|
|
6701
|
+
exports2.TaskCompletionStartListRequest = exports2.TaskCompletionCompleteRequest = exports2.TASK_COMPLETION_OPERATOR_INITIALS_MAX_LENGTH = exports2.TaskCompletionIdRequest = void 0;
|
|
6705
6702
|
var zod_1 = require("zod");
|
|
6706
6703
|
var note_1 = require_note();
|
|
6707
6704
|
exports2.TaskCompletionIdRequest = zod_1.z.object({
|
|
6708
6705
|
id: zod_1.z.coerce.number().int().positive()
|
|
6709
6706
|
});
|
|
6707
|
+
exports2.TASK_COMPLETION_OPERATOR_INITIALS_MAX_LENGTH = 8;
|
|
6710
6708
|
exports2.TaskCompletionCompleteRequest = zod_1.z.object({
|
|
6711
|
-
operatorInitials: zod_1.z.string().nullish(),
|
|
6709
|
+
operatorInitials: zod_1.z.string().trim().max(exports2.TASK_COMPLETION_OPERATOR_INITIALS_MAX_LENGTH).nullish(),
|
|
6712
6710
|
note: zod_1.z.string().max(note_1.NOTE_CONTENT_MAX_LENGTH).nullish()
|
|
6713
6711
|
});
|
|
6714
6712
|
exports2.TaskCompletionStartListRequest = zod_1.z.object({
|
|
@@ -7500,7 +7498,7 @@ var require_task_list2 = __commonJS({
|
|
|
7500
7498
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
7501
7499
|
exports2.taskListsFromManifest = taskListsFromManifest;
|
|
7502
7500
|
exports2.taskListByCode = taskListByCode;
|
|
7503
|
-
exports2.
|
|
7501
|
+
exports2.taskListTrigger = taskListTrigger;
|
|
7504
7502
|
exports2.taskListCodesOf = taskListCodesOf;
|
|
7505
7503
|
exports2.taskListOrderOf = taskListOrderOf;
|
|
7506
7504
|
exports2.isInTaskList = isInTaskList;
|
|
@@ -7512,8 +7510,8 @@ var require_task_list2 = __commonJS({
|
|
|
7512
7510
|
function taskListByCode(manifest, code) {
|
|
7513
7511
|
return taskListsFromManifest(manifest).find((t) => t.code.toLowerCase() === code.toLowerCase());
|
|
7514
7512
|
}
|
|
7515
|
-
function
|
|
7516
|
-
return taskListByCode(manifest, code)?.
|
|
7513
|
+
function taskListTrigger(manifest, code) {
|
|
7514
|
+
return taskListByCode(manifest, code)?.trigger ?? { type: task_1.TASK_TRIGGER_TYPE_SCHEDULE };
|
|
7517
7515
|
}
|
|
7518
7516
|
function taskListCodesOf(task) {
|
|
7519
7517
|
return (task.taskListCodes ?? []).map((entry) => entry.code);
|
|
@@ -7599,8 +7597,8 @@ var require_station3 = __commonJS({
|
|
|
7599
7597
|
...task,
|
|
7600
7598
|
taskListCode: ref.taskListCode,
|
|
7601
7599
|
taskListName: list?.name ?? ref.taskListCode,
|
|
7602
|
-
//
|
|
7603
|
-
|
|
7600
|
+
// Trigger comes from the list, never from the Task's own legacy field.
|
|
7601
|
+
trigger: list?.trigger ?? { type: task_1.TASK_TRIGGER_TYPE_SCHEDULE },
|
|
7604
7602
|
order: (0, task_list_1.taskListOrderOf)(task, ref.taskListCode) ?? null
|
|
7605
7603
|
}
|
|
7606
7604
|
];
|
|
@@ -10545,15 +10543,15 @@ var require_station4 = __commonJS({
|
|
|
10545
10543
|
notes: zod_1.z.array(note_1.NoteViewModel).optional().describe("Active notes attached to this station."),
|
|
10546
10544
|
allowedReasonCodes: zod_1.z.array(zod_1.z.string()).optional().describe("The reason codes available for this station after include/exclude filtering."),
|
|
10547
10545
|
requiredTasks: zod_1.z.array(task_1.TaskSchema.extend({
|
|
10548
|
-
taskListCode: zod_1.z.string().describe("The Task list this entry is being viewed through. A Task in two lists assigned to this station appears twice, once per list, each with that list's
|
|
10546
|
+
taskListCode: zod_1.z.string().describe("The Task list this entry is being viewed through. A Task in two lists assigned to this station appears twice, once per list, each with that list's trigger and its own completion state."),
|
|
10549
10547
|
taskListName: zod_1.z.string().nullish().describe("Name of the Task list this entry belongs to, falling back to the code."),
|
|
10550
10548
|
taskListDescription: zod_1.z.string().nullish().describe("Description of the Task list this entry belongs to, shown as the subtitle on its tablet button."),
|
|
10551
|
-
|
|
10549
|
+
trigger: task_1.TaskTriggerSchema.describe("The trigger of the Task list this entry belongs to \u2014 not the Task's own legacy field."),
|
|
10552
10550
|
order: zod_1.z.number().nullish().describe("Display order of the Task within this list."),
|
|
10553
10551
|
completedAt: zod_1.z.string().nullish(),
|
|
10554
10552
|
lastCompletedAt: zod_1.z.string().nullish().describe("ISO timestamp of the most recent completion of this Task in this list at this station, whichever instance it was. Set whether or not a current row exists; when the current row itself is completed, completedAt says so too."),
|
|
10555
10553
|
completedOperatorInitials: zod_1.z.string().nullish(),
|
|
10556
|
-
taskCompletionId: zod_1.z.number().nullish().describe("Id of the current task_completion row for this entry \u2014 the target of POST /api/task-completion/{id}/complete. An open row wins over a completed one. Null when the Task is not currently
|
|
10554
|
+
taskCompletionId: zod_1.z.number().nullish().describe("Id of the current task_completion row for this entry \u2014 the target of POST /api/task-completion/{id}/complete. An open row wins over a completed one. Null when the Task is not currently pending: its cron window has not opened, no schedule is running, or its list has not been started."),
|
|
10557
10555
|
expectedAt: zod_1.z.string().nullish().describe("ISO timestamp of the deadline of the current row when it is a cron instance; null otherwise, including for a manually started instance of a cron list.")
|
|
10558
10556
|
})).optional().describe("Tasks required for this station with completion status.")
|
|
10559
10557
|
}).describe("Represents a machine or workstation inside a factory. Generically, these are referred to as 'stations'.");
|
|
@@ -10692,6 +10690,8 @@ var require_manifest_helpers = __commonJS({
|
|
|
10692
10690
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
10693
10691
|
exports2.EMPTY_MANIFEST = void 0;
|
|
10694
10692
|
exports2.normalizeManifestFlags = normalizeManifestFlags;
|
|
10693
|
+
exports2.normalizeLegacyTaskTriggers = normalizeLegacyTaskTriggers;
|
|
10694
|
+
exports2.normalizeManifest = normalizeManifest;
|
|
10695
10695
|
exports2.mergeManifest = mergeManifest;
|
|
10696
10696
|
exports2.accountSettingDefaults = accountSettingDefaults;
|
|
10697
10697
|
exports2.withAccountSettingDefaults = withAccountSettingDefaults;
|
|
@@ -10764,6 +10764,33 @@ var require_manifest_helpers = __commonJS({
|
|
|
10764
10764
|
}
|
|
10765
10765
|
return raw;
|
|
10766
10766
|
}
|
|
10767
|
+
function normalizeLegacyTaskTriggers(raw) {
|
|
10768
|
+
const root = raw;
|
|
10769
|
+
const account = root?.account;
|
|
10770
|
+
if (!account) {
|
|
10771
|
+
return raw;
|
|
10772
|
+
}
|
|
10773
|
+
for (const key of ["taskLists", "tasks"]) {
|
|
10774
|
+
const entries = account[key];
|
|
10775
|
+
for (const entry of entries ?? []) {
|
|
10776
|
+
if (entry == null || typeof entry !== "object") {
|
|
10777
|
+
continue;
|
|
10778
|
+
}
|
|
10779
|
+
if (entry.trigger === void 0 && entry.frequency !== void 0) {
|
|
10780
|
+
entry.trigger = entry.frequency;
|
|
10781
|
+
}
|
|
10782
|
+
delete entry.frequency;
|
|
10783
|
+
const trigger = entry.trigger;
|
|
10784
|
+
if (trigger && typeof trigger === "object" && trigger.type === "always") {
|
|
10785
|
+
trigger.type = "on_demand";
|
|
10786
|
+
}
|
|
10787
|
+
}
|
|
10788
|
+
}
|
|
10789
|
+
return raw;
|
|
10790
|
+
}
|
|
10791
|
+
function normalizeManifest(raw) {
|
|
10792
|
+
return normalizeLegacyTaskTriggers(normalizeManifestFlags(raw));
|
|
10793
|
+
}
|
|
10767
10794
|
function deepMerge(base, override) {
|
|
10768
10795
|
if (override === void 0) {
|
|
10769
10796
|
return base;
|
|
@@ -10836,7 +10863,7 @@ var require_manifest_helpers = __commonJS({
|
|
|
10836
10863
|
account.manifestJson = JSON.stringify(empty);
|
|
10837
10864
|
await accountRepository.save([account]);
|
|
10838
10865
|
}
|
|
10839
|
-
const manifest = manifest_1.ManifestSchema.parse(
|
|
10866
|
+
const manifest = manifest_1.ManifestSchema.parse(normalizeManifest(JSON.parse(account.manifestJson)));
|
|
10840
10867
|
mutate(manifest);
|
|
10841
10868
|
manifest_1.ManifestSchema.parse(manifest);
|
|
10842
10869
|
await accountRepository.save([{ ...account, manifestJson: JSON.stringify(manifest) }]);
|
|
@@ -10878,7 +10905,7 @@ var require_account3 = __commonJS({
|
|
|
10878
10905
|
function getAccountViewModelFromQuery(queryResult) {
|
|
10879
10906
|
return queryResult.map((queryRow) => {
|
|
10880
10907
|
try {
|
|
10881
|
-
const manifest = manifest_1.ManifestSchema.parse((0, manifest_helpers_1.
|
|
10908
|
+
const manifest = manifest_1.ManifestSchema.parse((0, manifest_helpers_1.normalizeManifest)(JSON.parse(queryRow.manifestJson)));
|
|
10882
10909
|
if (manifest.account.id !== queryRow.id) {
|
|
10883
10910
|
throw new Error(error_key_1.ACCOUNT_MISMATCH);
|
|
10884
10911
|
}
|
|
@@ -10982,6 +11009,8 @@ var import_zod2 = require("zod");
|
|
|
10982
11009
|
var import_zod = require("zod");
|
|
10983
11010
|
var import_sku = __toESM(require_sku());
|
|
10984
11011
|
var import_task = __toESM(require_task());
|
|
11012
|
+
var import_task2 = __toESM(require_task2());
|
|
11013
|
+
var import_task_list = __toESM(require_task_list());
|
|
10985
11014
|
var import_plant = __toESM(require_plant());
|
|
10986
11015
|
var import_base_station = __toESM(require_base_station());
|
|
10987
11016
|
var import_plant2 = __toESM(require_plant2());
|
|
@@ -11010,6 +11039,8 @@ var import_agent = __toESM(require_agent());
|
|
|
11010
11039
|
var import_dau_buffer = __toESM(require_dau_buffer());
|
|
11011
11040
|
var import_enums = __toESM(require_enums());
|
|
11012
11041
|
var PlantCreateUpdateParams = import_plant2.PlantPostRequest;
|
|
11042
|
+
var TaskCreateUpdateParams = import_task2.TaskPostRequest;
|
|
11043
|
+
var TaskListCreateUpdateParams = import_task_list.TaskListPostRequest;
|
|
11013
11044
|
var StationGetParams = import_zod.z.object({
|
|
11014
11045
|
stationCode: import_base_station.StationCodeSchema,
|
|
11015
11046
|
skipCache: import_zod.z.boolean().optional().describe("Bypass the server-side station cache and recompute live state (active schedule, metrics) from source")
|
|
@@ -11112,7 +11143,10 @@ var methodDefinitions = {
|
|
|
11112
11143
|
"downtime.get": import_zod.z.function().args(DowntimeGetParams).returns(import_zod.z.promise(import_zod.z.array(import_downtime.AggregatedDowntime))).describe("Get aggregated downtime data for a plant and time range"),
|
|
11113
11144
|
"overview.get": import_zod.z.function().args(OverviewGetParams).returns(import_zod.z.promise(import_zod.z.any())).describe("Get a full overview of plant performance for a time range"),
|
|
11114
11145
|
"sku.createUpdate": import_zod.z.function().args(import_sku.SkuSchema).returns(import_zod.z.promise(import_sku2.SkuViewModel)).describe("Create or update a SKU"),
|
|
11115
|
-
"
|
|
11146
|
+
"taskList.createUpdate": import_zod.z.function().args(TaskListCreateUpdateParams).returns(import_zod.z.promise(import_task.TaskListSchema)).describe(
|
|
11147
|
+
"Create or update a Task list. The list carries the trigger every Task in it follows and is what the include/exclude cascade assigns to stations; create it before the Tasks that belong to it."
|
|
11148
|
+
),
|
|
11149
|
+
"task.createUpdate": import_zod.z.function().args(TaskCreateUpdateParams).returns(import_zod.z.promise(import_task.TaskSchema)).describe("Create or update a Task. It must belong to at least one existing Task list, with its display order in each."),
|
|
11116
11150
|
"shiftPattern.createUpdate": import_zod.z.function().args(ShiftPatternCreateUpdateParams).returns(import_zod.z.promise(ShiftPatternCreateUpdateResponse)).describe("Create or update a shift pattern with its shifts"),
|
|
11117
11151
|
"schedule.get": import_zod.z.function().args(ScheduleGetParams).returns(import_zod.z.promise(import_zod.z.array(import_schedule3.ScheduleViewModel))).describe("List schedules with filters. Requires at least one of: ids, rangeCode, includeFuture, isCurrent, or rangeFrom/rangeTo."),
|
|
11118
11152
|
"schedule.createUpdate": import_zod.z.function().args(ScheduleCreateUpdateParams).returns(import_zod.z.promise(import_schedule3.ScheduleViewModel)).describe("Create or update a schedule"),
|
|
@@ -11478,6 +11512,10 @@ var BusrootClient = class {
|
|
|
11478
11512
|
const res = await this.post("/sku", sku);
|
|
11479
11513
|
return res.result;
|
|
11480
11514
|
}),
|
|
11515
|
+
"taskList.createUpdate": methodDefinitions["taskList.createUpdate"].strictImplement(async (taskList) => {
|
|
11516
|
+
const res = await this.post("/task-list", taskList);
|
|
11517
|
+
return res.result;
|
|
11518
|
+
}),
|
|
11481
11519
|
"task.createUpdate": methodDefinitions["task.createUpdate"].strictImplement(async (task) => {
|
|
11482
11520
|
const res = await this.post("/task", task);
|
|
11483
11521
|
return res.result;
|
package/package.json
CHANGED