busroot-sdk 0.0.8-dev.2839966438 → 0.0.8-dev.2846274054

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.
Files changed (2) hide show
  1. package/build/index.js +10 -0
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -8308,6 +8308,8 @@ var require_production3 = __commonJS({
8308
8308
  Object.defineProperty(exports2, "__esModule", { value: true });
8309
8309
  exports2.MAX_HISTORICAL_CORRECTIONS_PER_SCHEDULE = void 0;
8310
8310
  exports2.productionCap = productionCap;
8311
+ exports2.maxPartsPerCycle = maxPartsPerCycle;
8312
+ exports2.partsPerCycleCapMessage = partsPerCycleCapMessage;
8311
8313
  exports2.isAtProductionCap = isAtProductionCap;
8312
8314
  exports2.exceedsProductionCap = exceedsProductionCap;
8313
8315
  exports2.historicalCorrectionAnchor = historicalCorrectionAnchor;
@@ -8323,6 +8325,7 @@ var require_production3 = __commonJS({
8323
8325
  exports2.aggregateProductionByWindow = aggregateProductionByWindow;
8324
8326
  exports2.calculatePerMinutePerformance = calculatePerMinutePerformance;
8325
8327
  var moment_timezone_1 = __importDefault(require("moment-timezone"));
8328
+ var schemas_1 = require_schemas();
8326
8329
  var enums_1 = require_enums();
8327
8330
  var time_1 = require_time();
8328
8331
  var _1 = require_utils();
@@ -8330,6 +8333,13 @@ var require_production3 = __commonJS({
8330
8333
  const cap = manifest.account.maxProductionCountPerSchedule;
8331
8334
  return cap != null && cap > 0 ? cap : null;
8332
8335
  }
8336
+ function maxPartsPerCycle(manifest) {
8337
+ const cap = productionCap(manifest);
8338
+ return cap == null ? schemas_1.MAX_PARTS_PER_CYCLE : Math.min(schemas_1.MAX_PARTS_PER_CYCLE, cap);
8339
+ }
8340
+ function partsPerCycleCapMessage(cap) {
8341
+ return `PPC exceeds the account limit of ${cap} units per schedule`;
8342
+ }
8333
8343
  function isAtProductionCap(manifest, quantityTotal) {
8334
8344
  const cap = productionCap(manifest);
8335
8345
  return cap != null && (quantityTotal ?? 0) >= cap;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "busroot-sdk",
3
- "version": "0.0.8-dev.2839966438",
3
+ "version": "0.0.8-dev.2846274054",
4
4
  "description": "An SDK for accessing Busroot from output.industries",
5
5
  "homepage": "https://www.output.industries",
6
6
  "main": "./build/index.js",