@augno/sdk 0.12.7 → 0.13.1

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 (287) hide show
  1. package/CHANGELOG.md +2 -4
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs +1 -1
  8. package/client.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resources/catalog/catalog.d.mts +4 -4
  11. package/resources/catalog/catalog.d.mts.map +1 -1
  12. package/resources/catalog/catalog.d.ts +4 -4
  13. package/resources/catalog/catalog.d.ts.map +1 -1
  14. package/resources/catalog/catalog.js.map +1 -1
  15. package/resources/catalog/catalog.mjs.map +1 -1
  16. package/resources/catalog/index.d.mts +2 -2
  17. package/resources/catalog/index.d.mts.map +1 -1
  18. package/resources/catalog/index.d.ts +2 -2
  19. package/resources/catalog/index.d.ts.map +1 -1
  20. package/resources/catalog/index.js.map +1 -1
  21. package/resources/catalog/index.mjs.map +1 -1
  22. package/resources/catalog/items/index.d.mts +1 -1
  23. package/resources/catalog/items/index.d.mts.map +1 -1
  24. package/resources/catalog/items/index.d.ts +1 -1
  25. package/resources/catalog/items/index.d.ts.map +1 -1
  26. package/resources/catalog/items/index.js.map +1 -1
  27. package/resources/catalog/items/index.mjs.map +1 -1
  28. package/resources/catalog/items/items.d.mts +77 -1
  29. package/resources/catalog/items/items.d.mts.map +1 -1
  30. package/resources/catalog/items/items.d.ts +77 -1
  31. package/resources/catalog/items/items.d.ts.map +1 -1
  32. package/resources/catalog/items/items.js +29 -0
  33. package/resources/catalog/items/items.js.map +1 -1
  34. package/resources/catalog/items/items.mjs +29 -0
  35. package/resources/catalog/items/items.mjs.map +1 -1
  36. package/resources/catalog/product-lines.d.mts +42 -8
  37. package/resources/catalog/product-lines.d.mts.map +1 -1
  38. package/resources/catalog/product-lines.d.ts +42 -8
  39. package/resources/catalog/product-lines.d.ts.map +1 -1
  40. package/resources/catalog/product-lines.js +3 -3
  41. package/resources/catalog/product-lines.js.map +1 -1
  42. package/resources/catalog/product-lines.mjs +3 -3
  43. package/resources/catalog/product-lines.mjs.map +1 -1
  44. package/resources/catalog/products.d.mts +2 -2
  45. package/resources/catalog/products.d.ts +2 -2
  46. package/resources/catalog/products.js +2 -2
  47. package/resources/catalog/products.mjs +2 -2
  48. package/resources/core/analytics.d.mts +547 -0
  49. package/resources/core/analytics.d.mts.map +1 -0
  50. package/resources/core/analytics.d.ts +547 -0
  51. package/resources/core/analytics.d.ts.map +1 -0
  52. package/resources/core/analytics.js +67 -0
  53. package/resources/core/analytics.js.map +1 -0
  54. package/resources/core/analytics.mjs +63 -0
  55. package/resources/core/analytics.mjs.map +1 -0
  56. package/resources/core/audit-events.d.mts +4 -4
  57. package/resources/core/audit-events.d.mts.map +1 -1
  58. package/resources/core/audit-events.d.ts +4 -4
  59. package/resources/core/audit-events.d.ts.map +1 -1
  60. package/resources/core/core.d.mts +6 -2
  61. package/resources/core/core.d.mts.map +1 -1
  62. package/resources/core/core.d.ts +6 -2
  63. package/resources/core/core.d.ts.map +1 -1
  64. package/resources/core/core.js +4 -0
  65. package/resources/core/core.js.map +1 -1
  66. package/resources/core/core.mjs +4 -0
  67. package/resources/core/core.mjs.map +1 -1
  68. package/resources/core/index.d.mts +1 -0
  69. package/resources/core/index.d.mts.map +1 -1
  70. package/resources/core/index.d.ts +1 -0
  71. package/resources/core/index.d.ts.map +1 -1
  72. package/resources/core/index.js +3 -1
  73. package/resources/core/index.js.map +1 -1
  74. package/resources/core/index.mjs +1 -0
  75. package/resources/core/index.mjs.map +1 -1
  76. package/resources/index.d.mts +1 -1
  77. package/resources/index.d.mts.map +1 -1
  78. package/resources/index.d.ts +1 -1
  79. package/resources/index.d.ts.map +1 -1
  80. package/resources/index.js.map +1 -1
  81. package/resources/index.mjs +1 -1
  82. package/resources/index.mjs.map +1 -1
  83. package/resources/messaging/conversations/conversations.d.mts +3 -3
  84. package/resources/messaging/conversations/conversations.d.mts.map +1 -1
  85. package/resources/messaging/conversations/conversations.d.ts +3 -3
  86. package/resources/messaging/conversations/conversations.d.ts.map +1 -1
  87. package/resources/messaging/conversations/conversations.js.map +1 -1
  88. package/resources/messaging/conversations/conversations.mjs.map +1 -1
  89. package/resources/messaging/conversations/links.d.mts +2 -2
  90. package/resources/messaging/conversations/links.d.mts.map +1 -1
  91. package/resources/messaging/conversations/links.d.ts +2 -2
  92. package/resources/messaging/conversations/links.d.ts.map +1 -1
  93. package/resources/messaging/conversations/messages.d.mts +2 -2
  94. package/resources/messaging/conversations/messages.d.mts.map +1 -1
  95. package/resources/messaging/conversations/messages.d.ts +2 -2
  96. package/resources/messaging/conversations/messages.d.ts.map +1 -1
  97. package/resources/messaging/notifications/notifications.d.mts +2 -2
  98. package/resources/messaging/notifications/notifications.d.mts.map +1 -1
  99. package/resources/messaging/notifications/notifications.d.ts +2 -2
  100. package/resources/messaging/notifications/notifications.d.ts.map +1 -1
  101. package/resources/messaging/notifications/notifications.js.map +1 -1
  102. package/resources/messaging/notifications/notifications.mjs.map +1 -1
  103. package/resources/operations/demand-overrides.d.mts +468 -0
  104. package/resources/operations/demand-overrides.d.mts.map +1 -0
  105. package/resources/operations/demand-overrides.d.ts +468 -0
  106. package/resources/operations/demand-overrides.d.ts.map +1 -0
  107. package/resources/operations/demand-overrides.js +120 -0
  108. package/resources/operations/demand-overrides.js.map +1 -0
  109. package/resources/operations/demand-overrides.mjs +116 -0
  110. package/resources/operations/demand-overrides.mjs.map +1 -0
  111. package/resources/operations/index.d.mts +5 -1
  112. package/resources/operations/index.d.mts.map +1 -1
  113. package/resources/operations/index.d.ts +5 -1
  114. package/resources/operations/index.d.ts.map +1 -1
  115. package/resources/operations/index.js +9 -1
  116. package/resources/operations/index.js.map +1 -1
  117. package/resources/operations/index.mjs +5 -1
  118. package/resources/operations/index.mjs.map +1 -1
  119. package/resources/operations/machine-downtime-events.d.mts +424 -0
  120. package/resources/operations/machine-downtime-events.d.mts.map +1 -0
  121. package/resources/operations/machine-downtime-events.d.ts +424 -0
  122. package/resources/operations/machine-downtime-events.d.ts.map +1 -0
  123. package/resources/operations/machine-downtime-events.js +110 -0
  124. package/resources/operations/machine-downtime-events.js.map +1 -0
  125. package/resources/operations/machine-downtime-events.mjs +106 -0
  126. package/resources/operations/machine-downtime-events.mjs.map +1 -0
  127. package/resources/operations/operations.d.mts +444 -0
  128. package/resources/operations/operations.d.mts.map +1 -1
  129. package/resources/operations/operations.d.ts +444 -0
  130. package/resources/operations/operations.d.ts.map +1 -1
  131. package/resources/operations/operations.js +89 -0
  132. package/resources/operations/operations.js.map +1 -1
  133. package/resources/operations/operations.mjs +89 -0
  134. package/resources/operations/operations.mjs.map +1 -1
  135. package/resources/operations/production-schedule-settings/index.d.mts +3 -0
  136. package/resources/operations/production-schedule-settings/index.d.mts.map +1 -0
  137. package/resources/operations/production-schedule-settings/index.d.ts +3 -0
  138. package/resources/operations/production-schedule-settings/index.d.ts.map +1 -0
  139. package/resources/operations/production-schedule-settings/index.js +9 -0
  140. package/resources/operations/production-schedule-settings/index.js.map +1 -0
  141. package/resources/operations/production-schedule-settings/index.mjs +4 -0
  142. package/resources/operations/production-schedule-settings/index.mjs.map +1 -0
  143. package/resources/operations/production-schedule-settings/production-schedule-settings.d.mts +470 -0
  144. package/resources/operations/production-schedule-settings/production-schedule-settings.d.mts.map +1 -0
  145. package/resources/operations/production-schedule-settings/production-schedule-settings.d.ts +470 -0
  146. package/resources/operations/production-schedule-settings/production-schedule-settings.d.ts.map +1 -0
  147. package/resources/operations/production-schedule-settings/production-schedule-settings.js +88 -0
  148. package/resources/operations/production-schedule-settings/production-schedule-settings.js.map +1 -0
  149. package/resources/operations/production-schedule-settings/production-schedule-settings.mjs +83 -0
  150. package/resources/operations/production-schedule-settings/production-schedule-settings.mjs.map +1 -0
  151. package/resources/operations/production-schedule-settings/resources.d.mts +176 -0
  152. package/resources/operations/production-schedule-settings/resources.d.mts.map +1 -0
  153. package/resources/operations/production-schedule-settings/resources.d.ts +176 -0
  154. package/resources/operations/production-schedule-settings/resources.d.ts.map +1 -0
  155. package/resources/operations/production-schedule-settings/resources.js +74 -0
  156. package/resources/operations/production-schedule-settings/resources.js.map +1 -0
  157. package/resources/operations/production-schedule-settings/resources.mjs +70 -0
  158. package/resources/operations/production-schedule-settings/resources.mjs.map +1 -0
  159. package/resources/operations/production-schedule-settings.d.mts +2 -0
  160. package/resources/operations/production-schedule-settings.d.mts.map +1 -0
  161. package/resources/operations/production-schedule-settings.d.ts +2 -0
  162. package/resources/operations/production-schedule-settings.d.ts.map +1 -0
  163. package/resources/operations/production-schedule-settings.js +6 -0
  164. package/resources/operations/production-schedule-settings.js.map +1 -0
  165. package/resources/operations/production-schedule-settings.mjs +3 -0
  166. package/resources/operations/production-schedule-settings.mjs.map +1 -0
  167. package/resources/operations/production-schedules/actions.d.mts +668 -0
  168. package/resources/operations/production-schedules/actions.d.mts.map +1 -0
  169. package/resources/operations/production-schedules/actions.d.ts +668 -0
  170. package/resources/operations/production-schedules/actions.d.ts.map +1 -0
  171. package/resources/operations/production-schedules/actions.js +181 -0
  172. package/resources/operations/production-schedules/actions.js.map +1 -0
  173. package/resources/operations/production-schedules/actions.mjs +177 -0
  174. package/resources/operations/production-schedules/actions.mjs.map +1 -0
  175. package/resources/operations/production-schedules/index.d.mts +4 -0
  176. package/resources/operations/production-schedules/index.d.mts.map +1 -0
  177. package/resources/operations/production-schedules/index.d.ts +4 -0
  178. package/resources/operations/production-schedules/index.d.ts.map +1 -0
  179. package/resources/operations/production-schedules/index.js +11 -0
  180. package/resources/operations/production-schedules/index.js.map +1 -0
  181. package/resources/operations/production-schedules/index.mjs +5 -0
  182. package/resources/operations/production-schedules/index.mjs.map +1 -0
  183. package/resources/operations/production-schedules/lines.d.mts +420 -0
  184. package/resources/operations/production-schedules/lines.d.mts.map +1 -0
  185. package/resources/operations/production-schedules/lines.d.ts +420 -0
  186. package/resources/operations/production-schedules/lines.d.ts.map +1 -0
  187. package/resources/operations/production-schedules/lines.js +106 -0
  188. package/resources/operations/production-schedules/lines.js.map +1 -0
  189. package/resources/operations/production-schedules/lines.mjs +102 -0
  190. package/resources/operations/production-schedules/lines.mjs.map +1 -0
  191. package/resources/operations/production-schedules/production-schedules.d.mts +1177 -0
  192. package/resources/operations/production-schedules/production-schedules.d.mts.map +1 -0
  193. package/resources/operations/production-schedules/production-schedules.d.ts +1177 -0
  194. package/resources/operations/production-schedules/production-schedules.d.ts.map +1 -0
  195. package/resources/operations/production-schedules/production-schedules.js +238 -0
  196. package/resources/operations/production-schedules/production-schedules.js.map +1 -0
  197. package/resources/operations/production-schedules/production-schedules.mjs +233 -0
  198. package/resources/operations/production-schedules/production-schedules.mjs.map +1 -0
  199. package/resources/operations/production-schedules.d.mts +2 -0
  200. package/resources/operations/production-schedules.d.mts.map +1 -0
  201. package/resources/operations/production-schedules.d.ts +2 -0
  202. package/resources/operations/production-schedules.d.ts.map +1 -0
  203. package/resources/operations/production-schedules.js +6 -0
  204. package/resources/operations/production-schedules.js.map +1 -0
  205. package/resources/operations/production-schedules.mjs +3 -0
  206. package/resources/operations/production-schedules.mjs.map +1 -0
  207. package/resources/operations/shipping-terms.d.mts +9 -8
  208. package/resources/operations/shipping-terms.d.mts.map +1 -1
  209. package/resources/operations/shipping-terms.d.ts +9 -8
  210. package/resources/operations/shipping-terms.d.ts.map +1 -1
  211. package/resources/operations/shipping-terms.js.map +1 -1
  212. package/resources/operations/shipping-terms.mjs.map +1 -1
  213. package/resources/sales/customers/customers.d.mts +6 -18
  214. package/resources/sales/customers/customers.d.mts.map +1 -1
  215. package/resources/sales/customers/customers.d.ts +6 -18
  216. package/resources/sales/customers/customers.d.ts.map +1 -1
  217. package/resources/sales/customers/customers.js.map +1 -1
  218. package/resources/sales/customers/customers.mjs.map +1 -1
  219. package/resources/sales/customers/index.d.mts +1 -1
  220. package/resources/sales/customers/index.d.mts.map +1 -1
  221. package/resources/sales/customers/index.d.ts +1 -1
  222. package/resources/sales/customers/index.d.ts.map +1 -1
  223. package/resources/sales/customers/index.js.map +1 -1
  224. package/resources/sales/customers/index.mjs.map +1 -1
  225. package/resources/sales/index.d.mts +1 -1
  226. package/resources/sales/index.d.mts.map +1 -1
  227. package/resources/sales/index.d.ts +1 -1
  228. package/resources/sales/index.d.ts.map +1 -1
  229. package/resources/sales/index.js.map +1 -1
  230. package/resources/sales/index.mjs.map +1 -1
  231. package/resources/sales/sales-orders/lines/lines.d.mts +5 -5
  232. package/resources/sales/sales-orders/lines/lines.d.mts.map +1 -1
  233. package/resources/sales/sales-orders/lines/lines.d.ts +5 -5
  234. package/resources/sales/sales-orders/lines/lines.d.ts.map +1 -1
  235. package/resources/sales/sales-orders/sales-orders.d.mts +3 -2
  236. package/resources/sales/sales-orders/sales-orders.d.mts.map +1 -1
  237. package/resources/sales/sales-orders/sales-orders.d.ts +3 -2
  238. package/resources/sales/sales-orders/sales-orders.d.ts.map +1 -1
  239. package/resources/sales/sales-orders/sales-orders.js.map +1 -1
  240. package/resources/sales/sales-orders/sales-orders.mjs.map +1 -1
  241. package/resources/sales/sales.d.mts +2 -2
  242. package/resources/sales/sales.d.mts.map +1 -1
  243. package/resources/sales/sales.d.ts +2 -2
  244. package/resources/sales/sales.d.ts.map +1 -1
  245. package/resources/sales/sales.js.map +1 -1
  246. package/resources/sales/sales.mjs.map +1 -1
  247. package/src/client.ts +30 -2
  248. package/src/resources/catalog/catalog.ts +6 -0
  249. package/src/resources/catalog/index.ts +3 -0
  250. package/src/resources/catalog/items/index.ts +2 -0
  251. package/src/resources/catalog/items/items.ts +92 -0
  252. package/src/resources/catalog/product-lines.ts +49 -7
  253. package/src/resources/catalog/products.ts +2 -2
  254. package/src/resources/core/analytics.ts +677 -0
  255. package/src/resources/core/audit-events.ts +84 -0
  256. package/src/resources/core/core.ts +82 -0
  257. package/src/resources/core/index.ts +18 -0
  258. package/src/resources/index.ts +15 -1
  259. package/src/resources/messaging/conversations/conversations.ts +63 -0
  260. package/src/resources/messaging/conversations/links.ts +42 -0
  261. package/src/resources/messaging/conversations/messages.ts +42 -0
  262. package/src/resources/messaging/notifications/notifications.ts +42 -0
  263. package/src/resources/operations/demand-overrides.ts +631 -0
  264. package/src/resources/operations/index.ts +72 -1
  265. package/src/resources/operations/machine-downtime-events.ts +584 -0
  266. package/src/resources/operations/operations.ts +673 -0
  267. package/src/resources/operations/production-schedule-settings/index.ts +15 -0
  268. package/src/resources/operations/production-schedule-settings/production-schedule-settings.ts +595 -0
  269. package/src/resources/operations/production-schedule-settings/resources.ts +217 -0
  270. package/src/resources/operations/production-schedule-settings.ts +3 -0
  271. package/src/resources/operations/production-schedules/actions.ts +835 -0
  272. package/src/resources/operations/production-schedules/index.ts +64 -0
  273. package/src/resources/operations/production-schedules/lines.ts +584 -0
  274. package/src/resources/operations/production-schedules/production-schedules.ts +1548 -0
  275. package/src/resources/operations/production-schedules.ts +3 -0
  276. package/src/resources/operations/shipping-terms.ts +9 -8
  277. package/src/resources/sales/customers/customers.ts +5 -20
  278. package/src/resources/sales/customers/index.ts +0 -1
  279. package/src/resources/sales/index.ts +0 -1
  280. package/src/resources/sales/sales-orders/lines/lines.ts +5 -5
  281. package/src/resources/sales/sales-orders/sales-orders.ts +3 -2
  282. package/src/resources/sales/sales.ts +0 -2
  283. package/src/version.ts +1 -1
  284. package/version.d.mts +1 -1
  285. package/version.d.ts +1 -1
  286. package/version.js +1 -1
  287. package/version.mjs +1 -1
@@ -0,0 +1,1177 @@
1
+ import { APIResource } from "../../../core/resource.mjs";
2
+ import * as CoreAPI from "../../core/core.mjs";
3
+ import * as RequestLogsAPI from "../../core/request-logs.mjs";
4
+ import * as APIKeysAPI from "../../auth/api-keys/api-keys.mjs";
5
+ import * as ActionsAPI from "./actions.mjs";
6
+ import { ActionPreviewParams, ActionPreviewRegenerateParams, ActionRegenerateParams, ActionReleaseWeekParams, Actions, ListScheduleCampaign, ListScheduleDiffLine, ListSchedulePolicy, ListScheduleProjection, PreviewProductionScheduleRequest, PreviewRegenerateProductionScheduleRequest, ProductionSchedulePreview, ProductionScheduleRegeneratePreview, RegenerateProductionScheduleRequest, ReleaseProductionScheduleWeekRequest, ReleaseScheduleWeekResult, ScheduleCampaign, ScheduleDiffLine, SchedulePolicy, ScheduleProjection } from "./actions.mjs";
7
+ import * as LinesAPI from "./lines.mjs";
8
+ import { CreateProductionScheduleLineRequest, LineCreateParams, LineDeleteParams, LineDeleteResponse, LineListParams, LineUpdateParams, Lines, ListProductionScheduleLine, ProductionScheduleLine, UpdateProductionScheduleLineRequest } from "./lines.mjs";
9
+ import { APIPromise } from "../../../core/api-promise.mjs";
10
+ import { RequestOptions } from "../../../internal/request-options.mjs";
11
+ /**
12
+ * Generate and review machine-level production schedules.
13
+ */
14
+ export declare class ProductionSchedules extends APIResource {
15
+ lines: LinesAPI.Lines;
16
+ actions: ActionsAPI.Actions;
17
+ /**
18
+ * Returns a paginated list of production schedule versions, newest first.
19
+ *
20
+ * This endpoint requires the permission: `production_schedules:read`.
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * const listProductionSchedule =
25
+ * await client.operations.productionSchedules.list();
26
+ * ```
27
+ */
28
+ list(query?: ProductionScheduleListParams | null | undefined, options?: RequestOptions): APIPromise<ListProductionSchedule>;
29
+ /**
30
+ * Generates and saves a new production schedule.
31
+ *
32
+ * The plan is saved as a draft: nothing is frozen and every line is editable until
33
+ * the version is published. Generating again creates a new version rather than
34
+ * replacing this one, because attainment is measured against whichever version was
35
+ * live at the time.
36
+ *
37
+ * This endpoint requires the permission: `production_schedules:create`.
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * const productionSchedule =
42
+ * await client.operations.productionSchedules.create({
43
+ * name: '2026-W31 knit plan',
44
+ * });
45
+ * ```
46
+ */
47
+ create(body?: ProductionScheduleCreateParams | null | undefined, options?: RequestOptions): APIPromise<ProductionSchedule>;
48
+ /**
49
+ * Returns the published schedule covering today.
50
+ *
51
+ * Responds 404 when no published version covers today, which is the normal state
52
+ * before the first schedule is published.
53
+ *
54
+ * This endpoint requires the permission: `production_schedules:read`.
55
+ *
56
+ * @example
57
+ * ```ts
58
+ * const productionSchedule =
59
+ * await client.operations.productionSchedules.retrieveCurrent();
60
+ * ```
61
+ */
62
+ retrieveCurrent(options?: RequestOptions): APIPromise<ProductionSchedule>;
63
+ /**
64
+ * Returns a single production schedule version.
65
+ *
66
+ * This endpoint requires the permission: `production_schedules:read`.
67
+ *
68
+ * @example
69
+ * ```ts
70
+ * const productionSchedule =
71
+ * await client.operations.productionSchedules.retrieve(
72
+ * 'pnsc_0192a4c17b3e4f8a91c2d0',
73
+ * );
74
+ * ```
75
+ */
76
+ retrieve(id: string, options?: RequestOptions): APIPromise<ProductionSchedule>;
77
+ /**
78
+ * Returns the per-item policy behind a schedule version, ordered by constraint run
79
+ * hours descending.
80
+ *
81
+ * This is the "why" behind every campaign: lot size, reorder point, safety stock
82
+ * and lead times as they stood when the plan was generated.
83
+ *
84
+ * This endpoint requires the permission: `production_schedules:read`.
85
+ *
86
+ * @example
87
+ * ```ts
88
+ * const listProductionScheduleItemPolicy =
89
+ * await client.operations.productionSchedules.retrieveItemPolicies(
90
+ * 'pnsc_0192a4c17b3e4f8a91c2d0',
91
+ * );
92
+ * ```
93
+ */
94
+ retrieveItemPolicies(id: string, options?: RequestOptions): APIPromise<ListProductionScheduleItemPolicy>;
95
+ /**
96
+ * Returns the per-finished-SKU inventory targets behind a schedule version,
97
+ * grouped under the constraint item each one is made from.
98
+ *
99
+ * The item policies pool every finished good a constraint item feeds into one
100
+ * echelon figure, which is what the build decision is made against. These rows are
101
+ * what that pooling hides: each finished SKU's own demand, its own variability,
102
+ * its own stock, and a buffer sized against the finishing lead time rather than
103
+ * the constraint's.
104
+ *
105
+ * The two stages do not overlap, so together they describe the whole network's
106
+ * stock without counting any of it twice: the constraint stage holds its pooled
107
+ * buffer, and the finished stage holds these.
108
+ *
109
+ * This endpoint requires the permission: `production_schedules:read`.
110
+ *
111
+ * @example
112
+ * ```ts
113
+ * const listProductionScheduleFinishedPolicy =
114
+ * await client.operations.productionSchedules.retrieveFinishedPolicies(
115
+ * 'pnsc_0192a4c17b3e4f8a91c2d0',
116
+ * );
117
+ * ```
118
+ */
119
+ retrieveFinishedPolicies(id: string, options?: RequestOptions): APIPromise<ListProductionScheduleFinishedPolicy>;
120
+ /**
121
+ * Returns the downstream department work implied by a schedule's constraint plan.
122
+ *
123
+ * The solver schedules only the constraint; every other department's work is
124
+ * derived from it by walking the production-step graph, applying each step's
125
+ * lead-time offset and yield. That makes this the work list a supervisor reads,
126
+ * rather than a second plan someone has to maintain.
127
+ *
128
+ * `explosion_depth` is how many steps downstream the work sits, which is what a
129
+ * readiness indicator keys off. Work whose derived week falls past the schedule's
130
+ * horizon is still returned — a department needs to see it coming.
131
+ *
132
+ * This endpoint requires the permission: `production_schedules:read`.
133
+ *
134
+ * @example
135
+ * ```ts
136
+ * const listProductionScheduleDerivedLine =
137
+ * await client.operations.productionSchedules.retrieveDerivedLines(
138
+ * 'pnsc_0192a4c17b3e4f8a91c2d0',
139
+ * );
140
+ * ```
141
+ */
142
+ retrieveDerivedLines(id: string, query?: ProductionScheduleRetrieveDerivedLinesParams | null | undefined, options?: RequestOptions): APIPromise<ListProductionScheduleDerivedLine>;
143
+ /**
144
+ * Returns the append-only log of hand changes made to a schedule, most recent
145
+ * first.
146
+ *
147
+ * This is what frozen-week adherence is measured from. A change recorded as frozen
148
+ * was inside the freeze window at the moment it was made, and stays that way
149
+ * regardless of what is published later.
150
+ *
151
+ * This endpoint requires the permission: `production_schedules:read`.
152
+ *
153
+ * @example
154
+ * ```ts
155
+ * const listProductionScheduleDeviation =
156
+ * await client.operations.productionSchedules.retrieveDeviations(
157
+ * 'pnsc_0192a4c17b3e4f8a91c2d0',
158
+ * );
159
+ * ```
160
+ */
161
+ retrieveDeviations(id: string, query?: ProductionScheduleRetrieveDeviationsParams | null | undefined, options?: RequestOptions): APIPromise<ListProductionScheduleDeviation>;
162
+ /**
163
+ * Returns what releasing a week would create, without creating it.
164
+ *
165
+ * The lots are resolved exactly as the release itself resolves them, so what a
166
+ * planner is shown and what the floor receives cannot drift apart.
167
+ *
168
+ * `is_releasable` is false when the week is empty or already released, with
169
+ * `blocked_reason` saying which; `existing_production_run_id` names the run a
170
+ * released week is already tied to.
171
+ *
172
+ * This endpoint requires the permission: `production_schedules:read`.
173
+ *
174
+ * @example
175
+ * ```ts
176
+ * const releaseScheduleWeekPreview =
177
+ * await client.operations.productionSchedules.retrieveWeekReleasePreview(
178
+ * 'pnsc_0192a4c17b3e4f8a91c2d0',
179
+ * );
180
+ * ```
181
+ */
182
+ retrieveWeekReleasePreview(id: string, query?: ProductionScheduleRetrieveWeekReleasePreviewParams | null | undefined, options?: RequestOptions): APIPromise<ReleaseScheduleWeekPreview>;
183
+ /**
184
+ * Deletes a draft schedule and everything derived from it.
185
+ *
186
+ * Only drafts can be deleted. A published version is the baseline attainment is
187
+ * measured against, so removing it would erase the record of what was promised —
188
+ * archive those instead.
189
+ *
190
+ * This endpoint requires the permission: `production_schedules:delete`.
191
+ *
192
+ * @example
193
+ * ```ts
194
+ * const productionSchedule =
195
+ * await client.operations.productionSchedules.delete(
196
+ * 'pnsc_0192a4c17b3e4f8a91c2d0',
197
+ * );
198
+ * ```
199
+ */
200
+ delete(id: string, options?: RequestOptions): APIPromise<ProductionScheduleDeleteResponse>;
201
+ }
202
+ /**
203
+ * Request to generate a production schedule.
204
+ */
205
+ export interface GenerateProductionScheduleRequest {
206
+ /**
207
+ * Overrides the configured demand basis for this version only.
208
+ */
209
+ demand_basis?: 'trailing_12' | 'seasonal_ema';
210
+ /**
211
+ * Overrides the configured horizon for this version only.
212
+ */
213
+ horizon_weeks?: number;
214
+ /**
215
+ * Label for the version.
216
+ */
217
+ name?: string;
218
+ /**
219
+ * The instant to plan against. Defaults to now.
220
+ */
221
+ planning_as_of?: string;
222
+ }
223
+ /**
224
+ * List represents a paginated list of resources.
225
+ */
226
+ export interface ListProductionSchedule {
227
+ /**
228
+ * Resources in this page.
229
+ */
230
+ data: Array<ProductionSchedule>;
231
+ /**
232
+ * Resource type identifier.
233
+ */
234
+ object: 'list';
235
+ /**
236
+ * PageInfo contains URL-based pagination metadata.
237
+ */
238
+ page_info: APIKeysAPI.PageInfo;
239
+ }
240
+ /**
241
+ * List represents a paginated list of resources.
242
+ */
243
+ export interface ListProductionScheduleDerivedLine {
244
+ /**
245
+ * Resources in this page.
246
+ */
247
+ data: Array<ProductionScheduleDerivedLine>;
248
+ /**
249
+ * Resource type identifier.
250
+ */
251
+ object: 'list';
252
+ /**
253
+ * PageInfo contains URL-based pagination metadata.
254
+ */
255
+ page_info: APIKeysAPI.PageInfo;
256
+ }
257
+ /**
258
+ * List represents a paginated list of resources.
259
+ */
260
+ export interface ListProductionScheduleDeviation {
261
+ /**
262
+ * Resources in this page.
263
+ */
264
+ data: Array<ProductionScheduleDeviation>;
265
+ /**
266
+ * Resource type identifier.
267
+ */
268
+ object: 'list';
269
+ /**
270
+ * PageInfo contains URL-based pagination metadata.
271
+ */
272
+ page_info: APIKeysAPI.PageInfo;
273
+ }
274
+ /**
275
+ * List represents a paginated list of resources.
276
+ */
277
+ export interface ListProductionScheduleFinishedPolicy {
278
+ /**
279
+ * Resources in this page.
280
+ */
281
+ data: Array<ProductionScheduleFinishedPolicy>;
282
+ /**
283
+ * Resource type identifier.
284
+ */
285
+ object: 'list';
286
+ /**
287
+ * PageInfo contains URL-based pagination metadata.
288
+ */
289
+ page_info: APIKeysAPI.PageInfo;
290
+ }
291
+ /**
292
+ * List represents a paginated list of resources.
293
+ */
294
+ export interface ListProductionScheduleItemPolicy {
295
+ /**
296
+ * Resources in this page.
297
+ */
298
+ data: Array<ProductionScheduleItemPolicy>;
299
+ /**
300
+ * Resource type identifier.
301
+ */
302
+ object: 'list';
303
+ /**
304
+ * PageInfo contains URL-based pagination metadata.
305
+ */
306
+ page_info: APIKeysAPI.PageInfo;
307
+ }
308
+ /**
309
+ * List represents a paginated list of resources.
310
+ */
311
+ export interface ListReleaseScheduleBatch {
312
+ /**
313
+ * Resources in this page.
314
+ */
315
+ data: Array<ReleaseScheduleBatch>;
316
+ /**
317
+ * Resource type identifier.
318
+ */
319
+ object: 'list';
320
+ /**
321
+ * PageInfo contains URL-based pagination metadata.
322
+ */
323
+ page_info: APIKeysAPI.PageInfo;
324
+ }
325
+ /**
326
+ * List represents a paginated list of resources.
327
+ */
328
+ export interface ListReleasedScheduleLine {
329
+ /**
330
+ * Resources in this page.
331
+ */
332
+ data: Array<ReleasedScheduleLine>;
333
+ /**
334
+ * Resource type identifier.
335
+ */
336
+ object: 'list';
337
+ /**
338
+ * PageInfo contains URL-based pagination metadata.
339
+ */
340
+ page_info: APIKeysAPI.PageInfo;
341
+ }
342
+ /**
343
+ * List represents a paginated list of resources.
344
+ */
345
+ export interface ListScheduleAppliedOverride {
346
+ /**
347
+ * Resources in this page.
348
+ */
349
+ data: Array<ScheduleAppliedOverride>;
350
+ /**
351
+ * Resource type identifier.
352
+ */
353
+ object: 'list';
354
+ /**
355
+ * PageInfo contains URL-based pagination metadata.
356
+ */
357
+ page_info: APIKeysAPI.PageInfo;
358
+ }
359
+ /**
360
+ * A saved production schedule.
361
+ *
362
+ * Versions are immutable history: generating again creates a new version, and
363
+ * publishing supersedes the previous one rather than editing it, because
364
+ * attainment is measured against whichever version was live at the time.
365
+ */
366
+ export interface ProductionSchedule {
367
+ /**
368
+ * Schedule ID.
369
+ */
370
+ id: string;
371
+ /**
372
+ * Creation timestamp.
373
+ */
374
+ created_at: string;
375
+ /**
376
+ * Which demand basis produced the plan.
377
+ */
378
+ demand_basis: 'trailing_12' | 'seasonal_ema';
379
+ /**
380
+ * What the solver could not do, and why the plan differs from raw history.
381
+ */
382
+ diagnostics: ScheduleDiagnostics;
383
+ /**
384
+ * Why generation failed, when it did.
385
+ */
386
+ error_message: string | null;
387
+ /**
388
+ * Number of lines that were frozen at publish. Captured once and never recomputed,
389
+ * because frozen-week adherence measures against what was committed to.
390
+ */
391
+ frozen_line_count: number;
392
+ /**
393
+ * Total quantity frozen at publish.
394
+ */
395
+ frozen_planned_quantity: number;
396
+ /**
397
+ * Last instant covered by the frozen window, set when the version is published.
398
+ */
399
+ frozen_through_at: string | null;
400
+ /**
401
+ * How many leading weeks freeze on publish.
402
+ */
403
+ frozen_weeks: number;
404
+ /**
405
+ * Reference to an actor — the user, API key, agent, or group identity associated
406
+ * with an action.
407
+ */
408
+ generated_by: RequestLogsAPI.Actor | null;
409
+ /**
410
+ * What triggered the generation.
411
+ */
412
+ generation_source: 'manual' | 'scheduled';
413
+ /**
414
+ * First instant of the last day of the horizon.
415
+ */
416
+ horizon_ends_at: string;
417
+ /**
418
+ * First instant of the horizon.
419
+ */
420
+ horizon_starts_at: string;
421
+ /**
422
+ * Length of the horizon in weeks.
423
+ */
424
+ horizon_weeks: number;
425
+ /**
426
+ * Optional label for the version.
427
+ */
428
+ name: string | null;
429
+ /**
430
+ * Resource type identifier.
431
+ */
432
+ object: 'production_schedule';
433
+ /**
434
+ * The instant the plan was calculated against.
435
+ */
436
+ planning_as_of_at: string;
437
+ /**
438
+ * When this version was published.
439
+ */
440
+ published_at: string | null;
441
+ /**
442
+ * Reference to an actor — the user, API key, agent, or group identity associated
443
+ * with an action.
444
+ */
445
+ published_by: RequestLogsAPI.Actor | null;
446
+ /**
447
+ * The planning assumptions used, frozen at generation so the plan stays
448
+ * explainable after settings change.
449
+ */
450
+ settings_snapshot: {
451
+ [key: string]: unknown;
452
+ };
453
+ /**
454
+ * Version of the solver that produced the plan.
455
+ */
456
+ solver_version: string;
457
+ /**
458
+ * Where this version is in its lifecycle.
459
+ */
460
+ status: 'draft' | 'generating' | 'published' | 'superseded' | 'archived' | 'failed';
461
+ /**
462
+ * Entity is a polymorphic reference to any resource in the system.
463
+ */
464
+ superseded_by: CoreAPI.Entity | null;
465
+ /**
466
+ * Last updated timestamp.
467
+ */
468
+ updated_at: string;
469
+ /**
470
+ * Sequential version number within the account.
471
+ */
472
+ version: number;
473
+ }
474
+ /**
475
+ * Downstream department work implied by a constraint campaign.
476
+ *
477
+ * The solver only schedules the constraint; every other department's work follows
478
+ * from it by walking the production-step graph. `explosion_depth` is how many
479
+ * steps downstream this sits — depth 1 waits only on the constraint, depth 3 waits
480
+ * on two intermediate steps — which is what a readiness indicator keys off.
481
+ *
482
+ * The derived week can fall past the schedule's horizon when a long chain follows
483
+ * a late campaign. That work is still returned rather than dropped, because a
484
+ * department needs to see it coming.
485
+ */
486
+ export interface ProductionScheduleDerivedLine {
487
+ /**
488
+ * Derived line ID.
489
+ */
490
+ id: string;
491
+ /**
492
+ * Creation timestamp.
493
+ */
494
+ created_at: string;
495
+ /**
496
+ * Entity is a polymorphic reference to any resource in the system.
497
+ */
498
+ department: CoreAPI.Entity | null;
499
+ /**
500
+ * How many steps downstream of the constraint this work sits.
501
+ */
502
+ explosion_depth: number;
503
+ /**
504
+ * Entity is a polymorphic reference to any resource in the system.
505
+ */
506
+ item: CoreAPI.Entity | null;
507
+ /**
508
+ * Resource type identifier.
509
+ */
510
+ object: 'production_schedule_derived_line';
511
+ /**
512
+ * Weeks after the constraint campaign this work starts.
513
+ */
514
+ offset_weeks: number;
515
+ /**
516
+ * Entity is a polymorphic reference to any resource in the system.
517
+ */
518
+ planned_unit: CoreAPI.Entity | null;
519
+ /**
520
+ * Entity is a polymorphic reference to any resource in the system.
521
+ */
522
+ production_schedule: CoreAPI.Entity | null;
523
+ /**
524
+ * Entity is a polymorphic reference to any resource in the system.
525
+ */
526
+ production_step: CoreAPI.Entity | null;
527
+ /**
528
+ * Units implied for this step.
529
+ */
530
+ quantity: number;
531
+ /**
532
+ * Entity is a polymorphic reference to any resource in the system.
533
+ */
534
+ source_line: CoreAPI.Entity | null;
535
+ /**
536
+ * Progress of the derived work.
537
+ */
538
+ status: 'planned' | 'released' | 'in_progress' | 'complete' | 'cancelled';
539
+ /**
540
+ * Last updated timestamp.
541
+ */
542
+ updated_at: string;
543
+ /**
544
+ * Horizon week the work falls in, zero-based.
545
+ */
546
+ week_index: number;
547
+ /**
548
+ * First instant of that week.
549
+ */
550
+ week_starts_at: string;
551
+ }
552
+ /**
553
+ * One hand change to a production schedule.
554
+ *
555
+ * The log is append-only: it is what frozen-week adherence is measured from, and a
556
+ * plan edited back into shape has to stay distinguishable from one that was right
557
+ * the first time. `before` and `after` are full snapshots of the line, so a
558
+ * deviation stays readable after the line it describes is deleted.
559
+ *
560
+ * `is_frozen_week` is recorded when the change is made, from the freeze window as
561
+ * it stood at that moment. It is never re-derived, so a later publish cannot
562
+ * retroactively reclassify a past edit.
563
+ */
564
+ export interface ProductionScheduleDeviation {
565
+ /**
566
+ * Deviation ID.
567
+ */
568
+ id: string;
569
+ /**
570
+ * Reference to an actor — the user, API key, agent, or group identity associated
571
+ * with an action.
572
+ */
573
+ actor: RequestLogsAPI.Actor | null;
574
+ /**
575
+ * Snapshot of the line after the change.
576
+ */
577
+ after: {
578
+ [key: string]: unknown;
579
+ };
580
+ /**
581
+ * Snapshot of the line before the change.
582
+ */
583
+ before: {
584
+ [key: string]: unknown;
585
+ };
586
+ /**
587
+ * When the change was made.
588
+ */
589
+ created_at: string;
590
+ /**
591
+ * Signed change in planned units.
592
+ */
593
+ delta_quantity: number;
594
+ /**
595
+ * Signed change in planned run hours.
596
+ */
597
+ delta_run_hours: number;
598
+ /**
599
+ * What kind of change this was.
600
+ */
601
+ deviation_type: 'line_added' | 'line_removed' | 'quantity_changed' | 'machine_changed' | 'resequenced' | 'week_moved';
602
+ /**
603
+ * Whether the change fell inside the frozen window when it was made.
604
+ */
605
+ freeze_status: 'frozen' | 'flexible';
606
+ /**
607
+ * Entity is a polymorphic reference to any resource in the system.
608
+ */
609
+ item: CoreAPI.Entity | null;
610
+ /**
611
+ * Entity is a polymorphic reference to any resource in the system.
612
+ */
613
+ line: CoreAPI.Entity | null;
614
+ /**
615
+ * Entity is a polymorphic reference to any resource in the system.
616
+ */
617
+ machine: CoreAPI.Entity | null;
618
+ /**
619
+ * Resource type identifier.
620
+ */
621
+ object: 'production_schedule_deviation';
622
+ /**
623
+ * Entity is a polymorphic reference to any resource in the system.
624
+ */
625
+ production_schedule: CoreAPI.Entity | null;
626
+ /**
627
+ * Why the change was made. Required for changes inside a frozen week.
628
+ */
629
+ reason: 'machine_down' | 'material_shortage' | 'rush_order' | 'quality_hold' | 'over_run' | 'under_run' | 'capacity_change' | 'other' | null;
630
+ /**
631
+ * Free-form explanation of the change.
632
+ */
633
+ reason_note: string | null;
634
+ /**
635
+ * The horizon week the change affected, zero-based.
636
+ */
637
+ week_index: number | null;
638
+ }
639
+ /**
640
+ * One finished SKU's own inventory target, snapshotted onto a schedule version.
641
+ *
642
+ * The item policy pools every finished good a constraint item feeds into one
643
+ * echelon figure, which is the right basis for deciding whether to build. These
644
+ * rows are what that pooling hides: this SKU's own demand, its own variability,
645
+ * and a buffer sized against the finishing lead time rather than the constraint's
646
+ * — because finishing, not the constraint, is what replenishes this stock.
647
+ *
648
+ * The two stages do not overlap. The constraint stage holds its pooled buffer and
649
+ * the finished stage holds these, so together they describe the whole network's
650
+ * stock without counting any of it twice.
651
+ */
652
+ export interface ProductionScheduleFinishedPolicy {
653
+ /**
654
+ * Finished policy ID.
655
+ */
656
+ id: string;
657
+ /**
658
+ * This SKU's own annual demand.
659
+ */
660
+ annual_demand: number;
661
+ /**
662
+ * Creation timestamp.
663
+ */
664
+ created_at: string;
665
+ /**
666
+ * Entity is a polymorphic reference to any resource in the system.
667
+ */
668
+ greige_item: CoreAPI.Entity | null;
669
+ /**
670
+ * SKU of that constraint item.
671
+ */
672
+ greige_sku: string;
673
+ /**
674
+ * Entity is a polymorphic reference to any resource in the system.
675
+ */
676
+ item: CoreAPI.Entity | null;
677
+ /**
678
+ * Resource type identifier.
679
+ */
680
+ object: 'production_schedule_finished_policy';
681
+ /**
682
+ * This SKU's own stock, not the echelon it contributes to.
683
+ */
684
+ on_hand: number;
685
+ /**
686
+ * Entity is a polymorphic reference to any resource in the system.
687
+ */
688
+ product_line: CoreAPI.Entity | null;
689
+ /**
690
+ * Entity is a polymorphic reference to any resource in the system.
691
+ */
692
+ production_schedule: CoreAPI.Entity | null;
693
+ /**
694
+ * Stock position at which this finished good needs replenishing.
695
+ */
696
+ reorder_point: number;
697
+ /**
698
+ * Buffer held as this finished good, covering the finishing lead time.
699
+ */
700
+ safety_stock: number;
701
+ /**
702
+ * This SKU's own weekly demand variability. The constraint buffer pools these as
703
+ * the root of the sum of squares; these targets use them one at a time.
704
+ */
705
+ sigma_weekly: number;
706
+ /**
707
+ * SKU of the finished good.
708
+ */
709
+ sku: string;
710
+ /**
711
+ * Last updated timestamp.
712
+ */
713
+ updated_at: string;
714
+ /**
715
+ * This SKU's own weekly demand.
716
+ */
717
+ weekly_demand: number;
718
+ /**
719
+ * Weeks of demand this SKU's own stock covers.
720
+ */
721
+ weeks_of_cover: number;
722
+ }
723
+ /**
724
+ * The per-item policy behind a schedule version.
725
+ *
726
+ * Snapshotted at generation rather than recomputed, so a historical plan can still
727
+ * explain itself after costs, demand or settings move.
728
+ */
729
+ export interface ProductionScheduleItemPolicy {
730
+ /**
731
+ * Policy ID.
732
+ */
733
+ id: string;
734
+ /**
735
+ * ABC class by share of constraint run hours.
736
+ */
737
+ abc_class: 'a' | 'b' | 'c' | null;
738
+ /**
739
+ * Demand used for planning, annualized.
740
+ */
741
+ annual_demand: number;
742
+ /**
743
+ * Constraint hours this item's annual demand consumes.
744
+ */
745
+ annual_run_hours: number;
746
+ /**
747
+ * What the constraint stage holds on average: its buffer, plus half a campaign as
748
+ * one lands and drains.
749
+ */
750
+ average_greige_inventory: number;
751
+ /**
752
+ * Observed or default lead time at the constraint.
753
+ */
754
+ constraint_lead_time_weeks: number;
755
+ /**
756
+ * Limits the solver hit while sizing this item's campaigns. Empty when the policy
757
+ * was applied as calculated.
758
+ */
759
+ constraints: Array<'eoq_capped' | 'capacity_starved'>;
760
+ /**
761
+ * Creation timestamp.
762
+ */
763
+ created_at: string;
764
+ /**
765
+ * Economic order quantity.
766
+ */
767
+ eoq_units: number;
768
+ /**
769
+ * Lead time from the constraint to sellable stock.
770
+ */
771
+ finish_lead_time_weeks: number;
772
+ /**
773
+ * Annual cost of holding one unit.
774
+ */
775
+ holding_cost: number;
776
+ /**
777
+ * Entity is a polymorphic reference to any resource in the system.
778
+ */
779
+ item: CoreAPI.Entity | null;
780
+ /**
781
+ * What the constraint stage holds at its peak: its buffer plus a whole campaign.
782
+ */
783
+ max_greige_inventory: number;
784
+ /**
785
+ * Resource type identifier.
786
+ */
787
+ object: 'production_schedule_item_policy';
788
+ /**
789
+ * Stock at the constraint plus everything downstream of it. This is what the build
790
+ * decision is made against — stock already finished still counts against building
791
+ * more.
792
+ */
793
+ on_hand_echelon: number;
794
+ /**
795
+ * Stock sitting at the constraint stage on its own, which the echelon figure
796
+ * cannot be decomposed back into once summed.
797
+ */
798
+ on_hand_greige: number;
799
+ /**
800
+ * Ceiling on how far ahead this item is built.
801
+ */
802
+ order_up_to: number;
803
+ /**
804
+ * Entity is a polymorphic reference to any resource in the system.
805
+ */
806
+ primary_machine: CoreAPI.Entity | null;
807
+ /**
808
+ * Entity is a polymorphic reference to any resource in the system.
809
+ */
810
+ production_schedule: CoreAPI.Entity | null;
811
+ /**
812
+ * Entity is a polymorphic reference to any resource in the system.
813
+ */
814
+ production_step: CoreAPI.Entity | null;
815
+ /**
816
+ * The echelon position at the end of each horizon week, after that week's
817
+ * campaigns land and its demand is drawn down. A run of weeks with no campaign is
818
+ * stock draining toward `reorder_point`; this is what makes that visible rather
819
+ * than looking like the solver did nothing.
820
+ */
821
+ projected_on_hand: Array<number>;
822
+ /**
823
+ * Stock position at which a campaign is triggered.
824
+ */
825
+ reorder_point: number;
826
+ /**
827
+ * Buffer held as finished goods.
828
+ */
829
+ safety_stock_downstream: number;
830
+ /**
831
+ * Buffer held at the constraint.
832
+ */
833
+ safety_stock_primary: number;
834
+ /**
835
+ * How long one unit occupies the constraint.
836
+ */
837
+ seconds_per_unit: number;
838
+ /**
839
+ * Cost of one changeover.
840
+ */
841
+ setup_cost: number;
842
+ /**
843
+ * Summed weekly variability of the finished goods this item becomes.
844
+ */
845
+ sigma_downstream_sum: number;
846
+ /**
847
+ * Pooled weekly demand variability at the constraint.
848
+ */
849
+ sigma_weekly_pooled: number;
850
+ /**
851
+ * SKU of the item.
852
+ */
853
+ sku: string;
854
+ /**
855
+ * Entity is a polymorphic reference to any resource in the system.
856
+ */
857
+ unit: CoreAPI.Entity | null;
858
+ /**
859
+ * Abbreviation of the unit every quantity in this policy is counted in, for
860
+ * display.
861
+ *
862
+ * A reorder point of 2,508 is uninterpretable without it, so the two are never
863
+ * meaningful apart.
864
+ */
865
+ unit_abbreviation: string | null;
866
+ /**
867
+ * Standard cost per unit.
868
+ */
869
+ unit_cost: number;
870
+ /**
871
+ * Last updated timestamp.
872
+ */
873
+ updated_at: string;
874
+ /**
875
+ * Demand used for planning, per week.
876
+ */
877
+ weekly_demand: number;
878
+ /**
879
+ * Weeks of demand the current stock covers.
880
+ */
881
+ weeks_of_cover: number;
882
+ }
883
+ /**
884
+ * One batch a release created, or would create: a single lot off one planned
885
+ * campaign.
886
+ */
887
+ export interface ReleaseScheduleBatch {
888
+ /**
889
+ * Entity is a polymorphic reference to any resource in the system.
890
+ */
891
+ batch: CoreAPI.Entity | null;
892
+ /**
893
+ * Entity is a polymorphic reference to any resource in the system.
894
+ */
895
+ item: CoreAPI.Entity | null;
896
+ /**
897
+ * Units in this lot. The last lot of a campaign is short when the planned quantity
898
+ * is not a whole number of lots.
899
+ */
900
+ quantity: number;
901
+ /**
902
+ * The item's SKU, as it stood when the plan was generated.
903
+ */
904
+ sku: string;
905
+ }
906
+ /**
907
+ * What releasing a week would create, with nothing written.
908
+ *
909
+ * A release makes a numbered production run and every batch under it, which is
910
+ * real work to undo by hand, so the confirmation is driven by this rather than by
911
+ * a count computed in the browser.
912
+ */
913
+ export interface ReleaseScheduleWeekPreview {
914
+ /**
915
+ * How many batches would be created.
916
+ */
917
+ batch_count: number;
918
+ /**
919
+ * Why the week cannot be released.
920
+ */
921
+ blocked_reason: string | null;
922
+ /**
923
+ * Entity is a polymorphic reference to any resource in the system.
924
+ */
925
+ existing_production_run: CoreAPI.Entity | null;
926
+ /**
927
+ * Whether the week can be released.
928
+ */
929
+ is_releasable: boolean;
930
+ /**
931
+ * How many campaigns would be released.
932
+ */
933
+ line_count: number;
934
+ /**
935
+ * List represents a paginated list of resources.
936
+ */
937
+ lines: ListReleasedScheduleLine | null;
938
+ /**
939
+ * Resource type identifier.
940
+ */
941
+ object: 'production_schedule_week_release_preview';
942
+ /**
943
+ * Total units that would be released.
944
+ */
945
+ total_quantity: number;
946
+ /**
947
+ * Zero-based week offset from the start of the horizon.
948
+ */
949
+ week_index: number;
950
+ /**
951
+ * First instant of the week.
952
+ */
953
+ week_starts_at: string;
954
+ }
955
+ /**
956
+ * One planned campaign and the lots it broke into.
957
+ */
958
+ export interface ReleasedScheduleLine {
959
+ /**
960
+ * How many batches the campaign broke into.
961
+ */
962
+ batch_count: number;
963
+ /**
964
+ * List represents a paginated list of resources.
965
+ */
966
+ batches: ListReleaseScheduleBatch | null;
967
+ /**
968
+ * Entity is a polymorphic reference to any resource in the system.
969
+ */
970
+ item: CoreAPI.Entity | null;
971
+ /**
972
+ * Entity is a polymorphic reference to any resource in the system.
973
+ */
974
+ line: CoreAPI.Entity | null;
975
+ /**
976
+ * Units in one lot.
977
+ */
978
+ lot_units: number;
979
+ /**
980
+ * Entity is a polymorphic reference to any resource in the system.
981
+ */
982
+ machine: CoreAPI.Entity | null;
983
+ /**
984
+ * Total units planned for the campaign.
985
+ */
986
+ planned_quantity: number;
987
+ /**
988
+ * The item's SKU, as it stood when the plan was generated.
989
+ */
990
+ sku: string;
991
+ /**
992
+ * Abbreviation of the unit the quantity and the lot are counted in.
993
+ *
994
+ * `6 × 60` is not an instruction until it says 6 × 60 of what.
995
+ */
996
+ unit: string | null;
997
+ }
998
+ /**
999
+ * A demand override that changed a number, recorded so the plan can explain
1000
+ * itself.
1001
+ */
1002
+ export interface ScheduleAppliedOverride {
1003
+ /**
1004
+ * How the override was expressed.
1005
+ */
1006
+ adjustment: 'absolute' | 'delta_units' | 'delta_percent';
1007
+ /**
1008
+ * Demand after the override.
1009
+ */
1010
+ after: number;
1011
+ /**
1012
+ * Demand before the override.
1013
+ */
1014
+ before: number;
1015
+ /**
1016
+ * Entity is a polymorphic reference to any resource in the system.
1017
+ */
1018
+ item: CoreAPI.Entity | null;
1019
+ /**
1020
+ * The first instant of the month the override applied to.
1021
+ */
1022
+ month_starts_at: string;
1023
+ /**
1024
+ * Entity is a polymorphic reference to any resource in the system.
1025
+ */
1026
+ override: CoreAPI.Entity | null;
1027
+ /**
1028
+ * Why the override exists.
1029
+ */
1030
+ reason: 'new_customer' | 'lost_account' | 'promotion' | 'seasonal_shift' | 'new_product' | 'discontinued' | 'market_intelligence' | 'other' | null;
1031
+ }
1032
+ /**
1033
+ * What the solver could not do, and why the plan differs from raw history.
1034
+ */
1035
+ export interface ScheduleDiagnostics {
1036
+ /**
1037
+ * List represents a paginated list of resources.
1038
+ */
1039
+ applied_overrides: ListScheduleAppliedOverride | null;
1040
+ /**
1041
+ * Average inputs a product transition introduces, measured from history.
1042
+ */
1043
+ average_inputs_added: number;
1044
+ /**
1045
+ * Items below their reorder point that never won a slot in the horizon. This is
1046
+ * the signal that the plant is short of capacity.
1047
+ */
1048
+ capacity_starved_skus: Array<string>;
1049
+ /**
1050
+ * Calibrated changeover minutes per additional input.
1051
+ */
1052
+ changeover_slope_minutes: number;
1053
+ /**
1054
+ * Machines the constraint department contributed to this solve.
1055
+ */
1056
+ constraint_machine_count: number;
1057
+ /**
1058
+ * Items whose economic lot size was reduced to fit one machine-week, meaning
1059
+ * shorter and more frequent campaigns.
1060
+ */
1061
+ eoq_capped_skus: Array<string>;
1062
+ /**
1063
+ * Number of items the merchant has excluded from planning.
1064
+ */
1065
+ excluded_item_count: number;
1066
+ /**
1067
+ * Items with no measured run rate, which cannot be scheduled because their machine
1068
+ * time is unknown.
1069
+ */
1070
+ items_without_run_rate: Array<string>;
1071
+ /**
1072
+ * Machines in the constraint department with no production step. Their campaigns
1073
+ * derive no downstream department work.
1074
+ */
1075
+ machines_without_step: number;
1076
+ /**
1077
+ * Batches found on those machines in the demand window. Zero means nothing has
1078
+ * been scanned there, which is why a plan can be empty even with machines
1079
+ * configured.
1080
+ */
1081
+ measured_batch_count: number;
1082
+ /**
1083
+ * Items that cannot fit even a single lot into a machine-week and are therefore
1084
+ * never scheduled.
1085
+ */
1086
+ unschedulable_skus: Array<string>;
1087
+ }
1088
+ export interface ProductionScheduleDeleteResponse {
1089
+ }
1090
+ export interface ProductionScheduleListParams {
1091
+ /**
1092
+ * Opaque cursor token identifying where the page of results starts.
1093
+ *
1094
+ * Use the `cursor` value embedded in a previous response's `next_page_url` or
1095
+ * `previous_page_url` to fetch the adjacent page. Omit to start from the first
1096
+ * page.
1097
+ */
1098
+ cursor?: string;
1099
+ /**
1100
+ * Maximum number of results to return in a single page.
1101
+ */
1102
+ limit?: number;
1103
+ /**
1104
+ * Free-text search term used to filter results.
1105
+ *
1106
+ * Which fields are matched against the term varies by endpoint.
1107
+ */
1108
+ q?: string;
1109
+ /**
1110
+ * Only return versions in these lifecycle states.
1111
+ */
1112
+ statuses?: Array<'draft' | 'generating' | 'published' | 'superseded' | 'archived' | 'failed'>;
1113
+ }
1114
+ export interface ProductionScheduleCreateParams {
1115
+ /**
1116
+ * Overrides the configured demand basis for this version only.
1117
+ */
1118
+ demand_basis?: 'trailing_12' | 'seasonal_ema';
1119
+ /**
1120
+ * Overrides the configured horizon for this version only.
1121
+ */
1122
+ horizon_weeks?: number;
1123
+ /**
1124
+ * Label for the version.
1125
+ */
1126
+ name?: string;
1127
+ /**
1128
+ * The instant to plan against. Defaults to now.
1129
+ */
1130
+ planning_as_of?: string;
1131
+ }
1132
+ export interface ProductionScheduleRetrieveDerivedLinesParams {
1133
+ /**
1134
+ * Only return work owned by these departments.
1135
+ */
1136
+ department_ids?: Array<string>;
1137
+ /**
1138
+ * Only return work in this horizon week, zero-based.
1139
+ */
1140
+ week_index?: number;
1141
+ }
1142
+ export interface ProductionScheduleRetrieveDeviationsParams {
1143
+ /**
1144
+ * Opaque cursor token identifying where the page of results starts.
1145
+ *
1146
+ * Use the `cursor` value embedded in a previous response's `next_page_url` or
1147
+ * `previous_page_url` to fetch the adjacent page. Omit to start from the first
1148
+ * page.
1149
+ */
1150
+ cursor?: string;
1151
+ /**
1152
+ * Only return changes that fell inside the frozen window.
1153
+ */
1154
+ frozen?: boolean;
1155
+ /**
1156
+ * Maximum number of results to return in a single page.
1157
+ */
1158
+ limit?: number;
1159
+ /**
1160
+ * Free-text search term used to filter results.
1161
+ *
1162
+ * Which fields are matched against the term varies by endpoint.
1163
+ */
1164
+ q?: string;
1165
+ }
1166
+ export interface ProductionScheduleRetrieveWeekReleasePreviewParams {
1167
+ /**
1168
+ * Zero-based week offset from the start of the horizon.
1169
+ */
1170
+ week_index?: number;
1171
+ }
1172
+ export declare namespace ProductionSchedules {
1173
+ export { type GenerateProductionScheduleRequest as GenerateProductionScheduleRequest, type ListProductionSchedule as ListProductionSchedule, type ListProductionScheduleDerivedLine as ListProductionScheduleDerivedLine, type ListProductionScheduleDeviation as ListProductionScheduleDeviation, type ListProductionScheduleFinishedPolicy as ListProductionScheduleFinishedPolicy, type ListProductionScheduleItemPolicy as ListProductionScheduleItemPolicy, type ListReleaseScheduleBatch as ListReleaseScheduleBatch, type ListReleasedScheduleLine as ListReleasedScheduleLine, type ListScheduleAppliedOverride as ListScheduleAppliedOverride, type ProductionSchedule as ProductionSchedule, type ProductionScheduleDerivedLine as ProductionScheduleDerivedLine, type ProductionScheduleDeviation as ProductionScheduleDeviation, type ProductionScheduleFinishedPolicy as ProductionScheduleFinishedPolicy, type ProductionScheduleItemPolicy as ProductionScheduleItemPolicy, type ReleaseScheduleBatch as ReleaseScheduleBatch, type ReleaseScheduleWeekPreview as ReleaseScheduleWeekPreview, type ReleasedScheduleLine as ReleasedScheduleLine, type ScheduleAppliedOverride as ScheduleAppliedOverride, type ScheduleDiagnostics as ScheduleDiagnostics, type ProductionScheduleDeleteResponse as ProductionScheduleDeleteResponse, type ProductionScheduleListParams as ProductionScheduleListParams, type ProductionScheduleCreateParams as ProductionScheduleCreateParams, type ProductionScheduleRetrieveDerivedLinesParams as ProductionScheduleRetrieveDerivedLinesParams, type ProductionScheduleRetrieveDeviationsParams as ProductionScheduleRetrieveDeviationsParams, type ProductionScheduleRetrieveWeekReleasePreviewParams as ProductionScheduleRetrieveWeekReleasePreviewParams, };
1174
+ export { Lines as Lines, type CreateProductionScheduleLineRequest as CreateProductionScheduleLineRequest, type ListProductionScheduleLine as ListProductionScheduleLine, type ProductionScheduleLine as ProductionScheduleLine, type UpdateProductionScheduleLineRequest as UpdateProductionScheduleLineRequest, type LineDeleteResponse as LineDeleteResponse, type LineListParams as LineListParams, type LineCreateParams as LineCreateParams, type LineUpdateParams as LineUpdateParams, type LineDeleteParams as LineDeleteParams, };
1175
+ export { Actions as Actions, type ListScheduleCampaign as ListScheduleCampaign, type ListScheduleDiffLine as ListScheduleDiffLine, type ListSchedulePolicy as ListSchedulePolicy, type ListScheduleProjection as ListScheduleProjection, type PreviewProductionScheduleRequest as PreviewProductionScheduleRequest, type PreviewRegenerateProductionScheduleRequest as PreviewRegenerateProductionScheduleRequest, type ProductionSchedulePreview as ProductionSchedulePreview, type ProductionScheduleRegeneratePreview as ProductionScheduleRegeneratePreview, type RegenerateProductionScheduleRequest as RegenerateProductionScheduleRequest, type ReleaseProductionScheduleWeekRequest as ReleaseProductionScheduleWeekRequest, type ReleaseScheduleWeekResult as ReleaseScheduleWeekResult, type ScheduleCampaign as ScheduleCampaign, type ScheduleDiffLine as ScheduleDiffLine, type SchedulePolicy as SchedulePolicy, type ScheduleProjection as ScheduleProjection, type ActionPreviewParams as ActionPreviewParams, type ActionPreviewRegenerateParams as ActionPreviewRegenerateParams, type ActionRegenerateParams as ActionRegenerateParams, type ActionReleaseWeekParams as ActionReleaseWeekParams, };
1176
+ }
1177
+ //# sourceMappingURL=production-schedules.d.mts.map