@augno/sdk 0.16.1 → 0.18.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 +7 -2
- package/README.md +1 -1
- package/client.js +1 -1
- package/client.mjs +1 -1
- package/package.json +1 -1
- package/resources/catalog/item-categories/actions.d.mts +8 -2
- package/resources/catalog/item-categories/actions.d.mts.map +1 -1
- package/resources/catalog/item-categories/actions.d.ts +8 -2
- package/resources/catalog/item-categories/actions.d.ts.map +1 -1
- package/resources/catalog/item-categories/actions.js +7 -2
- package/resources/catalog/item-categories/actions.js.map +1 -1
- package/resources/catalog/item-categories/actions.mjs +7 -2
- package/resources/catalog/item-categories/actions.mjs.map +1 -1
- package/resources/catalog/materials/actions.d.mts +7 -2
- package/resources/catalog/materials/actions.d.mts.map +1 -1
- package/resources/catalog/materials/actions.d.ts +7 -2
- package/resources/catalog/materials/actions.d.ts.map +1 -1
- package/resources/catalog/materials/actions.js +7 -2
- package/resources/catalog/materials/actions.js.map +1 -1
- package/resources/catalog/materials/actions.mjs +7 -2
- package/resources/catalog/materials/actions.mjs.map +1 -1
- package/resources/catalog/parts/actions.d.mts +7 -2
- package/resources/catalog/parts/actions.d.mts.map +1 -1
- package/resources/catalog/parts/actions.d.ts +7 -2
- package/resources/catalog/parts/actions.d.ts.map +1 -1
- package/resources/catalog/parts/actions.js +7 -2
- package/resources/catalog/parts/actions.js.map +1 -1
- package/resources/catalog/parts/actions.mjs +7 -2
- package/resources/catalog/parts/actions.mjs.map +1 -1
- package/resources/catalog/product-lines/actions.d.mts +8 -2
- package/resources/catalog/product-lines/actions.d.mts.map +1 -1
- package/resources/catalog/product-lines/actions.d.ts +8 -2
- package/resources/catalog/product-lines/actions.d.ts.map +1 -1
- package/resources/catalog/product-lines/actions.js +7 -2
- package/resources/catalog/product-lines/actions.js.map +1 -1
- package/resources/catalog/product-lines/actions.mjs +7 -2
- package/resources/catalog/product-lines/actions.mjs.map +1 -1
- package/resources/catalog/products/actions.d.mts +7 -2
- package/resources/catalog/products/actions.d.mts.map +1 -1
- package/resources/catalog/products/actions.d.ts +7 -2
- package/resources/catalog/products/actions.d.ts.map +1 -1
- package/resources/catalog/products/actions.js +7 -2
- package/resources/catalog/products/actions.js.map +1 -1
- package/resources/catalog/products/actions.mjs +7 -2
- package/resources/catalog/products/actions.mjs.map +1 -1
- package/resources/catalog/properties/actions.d.mts +8 -3
- package/resources/catalog/properties/actions.d.mts.map +1 -1
- package/resources/catalog/properties/actions.d.ts +8 -3
- package/resources/catalog/properties/actions.d.ts.map +1 -1
- package/resources/catalog/properties/actions.js +7 -2
- package/resources/catalog/properties/actions.js.map +1 -1
- package/resources/catalog/properties/actions.mjs +7 -2
- package/resources/catalog/properties/actions.mjs.map +1 -1
- package/resources/catalog/unit-groups/actions.d.mts +7 -2
- package/resources/catalog/unit-groups/actions.d.mts.map +1 -1
- package/resources/catalog/unit-groups/actions.d.ts +7 -2
- package/resources/catalog/unit-groups/actions.d.ts.map +1 -1
- package/resources/catalog/unit-groups/actions.js +7 -2
- package/resources/catalog/unit-groups/actions.js.map +1 -1
- package/resources/catalog/unit-groups/actions.mjs +7 -2
- package/resources/catalog/unit-groups/actions.mjs.map +1 -1
- package/resources/catalog/units/actions.d.mts +8 -2
- package/resources/catalog/units/actions.d.mts.map +1 -1
- package/resources/catalog/units/actions.d.ts +8 -2
- package/resources/catalog/units/actions.d.ts.map +1 -1
- package/resources/catalog/units/actions.js +7 -2
- package/resources/catalog/units/actions.js.map +1 -1
- package/resources/catalog/units/actions.mjs +7 -2
- package/resources/catalog/units/actions.mjs.map +1 -1
- package/resources/core/analytics.d.mts +195 -1
- package/resources/core/analytics.d.mts.map +1 -1
- package/resources/core/analytics.d.ts +195 -1
- package/resources/core/analytics.d.ts.map +1 -1
- package/resources/core/analytics.js +11 -0
- package/resources/core/analytics.js.map +1 -1
- package/resources/core/analytics.mjs +11 -0
- package/resources/core/analytics.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 +6 -6
- package/resources/core/core.d.mts.map +1 -1
- package/resources/core/core.d.ts +6 -6
- package/resources/core/core.d.ts.map +1 -1
- package/resources/core/core.js.map +1 -1
- package/resources/core/core.mjs +1 -1
- package/resources/core/core.mjs.map +1 -1
- package/resources/core/index.d.mts +2 -2
- package/resources/core/index.d.mts.map +1 -1
- package/resources/core/index.d.ts +2 -2
- package/resources/core/index.d.ts.map +1 -1
- package/resources/core/index.js.map +1 -1
- package/resources/core/index.mjs.map +1 -1
- package/resources/core/jobs.d.mts +102 -60
- package/resources/core/jobs.d.mts.map +1 -1
- package/resources/core/jobs.d.ts +102 -60
- package/resources/core/jobs.d.ts.map +1 -1
- package/resources/core/jobs.js +12 -6
- package/resources/core/jobs.js.map +1 -1
- package/resources/core/jobs.mjs +12 -6
- package/resources/core/jobs.mjs.map +1 -1
- package/resources/finance/payment-terms.d.mts +5 -5
- package/resources/finance/payment-terms.d.mts.map +1 -1
- package/resources/finance/payment-terms.d.ts +5 -5
- package/resources/finance/payment-terms.d.ts.map +1 -1
- package/resources/finance/payment-terms.js.map +1 -1
- package/resources/finance/payment-terms.mjs.map +1 -1
- package/resources/identity/account-users/account-users.d.mts +39 -0
- package/resources/identity/account-users/account-users.d.mts.map +1 -1
- package/resources/identity/account-users/account-users.d.ts +39 -0
- package/resources/identity/account-users/account-users.d.ts.map +1 -1
- package/resources/identity/account-users/account-users.js.map +1 -1
- package/resources/identity/account-users/account-users.mjs.map +1 -1
- package/resources/messaging/blocks.d.mts +8 -0
- package/resources/messaging/blocks.d.mts.map +1 -1
- package/resources/messaging/blocks.d.ts +8 -0
- package/resources/messaging/blocks.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/carriers/carriers.d.mts +5 -5
- package/resources/operations/carriers/carriers.d.mts.map +1 -1
- package/resources/operations/carriers/carriers.d.ts +5 -5
- package/resources/operations/carriers/carriers.d.ts.map +1 -1
- package/resources/operations/carriers/service-levels.d.mts +5 -5
- package/resources/operations/carriers/service-levels.d.mts.map +1 -1
- package/resources/operations/carriers/service-levels.d.ts +5 -5
- package/resources/operations/carriers/service-levels.d.ts.map +1 -1
- package/resources/operations/locations/actions.d.mts +7 -2
- package/resources/operations/locations/actions.d.mts.map +1 -1
- package/resources/operations/locations/actions.d.ts +7 -2
- package/resources/operations/locations/actions.d.ts.map +1 -1
- package/resources/operations/locations/actions.js +7 -2
- package/resources/operations/locations/actions.js.map +1 -1
- package/resources/operations/locations/actions.mjs +7 -2
- package/resources/operations/locations/actions.mjs.map +1 -1
- package/resources/operations/production-schedules/production-schedules.d.mts +5 -3
- package/resources/operations/production-schedules/production-schedules.d.mts.map +1 -1
- package/resources/operations/production-schedules/production-schedules.d.ts +5 -3
- package/resources/operations/production-schedules/production-schedules.d.ts.map +1 -1
- package/resources/operations/production-schedules/production-schedules.js +5 -3
- package/resources/operations/production-schedules/production-schedules.js.map +1 -1
- package/resources/operations/production-schedules/production-schedules.mjs +5 -3
- package/resources/operations/production-schedules/production-schedules.mjs.map +1 -1
- package/resources/operations/shipments/actions.d.mts +3 -3
- package/resources/operations/shipments/actions.d.mts.map +1 -1
- package/resources/operations/shipments/actions.d.ts +3 -3
- package/resources/operations/shipments/actions.d.ts.map +1 -1
- package/resources/operations/shipping-terms.d.mts +5 -5
- package/resources/operations/shipping-terms.d.mts.map +1 -1
- package/resources/operations/shipping-terms.d.ts +5 -5
- package/resources/operations/shipping-terms.d.ts.map +1 -1
- package/resources/operations/shipping-terms.js.map +1 -1
- package/resources/operations/shipping-terms.mjs.map +1 -1
- package/resources/sales/account-prices/account-prices.d.mts +999 -0
- package/resources/sales/account-prices/account-prices.d.mts.map +1 -0
- package/resources/sales/account-prices/account-prices.d.ts +999 -0
- package/resources/sales/account-prices/account-prices.d.ts.map +1 -0
- package/resources/sales/account-prices/account-prices.js +143 -0
- package/resources/sales/account-prices/account-prices.js.map +1 -0
- package/resources/sales/account-prices/account-prices.mjs +138 -0
- package/resources/sales/account-prices/account-prices.mjs.map +1 -0
- package/resources/sales/account-prices/actions.d.mts +58 -0
- package/resources/sales/account-prices/actions.d.mts.map +1 -0
- package/resources/sales/account-prices/actions.d.ts +58 -0
- package/resources/sales/account-prices/actions.d.ts.map +1 -0
- package/resources/sales/account-prices/actions.js +44 -0
- package/resources/sales/account-prices/actions.js.map +1 -0
- package/resources/sales/account-prices/actions.mjs +40 -0
- package/resources/sales/account-prices/actions.mjs.map +1 -0
- package/resources/sales/account-prices/index.d.mts +3 -0
- package/resources/sales/account-prices/index.d.mts.map +1 -0
- package/resources/sales/account-prices/index.d.ts +3 -0
- package/resources/sales/account-prices/index.d.ts.map +1 -0
- package/resources/sales/account-prices/index.js +9 -0
- package/resources/sales/account-prices/index.js.map +1 -0
- package/resources/sales/account-prices/index.mjs +4 -0
- package/resources/sales/account-prices/index.mjs.map +1 -0
- package/resources/sales/account-prices.d.mts +2 -0
- package/resources/sales/account-prices.d.mts.map +1 -0
- package/resources/sales/account-prices.d.ts +2 -0
- package/resources/sales/account-prices.d.ts.map +1 -0
- package/resources/sales/account-prices.js +6 -0
- package/resources/sales/account-prices.js.map +1 -0
- package/resources/sales/account-prices.mjs +3 -0
- package/resources/sales/account-prices.mjs.map +1 -0
- package/resources/sales/customers/actions.d.mts +2 -2
- package/resources/sales/customers/actions.d.mts.map +1 -1
- package/resources/sales/customers/actions.d.ts +2 -2
- package/resources/sales/customers/actions.d.ts.map +1 -1
- package/resources/sales/customers/actions.js.map +1 -1
- package/resources/sales/customers/actions.mjs.map +1 -1
- package/resources/sales/customers/customers.d.mts +6 -564
- package/resources/sales/customers/customers.d.mts.map +1 -1
- package/resources/sales/customers/customers.d.ts +6 -564
- package/resources/sales/customers/customers.d.ts.map +1 -1
- package/resources/sales/customers/customers.js.map +1 -1
- 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 +6 -3
- package/resources/sales/index.d.mts.map +1 -1
- package/resources/sales/index.d.ts +6 -3
- package/resources/sales/index.d.ts.map +1 -1
- package/resources/sales/index.js +15 -9
- package/resources/sales/index.js.map +1 -1
- package/resources/sales/index.mjs +3 -0
- package/resources/sales/index.mjs.map +1 -1
- package/resources/sales/order-discounts/actions.d.mts +85 -0
- package/resources/sales/order-discounts/actions.d.mts.map +1 -0
- package/resources/sales/order-discounts/actions.d.ts +85 -0
- package/resources/sales/order-discounts/actions.d.ts.map +1 -0
- package/resources/sales/order-discounts/actions.js +35 -0
- package/resources/sales/order-discounts/actions.js.map +1 -0
- package/resources/sales/order-discounts/actions.mjs +31 -0
- package/resources/sales/order-discounts/actions.mjs.map +1 -0
- package/resources/sales/order-discounts/index.d.mts +3 -0
- package/resources/sales/order-discounts/index.d.mts.map +1 -0
- package/resources/sales/order-discounts/index.d.ts +3 -0
- package/resources/sales/order-discounts/index.d.ts.map +1 -0
- package/resources/sales/order-discounts/index.js +9 -0
- package/resources/sales/order-discounts/index.js.map +1 -0
- package/resources/sales/order-discounts/index.mjs +4 -0
- package/resources/sales/order-discounts/index.mjs.map +1 -0
- package/resources/sales/order-discounts/order-discounts.d.mts +365 -0
- package/resources/sales/order-discounts/order-discounts.d.mts.map +1 -0
- package/resources/sales/order-discounts/order-discounts.d.ts +365 -0
- package/resources/sales/order-discounts/order-discounts.d.ts.map +1 -0
- package/resources/sales/order-discounts/order-discounts.js +125 -0
- package/resources/sales/order-discounts/order-discounts.js.map +1 -0
- package/resources/sales/order-discounts/order-discounts.mjs +120 -0
- package/resources/sales/order-discounts/order-discounts.mjs.map +1 -0
- package/resources/sales/order-discounts.d.mts +2 -0
- package/resources/sales/order-discounts.d.mts.map +1 -0
- package/resources/sales/order-discounts.d.ts +2 -0
- package/resources/sales/order-discounts.d.ts.map +1 -0
- package/resources/sales/order-discounts.js +6 -0
- package/resources/sales/order-discounts.js.map +1 -0
- package/resources/sales/order-discounts.mjs +3 -0
- package/resources/sales/order-discounts.mjs.map +1 -0
- package/resources/sales/priorities.d.mts +4 -44
- package/resources/sales/priorities.d.mts.map +1 -1
- package/resources/sales/priorities.d.ts +4 -44
- package/resources/sales/priorities.d.ts.map +1 -1
- package/resources/sales/priorities.js.map +1 -1
- package/resources/sales/priorities.mjs.map +1 -1
- package/resources/sales/sales-orders/index.d.mts +1 -1
- package/resources/sales/sales-orders/index.d.mts.map +1 -1
- package/resources/sales/sales-orders/index.d.ts +1 -1
- package/resources/sales/sales-orders/index.d.ts.map +1 -1
- package/resources/sales/sales-orders/index.js.map +1 -1
- package/resources/sales/sales-orders/index.mjs.map +1 -1
- package/resources/sales/sales-orders/lines/lines.d.mts +2 -2
- package/resources/sales/sales-orders/lines/lines.d.mts.map +1 -1
- package/resources/sales/sales-orders/lines/lines.d.ts +2 -2
- package/resources/sales/sales-orders/lines/lines.d.ts.map +1 -1
- package/resources/sales/sales-orders/sales-orders.d.mts +10 -69
- package/resources/sales/sales-orders/sales-orders.d.mts.map +1 -1
- package/resources/sales/sales-orders/sales-orders.d.ts +10 -69
- 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 +18 -6
- package/resources/sales/sales.d.mts.map +1 -1
- package/resources/sales/sales.d.ts +18 -6
- package/resources/sales/sales.d.ts.map +1 -1
- package/resources/sales/sales.js +12 -0
- package/resources/sales/sales.js.map +1 -1
- package/resources/sales/sales.mjs +12 -0
- package/resources/sales/sales.mjs.map +1 -1
- package/resources/sales/volume-discounts.d.mts +684 -0
- package/resources/sales/volume-discounts.d.mts.map +1 -0
- package/resources/sales/volume-discounts.d.ts +684 -0
- package/resources/sales/volume-discounts.d.ts.map +1 -0
- package/resources/sales/volume-discounts.js +152 -0
- package/resources/sales/volume-discounts.js.map +1 -0
- package/resources/sales/volume-discounts.mjs +148 -0
- package/resources/sales/volume-discounts.mjs.map +1 -0
- package/src/client.ts +1 -1
- package/src/resources/catalog/item-categories/actions.ts +15 -3
- package/src/resources/catalog/materials/actions.ts +14 -3
- package/src/resources/catalog/parts/actions.ts +14 -3
- package/src/resources/catalog/product-lines/actions.ts +15 -3
- package/src/resources/catalog/products/actions.ts +14 -3
- package/src/resources/catalog/properties/actions.ts +15 -4
- package/src/resources/catalog/unit-groups/actions.ts +14 -3
- package/src/resources/catalog/units/actions.ts +15 -3
- package/src/resources/core/analytics.ts +231 -0
- package/src/resources/core/audit-events.ts +16 -0
- package/src/resources/core/core.ts +30 -2
- package/src/resources/core/index.ts +7 -1
- package/src/resources/core/jobs.ts +422 -67
- package/src/resources/finance/payment-terms.ts +8 -5
- package/src/resources/identity/account-users/account-users.ts +44 -0
- package/src/resources/messaging/blocks.ts +9 -0
- package/src/resources/messaging/conversations/conversations.ts +12 -0
- package/src/resources/messaging/conversations/links.ts +8 -0
- package/src/resources/messaging/conversations/messages.ts +8 -0
- package/src/resources/messaging/notifications/notifications.ts +8 -0
- package/src/resources/operations/carriers/carriers.ts +5 -5
- package/src/resources/operations/carriers/service-levels.ts +5 -5
- package/src/resources/operations/locations/actions.ts +14 -3
- package/src/resources/operations/production-schedules/production-schedules.ts +5 -3
- package/src/resources/operations/shipments/actions.ts +3 -3
- package/src/resources/operations/shipping-terms.ts +8 -5
- package/src/resources/sales/account-prices/account-prices.ts +1191 -0
- package/src/resources/sales/account-prices/actions.ts +74 -0
- package/src/resources/sales/account-prices/index.ts +27 -0
- package/src/resources/sales/account-prices.ts +3 -0
- package/src/resources/sales/customers/actions.ts +6 -2
- package/src/resources/sales/customers/customers.ts +5 -658
- package/src/resources/sales/customers/index.ts +0 -11
- package/src/resources/sales/index.ts +50 -13
- package/src/resources/sales/order-discounts/actions.ts +102 -0
- package/src/resources/sales/order-discounts/index.ts +13 -0
- package/src/resources/sales/order-discounts/order-discounts.ts +442 -0
- package/src/resources/sales/order-discounts.ts +3 -0
- package/src/resources/sales/priorities.ts +3 -51
- package/src/resources/sales/sales-orders/index.ts +0 -1
- package/src/resources/sales/sales-orders/lines/lines.ts +2 -2
- package/src/resources/sales/sales-orders/sales-orders.ts +9 -79
- package/src/resources/sales/sales.ts +113 -26
- package/src/resources/sales/volume-discounts.ts +813 -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,152 @@
|
|
|
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.VolumeDiscounts = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
7
|
+
/**
|
|
8
|
+
* List and manage volume discounts.
|
|
9
|
+
*/
|
|
10
|
+
class VolumeDiscounts extends resource_1.APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Returns a paginated list of volume discounts, newest first.
|
|
13
|
+
*
|
|
14
|
+
* The search term matches the discount name, the name of a customer group it is
|
|
15
|
+
* scoped to, or the name of a product line it is scoped to. Customer portal users
|
|
16
|
+
* see only discounts with no customer-group restriction plus those scoped to a
|
|
17
|
+
* group their own account belongs to.
|
|
18
|
+
*
|
|
19
|
+
* This endpoint requires the permissions: `discounts:read`, `customers:read`,
|
|
20
|
+
* `suppliers:read`.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const listVolumeDiscount =
|
|
25
|
+
* await client.sales.volumeDiscounts.list();
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
list(query = {}, options) {
|
|
29
|
+
return this._client.get('/v1/sales/volume-discounts', { query, ...options });
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Returns a volume discount by ID.
|
|
33
|
+
*
|
|
34
|
+
* This endpoint requires the permissions: `discounts:read`, `customers:read`,
|
|
35
|
+
* `suppliers:read`.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* const volumeDiscount =
|
|
40
|
+
* await client.sales.volumeDiscounts.retrieve(
|
|
41
|
+
* 'quds_bn7hto9s10pp',
|
|
42
|
+
* );
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
retrieve(id, query = {}, options) {
|
|
46
|
+
return this._client.get((0, path_1.path) `/v1/sales/volume-discounts/${id}`, { query, ...options });
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Creates a volume discount with its tiers and scoping associations.
|
|
50
|
+
*
|
|
51
|
+
* The discount name must be unique within the account; creating a discount with an
|
|
52
|
+
* existing name returns a conflict error.
|
|
53
|
+
*
|
|
54
|
+
* Each scoping list narrows the order lines the discount applies to, and an empty
|
|
55
|
+
* list places no restriction on that dimension. Because tier thresholds are
|
|
56
|
+
* compared against quantities converted into `unit_ids`, a discount created
|
|
57
|
+
* without any units never reaches a threshold above zero.
|
|
58
|
+
*
|
|
59
|
+
* This endpoint requires the permission: `discounts:create`.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* const volumeDiscount =
|
|
64
|
+
* await client.sales.volumeDiscounts.create({
|
|
65
|
+
* name: 'Bulk Order Discount',
|
|
66
|
+
* tiers: [
|
|
67
|
+
* {
|
|
68
|
+
* name: '100+ Units',
|
|
69
|
+
* discount_percentage:
|
|
70
|
+
* '5.000000000000000000000000000000',
|
|
71
|
+
* threshold: '100.000000000000000000000000000000',
|
|
72
|
+
* },
|
|
73
|
+
* ],
|
|
74
|
+
* });
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
create(params, options) {
|
|
78
|
+
const { include, ...body } = params;
|
|
79
|
+
return this._client.post('/v1/sales/volume-discounts', { query: { include }, body, ...options });
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Partially updates a volume discount.
|
|
83
|
+
*
|
|
84
|
+
* The tier and association lists are only applied when their corresponding `has_*`
|
|
85
|
+
* flag is `true`, in which case they replace the existing set entirely. Tiers use
|
|
86
|
+
* upsert semantics: tiers with an `id` are updated, tiers without one are created,
|
|
87
|
+
* and existing tiers omitted from the list are deleted.
|
|
88
|
+
*
|
|
89
|
+
* The name must remain unique within the account; reusing another discount's name
|
|
90
|
+
* returns a conflict error. Order lines that have already been priced keep the
|
|
91
|
+
* unit price they were given; the revised discount applies to lines priced after
|
|
92
|
+
* the change.
|
|
93
|
+
*
|
|
94
|
+
* This endpoint requires the permission: `discounts:update`.
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* ```ts
|
|
98
|
+
* const volumeDiscount =
|
|
99
|
+
* await client.sales.volumeDiscounts.update(
|
|
100
|
+
* 'quds_bn7hto9s10pp',
|
|
101
|
+
* {
|
|
102
|
+
* has_attributes: true,
|
|
103
|
+
* has_categories: true,
|
|
104
|
+
* has_customer_groups: true,
|
|
105
|
+
* has_product_lines: true,
|
|
106
|
+
* has_tiers: true,
|
|
107
|
+
* has_units: true,
|
|
108
|
+
* name: 'Updated Bulk Discount',
|
|
109
|
+
* tiers: [
|
|
110
|
+
* {
|
|
111
|
+
* name: '50+ Units',
|
|
112
|
+
* discount_percentage:
|
|
113
|
+
* '10.000000000000000000000000000000',
|
|
114
|
+
* threshold: '50.000000000000000000000000000000',
|
|
115
|
+
* },
|
|
116
|
+
* ],
|
|
117
|
+
* },
|
|
118
|
+
* );
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
121
|
+
update(id, params, options) {
|
|
122
|
+
const { include, ...body } = params;
|
|
123
|
+
return this._client.patch((0, path_1.path) `/v1/sales/volume-discounts/${id}`, {
|
|
124
|
+
query: { include },
|
|
125
|
+
body,
|
|
126
|
+
...options,
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Deletes a volume discount along with its tiers and scoping associations.
|
|
131
|
+
*
|
|
132
|
+
* Deletion is permanent; further requests against the deleted ID return an error.
|
|
133
|
+
*
|
|
134
|
+
* Order lines that have already been priced keep the unit price they were given;
|
|
135
|
+
* only lines priced after the deletion lose the discount.
|
|
136
|
+
*
|
|
137
|
+
* This endpoint requires the permission: `discounts:delete`.
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* ```ts
|
|
141
|
+
* const volumeDiscount =
|
|
142
|
+
* await client.sales.volumeDiscounts.delete(
|
|
143
|
+
* 'quds_bn7hto9s10pp',
|
|
144
|
+
* );
|
|
145
|
+
* ```
|
|
146
|
+
*/
|
|
147
|
+
delete(id, options) {
|
|
148
|
+
return this._client.delete((0, path_1.path) `/v1/sales/volume-discounts/${id}`, options);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
exports.VolumeDiscounts = VolumeDiscounts;
|
|
152
|
+
//# sourceMappingURL=volume-discounts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"volume-discounts.js","sourceRoot":"","sources":["../../src/resources/sales/volume-discounts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AASlD,uDAAiD;AAEjD;;GAEG;AACH,MAAa,eAAgB,SAAQ,sBAAW;IAC9C;;;;;;;;;;;;;;;;OAgBG;IACH,IAAI,CACF,QAAqD,EAAE,EACvD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,QAAQ,CACN,EAAU,EACV,QAAyD,EAAE,EAC3D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,8BAA8B,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzF,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,MAAM,CAAC,MAAkC,EAAE,OAAwB;QACjE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACpC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,4BAA4B,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnG,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,MAAM,CACJ,EAAU,EACV,MAAkC,EAClC,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACpC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,8BAA8B,EAAE,EAAE,EAAE;YAChE,KAAK,EAAE,EAAE,OAAO,EAAE;YAClB,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,8BAA8B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC;CACF;AA3JD,0CA2JC"}
|
|
@@ -0,0 +1,148 @@
|
|
|
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 volume discounts.
|
|
6
|
+
*/
|
|
7
|
+
export class VolumeDiscounts extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Returns a paginated list of volume discounts, newest first.
|
|
10
|
+
*
|
|
11
|
+
* The search term matches the discount name, the name of a customer group it is
|
|
12
|
+
* scoped to, or the name of a product line it is scoped to. Customer portal users
|
|
13
|
+
* see only discounts with no customer-group restriction plus those scoped to a
|
|
14
|
+
* group their own account belongs to.
|
|
15
|
+
*
|
|
16
|
+
* This endpoint requires the permissions: `discounts:read`, `customers:read`,
|
|
17
|
+
* `suppliers:read`.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const listVolumeDiscount =
|
|
22
|
+
* await client.sales.volumeDiscounts.list();
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
list(query = {}, options) {
|
|
26
|
+
return this._client.get('/v1/sales/volume-discounts', { query, ...options });
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Returns a volume discount by ID.
|
|
30
|
+
*
|
|
31
|
+
* This endpoint requires the permissions: `discounts:read`, `customers:read`,
|
|
32
|
+
* `suppliers:read`.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* const volumeDiscount =
|
|
37
|
+
* await client.sales.volumeDiscounts.retrieve(
|
|
38
|
+
* 'quds_bn7hto9s10pp',
|
|
39
|
+
* );
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
retrieve(id, query = {}, options) {
|
|
43
|
+
return this._client.get(path `/v1/sales/volume-discounts/${id}`, { query, ...options });
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Creates a volume discount with its tiers and scoping associations.
|
|
47
|
+
*
|
|
48
|
+
* The discount name must be unique within the account; creating a discount with an
|
|
49
|
+
* existing name returns a conflict error.
|
|
50
|
+
*
|
|
51
|
+
* Each scoping list narrows the order lines the discount applies to, and an empty
|
|
52
|
+
* list places no restriction on that dimension. Because tier thresholds are
|
|
53
|
+
* compared against quantities converted into `unit_ids`, a discount created
|
|
54
|
+
* without any units never reaches a threshold above zero.
|
|
55
|
+
*
|
|
56
|
+
* This endpoint requires the permission: `discounts:create`.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* const volumeDiscount =
|
|
61
|
+
* await client.sales.volumeDiscounts.create({
|
|
62
|
+
* name: 'Bulk Order Discount',
|
|
63
|
+
* tiers: [
|
|
64
|
+
* {
|
|
65
|
+
* name: '100+ Units',
|
|
66
|
+
* discount_percentage:
|
|
67
|
+
* '5.000000000000000000000000000000',
|
|
68
|
+
* threshold: '100.000000000000000000000000000000',
|
|
69
|
+
* },
|
|
70
|
+
* ],
|
|
71
|
+
* });
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
create(params, options) {
|
|
75
|
+
const { include, ...body } = params;
|
|
76
|
+
return this._client.post('/v1/sales/volume-discounts', { query: { include }, body, ...options });
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Partially updates a volume discount.
|
|
80
|
+
*
|
|
81
|
+
* The tier and association lists are only applied when their corresponding `has_*`
|
|
82
|
+
* flag is `true`, in which case they replace the existing set entirely. Tiers use
|
|
83
|
+
* upsert semantics: tiers with an `id` are updated, tiers without one are created,
|
|
84
|
+
* and existing tiers omitted from the list are deleted.
|
|
85
|
+
*
|
|
86
|
+
* The name must remain unique within the account; reusing another discount's name
|
|
87
|
+
* returns a conflict error. Order lines that have already been priced keep the
|
|
88
|
+
* unit price they were given; the revised discount applies to lines priced after
|
|
89
|
+
* the change.
|
|
90
|
+
*
|
|
91
|
+
* This endpoint requires the permission: `discounts:update`.
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```ts
|
|
95
|
+
* const volumeDiscount =
|
|
96
|
+
* await client.sales.volumeDiscounts.update(
|
|
97
|
+
* 'quds_bn7hto9s10pp',
|
|
98
|
+
* {
|
|
99
|
+
* has_attributes: true,
|
|
100
|
+
* has_categories: true,
|
|
101
|
+
* has_customer_groups: true,
|
|
102
|
+
* has_product_lines: true,
|
|
103
|
+
* has_tiers: true,
|
|
104
|
+
* has_units: true,
|
|
105
|
+
* name: 'Updated Bulk Discount',
|
|
106
|
+
* tiers: [
|
|
107
|
+
* {
|
|
108
|
+
* name: '50+ Units',
|
|
109
|
+
* discount_percentage:
|
|
110
|
+
* '10.000000000000000000000000000000',
|
|
111
|
+
* threshold: '50.000000000000000000000000000000',
|
|
112
|
+
* },
|
|
113
|
+
* ],
|
|
114
|
+
* },
|
|
115
|
+
* );
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
118
|
+
update(id, params, options) {
|
|
119
|
+
const { include, ...body } = params;
|
|
120
|
+
return this._client.patch(path `/v1/sales/volume-discounts/${id}`, {
|
|
121
|
+
query: { include },
|
|
122
|
+
body,
|
|
123
|
+
...options,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Deletes a volume discount along with its tiers and scoping associations.
|
|
128
|
+
*
|
|
129
|
+
* Deletion is permanent; further requests against the deleted ID return an error.
|
|
130
|
+
*
|
|
131
|
+
* Order lines that have already been priced keep the unit price they were given;
|
|
132
|
+
* only lines priced after the deletion lose the discount.
|
|
133
|
+
*
|
|
134
|
+
* This endpoint requires the permission: `discounts:delete`.
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* ```ts
|
|
138
|
+
* const volumeDiscount =
|
|
139
|
+
* await client.sales.volumeDiscounts.delete(
|
|
140
|
+
* 'quds_bn7hto9s10pp',
|
|
141
|
+
* );
|
|
142
|
+
* ```
|
|
143
|
+
*/
|
|
144
|
+
delete(id, options) {
|
|
145
|
+
return this._client.delete(path `/v1/sales/volume-discounts/${id}`, options);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
//# sourceMappingURL=volume-discounts.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"volume-discounts.mjs","sourceRoot":"","sources":["../../src/resources/sales/volume-discounts.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OASf,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,WAAW;IAC9C;;;;;;;;;;;;;;;;OAgBG;IACH,IAAI,CACF,QAAqD,EAAE,EACvD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,QAAQ,CACN,EAAU,EACV,QAAyD,EAAE,EAC3D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,8BAA8B,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzF,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,MAAM,CAAC,MAAkC,EAAE,OAAwB;QACjE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACpC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,4BAA4B,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnG,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,MAAM,CACJ,EAAU,EACV,MAAkC,EAClC,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACpC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,8BAA8B,EAAE,EAAE,EAAE;YAChE,KAAK,EAAE,EAAE,OAAO,EAAE;YAClB,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,8BAA8B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC;CACF"}
|
package/src/client.ts
CHANGED
|
@@ -722,7 +722,7 @@ export class Augno {
|
|
|
722
722
|
{
|
|
723
723
|
Accept: 'application/json',
|
|
724
724
|
'User-Agent': this.getUserAgent(),
|
|
725
|
-
'Augno-Version': '1.0.forge-preview.
|
|
725
|
+
'Augno-Version': '1.0.forge-preview.3',
|
|
726
726
|
'Augno-Account': this.augnoAccountID,
|
|
727
727
|
},
|
|
728
728
|
await this.authHeaders(options),
|
|
@@ -29,8 +29,13 @@ export class Actions extends APIResource {
|
|
|
29
29
|
* });
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
-
bulkUpsert(
|
|
33
|
-
|
|
32
|
+
bulkUpsert(params: ActionBulkUpsertParams, options?: RequestOptions): APIPromise<JobsAPI.Job> {
|
|
33
|
+
const { include, ...body } = params;
|
|
34
|
+
return this._client.post('/v1/catalog/item-categories/actions/bulk-upsert', {
|
|
35
|
+
query: { include },
|
|
36
|
+
body,
|
|
37
|
+
...options,
|
|
38
|
+
});
|
|
34
39
|
}
|
|
35
40
|
}
|
|
36
41
|
|
|
@@ -97,9 +102,16 @@ export interface UpsertItemCategoryInput {
|
|
|
97
102
|
|
|
98
103
|
export interface ActionBulkUpsertParams {
|
|
99
104
|
/**
|
|
100
|
-
* Item categories to create or update, matched by name within the
|
|
105
|
+
* Body param: Item categories to create or update, matched by name within the
|
|
106
|
+
* account.
|
|
101
107
|
*/
|
|
102
108
|
item_categories: Array<UpsertItemCategoryInput>;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Query param: Sub-objects to expand in the response. When omitted, sub-objects
|
|
112
|
+
* are returned as `null`.
|
|
113
|
+
*/
|
|
114
|
+
include?: Array<'created_by' | 'created_by.role'>;
|
|
103
115
|
}
|
|
104
116
|
|
|
105
117
|
export declare namespace Actions {
|
|
@@ -29,8 +29,13 @@ export class Actions extends APIResource {
|
|
|
29
29
|
* });
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
-
bulkUpsert(
|
|
33
|
-
|
|
32
|
+
bulkUpsert(params: ActionBulkUpsertParams, options?: RequestOptions): APIPromise<JobsAPI.Job> {
|
|
33
|
+
const { include, ...body } = params;
|
|
34
|
+
return this._client.post('/v1/catalog/materials/actions/bulk-upsert', {
|
|
35
|
+
query: { include },
|
|
36
|
+
body,
|
|
37
|
+
...options,
|
|
38
|
+
});
|
|
34
39
|
}
|
|
35
40
|
}
|
|
36
41
|
|
|
@@ -126,9 +131,15 @@ export interface UpsertMaterialProperty {
|
|
|
126
131
|
|
|
127
132
|
export interface ActionBulkUpsertParams {
|
|
128
133
|
/**
|
|
129
|
-
* Materials to create or update, matched by SKU within the account.
|
|
134
|
+
* Body param: Materials to create or update, matched by SKU within the account.
|
|
130
135
|
*/
|
|
131
136
|
materials: Array<UpsertMaterialInput>;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Query param: Sub-objects to expand in the response. When omitted, sub-objects
|
|
140
|
+
* are returned as `null`.
|
|
141
|
+
*/
|
|
142
|
+
include?: Array<'created_by' | 'created_by.role'>;
|
|
132
143
|
}
|
|
133
144
|
|
|
134
145
|
export declare namespace Actions {
|
|
@@ -28,8 +28,13 @@ export class Actions extends APIResource {
|
|
|
28
28
|
* });
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
|
-
bulkUpsert(
|
|
32
|
-
|
|
31
|
+
bulkUpsert(params: ActionBulkUpsertParams, options?: RequestOptions): APIPromise<JobsAPI.Job> {
|
|
32
|
+
const { include, ...body } = params;
|
|
33
|
+
return this._client.post('/v1/catalog/parts/actions/bulk-upsert', {
|
|
34
|
+
query: { include },
|
|
35
|
+
body,
|
|
36
|
+
...options,
|
|
37
|
+
});
|
|
33
38
|
}
|
|
34
39
|
}
|
|
35
40
|
|
|
@@ -114,9 +119,15 @@ export interface UpsertPartProperty {
|
|
|
114
119
|
|
|
115
120
|
export interface ActionBulkUpsertParams {
|
|
116
121
|
/**
|
|
117
|
-
* Parts to create or update, matched by SKU within the account.
|
|
122
|
+
* Body param: Parts to create or update, matched by SKU within the account.
|
|
118
123
|
*/
|
|
119
124
|
parts: Array<UpsertPartInput>;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Query param: Sub-objects to expand in the response. When omitted, sub-objects
|
|
128
|
+
* are returned as `null`.
|
|
129
|
+
*/
|
|
130
|
+
include?: Array<'created_by' | 'created_by.role'>;
|
|
120
131
|
}
|
|
121
132
|
|
|
122
133
|
export declare namespace Actions {
|
|
@@ -29,8 +29,13 @@ export class Actions extends APIResource {
|
|
|
29
29
|
* });
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
-
bulkUpsert(
|
|
33
|
-
|
|
32
|
+
bulkUpsert(params: ActionBulkUpsertParams, options?: RequestOptions): APIPromise<JobsAPI.Job> {
|
|
33
|
+
const { include, ...body } = params;
|
|
34
|
+
return this._client.post('/v1/catalog/product-lines/actions/bulk-upsert', {
|
|
35
|
+
query: { include },
|
|
36
|
+
body,
|
|
37
|
+
...options,
|
|
38
|
+
});
|
|
34
39
|
}
|
|
35
40
|
}
|
|
36
41
|
|
|
@@ -83,9 +88,16 @@ export interface UpsertProductLineInput {
|
|
|
83
88
|
|
|
84
89
|
export interface ActionBulkUpsertParams {
|
|
85
90
|
/**
|
|
86
|
-
* Product lines to create or update, matched by name within the
|
|
91
|
+
* Body param: Product lines to create or update, matched by name within the
|
|
92
|
+
* account.
|
|
87
93
|
*/
|
|
88
94
|
product_lines: Array<UpsertProductLineInput>;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Query param: Sub-objects to expand in the response. When omitted, sub-objects
|
|
98
|
+
* are returned as `null`.
|
|
99
|
+
*/
|
|
100
|
+
include?: Array<'created_by' | 'created_by.role'>;
|
|
89
101
|
}
|
|
90
102
|
|
|
91
103
|
export declare namespace Actions {
|
|
@@ -29,8 +29,13 @@ export class Actions extends APIResource {
|
|
|
29
29
|
* });
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
-
bulkUpsert(
|
|
33
|
-
|
|
32
|
+
bulkUpsert(params: ActionBulkUpsertParams, options?: RequestOptions): APIPromise<JobsAPI.Job> {
|
|
33
|
+
const { include, ...body } = params;
|
|
34
|
+
return this._client.post('/v1/catalog/products/actions/bulk-upsert', {
|
|
35
|
+
query: { include },
|
|
36
|
+
body,
|
|
37
|
+
...options,
|
|
38
|
+
});
|
|
34
39
|
}
|
|
35
40
|
}
|
|
36
41
|
|
|
@@ -133,9 +138,15 @@ export interface UpsertProductProperty {
|
|
|
133
138
|
|
|
134
139
|
export interface ActionBulkUpsertParams {
|
|
135
140
|
/**
|
|
136
|
-
* Products to create or update, matched by SKU within the account.
|
|
141
|
+
* Body param: Products to create or update, matched by SKU within the account.
|
|
137
142
|
*/
|
|
138
143
|
products: Array<UpsertProductInput>;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Query param: Sub-objects to expand in the response. When omitted, sub-objects
|
|
147
|
+
* are returned as `null`.
|
|
148
|
+
*/
|
|
149
|
+
include?: Array<'created_by' | 'created_by.role'>;
|
|
139
150
|
}
|
|
140
151
|
|
|
141
152
|
export declare namespace Actions {
|
|
@@ -27,8 +27,13 @@ export class Actions extends APIResource {
|
|
|
27
27
|
* });
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
|
-
bulkUpsert(
|
|
31
|
-
|
|
30
|
+
bulkUpsert(params: ActionBulkUpsertParams, options?: RequestOptions): APIPromise<JobsAPI.Job> {
|
|
31
|
+
const { include, ...body } = params;
|
|
32
|
+
return this._client.post('/v1/catalog/properties/actions/bulk-upsert', {
|
|
33
|
+
query: { include },
|
|
34
|
+
body,
|
|
35
|
+
...options,
|
|
36
|
+
});
|
|
32
37
|
}
|
|
33
38
|
}
|
|
34
39
|
|
|
@@ -86,10 +91,16 @@ export interface UpsertPropertyInput {
|
|
|
86
91
|
|
|
87
92
|
export interface ActionBulkUpsertParams {
|
|
88
93
|
/**
|
|
89
|
-
* Properties to create or update, matched by name (case-insensitive)
|
|
90
|
-
* account.
|
|
94
|
+
* Body param: Properties to create or update, matched by name (case-insensitive)
|
|
95
|
+
* within the account.
|
|
91
96
|
*/
|
|
92
97
|
properties: Array<UpsertPropertyInput>;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Query param: Sub-objects to expand in the response. When omitted, sub-objects
|
|
101
|
+
* are returned as `null`.
|
|
102
|
+
*/
|
|
103
|
+
include?: Array<'created_by' | 'created_by.role'>;
|
|
93
104
|
}
|
|
94
105
|
|
|
95
106
|
export declare namespace Actions {
|
|
@@ -33,8 +33,13 @@ export class Actions extends APIResource {
|
|
|
33
33
|
* });
|
|
34
34
|
* ```
|
|
35
35
|
*/
|
|
36
|
-
bulkUpsert(
|
|
37
|
-
|
|
36
|
+
bulkUpsert(params: ActionBulkUpsertParams, options?: RequestOptions): APIPromise<JobsAPI.Job> {
|
|
37
|
+
const { include, ...body } = params;
|
|
38
|
+
return this._client.post('/v1/catalog/unit-groups/actions/bulk-upsert', {
|
|
39
|
+
query: { include },
|
|
40
|
+
body,
|
|
41
|
+
...options,
|
|
42
|
+
});
|
|
38
43
|
}
|
|
39
44
|
}
|
|
40
45
|
|
|
@@ -123,9 +128,15 @@ export interface UpsertUnitGroupInput {
|
|
|
123
128
|
|
|
124
129
|
export interface ActionBulkUpsertParams {
|
|
125
130
|
/**
|
|
126
|
-
* Unit groups to create or update, matched by name within the account.
|
|
131
|
+
* Body param: Unit groups to create or update, matched by name within the account.
|
|
127
132
|
*/
|
|
128
133
|
unit_groups: Array<UpsertUnitGroupInput>;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Query param: Sub-objects to expand in the response. When omitted, sub-objects
|
|
137
|
+
* are returned as `null`.
|
|
138
|
+
*/
|
|
139
|
+
include?: Array<'created_by' | 'created_by.role'>;
|
|
129
140
|
}
|
|
130
141
|
|
|
131
142
|
export declare namespace Actions {
|
|
@@ -31,8 +31,13 @@ export class Actions extends APIResource {
|
|
|
31
31
|
* });
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
34
|
-
bulkUpsert(
|
|
35
|
-
|
|
34
|
+
bulkUpsert(params: ActionBulkUpsertParams, options?: RequestOptions): APIPromise<JobsAPI.Job> {
|
|
35
|
+
const { include, ...body } = params;
|
|
36
|
+
return this._client.post('/v1/catalog/units/actions/bulk-upsert', {
|
|
37
|
+
query: { include },
|
|
38
|
+
body,
|
|
39
|
+
...options,
|
|
40
|
+
});
|
|
36
41
|
}
|
|
37
42
|
}
|
|
38
43
|
|
|
@@ -96,9 +101,16 @@ export interface UpsertUnitInput {
|
|
|
96
101
|
|
|
97
102
|
export interface ActionBulkUpsertParams {
|
|
98
103
|
/**
|
|
99
|
-
* Units to create or update, matched by name or abbreviation within
|
|
104
|
+
* Body param: Units to create or update, matched by name or abbreviation within
|
|
105
|
+
* the account.
|
|
100
106
|
*/
|
|
101
107
|
units: Array<UpsertUnitInput>;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Query param: Sub-objects to expand in the response. When omitted, sub-objects
|
|
111
|
+
* are returned as `null`.
|
|
112
|
+
*/
|
|
113
|
+
include?: Array<'created_by' | 'created_by.role'>;
|
|
102
114
|
}
|
|
103
115
|
|
|
104
116
|
export declare namespace Actions {
|