@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,89 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
+
import { path } from "../../../internal/utils/path.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* List, view, pick, void, and pack picks and pick lines.
|
|
6
|
+
*/
|
|
7
|
+
export class Actions extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Marks all lines on a pick as picked.
|
|
10
|
+
*
|
|
11
|
+
* Sets each unpacked line's picked quantity to the quantity still outstanding on
|
|
12
|
+
* its sales order line, after accounting for what other pick lines for that order
|
|
13
|
+
* line have already picked. Lines that have already been packed are unaffected.
|
|
14
|
+
* Use this to fill in a full pick in one call instead of picking each line
|
|
15
|
+
* individually; nothing is shipped until the pick is packed.
|
|
16
|
+
*
|
|
17
|
+
* This endpoint requires the permission: `picks:update`.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const pick = await client.operations.picks.actions.pick(
|
|
22
|
+
* 'pk_6eilj488bq8d',
|
|
23
|
+
* );
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
pick(id, options) {
|
|
27
|
+
return this._client.put(path `/v1/operations/picks/${id}/actions/pick`, options);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Voids a pick, undoing all picking work recorded on it.
|
|
31
|
+
*
|
|
32
|
+
* Resets the picked quantity on every unpacked line to zero and clears the pick's
|
|
33
|
+
* `finished_at` timestamp, so the pick starts over as open with nothing picked.
|
|
34
|
+
* The pick itself is not deleted, and the sales order is unaffected.
|
|
35
|
+
*
|
|
36
|
+
* Returns a validation error if any shipment exists for the pick's sales order.
|
|
37
|
+
* Voiding those shipments is not enough — they must be deleted, since a voided
|
|
38
|
+
* shipment still exists.
|
|
39
|
+
*
|
|
40
|
+
* This endpoint requires the permission: `picks:update`.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* const pick = await client.operations.picks.actions.void(
|
|
45
|
+
* 'pk_6eilj488bq8d',
|
|
46
|
+
* );
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
void(id, options) {
|
|
50
|
+
return this._client.put(path `/v1/operations/picks/${id}/actions/void`, options);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Packs a pick, creating a shipment from the picked lines.
|
|
54
|
+
*
|
|
55
|
+
* Returns `202 Accepted` with a job, because packing writes a shipment, one
|
|
56
|
+
* shipment line per packed pick line, and the requested shipping cases. Poll the
|
|
57
|
+
* job at the returned `Location`; once it reports `completed`, its first result
|
|
58
|
+
* carries the new shipment's `id`, with the shipment line and shipping case ids in
|
|
59
|
+
* `sub_resource_ids`. Every unpacked line with a picked quantity greater than zero
|
|
60
|
+
* is marked as packed and added to a new shipment in `packed` status, which
|
|
61
|
+
* inherits the sales order's carrier, service level, and shipping address. When a
|
|
62
|
+
* sales order line still has outstanding quantity afterward and no unpacked pick
|
|
63
|
+
* line is already open for it, a new zero-quantity pick line is created for the
|
|
64
|
+
* remainder, so packing a partial pick leaves the pick open for the next round.
|
|
65
|
+
* The pick is marked finished only once every one of its lines is packed.
|
|
66
|
+
*
|
|
67
|
+
* Returns a validation error if no line on the pick has a picked quantity greater
|
|
68
|
+
* than zero.
|
|
69
|
+
*
|
|
70
|
+
* This endpoint requires the permission: `picks:update`.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```ts
|
|
74
|
+
* const job = await client.operations.picks.actions.pack(
|
|
75
|
+
* 'pk_6eilj488bq8d',
|
|
76
|
+
* { shipment_case_count: 3 },
|
|
77
|
+
* );
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
pack(id, params, options) {
|
|
81
|
+
const { include, ...body } = params;
|
|
82
|
+
return this._client.post(path `/v1/operations/picks/${id}/actions/pack`, {
|
|
83
|
+
query: { include },
|
|
84
|
+
body,
|
|
85
|
+
...options,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=actions.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.mjs","sourceRoot":"","sources":["../../../src/resources/operations/picks/actions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAKf,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;;;;;;OAiBG;IACH,IAAI,CAAC,EAAU,EAAE,OAAwB;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,wBAAwB,EAAE,eAAe,EAAE,OAAO,CAAC,CAAC;IAClF,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAI,CAAC,EAAU,EAAE,OAAwB;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,wBAAwB,EAAE,eAAe,EAAE,OAAO,CAAC,CAAC;IAClF,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,IAAI,CAAC,EAAU,EAAE,MAAwB,EAAE,OAAwB;QACjE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACpC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,wBAAwB,EAAE,eAAe,EAAE;YACtE,KAAK,EAAE,EAAE,OAAO,EAAE;YAClB,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { Actions, type PackPickRequest, type ActionPackParams } from "./actions.mjs";
|
|
2
|
+
export { Lines, type UpdatePickLineRequest, type LineUpdateParams } from "./lines/index.mjs";
|
|
3
|
+
export { Picks, type ListPick, type ListPickLine, type Pick, type PickLine, type PickRelated, type PickStageTotal, type PickTotals, type PickListParams, type PickRetrieveParams, } from "./picks.mjs";
|
|
4
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/operations/picks/index.ts"],"names":[],"mappings":"OAEO,EAAE,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAE;OACxD,EAAE,KAAK,EAAE,KAAK,qBAAqB,EAAE,KAAK,gBAAgB,EAAE;OAC5D,EACL,KAAK,EACL,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,IAAI,EACT,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,kBAAkB,GACxB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { Actions, type PackPickRequest, type ActionPackParams } from "./actions.js";
|
|
2
|
+
export { Lines, type UpdatePickLineRequest, type LineUpdateParams } from "./lines/index.js";
|
|
3
|
+
export { Picks, type ListPick, type ListPickLine, type Pick, type PickLine, type PickRelated, type PickStageTotal, type PickTotals, type PickListParams, type PickRetrieveParams, } from "./picks.js";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/operations/picks/index.ts"],"names":[],"mappings":"OAEO,EAAE,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAE;OACxD,EAAE,KAAK,EAAE,KAAK,qBAAqB,EAAE,KAAK,gBAAgB,EAAE;OAC5D,EACL,KAAK,EACL,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,IAAI,EACT,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,kBAAkB,GACxB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Picks = exports.Lines = exports.Actions = void 0;
|
|
5
|
+
var actions_1 = require("./actions.js");
|
|
6
|
+
Object.defineProperty(exports, "Actions", { enumerable: true, get: function () { return actions_1.Actions; } });
|
|
7
|
+
var index_1 = require("./lines/index.js");
|
|
8
|
+
Object.defineProperty(exports, "Lines", { enumerable: true, get: function () { return index_1.Lines; } });
|
|
9
|
+
var picks_1 = require("./picks.js");
|
|
10
|
+
Object.defineProperty(exports, "Picks", { enumerable: true, get: function () { return picks_1.Picks; } });
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/operations/picks/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAAiF;AAAxE,kGAAA,OAAO,OAAA;AAChB,0CAAyF;AAAhF,8FAAA,KAAK,OAAA;AACd,oCAWiB;AAVf,8FAAA,KAAK,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/operations/picks/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,OAAO,EAA+C;OACxD,EAAE,KAAK,EAAqD;OAC5D,EACL,KAAK,GAUN"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { APIResource } from "../../../../core/resource.mjs";
|
|
2
|
+
import * as PicksAPI from "../picks.mjs";
|
|
3
|
+
import { APIPromise } from "../../../../core/api-promise.mjs";
|
|
4
|
+
import { RequestOptions } from "../../../../internal/request-options.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* List, view, pick, void, and pack picks and pick lines.
|
|
7
|
+
*/
|
|
8
|
+
export declare class Actions extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Marks a pick line as fully picked.
|
|
11
|
+
*
|
|
12
|
+
* Sets the line's picked quantity to its sales order line's ordered quantity less
|
|
13
|
+
* everything already picked for that order line, including whatever this line had
|
|
14
|
+
* picked before the call. To record a short pick instead, set the quantity
|
|
15
|
+
* yourself with Update Pick Line. Has no effect on a line that has already been
|
|
16
|
+
* packed.
|
|
17
|
+
*
|
|
18
|
+
* This endpoint requires the permission: `picks:update`.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const pickLine =
|
|
23
|
+
* await client.operations.picks.lines.actions.pick(
|
|
24
|
+
* 'example',
|
|
25
|
+
* { pick_id: 'pk_6eilj488bq8d' },
|
|
26
|
+
* );
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
pick(id: string, params: ActionPickParams, options?: RequestOptions): APIPromise<PicksAPI.PickLine>;
|
|
30
|
+
/**
|
|
31
|
+
* Voids a pick line, undoing the picking work recorded on it.
|
|
32
|
+
*
|
|
33
|
+
* Resets the line's picked quantity to zero without deleting the line, so the
|
|
34
|
+
* quantity can be picked again. Returns a validation error if the line has already
|
|
35
|
+
* been packed.
|
|
36
|
+
*
|
|
37
|
+
* This endpoint requires the permission: `picks:update`.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const pickLine =
|
|
42
|
+
* await client.operations.picks.lines.actions.void(
|
|
43
|
+
* 'example',
|
|
44
|
+
* { pick_id: 'pk_6eilj488bq8d' },
|
|
45
|
+
* );
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
void(id: string, params: ActionVoidParams, options?: RequestOptions): APIPromise<PicksAPI.PickLine>;
|
|
49
|
+
}
|
|
50
|
+
export interface ActionPickParams {
|
|
51
|
+
/**
|
|
52
|
+
* Pick ID.
|
|
53
|
+
*/
|
|
54
|
+
pick_id: string;
|
|
55
|
+
}
|
|
56
|
+
export interface ActionVoidParams {
|
|
57
|
+
/**
|
|
58
|
+
* Pick ID.
|
|
59
|
+
*/
|
|
60
|
+
pick_id: string;
|
|
61
|
+
}
|
|
62
|
+
export declare namespace Actions {
|
|
63
|
+
export { type ActionPickParams as ActionPickParams, type ActionVoidParams as ActionVoidParams };
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=actions.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.mts","sourceRoot":"","sources":["../../../../src/resources/operations/picks/lines/actions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC;IAKnG;;;;;;;;;;;;;;;;;OAiBG;IACH,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC;CAIpG;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EAAE,KAAK,gBAAgB,IAAI,gBAAgB,EAAE,KAAK,gBAAgB,IAAI,gBAAgB,EAAE,CAAC;CACjG"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { APIResource } from "../../../../core/resource.js";
|
|
2
|
+
import * as PicksAPI from "../picks.js";
|
|
3
|
+
import { APIPromise } from "../../../../core/api-promise.js";
|
|
4
|
+
import { RequestOptions } from "../../../../internal/request-options.js";
|
|
5
|
+
/**
|
|
6
|
+
* List, view, pick, void, and pack picks and pick lines.
|
|
7
|
+
*/
|
|
8
|
+
export declare class Actions extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Marks a pick line as fully picked.
|
|
11
|
+
*
|
|
12
|
+
* Sets the line's picked quantity to its sales order line's ordered quantity less
|
|
13
|
+
* everything already picked for that order line, including whatever this line had
|
|
14
|
+
* picked before the call. To record a short pick instead, set the quantity
|
|
15
|
+
* yourself with Update Pick Line. Has no effect on a line that has already been
|
|
16
|
+
* packed.
|
|
17
|
+
*
|
|
18
|
+
* This endpoint requires the permission: `picks:update`.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const pickLine =
|
|
23
|
+
* await client.operations.picks.lines.actions.pick(
|
|
24
|
+
* 'example',
|
|
25
|
+
* { pick_id: 'pk_6eilj488bq8d' },
|
|
26
|
+
* );
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
pick(id: string, params: ActionPickParams, options?: RequestOptions): APIPromise<PicksAPI.PickLine>;
|
|
30
|
+
/**
|
|
31
|
+
* Voids a pick line, undoing the picking work recorded on it.
|
|
32
|
+
*
|
|
33
|
+
* Resets the line's picked quantity to zero without deleting the line, so the
|
|
34
|
+
* quantity can be picked again. Returns a validation error if the line has already
|
|
35
|
+
* been packed.
|
|
36
|
+
*
|
|
37
|
+
* This endpoint requires the permission: `picks:update`.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const pickLine =
|
|
42
|
+
* await client.operations.picks.lines.actions.void(
|
|
43
|
+
* 'example',
|
|
44
|
+
* { pick_id: 'pk_6eilj488bq8d' },
|
|
45
|
+
* );
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
void(id: string, params: ActionVoidParams, options?: RequestOptions): APIPromise<PicksAPI.PickLine>;
|
|
49
|
+
}
|
|
50
|
+
export interface ActionPickParams {
|
|
51
|
+
/**
|
|
52
|
+
* Pick ID.
|
|
53
|
+
*/
|
|
54
|
+
pick_id: string;
|
|
55
|
+
}
|
|
56
|
+
export interface ActionVoidParams {
|
|
57
|
+
/**
|
|
58
|
+
* Pick ID.
|
|
59
|
+
*/
|
|
60
|
+
pick_id: string;
|
|
61
|
+
}
|
|
62
|
+
export declare namespace Actions {
|
|
63
|
+
export { type ActionPickParams as ActionPickParams, type ActionVoidParams as ActionVoidParams };
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../src/resources/operations/picks/lines/actions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC;IAKnG;;;;;;;;;;;;;;;;;OAiBG;IACH,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC;CAIpG;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EAAE,KAAK,gBAAgB,IAAI,gBAAgB,EAAE,KAAK,gBAAgB,IAAI,gBAAgB,EAAE,CAAC;CACjG"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Actions = void 0;
|
|
5
|
+
const resource_1 = require("../../../../core/resource.js");
|
|
6
|
+
const path_1 = require("../../../../internal/utils/path.js");
|
|
7
|
+
/**
|
|
8
|
+
* List, view, pick, void, and pack picks and pick lines.
|
|
9
|
+
*/
|
|
10
|
+
class Actions extends resource_1.APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Marks a pick line as fully picked.
|
|
13
|
+
*
|
|
14
|
+
* Sets the line's picked quantity to its sales order line's ordered quantity less
|
|
15
|
+
* everything already picked for that order line, including whatever this line had
|
|
16
|
+
* picked before the call. To record a short pick instead, set the quantity
|
|
17
|
+
* yourself with Update Pick Line. Has no effect on a line that has already been
|
|
18
|
+
* packed.
|
|
19
|
+
*
|
|
20
|
+
* This endpoint requires the permission: `picks:update`.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const pickLine =
|
|
25
|
+
* await client.operations.picks.lines.actions.pick(
|
|
26
|
+
* 'example',
|
|
27
|
+
* { pick_id: 'pk_6eilj488bq8d' },
|
|
28
|
+
* );
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
pick(id, params, options) {
|
|
32
|
+
const { pick_id } = params;
|
|
33
|
+
return this._client.put((0, path_1.path) `/v1/operations/picks/${pick_id}/lines/${id}/actions/pick`, options);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Voids a pick line, undoing the picking work recorded on it.
|
|
37
|
+
*
|
|
38
|
+
* Resets the line's picked quantity to zero without deleting the line, so the
|
|
39
|
+
* quantity can be picked again. Returns a validation error if the line has already
|
|
40
|
+
* been packed.
|
|
41
|
+
*
|
|
42
|
+
* This endpoint requires the permission: `picks:update`.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const pickLine =
|
|
47
|
+
* await client.operations.picks.lines.actions.void(
|
|
48
|
+
* 'example',
|
|
49
|
+
* { pick_id: 'pk_6eilj488bq8d' },
|
|
50
|
+
* );
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
void(id, params, options) {
|
|
54
|
+
const { pick_id } = params;
|
|
55
|
+
return this._client.put((0, path_1.path) `/v1/operations/picks/${pick_id}/lines/${id}/actions/void`, options);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.Actions = Actions;
|
|
59
|
+
//# sourceMappingURL=actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../../src/resources/operations/picks/lines/actions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,2DAAwD;AAIxD,6DAAuD;AAEvD;;GAEG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAI,CAAC,EAAU,EAAE,MAAwB,EAAE,OAAwB;QACjE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,wBAAwB,OAAO,UAAU,EAAE,eAAe,EAAE,OAAO,CAAC,CAAC;IACnG,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,IAAI,CAAC,EAAU,EAAE,MAAwB,EAAE,OAAwB;QACjE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,wBAAwB,OAAO,UAAU,EAAE,eAAe,EAAE,OAAO,CAAC,CAAC;IACnG,CAAC;CACF;AAhDD,0BAgDC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../../core/resource.mjs";
|
|
3
|
+
import { path } from "../../../../internal/utils/path.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* List, view, pick, void, and pack picks and pick lines.
|
|
6
|
+
*/
|
|
7
|
+
export class Actions extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Marks a pick line as fully picked.
|
|
10
|
+
*
|
|
11
|
+
* Sets the line's picked quantity to its sales order line's ordered quantity less
|
|
12
|
+
* everything already picked for that order line, including whatever this line had
|
|
13
|
+
* picked before the call. To record a short pick instead, set the quantity
|
|
14
|
+
* yourself with Update Pick Line. Has no effect on a line that has already been
|
|
15
|
+
* packed.
|
|
16
|
+
*
|
|
17
|
+
* This endpoint requires the permission: `picks:update`.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const pickLine =
|
|
22
|
+
* await client.operations.picks.lines.actions.pick(
|
|
23
|
+
* 'example',
|
|
24
|
+
* { pick_id: 'pk_6eilj488bq8d' },
|
|
25
|
+
* );
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
pick(id, params, options) {
|
|
29
|
+
const { pick_id } = params;
|
|
30
|
+
return this._client.put(path `/v1/operations/picks/${pick_id}/lines/${id}/actions/pick`, options);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Voids a pick line, undoing the picking work recorded on it.
|
|
34
|
+
*
|
|
35
|
+
* Resets the line's picked quantity to zero without deleting the line, so the
|
|
36
|
+
* quantity can be picked again. Returns a validation error if the line has already
|
|
37
|
+
* been packed.
|
|
38
|
+
*
|
|
39
|
+
* This endpoint requires the permission: `picks:update`.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const pickLine =
|
|
44
|
+
* await client.operations.picks.lines.actions.void(
|
|
45
|
+
* 'example',
|
|
46
|
+
* { pick_id: 'pk_6eilj488bq8d' },
|
|
47
|
+
* );
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
void(id, params, options) {
|
|
51
|
+
const { pick_id } = params;
|
|
52
|
+
return this._client.put(path `/v1/operations/picks/${pick_id}/lines/${id}/actions/void`, options);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=actions.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.mjs","sourceRoot":"","sources":["../../../../src/resources/operations/picks/lines/actions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAI,CAAC,EAAU,EAAE,MAAwB,EAAE,OAAwB;QACjE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,wBAAwB,OAAO,UAAU,EAAE,eAAe,EAAE,OAAO,CAAC,CAAC;IACnG,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,IAAI,CAAC,EAAU,EAAE,MAAwB,EAAE,OAAwB;QACjE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,wBAAwB,OAAO,UAAU,EAAE,eAAe,EAAE,OAAO,CAAC,CAAC;IACnG,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../../src/resources/operations/picks/lines/index.ts"],"names":[],"mappings":"OAEO,EAAE,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,gBAAgB,EAAE;OACzD,EAAE,KAAK,EAAE,KAAK,qBAAqB,EAAE,KAAK,gBAAgB,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/resources/operations/picks/lines/index.ts"],"names":[],"mappings":"OAEO,EAAE,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,gBAAgB,EAAE;OACzD,EAAE,KAAK,EAAE,KAAK,qBAAqB,EAAE,KAAK,gBAAgB,EAAE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Lines = exports.Actions = void 0;
|
|
5
|
+
var actions_1 = require("./actions.js");
|
|
6
|
+
Object.defineProperty(exports, "Actions", { enumerable: true, get: function () { return actions_1.Actions; } });
|
|
7
|
+
var lines_1 = require("./lines.js");
|
|
8
|
+
Object.defineProperty(exports, "Lines", { enumerable: true, get: function () { return lines_1.Lines; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/resources/operations/picks/lines/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAAkF;AAAzE,kGAAA,OAAO,OAAA;AAChB,oCAAmF;AAA1E,8FAAA,KAAK,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../../src/resources/operations/picks/lines/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,OAAO,EAAgD;OACzD,EAAE,KAAK,EAAqD"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { APIResource } from "../../../../core/resource.mjs";
|
|
2
|
+
import * as PicksAPI from "../picks.mjs";
|
|
3
|
+
import * as ActionsAPI from "./actions.mjs";
|
|
4
|
+
import { ActionPickParams, ActionVoidParams, Actions } from "./actions.mjs";
|
|
5
|
+
import { APIPromise } from "../../../../core/api-promise.mjs";
|
|
6
|
+
import { RequestOptions } from "../../../../internal/request-options.mjs";
|
|
7
|
+
/**
|
|
8
|
+
* List, view, pick, void, and pack picks and pick lines.
|
|
9
|
+
*/
|
|
10
|
+
export declare class Lines extends APIResource {
|
|
11
|
+
actions: ActionsAPI.Actions;
|
|
12
|
+
/**
|
|
13
|
+
* Updates a pick line's picked quantity.
|
|
14
|
+
*
|
|
15
|
+
* Use this to record a short or partial pick; Pick Pick Line fills in the full
|
|
16
|
+
* outstanding quantity instead.
|
|
17
|
+
*
|
|
18
|
+
* This endpoint requires the permission: `picks:update`.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const pickLine = await client.operations.picks.lines.update(
|
|
23
|
+
* 'example',
|
|
24
|
+
* {
|
|
25
|
+
* pick_id: 'pk_6eilj488bq8d',
|
|
26
|
+
* quantity_value: '10.000000000000000000000000000000',
|
|
27
|
+
* },
|
|
28
|
+
* );
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
update(id: string, params: LineUpdateParams, options?: RequestOptions): APIPromise<PicksAPI.PickLine>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Request to update a pick line's picked quantity.
|
|
35
|
+
*/
|
|
36
|
+
export interface UpdatePickLineRequest {
|
|
37
|
+
/**
|
|
38
|
+
* New picked quantity for the line, as a decimal string read in the unit the sales
|
|
39
|
+
* order line was sold in, stored as given and not capped at the ordered quantity.
|
|
40
|
+
*
|
|
41
|
+
* Must not be negative. Pulling more than was ordered is a real floor event and is
|
|
42
|
+
* kept as recorded; pulling a negative amount is not.
|
|
43
|
+
*/
|
|
44
|
+
quantity_value?: string;
|
|
45
|
+
}
|
|
46
|
+
export interface LineUpdateParams {
|
|
47
|
+
/**
|
|
48
|
+
* Path param: Pick ID.
|
|
49
|
+
*/
|
|
50
|
+
pick_id: string;
|
|
51
|
+
/**
|
|
52
|
+
* Query param: Sub-objects to expand in the response. When omitted, sub-objects
|
|
53
|
+
* are returned as `null`.
|
|
54
|
+
*/
|
|
55
|
+
include?: Array<'sales_order_line' | 'sales_order_line.product' | 'quantity' | 'quantity.unit' | 'ordered_quantity' | 'ordered_quantity.unit'>;
|
|
56
|
+
/**
|
|
57
|
+
* Body param: New picked quantity for the line, as a decimal string read in the
|
|
58
|
+
* unit the sales order line was sold in, stored as given and not capped at the
|
|
59
|
+
* ordered quantity.
|
|
60
|
+
*
|
|
61
|
+
* Must not be negative. Pulling more than was ordered is a real floor event and is
|
|
62
|
+
* kept as recorded; pulling a negative amount is not.
|
|
63
|
+
*/
|
|
64
|
+
quantity_value?: string;
|
|
65
|
+
}
|
|
66
|
+
export declare namespace Lines {
|
|
67
|
+
export { type UpdatePickLineRequest as UpdatePickLineRequest, type LineUpdateParams as LineUpdateParams };
|
|
68
|
+
export { Actions as Actions, type ActionPickParams as ActionPickParams, type ActionVoidParams as ActionVoidParams, };
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=lines.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lines.d.mts","sourceRoot":"","sources":["../../../../src/resources/operations/picks/lines/lines.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,KAAK,UAAU;OACf,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,EAAE;OAC/C,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,KAAM,SAAQ,WAAW;IACpC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;IAEnE;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC;CAQtG;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CACX,kBAAkB,GAClB,0BAA0B,GAC1B,UAAU,GACV,eAAe,GACf,kBAAkB,GAClB,uBAAuB,CAC1B,CAAC;IAEF;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAID,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EAAE,KAAK,qBAAqB,IAAI,qBAAqB,EAAE,KAAK,gBAAgB,IAAI,gBAAgB,EAAE,CAAC;IAE1G,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { APIResource } from "../../../../core/resource.js";
|
|
2
|
+
import * as PicksAPI from "../picks.js";
|
|
3
|
+
import * as ActionsAPI from "./actions.js";
|
|
4
|
+
import { ActionPickParams, ActionVoidParams, Actions } from "./actions.js";
|
|
5
|
+
import { APIPromise } from "../../../../core/api-promise.js";
|
|
6
|
+
import { RequestOptions } from "../../../../internal/request-options.js";
|
|
7
|
+
/**
|
|
8
|
+
* List, view, pick, void, and pack picks and pick lines.
|
|
9
|
+
*/
|
|
10
|
+
export declare class Lines extends APIResource {
|
|
11
|
+
actions: ActionsAPI.Actions;
|
|
12
|
+
/**
|
|
13
|
+
* Updates a pick line's picked quantity.
|
|
14
|
+
*
|
|
15
|
+
* Use this to record a short or partial pick; Pick Pick Line fills in the full
|
|
16
|
+
* outstanding quantity instead.
|
|
17
|
+
*
|
|
18
|
+
* This endpoint requires the permission: `picks:update`.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const pickLine = await client.operations.picks.lines.update(
|
|
23
|
+
* 'example',
|
|
24
|
+
* {
|
|
25
|
+
* pick_id: 'pk_6eilj488bq8d',
|
|
26
|
+
* quantity_value: '10.000000000000000000000000000000',
|
|
27
|
+
* },
|
|
28
|
+
* );
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
update(id: string, params: LineUpdateParams, options?: RequestOptions): APIPromise<PicksAPI.PickLine>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Request to update a pick line's picked quantity.
|
|
35
|
+
*/
|
|
36
|
+
export interface UpdatePickLineRequest {
|
|
37
|
+
/**
|
|
38
|
+
* New picked quantity for the line, as a decimal string read in the unit the sales
|
|
39
|
+
* order line was sold in, stored as given and not capped at the ordered quantity.
|
|
40
|
+
*
|
|
41
|
+
* Must not be negative. Pulling more than was ordered is a real floor event and is
|
|
42
|
+
* kept as recorded; pulling a negative amount is not.
|
|
43
|
+
*/
|
|
44
|
+
quantity_value?: string;
|
|
45
|
+
}
|
|
46
|
+
export interface LineUpdateParams {
|
|
47
|
+
/**
|
|
48
|
+
* Path param: Pick ID.
|
|
49
|
+
*/
|
|
50
|
+
pick_id: string;
|
|
51
|
+
/**
|
|
52
|
+
* Query param: Sub-objects to expand in the response. When omitted, sub-objects
|
|
53
|
+
* are returned as `null`.
|
|
54
|
+
*/
|
|
55
|
+
include?: Array<'sales_order_line' | 'sales_order_line.product' | 'quantity' | 'quantity.unit' | 'ordered_quantity' | 'ordered_quantity.unit'>;
|
|
56
|
+
/**
|
|
57
|
+
* Body param: New picked quantity for the line, as a decimal string read in the
|
|
58
|
+
* unit the sales order line was sold in, stored as given and not capped at the
|
|
59
|
+
* ordered quantity.
|
|
60
|
+
*
|
|
61
|
+
* Must not be negative. Pulling more than was ordered is a real floor event and is
|
|
62
|
+
* kept as recorded; pulling a negative amount is not.
|
|
63
|
+
*/
|
|
64
|
+
quantity_value?: string;
|
|
65
|
+
}
|
|
66
|
+
export declare namespace Lines {
|
|
67
|
+
export { type UpdatePickLineRequest as UpdatePickLineRequest, type LineUpdateParams as LineUpdateParams };
|
|
68
|
+
export { Actions as Actions, type ActionPickParams as ActionPickParams, type ActionVoidParams as ActionVoidParams, };
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=lines.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lines.d.ts","sourceRoot":"","sources":["../../../../src/resources/operations/picks/lines/lines.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,KAAK,UAAU;OACf,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,EAAE;OAC/C,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,KAAM,SAAQ,WAAW;IACpC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;IAEnE;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC;CAQtG;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CACX,kBAAkB,GAClB,0BAA0B,GAC1B,UAAU,GACV,eAAe,GACf,kBAAkB,GAClB,uBAAuB,CAC1B,CAAC;IAEF;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAID,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EAAE,KAAK,qBAAqB,IAAI,qBAAqB,EAAE,KAAK,gBAAgB,IAAI,gBAAgB,EAAE,CAAC;IAE1G,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Lines = void 0;
|
|
5
|
+
const tslib_1 = require("../../../../internal/tslib.js");
|
|
6
|
+
const resource_1 = require("../../../../core/resource.js");
|
|
7
|
+
const ActionsAPI = tslib_1.__importStar(require("./actions.js"));
|
|
8
|
+
const actions_1 = require("./actions.js");
|
|
9
|
+
const path_1 = require("../../../../internal/utils/path.js");
|
|
10
|
+
/**
|
|
11
|
+
* List, view, pick, void, and pack picks and pick lines.
|
|
12
|
+
*/
|
|
13
|
+
class Lines extends resource_1.APIResource {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.actions = new ActionsAPI.Actions(this._client);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Updates a pick line's picked quantity.
|
|
20
|
+
*
|
|
21
|
+
* Use this to record a short or partial pick; Pick Pick Line fills in the full
|
|
22
|
+
* outstanding quantity instead.
|
|
23
|
+
*
|
|
24
|
+
* This endpoint requires the permission: `picks:update`.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* const pickLine = await client.operations.picks.lines.update(
|
|
29
|
+
* 'example',
|
|
30
|
+
* {
|
|
31
|
+
* pick_id: 'pk_6eilj488bq8d',
|
|
32
|
+
* quantity_value: '10.000000000000000000000000000000',
|
|
33
|
+
* },
|
|
34
|
+
* );
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
update(id, params, options) {
|
|
38
|
+
const { pick_id, include, ...body } = params;
|
|
39
|
+
return this._client.patch((0, path_1.path) `/v1/operations/picks/${pick_id}/lines/${id}`, {
|
|
40
|
+
query: { include },
|
|
41
|
+
body,
|
|
42
|
+
...options,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.Lines = Lines;
|
|
47
|
+
Lines.Actions = actions_1.Actions;
|
|
48
|
+
//# sourceMappingURL=lines.js.map
|