busroot-sdk 0.0.8-dev.2787901298 → 0.0.8-dev.2791332219
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 +56 -0
- package/build/index.js +17 -4
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -192,6 +192,12 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
192
192
|
type: "cron";
|
|
193
193
|
pattern: string;
|
|
194
194
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
195
|
+
}>, z.ZodObject<{
|
|
196
|
+
type: z.ZodLiteral<"always">;
|
|
197
|
+
}, "strict", z.ZodTypeAny, {
|
|
198
|
+
type: "always";
|
|
199
|
+
}, {
|
|
200
|
+
type: "always";
|
|
195
201
|
}>]>>;
|
|
196
202
|
requireNotes: z.ZodOptional<z.ZodBoolean>;
|
|
197
203
|
taskListCodes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -204,6 +210,8 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
204
210
|
type: "cron";
|
|
205
211
|
pattern: string;
|
|
206
212
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
213
|
+
} | {
|
|
214
|
+
type: "always";
|
|
207
215
|
};
|
|
208
216
|
description?: string | undefined;
|
|
209
217
|
requireNotes?: boolean | undefined;
|
|
@@ -219,6 +227,8 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
219
227
|
type: "cron";
|
|
220
228
|
pattern: string;
|
|
221
229
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
230
|
+
} | {
|
|
231
|
+
type: "always";
|
|
222
232
|
} | undefined;
|
|
223
233
|
taskListCodes?: string[] | undefined;
|
|
224
234
|
}>, "many">>;
|
|
@@ -948,6 +958,8 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
948
958
|
type: "cron";
|
|
949
959
|
pattern: string;
|
|
950
960
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
961
|
+
} | {
|
|
962
|
+
type: "always";
|
|
951
963
|
};
|
|
952
964
|
description?: string | undefined;
|
|
953
965
|
requireNotes?: boolean | undefined;
|
|
@@ -1126,6 +1138,8 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
1126
1138
|
type: "cron";
|
|
1127
1139
|
pattern: string;
|
|
1128
1140
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
1141
|
+
} | {
|
|
1142
|
+
type: "always";
|
|
1129
1143
|
} | undefined;
|
|
1130
1144
|
taskListCodes?: string[] | undefined;
|
|
1131
1145
|
}[] | undefined;
|
|
@@ -1302,6 +1316,8 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
1302
1316
|
type: "cron";
|
|
1303
1317
|
pattern: string;
|
|
1304
1318
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
1319
|
+
} | {
|
|
1320
|
+
type: "always";
|
|
1305
1321
|
};
|
|
1306
1322
|
description?: string | undefined;
|
|
1307
1323
|
requireNotes?: boolean | undefined;
|
|
@@ -1483,6 +1499,8 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
1483
1499
|
type: "cron";
|
|
1484
1500
|
pattern: string;
|
|
1485
1501
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
1502
|
+
} | {
|
|
1503
|
+
type: "always";
|
|
1486
1504
|
} | undefined;
|
|
1487
1505
|
taskListCodes?: string[] | undefined;
|
|
1488
1506
|
}[] | undefined;
|
|
@@ -1660,6 +1678,8 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
1660
1678
|
type: "cron";
|
|
1661
1679
|
pattern: string;
|
|
1662
1680
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
1681
|
+
} | {
|
|
1682
|
+
type: "always";
|
|
1663
1683
|
};
|
|
1664
1684
|
description?: string | undefined;
|
|
1665
1685
|
requireNotes?: boolean | undefined;
|
|
@@ -1841,6 +1861,8 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
1841
1861
|
type: "cron";
|
|
1842
1862
|
pattern: string;
|
|
1843
1863
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
1864
|
+
} | {
|
|
1865
|
+
type: "always";
|
|
1844
1866
|
} | undefined;
|
|
1845
1867
|
taskListCodes?: string[] | undefined;
|
|
1846
1868
|
}[] | undefined;
|
|
@@ -2022,6 +2044,8 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
2022
2044
|
type: "cron";
|
|
2023
2045
|
pattern: string;
|
|
2024
2046
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
2047
|
+
} | {
|
|
2048
|
+
type: "always";
|
|
2025
2049
|
};
|
|
2026
2050
|
description?: string | undefined;
|
|
2027
2051
|
requireNotes?: boolean | undefined;
|
|
@@ -2236,6 +2260,8 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
2236
2260
|
type: "cron";
|
|
2237
2261
|
pattern: string;
|
|
2238
2262
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
2263
|
+
} | {
|
|
2264
|
+
type: "always";
|
|
2239
2265
|
} | undefined;
|
|
2240
2266
|
taskListCodes?: string[] | undefined;
|
|
2241
2267
|
}[] | undefined;
|
|
@@ -2601,6 +2627,8 @@ declare class BusrootClient {
|
|
|
2601
2627
|
type: "cron";
|
|
2602
2628
|
pattern: string;
|
|
2603
2629
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
2630
|
+
} | {
|
|
2631
|
+
type: "always";
|
|
2604
2632
|
} | undefined;
|
|
2605
2633
|
taskListCodes?: string[] | undefined;
|
|
2606
2634
|
}[] | undefined;
|
|
@@ -2819,6 +2847,8 @@ declare class BusrootClient {
|
|
|
2819
2847
|
type: "cron";
|
|
2820
2848
|
pattern: string;
|
|
2821
2849
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
2850
|
+
} | {
|
|
2851
|
+
type: "always";
|
|
2822
2852
|
} | undefined;
|
|
2823
2853
|
taskListCodes?: string[] | undefined;
|
|
2824
2854
|
}[] | undefined;
|
|
@@ -3308,9 +3338,12 @@ declare class BusrootClient {
|
|
|
3308
3338
|
type: "cron";
|
|
3309
3339
|
pattern: string;
|
|
3310
3340
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
3341
|
+
} | {
|
|
3342
|
+
type: "always";
|
|
3311
3343
|
} | undefined;
|
|
3312
3344
|
taskListCodes?: string[] | undefined;
|
|
3313
3345
|
completedAt?: string | null | undefined;
|
|
3346
|
+
lastCompletedAt?: string | null | undefined;
|
|
3314
3347
|
completedOperatorInitials?: string | null | undefined;
|
|
3315
3348
|
periodStartAt?: string | null | undefined;
|
|
3316
3349
|
periodEndAt?: string | null | undefined;
|
|
@@ -3869,6 +3902,8 @@ declare class BusrootClient {
|
|
|
3869
3902
|
type: "cron";
|
|
3870
3903
|
pattern: string;
|
|
3871
3904
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
3905
|
+
} | {
|
|
3906
|
+
type: "always";
|
|
3872
3907
|
};
|
|
3873
3908
|
description?: string | undefined;
|
|
3874
3909
|
requireNotes?: boolean | undefined;
|
|
@@ -3884,6 +3919,8 @@ declare class BusrootClient {
|
|
|
3884
3919
|
type: "cron";
|
|
3885
3920
|
pattern: string;
|
|
3886
3921
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
3922
|
+
} | {
|
|
3923
|
+
type: "always";
|
|
3887
3924
|
} | undefined;
|
|
3888
3925
|
taskListCodes?: string[] | undefined;
|
|
3889
3926
|
}>;
|
|
@@ -6005,11 +6042,18 @@ declare const StationViewModel: z.ZodObject<{
|
|
|
6005
6042
|
type: "cron";
|
|
6006
6043
|
pattern: string;
|
|
6007
6044
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
6045
|
+
}>, z.ZodObject<{
|
|
6046
|
+
type: z.ZodLiteral<"always">;
|
|
6047
|
+
}, "strict", z.ZodTypeAny, {
|
|
6048
|
+
type: "always";
|
|
6049
|
+
}, {
|
|
6050
|
+
type: "always";
|
|
6008
6051
|
}>]>>;
|
|
6009
6052
|
requireNotes: z.ZodOptional<z.ZodBoolean>;
|
|
6010
6053
|
taskListCodes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
6011
6054
|
} & {
|
|
6012
6055
|
completedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6056
|
+
lastCompletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6013
6057
|
completedOperatorInitials: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6014
6058
|
periodStartAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6015
6059
|
periodEndAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -6022,11 +6066,14 @@ declare const StationViewModel: z.ZodObject<{
|
|
|
6022
6066
|
type: "cron";
|
|
6023
6067
|
pattern: string;
|
|
6024
6068
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
6069
|
+
} | {
|
|
6070
|
+
type: "always";
|
|
6025
6071
|
};
|
|
6026
6072
|
description?: string | undefined;
|
|
6027
6073
|
requireNotes?: boolean | undefined;
|
|
6028
6074
|
taskListCodes?: string[] | undefined;
|
|
6029
6075
|
completedAt?: string | null | undefined;
|
|
6076
|
+
lastCompletedAt?: string | null | undefined;
|
|
6030
6077
|
completedOperatorInitials?: string | null | undefined;
|
|
6031
6078
|
periodStartAt?: string | null | undefined;
|
|
6032
6079
|
periodEndAt?: string | null | undefined;
|
|
@@ -6041,9 +6088,12 @@ declare const StationViewModel: z.ZodObject<{
|
|
|
6041
6088
|
type: "cron";
|
|
6042
6089
|
pattern: string;
|
|
6043
6090
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
6091
|
+
} | {
|
|
6092
|
+
type: "always";
|
|
6044
6093
|
} | undefined;
|
|
6045
6094
|
taskListCodes?: string[] | undefined;
|
|
6046
6095
|
completedAt?: string | null | undefined;
|
|
6096
|
+
lastCompletedAt?: string | null | undefined;
|
|
6047
6097
|
completedOperatorInitials?: string | null | undefined;
|
|
6048
6098
|
periodStartAt?: string | null | undefined;
|
|
6049
6099
|
periodEndAt?: string | null | undefined;
|
|
@@ -6199,11 +6249,14 @@ declare const StationViewModel: z.ZodObject<{
|
|
|
6199
6249
|
type: "cron";
|
|
6200
6250
|
pattern: string;
|
|
6201
6251
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
6252
|
+
} | {
|
|
6253
|
+
type: "always";
|
|
6202
6254
|
};
|
|
6203
6255
|
description?: string | undefined;
|
|
6204
6256
|
requireNotes?: boolean | undefined;
|
|
6205
6257
|
taskListCodes?: string[] | undefined;
|
|
6206
6258
|
completedAt?: string | null | undefined;
|
|
6259
|
+
lastCompletedAt?: string | null | undefined;
|
|
6207
6260
|
completedOperatorInitials?: string | null | undefined;
|
|
6208
6261
|
periodStartAt?: string | null | undefined;
|
|
6209
6262
|
periodEndAt?: string | null | undefined;
|
|
@@ -6361,9 +6414,12 @@ declare const StationViewModel: z.ZodObject<{
|
|
|
6361
6414
|
type: "cron";
|
|
6362
6415
|
pattern: string;
|
|
6363
6416
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
6417
|
+
} | {
|
|
6418
|
+
type: "always";
|
|
6364
6419
|
} | undefined;
|
|
6365
6420
|
taskListCodes?: string[] | undefined;
|
|
6366
6421
|
completedAt?: string | null | undefined;
|
|
6422
|
+
lastCompletedAt?: string | null | undefined;
|
|
6367
6423
|
completedOperatorInitials?: string | null | undefined;
|
|
6368
6424
|
periodStartAt?: string | null | undefined;
|
|
6369
6425
|
periodEndAt?: string | null | undefined;
|
package/build/index.js
CHANGED
|
@@ -153,10 +153,11 @@ var require_task = __commonJS({
|
|
|
153
153
|
"../../packages/common/build/schemas/task.js"(exports2) {
|
|
154
154
|
"use strict";
|
|
155
155
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
156
|
-
exports2.TaskSchema = exports2.TaskListSchema = exports2.TaskDescriptionSchema = exports2.TaskNameSchema = exports2.TaskCodeSchema = exports2.TaskFrequencySchema = exports2.TASK_FREQUENCY_TYPE_CRON = exports2.TASK_FREQUENCY_TYPE_SCHEDULE = void 0;
|
|
156
|
+
exports2.TaskSchema = exports2.TaskListSchema = exports2.TaskDescriptionSchema = exports2.TaskNameSchema = exports2.TaskCodeSchema = exports2.TaskFrequencySchema = exports2.TASK_FREQUENCY_TYPE_ALWAYS = exports2.TASK_FREQUENCY_TYPE_CRON = exports2.TASK_FREQUENCY_TYPE_SCHEDULE = void 0;
|
|
157
157
|
var zod_1 = require("zod");
|
|
158
158
|
exports2.TASK_FREQUENCY_TYPE_SCHEDULE = "schedule";
|
|
159
159
|
exports2.TASK_FREQUENCY_TYPE_CRON = "cron";
|
|
160
|
+
exports2.TASK_FREQUENCY_TYPE_ALWAYS = "always";
|
|
160
161
|
exports2.TaskFrequencySchema = zod_1.z.discriminatedUnion("type", [
|
|
161
162
|
zod_1.z.object({
|
|
162
163
|
type: zod_1.z.literal(exports2.TASK_FREQUENCY_TYPE_SCHEDULE)
|
|
@@ -168,8 +169,14 @@ var require_task = __commonJS({
|
|
|
168
169
|
// field existed) still parse — the admin form/API require it for new/edited
|
|
169
170
|
// cron Tasks, and the tablet falls back to whole-period availability when absent.
|
|
170
171
|
availableBeforeDeadlineMinutes: zod_1.z.number().int().positive().optional().describe("How many minutes before the deadline (the cron fire) this Task becomes available to complete on the tablet. Required for cron Tasks; must be shorter than the smallest gap between consecutive cron fires.")
|
|
172
|
+
}).strict(),
|
|
173
|
+
// Permanently available: no deadline, no schedule tie, no cron pattern. Becomes available
|
|
174
|
+
// again the moment it is completed, so it has no "Missed" or "Pending" notion and the
|
|
175
|
+
// expectation tick deliberately writes nothing for it.
|
|
176
|
+
zod_1.z.object({
|
|
177
|
+
type: zod_1.z.literal(exports2.TASK_FREQUENCY_TYPE_ALWAYS)
|
|
171
178
|
}).strict()
|
|
172
|
-
]).describe("How often this Task must be completed. 'schedule' = once per production schedule; 'cron' = every cron interval.");
|
|
179
|
+
]).describe("How often this Task must be completed. 'schedule' = once per production schedule; 'cron' = every cron interval; 'always' = permanently available, completable at any time.");
|
|
173
180
|
exports2.TaskCodeSchema = zod_1.z.string().trim().min(1).max(32).regex(/^([a-zA-Z0-9-_]+)$/, {
|
|
174
181
|
message: "Only allowed 0-9, A-Z, and -_"
|
|
175
182
|
});
|
|
@@ -9387,6 +9394,7 @@ var require_station_windows = __commonJS({
|
|
|
9387
9394
|
var configVars_1 = require_configVars();
|
|
9388
9395
|
var oee_1 = require_oee2();
|
|
9389
9396
|
var WINDOW_DURATION = 6e4;
|
|
9397
|
+
var IDEAL_COUNT_EMIT_PRECISION = 6;
|
|
9390
9398
|
var MAX_WINDOWS_PER_DOWNTIME = 1440;
|
|
9391
9399
|
function generateMockStationWindows(offset, extraFields) {
|
|
9392
9400
|
const startMoment = (0, moment_timezone_1.default)("2020-01-01T00:00:00.000Z");
|
|
@@ -9642,8 +9650,12 @@ var require_station_windows = __commonJS({
|
|
|
9642
9650
|
lostProductionCostSpeed: window2.lostProductionCostSpeed,
|
|
9643
9651
|
lostProductionCostQuality: window2.lostProductionCostQuality,
|
|
9644
9652
|
lostProductionCostTotal: window2.lostProductionCostTotal,
|
|
9645
|
-
|
|
9646
|
-
|
|
9653
|
+
// Emitted at IDEAL_COUNT_EMIT_PRECISION rather than 2dp: a 1-minute request reaches here as a batch of
|
|
9654
|
+
// one, so rounding here truncates the stored per-minute value itself. The error does not cancel across
|
|
9655
|
+
// minutes (the cycle time is constant), so summing the emitted values drifted from the analytic total by
|
|
9656
|
+
// ~1.8 units per station per 8h shift at a 3.7s cycle time. Round for display in the UI/CSV layer instead.
|
|
9657
|
+
productionIdealCount: (0, _1.roundTo)(window2.productionIdealCount, IDEAL_COUNT_EMIT_PRECISION),
|
|
9658
|
+
productionTargetCount: (0, _1.roundTo)(window2.productionTargetCount, IDEAL_COUNT_EMIT_PRECISION),
|
|
9647
9659
|
performanceModeFrom: window2.performanceModeFrom,
|
|
9648
9660
|
performanceModeType: window2.performanceModeType,
|
|
9649
9661
|
operatorInitials: window2.operatorInitials
|
|
@@ -10219,6 +10231,7 @@ var require_station4 = __commonJS({
|
|
|
10219
10231
|
allowedReasonCodes: zod_1.z.array(zod_1.z.string()).optional().describe("The reason codes available for this station after include/exclude filtering."),
|
|
10220
10232
|
requiredTasks: zod_1.z.array(task_1.TaskSchema.extend({
|
|
10221
10233
|
completedAt: zod_1.z.string().nullish(),
|
|
10234
|
+
lastCompletedAt: zod_1.z.string().nullish().describe("ISO timestamp of the most recent completion ('always'-frequency Tasks only). Such a Task is available again the instant it is completed, so it is never 'completed' \u2014 this records when it was last done."),
|
|
10222
10235
|
completedOperatorInitials: zod_1.z.string().nullish(),
|
|
10223
10236
|
periodStartAt: zod_1.z.string().nullish().describe("ISO timestamp of the start of the current cron period (cron-frequency Tasks only)."),
|
|
10224
10237
|
periodEndAt: zod_1.z.string().nullish().describe("ISO timestamp of the end of the current cron period (cron-frequency Tasks only).")
|
package/package.json
CHANGED