busroot-sdk 0.0.8-dev.2735819620 → 0.0.8-dev.2749243882
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 +84 -0
- package/build/index.js +51 -11
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -194,6 +194,7 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
194
194
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
195
195
|
}>]>>;
|
|
196
196
|
requireNotes: z.ZodOptional<z.ZodBoolean>;
|
|
197
|
+
taskListCodes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
197
198
|
}, "strict", z.ZodTypeAny, {
|
|
198
199
|
code: string;
|
|
199
200
|
title: string;
|
|
@@ -206,6 +207,7 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
206
207
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
207
208
|
};
|
|
208
209
|
requireNotes?: boolean | undefined;
|
|
210
|
+
taskListCodes?: string[] | undefined;
|
|
209
211
|
}, {
|
|
210
212
|
code: string;
|
|
211
213
|
title: string;
|
|
@@ -218,6 +220,20 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
218
220
|
pattern: string;
|
|
219
221
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
220
222
|
} | undefined;
|
|
223
|
+
taskListCodes?: string[] | undefined;
|
|
224
|
+
}>, "many">>;
|
|
225
|
+
taskLists: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
226
|
+
code: z.ZodString;
|
|
227
|
+
name: z.ZodString;
|
|
228
|
+
description: z.ZodString;
|
|
229
|
+
}, "strict", z.ZodTypeAny, {
|
|
230
|
+
code: string;
|
|
231
|
+
name: string;
|
|
232
|
+
description: string;
|
|
233
|
+
}, {
|
|
234
|
+
code: string;
|
|
235
|
+
name: string;
|
|
236
|
+
description: string;
|
|
221
237
|
}>, "many">>;
|
|
222
238
|
skus: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
223
239
|
code: z.ZodString;
|
|
@@ -935,6 +951,12 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
935
951
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
936
952
|
};
|
|
937
953
|
requireNotes?: boolean | undefined;
|
|
954
|
+
taskListCodes?: string[] | undefined;
|
|
955
|
+
}[] | undefined;
|
|
956
|
+
taskLists?: {
|
|
957
|
+
code: string;
|
|
958
|
+
name: string;
|
|
959
|
+
description: string;
|
|
938
960
|
}[] | undefined;
|
|
939
961
|
skus?: {
|
|
940
962
|
code: string;
|
|
@@ -1105,6 +1127,12 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
1105
1127
|
pattern: string;
|
|
1106
1128
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
1107
1129
|
} | undefined;
|
|
1130
|
+
taskListCodes?: string[] | undefined;
|
|
1131
|
+
}[] | undefined;
|
|
1132
|
+
taskLists?: {
|
|
1133
|
+
code: string;
|
|
1134
|
+
name: string;
|
|
1135
|
+
description: string;
|
|
1108
1136
|
}[] | undefined;
|
|
1109
1137
|
skus?: {
|
|
1110
1138
|
code: string;
|
|
@@ -1277,6 +1305,12 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
1277
1305
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
1278
1306
|
};
|
|
1279
1307
|
requireNotes?: boolean | undefined;
|
|
1308
|
+
taskListCodes?: string[] | undefined;
|
|
1309
|
+
}[] | undefined;
|
|
1310
|
+
taskLists?: {
|
|
1311
|
+
code: string;
|
|
1312
|
+
name: string;
|
|
1313
|
+
description: string;
|
|
1280
1314
|
}[] | undefined;
|
|
1281
1315
|
skus?: {
|
|
1282
1316
|
code: string;
|
|
@@ -1450,6 +1484,12 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
1450
1484
|
pattern: string;
|
|
1451
1485
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
1452
1486
|
} | undefined;
|
|
1487
|
+
taskListCodes?: string[] | undefined;
|
|
1488
|
+
}[] | undefined;
|
|
1489
|
+
taskLists?: {
|
|
1490
|
+
code: string;
|
|
1491
|
+
name: string;
|
|
1492
|
+
description: string;
|
|
1453
1493
|
}[] | undefined;
|
|
1454
1494
|
skus?: {
|
|
1455
1495
|
code: string;
|
|
@@ -1623,6 +1663,12 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
1623
1663
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
1624
1664
|
};
|
|
1625
1665
|
requireNotes?: boolean | undefined;
|
|
1666
|
+
taskListCodes?: string[] | undefined;
|
|
1667
|
+
}[] | undefined;
|
|
1668
|
+
taskLists?: {
|
|
1669
|
+
code: string;
|
|
1670
|
+
name: string;
|
|
1671
|
+
description: string;
|
|
1626
1672
|
}[] | undefined;
|
|
1627
1673
|
skus?: {
|
|
1628
1674
|
code: string;
|
|
@@ -1796,6 +1842,12 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
1796
1842
|
pattern: string;
|
|
1797
1843
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
1798
1844
|
} | undefined;
|
|
1845
|
+
taskListCodes?: string[] | undefined;
|
|
1846
|
+
}[] | undefined;
|
|
1847
|
+
taskLists?: {
|
|
1848
|
+
code: string;
|
|
1849
|
+
name: string;
|
|
1850
|
+
description: string;
|
|
1799
1851
|
}[] | undefined;
|
|
1800
1852
|
skus?: {
|
|
1801
1853
|
code: string;
|
|
@@ -1973,6 +2025,12 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
1973
2025
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
1974
2026
|
};
|
|
1975
2027
|
requireNotes?: boolean | undefined;
|
|
2028
|
+
taskListCodes?: string[] | undefined;
|
|
2029
|
+
}[] | undefined;
|
|
2030
|
+
taskLists?: {
|
|
2031
|
+
code: string;
|
|
2032
|
+
name: string;
|
|
2033
|
+
description: string;
|
|
1976
2034
|
}[] | undefined;
|
|
1977
2035
|
skus?: {
|
|
1978
2036
|
code: string;
|
|
@@ -2179,6 +2237,12 @@ declare const PublicAccountViewModel: z.ZodObject<Omit<{
|
|
|
2179
2237
|
pattern: string;
|
|
2180
2238
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
2181
2239
|
} | undefined;
|
|
2240
|
+
taskListCodes?: string[] | undefined;
|
|
2241
|
+
}[] | undefined;
|
|
2242
|
+
taskLists?: {
|
|
2243
|
+
code: string;
|
|
2244
|
+
name: string;
|
|
2245
|
+
description: string;
|
|
2182
2246
|
}[] | undefined;
|
|
2183
2247
|
skus?: {
|
|
2184
2248
|
code: string;
|
|
@@ -2538,6 +2602,12 @@ declare class BusrootClient {
|
|
|
2538
2602
|
pattern: string;
|
|
2539
2603
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
2540
2604
|
} | undefined;
|
|
2605
|
+
taskListCodes?: string[] | undefined;
|
|
2606
|
+
}[] | undefined;
|
|
2607
|
+
taskLists?: {
|
|
2608
|
+
code: string;
|
|
2609
|
+
name: string;
|
|
2610
|
+
description: string;
|
|
2541
2611
|
}[] | undefined;
|
|
2542
2612
|
skus?: {
|
|
2543
2613
|
code: string;
|
|
@@ -2750,6 +2820,12 @@ declare class BusrootClient {
|
|
|
2750
2820
|
pattern: string;
|
|
2751
2821
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
2752
2822
|
} | undefined;
|
|
2823
|
+
taskListCodes?: string[] | undefined;
|
|
2824
|
+
}[] | undefined;
|
|
2825
|
+
taskLists?: {
|
|
2826
|
+
code: string;
|
|
2827
|
+
name: string;
|
|
2828
|
+
description: string;
|
|
2753
2829
|
}[] | undefined;
|
|
2754
2830
|
skus?: {
|
|
2755
2831
|
code: string;
|
|
@@ -3233,6 +3309,7 @@ declare class BusrootClient {
|
|
|
3233
3309
|
pattern: string;
|
|
3234
3310
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
3235
3311
|
} | undefined;
|
|
3312
|
+
taskListCodes?: string[] | undefined;
|
|
3236
3313
|
completedAt?: string | null | undefined;
|
|
3237
3314
|
completedOperatorInitials?: string | null | undefined;
|
|
3238
3315
|
periodStartAt?: string | null | undefined;
|
|
@@ -3795,6 +3872,7 @@ declare class BusrootClient {
|
|
|
3795
3872
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
3796
3873
|
};
|
|
3797
3874
|
requireNotes?: boolean | undefined;
|
|
3875
|
+
taskListCodes?: string[] | undefined;
|
|
3798
3876
|
}, ...args: unknown[]) => Promise<{
|
|
3799
3877
|
code: string;
|
|
3800
3878
|
title: string;
|
|
@@ -3807,6 +3885,7 @@ declare class BusrootClient {
|
|
|
3807
3885
|
pattern: string;
|
|
3808
3886
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
3809
3887
|
} | undefined;
|
|
3888
|
+
taskListCodes?: string[] | undefined;
|
|
3810
3889
|
}>;
|
|
3811
3890
|
"shiftPattern.createUpdate": (args_0: {
|
|
3812
3891
|
shiftPatternCode: string;
|
|
@@ -5925,6 +6004,7 @@ declare const StationViewModel: z.ZodObject<{
|
|
|
5925
6004
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
5926
6005
|
}>]>>;
|
|
5927
6006
|
requireNotes: z.ZodOptional<z.ZodBoolean>;
|
|
6007
|
+
taskListCodes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
5928
6008
|
} & {
|
|
5929
6009
|
completedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5930
6010
|
completedOperatorInitials: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -5942,6 +6022,7 @@ declare const StationViewModel: z.ZodObject<{
|
|
|
5942
6022
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
5943
6023
|
};
|
|
5944
6024
|
requireNotes?: boolean | undefined;
|
|
6025
|
+
taskListCodes?: string[] | undefined;
|
|
5945
6026
|
completedAt?: string | null | undefined;
|
|
5946
6027
|
completedOperatorInitials?: string | null | undefined;
|
|
5947
6028
|
periodStartAt?: string | null | undefined;
|
|
@@ -5958,6 +6039,7 @@ declare const StationViewModel: z.ZodObject<{
|
|
|
5958
6039
|
pattern: string;
|
|
5959
6040
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
5960
6041
|
} | undefined;
|
|
6042
|
+
taskListCodes?: string[] | undefined;
|
|
5961
6043
|
completedAt?: string | null | undefined;
|
|
5962
6044
|
completedOperatorInitials?: string | null | undefined;
|
|
5963
6045
|
periodStartAt?: string | null | undefined;
|
|
@@ -6117,6 +6199,7 @@ declare const StationViewModel: z.ZodObject<{
|
|
|
6117
6199
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
6118
6200
|
};
|
|
6119
6201
|
requireNotes?: boolean | undefined;
|
|
6202
|
+
taskListCodes?: string[] | undefined;
|
|
6120
6203
|
completedAt?: string | null | undefined;
|
|
6121
6204
|
completedOperatorInitials?: string | null | undefined;
|
|
6122
6205
|
periodStartAt?: string | null | undefined;
|
|
@@ -6276,6 +6359,7 @@ declare const StationViewModel: z.ZodObject<{
|
|
|
6276
6359
|
pattern: string;
|
|
6277
6360
|
availableBeforeDeadlineMinutes?: number | undefined;
|
|
6278
6361
|
} | undefined;
|
|
6362
|
+
taskListCodes?: string[] | undefined;
|
|
6279
6363
|
completedAt?: string | null | undefined;
|
|
6280
6364
|
completedOperatorInitials?: string | null | undefined;
|
|
6281
6365
|
periodStartAt?: string | null | undefined;
|
package/build/index.js
CHANGED
|
@@ -153,7 +153,7 @@ 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.TaskFrequencySchema = exports2.TASK_FREQUENCY_TYPE_CRON = exports2.TASK_FREQUENCY_TYPE_SCHEDULE = void 0;
|
|
156
|
+
exports2.TaskSchema = exports2.TaskListSchema = exports2.TaskFrequencySchema = 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";
|
|
@@ -170,6 +170,11 @@ var require_task = __commonJS({
|
|
|
170
170
|
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.")
|
|
171
171
|
}).strict()
|
|
172
172
|
]).describe("How often this Task must be completed. 'schedule' = once per production schedule; 'cron' = every cron interval.");
|
|
173
|
+
exports2.TaskListSchema = zod_1.z.object({
|
|
174
|
+
code: zod_1.z.string().min(1).describe("Unique Task list code used to reference this list (e.g., 'DAILY-CHECKS'). Must be unique within the account."),
|
|
175
|
+
name: zod_1.z.string().describe("Human-readable name of the Task list (e.g., 'Daily Checks')"),
|
|
176
|
+
description: zod_1.z.string().describe("Detailed description of what this Task list groups together")
|
|
177
|
+
}).strict();
|
|
173
178
|
exports2.TaskSchema = zod_1.z.object({
|
|
174
179
|
code: zod_1.z.string().describe("Unique Task code used to reference this procedure (e.g., 'TASK-001', 'STARTUP-CHECK'). Must be unique within the account."),
|
|
175
180
|
title: zod_1.z.string().describe("Human-readable title of the Task (e.g., 'Machine Startup Checklist', 'Quality Inspection Procedure')"),
|
|
@@ -177,7 +182,10 @@ var require_task = __commonJS({
|
|
|
177
182
|
frequency: exports2.TaskFrequencySchema.default({ type: exports2.TASK_FREQUENCY_TYPE_SCHEDULE }),
|
|
178
183
|
// Optional at the schema level so pre-existing Tasks (written before this field existed) still
|
|
179
184
|
// parse — absent means notes are not required, the pre-feature behaviour.
|
|
180
|
-
requireNotes: zod_1.z.boolean().optional().describe("When enabled, operators must enter notes before this Task can be confirmed as complete.")
|
|
185
|
+
requireNotes: zod_1.z.boolean().optional().describe("When enabled, operators must enter notes before this Task can be confirmed as complete."),
|
|
186
|
+
// Optional at the schema level so pre-existing Tasks (written before Task lists existed)
|
|
187
|
+
// still parse — absent means the Task belongs to no list.
|
|
188
|
+
taskListCodes: zod_1.z.array(zod_1.z.string()).optional().describe("Codes of the Task lists this Task belongs to. Purely organisational grouping; a Task can belong to zero or many lists.")
|
|
181
189
|
}).strict();
|
|
182
190
|
}
|
|
183
191
|
});
|
|
@@ -830,8 +838,8 @@ var require_error_key = __commonJS({
|
|
|
830
838
|
"use strict";
|
|
831
839
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
832
840
|
exports2.STATION_REASSIGN_CROSS_GROUP = exports2.TARGET_STATION_NOT_FOUND = exports2.PARTS_PER_CYCLE_NOT_ALLOWED_FOR_STATION = exports2.SCHEDULE_CANNOT_STOP_FUTURE = exports2.SCHEDULE_NON_PROD_OR_ENDED = exports2.SCHEDULE_CANNOT_CUT_SHORT = exports2.SCHEDULE_AUTO_ENDED_BY_QUANTITY = exports2.SCHEDULE_NOT_STARTED_OR_ENDED = exports2.ACTUAL_START_IN_PAST = exports2.PLANNED_START_IN_PAST = exports2.SCHEDULE_CANNOT_CHANGE_PROD_TO_NON_PROD = exports2.SCHEDULE_CANNOT_CHANGE_NON_PROD_TO_PROD = exports2.SCHEDULE_CANNOT_SET_PRIORITY_AFTER_START = exports2.SCHEDULE_ALREADY_STARTED_CANNOT_EDIT_START = exports2.SCHEDULE_ALREADY_ENDED = exports2.UNSUPPORTED_SCHEDULE_OPERATION = exports2.INVALID_RESOLUTION_MODE = exports2.EXISTED_EVENT = exports2.INVALID_SEARCH_TEXT = exports2.INVALID_SKIP = exports2.INVALID_LIMIT = exports2.INVALID_WINDOW_TIME = exports2.INVALID_NOTIFICATION_PREFERENCE = exports2.OVERLAPPED_SHIFT = exports2.INVALID_SHIFT_NAME = exports2.INVALID_WEEK_DAY = exports2.INVALID_FILE_TYPE = exports2.INVALID_HEADER_FIELDS = exports2.DELETE_LAST_SHIFT_PATTERN = exports2.INVALID_ACTUAL_START_AT_STATE = exports2.INVALID_DOMAIN = exports2.SKU_NOT_FOUND = exports2.STATION_GROUP_NOT_FOUND = exports2.WORK_ORDER_ENDED = exports2.SCHEDULE_NOT_FOUND = exports2.INVALID_SKU = exports2.INVALID_SCHEDULE = exports2.EXPIRED_TOKEN = exports2.UNAUTHORIZED_USER = exports2.UNAUTHENTICATED_USER = exports2.SHIFT_PATTERN_NOT_FOUND = exports2.INVALID_SHIFT_PATTERN_TITLE = exports2.INVALID_SHIFT_PATTERN_ID = exports2.INVALID_DELETE_SHIFTS = exports2.UNSUPPORTED_SHIFT_OVER_MID_NIGHT = exports2.INVALID_SHIFTS = exports2.INVALID_PLANTCODE = exports2.INVALID_RANGECODE = exports2.INTERNAL_SERVER_ERROR = exports2.CACHE_NOT_COMPLETE = void 0;
|
|
833
|
-
exports2.
|
|
834
|
-
exports2.PRODUCTION_BLOCKED_BY_MANUAL_DOWNTIME = exports2.PRODUCTION_CORRECTION_NOT_ALLOWED = exports2.PRODUCTION_QUANTITY_BELOW_ZERO = exports2.INVALID_PRODUCTION_ID = exports2.RESET_EXCEED_30_DAYS = exports2.INVALID_REASON_CODE = exports2.SELF_REFERENCING_CODE = exports2.PARENT_CODE_IN_USE = exports2.DUPLICATED_REASON_CODE = exports2.DATABASE_ERROR_MESSAGE = void 0;
|
|
841
|
+
exports2.UNSUPPORTED_API_KEY_OPERATION = exports2.ACCOUNT_ARCHIVED = exports2.ACCOUNT_DENIED = exports2.ACCOUNT_NOT_FOUND = exports2.ACCOUNT_MISMATCH = exports2.USER_ACCOUNT_IS_BLOCKED = exports2.ACCOUNT_NOT_SELECTED = exports2.INVALID_USER_ACCOUNT = exports2.NO_ACCOUNT_AVAILABLE = exports2.EXPIRED_USER = exports2.USER_IS_BLOCKED = exports2.INVALID_USER = exports2.USER_NOT_FOUND = exports2.MULTIPLE_ACCOUNT_ASSOCIATED = exports2.UNSUPPORTED_USER_OPERATION = exports2.EMAIL_TYPE_NOT_FOUND = exports2.INVALID_STATION_CODE = exports2.DUPLICATED_STATION_CODE = exports2.DUPLICATED_STATION_GROUP_CODE = exports2.INVALID_INPUT = exports2.DUPLICATED_SKU_CODE = exports2.INVALID_SKU_CODE = exports2.TOO_LARGE = exports2.BUSINESS_CONFLICT = exports2.FORBIDDEN = exports2.INVALID_ACCESS_CODE = exports2.EXPIRED_API_KEY = exports2.UNSUPPORTED_ARCHIVE_LAST_PLANT = exports2.PLANT_NOT_EXISTS = exports2.NOT_EMPTY_STATION_GROUP = exports2.INVALID_AGGREGATE_WINDOW = exports2.DUPLICATED_SCHEDULE = exports2.INVALID_SCHEDULE_ORDER_TYPE = exports2.INVALID_SKU_GROUP_NAME = exports2.SKU_GROUP_NOT_FOUND = exports2.INVALID_SKU_GROUP = exports2.INVALID_DOWNTIMNE_DURATION_THRESHOLD_MULTIPLIER = exports2.REASON_NOT_DOWNTIME_TYPE = exports2.MANUAL_DOWNTIME_NO_ACTIVE_SCHEDULE = exports2.MANUAL_DOWNTIME_ALREADY_ONGOING = exports2.CACHE_WARMING_DISABLED = exports2.MANUAL_DOWNTIME_DISABLED = exports2.DOWNTIME_NOT_MANUAL = exports2.DOWNTIME_NOT_FOUND = exports2.STATION_NOT_FOUND = exports2.TASK_LIST_NOT_FOUND = exports2.REASON_NOTE_REQUIRED = exports2.REASON_NOT_ALLOWED_FOR_STATION = exports2.REASON_NOT_FOUND = exports2.SKU_REQUIRED = void 0;
|
|
842
|
+
exports2.PRODUCTION_BLOCKED_BY_MANUAL_DOWNTIME = exports2.PRODUCTION_CORRECTION_NOT_ALLOWED = exports2.PRODUCTION_QUANTITY_BELOW_ZERO = exports2.INVALID_PRODUCTION_ID = exports2.RESET_EXCEED_30_DAYS = exports2.INVALID_REASON_CODE = exports2.SELF_REFERENCING_CODE = exports2.PARENT_CODE_IN_USE = exports2.DUPLICATED_REASON_CODE = exports2.DATABASE_ERROR_MESSAGE = exports2.INVALID_API_KEY = void 0;
|
|
835
843
|
exports2.CACHE_NOT_COMPLETE = "cacheNotComplete";
|
|
836
844
|
exports2.INTERNAL_SERVER_ERROR = "internalServerError";
|
|
837
845
|
exports2.INVALID_RANGECODE = "invalidRangeCode";
|
|
@@ -886,6 +894,7 @@ var require_error_key = __commonJS({
|
|
|
886
894
|
exports2.REASON_NOT_FOUND = "reasonNotFound";
|
|
887
895
|
exports2.REASON_NOT_ALLOWED_FOR_STATION = "reasonNotAllowedForStation";
|
|
888
896
|
exports2.REASON_NOTE_REQUIRED = "reasonNoteRequired";
|
|
897
|
+
exports2.TASK_LIST_NOT_FOUND = "taskListNotFound";
|
|
889
898
|
exports2.STATION_NOT_FOUND = "stationNotFound";
|
|
890
899
|
exports2.DOWNTIME_NOT_FOUND = "downtimeNotFound";
|
|
891
900
|
exports2.DOWNTIME_NOT_MANUAL = "downtimeNotManual";
|
|
@@ -2019,7 +2028,7 @@ var require_base_reason = __commonJS({
|
|
|
2019
2028
|
require_extend();
|
|
2020
2029
|
var enums_1 = require_enums();
|
|
2021
2030
|
exports2.ReasonCodeSchema = zod_1.z.string().trim().min(1).max(50).refine((value) => value === value.toLowerCase()).describe("Unique reason code used to reference this reason (e.g., 'MAINTENANCE', 'BREAKDOWN', 'PLANNED-PM'). Must be unique within the account.");
|
|
2022
|
-
var REQUIRE_NOTES_DESCRIPTION = "Require Notes: When enabled, operators must enter notes before the reason can be confirmed. Only applies when the reason is assigned to a downtime.";
|
|
2031
|
+
var REQUIRE_NOTES_DESCRIPTION = "Require Notes: When enabled, operators must enter notes before the reason can be confirmed. Only applies when the reason is assigned to a downtime. Omit the field to inherit the nearest ancestor reason's setting; set false to explicitly opt out of an inherited true.";
|
|
2023
2032
|
exports2.BaseReasonSchema = zod_1.z.object({
|
|
2024
2033
|
code: exports2.ReasonCodeSchema,
|
|
2025
2034
|
description: zod_1.z.string().describe("Human-readable description of this reason (e.g., 'Planned maintenance', 'Equipment breakdown', 'Material shortage')"),
|
|
@@ -2186,6 +2195,7 @@ var require_manifest = __commonJS({
|
|
|
2186
2195
|
})).optional().describe("Array of shift patterns defining working schedules (optional). Shift patterns can be referenced by ID from station groups and stations."),
|
|
2187
2196
|
reasons: zod_1.z.array(base_reason_1.ManifestReasonSchema).optional().describe("Array of reason codes for categorizing non-productive time (optional). Reasons can be hierarchical with nested child reasons. Used for both planned non-production schedules (e.g., maintenance, breaks) and categorizing downtime detected by Busroot."),
|
|
2188
2197
|
tasks: zod_1.z.array(task_1.TaskSchema).optional().describe("Array of Tasks (optional). Tasks can be linked to stations or SKUs via taskCodes arrays."),
|
|
2198
|
+
taskLists: zod_1.z.array(task_1.TaskListSchema).optional().describe("Array of Task lists (optional). A purely organisational grouping of Tasks, referenced by Tasks via taskListCodes."),
|
|
2189
2199
|
skus: zod_1.z.array(sku_1.SkuSchema).optional().describe("Array of SKUs (products/parts) that can be manufactured (optional). SKUs define production characteristics and can be referenced when scheduling."),
|
|
2190
2200
|
plants: zod_1.z.array(plant_1.PlantSchema).describe("Array of plants belonging to this account (minimum 1)")
|
|
2191
2201
|
}).describe("Account configuration with nested shift patterns, reasons, SKUs, plants, station groups, and stations")
|
|
@@ -6541,6 +6551,21 @@ var require_task2 = __commonJS({
|
|
|
6541
6551
|
}
|
|
6542
6552
|
});
|
|
6543
6553
|
|
|
6554
|
+
// ../../packages/common/build/api-schemas/task-list.js
|
|
6555
|
+
var require_task_list = __commonJS({
|
|
6556
|
+
"../../packages/common/build/api-schemas/task-list.js"(exports2) {
|
|
6557
|
+
"use strict";
|
|
6558
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6559
|
+
exports2.TaskListDeleteRequest = exports2.TaskListPostRequest = void 0;
|
|
6560
|
+
var zod_1 = require("zod");
|
|
6561
|
+
var task_1 = require_task();
|
|
6562
|
+
exports2.TaskListPostRequest = task_1.TaskListSchema;
|
|
6563
|
+
exports2.TaskListDeleteRequest = zod_1.z.object({
|
|
6564
|
+
code: zod_1.z.string()
|
|
6565
|
+
});
|
|
6566
|
+
}
|
|
6567
|
+
});
|
|
6568
|
+
|
|
6544
6569
|
// ../../packages/common/build/api-schemas/agent.js
|
|
6545
6570
|
var require_agent = __commonJS({
|
|
6546
6571
|
"../../packages/common/build/api-schemas/agent.js"(exports2) {
|
|
@@ -6597,7 +6622,7 @@ var require_api_schemas = __commonJS({
|
|
|
6597
6622
|
"use strict";
|
|
6598
6623
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6599
6624
|
exports2.ScheduleEditPartsPerCycleOverridePostBodyRequest = exports2.ScheduleEditPartsPerCycleOverridePostParamRequest = exports2.ScheduleFutureGetParamRequest = exports2.ScheduleCutShortPostRequest = exports2.ScheduleDeleteRequest = exports2.SchedulePostRequestTransform = exports2.SchedulePostRequestSuperRefine = exports2.SchedulePostRequest = exports2.ScheduleWorkderGetRequest = exports2.ScheduleGetRequest = exports2.ReasonDeleteRequest = exports2.ReasonPostRequest = exports2.ReasonGetRequest = exports2.ReasonBreadcrumb = exports2.NotificationRefferencesRequest = exports2.StationGroupDeleteRquest = exports2.StationGroupGetRquest = exports2.StationGroupPostRequest = exports2.StationGroupCodeSchema = exports2.StationOperatorPostRequest = exports2.StationTargetGetRequest = exports2.StationWindowGetRequest = exports2.StationLogGetRequest = exports2.AdminStationPutBodyRequest = exports2.StationGetRequest = exports2.StationPostRequest = exports2.StationPostRequestTransform = exports2.StationPostRequestSuperRefine = exports2.StationDeleteRequest = exports2.AccountArchivePostRequest = exports2.AccountSettingPostRequest = exports2.SelectAccountPostRequest = exports2.NewAccountPostRequest = exports2.ArchivePlantPostRequest = exports2.PlantPostRequest = exports2.UserGetRequest = exports2.UserPostRequest = exports2.SkuCycleTimeAnalysisGetRequest = exports2.SkuDeleteRequest = exports2.SkuPostBulkRequest = exports2.SkuPostRequestTransform = exports2.SkuPostRequestSuperRefine = exports2.SkuPostRequest = exports2.BooleanTypeSchema = exports2.SortByStandardParam = exports2.BusrootPagingResponse = exports2.StandardRequestSuperRefine = exports2.StandardRequestParams = exports2.RangeCodeSchema = exports2.UNKNOWN_CODE = void 0;
|
|
6600
|
-
exports2.BufferedDauMessageSchema = exports2.DauMessagesGetParams = exports2.AgentRequest = exports2.AgentMessage = exports2.TaskDeleteRequest = exports2.TaskPostRequest = exports2.NotePostRequest = exports2.NoteGetRequest = exports2.DeleteNoteRequest = exports2.DeleteKeyDeleteRequest = exports2.FilterGetRequest = exports2.AccessCodeGetRequest = exports2.DebugMockClearPostRequest = exports2.DebugResetCursorPostRequest = exports2.DebugEmailDowntimeSummaryGetRequest = exports2.EmailTestHarnessPostRequestRefinement = exports2.EmailTestHarnessPostRequest = exports2.LoginPostRequest = exports2.CallBackGetRequest = exports2.DevicePostRequest = exports2.DeviceDeleteRequest = exports2.DashboardGetRquest = exports2.ManualDowntimeEndByStationRequest = exports2.IssueEventPostRequestRefinement = exports2.IssueEventPostRequest = exports2.IssueEventQueryRequest = exports2.IssuePostRequest = exports2.IssueIdGetRequest = exports2.DOWNTIME_NOTE_MAX_LENGTH = exports2.ProductionAggregateWindowGetRequest = exports2.ProductionManualPostRequest = exports2.ShiftPatternDeleteRequest = exports2.ShiftPostRequest = exports2.ScheduleLogGetRequest = void 0;
|
|
6625
|
+
exports2.BufferedDauMessageSchema = exports2.DauMessagesGetParams = exports2.AgentRequest = exports2.AgentMessage = exports2.TaskListDeleteRequest = exports2.TaskListPostRequest = exports2.TaskDeleteRequest = exports2.TaskPostRequest = exports2.NotePostRequest = exports2.NoteGetRequest = exports2.DeleteNoteRequest = exports2.DeleteKeyDeleteRequest = exports2.FilterGetRequest = exports2.AccessCodeGetRequest = exports2.DebugMockClearPostRequest = exports2.DebugResetCursorPostRequest = exports2.DebugEmailDowntimeSummaryGetRequest = exports2.EmailTestHarnessPostRequestRefinement = exports2.EmailTestHarnessPostRequest = exports2.LoginPostRequest = exports2.CallBackGetRequest = exports2.DevicePostRequest = exports2.DeviceDeleteRequest = exports2.DashboardGetRquest = exports2.ManualDowntimeEndByStationRequest = exports2.IssueEventPostRequestRefinement = exports2.IssueEventPostRequest = exports2.IssueEventQueryRequest = exports2.IssuePostRequest = exports2.IssueIdGetRequest = exports2.DOWNTIME_NOTE_MAX_LENGTH = exports2.ProductionAggregateWindowGetRequest = exports2.ProductionManualPostRequest = exports2.ShiftPatternDeleteRequest = exports2.ShiftPostRequest = exports2.ScheduleLogGetRequest = void 0;
|
|
6601
6626
|
var common_1 = require_common();
|
|
6602
6627
|
Object.defineProperty(exports2, "UNKNOWN_CODE", { enumerable: true, get: function() {
|
|
6603
6628
|
return common_1.UNKNOWN_CODE;
|
|
@@ -6857,6 +6882,13 @@ var require_api_schemas = __commonJS({
|
|
|
6857
6882
|
Object.defineProperty(exports2, "TaskDeleteRequest", { enumerable: true, get: function() {
|
|
6858
6883
|
return task_1.TaskDeleteRequest;
|
|
6859
6884
|
} });
|
|
6885
|
+
var task_list_1 = require_task_list();
|
|
6886
|
+
Object.defineProperty(exports2, "TaskListPostRequest", { enumerable: true, get: function() {
|
|
6887
|
+
return task_list_1.TaskListPostRequest;
|
|
6888
|
+
} });
|
|
6889
|
+
Object.defineProperty(exports2, "TaskListDeleteRequest", { enumerable: true, get: function() {
|
|
6890
|
+
return task_list_1.TaskListDeleteRequest;
|
|
6891
|
+
} });
|
|
6860
6892
|
var agent_1 = require_agent();
|
|
6861
6893
|
Object.defineProperty(exports2, "AgentMessage", { enumerable: true, get: function() {
|
|
6862
6894
|
return agent_1.AgentMessage;
|
|
@@ -6888,7 +6920,12 @@ var require_reason3 = __commonJS({
|
|
|
6888
6920
|
description: zod_1.z.string(),
|
|
6889
6921
|
parentReasonCode: zod_1.z.string().nullish(),
|
|
6890
6922
|
type: zod_1.z.array(zod_1.z.nativeEnum(enums_1.REASON_TYPE)),
|
|
6891
|
-
|
|
6923
|
+
// The value stored on this reason alone — undefined means "inherit from the parent reason".
|
|
6924
|
+
// Enforcement must read `effectiveRequireNotes`; this field is for the admin form.
|
|
6925
|
+
requireNotes: zod_1.z.boolean().optional(),
|
|
6926
|
+
// `requireNotes` resolved down the reason tree (nearest-defined-wins). Always populated by
|
|
6927
|
+
// `reasonUtils.reasonsFromManifest`; optional only so hand-built reason objects still typecheck.
|
|
6928
|
+
effectiveRequireNotes: zod_1.z.boolean().optional()
|
|
6892
6929
|
});
|
|
6893
6930
|
function toReasonViewModel(schemas) {
|
|
6894
6931
|
return schemas.map((s) => ({
|
|
@@ -6896,7 +6933,8 @@ var require_reason3 = __commonJS({
|
|
|
6896
6933
|
description: s.description,
|
|
6897
6934
|
type: s.type,
|
|
6898
6935
|
parentReasonCode: s.parentReasonCode,
|
|
6899
|
-
requireNotes: s.requireNotes
|
|
6936
|
+
requireNotes: s.requireNotes,
|
|
6937
|
+
effectiveRequireNotes: s.effectiveRequireNotes ?? s.requireNotes ?? false
|
|
6900
6938
|
}));
|
|
6901
6939
|
}
|
|
6902
6940
|
}
|
|
@@ -7734,18 +7772,20 @@ var require_reason4 = __commonJS({
|
|
|
7734
7772
|
exports2.reasonBreadcrumb = reasonBreadcrumb;
|
|
7735
7773
|
exports2.withAncestorReasons = withAncestorReasons;
|
|
7736
7774
|
var reason_1 = require_reason3();
|
|
7737
|
-
function flattenReasons(reasons, parentReasonCode) {
|
|
7775
|
+
function flattenReasons(reasons, parentReasonCode, inheritedRequireNotes) {
|
|
7738
7776
|
const result = [];
|
|
7739
7777
|
for (const reason of reasons) {
|
|
7778
|
+
const effectiveRequireNotes = reason.requireNotes ?? inheritedRequireNotes ?? false;
|
|
7740
7779
|
result.push({
|
|
7741
7780
|
code: reason.code,
|
|
7742
7781
|
description: reason.description,
|
|
7743
7782
|
type: reason.type,
|
|
7744
7783
|
parentReasonCode: parentReasonCode ?? null,
|
|
7745
|
-
requireNotes: reason.requireNotes
|
|
7784
|
+
requireNotes: reason.requireNotes,
|
|
7785
|
+
effectiveRequireNotes
|
|
7746
7786
|
});
|
|
7747
7787
|
if (reason.reasons?.length) {
|
|
7748
|
-
result.push(...flattenReasons(reason.reasons, reason.code));
|
|
7788
|
+
result.push(...flattenReasons(reason.reasons, reason.code, reason.requireNotes ?? inheritedRequireNotes));
|
|
7749
7789
|
}
|
|
7750
7790
|
}
|
|
7751
7791
|
return result;
|
package/package.json
CHANGED