@openmrp/sdk 0.21.0 → 0.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -3
- package/README.md +1 -1
- package/client.js +1 -1
- package/client.mjs +1 -1
- package/package.json +1 -1
- package/resources/auth/api-keys/api-keys.d.mts +4 -4
- package/resources/auth/api-keys/api-keys.d.ts +4 -4
- 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 +2 -2
- package/resources/core/core.d.mts.map +1 -1
- package/resources/core/core.d.ts +2 -2
- package/resources/core/core.d.ts.map +1 -1
- package/resources/core/core.js.map +1 -1
- package/resources/core/core.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 -0
- package/resources/operations/index.d.mts.map +1 -1
- package/resources/operations/index.d.ts +2 -0
- package/resources/operations/index.d.ts.map +1 -1
- package/resources/operations/index.js +15 -11
- package/resources/operations/index.js.map +1 -1
- package/resources/operations/index.mjs +2 -0
- package/resources/operations/index.mjs.map +1 -1
- package/resources/operations/inventory-change-logs/actions.d.mts +60 -0
- package/resources/operations/inventory-change-logs/actions.d.mts.map +1 -0
- package/resources/operations/inventory-change-logs/actions.d.ts +60 -0
- package/resources/operations/inventory-change-logs/actions.d.ts.map +1 -0
- package/resources/operations/inventory-change-logs/actions.js +30 -0
- package/resources/operations/inventory-change-logs/actions.js.map +1 -0
- package/resources/operations/inventory-change-logs/actions.mjs +26 -0
- package/resources/operations/inventory-change-logs/actions.mjs.map +1 -0
- package/resources/operations/inventory-change-logs/index.d.mts +3 -0
- package/resources/operations/inventory-change-logs/index.d.mts.map +1 -0
- package/resources/operations/inventory-change-logs/index.d.ts +3 -0
- package/resources/operations/inventory-change-logs/index.d.ts.map +1 -0
- package/resources/operations/inventory-change-logs/index.js +9 -0
- package/resources/operations/inventory-change-logs/index.js.map +1 -0
- package/resources/operations/inventory-change-logs/index.mjs +4 -0
- package/resources/operations/inventory-change-logs/index.mjs.map +1 -0
- package/resources/operations/inventory-change-logs/inventory-change-logs.d.mts +181 -0
- package/resources/operations/inventory-change-logs/inventory-change-logs.d.mts.map +1 -0
- package/resources/operations/inventory-change-logs/inventory-change-logs.d.ts +181 -0
- package/resources/operations/inventory-change-logs/inventory-change-logs.d.ts.map +1 -0
- package/resources/operations/inventory-change-logs/inventory-change-logs.js +54 -0
- package/resources/operations/inventory-change-logs/inventory-change-logs.js.map +1 -0
- package/resources/operations/inventory-change-logs/inventory-change-logs.mjs +49 -0
- package/resources/operations/inventory-change-logs/inventory-change-logs.mjs.map +1 -0
- package/resources/operations/inventory-change-logs.d.mts +2 -0
- package/resources/operations/inventory-change-logs.d.mts.map +1 -0
- package/resources/operations/inventory-change-logs.d.ts +2 -0
- package/resources/operations/inventory-change-logs.d.ts.map +1 -0
- package/resources/operations/inventory-change-logs.js +6 -0
- package/resources/operations/inventory-change-logs.js.map +1 -0
- package/resources/operations/inventory-change-logs.mjs +3 -0
- package/resources/operations/inventory-change-logs.mjs.map +1 -0
- package/resources/operations/operations.d.mts +8 -0
- package/resources/operations/operations.d.mts.map +1 -1
- package/resources/operations/operations.d.ts +8 -0
- package/resources/operations/operations.d.ts.map +1 -1
- package/resources/operations/operations.js +8 -0
- package/resources/operations/operations.js.map +1 -1
- package/resources/operations/operations.mjs +8 -0
- package/resources/operations/operations.mjs.map +1 -1
- package/resources/operations/picks/actions.d.mts +111 -0
- package/resources/operations/picks/actions.d.mts.map +1 -0
- package/resources/operations/picks/actions.d.ts +111 -0
- package/resources/operations/picks/actions.d.ts.map +1 -0
- package/resources/operations/picks/actions.js +93 -0
- package/resources/operations/picks/actions.js.map +1 -0
- package/resources/operations/picks/actions.mjs +89 -0
- package/resources/operations/picks/actions.mjs.map +1 -0
- package/resources/operations/picks/index.d.mts +4 -0
- package/resources/operations/picks/index.d.mts.map +1 -0
- package/resources/operations/picks/index.d.ts +4 -0
- package/resources/operations/picks/index.d.ts.map +1 -0
- package/resources/operations/picks/index.js +11 -0
- package/resources/operations/picks/index.js.map +1 -0
- package/resources/operations/picks/index.mjs +5 -0
- package/resources/operations/picks/index.mjs.map +1 -0
- package/resources/operations/picks/lines/actions.d.mts +65 -0
- package/resources/operations/picks/lines/actions.d.mts.map +1 -0
- package/resources/operations/picks/lines/actions.d.ts +65 -0
- package/resources/operations/picks/lines/actions.d.ts.map +1 -0
- package/resources/operations/picks/lines/actions.js +59 -0
- package/resources/operations/picks/lines/actions.js.map +1 -0
- package/resources/operations/picks/lines/actions.mjs +55 -0
- package/resources/operations/picks/lines/actions.mjs.map +1 -0
- package/resources/operations/picks/lines/index.d.mts +3 -0
- package/resources/operations/picks/lines/index.d.mts.map +1 -0
- package/resources/operations/picks/lines/index.d.ts +3 -0
- package/resources/operations/picks/lines/index.d.ts.map +1 -0
- package/resources/operations/picks/lines/index.js +9 -0
- package/resources/operations/picks/lines/index.js.map +1 -0
- package/resources/operations/picks/lines/index.mjs +4 -0
- package/resources/operations/picks/lines/index.mjs.map +1 -0
- package/resources/operations/picks/lines/lines.d.mts +70 -0
- package/resources/operations/picks/lines/lines.d.mts.map +1 -0
- package/resources/operations/picks/lines/lines.d.ts +70 -0
- package/resources/operations/picks/lines/lines.d.ts.map +1 -0
- package/resources/operations/picks/lines/lines.js +48 -0
- package/resources/operations/picks/lines/lines.js.map +1 -0
- package/resources/operations/picks/lines/lines.mjs +43 -0
- package/resources/operations/picks/lines/lines.mjs.map +1 -0
- package/resources/operations/picks/lines.d.mts +2 -0
- package/resources/operations/picks/lines.d.mts.map +1 -0
- package/resources/operations/picks/lines.d.ts +2 -0
- package/resources/operations/picks/lines.d.ts.map +1 -0
- package/resources/operations/picks/lines.js +6 -0
- package/resources/operations/picks/lines.js.map +1 -0
- package/resources/operations/picks/lines.mjs +3 -0
- package/resources/operations/picks/lines.mjs.map +1 -0
- package/resources/operations/picks/picks.d.mts +383 -0
- package/resources/operations/picks/picks.d.mts.map +1 -0
- package/resources/operations/picks/picks.d.ts +383 -0
- package/resources/operations/picks/picks.d.ts.map +1 -0
- package/resources/operations/picks/picks.js +57 -0
- package/resources/operations/picks/picks.js.map +1 -0
- package/resources/operations/picks/picks.mjs +52 -0
- package/resources/operations/picks/picks.mjs.map +1 -0
- package/resources/operations/picks.d.mts +2 -0
- package/resources/operations/picks.d.mts.map +1 -0
- package/resources/operations/picks.d.ts +2 -0
- package/resources/operations/picks.d.ts.map +1 -0
- package/resources/operations/picks.js +6 -0
- package/resources/operations/picks.js.map +1 -0
- package/resources/operations/picks.mjs +3 -0
- package/resources/operations/picks.mjs.map +1 -0
- 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 +20 -46
- package/resources/sales/sales-orders/actions.d.mts.map +1 -1
- package/resources/sales/sales-orders/actions.d.ts +20 -46
- package/resources/sales/sales-orders/actions.d.ts.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 -63
- package/resources/sales/sales-orders/sales-orders.d.mts.map +1 -1
- package/resources/sales/sales-orders/sales-orders.d.ts +105 -63
- 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/client.ts +1 -1
- package/src/resources/auth/api-keys/api-keys.ts +4 -4
- package/src/resources/core/audit-events.ts +16 -4
- package/src/resources/core/core.ts +8 -2
- package/src/resources/core/jobs.ts +4 -1
- package/src/resources/messaging/conversations/conversations.ts +12 -3
- package/src/resources/messaging/conversations/links.ts +8 -2
- package/src/resources/messaging/conversations/messages.ts +8 -2
- package/src/resources/messaging/notifications/notifications.ts +8 -2
- package/src/resources/operations/index.ts +19 -0
- package/src/resources/operations/inventory-change-logs/actions.ts +73 -0
- package/src/resources/operations/inventory-change-logs/index.ts +10 -0
- package/src/resources/operations/inventory-change-logs/inventory-change-logs.ts +231 -0
- package/src/resources/operations/inventory-change-logs.ts +3 -0
- package/src/resources/operations/operations.ts +47 -0
- package/src/resources/operations/picks/actions.ts +131 -0
- package/src/resources/operations/picks/index.ts +16 -0
- package/src/resources/operations/picks/lines/actions.ts +78 -0
- package/src/resources/operations/picks/lines/index.ts +4 -0
- package/src/resources/operations/picks/lines/lines.ts +100 -0
- package/src/resources/operations/picks/lines.ts +3 -0
- package/src/resources/operations/picks/picks.ts +502 -0
- package/src/resources/operations/picks.ts +3 -0
- package/src/resources/sales/index.ts +1 -0
- package/src/resources/sales/sales-orders/actions.ts +20 -61
- package/src/resources/sales/sales-orders/index.ts +1 -0
- package/src/resources/sales/sales-orders/sales-orders.ts +124 -79
- 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
|
@@ -0,0 +1,502 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import * as APIKeysAPI from '../../auth/api-keys/api-keys';
|
|
5
|
+
import * as ItemsAPI from '../../catalog/items/items';
|
|
6
|
+
import * as MaterialsAPI from '../../catalog/materials/materials';
|
|
7
|
+
import * as ActionsAPI from './actions';
|
|
8
|
+
import { ActionPackParams, Actions, PackPickRequest } from './actions';
|
|
9
|
+
import * as AccountPricesAPI from '../../sales/account-prices/account-prices';
|
|
10
|
+
import * as SalesOrdersAPI from '../../sales/sales-orders/sales-orders';
|
|
11
|
+
import * as LinesAPI from './lines/lines';
|
|
12
|
+
import { LineUpdateParams, Lines, UpdatePickLineRequest } from './lines/lines';
|
|
13
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
14
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
15
|
+
import { path } from '../../../internal/utils/path';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* List, view, pick, void, and pack picks and pick lines.
|
|
19
|
+
*/
|
|
20
|
+
export class Picks extends APIResource {
|
|
21
|
+
actions: ActionsAPI.Actions = new ActionsAPI.Actions(this._client);
|
|
22
|
+
lines: LinesAPI.Lines = new LinesAPI.Lines(this._client);
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Returns a paginated list of picks, soonest ship-by date first.
|
|
26
|
+
*
|
|
27
|
+
* The `q` search term matches the pick number, the sales order number, the
|
|
28
|
+
* customer PO number, and the customer's name or number.
|
|
29
|
+
*
|
|
30
|
+
* This endpoint requires the permissions: `picks:read`, `customers:read`,
|
|
31
|
+
* `suppliers:read`.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const listPick = await client.operations.picks.list();
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
list(query: PickListParams | null | undefined = {}, options?: RequestOptions): APIPromise<ListPick> {
|
|
39
|
+
return this._client.get('/v1/operations/picks', { query, ...options });
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Returns a pick by ID.
|
|
44
|
+
*
|
|
45
|
+
* This endpoint requires the permission: `picks:read`.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* const pick = await client.operations.picks.retrieve(
|
|
50
|
+
* 'pk_6eilj488bq8d',
|
|
51
|
+
* );
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
retrieve(
|
|
55
|
+
id: string,
|
|
56
|
+
query: PickRetrieveParams | null | undefined = {},
|
|
57
|
+
options?: RequestOptions,
|
|
58
|
+
): APIPromise<Pick> {
|
|
59
|
+
return this._client.get(path`/v1/operations/picks/${id}`, { query, ...options });
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* A single page of resources, together with the metadata needed to page through
|
|
65
|
+
* the rest of the result set.
|
|
66
|
+
*/
|
|
67
|
+
export interface ListPick {
|
|
68
|
+
/**
|
|
69
|
+
* Resources in this page.
|
|
70
|
+
*/
|
|
71
|
+
data: Array<Pick>;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Resource type identifier.
|
|
75
|
+
*/
|
|
76
|
+
object: 'list';
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* PageInfo describes where the current page sits within a paginated result set and
|
|
80
|
+
* how to move to the adjacent pages.
|
|
81
|
+
*
|
|
82
|
+
* Page a list by following the URLs below rather than assembling cursors yourself.
|
|
83
|
+
* For a top-level list endpoint the URL repeats the original request's query
|
|
84
|
+
* string with only the cursor swapped, so following it preserves the same filters,
|
|
85
|
+
* search term, and page size.
|
|
86
|
+
*/
|
|
87
|
+
page_info: APIKeysAPI.PageInfo;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* A single page of resources, together with the metadata needed to page through
|
|
92
|
+
* the rest of the result set.
|
|
93
|
+
*/
|
|
94
|
+
export interface ListPickLine {
|
|
95
|
+
/**
|
|
96
|
+
* Resources in this page.
|
|
97
|
+
*/
|
|
98
|
+
data: Array<PickLine>;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Resource type identifier.
|
|
102
|
+
*/
|
|
103
|
+
object: 'list';
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* PageInfo describes where the current page sits within a paginated result set and
|
|
107
|
+
* how to move to the adjacent pages.
|
|
108
|
+
*
|
|
109
|
+
* Page a list by following the URLs below rather than assembling cursors yourself.
|
|
110
|
+
* For a top-level list endpoint the URL repeats the original request's query
|
|
111
|
+
* string with only the cursor swapped, so following it preserves the same filters,
|
|
112
|
+
* search term, and page size.
|
|
113
|
+
*/
|
|
114
|
+
page_info: APIKeysAPI.PageInfo;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* A warehouse picking task for a sales order, tracking the quantities to pull from
|
|
119
|
+
* inventory and pack for shipment.
|
|
120
|
+
*
|
|
121
|
+
* A pick is created automatically when a sales order is issued, with one line for
|
|
122
|
+
* each order line whose product is of type `sale` service, shipping, tax, credit
|
|
123
|
+
* and return lines are skipped — and nothing picked yet.
|
|
124
|
+
*/
|
|
125
|
+
export interface Pick {
|
|
126
|
+
/**
|
|
127
|
+
* Pick ID.
|
|
128
|
+
*/
|
|
129
|
+
id: string;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Commitment describes when a record is due to ship: what was asked for, what that
|
|
133
|
+
* resolved to, and which rule decided.
|
|
134
|
+
*
|
|
135
|
+
* It is a generic, reusable sub-resource shared by anything carrying a ship-by
|
|
136
|
+
* commitment — a sales order, the pick that fulfills it, or a preview of an order
|
|
137
|
+
* that does not exist yet.
|
|
138
|
+
*
|
|
139
|
+
* The three inputs are alternative answers to the same question and at most one is
|
|
140
|
+
* ever set; `lead_time_source` reports which of them, or which level of the
|
|
141
|
+
* customer chain, produced the date. They are written flat on the create and
|
|
142
|
+
* update bodies, the way a carrier is written as `carrier_id` and read back under
|
|
143
|
+
* `freight`.
|
|
144
|
+
*/
|
|
145
|
+
commitment: SalesOrdersAPI.Commitment | null;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Creation timestamp.
|
|
149
|
+
*/
|
|
150
|
+
created_at: string;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* CreatedBy describes who created a resource and their relationship to the account
|
|
154
|
+
* that owns it.
|
|
155
|
+
*
|
|
156
|
+
* It is resolved from the resource's create audit event.
|
|
157
|
+
*/
|
|
158
|
+
created_by: SalesOrdersAPI.CreatedBy | null;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* A business you sell to, with its contact details, default fulfillment settings,
|
|
162
|
+
* and order policies.
|
|
163
|
+
*/
|
|
164
|
+
customer: AccountPricesAPI.Customer | null;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* The customer's own purchase order number for the sales order this pick fulfills.
|
|
168
|
+
*/
|
|
169
|
+
customer_purchase_order_number: string | null;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Timestamp when the pick was finished.
|
|
173
|
+
*/
|
|
174
|
+
finished_at: string | null;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Freight describes the carrier selection and freight billing for a record.
|
|
178
|
+
*
|
|
179
|
+
* It is a generic, reusable sub-resource shared by anything that carries shipping
|
|
180
|
+
* configuration — a sales order, a purchase order, or a shipment.
|
|
181
|
+
*/
|
|
182
|
+
freight: SalesOrdersAPI.Freight | null;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Timestamp of the most recent shipment sent (null until shipped).
|
|
186
|
+
*/
|
|
187
|
+
last_shipped_at: string | null;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Number of lines on this pick.
|
|
191
|
+
*/
|
|
192
|
+
line_count: number;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* A single page of resources, together with the metadata needed to page through
|
|
196
|
+
* the rest of the result set.
|
|
197
|
+
*/
|
|
198
|
+
lines: ListPickLine | null;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Free-form note carried from the sales order this pick fulfills.
|
|
202
|
+
*/
|
|
203
|
+
note: string | null;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Human-readable number that identifies the pick, distinct from the `id`.
|
|
207
|
+
*/
|
|
208
|
+
number: string;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Resource type identifier.
|
|
212
|
+
*/
|
|
213
|
+
object: 'pick';
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* How urgently the pick should be worked.
|
|
217
|
+
*/
|
|
218
|
+
priority: 'low' | 'normal' | 'high';
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Groups the records a pick sits between — the order it fulfills and the shipments
|
|
222
|
+
* packed from it — and is returned only once at least one member has been
|
|
223
|
+
* expanded.
|
|
224
|
+
*/
|
|
225
|
+
related: PickRelated | null;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* A saved address that can be used for billing and shipping on sales orders,
|
|
229
|
+
* invoices, and shipments.
|
|
230
|
+
*/
|
|
231
|
+
ship_to: APIKeysAPI.Address | null;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Progress through each fulfillment stage of a pick.
|
|
235
|
+
*/
|
|
236
|
+
totals: PickTotals | null;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Last updated timestamp.
|
|
240
|
+
*/
|
|
241
|
+
updated_at: string;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* A single line on a pick, tracking the quantity picked against one sales order
|
|
246
|
+
* line.
|
|
247
|
+
*/
|
|
248
|
+
export interface PickLine {
|
|
249
|
+
/**
|
|
250
|
+
* Pick line ID.
|
|
251
|
+
*/
|
|
252
|
+
id: string;
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Creation timestamp.
|
|
256
|
+
*/
|
|
257
|
+
created_at: string;
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* An entry in your catalog: something you sell, consume, or build with.
|
|
261
|
+
*/
|
|
262
|
+
item: ItemsAPI.Item | null;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Resource type identifier.
|
|
266
|
+
*/
|
|
267
|
+
object: 'pick_line';
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* A measured amount: a numeric value together with the unit it is expressed in.
|
|
271
|
+
*
|
|
272
|
+
* Quantities are shared building blocks rather than standalone records — other
|
|
273
|
+
* resources point at them to report stock levels, ordered and packed amounts,
|
|
274
|
+
* money, weights, and durations.
|
|
275
|
+
*/
|
|
276
|
+
ordered_quantity: MaterialsAPI.Quantity | null;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Timestamp when the line was packed.
|
|
280
|
+
*/
|
|
281
|
+
packed_at: string | null;
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* A measured amount: a numeric value together with the unit it is expressed in.
|
|
285
|
+
*
|
|
286
|
+
* Quantities are shared building blocks rather than standalone records — other
|
|
287
|
+
* resources point at them to report stock levels, ordered and packed amounts,
|
|
288
|
+
* money, weights, and durations.
|
|
289
|
+
*/
|
|
290
|
+
quantity: MaterialsAPI.Quantity | null;
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* A single line item on a sales order.
|
|
294
|
+
*/
|
|
295
|
+
sales_order_line: SalesOrdersAPI.SalesOrderLine | null;
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Last updated timestamp.
|
|
299
|
+
*/
|
|
300
|
+
updated_at: string;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Groups the records a pick sits between — the order it fulfills and the shipments
|
|
305
|
+
* packed from it — and is returned only once at least one member has been
|
|
306
|
+
* expanded.
|
|
307
|
+
*/
|
|
308
|
+
export interface PickRelated {
|
|
309
|
+
/**
|
|
310
|
+
* Resource type identifier.
|
|
311
|
+
*/
|
|
312
|
+
object: 'pick_related';
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Record is a lightweight reference to a business record — a sales order, purchase
|
|
316
|
+
* order, pick, shipment, production run, invoice, etc.
|
|
317
|
+
*
|
|
318
|
+
* Like the `actor` and `entity` references, it carries just enough to identify and
|
|
319
|
+
* label the referenced record without embedding its full resource. The `status`
|
|
320
|
+
* and `metadata` fields hold type-specific detail that varies by the kind of
|
|
321
|
+
* record referenced.
|
|
322
|
+
*/
|
|
323
|
+
sales_order: SalesOrdersAPI.Record | null;
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* A single page of resources, together with the metadata needed to page through
|
|
327
|
+
* the rest of the result set.
|
|
328
|
+
*/
|
|
329
|
+
shipments: SalesOrdersAPI.ListRecord | null;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* How far one fulfillment stage of a pick has progressed.
|
|
334
|
+
*/
|
|
335
|
+
export interface PickStageTotal {
|
|
336
|
+
/**
|
|
337
|
+
* Progress as a fraction between 0 and 1.
|
|
338
|
+
*/
|
|
339
|
+
completion: number;
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* Resource type identifier.
|
|
343
|
+
*/
|
|
344
|
+
object: 'pick_stage_total';
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Progress through each fulfillment stage of a pick.
|
|
349
|
+
*/
|
|
350
|
+
export interface PickTotals {
|
|
351
|
+
/**
|
|
352
|
+
* Resource type identifier.
|
|
353
|
+
*/
|
|
354
|
+
object: 'pick_totals';
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* How far one fulfillment stage of a pick has progressed.
|
|
358
|
+
*/
|
|
359
|
+
packed: PickStageTotal;
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* How far one fulfillment stage of a pick has progressed.
|
|
363
|
+
*/
|
|
364
|
+
picked: PickStageTotal;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
export interface PickListParams {
|
|
368
|
+
/**
|
|
369
|
+
* Opaque cursor token identifying where the page of results starts.
|
|
370
|
+
*
|
|
371
|
+
* Use the `cursor` value embedded in a previous response's `next_page_url` or
|
|
372
|
+
* `previous_page_url` to fetch the adjacent page. Omit to start from the first
|
|
373
|
+
* page.
|
|
374
|
+
*/
|
|
375
|
+
cursor?: string;
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Restricts results to picks whose customer belongs to any of these account
|
|
379
|
+
* groups, matching the `type` on the customer.
|
|
380
|
+
*/
|
|
381
|
+
customer_group_ids?: Array<string>;
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Restricts results to picks raised for any of these customers.
|
|
385
|
+
*/
|
|
386
|
+
customer_ids?: Array<string>;
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Latest pick creation date to include, in `YYYY-MM-DD` format. Inclusive of the
|
|
390
|
+
* date itself.
|
|
391
|
+
*/
|
|
392
|
+
ends_at?: string;
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Sub-objects to expand in the response. When omitted, sub-objects are returned as
|
|
396
|
+
* `null`.
|
|
397
|
+
*/
|
|
398
|
+
include?: Array<
|
|
399
|
+
| 'customer'
|
|
400
|
+
| 'created_by'
|
|
401
|
+
| 'freight'
|
|
402
|
+
| 'related.sales_order'
|
|
403
|
+
| 'related.shipments'
|
|
404
|
+
| 'lines'
|
|
405
|
+
| 'lines.item'
|
|
406
|
+
| 'lines.sales_order_line'
|
|
407
|
+
| 'lines.sales_order_line.product'
|
|
408
|
+
| 'lines.quantity'
|
|
409
|
+
| 'lines.quantity.unit'
|
|
410
|
+
| 'lines.ordered_quantity'
|
|
411
|
+
| 'lines.ordered_quantity.unit'
|
|
412
|
+
>;
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Maximum number of results to return in a single page.
|
|
416
|
+
*/
|
|
417
|
+
limit?: number;
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* Restricts results to picks with at least one line whose product belongs to any
|
|
421
|
+
* of these product lines.
|
|
422
|
+
*/
|
|
423
|
+
product_line_ids?: Array<string>;
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* Free-text search term used to filter results.
|
|
427
|
+
*
|
|
428
|
+
* Which fields are matched against the term varies by endpoint.
|
|
429
|
+
*/
|
|
430
|
+
q?: string;
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Orders the results: `ship_by_date` puts the soonest delivery commitment first,
|
|
434
|
+
* with picks whose order has no ship-by date last; `created_at` puts the newest
|
|
435
|
+
* pick first.
|
|
436
|
+
*/
|
|
437
|
+
sort?: 'ship_by_date' | 'created_at';
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* Earliest pick creation date to include, in `YYYY-MM-DD` format.
|
|
441
|
+
*/
|
|
442
|
+
starts_at?: string;
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* Restricts results to picks in this state.
|
|
446
|
+
*
|
|
447
|
+
* - `open`: picks that have not been finished.
|
|
448
|
+
* - `closed`: picks that have been finished.
|
|
449
|
+
*/
|
|
450
|
+
status?: 'open' | 'closed';
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
export interface PickRetrieveParams {
|
|
454
|
+
/**
|
|
455
|
+
* Sub-objects to expand in the response. When omitted, sub-objects are returned as
|
|
456
|
+
* `null`.
|
|
457
|
+
*/
|
|
458
|
+
include?: Array<
|
|
459
|
+
| 'customer'
|
|
460
|
+
| 'created_by'
|
|
461
|
+
| 'freight'
|
|
462
|
+
| 'related.sales_order'
|
|
463
|
+
| 'related.shipments'
|
|
464
|
+
| 'lines'
|
|
465
|
+
| 'lines.item'
|
|
466
|
+
| 'lines.sales_order_line'
|
|
467
|
+
| 'lines.sales_order_line.product'
|
|
468
|
+
| 'lines.quantity'
|
|
469
|
+
| 'lines.quantity.unit'
|
|
470
|
+
| 'lines.ordered_quantity'
|
|
471
|
+
| 'lines.ordered_quantity.unit'
|
|
472
|
+
>;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
Picks.Actions = Actions;
|
|
476
|
+
Picks.Lines = Lines;
|
|
477
|
+
|
|
478
|
+
export declare namespace Picks {
|
|
479
|
+
export {
|
|
480
|
+
type ListPick as ListPick,
|
|
481
|
+
type ListPickLine as ListPickLine,
|
|
482
|
+
type Pick as Pick,
|
|
483
|
+
type PickLine as PickLine,
|
|
484
|
+
type PickRelated as PickRelated,
|
|
485
|
+
type PickStageTotal as PickStageTotal,
|
|
486
|
+
type PickTotals as PickTotals,
|
|
487
|
+
type PickListParams as PickListParams,
|
|
488
|
+
type PickRetrieveParams as PickRetrieveParams,
|
|
489
|
+
};
|
|
490
|
+
|
|
491
|
+
export {
|
|
492
|
+
Actions as Actions,
|
|
493
|
+
type PackPickRequest as PackPickRequest,
|
|
494
|
+
type ActionPackParams as ActionPackParams,
|
|
495
|
+
};
|
|
496
|
+
|
|
497
|
+
export {
|
|
498
|
+
Lines as Lines,
|
|
499
|
+
type UpdatePickLineRequest as UpdatePickLineRequest,
|
|
500
|
+
type LineUpdateParams as LineUpdateParams,
|
|
501
|
+
};
|
|
502
|
+
}
|
|
@@ -359,9 +359,10 @@ export interface QuoteSalesOrderCommitmentRequest {
|
|
|
359
359
|
carrier_id?: string;
|
|
360
360
|
|
|
361
361
|
/**
|
|
362
|
-
* When the order would be issued. Defaults to
|
|
363
|
-
*
|
|
364
|
-
*
|
|
362
|
+
* When the order would be issued. Defaults to the date sales_order_id was issued
|
|
363
|
+
* on, or to now for an order that has not been issued — a lead time is measured
|
|
364
|
+
* from issue, so an order built today but issued next week commits to next week's
|
|
365
|
+
* date, and re-committing one issued last week still counts from last week.
|
|
365
366
|
*/
|
|
366
367
|
issued_at?: string;
|
|
367
368
|
|
|
@@ -409,73 +410,30 @@ export interface QuoteSalesOrderCommitmentRequest {
|
|
|
409
410
|
*/
|
|
410
411
|
export interface QuoteSalesOrderCommitmentResponse {
|
|
411
412
|
/**
|
|
412
|
-
*
|
|
413
|
-
*
|
|
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.
|
|
413
|
+
* Commitment describes when a record is due to ship: what was asked for, what that
|
|
414
|
+
* resolved to, and which rule decided.
|
|
422
415
|
*
|
|
423
|
-
*
|
|
424
|
-
*
|
|
425
|
-
*
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
*
|
|
431
|
-
|
|
432
|
-
lead_time_days: number | null;
|
|
433
|
-
|
|
434
|
-
/**
|
|
435
|
-
* Which rule produced the date.
|
|
416
|
+
* It is a generic, reusable sub-resource shared by anything carrying a ship-by
|
|
417
|
+
* commitment — a sales order, the pick that fulfills it, or a preview of an order
|
|
418
|
+
* that does not exist yet.
|
|
419
|
+
*
|
|
420
|
+
* The three inputs are alternative answers to the same question and at most one is
|
|
421
|
+
* ever set; `lead_time_source` reports which of them, or which level of the
|
|
422
|
+
* customer chain, produced the date. They are written flat on the create and
|
|
423
|
+
* update bodies, the way a carrier is written as `carrier_id` and read back under
|
|
424
|
+
* `freight`.
|
|
436
425
|
*/
|
|
437
|
-
|
|
438
|
-
| 'customer'
|
|
439
|
-
| 'parent_customer'
|
|
440
|
-
| 'account_group'
|
|
441
|
-
| 'account'
|
|
442
|
-
| 'manual'
|
|
443
|
-
| 'order_lead_time'
|
|
444
|
-
| 'order_ship_by'
|
|
445
|
-
| null;
|
|
426
|
+
commitment: SalesOrdersAPI.Commitment | null;
|
|
446
427
|
|
|
447
428
|
/**
|
|
448
429
|
* Resource type identifier.
|
|
449
430
|
*/
|
|
450
431
|
object: 'sales_order_commitment_quote';
|
|
451
432
|
|
|
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
433
|
/**
|
|
464
434
|
* The derivation in order, one entry per rule that moved the date.
|
|
465
435
|
*/
|
|
466
436
|
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
437
|
}
|
|
480
438
|
|
|
481
439
|
/**
|
|
@@ -531,9 +489,10 @@ export interface ActionQuoteCommitmentParams {
|
|
|
531
489
|
carrier_id?: string;
|
|
532
490
|
|
|
533
491
|
/**
|
|
534
|
-
* When the order would be issued. Defaults to
|
|
535
|
-
*
|
|
536
|
-
*
|
|
492
|
+
* When the order would be issued. Defaults to the date sales_order_id was issued
|
|
493
|
+
* on, or to now for an order that has not been issued — a lead time is measured
|
|
494
|
+
* from issue, so an order built today but issued next week commits to next week's
|
|
495
|
+
* date, and re-committing one issued last week still counts from last week.
|
|
537
496
|
*/
|
|
538
497
|
issued_at?: string;
|
|
539
498
|
|