@augno/sdk 0.18.1 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (257) hide show
  1. package/CHANGELOG.md +3 -5
  2. package/package.json +1 -1
  3. package/resources/catalog/catalog.d.mts +6 -6
  4. package/resources/catalog/catalog.d.mts.map +1 -1
  5. package/resources/catalog/catalog.d.ts +6 -6
  6. package/resources/catalog/catalog.d.ts.map +1 -1
  7. package/resources/catalog/catalog.js.map +1 -1
  8. package/resources/catalog/catalog.mjs.map +1 -1
  9. package/resources/catalog/index.d.mts +3 -3
  10. package/resources/catalog/index.d.mts.map +1 -1
  11. package/resources/catalog/index.d.ts +3 -3
  12. package/resources/catalog/index.d.ts.map +1 -1
  13. package/resources/catalog/index.js.map +1 -1
  14. package/resources/catalog/index.mjs.map +1 -1
  15. package/resources/catalog/items/actions.d.mts +249 -0
  16. package/resources/catalog/items/actions.d.mts.map +1 -0
  17. package/resources/catalog/items/actions.d.ts +249 -0
  18. package/resources/catalog/items/actions.d.ts.map +1 -0
  19. package/resources/catalog/items/actions.js +46 -0
  20. package/resources/catalog/items/actions.js.map +1 -0
  21. package/resources/catalog/items/actions.mjs +42 -0
  22. package/resources/catalog/items/actions.mjs.map +1 -0
  23. package/resources/catalog/items/index.d.mts +3 -1
  24. package/resources/catalog/items/index.d.mts.map +1 -1
  25. package/resources/catalog/items/index.d.ts +3 -1
  26. package/resources/catalog/items/index.d.ts.map +1 -1
  27. package/resources/catalog/items/index.js +5 -1
  28. package/resources/catalog/items/index.js.map +1 -1
  29. package/resources/catalog/items/index.mjs +2 -0
  30. package/resources/catalog/items/index.mjs.map +1 -1
  31. package/resources/catalog/items/inventory.d.mts +247 -0
  32. package/resources/catalog/items/inventory.d.mts.map +1 -0
  33. package/resources/catalog/items/inventory.d.ts +247 -0
  34. package/resources/catalog/items/inventory.d.ts.map +1 -0
  35. package/resources/catalog/items/inventory.js +75 -0
  36. package/resources/catalog/items/inventory.js.map +1 -0
  37. package/resources/catalog/items/inventory.mjs +71 -0
  38. package/resources/catalog/items/inventory.mjs.map +1 -0
  39. package/resources/catalog/items/items.d.mts +9 -104
  40. package/resources/catalog/items/items.d.mts.map +1 -1
  41. package/resources/catalog/items/items.d.ts +9 -104
  42. package/resources/catalog/items/items.d.ts.map +1 -1
  43. package/resources/catalog/items/items.js +8 -21
  44. package/resources/catalog/items/items.js.map +1 -1
  45. package/resources/catalog/items/items.mjs +8 -21
  46. package/resources/catalog/items/items.mjs.map +1 -1
  47. package/resources/catalog/materials/index.d.mts +1 -1
  48. package/resources/catalog/materials/index.d.mts.map +1 -1
  49. package/resources/catalog/materials/index.d.ts +1 -1
  50. package/resources/catalog/materials/index.d.ts.map +1 -1
  51. package/resources/catalog/materials/index.js.map +1 -1
  52. package/resources/catalog/materials/index.mjs.map +1 -1
  53. package/resources/catalog/materials/materials.d.mts +36 -3
  54. package/resources/catalog/materials/materials.d.mts.map +1 -1
  55. package/resources/catalog/materials/materials.d.ts +36 -3
  56. package/resources/catalog/materials/materials.d.ts.map +1 -1
  57. package/resources/catalog/materials/materials.js.map +1 -1
  58. package/resources/catalog/materials/materials.mjs.map +1 -1
  59. package/resources/catalog/product-lines/index.d.mts +1 -1
  60. package/resources/catalog/product-lines/index.d.mts.map +1 -1
  61. package/resources/catalog/product-lines/index.d.ts +1 -1
  62. package/resources/catalog/product-lines/index.d.ts.map +1 -1
  63. package/resources/catalog/product-lines/index.js.map +1 -1
  64. package/resources/catalog/product-lines/index.mjs.map +1 -1
  65. package/resources/catalog/product-lines/product-lines.d.mts +8 -23
  66. package/resources/catalog/product-lines/product-lines.d.mts.map +1 -1
  67. package/resources/catalog/product-lines/product-lines.d.ts +8 -23
  68. package/resources/catalog/product-lines/product-lines.d.ts.map +1 -1
  69. package/resources/catalog/product-lines/product-lines.js.map +1 -1
  70. package/resources/catalog/product-lines/product-lines.mjs.map +1 -1
  71. package/resources/core/audit-events.d.mts +4 -4
  72. package/resources/core/audit-events.d.mts.map +1 -1
  73. package/resources/core/audit-events.d.ts +4 -4
  74. package/resources/core/audit-events.d.ts.map +1 -1
  75. package/resources/core/core.d.mts +2 -2
  76. package/resources/core/core.d.mts.map +1 -1
  77. package/resources/core/core.d.ts +2 -2
  78. package/resources/core/core.d.ts.map +1 -1
  79. package/resources/core/core.js.map +1 -1
  80. package/resources/core/core.mjs.map +1 -1
  81. package/resources/core/jobs.d.mts +2 -2
  82. package/resources/core/jobs.d.mts.map +1 -1
  83. package/resources/core/jobs.d.ts +2 -2
  84. package/resources/core/jobs.d.ts.map +1 -1
  85. package/resources/messaging/blocks.d.mts +4 -3
  86. package/resources/messaging/blocks.d.mts.map +1 -1
  87. package/resources/messaging/blocks.d.ts +4 -3
  88. package/resources/messaging/blocks.d.ts.map +1 -1
  89. package/resources/messaging/blocks.js.map +1 -1
  90. package/resources/messaging/blocks.mjs.map +1 -1
  91. package/resources/messaging/conversations/conversations.d.mts +3 -3
  92. package/resources/messaging/conversations/conversations.d.mts.map +1 -1
  93. package/resources/messaging/conversations/conversations.d.ts +3 -3
  94. package/resources/messaging/conversations/conversations.d.ts.map +1 -1
  95. package/resources/messaging/conversations/conversations.js.map +1 -1
  96. package/resources/messaging/conversations/conversations.mjs.map +1 -1
  97. package/resources/messaging/conversations/links.d.mts +2 -2
  98. package/resources/messaging/conversations/links.d.mts.map +1 -1
  99. package/resources/messaging/conversations/links.d.ts +2 -2
  100. package/resources/messaging/conversations/links.d.ts.map +1 -1
  101. package/resources/messaging/conversations/messages.d.mts +2 -2
  102. package/resources/messaging/conversations/messages.d.mts.map +1 -1
  103. package/resources/messaging/conversations/messages.d.ts +2 -2
  104. package/resources/messaging/conversations/messages.d.ts.map +1 -1
  105. package/resources/messaging/notifications/notifications.d.mts +2 -2
  106. package/resources/messaging/notifications/notifications.d.mts.map +1 -1
  107. package/resources/messaging/notifications/notifications.d.ts +2 -2
  108. package/resources/messaging/notifications/notifications.d.ts.map +1 -1
  109. package/resources/messaging/notifications/notifications.js.map +1 -1
  110. package/resources/messaging/notifications/notifications.mjs.map +1 -1
  111. package/resources/operations/index.d.mts +1 -1
  112. package/resources/operations/index.d.mts.map +1 -1
  113. package/resources/operations/index.d.ts +1 -1
  114. package/resources/operations/index.d.ts.map +1 -1
  115. package/resources/operations/index.js.map +1 -1
  116. package/resources/operations/index.mjs.map +1 -1
  117. package/resources/operations/machine-downtime-events.d.mts +56 -7
  118. package/resources/operations/machine-downtime-events.d.mts.map +1 -1
  119. package/resources/operations/machine-downtime-events.d.ts +56 -7
  120. package/resources/operations/machine-downtime-events.d.ts.map +1 -1
  121. package/resources/operations/machine-downtime-events.js +11 -7
  122. package/resources/operations/machine-downtime-events.js.map +1 -1
  123. package/resources/operations/machine-downtime-events.mjs +11 -7
  124. package/resources/operations/machine-downtime-events.mjs.map +1 -1
  125. package/resources/operations/operations.d.mts +2 -2
  126. package/resources/operations/operations.d.mts.map +1 -1
  127. package/resources/operations/operations.d.ts +2 -2
  128. package/resources/operations/operations.d.ts.map +1 -1
  129. package/resources/operations/operations.js.map +1 -1
  130. package/resources/operations/operations.mjs.map +1 -1
  131. package/resources/operations/production-schedule-settings/production-schedule-settings.d.mts +13 -12
  132. package/resources/operations/production-schedule-settings/production-schedule-settings.d.mts.map +1 -1
  133. package/resources/operations/production-schedule-settings/production-schedule-settings.d.ts +13 -12
  134. package/resources/operations/production-schedule-settings/production-schedule-settings.d.ts.map +1 -1
  135. package/resources/operations/production-schedule-settings/production-schedule-settings.js.map +1 -1
  136. package/resources/operations/production-schedule-settings/production-schedule-settings.mjs.map +1 -1
  137. package/resources/operations/production-schedules/actions.d.mts +34 -1
  138. package/resources/operations/production-schedules/actions.d.mts.map +1 -1
  139. package/resources/operations/production-schedules/actions.d.ts +34 -1
  140. package/resources/operations/production-schedules/actions.d.ts.map +1 -1
  141. package/resources/operations/production-schedules/actions.js +8 -0
  142. package/resources/operations/production-schedules/actions.js.map +1 -1
  143. package/resources/operations/production-schedules/actions.mjs +8 -0
  144. package/resources/operations/production-schedules/actions.mjs.map +1 -1
  145. package/resources/operations/production-schedules/index.d.mts +1 -1
  146. package/resources/operations/production-schedules/index.d.mts.map +1 -1
  147. package/resources/operations/production-schedules/index.d.ts +1 -1
  148. package/resources/operations/production-schedules/index.d.ts.map +1 -1
  149. package/resources/operations/production-schedules/index.js.map +1 -1
  150. package/resources/operations/production-schedules/index.mjs.map +1 -1
  151. package/resources/operations/production-schedules/production-schedules.d.mts +295 -2
  152. package/resources/operations/production-schedules/production-schedules.d.mts.map +1 -1
  153. package/resources/operations/production-schedules/production-schedules.d.ts +295 -2
  154. package/resources/operations/production-schedules/production-schedules.d.ts.map +1 -1
  155. package/resources/operations/production-schedules/production-schedules.js +42 -0
  156. package/resources/operations/production-schedules/production-schedules.js.map +1 -1
  157. package/resources/operations/production-schedules/production-schedules.mjs +42 -0
  158. package/resources/operations/production-schedules/production-schedules.mjs.map +1 -1
  159. package/resources/operations/shipping-terms.d.mts +9 -9
  160. package/resources/operations/shipping-terms.d.mts.map +1 -1
  161. package/resources/operations/shipping-terms.d.ts +9 -9
  162. package/resources/operations/shipping-terms.d.ts.map +1 -1
  163. package/resources/sales/account-groups.d.mts +2 -1
  164. package/resources/sales/account-groups.d.mts.map +1 -1
  165. package/resources/sales/account-groups.d.ts +2 -1
  166. package/resources/sales/account-groups.d.ts.map +1 -1
  167. package/resources/sales/account-prices/account-prices.d.mts +5 -4
  168. package/resources/sales/account-prices/account-prices.d.mts.map +1 -1
  169. package/resources/sales/account-prices/account-prices.d.ts +5 -4
  170. package/resources/sales/account-prices/account-prices.d.ts.map +1 -1
  171. package/resources/sales/account-prices/account-prices.js.map +1 -1
  172. package/resources/sales/account-prices/account-prices.mjs.map +1 -1
  173. package/resources/sales/account-users/sales-targets.d.mts +2 -2
  174. package/resources/sales/account-users/sales-targets.d.mts.map +1 -1
  175. package/resources/sales/account-users/sales-targets.d.ts +2 -2
  176. package/resources/sales/account-users/sales-targets.d.ts.map +1 -1
  177. package/resources/sales/customers/customers.d.mts +48 -19
  178. package/resources/sales/customers/customers.d.mts.map +1 -1
  179. package/resources/sales/customers/customers.d.ts +48 -19
  180. package/resources/sales/customers/customers.d.ts.map +1 -1
  181. package/resources/sales/customers/customers.js +10 -5
  182. package/resources/sales/customers/customers.js.map +1 -1
  183. package/resources/sales/customers/customers.mjs +10 -5
  184. package/resources/sales/customers/customers.mjs.map +1 -1
  185. package/resources/sales/customers/index.d.mts +1 -1
  186. package/resources/sales/customers/index.d.mts.map +1 -1
  187. package/resources/sales/customers/index.d.ts +1 -1
  188. package/resources/sales/customers/index.d.ts.map +1 -1
  189. package/resources/sales/customers/index.js.map +1 -1
  190. package/resources/sales/customers/index.mjs.map +1 -1
  191. package/resources/sales/index.d.mts +1 -1
  192. package/resources/sales/index.d.mts.map +1 -1
  193. package/resources/sales/index.d.ts +1 -1
  194. package/resources/sales/index.d.ts.map +1 -1
  195. package/resources/sales/index.js.map +1 -1
  196. package/resources/sales/index.mjs.map +1 -1
  197. package/resources/sales/sales-orders/actions.d.mts +14 -2
  198. package/resources/sales/sales-orders/actions.d.mts.map +1 -1
  199. package/resources/sales/sales-orders/actions.d.ts +14 -2
  200. package/resources/sales/sales-orders/actions.d.ts.map +1 -1
  201. package/resources/sales/sales-orders/lines/lines.d.mts +5 -5
  202. package/resources/sales/sales-orders/lines/lines.d.mts.map +1 -1
  203. package/resources/sales/sales-orders/lines/lines.d.ts +5 -5
  204. package/resources/sales/sales-orders/lines/lines.d.ts.map +1 -1
  205. package/resources/sales/sales-orders/sales-orders.d.mts +10 -6
  206. package/resources/sales/sales-orders/sales-orders.d.mts.map +1 -1
  207. package/resources/sales/sales-orders/sales-orders.d.ts +10 -6
  208. package/resources/sales/sales-orders/sales-orders.d.ts.map +1 -1
  209. package/resources/sales/sales-orders/sales-orders.js.map +1 -1
  210. package/resources/sales/sales-orders/sales-orders.mjs.map +1 -1
  211. package/resources/sales/sales.d.mts +2 -2
  212. package/resources/sales/sales.d.mts.map +1 -1
  213. package/resources/sales/sales.d.ts +2 -2
  214. package/resources/sales/sales.d.ts.map +1 -1
  215. package/resources/sales/sales.js.map +1 -1
  216. package/resources/sales/sales.mjs.map +1 -1
  217. package/src/resources/catalog/catalog.ts +2 -8
  218. package/src/resources/catalog/index.ts +1 -4
  219. package/src/resources/catalog/items/actions.ts +296 -0
  220. package/src/resources/catalog/items/index.ts +23 -3
  221. package/src/resources/catalog/items/inventory.ts +294 -0
  222. package/src/resources/catalog/items/items.ts +54 -124
  223. package/src/resources/catalog/materials/index.ts +1 -0
  224. package/src/resources/catalog/materials/materials.ts +41 -2
  225. package/src/resources/catalog/product-lines/index.ts +0 -1
  226. package/src/resources/catalog/product-lines/product-lines.ts +7 -25
  227. package/src/resources/core/audit-events.ts +30 -10
  228. package/src/resources/core/core.ts +15 -5
  229. package/src/resources/core/jobs.ts +8 -3
  230. package/src/resources/messaging/blocks.ts +4 -3
  231. package/src/resources/messaging/conversations/conversations.ts +24 -9
  232. package/src/resources/messaging/conversations/links.ts +16 -6
  233. package/src/resources/messaging/conversations/messages.ts +16 -6
  234. package/src/resources/messaging/notifications/notifications.ts +16 -6
  235. package/src/resources/operations/index.ts +4 -0
  236. package/src/resources/operations/machine-downtime-events.ts +62 -7
  237. package/src/resources/operations/operations.ts +8 -0
  238. package/src/resources/operations/production-schedule-settings/production-schedule-settings.ts +13 -12
  239. package/src/resources/operations/production-schedules/actions.ts +37 -1
  240. package/src/resources/operations/production-schedules/index.ts +4 -0
  241. package/src/resources/operations/production-schedules/production-schedules.ts +354 -1
  242. package/src/resources/operations/shipping-terms.ts +9 -9
  243. package/src/resources/sales/account-groups.ts +2 -1
  244. package/src/resources/sales/account-prices/account-prices.ts +5 -4
  245. package/src/resources/sales/account-users/sales-targets.ts +2 -2
  246. package/src/resources/sales/customers/customers.ts +62 -19
  247. package/src/resources/sales/customers/index.ts +1 -0
  248. package/src/resources/sales/index.ts +1 -0
  249. package/src/resources/sales/sales-orders/actions.ts +15 -1
  250. package/src/resources/sales/sales-orders/lines/lines.ts +5 -5
  251. package/src/resources/sales/sales-orders/sales-orders.ts +11 -5
  252. package/src/resources/sales/sales.ts +2 -0
  253. package/src/version.ts +1 -1
  254. package/version.d.mts +1 -1
  255. package/version.d.ts +1 -1
  256. package/version.js +1 -1
  257. package/version.mjs +1 -1
@@ -2,8 +2,9 @@
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
- import * as ProductLinesAPI from '../../catalog/product-lines/product-lines';
7
+ import * as InventoryAPI from '../../catalog/items/inventory';
7
8
  import * as AccountPricesAPI from '../account-prices/account-prices';
8
9
  import * as ActionsAPI from './actions';
9
10
  import { ActionMergeParams, Actions, MergeCustomersRequest } from './actions';
@@ -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
 
@@ -285,7 +295,7 @@ export interface CreateCustomerRequest {
285
295
  * The unit may be a currency, so money amounts such as a credit limit are written
286
296
  * the same way as physical amounts like weights or counts.
287
297
  */
288
- credit_limit?: ProductLinesAPI.QuantityInput;
298
+ credit_limit?: InventoryAPI.QuantityInput;
289
299
 
290
300
  /**
291
301
  * IDs of the account groups of type `pricing_group` to assign to this customer,
@@ -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
 
@@ -391,9 +402,15 @@ export interface CreateCustomerRequest {
391
402
  */
392
403
  export interface CustomerLeadTime {
393
404
  /**
394
- * 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.
395
412
  */
396
- account_group: CoreAPI.Entity | null;
413
+ account_group: AccountGroupsAPI.AccountGroup | null;
397
414
 
398
415
  /**
399
416
  * Entity is a polymorphic reference to any resource in the system.
@@ -412,10 +429,17 @@ export interface CustomerLeadTime {
412
429
  */
413
430
  object: 'customer_lead_time';
414
431
 
432
+ /**
433
+ * A business you sell to, with its contact details, default fulfillment settings,
434
+ * and order policies.
435
+ */
436
+ parent_customer: AccountPricesAPI.Customer | null;
437
+
415
438
  /**
416
439
  * Which rule in the chain produced this lead time.
417
440
  *
418
441
  * - `customer`: a lead time set on the customer itself.
442
+ * - `parent_customer`: inherited from the customer's parent account.
419
443
  * - `account_group`: inherited from the customer's account group.
420
444
  * - `account`: the account-wide fallback.
421
445
  *
@@ -423,7 +447,14 @@ export interface CustomerLeadTime {
423
447
  * on one specific order, which is a fact about that order rather than about the
424
448
  * customer.
425
449
  */
426
- source: 'customer' | 'account_group' | 'account' | 'manual' | 'order_lead_time' | 'order_ship_by';
450
+ source:
451
+ | 'customer'
452
+ | 'parent_customer'
453
+ | 'account_group'
454
+ | 'account'
455
+ | 'manual'
456
+ | 'order_lead_time'
457
+ | 'order_ship_by';
427
458
  }
428
459
 
429
460
  /**
@@ -466,7 +497,7 @@ export interface UpdateCustomerRequest {
466
497
  * The unit may be a currency, so money amounts such as a credit limit are written
467
498
  * the same way as physical amounts like weights or counts.
468
499
  */
469
- credit_limit?: ProductLinesAPI.QuantityInput | null;
500
+ credit_limit?: InventoryAPI.QuantityInput | null;
470
501
 
471
502
  /**
472
503
  * IDs of the account groups of type `pricing_group` to assign to this customer,
@@ -543,8 +574,9 @@ export interface UpdateCustomerRequest {
543
574
  /**
544
575
  * Calendar days between an order being issued and it being due to ship.
545
576
  *
546
- * Sets each order's `ship_by_date` when it is issued. Leave unset to inherit the
547
- * 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.
548
580
  */
549
581
  lead_time_days?: number | null;
550
582
 
@@ -878,7 +910,7 @@ export interface CustomerCreateParams {
878
910
  * The unit may be a currency, so money amounts such as a credit limit are written
879
911
  * the same way as physical amounts like weights or counts.
880
912
  */
881
- credit_limit?: ProductLinesAPI.QuantityInput;
913
+ credit_limit?: InventoryAPI.QuantityInput;
882
914
 
883
915
  /**
884
916
  * Body param: IDs of the account groups of type `pricing_group` to assign to this
@@ -932,7 +964,8 @@ export interface CustomerCreateParams {
932
964
  * ship.
933
965
  *
934
966
  * Sets each order's `ship_by_date` when it is issued. Leave unset to inherit the
935
- * customer's account group lead time, then the account default.
967
+ * parent account's lead time, then the customer's account group lead time, then
968
+ * the account default.
936
969
  */
937
970
  lead_time_days?: number;
938
971
 
@@ -1046,7 +1079,7 @@ export interface CustomerUpdateParams {
1046
1079
  * The unit may be a currency, so money amounts such as a credit limit are written
1047
1080
  * the same way as physical amounts like weights or counts.
1048
1081
  */
1049
- credit_limit?: ProductLinesAPI.QuantityInput | null;
1082
+ credit_limit?: InventoryAPI.QuantityInput | null;
1050
1083
 
1051
1084
  /**
1052
1085
  * Body param: IDs of the account groups of type `pricing_group` to assign to this
@@ -1125,8 +1158,9 @@ export interface CustomerUpdateParams {
1125
1158
  * Body param: Calendar days between an order being issued and it being due to
1126
1159
  * ship.
1127
1160
  *
1128
- * Sets each order's `ship_by_date` when it is issued. Leave unset to inherit the
1129
- * 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.
1130
1164
  */
1131
1165
  lead_time_days?: number | null;
1132
1166
 
@@ -1185,6 +1219,14 @@ export interface CustomerUpdateParams {
1185
1219
  url?: string | null;
1186
1220
  }
1187
1221
 
1222
+ export interface CustomerRetrieveLeadTimeParams {
1223
+ /**
1224
+ * Sub-objects to expand in the response. When omitted, sub-objects are returned as
1225
+ * `null`.
1226
+ */
1227
+ include?: Array<'account_group' | 'parent_customer'>;
1228
+ }
1229
+
1188
1230
  Customers.Actions = Actions;
1189
1231
 
1190
1232
  export declare namespace Customers {
@@ -1197,6 +1239,7 @@ export declare namespace Customers {
1197
1239
  type CustomerRetrieveParams as CustomerRetrieveParams,
1198
1240
  type CustomerCreateParams as CustomerCreateParams,
1199
1241
  type CustomerUpdateParams as CustomerUpdateParams,
1242
+ type CustomerRetrieveLeadTimeParams as CustomerRetrieveLeadTimeParams,
1200
1243
  };
1201
1244
 
1202
1245
  export {
@@ -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,
@@ -414,6 +414,18 @@ export interface QuoteSalesOrderCommitmentResponse {
414
414
  */
415
415
  calendar_adjustment_days: number;
416
416
 
417
+ /**
418
+ * When freight leaving on the ship-by date would reach the customer: transit
419
+ * walked forward from it and landed on a day their dock receives. Null whenever
420
+ * `transit_days` is, since an arrival with no journey behind it would just be the
421
+ * ship date wearing a different name.
422
+ *
423
+ * Reported for every basis, including the ones that do not use transit to decide
424
+ * the ship-by date. An order committed on a lead time has the same journey ahead
425
+ * of it; it simply was not worked backwards from.
426
+ */
427
+ estimated_delivery_date: string | null;
428
+
417
429
  /**
418
430
  * Calendar days between issue and the ship-by date.
419
431
  */
@@ -424,6 +436,7 @@ export interface QuoteSalesOrderCommitmentResponse {
424
436
  */
425
437
  lead_time_source:
426
438
  | 'customer'
439
+ | 'parent_customer'
427
440
  | 'account_group'
428
441
  | 'account'
429
442
  | 'manual'
@@ -454,7 +467,8 @@ export interface QuoteSalesOrderCommitmentResponse {
454
467
 
455
468
  /**
456
469
  * Days the carrier needs to cover the lane. Null when the lane has never been
457
- * quoted and the service level carries no default.
470
+ * quoted and the service level carries no default, or when no service level was
471
+ * supplied to quote one on.
458
472
  */
459
473
  transit_days: number | null;
460
474
 
@@ -1,8 +1,8 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../../../core/resource';
4
+ import * as InventoryAPI from '../../../catalog/items/inventory';
4
5
  import * as MaterialsAPI from '../../../catalog/materials/materials';
5
- import * as ProductLinesAPI from '../../../catalog/product-lines/product-lines';
6
6
  import * as SalesOrdersAPI from '../sales-orders';
7
7
  import * as ActionsAPI from './actions';
8
8
  import {
@@ -145,7 +145,7 @@ export interface CreateSalesOrderLineRequest {
145
145
  * The unit may be a currency, so money amounts such as a credit limit are written
146
146
  * the same way as physical amounts like weights or counts.
147
147
  */
148
- quantity: ProductLinesAPI.QuantityInput;
148
+ quantity: InventoryAPI.QuantityInput;
149
149
 
150
150
  /**
151
151
  * The product description recorded on the line.
@@ -182,7 +182,7 @@ export interface UpdateSalesOrderLineRequest {
182
182
  * The unit may be a currency, so money amounts such as a credit limit are written
183
183
  * the same way as physical amounts like weights or counts.
184
184
  */
185
- quantity?: ProductLinesAPI.QuantityInput;
185
+ quantity?: InventoryAPI.QuantityInput;
186
186
 
187
187
  /**
188
188
  * A value expressed as a ratio of two units, supplied on create and update
@@ -222,7 +222,7 @@ export interface LineCreateParams {
222
222
  * The unit may be a currency, so money amounts such as a credit limit are written
223
223
  * the same way as physical amounts like weights or counts.
224
224
  */
225
- quantity: ProductLinesAPI.QuantityInput;
225
+ quantity: InventoryAPI.QuantityInput;
226
226
 
227
227
  /**
228
228
  * Query param: Sub-objects to expand in the response. When omitted, sub-objects
@@ -273,7 +273,7 @@ export interface LineUpdateParams {
273
273
  * The unit may be a currency, so money amounts such as a credit limit are written
274
274
  * the same way as physical amounts like weights or counts.
275
275
  */
276
- quantity?: ProductLinesAPI.QuantityInput;
276
+ quantity?: InventoryAPI.QuantityInput;
277
277
 
278
278
  /**
279
279
  * Body param: A value expressed as a ratio of two units, supplied on create and
@@ -3,9 +3,9 @@
3
3
  import { APIResource } from '../../../core/resource';
4
4
  import * as RequestLogsAPI from '../../core/request-logs';
5
5
  import * as APIKeysAPI from '../../auth/api-keys/api-keys';
6
+ import * as InventoryAPI from '../../catalog/items/inventory';
6
7
  import * as ItemsAPI from '../../catalog/items/items';
7
8
  import * as MaterialsAPI from '../../catalog/materials/materials';
8
- import * as ProductLinesAPI from '../../catalog/product-lines/product-lines';
9
9
  import * as ProductsAPI from '../../catalog/products/products';
10
10
  import * as UnitsAPI from '../../catalog/units/units';
11
11
  import * as AccountPricesAPI from '../account-prices/account-prices';
@@ -354,7 +354,7 @@ export interface CreateSalesOrderLineInput {
354
354
  * The unit may be a currency, so money amounts such as a credit limit are written
355
355
  * the same way as physical amounts like weights or counts.
356
356
  */
357
- quantity: ProductLinesAPI.QuantityInput;
357
+ quantity: InventoryAPI.QuantityInput;
358
358
 
359
359
  /**
360
360
  * Description recorded on the line.
@@ -792,7 +792,7 @@ export interface QuoteSalesOrderLineInput {
792
792
  * The unit may be a currency, so money amounts such as a credit limit are written
793
793
  * the same way as physical amounts like weights or counts.
794
794
  */
795
- quantity: ProductLinesAPI.QuantityInput;
795
+ quantity: InventoryAPI.QuantityInput;
796
796
  }
797
797
 
798
798
  /**
@@ -1031,6 +1031,7 @@ export interface SalesOrder {
1031
1031
  */
1032
1032
  lead_time_source:
1033
1033
  | 'customer'
1034
+ | 'parent_customer'
1034
1035
  | 'account_group'
1035
1036
  | 'account'
1036
1037
  | 'manual'
@@ -1131,7 +1132,7 @@ export interface SalesOrder {
1131
1132
  * date less the carrier's transit for the order's lane and less any day the
1132
1133
  * customer cannot receive on — the day the order has to leave to arrive when
1133
1134
  * promised. Otherwise it comes from a lead time, whether this order's own or the
1134
- * one on the customer, its account group, or the account.
1135
+ * one on the customer, its parent account, its account group, or the account.
1135
1136
  *
1136
1137
  * Always a day the plant actually ships on, whichever rule produced it.
1137
1138
  *
@@ -1229,6 +1230,11 @@ export interface SalesOrderLine {
1229
1230
  */
1230
1231
  created_at: string;
1231
1232
 
1233
+ /**
1234
+ * An entry in your catalog: something you sell, consume, or build with.
1235
+ */
1236
+ item: ItemsAPI.Item | null;
1237
+
1232
1238
  /**
1233
1239
  * Position of the line on the order.
1234
1240
  *
@@ -1275,7 +1281,7 @@ export interface SalesOrderLine {
1275
1281
  * resources point at them to report stock levels, ordered and packed amounts,
1276
1282
  * money, weights, and durations.
1277
1283
  */
1278
- quantity_ordered: ItemsAPI.Quantity | null;
1284
+ quantity_ordered: MaterialsAPI.Quantity | null;
1279
1285
 
1280
1286
  /**
1281
1287
  * Derived monetary totals for a sales order or one of its lines.
@@ -87,6 +87,7 @@ import {
87
87
  CustomerDeleteResponse,
88
88
  CustomerLeadTime,
89
89
  CustomerListParams,
90
+ CustomerRetrieveLeadTimeParams,
90
91
  CustomerRetrieveParams,
91
92
  CustomerUpdateParams,
92
93
  Customers,
@@ -244,6 +245,7 @@ export declare namespace Sales {
244
245
  type CustomerRetrieveParams as CustomerRetrieveParams,
245
246
  type CustomerCreateParams as CustomerCreateParams,
246
247
  type CustomerUpdateParams as CustomerUpdateParams,
248
+ type CustomerRetrieveLeadTimeParams as CustomerRetrieveLeadTimeParams,
247
249
  };
248
250
 
249
251
  export { Contacts as Contacts };
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.18.1'; // x-release-please-version
1
+ export const VERSION = '0.19.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.18.1";
1
+ export declare const VERSION = "0.19.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.18.1";
1
+ export declare const VERSION = "0.19.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.18.1'; // x-release-please-version
4
+ exports.VERSION = '0.19.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.18.1'; // x-release-please-version
1
+ export const VERSION = '0.19.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map