@openmrp/sdk 0.21.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/CHANGELOG.md +11 -2
  2. package/README.md +1 -1
  3. package/client.js +1 -1
  4. package/client.mjs +1 -1
  5. package/package.json +1 -1
  6. package/resources/auth/api-keys/api-keys.d.mts +4 -4
  7. package/resources/auth/api-keys/api-keys.d.ts +4 -4
  8. package/resources/core/audit-events.d.mts +4 -4
  9. package/resources/core/audit-events.d.mts.map +1 -1
  10. package/resources/core/audit-events.d.ts +4 -4
  11. package/resources/core/audit-events.d.ts.map +1 -1
  12. package/resources/core/core.d.mts +2 -2
  13. package/resources/core/core.d.mts.map +1 -1
  14. package/resources/core/core.d.ts +2 -2
  15. package/resources/core/core.d.ts.map +1 -1
  16. package/resources/core/core.js.map +1 -1
  17. package/resources/core/core.mjs.map +1 -1
  18. package/resources/core/jobs.d.mts +1 -1
  19. package/resources/core/jobs.d.mts.map +1 -1
  20. package/resources/core/jobs.d.ts +1 -1
  21. package/resources/core/jobs.d.ts.map +1 -1
  22. package/resources/messaging/conversations/conversations.d.mts +3 -3
  23. package/resources/messaging/conversations/conversations.d.mts.map +1 -1
  24. package/resources/messaging/conversations/conversations.d.ts +3 -3
  25. package/resources/messaging/conversations/conversations.d.ts.map +1 -1
  26. package/resources/messaging/conversations/conversations.js.map +1 -1
  27. package/resources/messaging/conversations/conversations.mjs.map +1 -1
  28. package/resources/messaging/conversations/links.d.mts +2 -2
  29. package/resources/messaging/conversations/links.d.mts.map +1 -1
  30. package/resources/messaging/conversations/links.d.ts +2 -2
  31. package/resources/messaging/conversations/links.d.ts.map +1 -1
  32. package/resources/messaging/conversations/messages.d.mts +2 -2
  33. package/resources/messaging/conversations/messages.d.mts.map +1 -1
  34. package/resources/messaging/conversations/messages.d.ts +2 -2
  35. package/resources/messaging/conversations/messages.d.ts.map +1 -1
  36. package/resources/messaging/notifications/notifications.d.mts +2 -2
  37. package/resources/messaging/notifications/notifications.d.mts.map +1 -1
  38. package/resources/messaging/notifications/notifications.d.ts +2 -2
  39. package/resources/messaging/notifications/notifications.d.ts.map +1 -1
  40. package/resources/messaging/notifications/notifications.js.map +1 -1
  41. package/resources/messaging/notifications/notifications.mjs.map +1 -1
  42. package/resources/operations/index.d.mts +2 -0
  43. package/resources/operations/index.d.mts.map +1 -1
  44. package/resources/operations/index.d.ts +2 -0
  45. package/resources/operations/index.d.ts.map +1 -1
  46. package/resources/operations/index.js +15 -11
  47. package/resources/operations/index.js.map +1 -1
  48. package/resources/operations/index.mjs +2 -0
  49. package/resources/operations/index.mjs.map +1 -1
  50. package/resources/operations/inventory-change-logs/actions.d.mts +60 -0
  51. package/resources/operations/inventory-change-logs/actions.d.mts.map +1 -0
  52. package/resources/operations/inventory-change-logs/actions.d.ts +60 -0
  53. package/resources/operations/inventory-change-logs/actions.d.ts.map +1 -0
  54. package/resources/operations/inventory-change-logs/actions.js +30 -0
  55. package/resources/operations/inventory-change-logs/actions.js.map +1 -0
  56. package/resources/operations/inventory-change-logs/actions.mjs +26 -0
  57. package/resources/operations/inventory-change-logs/actions.mjs.map +1 -0
  58. package/resources/operations/inventory-change-logs/index.d.mts +3 -0
  59. package/resources/operations/inventory-change-logs/index.d.mts.map +1 -0
  60. package/resources/operations/inventory-change-logs/index.d.ts +3 -0
  61. package/resources/operations/inventory-change-logs/index.d.ts.map +1 -0
  62. package/resources/operations/inventory-change-logs/index.js +9 -0
  63. package/resources/operations/inventory-change-logs/index.js.map +1 -0
  64. package/resources/operations/inventory-change-logs/index.mjs +4 -0
  65. package/resources/operations/inventory-change-logs/index.mjs.map +1 -0
  66. package/resources/operations/inventory-change-logs/inventory-change-logs.d.mts +188 -0
  67. package/resources/operations/inventory-change-logs/inventory-change-logs.d.mts.map +1 -0
  68. package/resources/operations/inventory-change-logs/inventory-change-logs.d.ts +188 -0
  69. package/resources/operations/inventory-change-logs/inventory-change-logs.d.ts.map +1 -0
  70. package/resources/operations/inventory-change-logs/inventory-change-logs.js +55 -0
  71. package/resources/operations/inventory-change-logs/inventory-change-logs.js.map +1 -0
  72. package/resources/operations/inventory-change-logs/inventory-change-logs.mjs +50 -0
  73. package/resources/operations/inventory-change-logs/inventory-change-logs.mjs.map +1 -0
  74. package/resources/operations/inventory-change-logs.d.mts +2 -0
  75. package/resources/operations/inventory-change-logs.d.mts.map +1 -0
  76. package/resources/operations/inventory-change-logs.d.ts +2 -0
  77. package/resources/operations/inventory-change-logs.d.ts.map +1 -0
  78. package/resources/operations/inventory-change-logs.js +6 -0
  79. package/resources/operations/inventory-change-logs.js.map +1 -0
  80. package/resources/operations/inventory-change-logs.mjs +3 -0
  81. package/resources/operations/inventory-change-logs.mjs.map +1 -0
  82. package/resources/operations/operations.d.mts +8 -0
  83. package/resources/operations/operations.d.mts.map +1 -1
  84. package/resources/operations/operations.d.ts +8 -0
  85. package/resources/operations/operations.d.ts.map +1 -1
  86. package/resources/operations/operations.js +8 -0
  87. package/resources/operations/operations.js.map +1 -1
  88. package/resources/operations/operations.mjs +8 -0
  89. package/resources/operations/operations.mjs.map +1 -1
  90. package/resources/operations/picks/actions.d.mts +111 -0
  91. package/resources/operations/picks/actions.d.mts.map +1 -0
  92. package/resources/operations/picks/actions.d.ts +111 -0
  93. package/resources/operations/picks/actions.d.ts.map +1 -0
  94. package/resources/operations/picks/actions.js +93 -0
  95. package/resources/operations/picks/actions.js.map +1 -0
  96. package/resources/operations/picks/actions.mjs +89 -0
  97. package/resources/operations/picks/actions.mjs.map +1 -0
  98. package/resources/operations/picks/index.d.mts +4 -0
  99. package/resources/operations/picks/index.d.mts.map +1 -0
  100. package/resources/operations/picks/index.d.ts +4 -0
  101. package/resources/operations/picks/index.d.ts.map +1 -0
  102. package/resources/operations/picks/index.js +11 -0
  103. package/resources/operations/picks/index.js.map +1 -0
  104. package/resources/operations/picks/index.mjs +5 -0
  105. package/resources/operations/picks/index.mjs.map +1 -0
  106. package/resources/operations/picks/lines/actions.d.mts +65 -0
  107. package/resources/operations/picks/lines/actions.d.mts.map +1 -0
  108. package/resources/operations/picks/lines/actions.d.ts +65 -0
  109. package/resources/operations/picks/lines/actions.d.ts.map +1 -0
  110. package/resources/operations/picks/lines/actions.js +59 -0
  111. package/resources/operations/picks/lines/actions.js.map +1 -0
  112. package/resources/operations/picks/lines/actions.mjs +55 -0
  113. package/resources/operations/picks/lines/actions.mjs.map +1 -0
  114. package/resources/operations/picks/lines/index.d.mts +3 -0
  115. package/resources/operations/picks/lines/index.d.mts.map +1 -0
  116. package/resources/operations/picks/lines/index.d.ts +3 -0
  117. package/resources/operations/picks/lines/index.d.ts.map +1 -0
  118. package/resources/operations/picks/lines/index.js +9 -0
  119. package/resources/operations/picks/lines/index.js.map +1 -0
  120. package/resources/operations/picks/lines/index.mjs +4 -0
  121. package/resources/operations/picks/lines/index.mjs.map +1 -0
  122. package/resources/operations/picks/lines/lines.d.mts +70 -0
  123. package/resources/operations/picks/lines/lines.d.mts.map +1 -0
  124. package/resources/operations/picks/lines/lines.d.ts +70 -0
  125. package/resources/operations/picks/lines/lines.d.ts.map +1 -0
  126. package/resources/operations/picks/lines/lines.js +48 -0
  127. package/resources/operations/picks/lines/lines.js.map +1 -0
  128. package/resources/operations/picks/lines/lines.mjs +43 -0
  129. package/resources/operations/picks/lines/lines.mjs.map +1 -0
  130. package/resources/operations/picks/lines.d.mts +2 -0
  131. package/resources/operations/picks/lines.d.mts.map +1 -0
  132. package/resources/operations/picks/lines.d.ts +2 -0
  133. package/resources/operations/picks/lines.d.ts.map +1 -0
  134. package/resources/operations/picks/lines.js +6 -0
  135. package/resources/operations/picks/lines.js.map +1 -0
  136. package/resources/operations/picks/lines.mjs +3 -0
  137. package/resources/operations/picks/lines.mjs.map +1 -0
  138. package/resources/operations/picks/picks.d.mts +383 -0
  139. package/resources/operations/picks/picks.d.mts.map +1 -0
  140. package/resources/operations/picks/picks.d.ts +383 -0
  141. package/resources/operations/picks/picks.d.ts.map +1 -0
  142. package/resources/operations/picks/picks.js +57 -0
  143. package/resources/operations/picks/picks.js.map +1 -0
  144. package/resources/operations/picks/picks.mjs +52 -0
  145. package/resources/operations/picks/picks.mjs.map +1 -0
  146. package/resources/operations/picks.d.mts +2 -0
  147. package/resources/operations/picks.d.mts.map +1 -0
  148. package/resources/operations/picks.d.ts +2 -0
  149. package/resources/operations/picks.d.ts.map +1 -0
  150. package/resources/operations/picks.js +6 -0
  151. package/resources/operations/picks.js.map +1 -0
  152. package/resources/operations/picks.mjs +3 -0
  153. package/resources/operations/picks.mjs.map +1 -0
  154. package/resources/sales/index.d.mts +1 -1
  155. package/resources/sales/index.d.mts.map +1 -1
  156. package/resources/sales/index.d.ts +1 -1
  157. package/resources/sales/index.d.ts.map +1 -1
  158. package/resources/sales/index.js.map +1 -1
  159. package/resources/sales/index.mjs.map +1 -1
  160. package/resources/sales/sales-orders/actions.d.mts +12 -40
  161. package/resources/sales/sales-orders/actions.d.mts.map +1 -1
  162. package/resources/sales/sales-orders/actions.d.ts +12 -40
  163. package/resources/sales/sales-orders/actions.d.ts.map +1 -1
  164. package/resources/sales/sales-orders/index.d.mts +1 -1
  165. package/resources/sales/sales-orders/index.d.mts.map +1 -1
  166. package/resources/sales/sales-orders/index.d.ts +1 -1
  167. package/resources/sales/sales-orders/index.d.ts.map +1 -1
  168. package/resources/sales/sales-orders/index.js.map +1 -1
  169. package/resources/sales/sales-orders/index.mjs.map +1 -1
  170. package/resources/sales/sales-orders/sales-orders.d.mts +105 -63
  171. package/resources/sales/sales-orders/sales-orders.d.mts.map +1 -1
  172. package/resources/sales/sales-orders/sales-orders.d.ts +105 -63
  173. package/resources/sales/sales-orders/sales-orders.d.ts.map +1 -1
  174. package/resources/sales/sales-orders/sales-orders.js.map +1 -1
  175. package/resources/sales/sales-orders/sales-orders.mjs.map +1 -1
  176. package/resources/sales/sales.d.mts +2 -2
  177. package/resources/sales/sales.d.mts.map +1 -1
  178. package/resources/sales/sales.d.ts +2 -2
  179. package/resources/sales/sales.d.ts.map +1 -1
  180. package/resources/sales/sales.js.map +1 -1
  181. package/resources/sales/sales.mjs.map +1 -1
  182. package/src/client.ts +1 -1
  183. package/src/resources/auth/api-keys/api-keys.ts +4 -4
  184. package/src/resources/core/audit-events.ts +16 -4
  185. package/src/resources/core/core.ts +8 -2
  186. package/src/resources/core/jobs.ts +4 -1
  187. package/src/resources/messaging/conversations/conversations.ts +12 -3
  188. package/src/resources/messaging/conversations/links.ts +8 -2
  189. package/src/resources/messaging/conversations/messages.ts +8 -2
  190. package/src/resources/messaging/notifications/notifications.ts +8 -2
  191. package/src/resources/operations/index.ts +19 -0
  192. package/src/resources/operations/inventory-change-logs/actions.ts +73 -0
  193. package/src/resources/operations/inventory-change-logs/index.ts +10 -0
  194. package/src/resources/operations/inventory-change-logs/inventory-change-logs.ts +239 -0
  195. package/src/resources/operations/inventory-change-logs.ts +3 -0
  196. package/src/resources/operations/operations.ts +47 -0
  197. package/src/resources/operations/picks/actions.ts +131 -0
  198. package/src/resources/operations/picks/index.ts +16 -0
  199. package/src/resources/operations/picks/lines/actions.ts +78 -0
  200. package/src/resources/operations/picks/lines/index.ts +4 -0
  201. package/src/resources/operations/picks/lines/lines.ts +100 -0
  202. package/src/resources/operations/picks/lines.ts +3 -0
  203. package/src/resources/operations/picks/picks.ts +502 -0
  204. package/src/resources/operations/picks.ts +3 -0
  205. package/src/resources/sales/index.ts +1 -0
  206. package/src/resources/sales/sales-orders/actions.ts +12 -55
  207. package/src/resources/sales/sales-orders/index.ts +1 -0
  208. package/src/resources/sales/sales-orders/sales-orders.ts +124 -79
  209. package/src/resources/sales/sales.ts +2 -0
  210. package/src/version.ts +1 -1
  211. package/version.d.mts +1 -1
  212. package/version.d.ts +1 -1
  213. package/version.js +1 -1
  214. 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,5 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export { Actions } from "./actions.mjs";
3
+ export { Lines } from "./lines/index.mjs";
4
+ export { Picks, } from "./picks.mjs";
5
+ //# sourceMappingURL=index.mjs.map
@@ -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,3 @@
1
+ export { Actions, type ActionPickParams, type ActionVoidParams } from "./actions.mjs";
2
+ export { Lines, type UpdatePickLineRequest, type LineUpdateParams } from "./lines.mjs";
3
+ //# sourceMappingURL=index.d.mts.map
@@ -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,3 @@
1
+ export { Actions, type ActionPickParams, type ActionVoidParams } from "./actions.js";
2
+ export { Lines, type UpdatePickLineRequest, type LineUpdateParams } from "./lines.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -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,4 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export { Actions } from "./actions.mjs";
3
+ export { Lines } from "./lines.mjs";
4
+ //# sourceMappingURL=index.mjs.map
@@ -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