@augno/sdk 0.18.1 → 0.19.0

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 (257) hide show
  1. package/CHANGELOG.md +3 -5
  2. package/package.json +1 -1
  3. package/resources/catalog/catalog.d.mts +6 -6
  4. package/resources/catalog/catalog.d.mts.map +1 -1
  5. package/resources/catalog/catalog.d.ts +6 -6
  6. package/resources/catalog/catalog.d.ts.map +1 -1
  7. package/resources/catalog/catalog.js.map +1 -1
  8. package/resources/catalog/catalog.mjs.map +1 -1
  9. package/resources/catalog/index.d.mts +3 -3
  10. package/resources/catalog/index.d.mts.map +1 -1
  11. package/resources/catalog/index.d.ts +3 -3
  12. package/resources/catalog/index.d.ts.map +1 -1
  13. package/resources/catalog/index.js.map +1 -1
  14. package/resources/catalog/index.mjs.map +1 -1
  15. package/resources/catalog/items/actions.d.mts +249 -0
  16. package/resources/catalog/items/actions.d.mts.map +1 -0
  17. package/resources/catalog/items/actions.d.ts +249 -0
  18. package/resources/catalog/items/actions.d.ts.map +1 -0
  19. package/resources/catalog/items/actions.js +46 -0
  20. package/resources/catalog/items/actions.js.map +1 -0
  21. package/resources/catalog/items/actions.mjs +42 -0
  22. package/resources/catalog/items/actions.mjs.map +1 -0
  23. package/resources/catalog/items/index.d.mts +3 -1
  24. package/resources/catalog/items/index.d.mts.map +1 -1
  25. package/resources/catalog/items/index.d.ts +3 -1
  26. package/resources/catalog/items/index.d.ts.map +1 -1
  27. package/resources/catalog/items/index.js +5 -1
  28. package/resources/catalog/items/index.js.map +1 -1
  29. package/resources/catalog/items/index.mjs +2 -0
  30. package/resources/catalog/items/index.mjs.map +1 -1
  31. package/resources/catalog/items/inventory.d.mts +247 -0
  32. package/resources/catalog/items/inventory.d.mts.map +1 -0
  33. package/resources/catalog/items/inventory.d.ts +247 -0
  34. package/resources/catalog/items/inventory.d.ts.map +1 -0
  35. package/resources/catalog/items/inventory.js +75 -0
  36. package/resources/catalog/items/inventory.js.map +1 -0
  37. package/resources/catalog/items/inventory.mjs +71 -0
  38. package/resources/catalog/items/inventory.mjs.map +1 -0
  39. package/resources/catalog/items/items.d.mts +9 -104
  40. package/resources/catalog/items/items.d.mts.map +1 -1
  41. package/resources/catalog/items/items.d.ts +9 -104
  42. package/resources/catalog/items/items.d.ts.map +1 -1
  43. package/resources/catalog/items/items.js +8 -21
  44. package/resources/catalog/items/items.js.map +1 -1
  45. package/resources/catalog/items/items.mjs +8 -21
  46. package/resources/catalog/items/items.mjs.map +1 -1
  47. package/resources/catalog/materials/index.d.mts +1 -1
  48. package/resources/catalog/materials/index.d.mts.map +1 -1
  49. package/resources/catalog/materials/index.d.ts +1 -1
  50. package/resources/catalog/materials/index.d.ts.map +1 -1
  51. package/resources/catalog/materials/index.js.map +1 -1
  52. package/resources/catalog/materials/index.mjs.map +1 -1
  53. package/resources/catalog/materials/materials.d.mts +36 -3
  54. package/resources/catalog/materials/materials.d.mts.map +1 -1
  55. package/resources/catalog/materials/materials.d.ts +36 -3
  56. package/resources/catalog/materials/materials.d.ts.map +1 -1
  57. package/resources/catalog/materials/materials.js.map +1 -1
  58. package/resources/catalog/materials/materials.mjs.map +1 -1
  59. package/resources/catalog/product-lines/index.d.mts +1 -1
  60. package/resources/catalog/product-lines/index.d.mts.map +1 -1
  61. package/resources/catalog/product-lines/index.d.ts +1 -1
  62. package/resources/catalog/product-lines/index.d.ts.map +1 -1
  63. package/resources/catalog/product-lines/index.js.map +1 -1
  64. package/resources/catalog/product-lines/index.mjs.map +1 -1
  65. package/resources/catalog/product-lines/product-lines.d.mts +8 -23
  66. package/resources/catalog/product-lines/product-lines.d.mts.map +1 -1
  67. package/resources/catalog/product-lines/product-lines.d.ts +8 -23
  68. package/resources/catalog/product-lines/product-lines.d.ts.map +1 -1
  69. package/resources/catalog/product-lines/product-lines.js.map +1 -1
  70. package/resources/catalog/product-lines/product-lines.mjs.map +1 -1
  71. package/resources/core/audit-events.d.mts +4 -4
  72. package/resources/core/audit-events.d.mts.map +1 -1
  73. package/resources/core/audit-events.d.ts +4 -4
  74. package/resources/core/audit-events.d.ts.map +1 -1
  75. package/resources/core/core.d.mts +2 -2
  76. package/resources/core/core.d.mts.map +1 -1
  77. package/resources/core/core.d.ts +2 -2
  78. package/resources/core/core.d.ts.map +1 -1
  79. package/resources/core/core.js.map +1 -1
  80. package/resources/core/core.mjs.map +1 -1
  81. package/resources/core/jobs.d.mts +2 -2
  82. package/resources/core/jobs.d.mts.map +1 -1
  83. package/resources/core/jobs.d.ts +2 -2
  84. package/resources/core/jobs.d.ts.map +1 -1
  85. package/resources/messaging/blocks.d.mts +4 -3
  86. package/resources/messaging/blocks.d.mts.map +1 -1
  87. package/resources/messaging/blocks.d.ts +4 -3
  88. package/resources/messaging/blocks.d.ts.map +1 -1
  89. package/resources/messaging/blocks.js.map +1 -1
  90. package/resources/messaging/blocks.mjs.map +1 -1
  91. package/resources/messaging/conversations/conversations.d.mts +3 -3
  92. package/resources/messaging/conversations/conversations.d.mts.map +1 -1
  93. package/resources/messaging/conversations/conversations.d.ts +3 -3
  94. package/resources/messaging/conversations/conversations.d.ts.map +1 -1
  95. package/resources/messaging/conversations/conversations.js.map +1 -1
  96. package/resources/messaging/conversations/conversations.mjs.map +1 -1
  97. package/resources/messaging/conversations/links.d.mts +2 -2
  98. package/resources/messaging/conversations/links.d.mts.map +1 -1
  99. package/resources/messaging/conversations/links.d.ts +2 -2
  100. package/resources/messaging/conversations/links.d.ts.map +1 -1
  101. package/resources/messaging/conversations/messages.d.mts +2 -2
  102. package/resources/messaging/conversations/messages.d.mts.map +1 -1
  103. package/resources/messaging/conversations/messages.d.ts +2 -2
  104. package/resources/messaging/conversations/messages.d.ts.map +1 -1
  105. package/resources/messaging/notifications/notifications.d.mts +2 -2
  106. package/resources/messaging/notifications/notifications.d.mts.map +1 -1
  107. package/resources/messaging/notifications/notifications.d.ts +2 -2
  108. package/resources/messaging/notifications/notifications.d.ts.map +1 -1
  109. package/resources/messaging/notifications/notifications.js.map +1 -1
  110. package/resources/messaging/notifications/notifications.mjs.map +1 -1
  111. package/resources/operations/index.d.mts +1 -1
  112. package/resources/operations/index.d.mts.map +1 -1
  113. package/resources/operations/index.d.ts +1 -1
  114. package/resources/operations/index.d.ts.map +1 -1
  115. package/resources/operations/index.js.map +1 -1
  116. package/resources/operations/index.mjs.map +1 -1
  117. package/resources/operations/machine-downtime-events.d.mts +56 -7
  118. package/resources/operations/machine-downtime-events.d.mts.map +1 -1
  119. package/resources/operations/machine-downtime-events.d.ts +56 -7
  120. package/resources/operations/machine-downtime-events.d.ts.map +1 -1
  121. package/resources/operations/machine-downtime-events.js +11 -7
  122. package/resources/operations/machine-downtime-events.js.map +1 -1
  123. package/resources/operations/machine-downtime-events.mjs +11 -7
  124. package/resources/operations/machine-downtime-events.mjs.map +1 -1
  125. package/resources/operations/operations.d.mts +2 -2
  126. package/resources/operations/operations.d.mts.map +1 -1
  127. package/resources/operations/operations.d.ts +2 -2
  128. package/resources/operations/operations.d.ts.map +1 -1
  129. package/resources/operations/operations.js.map +1 -1
  130. package/resources/operations/operations.mjs.map +1 -1
  131. package/resources/operations/production-schedule-settings/production-schedule-settings.d.mts +13 -12
  132. package/resources/operations/production-schedule-settings/production-schedule-settings.d.mts.map +1 -1
  133. package/resources/operations/production-schedule-settings/production-schedule-settings.d.ts +13 -12
  134. package/resources/operations/production-schedule-settings/production-schedule-settings.d.ts.map +1 -1
  135. package/resources/operations/production-schedule-settings/production-schedule-settings.js.map +1 -1
  136. package/resources/operations/production-schedule-settings/production-schedule-settings.mjs.map +1 -1
  137. package/resources/operations/production-schedules/actions.d.mts +34 -1
  138. package/resources/operations/production-schedules/actions.d.mts.map +1 -1
  139. package/resources/operations/production-schedules/actions.d.ts +34 -1
  140. package/resources/operations/production-schedules/actions.d.ts.map +1 -1
  141. package/resources/operations/production-schedules/actions.js +8 -0
  142. package/resources/operations/production-schedules/actions.js.map +1 -1
  143. package/resources/operations/production-schedules/actions.mjs +8 -0
  144. package/resources/operations/production-schedules/actions.mjs.map +1 -1
  145. package/resources/operations/production-schedules/index.d.mts +1 -1
  146. package/resources/operations/production-schedules/index.d.mts.map +1 -1
  147. package/resources/operations/production-schedules/index.d.ts +1 -1
  148. package/resources/operations/production-schedules/index.d.ts.map +1 -1
  149. package/resources/operations/production-schedules/index.js.map +1 -1
  150. package/resources/operations/production-schedules/index.mjs.map +1 -1
  151. package/resources/operations/production-schedules/production-schedules.d.mts +295 -2
  152. package/resources/operations/production-schedules/production-schedules.d.mts.map +1 -1
  153. package/resources/operations/production-schedules/production-schedules.d.ts +295 -2
  154. package/resources/operations/production-schedules/production-schedules.d.ts.map +1 -1
  155. package/resources/operations/production-schedules/production-schedules.js +42 -0
  156. package/resources/operations/production-schedules/production-schedules.js.map +1 -1
  157. package/resources/operations/production-schedules/production-schedules.mjs +42 -0
  158. package/resources/operations/production-schedules/production-schedules.mjs.map +1 -1
  159. package/resources/operations/shipping-terms.d.mts +9 -9
  160. package/resources/operations/shipping-terms.d.mts.map +1 -1
  161. package/resources/operations/shipping-terms.d.ts +9 -9
  162. package/resources/operations/shipping-terms.d.ts.map +1 -1
  163. package/resources/sales/account-groups.d.mts +2 -1
  164. package/resources/sales/account-groups.d.mts.map +1 -1
  165. package/resources/sales/account-groups.d.ts +2 -1
  166. package/resources/sales/account-groups.d.ts.map +1 -1
  167. package/resources/sales/account-prices/account-prices.d.mts +5 -4
  168. package/resources/sales/account-prices/account-prices.d.mts.map +1 -1
  169. package/resources/sales/account-prices/account-prices.d.ts +5 -4
  170. package/resources/sales/account-prices/account-prices.d.ts.map +1 -1
  171. package/resources/sales/account-prices/account-prices.js.map +1 -1
  172. package/resources/sales/account-prices/account-prices.mjs.map +1 -1
  173. package/resources/sales/account-users/sales-targets.d.mts +2 -2
  174. package/resources/sales/account-users/sales-targets.d.mts.map +1 -1
  175. package/resources/sales/account-users/sales-targets.d.ts +2 -2
  176. package/resources/sales/account-users/sales-targets.d.ts.map +1 -1
  177. package/resources/sales/customers/customers.d.mts +48 -19
  178. package/resources/sales/customers/customers.d.mts.map +1 -1
  179. package/resources/sales/customers/customers.d.ts +48 -19
  180. package/resources/sales/customers/customers.d.ts.map +1 -1
  181. package/resources/sales/customers/customers.js +10 -5
  182. package/resources/sales/customers/customers.js.map +1 -1
  183. package/resources/sales/customers/customers.mjs +10 -5
  184. package/resources/sales/customers/customers.mjs.map +1 -1
  185. package/resources/sales/customers/index.d.mts +1 -1
  186. package/resources/sales/customers/index.d.mts.map +1 -1
  187. package/resources/sales/customers/index.d.ts +1 -1
  188. package/resources/sales/customers/index.d.ts.map +1 -1
  189. package/resources/sales/customers/index.js.map +1 -1
  190. package/resources/sales/customers/index.mjs.map +1 -1
  191. package/resources/sales/index.d.mts +1 -1
  192. package/resources/sales/index.d.mts.map +1 -1
  193. package/resources/sales/index.d.ts +1 -1
  194. package/resources/sales/index.d.ts.map +1 -1
  195. package/resources/sales/index.js.map +1 -1
  196. package/resources/sales/index.mjs.map +1 -1
  197. package/resources/sales/sales-orders/actions.d.mts +14 -2
  198. package/resources/sales/sales-orders/actions.d.mts.map +1 -1
  199. package/resources/sales/sales-orders/actions.d.ts +14 -2
  200. package/resources/sales/sales-orders/actions.d.ts.map +1 -1
  201. package/resources/sales/sales-orders/lines/lines.d.mts +5 -5
  202. package/resources/sales/sales-orders/lines/lines.d.mts.map +1 -1
  203. package/resources/sales/sales-orders/lines/lines.d.ts +5 -5
  204. package/resources/sales/sales-orders/lines/lines.d.ts.map +1 -1
  205. package/resources/sales/sales-orders/sales-orders.d.mts +10 -6
  206. package/resources/sales/sales-orders/sales-orders.d.mts.map +1 -1
  207. package/resources/sales/sales-orders/sales-orders.d.ts +10 -6
  208. package/resources/sales/sales-orders/sales-orders.d.ts.map +1 -1
  209. package/resources/sales/sales-orders/sales-orders.js.map +1 -1
  210. package/resources/sales/sales-orders/sales-orders.mjs.map +1 -1
  211. package/resources/sales/sales.d.mts +2 -2
  212. package/resources/sales/sales.d.mts.map +1 -1
  213. package/resources/sales/sales.d.ts +2 -2
  214. package/resources/sales/sales.d.ts.map +1 -1
  215. package/resources/sales/sales.js.map +1 -1
  216. package/resources/sales/sales.mjs.map +1 -1
  217. package/src/resources/catalog/catalog.ts +2 -8
  218. package/src/resources/catalog/index.ts +1 -4
  219. package/src/resources/catalog/items/actions.ts +296 -0
  220. package/src/resources/catalog/items/index.ts +23 -3
  221. package/src/resources/catalog/items/inventory.ts +294 -0
  222. package/src/resources/catalog/items/items.ts +54 -124
  223. package/src/resources/catalog/materials/index.ts +1 -0
  224. package/src/resources/catalog/materials/materials.ts +41 -2
  225. package/src/resources/catalog/product-lines/index.ts +0 -1
  226. package/src/resources/catalog/product-lines/product-lines.ts +7 -25
  227. package/src/resources/core/audit-events.ts +30 -10
  228. package/src/resources/core/core.ts +15 -5
  229. package/src/resources/core/jobs.ts +8 -3
  230. package/src/resources/messaging/blocks.ts +4 -3
  231. package/src/resources/messaging/conversations/conversations.ts +24 -9
  232. package/src/resources/messaging/conversations/links.ts +16 -6
  233. package/src/resources/messaging/conversations/messages.ts +16 -6
  234. package/src/resources/messaging/notifications/notifications.ts +16 -6
  235. package/src/resources/operations/index.ts +4 -0
  236. package/src/resources/operations/machine-downtime-events.ts +62 -7
  237. package/src/resources/operations/operations.ts +8 -0
  238. package/src/resources/operations/production-schedule-settings/production-schedule-settings.ts +13 -12
  239. package/src/resources/operations/production-schedules/actions.ts +37 -1
  240. package/src/resources/operations/production-schedules/index.ts +4 -0
  241. package/src/resources/operations/production-schedules/production-schedules.ts +354 -1
  242. package/src/resources/operations/shipping-terms.ts +9 -9
  243. package/src/resources/sales/account-groups.ts +2 -1
  244. package/src/resources/sales/account-prices/account-prices.ts +5 -4
  245. package/src/resources/sales/account-users/sales-targets.ts +2 -2
  246. package/src/resources/sales/customers/customers.ts +62 -19
  247. package/src/resources/sales/customers/index.ts +1 -0
  248. package/src/resources/sales/index.ts +1 -0
  249. package/src/resources/sales/sales-orders/actions.ts +15 -1
  250. package/src/resources/sales/sales-orders/lines/lines.ts +5 -5
  251. package/src/resources/sales/sales-orders/sales-orders.ts +11 -5
  252. package/src/resources/sales/sales.ts +2 -0
  253. package/src/version.ts +1 -1
  254. package/version.d.mts +1 -1
  255. package/version.d.ts +1 -1
  256. package/version.js +1 -1
  257. 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 be created.
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,
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
4
  import * as APIKeysAPI from '../auth/api-keys/api-keys';
5
- import * as ProductLinesAPI from '../catalog/product-lines/product-lines';
5
+ import * as InventoryAPI from '../catalog/items/inventory';
6
6
  import * as AccountPricesAPI from '../sales/account-prices/account-prices';
7
7
  import { APIPromise } from '../../core/api-promise';
8
8
  import { RequestOptions } from '../../internal/request-options';
@@ -183,7 +183,7 @@ export interface CreateShippingTermRequest {
183
183
  * The unit may be a currency, so money amounts such as a credit limit are written
184
184
  * the same way as physical amounts like weights or counts.
185
185
  */
186
- flat_rate?: ProductLinesAPI.QuantityInput;
186
+ flat_rate?: InventoryAPI.QuantityInput;
187
187
 
188
188
  /**
189
189
  * IDs of the service levels that ship for free once an order exceeds
@@ -200,7 +200,7 @@ export interface CreateShippingTermRequest {
200
200
  * The unit may be a currency, so money amounts such as a credit limit are written
201
201
  * the same way as physical amounts like weights or counts.
202
202
  */
203
- minimum_order_value?: ProductLinesAPI.QuantityInput;
203
+ minimum_order_value?: InventoryAPI.QuantityInput;
204
204
  }
205
205
 
206
206
  /**
@@ -244,7 +244,7 @@ export interface UpdateShippingTermRequest {
244
244
  * The unit may be a currency, so money amounts such as a credit limit are written
245
245
  * the same way as physical amounts like weights or counts.
246
246
  */
247
- flat_rate?: ProductLinesAPI.QuantityInput | null;
247
+ flat_rate?: InventoryAPI.QuantityInput | null;
248
248
 
249
249
  /**
250
250
  * IDs of the service levels that ship for free once an order exceeds
@@ -262,7 +262,7 @@ export interface UpdateShippingTermRequest {
262
262
  * The unit may be a currency, so money amounts such as a credit limit are written
263
263
  * the same way as physical amounts like weights or counts.
264
264
  */
265
- minimum_order_value?: ProductLinesAPI.QuantityInput | null;
265
+ minimum_order_value?: InventoryAPI.QuantityInput | null;
266
266
 
267
267
  /**
268
268
  * Human-readable name for the shipping term, used to identify it when assigning
@@ -357,7 +357,7 @@ export interface ShippingTermCreateParams {
357
357
  * The unit may be a currency, so money amounts such as a credit limit are written
358
358
  * the same way as physical amounts like weights or counts.
359
359
  */
360
- flat_rate?: ProductLinesAPI.QuantityInput;
360
+ flat_rate?: InventoryAPI.QuantityInput;
361
361
 
362
362
  /**
363
363
  * Body param: IDs of the service levels that ship for free once an order exceeds
@@ -374,7 +374,7 @@ export interface ShippingTermCreateParams {
374
374
  * The unit may be a currency, so money amounts such as a credit limit are written
375
375
  * the same way as physical amounts like weights or counts.
376
376
  */
377
- minimum_order_value?: ProductLinesAPI.QuantityInput;
377
+ minimum_order_value?: InventoryAPI.QuantityInput;
378
378
  }
379
379
 
380
380
  export interface ShippingTermUpdateParams {
@@ -392,7 +392,7 @@ export interface ShippingTermUpdateParams {
392
392
  * The unit may be a currency, so money amounts such as a credit limit are written
393
393
  * the same way as physical amounts like weights or counts.
394
394
  */
395
- flat_rate?: ProductLinesAPI.QuantityInput | null;
395
+ flat_rate?: InventoryAPI.QuantityInput | null;
396
396
 
397
397
  /**
398
398
  * Body param: IDs of the service levels that ship for free once an order exceeds
@@ -410,7 +410,7 @@ export interface ShippingTermUpdateParams {
410
410
  * The unit may be a currency, so money amounts such as a credit limit are written
411
411
  * the same way as physical amounts like weights or counts.
412
412
  */
413
- minimum_order_value?: ProductLinesAPI.QuantityInput | null;
413
+ minimum_order_value?: InventoryAPI.QuantityInput | null;
414
414
 
415
415
  /**
416
416
  * Body param: Human-readable name for the shipping term, used to identify it when
@@ -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 not set its own.
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
 
@@ -397,7 +397,7 @@ export interface Customer {
397
397
  * resources point at them to report stock levels, ordered and packed amounts,
398
398
  * money, weights, and durations.
399
399
  */
400
- credit_limit: ItemsAPI.Quantity | null;
400
+ credit_limit: MaterialsAPI.Quantity | null;
401
401
 
402
402
  /**
403
403
  * Values used to fill in a new sales order for this customer when the order does
@@ -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 group's lead time, then the account default.
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
 
@@ -938,7 +939,7 @@ export interface ShippingTerm {
938
939
  * resources point at them to report stock levels, ordered and packed amounts,
939
940
  * money, weights, and durations.
940
941
  */
941
- flat_rate: ItemsAPI.Quantity | null;
942
+ flat_rate: MaterialsAPI.Quantity | null;
942
943
 
943
944
  /**
944
945
  * A single page of resources, together with the metadata needed to page through
@@ -953,7 +954,7 @@ export interface ShippingTerm {
953
954
  * resources point at them to report stock levels, ordered and packed amounts,
954
955
  * money, weights, and durations.
955
956
  */
956
- minimum_order_value: ItemsAPI.Quantity | null;
957
+ minimum_order_value: MaterialsAPI.Quantity | null;
957
958
 
958
959
  /**
959
960
  * Human-readable name for the shipping term, used to identify it when assigning
@@ -3,7 +3,7 @@
3
3
  import { APIResource } from '../../../core/resource';
4
4
  import * as CoreAPI from '../../core/core';
5
5
  import * as APIKeysAPI from '../../auth/api-keys/api-keys';
6
- import * as ItemsAPI from '../../catalog/items/items';
6
+ import * as MaterialsAPI from '../../catalog/materials/materials';
7
7
  import { APIPromise } from '../../../core/api-promise';
8
8
  import { RequestOptions } from '../../../internal/request-options';
9
9
  import { path } from '../../../internal/utils/path';
@@ -177,7 +177,7 @@ export interface SalesTarget {
177
177
  * resources point at them to report stock levels, ordered and packed amounts,
178
178
  * money, weights, and durations.
179
179
  */
180
- amount: ItemsAPI.Quantity | null;
180
+ amount: MaterialsAPI.Quantity | null;
181
181
 
182
182
  /**
183
183
  * Creation timestamp.