@augno/sdk 0.18.0 → 0.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (280) hide show
  1. package/CHANGELOG.md +2 -7
  2. package/package.json +1 -1
  3. package/resources/ai/memories.d.mts +6 -6
  4. package/resources/ai/memories.d.mts.map +1 -1
  5. package/resources/ai/memories.d.ts +6 -6
  6. package/resources/ai/memories.d.ts.map +1 -1
  7. package/resources/auth/api-keys/api-keys.d.mts +8 -0
  8. package/resources/auth/api-keys/api-keys.d.mts.map +1 -1
  9. package/resources/auth/api-keys/api-keys.d.ts +8 -0
  10. package/resources/auth/api-keys/api-keys.d.ts.map +1 -1
  11. package/resources/auth/api-keys/api-keys.js.map +1 -1
  12. package/resources/auth/api-keys/api-keys.mjs.map +1 -1
  13. package/resources/catalog/items/attributes.d.mts +3 -0
  14. package/resources/catalog/items/attributes.d.mts.map +1 -1
  15. package/resources/catalog/items/attributes.d.ts +3 -0
  16. package/resources/catalog/items/attributes.d.ts.map +1 -1
  17. package/resources/catalog/items/attributes.js +3 -0
  18. package/resources/catalog/items/attributes.js.map +1 -1
  19. package/resources/catalog/items/attributes.mjs +3 -0
  20. package/resources/catalog/items/attributes.mjs.map +1 -1
  21. package/resources/catalog/materials/materials.d.mts +6 -0
  22. package/resources/catalog/materials/materials.d.mts.map +1 -1
  23. package/resources/catalog/materials/materials.d.ts +6 -0
  24. package/resources/catalog/materials/materials.d.ts.map +1 -1
  25. package/resources/catalog/materials/materials.js.map +1 -1
  26. package/resources/catalog/materials/materials.mjs.map +1 -1
  27. package/resources/catalog/parts/parts.d.mts +6 -0
  28. package/resources/catalog/parts/parts.d.mts.map +1 -1
  29. package/resources/catalog/parts/parts.d.ts +6 -0
  30. package/resources/catalog/parts/parts.d.ts.map +1 -1
  31. package/resources/catalog/parts/parts.js.map +1 -1
  32. package/resources/catalog/parts/parts.mjs.map +1 -1
  33. package/resources/catalog/products/products.d.mts +6 -4
  34. package/resources/catalog/products/products.d.mts.map +1 -1
  35. package/resources/catalog/products/products.d.ts +6 -4
  36. package/resources/catalog/products/products.d.ts.map +1 -1
  37. package/resources/catalog/products/products.js.map +1 -1
  38. package/resources/catalog/products/products.mjs.map +1 -1
  39. package/resources/core/actions.d.mts +73 -0
  40. package/resources/core/actions.d.mts.map +1 -0
  41. package/resources/core/actions.d.ts +73 -0
  42. package/resources/core/actions.d.ts.map +1 -0
  43. package/resources/core/actions.js +36 -0
  44. package/resources/core/actions.js.map +1 -0
  45. package/resources/core/actions.mjs +32 -0
  46. package/resources/core/actions.mjs.map +1 -0
  47. package/resources/core/audit-events.d.mts +4 -4
  48. package/resources/core/audit-events.d.mts.map +1 -1
  49. package/resources/core/audit-events.d.ts +4 -4
  50. package/resources/core/audit-events.d.ts.map +1 -1
  51. package/resources/core/core.d.mts +6 -2
  52. package/resources/core/core.d.mts.map +1 -1
  53. package/resources/core/core.d.ts +6 -2
  54. package/resources/core/core.d.ts.map +1 -1
  55. package/resources/core/core.js +4 -0
  56. package/resources/core/core.js.map +1 -1
  57. package/resources/core/core.mjs +4 -0
  58. package/resources/core/core.mjs.map +1 -1
  59. package/resources/core/index.d.mts +1 -0
  60. package/resources/core/index.d.mts.map +1 -1
  61. package/resources/core/index.d.ts +1 -0
  62. package/resources/core/index.d.ts.map +1 -1
  63. package/resources/core/index.js +3 -1
  64. package/resources/core/index.js.map +1 -1
  65. package/resources/core/index.mjs +1 -0
  66. package/resources/core/index.mjs.map +1 -1
  67. package/resources/core/jobs.d.mts +1 -1
  68. package/resources/core/jobs.d.mts.map +1 -1
  69. package/resources/core/jobs.d.ts +1 -1
  70. package/resources/core/jobs.d.ts.map +1 -1
  71. package/resources/messaging/conversations/conversations.d.mts +3 -3
  72. package/resources/messaging/conversations/conversations.d.mts.map +1 -1
  73. package/resources/messaging/conversations/conversations.d.ts +3 -3
  74. package/resources/messaging/conversations/conversations.d.ts.map +1 -1
  75. package/resources/messaging/conversations/conversations.js.map +1 -1
  76. package/resources/messaging/conversations/conversations.mjs.map +1 -1
  77. package/resources/messaging/conversations/links.d.mts +2 -2
  78. package/resources/messaging/conversations/links.d.mts.map +1 -1
  79. package/resources/messaging/conversations/links.d.ts +2 -2
  80. package/resources/messaging/conversations/links.d.ts.map +1 -1
  81. package/resources/messaging/conversations/messages.d.mts +2 -2
  82. package/resources/messaging/conversations/messages.d.mts.map +1 -1
  83. package/resources/messaging/conversations/messages.d.ts +2 -2
  84. package/resources/messaging/conversations/messages.d.ts.map +1 -1
  85. package/resources/messaging/notifications/notifications.d.mts +2 -2
  86. package/resources/messaging/notifications/notifications.d.mts.map +1 -1
  87. package/resources/messaging/notifications/notifications.d.ts +2 -2
  88. package/resources/messaging/notifications/notifications.d.ts.map +1 -1
  89. package/resources/messaging/notifications/notifications.js.map +1 -1
  90. package/resources/messaging/notifications/notifications.mjs.map +1 -1
  91. package/resources/operations/index.d.mts +2 -1
  92. package/resources/operations/index.d.mts.map +1 -1
  93. package/resources/operations/index.d.ts +2 -1
  94. package/resources/operations/index.d.ts.map +1 -1
  95. package/resources/operations/index.js +9 -7
  96. package/resources/operations/index.js.map +1 -1
  97. package/resources/operations/index.mjs +1 -0
  98. package/resources/operations/index.mjs.map +1 -1
  99. package/resources/operations/machine-downtime-events.d.mts +56 -7
  100. package/resources/operations/machine-downtime-events.d.mts.map +1 -1
  101. package/resources/operations/machine-downtime-events.d.ts +56 -7
  102. package/resources/operations/machine-downtime-events.d.ts.map +1 -1
  103. package/resources/operations/machine-downtime-events.js +11 -7
  104. package/resources/operations/machine-downtime-events.js.map +1 -1
  105. package/resources/operations/machine-downtime-events.mjs +11 -7
  106. package/resources/operations/machine-downtime-events.mjs.map +1 -1
  107. package/resources/operations/operating-calendars/closures.d.mts +173 -0
  108. package/resources/operations/operating-calendars/closures.d.mts.map +1 -0
  109. package/resources/operations/operating-calendars/closures.d.ts +173 -0
  110. package/resources/operations/operating-calendars/closures.d.ts.map +1 -0
  111. package/resources/operations/operating-calendars/closures.js +81 -0
  112. package/resources/operations/operating-calendars/closures.js.map +1 -0
  113. package/resources/operations/operating-calendars/closures.mjs +77 -0
  114. package/resources/operations/operating-calendars/closures.mjs.map +1 -0
  115. package/resources/operations/operating-calendars/index.d.mts +3 -0
  116. package/resources/operations/operating-calendars/index.d.mts.map +1 -0
  117. package/resources/operations/operating-calendars/index.d.ts +3 -0
  118. package/resources/operations/operating-calendars/index.d.ts.map +1 -0
  119. package/resources/operations/operating-calendars/index.js +9 -0
  120. package/resources/operations/operating-calendars/index.js.map +1 -0
  121. package/resources/operations/operating-calendars/index.mjs +4 -0
  122. package/resources/operations/operating-calendars/index.mjs.map +1 -0
  123. package/resources/operations/operating-calendars/operating-calendars.d.mts +332 -0
  124. package/resources/operations/operating-calendars/operating-calendars.d.mts.map +1 -0
  125. package/resources/operations/operating-calendars/operating-calendars.d.ts +332 -0
  126. package/resources/operations/operating-calendars/operating-calendars.d.ts.map +1 -0
  127. package/resources/operations/operating-calendars/operating-calendars.js +129 -0
  128. package/resources/operations/operating-calendars/operating-calendars.js.map +1 -0
  129. package/resources/operations/operating-calendars/operating-calendars.mjs +124 -0
  130. package/resources/operations/operating-calendars/operating-calendars.mjs.map +1 -0
  131. package/resources/operations/operating-calendars.d.mts +2 -0
  132. package/resources/operations/operating-calendars.d.mts.map +1 -0
  133. package/resources/operations/operating-calendars.d.ts +2 -0
  134. package/resources/operations/operating-calendars.d.ts.map +1 -0
  135. package/resources/operations/operating-calendars.js +6 -0
  136. package/resources/operations/operating-calendars.js.map +1 -0
  137. package/resources/operations/operating-calendars.mjs +3 -0
  138. package/resources/operations/operating-calendars.mjs.map +1 -0
  139. package/resources/operations/operations.d.mts +6 -2
  140. package/resources/operations/operations.d.mts.map +1 -1
  141. package/resources/operations/operations.d.ts +6 -2
  142. package/resources/operations/operations.d.ts.map +1 -1
  143. package/resources/operations/operations.js +4 -0
  144. package/resources/operations/operations.js.map +1 -1
  145. package/resources/operations/operations.mjs +4 -0
  146. package/resources/operations/operations.mjs.map +1 -1
  147. package/resources/operations/production-schedule-settings/production-schedule-settings.d.mts +43 -12
  148. package/resources/operations/production-schedule-settings/production-schedule-settings.d.mts.map +1 -1
  149. package/resources/operations/production-schedule-settings/production-schedule-settings.d.ts +43 -12
  150. package/resources/operations/production-schedule-settings/production-schedule-settings.d.ts.map +1 -1
  151. package/resources/operations/production-schedule-settings/production-schedule-settings.js.map +1 -1
  152. package/resources/operations/production-schedule-settings/production-schedule-settings.mjs.map +1 -1
  153. package/resources/operations/production-schedules/actions.d.mts +34 -1
  154. package/resources/operations/production-schedules/actions.d.mts.map +1 -1
  155. package/resources/operations/production-schedules/actions.d.ts +34 -1
  156. package/resources/operations/production-schedules/actions.d.ts.map +1 -1
  157. package/resources/operations/production-schedules/actions.js +8 -0
  158. package/resources/operations/production-schedules/actions.js.map +1 -1
  159. package/resources/operations/production-schedules/actions.mjs +8 -0
  160. package/resources/operations/production-schedules/actions.mjs.map +1 -1
  161. package/resources/operations/production-schedules/index.d.mts +1 -1
  162. package/resources/operations/production-schedules/index.d.mts.map +1 -1
  163. package/resources/operations/production-schedules/index.d.ts +1 -1
  164. package/resources/operations/production-schedules/index.d.ts.map +1 -1
  165. package/resources/operations/production-schedules/index.js.map +1 -1
  166. package/resources/operations/production-schedules/index.mjs.map +1 -1
  167. package/resources/operations/production-schedules/lines.d.mts +10 -6
  168. package/resources/operations/production-schedules/lines.d.mts.map +1 -1
  169. package/resources/operations/production-schedules/lines.d.ts +10 -6
  170. package/resources/operations/production-schedules/lines.d.ts.map +1 -1
  171. package/resources/operations/production-schedules/production-schedules.d.mts +295 -2
  172. package/resources/operations/production-schedules/production-schedules.d.mts.map +1 -1
  173. package/resources/operations/production-schedules/production-schedules.d.ts +295 -2
  174. package/resources/operations/production-schedules/production-schedules.d.ts.map +1 -1
  175. package/resources/operations/production-schedules/production-schedules.js +42 -0
  176. package/resources/operations/production-schedules/production-schedules.js.map +1 -1
  177. package/resources/operations/production-schedules/production-schedules.mjs +42 -0
  178. package/resources/operations/production-schedules/production-schedules.mjs.map +1 -1
  179. package/resources/sales/account-groups.d.mts +2 -1
  180. package/resources/sales/account-groups.d.mts.map +1 -1
  181. package/resources/sales/account-groups.d.ts +2 -1
  182. package/resources/sales/account-groups.d.ts.map +1 -1
  183. package/resources/sales/account-prices/account-prices.d.mts +10 -1
  184. package/resources/sales/account-prices/account-prices.d.mts.map +1 -1
  185. package/resources/sales/account-prices/account-prices.d.ts +10 -1
  186. package/resources/sales/account-prices/account-prices.d.ts.map +1 -1
  187. package/resources/sales/account-prices/account-prices.js.map +1 -1
  188. package/resources/sales/account-prices/account-prices.mjs.map +1 -1
  189. package/resources/sales/addresses.d.mts +20 -0
  190. package/resources/sales/addresses.d.mts.map +1 -1
  191. package/resources/sales/addresses.d.ts +20 -0
  192. package/resources/sales/addresses.d.ts.map +1 -1
  193. package/resources/sales/customers/customers.d.mts +72 -14
  194. package/resources/sales/customers/customers.d.mts.map +1 -1
  195. package/resources/sales/customers/customers.d.ts +72 -14
  196. package/resources/sales/customers/customers.d.ts.map +1 -1
  197. package/resources/sales/customers/customers.js +10 -5
  198. package/resources/sales/customers/customers.js.map +1 -1
  199. package/resources/sales/customers/customers.mjs +10 -5
  200. package/resources/sales/customers/customers.mjs.map +1 -1
  201. package/resources/sales/customers/index.d.mts +1 -1
  202. package/resources/sales/customers/index.d.mts.map +1 -1
  203. package/resources/sales/customers/index.d.ts +1 -1
  204. package/resources/sales/customers/index.d.ts.map +1 -1
  205. package/resources/sales/customers/index.js.map +1 -1
  206. package/resources/sales/customers/index.mjs.map +1 -1
  207. package/resources/sales/index.d.mts +1 -1
  208. package/resources/sales/index.d.mts.map +1 -1
  209. package/resources/sales/index.d.ts +1 -1
  210. package/resources/sales/index.d.ts.map +1 -1
  211. package/resources/sales/index.js.map +1 -1
  212. package/resources/sales/index.mjs.map +1 -1
  213. package/resources/sales/sales-orders/actions.d.mts +217 -1
  214. package/resources/sales/sales-orders/actions.d.mts.map +1 -1
  215. package/resources/sales/sales-orders/actions.d.ts +217 -1
  216. package/resources/sales/sales-orders/actions.d.ts.map +1 -1
  217. package/resources/sales/sales-orders/actions.js +36 -0
  218. package/resources/sales/sales-orders/actions.js.map +1 -1
  219. package/resources/sales/sales-orders/actions.mjs +36 -0
  220. package/resources/sales/sales-orders/actions.mjs.map +1 -1
  221. package/resources/sales/sales-orders/index.d.mts +1 -1
  222. package/resources/sales/sales-orders/index.d.mts.map +1 -1
  223. package/resources/sales/sales-orders/index.d.ts +1 -1
  224. package/resources/sales/sales-orders/index.d.ts.map +1 -1
  225. package/resources/sales/sales-orders/index.js.map +1 -1
  226. package/resources/sales/sales-orders/index.mjs.map +1 -1
  227. package/resources/sales/sales-orders/sales-orders.d.mts +105 -9
  228. package/resources/sales/sales-orders/sales-orders.d.mts.map +1 -1
  229. package/resources/sales/sales-orders/sales-orders.d.ts +105 -9
  230. package/resources/sales/sales-orders/sales-orders.d.ts.map +1 -1
  231. package/resources/sales/sales-orders/sales-orders.js.map +1 -1
  232. package/resources/sales/sales-orders/sales-orders.mjs.map +1 -1
  233. package/resources/sales/sales.d.mts +2 -2
  234. package/resources/sales/sales.d.mts.map +1 -1
  235. package/resources/sales/sales.d.ts +2 -2
  236. package/resources/sales/sales.d.ts.map +1 -1
  237. package/resources/sales/sales.js.map +1 -1
  238. package/resources/sales/sales.mjs.map +1 -1
  239. package/src/resources/ai/memories.ts +6 -6
  240. package/src/resources/auth/api-keys/api-keys.ts +9 -0
  241. package/src/resources/catalog/items/attributes.ts +3 -0
  242. package/src/resources/catalog/materials/materials.ts +6 -0
  243. package/src/resources/catalog/parts/parts.ts +6 -0
  244. package/src/resources/catalog/products/products.ts +6 -4
  245. package/src/resources/core/actions.ts +89 -0
  246. package/src/resources/core/audit-events.ts +16 -0
  247. package/src/resources/core/core.ts +19 -0
  248. package/src/resources/core/index.ts +6 -0
  249. package/src/resources/core/jobs.ts +4 -0
  250. package/src/resources/messaging/conversations/conversations.ts +12 -0
  251. package/src/resources/messaging/conversations/links.ts +8 -0
  252. package/src/resources/messaging/conversations/messages.ts +8 -0
  253. package/src/resources/messaging/notifications/notifications.ts +8 -0
  254. package/src/resources/operations/index.ts +15 -0
  255. package/src/resources/operations/machine-downtime-events.ts +62 -7
  256. package/src/resources/operations/operating-calendars/closures.ts +223 -0
  257. package/src/resources/operations/operating-calendars/index.ts +23 -0
  258. package/src/resources/operations/operating-calendars/operating-calendars.ts +427 -0
  259. package/src/resources/operations/operating-calendars.ts +3 -0
  260. package/src/resources/operations/operations.ts +36 -0
  261. package/src/resources/operations/production-schedule-settings/production-schedule-settings.ts +49 -12
  262. package/src/resources/operations/production-schedules/actions.ts +37 -1
  263. package/src/resources/operations/production-schedules/index.ts +4 -0
  264. package/src/resources/operations/production-schedules/lines.ts +10 -6
  265. package/src/resources/operations/production-schedules/production-schedules.ts +354 -1
  266. package/src/resources/sales/account-groups.ts +2 -1
  267. package/src/resources/sales/account-prices/account-prices.ts +11 -1
  268. package/src/resources/sales/addresses.ts +24 -0
  269. package/src/resources/sales/customers/customers.ts +90 -14
  270. package/src/resources/sales/customers/index.ts +1 -0
  271. package/src/resources/sales/index.ts +1 -0
  272. package/src/resources/sales/sales-orders/actions.ts +266 -0
  273. package/src/resources/sales/sales-orders/index.ts +4 -0
  274. package/src/resources/sales/sales-orders/sales-orders.ts +131 -7
  275. package/src/resources/sales/sales.ts +2 -0
  276. package/src/version.ts +1 -1
  277. package/version.d.mts +1 -1
  278. package/version.d.ts +1 -1
  279. package/version.js +1 -1
  280. package/version.mjs +1 -1
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { APIResource } from '../../../core/resource';
4
4
  import * as CoreAPI from '../../core/core';
5
+ import * as AccountGroupsAPI from '../account-groups';
5
6
  import * as AddressesAPI from '../addresses';
6
7
  import * as ProductLinesAPI from '../../catalog/product-lines/product-lines';
7
8
  import * as AccountPricesAPI from '../account-prices/account-prices';
@@ -181,9 +182,14 @@ export class Customers extends APIResource {
181
182
  * to.
182
183
  *
183
184
  * Resolved through the same chain the issue path stamps onto an order, most
184
- * specific first: a lead time set on the customer, then on the customer's account
185
- * group, then the account-wide default. `source` names which rule applied, so a
186
- * form can show where the number came from rather than leaving a rep to guess.
185
+ * specific first: a lead time set on the customer, then on its parent account,
186
+ * then on the customer's account group, then the account-wide default. `source`
187
+ * names which rule applied, so a form can show where the number came from rather
188
+ * than leaving a rep to guess.
189
+ *
190
+ * A lead time set on a parent account therefore governs every child account under
191
+ * it that has not set its own, which is how a head office's terms are given to its
192
+ * locations without repeating them on each one.
187
193
  *
188
194
  * This is a preview of a commitment, not the commitment itself. An order takes its
189
195
  * own `ship_by_date` when it is issued and keeps it afterwards, so changing a lead
@@ -200,8 +206,12 @@ export class Customers extends APIResource {
200
206
  * );
201
207
  * ```
202
208
  */
203
- retrieveLeadTime(id: string, options?: RequestOptions): APIPromise<CustomerLeadTime> {
204
- return this._client.get(path`/v1/sales/customers/${id}/lead-time`, options);
209
+ retrieveLeadTime(
210
+ id: string,
211
+ query: CustomerRetrieveLeadTimeParams | null | undefined = {},
212
+ options?: RequestOptions,
213
+ ): APIPromise<CustomerLeadTime> {
214
+ return this._client.get(path`/v1/sales/customers/${id}/lead-time`, { query, ...options });
205
215
  }
206
216
  }
207
217
 
@@ -337,7 +347,8 @@ export interface CreateCustomerRequest {
337
347
  * Calendar days between an order being issued and it being due to ship.
338
348
  *
339
349
  * Sets each order's `ship_by_date` when it is issued. Leave unset to inherit the
340
- * customer's account group lead time, then the account default.
350
+ * parent account's lead time, then the customer's account group lead time, then
351
+ * the account default.
341
352
  */
342
353
  lead_time_days?: number;
343
354
 
@@ -360,6 +371,15 @@ export interface CreateCustomerRequest {
360
371
  */
361
372
  phone?: string;
362
373
 
374
+ /**
375
+ * The operating calendar naming the days this customer's dock accepts freight.
376
+ *
377
+ * Sits in the same chain as lead_time_days: leaving it unset falls through to the
378
+ * customer's group, then the account default, then Monday to Friday. A promised
379
+ * delivery date is never worked back from a day nobody is there to receive on.
380
+ */
381
+ receive_calendar_id?: string;
382
+
363
383
  /**
364
384
  * The customer's account standing.
365
385
  *
@@ -382,9 +402,15 @@ export interface CreateCustomerRequest {
382
402
  */
383
403
  export interface CustomerLeadTime {
384
404
  /**
385
- * Entity is a polymorphic reference to any resource in the system.
405
+ * A named grouping of customer accounts, used for pricing rules or to categorize
406
+ * accounts.
407
+ *
408
+ * A customer carries at most one group of type `type_group` as its customer type,
409
+ * plus any number of groups of type `pricing_group`. Membership of either kind can
410
+ * scope a volume discount to the customer and open up product lines for it to
411
+ * order from.
386
412
  */
387
- account_group: CoreAPI.Entity | null;
413
+ account_group: AccountGroupsAPI.AccountGroup | null;
388
414
 
389
415
  /**
390
416
  * Entity is a polymorphic reference to any resource in the system.
@@ -403,10 +429,17 @@ export interface CustomerLeadTime {
403
429
  */
404
430
  object: 'customer_lead_time';
405
431
 
432
+ /**
433
+ * A business you sell to, with its contact details, default fulfillment settings,
434
+ * and order policies.
435
+ */
436
+ parent_customer: AccountPricesAPI.Customer | null;
437
+
406
438
  /**
407
439
  * Which rule in the chain produced this lead time.
408
440
  *
409
441
  * - `customer`: a lead time set on the customer itself.
442
+ * - `parent_customer`: inherited from the customer's parent account.
410
443
  * - `account_group`: inherited from the customer's account group.
411
444
  * - `account`: the account-wide fallback.
412
445
  *
@@ -414,7 +447,14 @@ export interface CustomerLeadTime {
414
447
  * on one specific order, which is a fact about that order rather than about the
415
448
  * customer.
416
449
  */
417
- source: 'customer' | 'account_group' | 'account' | 'manual';
450
+ source:
451
+ | 'customer'
452
+ | 'parent_customer'
453
+ | 'account_group'
454
+ | 'account'
455
+ | 'manual'
456
+ | 'order_lead_time'
457
+ | 'order_ship_by';
418
458
  }
419
459
 
420
460
  /**
@@ -534,8 +574,9 @@ export interface UpdateCustomerRequest {
534
574
  /**
535
575
  * Calendar days between an order being issued and it being due to ship.
536
576
  *
537
- * Sets each order's `ship_by_date` when it is issued. Leave unset to inherit the
538
- * customer's account group lead time, then the account default.
577
+ * Sets each order's `ship_by_date` when it is issued. Clear it to inherit the
578
+ * parent account's lead time, then the customer's account group lead time, then
579
+ * the account default.
539
580
  */
540
581
  lead_time_days?: number | null;
541
582
 
@@ -562,6 +603,13 @@ export interface UpdateCustomerRequest {
562
603
  */
563
604
  phone?: string | null;
564
605
 
606
+ /**
607
+ * The operating calendar naming the days this customer's dock accepts freight.
608
+ * Clearing it returns the customer to their group's calendar, then the account
609
+ * default.
610
+ */
611
+ receive_calendar_id?: string | null;
612
+
565
613
  /**
566
614
  * ID of an existing address to use as the default shipping address.
567
615
  *
@@ -916,7 +964,8 @@ export interface CustomerCreateParams {
916
964
  * ship.
917
965
  *
918
966
  * Sets each order's `ship_by_date` when it is issued. Leave unset to inherit the
919
- * customer's account group lead time, then the account default.
967
+ * parent account's lead time, then the customer's account group lead time, then
968
+ * the account default.
920
969
  */
921
970
  lead_time_days?: number;
922
971
 
@@ -939,6 +988,16 @@ export interface CustomerCreateParams {
939
988
  */
940
989
  phone?: string;
941
990
 
991
+ /**
992
+ * Body param: The operating calendar naming the days this customer's dock accepts
993
+ * freight.
994
+ *
995
+ * Sits in the same chain as lead_time_days: leaving it unset falls through to the
996
+ * customer's group, then the account default, then Monday to Friday. A promised
997
+ * delivery date is never worked back from a day nobody is there to receive on.
998
+ */
999
+ receive_calendar_id?: string;
1000
+
942
1001
  /**
943
1002
  * Body param: The customer's account standing.
944
1003
  *
@@ -1099,8 +1158,9 @@ export interface CustomerUpdateParams {
1099
1158
  * Body param: Calendar days between an order being issued and it being due to
1100
1159
  * ship.
1101
1160
  *
1102
- * Sets each order's `ship_by_date` when it is issued. Leave unset to inherit the
1103
- * customer's account group lead time, then the account default.
1161
+ * Sets each order's `ship_by_date` when it is issued. Clear it to inherit the
1162
+ * parent account's lead time, then the customer's account group lead time, then
1163
+ * the account default.
1104
1164
  */
1105
1165
  lead_time_days?: number | null;
1106
1166
 
@@ -1128,6 +1188,13 @@ export interface CustomerUpdateParams {
1128
1188
  */
1129
1189
  phone?: string | null;
1130
1190
 
1191
+ /**
1192
+ * Body param: The operating calendar naming the days this customer's dock accepts
1193
+ * freight. Clearing it returns the customer to their group's calendar, then the
1194
+ * account default.
1195
+ */
1196
+ receive_calendar_id?: string | null;
1197
+
1131
1198
  /**
1132
1199
  * Body param: ID of an existing address to use as the default shipping address.
1133
1200
  *
@@ -1152,6 +1219,14 @@ export interface CustomerUpdateParams {
1152
1219
  url?: string | null;
1153
1220
  }
1154
1221
 
1222
+ export interface CustomerRetrieveLeadTimeParams {
1223
+ /**
1224
+ * Sub-objects to expand in the response. When omitted, sub-objects are returned as
1225
+ * `null`.
1226
+ */
1227
+ include?: Array<'account_group' | 'parent_customer'>;
1228
+ }
1229
+
1155
1230
  Customers.Actions = Actions;
1156
1231
 
1157
1232
  export declare namespace Customers {
@@ -1164,6 +1239,7 @@ export declare namespace Customers {
1164
1239
  type CustomerRetrieveParams as CustomerRetrieveParams,
1165
1240
  type CustomerCreateParams as CustomerCreateParams,
1166
1241
  type CustomerUpdateParams as CustomerUpdateParams,
1242
+ type CustomerRetrieveLeadTimeParams as CustomerRetrieveLeadTimeParams,
1167
1243
  };
1168
1244
 
1169
1245
  export {
@@ -11,4 +11,5 @@ export {
11
11
  type CustomerRetrieveParams,
12
12
  type CustomerCreateParams,
13
13
  type CustomerUpdateParams,
14
+ type CustomerRetrieveLeadTimeParams,
14
15
  } from './customers';
@@ -64,6 +64,7 @@ export {
64
64
  type CustomerRetrieveParams,
65
65
  type CustomerCreateParams,
66
66
  type CustomerUpdateParams,
67
+ type CustomerRetrieveLeadTimeParams,
67
68
  } from './customers/index';
68
69
  export {
69
70
  OrderDiscounts,
@@ -149,6 +149,46 @@ export class Actions extends APIResource {
149
149
  return this._client.post(path`/v1/sales/sales-orders/${id}/actions/quote-freight`, options);
150
150
  }
151
151
 
152
+ /**
153
+ * Previews the ship-by date a set of commitment inputs would produce, without
154
+ * creating or changing anything.
155
+ *
156
+ * Runs the same resolution an order runs when it is issued: a promised delivery
157
+ * date has the customer's receiving days, the carrier's transit, and the plant's
158
+ * shipping days worked back through it, while a lead time or a pinned ship date is
159
+ * snapped onto the next earlier day the plant ships. The returned steps are that
160
+ * derivation in order, so a caller can show why a date is what it is rather than
161
+ * restating the rules.
162
+ *
163
+ * At most one of `promised_at`, `lead_time_override_days`, and
164
+ * `ship_by_override_date` may be set; they are alternative answers to the same
165
+ * question.
166
+ *
167
+ * Advisory rather than binding. Carrier transit comes from a lane cache warmed in
168
+ * the background, so a lane nobody has shipped yet quotes against the service
169
+ * level's default or against no transit at all, and the date stamped at issue may
170
+ * differ once the lane has been rated.
171
+ *
172
+ * This endpoint requires the permission: `sales_orders:read`.
173
+ *
174
+ * @example
175
+ * ```ts
176
+ * const quoteSalesOrderCommitmentResponse =
177
+ * await client.sales.salesOrders.actions.quoteCommitment({
178
+ * buyer_account_id: 'ac_ykxoradjoeb3',
179
+ * promised_at: '2026-08-22T00:00:00Z',
180
+ * service_level_id: 'crop_4ilk9p6gccrx',
181
+ * ship_to_address_id: 'ad_npqa5y43q26z',
182
+ * });
183
+ * ```
184
+ */
185
+ quoteCommitment(
186
+ body: ActionQuoteCommitmentParams | null | undefined = {},
187
+ options?: RequestOptions,
188
+ ): APIPromise<QuoteSalesOrderCommitmentResponse> {
189
+ return this._client.post('/v1/sales/sales-orders/actions/quote-commitment', { body, ...options });
190
+ }
191
+
152
192
  /**
153
193
  * Creates a production run from a sales order.
154
194
  *
@@ -193,6 +233,38 @@ export interface BulkDeleteSalesOrdersRequest {
193
233
  sales_order_ids: Array<string>;
194
234
  }
195
235
 
236
+ /**
237
+ * CommitmentQuoteStep is one rule's contribution to a previewed ship-by date.
238
+ *
239
+ * Returned as an ordered list so a caller can show why a date is what it is
240
+ * without reimplementing the arithmetic, and so the explanation cannot drift from
241
+ * the calculation that produced it.
242
+ */
243
+ export interface CommitmentQuoteStep {
244
+ /**
245
+ * Which rule applied.
246
+ */
247
+ code: 'basis' | 'receive_calendar' | 'carrier_transit' | 'ship_calendar' | 'pickup_cutoff';
248
+
249
+ /**
250
+ * Where the running date stood after this rule.
251
+ */
252
+ date: string;
253
+
254
+ /**
255
+ * How far this rule pulled the date back. Zero means the rule applied and changed
256
+ * nothing, which is worth showing: it says the date was already on an open day.
257
+ */
258
+ days_moved: number;
259
+
260
+ /**
261
+ * The rule's own parameter — where a transit estimate came from, or the cutoff
262
+ * time applied. Null for a rule that takes none, rather than an empty string:
263
+ * snapping onto an open day has no parameter to report.
264
+ */
265
+ detail: string | null;
266
+ }
267
+
196
268
  /**
197
269
  * Request to issue a sales order.
198
270
  */
@@ -272,6 +344,140 @@ export interface ProductionRun {
272
344
  updated_at: string;
273
345
  }
274
346
 
347
+ /**
348
+ * Request to preview the ship-by date a set of commitment inputs would produce.
349
+ */
350
+ export interface QuoteSalesOrderCommitmentRequest {
351
+ /**
352
+ * The buying account, used to resolve its lead time and receiving days.
353
+ */
354
+ buyer_account_id?: string;
355
+
356
+ /**
357
+ * Carrier for the shipment.
358
+ */
359
+ carrier_id?: string;
360
+
361
+ /**
362
+ * When the order would be issued. Defaults to now, since a lead time is measured
363
+ * from issue and an order built today but issued next week commits to next week's
364
+ * date.
365
+ */
366
+ issued_at?: string;
367
+
368
+ /**
369
+ * Days between issue and the order being due to ship, in place of the customer's
370
+ * standing lead time.
371
+ */
372
+ lead_time_override_days?: number;
373
+
374
+ /**
375
+ * Date delivery would be promised to the customer.
376
+ */
377
+ promised_at?: string;
378
+
379
+ /**
380
+ * An existing order to preview against. Its customer, ship-to address, carrier,
381
+ * and service level are used, and the commitment fields below replace whatever it
382
+ * currently carries.
383
+ *
384
+ * Omit it to preview an order that has not been created yet, supplying the parts
385
+ * directly.
386
+ */
387
+ sales_order_id?: string;
388
+
389
+ /**
390
+ * Service level for the shipment, which the lane's transit estimate is keyed on.
391
+ */
392
+ service_level_id?: string;
393
+
394
+ /**
395
+ * The exact date the order would be due to ship.
396
+ */
397
+ ship_by_override_date?: string;
398
+
399
+ /**
400
+ * The ship-to address, which decides the destination timezone and the lane transit
401
+ * is quoted on.
402
+ */
403
+ ship_to_address_id?: string;
404
+ }
405
+
406
+ /**
407
+ * The ship-by date a set of commitment inputs would produce, and how it was
408
+ * reached.
409
+ */
410
+ export interface QuoteSalesOrderCommitmentResponse {
411
+ /**
412
+ * Days the receiving and shipping calendars pulled the date back, beyond what
413
+ * transit accounted for.
414
+ */
415
+ calendar_adjustment_days: number;
416
+
417
+ /**
418
+ * When freight leaving on the ship-by date would reach the customer: transit
419
+ * walked forward from it and landed on a day their dock receives. Null whenever
420
+ * `transit_days` is, since an arrival with no journey behind it would just be the
421
+ * ship date wearing a different name.
422
+ *
423
+ * Reported for every basis, including the ones that do not use transit to decide
424
+ * the ship-by date. An order committed on a lead time has the same journey ahead
425
+ * of it; it simply was not worked backwards from.
426
+ */
427
+ estimated_delivery_date: string | null;
428
+
429
+ /**
430
+ * Calendar days between issue and the ship-by date.
431
+ */
432
+ lead_time_days: number | null;
433
+
434
+ /**
435
+ * Which rule produced the date.
436
+ */
437
+ lead_time_source:
438
+ | 'customer'
439
+ | 'parent_customer'
440
+ | 'account_group'
441
+ | 'account'
442
+ | 'manual'
443
+ | 'order_lead_time'
444
+ | 'order_ship_by'
445
+ | null;
446
+
447
+ /**
448
+ * Resource type identifier.
449
+ */
450
+ object: 'sales_order_commitment_quote';
451
+
452
+ /**
453
+ * That date at the plant's pickup cutoff — the moment freight would have to be
454
+ * tendered by. Null when the shipping calendar carries no cutoff.
455
+ */
456
+ ship_by_cutoff_at: string | null;
457
+
458
+ /**
459
+ * The date the order would be due to ship, or null when no rule resolves one.
460
+ */
461
+ ship_by_date: string | null;
462
+
463
+ /**
464
+ * The derivation in order, one entry per rule that moved the date.
465
+ */
466
+ steps: Array<CommitmentQuoteStep>;
467
+
468
+ /**
469
+ * Days the carrier needs to cover the lane. Null when the lane has never been
470
+ * quoted and the service level carries no default, or when no service level was
471
+ * supplied to quote one on.
472
+ */
473
+ transit_days: number | null;
474
+
475
+ /**
476
+ * Where the transit estimate came from.
477
+ */
478
+ transit_source: 'carrier_lane' | 'service_level' | null;
479
+ }
480
+
275
481
  /**
276
482
  * The freshly estimated freight charge for a sales order.
277
483
  */
@@ -313,6 +519,62 @@ export interface ActionIssueParams {
313
519
  notify_customer: boolean;
314
520
  }
315
521
 
522
+ export interface ActionQuoteCommitmentParams {
523
+ /**
524
+ * The buying account, used to resolve its lead time and receiving days.
525
+ */
526
+ buyer_account_id?: string;
527
+
528
+ /**
529
+ * Carrier for the shipment.
530
+ */
531
+ carrier_id?: string;
532
+
533
+ /**
534
+ * When the order would be issued. Defaults to now, since a lead time is measured
535
+ * from issue and an order built today but issued next week commits to next week's
536
+ * date.
537
+ */
538
+ issued_at?: string;
539
+
540
+ /**
541
+ * Days between issue and the order being due to ship, in place of the customer's
542
+ * standing lead time.
543
+ */
544
+ lead_time_override_days?: number;
545
+
546
+ /**
547
+ * Date delivery would be promised to the customer.
548
+ */
549
+ promised_at?: string;
550
+
551
+ /**
552
+ * An existing order to preview against. Its customer, ship-to address, carrier,
553
+ * and service level are used, and the commitment fields below replace whatever it
554
+ * currently carries.
555
+ *
556
+ * Omit it to preview an order that has not been created yet, supplying the parts
557
+ * directly.
558
+ */
559
+ sales_order_id?: string;
560
+
561
+ /**
562
+ * Service level for the shipment, which the lane's transit estimate is keyed on.
563
+ */
564
+ service_level_id?: string;
565
+
566
+ /**
567
+ * The exact date the order would be due to ship.
568
+ */
569
+ ship_by_override_date?: string;
570
+
571
+ /**
572
+ * The ship-to address, which decides the destination timezone and the lane transit
573
+ * is quoted on.
574
+ */
575
+ ship_to_address_id?: string;
576
+ }
577
+
316
578
  export interface ActionCreateProductionRunParams {
317
579
  /**
318
580
  * Sub-objects to expand in the response. When omitted, sub-objects are returned as
@@ -324,12 +586,16 @@ export interface ActionCreateProductionRunParams {
324
586
  export declare namespace Actions {
325
587
  export {
326
588
  type BulkDeleteSalesOrdersRequest as BulkDeleteSalesOrdersRequest,
589
+ type CommitmentQuoteStep as CommitmentQuoteStep,
327
590
  type IssueSalesOrderRequest as IssueSalesOrderRequest,
328
591
  type ProductionRun as ProductionRun,
592
+ type QuoteSalesOrderCommitmentRequest as QuoteSalesOrderCommitmentRequest,
593
+ type QuoteSalesOrderCommitmentResponse as QuoteSalesOrderCommitmentResponse,
329
594
  type QuoteSalesOrderFreightResponse as QuoteSalesOrderFreightResponse,
330
595
  type ActionBulkDeleteResponse as ActionBulkDeleteResponse,
331
596
  type ActionBulkDeleteParams as ActionBulkDeleteParams,
332
597
  type ActionIssueParams as ActionIssueParams,
598
+ type ActionQuoteCommitmentParams as ActionQuoteCommitmentParams,
333
599
  type ActionCreateProductionRunParams as ActionCreateProductionRunParams,
334
600
  };
335
601
  }
@@ -3,12 +3,16 @@
3
3
  export {
4
4
  Actions,
5
5
  type BulkDeleteSalesOrdersRequest,
6
+ type CommitmentQuoteStep,
6
7
  type IssueSalesOrderRequest,
7
8
  type ProductionRun,
9
+ type QuoteSalesOrderCommitmentRequest,
10
+ type QuoteSalesOrderCommitmentResponse,
8
11
  type QuoteSalesOrderFreightResponse,
9
12
  type ActionBulkDeleteResponse,
10
13
  type ActionBulkDeleteParams,
11
14
  type ActionIssueParams,
15
+ type ActionQuoteCommitmentParams,
12
16
  type ActionCreateProductionRunParams,
13
17
  } from './actions';
14
18
  export {