@augno/sdk 0.18.1 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -5
- package/package.json +1 -1
- package/resources/catalog/catalog.d.mts +6 -6
- package/resources/catalog/catalog.d.mts.map +1 -1
- package/resources/catalog/catalog.d.ts +6 -6
- package/resources/catalog/catalog.d.ts.map +1 -1
- package/resources/catalog/catalog.js.map +1 -1
- package/resources/catalog/catalog.mjs.map +1 -1
- package/resources/catalog/index.d.mts +3 -3
- package/resources/catalog/index.d.mts.map +1 -1
- package/resources/catalog/index.d.ts +3 -3
- package/resources/catalog/index.d.ts.map +1 -1
- package/resources/catalog/index.js.map +1 -1
- package/resources/catalog/index.mjs.map +1 -1
- package/resources/catalog/items/actions.d.mts +249 -0
- package/resources/catalog/items/actions.d.mts.map +1 -0
- package/resources/catalog/items/actions.d.ts +249 -0
- package/resources/catalog/items/actions.d.ts.map +1 -0
- package/resources/catalog/items/actions.js +46 -0
- package/resources/catalog/items/actions.js.map +1 -0
- package/resources/catalog/items/actions.mjs +42 -0
- package/resources/catalog/items/actions.mjs.map +1 -0
- package/resources/catalog/items/index.d.mts +3 -1
- package/resources/catalog/items/index.d.mts.map +1 -1
- package/resources/catalog/items/index.d.ts +3 -1
- package/resources/catalog/items/index.d.ts.map +1 -1
- package/resources/catalog/items/index.js +5 -1
- package/resources/catalog/items/index.js.map +1 -1
- package/resources/catalog/items/index.mjs +2 -0
- package/resources/catalog/items/index.mjs.map +1 -1
- package/resources/catalog/items/inventory.d.mts +247 -0
- package/resources/catalog/items/inventory.d.mts.map +1 -0
- package/resources/catalog/items/inventory.d.ts +247 -0
- package/resources/catalog/items/inventory.d.ts.map +1 -0
- package/resources/catalog/items/inventory.js +75 -0
- package/resources/catalog/items/inventory.js.map +1 -0
- package/resources/catalog/items/inventory.mjs +71 -0
- package/resources/catalog/items/inventory.mjs.map +1 -0
- package/resources/catalog/items/items.d.mts +9 -104
- package/resources/catalog/items/items.d.mts.map +1 -1
- package/resources/catalog/items/items.d.ts +9 -104
- package/resources/catalog/items/items.d.ts.map +1 -1
- package/resources/catalog/items/items.js +8 -21
- package/resources/catalog/items/items.js.map +1 -1
- package/resources/catalog/items/items.mjs +8 -21
- package/resources/catalog/items/items.mjs.map +1 -1
- package/resources/catalog/materials/index.d.mts +1 -1
- package/resources/catalog/materials/index.d.mts.map +1 -1
- package/resources/catalog/materials/index.d.ts +1 -1
- package/resources/catalog/materials/index.d.ts.map +1 -1
- package/resources/catalog/materials/index.js.map +1 -1
- package/resources/catalog/materials/index.mjs.map +1 -1
- package/resources/catalog/materials/materials.d.mts +36 -3
- package/resources/catalog/materials/materials.d.mts.map +1 -1
- package/resources/catalog/materials/materials.d.ts +36 -3
- package/resources/catalog/materials/materials.d.ts.map +1 -1
- package/resources/catalog/materials/materials.js.map +1 -1
- package/resources/catalog/materials/materials.mjs.map +1 -1
- package/resources/catalog/product-lines/index.d.mts +1 -1
- package/resources/catalog/product-lines/index.d.mts.map +1 -1
- package/resources/catalog/product-lines/index.d.ts +1 -1
- package/resources/catalog/product-lines/index.d.ts.map +1 -1
- package/resources/catalog/product-lines/index.js.map +1 -1
- package/resources/catalog/product-lines/index.mjs.map +1 -1
- package/resources/catalog/product-lines/product-lines.d.mts +8 -23
- package/resources/catalog/product-lines/product-lines.d.mts.map +1 -1
- package/resources/catalog/product-lines/product-lines.d.ts +8 -23
- package/resources/catalog/product-lines/product-lines.d.ts.map +1 -1
- package/resources/catalog/product-lines/product-lines.js.map +1 -1
- package/resources/catalog/product-lines/product-lines.mjs.map +1 -1
- 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 +2 -2
- package/resources/core/jobs.d.mts.map +1 -1
- package/resources/core/jobs.d.ts +2 -2
- package/resources/core/jobs.d.ts.map +1 -1
- package/resources/messaging/blocks.d.mts +4 -3
- package/resources/messaging/blocks.d.mts.map +1 -1
- package/resources/messaging/blocks.d.ts +4 -3
- package/resources/messaging/blocks.d.ts.map +1 -1
- package/resources/messaging/blocks.js.map +1 -1
- package/resources/messaging/blocks.mjs.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 +1 -1
- package/resources/operations/index.d.mts.map +1 -1
- package/resources/operations/index.d.ts +1 -1
- package/resources/operations/index.d.ts.map +1 -1
- package/resources/operations/index.js.map +1 -1
- package/resources/operations/index.mjs.map +1 -1
- package/resources/operations/machine-downtime-events.d.mts +56 -7
- package/resources/operations/machine-downtime-events.d.mts.map +1 -1
- package/resources/operations/machine-downtime-events.d.ts +56 -7
- package/resources/operations/machine-downtime-events.d.ts.map +1 -1
- package/resources/operations/machine-downtime-events.js +11 -7
- package/resources/operations/machine-downtime-events.js.map +1 -1
- package/resources/operations/machine-downtime-events.mjs +11 -7
- package/resources/operations/machine-downtime-events.mjs.map +1 -1
- package/resources/operations/operations.d.mts +2 -2
- package/resources/operations/operations.d.mts.map +1 -1
- package/resources/operations/operations.d.ts +2 -2
- package/resources/operations/operations.d.ts.map +1 -1
- package/resources/operations/operations.js.map +1 -1
- package/resources/operations/operations.mjs.map +1 -1
- package/resources/operations/production-schedule-settings/production-schedule-settings.d.mts +13 -12
- package/resources/operations/production-schedule-settings/production-schedule-settings.d.mts.map +1 -1
- package/resources/operations/production-schedule-settings/production-schedule-settings.d.ts +13 -12
- package/resources/operations/production-schedule-settings/production-schedule-settings.d.ts.map +1 -1
- package/resources/operations/production-schedule-settings/production-schedule-settings.js.map +1 -1
- package/resources/operations/production-schedule-settings/production-schedule-settings.mjs.map +1 -1
- package/resources/operations/production-schedules/actions.d.mts +34 -1
- package/resources/operations/production-schedules/actions.d.mts.map +1 -1
- package/resources/operations/production-schedules/actions.d.ts +34 -1
- package/resources/operations/production-schedules/actions.d.ts.map +1 -1
- package/resources/operations/production-schedules/actions.js +8 -0
- package/resources/operations/production-schedules/actions.js.map +1 -1
- package/resources/operations/production-schedules/actions.mjs +8 -0
- package/resources/operations/production-schedules/actions.mjs.map +1 -1
- package/resources/operations/production-schedules/index.d.mts +1 -1
- package/resources/operations/production-schedules/index.d.mts.map +1 -1
- package/resources/operations/production-schedules/index.d.ts +1 -1
- package/resources/operations/production-schedules/index.d.ts.map +1 -1
- package/resources/operations/production-schedules/index.js.map +1 -1
- package/resources/operations/production-schedules/index.mjs.map +1 -1
- package/resources/operations/production-schedules/production-schedules.d.mts +295 -2
- package/resources/operations/production-schedules/production-schedules.d.mts.map +1 -1
- package/resources/operations/production-schedules/production-schedules.d.ts +295 -2
- package/resources/operations/production-schedules/production-schedules.d.ts.map +1 -1
- package/resources/operations/production-schedules/production-schedules.js +42 -0
- package/resources/operations/production-schedules/production-schedules.js.map +1 -1
- package/resources/operations/production-schedules/production-schedules.mjs +42 -0
- package/resources/operations/production-schedules/production-schedules.mjs.map +1 -1
- package/resources/operations/shipping-terms.d.mts +9 -9
- package/resources/operations/shipping-terms.d.mts.map +1 -1
- package/resources/operations/shipping-terms.d.ts +9 -9
- package/resources/operations/shipping-terms.d.ts.map +1 -1
- package/resources/sales/account-groups.d.mts +2 -1
- package/resources/sales/account-groups.d.mts.map +1 -1
- package/resources/sales/account-groups.d.ts +2 -1
- package/resources/sales/account-groups.d.ts.map +1 -1
- package/resources/sales/account-prices/account-prices.d.mts +5 -4
- package/resources/sales/account-prices/account-prices.d.mts.map +1 -1
- package/resources/sales/account-prices/account-prices.d.ts +5 -4
- package/resources/sales/account-prices/account-prices.d.ts.map +1 -1
- package/resources/sales/account-prices/account-prices.js.map +1 -1
- package/resources/sales/account-prices/account-prices.mjs.map +1 -1
- package/resources/sales/account-users/sales-targets.d.mts +2 -2
- package/resources/sales/account-users/sales-targets.d.mts.map +1 -1
- package/resources/sales/account-users/sales-targets.d.ts +2 -2
- package/resources/sales/account-users/sales-targets.d.ts.map +1 -1
- package/resources/sales/customers/customers.d.mts +48 -19
- package/resources/sales/customers/customers.d.mts.map +1 -1
- package/resources/sales/customers/customers.d.ts +48 -19
- package/resources/sales/customers/customers.d.ts.map +1 -1
- package/resources/sales/customers/customers.js +10 -5
- package/resources/sales/customers/customers.js.map +1 -1
- package/resources/sales/customers/customers.mjs +10 -5
- package/resources/sales/customers/customers.mjs.map +1 -1
- package/resources/sales/customers/index.d.mts +1 -1
- package/resources/sales/customers/index.d.mts.map +1 -1
- package/resources/sales/customers/index.d.ts +1 -1
- package/resources/sales/customers/index.d.ts.map +1 -1
- package/resources/sales/customers/index.js.map +1 -1
- package/resources/sales/customers/index.mjs.map +1 -1
- package/resources/sales/index.d.mts +1 -1
- package/resources/sales/index.d.mts.map +1 -1
- package/resources/sales/index.d.ts +1 -1
- package/resources/sales/index.d.ts.map +1 -1
- package/resources/sales/index.js.map +1 -1
- package/resources/sales/index.mjs.map +1 -1
- package/resources/sales/sales-orders/actions.d.mts +14 -2
- package/resources/sales/sales-orders/actions.d.mts.map +1 -1
- package/resources/sales/sales-orders/actions.d.ts +14 -2
- package/resources/sales/sales-orders/actions.d.ts.map +1 -1
- package/resources/sales/sales-orders/lines/lines.d.mts +5 -5
- package/resources/sales/sales-orders/lines/lines.d.mts.map +1 -1
- package/resources/sales/sales-orders/lines/lines.d.ts +5 -5
- package/resources/sales/sales-orders/lines/lines.d.ts.map +1 -1
- package/resources/sales/sales-orders/sales-orders.d.mts +10 -6
- package/resources/sales/sales-orders/sales-orders.d.mts.map +1 -1
- package/resources/sales/sales-orders/sales-orders.d.ts +10 -6
- package/resources/sales/sales-orders/sales-orders.d.ts.map +1 -1
- package/resources/sales/sales-orders/sales-orders.js.map +1 -1
- package/resources/sales/sales-orders/sales-orders.mjs.map +1 -1
- package/resources/sales/sales.d.mts +2 -2
- package/resources/sales/sales.d.mts.map +1 -1
- package/resources/sales/sales.d.ts +2 -2
- package/resources/sales/sales.d.ts.map +1 -1
- package/resources/sales/sales.js.map +1 -1
- package/resources/sales/sales.mjs.map +1 -1
- package/src/resources/catalog/catalog.ts +2 -8
- package/src/resources/catalog/index.ts +1 -4
- package/src/resources/catalog/items/actions.ts +296 -0
- package/src/resources/catalog/items/index.ts +23 -3
- package/src/resources/catalog/items/inventory.ts +294 -0
- package/src/resources/catalog/items/items.ts +54 -124
- package/src/resources/catalog/materials/index.ts +1 -0
- package/src/resources/catalog/materials/materials.ts +41 -2
- package/src/resources/catalog/product-lines/index.ts +0 -1
- package/src/resources/catalog/product-lines/product-lines.ts +7 -25
- package/src/resources/core/audit-events.ts +30 -10
- package/src/resources/core/core.ts +15 -5
- package/src/resources/core/jobs.ts +8 -3
- package/src/resources/messaging/blocks.ts +4 -3
- package/src/resources/messaging/conversations/conversations.ts +24 -9
- package/src/resources/messaging/conversations/links.ts +16 -6
- package/src/resources/messaging/conversations/messages.ts +16 -6
- package/src/resources/messaging/notifications/notifications.ts +16 -6
- package/src/resources/operations/index.ts +4 -0
- package/src/resources/operations/machine-downtime-events.ts +62 -7
- package/src/resources/operations/operations.ts +8 -0
- package/src/resources/operations/production-schedule-settings/production-schedule-settings.ts +13 -12
- package/src/resources/operations/production-schedules/actions.ts +37 -1
- package/src/resources/operations/production-schedules/index.ts +4 -0
- package/src/resources/operations/production-schedules/production-schedules.ts +354 -1
- package/src/resources/operations/shipping-terms.ts +9 -9
- package/src/resources/sales/account-groups.ts +2 -1
- package/src/resources/sales/account-prices/account-prices.ts +5 -4
- package/src/resources/sales/account-users/sales-targets.ts +2 -2
- package/src/resources/sales/customers/customers.ts +62 -19
- package/src/resources/sales/customers/index.ts +1 -0
- package/src/resources/sales/index.ts +1 -0
- package/src/resources/sales/sales-orders/actions.ts +15 -1
- package/src/resources/sales/sales-orders/lines/lines.ts +5 -5
- package/src/resources/sales/sales-orders/sales-orders.ts +11 -5
- 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,247 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.js";
|
|
2
|
+
import * as UnitsAPI from "../units/units.js";
|
|
3
|
+
import { APIPromise } from "../../../core/api-promise.js";
|
|
4
|
+
import { RequestOptions } from "../../../internal/request-options.js";
|
|
5
|
+
/**
|
|
6
|
+
* List and manage inventory items.
|
|
7
|
+
*/
|
|
8
|
+
export declare class Inventory extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Returns the stock position for an item: what is on hand, what is reserved
|
|
11
|
+
* against existing orders, what is free to promise, and what is short.
|
|
12
|
+
*
|
|
13
|
+
* Stock your account either owns or holds counts toward the on-hand figure, so
|
|
14
|
+
* customer-supplied material sitting in your facility is included. All four
|
|
15
|
+
* quantities are reported in the base unit of the item's category.
|
|
16
|
+
*
|
|
17
|
+
* This endpoint requires the permission: `items:read`.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const itemInventory =
|
|
22
|
+
* await client.catalog.items.inventory.list(
|
|
23
|
+
* 'it_pej07ckhvu62',
|
|
24
|
+
* );
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
list(id: string, query?: InventoryListParams | null | undefined, options?: RequestOptions): APIPromise<ItemInventory>;
|
|
28
|
+
/**
|
|
29
|
+
* Adjusts or reconciles the quantity of an item you hold.
|
|
30
|
+
*
|
|
31
|
+
* With `operation` set to `adjust` (the behavior when it is omitted), `quantity`
|
|
32
|
+
* is added to the current quantity; with `reconcile`, the current quantity is set
|
|
33
|
+
* to exactly `quantity`. Either way it is the resulting difference that gets
|
|
34
|
+
* written, so a difference of zero moves no stock.
|
|
35
|
+
*
|
|
36
|
+
* The figure a `reconcile` measures against is what is on hand net of demand
|
|
37
|
+
* nothing has covered — the same figure `available_to_promise` is derived from,
|
|
38
|
+
* not the raw on-hand total. Reconciling to the quantity already reported
|
|
39
|
+
* therefore writes nothing.
|
|
40
|
+
*
|
|
41
|
+
* Stock that arrives is allocated against unfilled demand for the item, so an
|
|
42
|
+
* adjustment can settle a shortfall instead of raising the quantity free to
|
|
43
|
+
* promise. That allocation happens just after the request rather than inside it,
|
|
44
|
+
* because it walks every open issue for the item. The change is recorded in the
|
|
45
|
+
* item's inventory audit trail as a user correction attributed to the caller.
|
|
46
|
+
*
|
|
47
|
+
* This endpoint requires the permission: `items:update`.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* const inventory =
|
|
52
|
+
* await client.catalog.items.inventory.update(
|
|
53
|
+
* 'it_pej07ckhvu62',
|
|
54
|
+
* {
|
|
55
|
+
* quantity: {
|
|
56
|
+
* value: '10.5',
|
|
57
|
+
* unit_id: 'un_82bd37dae5po',
|
|
58
|
+
* },
|
|
59
|
+
* customer_id: 'ac_opnlh43ymyee',
|
|
60
|
+
* location_id: 'lc_yonnys0hx3ju',
|
|
61
|
+
* operation: 'adjust',
|
|
62
|
+
* },
|
|
63
|
+
* );
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
update(id: string, body: InventoryUpdateParams, options?: RequestOptions): APIPromise<InventoryUpdateResponse>;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* An amount calculated on demand rather than stored.
|
|
70
|
+
*
|
|
71
|
+
* The same shape as a quantity minus the ID, because nothing was written: it is
|
|
72
|
+
* derived per request, such as a total rolled up across invoiced lines for one
|
|
73
|
+
* analysis.
|
|
74
|
+
*/
|
|
75
|
+
export interface ComputedQuantity {
|
|
76
|
+
/**
|
|
77
|
+
* Formatted value with unit abbreviation (e.g. "1,200 pr").
|
|
78
|
+
*/
|
|
79
|
+
display_value: string;
|
|
80
|
+
/**
|
|
81
|
+
* Resource type identifier.
|
|
82
|
+
*/
|
|
83
|
+
object: 'computed_quantity';
|
|
84
|
+
/**
|
|
85
|
+
* Unit of measurement used for conversions and product quantities.
|
|
86
|
+
*/
|
|
87
|
+
unit: UnitsAPI.Unit | null;
|
|
88
|
+
/**
|
|
89
|
+
* Raw decimal value, as a string to preserve precision.
|
|
90
|
+
*
|
|
91
|
+
* This is the unformatted machine value; see `display_value` for the
|
|
92
|
+
* human-readable rendering.
|
|
93
|
+
*/
|
|
94
|
+
value: string;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* The stock position for an item: what is in stock, what is already committed, and
|
|
98
|
+
* what is still free to sell.
|
|
99
|
+
*
|
|
100
|
+
* All four quantities are reported in the same unit — the base unit of the item's
|
|
101
|
+
* category. Derived figures, not stored rows: each is netted out of the ledger at
|
|
102
|
+
* read time, so none of them carries a quantity id.
|
|
103
|
+
*/
|
|
104
|
+
export interface ItemInventory {
|
|
105
|
+
/**
|
|
106
|
+
* An amount calculated on demand rather than stored.
|
|
107
|
+
*
|
|
108
|
+
* The same shape as a quantity minus the ID, because nothing was written: it is
|
|
109
|
+
* derived per request, such as a total rolled up across invoiced lines for one
|
|
110
|
+
* analysis.
|
|
111
|
+
*/
|
|
112
|
+
available_to_promise: ComputedQuantity | null;
|
|
113
|
+
/**
|
|
114
|
+
* Resource type identifier.
|
|
115
|
+
*/
|
|
116
|
+
object: 'item_inventory';
|
|
117
|
+
/**
|
|
118
|
+
* An amount calculated on demand rather than stored.
|
|
119
|
+
*
|
|
120
|
+
* The same shape as a quantity minus the ID, because nothing was written: it is
|
|
121
|
+
* derived per request, such as a total rolled up across invoiced lines for one
|
|
122
|
+
* analysis.
|
|
123
|
+
*/
|
|
124
|
+
on_hand: ComputedQuantity | null;
|
|
125
|
+
/**
|
|
126
|
+
* An amount calculated on demand rather than stored.
|
|
127
|
+
*
|
|
128
|
+
* The same shape as a quantity minus the ID, because nothing was written: it is
|
|
129
|
+
* derived per request, such as a total rolled up across invoiced lines for one
|
|
130
|
+
* analysis.
|
|
131
|
+
*/
|
|
132
|
+
reserved: ComputedQuantity | null;
|
|
133
|
+
/**
|
|
134
|
+
* An amount calculated on demand rather than stored.
|
|
135
|
+
*
|
|
136
|
+
* The same shape as a quantity minus the ID, because nothing was written: it is
|
|
137
|
+
* derived per request, such as a total rolled up across invoiced lines for one
|
|
138
|
+
* analysis.
|
|
139
|
+
*/
|
|
140
|
+
short: ComputedQuantity | null;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* An amount together with the unit it is expressed in.
|
|
144
|
+
*
|
|
145
|
+
* The unit may be a currency, so money amounts such as a credit limit are written
|
|
146
|
+
* the same way as physical amounts like weights or counts.
|
|
147
|
+
*/
|
|
148
|
+
export interface QuantityInput {
|
|
149
|
+
/**
|
|
150
|
+
* ID of the unit of measure for the value.
|
|
151
|
+
*/
|
|
152
|
+
unit_id: string;
|
|
153
|
+
/**
|
|
154
|
+
* Decimal value, as a string to preserve precision.
|
|
155
|
+
*/
|
|
156
|
+
value: string;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Request to adjust or reconcile inventory for an item.
|
|
160
|
+
*/
|
|
161
|
+
export interface UpdateItemInventoryRequest {
|
|
162
|
+
/**
|
|
163
|
+
* An amount together with the unit it is expressed in.
|
|
164
|
+
*
|
|
165
|
+
* The unit may be a currency, so money amounts such as a credit limit are written
|
|
166
|
+
* the same way as physical amounts like weights or counts.
|
|
167
|
+
*/
|
|
168
|
+
quantity: QuantityInput;
|
|
169
|
+
/**
|
|
170
|
+
* ID of the customer account that owns the resulting inventory.
|
|
171
|
+
*
|
|
172
|
+
* Use this for stock you hold but do not own, such as customer-supplied material.
|
|
173
|
+
* It only affects quantity being added: your account stays the holder, the
|
|
174
|
+
* customer becomes the owner, and the current quantity a `reconcile` measures
|
|
175
|
+
* against is still your account's. Requires edit access to that customer.
|
|
176
|
+
*/
|
|
177
|
+
customer_id?: string;
|
|
178
|
+
/**
|
|
179
|
+
* ID of the location to record the inventory change against.
|
|
180
|
+
*
|
|
181
|
+
* Must be a location in your account.
|
|
182
|
+
*/
|
|
183
|
+
location_id?: string;
|
|
184
|
+
/**
|
|
185
|
+
* Lot number to record the inventory change against.
|
|
186
|
+
*
|
|
187
|
+
* The lot is created for the item if it does not already exist.
|
|
188
|
+
*/
|
|
189
|
+
lot_number?: string;
|
|
190
|
+
/**
|
|
191
|
+
* How `quantity` is applied.
|
|
192
|
+
*
|
|
193
|
+
* - `adjust`: adds `quantity` to the current quantity.
|
|
194
|
+
* - `reconcile`: sets the current quantity to exactly `quantity`.
|
|
195
|
+
*/
|
|
196
|
+
operation?: 'adjust' | 'reconcile';
|
|
197
|
+
}
|
|
198
|
+
export interface InventoryUpdateResponse {
|
|
199
|
+
}
|
|
200
|
+
export interface InventoryListParams {
|
|
201
|
+
/**
|
|
202
|
+
* Sub-objects to expand in the response. When omitted, sub-objects are returned as
|
|
203
|
+
* `null`.
|
|
204
|
+
*/
|
|
205
|
+
include?: Array<'on_hand' | 'reserved' | 'available_to_promise' | 'short'>;
|
|
206
|
+
}
|
|
207
|
+
export interface InventoryUpdateParams {
|
|
208
|
+
/**
|
|
209
|
+
* An amount together with the unit it is expressed in.
|
|
210
|
+
*
|
|
211
|
+
* The unit may be a currency, so money amounts such as a credit limit are written
|
|
212
|
+
* the same way as physical amounts like weights or counts.
|
|
213
|
+
*/
|
|
214
|
+
quantity: QuantityInput;
|
|
215
|
+
/**
|
|
216
|
+
* ID of the customer account that owns the resulting inventory.
|
|
217
|
+
*
|
|
218
|
+
* Use this for stock you hold but do not own, such as customer-supplied material.
|
|
219
|
+
* It only affects quantity being added: your account stays the holder, the
|
|
220
|
+
* customer becomes the owner, and the current quantity a `reconcile` measures
|
|
221
|
+
* against is still your account's. Requires edit access to that customer.
|
|
222
|
+
*/
|
|
223
|
+
customer_id?: string;
|
|
224
|
+
/**
|
|
225
|
+
* ID of the location to record the inventory change against.
|
|
226
|
+
*
|
|
227
|
+
* Must be a location in your account.
|
|
228
|
+
*/
|
|
229
|
+
location_id?: string;
|
|
230
|
+
/**
|
|
231
|
+
* Lot number to record the inventory change against.
|
|
232
|
+
*
|
|
233
|
+
* The lot is created for the item if it does not already exist.
|
|
234
|
+
*/
|
|
235
|
+
lot_number?: string;
|
|
236
|
+
/**
|
|
237
|
+
* How `quantity` is applied.
|
|
238
|
+
*
|
|
239
|
+
* - `adjust`: adds `quantity` to the current quantity.
|
|
240
|
+
* - `reconcile`: sets the current quantity to exactly `quantity`.
|
|
241
|
+
*/
|
|
242
|
+
operation?: 'adjust' | 'reconcile';
|
|
243
|
+
}
|
|
244
|
+
export declare namespace Inventory {
|
|
245
|
+
export { type ComputedQuantity as ComputedQuantity, type ItemInventory as ItemInventory, type QuantityInput as QuantityInput, type UpdateItemInventoryRequest as UpdateItemInventoryRequest, type InventoryUpdateResponse as InventoryUpdateResponse, type InventoryListParams as InventoryListParams, type InventoryUpdateParams as InventoryUpdateParams, };
|
|
246
|
+
}
|
|
247
|
+
//# sourceMappingURL=inventory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inventory.d.ts","sourceRoot":"","sources":["../../../src/resources/catalog/items/inventory.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;;;;;;;;OAiBG;IACH,IAAI,CACF,EAAE,EAAE,MAAM,EACV,KAAK,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,aAAa,CAAC;IAI5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqCG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,qBAAqB,EAC3B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC;CAGvC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,MAAM,EAAE,mBAAmB,CAAC;IAE5B;;OAEG;IACH,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;IAE3B;;;;;OAKG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;;;OAMG;IACH,oBAAoB,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAE9C;;OAEG;IACH,MAAM,EAAE,gBAAgB,CAAC;IAEzB;;;;;;OAMG;IACH,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAEjC;;;;;;OAMG;IACH,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAElC;;;;;;OAMG;IACH,KAAK,EAAE,gBAAgB,GAAG,IA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H"}
|
|
@@ -0,0 +1,75 @@
|
|
|
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.Inventory = void 0;
|
|
5
|
+
const resource_1 = require("../../../core/resource.js");
|
|
6
|
+
const path_1 = require("../../../internal/utils/path.js");
|
|
7
|
+
/**
|
|
8
|
+
* List and manage inventory items.
|
|
9
|
+
*/
|
|
10
|
+
class Inventory extends resource_1.APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Returns the stock position for an item: what is on hand, what is reserved
|
|
13
|
+
* against existing orders, what is free to promise, and what is short.
|
|
14
|
+
*
|
|
15
|
+
* Stock your account either owns or holds counts toward the on-hand figure, so
|
|
16
|
+
* customer-supplied material sitting in your facility is included. All four
|
|
17
|
+
* quantities are reported in the base unit of the item's category.
|
|
18
|
+
*
|
|
19
|
+
* This endpoint requires the permission: `items:read`.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* const itemInventory =
|
|
24
|
+
* await client.catalog.items.inventory.list(
|
|
25
|
+
* 'it_pej07ckhvu62',
|
|
26
|
+
* );
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
list(id, query = {}, options) {
|
|
30
|
+
return this._client.get((0, path_1.path) `/v1/catalog/items/${id}/inventory`, { query, ...options });
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Adjusts or reconciles the quantity of an item you hold.
|
|
34
|
+
*
|
|
35
|
+
* With `operation` set to `adjust` (the behavior when it is omitted), `quantity`
|
|
36
|
+
* is added to the current quantity; with `reconcile`, the current quantity is set
|
|
37
|
+
* to exactly `quantity`. Either way it is the resulting difference that gets
|
|
38
|
+
* written, so a difference of zero moves no stock.
|
|
39
|
+
*
|
|
40
|
+
* The figure a `reconcile` measures against is what is on hand net of demand
|
|
41
|
+
* nothing has covered — the same figure `available_to_promise` is derived from,
|
|
42
|
+
* not the raw on-hand total. Reconciling to the quantity already reported
|
|
43
|
+
* therefore writes nothing.
|
|
44
|
+
*
|
|
45
|
+
* Stock that arrives is allocated against unfilled demand for the item, so an
|
|
46
|
+
* adjustment can settle a shortfall instead of raising the quantity free to
|
|
47
|
+
* promise. That allocation happens just after the request rather than inside it,
|
|
48
|
+
* because it walks every open issue for the item. The change is recorded in the
|
|
49
|
+
* item's inventory audit trail as a user correction attributed to the caller.
|
|
50
|
+
*
|
|
51
|
+
* This endpoint requires the permission: `items:update`.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```ts
|
|
55
|
+
* const inventory =
|
|
56
|
+
* await client.catalog.items.inventory.update(
|
|
57
|
+
* 'it_pej07ckhvu62',
|
|
58
|
+
* {
|
|
59
|
+
* quantity: {
|
|
60
|
+
* value: '10.5',
|
|
61
|
+
* unit_id: 'un_82bd37dae5po',
|
|
62
|
+
* },
|
|
63
|
+
* customer_id: 'ac_opnlh43ymyee',
|
|
64
|
+
* location_id: 'lc_yonnys0hx3ju',
|
|
65
|
+
* operation: 'adjust',
|
|
66
|
+
* },
|
|
67
|
+
* );
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
update(id, body, options) {
|
|
71
|
+
return this._client.patch((0, path_1.path) `/v1/catalog/items/${id}/inventory`, { body, ...options });
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
exports.Inventory = Inventory;
|
|
75
|
+
//# sourceMappingURL=inventory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inventory.js","sourceRoot":"","sources":["../../../src/resources/catalog/items/inventory.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAIrD,0DAAoD;AAEpD;;GAEG;AACH,MAAa,SAAU,SAAQ,sBAAW;IACxC;;;;;;;;;;;;;;;;;OAiBG;IACH,IAAI,CACF,EAAU,EACV,QAAgD,EAAE,EAClD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,qBAAqB,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1F,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqCG;IACH,MAAM,CACJ,EAAU,EACV,IAA2B,EAC3B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,qBAAqB,EAAE,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;CACF;AAxED,8BAwEC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
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 and manage inventory items.
|
|
6
|
+
*/
|
|
7
|
+
export class Inventory extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Returns the stock position for an item: what is on hand, what is reserved
|
|
10
|
+
* against existing orders, what is free to promise, and what is short.
|
|
11
|
+
*
|
|
12
|
+
* Stock your account either owns or holds counts toward the on-hand figure, so
|
|
13
|
+
* customer-supplied material sitting in your facility is included. All four
|
|
14
|
+
* quantities are reported in the base unit of the item's category.
|
|
15
|
+
*
|
|
16
|
+
* This endpoint requires the permission: `items:read`.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const itemInventory =
|
|
21
|
+
* await client.catalog.items.inventory.list(
|
|
22
|
+
* 'it_pej07ckhvu62',
|
|
23
|
+
* );
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
list(id, query = {}, options) {
|
|
27
|
+
return this._client.get(path `/v1/catalog/items/${id}/inventory`, { query, ...options });
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Adjusts or reconciles the quantity of an item you hold.
|
|
31
|
+
*
|
|
32
|
+
* With `operation` set to `adjust` (the behavior when it is omitted), `quantity`
|
|
33
|
+
* is added to the current quantity; with `reconcile`, the current quantity is set
|
|
34
|
+
* to exactly `quantity`. Either way it is the resulting difference that gets
|
|
35
|
+
* written, so a difference of zero moves no stock.
|
|
36
|
+
*
|
|
37
|
+
* The figure a `reconcile` measures against is what is on hand net of demand
|
|
38
|
+
* nothing has covered — the same figure `available_to_promise` is derived from,
|
|
39
|
+
* not the raw on-hand total. Reconciling to the quantity already reported
|
|
40
|
+
* therefore writes nothing.
|
|
41
|
+
*
|
|
42
|
+
* Stock that arrives is allocated against unfilled demand for the item, so an
|
|
43
|
+
* adjustment can settle a shortfall instead of raising the quantity free to
|
|
44
|
+
* promise. That allocation happens just after the request rather than inside it,
|
|
45
|
+
* because it walks every open issue for the item. The change is recorded in the
|
|
46
|
+
* item's inventory audit trail as a user correction attributed to the caller.
|
|
47
|
+
*
|
|
48
|
+
* This endpoint requires the permission: `items:update`.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* const inventory =
|
|
53
|
+
* await client.catalog.items.inventory.update(
|
|
54
|
+
* 'it_pej07ckhvu62',
|
|
55
|
+
* {
|
|
56
|
+
* quantity: {
|
|
57
|
+
* value: '10.5',
|
|
58
|
+
* unit_id: 'un_82bd37dae5po',
|
|
59
|
+
* },
|
|
60
|
+
* customer_id: 'ac_opnlh43ymyee',
|
|
61
|
+
* location_id: 'lc_yonnys0hx3ju',
|
|
62
|
+
* operation: 'adjust',
|
|
63
|
+
* },
|
|
64
|
+
* );
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
update(id, body, options) {
|
|
68
|
+
return this._client.patch(path `/v1/catalog/items/${id}/inventory`, { body, ...options });
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=inventory.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inventory.mjs","sourceRoot":"","sources":["../../../src/resources/catalog/items/inventory.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;;;;;;;;OAiBG;IACH,IAAI,CACF,EAAU,EACV,QAAgD,EAAE,EAClD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,qBAAqB,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1F,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqCG;IACH,MAAM,CACJ,EAAU,EACV,IAA2B,EAC3B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,qBAAqB,EAAE,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;CACF"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { APIResource } from "../../../core/resource.mjs";
|
|
2
2
|
import * as CoreAPI from "../../core/core.mjs";
|
|
3
3
|
import * as APIKeysAPI from "../../auth/api-keys/api-keys.mjs";
|
|
4
|
+
import * as ActionsAPI from "./actions.mjs";
|
|
5
|
+
import { ActionBulkReconcileParams, Actions, BulkReconcileItemInput, BulkReconcileItemsRequest, BulkReconcileItemsResponse, ListReconcileErrorResult, ListReconciledItemResult, ListSkippedItemResult, ReconcileErrorResult, ReconciledItemResult, SkippedItemResult } from "./actions.mjs";
|
|
4
6
|
import * as AttributesAPI from "./attributes.mjs";
|
|
5
7
|
import { AttributeDeleteParams, AttributeUpdateParams, Attributes } from "./attributes.mjs";
|
|
8
|
+
import * as InventoryAPI from "./inventory.mjs";
|
|
9
|
+
import { ComputedQuantity, Inventory, InventoryListParams, InventoryUpdateParams, InventoryUpdateResponse, ItemInventory, QuantityInput, UpdateItemInventoryRequest } from "./inventory.mjs";
|
|
6
10
|
import * as PropertiesAPI from "../properties/properties.mjs";
|
|
7
11
|
import * as UnitGroupsAPI from "../unit-groups/unit-groups.mjs";
|
|
8
12
|
import * as UnitsAPI from "../units/units.mjs";
|
|
@@ -12,7 +16,9 @@ import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
|
12
16
|
* List and manage inventory items.
|
|
13
17
|
*/
|
|
14
18
|
export declare class Items extends APIResource {
|
|
19
|
+
inventory: InventoryAPI.Inventory;
|
|
15
20
|
attributes: AttributesAPI.Attributes;
|
|
21
|
+
actions: ActionsAPI.Actions;
|
|
16
22
|
/**
|
|
17
23
|
* Returns a paginated list of items, newest first.
|
|
18
24
|
*
|
|
@@ -42,25 +48,6 @@ export declare class Items extends APIResource {
|
|
|
42
48
|
* ```
|
|
43
49
|
*/
|
|
44
50
|
retrieve(id: string, query?: ItemRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<Item>;
|
|
45
|
-
/**
|
|
46
|
-
* Returns the stock position for an item: what is on hand, what is reserved
|
|
47
|
-
* against existing orders, what is free to promise, and what is short.
|
|
48
|
-
*
|
|
49
|
-
* Stock your account either owns or holds counts toward the on-hand figure, so
|
|
50
|
-
* customer-supplied material sitting in your facility is included. All four
|
|
51
|
-
* quantities are reported in the base unit of the item's category.
|
|
52
|
-
*
|
|
53
|
-
* This endpoint requires the permission: `items:read`.
|
|
54
|
-
*
|
|
55
|
-
* @example
|
|
56
|
-
* ```ts
|
|
57
|
-
* const itemInventory =
|
|
58
|
-
* await client.catalog.items.retrieveInventory(
|
|
59
|
-
* 'it_pej07ckhvu62',
|
|
60
|
-
* );
|
|
61
|
-
* ```
|
|
62
|
-
*/
|
|
63
|
-
retrieveInventory(id: string, query?: ItemRetrieveInventoryParams | null | undefined, options?: RequestOptions): APIPromise<ItemInventory>;
|
|
64
51
|
/**
|
|
65
52
|
* Returns the lot this item is made in — how many, counted in what.
|
|
66
53
|
*
|
|
@@ -237,51 +224,6 @@ export interface ItemCategory {
|
|
|
237
224
|
*/
|
|
238
225
|
updated_at: string;
|
|
239
226
|
}
|
|
240
|
-
/**
|
|
241
|
-
* The stock position for an item: what is in stock, what is already committed, and
|
|
242
|
-
* what is still free to sell.
|
|
243
|
-
*
|
|
244
|
-
* All four quantities are reported in the same unit — the base unit of the item's
|
|
245
|
-
* category.
|
|
246
|
-
*/
|
|
247
|
-
export interface ItemInventory {
|
|
248
|
-
/**
|
|
249
|
-
* A measured amount: a numeric value together with the unit it is expressed in.
|
|
250
|
-
*
|
|
251
|
-
* Quantities are shared building blocks rather than standalone records — other
|
|
252
|
-
* resources point at them to report stock levels, ordered and packed amounts,
|
|
253
|
-
* money, weights, and durations.
|
|
254
|
-
*/
|
|
255
|
-
available_to_promise: Quantity | null;
|
|
256
|
-
/**
|
|
257
|
-
* Resource type identifier.
|
|
258
|
-
*/
|
|
259
|
-
object: 'item_inventory';
|
|
260
|
-
/**
|
|
261
|
-
* A measured amount: a numeric value together with the unit it is expressed in.
|
|
262
|
-
*
|
|
263
|
-
* Quantities are shared building blocks rather than standalone records — other
|
|
264
|
-
* resources point at them to report stock levels, ordered and packed amounts,
|
|
265
|
-
* money, weights, and durations.
|
|
266
|
-
*/
|
|
267
|
-
on_hand: Quantity | null;
|
|
268
|
-
/**
|
|
269
|
-
* A measured amount: a numeric value together with the unit it is expressed in.
|
|
270
|
-
*
|
|
271
|
-
* Quantities are shared building blocks rather than standalone records — other
|
|
272
|
-
* resources point at them to report stock levels, ordered and packed amounts,
|
|
273
|
-
* money, weights, and durations.
|
|
274
|
-
*/
|
|
275
|
-
reserved: Quantity | null;
|
|
276
|
-
/**
|
|
277
|
-
* A measured amount: a numeric value together with the unit it is expressed in.
|
|
278
|
-
*
|
|
279
|
-
* Quantities are shared building blocks rather than standalone records — other
|
|
280
|
-
* resources point at them to report stock levels, ordered and packed amounts,
|
|
281
|
-
* money, weights, and durations.
|
|
282
|
-
*/
|
|
283
|
-
short: Quantity | null;
|
|
284
|
-
}
|
|
285
227
|
/**
|
|
286
228
|
* The lot an item is made in — how many, counted in what.
|
|
287
229
|
*
|
|
@@ -350,38 +292,6 @@ export interface ListItem {
|
|
|
350
292
|
*/
|
|
351
293
|
page_info: APIKeysAPI.PageInfo;
|
|
352
294
|
}
|
|
353
|
-
/**
|
|
354
|
-
* A measured amount: a numeric value together with the unit it is expressed in.
|
|
355
|
-
*
|
|
356
|
-
* Quantities are shared building blocks rather than standalone records — other
|
|
357
|
-
* resources point at them to report stock levels, ordered and packed amounts,
|
|
358
|
-
* money, weights, and durations.
|
|
359
|
-
*/
|
|
360
|
-
export interface Quantity {
|
|
361
|
-
/**
|
|
362
|
-
* Quantity ID.
|
|
363
|
-
*/
|
|
364
|
-
id: string;
|
|
365
|
-
/**
|
|
366
|
-
* Formatted value with unit abbreviation (e.g. "$1,234.56" or "100 kg").
|
|
367
|
-
*/
|
|
368
|
-
display_value: string;
|
|
369
|
-
/**
|
|
370
|
-
* Resource type identifier.
|
|
371
|
-
*/
|
|
372
|
-
object: 'quantity';
|
|
373
|
-
/**
|
|
374
|
-
* Unit of measurement used for conversions and product quantities.
|
|
375
|
-
*/
|
|
376
|
-
unit: UnitsAPI.Unit | null;
|
|
377
|
-
/**
|
|
378
|
-
* Raw decimal value of the quantity, as a string to preserve precision.
|
|
379
|
-
*
|
|
380
|
-
* This is the unformatted machine value; see `display_value` for the
|
|
381
|
-
* human-readable rendering with unit and thousands separators.
|
|
382
|
-
*/
|
|
383
|
-
value: string;
|
|
384
|
-
}
|
|
385
295
|
/**
|
|
386
296
|
* Value expressed as a ratio of two units, such as a price per kilogram or a
|
|
387
297
|
* throughput per hour.
|
|
@@ -501,13 +411,6 @@ export interface ItemRetrieveParams {
|
|
|
501
411
|
*/
|
|
502
412
|
include?: Array<'category' | 'unit_value' | 'unit_cost' | 'burn_rate' | 'attributes' | 'category.unit_group' | 'category.properties' | 'category.unit_group.base_unit' | 'category.unit_group.associated_units' | 'category.unit_group.associated_units.unit'>;
|
|
503
413
|
}
|
|
504
|
-
export interface ItemRetrieveInventoryParams {
|
|
505
|
-
/**
|
|
506
|
-
* Sub-objects to expand in the response. When omitted, sub-objects are returned as
|
|
507
|
-
* `null`.
|
|
508
|
-
*/
|
|
509
|
-
include?: Array<'on_hand' | 'reserved' | 'available_to_promise' | 'short'>;
|
|
510
|
-
}
|
|
511
414
|
export interface ItemRetrieveLotDefaultParams {
|
|
512
415
|
/**
|
|
513
416
|
* Sub-objects to expand in the response. When omitted, sub-objects are returned as
|
|
@@ -527,7 +430,9 @@ export interface ItemChangeCategoryParams {
|
|
|
527
430
|
include?: Array<'category' | 'unit_value' | 'unit_cost' | 'burn_rate' | 'attributes' | 'category.unit_group' | 'category.properties' | 'category.unit_group.base_unit' | 'category.unit_group.associated_units' | 'category.unit_group.associated_units.unit'>;
|
|
528
431
|
}
|
|
529
432
|
export declare namespace Items {
|
|
530
|
-
export { type Item as Item, type ItemCategory as ItemCategory, type
|
|
433
|
+
export { type Item as Item, type ItemCategory as ItemCategory, type ItemLotDefault as ItemLotDefault, type ListItem as ListItem, type Rate as Rate, type ItemListParams as ItemListParams, type ItemRetrieveParams as ItemRetrieveParams, type ItemRetrieveLotDefaultParams as ItemRetrieveLotDefaultParams, type ItemChangeCategoryParams as ItemChangeCategoryParams, };
|
|
434
|
+
export { Inventory as Inventory, type ComputedQuantity as ComputedQuantity, type ItemInventory as ItemInventory, type QuantityInput as QuantityInput, type UpdateItemInventoryRequest as UpdateItemInventoryRequest, type InventoryUpdateResponse as InventoryUpdateResponse, type InventoryListParams as InventoryListParams, type InventoryUpdateParams as InventoryUpdateParams, };
|
|
531
435
|
export { Attributes as Attributes, type AttributeUpdateParams as AttributeUpdateParams, type AttributeDeleteParams as AttributeDeleteParams, };
|
|
436
|
+
export { Actions as Actions, type BulkReconcileItemInput as BulkReconcileItemInput, type BulkReconcileItemsRequest as BulkReconcileItemsRequest, type BulkReconcileItemsResponse as BulkReconcileItemsResponse, type ListReconcileErrorResult as ListReconcileErrorResult, type ListReconciledItemResult as ListReconciledItemResult, type ListSkippedItemResult as ListSkippedItemResult, type ReconcileErrorResult as ReconcileErrorResult, type ReconciledItemResult as ReconciledItemResult, type SkippedItemResult as SkippedItemResult, type ActionBulkReconcileParams as ActionBulkReconcileParams, };
|
|
532
437
|
}
|
|
533
438
|
//# sourceMappingURL=items.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"items.d.mts","sourceRoot":"","sources":["../../../src/resources/catalog/items/items.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,KAAK,UAAU;OACf,KAAK,aAAa;OAClB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,UAAU,EAAE;OAC5D,KAAK,aAAa;OAClB,KAAK,aAAa;OAClB,KAAK,QAAQ;OACb,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,KAAM,SAAQ,WAAW;IACpC,UAAU,EAAE,aAAa,CAAC,UAAU,CAA8C;
|
|
1
|
+
{"version":3,"file":"items.d.mts","sourceRoot":"","sources":["../../../src/resources/catalog/items/items.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,KAAK,UAAU;OACf,KAAK,UAAU;OACf,EACL,yBAAyB,EACzB,OAAO,EACP,sBAAsB,EACtB,yBAAyB,EACzB,0BAA0B,EAC1B,wBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EAClB;OACM,KAAK,aAAa;OAClB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,UAAU,EAAE;OAC5D,KAAK,YAAY;OACjB,EACL,gBAAgB,EAChB,SAAS,EACT,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,aAAa,EACb,aA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