@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.
- package/CHANGELOG.md +2 -7
- package/package.json +1 -1
- package/resources/ai/memories.d.mts +6 -6
- package/resources/ai/memories.d.mts.map +1 -1
- package/resources/ai/memories.d.ts +6 -6
- package/resources/ai/memories.d.ts.map +1 -1
- package/resources/auth/api-keys/api-keys.d.mts +8 -0
- package/resources/auth/api-keys/api-keys.d.mts.map +1 -1
- package/resources/auth/api-keys/api-keys.d.ts +8 -0
- package/resources/auth/api-keys/api-keys.d.ts.map +1 -1
- package/resources/auth/api-keys/api-keys.js.map +1 -1
- package/resources/auth/api-keys/api-keys.mjs.map +1 -1
- package/resources/catalog/items/attributes.d.mts +3 -0
- package/resources/catalog/items/attributes.d.mts.map +1 -1
- package/resources/catalog/items/attributes.d.ts +3 -0
- package/resources/catalog/items/attributes.d.ts.map +1 -1
- package/resources/catalog/items/attributes.js +3 -0
- package/resources/catalog/items/attributes.js.map +1 -1
- package/resources/catalog/items/attributes.mjs +3 -0
- package/resources/catalog/items/attributes.mjs.map +1 -1
- package/resources/catalog/materials/materials.d.mts +6 -0
- package/resources/catalog/materials/materials.d.mts.map +1 -1
- package/resources/catalog/materials/materials.d.ts +6 -0
- package/resources/catalog/materials/materials.d.ts.map +1 -1
- package/resources/catalog/materials/materials.js.map +1 -1
- package/resources/catalog/materials/materials.mjs.map +1 -1
- package/resources/catalog/parts/parts.d.mts +6 -0
- package/resources/catalog/parts/parts.d.mts.map +1 -1
- package/resources/catalog/parts/parts.d.ts +6 -0
- package/resources/catalog/parts/parts.d.ts.map +1 -1
- package/resources/catalog/parts/parts.js.map +1 -1
- package/resources/catalog/parts/parts.mjs.map +1 -1
- package/resources/catalog/products/products.d.mts +6 -4
- package/resources/catalog/products/products.d.mts.map +1 -1
- package/resources/catalog/products/products.d.ts +6 -4
- package/resources/catalog/products/products.d.ts.map +1 -1
- package/resources/catalog/products/products.js.map +1 -1
- package/resources/catalog/products/products.mjs.map +1 -1
- package/resources/core/actions.d.mts +73 -0
- package/resources/core/actions.d.mts.map +1 -0
- package/resources/core/actions.d.ts +73 -0
- package/resources/core/actions.d.ts.map +1 -0
- package/resources/core/actions.js +36 -0
- package/resources/core/actions.js.map +1 -0
- package/resources/core/actions.mjs +32 -0
- package/resources/core/actions.mjs.map +1 -0
- package/resources/core/audit-events.d.mts +4 -4
- package/resources/core/audit-events.d.mts.map +1 -1
- package/resources/core/audit-events.d.ts +4 -4
- package/resources/core/audit-events.d.ts.map +1 -1
- package/resources/core/core.d.mts +6 -2
- package/resources/core/core.d.mts.map +1 -1
- package/resources/core/core.d.ts +6 -2
- package/resources/core/core.d.ts.map +1 -1
- package/resources/core/core.js +4 -0
- package/resources/core/core.js.map +1 -1
- package/resources/core/core.mjs +4 -0
- package/resources/core/core.mjs.map +1 -1
- package/resources/core/index.d.mts +1 -0
- package/resources/core/index.d.mts.map +1 -1
- package/resources/core/index.d.ts +1 -0
- package/resources/core/index.d.ts.map +1 -1
- package/resources/core/index.js +3 -1
- package/resources/core/index.js.map +1 -1
- package/resources/core/index.mjs +1 -0
- package/resources/core/index.mjs.map +1 -1
- package/resources/core/jobs.d.mts +1 -1
- package/resources/core/jobs.d.mts.map +1 -1
- package/resources/core/jobs.d.ts +1 -1
- package/resources/core/jobs.d.ts.map +1 -1
- package/resources/messaging/conversations/conversations.d.mts +3 -3
- package/resources/messaging/conversations/conversations.d.mts.map +1 -1
- package/resources/messaging/conversations/conversations.d.ts +3 -3
- package/resources/messaging/conversations/conversations.d.ts.map +1 -1
- package/resources/messaging/conversations/conversations.js.map +1 -1
- package/resources/messaging/conversations/conversations.mjs.map +1 -1
- package/resources/messaging/conversations/links.d.mts +2 -2
- package/resources/messaging/conversations/links.d.mts.map +1 -1
- package/resources/messaging/conversations/links.d.ts +2 -2
- package/resources/messaging/conversations/links.d.ts.map +1 -1
- package/resources/messaging/conversations/messages.d.mts +2 -2
- package/resources/messaging/conversations/messages.d.mts.map +1 -1
- package/resources/messaging/conversations/messages.d.ts +2 -2
- package/resources/messaging/conversations/messages.d.ts.map +1 -1
- package/resources/messaging/notifications/notifications.d.mts +2 -2
- package/resources/messaging/notifications/notifications.d.mts.map +1 -1
- package/resources/messaging/notifications/notifications.d.ts +2 -2
- package/resources/messaging/notifications/notifications.d.ts.map +1 -1
- package/resources/messaging/notifications/notifications.js.map +1 -1
- package/resources/messaging/notifications/notifications.mjs.map +1 -1
- package/resources/operations/index.d.mts +2 -1
- package/resources/operations/index.d.mts.map +1 -1
- package/resources/operations/index.d.ts +2 -1
- package/resources/operations/index.d.ts.map +1 -1
- package/resources/operations/index.js +9 -7
- package/resources/operations/index.js.map +1 -1
- package/resources/operations/index.mjs +1 -0
- package/resources/operations/index.mjs.map +1 -1
- package/resources/operations/machine-downtime-events.d.mts +56 -7
- package/resources/operations/machine-downtime-events.d.mts.map +1 -1
- package/resources/operations/machine-downtime-events.d.ts +56 -7
- package/resources/operations/machine-downtime-events.d.ts.map +1 -1
- package/resources/operations/machine-downtime-events.js +11 -7
- package/resources/operations/machine-downtime-events.js.map +1 -1
- package/resources/operations/machine-downtime-events.mjs +11 -7
- package/resources/operations/machine-downtime-events.mjs.map +1 -1
- package/resources/operations/operating-calendars/closures.d.mts +173 -0
- package/resources/operations/operating-calendars/closures.d.mts.map +1 -0
- package/resources/operations/operating-calendars/closures.d.ts +173 -0
- package/resources/operations/operating-calendars/closures.d.ts.map +1 -0
- package/resources/operations/operating-calendars/closures.js +81 -0
- package/resources/operations/operating-calendars/closures.js.map +1 -0
- package/resources/operations/operating-calendars/closures.mjs +77 -0
- package/resources/operations/operating-calendars/closures.mjs.map +1 -0
- package/resources/operations/operating-calendars/index.d.mts +3 -0
- package/resources/operations/operating-calendars/index.d.mts.map +1 -0
- package/resources/operations/operating-calendars/index.d.ts +3 -0
- package/resources/operations/operating-calendars/index.d.ts.map +1 -0
- package/resources/operations/operating-calendars/index.js +9 -0
- package/resources/operations/operating-calendars/index.js.map +1 -0
- package/resources/operations/operating-calendars/index.mjs +4 -0
- package/resources/operations/operating-calendars/index.mjs.map +1 -0
- package/resources/operations/operating-calendars/operating-calendars.d.mts +332 -0
- package/resources/operations/operating-calendars/operating-calendars.d.mts.map +1 -0
- package/resources/operations/operating-calendars/operating-calendars.d.ts +332 -0
- package/resources/operations/operating-calendars/operating-calendars.d.ts.map +1 -0
- package/resources/operations/operating-calendars/operating-calendars.js +129 -0
- package/resources/operations/operating-calendars/operating-calendars.js.map +1 -0
- package/resources/operations/operating-calendars/operating-calendars.mjs +124 -0
- package/resources/operations/operating-calendars/operating-calendars.mjs.map +1 -0
- package/resources/operations/operating-calendars.d.mts +2 -0
- package/resources/operations/operating-calendars.d.mts.map +1 -0
- package/resources/operations/operating-calendars.d.ts +2 -0
- package/resources/operations/operating-calendars.d.ts.map +1 -0
- package/resources/operations/operating-calendars.js +6 -0
- package/resources/operations/operating-calendars.js.map +1 -0
- package/resources/operations/operating-calendars.mjs +3 -0
- package/resources/operations/operating-calendars.mjs.map +1 -0
- package/resources/operations/operations.d.mts +6 -2
- package/resources/operations/operations.d.mts.map +1 -1
- package/resources/operations/operations.d.ts +6 -2
- package/resources/operations/operations.d.ts.map +1 -1
- package/resources/operations/operations.js +4 -0
- package/resources/operations/operations.js.map +1 -1
- package/resources/operations/operations.mjs +4 -0
- package/resources/operations/operations.mjs.map +1 -1
- package/resources/operations/production-schedule-settings/production-schedule-settings.d.mts +43 -12
- package/resources/operations/production-schedule-settings/production-schedule-settings.d.mts.map +1 -1
- package/resources/operations/production-schedule-settings/production-schedule-settings.d.ts +43 -12
- package/resources/operations/production-schedule-settings/production-schedule-settings.d.ts.map +1 -1
- package/resources/operations/production-schedule-settings/production-schedule-settings.js.map +1 -1
- package/resources/operations/production-schedule-settings/production-schedule-settings.mjs.map +1 -1
- package/resources/operations/production-schedules/actions.d.mts +34 -1
- package/resources/operations/production-schedules/actions.d.mts.map +1 -1
- package/resources/operations/production-schedules/actions.d.ts +34 -1
- package/resources/operations/production-schedules/actions.d.ts.map +1 -1
- package/resources/operations/production-schedules/actions.js +8 -0
- package/resources/operations/production-schedules/actions.js.map +1 -1
- package/resources/operations/production-schedules/actions.mjs +8 -0
- package/resources/operations/production-schedules/actions.mjs.map +1 -1
- package/resources/operations/production-schedules/index.d.mts +1 -1
- package/resources/operations/production-schedules/index.d.mts.map +1 -1
- package/resources/operations/production-schedules/index.d.ts +1 -1
- package/resources/operations/production-schedules/index.d.ts.map +1 -1
- package/resources/operations/production-schedules/index.js.map +1 -1
- package/resources/operations/production-schedules/index.mjs.map +1 -1
- package/resources/operations/production-schedules/lines.d.mts +10 -6
- package/resources/operations/production-schedules/lines.d.mts.map +1 -1
- package/resources/operations/production-schedules/lines.d.ts +10 -6
- package/resources/operations/production-schedules/lines.d.ts.map +1 -1
- package/resources/operations/production-schedules/production-schedules.d.mts +295 -2
- package/resources/operations/production-schedules/production-schedules.d.mts.map +1 -1
- package/resources/operations/production-schedules/production-schedules.d.ts +295 -2
- package/resources/operations/production-schedules/production-schedules.d.ts.map +1 -1
- package/resources/operations/production-schedules/production-schedules.js +42 -0
- package/resources/operations/production-schedules/production-schedules.js.map +1 -1
- package/resources/operations/production-schedules/production-schedules.mjs +42 -0
- package/resources/operations/production-schedules/production-schedules.mjs.map +1 -1
- package/resources/sales/account-groups.d.mts +2 -1
- package/resources/sales/account-groups.d.mts.map +1 -1
- package/resources/sales/account-groups.d.ts +2 -1
- package/resources/sales/account-groups.d.ts.map +1 -1
- package/resources/sales/account-prices/account-prices.d.mts +10 -1
- package/resources/sales/account-prices/account-prices.d.mts.map +1 -1
- package/resources/sales/account-prices/account-prices.d.ts +10 -1
- package/resources/sales/account-prices/account-prices.d.ts.map +1 -1
- package/resources/sales/account-prices/account-prices.js.map +1 -1
- package/resources/sales/account-prices/account-prices.mjs.map +1 -1
- package/resources/sales/addresses.d.mts +20 -0
- package/resources/sales/addresses.d.mts.map +1 -1
- package/resources/sales/addresses.d.ts +20 -0
- package/resources/sales/addresses.d.ts.map +1 -1
- package/resources/sales/customers/customers.d.mts +72 -14
- package/resources/sales/customers/customers.d.mts.map +1 -1
- package/resources/sales/customers/customers.d.ts +72 -14
- package/resources/sales/customers/customers.d.ts.map +1 -1
- package/resources/sales/customers/customers.js +10 -5
- package/resources/sales/customers/customers.js.map +1 -1
- package/resources/sales/customers/customers.mjs +10 -5
- package/resources/sales/customers/customers.mjs.map +1 -1
- package/resources/sales/customers/index.d.mts +1 -1
- package/resources/sales/customers/index.d.mts.map +1 -1
- package/resources/sales/customers/index.d.ts +1 -1
- package/resources/sales/customers/index.d.ts.map +1 -1
- package/resources/sales/customers/index.js.map +1 -1
- package/resources/sales/customers/index.mjs.map +1 -1
- package/resources/sales/index.d.mts +1 -1
- package/resources/sales/index.d.mts.map +1 -1
- package/resources/sales/index.d.ts +1 -1
- package/resources/sales/index.d.ts.map +1 -1
- package/resources/sales/index.js.map +1 -1
- package/resources/sales/index.mjs.map +1 -1
- package/resources/sales/sales-orders/actions.d.mts +217 -1
- package/resources/sales/sales-orders/actions.d.mts.map +1 -1
- package/resources/sales/sales-orders/actions.d.ts +217 -1
- package/resources/sales/sales-orders/actions.d.ts.map +1 -1
- package/resources/sales/sales-orders/actions.js +36 -0
- package/resources/sales/sales-orders/actions.js.map +1 -1
- package/resources/sales/sales-orders/actions.mjs +36 -0
- package/resources/sales/sales-orders/actions.mjs.map +1 -1
- package/resources/sales/sales-orders/index.d.mts +1 -1
- package/resources/sales/sales-orders/index.d.mts.map +1 -1
- package/resources/sales/sales-orders/index.d.ts +1 -1
- package/resources/sales/sales-orders/index.d.ts.map +1 -1
- package/resources/sales/sales-orders/index.js.map +1 -1
- package/resources/sales/sales-orders/index.mjs.map +1 -1
- package/resources/sales/sales-orders/sales-orders.d.mts +105 -9
- package/resources/sales/sales-orders/sales-orders.d.mts.map +1 -1
- package/resources/sales/sales-orders/sales-orders.d.ts +105 -9
- package/resources/sales/sales-orders/sales-orders.d.ts.map +1 -1
- package/resources/sales/sales-orders/sales-orders.js.map +1 -1
- package/resources/sales/sales-orders/sales-orders.mjs.map +1 -1
- package/resources/sales/sales.d.mts +2 -2
- package/resources/sales/sales.d.mts.map +1 -1
- package/resources/sales/sales.d.ts +2 -2
- package/resources/sales/sales.d.ts.map +1 -1
- package/resources/sales/sales.js.map +1 -1
- package/resources/sales/sales.mjs.map +1 -1
- package/src/resources/ai/memories.ts +6 -6
- package/src/resources/auth/api-keys/api-keys.ts +9 -0
- package/src/resources/catalog/items/attributes.ts +3 -0
- package/src/resources/catalog/materials/materials.ts +6 -0
- package/src/resources/catalog/parts/parts.ts +6 -0
- package/src/resources/catalog/products/products.ts +6 -4
- package/src/resources/core/actions.ts +89 -0
- package/src/resources/core/audit-events.ts +16 -0
- package/src/resources/core/core.ts +19 -0
- package/src/resources/core/index.ts +6 -0
- package/src/resources/core/jobs.ts +4 -0
- package/src/resources/messaging/conversations/conversations.ts +12 -0
- package/src/resources/messaging/conversations/links.ts +8 -0
- package/src/resources/messaging/conversations/messages.ts +8 -0
- package/src/resources/messaging/notifications/notifications.ts +8 -0
- package/src/resources/operations/index.ts +15 -0
- package/src/resources/operations/machine-downtime-events.ts +62 -7
- package/src/resources/operations/operating-calendars/closures.ts +223 -0
- package/src/resources/operations/operating-calendars/index.ts +23 -0
- package/src/resources/operations/operating-calendars/operating-calendars.ts +427 -0
- package/src/resources/operations/operating-calendars.ts +3 -0
- package/src/resources/operations/operations.ts +36 -0
- package/src/resources/operations/production-schedule-settings/production-schedule-settings.ts +49 -12
- package/src/resources/operations/production-schedules/actions.ts +37 -1
- package/src/resources/operations/production-schedules/index.ts +4 -0
- package/src/resources/operations/production-schedules/lines.ts +10 -6
- package/src/resources/operations/production-schedules/production-schedules.ts +354 -1
- package/src/resources/sales/account-groups.ts +2 -1
- package/src/resources/sales/account-prices/account-prices.ts +11 -1
- package/src/resources/sales/addresses.ts +24 -0
- package/src/resources/sales/customers/customers.ts +90 -14
- package/src/resources/sales/customers/index.ts +1 -0
- package/src/resources/sales/index.ts +1 -0
- package/src/resources/sales/sales-orders/actions.ts +266 -0
- package/src/resources/sales/sales-orders/index.ts +4 -0
- package/src/resources/sales/sales-orders/sales-orders.ts +131 -7
- package/src/resources/sales/sales.ts +2 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- 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
|
|
185
|
-
* group, then the account-wide default. `source`
|
|
186
|
-
* form can show where the number came from rather
|
|
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(
|
|
204
|
-
|
|
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
|
|
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
|
-
*
|
|
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:
|
|
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:
|
|
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.
|
|
538
|
-
* customer's account group lead time, then
|
|
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
|
|
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.
|
|
1103
|
-
* customer's account group lead time, then
|
|
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 {
|
|
@@ -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 {
|