@augno/sdk 0.14.0 → 0.15.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 (223) hide show
  1. package/CHANGELOG.md +3 -3
  2. package/package.json +1 -1
  3. package/resources/catalog/product-lines/product-lines.d.mts +53 -0
  4. package/resources/catalog/product-lines/product-lines.d.mts.map +1 -1
  5. package/resources/catalog/product-lines/product-lines.d.ts +53 -0
  6. package/resources/catalog/product-lines/product-lines.d.ts.map +1 -1
  7. package/resources/catalog/product-lines/product-lines.js.map +1 -1
  8. package/resources/catalog/product-lines/product-lines.mjs.map +1 -1
  9. package/resources/core/analytics.d.mts +252 -1
  10. package/resources/core/analytics.d.mts.map +1 -1
  11. package/resources/core/analytics.d.ts +252 -1
  12. package/resources/core/analytics.d.ts.map +1 -1
  13. package/resources/core/analytics.js +38 -0
  14. package/resources/core/analytics.js.map +1 -1
  15. package/resources/core/analytics.mjs +38 -0
  16. package/resources/core/analytics.mjs.map +1 -1
  17. package/resources/core/audit-events.d.mts +4 -4
  18. package/resources/core/audit-events.d.mts.map +1 -1
  19. package/resources/core/audit-events.d.ts +4 -4
  20. package/resources/core/audit-events.d.ts.map +1 -1
  21. package/resources/core/core.d.mts +4 -4
  22. package/resources/core/core.d.mts.map +1 -1
  23. package/resources/core/core.d.ts +4 -4
  24. package/resources/core/core.d.ts.map +1 -1
  25. package/resources/core/core.js.map +1 -1
  26. package/resources/core/core.mjs.map +1 -1
  27. package/resources/core/index.d.mts +1 -1
  28. package/resources/core/index.d.mts.map +1 -1
  29. package/resources/core/index.d.ts +1 -1
  30. package/resources/core/index.d.ts.map +1 -1
  31. package/resources/core/index.js.map +1 -1
  32. package/resources/core/index.mjs.map +1 -1
  33. package/resources/messaging/conversations/conversations.d.mts +3 -3
  34. package/resources/messaging/conversations/conversations.d.mts.map +1 -1
  35. package/resources/messaging/conversations/conversations.d.ts +3 -3
  36. package/resources/messaging/conversations/conversations.d.ts.map +1 -1
  37. package/resources/messaging/conversations/conversations.js.map +1 -1
  38. package/resources/messaging/conversations/conversations.mjs.map +1 -1
  39. package/resources/messaging/conversations/links.d.mts +2 -2
  40. package/resources/messaging/conversations/links.d.mts.map +1 -1
  41. package/resources/messaging/conversations/links.d.ts +2 -2
  42. package/resources/messaging/conversations/links.d.ts.map +1 -1
  43. package/resources/messaging/conversations/messages.d.mts +2 -2
  44. package/resources/messaging/conversations/messages.d.mts.map +1 -1
  45. package/resources/messaging/conversations/messages.d.ts +2 -2
  46. package/resources/messaging/conversations/messages.d.ts.map +1 -1
  47. package/resources/messaging/notifications/notifications.d.mts +2 -2
  48. package/resources/messaging/notifications/notifications.d.mts.map +1 -1
  49. package/resources/messaging/notifications/notifications.d.ts +2 -2
  50. package/resources/messaging/notifications/notifications.d.ts.map +1 -1
  51. package/resources/messaging/notifications/notifications.js.map +1 -1
  52. package/resources/messaging/notifications/notifications.mjs.map +1 -1
  53. package/resources/operations/carriers/service-levels.d.mts +37 -0
  54. package/resources/operations/carriers/service-levels.d.mts.map +1 -1
  55. package/resources/operations/carriers/service-levels.d.ts +37 -0
  56. package/resources/operations/carriers/service-levels.d.ts.map +1 -1
  57. package/resources/operations/carriers/service-levels.js +1 -0
  58. package/resources/operations/carriers/service-levels.js.map +1 -1
  59. package/resources/operations/carriers/service-levels.mjs +1 -0
  60. package/resources/operations/carriers/service-levels.mjs.map +1 -1
  61. package/resources/operations/fulfillment-recommendations/actions.d.mts +59 -0
  62. package/resources/operations/fulfillment-recommendations/actions.d.mts.map +1 -0
  63. package/resources/operations/fulfillment-recommendations/actions.d.ts +59 -0
  64. package/resources/operations/fulfillment-recommendations/actions.d.ts.map +1 -0
  65. package/resources/operations/fulfillment-recommendations/actions.js +40 -0
  66. package/resources/operations/fulfillment-recommendations/actions.js.map +1 -0
  67. package/resources/operations/fulfillment-recommendations/actions.mjs +36 -0
  68. package/resources/operations/fulfillment-recommendations/actions.mjs.map +1 -0
  69. package/resources/operations/fulfillment-recommendations/fulfillment-recommendations.d.mts +165 -0
  70. package/resources/operations/fulfillment-recommendations/fulfillment-recommendations.d.mts.map +1 -0
  71. package/resources/operations/fulfillment-recommendations/fulfillment-recommendations.d.ts +165 -0
  72. package/resources/operations/fulfillment-recommendations/fulfillment-recommendations.d.ts.map +1 -0
  73. package/resources/operations/fulfillment-recommendations/fulfillment-recommendations.js +52 -0
  74. package/resources/operations/fulfillment-recommendations/fulfillment-recommendations.js.map +1 -0
  75. package/resources/operations/fulfillment-recommendations/fulfillment-recommendations.mjs +47 -0
  76. package/resources/operations/fulfillment-recommendations/fulfillment-recommendations.mjs.map +1 -0
  77. package/resources/operations/fulfillment-recommendations/index.d.mts +3 -0
  78. package/resources/operations/fulfillment-recommendations/index.d.mts.map +1 -0
  79. package/resources/operations/fulfillment-recommendations/index.d.ts +3 -0
  80. package/resources/operations/fulfillment-recommendations/index.d.ts.map +1 -0
  81. package/resources/operations/fulfillment-recommendations/index.js +9 -0
  82. package/resources/operations/fulfillment-recommendations/index.js.map +1 -0
  83. package/resources/operations/fulfillment-recommendations/index.mjs +4 -0
  84. package/resources/operations/fulfillment-recommendations/index.mjs.map +1 -0
  85. package/resources/operations/fulfillment-recommendations.d.mts +2 -0
  86. package/resources/operations/fulfillment-recommendations.d.mts.map +1 -0
  87. package/resources/operations/fulfillment-recommendations.d.ts +2 -0
  88. package/resources/operations/fulfillment-recommendations.d.ts.map +1 -0
  89. package/resources/operations/fulfillment-recommendations.js +6 -0
  90. package/resources/operations/fulfillment-recommendations.js.map +1 -0
  91. package/resources/operations/fulfillment-recommendations.mjs +3 -0
  92. package/resources/operations/fulfillment-recommendations.mjs.map +1 -0
  93. package/resources/operations/index.d.mts +2 -1
  94. package/resources/operations/index.d.mts.map +1 -1
  95. package/resources/operations/index.d.ts +2 -1
  96. package/resources/operations/index.d.ts.map +1 -1
  97. package/resources/operations/index.js +11 -9
  98. package/resources/operations/index.js.map +1 -1
  99. package/resources/operations/index.mjs +1 -0
  100. package/resources/operations/index.mjs.map +1 -1
  101. package/resources/operations/operations.d.mts +6 -2
  102. package/resources/operations/operations.d.mts.map +1 -1
  103. package/resources/operations/operations.d.ts +6 -2
  104. package/resources/operations/operations.d.ts.map +1 -1
  105. package/resources/operations/operations.js +4 -0
  106. package/resources/operations/operations.js.map +1 -1
  107. package/resources/operations/operations.mjs +4 -0
  108. package/resources/operations/operations.mjs.map +1 -1
  109. package/resources/operations/production-schedule-settings/index.d.mts +1 -0
  110. package/resources/operations/production-schedule-settings/index.d.mts.map +1 -1
  111. package/resources/operations/production-schedule-settings/index.d.ts +1 -0
  112. package/resources/operations/production-schedule-settings/index.d.ts.map +1 -1
  113. package/resources/operations/production-schedule-settings/index.js +3 -1
  114. package/resources/operations/production-schedule-settings/index.js.map +1 -1
  115. package/resources/operations/production-schedule-settings/index.mjs +1 -0
  116. package/resources/operations/production-schedule-settings/index.mjs.map +1 -1
  117. package/resources/operations/production-schedule-settings/items.d.mts +228 -0
  118. package/resources/operations/production-schedule-settings/items.d.mts.map +1 -0
  119. package/resources/operations/production-schedule-settings/items.d.ts +228 -0
  120. package/resources/operations/production-schedule-settings/items.d.ts.map +1 -0
  121. package/resources/operations/production-schedule-settings/items.js +109 -0
  122. package/resources/operations/production-schedule-settings/items.js.map +1 -0
  123. package/resources/operations/production-schedule-settings/items.mjs +105 -0
  124. package/resources/operations/production-schedule-settings/items.mjs.map +1 -0
  125. package/resources/operations/production-schedule-settings/production-schedule-settings.d.mts +60 -0
  126. package/resources/operations/production-schedule-settings/production-schedule-settings.d.mts.map +1 -1
  127. package/resources/operations/production-schedule-settings/production-schedule-settings.d.ts +60 -0
  128. package/resources/operations/production-schedule-settings/production-schedule-settings.d.ts.map +1 -1
  129. package/resources/operations/production-schedule-settings/production-schedule-settings.js +6 -0
  130. package/resources/operations/production-schedule-settings/production-schedule-settings.js.map +1 -1
  131. package/resources/operations/production-schedule-settings/production-schedule-settings.mjs +6 -0
  132. package/resources/operations/production-schedule-settings/production-schedule-settings.mjs.map +1 -1
  133. package/resources/operations/production-schedules/actions.d.mts +117 -1
  134. package/resources/operations/production-schedules/actions.d.mts.map +1 -1
  135. package/resources/operations/production-schedules/actions.d.ts +117 -1
  136. package/resources/operations/production-schedules/actions.d.ts.map +1 -1
  137. package/resources/operations/production-schedules/actions.js +34 -0
  138. package/resources/operations/production-schedules/actions.js.map +1 -1
  139. package/resources/operations/production-schedules/actions.mjs +34 -0
  140. package/resources/operations/production-schedules/actions.mjs.map +1 -1
  141. package/resources/operations/production-schedules/index.d.mts +2 -2
  142. package/resources/operations/production-schedules/index.d.mts.map +1 -1
  143. package/resources/operations/production-schedules/index.d.ts +2 -2
  144. package/resources/operations/production-schedules/index.d.ts.map +1 -1
  145. package/resources/operations/production-schedules/index.js.map +1 -1
  146. package/resources/operations/production-schedules/index.mjs.map +1 -1
  147. package/resources/operations/production-schedules/production-schedules.d.mts +260 -3
  148. package/resources/operations/production-schedules/production-schedules.d.mts.map +1 -1
  149. package/resources/operations/production-schedules/production-schedules.d.ts +260 -3
  150. package/resources/operations/production-schedules/production-schedules.d.ts.map +1 -1
  151. package/resources/operations/production-schedules/production-schedules.js +29 -0
  152. package/resources/operations/production-schedules/production-schedules.js.map +1 -1
  153. package/resources/operations/production-schedules/production-schedules.mjs +29 -0
  154. package/resources/operations/production-schedules/production-schedules.mjs.map +1 -1
  155. package/resources/sales/account-groups.d.mts +27 -0
  156. package/resources/sales/account-groups.d.mts.map +1 -1
  157. package/resources/sales/account-groups.d.ts +27 -0
  158. package/resources/sales/account-groups.d.ts.map +1 -1
  159. package/resources/sales/customers/customers.d.mts +108 -1
  160. package/resources/sales/customers/customers.d.mts.map +1 -1
  161. package/resources/sales/customers/customers.d.ts +108 -1
  162. package/resources/sales/customers/customers.d.ts.map +1 -1
  163. package/resources/sales/customers/customers.js +27 -0
  164. package/resources/sales/customers/customers.js.map +1 -1
  165. package/resources/sales/customers/customers.mjs +27 -0
  166. package/resources/sales/customers/customers.mjs.map +1 -1
  167. package/resources/sales/customers/index.d.mts +1 -1
  168. package/resources/sales/customers/index.d.mts.map +1 -1
  169. package/resources/sales/customers/index.d.ts +1 -1
  170. package/resources/sales/customers/index.d.ts.map +1 -1
  171. package/resources/sales/customers/index.js.map +1 -1
  172. package/resources/sales/customers/index.mjs.map +1 -1
  173. package/resources/sales/index.d.mts +1 -1
  174. package/resources/sales/index.d.mts.map +1 -1
  175. package/resources/sales/index.d.ts +1 -1
  176. package/resources/sales/index.d.ts.map +1 -1
  177. package/resources/sales/index.js.map +1 -1
  178. package/resources/sales/index.mjs.map +1 -1
  179. package/resources/sales/sales-orders/sales-orders.d.mts +51 -0
  180. package/resources/sales/sales-orders/sales-orders.d.mts.map +1 -1
  181. package/resources/sales/sales-orders/sales-orders.d.ts +51 -0
  182. package/resources/sales/sales-orders/sales-orders.d.ts.map +1 -1
  183. package/resources/sales/sales-orders/sales-orders.js.map +1 -1
  184. package/resources/sales/sales-orders/sales-orders.mjs.map +1 -1
  185. package/resources/sales/sales.d.mts +2 -2
  186. package/resources/sales/sales.d.mts.map +1 -1
  187. package/resources/sales/sales.d.ts +2 -2
  188. package/resources/sales/sales.d.ts.map +1 -1
  189. package/resources/sales/sales.js.map +1 -1
  190. package/resources/sales/sales.mjs.map +1 -1
  191. package/src/resources/catalog/product-lines/product-lines.ts +58 -0
  192. package/src/resources/core/analytics.ts +300 -0
  193. package/src/resources/core/audit-events.ts +40 -0
  194. package/src/resources/core/core.ts +34 -0
  195. package/src/resources/core/index.ts +7 -0
  196. package/src/resources/messaging/conversations/conversations.ts +30 -0
  197. package/src/resources/messaging/conversations/links.ts +20 -0
  198. package/src/resources/messaging/conversations/messages.ts +20 -0
  199. package/src/resources/messaging/notifications/notifications.ts +20 -0
  200. package/src/resources/operations/carriers/service-levels.ts +41 -0
  201. package/src/resources/operations/fulfillment-recommendations/actions.ts +75 -0
  202. package/src/resources/operations/fulfillment-recommendations/fulfillment-recommendations.ts +206 -0
  203. package/src/resources/operations/fulfillment-recommendations/index.ts +8 -0
  204. package/src/resources/operations/fulfillment-recommendations.ts +3 -0
  205. package/src/resources/operations/index.ts +11 -0
  206. package/src/resources/operations/operations.ts +27 -0
  207. package/src/resources/operations/production-schedule-settings/index.ts +8 -0
  208. package/src/resources/operations/production-schedule-settings/items.ts +273 -0
  209. package/src/resources/operations/production-schedule-settings/production-schedule-settings.ts +82 -0
  210. package/src/resources/operations/production-schedules/actions.ts +144 -0
  211. package/src/resources/operations/production-schedules/index.ts +9 -0
  212. package/src/resources/operations/production-schedules/production-schedules.ts +310 -0
  213. package/src/resources/sales/account-groups.ts +32 -0
  214. package/src/resources/sales/customers/customers.ts +122 -0
  215. package/src/resources/sales/customers/index.ts +1 -0
  216. package/src/resources/sales/index.ts +1 -0
  217. package/src/resources/sales/sales-orders/sales-orders.ts +59 -0
  218. package/src/resources/sales/sales.ts +2 -0
  219. package/src/version.ts +1 -1
  220. package/version.d.mts +1 -1
  221. package/version.d.ts +1 -1
  222. package/version.js +1 -1
  223. package/version.mjs +1 -1
@@ -90,6 +90,12 @@ import {
90
90
  ListCarrier,
91
91
  UpdateCarrierRequest,
92
92
  } from './carriers/carriers';
93
+ import * as FulfillmentRecommendationsAPI from './fulfillment-recommendations/fulfillment-recommendations';
94
+ import {
95
+ FulfillmentRecommendation,
96
+ FulfillmentRecommendations,
97
+ ListFulfillmentRecommendation,
98
+ } from './fulfillment-recommendations/fulfillment-recommendations';
93
99
  import * as LocationsAPI from './locations/locations';
94
100
  import {
95
101
  CreateLocationRequest,
@@ -118,6 +124,9 @@ import {
118
124
  ListReleaseScheduleBatch,
119
125
  ListReleasedScheduleLine,
120
126
  ListScheduleAppliedOverride,
127
+ ListScheduleAtRiskOrder,
128
+ ListScheduleOrderCoverage,
129
+ ListScheduleOrderCoverageLine,
121
130
  ProductionSchedule,
122
131
  ProductionScheduleCreateParams,
123
132
  ProductionScheduleDeleteResponse,
@@ -134,7 +143,10 @@ import {
134
143
  ReleaseScheduleWeekPreview,
135
144
  ReleasedScheduleLine,
136
145
  ScheduleAppliedOverride,
146
+ ScheduleAtRiskOrder,
137
147
  ScheduleDiagnostics,
148
+ ScheduleOrderCoverage,
149
+ ScheduleOrderCoverageLine,
138
150
  } from './production-schedules/production-schedules';
139
151
  import * as ShipmentsAPI from './shipments/shipments';
140
152
  import { Shipments } from './shipments/shipments';
@@ -153,6 +165,8 @@ export class Operations extends APIResource {
153
165
  new ProductionSchedulesAPI.ProductionSchedules(this._client);
154
166
  productionScheduleSettings: ProductionScheduleSettingsAPI.ProductionScheduleSettings =
155
167
  new ProductionScheduleSettingsAPI.ProductionScheduleSettings(this._client);
168
+ fulfillmentRecommendations: FulfillmentRecommendationsAPI.FulfillmentRecommendations =
169
+ new FulfillmentRecommendationsAPI.FulfillmentRecommendations(this._client);
156
170
  locations: LocationsAPI.Locations = new LocationsAPI.Locations(this._client);
157
171
  locationTypes: LocationTypesAPI.LocationTypes = new LocationTypesAPI.LocationTypes(this._client);
158
172
  shipments: ShipmentsAPI.Shipments = new ShipmentsAPI.Shipments(this._client);
@@ -756,6 +770,7 @@ Operations.Machines = Machines;
756
770
  Operations.MachineDowntimeEvents = MachineDowntimeEvents;
757
771
  Operations.DemandOverrides = DemandOverrides;
758
772
  Operations.ProductionSchedules = ProductionSchedules;
773
+ Operations.FulfillmentRecommendations = FulfillmentRecommendations;
759
774
  Operations.Locations = Locations;
760
775
  Operations.LocationTypes = LocationTypes;
761
776
  Operations.Shipments = Shipments;
@@ -862,6 +877,9 @@ export declare namespace Operations {
862
877
  type ListReleaseScheduleBatch as ListReleaseScheduleBatch,
863
878
  type ListReleasedScheduleLine as ListReleasedScheduleLine,
864
879
  type ListScheduleAppliedOverride as ListScheduleAppliedOverride,
880
+ type ListScheduleAtRiskOrder as ListScheduleAtRiskOrder,
881
+ type ListScheduleOrderCoverage as ListScheduleOrderCoverage,
882
+ type ListScheduleOrderCoverageLine as ListScheduleOrderCoverageLine,
865
883
  type ProductionSchedule as ProductionSchedule,
866
884
  type ProductionScheduleDerivedLine as ProductionScheduleDerivedLine,
867
885
  type ProductionScheduleDeviation as ProductionScheduleDeviation,
@@ -871,7 +889,10 @@ export declare namespace Operations {
871
889
  type ReleaseScheduleWeekPreview as ReleaseScheduleWeekPreview,
872
890
  type ReleasedScheduleLine as ReleasedScheduleLine,
873
891
  type ScheduleAppliedOverride as ScheduleAppliedOverride,
892
+ type ScheduleAtRiskOrder as ScheduleAtRiskOrder,
874
893
  type ScheduleDiagnostics as ScheduleDiagnostics,
894
+ type ScheduleOrderCoverage as ScheduleOrderCoverage,
895
+ type ScheduleOrderCoverageLine as ScheduleOrderCoverageLine,
875
896
  type ProductionScheduleDeleteResponse as ProductionScheduleDeleteResponse,
876
897
  type ProductionScheduleListParams as ProductionScheduleListParams,
877
898
  type ProductionScheduleCreateParams as ProductionScheduleCreateParams,
@@ -886,6 +907,12 @@ export declare namespace Operations {
886
907
  type ProductionScheduleSettingUpdateParams as ProductionScheduleSettingUpdateParams,
887
908
  };
888
909
 
910
+ export {
911
+ FulfillmentRecommendations as FulfillmentRecommendations,
912
+ type FulfillmentRecommendation as FulfillmentRecommendation,
913
+ type ListFulfillmentRecommendation as ListFulfillmentRecommendation,
914
+ };
915
+
889
916
  export {
890
917
  Locations as Locations,
891
918
  type CreateLocationRequest as CreateLocationRequest,
@@ -1,5 +1,13 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ export {
4
+ Items,
5
+ type ListProductionScheduleItemSetting,
6
+ type ProductionScheduleItemSetting,
7
+ type UpsertItemSettingRequest,
8
+ type ItemDeleteResponse,
9
+ type ItemUpdateParams,
10
+ } from './items';
3
11
  export {
4
12
  ProductionScheduleSettings,
5
13
  type UpdateProductionScheduleSettingsRequest,
@@ -0,0 +1,273 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../core/resource';
4
+ import * as CoreAPI from '../../core/core';
5
+ import * as APIKeysAPI from '../../auth/api-keys/api-keys';
6
+ import { APIPromise } from '../../../core/api-promise';
7
+ import { RequestOptions } from '../../../internal/request-options';
8
+ import { path } from '../../../internal/utils/path';
9
+
10
+ /**
11
+ * The planning assumptions production schedules are solved against, and the per-resource overrides that mark which machines constrain the plan.
12
+ */
13
+ export class Items extends APIResource {
14
+ /**
15
+ * Returns every per-item planning override in the account.
16
+ *
17
+ * Only items that have been given an override appear here. An item with none is
18
+ * planned on the account defaults and its product line's conventions, which is the
19
+ * normal case — this is the list of exceptions, not a list of every item.
20
+ *
21
+ * This endpoint requires the permission: `production_schedules:read`.
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * const listProductionScheduleItemSetting =
26
+ * await client.operations.productionScheduleSettings.items.list();
27
+ * ```
28
+ */
29
+ list(options?: RequestOptions): APIPromise<ListProductionScheduleItemSetting> {
30
+ return this._client.get('/v1/operations/production-schedule-settings/items', options);
31
+ }
32
+
33
+ /**
34
+ * Returns the planning overrides for one item.
35
+ *
36
+ * Fails with a not-found error when the item has none, rather than returning an
37
+ * empty set of overrides: an item with no overrides is planned on the account
38
+ * defaults and its product line's conventions, and reporting that as a resource
39
+ * would suggest there is something here to edit.
40
+ *
41
+ * This endpoint requires the permission: `production_schedules:read`.
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * const productionScheduleItemSetting =
46
+ * await client.operations.productionScheduleSettings.items.retrieve(
47
+ * 'example',
48
+ * );
49
+ * ```
50
+ */
51
+ retrieve(itemID: string, options?: RequestOptions): APIPromise<ProductionScheduleItemSetting> {
52
+ return this._client.get(path`/v1/operations/production-schedule-settings/items/${itemID}`, options);
53
+ }
54
+
55
+ /**
56
+ * Writes the planning overrides for one item.
57
+ *
58
+ * An item has at most one set of overrides, so this replaces the existing entry
59
+ * rather than adding a second, and the entry keeps the ID it already had.
60
+ *
61
+ * The fulfillment policy is the most consequential of these. A `make_to_order`
62
+ * item contributes no forecast demand and holds no safety stock, so it is built
63
+ * only against orders already on the book — which is what stops a slow mover
64
+ * accumulating inventory nobody asked for. It also propagates: an intermediate
65
+ * item is planned to order only when every finished good it becomes is, so one
66
+ * stocked sibling keeps the whole family buffered.
67
+ *
68
+ * Overrides are read when a plan is generated, so a change takes effect on the
69
+ * next generated version and leaves existing ones untouched.
70
+ *
71
+ * This endpoint requires the permission: `production_schedules:update`.
72
+ *
73
+ * @example
74
+ * ```ts
75
+ * const productionScheduleItemSetting =
76
+ * await client.operations.productionScheduleSettings.items.update(
77
+ * 'example',
78
+ * {
79
+ * participation_status: 'included',
80
+ * fulfillment_policy: 'make_to_order',
81
+ * },
82
+ * );
83
+ * ```
84
+ */
85
+ update(
86
+ itemID: string,
87
+ body: ItemUpdateParams,
88
+ options?: RequestOptions,
89
+ ): APIPromise<ProductionScheduleItemSetting> {
90
+ return this._client.put(path`/v1/operations/production-schedule-settings/items/${itemID}`, {
91
+ body,
92
+ ...options,
93
+ });
94
+ }
95
+
96
+ /**
97
+ * Removes one item's planning overrides, returning it to the account defaults and
98
+ * its product line's conventions.
99
+ *
100
+ * Fails with a not-found error when the item has no overrides, rather than
101
+ * reporting success: a mistyped item ID would otherwise read as a change that
102
+ * never happened.
103
+ *
104
+ * This endpoint requires the permission: `production_schedules:update`.
105
+ *
106
+ * @example
107
+ * ```ts
108
+ * const item =
109
+ * await client.operations.productionScheduleSettings.items.delete(
110
+ * 'example',
111
+ * );
112
+ * ```
113
+ */
114
+ delete(itemID: string, options?: RequestOptions): APIPromise<ItemDeleteResponse> {
115
+ return this._client.delete(path`/v1/operations/production-schedule-settings/items/${itemID}`, options);
116
+ }
117
+ }
118
+
119
+ /**
120
+ * A single page of resources, together with the metadata needed to page through
121
+ * the rest of the result set.
122
+ */
123
+ export interface ListProductionScheduleItemSetting {
124
+ /**
125
+ * Resources in this page.
126
+ */
127
+ data: Array<ProductionScheduleItemSetting>;
128
+
129
+ /**
130
+ * Resource type identifier.
131
+ */
132
+ object: 'list';
133
+
134
+ /**
135
+ * PageInfo describes where the current page sits within a paginated result set and
136
+ * how to move to the adjacent pages.
137
+ *
138
+ * Page a list by following the URLs below rather than assembling cursors yourself.
139
+ * For a top-level list endpoint the URL repeats the original request's query
140
+ * string with only the cursor swapped, so following it preserves the same filters,
141
+ * search term, and page size.
142
+ */
143
+ page_info: APIKeysAPI.PageInfo;
144
+ }
145
+
146
+ /**
147
+ * Planning overrides for one item, on top of the account-wide assumptions.
148
+ */
149
+ export interface ProductionScheduleItemSetting {
150
+ /**
151
+ * Item setting ID.
152
+ */
153
+ id: string;
154
+
155
+ /**
156
+ * Creation timestamp.
157
+ */
158
+ created_at: string;
159
+
160
+ /**
161
+ * How this item is produced.
162
+ *
163
+ * - `make_to_stock`: built to the forecast, holding a safety stock against its
164
+ * variability.
165
+ * - `make_to_order`: built only against orders already on the book, holding no
166
+ * buffer.
167
+ *
168
+ * Null inherits from the item's product line, then from the account default.
169
+ */
170
+ fulfillment_policy: 'make_to_stock' | 'make_to_order' | null;
171
+
172
+ /**
173
+ * Entity is a polymorphic reference to any resource in the system.
174
+ */
175
+ item: CoreAPI.Entity | null;
176
+
177
+ /**
178
+ * Units in one production lot for this item, overriding the lot its product line
179
+ * would supply.
180
+ */
181
+ lot_multiple_units: number | null;
182
+
183
+ /**
184
+ * Resource type identifier.
185
+ */
186
+ object: 'production_schedule_item_setting';
187
+
188
+ /**
189
+ * Whether this item takes part in planning.
190
+ *
191
+ * An excluded item is left out of the plan entirely: no campaigns, no policy, no
192
+ * capacity.
193
+ */
194
+ participation_status: 'included' | 'excluded';
195
+
196
+ /**
197
+ * Last updated timestamp.
198
+ */
199
+ updated_at: string;
200
+ }
201
+
202
+ /**
203
+ * Request to write one item's planning overrides.
204
+ */
205
+ export interface UpsertItemSettingRequest {
206
+ /**
207
+ * Whether this item takes part in planning.
208
+ *
209
+ * An excluded item is left out of the plan entirely: no campaigns, no policy, no
210
+ * capacity.
211
+ */
212
+ participation_status: 'included' | 'excluded';
213
+
214
+ /**
215
+ * How this item is produced.
216
+ *
217
+ * - `make_to_stock`: built to the forecast, holding a safety stock against its
218
+ * variability.
219
+ * - `make_to_order`: built only against orders already on the book, holding no
220
+ * buffer.
221
+ *
222
+ * Clearing it returns the item to its product line's policy, then to the account
223
+ * default.
224
+ */
225
+ fulfillment_policy?: 'make_to_stock' | 'make_to_order' | null;
226
+
227
+ /**
228
+ * Units in one production lot for this item, overriding the lot its product line
229
+ * would supply.
230
+ */
231
+ lot_multiple_units?: number;
232
+ }
233
+
234
+ export interface ItemDeleteResponse {}
235
+
236
+ export interface ItemUpdateParams {
237
+ /**
238
+ * Whether this item takes part in planning.
239
+ *
240
+ * An excluded item is left out of the plan entirely: no campaigns, no policy, no
241
+ * capacity.
242
+ */
243
+ participation_status: 'included' | 'excluded';
244
+
245
+ /**
246
+ * How this item is produced.
247
+ *
248
+ * - `make_to_stock`: built to the forecast, holding a safety stock against its
249
+ * variability.
250
+ * - `make_to_order`: built only against orders already on the book, holding no
251
+ * buffer.
252
+ *
253
+ * Clearing it returns the item to its product line's policy, then to the account
254
+ * default.
255
+ */
256
+ fulfillment_policy?: 'make_to_stock' | 'make_to_order' | null;
257
+
258
+ /**
259
+ * Units in one production lot for this item, overriding the lot its product line
260
+ * would supply.
261
+ */
262
+ lot_multiple_units?: number;
263
+ }
264
+
265
+ export declare namespace Items {
266
+ export {
267
+ type ListProductionScheduleItemSetting as ListProductionScheduleItemSetting,
268
+ type ProductionScheduleItemSetting as ProductionScheduleItemSetting,
269
+ type UpsertItemSettingRequest as UpsertItemSettingRequest,
270
+ type ItemDeleteResponse as ItemDeleteResponse,
271
+ type ItemUpdateParams as ItemUpdateParams,
272
+ };
273
+ }
@@ -2,6 +2,15 @@
2
2
 
3
3
  import { APIResource } from '../../../core/resource';
4
4
  import * as CoreAPI from '../../core/core';
5
+ import * as ItemsAPI from './items';
6
+ import {
7
+ ItemDeleteResponse,
8
+ ItemUpdateParams,
9
+ Items,
10
+ ListProductionScheduleItemSetting,
11
+ ProductionScheduleItemSetting,
12
+ UpsertItemSettingRequest,
13
+ } from './items';
5
14
  import * as ResourcesAPI from './resources';
6
15
  import {
7
16
  ListProductionScheduleResourceSetting,
@@ -19,6 +28,7 @@ import { RequestOptions } from '../../../internal/request-options';
19
28
  */
20
29
  export class ProductionScheduleSettings extends APIResource {
21
30
  resources: ResourcesAPI.Resources = new ResourcesAPI.Resources(this._client);
31
+ items: ItemsAPI.Items = new ItemsAPI.Items(this._client);
22
32
 
23
33
  /**
24
34
  * Returns the planning assumptions production schedules are solved against.
@@ -73,6 +83,8 @@ export class ProductionScheduleSettings extends APIResource {
73
83
  * changeover_max_minutes: 0,
74
84
  * changeover_min_minutes: 0,
75
85
  * default_constraint_lead_time_weeks: 0,
86
+ * default_customer_lead_time_days: 30,
87
+ * default_fulfillment_policy: 'make_to_stock',
76
88
  * default_lot_units: 60,
77
89
  * demand_basis: 'trailing_12',
78
90
  * demand_window_months: 12,
@@ -191,6 +203,24 @@ export interface ProductionScheduleSettings {
191
203
  */
192
204
  default_constraint_lead_time_weeks: number;
193
205
 
206
+ /**
207
+ * Calendar days between an order being issued and it being due to ship.
208
+ *
209
+ * The last resort in the ship-by chain: a lead time set on the customer, or on the
210
+ * customer's account group, takes precedence. Zero means same-day shipping.
211
+ */
212
+ default_customer_lead_time_days: number;
213
+
214
+ /**
215
+ * How a SKU is produced when neither it nor its product line says.
216
+ *
217
+ * - `make_to_stock`: built to the forecast, holding a safety stock against its
218
+ * variability.
219
+ * - `make_to_order`: built only against orders already on the book, holding no
220
+ * buffer.
221
+ */
222
+ default_fulfillment_policy: 'make_to_stock' | 'make_to_order';
223
+
194
224
  /**
195
225
  * Units in a default production lot.
196
226
  *
@@ -436,6 +466,27 @@ export interface UpdateProductionScheduleSettingsRequest {
436
466
  */
437
467
  default_constraint_lead_time_weeks: number;
438
468
 
469
+ /**
470
+ * Calendar days between an order being issued and it being due to ship.
471
+ *
472
+ * The last resort in the ship-by chain: a lead time set on the customer, or on the
473
+ * customer's account group, takes precedence. Zero commits the account to same-day
474
+ * shipping on every order that falls through to it, so this update replaces the
475
+ * whole settings object and omitting the field is not the same as leaving it
476
+ * alone.
477
+ */
478
+ default_customer_lead_time_days: number;
479
+
480
+ /**
481
+ * How a SKU is produced when neither it nor its product line says.
482
+ *
483
+ * - `make_to_stock`: built to the forecast, holding a safety stock against its
484
+ * variability.
485
+ * - `make_to_order`: built only against orders already on the book, holding no
486
+ * buffer.
487
+ */
488
+ default_fulfillment_policy: 'make_to_stock' | 'make_to_order';
489
+
439
490
  /**
440
491
  * Units in a default production lot.
441
492
  *
@@ -663,6 +714,27 @@ export interface ProductionScheduleSettingUpdateParams {
663
714
  */
664
715
  default_constraint_lead_time_weeks: number;
665
716
 
717
+ /**
718
+ * Calendar days between an order being issued and it being due to ship.
719
+ *
720
+ * The last resort in the ship-by chain: a lead time set on the customer, or on the
721
+ * customer's account group, takes precedence. Zero commits the account to same-day
722
+ * shipping on every order that falls through to it, so this update replaces the
723
+ * whole settings object and omitting the field is not the same as leaving it
724
+ * alone.
725
+ */
726
+ default_customer_lead_time_days: number;
727
+
728
+ /**
729
+ * How a SKU is produced when neither it nor its product line says.
730
+ *
731
+ * - `make_to_stock`: built to the forecast, holding a safety stock against its
732
+ * variability.
733
+ * - `make_to_order`: built only against orders already on the book, holding no
734
+ * buffer.
735
+ */
736
+ default_fulfillment_policy: 'make_to_stock' | 'make_to_order';
737
+
666
738
  /**
667
739
  * Units in a default production lot.
668
740
  *
@@ -821,6 +893,7 @@ export interface ProductionScheduleSettingUpdateParams {
821
893
  }
822
894
 
823
895
  ProductionScheduleSettings.Resources = Resources;
896
+ ProductionScheduleSettings.Items = Items;
824
897
 
825
898
  export declare namespace ProductionScheduleSettings {
826
899
  export {
@@ -837,4 +910,13 @@ export declare namespace ProductionScheduleSettings {
837
910
  type ResourceDeleteResponse as ResourceDeleteResponse,
838
911
  type ResourceUpdateParams as ResourceUpdateParams,
839
912
  };
913
+
914
+ export {
915
+ Items as Items,
916
+ type ListProductionScheduleItemSetting as ListProductionScheduleItemSetting,
917
+ type ProductionScheduleItemSetting as ProductionScheduleItemSetting,
918
+ type UpsertItemSettingRequest as UpsertItemSettingRequest,
919
+ type ItemDeleteResponse as ItemDeleteResponse,
920
+ type ItemUpdateParams as ItemUpdateParams,
921
+ };
840
922
  }
@@ -126,6 +126,44 @@ export class Actions extends APIResource {
126
126
  });
127
127
  }
128
128
 
129
+ /**
130
+ * Returns the earliest date the published schedule could ship a quantity of an
131
+ * item.
132
+ *
133
+ * Quoted from the published version — the plan the floor is actually working to —
134
+ * and net of everything already promised to other orders. A date backed by stock
135
+ * somebody else is owed is not a date, so existing commitments are consumed before
136
+ * anything is offered.
137
+ *
138
+ * The answer allows for finishing after the constraint stage completes, so it is a
139
+ * ship date rather than a production date. When the published horizon cannot
140
+ * supply the quantity at all, `is_promisable` is false and no date is returned: a
141
+ * plan that runs thirteen weeks cannot speak for the fourteenth, and inventing a
142
+ * date beyond it would be the one number a customer actually relies on.
143
+ *
144
+ * Quoting does not reserve anything. Two quotes taken a minute apart can both come
145
+ * back with the same date, and only issuing an order commits the supply.
146
+ *
147
+ * This endpoint requires the permission: `production_schedules:read`.
148
+ *
149
+ * @example
150
+ * ```ts
151
+ * const promiseDateQuote =
152
+ * await client.operations.productionSchedules.actions.quotePromiseDate(
153
+ * { item_id: 'it_pej07ckhvu62', quantity: 1200 },
154
+ * );
155
+ * ```
156
+ */
157
+ quotePromiseDate(
158
+ body: ActionQuotePromiseDateParams,
159
+ options?: RequestOptions,
160
+ ): APIPromise<PromiseDateQuote> {
161
+ return this._client.post('/v1/operations/production-schedules/actions/quote-promise-date', {
162
+ body,
163
+ ...options,
164
+ });
165
+ }
166
+
129
167
  /**
130
168
  * Publishes a draft schedule, freezing its first weeks.
131
169
  *
@@ -509,6 +547,71 @@ export interface ProductionScheduleRegeneratePreview {
509
547
  solver_version: string;
510
548
  }
511
549
 
550
+ /**
551
+ * The earliest date the published plan could ship a quantity of an item.
552
+ */
553
+ export interface PromiseDateQuote {
554
+ /**
555
+ * Earliest date the quantity could ship, allowing for finishing after the
556
+ * constraint stage completes.
557
+ */
558
+ earliest_ship_date: string | null;
559
+
560
+ /**
561
+ * Horizon week the constraint stage would complete in.
562
+ */
563
+ earliest_week_index: number | null;
564
+
565
+ /**
566
+ * Whether the published horizon can supply it at all.
567
+ *
568
+ * False means the plan as published runs out before it could cover this quantity.
569
+ * That is not the same as "never" — it is the honest limit of a plan that only
570
+ * runs so many weeks.
571
+ */
572
+ is_promisable: boolean;
573
+
574
+ /**
575
+ * Entity is a polymorphic reference to any resource in the system.
576
+ */
577
+ item: CoreAPI.Entity | null;
578
+
579
+ /**
580
+ * Resource type identifier.
581
+ */
582
+ object: 'promise_date_quote';
583
+
584
+ /**
585
+ * Entity is a polymorphic reference to any resource in the system.
586
+ */
587
+ production_schedule: CoreAPI.Entity | null;
588
+
589
+ /**
590
+ * Version number of that schedule.
591
+ */
592
+ production_schedule_version: number;
593
+
594
+ /**
595
+ * The quantity being quoted.
596
+ */
597
+ quantity: number;
598
+ }
599
+
600
+ /**
601
+ * Request to quote the earliest date a quantity could ship.
602
+ */
603
+ export interface QuotePromiseDateRequest {
604
+ /**
605
+ * Item being quoted.
606
+ */
607
+ item_id: string;
608
+
609
+ /**
610
+ * Quantity being quoted, in the item's own unit.
611
+ */
612
+ quantity: number;
613
+ }
614
+
512
615
  /**
513
616
  * Request to re-solve a draft in place.
514
617
  */
@@ -766,6 +869,26 @@ export interface SchedulePolicy {
766
869
  */
767
870
  finish_lead_time_weeks: number;
768
871
 
872
+ /**
873
+ * Outstanding quantity the order book already owed for this item over the horizon.
874
+ */
875
+ firm_demand_units: number;
876
+
877
+ /**
878
+ * Quantity the forecast projected for the same window.
879
+ */
880
+ forecast_demand_units: number;
881
+
882
+ /**
883
+ * How this item was planned.
884
+ *
885
+ * - `make_to_stock`: built to the forecast, holding a safety stock against its
886
+ * variability.
887
+ * - `make_to_order`: built only against orders already on the book, holding no
888
+ * buffer, so its safety stocks and reorder point are all zero.
889
+ */
890
+ fulfillment_policy: 'make_to_stock' | 'make_to_order';
891
+
769
892
  /**
770
893
  * Annual cost of holding one unit.
771
894
  */
@@ -796,6 +919,12 @@ export interface SchedulePolicy {
796
919
  */
797
920
  order_up_to: number;
798
921
 
922
+ /**
923
+ * Which rule decided that policy: the item itself, its product line, or the
924
+ * account default.
925
+ */
926
+ policy_source: 'item' | 'product_line' | 'account_default';
927
+
799
928
  /**
800
929
  * Stock position at which a campaign is triggered.
801
930
  */
@@ -955,6 +1084,18 @@ export interface ActionRegenerateParams {
955
1084
  planning_as_of?: string;
956
1085
  }
957
1086
 
1087
+ export interface ActionQuotePromiseDateParams {
1088
+ /**
1089
+ * Item being quoted.
1090
+ */
1091
+ item_id: string;
1092
+
1093
+ /**
1094
+ * Quantity being quoted, in the item's own unit.
1095
+ */
1096
+ quantity: number;
1097
+ }
1098
+
958
1099
  export interface ActionReleaseWeekParams {
959
1100
  /**
960
1101
  * ID of the account user accountable for executing the run.
@@ -987,6 +1128,8 @@ export declare namespace Actions {
987
1128
  type PreviewRegenerateProductionScheduleRequest as PreviewRegenerateProductionScheduleRequest,
988
1129
  type ProductionSchedulePreview as ProductionSchedulePreview,
989
1130
  type ProductionScheduleRegeneratePreview as ProductionScheduleRegeneratePreview,
1131
+ type PromiseDateQuote as PromiseDateQuote,
1132
+ type QuotePromiseDateRequest as QuotePromiseDateRequest,
990
1133
  type RegenerateProductionScheduleRequest as RegenerateProductionScheduleRequest,
991
1134
  type ReleaseProductionScheduleWeekRequest as ReleaseProductionScheduleWeekRequest,
992
1135
  type ReleaseScheduleWeekResult as ReleaseScheduleWeekResult,
@@ -997,6 +1140,7 @@ export declare namespace Actions {
997
1140
  type ActionPreviewParams as ActionPreviewParams,
998
1141
  type ActionPreviewRegenerateParams as ActionPreviewRegenerateParams,
999
1142
  type ActionRegenerateParams as ActionRegenerateParams,
1143
+ type ActionQuotePromiseDateParams as ActionQuotePromiseDateParams,
1000
1144
  type ActionReleaseWeekParams as ActionReleaseWeekParams,
1001
1145
  };
1002
1146
  }