@augno/sdk 0.18.1 → 0.18.2
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/CHANGELOG.md +2 -4
- package/package.json +1 -1
- package/resources/core/audit-events.d.mts +4 -4
- package/resources/core/audit-events.d.mts.map +1 -1
- package/resources/core/audit-events.d.ts +4 -4
- package/resources/core/audit-events.d.ts.map +1 -1
- package/resources/core/core.d.mts +2 -2
- package/resources/core/core.d.mts.map +1 -1
- package/resources/core/core.d.ts +2 -2
- package/resources/core/core.d.ts.map +1 -1
- package/resources/core/core.js.map +1 -1
- package/resources/core/core.mjs.map +1 -1
- package/resources/core/jobs.d.mts +1 -1
- package/resources/core/jobs.d.mts.map +1 -1
- package/resources/core/jobs.d.ts +1 -1
- package/resources/core/jobs.d.ts.map +1 -1
- package/resources/messaging/conversations/conversations.d.mts +3 -3
- package/resources/messaging/conversations/conversations.d.mts.map +1 -1
- package/resources/messaging/conversations/conversations.d.ts +3 -3
- package/resources/messaging/conversations/conversations.d.ts.map +1 -1
- package/resources/messaging/conversations/conversations.js.map +1 -1
- package/resources/messaging/conversations/conversations.mjs.map +1 -1
- package/resources/messaging/conversations/links.d.mts +2 -2
- package/resources/messaging/conversations/links.d.mts.map +1 -1
- package/resources/messaging/conversations/links.d.ts +2 -2
- package/resources/messaging/conversations/links.d.ts.map +1 -1
- package/resources/messaging/conversations/messages.d.mts +2 -2
- package/resources/messaging/conversations/messages.d.mts.map +1 -1
- package/resources/messaging/conversations/messages.d.ts +2 -2
- package/resources/messaging/conversations/messages.d.ts.map +1 -1
- package/resources/messaging/notifications/notifications.d.mts +2 -2
- package/resources/messaging/notifications/notifications.d.mts.map +1 -1
- package/resources/messaging/notifications/notifications.d.ts +2 -2
- package/resources/messaging/notifications/notifications.d.ts.map +1 -1
- package/resources/messaging/notifications/notifications.js.map +1 -1
- package/resources/messaging/notifications/notifications.mjs.map +1 -1
- package/resources/operations/index.d.mts +1 -1
- package/resources/operations/index.d.mts.map +1 -1
- package/resources/operations/index.d.ts +1 -1
- package/resources/operations/index.d.ts.map +1 -1
- package/resources/operations/index.js.map +1 -1
- package/resources/operations/index.mjs.map +1 -1
- package/resources/operations/machine-downtime-events.d.mts +56 -7
- package/resources/operations/machine-downtime-events.d.mts.map +1 -1
- package/resources/operations/machine-downtime-events.d.ts +56 -7
- package/resources/operations/machine-downtime-events.d.ts.map +1 -1
- package/resources/operations/machine-downtime-events.js +11 -7
- package/resources/operations/machine-downtime-events.js.map +1 -1
- package/resources/operations/machine-downtime-events.mjs +11 -7
- package/resources/operations/machine-downtime-events.mjs.map +1 -1
- package/resources/operations/operations.d.mts +2 -2
- package/resources/operations/operations.d.mts.map +1 -1
- package/resources/operations/operations.d.ts +2 -2
- package/resources/operations/operations.d.ts.map +1 -1
- package/resources/operations/operations.js.map +1 -1
- package/resources/operations/operations.mjs.map +1 -1
- package/resources/operations/production-schedule-settings/production-schedule-settings.d.mts +13 -12
- package/resources/operations/production-schedule-settings/production-schedule-settings.d.mts.map +1 -1
- package/resources/operations/production-schedule-settings/production-schedule-settings.d.ts +13 -12
- package/resources/operations/production-schedule-settings/production-schedule-settings.d.ts.map +1 -1
- package/resources/operations/production-schedule-settings/production-schedule-settings.js.map +1 -1
- package/resources/operations/production-schedule-settings/production-schedule-settings.mjs.map +1 -1
- package/resources/operations/production-schedules/actions.d.mts +34 -1
- package/resources/operations/production-schedules/actions.d.mts.map +1 -1
- package/resources/operations/production-schedules/actions.d.ts +34 -1
- package/resources/operations/production-schedules/actions.d.ts.map +1 -1
- package/resources/operations/production-schedules/actions.js +8 -0
- package/resources/operations/production-schedules/actions.js.map +1 -1
- package/resources/operations/production-schedules/actions.mjs +8 -0
- package/resources/operations/production-schedules/actions.mjs.map +1 -1
- package/resources/operations/production-schedules/index.d.mts +1 -1
- package/resources/operations/production-schedules/index.d.mts.map +1 -1
- package/resources/operations/production-schedules/index.d.ts +1 -1
- package/resources/operations/production-schedules/index.d.ts.map +1 -1
- package/resources/operations/production-schedules/index.js.map +1 -1
- package/resources/operations/production-schedules/index.mjs.map +1 -1
- package/resources/operations/production-schedules/production-schedules.d.mts +295 -2
- package/resources/operations/production-schedules/production-schedules.d.mts.map +1 -1
- package/resources/operations/production-schedules/production-schedules.d.ts +295 -2
- package/resources/operations/production-schedules/production-schedules.d.ts.map +1 -1
- package/resources/operations/production-schedules/production-schedules.js +42 -0
- package/resources/operations/production-schedules/production-schedules.js.map +1 -1
- package/resources/operations/production-schedules/production-schedules.mjs +42 -0
- package/resources/operations/production-schedules/production-schedules.mjs.map +1 -1
- package/resources/sales/account-groups.d.mts +2 -1
- package/resources/sales/account-groups.d.mts.map +1 -1
- package/resources/sales/account-groups.d.ts +2 -1
- package/resources/sales/account-groups.d.ts.map +1 -1
- package/resources/sales/account-prices/account-prices.d.mts +2 -1
- package/resources/sales/account-prices/account-prices.d.mts.map +1 -1
- package/resources/sales/account-prices/account-prices.d.ts +2 -1
- package/resources/sales/account-prices/account-prices.d.ts.map +1 -1
- package/resources/sales/account-prices/account-prices.js.map +1 -1
- package/resources/sales/account-prices/account-prices.mjs.map +1 -1
- package/resources/sales/customers/customers.d.mts +43 -14
- package/resources/sales/customers/customers.d.mts.map +1 -1
- package/resources/sales/customers/customers.d.ts +43 -14
- package/resources/sales/customers/customers.d.ts.map +1 -1
- package/resources/sales/customers/customers.js +10 -5
- package/resources/sales/customers/customers.js.map +1 -1
- package/resources/sales/customers/customers.mjs +10 -5
- package/resources/sales/customers/customers.mjs.map +1 -1
- package/resources/sales/customers/index.d.mts +1 -1
- package/resources/sales/customers/index.d.mts.map +1 -1
- package/resources/sales/customers/index.d.ts +1 -1
- package/resources/sales/customers/index.d.ts.map +1 -1
- package/resources/sales/customers/index.js.map +1 -1
- package/resources/sales/customers/index.mjs.map +1 -1
- package/resources/sales/index.d.mts +1 -1
- package/resources/sales/index.d.mts.map +1 -1
- package/resources/sales/index.d.ts +1 -1
- package/resources/sales/index.d.ts.map +1 -1
- package/resources/sales/index.js.map +1 -1
- package/resources/sales/index.mjs.map +1 -1
- package/resources/sales/sales-orders/actions.d.mts +14 -2
- package/resources/sales/sales-orders/actions.d.mts.map +1 -1
- package/resources/sales/sales-orders/actions.d.ts +14 -2
- package/resources/sales/sales-orders/actions.d.ts.map +1 -1
- package/resources/sales/sales-orders/sales-orders.d.mts +2 -2
- package/resources/sales/sales-orders/sales-orders.d.mts.map +1 -1
- package/resources/sales/sales-orders/sales-orders.d.ts +2 -2
- package/resources/sales/sales-orders/sales-orders.d.ts.map +1 -1
- package/resources/sales/sales-orders/sales-orders.js.map +1 -1
- package/resources/sales/sales-orders/sales-orders.mjs.map +1 -1
- package/resources/sales/sales.d.mts +2 -2
- package/resources/sales/sales.d.mts.map +1 -1
- package/resources/sales/sales.d.ts +2 -2
- package/resources/sales/sales.d.ts.map +1 -1
- package/resources/sales/sales.js.map +1 -1
- package/resources/sales/sales.mjs.map +1 -1
- package/src/resources/core/audit-events.ts +4 -0
- package/src/resources/core/core.ts +2 -0
- package/src/resources/core/jobs.ts +1 -0
- package/src/resources/messaging/conversations/conversations.ts +3 -0
- package/src/resources/messaging/conversations/links.ts +2 -0
- package/src/resources/messaging/conversations/messages.ts +2 -0
- package/src/resources/messaging/notifications/notifications.ts +2 -0
- package/src/resources/operations/index.ts +4 -0
- package/src/resources/operations/machine-downtime-events.ts +62 -7
- package/src/resources/operations/operations.ts +8 -0
- package/src/resources/operations/production-schedule-settings/production-schedule-settings.ts +13 -12
- package/src/resources/operations/production-schedules/actions.ts +37 -1
- package/src/resources/operations/production-schedules/index.ts +4 -0
- package/src/resources/operations/production-schedules/production-schedules.ts +354 -1
- package/src/resources/sales/account-groups.ts +2 -1
- package/src/resources/sales/account-prices/account-prices.ts +2 -1
- package/src/resources/sales/customers/customers.ts +57 -14
- package/src/resources/sales/customers/index.ts +1 -0
- package/src/resources/sales/index.ts +1 -0
- package/src/resources/sales/sales-orders/actions.ts +15 -1
- package/src/resources/sales/sales-orders/sales-orders.ts +2 -1
- package/src/resources/sales/sales.ts +2 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -198,6 +198,48 @@ export class ProductionSchedules extends APIResource {
|
|
|
198
198
|
return this._client.get(path`/v1/operations/production-schedules/${id}/finished-policies`, options);
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
+
/**
|
|
202
|
+
* Returns the second stage of a schedule: how many of which finished good to make
|
|
203
|
+
* from the knitted parts, week by week.
|
|
204
|
+
*
|
|
205
|
+
* The constraint plan says how much greige to knit and deliberately does not say
|
|
206
|
+
* what to turn it into — a family's demand is pooled onto the greige precisely so
|
|
207
|
+
* the buffer can sit at the undifferentiated stage, where it is cheapest. These
|
|
208
|
+
* lines are where that pooling is undone, against each finished SKU's own stock
|
|
209
|
+
* position, its own orders, and the hours the rest of the factory has that week.
|
|
210
|
+
*
|
|
211
|
+
* Levelled, not merely allocated. Work that does not fit a week moves to the next
|
|
212
|
+
* one rather than being dropped, so the plan never asks the second stage for more
|
|
213
|
+
* hours than it has. Two things bound it, and they are reported separately in the
|
|
214
|
+
* schedule's diagnostics because they call for opposite responses: a SKU held back
|
|
215
|
+
* for want of greige is a knitting problem, and a SKU held back for want of hours
|
|
216
|
+
* is a finishing one.
|
|
217
|
+
*
|
|
218
|
+
* Everything is counted in the constraint item's unit, so `greige_consumed` here
|
|
219
|
+
* and `planned_quantity` on the constraint plan are directly comparable — which is
|
|
220
|
+
* what lets the two stages be reconciled rather than only read side by side.
|
|
221
|
+
*
|
|
222
|
+
* This endpoint requires the permission: `production_schedules:read`.
|
|
223
|
+
*
|
|
224
|
+
* @example
|
|
225
|
+
* ```ts
|
|
226
|
+
* const listProductionScheduleFinishingLine =
|
|
227
|
+
* await client.operations.productionSchedules.retrieveFinishingLines(
|
|
228
|
+
* 'pnsc_m4zt3z8g8src',
|
|
229
|
+
* );
|
|
230
|
+
* ```
|
|
231
|
+
*/
|
|
232
|
+
retrieveFinishingLines(
|
|
233
|
+
id: string,
|
|
234
|
+
query: ProductionScheduleRetrieveFinishingLinesParams | null | undefined = {},
|
|
235
|
+
options?: RequestOptions,
|
|
236
|
+
): APIPromise<ListProductionScheduleFinishingLine> {
|
|
237
|
+
return this._client.get(path`/v1/operations/production-schedules/${id}/finishing-lines`, {
|
|
238
|
+
query,
|
|
239
|
+
...options,
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
|
|
201
243
|
/**
|
|
202
244
|
* Returns the department work implied by a schedule's constraint plan.
|
|
203
245
|
*
|
|
@@ -306,6 +348,11 @@ export class ProductionSchedules extends APIResource {
|
|
|
306
348
|
* the release excludes them, so a week holding nothing but those previews as
|
|
307
349
|
* empty.
|
|
308
350
|
*
|
|
351
|
+
* Lots the floor is already holding are named as such. A batch with
|
|
352
|
+
* `carried_forward_from` set is a ticket an earlier week issued and nobody worked,
|
|
353
|
+
* which the release moves into the new run rather than reissuing, so nothing has
|
|
354
|
+
* to be reprinted.
|
|
355
|
+
*
|
|
309
356
|
* This endpoint requires the permission: `production_schedules:read`.
|
|
310
357
|
*
|
|
311
358
|
* @example
|
|
@@ -497,6 +544,33 @@ export interface ListProductionScheduleFinishedPolicy {
|
|
|
497
544
|
page_info: APIKeysAPI.PageInfo;
|
|
498
545
|
}
|
|
499
546
|
|
|
547
|
+
/**
|
|
548
|
+
* A single page of resources, together with the metadata needed to page through
|
|
549
|
+
* the rest of the result set.
|
|
550
|
+
*/
|
|
551
|
+
export interface ListProductionScheduleFinishingLine {
|
|
552
|
+
/**
|
|
553
|
+
* Resources in this page.
|
|
554
|
+
*/
|
|
555
|
+
data: Array<ProductionScheduleFinishingLine>;
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* Resource type identifier.
|
|
559
|
+
*/
|
|
560
|
+
object: 'list';
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
* PageInfo describes where the current page sits within a paginated result set and
|
|
564
|
+
* how to move to the adjacent pages.
|
|
565
|
+
*
|
|
566
|
+
* Page a list by following the URLs below rather than assembling cursors yourself.
|
|
567
|
+
* For a top-level list endpoint the URL repeats the original request's query
|
|
568
|
+
* string with only the cursor swapped, so following it preserves the same filters,
|
|
569
|
+
* search term, and page size.
|
|
570
|
+
*/
|
|
571
|
+
page_info: APIKeysAPI.PageInfo;
|
|
572
|
+
}
|
|
573
|
+
|
|
500
574
|
/**
|
|
501
575
|
* A single page of resources, together with the metadata needed to page through
|
|
502
576
|
* the rest of the result set.
|
|
@@ -1186,6 +1260,150 @@ export interface ProductionScheduleFinishedPolicy {
|
|
|
1186
1260
|
weeks_of_cover: number;
|
|
1187
1261
|
}
|
|
1188
1262
|
|
|
1263
|
+
/**
|
|
1264
|
+
* One finished good's build in one week: the second stage of the plan.
|
|
1265
|
+
*
|
|
1266
|
+
* The constraint plan says how much greige to knit and deliberately does not say
|
|
1267
|
+
* what to turn it into — a family's demand is pooled onto the greige precisely so
|
|
1268
|
+
* the buffer can sit at the undifferentiated stage. These lines are where that
|
|
1269
|
+
* pooling is undone: how many of which finished good to make from the knitted
|
|
1270
|
+
* parts, decided against each SKU's own stock position, its own orders, and the
|
|
1271
|
+
* hours the rest of the factory has that week.
|
|
1272
|
+
*
|
|
1273
|
+
* Quantities are counted in the constraint item's unit, so `greige_consumed` and
|
|
1274
|
+
* the knit plan's `planned_quantity` are directly comparable. That is what lets
|
|
1275
|
+
* the two stages be reconciled rather than merely read side by side.
|
|
1276
|
+
*/
|
|
1277
|
+
export interface ProductionScheduleFinishingLine {
|
|
1278
|
+
/**
|
|
1279
|
+
* Finishing line ID.
|
|
1280
|
+
*/
|
|
1281
|
+
id: string;
|
|
1282
|
+
|
|
1283
|
+
/**
|
|
1284
|
+
* Creation timestamp.
|
|
1285
|
+
*/
|
|
1286
|
+
created_at: string;
|
|
1287
|
+
|
|
1288
|
+
/**
|
|
1289
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
1290
|
+
*/
|
|
1291
|
+
department: CoreAPI.Entity | null;
|
|
1292
|
+
|
|
1293
|
+
/**
|
|
1294
|
+
* How much of the week's draw on this SKU is an order rather than a forecast.
|
|
1295
|
+
*/
|
|
1296
|
+
firm_units: number;
|
|
1297
|
+
|
|
1298
|
+
/**
|
|
1299
|
+
* Units of the constraint item this takes out of the greige buffer.
|
|
1300
|
+
*
|
|
1301
|
+
* Equal to `planned_quantity` unless a finishing yield loss means a finished unit
|
|
1302
|
+
* costs more than one knitted one.
|
|
1303
|
+
*/
|
|
1304
|
+
greige_consumed: number;
|
|
1305
|
+
|
|
1306
|
+
/**
|
|
1307
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
1308
|
+
*/
|
|
1309
|
+
greige_item: CoreAPI.Entity | null;
|
|
1310
|
+
|
|
1311
|
+
/**
|
|
1312
|
+
* SKU of that constraint item.
|
|
1313
|
+
*/
|
|
1314
|
+
greige_sku: string;
|
|
1315
|
+
|
|
1316
|
+
/**
|
|
1317
|
+
* Whether the line sits inside the published frozen window.
|
|
1318
|
+
*/
|
|
1319
|
+
is_frozen: boolean;
|
|
1320
|
+
|
|
1321
|
+
/**
|
|
1322
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
1323
|
+
*/
|
|
1324
|
+
item: CoreAPI.Entity | null;
|
|
1325
|
+
|
|
1326
|
+
/**
|
|
1327
|
+
* Resource type identifier.
|
|
1328
|
+
*/
|
|
1329
|
+
object: 'production_schedule_finishing_line';
|
|
1330
|
+
|
|
1331
|
+
/**
|
|
1332
|
+
* Units in one lot.
|
|
1333
|
+
*/
|
|
1334
|
+
planned_lot_units: number;
|
|
1335
|
+
|
|
1336
|
+
/**
|
|
1337
|
+
* How many lots the quantity breaks into.
|
|
1338
|
+
*/
|
|
1339
|
+
planned_lots: number;
|
|
1340
|
+
|
|
1341
|
+
/**
|
|
1342
|
+
* Units of the finished good to make.
|
|
1343
|
+
*/
|
|
1344
|
+
planned_quantity: number;
|
|
1345
|
+
|
|
1346
|
+
/**
|
|
1347
|
+
* Hours of the second stage's capacity this line consumes.
|
|
1348
|
+
*/
|
|
1349
|
+
planned_run_hours: number;
|
|
1350
|
+
|
|
1351
|
+
/**
|
|
1352
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
1353
|
+
*/
|
|
1354
|
+
production_schedule: CoreAPI.Entity | null;
|
|
1355
|
+
|
|
1356
|
+
/**
|
|
1357
|
+
* Entity is a polymorphic reference to any resource in the system.
|
|
1358
|
+
*/
|
|
1359
|
+
production_step: CoreAPI.Entity | null;
|
|
1360
|
+
|
|
1361
|
+
/**
|
|
1362
|
+
* And after it lands.
|
|
1363
|
+
*/
|
|
1364
|
+
projected_on_hand_after: number;
|
|
1365
|
+
|
|
1366
|
+
/**
|
|
1367
|
+
* This SKU's own projected stock before the line lands.
|
|
1368
|
+
*/
|
|
1369
|
+
projected_on_hand_before: number;
|
|
1370
|
+
|
|
1371
|
+
/**
|
|
1372
|
+
* SKU of the finished good, as it stood when the plan was generated.
|
|
1373
|
+
*/
|
|
1374
|
+
sku: string;
|
|
1375
|
+
|
|
1376
|
+
/**
|
|
1377
|
+
* Whether the solver produced this line or a person did.
|
|
1378
|
+
*/
|
|
1379
|
+
source: 'solver' | 'manual';
|
|
1380
|
+
|
|
1381
|
+
/**
|
|
1382
|
+
* Where the line stands.
|
|
1383
|
+
*/
|
|
1384
|
+
status: 'planned' | 'released' | 'in_progress' | 'complete' | 'cancelled';
|
|
1385
|
+
|
|
1386
|
+
/**
|
|
1387
|
+
* Abbreviation of the unit everything on this line is counted in.
|
|
1388
|
+
*/
|
|
1389
|
+
unit: string | null;
|
|
1390
|
+
|
|
1391
|
+
/**
|
|
1392
|
+
* Last updated timestamp.
|
|
1393
|
+
*/
|
|
1394
|
+
updated_at: string;
|
|
1395
|
+
|
|
1396
|
+
/**
|
|
1397
|
+
* Zero-based week offset from the start of the horizon.
|
|
1398
|
+
*/
|
|
1399
|
+
week_index: number;
|
|
1400
|
+
|
|
1401
|
+
/**
|
|
1402
|
+
* First day of the week this is planned in.
|
|
1403
|
+
*/
|
|
1404
|
+
week_starts_at: string;
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1189
1407
|
/**
|
|
1190
1408
|
* The per-item policy behind a schedule version.
|
|
1191
1409
|
*
|
|
@@ -1432,6 +1650,15 @@ export interface ReleaseScheduleBatch {
|
|
|
1432
1650
|
*/
|
|
1433
1651
|
batch: CoreAPI.Entity | null;
|
|
1434
1652
|
|
|
1653
|
+
/**
|
|
1654
|
+
* The number of the run this ticket came off, when the batch already existed.
|
|
1655
|
+
*
|
|
1656
|
+
* Present on a lot carried forward from an earlier week that the floor never
|
|
1657
|
+
* worked. The ticket is already printed and on the floor, so the release moves it
|
|
1658
|
+
* into the new run rather than issuing a replacement.
|
|
1659
|
+
*/
|
|
1660
|
+
carried_forward_from: string | null;
|
|
1661
|
+
|
|
1435
1662
|
/**
|
|
1436
1663
|
* Entity is a polymorphic reference to any resource in the system.
|
|
1437
1664
|
*/
|
|
@@ -1460,7 +1687,7 @@ export interface ReleaseScheduleBatch {
|
|
|
1460
1687
|
*/
|
|
1461
1688
|
export interface ReleaseScheduleWeekPreview {
|
|
1462
1689
|
/**
|
|
1463
|
-
* How many batches would
|
|
1690
|
+
* How many batches the run would hold, created and carried forward together.
|
|
1464
1691
|
*/
|
|
1465
1692
|
batch_count: number;
|
|
1466
1693
|
|
|
@@ -1472,6 +1699,11 @@ export interface ReleaseScheduleWeekPreview {
|
|
|
1472
1699
|
*/
|
|
1473
1700
|
blocked_reason: string | null;
|
|
1474
1701
|
|
|
1702
|
+
/**
|
|
1703
|
+
* How many of `batch_count` would be moved off an earlier run rather than created.
|
|
1704
|
+
*/
|
|
1705
|
+
carried_forward_batch_count: number;
|
|
1706
|
+
|
|
1475
1707
|
/**
|
|
1476
1708
|
* Entity is a polymorphic reference to any resource in the system.
|
|
1477
1709
|
*/
|
|
@@ -1529,6 +1761,12 @@ export interface ReleasedScheduleLine {
|
|
|
1529
1761
|
*/
|
|
1530
1762
|
batches: ListReleaseScheduleBatch | null;
|
|
1531
1763
|
|
|
1764
|
+
/**
|
|
1765
|
+
* How much of `planned_quantity` is covered by tickets an earlier week already
|
|
1766
|
+
* issued.
|
|
1767
|
+
*/
|
|
1768
|
+
carried_forward_quantity: number;
|
|
1769
|
+
|
|
1532
1770
|
/**
|
|
1533
1771
|
* Entity is a polymorphic reference to any resource in the system.
|
|
1534
1772
|
*/
|
|
@@ -1722,6 +1960,33 @@ export interface ScheduleDiagnostics {
|
|
|
1722
1960
|
*/
|
|
1723
1961
|
excluded_item_count: number;
|
|
1724
1962
|
|
|
1963
|
+
/**
|
|
1964
|
+
* How the second stage fared: what it could not make, and which of the two things
|
|
1965
|
+
* it ran out of.
|
|
1966
|
+
*
|
|
1967
|
+
* The two starvation lists are the point of planning in two stages at all. A
|
|
1968
|
+
* finished good held back for want of greige is a knitting problem — knit more of
|
|
1969
|
+
* it, or knit it sooner — and one held back for want of hours is a finishing
|
|
1970
|
+
* problem: another shift, or a different mix. A single "short" list would throw
|
|
1971
|
+
* that distinction away, and it is the only thing this model knows that a
|
|
1972
|
+
* one-stage plan does not.
|
|
1973
|
+
*/
|
|
1974
|
+
finishing: ScheduleFinishingDiagnostics;
|
|
1975
|
+
|
|
1976
|
+
/**
|
|
1977
|
+
* Whether the second stage's capacity was estimated rather than counted from
|
|
1978
|
+
* machines.
|
|
1979
|
+
*/
|
|
1980
|
+
finishing_capacity_is_estimated: boolean;
|
|
1981
|
+
|
|
1982
|
+
/**
|
|
1983
|
+
* Machines outside the constraint department that the second stage was sized from.
|
|
1984
|
+
*
|
|
1985
|
+
* Zero means its capacity was estimated from the shift pattern alone rather than
|
|
1986
|
+
* counted.
|
|
1987
|
+
*/
|
|
1988
|
+
finishing_machine_count: number;
|
|
1989
|
+
|
|
1725
1990
|
/**
|
|
1726
1991
|
* Outstanding order quantity this plan owes, expressed in the constraint item's
|
|
1727
1992
|
* own unit.
|
|
@@ -1772,6 +2037,69 @@ export interface ScheduleDiagnostics {
|
|
|
1772
2037
|
unschedulable_skus: Array<string>;
|
|
1773
2038
|
}
|
|
1774
2039
|
|
|
2040
|
+
/**
|
|
2041
|
+
* How the second stage fared: what it could not make, and which of the two things
|
|
2042
|
+
* it ran out of.
|
|
2043
|
+
*
|
|
2044
|
+
* The two starvation lists are the point of planning in two stages at all. A
|
|
2045
|
+
* finished good held back for want of greige is a knitting problem — knit more of
|
|
2046
|
+
* it, or knit it sooner — and one held back for want of hours is a finishing
|
|
2047
|
+
* problem: another shift, or a different mix. A single "short" list would throw
|
|
2048
|
+
* that distinction away, and it is the only thing this model knows that a
|
|
2049
|
+
* one-stage plan does not.
|
|
2050
|
+
*/
|
|
2051
|
+
export interface ScheduleFinishingDiagnostics {
|
|
2052
|
+
/**
|
|
2053
|
+
* Finished goods that had greige and never had hours.
|
|
2054
|
+
*/
|
|
2055
|
+
capacity_starved_skus: Array<string>;
|
|
2056
|
+
|
|
2057
|
+
/**
|
|
2058
|
+
* Finished goods that wanted building across the whole horizon and never had
|
|
2059
|
+
* greige to build from.
|
|
2060
|
+
*/
|
|
2061
|
+
greige_starved_skus: Array<string>;
|
|
2062
|
+
|
|
2063
|
+
/**
|
|
2064
|
+
* Finished goods with no measured finishing rate, which cannot be levelled because
|
|
2065
|
+
* the hours they cost are unknown.
|
|
2066
|
+
*/
|
|
2067
|
+
items_without_run_rate: Array<string>;
|
|
2068
|
+
|
|
2069
|
+
/**
|
|
2070
|
+
* How many finishing lines the plan holds.
|
|
2071
|
+
*/
|
|
2072
|
+
line_count: number;
|
|
2073
|
+
|
|
2074
|
+
/**
|
|
2075
|
+
* Hours the plan asks of it, week by week.
|
|
2076
|
+
*/
|
|
2077
|
+
planned_hours_by_week: Array<number>;
|
|
2078
|
+
|
|
2079
|
+
/**
|
|
2080
|
+
* Total finished units the stage plans across the horizon.
|
|
2081
|
+
*/
|
|
2082
|
+
total_planned_units: number;
|
|
2083
|
+
|
|
2084
|
+
/**
|
|
2085
|
+
* Constraint output the horizon never converts into anything.
|
|
2086
|
+
*
|
|
2087
|
+
* A large figure means the two stages are planned against different demand, which
|
|
2088
|
+
* is worth looking at rather than leaving as an unexplained pile of greige.
|
|
2089
|
+
*/
|
|
2090
|
+
unused_greige_units: number;
|
|
2091
|
+
|
|
2092
|
+
/**
|
|
2093
|
+
* Those hours as a fraction of capacity, week by week.
|
|
2094
|
+
*/
|
|
2095
|
+
utilisation_by_week: Array<number>;
|
|
2096
|
+
|
|
2097
|
+
/**
|
|
2098
|
+
* Hours the second stage can work in one week.
|
|
2099
|
+
*/
|
|
2100
|
+
weekly_capacity_hours: number;
|
|
2101
|
+
}
|
|
2102
|
+
|
|
1775
2103
|
/**
|
|
1776
2104
|
* An order this schedule does not build in time, with the campaigns covering the
|
|
1777
2105
|
* part it does.
|
|
@@ -1932,6 +2260,19 @@ export interface ProductionScheduleCreateParams {
|
|
|
1932
2260
|
planning_as_of?: string;
|
|
1933
2261
|
}
|
|
1934
2262
|
|
|
2263
|
+
export interface ProductionScheduleRetrieveFinishingLinesParams {
|
|
2264
|
+
/**
|
|
2265
|
+
* Only the finishing planned for this finished good.
|
|
2266
|
+
*/
|
|
2267
|
+
item_id?: string;
|
|
2268
|
+
|
|
2269
|
+
/**
|
|
2270
|
+
* Only the finishing planned for this week, zero-based from the start of the
|
|
2271
|
+
* horizon.
|
|
2272
|
+
*/
|
|
2273
|
+
week_index?: number;
|
|
2274
|
+
}
|
|
2275
|
+
|
|
1935
2276
|
export interface ProductionScheduleRetrieveDerivedLinesParams {
|
|
1936
2277
|
/**
|
|
1937
2278
|
* Only return work owned by these departments.
|
|
@@ -1976,6 +2317,14 @@ export interface ProductionScheduleRetrieveDeviationsParams {
|
|
|
1976
2317
|
}
|
|
1977
2318
|
|
|
1978
2319
|
export interface ProductionScheduleRetrieveWeekReleasePreviewParams {
|
|
2320
|
+
/**
|
|
2321
|
+
* Preview the week as if every batch were newly issued.
|
|
2322
|
+
*
|
|
2323
|
+
* By default the preview counts tickets an earlier week issued and the floor never
|
|
2324
|
+
* worked against this week's campaigns, because that is what releasing would do.
|
|
2325
|
+
*/
|
|
2326
|
+
skip_carry_forward?: boolean;
|
|
2327
|
+
|
|
1979
2328
|
/**
|
|
1980
2329
|
* Zero-based week offset from the start of the horizon.
|
|
1981
2330
|
*/
|
|
@@ -1992,6 +2341,7 @@ export declare namespace ProductionSchedules {
|
|
|
1992
2341
|
type ListProductionScheduleDerivedLine as ListProductionScheduleDerivedLine,
|
|
1993
2342
|
type ListProductionScheduleDeviation as ListProductionScheduleDeviation,
|
|
1994
2343
|
type ListProductionScheduleFinishedPolicy as ListProductionScheduleFinishedPolicy,
|
|
2344
|
+
type ListProductionScheduleFinishingLine as ListProductionScheduleFinishingLine,
|
|
1995
2345
|
type ListProductionScheduleItemPolicy as ListProductionScheduleItemPolicy,
|
|
1996
2346
|
type ListReleaseScheduleBatch as ListReleaseScheduleBatch,
|
|
1997
2347
|
type ListReleasedScheduleLine as ListReleasedScheduleLine,
|
|
@@ -2003,6 +2353,7 @@ export declare namespace ProductionSchedules {
|
|
|
2003
2353
|
type ProductionScheduleDerivedLine as ProductionScheduleDerivedLine,
|
|
2004
2354
|
type ProductionScheduleDeviation as ProductionScheduleDeviation,
|
|
2005
2355
|
type ProductionScheduleFinishedPolicy as ProductionScheduleFinishedPolicy,
|
|
2356
|
+
type ProductionScheduleFinishingLine as ProductionScheduleFinishingLine,
|
|
2006
2357
|
type ProductionScheduleItemPolicy as ProductionScheduleItemPolicy,
|
|
2007
2358
|
type ReleaseScheduleBatch as ReleaseScheduleBatch,
|
|
2008
2359
|
type ReleaseScheduleWeekPreview as ReleaseScheduleWeekPreview,
|
|
@@ -2010,11 +2361,13 @@ export declare namespace ProductionSchedules {
|
|
|
2010
2361
|
type ScheduleAppliedOverride as ScheduleAppliedOverride,
|
|
2011
2362
|
type ScheduleAtRiskOrder as ScheduleAtRiskOrder,
|
|
2012
2363
|
type ScheduleDiagnostics as ScheduleDiagnostics,
|
|
2364
|
+
type ScheduleFinishingDiagnostics as ScheduleFinishingDiagnostics,
|
|
2013
2365
|
type ScheduleOrderCoverage as ScheduleOrderCoverage,
|
|
2014
2366
|
type ScheduleOrderCoverageLine as ScheduleOrderCoverageLine,
|
|
2015
2367
|
type ProductionScheduleDeleteResponse as ProductionScheduleDeleteResponse,
|
|
2016
2368
|
type ProductionScheduleListParams as ProductionScheduleListParams,
|
|
2017
2369
|
type ProductionScheduleCreateParams as ProductionScheduleCreateParams,
|
|
2370
|
+
type ProductionScheduleRetrieveFinishingLinesParams as ProductionScheduleRetrieveFinishingLinesParams,
|
|
2018
2371
|
type ProductionScheduleRetrieveDerivedLinesParams as ProductionScheduleRetrieveDerivedLinesParams,
|
|
2019
2372
|
type ProductionScheduleRetrieveDeviationsParams as ProductionScheduleRetrieveDeviationsParams,
|
|
2020
2373
|
type ProductionScheduleRetrieveWeekReleasePreviewParams as ProductionScheduleRetrieveWeekReleasePreviewParams,
|
|
@@ -164,7 +164,8 @@ export interface AccountGroup {
|
|
|
164
164
|
|
|
165
165
|
/**
|
|
166
166
|
* Calendar days between an order being issued and it being due to ship, inherited
|
|
167
|
-
* by every customer in this group that has
|
|
167
|
+
* by every customer in this group that has neither set its own nor inherited one
|
|
168
|
+
* from a parent account.
|
|
168
169
|
*/
|
|
169
170
|
default_lead_time_days: number | null;
|
|
170
171
|
|
|
@@ -537,7 +537,8 @@ export interface CustomerDefaults {
|
|
|
537
537
|
* Calendar days between an order being issued and it being due to ship.
|
|
538
538
|
*
|
|
539
539
|
* Sets each order's `ship_by_date` when it is issued. With none set here the
|
|
540
|
-
* customer inherits its account
|
|
540
|
+
* customer inherits its parent account's lead time, then its account group's, then
|
|
541
|
+
* the account default.
|
|
541
542
|
*/
|
|
542
543
|
lead_time_days: number | null;
|
|
543
544
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
4
|
import * as CoreAPI from '../../core/core';
|
|
5
|
+
import * as AccountGroupsAPI from '../account-groups';
|
|
5
6
|
import * as AddressesAPI from '../addresses';
|
|
6
7
|
import * as ProductLinesAPI from '../../catalog/product-lines/product-lines';
|
|
7
8
|
import * as AccountPricesAPI from '../account-prices/account-prices';
|
|
@@ -181,9 +182,14 @@ export class Customers extends APIResource {
|
|
|
181
182
|
* to.
|
|
182
183
|
*
|
|
183
184
|
* Resolved through the same chain the issue path stamps onto an order, most
|
|
184
|
-
* specific first: a lead time set on the customer, then on
|
|
185
|
-
* group, then the account-wide default. `source`
|
|
186
|
-
* form can show where the number came from rather
|
|
185
|
+
* specific first: a lead time set on the customer, then on its parent account,
|
|
186
|
+
* then on the customer's account group, then the account-wide default. `source`
|
|
187
|
+
* names which rule applied, so a form can show where the number came from rather
|
|
188
|
+
* than leaving a rep to guess.
|
|
189
|
+
*
|
|
190
|
+
* A lead time set on a parent account therefore governs every child account under
|
|
191
|
+
* it that has not set its own, which is how a head office's terms are given to its
|
|
192
|
+
* locations without repeating them on each one.
|
|
187
193
|
*
|
|
188
194
|
* This is a preview of a commitment, not the commitment itself. An order takes its
|
|
189
195
|
* own `ship_by_date` when it is issued and keeps it afterwards, so changing a lead
|
|
@@ -200,8 +206,12 @@ export class Customers extends APIResource {
|
|
|
200
206
|
* );
|
|
201
207
|
* ```
|
|
202
208
|
*/
|
|
203
|
-
retrieveLeadTime(
|
|
204
|
-
|
|
209
|
+
retrieveLeadTime(
|
|
210
|
+
id: string,
|
|
211
|
+
query: CustomerRetrieveLeadTimeParams | null | undefined = {},
|
|
212
|
+
options?: RequestOptions,
|
|
213
|
+
): APIPromise<CustomerLeadTime> {
|
|
214
|
+
return this._client.get(path`/v1/sales/customers/${id}/lead-time`, { query, ...options });
|
|
205
215
|
}
|
|
206
216
|
}
|
|
207
217
|
|
|
@@ -337,7 +347,8 @@ export interface CreateCustomerRequest {
|
|
|
337
347
|
* Calendar days between an order being issued and it being due to ship.
|
|
338
348
|
*
|
|
339
349
|
* Sets each order's `ship_by_date` when it is issued. Leave unset to inherit the
|
|
340
|
-
* customer's account group lead time, then
|
|
350
|
+
* parent account's lead time, then the customer's account group lead time, then
|
|
351
|
+
* the account default.
|
|
341
352
|
*/
|
|
342
353
|
lead_time_days?: number;
|
|
343
354
|
|
|
@@ -391,9 +402,15 @@ export interface CreateCustomerRequest {
|
|
|
391
402
|
*/
|
|
392
403
|
export interface CustomerLeadTime {
|
|
393
404
|
/**
|
|
394
|
-
*
|
|
405
|
+
* A named grouping of customer accounts, used for pricing rules or to categorize
|
|
406
|
+
* accounts.
|
|
407
|
+
*
|
|
408
|
+
* A customer carries at most one group of type `type_group` as its customer type,
|
|
409
|
+
* plus any number of groups of type `pricing_group`. Membership of either kind can
|
|
410
|
+
* scope a volume discount to the customer and open up product lines for it to
|
|
411
|
+
* order from.
|
|
395
412
|
*/
|
|
396
|
-
account_group:
|
|
413
|
+
account_group: AccountGroupsAPI.AccountGroup | null;
|
|
397
414
|
|
|
398
415
|
/**
|
|
399
416
|
* Entity is a polymorphic reference to any resource in the system.
|
|
@@ -412,10 +429,17 @@ export interface CustomerLeadTime {
|
|
|
412
429
|
*/
|
|
413
430
|
object: 'customer_lead_time';
|
|
414
431
|
|
|
432
|
+
/**
|
|
433
|
+
* A business you sell to, with its contact details, default fulfillment settings,
|
|
434
|
+
* and order policies.
|
|
435
|
+
*/
|
|
436
|
+
parent_customer: AccountPricesAPI.Customer | null;
|
|
437
|
+
|
|
415
438
|
/**
|
|
416
439
|
* Which rule in the chain produced this lead time.
|
|
417
440
|
*
|
|
418
441
|
* - `customer`: a lead time set on the customer itself.
|
|
442
|
+
* - `parent_customer`: inherited from the customer's parent account.
|
|
419
443
|
* - `account_group`: inherited from the customer's account group.
|
|
420
444
|
* - `account`: the account-wide fallback.
|
|
421
445
|
*
|
|
@@ -423,7 +447,14 @@ export interface CustomerLeadTime {
|
|
|
423
447
|
* on one specific order, which is a fact about that order rather than about the
|
|
424
448
|
* customer.
|
|
425
449
|
*/
|
|
426
|
-
source:
|
|
450
|
+
source:
|
|
451
|
+
| 'customer'
|
|
452
|
+
| 'parent_customer'
|
|
453
|
+
| 'account_group'
|
|
454
|
+
| 'account'
|
|
455
|
+
| 'manual'
|
|
456
|
+
| 'order_lead_time'
|
|
457
|
+
| 'order_ship_by';
|
|
427
458
|
}
|
|
428
459
|
|
|
429
460
|
/**
|
|
@@ -543,8 +574,9 @@ export interface UpdateCustomerRequest {
|
|
|
543
574
|
/**
|
|
544
575
|
* Calendar days between an order being issued and it being due to ship.
|
|
545
576
|
*
|
|
546
|
-
* Sets each order's `ship_by_date` when it is issued.
|
|
547
|
-
* customer's account group lead time, then
|
|
577
|
+
* Sets each order's `ship_by_date` when it is issued. Clear it to inherit the
|
|
578
|
+
* parent account's lead time, then the customer's account group lead time, then
|
|
579
|
+
* the account default.
|
|
548
580
|
*/
|
|
549
581
|
lead_time_days?: number | null;
|
|
550
582
|
|
|
@@ -932,7 +964,8 @@ export interface CustomerCreateParams {
|
|
|
932
964
|
* ship.
|
|
933
965
|
*
|
|
934
966
|
* Sets each order's `ship_by_date` when it is issued. Leave unset to inherit the
|
|
935
|
-
* customer's account group lead time, then
|
|
967
|
+
* parent account's lead time, then the customer's account group lead time, then
|
|
968
|
+
* the account default.
|
|
936
969
|
*/
|
|
937
970
|
lead_time_days?: number;
|
|
938
971
|
|
|
@@ -1125,8 +1158,9 @@ export interface CustomerUpdateParams {
|
|
|
1125
1158
|
* Body param: Calendar days between an order being issued and it being due to
|
|
1126
1159
|
* ship.
|
|
1127
1160
|
*
|
|
1128
|
-
* Sets each order's `ship_by_date` when it is issued.
|
|
1129
|
-
* customer's account group lead time, then
|
|
1161
|
+
* Sets each order's `ship_by_date` when it is issued. Clear it to inherit the
|
|
1162
|
+
* parent account's lead time, then the customer's account group lead time, then
|
|
1163
|
+
* the account default.
|
|
1130
1164
|
*/
|
|
1131
1165
|
lead_time_days?: number | null;
|
|
1132
1166
|
|
|
@@ -1185,6 +1219,14 @@ export interface CustomerUpdateParams {
|
|
|
1185
1219
|
url?: string | null;
|
|
1186
1220
|
}
|
|
1187
1221
|
|
|
1222
|
+
export interface CustomerRetrieveLeadTimeParams {
|
|
1223
|
+
/**
|
|
1224
|
+
* Sub-objects to expand in the response. When omitted, sub-objects are returned as
|
|
1225
|
+
* `null`.
|
|
1226
|
+
*/
|
|
1227
|
+
include?: Array<'account_group' | 'parent_customer'>;
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1188
1230
|
Customers.Actions = Actions;
|
|
1189
1231
|
|
|
1190
1232
|
export declare namespace Customers {
|
|
@@ -1197,6 +1239,7 @@ export declare namespace Customers {
|
|
|
1197
1239
|
type CustomerRetrieveParams as CustomerRetrieveParams,
|
|
1198
1240
|
type CustomerCreateParams as CustomerCreateParams,
|
|
1199
1241
|
type CustomerUpdateParams as CustomerUpdateParams,
|
|
1242
|
+
type CustomerRetrieveLeadTimeParams as CustomerRetrieveLeadTimeParams,
|
|
1200
1243
|
};
|
|
1201
1244
|
|
|
1202
1245
|
export {
|
|
@@ -414,6 +414,18 @@ export interface QuoteSalesOrderCommitmentResponse {
|
|
|
414
414
|
*/
|
|
415
415
|
calendar_adjustment_days: number;
|
|
416
416
|
|
|
417
|
+
/**
|
|
418
|
+
* When freight leaving on the ship-by date would reach the customer: transit
|
|
419
|
+
* walked forward from it and landed on a day their dock receives. Null whenever
|
|
420
|
+
* `transit_days` is, since an arrival with no journey behind it would just be the
|
|
421
|
+
* ship date wearing a different name.
|
|
422
|
+
*
|
|
423
|
+
* Reported for every basis, including the ones that do not use transit to decide
|
|
424
|
+
* the ship-by date. An order committed on a lead time has the same journey ahead
|
|
425
|
+
* of it; it simply was not worked backwards from.
|
|
426
|
+
*/
|
|
427
|
+
estimated_delivery_date: string | null;
|
|
428
|
+
|
|
417
429
|
/**
|
|
418
430
|
* Calendar days between issue and the ship-by date.
|
|
419
431
|
*/
|
|
@@ -424,6 +436,7 @@ export interface QuoteSalesOrderCommitmentResponse {
|
|
|
424
436
|
*/
|
|
425
437
|
lead_time_source:
|
|
426
438
|
| 'customer'
|
|
439
|
+
| 'parent_customer'
|
|
427
440
|
| 'account_group'
|
|
428
441
|
| 'account'
|
|
429
442
|
| 'manual'
|
|
@@ -454,7 +467,8 @@ export interface QuoteSalesOrderCommitmentResponse {
|
|
|
454
467
|
|
|
455
468
|
/**
|
|
456
469
|
* Days the carrier needs to cover the lane. Null when the lane has never been
|
|
457
|
-
* quoted and the service level carries no default
|
|
470
|
+
* quoted and the service level carries no default, or when no service level was
|
|
471
|
+
* supplied to quote one on.
|
|
458
472
|
*/
|
|
459
473
|
transit_days: number | null;
|
|
460
474
|
|