busroot-sdk 0.0.8-dev.2840567293 → 0.0.8-dev.2847527769

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 CHANGED
@@ -3664,8 +3664,8 @@ declare class BusrootClient {
3664
3664
  completedAt?: string | null | undefined;
3665
3665
  lastCompletedAt?: string | null | undefined;
3666
3666
  completedOperatorInitials?: string | null | undefined;
3667
- periodStartAt?: string | null | undefined;
3668
- periodEndAt?: string | null | undefined;
3667
+ taskCompletionId?: number | null | undefined;
3668
+ expectedAt?: string | null | undefined;
3669
3669
  }[] | undefined;
3670
3670
  activeSchedule?: {
3671
3671
  accountId: string;
@@ -6460,8 +6460,8 @@ declare const StationViewModel: z.ZodObject<{
6460
6460
  completedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6461
6461
  lastCompletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6462
6462
  completedOperatorInitials: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6463
- periodStartAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6464
- periodEndAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6463
+ taskCompletionId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
6464
+ expectedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6465
6465
  }, "strict", z.ZodTypeAny, {
6466
6466
  code: string;
6467
6467
  title: string;
@@ -6487,8 +6487,8 @@ declare const StationViewModel: z.ZodObject<{
6487
6487
  completedAt?: string | null | undefined;
6488
6488
  lastCompletedAt?: string | null | undefined;
6489
6489
  completedOperatorInitials?: string | null | undefined;
6490
- periodStartAt?: string | null | undefined;
6491
- periodEndAt?: string | null | undefined;
6490
+ taskCompletionId?: number | null | undefined;
6491
+ expectedAt?: string | null | undefined;
6492
6492
  }, {
6493
6493
  code: string;
6494
6494
  title: string;
@@ -6511,8 +6511,8 @@ declare const StationViewModel: z.ZodObject<{
6511
6511
  completedAt?: string | null | undefined;
6512
6512
  lastCompletedAt?: string | null | undefined;
6513
6513
  completedOperatorInitials?: string | null | undefined;
6514
- periodStartAt?: string | null | undefined;
6515
- periodEndAt?: string | null | undefined;
6514
+ taskCompletionId?: number | null | undefined;
6515
+ expectedAt?: string | null | undefined;
6516
6516
  }>, "many">>;
6517
6517
  }, "strip", z.ZodTypeAny, {
6518
6518
  code: string;
@@ -6683,8 +6683,8 @@ declare const StationViewModel: z.ZodObject<{
6683
6683
  completedAt?: string | null | undefined;
6684
6684
  lastCompletedAt?: string | null | undefined;
6685
6685
  completedOperatorInitials?: string | null | undefined;
6686
- periodStartAt?: string | null | undefined;
6687
- periodEndAt?: string | null | undefined;
6686
+ taskCompletionId?: number | null | undefined;
6687
+ expectedAt?: string | null | undefined;
6688
6688
  }[] | undefined;
6689
6689
  }, {
6690
6690
  code: string;
@@ -6852,8 +6852,8 @@ declare const StationViewModel: z.ZodObject<{
6852
6852
  completedAt?: string | null | undefined;
6853
6853
  lastCompletedAt?: string | null | undefined;
6854
6854
  completedOperatorInitials?: string | null | undefined;
6855
- periodStartAt?: string | null | undefined;
6856
- periodEndAt?: string | null | undefined;
6855
+ taskCompletionId?: number | null | undefined;
6856
+ expectedAt?: string | null | undefined;
6857
6857
  }[] | undefined;
6858
6858
  }>;
6859
6859
  type StationViewModel = z.infer<typeof StationViewModel>;
package/build/index.js CHANGED
@@ -893,8 +893,8 @@ var require_error_key = __commonJS({
893
893
  "use strict";
894
894
  Object.defineProperty(exports2, "__esModule", { value: true });
895
895
  exports2.TARGET_STATION_NOT_FOUND = exports2.INVALID_PARTS_PER_CYCLE = 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;
896
- 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 = exports2.STATION_REASSIGN_CROSS_GROUP = void 0;
897
- exports2.TOO_MANY_ACCESS_CODE_ATTEMPTS = exports2.TOO_MANY_REQUESTS = exports2.HISTORICAL_CORRECTION_LIMIT_REACHED = exports2.HISTORICAL_CORRECTION_CURSOR_RESET_FAILED = exports2.HISTORICAL_CORRECTION_WINDOW_EXPIRED = exports2.SCHEDULE_NOT_CORRECTABLE = exports2.HISTORICAL_CORRECTION_NOT_ALLOWED = exports2.PRODUCTION_EXCEEDS_MAX_COUNT = 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 = exports2.UNSUPPORTED_API_KEY_OPERATION = void 0;
896
+ 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_COMPLETION_MISSED = exports2.TASK_COMPLETION_ALREADY_COMPLETED = exports2.TASK_COMPLETION_NOT_FOUND = exports2.TASK_LIST_NOT_FOUND = exports2.REASON_NOTE_REQUIRED = exports2.REASON_NOT_ALLOWED_FOR_STATION = exports2.REASON_NOT_FOUND = exports2.SKU_REQUIRED = exports2.STATION_REASSIGN_CROSS_GROUP = void 0;
897
+ exports2.TOO_MANY_ACCESS_CODE_ATTEMPTS = exports2.TOO_MANY_REQUESTS = exports2.HISTORICAL_CORRECTION_LIMIT_REACHED = exports2.HISTORICAL_CORRECTION_CURSOR_RESET_FAILED = exports2.HISTORICAL_CORRECTION_WINDOW_EXPIRED = exports2.SCHEDULE_NOT_CORRECTABLE = exports2.HISTORICAL_CORRECTION_NOT_ALLOWED = exports2.PRODUCTION_EXCEEDS_MAX_COUNT = 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 = exports2.UNSUPPORTED_API_KEY_OPERATION = exports2.ACCOUNT_ARCHIVED = exports2.ACCOUNT_DENIED = exports2.ACCOUNT_NOT_FOUND = void 0;
898
898
  exports2.CACHE_NOT_COMPLETE = "cacheNotComplete";
899
899
  exports2.INTERNAL_SERVER_ERROR = "internalServerError";
900
900
  exports2.INVALID_RANGECODE = "invalidRangeCode";
@@ -951,6 +951,9 @@ var require_error_key = __commonJS({
951
951
  exports2.REASON_NOT_ALLOWED_FOR_STATION = "reasonNotAllowedForStation";
952
952
  exports2.REASON_NOTE_REQUIRED = "reasonNoteRequired";
953
953
  exports2.TASK_LIST_NOT_FOUND = "taskListNotFound";
954
+ exports2.TASK_COMPLETION_NOT_FOUND = "taskCompletionNotFound";
955
+ exports2.TASK_COMPLETION_ALREADY_COMPLETED = "taskCompletionAlreadyCompleted";
956
+ exports2.TASK_COMPLETION_MISSED = "taskCompletionMissed";
954
957
  exports2.STATION_NOT_FOUND = "stationNotFound";
955
958
  exports2.DOWNTIME_NOT_FOUND = "downtimeNotFound";
956
959
  exports2.DOWNTIME_NOT_MANUAL = "downtimeNotManual";
@@ -2617,10 +2620,17 @@ var require_task_completion = __commonJS({
2617
2620
  "../../packages/common/build/schemas/task-completion.js"(exports2) {
2618
2621
  "use strict";
2619
2622
  Object.defineProperty(exports2, "__esModule", { value: true });
2620
- exports2.TaskCompletionSchema = exports2.TASK_COMPLETION_MODEL = void 0;
2623
+ exports2.TaskCompletionSchema = exports2.TaskCompletionFrequencyTypeSchema = exports2.TASK_COMPLETION_MODEL = void 0;
2621
2624
  var zod_1 = require("zod");
2625
+ var task_1 = require_task();
2622
2626
  exports2.TASK_COMPLETION_MODEL = "task_completion";
2627
+ exports2.TaskCompletionFrequencyTypeSchema = zod_1.z.enum([
2628
+ task_1.TASK_FREQUENCY_TYPE_SCHEDULE,
2629
+ task_1.TASK_FREQUENCY_TYPE_CRON,
2630
+ task_1.TASK_FREQUENCY_TYPE_ALWAYS
2631
+ ]);
2623
2632
  exports2.TaskCompletionSchema = zod_1.z.object({
2633
+ id: zod_1.z.number(),
2624
2634
  accountId: zod_1.z.string(),
2625
2635
  stationCode: zod_1.z.string(),
2626
2636
  taskCode: zod_1.z.string(),
@@ -2629,17 +2639,24 @@ var require_task_completion = __commonJS({
2629
2639
  // Nullish only because rows written before Task lists became the unit of operation kept their
2630
2640
  // NULL — see migration 20260909143000. Every write path sets it.
2631
2641
  taskListCode: zod_1.z.string().nullish(),
2642
+ frequencyType: exports2.TaskCompletionFrequencyTypeSchema,
2643
+ // Set iff `frequencyType` is `schedule`.
2632
2644
  scheduleId: zod_1.z.number().nullish(),
2633
- periodStartAt: zod_1.z.string().nullish(),
2634
- periodEndAt: zod_1.z.string().nullish(),
2635
- expectedAt: zod_1.z.string(),
2645
+ // The deadline. Set iff `frequencyType` is `cron` — a per-schedule or On Demand row has no
2646
+ // specific end time, so `createdAt` is the only timing it carries.
2647
+ expectedAt: zod_1.z.string().nullish(),
2636
2648
  completedAt: zod_1.z.string().nullish(),
2649
+ // Set by the cache-builder: the deadline for a cron row, the schedule's `actualEndAt` for a
2650
+ // per-schedule row. Never set on an On Demand row.
2651
+ missedAt: zod_1.z.string().nullish(),
2637
2652
  completedUserId: zod_1.z.number().nullish(),
2638
2653
  completedOperatorInitials: zod_1.z.string().nullish(),
2639
2654
  // Free-text detail recorded at completion time. Mandatory when the Task has `requireNotes` —
2640
- // enforced at the completion API, not here, so expectation rows can be written noteless.
2641
- note: zod_1.z.string().nullish()
2642
- }).refine((v) => v.scheduleId == null !== (v.periodStartAt == null), "Exactly one of scheduleId or periodStartAt must be set on a Task completion");
2655
+ // enforced at the completion API, not here, so due rows can be written noteless.
2656
+ note: zod_1.z.string().nullish(),
2657
+ createdAt: zod_1.z.string(),
2658
+ updatedAt: zod_1.z.string()
2659
+ });
2643
2660
  }
2644
2661
  });
2645
2662
 
@@ -6679,6 +6696,28 @@ var require_task_list = __commonJS({
6679
6696
  }
6680
6697
  });
6681
6698
 
6699
+ // ../../packages/common/build/api-schemas/task-completion.js
6700
+ var require_task_completion2 = __commonJS({
6701
+ "../../packages/common/build/api-schemas/task-completion.js"(exports2) {
6702
+ "use strict";
6703
+ Object.defineProperty(exports2, "__esModule", { value: true });
6704
+ exports2.TaskCompletionStartListRequest = exports2.TaskCompletionCompleteRequest = exports2.TaskCompletionIdRequest = void 0;
6705
+ var zod_1 = require("zod");
6706
+ var note_1 = require_note();
6707
+ exports2.TaskCompletionIdRequest = zod_1.z.object({
6708
+ id: zod_1.z.coerce.number().int().positive()
6709
+ });
6710
+ exports2.TaskCompletionCompleteRequest = zod_1.z.object({
6711
+ operatorInitials: zod_1.z.string().nullish(),
6712
+ note: zod_1.z.string().max(note_1.NOTE_CONTENT_MAX_LENGTH).nullish()
6713
+ });
6714
+ exports2.TaskCompletionStartListRequest = zod_1.z.object({
6715
+ stationCode: zod_1.z.string().min(1),
6716
+ taskListCode: zod_1.z.string().min(1)
6717
+ });
6718
+ }
6719
+ });
6720
+
6682
6721
  // ../../packages/common/build/api-schemas/agent.js
6683
6722
  var require_agent = __commonJS({
6684
6723
  "../../packages/common/build/api-schemas/agent.js"(exports2) {
@@ -6735,7 +6774,7 @@ var require_api_schemas = __commonJS({
6735
6774
  "use strict";
6736
6775
  Object.defineProperty(exports2, "__esModule", { value: true });
6737
6776
  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;
6738
- 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.HISTORICAL_CORRECTION_WINDOW_MONTHS = exports2.MAX_HISTORICAL_CORRECTION_QUANTITY = exports2.ProductionAggregateWindowGetRequest = exports2.ProductionHistoricalCorrectionPostRequest = exports2.ProductionManualPostRequest = exports2.ShiftPatternDeleteRequest = exports2.ShiftPostRequest = exports2.ScheduleLogGetRequest = void 0;
6777
+ exports2.BufferedDauMessageSchema = exports2.DauMessagesGetParams = exports2.AgentRequest = exports2.AgentMessage = exports2.TaskCompletionStartListRequest = exports2.TaskCompletionCompleteRequest = exports2.TaskCompletionIdRequest = 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.HISTORICAL_CORRECTION_WINDOW_MONTHS = exports2.MAX_HISTORICAL_CORRECTION_QUANTITY = exports2.ProductionAggregateWindowGetRequest = exports2.ProductionHistoricalCorrectionPostRequest = exports2.ProductionManualPostRequest = exports2.ShiftPatternDeleteRequest = exports2.ShiftPostRequest = exports2.ScheduleLogGetRequest = void 0;
6739
6778
  var common_1 = require_common();
6740
6779
  Object.defineProperty(exports2, "UNKNOWN_CODE", { enumerable: true, get: function() {
6741
6780
  return common_1.UNKNOWN_CODE;
@@ -7011,6 +7050,16 @@ var require_api_schemas = __commonJS({
7011
7050
  Object.defineProperty(exports2, "TaskListDeleteRequest", { enumerable: true, get: function() {
7012
7051
  return task_list_1.TaskListDeleteRequest;
7013
7052
  } });
7053
+ var task_completion_1 = require_task_completion2();
7054
+ Object.defineProperty(exports2, "TaskCompletionIdRequest", { enumerable: true, get: function() {
7055
+ return task_completion_1.TaskCompletionIdRequest;
7056
+ } });
7057
+ Object.defineProperty(exports2, "TaskCompletionCompleteRequest", { enumerable: true, get: function() {
7058
+ return task_completion_1.TaskCompletionCompleteRequest;
7059
+ } });
7060
+ Object.defineProperty(exports2, "TaskCompletionStartListRequest", { enumerable: true, get: function() {
7061
+ return task_completion_1.TaskCompletionStartListRequest;
7062
+ } });
7014
7063
  var agent_1 = require_agent();
7015
7064
  Object.defineProperty(exports2, "AgentMessage", { enumerable: true, get: function() {
7016
7065
  return agent_1.AgentMessage;
@@ -8308,6 +8357,8 @@ var require_production3 = __commonJS({
8308
8357
  Object.defineProperty(exports2, "__esModule", { value: true });
8309
8358
  exports2.MAX_HISTORICAL_CORRECTIONS_PER_SCHEDULE = void 0;
8310
8359
  exports2.productionCap = productionCap;
8360
+ exports2.maxPartsPerCycle = maxPartsPerCycle;
8361
+ exports2.partsPerCycleCapMessage = partsPerCycleCapMessage;
8311
8362
  exports2.isAtProductionCap = isAtProductionCap;
8312
8363
  exports2.exceedsProductionCap = exceedsProductionCap;
8313
8364
  exports2.historicalCorrectionAnchor = historicalCorrectionAnchor;
@@ -8323,6 +8374,7 @@ var require_production3 = __commonJS({
8323
8374
  exports2.aggregateProductionByWindow = aggregateProductionByWindow;
8324
8375
  exports2.calculatePerMinutePerformance = calculatePerMinutePerformance;
8325
8376
  var moment_timezone_1 = __importDefault(require("moment-timezone"));
8377
+ var schemas_1 = require_schemas();
8326
8378
  var enums_1 = require_enums();
8327
8379
  var time_1 = require_time();
8328
8380
  var _1 = require_utils();
@@ -8330,6 +8382,13 @@ var require_production3 = __commonJS({
8330
8382
  const cap = manifest.account.maxProductionCountPerSchedule;
8331
8383
  return cap != null && cap > 0 ? cap : null;
8332
8384
  }
8385
+ function maxPartsPerCycle(manifest) {
8386
+ const cap = productionCap(manifest);
8387
+ return cap == null ? schemas_1.MAX_PARTS_PER_CYCLE : Math.min(schemas_1.MAX_PARTS_PER_CYCLE, cap);
8388
+ }
8389
+ function partsPerCycleCapMessage(cap) {
8390
+ return `PPC exceeds the account limit of ${cap} units per schedule`;
8391
+ }
8333
8392
  function isAtProductionCap(manifest, quantityTotal) {
8334
8393
  const cap = productionCap(manifest);
8335
8394
  return cap != null && (quantityTotal ?? 0) >= cap;
@@ -10492,10 +10551,10 @@ var require_station4 = __commonJS({
10492
10551
  frequency: task_1.TaskFrequencySchema.describe("The frequency of the Task list this entry belongs to \u2014 not the Task's own legacy field."),
10493
10552
  order: zod_1.z.number().nullish().describe("Display order of the Task within this list."),
10494
10553
  completedAt: zod_1.z.string().nullish(),
10495
- 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."),
10554
+ 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."),
10496
10555
  completedOperatorInitials: zod_1.z.string().nullish(),
10497
- periodStartAt: zod_1.z.string().nullish().describe("ISO timestamp of the start of the current cron period (cron-frequency Tasks only)."),
10498
- periodEndAt: zod_1.z.string().nullish().describe("ISO timestamp of the end of the current cron period (cron-frequency Tasks only).")
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 due: its cron window has not opened, no schedule is running, or its list has not been started."),
10557
+ 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.")
10499
10558
  })).optional().describe("Tasks required for this station with completion status.")
10500
10559
  }).describe("Represents a machine or workstation inside a factory. Generically, these are referred to as 'stations'.");
10501
10560
  exports2.StationWithSchedulesViewModel = exports2.StationViewModel.merge(zod_1.z.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "busroot-sdk",
3
- "version": "0.0.8-dev.2840567293",
3
+ "version": "0.0.8-dev.2847527769",
4
4
  "description": "An SDK for accessing Busroot from output.industries",
5
5
  "homepage": "https://www.output.industries",
6
6
  "main": "./build/index.js",