@revenexx/cli 0.0.3 → 0.0.4
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/README.md +2 -2
- package/dist/bundle-win-arm64.mjs +2395 -235
- package/dist/cli.cjs +2395 -235
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/commands/services/carts.d.ts.map +1 -1
- package/dist/lib/commands/services/channels.d.ts.map +1 -1
- package/dist/lib/commands/services/customers.d.ts.map +1 -1
- package/dist/lib/commands/services/inventories.d.ts.map +1 -1
- package/dist/lib/commands/services/markets.d.ts.map +1 -1
- package/dist/lib/commands/services/orders.d.ts.map +1 -1
- package/dist/lib/commands/services/payments.d.ts.map +1 -1
- package/dist/lib/commands/services/prices.d.ts.map +1 -1
- package/dist/lib/commands/services/products.d.ts.map +1 -1
- package/dist/lib/commands/services/shipping.d.ts.map +1 -1
- package/dist/lib/constants.d.ts +1 -1
- package/package.json +1 -1
|
@@ -77473,7 +77473,7 @@ var package_default = {
|
|
|
77473
77473
|
type: "module",
|
|
77474
77474
|
homepage: "https://revenexx.com",
|
|
77475
77475
|
description: "Revenexx CLI.",
|
|
77476
|
-
version: "0.0.
|
|
77476
|
+
version: "0.0.4",
|
|
77477
77477
|
license: "MIT",
|
|
77478
77478
|
main: "dist/index.cjs",
|
|
77479
77479
|
module: "dist/index.js",
|
|
@@ -92507,7 +92507,7 @@ var ConfigSchema = external_exports.object({
|
|
|
92507
92507
|
// lib/constants.ts
|
|
92508
92508
|
var SDK_TITLE = "RevenexxAPIRevenexx";
|
|
92509
92509
|
var SDK_TITLE_LOWER = "revenexx api \u2014 revenexx";
|
|
92510
|
-
var SDK_VERSION = "0.0.
|
|
92510
|
+
var SDK_VERSION = "0.0.4";
|
|
92511
92511
|
var SDK_NAME = "Revenexx CLI";
|
|
92512
92512
|
var SDK_PLATFORM = "";
|
|
92513
92513
|
var SDK_LANGUAGE = "cli";
|
|
@@ -98158,12 +98158,40 @@ carts.command(`carts-list`).description(``).action(
|
|
|
98158
98158
|
}
|
|
98159
98159
|
)
|
|
98160
98160
|
);
|
|
98161
|
-
carts.command(`carts-create`).description(``).
|
|
98161
|
+
carts.command(`carts-create`).description(``).option(`--channel-_id <channel-_id>`, ``).option(`--contact-_id <contact-_id>`, `Owning customer contact.`).option(`--currency <currency>`, `ISO 4217 code (default EUR).`).option(
|
|
98162
|
+
`--is-_current [value]`,
|
|
98163
|
+
`Make this THE current cart of its owner.`,
|
|
98164
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
98165
|
+
).option(`--market-_id <market-_id>`, ``).option(`--metadata <metadata>`, `Free-form metadata.`).option(`--name <name>`, `Display name (default 'Cart').`).option(`--session-_key <session-_key>`, `Owning guest session.`).action(
|
|
98162
98166
|
actionRunner(
|
|
98163
|
-
async () => {
|
|
98167
|
+
async ({ channel_id, contact_id, currency, is_current, market_id, metadata, name, session_key }) => {
|
|
98164
98168
|
const _client = await sdkForProject();
|
|
98165
98169
|
const _apiPath = `/carts`;
|
|
98166
98170
|
const _payload = {};
|
|
98171
|
+
if (channel_id !== void 0) {
|
|
98172
|
+
_payload[`channel_id`] = channel_id;
|
|
98173
|
+
}
|
|
98174
|
+
if (contact_id !== void 0) {
|
|
98175
|
+
_payload[`contact_id`] = contact_id;
|
|
98176
|
+
}
|
|
98177
|
+
if (currency !== void 0) {
|
|
98178
|
+
_payload[`currency`] = currency;
|
|
98179
|
+
}
|
|
98180
|
+
if (is_current !== void 0) {
|
|
98181
|
+
_payload[`is_current`] = is_current;
|
|
98182
|
+
}
|
|
98183
|
+
if (market_id !== void 0) {
|
|
98184
|
+
_payload[`market_id`] = market_id;
|
|
98185
|
+
}
|
|
98186
|
+
if (metadata !== void 0) {
|
|
98187
|
+
_payload[`metadata`] = JSON.parse(metadata);
|
|
98188
|
+
}
|
|
98189
|
+
if (name !== void 0) {
|
|
98190
|
+
_payload[`name`] = name;
|
|
98191
|
+
}
|
|
98192
|
+
if (session_key !== void 0) {
|
|
98193
|
+
_payload[`session_key`] = session_key;
|
|
98194
|
+
}
|
|
98167
98195
|
const _headers = {
|
|
98168
98196
|
"content-type": "application/json"
|
|
98169
98197
|
};
|
|
@@ -98177,12 +98205,21 @@ carts.command(`carts-create`).description(``).action(
|
|
|
98177
98205
|
}
|
|
98178
98206
|
)
|
|
98179
98207
|
);
|
|
98180
|
-
carts.command(`carts-claim`).description(``).action(
|
|
98208
|
+
carts.command(`carts-claim`).description(``).requiredOption(`--contact-_id <contact-_id>`, `Contact taking ownership.`).requiredOption(`--session-_key <session-_key>`, `Guest session whose active carts are handed over.`).option(`--target-_cart-_id <target-_cart-_id>`, `Merge the session carts into this cart instead of adopting them.`).action(
|
|
98181
98209
|
actionRunner(
|
|
98182
|
-
async () => {
|
|
98210
|
+
async ({ contact_id, session_key, target_cart_id }) => {
|
|
98183
98211
|
const _client = await sdkForProject();
|
|
98184
98212
|
const _apiPath = `/carts/claim`;
|
|
98185
98213
|
const _payload = {};
|
|
98214
|
+
if (contact_id !== void 0) {
|
|
98215
|
+
_payload[`contact_id`] = contact_id;
|
|
98216
|
+
}
|
|
98217
|
+
if (session_key !== void 0) {
|
|
98218
|
+
_payload[`session_key`] = session_key;
|
|
98219
|
+
}
|
|
98220
|
+
if (target_cart_id !== void 0) {
|
|
98221
|
+
_payload[`target_cart_id`] = target_cart_id;
|
|
98222
|
+
}
|
|
98186
98223
|
const _headers = {
|
|
98187
98224
|
"content-type": "application/json"
|
|
98188
98225
|
};
|
|
@@ -98196,12 +98233,33 @@ carts.command(`carts-claim`).description(``).action(
|
|
|
98196
98233
|
}
|
|
98197
98234
|
)
|
|
98198
98235
|
);
|
|
98199
|
-
carts.command(`carts-import`).description(``).action(
|
|
98236
|
+
carts.command(`carts-import`).description(``).option(`--contact-_id <contact-_id>`, `Owner of a newly created cart.`).option(`--csv <csv>`, `Raw CSV content (alternative to payload for csv profiles).`).option(`--name <name>`, `Name for a newly created cart.`).option(`--payload <payload>`, `The import payload: '{cart, items}' object, or a raw JSON/CSV string in the profile's format.`).option(`--profile-_id <profile-_id>`, `Import profile to run; ad-hoc import when omitted.`).option(`--session-_key <session-_key>`, `Guest owner of a newly created cart.`).option(`--target-_cart-_id <target-_cart-_id>`, `Existing active cart to import into.`).action(
|
|
98200
98237
|
actionRunner(
|
|
98201
|
-
async () => {
|
|
98238
|
+
async ({ contact_id, csv, name, payload, profile_id, session_key, target_cart_id }) => {
|
|
98202
98239
|
const _client = await sdkForProject();
|
|
98203
98240
|
const _apiPath = `/carts/import`;
|
|
98204
98241
|
const _payload = {};
|
|
98242
|
+
if (contact_id !== void 0) {
|
|
98243
|
+
_payload[`contact_id`] = contact_id;
|
|
98244
|
+
}
|
|
98245
|
+
if (csv !== void 0) {
|
|
98246
|
+
_payload[`csv`] = csv;
|
|
98247
|
+
}
|
|
98248
|
+
if (name !== void 0) {
|
|
98249
|
+
_payload[`name`] = name;
|
|
98250
|
+
}
|
|
98251
|
+
if (payload !== void 0) {
|
|
98252
|
+
_payload[`payload`] = JSON.parse(payload);
|
|
98253
|
+
}
|
|
98254
|
+
if (profile_id !== void 0) {
|
|
98255
|
+
_payload[`profile_id`] = profile_id;
|
|
98256
|
+
}
|
|
98257
|
+
if (session_key !== void 0) {
|
|
98258
|
+
_payload[`session_key`] = session_key;
|
|
98259
|
+
}
|
|
98260
|
+
if (target_cart_id !== void 0) {
|
|
98261
|
+
_payload[`target_cart_id`] = target_cart_id;
|
|
98262
|
+
}
|
|
98205
98263
|
const _headers = {
|
|
98206
98264
|
"content-type": "application/json"
|
|
98207
98265
|
};
|
|
@@ -98234,12 +98292,40 @@ carts.command(`carts-io-profiles-list`).description(``).action(
|
|
|
98234
98292
|
}
|
|
98235
98293
|
)
|
|
98236
98294
|
);
|
|
98237
|
-
carts.command(`carts-io-profiles-create`).description(``).
|
|
98295
|
+
carts.command(`carts-io-profiles-create`).description(``).requiredOption(`--direction <direction>`, ``).requiredOption(`--name <name>`, ``).option(`--apply-_mode <apply-_mode>`, `Default 'insert'.`).option(`--entity <entity>`, `Default 'carts'.`).option(`--format <format>`, `Default 'json'.`).option(
|
|
98296
|
+
`--is-_template [value]`,
|
|
98297
|
+
``,
|
|
98298
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
98299
|
+
).option(`--mapping <mapping>`, `Column mapping (Baseline-IO-compatible).`).option(`--options <options>`, ``).action(
|
|
98238
98300
|
actionRunner(
|
|
98239
|
-
async () => {
|
|
98301
|
+
async ({ direction, name, apply_mode, entity, format, is_template, mapping, options }) => {
|
|
98240
98302
|
const _client = await sdkForProject();
|
|
98241
98303
|
const _apiPath = `/carts/io/profiles`;
|
|
98242
98304
|
const _payload = {};
|
|
98305
|
+
if (apply_mode !== void 0) {
|
|
98306
|
+
_payload[`apply_mode`] = apply_mode;
|
|
98307
|
+
}
|
|
98308
|
+
if (direction !== void 0) {
|
|
98309
|
+
_payload[`direction`] = direction;
|
|
98310
|
+
}
|
|
98311
|
+
if (entity !== void 0) {
|
|
98312
|
+
_payload[`entity`] = entity;
|
|
98313
|
+
}
|
|
98314
|
+
if (format !== void 0) {
|
|
98315
|
+
_payload[`format`] = format;
|
|
98316
|
+
}
|
|
98317
|
+
if (is_template !== void 0) {
|
|
98318
|
+
_payload[`is_template`] = is_template;
|
|
98319
|
+
}
|
|
98320
|
+
if (mapping !== void 0) {
|
|
98321
|
+
_payload[`mapping`] = JSON.parse(mapping);
|
|
98322
|
+
}
|
|
98323
|
+
if (name !== void 0) {
|
|
98324
|
+
_payload[`name`] = name;
|
|
98325
|
+
}
|
|
98326
|
+
if (options !== void 0) {
|
|
98327
|
+
_payload[`options`] = JSON.parse(options);
|
|
98328
|
+
}
|
|
98243
98329
|
const _headers = {
|
|
98244
98330
|
"content-type": "application/json"
|
|
98245
98331
|
};
|
|
@@ -98310,12 +98396,40 @@ carts.command(`carts-io-profiles-get`).description(``).requiredOption(`--id <id>
|
|
|
98310
98396
|
}
|
|
98311
98397
|
)
|
|
98312
98398
|
);
|
|
98313
|
-
carts.command(`carts-io-profiles-update`).description(``).requiredOption(`--id <id>`, ``).
|
|
98399
|
+
carts.command(`carts-io-profiles-update`).description(``).requiredOption(`--id <id>`, ``).option(`--apply-_mode <apply-_mode>`, `Default 'insert'.`).option(`--direction <direction>`, ``).option(`--entity <entity>`, `Default 'carts'.`).option(`--format <format>`, `Default 'json'.`).option(
|
|
98400
|
+
`--is-_template [value]`,
|
|
98401
|
+
``,
|
|
98402
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
98403
|
+
).option(`--mapping <mapping>`, `Column mapping (Baseline-IO-compatible).`).option(`--name <name>`, ``).option(`--options <options>`, ``).action(
|
|
98314
98404
|
actionRunner(
|
|
98315
|
-
async ({ id }) => {
|
|
98405
|
+
async ({ id, apply_mode, direction, entity, format, is_template, mapping, name, options }) => {
|
|
98316
98406
|
const _client = await sdkForProject();
|
|
98317
98407
|
const _apiPath = `/carts/io/profiles/{id}`.replace(`{id}`, id);
|
|
98318
98408
|
const _payload = {};
|
|
98409
|
+
if (apply_mode !== void 0) {
|
|
98410
|
+
_payload[`apply_mode`] = apply_mode;
|
|
98411
|
+
}
|
|
98412
|
+
if (direction !== void 0) {
|
|
98413
|
+
_payload[`direction`] = direction;
|
|
98414
|
+
}
|
|
98415
|
+
if (entity !== void 0) {
|
|
98416
|
+
_payload[`entity`] = entity;
|
|
98417
|
+
}
|
|
98418
|
+
if (format !== void 0) {
|
|
98419
|
+
_payload[`format`] = format;
|
|
98420
|
+
}
|
|
98421
|
+
if (is_template !== void 0) {
|
|
98422
|
+
_payload[`is_template`] = is_template;
|
|
98423
|
+
}
|
|
98424
|
+
if (mapping !== void 0) {
|
|
98425
|
+
_payload[`mapping`] = JSON.parse(mapping);
|
|
98426
|
+
}
|
|
98427
|
+
if (name !== void 0) {
|
|
98428
|
+
_payload[`name`] = name;
|
|
98429
|
+
}
|
|
98430
|
+
if (options !== void 0) {
|
|
98431
|
+
_payload[`options`] = JSON.parse(options);
|
|
98432
|
+
}
|
|
98319
98433
|
const _headers = {
|
|
98320
98434
|
"content-type": "application/json"
|
|
98321
98435
|
};
|
|
@@ -98329,12 +98443,18 @@ carts.command(`carts-io-profiles-update`).description(``).requiredOption(`--id <
|
|
|
98329
98443
|
}
|
|
98330
98444
|
)
|
|
98331
98445
|
);
|
|
98332
|
-
carts.command(`carts-merge`).description(``).action(
|
|
98446
|
+
carts.command(`carts-merge`).description(``).requiredOption(`--source-_cart-_id <source-_cart-_id>`, `Cart whose lines move into the target (becomes status merged).`).requiredOption(`--target-_cart-_id <target-_cart-_id>`, `Receiving cart (must be active).`).action(
|
|
98333
98447
|
actionRunner(
|
|
98334
|
-
async () => {
|
|
98448
|
+
async ({ source_cart_id, target_cart_id }) => {
|
|
98335
98449
|
const _client = await sdkForProject();
|
|
98336
98450
|
const _apiPath = `/carts/merge`;
|
|
98337
98451
|
const _payload = {};
|
|
98452
|
+
if (source_cart_id !== void 0) {
|
|
98453
|
+
_payload[`source_cart_id`] = source_cart_id;
|
|
98454
|
+
}
|
|
98455
|
+
if (target_cart_id !== void 0) {
|
|
98456
|
+
_payload[`target_cart_id`] = target_cart_id;
|
|
98457
|
+
}
|
|
98338
98458
|
const _headers = {
|
|
98339
98459
|
"content-type": "application/json"
|
|
98340
98460
|
};
|
|
@@ -98367,12 +98487,51 @@ carts.command(`carts-items-list`).description(``).requiredOption(`--cart-_id <ca
|
|
|
98367
98487
|
}
|
|
98368
98488
|
)
|
|
98369
98489
|
);
|
|
98370
|
-
carts.command(`carts-items-create`).description(``).requiredOption(`--cart-_id <cart-_id>`, ``).action(
|
|
98490
|
+
carts.command(`carts-items-create`).description(``).requiredOption(`--cart-_id <cart-_id>`, ``).option(`--configuration <configuration>`, `Free-form configuration \u2014 configured lines never merge.`).option(`--currency <currency>`, `Defaults to the cart's currency.`).option(`--metadata <metadata>`, `Free-form metadata.`).option(`--name <name>`, `Falls back to 'sku' when omitted.`).option(`--position <position>`, ``, parseInteger).option(`--product-_id <product-_id>`, ``).option(`--quantity <quantity>`, `Default 1.`, parseInteger).option(`--sku <sku>`, ``).option(`--snapshot <snapshot>`, `Loose product snapshot at add-time (price, name, image, \u2026).`).option(`--tax-_rate <tax-_rate>`, ``, parseInteger).option(`--type <type>`, `Line type (default 'product'). Plain product lines merge by product+price; configurations always stand alone.`).option(`--unit <unit>`, ``).option(`--unit-_price <unit-_price>`, `Per-unit net price \u2014 line_total is always derived.`, parseInteger).action(
|
|
98371
98491
|
actionRunner(
|
|
98372
|
-
async ({ cart_id }) => {
|
|
98492
|
+
async ({ cart_id, configuration, currency, metadata, name, position, product_id, quantity, sku, snapshot, tax_rate, type, unit, unit_price }) => {
|
|
98373
98493
|
const _client = await sdkForProject();
|
|
98374
98494
|
const _apiPath = `/carts/{cart_id}/items`.replace(`{cart_id}`, cart_id);
|
|
98375
98495
|
const _payload = {};
|
|
98496
|
+
if (configuration !== void 0) {
|
|
98497
|
+
_payload[`configuration`] = JSON.parse(configuration);
|
|
98498
|
+
}
|
|
98499
|
+
if (currency !== void 0) {
|
|
98500
|
+
_payload[`currency`] = currency;
|
|
98501
|
+
}
|
|
98502
|
+
if (metadata !== void 0) {
|
|
98503
|
+
_payload[`metadata`] = JSON.parse(metadata);
|
|
98504
|
+
}
|
|
98505
|
+
if (name !== void 0) {
|
|
98506
|
+
_payload[`name`] = name;
|
|
98507
|
+
}
|
|
98508
|
+
if (position !== void 0) {
|
|
98509
|
+
_payload[`position`] = position;
|
|
98510
|
+
}
|
|
98511
|
+
if (product_id !== void 0) {
|
|
98512
|
+
_payload[`product_id`] = product_id;
|
|
98513
|
+
}
|
|
98514
|
+
if (quantity !== void 0) {
|
|
98515
|
+
_payload[`quantity`] = quantity;
|
|
98516
|
+
}
|
|
98517
|
+
if (sku !== void 0) {
|
|
98518
|
+
_payload[`sku`] = sku;
|
|
98519
|
+
}
|
|
98520
|
+
if (snapshot !== void 0) {
|
|
98521
|
+
_payload[`snapshot`] = JSON.parse(snapshot);
|
|
98522
|
+
}
|
|
98523
|
+
if (tax_rate !== void 0) {
|
|
98524
|
+
_payload[`tax_rate`] = tax_rate;
|
|
98525
|
+
}
|
|
98526
|
+
if (type !== void 0) {
|
|
98527
|
+
_payload[`type`] = type;
|
|
98528
|
+
}
|
|
98529
|
+
if (unit !== void 0) {
|
|
98530
|
+
_payload[`unit`] = unit;
|
|
98531
|
+
}
|
|
98532
|
+
if (unit_price !== void 0) {
|
|
98533
|
+
_payload[`unit_price`] = unit_price;
|
|
98534
|
+
}
|
|
98376
98535
|
const _headers = {
|
|
98377
98536
|
"content-type": "application/json"
|
|
98378
98537
|
};
|
|
@@ -98386,12 +98545,15 @@ carts.command(`carts-items-create`).description(``).requiredOption(`--cart-_id <
|
|
|
98386
98545
|
}
|
|
98387
98546
|
)
|
|
98388
98547
|
);
|
|
98389
|
-
carts.command(`carts-items-replace`).description(``).requiredOption(`--cart-_id <cart-_id>`, ``).action(
|
|
98548
|
+
carts.command(`carts-items-replace`).description(``).requiredOption(`--cart-_id <cart-_id>`, ``).requiredOption(`--items [items...]`, `The complete new item set (set semantics).`).action(
|
|
98390
98549
|
actionRunner(
|
|
98391
|
-
async ({ cart_id }) => {
|
|
98550
|
+
async ({ cart_id, items }) => {
|
|
98392
98551
|
const _client = await sdkForProject();
|
|
98393
98552
|
const _apiPath = `/carts/{cart_id}/items`.replace(`{cart_id}`, cart_id);
|
|
98394
98553
|
const _payload = {};
|
|
98554
|
+
if (items !== void 0) {
|
|
98555
|
+
_payload[`items`] = items;
|
|
98556
|
+
}
|
|
98395
98557
|
const _headers = {
|
|
98396
98558
|
"content-type": "application/json"
|
|
98397
98559
|
};
|
|
@@ -98443,12 +98605,51 @@ carts.command(`carts-items-get`).description(``).requiredOption(`--cart-_id <car
|
|
|
98443
98605
|
}
|
|
98444
98606
|
)
|
|
98445
98607
|
);
|
|
98446
|
-
carts.command(`carts-items-update`).description(``).requiredOption(`--cart-_id <cart-_id>`, ``).requiredOption(`--id <id>`, ``).action(
|
|
98608
|
+
carts.command(`carts-items-update`).description(``).requiredOption(`--cart-_id <cart-_id>`, ``).requiredOption(`--id <id>`, ``).option(`--configuration <configuration>`, `Free-form configuration \u2014 configured lines never merge.`).option(`--currency <currency>`, `Defaults to the cart's currency.`).option(`--metadata <metadata>`, `Free-form metadata.`).option(`--name <name>`, `Falls back to 'sku' when omitted.`).option(`--position <position>`, ``, parseInteger).option(`--product-_id <product-_id>`, ``).option(`--quantity <quantity>`, `Default 1.`, parseInteger).option(`--sku <sku>`, ``).option(`--snapshot <snapshot>`, `Loose product snapshot at add-time (price, name, image, \u2026).`).option(`--tax-_rate <tax-_rate>`, ``, parseInteger).option(`--type <type>`, `Line type (default 'product'). Plain product lines merge by product+price; configurations always stand alone.`).option(`--unit <unit>`, ``).option(`--unit-_price <unit-_price>`, `Per-unit net price \u2014 line_total is always derived.`, parseInteger).action(
|
|
98447
98609
|
actionRunner(
|
|
98448
|
-
async ({ cart_id, id }) => {
|
|
98610
|
+
async ({ cart_id, id, configuration, currency, metadata, name, position, product_id, quantity, sku, snapshot, tax_rate, type, unit, unit_price }) => {
|
|
98449
98611
|
const _client = await sdkForProject();
|
|
98450
98612
|
const _apiPath = `/carts/{cart_id}/items/{id}`.replace(`{cart_id}`, cart_id).replace(`{id}`, id);
|
|
98451
98613
|
const _payload = {};
|
|
98614
|
+
if (configuration !== void 0) {
|
|
98615
|
+
_payload[`configuration`] = JSON.parse(configuration);
|
|
98616
|
+
}
|
|
98617
|
+
if (currency !== void 0) {
|
|
98618
|
+
_payload[`currency`] = currency;
|
|
98619
|
+
}
|
|
98620
|
+
if (metadata !== void 0) {
|
|
98621
|
+
_payload[`metadata`] = JSON.parse(metadata);
|
|
98622
|
+
}
|
|
98623
|
+
if (name !== void 0) {
|
|
98624
|
+
_payload[`name`] = name;
|
|
98625
|
+
}
|
|
98626
|
+
if (position !== void 0) {
|
|
98627
|
+
_payload[`position`] = position;
|
|
98628
|
+
}
|
|
98629
|
+
if (product_id !== void 0) {
|
|
98630
|
+
_payload[`product_id`] = product_id;
|
|
98631
|
+
}
|
|
98632
|
+
if (quantity !== void 0) {
|
|
98633
|
+
_payload[`quantity`] = quantity;
|
|
98634
|
+
}
|
|
98635
|
+
if (sku !== void 0) {
|
|
98636
|
+
_payload[`sku`] = sku;
|
|
98637
|
+
}
|
|
98638
|
+
if (snapshot !== void 0) {
|
|
98639
|
+
_payload[`snapshot`] = JSON.parse(snapshot);
|
|
98640
|
+
}
|
|
98641
|
+
if (tax_rate !== void 0) {
|
|
98642
|
+
_payload[`tax_rate`] = tax_rate;
|
|
98643
|
+
}
|
|
98644
|
+
if (type !== void 0) {
|
|
98645
|
+
_payload[`type`] = type;
|
|
98646
|
+
}
|
|
98647
|
+
if (unit !== void 0) {
|
|
98648
|
+
_payload[`unit`] = unit;
|
|
98649
|
+
}
|
|
98650
|
+
if (unit_price !== void 0) {
|
|
98651
|
+
_payload[`unit_price`] = unit_price;
|
|
98652
|
+
}
|
|
98452
98653
|
const _headers = {
|
|
98453
98654
|
"content-type": "application/json"
|
|
98454
98655
|
};
|
|
@@ -98500,12 +98701,27 @@ carts.command(`carts-get`).description(``).requiredOption(`--id <id>`, ``).actio
|
|
|
98500
98701
|
}
|
|
98501
98702
|
)
|
|
98502
98703
|
);
|
|
98503
|
-
carts.command(`carts-update`).description(``).requiredOption(`--id <id>`, ``).action(
|
|
98704
|
+
carts.command(`carts-update`).description(``).requiredOption(`--id <id>`, ``).option(`--channel-_id <channel-_id>`, ``).option(`--currency <currency>`, `ISO 4217 code.`).option(`--market-_id <market-_id>`, ``).option(`--metadata <metadata>`, `Free-form metadata.`).option(`--name <name>`, ``).action(
|
|
98504
98705
|
actionRunner(
|
|
98505
|
-
async ({ id }) => {
|
|
98706
|
+
async ({ id, channel_id, currency, market_id, metadata, name }) => {
|
|
98506
98707
|
const _client = await sdkForProject();
|
|
98507
98708
|
const _apiPath = `/carts/{id}`.replace(`{id}`, id);
|
|
98508
98709
|
const _payload = {};
|
|
98710
|
+
if (channel_id !== void 0) {
|
|
98711
|
+
_payload[`channel_id`] = channel_id;
|
|
98712
|
+
}
|
|
98713
|
+
if (currency !== void 0) {
|
|
98714
|
+
_payload[`currency`] = currency;
|
|
98715
|
+
}
|
|
98716
|
+
if (market_id !== void 0) {
|
|
98717
|
+
_payload[`market_id`] = market_id;
|
|
98718
|
+
}
|
|
98719
|
+
if (metadata !== void 0) {
|
|
98720
|
+
_payload[`metadata`] = JSON.parse(metadata);
|
|
98721
|
+
}
|
|
98722
|
+
if (name !== void 0) {
|
|
98723
|
+
_payload[`name`] = name;
|
|
98724
|
+
}
|
|
98509
98725
|
const _headers = {
|
|
98510
98726
|
"content-type": "application/json"
|
|
98511
98727
|
};
|
|
@@ -98557,12 +98773,18 @@ carts.command(`carts-activate`).description(``).requiredOption(`--id <id>`, ``).
|
|
|
98557
98773
|
}
|
|
98558
98774
|
)
|
|
98559
98775
|
);
|
|
98560
|
-
carts.command(`carts-export`).description(``).requiredOption(`--id <id>`, ``).action(
|
|
98776
|
+
carts.command(`carts-export`).description(``).requiredOption(`--id <id>`, ``).option(`--format <format>`, `Ad-hoc export format (only without profile_id).`).option(`--profile-_id <profile-_id>`, `Export profile to run; ad-hoc JSON/CSV export when omitted.`).action(
|
|
98561
98777
|
actionRunner(
|
|
98562
|
-
async ({ id }) => {
|
|
98778
|
+
async ({ id, format, profile_id }) => {
|
|
98563
98779
|
const _client = await sdkForProject();
|
|
98564
98780
|
const _apiPath = `/carts/{id}/export`.replace(`{id}`, id);
|
|
98565
98781
|
const _payload = {};
|
|
98782
|
+
if (format !== void 0) {
|
|
98783
|
+
_payload[`format`] = format;
|
|
98784
|
+
}
|
|
98785
|
+
if (profile_id !== void 0) {
|
|
98786
|
+
_payload[`profile_id`] = profile_id;
|
|
98787
|
+
}
|
|
98566
98788
|
const _headers = {
|
|
98567
98789
|
"content-type": "application/json"
|
|
98568
98790
|
};
|
|
@@ -98576,12 +98798,15 @@ carts.command(`carts-export`).description(``).requiredOption(`--id <id>`, ``).ac
|
|
|
98576
98798
|
}
|
|
98577
98799
|
)
|
|
98578
98800
|
);
|
|
98579
|
-
carts.command(`carts-order`).description(``).requiredOption(`--id <id>`, ``).action(
|
|
98801
|
+
carts.command(`carts-order`).description(``).requiredOption(`--id <id>`, ``).option(`--order-_ref <order-_ref>`, `External order reference from order management.`).action(
|
|
98580
98802
|
actionRunner(
|
|
98581
|
-
async ({ id }) => {
|
|
98803
|
+
async ({ id, order_ref }) => {
|
|
98582
98804
|
const _client = await sdkForProject();
|
|
98583
98805
|
const _apiPath = `/carts/{id}/order`.replace(`{id}`, id);
|
|
98584
98806
|
const _payload = {};
|
|
98807
|
+
if (order_ref !== void 0) {
|
|
98808
|
+
_payload[`order_ref`] = order_ref;
|
|
98809
|
+
}
|
|
98585
98810
|
const _headers = {
|
|
98586
98811
|
"content-type": "application/json"
|
|
98587
98812
|
};
|
|
@@ -98638,12 +98863,37 @@ channels.command(`channels-list`).description(``).action(
|
|
|
98638
98863
|
}
|
|
98639
98864
|
)
|
|
98640
98865
|
);
|
|
98641
|
-
channels.command(`channels-create`).description(``).
|
|
98866
|
+
channels.command(`channels-create`).description(``).requiredOption(`--code <code>`, `Stable channel code, unique per tenant (e.g. shop, punchout-acme).`).requiredOption(`--name <name>`, `Display name.`).option(
|
|
98867
|
+
`--is-_default [value]`,
|
|
98868
|
+
`Mark as the default channel (default false).`,
|
|
98869
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
98870
|
+
).option(`--labels <labels>`, `Localized display names keyed by locale.`).option(`--position <position>`, `Sort position (default 0).`, parseInteger).option(`--status <status>`, `Lifecycle status (default 'active').`).option(`--type <type>`, `Where business happens (default 'storefront').`).action(
|
|
98642
98871
|
actionRunner(
|
|
98643
|
-
async () => {
|
|
98872
|
+
async ({ code, name, is_default: is_default2, labels, position, status, type }) => {
|
|
98644
98873
|
const _client = await sdkForProject();
|
|
98645
98874
|
const _apiPath = `/channels`;
|
|
98646
98875
|
const _payload = {};
|
|
98876
|
+
if (code !== void 0) {
|
|
98877
|
+
_payload[`code`] = code;
|
|
98878
|
+
}
|
|
98879
|
+
if (is_default2 !== void 0) {
|
|
98880
|
+
_payload[`is_default`] = is_default2;
|
|
98881
|
+
}
|
|
98882
|
+
if (labels !== void 0) {
|
|
98883
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
98884
|
+
}
|
|
98885
|
+
if (name !== void 0) {
|
|
98886
|
+
_payload[`name`] = name;
|
|
98887
|
+
}
|
|
98888
|
+
if (position !== void 0) {
|
|
98889
|
+
_payload[`position`] = position;
|
|
98890
|
+
}
|
|
98891
|
+
if (status !== void 0) {
|
|
98892
|
+
_payload[`status`] = status;
|
|
98893
|
+
}
|
|
98894
|
+
if (type !== void 0) {
|
|
98895
|
+
_payload[`type`] = type;
|
|
98896
|
+
}
|
|
98647
98897
|
const _headers = {
|
|
98648
98898
|
"content-type": "application/json"
|
|
98649
98899
|
};
|
|
@@ -98714,12 +98964,37 @@ channels.command(`channels-get`).description(``).requiredOption(`--id <id>`, ``)
|
|
|
98714
98964
|
}
|
|
98715
98965
|
)
|
|
98716
98966
|
);
|
|
98717
|
-
channels.command(`channels-update`).description(``).requiredOption(`--id <id>`, ``).
|
|
98967
|
+
channels.command(`channels-update`).description(``).requiredOption(`--id <id>`, ``).option(`--code <code>`, `Stable channel code, unique per tenant (e.g. shop, punchout-acme).`).option(
|
|
98968
|
+
`--is-_default [value]`,
|
|
98969
|
+
`Mark as the default channel (default false).`,
|
|
98970
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
98971
|
+
).option(`--labels <labels>`, `Localized display names keyed by locale.`).option(`--name <name>`, `Display name.`).option(`--position <position>`, `Sort position (default 0).`, parseInteger).option(`--status <status>`, `Lifecycle status (default 'active').`).option(`--type <type>`, `Where business happens (default 'storefront').`).action(
|
|
98718
98972
|
actionRunner(
|
|
98719
|
-
async ({ id }) => {
|
|
98973
|
+
async ({ id, code, is_default: is_default2, labels, name, position, status, type }) => {
|
|
98720
98974
|
const _client = await sdkForProject();
|
|
98721
98975
|
const _apiPath = `/channels/{id}`.replace(`{id}`, id);
|
|
98722
98976
|
const _payload = {};
|
|
98977
|
+
if (code !== void 0) {
|
|
98978
|
+
_payload[`code`] = code;
|
|
98979
|
+
}
|
|
98980
|
+
if (is_default2 !== void 0) {
|
|
98981
|
+
_payload[`is_default`] = is_default2;
|
|
98982
|
+
}
|
|
98983
|
+
if (labels !== void 0) {
|
|
98984
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
98985
|
+
}
|
|
98986
|
+
if (name !== void 0) {
|
|
98987
|
+
_payload[`name`] = name;
|
|
98988
|
+
}
|
|
98989
|
+
if (position !== void 0) {
|
|
98990
|
+
_payload[`position`] = position;
|
|
98991
|
+
}
|
|
98992
|
+
if (status !== void 0) {
|
|
98993
|
+
_payload[`status`] = status;
|
|
98994
|
+
}
|
|
98995
|
+
if (type !== void 0) {
|
|
98996
|
+
_payload[`type`] = type;
|
|
98997
|
+
}
|
|
98723
98998
|
const _headers = {
|
|
98724
98999
|
"content-type": "application/json"
|
|
98725
99000
|
};
|
|
@@ -98757,12 +99032,55 @@ customers.command(`customers-addresses-list`).description(``).action(
|
|
|
98757
99032
|
}
|
|
98758
99033
|
)
|
|
98759
99034
|
);
|
|
98760
|
-
customers.command(`customers-addresses-create`).description(``).
|
|
99035
|
+
customers.command(`customers-addresses-create`).description(``).requiredOption(`--city <city>`, ``).requiredOption(`--country <country>`, `ISO 3166-1 alpha-2 code.`).requiredOption(`--street <street>`, ``).requiredOption(`--zip <zip>`, ``).option(`--company <company>`, ``).option(`--contact-_id <contact-_id>`, `Owning contact (personal address).`).option(
|
|
99036
|
+
`--is-_default [value]`,
|
|
99037
|
+
`The default address of its owner and type.`,
|
|
99038
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
99039
|
+
).option(`--name <name>`, `Recipient name.`).option(`--organization-_id <organization-_id>`, `Owning organization (company address).`).option(`--phone <phone>`, ``).option(`--region <region>`, ``).option(`--street-2 <street-2>`, ``).option(`--type <type>`, `Default 'shipping'.`).action(
|
|
98761
99040
|
actionRunner(
|
|
98762
|
-
async () => {
|
|
99041
|
+
async ({ city, country, street, zip, company, contact_id, is_default: is_default2, name, organization_id, phone, region, street2, type }) => {
|
|
98763
99042
|
const _client = await sdkForProject();
|
|
98764
99043
|
const _apiPath = `/customers/addresses`;
|
|
98765
99044
|
const _payload = {};
|
|
99045
|
+
if (city !== void 0) {
|
|
99046
|
+
_payload[`city`] = city;
|
|
99047
|
+
}
|
|
99048
|
+
if (company !== void 0) {
|
|
99049
|
+
_payload[`company`] = company;
|
|
99050
|
+
}
|
|
99051
|
+
if (contact_id !== void 0) {
|
|
99052
|
+
_payload[`contact_id`] = contact_id;
|
|
99053
|
+
}
|
|
99054
|
+
if (country !== void 0) {
|
|
99055
|
+
_payload[`country`] = country;
|
|
99056
|
+
}
|
|
99057
|
+
if (is_default2 !== void 0) {
|
|
99058
|
+
_payload[`is_default`] = is_default2;
|
|
99059
|
+
}
|
|
99060
|
+
if (name !== void 0) {
|
|
99061
|
+
_payload[`name`] = name;
|
|
99062
|
+
}
|
|
99063
|
+
if (organization_id !== void 0) {
|
|
99064
|
+
_payload[`organization_id`] = organization_id;
|
|
99065
|
+
}
|
|
99066
|
+
if (phone !== void 0) {
|
|
99067
|
+
_payload[`phone`] = phone;
|
|
99068
|
+
}
|
|
99069
|
+
if (region !== void 0) {
|
|
99070
|
+
_payload[`region`] = region;
|
|
99071
|
+
}
|
|
99072
|
+
if (street !== void 0) {
|
|
99073
|
+
_payload[`street`] = street;
|
|
99074
|
+
}
|
|
99075
|
+
if (street2 !== void 0) {
|
|
99076
|
+
_payload[`street2`] = street2;
|
|
99077
|
+
}
|
|
99078
|
+
if (type !== void 0) {
|
|
99079
|
+
_payload[`type`] = type;
|
|
99080
|
+
}
|
|
99081
|
+
if (zip !== void 0) {
|
|
99082
|
+
_payload[`zip`] = zip;
|
|
99083
|
+
}
|
|
98766
99084
|
const _headers = {
|
|
98767
99085
|
"content-type": "application/json"
|
|
98768
99086
|
};
|
|
@@ -98814,12 +99132,55 @@ customers.command(`customers-addresses-get`).description(``).requiredOption(`--i
|
|
|
98814
99132
|
}
|
|
98815
99133
|
)
|
|
98816
99134
|
);
|
|
98817
|
-
customers.command(`customers-addresses-update`).description(``).requiredOption(`--id <id>`, ``).
|
|
99135
|
+
customers.command(`customers-addresses-update`).description(``).requiredOption(`--id <id>`, ``).option(`--city <city>`, ``).option(`--company <company>`, ``).option(`--contact-_id <contact-_id>`, `Owning contact (personal address).`).option(`--country <country>`, `ISO 3166-1 alpha-2 code.`).option(
|
|
99136
|
+
`--is-_default [value]`,
|
|
99137
|
+
`The default address of its owner and type.`,
|
|
99138
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
99139
|
+
).option(`--name <name>`, `Recipient name.`).option(`--organization-_id <organization-_id>`, `Owning organization (company address).`).option(`--phone <phone>`, ``).option(`--region <region>`, ``).option(`--street <street>`, ``).option(`--street-2 <street-2>`, ``).option(`--type <type>`, `Default 'shipping'.`).option(`--zip <zip>`, ``).action(
|
|
98818
99140
|
actionRunner(
|
|
98819
|
-
async ({ id }) => {
|
|
99141
|
+
async ({ id, city, company, contact_id, country, is_default: is_default2, name, organization_id, phone, region, street, street2, type, zip }) => {
|
|
98820
99142
|
const _client = await sdkForProject();
|
|
98821
99143
|
const _apiPath = `/customers/addresses/{id}`.replace(`{id}`, id);
|
|
98822
99144
|
const _payload = {};
|
|
99145
|
+
if (city !== void 0) {
|
|
99146
|
+
_payload[`city`] = city;
|
|
99147
|
+
}
|
|
99148
|
+
if (company !== void 0) {
|
|
99149
|
+
_payload[`company`] = company;
|
|
99150
|
+
}
|
|
99151
|
+
if (contact_id !== void 0) {
|
|
99152
|
+
_payload[`contact_id`] = contact_id;
|
|
99153
|
+
}
|
|
99154
|
+
if (country !== void 0) {
|
|
99155
|
+
_payload[`country`] = country;
|
|
99156
|
+
}
|
|
99157
|
+
if (is_default2 !== void 0) {
|
|
99158
|
+
_payload[`is_default`] = is_default2;
|
|
99159
|
+
}
|
|
99160
|
+
if (name !== void 0) {
|
|
99161
|
+
_payload[`name`] = name;
|
|
99162
|
+
}
|
|
99163
|
+
if (organization_id !== void 0) {
|
|
99164
|
+
_payload[`organization_id`] = organization_id;
|
|
99165
|
+
}
|
|
99166
|
+
if (phone !== void 0) {
|
|
99167
|
+
_payload[`phone`] = phone;
|
|
99168
|
+
}
|
|
99169
|
+
if (region !== void 0) {
|
|
99170
|
+
_payload[`region`] = region;
|
|
99171
|
+
}
|
|
99172
|
+
if (street !== void 0) {
|
|
99173
|
+
_payload[`street`] = street;
|
|
99174
|
+
}
|
|
99175
|
+
if (street2 !== void 0) {
|
|
99176
|
+
_payload[`street2`] = street2;
|
|
99177
|
+
}
|
|
99178
|
+
if (type !== void 0) {
|
|
99179
|
+
_payload[`type`] = type;
|
|
99180
|
+
}
|
|
99181
|
+
if (zip !== void 0) {
|
|
99182
|
+
_payload[`zip`] = zip;
|
|
99183
|
+
}
|
|
98823
99184
|
const _headers = {
|
|
98824
99185
|
"content-type": "application/json"
|
|
98825
99186
|
};
|
|
@@ -98833,12 +99194,18 @@ customers.command(`customers-addresses-update`).description(``).requiredOption(`
|
|
|
98833
99194
|
}
|
|
98834
99195
|
)
|
|
98835
99196
|
);
|
|
98836
|
-
customers.command(`customers-auth-login`).description(``).action(
|
|
99197
|
+
customers.command(`customers-auth-login`).description(``).requiredOption(`--email <email>`, ``).requiredOption(`--password <password>`, ``).action(
|
|
98837
99198
|
actionRunner(
|
|
98838
|
-
async () => {
|
|
99199
|
+
async ({ email: email3, password }) => {
|
|
98839
99200
|
const _client = await sdkForProject();
|
|
98840
99201
|
const _apiPath = `/customers/auth/login`;
|
|
98841
99202
|
const _payload = {};
|
|
99203
|
+
if (email3 !== void 0) {
|
|
99204
|
+
_payload[`email`] = email3;
|
|
99205
|
+
}
|
|
99206
|
+
if (password !== void 0) {
|
|
99207
|
+
_payload[`password`] = password;
|
|
99208
|
+
}
|
|
98842
99209
|
const _headers = {
|
|
98843
99210
|
"content-type": "application/json"
|
|
98844
99211
|
};
|
|
@@ -98852,12 +99219,18 @@ customers.command(`customers-auth-login`).description(``).action(
|
|
|
98852
99219
|
}
|
|
98853
99220
|
)
|
|
98854
99221
|
);
|
|
98855
|
-
customers.command(`customers-auth-logout`).description(``).action(
|
|
99222
|
+
customers.command(`customers-auth-logout`).description(``).requiredOption(`--session-_id <session-_id>`, ``).requiredOption(`--user-_id <user-_id>`, ``).action(
|
|
98856
99223
|
actionRunner(
|
|
98857
|
-
async () => {
|
|
99224
|
+
async ({ session_id, user_id }) => {
|
|
98858
99225
|
const _client = await sdkForProject();
|
|
98859
99226
|
const _apiPath = `/customers/auth/logout`;
|
|
98860
99227
|
const _payload = {};
|
|
99228
|
+
if (session_id !== void 0) {
|
|
99229
|
+
_payload[`session_id`] = session_id;
|
|
99230
|
+
}
|
|
99231
|
+
if (user_id !== void 0) {
|
|
99232
|
+
_payload[`user_id`] = user_id;
|
|
99233
|
+
}
|
|
98861
99234
|
const _headers = {
|
|
98862
99235
|
"content-type": "application/json"
|
|
98863
99236
|
};
|
|
@@ -98871,12 +99244,15 @@ customers.command(`customers-auth-logout`).description(``).action(
|
|
|
98871
99244
|
}
|
|
98872
99245
|
)
|
|
98873
99246
|
);
|
|
98874
|
-
customers.command(`customers-auth-me`).description(``).action(
|
|
99247
|
+
customers.command(`customers-auth-me`).description(``).requiredOption(`--user-_id <user-_id>`, ``).action(
|
|
98875
99248
|
actionRunner(
|
|
98876
|
-
async () => {
|
|
99249
|
+
async ({ user_id }) => {
|
|
98877
99250
|
const _client = await sdkForProject();
|
|
98878
99251
|
const _apiPath = `/customers/auth/me`;
|
|
98879
99252
|
const _payload = {};
|
|
99253
|
+
if (user_id !== void 0) {
|
|
99254
|
+
_payload[`user_id`] = user_id;
|
|
99255
|
+
}
|
|
98880
99256
|
const _headers = {
|
|
98881
99257
|
"content-type": "application/json"
|
|
98882
99258
|
};
|
|
@@ -98890,12 +99266,18 @@ customers.command(`customers-auth-me`).description(``).action(
|
|
|
98890
99266
|
}
|
|
98891
99267
|
)
|
|
98892
99268
|
);
|
|
98893
|
-
customers.command(`customers-auth-recovery`).description(``).action(
|
|
99269
|
+
customers.command(`customers-auth-recovery`).description(``).requiredOption(`--email <email>`, ``).requiredOption(`--url <url>`, `Redirect URL carrying userId + secret.`).action(
|
|
98894
99270
|
actionRunner(
|
|
98895
|
-
async () => {
|
|
99271
|
+
async ({ email: email3, url: url2 }) => {
|
|
98896
99272
|
const _client = await sdkForProject();
|
|
98897
99273
|
const _apiPath = `/customers/auth/recovery`;
|
|
98898
99274
|
const _payload = {};
|
|
99275
|
+
if (email3 !== void 0) {
|
|
99276
|
+
_payload[`email`] = email3;
|
|
99277
|
+
}
|
|
99278
|
+
if (url2 !== void 0) {
|
|
99279
|
+
_payload[`url`] = url2;
|
|
99280
|
+
}
|
|
98899
99281
|
const _headers = {
|
|
98900
99282
|
"content-type": "application/json"
|
|
98901
99283
|
};
|
|
@@ -98909,12 +99291,21 @@ customers.command(`customers-auth-recovery`).description(``).action(
|
|
|
98909
99291
|
}
|
|
98910
99292
|
)
|
|
98911
99293
|
);
|
|
98912
|
-
customers.command(`customers-auth-recovery-confirm`).description(``).action(
|
|
99294
|
+
customers.command(`customers-auth-recovery-confirm`).description(``).requiredOption(`--password <password>`, ``).requiredOption(`--secret <secret>`, ``).requiredOption(`--user-_id <user-_id>`, ``).action(
|
|
98913
99295
|
actionRunner(
|
|
98914
|
-
async () => {
|
|
99296
|
+
async ({ password, secret, user_id }) => {
|
|
98915
99297
|
const _client = await sdkForProject();
|
|
98916
99298
|
const _apiPath = `/customers/auth/recovery`;
|
|
98917
99299
|
const _payload = {};
|
|
99300
|
+
if (password !== void 0) {
|
|
99301
|
+
_payload[`password`] = password;
|
|
99302
|
+
}
|
|
99303
|
+
if (secret !== void 0) {
|
|
99304
|
+
_payload[`secret`] = secret;
|
|
99305
|
+
}
|
|
99306
|
+
if (user_id !== void 0) {
|
|
99307
|
+
_payload[`user_id`] = user_id;
|
|
99308
|
+
}
|
|
98918
99309
|
const _headers = {
|
|
98919
99310
|
"content-type": "application/json"
|
|
98920
99311
|
};
|
|
@@ -98928,12 +99319,33 @@ customers.command(`customers-auth-recovery-confirm`).description(``).action(
|
|
|
98928
99319
|
}
|
|
98929
99320
|
)
|
|
98930
99321
|
);
|
|
98931
|
-
customers.command(`customers-auth-register`).description(``).action(
|
|
99322
|
+
customers.command(`customers-auth-register`).description(``).requiredOption(`--email <email>`, ``).requiredOption(`--password <password>`, ``).option(`--first-_name <first-_name>`, ``).option(`--last-_name <last-_name>`, ``).option(`--locale <locale>`, `BCP 47, e.g. de-DE`).option(`--organization-_id <organization-_id>`, `Join an existing organization.`).option(`--organization-_name <organization-_name>`, `Found a new organization; the contact becomes its admin.`).action(
|
|
98932
99323
|
actionRunner(
|
|
98933
|
-
async () => {
|
|
99324
|
+
async ({ email: email3, password, first_name, last_name, locale: locale2, organization_id, organization_name }) => {
|
|
98934
99325
|
const _client = await sdkForProject();
|
|
98935
99326
|
const _apiPath = `/customers/auth/register`;
|
|
98936
99327
|
const _payload = {};
|
|
99328
|
+
if (email3 !== void 0) {
|
|
99329
|
+
_payload[`email`] = email3;
|
|
99330
|
+
}
|
|
99331
|
+
if (first_name !== void 0) {
|
|
99332
|
+
_payload[`first_name`] = first_name;
|
|
99333
|
+
}
|
|
99334
|
+
if (last_name !== void 0) {
|
|
99335
|
+
_payload[`last_name`] = last_name;
|
|
99336
|
+
}
|
|
99337
|
+
if (locale2 !== void 0) {
|
|
99338
|
+
_payload[`locale`] = locale2;
|
|
99339
|
+
}
|
|
99340
|
+
if (organization_id !== void 0) {
|
|
99341
|
+
_payload[`organization_id`] = organization_id;
|
|
99342
|
+
}
|
|
99343
|
+
if (organization_name !== void 0) {
|
|
99344
|
+
_payload[`organization_name`] = organization_name;
|
|
99345
|
+
}
|
|
99346
|
+
if (password !== void 0) {
|
|
99347
|
+
_payload[`password`] = password;
|
|
99348
|
+
}
|
|
98937
99349
|
const _headers = {
|
|
98938
99350
|
"content-type": "application/json"
|
|
98939
99351
|
};
|
|
@@ -98966,12 +99378,43 @@ customers.command(`customers-contacts-list`).description(``).action(
|
|
|
98966
99378
|
}
|
|
98967
99379
|
)
|
|
98968
99380
|
);
|
|
98969
|
-
customers.command(`customers-contacts-create`).description(``).
|
|
99381
|
+
customers.command(`customers-contacts-create`).description(``).requiredOption(`--email <email>`, ``).option(`--first-_name <first-_name>`, ``).option(
|
|
99382
|
+
`--is-_primary [value]`,
|
|
99383
|
+
`The primary contact of its organization.`,
|
|
99384
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
99385
|
+
).option(`--last-_name <last-_name>`, ``).option(`--locale <locale>`, `BCP 47, e.g. de-DE`).option(`--organization-_id <organization-_id>`, `Owning organization \u2014 membership is mirrored to the platform team.`).option(`--phone <phone>`, ``).option(`--role <role>`, `Default 'buyer' \u2014 also the team role on the platform mirror.`).option(`--status <status>`, `Default 'invited' on create.`).action(
|
|
98970
99386
|
actionRunner(
|
|
98971
|
-
async () => {
|
|
99387
|
+
async ({ email: email3, first_name, is_primary, last_name, locale: locale2, organization_id, phone, role, status }) => {
|
|
98972
99388
|
const _client = await sdkForProject();
|
|
98973
99389
|
const _apiPath = `/customers/contacts`;
|
|
98974
99390
|
const _payload = {};
|
|
99391
|
+
if (email3 !== void 0) {
|
|
99392
|
+
_payload[`email`] = email3;
|
|
99393
|
+
}
|
|
99394
|
+
if (first_name !== void 0) {
|
|
99395
|
+
_payload[`first_name`] = first_name;
|
|
99396
|
+
}
|
|
99397
|
+
if (is_primary !== void 0) {
|
|
99398
|
+
_payload[`is_primary`] = is_primary;
|
|
99399
|
+
}
|
|
99400
|
+
if (last_name !== void 0) {
|
|
99401
|
+
_payload[`last_name`] = last_name;
|
|
99402
|
+
}
|
|
99403
|
+
if (locale2 !== void 0) {
|
|
99404
|
+
_payload[`locale`] = locale2;
|
|
99405
|
+
}
|
|
99406
|
+
if (organization_id !== void 0) {
|
|
99407
|
+
_payload[`organization_id`] = organization_id;
|
|
99408
|
+
}
|
|
99409
|
+
if (phone !== void 0) {
|
|
99410
|
+
_payload[`phone`] = phone;
|
|
99411
|
+
}
|
|
99412
|
+
if (role !== void 0) {
|
|
99413
|
+
_payload[`role`] = role;
|
|
99414
|
+
}
|
|
99415
|
+
if (status !== void 0) {
|
|
99416
|
+
_payload[`status`] = status;
|
|
99417
|
+
}
|
|
98975
99418
|
const _headers = {
|
|
98976
99419
|
"content-type": "application/json"
|
|
98977
99420
|
};
|
|
@@ -99023,12 +99466,43 @@ customers.command(`customers-contacts-get`).description(``).requiredOption(`--id
|
|
|
99023
99466
|
}
|
|
99024
99467
|
)
|
|
99025
99468
|
);
|
|
99026
|
-
customers.command(`customers-contacts-update`).description(``).requiredOption(`--id <id>`, ``).
|
|
99469
|
+
customers.command(`customers-contacts-update`).description(``).requiredOption(`--id <id>`, ``).option(`--email <email>`, ``).option(`--first-_name <first-_name>`, ``).option(
|
|
99470
|
+
`--is-_primary [value]`,
|
|
99471
|
+
`The primary contact of its organization.`,
|
|
99472
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
99473
|
+
).option(`--last-_name <last-_name>`, ``).option(`--locale <locale>`, `BCP 47, e.g. de-DE`).option(`--organization-_id <organization-_id>`, `Owning organization \u2014 membership is mirrored to the platform team.`).option(`--phone <phone>`, ``).option(`--role <role>`, `Default 'buyer' \u2014 also the team role on the platform mirror.`).option(`--status <status>`, `Default 'invited' on create.`).action(
|
|
99027
99474
|
actionRunner(
|
|
99028
|
-
async ({ id }) => {
|
|
99475
|
+
async ({ id, email: email3, first_name, is_primary, last_name, locale: locale2, organization_id, phone, role, status }) => {
|
|
99029
99476
|
const _client = await sdkForProject();
|
|
99030
99477
|
const _apiPath = `/customers/contacts/{id}`.replace(`{id}`, id);
|
|
99031
99478
|
const _payload = {};
|
|
99479
|
+
if (email3 !== void 0) {
|
|
99480
|
+
_payload[`email`] = email3;
|
|
99481
|
+
}
|
|
99482
|
+
if (first_name !== void 0) {
|
|
99483
|
+
_payload[`first_name`] = first_name;
|
|
99484
|
+
}
|
|
99485
|
+
if (is_primary !== void 0) {
|
|
99486
|
+
_payload[`is_primary`] = is_primary;
|
|
99487
|
+
}
|
|
99488
|
+
if (last_name !== void 0) {
|
|
99489
|
+
_payload[`last_name`] = last_name;
|
|
99490
|
+
}
|
|
99491
|
+
if (locale2 !== void 0) {
|
|
99492
|
+
_payload[`locale`] = locale2;
|
|
99493
|
+
}
|
|
99494
|
+
if (organization_id !== void 0) {
|
|
99495
|
+
_payload[`organization_id`] = organization_id;
|
|
99496
|
+
}
|
|
99497
|
+
if (phone !== void 0) {
|
|
99498
|
+
_payload[`phone`] = phone;
|
|
99499
|
+
}
|
|
99500
|
+
if (role !== void 0) {
|
|
99501
|
+
_payload[`role`] = role;
|
|
99502
|
+
}
|
|
99503
|
+
if (status !== void 0) {
|
|
99504
|
+
_payload[`status`] = status;
|
|
99505
|
+
}
|
|
99032
99506
|
const _headers = {
|
|
99033
99507
|
"content-type": "application/json"
|
|
99034
99508
|
};
|
|
@@ -99061,12 +99535,24 @@ customers.command(`customers-organizations-list`).description(``).action(
|
|
|
99061
99535
|
}
|
|
99062
99536
|
)
|
|
99063
99537
|
);
|
|
99064
|
-
customers.command(`customers-organizations-create`).description(``).action(
|
|
99538
|
+
customers.command(`customers-organizations-create`).description(``).requiredOption(`--name <name>`, `Company name \u2014 mirrored to the platform team.`).option(`--settings <settings>`, `Free-form organization settings.`).option(`--status <status>`, `Default 'active'.`).option(`--vat-_id <vat-_id>`, ``).action(
|
|
99065
99539
|
actionRunner(
|
|
99066
|
-
async () => {
|
|
99540
|
+
async ({ name, settings, status, vat_id }) => {
|
|
99067
99541
|
const _client = await sdkForProject();
|
|
99068
99542
|
const _apiPath = `/customers/organizations`;
|
|
99069
99543
|
const _payload = {};
|
|
99544
|
+
if (name !== void 0) {
|
|
99545
|
+
_payload[`name`] = name;
|
|
99546
|
+
}
|
|
99547
|
+
if (settings !== void 0) {
|
|
99548
|
+
_payload[`settings`] = JSON.parse(settings);
|
|
99549
|
+
}
|
|
99550
|
+
if (status !== void 0) {
|
|
99551
|
+
_payload[`status`] = status;
|
|
99552
|
+
}
|
|
99553
|
+
if (vat_id !== void 0) {
|
|
99554
|
+
_payload[`vat_id`] = vat_id;
|
|
99555
|
+
}
|
|
99070
99556
|
const _headers = {
|
|
99071
99557
|
"content-type": "application/json"
|
|
99072
99558
|
};
|
|
@@ -99118,12 +99604,24 @@ customers.command(`customers-organizations-get`).description(``).requiredOption(
|
|
|
99118
99604
|
}
|
|
99119
99605
|
)
|
|
99120
99606
|
);
|
|
99121
|
-
customers.command(`customers-organizations-update`).description(``).requiredOption(`--id <id>`, ``).action(
|
|
99607
|
+
customers.command(`customers-organizations-update`).description(``).requiredOption(`--id <id>`, ``).option(`--name <name>`, `Company name \u2014 mirrored to the platform team.`).option(`--settings <settings>`, `Free-form organization settings.`).option(`--status <status>`, `Default 'active'.`).option(`--vat-_id <vat-_id>`, ``).action(
|
|
99122
99608
|
actionRunner(
|
|
99123
|
-
async ({ id }) => {
|
|
99609
|
+
async ({ id, name, settings, status, vat_id }) => {
|
|
99124
99610
|
const _client = await sdkForProject();
|
|
99125
99611
|
const _apiPath = `/customers/organizations/{id}`.replace(`{id}`, id);
|
|
99126
99612
|
const _payload = {};
|
|
99613
|
+
if (name !== void 0) {
|
|
99614
|
+
_payload[`name`] = name;
|
|
99615
|
+
}
|
|
99616
|
+
if (settings !== void 0) {
|
|
99617
|
+
_payload[`settings`] = JSON.parse(settings);
|
|
99618
|
+
}
|
|
99619
|
+
if (status !== void 0) {
|
|
99620
|
+
_payload[`status`] = status;
|
|
99621
|
+
}
|
|
99622
|
+
if (vat_id !== void 0) {
|
|
99623
|
+
_payload[`vat_id`] = vat_id;
|
|
99624
|
+
}
|
|
99127
99625
|
const _headers = {
|
|
99128
99626
|
"content-type": "application/json"
|
|
99129
99627
|
};
|
|
@@ -99279,12 +99777,21 @@ greetings.command(`greetings-update`).description(``).requiredOption(`--id <id>`
|
|
|
99279
99777
|
var inventories = new Command("inventories").description(commandDescriptions["inventories"] ?? "").configureHelp({
|
|
99280
99778
|
helpWidth: process.stdout.columns || 80
|
|
99281
99779
|
});
|
|
99282
|
-
inventories.command(`inventories-adjust`).description(``).action(
|
|
99780
|
+
inventories.command(`inventories-adjust`).description(``).requiredOption(`--items [items...]`, `The corrections \u2014 quantities are SIGNED deltas (at most 200).`).requiredOption(`--reason <reason>`, `Mandatory audit reason \u2014 every adjustment is a ledger row.`).option(`--location-_code <location-_code>`, `Adjusted location (default 'main').`).action(
|
|
99283
99781
|
actionRunner(
|
|
99284
|
-
async () => {
|
|
99782
|
+
async ({ items, reason, location_code }) => {
|
|
99285
99783
|
const _client = await sdkForProject();
|
|
99286
99784
|
const _apiPath = `/inventories/adjust`;
|
|
99287
99785
|
const _payload = {};
|
|
99786
|
+
if (items !== void 0) {
|
|
99787
|
+
_payload[`items`] = items;
|
|
99788
|
+
}
|
|
99789
|
+
if (location_code !== void 0) {
|
|
99790
|
+
_payload[`location_code`] = location_code;
|
|
99791
|
+
}
|
|
99792
|
+
if (reason !== void 0) {
|
|
99793
|
+
_payload[`reason`] = reason;
|
|
99794
|
+
}
|
|
99288
99795
|
const _headers = {
|
|
99289
99796
|
"content-type": "application/json"
|
|
99290
99797
|
};
|
|
@@ -99298,12 +99805,18 @@ inventories.command(`inventories-adjust`).description(``).action(
|
|
|
99298
99805
|
}
|
|
99299
99806
|
)
|
|
99300
99807
|
);
|
|
99301
|
-
inventories.command(`inventories-availability`).description(``).action(
|
|
99808
|
+
inventories.command(`inventories-availability`).description(``).requiredOption(`--items [items...]`, `The items to check (batch, at most 200).`).option(`--location-_code <location-_code>`, `Restrict the check to one location (default: all enabled locations).`).action(
|
|
99302
99809
|
actionRunner(
|
|
99303
|
-
async () => {
|
|
99810
|
+
async ({ items, location_code }) => {
|
|
99304
99811
|
const _client = await sdkForProject();
|
|
99305
99812
|
const _apiPath = `/inventories/availability`;
|
|
99306
99813
|
const _payload = {};
|
|
99814
|
+
if (items !== void 0) {
|
|
99815
|
+
_payload[`items`] = items;
|
|
99816
|
+
}
|
|
99817
|
+
if (location_code !== void 0) {
|
|
99818
|
+
_payload[`location_code`] = location_code;
|
|
99819
|
+
}
|
|
99307
99820
|
const _headers = {
|
|
99308
99821
|
"content-type": "application/json"
|
|
99309
99822
|
};
|
|
@@ -99317,12 +99830,15 @@ inventories.command(`inventories-availability`).description(``).action(
|
|
|
99317
99830
|
}
|
|
99318
99831
|
)
|
|
99319
99832
|
);
|
|
99320
|
-
inventories.command(`inventories-commit`).description(``).action(
|
|
99833
|
+
inventories.command(`inventories-commit`).description(``).requiredOption(`--order-_ref <order-_ref>`, `The order whose active reservations are committed (shipment).`).action(
|
|
99321
99834
|
actionRunner(
|
|
99322
|
-
async () => {
|
|
99835
|
+
async ({ order_ref }) => {
|
|
99323
99836
|
const _client = await sdkForProject();
|
|
99324
99837
|
const _apiPath = `/inventories/commit`;
|
|
99325
99838
|
const _payload = {};
|
|
99839
|
+
if (order_ref !== void 0) {
|
|
99840
|
+
_payload[`order_ref`] = order_ref;
|
|
99841
|
+
}
|
|
99326
99842
|
const _headers = {
|
|
99327
99843
|
"content-type": "application/json"
|
|
99328
99844
|
};
|
|
@@ -99355,12 +99871,40 @@ inventories.command(`inventories-locations-list`).description(``).action(
|
|
|
99355
99871
|
}
|
|
99356
99872
|
)
|
|
99357
99873
|
);
|
|
99358
|
-
inventories.command(`inventories-locations-create`).description(``).
|
|
99874
|
+
inventories.command(`inventories-locations-create`).description(``).requiredOption(`--code <code>`, `Unique location code (per tenant).`).requiredOption(`--name <name>`, ``).option(`--address <address>`, ``).option(
|
|
99875
|
+
`--enabled [value]`,
|
|
99876
|
+
`Disabled locations are skipped by availability and reserve (default true).`,
|
|
99877
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
99878
|
+
).option(`--labels <labels>`, `Localised display names ({de, en, \u2026}).`).option(`--metadata <metadata>`, `Free-form metadata.`).option(`--priority <priority>`, `Sourcing order \u2014 lower wins (default 0).`, parseInteger).option(`--type <type>`, `Default 'warehouse'.`).action(
|
|
99359
99879
|
actionRunner(
|
|
99360
|
-
async () => {
|
|
99880
|
+
async ({ code, name, address, enabled, labels, metadata, priority, type }) => {
|
|
99361
99881
|
const _client = await sdkForProject();
|
|
99362
99882
|
const _apiPath = `/inventories/locations`;
|
|
99363
99883
|
const _payload = {};
|
|
99884
|
+
if (address !== void 0) {
|
|
99885
|
+
_payload[`address`] = JSON.parse(address);
|
|
99886
|
+
}
|
|
99887
|
+
if (code !== void 0) {
|
|
99888
|
+
_payload[`code`] = code;
|
|
99889
|
+
}
|
|
99890
|
+
if (enabled !== void 0) {
|
|
99891
|
+
_payload[`enabled`] = enabled;
|
|
99892
|
+
}
|
|
99893
|
+
if (labels !== void 0) {
|
|
99894
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
99895
|
+
}
|
|
99896
|
+
if (metadata !== void 0) {
|
|
99897
|
+
_payload[`metadata`] = JSON.parse(metadata);
|
|
99898
|
+
}
|
|
99899
|
+
if (name !== void 0) {
|
|
99900
|
+
_payload[`name`] = name;
|
|
99901
|
+
}
|
|
99902
|
+
if (priority !== void 0) {
|
|
99903
|
+
_payload[`priority`] = priority;
|
|
99904
|
+
}
|
|
99905
|
+
if (type !== void 0) {
|
|
99906
|
+
_payload[`type`] = type;
|
|
99907
|
+
}
|
|
99364
99908
|
const _headers = {
|
|
99365
99909
|
"content-type": "application/json"
|
|
99366
99910
|
};
|
|
@@ -99431,12 +99975,40 @@ inventories.command(`inventories-locations-get`).description(``).requiredOption(
|
|
|
99431
99975
|
}
|
|
99432
99976
|
)
|
|
99433
99977
|
);
|
|
99434
|
-
inventories.command(`inventories-locations-update`).description(``).requiredOption(`--id <id>`, ``).
|
|
99978
|
+
inventories.command(`inventories-locations-update`).description(``).requiredOption(`--id <id>`, ``).option(`--address <address>`, ``).option(`--code <code>`, `Unique location code (per tenant).`).option(
|
|
99979
|
+
`--enabled [value]`,
|
|
99980
|
+
`Disabled locations are skipped by availability and reserve (default true).`,
|
|
99981
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
99982
|
+
).option(`--labels <labels>`, `Localised display names ({de, en, \u2026}).`).option(`--metadata <metadata>`, `Free-form metadata.`).option(`--name <name>`, ``).option(`--priority <priority>`, `Sourcing order \u2014 lower wins (default 0).`, parseInteger).option(`--type <type>`, `Default 'warehouse'.`).action(
|
|
99435
99983
|
actionRunner(
|
|
99436
|
-
async ({ id }) => {
|
|
99984
|
+
async ({ id, address, code, enabled, labels, metadata, name, priority, type }) => {
|
|
99437
99985
|
const _client = await sdkForProject();
|
|
99438
99986
|
const _apiPath = `/inventories/locations/{id}`.replace(`{id}`, id);
|
|
99439
99987
|
const _payload = {};
|
|
99988
|
+
if (address !== void 0) {
|
|
99989
|
+
_payload[`address`] = JSON.parse(address);
|
|
99990
|
+
}
|
|
99991
|
+
if (code !== void 0) {
|
|
99992
|
+
_payload[`code`] = code;
|
|
99993
|
+
}
|
|
99994
|
+
if (enabled !== void 0) {
|
|
99995
|
+
_payload[`enabled`] = enabled;
|
|
99996
|
+
}
|
|
99997
|
+
if (labels !== void 0) {
|
|
99998
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
99999
|
+
}
|
|
100000
|
+
if (metadata !== void 0) {
|
|
100001
|
+
_payload[`metadata`] = JSON.parse(metadata);
|
|
100002
|
+
}
|
|
100003
|
+
if (name !== void 0) {
|
|
100004
|
+
_payload[`name`] = name;
|
|
100005
|
+
}
|
|
100006
|
+
if (priority !== void 0) {
|
|
100007
|
+
_payload[`priority`] = priority;
|
|
100008
|
+
}
|
|
100009
|
+
if (type !== void 0) {
|
|
100010
|
+
_payload[`type`] = type;
|
|
100011
|
+
}
|
|
99440
100012
|
const _headers = {
|
|
99441
100013
|
"content-type": "application/json"
|
|
99442
100014
|
};
|
|
@@ -99488,12 +100060,21 @@ inventories.command(`inventories-movements-get`).description(``).requiredOption(
|
|
|
99488
100060
|
}
|
|
99489
100061
|
)
|
|
99490
100062
|
);
|
|
99491
|
-
inventories.command(`inventories-receive`).description(``).action(
|
|
100063
|
+
inventories.command(`inventories-receive`).description(``).requiredOption(`--items [items...]`, `The inbound items (at most 200).`).option(`--location-_code <location-_code>`, `Receiving location (default 'main').`).option(`--reason <reason>`, `Ledger note (e.g. delivery note number).`).action(
|
|
99492
100064
|
actionRunner(
|
|
99493
|
-
async () => {
|
|
100065
|
+
async ({ items, location_code, reason }) => {
|
|
99494
100066
|
const _client = await sdkForProject();
|
|
99495
100067
|
const _apiPath = `/inventories/receive`;
|
|
99496
100068
|
const _payload = {};
|
|
100069
|
+
if (items !== void 0) {
|
|
100070
|
+
_payload[`items`] = items;
|
|
100071
|
+
}
|
|
100072
|
+
if (location_code !== void 0) {
|
|
100073
|
+
_payload[`location_code`] = location_code;
|
|
100074
|
+
}
|
|
100075
|
+
if (reason !== void 0) {
|
|
100076
|
+
_payload[`reason`] = reason;
|
|
100077
|
+
}
|
|
99497
100078
|
const _headers = {
|
|
99498
100079
|
"content-type": "application/json"
|
|
99499
100080
|
};
|
|
@@ -99507,12 +100088,15 @@ inventories.command(`inventories-receive`).description(``).action(
|
|
|
99507
100088
|
}
|
|
99508
100089
|
)
|
|
99509
100090
|
);
|
|
99510
|
-
inventories.command(`inventories-release`).description(``).action(
|
|
100091
|
+
inventories.command(`inventories-release`).description(``).requiredOption(`--order-_ref <order-_ref>`, `The order whose active reservations are released.`).action(
|
|
99511
100092
|
actionRunner(
|
|
99512
|
-
async () => {
|
|
100093
|
+
async ({ order_ref }) => {
|
|
99513
100094
|
const _client = await sdkForProject();
|
|
99514
100095
|
const _apiPath = `/inventories/release`;
|
|
99515
100096
|
const _payload = {};
|
|
100097
|
+
if (order_ref !== void 0) {
|
|
100098
|
+
_payload[`order_ref`] = order_ref;
|
|
100099
|
+
}
|
|
99516
100100
|
const _headers = {
|
|
99517
100101
|
"content-type": "application/json"
|
|
99518
100102
|
};
|
|
@@ -99564,12 +100148,21 @@ inventories.command(`inventories-reservations-get`).description(``).requiredOpti
|
|
|
99564
100148
|
}
|
|
99565
100149
|
)
|
|
99566
100150
|
);
|
|
99567
|
-
inventories.command(`inventories-reserve`).description(``).action(
|
|
100151
|
+
inventories.command(`inventories-reserve`).description(``).requiredOption(`--items [items...]`, `The items to reserve \u2014 all-or-nothing (at most 200).`).requiredOption(`--order-_ref <order-_ref>`, `The order this reservation belongs to.`).option(`--expires-_at <expires-_at>`, `Optional reservation expiry.`).action(
|
|
99568
100152
|
actionRunner(
|
|
99569
|
-
async () => {
|
|
100153
|
+
async ({ items, order_ref, expires_at }) => {
|
|
99570
100154
|
const _client = await sdkForProject();
|
|
99571
100155
|
const _apiPath = `/inventories/reserve`;
|
|
99572
100156
|
const _payload = {};
|
|
100157
|
+
if (expires_at !== void 0) {
|
|
100158
|
+
_payload[`expires_at`] = expires_at;
|
|
100159
|
+
}
|
|
100160
|
+
if (items !== void 0) {
|
|
100161
|
+
_payload[`items`] = items;
|
|
100162
|
+
}
|
|
100163
|
+
if (order_ref !== void 0) {
|
|
100164
|
+
_payload[`order_ref`] = order_ref;
|
|
100165
|
+
}
|
|
99573
100166
|
const _headers = {
|
|
99574
100167
|
"content-type": "application/json"
|
|
99575
100168
|
};
|
|
@@ -99583,12 +100176,24 @@ inventories.command(`inventories-reserve`).description(``).action(
|
|
|
99583
100176
|
}
|
|
99584
100177
|
)
|
|
99585
100178
|
);
|
|
99586
|
-
inventories.command(`inventories-restock`).description(``).action(
|
|
100179
|
+
inventories.command(`inventories-restock`).description(``).requiredOption(`--items [items...]`, `The returned items (at most 200).`).option(`--location-_code <location-_code>`, `Restocking location (default 'main').`).option(`--order-_ref <order-_ref>`, `Originating order (ledger reference).`).option(`--reason <reason>`, `Ledger note (e.g. return reason).`).action(
|
|
99587
100180
|
actionRunner(
|
|
99588
|
-
async () => {
|
|
100181
|
+
async ({ items, location_code, order_ref, reason }) => {
|
|
99589
100182
|
const _client = await sdkForProject();
|
|
99590
100183
|
const _apiPath = `/inventories/restock`;
|
|
99591
100184
|
const _payload = {};
|
|
100185
|
+
if (items !== void 0) {
|
|
100186
|
+
_payload[`items`] = items;
|
|
100187
|
+
}
|
|
100188
|
+
if (location_code !== void 0) {
|
|
100189
|
+
_payload[`location_code`] = location_code;
|
|
100190
|
+
}
|
|
100191
|
+
if (order_ref !== void 0) {
|
|
100192
|
+
_payload[`order_ref`] = order_ref;
|
|
100193
|
+
}
|
|
100194
|
+
if (reason !== void 0) {
|
|
100195
|
+
_payload[`reason`] = reason;
|
|
100196
|
+
}
|
|
99592
100197
|
const _headers = {
|
|
99593
100198
|
"content-type": "application/json"
|
|
99594
100199
|
};
|
|
@@ -99621,12 +100226,33 @@ inventories.command(`inventories-stock-list`).description(``).action(
|
|
|
99621
100226
|
}
|
|
99622
100227
|
)
|
|
99623
100228
|
);
|
|
99624
|
-
inventories.command(`inventories-stock-create`).description(``).action(
|
|
100229
|
+
inventories.command(`inventories-stock-create`).description(``).requiredOption(`--location-_id <location-_id>`, `Owning location.`).option(`--metadata <metadata>`, `Free-form metadata.`).option(`--on-_hand <on-_hand>`, `Physical stock (default 0).`, parseInteger).option(`--product-_id <product-_id>`, `Tracked product.`).option(`--reorder-_point <reorder-_point>`, ``, parseInteger).option(`--reserved <reserved>`, `Reserved stock (default 0) \u2014 normally managed by reserve/release/commit.`, parseInteger).option(`--sku <sku>`, `Tracked SKU (alternative to product_id).`).action(
|
|
99625
100230
|
actionRunner(
|
|
99626
|
-
async () => {
|
|
100231
|
+
async ({ location_id, metadata, on_hand, product_id, reorder_point, reserved, sku }) => {
|
|
99627
100232
|
const _client = await sdkForProject();
|
|
99628
100233
|
const _apiPath = `/inventories/stock`;
|
|
99629
100234
|
const _payload = {};
|
|
100235
|
+
if (location_id !== void 0) {
|
|
100236
|
+
_payload[`location_id`] = location_id;
|
|
100237
|
+
}
|
|
100238
|
+
if (metadata !== void 0) {
|
|
100239
|
+
_payload[`metadata`] = JSON.parse(metadata);
|
|
100240
|
+
}
|
|
100241
|
+
if (on_hand !== void 0) {
|
|
100242
|
+
_payload[`on_hand`] = on_hand;
|
|
100243
|
+
}
|
|
100244
|
+
if (product_id !== void 0) {
|
|
100245
|
+
_payload[`product_id`] = product_id;
|
|
100246
|
+
}
|
|
100247
|
+
if (reorder_point !== void 0) {
|
|
100248
|
+
_payload[`reorder_point`] = reorder_point;
|
|
100249
|
+
}
|
|
100250
|
+
if (reserved !== void 0) {
|
|
100251
|
+
_payload[`reserved`] = reserved;
|
|
100252
|
+
}
|
|
100253
|
+
if (sku !== void 0) {
|
|
100254
|
+
_payload[`sku`] = sku;
|
|
100255
|
+
}
|
|
99630
100256
|
const _headers = {
|
|
99631
100257
|
"content-type": "application/json"
|
|
99632
100258
|
};
|
|
@@ -99678,12 +100304,33 @@ inventories.command(`inventories-stock-get`).description(``).requiredOption(`--i
|
|
|
99678
100304
|
}
|
|
99679
100305
|
)
|
|
99680
100306
|
);
|
|
99681
|
-
inventories.command(`inventories-stock-update`).description(``).requiredOption(`--id <id>`, ``).action(
|
|
100307
|
+
inventories.command(`inventories-stock-update`).description(``).requiredOption(`--id <id>`, ``).option(`--location-_id <location-_id>`, `Owning location.`).option(`--metadata <metadata>`, `Free-form metadata.`).option(`--on-_hand <on-_hand>`, `Physical stock (default 0).`, parseInteger).option(`--product-_id <product-_id>`, `Tracked product.`).option(`--reorder-_point <reorder-_point>`, ``, parseInteger).option(`--reserved <reserved>`, `Reserved stock (default 0) \u2014 normally managed by reserve/release/commit.`, parseInteger).option(`--sku <sku>`, `Tracked SKU (alternative to product_id).`).action(
|
|
99682
100308
|
actionRunner(
|
|
99683
|
-
async ({ id }) => {
|
|
100309
|
+
async ({ id, location_id, metadata, on_hand, product_id, reorder_point, reserved, sku }) => {
|
|
99684
100310
|
const _client = await sdkForProject();
|
|
99685
100311
|
const _apiPath = `/inventories/stock/{id}`.replace(`{id}`, id);
|
|
99686
100312
|
const _payload = {};
|
|
100313
|
+
if (location_id !== void 0) {
|
|
100314
|
+
_payload[`location_id`] = location_id;
|
|
100315
|
+
}
|
|
100316
|
+
if (metadata !== void 0) {
|
|
100317
|
+
_payload[`metadata`] = JSON.parse(metadata);
|
|
100318
|
+
}
|
|
100319
|
+
if (on_hand !== void 0) {
|
|
100320
|
+
_payload[`on_hand`] = on_hand;
|
|
100321
|
+
}
|
|
100322
|
+
if (product_id !== void 0) {
|
|
100323
|
+
_payload[`product_id`] = product_id;
|
|
100324
|
+
}
|
|
100325
|
+
if (reorder_point !== void 0) {
|
|
100326
|
+
_payload[`reorder_point`] = reorder_point;
|
|
100327
|
+
}
|
|
100328
|
+
if (reserved !== void 0) {
|
|
100329
|
+
_payload[`reserved`] = reserved;
|
|
100330
|
+
}
|
|
100331
|
+
if (sku !== void 0) {
|
|
100332
|
+
_payload[`sku`] = sku;
|
|
100333
|
+
}
|
|
99687
100334
|
const _headers = {
|
|
99688
100335
|
"content-type": "application/json"
|
|
99689
100336
|
};
|
|
@@ -99880,12 +100527,37 @@ markets.command(`markets-list`).description(``).action(
|
|
|
99880
100527
|
}
|
|
99881
100528
|
)
|
|
99882
100529
|
);
|
|
99883
|
-
markets.command(`markets-create`).description(``).
|
|
100530
|
+
markets.command(`markets-create`).description(``).requiredOption(`--code <code>`, `Market code (unique per tenant).`).requiredOption(`--name <name>`, ``).option(`--currency <currency>`, `ISO 4217 code (default 'EUR').`).option(
|
|
100531
|
+
`--is-_default [value]`,
|
|
100532
|
+
``,
|
|
100533
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
100534
|
+
).option(`--labels <labels>`, `Localized display names ({locale: label}).`).option(`--position <position>`, `Sort position (default 0).`, parseInteger).option(`--status <status>`, `Default 'active'.`).action(
|
|
99884
100535
|
actionRunner(
|
|
99885
|
-
async () => {
|
|
100536
|
+
async ({ code, name, currency, is_default: is_default2, labels, position, status }) => {
|
|
99886
100537
|
const _client = await sdkForProject();
|
|
99887
100538
|
const _apiPath = `/markets`;
|
|
99888
100539
|
const _payload = {};
|
|
100540
|
+
if (code !== void 0) {
|
|
100541
|
+
_payload[`code`] = code;
|
|
100542
|
+
}
|
|
100543
|
+
if (currency !== void 0) {
|
|
100544
|
+
_payload[`currency`] = currency;
|
|
100545
|
+
}
|
|
100546
|
+
if (is_default2 !== void 0) {
|
|
100547
|
+
_payload[`is_default`] = is_default2;
|
|
100548
|
+
}
|
|
100549
|
+
if (labels !== void 0) {
|
|
100550
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
100551
|
+
}
|
|
100552
|
+
if (name !== void 0) {
|
|
100553
|
+
_payload[`name`] = name;
|
|
100554
|
+
}
|
|
100555
|
+
if (position !== void 0) {
|
|
100556
|
+
_payload[`position`] = position;
|
|
100557
|
+
}
|
|
100558
|
+
if (status !== void 0) {
|
|
100559
|
+
_payload[`status`] = status;
|
|
100560
|
+
}
|
|
99889
100561
|
const _headers = {
|
|
99890
100562
|
"content-type": "application/json"
|
|
99891
100563
|
};
|
|
@@ -99937,12 +100609,37 @@ markets.command(`markets-get`).description(``).requiredOption(`--id <id>`, ``).a
|
|
|
99937
100609
|
}
|
|
99938
100610
|
)
|
|
99939
100611
|
);
|
|
99940
|
-
markets.command(`markets-update`).description(``).requiredOption(`--id <id>`, ``).
|
|
100612
|
+
markets.command(`markets-update`).description(``).requiredOption(`--id <id>`, ``).option(`--code <code>`, `Market code (unique per tenant).`).option(`--currency <currency>`, `ISO 4217 code (default 'EUR').`).option(
|
|
100613
|
+
`--is-_default [value]`,
|
|
100614
|
+
``,
|
|
100615
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
100616
|
+
).option(`--labels <labels>`, `Localized display names ({locale: label}).`).option(`--name <name>`, ``).option(`--position <position>`, `Sort position (default 0).`, parseInteger).option(`--status <status>`, `Default 'active'.`).action(
|
|
99941
100617
|
actionRunner(
|
|
99942
|
-
async ({ id }) => {
|
|
100618
|
+
async ({ id, code, currency, is_default: is_default2, labels, name, position, status }) => {
|
|
99943
100619
|
const _client = await sdkForProject();
|
|
99944
100620
|
const _apiPath = `/markets/{id}`.replace(`{id}`, id);
|
|
99945
100621
|
const _payload = {};
|
|
100622
|
+
if (code !== void 0) {
|
|
100623
|
+
_payload[`code`] = code;
|
|
100624
|
+
}
|
|
100625
|
+
if (currency !== void 0) {
|
|
100626
|
+
_payload[`currency`] = currency;
|
|
100627
|
+
}
|
|
100628
|
+
if (is_default2 !== void 0) {
|
|
100629
|
+
_payload[`is_default`] = is_default2;
|
|
100630
|
+
}
|
|
100631
|
+
if (labels !== void 0) {
|
|
100632
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
100633
|
+
}
|
|
100634
|
+
if (name !== void 0) {
|
|
100635
|
+
_payload[`name`] = name;
|
|
100636
|
+
}
|
|
100637
|
+
if (position !== void 0) {
|
|
100638
|
+
_payload[`position`] = position;
|
|
100639
|
+
}
|
|
100640
|
+
if (status !== void 0) {
|
|
100641
|
+
_payload[`status`] = status;
|
|
100642
|
+
}
|
|
99946
100643
|
const _headers = {
|
|
99947
100644
|
"content-type": "application/json"
|
|
99948
100645
|
};
|
|
@@ -99994,12 +100691,31 @@ markets.command(`markets-locales-list`).description(``).requiredOption(`--market
|
|
|
99994
100691
|
}
|
|
99995
100692
|
)
|
|
99996
100693
|
);
|
|
99997
|
-
markets.command(`markets-locales-create`).description(``).requiredOption(`--market-_id <market-_id>`, ``).
|
|
100694
|
+
markets.command(`markets-locales-create`).description(``).requiredOption(`--market-_id <market-_id>`, ``).requiredOption(`--code <code>`, `Locale code, e.g. 'de-DE' (unique per market).`).requiredOption(`--country <country>`, `ISO 3166-1 alpha-2 country code.`).requiredOption(`--language <language>`, `ISO 639-1 language code.`).option(
|
|
100695
|
+
`--is-_default [value]`,
|
|
100696
|
+
``,
|
|
100697
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
100698
|
+
).option(`--position <position>`, `Sort position (default 0).`, parseInteger).action(
|
|
99998
100699
|
actionRunner(
|
|
99999
|
-
async ({ market_id }) => {
|
|
100700
|
+
async ({ market_id, code, country, language, is_default: is_default2, position }) => {
|
|
100000
100701
|
const _client = await sdkForProject();
|
|
100001
100702
|
const _apiPath = `/markets/{market_id}/locales`.replace(`{market_id}`, market_id);
|
|
100002
100703
|
const _payload = {};
|
|
100704
|
+
if (code !== void 0) {
|
|
100705
|
+
_payload[`code`] = code;
|
|
100706
|
+
}
|
|
100707
|
+
if (country !== void 0) {
|
|
100708
|
+
_payload[`country`] = country;
|
|
100709
|
+
}
|
|
100710
|
+
if (is_default2 !== void 0) {
|
|
100711
|
+
_payload[`is_default`] = is_default2;
|
|
100712
|
+
}
|
|
100713
|
+
if (language !== void 0) {
|
|
100714
|
+
_payload[`language`] = language;
|
|
100715
|
+
}
|
|
100716
|
+
if (position !== void 0) {
|
|
100717
|
+
_payload[`position`] = position;
|
|
100718
|
+
}
|
|
100003
100719
|
const _headers = {
|
|
100004
100720
|
"content-type": "application/json"
|
|
100005
100721
|
};
|
|
@@ -100051,12 +100767,31 @@ markets.command(`markets-locales-get`).description(``).requiredOption(`--market-
|
|
|
100051
100767
|
}
|
|
100052
100768
|
)
|
|
100053
100769
|
);
|
|
100054
|
-
markets.command(`markets-locales-update`).description(``).requiredOption(`--market-_id <market-_id>`, ``).requiredOption(`--id <id>`, ``).
|
|
100770
|
+
markets.command(`markets-locales-update`).description(``).requiredOption(`--market-_id <market-_id>`, ``).requiredOption(`--id <id>`, ``).option(`--code <code>`, `Locale code, e.g. 'de-DE' (unique per market).`).option(`--country <country>`, `ISO 3166-1 alpha-2 country code.`).option(
|
|
100771
|
+
`--is-_default [value]`,
|
|
100772
|
+
``,
|
|
100773
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
100774
|
+
).option(`--language <language>`, `ISO 639-1 language code.`).option(`--position <position>`, `Sort position (default 0).`, parseInteger).action(
|
|
100055
100775
|
actionRunner(
|
|
100056
|
-
async ({ market_id, id }) => {
|
|
100776
|
+
async ({ market_id, id, code, country, is_default: is_default2, language, position }) => {
|
|
100057
100777
|
const _client = await sdkForProject();
|
|
100058
100778
|
const _apiPath = `/markets/{market_id}/locales/{id}`.replace(`{market_id}`, market_id).replace(`{id}`, id);
|
|
100059
100779
|
const _payload = {};
|
|
100780
|
+
if (code !== void 0) {
|
|
100781
|
+
_payload[`code`] = code;
|
|
100782
|
+
}
|
|
100783
|
+
if (country !== void 0) {
|
|
100784
|
+
_payload[`country`] = country;
|
|
100785
|
+
}
|
|
100786
|
+
if (is_default2 !== void 0) {
|
|
100787
|
+
_payload[`is_default`] = is_default2;
|
|
100788
|
+
}
|
|
100789
|
+
if (language !== void 0) {
|
|
100790
|
+
_payload[`language`] = language;
|
|
100791
|
+
}
|
|
100792
|
+
if (position !== void 0) {
|
|
100793
|
+
_payload[`position`] = position;
|
|
100794
|
+
}
|
|
100060
100795
|
const _headers = {
|
|
100061
100796
|
"content-type": "application/json"
|
|
100062
100797
|
};
|
|
@@ -100089,12 +100824,34 @@ markets.command(`markets-tax-classes-list`).description(``).requiredOption(`--ma
|
|
|
100089
100824
|
}
|
|
100090
100825
|
)
|
|
100091
100826
|
);
|
|
100092
|
-
markets.command(`markets-tax-classes-create`).description(``).requiredOption(`--market-_id <market-_id>`, ``).
|
|
100827
|
+
markets.command(`markets-tax-classes-create`).description(``).requiredOption(`--market-_id <market-_id>`, ``).requiredOption(`--code <code>`, `Tax class code (unique per market).`).requiredOption(`--name <name>`, ``).option(
|
|
100828
|
+
`--is-_default [value]`,
|
|
100829
|
+
``,
|
|
100830
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
100831
|
+
).option(`--labels <labels>`, `Localized display names ({locale: label}).`).option(`--position <position>`, `Sort position (default 0).`, parseInteger).option(`--rate <rate>`, `Tax rate in percent, 0\u2013100 (default 0).`, parseInteger).action(
|
|
100093
100832
|
actionRunner(
|
|
100094
|
-
async ({ market_id }) => {
|
|
100833
|
+
async ({ market_id, code, name, is_default: is_default2, labels, position, rate }) => {
|
|
100095
100834
|
const _client = await sdkForProject();
|
|
100096
100835
|
const _apiPath = `/markets/{market_id}/tax_classes`.replace(`{market_id}`, market_id);
|
|
100097
100836
|
const _payload = {};
|
|
100837
|
+
if (code !== void 0) {
|
|
100838
|
+
_payload[`code`] = code;
|
|
100839
|
+
}
|
|
100840
|
+
if (is_default2 !== void 0) {
|
|
100841
|
+
_payload[`is_default`] = is_default2;
|
|
100842
|
+
}
|
|
100843
|
+
if (labels !== void 0) {
|
|
100844
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
100845
|
+
}
|
|
100846
|
+
if (name !== void 0) {
|
|
100847
|
+
_payload[`name`] = name;
|
|
100848
|
+
}
|
|
100849
|
+
if (position !== void 0) {
|
|
100850
|
+
_payload[`position`] = position;
|
|
100851
|
+
}
|
|
100852
|
+
if (rate !== void 0) {
|
|
100853
|
+
_payload[`rate`] = rate;
|
|
100854
|
+
}
|
|
100098
100855
|
const _headers = {
|
|
100099
100856
|
"content-type": "application/json"
|
|
100100
100857
|
};
|
|
@@ -100146,12 +100903,34 @@ markets.command(`markets-tax-classes-get`).description(``).requiredOption(`--mar
|
|
|
100146
100903
|
}
|
|
100147
100904
|
)
|
|
100148
100905
|
);
|
|
100149
|
-
markets.command(`markets-tax-classes-update`).description(``).requiredOption(`--market-_id <market-_id>`, ``).requiredOption(`--id <id>`, ``).
|
|
100906
|
+
markets.command(`markets-tax-classes-update`).description(``).requiredOption(`--market-_id <market-_id>`, ``).requiredOption(`--id <id>`, ``).option(`--code <code>`, `Tax class code (unique per market).`).option(
|
|
100907
|
+
`--is-_default [value]`,
|
|
100908
|
+
``,
|
|
100909
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
100910
|
+
).option(`--labels <labels>`, `Localized display names ({locale: label}).`).option(`--name <name>`, ``).option(`--position <position>`, `Sort position (default 0).`, parseInteger).option(`--rate <rate>`, `Tax rate in percent, 0\u2013100 (default 0).`, parseInteger).action(
|
|
100150
100911
|
actionRunner(
|
|
100151
|
-
async ({ market_id, id }) => {
|
|
100912
|
+
async ({ market_id, id, code, is_default: is_default2, labels, name, position, rate }) => {
|
|
100152
100913
|
const _client = await sdkForProject();
|
|
100153
100914
|
const _apiPath = `/markets/{market_id}/tax_classes/{id}`.replace(`{market_id}`, market_id).replace(`{id}`, id);
|
|
100154
100915
|
const _payload = {};
|
|
100916
|
+
if (code !== void 0) {
|
|
100917
|
+
_payload[`code`] = code;
|
|
100918
|
+
}
|
|
100919
|
+
if (is_default2 !== void 0) {
|
|
100920
|
+
_payload[`is_default`] = is_default2;
|
|
100921
|
+
}
|
|
100922
|
+
if (labels !== void 0) {
|
|
100923
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
100924
|
+
}
|
|
100925
|
+
if (name !== void 0) {
|
|
100926
|
+
_payload[`name`] = name;
|
|
100927
|
+
}
|
|
100928
|
+
if (position !== void 0) {
|
|
100929
|
+
_payload[`position`] = position;
|
|
100930
|
+
}
|
|
100931
|
+
if (rate !== void 0) {
|
|
100932
|
+
_payload[`rate`] = rate;
|
|
100933
|
+
}
|
|
100155
100934
|
const _headers = {
|
|
100156
100935
|
"content-type": "application/json"
|
|
100157
100936
|
};
|
|
@@ -101707,12 +102486,39 @@ orders.command(`orders-number-ranges-list`).description(``).action(
|
|
|
101707
102486
|
}
|
|
101708
102487
|
)
|
|
101709
102488
|
);
|
|
101710
|
-
orders.command(`orders-number-ranges-create`).description(``).action(
|
|
102489
|
+
orders.command(`orders-number-ranges-create`).description(``).requiredOption(`--code <code>`, `Range key drawn by the app ('order', 'delivery', 'return') \u2014 unique per tenant.`).option(`--channel-_id <channel-_id>`, ``).option(`--counter <counter>`, `Current counter value (default 0) \u2014 the next number draws counter+step.`, parseInteger).option(`--metadata <metadata>`, `Free-form metadata.`).option(`--padding <padding>`, `Zero-padding width of the counter (default 6).`, parseInteger).option(`--position-_step <position-_step>`, `Position numbering increment for order items (default 10).`, parseInteger).option(`--prefix <prefix>`, `Default ''.`).option(`--step <step>`, `Counter increment per drawn number (default 1).`, parseInteger).option(`--suffix <suffix>`, `Default ''.`).action(
|
|
101711
102490
|
actionRunner(
|
|
101712
|
-
async () => {
|
|
102491
|
+
async ({ code, channel_id, counter, metadata, padding, position_step, prefix, step, suffix }) => {
|
|
101713
102492
|
const _client = await sdkForProject();
|
|
101714
102493
|
const _apiPath = `/orders/number-ranges`;
|
|
101715
102494
|
const _payload = {};
|
|
102495
|
+
if (channel_id !== void 0) {
|
|
102496
|
+
_payload[`channel_id`] = channel_id;
|
|
102497
|
+
}
|
|
102498
|
+
if (code !== void 0) {
|
|
102499
|
+
_payload[`code`] = code;
|
|
102500
|
+
}
|
|
102501
|
+
if (counter !== void 0) {
|
|
102502
|
+
_payload[`counter`] = counter;
|
|
102503
|
+
}
|
|
102504
|
+
if (metadata !== void 0) {
|
|
102505
|
+
_payload[`metadata`] = JSON.parse(metadata);
|
|
102506
|
+
}
|
|
102507
|
+
if (padding !== void 0) {
|
|
102508
|
+
_payload[`padding`] = padding;
|
|
102509
|
+
}
|
|
102510
|
+
if (position_step !== void 0) {
|
|
102511
|
+
_payload[`position_step`] = position_step;
|
|
102512
|
+
}
|
|
102513
|
+
if (prefix !== void 0) {
|
|
102514
|
+
_payload[`prefix`] = prefix;
|
|
102515
|
+
}
|
|
102516
|
+
if (step !== void 0) {
|
|
102517
|
+
_payload[`step`] = step;
|
|
102518
|
+
}
|
|
102519
|
+
if (suffix !== void 0) {
|
|
102520
|
+
_payload[`suffix`] = suffix;
|
|
102521
|
+
}
|
|
101716
102522
|
const _headers = {
|
|
101717
102523
|
"content-type": "application/json"
|
|
101718
102524
|
};
|
|
@@ -101783,12 +102589,39 @@ orders.command(`orders-number-ranges-get`).description(``).requiredOption(`--id
|
|
|
101783
102589
|
}
|
|
101784
102590
|
)
|
|
101785
102591
|
);
|
|
101786
|
-
orders.command(`orders-number-ranges-update`).description(``).requiredOption(`--id <id>`, ``).action(
|
|
102592
|
+
orders.command(`orders-number-ranges-update`).description(``).requiredOption(`--id <id>`, ``).option(`--channel-_id <channel-_id>`, ``).option(`--code <code>`, `Range key drawn by the app ('order', 'delivery', 'return') \u2014 unique per tenant.`).option(`--counter <counter>`, `Current counter value (default 0) \u2014 the next number draws counter+step.`, parseInteger).option(`--metadata <metadata>`, `Free-form metadata.`).option(`--padding <padding>`, `Zero-padding width of the counter (default 6).`, parseInteger).option(`--position-_step <position-_step>`, `Position numbering increment for order items (default 10).`, parseInteger).option(`--prefix <prefix>`, `Default ''.`).option(`--step <step>`, `Counter increment per drawn number (default 1).`, parseInteger).option(`--suffix <suffix>`, `Default ''.`).action(
|
|
101787
102593
|
actionRunner(
|
|
101788
|
-
async ({ id }) => {
|
|
102594
|
+
async ({ id, channel_id, code, counter, metadata, padding, position_step, prefix, step, suffix }) => {
|
|
101789
102595
|
const _client = await sdkForProject();
|
|
101790
102596
|
const _apiPath = `/orders/number-ranges/{id}`.replace(`{id}`, id);
|
|
101791
102597
|
const _payload = {};
|
|
102598
|
+
if (channel_id !== void 0) {
|
|
102599
|
+
_payload[`channel_id`] = channel_id;
|
|
102600
|
+
}
|
|
102601
|
+
if (code !== void 0) {
|
|
102602
|
+
_payload[`code`] = code;
|
|
102603
|
+
}
|
|
102604
|
+
if (counter !== void 0) {
|
|
102605
|
+
_payload[`counter`] = counter;
|
|
102606
|
+
}
|
|
102607
|
+
if (metadata !== void 0) {
|
|
102608
|
+
_payload[`metadata`] = JSON.parse(metadata);
|
|
102609
|
+
}
|
|
102610
|
+
if (padding !== void 0) {
|
|
102611
|
+
_payload[`padding`] = padding;
|
|
102612
|
+
}
|
|
102613
|
+
if (position_step !== void 0) {
|
|
102614
|
+
_payload[`position_step`] = position_step;
|
|
102615
|
+
}
|
|
102616
|
+
if (prefix !== void 0) {
|
|
102617
|
+
_payload[`prefix`] = prefix;
|
|
102618
|
+
}
|
|
102619
|
+
if (step !== void 0) {
|
|
102620
|
+
_payload[`step`] = step;
|
|
102621
|
+
}
|
|
102622
|
+
if (suffix !== void 0) {
|
|
102623
|
+
_payload[`suffix`] = suffix;
|
|
102624
|
+
}
|
|
101792
102625
|
const _headers = {
|
|
101793
102626
|
"content-type": "application/json"
|
|
101794
102627
|
};
|
|
@@ -101802,12 +102635,63 @@ orders.command(`orders-number-ranges-update`).description(``).requiredOption(`--
|
|
|
101802
102635
|
}
|
|
101803
102636
|
)
|
|
101804
102637
|
);
|
|
101805
|
-
orders.command(`orders-place`).description(``).action(
|
|
102638
|
+
orders.command(`orders-place`).description(``).requiredOption(`--items [items...]`, `The order positions (at most 500).`).option(`--billing-_address <billing-_address>`, `Frozen billing address.`).option(`--buyer <buyer>`, `Frozen buyer snapshot (name, email, \u2026).`).option(`--cart-_id <cart-_id>`, `Source cart (the carts.order hand-over).`).option(`--channel-_id <channel-_id>`, ``).option(`--contact-_id <contact-_id>`, `Ordering customer contact.`).option(`--currency <currency>`, `ISO 4217 code (default EUR).`).option(`--customer-_order-_number <customer-_order-_number>`, `The buyer's own order/PO number.`).option(`--grand-_total <grand-_total>`, `Override \u2014 computed as subtotal + shipping + tax when omitted.`, parseInteger).option(`--market-_id <market-_id>`, ``).option(`--metadata <metadata>`, `Free-form metadata.`).option(`--organization-_id <organization-_id>`, `B2B organization.`).option(`--payment <payment>`, `Frozen payment snapshot \u2014 a known 'payment.status' seeds payment_status (otherwise 'open').`).option(`--shipping <shipping>`, `Frozen shipping snapshot \u2014 'shipping.price' seeds shipping_total.`).option(`--shipping-_address <shipping-_address>`, `Frozen shipping address.`).option(`--shipping-_total <shipping-_total>`, `Shipping total (fallback when 'shipping.price' is absent).`, parseInteger).option(`--user-_data <user-_data>`, `Free-form user data.`).action(
|
|
101806
102639
|
actionRunner(
|
|
101807
|
-
async () => {
|
|
102640
|
+
async ({ items, billing_address, buyer, cart_id, channel_id, contact_id, currency, customer_order_number, grand_total, market_id, metadata, organization_id, payment, shipping: shipping2, shipping_address, shipping_total, user_data }) => {
|
|
101808
102641
|
const _client = await sdkForProject();
|
|
101809
102642
|
const _apiPath = `/orders/place`;
|
|
101810
102643
|
const _payload = {};
|
|
102644
|
+
if (billing_address !== void 0) {
|
|
102645
|
+
_payload[`billing_address`] = JSON.parse(billing_address);
|
|
102646
|
+
}
|
|
102647
|
+
if (buyer !== void 0) {
|
|
102648
|
+
_payload[`buyer`] = JSON.parse(buyer);
|
|
102649
|
+
}
|
|
102650
|
+
if (cart_id !== void 0) {
|
|
102651
|
+
_payload[`cart_id`] = cart_id;
|
|
102652
|
+
}
|
|
102653
|
+
if (channel_id !== void 0) {
|
|
102654
|
+
_payload[`channel_id`] = channel_id;
|
|
102655
|
+
}
|
|
102656
|
+
if (contact_id !== void 0) {
|
|
102657
|
+
_payload[`contact_id`] = contact_id;
|
|
102658
|
+
}
|
|
102659
|
+
if (currency !== void 0) {
|
|
102660
|
+
_payload[`currency`] = currency;
|
|
102661
|
+
}
|
|
102662
|
+
if (customer_order_number !== void 0) {
|
|
102663
|
+
_payload[`customer_order_number`] = customer_order_number;
|
|
102664
|
+
}
|
|
102665
|
+
if (grand_total !== void 0) {
|
|
102666
|
+
_payload[`grand_total`] = grand_total;
|
|
102667
|
+
}
|
|
102668
|
+
if (items !== void 0) {
|
|
102669
|
+
_payload[`items`] = items;
|
|
102670
|
+
}
|
|
102671
|
+
if (market_id !== void 0) {
|
|
102672
|
+
_payload[`market_id`] = market_id;
|
|
102673
|
+
}
|
|
102674
|
+
if (metadata !== void 0) {
|
|
102675
|
+
_payload[`metadata`] = JSON.parse(metadata);
|
|
102676
|
+
}
|
|
102677
|
+
if (organization_id !== void 0) {
|
|
102678
|
+
_payload[`organization_id`] = organization_id;
|
|
102679
|
+
}
|
|
102680
|
+
if (payment !== void 0) {
|
|
102681
|
+
_payload[`payment`] = JSON.parse(payment);
|
|
102682
|
+
}
|
|
102683
|
+
if (shipping2 !== void 0) {
|
|
102684
|
+
_payload[`shipping`] = JSON.parse(shipping2);
|
|
102685
|
+
}
|
|
102686
|
+
if (shipping_address !== void 0) {
|
|
102687
|
+
_payload[`shipping_address`] = JSON.parse(shipping_address);
|
|
102688
|
+
}
|
|
102689
|
+
if (shipping_total !== void 0) {
|
|
102690
|
+
_payload[`shipping_total`] = shipping_total;
|
|
102691
|
+
}
|
|
102692
|
+
if (user_data !== void 0) {
|
|
102693
|
+
_payload[`user_data`] = JSON.parse(user_data);
|
|
102694
|
+
}
|
|
101811
102695
|
const _headers = {
|
|
101812
102696
|
"content-type": "application/json"
|
|
101813
102697
|
};
|
|
@@ -101840,12 +102724,30 @@ orders.command(`orders-get`).description(``).requiredOption(`--id <id>`, ``).act
|
|
|
101840
102724
|
}
|
|
101841
102725
|
)
|
|
101842
102726
|
);
|
|
101843
|
-
orders.command(`orders-update`).description(``).requiredOption(`--id <id>`, ``).action(
|
|
102727
|
+
orders.command(`orders-update`).description(``).requiredOption(`--id <id>`, ``).option(`--billing-_address <billing-_address>`, ``).option(`--buyer <buyer>`, ``).option(`--customer-_order-_number <customer-_order-_number>`, ``).option(`--metadata <metadata>`, `Free-form metadata.`).option(`--shipping-_address <shipping-_address>`, ``).option(`--user-_data <user-_data>`, `Free-form user data.`).action(
|
|
101844
102728
|
actionRunner(
|
|
101845
|
-
async ({ id }) => {
|
|
102729
|
+
async ({ id, billing_address, buyer, customer_order_number, metadata, shipping_address, user_data }) => {
|
|
101846
102730
|
const _client = await sdkForProject();
|
|
101847
102731
|
const _apiPath = `/orders/{id}`.replace(`{id}`, id);
|
|
101848
102732
|
const _payload = {};
|
|
102733
|
+
if (billing_address !== void 0) {
|
|
102734
|
+
_payload[`billing_address`] = JSON.parse(billing_address);
|
|
102735
|
+
}
|
|
102736
|
+
if (buyer !== void 0) {
|
|
102737
|
+
_payload[`buyer`] = JSON.parse(buyer);
|
|
102738
|
+
}
|
|
102739
|
+
if (customer_order_number !== void 0) {
|
|
102740
|
+
_payload[`customer_order_number`] = customer_order_number;
|
|
102741
|
+
}
|
|
102742
|
+
if (metadata !== void 0) {
|
|
102743
|
+
_payload[`metadata`] = JSON.parse(metadata);
|
|
102744
|
+
}
|
|
102745
|
+
if (shipping_address !== void 0) {
|
|
102746
|
+
_payload[`shipping_address`] = JSON.parse(shipping_address);
|
|
102747
|
+
}
|
|
102748
|
+
if (user_data !== void 0) {
|
|
102749
|
+
_payload[`user_data`] = JSON.parse(user_data);
|
|
102750
|
+
}
|
|
101849
102751
|
const _headers = {
|
|
101850
102752
|
"content-type": "application/json"
|
|
101851
102753
|
};
|
|
@@ -101859,12 +102761,15 @@ orders.command(`orders-update`).description(``).requiredOption(`--id <id>`, ``).
|
|
|
101859
102761
|
}
|
|
101860
102762
|
)
|
|
101861
102763
|
);
|
|
101862
|
-
orders.command(`orders-acknowledge`).description(``).requiredOption(`--id <id>`, ``).action(
|
|
102764
|
+
orders.command(`orders-acknowledge`).description(``).requiredOption(`--id <id>`, ``).option(`--external-_ref <external-_ref>`, `The fulfilling system's order reference (e.g. the ERP order number).`).action(
|
|
101863
102765
|
actionRunner(
|
|
101864
|
-
async ({ id }) => {
|
|
102766
|
+
async ({ id, external_ref }) => {
|
|
101865
102767
|
const _client = await sdkForProject();
|
|
101866
102768
|
const _apiPath = `/orders/{id}/acknowledge`.replace(`{id}`, id);
|
|
101867
102769
|
const _payload = {};
|
|
102770
|
+
if (external_ref !== void 0) {
|
|
102771
|
+
_payload[`external_ref`] = external_ref;
|
|
102772
|
+
}
|
|
101868
102773
|
const _headers = {
|
|
101869
102774
|
"content-type": "application/json"
|
|
101870
102775
|
};
|
|
@@ -101878,12 +102783,18 @@ orders.command(`orders-acknowledge`).description(``).requiredOption(`--id <id>`,
|
|
|
101878
102783
|
}
|
|
101879
102784
|
)
|
|
101880
102785
|
);
|
|
101881
|
-
orders.command(`orders-cancel`).description(``).requiredOption(`--id <id>`, ``).action(
|
|
102786
|
+
orders.command(`orders-cancel`).description(``).requiredOption(`--id <id>`, ``).option(`--cancelled-_by <cancelled-_by>`, `Acting user/system.`).option(`--reason <reason>`, ``).action(
|
|
101882
102787
|
actionRunner(
|
|
101883
|
-
async ({ id }) => {
|
|
102788
|
+
async ({ id, cancelled_by, reason }) => {
|
|
101884
102789
|
const _client = await sdkForProject();
|
|
101885
102790
|
const _apiPath = `/orders/{id}/cancel`.replace(`{id}`, id);
|
|
101886
102791
|
const _payload = {};
|
|
102792
|
+
if (cancelled_by !== void 0) {
|
|
102793
|
+
_payload[`cancelled_by`] = cancelled_by;
|
|
102794
|
+
}
|
|
102795
|
+
if (reason !== void 0) {
|
|
102796
|
+
_payload[`reason`] = reason;
|
|
102797
|
+
}
|
|
101887
102798
|
const _headers = {
|
|
101888
102799
|
"content-type": "application/json"
|
|
101889
102800
|
};
|
|
@@ -101916,12 +102827,21 @@ orders.command(`orders-comments-list`).description(``).requiredOption(`--id <id>
|
|
|
101916
102827
|
}
|
|
101917
102828
|
)
|
|
101918
102829
|
);
|
|
101919
|
-
orders.command(`orders-comments-create`).description(``).requiredOption(`--id <id>`, ``).action(
|
|
102830
|
+
orders.command(`orders-comments-create`).description(``).requiredOption(`--id <id>`, ``).requiredOption(`--body <body>`, ``).option(`--author <author>`, ``).option(`--visibility <visibility>`, `Default 'internal'.`).action(
|
|
101920
102831
|
actionRunner(
|
|
101921
|
-
async ({ id }) => {
|
|
102832
|
+
async ({ id, body, author, visibility }) => {
|
|
101922
102833
|
const _client = await sdkForProject();
|
|
101923
102834
|
const _apiPath = `/orders/{id}/comments`.replace(`{id}`, id);
|
|
101924
102835
|
const _payload = {};
|
|
102836
|
+
if (author !== void 0) {
|
|
102837
|
+
_payload[`author`] = author;
|
|
102838
|
+
}
|
|
102839
|
+
if (body !== void 0) {
|
|
102840
|
+
_payload[`body`] = body;
|
|
102841
|
+
}
|
|
102842
|
+
if (visibility !== void 0) {
|
|
102843
|
+
_payload[`visibility`] = visibility;
|
|
102844
|
+
}
|
|
101925
102845
|
const _headers = {
|
|
101926
102846
|
"content-type": "application/json"
|
|
101927
102847
|
};
|
|
@@ -101954,12 +102874,15 @@ orders.command(`orders-events-list`).description(``).requiredOption(`--id <id>`,
|
|
|
101954
102874
|
}
|
|
101955
102875
|
)
|
|
101956
102876
|
);
|
|
101957
|
-
orders.command(`orders-hold`).description(``).requiredOption(`--id <id>`, ``).action(
|
|
102877
|
+
orders.command(`orders-hold`).description(``).requiredOption(`--id <id>`, ``).option(`--reason <reason>`, `Why the order is blocked (shown on the shipping guard).`).action(
|
|
101958
102878
|
actionRunner(
|
|
101959
|
-
async ({ id }) => {
|
|
102879
|
+
async ({ id, reason }) => {
|
|
101960
102880
|
const _client = await sdkForProject();
|
|
101961
102881
|
const _apiPath = `/orders/{id}/hold`.replace(`{id}`, id);
|
|
101962
102882
|
const _payload = {};
|
|
102883
|
+
if (reason !== void 0) {
|
|
102884
|
+
_payload[`reason`] = reason;
|
|
102885
|
+
}
|
|
101963
102886
|
const _headers = {
|
|
101964
102887
|
"content-type": "application/json"
|
|
101965
102888
|
};
|
|
@@ -101973,12 +102896,21 @@ orders.command(`orders-hold`).description(``).requiredOption(`--id <id>`, ``).ac
|
|
|
101973
102896
|
}
|
|
101974
102897
|
)
|
|
101975
102898
|
);
|
|
101976
|
-
orders.command(`orders-items-cancel`).description(``).requiredOption(`--id <id>`, ``).action(
|
|
102899
|
+
orders.command(`orders-items-cancel`).description(``).requiredOption(`--id <id>`, ``).requiredOption(`--positions [positions...]`, ``).option(`--cancelled-_by <cancelled-_by>`, `Acting user/system.`).option(`--reason <reason>`, ``).action(
|
|
101977
102900
|
actionRunner(
|
|
101978
|
-
async ({ id }) => {
|
|
102901
|
+
async ({ id, positions, cancelled_by, reason }) => {
|
|
101979
102902
|
const _client = await sdkForProject();
|
|
101980
102903
|
const _apiPath = `/orders/{id}/items/cancel`.replace(`{id}`, id);
|
|
101981
102904
|
const _payload = {};
|
|
102905
|
+
if (cancelled_by !== void 0) {
|
|
102906
|
+
_payload[`cancelled_by`] = cancelled_by;
|
|
102907
|
+
}
|
|
102908
|
+
if (positions !== void 0) {
|
|
102909
|
+
_payload[`positions`] = positions;
|
|
102910
|
+
}
|
|
102911
|
+
if (reason !== void 0) {
|
|
102912
|
+
_payload[`reason`] = reason;
|
|
102913
|
+
}
|
|
101982
102914
|
const _headers = {
|
|
101983
102915
|
"content-type": "application/json"
|
|
101984
102916
|
};
|
|
@@ -101992,12 +102924,18 @@ orders.command(`orders-items-cancel`).description(``).requiredOption(`--id <id>`
|
|
|
101992
102924
|
}
|
|
101993
102925
|
)
|
|
101994
102926
|
);
|
|
101995
|
-
orders.command(`orders-payment-status-update`).description(``).requiredOption(`--id <id>`, ``).action(
|
|
102927
|
+
orders.command(`orders-payment-status-update`).description(``).requiredOption(`--id <id>`, ``).requiredOption(`--status <status>`, `The new payment dimension value.`).option(`--payment-_id <payment-_id>`, `Reference into the payment system \u2014 merged into the order's payment snapshot.`).action(
|
|
101996
102928
|
actionRunner(
|
|
101997
|
-
async ({ id }) => {
|
|
102929
|
+
async ({ id, status, payment_id }) => {
|
|
101998
102930
|
const _client = await sdkForProject();
|
|
101999
102931
|
const _apiPath = `/orders/{id}/payment-status`.replace(`{id}`, id);
|
|
102000
102932
|
const _payload = {};
|
|
102933
|
+
if (payment_id !== void 0) {
|
|
102934
|
+
_payload[`payment_id`] = payment_id;
|
|
102935
|
+
}
|
|
102936
|
+
if (status !== void 0) {
|
|
102937
|
+
_payload[`status`] = status;
|
|
102938
|
+
}
|
|
102001
102939
|
const _headers = {
|
|
102002
102940
|
"content-type": "application/json"
|
|
102003
102941
|
};
|
|
@@ -102011,12 +102949,21 @@ orders.command(`orders-payment-status-update`).description(``).requiredOption(`-
|
|
|
102011
102949
|
}
|
|
102012
102950
|
)
|
|
102013
102951
|
);
|
|
102014
|
-
orders.command(`orders-return`).description(``).requiredOption(`--id <id>`, ``).action(
|
|
102952
|
+
orders.command(`orders-return`).description(``).requiredOption(`--id <id>`, ``).requiredOption(`--positions [positions...]`, ``).option(`--metadata <metadata>`, `Free-form metadata.`).option(`--reason <reason>`, ``).action(
|
|
102015
102953
|
actionRunner(
|
|
102016
|
-
async ({ id }) => {
|
|
102954
|
+
async ({ id, positions, metadata, reason }) => {
|
|
102017
102955
|
const _client = await sdkForProject();
|
|
102018
102956
|
const _apiPath = `/orders/{id}/return`.replace(`{id}`, id);
|
|
102019
102957
|
const _payload = {};
|
|
102958
|
+
if (metadata !== void 0) {
|
|
102959
|
+
_payload[`metadata`] = JSON.parse(metadata);
|
|
102960
|
+
}
|
|
102961
|
+
if (positions !== void 0) {
|
|
102962
|
+
_payload[`positions`] = positions;
|
|
102963
|
+
}
|
|
102964
|
+
if (reason !== void 0) {
|
|
102965
|
+
_payload[`reason`] = reason;
|
|
102966
|
+
}
|
|
102020
102967
|
const _headers = {
|
|
102021
102968
|
"content-type": "application/json"
|
|
102022
102969
|
};
|
|
@@ -102030,12 +102977,15 @@ orders.command(`orders-return`).description(``).requiredOption(`--id <id>`, ``).
|
|
|
102030
102977
|
}
|
|
102031
102978
|
)
|
|
102032
102979
|
);
|
|
102033
|
-
orders.command(`orders-returns-complete`).description(``).requiredOption(`--id <id>`, ``).requiredOption(`--rid <rid>`, ``).action(
|
|
102980
|
+
orders.command(`orders-returns-complete`).description(``).requiredOption(`--id <id>`, ``).requiredOption(`--rid <rid>`, ``).option(`--resolution <resolution>`, `How the return was settled (refund, replacement, \u2026).`).action(
|
|
102034
102981
|
actionRunner(
|
|
102035
|
-
async ({ id, rid }) => {
|
|
102982
|
+
async ({ id, rid, resolution }) => {
|
|
102036
102983
|
const _client = await sdkForProject();
|
|
102037
102984
|
const _apiPath = `/orders/{id}/returns/{rid}/complete`.replace(`{id}`, id).replace(`{rid}`, rid);
|
|
102038
102985
|
const _payload = {};
|
|
102986
|
+
if (resolution !== void 0) {
|
|
102987
|
+
_payload[`resolution`] = resolution;
|
|
102988
|
+
}
|
|
102039
102989
|
const _headers = {
|
|
102040
102990
|
"content-type": "application/json"
|
|
102041
102991
|
};
|
|
@@ -102049,12 +102999,15 @@ orders.command(`orders-returns-complete`).description(``).requiredOption(`--id <
|
|
|
102049
102999
|
}
|
|
102050
103000
|
)
|
|
102051
103001
|
);
|
|
102052
|
-
orders.command(`orders-returns-receive`).description(``).requiredOption(`--id <id>`, ``).requiredOption(`--rid <rid>`, ``).action(
|
|
103002
|
+
orders.command(`orders-returns-receive`).description(``).requiredOption(`--id <id>`, ``).requiredOption(`--rid <rid>`, ``).requiredOption(`--data <data>`, `Request body`).action(
|
|
102053
103003
|
actionRunner(
|
|
102054
|
-
async ({ id, rid }) => {
|
|
103004
|
+
async ({ id, rid, data }) => {
|
|
102055
103005
|
const _client = await sdkForProject();
|
|
102056
103006
|
const _apiPath = `/orders/{id}/returns/{rid}/receive`.replace(`{id}`, id).replace(`{rid}`, rid);
|
|
102057
103007
|
const _payload = {};
|
|
103008
|
+
if (data !== void 0) {
|
|
103009
|
+
Object.assign(_payload, JSON.parse(data));
|
|
103010
|
+
}
|
|
102058
103011
|
const _headers = {
|
|
102059
103012
|
"content-type": "application/json"
|
|
102060
103013
|
};
|
|
@@ -102068,12 +103021,18 @@ orders.command(`orders-returns-receive`).description(``).requiredOption(`--id <i
|
|
|
102068
103021
|
}
|
|
102069
103022
|
)
|
|
102070
103023
|
);
|
|
102071
|
-
orders.command(`orders-returns-reject`).description(``).requiredOption(`--id <id>`, ``).requiredOption(`--rid <rid>`, ``).action(
|
|
103024
|
+
orders.command(`orders-returns-reject`).description(``).requiredOption(`--id <id>`, ``).requiredOption(`--rid <rid>`, ``).option(`--reason <reason>`, `Fallback for 'resolution'.`).option(`--resolution <resolution>`, `Why the return was rejected.`).action(
|
|
102072
103025
|
actionRunner(
|
|
102073
|
-
async ({ id, rid }) => {
|
|
103026
|
+
async ({ id, rid, reason, resolution }) => {
|
|
102074
103027
|
const _client = await sdkForProject();
|
|
102075
103028
|
const _apiPath = `/orders/{id}/returns/{rid}/reject`.replace(`{id}`, id).replace(`{rid}`, rid);
|
|
102076
103029
|
const _payload = {};
|
|
103030
|
+
if (reason !== void 0) {
|
|
103031
|
+
_payload[`reason`] = reason;
|
|
103032
|
+
}
|
|
103033
|
+
if (resolution !== void 0) {
|
|
103034
|
+
_payload[`resolution`] = resolution;
|
|
103035
|
+
}
|
|
102077
103036
|
const _headers = {
|
|
102078
103037
|
"content-type": "application/json"
|
|
102079
103038
|
};
|
|
@@ -102087,12 +103046,33 @@ orders.command(`orders-returns-reject`).description(``).requiredOption(`--id <id
|
|
|
102087
103046
|
}
|
|
102088
103047
|
)
|
|
102089
103048
|
);
|
|
102090
|
-
orders.command(`orders-ship`).description(``).requiredOption(`--id <id>`, ``).action(
|
|
103049
|
+
orders.command(`orders-ship`).description(``).requiredOption(`--id <id>`, ``).option(`--carrier <carrier>`, ``).option(`--metadata <metadata>`, `Free-form metadata.`).option(`--number <number>`, `Delivery note number \u2014 drawn from the 'delivery' range when omitted.`).option(`--positions [positions...]`, `Omitted = every position with open quantity, in full.`).option(`--shipped-_at <shipped-_at>`, `Defaults to now.`).option(`--tracking-_code <tracking-_code>`, ``).option(`--tracking-_url <tracking-_url>`, ``).action(
|
|
102091
103050
|
actionRunner(
|
|
102092
|
-
async ({ id }) => {
|
|
103051
|
+
async ({ id, carrier, metadata, number: number4, positions, shipped_at, tracking_code, tracking_url }) => {
|
|
102093
103052
|
const _client = await sdkForProject();
|
|
102094
103053
|
const _apiPath = `/orders/{id}/ship`.replace(`{id}`, id);
|
|
102095
103054
|
const _payload = {};
|
|
103055
|
+
if (carrier !== void 0) {
|
|
103056
|
+
_payload[`carrier`] = carrier;
|
|
103057
|
+
}
|
|
103058
|
+
if (metadata !== void 0) {
|
|
103059
|
+
_payload[`metadata`] = JSON.parse(metadata);
|
|
103060
|
+
}
|
|
103061
|
+
if (number4 !== void 0) {
|
|
103062
|
+
_payload[`number`] = number4;
|
|
103063
|
+
}
|
|
103064
|
+
if (positions !== void 0) {
|
|
103065
|
+
_payload[`positions`] = positions;
|
|
103066
|
+
}
|
|
103067
|
+
if (shipped_at !== void 0) {
|
|
103068
|
+
_payload[`shipped_at`] = shipped_at;
|
|
103069
|
+
}
|
|
103070
|
+
if (tracking_code !== void 0) {
|
|
103071
|
+
_payload[`tracking_code`] = tracking_code;
|
|
103072
|
+
}
|
|
103073
|
+
if (tracking_url !== void 0) {
|
|
103074
|
+
_payload[`tracking_url`] = tracking_url;
|
|
103075
|
+
}
|
|
102096
103076
|
const _headers = {
|
|
102097
103077
|
"content-type": "application/json"
|
|
102098
103078
|
};
|
|
@@ -102106,12 +103086,15 @@ orders.command(`orders-ship`).description(``).requiredOption(`--id <id>`, ``).ac
|
|
|
102106
103086
|
}
|
|
102107
103087
|
)
|
|
102108
103088
|
);
|
|
102109
|
-
orders.command(`orders-unhold`).description(``).requiredOption(`--id <id>`, ``).action(
|
|
103089
|
+
orders.command(`orders-unhold`).description(``).requiredOption(`--id <id>`, ``).requiredOption(`--data <data>`, `Request body`).action(
|
|
102110
103090
|
actionRunner(
|
|
102111
|
-
async ({ id }) => {
|
|
103091
|
+
async ({ id, data }) => {
|
|
102112
103092
|
const _client = await sdkForProject();
|
|
102113
103093
|
const _apiPath = `/orders/{id}/unhold`.replace(`{id}`, id);
|
|
102114
103094
|
const _payload = {};
|
|
103095
|
+
if (data !== void 0) {
|
|
103096
|
+
Object.assign(_payload, JSON.parse(data));
|
|
103097
|
+
}
|
|
102115
103098
|
const _headers = {
|
|
102116
103099
|
"content-type": "application/json"
|
|
102117
103100
|
};
|
|
@@ -102565,12 +103548,21 @@ pages.command(`pages-editor-mutation-status`).description(``).requiredOption(`--
|
|
|
102565
103548
|
}
|
|
102566
103549
|
)
|
|
102567
103550
|
);
|
|
102568
|
-
pages.command(`pages-editor-mutate`).description(``).requiredOption(`--page-_id <page-_id>`, ``).action(
|
|
103551
|
+
pages.command(`pages-editor-mutate`).description(``).requiredOption(`--page-_id <page-_id>`, ``).requiredOption(`--plugin <plugin>`, `Mutation plugin id (add, move, delete, duplicate, update_field_value, ...).`).option(`--langcode <langcode>`, ``).option(`--payload <payload>`, ``).action(
|
|
102569
103552
|
actionRunner(
|
|
102570
|
-
async ({ page_id }) => {
|
|
103553
|
+
async ({ page_id, plugin, langcode, payload }) => {
|
|
102571
103554
|
const _client = await sdkForProject();
|
|
102572
103555
|
const _apiPath = `/pages/editor/{page_id}/mutations`.replace(`{page_id}`, page_id);
|
|
102573
103556
|
const _payload = {};
|
|
103557
|
+
if (langcode !== void 0) {
|
|
103558
|
+
_payload[`langcode`] = langcode;
|
|
103559
|
+
}
|
|
103560
|
+
if (payload !== void 0) {
|
|
103561
|
+
_payload[`payload`] = JSON.parse(payload);
|
|
103562
|
+
}
|
|
103563
|
+
if (plugin !== void 0) {
|
|
103564
|
+
_payload[`plugin`] = plugin;
|
|
103565
|
+
}
|
|
102574
103566
|
const _headers = {
|
|
102575
103567
|
"content-type": "application/json"
|
|
102576
103568
|
};
|
|
@@ -102831,12 +103823,21 @@ pages.command(`pages-library-get`).description(``).requiredOption(`--id <id>`, `
|
|
|
102831
103823
|
}
|
|
102832
103824
|
)
|
|
102833
103825
|
);
|
|
102834
|
-
pages.command(`pages-library-update`).description(``).requiredOption(`--id <id>`, ``).action(
|
|
103826
|
+
pages.command(`pages-library-update`).description(``).requiredOption(`--id <id>`, ``).option(`--bundle <bundle>`, ``).option(`--label <label>`, ``).option(`--tree <tree>`, `Serialized block tree ({ bundle, props, props_i18n, options, children }).`).action(
|
|
102835
103827
|
actionRunner(
|
|
102836
|
-
async ({ id }) => {
|
|
103828
|
+
async ({ id, bundle, label, tree }) => {
|
|
102837
103829
|
const _client = await sdkForProject();
|
|
102838
103830
|
const _apiPath = `/pages/library/{id}`.replace(`{id}`, id);
|
|
102839
103831
|
const _payload = {};
|
|
103832
|
+
if (bundle !== void 0) {
|
|
103833
|
+
_payload[`bundle`] = bundle;
|
|
103834
|
+
}
|
|
103835
|
+
if (label !== void 0) {
|
|
103836
|
+
_payload[`label`] = label;
|
|
103837
|
+
}
|
|
103838
|
+
if (tree !== void 0) {
|
|
103839
|
+
_payload[`tree`] = JSON.parse(tree);
|
|
103840
|
+
}
|
|
102840
103841
|
const _headers = {
|
|
102841
103842
|
"content-type": "application/json"
|
|
102842
103843
|
};
|
|
@@ -102869,12 +103870,30 @@ pages.command(`pages-pages-list`).description(``).action(
|
|
|
102869
103870
|
}
|
|
102870
103871
|
)
|
|
102871
103872
|
);
|
|
102872
|
-
pages.command(`pages-pages-create`).description(``).action(
|
|
103873
|
+
pages.command(`pages-pages-create`).description(``).requiredOption(`--title <title>`, ``).option(`--bundle <bundle>`, ``).option(`--host-options <host-options>`, ``).option(`--meta <meta>`, ``).option(`--slug <slug>`, ``).option(`--source-language <source-language>`, ``).action(
|
|
102873
103874
|
actionRunner(
|
|
102874
|
-
async () => {
|
|
103875
|
+
async ({ title, bundle, hostOptions, meta: meta3, slug, sourceLanguage }) => {
|
|
102875
103876
|
const _client = await sdkForProject();
|
|
102876
103877
|
const _apiPath = `/pages/pages`;
|
|
102877
103878
|
const _payload = {};
|
|
103879
|
+
if (bundle !== void 0) {
|
|
103880
|
+
_payload[`bundle`] = bundle;
|
|
103881
|
+
}
|
|
103882
|
+
if (hostOptions !== void 0) {
|
|
103883
|
+
_payload[`hostOptions`] = JSON.parse(hostOptions);
|
|
103884
|
+
}
|
|
103885
|
+
if (meta3 !== void 0) {
|
|
103886
|
+
_payload[`meta`] = JSON.parse(meta3);
|
|
103887
|
+
}
|
|
103888
|
+
if (slug !== void 0) {
|
|
103889
|
+
_payload[`slug`] = slug;
|
|
103890
|
+
}
|
|
103891
|
+
if (sourceLanguage !== void 0) {
|
|
103892
|
+
_payload[`sourceLanguage`] = sourceLanguage;
|
|
103893
|
+
}
|
|
103894
|
+
if (title !== void 0) {
|
|
103895
|
+
_payload[`title`] = title;
|
|
103896
|
+
}
|
|
102878
103897
|
const _headers = {
|
|
102879
103898
|
"content-type": "application/json"
|
|
102880
103899
|
};
|
|
@@ -102926,12 +103945,27 @@ pages.command(`pages-pages-get`).description(``).requiredOption(`--id <id>`, ``)
|
|
|
102926
103945
|
}
|
|
102927
103946
|
)
|
|
102928
103947
|
);
|
|
102929
|
-
pages.command(`pages-pages-update`).description(``).requiredOption(`--id <id>`, ``).action(
|
|
103948
|
+
pages.command(`pages-pages-update`).description(``).requiredOption(`--id <id>`, ``).option(`--bundle <bundle>`, ``).option(`--meta <meta>`, ``).option(`--slug <slug>`, ``).option(`--status <status>`, ``).option(`--title <title>`, ``).action(
|
|
102930
103949
|
actionRunner(
|
|
102931
|
-
async ({ id }) => {
|
|
103950
|
+
async ({ id, bundle, meta: meta3, slug, status, title }) => {
|
|
102932
103951
|
const _client = await sdkForProject();
|
|
102933
103952
|
const _apiPath = `/pages/pages/{id}`.replace(`{id}`, id);
|
|
102934
103953
|
const _payload = {};
|
|
103954
|
+
if (bundle !== void 0) {
|
|
103955
|
+
_payload[`bundle`] = bundle;
|
|
103956
|
+
}
|
|
103957
|
+
if (meta3 !== void 0) {
|
|
103958
|
+
_payload[`meta`] = JSON.parse(meta3);
|
|
103959
|
+
}
|
|
103960
|
+
if (slug !== void 0) {
|
|
103961
|
+
_payload[`slug`] = slug;
|
|
103962
|
+
}
|
|
103963
|
+
if (status !== void 0) {
|
|
103964
|
+
_payload[`status`] = status;
|
|
103965
|
+
}
|
|
103966
|
+
if (title !== void 0) {
|
|
103967
|
+
_payload[`title`] = title;
|
|
103968
|
+
}
|
|
102935
103969
|
const _headers = {
|
|
102936
103970
|
"content-type": "application/json"
|
|
102937
103971
|
};
|
|
@@ -102964,12 +103998,15 @@ pages.command(`pages-pages-revisions`).description(``).requiredOption(`--id <id>
|
|
|
102964
103998
|
}
|
|
102965
103999
|
)
|
|
102966
104000
|
);
|
|
102967
|
-
pages.command(`pages-seed`).description(``).action(
|
|
104001
|
+
pages.command(`pages-seed`).description(``).option(`--pages [pages...]`, ``).action(
|
|
102968
104002
|
actionRunner(
|
|
102969
|
-
async () => {
|
|
104003
|
+
async ({ pages: pages2 }) => {
|
|
102970
104004
|
const _client = await sdkForProject();
|
|
102971
104005
|
const _apiPath = `/pages/seed`;
|
|
102972
104006
|
const _payload = {};
|
|
104007
|
+
if (pages2 !== void 0) {
|
|
104008
|
+
_payload[`pages`] = pages2;
|
|
104009
|
+
}
|
|
102973
104010
|
const _headers = {
|
|
102974
104011
|
"content-type": "application/json"
|
|
102975
104012
|
};
|
|
@@ -103040,12 +104077,34 @@ pages.command(`pages-templates-get`).description(``).requiredOption(`--id <id>`,
|
|
|
103040
104077
|
}
|
|
103041
104078
|
)
|
|
103042
104079
|
);
|
|
103043
|
-
pages.command(`pages-templates-update`).description(``).requiredOption(`--id <id>`, ``).
|
|
104080
|
+
pages.command(`pages-templates-update`).description(``).requiredOption(`--id <id>`, ``).option(`--description <description>`, ``).option(`--field-_name <field-_name>`, ``).option(
|
|
104081
|
+
`--is-_default [value]`,
|
|
104082
|
+
``,
|
|
104083
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
104084
|
+
).option(`--label <label>`, ``).option(`--page-_bundle <page-_bundle>`, ``).option(`--tree [tree...]`, `Serialized block trees ({ bundle, props, props_i18n, options, children }).`).action(
|
|
103044
104085
|
actionRunner(
|
|
103045
|
-
async ({ id }) => {
|
|
104086
|
+
async ({ id, description: description2, field_name, is_default: is_default2, label, page_bundle, tree }) => {
|
|
103046
104087
|
const _client = await sdkForProject();
|
|
103047
104088
|
const _apiPath = `/pages/templates/{id}`.replace(`{id}`, id);
|
|
103048
104089
|
const _payload = {};
|
|
104090
|
+
if (description2 !== void 0) {
|
|
104091
|
+
_payload[`description`] = description2;
|
|
104092
|
+
}
|
|
104093
|
+
if (field_name !== void 0) {
|
|
104094
|
+
_payload[`field_name`] = field_name;
|
|
104095
|
+
}
|
|
104096
|
+
if (is_default2 !== void 0) {
|
|
104097
|
+
_payload[`is_default`] = is_default2;
|
|
104098
|
+
}
|
|
104099
|
+
if (label !== void 0) {
|
|
104100
|
+
_payload[`label`] = label;
|
|
104101
|
+
}
|
|
104102
|
+
if (page_bundle !== void 0) {
|
|
104103
|
+
_payload[`page_bundle`] = page_bundle;
|
|
104104
|
+
}
|
|
104105
|
+
if (tree !== void 0) {
|
|
104106
|
+
_payload[`tree`] = tree;
|
|
104107
|
+
}
|
|
103049
104108
|
const _headers = {
|
|
103050
104109
|
"content-type": "application/json"
|
|
103051
104110
|
};
|
|
@@ -103083,12 +104142,42 @@ payments.command(`payments-list`).description(``).action(
|
|
|
103083
104142
|
}
|
|
103084
104143
|
)
|
|
103085
104144
|
);
|
|
103086
|
-
payments.command(`payments-create`).description(``).action(
|
|
104145
|
+
payments.command(`payments-create`).description(``).requiredOption(`--amount <amount>`, `Order amount \u2014 0 is legal (free orders), negative is not.`, parseInteger).requiredOption(`--method-_code <method-_code>`, `Code of a configured payment method.`).option(`--cart-_id <cart-_id>`, `The cart this payment pays for.`).option(`--contact-_id <contact-_id>`, `Paying customer contact.`).option(`--country <country>`, `Buyer ISO country code for the eligibility check.`).option(`--currency <currency>`, `ISO 4217 code (default EUR).`).option(`--idempotency-_key <idempotency-_key>`, `Same key answers the same payment instead of a duplicate.`).option(`--metadata <metadata>`, `Free-form metadata.`).option(`--order-_ref <order-_ref>`, `External order reference \u2014 also the webhook fallback key.`).option(`--return-_url <return-_url>`, `Where the PSP redirect flow returns the buyer to.`).action(
|
|
103087
104146
|
actionRunner(
|
|
103088
|
-
async () => {
|
|
104147
|
+
async ({ amount, method_code, cart_id, contact_id, country, currency, idempotency_key, metadata, order_ref, return_url }) => {
|
|
103089
104148
|
const _client = await sdkForProject();
|
|
103090
104149
|
const _apiPath = `/payments`;
|
|
103091
104150
|
const _payload = {};
|
|
104151
|
+
if (amount !== void 0) {
|
|
104152
|
+
_payload[`amount`] = amount;
|
|
104153
|
+
}
|
|
104154
|
+
if (cart_id !== void 0) {
|
|
104155
|
+
_payload[`cart_id`] = cart_id;
|
|
104156
|
+
}
|
|
104157
|
+
if (contact_id !== void 0) {
|
|
104158
|
+
_payload[`contact_id`] = contact_id;
|
|
104159
|
+
}
|
|
104160
|
+
if (country !== void 0) {
|
|
104161
|
+
_payload[`country`] = country;
|
|
104162
|
+
}
|
|
104163
|
+
if (currency !== void 0) {
|
|
104164
|
+
_payload[`currency`] = currency;
|
|
104165
|
+
}
|
|
104166
|
+
if (idempotency_key !== void 0) {
|
|
104167
|
+
_payload[`idempotency_key`] = idempotency_key;
|
|
104168
|
+
}
|
|
104169
|
+
if (metadata !== void 0) {
|
|
104170
|
+
_payload[`metadata`] = JSON.parse(metadata);
|
|
104171
|
+
}
|
|
104172
|
+
if (method_code !== void 0) {
|
|
104173
|
+
_payload[`method_code`] = method_code;
|
|
104174
|
+
}
|
|
104175
|
+
if (order_ref !== void 0) {
|
|
104176
|
+
_payload[`order_ref`] = order_ref;
|
|
104177
|
+
}
|
|
104178
|
+
if (return_url !== void 0) {
|
|
104179
|
+
_payload[`return_url`] = return_url;
|
|
104180
|
+
}
|
|
103092
104181
|
const _headers = {
|
|
103093
104182
|
"content-type": "application/json"
|
|
103094
104183
|
};
|
|
@@ -103121,12 +104210,64 @@ payments.command(`payments-methods-list`).description(``).action(
|
|
|
103121
104210
|
}
|
|
103122
104211
|
)
|
|
103123
104212
|
);
|
|
103124
|
-
payments.command(`payments-methods-create`).description(``).
|
|
104213
|
+
payments.command(`payments-methods-create`).description(``).requiredOption(`--code <code>`, `Stable method code (unique per tenant, e.g. 'invoice', 'card').`).requiredOption(`--name <name>`, `Display name.`).option(`--countries [countries...]`, `Allowed ISO country codes \u2014 empty/omitted = unrestricted.`).option(`--description <description>`, ``).option(
|
|
104214
|
+
`--enabled [value]`,
|
|
104215
|
+
`Disabled methods are never eligible (default false).`,
|
|
104216
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
104217
|
+
).option(`--fee-_amount <fee-_amount>`, `Fixed amount or percent value, per fee_type (default 0).`, parseInteger).option(`--fee-_currency <fee-_currency>`, `ISO 4217 code (default EUR).`).option(`--fee-_type <fee-_type>`, `How 'fee_amount' applies (default 'none').`).option(`--kind <kind>`, `Self-managed (merchant fulfils, default) or PSP-backed ('provider' required to transact).`).option(`--labels <labels>`, `Localized display names ({ de, en, \u2026 }).`).option(`--max-_order-_value <max-_order-_value>`, `Maximum order amount \u2014 omitted = no upper bound.`, parseInteger).option(`--metadata <metadata>`, `Free-form metadata.`).option(`--min-_order-_value <min-_order-_value>`, `Minimum order amount \u2014 omitted = no lower bound.`, parseInteger).option(`--position <position>`, `Sort position in the checkout (default 0).`, parseInteger).option(`--provider <provider>`, `PSP code from the catalog \u2014 only for kind 'psp'.`).option(`--provider-_method <provider-_method>`, `The provider's payment method id (e.g. 'card', 'paypal').`).action(
|
|
103125
104218
|
actionRunner(
|
|
103126
|
-
async () => {
|
|
104219
|
+
async ({ code, name, countries, description: description2, enabled, fee_amount, fee_currency, fee_type, kind, labels, max_order_value, metadata, min_order_value, position, provider, provider_method }) => {
|
|
103127
104220
|
const _client = await sdkForProject();
|
|
103128
104221
|
const _apiPath = `/payments/methods`;
|
|
103129
104222
|
const _payload = {};
|
|
104223
|
+
if (code !== void 0) {
|
|
104224
|
+
_payload[`code`] = code;
|
|
104225
|
+
}
|
|
104226
|
+
if (countries !== void 0) {
|
|
104227
|
+
_payload[`countries`] = countries;
|
|
104228
|
+
}
|
|
104229
|
+
if (description2 !== void 0) {
|
|
104230
|
+
_payload[`description`] = description2;
|
|
104231
|
+
}
|
|
104232
|
+
if (enabled !== void 0) {
|
|
104233
|
+
_payload[`enabled`] = enabled;
|
|
104234
|
+
}
|
|
104235
|
+
if (fee_amount !== void 0) {
|
|
104236
|
+
_payload[`fee_amount`] = fee_amount;
|
|
104237
|
+
}
|
|
104238
|
+
if (fee_currency !== void 0) {
|
|
104239
|
+
_payload[`fee_currency`] = fee_currency;
|
|
104240
|
+
}
|
|
104241
|
+
if (fee_type !== void 0) {
|
|
104242
|
+
_payload[`fee_type`] = fee_type;
|
|
104243
|
+
}
|
|
104244
|
+
if (kind !== void 0) {
|
|
104245
|
+
_payload[`kind`] = kind;
|
|
104246
|
+
}
|
|
104247
|
+
if (labels !== void 0) {
|
|
104248
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
104249
|
+
}
|
|
104250
|
+
if (max_order_value !== void 0) {
|
|
104251
|
+
_payload[`max_order_value`] = max_order_value;
|
|
104252
|
+
}
|
|
104253
|
+
if (metadata !== void 0) {
|
|
104254
|
+
_payload[`metadata`] = JSON.parse(metadata);
|
|
104255
|
+
}
|
|
104256
|
+
if (min_order_value !== void 0) {
|
|
104257
|
+
_payload[`min_order_value`] = min_order_value;
|
|
104258
|
+
}
|
|
104259
|
+
if (name !== void 0) {
|
|
104260
|
+
_payload[`name`] = name;
|
|
104261
|
+
}
|
|
104262
|
+
if (position !== void 0) {
|
|
104263
|
+
_payload[`position`] = position;
|
|
104264
|
+
}
|
|
104265
|
+
if (provider !== void 0) {
|
|
104266
|
+
_payload[`provider`] = provider;
|
|
104267
|
+
}
|
|
104268
|
+
if (provider_method !== void 0) {
|
|
104269
|
+
_payload[`provider_method`] = provider_method;
|
|
104270
|
+
}
|
|
103130
104271
|
const _headers = {
|
|
103131
104272
|
"content-type": "application/json"
|
|
103132
104273
|
};
|
|
@@ -103159,12 +104300,21 @@ payments.command(`payments-methods-defaults`).description(``).action(
|
|
|
103159
104300
|
}
|
|
103160
104301
|
)
|
|
103161
104302
|
);
|
|
103162
|
-
payments.command(`payments-methods-eligible`).description(``).action(
|
|
104303
|
+
payments.command(`payments-methods-eligible`).description(``).option(`--amount <amount>`, `Order amount the fees are computed against (default 0).`, parseInteger).option(`--country <country>`, `Buyer ISO country code \u2014 methods with country restrictions need it.`).option(`--currency <currency>`, `ISO 4217 code (default EUR).`).action(
|
|
103163
104304
|
actionRunner(
|
|
103164
|
-
async () => {
|
|
104305
|
+
async ({ amount, country, currency }) => {
|
|
103165
104306
|
const _client = await sdkForProject();
|
|
103166
104307
|
const _apiPath = `/payments/methods/eligible`;
|
|
103167
104308
|
const _payload = {};
|
|
104309
|
+
if (amount !== void 0) {
|
|
104310
|
+
_payload[`amount`] = amount;
|
|
104311
|
+
}
|
|
104312
|
+
if (country !== void 0) {
|
|
104313
|
+
_payload[`country`] = country;
|
|
104314
|
+
}
|
|
104315
|
+
if (currency !== void 0) {
|
|
104316
|
+
_payload[`currency`] = currency;
|
|
104317
|
+
}
|
|
103168
104318
|
const _headers = {
|
|
103169
104319
|
"content-type": "application/json"
|
|
103170
104320
|
};
|
|
@@ -103216,12 +104366,64 @@ payments.command(`payments-methods-get`).description(``).requiredOption(`--id <i
|
|
|
103216
104366
|
}
|
|
103217
104367
|
)
|
|
103218
104368
|
);
|
|
103219
|
-
payments.command(`payments-methods-update`).description(``).requiredOption(`--id <id>`, ``).
|
|
104369
|
+
payments.command(`payments-methods-update`).description(``).requiredOption(`--id <id>`, ``).option(`--code <code>`, `Stable method code (unique per tenant, e.g. 'invoice', 'card').`).option(`--countries [countries...]`, `Allowed ISO country codes \u2014 empty/omitted = unrestricted.`).option(`--description <description>`, ``).option(
|
|
104370
|
+
`--enabled [value]`,
|
|
104371
|
+
`Disabled methods are never eligible (default false).`,
|
|
104372
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
104373
|
+
).option(`--fee-_amount <fee-_amount>`, `Fixed amount or percent value, per fee_type (default 0).`, parseInteger).option(`--fee-_currency <fee-_currency>`, `ISO 4217 code (default EUR).`).option(`--fee-_type <fee-_type>`, `How 'fee_amount' applies (default 'none').`).option(`--kind <kind>`, `Self-managed (merchant fulfils, default) or PSP-backed ('provider' required to transact).`).option(`--labels <labels>`, `Localized display names ({ de, en, \u2026 }).`).option(`--max-_order-_value <max-_order-_value>`, `Maximum order amount \u2014 omitted = no upper bound.`, parseInteger).option(`--metadata <metadata>`, `Free-form metadata.`).option(`--min-_order-_value <min-_order-_value>`, `Minimum order amount \u2014 omitted = no lower bound.`, parseInteger).option(`--name <name>`, `Display name.`).option(`--position <position>`, `Sort position in the checkout (default 0).`, parseInteger).option(`--provider <provider>`, `PSP code from the catalog \u2014 only for kind 'psp'.`).option(`--provider-_method <provider-_method>`, `The provider's payment method id (e.g. 'card', 'paypal').`).action(
|
|
103220
104374
|
actionRunner(
|
|
103221
|
-
async ({ id }) => {
|
|
104375
|
+
async ({ id, code, countries, description: description2, enabled, fee_amount, fee_currency, fee_type, kind, labels, max_order_value, metadata, min_order_value, name, position, provider, provider_method }) => {
|
|
103222
104376
|
const _client = await sdkForProject();
|
|
103223
104377
|
const _apiPath = `/payments/methods/{id}`.replace(`{id}`, id);
|
|
103224
104378
|
const _payload = {};
|
|
104379
|
+
if (code !== void 0) {
|
|
104380
|
+
_payload[`code`] = code;
|
|
104381
|
+
}
|
|
104382
|
+
if (countries !== void 0) {
|
|
104383
|
+
_payload[`countries`] = countries;
|
|
104384
|
+
}
|
|
104385
|
+
if (description2 !== void 0) {
|
|
104386
|
+
_payload[`description`] = description2;
|
|
104387
|
+
}
|
|
104388
|
+
if (enabled !== void 0) {
|
|
104389
|
+
_payload[`enabled`] = enabled;
|
|
104390
|
+
}
|
|
104391
|
+
if (fee_amount !== void 0) {
|
|
104392
|
+
_payload[`fee_amount`] = fee_amount;
|
|
104393
|
+
}
|
|
104394
|
+
if (fee_currency !== void 0) {
|
|
104395
|
+
_payload[`fee_currency`] = fee_currency;
|
|
104396
|
+
}
|
|
104397
|
+
if (fee_type !== void 0) {
|
|
104398
|
+
_payload[`fee_type`] = fee_type;
|
|
104399
|
+
}
|
|
104400
|
+
if (kind !== void 0) {
|
|
104401
|
+
_payload[`kind`] = kind;
|
|
104402
|
+
}
|
|
104403
|
+
if (labels !== void 0) {
|
|
104404
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
104405
|
+
}
|
|
104406
|
+
if (max_order_value !== void 0) {
|
|
104407
|
+
_payload[`max_order_value`] = max_order_value;
|
|
104408
|
+
}
|
|
104409
|
+
if (metadata !== void 0) {
|
|
104410
|
+
_payload[`metadata`] = JSON.parse(metadata);
|
|
104411
|
+
}
|
|
104412
|
+
if (min_order_value !== void 0) {
|
|
104413
|
+
_payload[`min_order_value`] = min_order_value;
|
|
104414
|
+
}
|
|
104415
|
+
if (name !== void 0) {
|
|
104416
|
+
_payload[`name`] = name;
|
|
104417
|
+
}
|
|
104418
|
+
if (position !== void 0) {
|
|
104419
|
+
_payload[`position`] = position;
|
|
104420
|
+
}
|
|
104421
|
+
if (provider !== void 0) {
|
|
104422
|
+
_payload[`provider`] = provider;
|
|
104423
|
+
}
|
|
104424
|
+
if (provider_method !== void 0) {
|
|
104425
|
+
_payload[`provider_method`] = provider_method;
|
|
104426
|
+
}
|
|
103225
104427
|
const _headers = {
|
|
103226
104428
|
"content-type": "application/json"
|
|
103227
104429
|
};
|
|
@@ -103254,12 +104456,41 @@ payments.command(`payments-providers-list`).description(``).action(
|
|
|
103254
104456
|
}
|
|
103255
104457
|
)
|
|
103256
104458
|
);
|
|
103257
|
-
payments.command(`payments-providers-create`).description(``).
|
|
104459
|
+
payments.command(`payments-providers-create`).description(``).requiredOption(`--provider <provider>`, `Provider code \u2014 must exist in the catalog (GET /payments/providers/catalog).`).option(`--credentials <credentials>`, `PSP credentials \u2014 the catalog's credential_fields say which keys the auth scheme expects.`).option(
|
|
104460
|
+
`--enabled [value]`,
|
|
104461
|
+
`Only enabled providers transact (default false).`,
|
|
104462
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
104463
|
+
).option(`--name <name>`, `Display name \u2014 defaults to the catalog label.`).option(`--options <options>`, `Free-form provider options.`).option(
|
|
104464
|
+
`--test-_mode [value]`,
|
|
104465
|
+
`Sandbox/test credentials (default true).`,
|
|
104466
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
104467
|
+
).option(`--webhook-_secret <webhook-_secret>`, `Shared secret for PSP callback verification.`).action(
|
|
103258
104468
|
actionRunner(
|
|
103259
|
-
async () => {
|
|
104469
|
+
async ({ provider, credentials, enabled, name, options, test_mode, webhook_secret }) => {
|
|
103260
104470
|
const _client = await sdkForProject();
|
|
103261
104471
|
const _apiPath = `/payments/providers`;
|
|
103262
104472
|
const _payload = {};
|
|
104473
|
+
if (credentials !== void 0) {
|
|
104474
|
+
_payload[`credentials`] = JSON.parse(credentials);
|
|
104475
|
+
}
|
|
104476
|
+
if (enabled !== void 0) {
|
|
104477
|
+
_payload[`enabled`] = enabled;
|
|
104478
|
+
}
|
|
104479
|
+
if (name !== void 0) {
|
|
104480
|
+
_payload[`name`] = name;
|
|
104481
|
+
}
|
|
104482
|
+
if (options !== void 0) {
|
|
104483
|
+
_payload[`options`] = JSON.parse(options);
|
|
104484
|
+
}
|
|
104485
|
+
if (provider !== void 0) {
|
|
104486
|
+
_payload[`provider`] = provider;
|
|
104487
|
+
}
|
|
104488
|
+
if (test_mode !== void 0) {
|
|
104489
|
+
_payload[`test_mode`] = test_mode;
|
|
104490
|
+
}
|
|
104491
|
+
if (webhook_secret !== void 0) {
|
|
104492
|
+
_payload[`webhook_secret`] = webhook_secret;
|
|
104493
|
+
}
|
|
103263
104494
|
const _headers = {
|
|
103264
104495
|
"content-type": "application/json"
|
|
103265
104496
|
};
|
|
@@ -103330,12 +104561,41 @@ payments.command(`payments-providers-get`).description(``).requiredOption(`--id
|
|
|
103330
104561
|
}
|
|
103331
104562
|
)
|
|
103332
104563
|
);
|
|
103333
|
-
payments.command(`payments-providers-update`).description(``).requiredOption(`--id <id>`, ``).
|
|
104564
|
+
payments.command(`payments-providers-update`).description(``).requiredOption(`--id <id>`, ``).option(`--credentials <credentials>`, `PSP credentials \u2014 the catalog's credential_fields say which keys the auth scheme expects.`).option(
|
|
104565
|
+
`--enabled [value]`,
|
|
104566
|
+
`Only enabled providers transact (default false).`,
|
|
104567
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
104568
|
+
).option(`--name <name>`, `Display name \u2014 defaults to the catalog label.`).option(`--options <options>`, `Free-form provider options.`).option(`--provider <provider>`, `Provider code \u2014 must exist in the catalog (GET /payments/providers/catalog).`).option(
|
|
104569
|
+
`--test-_mode [value]`,
|
|
104570
|
+
`Sandbox/test credentials (default true).`,
|
|
104571
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
104572
|
+
).option(`--webhook-_secret <webhook-_secret>`, `Shared secret for PSP callback verification.`).action(
|
|
103334
104573
|
actionRunner(
|
|
103335
|
-
async ({ id }) => {
|
|
104574
|
+
async ({ id, credentials, enabled, name, options, provider, test_mode, webhook_secret }) => {
|
|
103336
104575
|
const _client = await sdkForProject();
|
|
103337
104576
|
const _apiPath = `/payments/providers/{id}`.replace(`{id}`, id);
|
|
103338
104577
|
const _payload = {};
|
|
104578
|
+
if (credentials !== void 0) {
|
|
104579
|
+
_payload[`credentials`] = JSON.parse(credentials);
|
|
104580
|
+
}
|
|
104581
|
+
if (enabled !== void 0) {
|
|
104582
|
+
_payload[`enabled`] = enabled;
|
|
104583
|
+
}
|
|
104584
|
+
if (name !== void 0) {
|
|
104585
|
+
_payload[`name`] = name;
|
|
104586
|
+
}
|
|
104587
|
+
if (options !== void 0) {
|
|
104588
|
+
_payload[`options`] = JSON.parse(options);
|
|
104589
|
+
}
|
|
104590
|
+
if (provider !== void 0) {
|
|
104591
|
+
_payload[`provider`] = provider;
|
|
104592
|
+
}
|
|
104593
|
+
if (test_mode !== void 0) {
|
|
104594
|
+
_payload[`test_mode`] = test_mode;
|
|
104595
|
+
}
|
|
104596
|
+
if (webhook_secret !== void 0) {
|
|
104597
|
+
_payload[`webhook_secret`] = webhook_secret;
|
|
104598
|
+
}
|
|
103339
104599
|
const _headers = {
|
|
103340
104600
|
"content-type": "application/json"
|
|
103341
104601
|
};
|
|
@@ -103349,12 +104609,15 @@ payments.command(`payments-providers-update`).description(``).requiredOption(`--
|
|
|
103349
104609
|
}
|
|
103350
104610
|
)
|
|
103351
104611
|
);
|
|
103352
|
-
payments.command(`payments-webhooks-ingest`).description(`Consumes the dispatch envelope from webhooks.revenexx.com: normalizes the provider callback (stripe payment intents + a generic shape), resolves the payment by psp_payment_id or order_ref and moves the ledger. Facts only move forward \u2014 provider retries and redeliveries are idempotent no-ops; unverified envelopes are refused.`).requiredOption(`--provider <provider>`, ``).action(
|
|
104612
|
+
payments.command(`payments-webhooks-ingest`).description(`Consumes the dispatch envelope from webhooks.revenexx.com: normalizes the provider callback (stripe payment intents + a generic shape), resolves the payment by psp_payment_id or order_ref and moves the ledger. Facts only move forward \u2014 provider retries and redeliveries are idempotent no-ops; unverified envelopes are refused.`).requiredOption(`--provider <provider>`, ``).requiredOption(`--data <data>`, `Request body`).action(
|
|
103353
104613
|
actionRunner(
|
|
103354
|
-
async ({ provider }) => {
|
|
104614
|
+
async ({ provider, data }) => {
|
|
103355
104615
|
const _client = await sdkForProject();
|
|
103356
104616
|
const _apiPath = `/payments/webhooks/{provider}`.replace(`{provider}`, provider);
|
|
103357
104617
|
const _payload = {};
|
|
104618
|
+
if (data !== void 0) {
|
|
104619
|
+
Object.assign(_payload, JSON.parse(data));
|
|
104620
|
+
}
|
|
103358
104621
|
const _headers = {
|
|
103359
104622
|
"content-type": "application/json"
|
|
103360
104623
|
};
|
|
@@ -103487,12 +104750,68 @@ prices.command(`prices-lists-list`).description(``).action(
|
|
|
103487
104750
|
}
|
|
103488
104751
|
)
|
|
103489
104752
|
);
|
|
103490
|
-
prices.command(`prices-lists-create`).description(``).
|
|
104753
|
+
prices.command(`prices-lists-create`).description(``).requiredOption(`--code <code>`, `Unique list code per tenant.`).requiredOption(`--name <name>`, ``).option(`--channel-_id <channel-_id>`, `Scope: only this channel.`).option(`--contact-_id <contact-_id>`, `Scope: only this contact \u2014 beats every other scope.`).option(`--currency <currency>`, `ISO 4217 code (default EUR) \u2014 resolution only considers lists matching the requested currency.`).option(`--description <description>`, ``).option(
|
|
104754
|
+
`--is-_default [value]`,
|
|
104755
|
+
`Default lists resolve last within their group.`,
|
|
104756
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
104757
|
+
).option(`--labels <labels>`, `Localised names ({de, en, \u2026}).`).option(`--market-_id <market-_id>`, `Scope: only this market.`).option(`--metadata <metadata>`, `Free-form metadata.`).option(`--organization-_id <organization-_id>`, `Scope: only this organization.`).option(`--priority <priority>`, `Tie-breaker within a specificity group (higher wins, default 0).`, parseInteger).option(`--status <status>`, `Default 'active' \u2014 only active lists resolve.`).option(
|
|
104758
|
+
`--tax-_included [value]`,
|
|
104759
|
+
`Gross (true) or net (false, default) prices.`,
|
|
104760
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
104761
|
+
).option(`--valid-_from <valid-_from>`, `Validity window start.`).option(`--valid-_until <valid-_until>`, `Validity window end.`).action(
|
|
103491
104762
|
actionRunner(
|
|
103492
|
-
async () => {
|
|
104763
|
+
async ({ code, name, channel_id, contact_id, currency, description: description2, is_default: is_default2, labels, market_id, metadata, organization_id, priority, status, tax_included, valid_from, valid_until }) => {
|
|
103493
104764
|
const _client = await sdkForProject();
|
|
103494
104765
|
const _apiPath = `/prices/lists`;
|
|
103495
104766
|
const _payload = {};
|
|
104767
|
+
if (channel_id !== void 0) {
|
|
104768
|
+
_payload[`channel_id`] = channel_id;
|
|
104769
|
+
}
|
|
104770
|
+
if (code !== void 0) {
|
|
104771
|
+
_payload[`code`] = code;
|
|
104772
|
+
}
|
|
104773
|
+
if (contact_id !== void 0) {
|
|
104774
|
+
_payload[`contact_id`] = contact_id;
|
|
104775
|
+
}
|
|
104776
|
+
if (currency !== void 0) {
|
|
104777
|
+
_payload[`currency`] = currency;
|
|
104778
|
+
}
|
|
104779
|
+
if (description2 !== void 0) {
|
|
104780
|
+
_payload[`description`] = description2;
|
|
104781
|
+
}
|
|
104782
|
+
if (is_default2 !== void 0) {
|
|
104783
|
+
_payload[`is_default`] = is_default2;
|
|
104784
|
+
}
|
|
104785
|
+
if (labels !== void 0) {
|
|
104786
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
104787
|
+
}
|
|
104788
|
+
if (market_id !== void 0) {
|
|
104789
|
+
_payload[`market_id`] = market_id;
|
|
104790
|
+
}
|
|
104791
|
+
if (metadata !== void 0) {
|
|
104792
|
+
_payload[`metadata`] = JSON.parse(metadata);
|
|
104793
|
+
}
|
|
104794
|
+
if (name !== void 0) {
|
|
104795
|
+
_payload[`name`] = name;
|
|
104796
|
+
}
|
|
104797
|
+
if (organization_id !== void 0) {
|
|
104798
|
+
_payload[`organization_id`] = organization_id;
|
|
104799
|
+
}
|
|
104800
|
+
if (priority !== void 0) {
|
|
104801
|
+
_payload[`priority`] = priority;
|
|
104802
|
+
}
|
|
104803
|
+
if (status !== void 0) {
|
|
104804
|
+
_payload[`status`] = status;
|
|
104805
|
+
}
|
|
104806
|
+
if (tax_included !== void 0) {
|
|
104807
|
+
_payload[`tax_included`] = tax_included;
|
|
104808
|
+
}
|
|
104809
|
+
if (valid_from !== void 0) {
|
|
104810
|
+
_payload[`valid_from`] = valid_from;
|
|
104811
|
+
}
|
|
104812
|
+
if (valid_until !== void 0) {
|
|
104813
|
+
_payload[`valid_until`] = valid_until;
|
|
104814
|
+
}
|
|
103496
104815
|
const _headers = {
|
|
103497
104816
|
"content-type": "application/json"
|
|
103498
104817
|
};
|
|
@@ -103563,12 +104882,68 @@ prices.command(`prices-lists-get`).description(``).requiredOption(`--id <id>`, `
|
|
|
103563
104882
|
}
|
|
103564
104883
|
)
|
|
103565
104884
|
);
|
|
103566
|
-
prices.command(`prices-lists-update`).description(``).requiredOption(`--id <id>`, ``).
|
|
104885
|
+
prices.command(`prices-lists-update`).description(``).requiredOption(`--id <id>`, ``).option(`--channel-_id <channel-_id>`, `Scope: only this channel.`).option(`--code <code>`, `Unique list code per tenant.`).option(`--contact-_id <contact-_id>`, `Scope: only this contact \u2014 beats every other scope.`).option(`--currency <currency>`, `ISO 4217 code (default EUR) \u2014 resolution only considers lists matching the requested currency.`).option(`--description <description>`, ``).option(
|
|
104886
|
+
`--is-_default [value]`,
|
|
104887
|
+
`Default lists resolve last within their group.`,
|
|
104888
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
104889
|
+
).option(`--labels <labels>`, `Localised names ({de, en, \u2026}).`).option(`--market-_id <market-_id>`, `Scope: only this market.`).option(`--metadata <metadata>`, `Free-form metadata.`).option(`--name <name>`, ``).option(`--organization-_id <organization-_id>`, `Scope: only this organization.`).option(`--priority <priority>`, `Tie-breaker within a specificity group (higher wins, default 0).`, parseInteger).option(`--status <status>`, `Default 'active' \u2014 only active lists resolve.`).option(
|
|
104890
|
+
`--tax-_included [value]`,
|
|
104891
|
+
`Gross (true) or net (false, default) prices.`,
|
|
104892
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
104893
|
+
).option(`--valid-_from <valid-_from>`, `Validity window start.`).option(`--valid-_until <valid-_until>`, `Validity window end.`).action(
|
|
103567
104894
|
actionRunner(
|
|
103568
|
-
async ({ id }) => {
|
|
104895
|
+
async ({ id, channel_id, code, contact_id, currency, description: description2, is_default: is_default2, labels, market_id, metadata, name, organization_id, priority, status, tax_included, valid_from, valid_until }) => {
|
|
103569
104896
|
const _client = await sdkForProject();
|
|
103570
104897
|
const _apiPath = `/prices/lists/{id}`.replace(`{id}`, id);
|
|
103571
104898
|
const _payload = {};
|
|
104899
|
+
if (channel_id !== void 0) {
|
|
104900
|
+
_payload[`channel_id`] = channel_id;
|
|
104901
|
+
}
|
|
104902
|
+
if (code !== void 0) {
|
|
104903
|
+
_payload[`code`] = code;
|
|
104904
|
+
}
|
|
104905
|
+
if (contact_id !== void 0) {
|
|
104906
|
+
_payload[`contact_id`] = contact_id;
|
|
104907
|
+
}
|
|
104908
|
+
if (currency !== void 0) {
|
|
104909
|
+
_payload[`currency`] = currency;
|
|
104910
|
+
}
|
|
104911
|
+
if (description2 !== void 0) {
|
|
104912
|
+
_payload[`description`] = description2;
|
|
104913
|
+
}
|
|
104914
|
+
if (is_default2 !== void 0) {
|
|
104915
|
+
_payload[`is_default`] = is_default2;
|
|
104916
|
+
}
|
|
104917
|
+
if (labels !== void 0) {
|
|
104918
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
104919
|
+
}
|
|
104920
|
+
if (market_id !== void 0) {
|
|
104921
|
+
_payload[`market_id`] = market_id;
|
|
104922
|
+
}
|
|
104923
|
+
if (metadata !== void 0) {
|
|
104924
|
+
_payload[`metadata`] = JSON.parse(metadata);
|
|
104925
|
+
}
|
|
104926
|
+
if (name !== void 0) {
|
|
104927
|
+
_payload[`name`] = name;
|
|
104928
|
+
}
|
|
104929
|
+
if (organization_id !== void 0) {
|
|
104930
|
+
_payload[`organization_id`] = organization_id;
|
|
104931
|
+
}
|
|
104932
|
+
if (priority !== void 0) {
|
|
104933
|
+
_payload[`priority`] = priority;
|
|
104934
|
+
}
|
|
104935
|
+
if (status !== void 0) {
|
|
104936
|
+
_payload[`status`] = status;
|
|
104937
|
+
}
|
|
104938
|
+
if (tax_included !== void 0) {
|
|
104939
|
+
_payload[`tax_included`] = tax_included;
|
|
104940
|
+
}
|
|
104941
|
+
if (valid_from !== void 0) {
|
|
104942
|
+
_payload[`valid_from`] = valid_from;
|
|
104943
|
+
}
|
|
104944
|
+
if (valid_until !== void 0) {
|
|
104945
|
+
_payload[`valid_until`] = valid_until;
|
|
104946
|
+
}
|
|
103572
104947
|
const _headers = {
|
|
103573
104948
|
"content-type": "application/json"
|
|
103574
104949
|
};
|
|
@@ -103601,12 +104976,39 @@ prices.command(`prices-entries-list`).description(``).requiredOption(`--list-_id
|
|
|
103601
104976
|
}
|
|
103602
104977
|
)
|
|
103603
104978
|
);
|
|
103604
|
-
prices.command(`prices-entries-create`).description(``).requiredOption(`--list-_id <list-_id>`, ``).action(
|
|
104979
|
+
prices.command(`prices-entries-create`).description(``).requiredOption(`--list-_id <list-_id>`, ``).option(`--metadata <metadata>`, `Free-form metadata.`).option(`--price-_type <price-_type>`, `Default 'standard'; 'on_request' is the explicit no-price marker \u2014 it stops resolution and answers "price on request".`).option(`--product-_id <product-_id>`, `Priced product.`).option(`--quantity-_min <quantity-_min>`, `Tier threshold (Staffelpreis): this price applies from this quantity (default 1).`, parseInteger).option(`--sku <sku>`, `Priced SKU (alternative to product_id).`).option(`--unit <unit>`, ``).option(`--unit-_price <unit-_price>`, `Per-unit price (default 0).`, parseInteger).option(`--valid-_from <valid-_from>`, `Per-entry validity start (promo prices).`).option(`--valid-_until <valid-_until>`, `Per-entry validity end.`).action(
|
|
103605
104980
|
actionRunner(
|
|
103606
|
-
async ({ list_id }) => {
|
|
104981
|
+
async ({ list_id, metadata, price_type, product_id, quantity_min, sku, unit, unit_price, valid_from, valid_until }) => {
|
|
103607
104982
|
const _client = await sdkForProject();
|
|
103608
104983
|
const _apiPath = `/prices/lists/{list_id}/entries`.replace(`{list_id}`, list_id);
|
|
103609
104984
|
const _payload = {};
|
|
104985
|
+
if (metadata !== void 0) {
|
|
104986
|
+
_payload[`metadata`] = JSON.parse(metadata);
|
|
104987
|
+
}
|
|
104988
|
+
if (price_type !== void 0) {
|
|
104989
|
+
_payload[`price_type`] = price_type;
|
|
104990
|
+
}
|
|
104991
|
+
if (product_id !== void 0) {
|
|
104992
|
+
_payload[`product_id`] = product_id;
|
|
104993
|
+
}
|
|
104994
|
+
if (quantity_min !== void 0) {
|
|
104995
|
+
_payload[`quantity_min`] = quantity_min;
|
|
104996
|
+
}
|
|
104997
|
+
if (sku !== void 0) {
|
|
104998
|
+
_payload[`sku`] = sku;
|
|
104999
|
+
}
|
|
105000
|
+
if (unit !== void 0) {
|
|
105001
|
+
_payload[`unit`] = unit;
|
|
105002
|
+
}
|
|
105003
|
+
if (unit_price !== void 0) {
|
|
105004
|
+
_payload[`unit_price`] = unit_price;
|
|
105005
|
+
}
|
|
105006
|
+
if (valid_from !== void 0) {
|
|
105007
|
+
_payload[`valid_from`] = valid_from;
|
|
105008
|
+
}
|
|
105009
|
+
if (valid_until !== void 0) {
|
|
105010
|
+
_payload[`valid_until`] = valid_until;
|
|
105011
|
+
}
|
|
103610
105012
|
const _headers = {
|
|
103611
105013
|
"content-type": "application/json"
|
|
103612
105014
|
};
|
|
@@ -103620,12 +105022,15 @@ prices.command(`prices-entries-create`).description(``).requiredOption(`--list-_
|
|
|
103620
105022
|
}
|
|
103621
105023
|
)
|
|
103622
105024
|
);
|
|
103623
|
-
prices.command(`prices-entries-replace`).description(``).requiredOption(`--list-_id <list-_id>`, ``).action(
|
|
105025
|
+
prices.command(`prices-entries-replace`).description(``).requiredOption(`--list-_id <list-_id>`, ``).requiredOption(`--entries [entries...]`, `The complete new entry set (set semantics).`).action(
|
|
103624
105026
|
actionRunner(
|
|
103625
|
-
async ({ list_id }) => {
|
|
105027
|
+
async ({ list_id, entries }) => {
|
|
103626
105028
|
const _client = await sdkForProject();
|
|
103627
105029
|
const _apiPath = `/prices/lists/{list_id}/entries`.replace(`{list_id}`, list_id);
|
|
103628
105030
|
const _payload = {};
|
|
105031
|
+
if (entries !== void 0) {
|
|
105032
|
+
_payload[`entries`] = entries;
|
|
105033
|
+
}
|
|
103629
105034
|
const _headers = {
|
|
103630
105035
|
"content-type": "application/json"
|
|
103631
105036
|
};
|
|
@@ -103677,12 +105082,39 @@ prices.command(`prices-entries-get`).description(``).requiredOption(`--list-_id
|
|
|
103677
105082
|
}
|
|
103678
105083
|
)
|
|
103679
105084
|
);
|
|
103680
|
-
prices.command(`prices-entries-update`).description(``).requiredOption(`--list-_id <list-_id>`, ``).requiredOption(`--id <id>`, ``).action(
|
|
105085
|
+
prices.command(`prices-entries-update`).description(``).requiredOption(`--list-_id <list-_id>`, ``).requiredOption(`--id <id>`, ``).option(`--metadata <metadata>`, `Free-form metadata.`).option(`--price-_type <price-_type>`, `Default 'standard'; 'on_request' is the explicit no-price marker \u2014 it stops resolution and answers "price on request".`).option(`--product-_id <product-_id>`, `Priced product.`).option(`--quantity-_min <quantity-_min>`, `Tier threshold (Staffelpreis): this price applies from this quantity (default 1).`, parseInteger).option(`--sku <sku>`, `Priced SKU (alternative to product_id).`).option(`--unit <unit>`, ``).option(`--unit-_price <unit-_price>`, `Per-unit price (default 0).`, parseInteger).option(`--valid-_from <valid-_from>`, `Per-entry validity start (promo prices).`).option(`--valid-_until <valid-_until>`, `Per-entry validity end.`).action(
|
|
103681
105086
|
actionRunner(
|
|
103682
|
-
async ({ list_id, id }) => {
|
|
105087
|
+
async ({ list_id, id, metadata, price_type, product_id, quantity_min, sku, unit, unit_price, valid_from, valid_until }) => {
|
|
103683
105088
|
const _client = await sdkForProject();
|
|
103684
105089
|
const _apiPath = `/prices/lists/{list_id}/entries/{id}`.replace(`{list_id}`, list_id).replace(`{id}`, id);
|
|
103685
105090
|
const _payload = {};
|
|
105091
|
+
if (metadata !== void 0) {
|
|
105092
|
+
_payload[`metadata`] = JSON.parse(metadata);
|
|
105093
|
+
}
|
|
105094
|
+
if (price_type !== void 0) {
|
|
105095
|
+
_payload[`price_type`] = price_type;
|
|
105096
|
+
}
|
|
105097
|
+
if (product_id !== void 0) {
|
|
105098
|
+
_payload[`product_id`] = product_id;
|
|
105099
|
+
}
|
|
105100
|
+
if (quantity_min !== void 0) {
|
|
105101
|
+
_payload[`quantity_min`] = quantity_min;
|
|
105102
|
+
}
|
|
105103
|
+
if (sku !== void 0) {
|
|
105104
|
+
_payload[`sku`] = sku;
|
|
105105
|
+
}
|
|
105106
|
+
if (unit !== void 0) {
|
|
105107
|
+
_payload[`unit`] = unit;
|
|
105108
|
+
}
|
|
105109
|
+
if (unit_price !== void 0) {
|
|
105110
|
+
_payload[`unit_price`] = unit_price;
|
|
105111
|
+
}
|
|
105112
|
+
if (valid_from !== void 0) {
|
|
105113
|
+
_payload[`valid_from`] = valid_from;
|
|
105114
|
+
}
|
|
105115
|
+
if (valid_until !== void 0) {
|
|
105116
|
+
_payload[`valid_until`] = valid_until;
|
|
105117
|
+
}
|
|
103686
105118
|
const _headers = {
|
|
103687
105119
|
"content-type": "application/json"
|
|
103688
105120
|
};
|
|
@@ -103696,12 +105128,33 @@ prices.command(`prices-entries-update`).description(``).requiredOption(`--list-_
|
|
|
103696
105128
|
}
|
|
103697
105129
|
)
|
|
103698
105130
|
);
|
|
103699
|
-
prices.command(`prices-resolve`).description(``).action(
|
|
105131
|
+
prices.command(`prices-resolve`).description(``).requiredOption(`--items [items...]`, `Items to price (at most 200 per call).`).option(`--at <at>`, `Point in time for validity windows (ISO 8601 timestamp, default now).`).option(`--channel-_id <channel-_id>`, `Buyer context: channel.`).option(`--contact-_id <contact-_id>`, `Buyer context: contact \u2014 most specific scope.`).option(`--currency <currency>`, `ISO 4217 code (default EUR) \u2014 only lists in this currency resolve.`).option(`--market-_id <market-_id>`, `Buyer context: market.`).option(`--organization-_id <organization-_id>`, `Buyer context: organization.`).action(
|
|
103700
105132
|
actionRunner(
|
|
103701
|
-
async () => {
|
|
105133
|
+
async ({ items, at, channel_id, contact_id, currency, market_id, organization_id }) => {
|
|
103702
105134
|
const _client = await sdkForProject();
|
|
103703
105135
|
const _apiPath = `/prices/resolve`;
|
|
103704
105136
|
const _payload = {};
|
|
105137
|
+
if (at !== void 0) {
|
|
105138
|
+
_payload[`at`] = at;
|
|
105139
|
+
}
|
|
105140
|
+
if (channel_id !== void 0) {
|
|
105141
|
+
_payload[`channel_id`] = channel_id;
|
|
105142
|
+
}
|
|
105143
|
+
if (contact_id !== void 0) {
|
|
105144
|
+
_payload[`contact_id`] = contact_id;
|
|
105145
|
+
}
|
|
105146
|
+
if (currency !== void 0) {
|
|
105147
|
+
_payload[`currency`] = currency;
|
|
105148
|
+
}
|
|
105149
|
+
if (items !== void 0) {
|
|
105150
|
+
_payload[`items`] = items;
|
|
105151
|
+
}
|
|
105152
|
+
if (market_id !== void 0) {
|
|
105153
|
+
_payload[`market_id`] = market_id;
|
|
105154
|
+
}
|
|
105155
|
+
if (organization_id !== void 0) {
|
|
105156
|
+
_payload[`organization_id`] = organization_id;
|
|
105157
|
+
}
|
|
103705
105158
|
const _headers = {
|
|
103706
105159
|
"content-type": "application/json"
|
|
103707
105160
|
};
|
|
@@ -103739,12 +105192,46 @@ products.command(`products-list`).description(``).action(
|
|
|
103739
105192
|
}
|
|
103740
105193
|
)
|
|
103741
105194
|
);
|
|
103742
|
-
products.command(`products-create`).description(``).
|
|
105195
|
+
products.command(`products-create`).description(``).requiredOption(`--sku <sku>`, ``).option(`--attribute-_values <attribute-_values>`, ``).option(`--completeness <completeness>`, ``).option(`--deleted-_at <deleted-_at>`, ``).option(
|
|
105196
|
+
`--enabled [value]`,
|
|
105197
|
+
``,
|
|
105198
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
105199
|
+
).option(`--family-_id <family-_id>`, ``).option(`--family-_variant-_id <family-_variant-_id>`, ``).option(`--kind <kind>`, ``).option(`--parent-_id <parent-_id>`, ``).option(`--quantified-_associations <quantified-_associations>`, ``).action(
|
|
103743
105200
|
actionRunner(
|
|
103744
|
-
async () => {
|
|
105201
|
+
async ({ sku, attribute_values, completeness, deleted_at, enabled, family_id, family_variant_id, kind, parent_id, quantified_associations }) => {
|
|
103745
105202
|
const _client = await sdkForProject();
|
|
103746
105203
|
const _apiPath = `/products`;
|
|
103747
105204
|
const _payload = {};
|
|
105205
|
+
if (attribute_values !== void 0) {
|
|
105206
|
+
_payload[`attribute_values`] = JSON.parse(attribute_values);
|
|
105207
|
+
}
|
|
105208
|
+
if (completeness !== void 0) {
|
|
105209
|
+
_payload[`completeness`] = JSON.parse(completeness);
|
|
105210
|
+
}
|
|
105211
|
+
if (deleted_at !== void 0) {
|
|
105212
|
+
_payload[`deleted_at`] = deleted_at;
|
|
105213
|
+
}
|
|
105214
|
+
if (enabled !== void 0) {
|
|
105215
|
+
_payload[`enabled`] = enabled;
|
|
105216
|
+
}
|
|
105217
|
+
if (family_id !== void 0) {
|
|
105218
|
+
_payload[`family_id`] = family_id;
|
|
105219
|
+
}
|
|
105220
|
+
if (family_variant_id !== void 0) {
|
|
105221
|
+
_payload[`family_variant_id`] = family_variant_id;
|
|
105222
|
+
}
|
|
105223
|
+
if (kind !== void 0) {
|
|
105224
|
+
_payload[`kind`] = kind;
|
|
105225
|
+
}
|
|
105226
|
+
if (parent_id !== void 0) {
|
|
105227
|
+
_payload[`parent_id`] = parent_id;
|
|
105228
|
+
}
|
|
105229
|
+
if (quantified_associations !== void 0) {
|
|
105230
|
+
_payload[`quantified_associations`] = JSON.parse(quantified_associations);
|
|
105231
|
+
}
|
|
105232
|
+
if (sku !== void 0) {
|
|
105233
|
+
_payload[`sku`] = sku;
|
|
105234
|
+
}
|
|
103748
105235
|
const _headers = {
|
|
103749
105236
|
"content-type": "application/json"
|
|
103750
105237
|
};
|
|
@@ -103777,12 +105264,21 @@ products.command(`products-asset-families-list`).description(``).action(
|
|
|
103777
105264
|
}
|
|
103778
105265
|
)
|
|
103779
105266
|
);
|
|
103780
|
-
products.command(`products-asset-families-create`).description(``).action(
|
|
105267
|
+
products.command(`products-asset-families-create`).description(``).requiredOption(`--code <code>`, ``).option(`--labels <labels>`, ``).option(`--naming-_convention <naming-_convention>`, ``).action(
|
|
103781
105268
|
actionRunner(
|
|
103782
|
-
async () => {
|
|
105269
|
+
async ({ code, labels, naming_convention }) => {
|
|
103783
105270
|
const _client = await sdkForProject();
|
|
103784
105271
|
const _apiPath = `/products/asset_families`;
|
|
103785
105272
|
const _payload = {};
|
|
105273
|
+
if (code !== void 0) {
|
|
105274
|
+
_payload[`code`] = code;
|
|
105275
|
+
}
|
|
105276
|
+
if (labels !== void 0) {
|
|
105277
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
105278
|
+
}
|
|
105279
|
+
if (naming_convention !== void 0) {
|
|
105280
|
+
_payload[`naming_convention`] = JSON.parse(naming_convention);
|
|
105281
|
+
}
|
|
103786
105282
|
const _headers = {
|
|
103787
105283
|
"content-type": "application/json"
|
|
103788
105284
|
};
|
|
@@ -103834,12 +105330,21 @@ products.command(`products-asset-families-get`).description(``).requiredOption(`
|
|
|
103834
105330
|
}
|
|
103835
105331
|
)
|
|
103836
105332
|
);
|
|
103837
|
-
products.command(`products-asset-families-update`).description(``).requiredOption(`--id <id>`, ``).action(
|
|
105333
|
+
products.command(`products-asset-families-update`).description(``).requiredOption(`--id <id>`, ``).option(`--code <code>`, ``).option(`--labels <labels>`, ``).option(`--naming-_convention <naming-_convention>`, ``).action(
|
|
103838
105334
|
actionRunner(
|
|
103839
|
-
async ({ id }) => {
|
|
105335
|
+
async ({ id, code, labels, naming_convention }) => {
|
|
103840
105336
|
const _client = await sdkForProject();
|
|
103841
105337
|
const _apiPath = `/products/asset_families/{id}`.replace(`{id}`, id);
|
|
103842
105338
|
const _payload = {};
|
|
105339
|
+
if (code !== void 0) {
|
|
105340
|
+
_payload[`code`] = code;
|
|
105341
|
+
}
|
|
105342
|
+
if (labels !== void 0) {
|
|
105343
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
105344
|
+
}
|
|
105345
|
+
if (naming_convention !== void 0) {
|
|
105346
|
+
_payload[`naming_convention`] = JSON.parse(naming_convention);
|
|
105347
|
+
}
|
|
103843
105348
|
const _headers = {
|
|
103844
105349
|
"content-type": "application/json"
|
|
103845
105350
|
};
|
|
@@ -103872,12 +105377,24 @@ products.command(`products-assets-list`).description(``).action(
|
|
|
103872
105377
|
}
|
|
103873
105378
|
)
|
|
103874
105379
|
);
|
|
103875
|
-
products.command(`products-assets-create`).description(``).action(
|
|
105380
|
+
products.command(`products-assets-create`).description(``).requiredOption(`--asset-_family-_id <asset-_family-_id>`, ``).requiredOption(`--code <code>`, ``).option(`--attribute-_values <attribute-_values>`, ``).option(`--media-_uuid <media-_uuid>`, ``).action(
|
|
103876
105381
|
actionRunner(
|
|
103877
|
-
async () => {
|
|
105382
|
+
async ({ asset_family_id, code, attribute_values, media_uuid }) => {
|
|
103878
105383
|
const _client = await sdkForProject();
|
|
103879
105384
|
const _apiPath = `/products/assets`;
|
|
103880
105385
|
const _payload = {};
|
|
105386
|
+
if (asset_family_id !== void 0) {
|
|
105387
|
+
_payload[`asset_family_id`] = asset_family_id;
|
|
105388
|
+
}
|
|
105389
|
+
if (attribute_values !== void 0) {
|
|
105390
|
+
_payload[`attribute_values`] = JSON.parse(attribute_values);
|
|
105391
|
+
}
|
|
105392
|
+
if (code !== void 0) {
|
|
105393
|
+
_payload[`code`] = code;
|
|
105394
|
+
}
|
|
105395
|
+
if (media_uuid !== void 0) {
|
|
105396
|
+
_payload[`media_uuid`] = media_uuid;
|
|
105397
|
+
}
|
|
103881
105398
|
const _headers = {
|
|
103882
105399
|
"content-type": "application/json"
|
|
103883
105400
|
};
|
|
@@ -103929,12 +105446,24 @@ products.command(`products-assets-get`).description(``).requiredOption(`--id <id
|
|
|
103929
105446
|
}
|
|
103930
105447
|
)
|
|
103931
105448
|
);
|
|
103932
|
-
products.command(`products-assets-update`).description(``).requiredOption(`--id <id>`, ``).action(
|
|
105449
|
+
products.command(`products-assets-update`).description(``).requiredOption(`--id <id>`, ``).option(`--asset-_family-_id <asset-_family-_id>`, ``).option(`--attribute-_values <attribute-_values>`, ``).option(`--code <code>`, ``).option(`--media-_uuid <media-_uuid>`, ``).action(
|
|
103933
105450
|
actionRunner(
|
|
103934
|
-
async ({ id }) => {
|
|
105451
|
+
async ({ id, asset_family_id, attribute_values, code, media_uuid }) => {
|
|
103935
105452
|
const _client = await sdkForProject();
|
|
103936
105453
|
const _apiPath = `/products/assets/{id}`.replace(`{id}`, id);
|
|
103937
105454
|
const _payload = {};
|
|
105455
|
+
if (asset_family_id !== void 0) {
|
|
105456
|
+
_payload[`asset_family_id`] = asset_family_id;
|
|
105457
|
+
}
|
|
105458
|
+
if (attribute_values !== void 0) {
|
|
105459
|
+
_payload[`attribute_values`] = JSON.parse(attribute_values);
|
|
105460
|
+
}
|
|
105461
|
+
if (code !== void 0) {
|
|
105462
|
+
_payload[`code`] = code;
|
|
105463
|
+
}
|
|
105464
|
+
if (media_uuid !== void 0) {
|
|
105465
|
+
_payload[`media_uuid`] = media_uuid;
|
|
105466
|
+
}
|
|
103938
105467
|
const _headers = {
|
|
103939
105468
|
"content-type": "application/json"
|
|
103940
105469
|
};
|
|
@@ -103967,12 +105496,32 @@ products.command(`products-association-types-list`).description(``).action(
|
|
|
103967
105496
|
}
|
|
103968
105497
|
)
|
|
103969
105498
|
);
|
|
103970
|
-
products.command(`products-association-types-create`).description(``).
|
|
105499
|
+
products.command(`products-association-types-create`).description(``).requiredOption(`--code <code>`, ``).option(
|
|
105500
|
+
`--is-_quantified [value]`,
|
|
105501
|
+
``,
|
|
105502
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
105503
|
+
).option(
|
|
105504
|
+
`--is-_two-_way [value]`,
|
|
105505
|
+
``,
|
|
105506
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
105507
|
+
).option(`--labels <labels>`, ``).action(
|
|
103971
105508
|
actionRunner(
|
|
103972
|
-
async () => {
|
|
105509
|
+
async ({ code, is_quantified, is_two_way, labels }) => {
|
|
103973
105510
|
const _client = await sdkForProject();
|
|
103974
105511
|
const _apiPath = `/products/association_types`;
|
|
103975
105512
|
const _payload = {};
|
|
105513
|
+
if (code !== void 0) {
|
|
105514
|
+
_payload[`code`] = code;
|
|
105515
|
+
}
|
|
105516
|
+
if (is_quantified !== void 0) {
|
|
105517
|
+
_payload[`is_quantified`] = is_quantified;
|
|
105518
|
+
}
|
|
105519
|
+
if (is_two_way !== void 0) {
|
|
105520
|
+
_payload[`is_two_way`] = is_two_way;
|
|
105521
|
+
}
|
|
105522
|
+
if (labels !== void 0) {
|
|
105523
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
105524
|
+
}
|
|
103976
105525
|
const _headers = {
|
|
103977
105526
|
"content-type": "application/json"
|
|
103978
105527
|
};
|
|
@@ -104024,12 +105573,32 @@ products.command(`products-association-types-get`).description(``).requiredOptio
|
|
|
104024
105573
|
}
|
|
104025
105574
|
)
|
|
104026
105575
|
);
|
|
104027
|
-
products.command(`products-association-types-update`).description(``).requiredOption(`--id <id>`, ``).
|
|
105576
|
+
products.command(`products-association-types-update`).description(``).requiredOption(`--id <id>`, ``).option(`--code <code>`, ``).option(
|
|
105577
|
+
`--is-_quantified [value]`,
|
|
105578
|
+
``,
|
|
105579
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
105580
|
+
).option(
|
|
105581
|
+
`--is-_two-_way [value]`,
|
|
105582
|
+
``,
|
|
105583
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
105584
|
+
).option(`--labels <labels>`, ``).action(
|
|
104028
105585
|
actionRunner(
|
|
104029
|
-
async ({ id }) => {
|
|
105586
|
+
async ({ id, code, is_quantified, is_two_way, labels }) => {
|
|
104030
105587
|
const _client = await sdkForProject();
|
|
104031
105588
|
const _apiPath = `/products/association_types/{id}`.replace(`{id}`, id);
|
|
104032
105589
|
const _payload = {};
|
|
105590
|
+
if (code !== void 0) {
|
|
105591
|
+
_payload[`code`] = code;
|
|
105592
|
+
}
|
|
105593
|
+
if (is_quantified !== void 0) {
|
|
105594
|
+
_payload[`is_quantified`] = is_quantified;
|
|
105595
|
+
}
|
|
105596
|
+
if (is_two_way !== void 0) {
|
|
105597
|
+
_payload[`is_two_way`] = is_two_way;
|
|
105598
|
+
}
|
|
105599
|
+
if (labels !== void 0) {
|
|
105600
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
105601
|
+
}
|
|
104033
105602
|
const _headers = {
|
|
104034
105603
|
"content-type": "application/json"
|
|
104035
105604
|
};
|
|
@@ -104062,12 +105631,21 @@ products.command(`products-attribute-groups-list`).description(``).action(
|
|
|
104062
105631
|
}
|
|
104063
105632
|
)
|
|
104064
105633
|
);
|
|
104065
|
-
products.command(`products-attribute-groups-create`).description(``).action(
|
|
105634
|
+
products.command(`products-attribute-groups-create`).description(``).requiredOption(`--code <code>`, ``).option(`--labels <labels>`, ``).option(`--position <position>`, ``, parseInteger).action(
|
|
104066
105635
|
actionRunner(
|
|
104067
|
-
async () => {
|
|
105636
|
+
async ({ code, labels, position }) => {
|
|
104068
105637
|
const _client = await sdkForProject();
|
|
104069
105638
|
const _apiPath = `/products/attribute_groups`;
|
|
104070
105639
|
const _payload = {};
|
|
105640
|
+
if (code !== void 0) {
|
|
105641
|
+
_payload[`code`] = code;
|
|
105642
|
+
}
|
|
105643
|
+
if (labels !== void 0) {
|
|
105644
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
105645
|
+
}
|
|
105646
|
+
if (position !== void 0) {
|
|
105647
|
+
_payload[`position`] = position;
|
|
105648
|
+
}
|
|
104071
105649
|
const _headers = {
|
|
104072
105650
|
"content-type": "application/json"
|
|
104073
105651
|
};
|
|
@@ -104119,12 +105697,21 @@ products.command(`products-attribute-groups-get`).description(``).requiredOption
|
|
|
104119
105697
|
}
|
|
104120
105698
|
)
|
|
104121
105699
|
);
|
|
104122
|
-
products.command(`products-attribute-groups-update`).description(``).requiredOption(`--id <id>`, ``).action(
|
|
105700
|
+
products.command(`products-attribute-groups-update`).description(``).requiredOption(`--id <id>`, ``).option(`--code <code>`, ``).option(`--labels <labels>`, ``).option(`--position <position>`, ``, parseInteger).action(
|
|
104123
105701
|
actionRunner(
|
|
104124
|
-
async ({ id }) => {
|
|
105702
|
+
async ({ id, code, labels, position }) => {
|
|
104125
105703
|
const _client = await sdkForProject();
|
|
104126
105704
|
const _apiPath = `/products/attribute_groups/{id}`.replace(`{id}`, id);
|
|
104127
105705
|
const _payload = {};
|
|
105706
|
+
if (code !== void 0) {
|
|
105707
|
+
_payload[`code`] = code;
|
|
105708
|
+
}
|
|
105709
|
+
if (labels !== void 0) {
|
|
105710
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
105711
|
+
}
|
|
105712
|
+
if (position !== void 0) {
|
|
105713
|
+
_payload[`position`] = position;
|
|
105714
|
+
}
|
|
104128
105715
|
const _headers = {
|
|
104129
105716
|
"content-type": "application/json"
|
|
104130
105717
|
};
|
|
@@ -104157,12 +105744,27 @@ products.command(`products-attribute-options-list`).description(``).action(
|
|
|
104157
105744
|
}
|
|
104158
105745
|
)
|
|
104159
105746
|
);
|
|
104160
|
-
products.command(`products-attribute-options-create`).description(``).action(
|
|
105747
|
+
products.command(`products-attribute-options-create`).description(``).requiredOption(`--attribute-_id <attribute-_id>`, ``).requiredOption(`--code <code>`, ``).option(`--labels <labels>`, ``).option(`--position <position>`, ``, parseInteger).option(`--swatch <swatch>`, ``).action(
|
|
104161
105748
|
actionRunner(
|
|
104162
|
-
async () => {
|
|
105749
|
+
async ({ attribute_id, code, labels, position, swatch }) => {
|
|
104163
105750
|
const _client = await sdkForProject();
|
|
104164
105751
|
const _apiPath = `/products/attribute_options`;
|
|
104165
105752
|
const _payload = {};
|
|
105753
|
+
if (attribute_id !== void 0) {
|
|
105754
|
+
_payload[`attribute_id`] = attribute_id;
|
|
105755
|
+
}
|
|
105756
|
+
if (code !== void 0) {
|
|
105757
|
+
_payload[`code`] = code;
|
|
105758
|
+
}
|
|
105759
|
+
if (labels !== void 0) {
|
|
105760
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
105761
|
+
}
|
|
105762
|
+
if (position !== void 0) {
|
|
105763
|
+
_payload[`position`] = position;
|
|
105764
|
+
}
|
|
105765
|
+
if (swatch !== void 0) {
|
|
105766
|
+
_payload[`swatch`] = JSON.parse(swatch);
|
|
105767
|
+
}
|
|
104166
105768
|
const _headers = {
|
|
104167
105769
|
"content-type": "application/json"
|
|
104168
105770
|
};
|
|
@@ -104214,12 +105816,27 @@ products.command(`products-attribute-options-get`).description(``).requiredOptio
|
|
|
104214
105816
|
}
|
|
104215
105817
|
)
|
|
104216
105818
|
);
|
|
104217
|
-
products.command(`products-attribute-options-update`).description(``).requiredOption(`--id <id>`, ``).action(
|
|
105819
|
+
products.command(`products-attribute-options-update`).description(``).requiredOption(`--id <id>`, ``).option(`--attribute-_id <attribute-_id>`, ``).option(`--code <code>`, ``).option(`--labels <labels>`, ``).option(`--position <position>`, ``, parseInteger).option(`--swatch <swatch>`, ``).action(
|
|
104218
105820
|
actionRunner(
|
|
104219
|
-
async ({ id }) => {
|
|
105821
|
+
async ({ id, attribute_id, code, labels, position, swatch }) => {
|
|
104220
105822
|
const _client = await sdkForProject();
|
|
104221
105823
|
const _apiPath = `/products/attribute_options/{id}`.replace(`{id}`, id);
|
|
104222
105824
|
const _payload = {};
|
|
105825
|
+
if (attribute_id !== void 0) {
|
|
105826
|
+
_payload[`attribute_id`] = attribute_id;
|
|
105827
|
+
}
|
|
105828
|
+
if (code !== void 0) {
|
|
105829
|
+
_payload[`code`] = code;
|
|
105830
|
+
}
|
|
105831
|
+
if (labels !== void 0) {
|
|
105832
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
105833
|
+
}
|
|
105834
|
+
if (position !== void 0) {
|
|
105835
|
+
_payload[`position`] = position;
|
|
105836
|
+
}
|
|
105837
|
+
if (swatch !== void 0) {
|
|
105838
|
+
_payload[`swatch`] = JSON.parse(swatch);
|
|
105839
|
+
}
|
|
104223
105840
|
const _headers = {
|
|
104224
105841
|
"content-type": "application/json"
|
|
104225
105842
|
};
|
|
@@ -104252,12 +105869,74 @@ products.command(`products-attributes-list`).description(``).action(
|
|
|
104252
105869
|
}
|
|
104253
105870
|
)
|
|
104254
105871
|
);
|
|
104255
|
-
products.command(`products-attributes-create`).description(``).
|
|
105872
|
+
products.command(`products-attributes-create`).description(``).requiredOption(`--code <code>`, ``).requiredOption(`--type <type>`, ``).option(`--config <config>`, ``).option(`--entity-_ref <entity-_ref>`, ``).option(`--entity-_type <entity-_type>`, ``).option(`--group-_id <group-_id>`, ``).option(
|
|
105873
|
+
`--is-_filterable [value]`,
|
|
105874
|
+
``,
|
|
105875
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
105876
|
+
).option(
|
|
105877
|
+
`--is-_unique [value]`,
|
|
105878
|
+
``,
|
|
105879
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
105880
|
+
).option(`--labels <labels>`, ``).option(
|
|
105881
|
+
`--localizable [value]`,
|
|
105882
|
+
``,
|
|
105883
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
105884
|
+
).option(`--position <position>`, ``, parseInteger).option(
|
|
105885
|
+
`--scopable [value]`,
|
|
105886
|
+
``,
|
|
105887
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
105888
|
+
).option(
|
|
105889
|
+
`--usable-_in-_grid [value]`,
|
|
105890
|
+
``,
|
|
105891
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
105892
|
+
).option(`--validation <validation>`, ``).action(
|
|
104256
105893
|
actionRunner(
|
|
104257
|
-
async () => {
|
|
105894
|
+
async ({ code, type, config: config2, entity_ref, entity_type, group_id, is_filterable, is_unique, labels, localizable, position, scopable, usable_in_grid, validation }) => {
|
|
104258
105895
|
const _client = await sdkForProject();
|
|
104259
105896
|
const _apiPath = `/products/attributes`;
|
|
104260
105897
|
const _payload = {};
|
|
105898
|
+
if (code !== void 0) {
|
|
105899
|
+
_payload[`code`] = code;
|
|
105900
|
+
}
|
|
105901
|
+
if (config2 !== void 0) {
|
|
105902
|
+
_payload[`config`] = JSON.parse(config2);
|
|
105903
|
+
}
|
|
105904
|
+
if (entity_ref !== void 0) {
|
|
105905
|
+
_payload[`entity_ref`] = entity_ref;
|
|
105906
|
+
}
|
|
105907
|
+
if (entity_type !== void 0) {
|
|
105908
|
+
_payload[`entity_type`] = entity_type;
|
|
105909
|
+
}
|
|
105910
|
+
if (group_id !== void 0) {
|
|
105911
|
+
_payload[`group_id`] = group_id;
|
|
105912
|
+
}
|
|
105913
|
+
if (is_filterable !== void 0) {
|
|
105914
|
+
_payload[`is_filterable`] = is_filterable;
|
|
105915
|
+
}
|
|
105916
|
+
if (is_unique !== void 0) {
|
|
105917
|
+
_payload[`is_unique`] = is_unique;
|
|
105918
|
+
}
|
|
105919
|
+
if (labels !== void 0) {
|
|
105920
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
105921
|
+
}
|
|
105922
|
+
if (localizable !== void 0) {
|
|
105923
|
+
_payload[`localizable`] = localizable;
|
|
105924
|
+
}
|
|
105925
|
+
if (position !== void 0) {
|
|
105926
|
+
_payload[`position`] = position;
|
|
105927
|
+
}
|
|
105928
|
+
if (scopable !== void 0) {
|
|
105929
|
+
_payload[`scopable`] = scopable;
|
|
105930
|
+
}
|
|
105931
|
+
if (type !== void 0) {
|
|
105932
|
+
_payload[`type`] = type;
|
|
105933
|
+
}
|
|
105934
|
+
if (usable_in_grid !== void 0) {
|
|
105935
|
+
_payload[`usable_in_grid`] = usable_in_grid;
|
|
105936
|
+
}
|
|
105937
|
+
if (validation !== void 0) {
|
|
105938
|
+
_payload[`validation`] = JSON.parse(validation);
|
|
105939
|
+
}
|
|
104261
105940
|
const _headers = {
|
|
104262
105941
|
"content-type": "application/json"
|
|
104263
105942
|
};
|
|
@@ -104309,12 +105988,74 @@ products.command(`products-attributes-get`).description(``).requiredOption(`--id
|
|
|
104309
105988
|
}
|
|
104310
105989
|
)
|
|
104311
105990
|
);
|
|
104312
|
-
products.command(`products-attributes-update`).description(``).requiredOption(`--id <id>`, ``).
|
|
105991
|
+
products.command(`products-attributes-update`).description(``).requiredOption(`--id <id>`, ``).option(`--code <code>`, ``).option(`--config <config>`, ``).option(`--entity-_ref <entity-_ref>`, ``).option(`--entity-_type <entity-_type>`, ``).option(`--group-_id <group-_id>`, ``).option(
|
|
105992
|
+
`--is-_filterable [value]`,
|
|
105993
|
+
``,
|
|
105994
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
105995
|
+
).option(
|
|
105996
|
+
`--is-_unique [value]`,
|
|
105997
|
+
``,
|
|
105998
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
105999
|
+
).option(`--labels <labels>`, ``).option(
|
|
106000
|
+
`--localizable [value]`,
|
|
106001
|
+
``,
|
|
106002
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
106003
|
+
).option(`--position <position>`, ``, parseInteger).option(
|
|
106004
|
+
`--scopable [value]`,
|
|
106005
|
+
``,
|
|
106006
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
106007
|
+
).option(`--type <type>`, ``).option(
|
|
106008
|
+
`--usable-_in-_grid [value]`,
|
|
106009
|
+
``,
|
|
106010
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
106011
|
+
).option(`--validation <validation>`, ``).action(
|
|
104313
106012
|
actionRunner(
|
|
104314
|
-
async ({ id }) => {
|
|
106013
|
+
async ({ id, code, config: config2, entity_ref, entity_type, group_id, is_filterable, is_unique, labels, localizable, position, scopable, type, usable_in_grid, validation }) => {
|
|
104315
106014
|
const _client = await sdkForProject();
|
|
104316
106015
|
const _apiPath = `/products/attributes/{id}`.replace(`{id}`, id);
|
|
104317
106016
|
const _payload = {};
|
|
106017
|
+
if (code !== void 0) {
|
|
106018
|
+
_payload[`code`] = code;
|
|
106019
|
+
}
|
|
106020
|
+
if (config2 !== void 0) {
|
|
106021
|
+
_payload[`config`] = JSON.parse(config2);
|
|
106022
|
+
}
|
|
106023
|
+
if (entity_ref !== void 0) {
|
|
106024
|
+
_payload[`entity_ref`] = entity_ref;
|
|
106025
|
+
}
|
|
106026
|
+
if (entity_type !== void 0) {
|
|
106027
|
+
_payload[`entity_type`] = entity_type;
|
|
106028
|
+
}
|
|
106029
|
+
if (group_id !== void 0) {
|
|
106030
|
+
_payload[`group_id`] = group_id;
|
|
106031
|
+
}
|
|
106032
|
+
if (is_filterable !== void 0) {
|
|
106033
|
+
_payload[`is_filterable`] = is_filterable;
|
|
106034
|
+
}
|
|
106035
|
+
if (is_unique !== void 0) {
|
|
106036
|
+
_payload[`is_unique`] = is_unique;
|
|
106037
|
+
}
|
|
106038
|
+
if (labels !== void 0) {
|
|
106039
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
106040
|
+
}
|
|
106041
|
+
if (localizable !== void 0) {
|
|
106042
|
+
_payload[`localizable`] = localizable;
|
|
106043
|
+
}
|
|
106044
|
+
if (position !== void 0) {
|
|
106045
|
+
_payload[`position`] = position;
|
|
106046
|
+
}
|
|
106047
|
+
if (scopable !== void 0) {
|
|
106048
|
+
_payload[`scopable`] = scopable;
|
|
106049
|
+
}
|
|
106050
|
+
if (type !== void 0) {
|
|
106051
|
+
_payload[`type`] = type;
|
|
106052
|
+
}
|
|
106053
|
+
if (usable_in_grid !== void 0) {
|
|
106054
|
+
_payload[`usable_in_grid`] = usable_in_grid;
|
|
106055
|
+
}
|
|
106056
|
+
if (validation !== void 0) {
|
|
106057
|
+
_payload[`validation`] = JSON.parse(validation);
|
|
106058
|
+
}
|
|
104318
106059
|
const _headers = {
|
|
104319
106060
|
"content-type": "application/json"
|
|
104320
106061
|
};
|
|
@@ -104347,12 +106088,30 @@ products.command(`products-categories-list`).description(``).action(
|
|
|
104347
106088
|
}
|
|
104348
106089
|
)
|
|
104349
106090
|
);
|
|
104350
|
-
products.command(`products-categories-create`).description(``).action(
|
|
106091
|
+
products.command(`products-categories-create`).description(``).requiredOption(`--code <code>`, ``).option(`--labels <labels>`, ``).option(`--parent-_id <parent-_id>`, ``).option(`--path <path>`, ``).option(`--position <position>`, ``, parseInteger).option(`--values <values>`, ``).action(
|
|
104351
106092
|
actionRunner(
|
|
104352
|
-
async () => {
|
|
106093
|
+
async ({ code, labels, parent_id, path: path12, position, values }) => {
|
|
104353
106094
|
const _client = await sdkForProject();
|
|
104354
106095
|
const _apiPath = `/products/categories`;
|
|
104355
106096
|
const _payload = {};
|
|
106097
|
+
if (code !== void 0) {
|
|
106098
|
+
_payload[`code`] = code;
|
|
106099
|
+
}
|
|
106100
|
+
if (labels !== void 0) {
|
|
106101
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
106102
|
+
}
|
|
106103
|
+
if (parent_id !== void 0) {
|
|
106104
|
+
_payload[`parent_id`] = parent_id;
|
|
106105
|
+
}
|
|
106106
|
+
if (path12 !== void 0) {
|
|
106107
|
+
_payload[`path`] = path12;
|
|
106108
|
+
}
|
|
106109
|
+
if (position !== void 0) {
|
|
106110
|
+
_payload[`position`] = position;
|
|
106111
|
+
}
|
|
106112
|
+
if (values !== void 0) {
|
|
106113
|
+
_payload[`values`] = JSON.parse(values);
|
|
106114
|
+
}
|
|
104356
106115
|
const _headers = {
|
|
104357
106116
|
"content-type": "application/json"
|
|
104358
106117
|
};
|
|
@@ -104404,12 +106163,30 @@ products.command(`products-categories-get`).description(``).requiredOption(`--id
|
|
|
104404
106163
|
}
|
|
104405
106164
|
)
|
|
104406
106165
|
);
|
|
104407
|
-
products.command(`products-categories-update`).description(``).requiredOption(`--id <id>`, ``).action(
|
|
106166
|
+
products.command(`products-categories-update`).description(``).requiredOption(`--id <id>`, ``).option(`--code <code>`, ``).option(`--labels <labels>`, ``).option(`--parent-_id <parent-_id>`, ``).option(`--path <path>`, ``).option(`--position <position>`, ``, parseInteger).option(`--values <values>`, ``).action(
|
|
104408
106167
|
actionRunner(
|
|
104409
|
-
async ({ id }) => {
|
|
106168
|
+
async ({ id, code, labels, parent_id, path: path12, position, values }) => {
|
|
104410
106169
|
const _client = await sdkForProject();
|
|
104411
106170
|
const _apiPath = `/products/categories/{id}`.replace(`{id}`, id);
|
|
104412
106171
|
const _payload = {};
|
|
106172
|
+
if (code !== void 0) {
|
|
106173
|
+
_payload[`code`] = code;
|
|
106174
|
+
}
|
|
106175
|
+
if (labels !== void 0) {
|
|
106176
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
106177
|
+
}
|
|
106178
|
+
if (parent_id !== void 0) {
|
|
106179
|
+
_payload[`parent_id`] = parent_id;
|
|
106180
|
+
}
|
|
106181
|
+
if (path12 !== void 0) {
|
|
106182
|
+
_payload[`path`] = path12;
|
|
106183
|
+
}
|
|
106184
|
+
if (position !== void 0) {
|
|
106185
|
+
_payload[`position`] = position;
|
|
106186
|
+
}
|
|
106187
|
+
if (values !== void 0) {
|
|
106188
|
+
_payload[`values`] = JSON.parse(values);
|
|
106189
|
+
}
|
|
104413
106190
|
const _headers = {
|
|
104414
106191
|
"content-type": "application/json"
|
|
104415
106192
|
};
|
|
@@ -104442,12 +106219,24 @@ products.command(`products-families-list`).description(``).action(
|
|
|
104442
106219
|
}
|
|
104443
106220
|
)
|
|
104444
106221
|
);
|
|
104445
|
-
products.command(`products-families-create`).description(``).action(
|
|
106222
|
+
products.command(`products-families-create`).description(``).requiredOption(`--code <code>`, ``).option(`--image-_attribute <image-_attribute>`, ``).option(`--label-_attribute <label-_attribute>`, ``).option(`--labels <labels>`, ``).action(
|
|
104446
106223
|
actionRunner(
|
|
104447
|
-
async () => {
|
|
106224
|
+
async ({ code, image_attribute, label_attribute, labels }) => {
|
|
104448
106225
|
const _client = await sdkForProject();
|
|
104449
106226
|
const _apiPath = `/products/families`;
|
|
104450
106227
|
const _payload = {};
|
|
106228
|
+
if (code !== void 0) {
|
|
106229
|
+
_payload[`code`] = code;
|
|
106230
|
+
}
|
|
106231
|
+
if (image_attribute !== void 0) {
|
|
106232
|
+
_payload[`image_attribute`] = image_attribute;
|
|
106233
|
+
}
|
|
106234
|
+
if (label_attribute !== void 0) {
|
|
106235
|
+
_payload[`label_attribute`] = label_attribute;
|
|
106236
|
+
}
|
|
106237
|
+
if (labels !== void 0) {
|
|
106238
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
106239
|
+
}
|
|
104451
106240
|
const _headers = {
|
|
104452
106241
|
"content-type": "application/json"
|
|
104453
106242
|
};
|
|
@@ -104499,12 +106288,24 @@ products.command(`products-families-get`).description(``).requiredOption(`--id <
|
|
|
104499
106288
|
}
|
|
104500
106289
|
)
|
|
104501
106290
|
);
|
|
104502
|
-
products.command(`products-families-update`).description(``).requiredOption(`--id <id>`, ``).action(
|
|
106291
|
+
products.command(`products-families-update`).description(``).requiredOption(`--id <id>`, ``).option(`--code <code>`, ``).option(`--image-_attribute <image-_attribute>`, ``).option(`--label-_attribute <label-_attribute>`, ``).option(`--labels <labels>`, ``).action(
|
|
104503
106292
|
actionRunner(
|
|
104504
|
-
async ({ id }) => {
|
|
106293
|
+
async ({ id, code, image_attribute, label_attribute, labels }) => {
|
|
104505
106294
|
const _client = await sdkForProject();
|
|
104506
106295
|
const _apiPath = `/products/families/{id}`.replace(`{id}`, id);
|
|
104507
106296
|
const _payload = {};
|
|
106297
|
+
if (code !== void 0) {
|
|
106298
|
+
_payload[`code`] = code;
|
|
106299
|
+
}
|
|
106300
|
+
if (image_attribute !== void 0) {
|
|
106301
|
+
_payload[`image_attribute`] = image_attribute;
|
|
106302
|
+
}
|
|
106303
|
+
if (label_attribute !== void 0) {
|
|
106304
|
+
_payload[`label_attribute`] = label_attribute;
|
|
106305
|
+
}
|
|
106306
|
+
if (labels !== void 0) {
|
|
106307
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
106308
|
+
}
|
|
104508
106309
|
const _headers = {
|
|
104509
106310
|
"content-type": "application/json"
|
|
104510
106311
|
};
|
|
@@ -104537,12 +106338,31 @@ products.command(`products-family-attributes-list`).description(``).action(
|
|
|
104537
106338
|
}
|
|
104538
106339
|
)
|
|
104539
106340
|
);
|
|
104540
|
-
products.command(`products-family-attributes-create`).description(``).
|
|
106341
|
+
products.command(`products-family-attributes-create`).description(``).requiredOption(`--attribute-_id <attribute-_id>`, ``).requiredOption(`--family-_id <family-_id>`, ``).option(
|
|
106342
|
+
`--is-_required [value]`,
|
|
106343
|
+
``,
|
|
106344
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
106345
|
+
).option(`--position <position>`, ``, parseInteger).option(`--required-_channels <required-_channels>`, ``).action(
|
|
104541
106346
|
actionRunner(
|
|
104542
|
-
async () => {
|
|
106347
|
+
async ({ attribute_id, family_id, is_required, position, required_channels }) => {
|
|
104543
106348
|
const _client = await sdkForProject();
|
|
104544
106349
|
const _apiPath = `/products/family_attributes`;
|
|
104545
106350
|
const _payload = {};
|
|
106351
|
+
if (attribute_id !== void 0) {
|
|
106352
|
+
_payload[`attribute_id`] = attribute_id;
|
|
106353
|
+
}
|
|
106354
|
+
if (family_id !== void 0) {
|
|
106355
|
+
_payload[`family_id`] = family_id;
|
|
106356
|
+
}
|
|
106357
|
+
if (is_required !== void 0) {
|
|
106358
|
+
_payload[`is_required`] = is_required;
|
|
106359
|
+
}
|
|
106360
|
+
if (position !== void 0) {
|
|
106361
|
+
_payload[`position`] = position;
|
|
106362
|
+
}
|
|
106363
|
+
if (required_channels !== void 0) {
|
|
106364
|
+
_payload[`required_channels`] = JSON.parse(required_channels);
|
|
106365
|
+
}
|
|
104546
106366
|
const _headers = {
|
|
104547
106367
|
"content-type": "application/json"
|
|
104548
106368
|
};
|
|
@@ -104594,12 +106414,31 @@ products.command(`products-family-attributes-get`).description(``).requiredOptio
|
|
|
104594
106414
|
}
|
|
104595
106415
|
)
|
|
104596
106416
|
);
|
|
104597
|
-
products.command(`products-family-attributes-update`).description(``).requiredOption(`--id <id>`, ``).
|
|
106417
|
+
products.command(`products-family-attributes-update`).description(``).requiredOption(`--id <id>`, ``).option(`--attribute-_id <attribute-_id>`, ``).option(`--family-_id <family-_id>`, ``).option(
|
|
106418
|
+
`--is-_required [value]`,
|
|
106419
|
+
``,
|
|
106420
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
106421
|
+
).option(`--position <position>`, ``, parseInteger).option(`--required-_channels <required-_channels>`, ``).action(
|
|
104598
106422
|
actionRunner(
|
|
104599
|
-
async ({ id }) => {
|
|
106423
|
+
async ({ id, attribute_id, family_id, is_required, position, required_channels }) => {
|
|
104600
106424
|
const _client = await sdkForProject();
|
|
104601
106425
|
const _apiPath = `/products/family_attributes/{id}`.replace(`{id}`, id);
|
|
104602
106426
|
const _payload = {};
|
|
106427
|
+
if (attribute_id !== void 0) {
|
|
106428
|
+
_payload[`attribute_id`] = attribute_id;
|
|
106429
|
+
}
|
|
106430
|
+
if (family_id !== void 0) {
|
|
106431
|
+
_payload[`family_id`] = family_id;
|
|
106432
|
+
}
|
|
106433
|
+
if (is_required !== void 0) {
|
|
106434
|
+
_payload[`is_required`] = is_required;
|
|
106435
|
+
}
|
|
106436
|
+
if (position !== void 0) {
|
|
106437
|
+
_payload[`position`] = position;
|
|
106438
|
+
}
|
|
106439
|
+
if (required_channels !== void 0) {
|
|
106440
|
+
_payload[`required_channels`] = JSON.parse(required_channels);
|
|
106441
|
+
}
|
|
104603
106442
|
const _headers = {
|
|
104604
106443
|
"content-type": "application/json"
|
|
104605
106444
|
};
|
|
@@ -104632,12 +106471,24 @@ products.command(`products-family-variants-list`).description(``).action(
|
|
|
104632
106471
|
}
|
|
104633
106472
|
)
|
|
104634
106473
|
);
|
|
104635
|
-
products.command(`products-family-variants-create`).description(``).action(
|
|
106474
|
+
products.command(`products-family-variants-create`).description(``).requiredOption(`--code <code>`, ``).requiredOption(`--family-_id <family-_id>`, ``).option(`--axes <axes>`, ``).option(`--labels <labels>`, ``).action(
|
|
104636
106475
|
actionRunner(
|
|
104637
|
-
async () => {
|
|
106476
|
+
async ({ code, family_id, axes, labels }) => {
|
|
104638
106477
|
const _client = await sdkForProject();
|
|
104639
106478
|
const _apiPath = `/products/family_variants`;
|
|
104640
106479
|
const _payload = {};
|
|
106480
|
+
if (axes !== void 0) {
|
|
106481
|
+
_payload[`axes`] = JSON.parse(axes);
|
|
106482
|
+
}
|
|
106483
|
+
if (code !== void 0) {
|
|
106484
|
+
_payload[`code`] = code;
|
|
106485
|
+
}
|
|
106486
|
+
if (family_id !== void 0) {
|
|
106487
|
+
_payload[`family_id`] = family_id;
|
|
106488
|
+
}
|
|
106489
|
+
if (labels !== void 0) {
|
|
106490
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
106491
|
+
}
|
|
104641
106492
|
const _headers = {
|
|
104642
106493
|
"content-type": "application/json"
|
|
104643
106494
|
};
|
|
@@ -104689,12 +106540,24 @@ products.command(`products-family-variants-get`).description(``).requiredOption(
|
|
|
104689
106540
|
}
|
|
104690
106541
|
)
|
|
104691
106542
|
);
|
|
104692
|
-
products.command(`products-family-variants-update`).description(``).requiredOption(`--id <id>`, ``).action(
|
|
106543
|
+
products.command(`products-family-variants-update`).description(``).requiredOption(`--id <id>`, ``).option(`--axes <axes>`, ``).option(`--code <code>`, ``).option(`--family-_id <family-_id>`, ``).option(`--labels <labels>`, ``).action(
|
|
104693
106544
|
actionRunner(
|
|
104694
|
-
async ({ id }) => {
|
|
106545
|
+
async ({ id, axes, code, family_id, labels }) => {
|
|
104695
106546
|
const _client = await sdkForProject();
|
|
104696
106547
|
const _apiPath = `/products/family_variants/{id}`.replace(`{id}`, id);
|
|
104697
106548
|
const _payload = {};
|
|
106549
|
+
if (axes !== void 0) {
|
|
106550
|
+
_payload[`axes`] = JSON.parse(axes);
|
|
106551
|
+
}
|
|
106552
|
+
if (code !== void 0) {
|
|
106553
|
+
_payload[`code`] = code;
|
|
106554
|
+
}
|
|
106555
|
+
if (family_id !== void 0) {
|
|
106556
|
+
_payload[`family_id`] = family_id;
|
|
106557
|
+
}
|
|
106558
|
+
if (labels !== void 0) {
|
|
106559
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
106560
|
+
}
|
|
104698
106561
|
const _headers = {
|
|
104699
106562
|
"content-type": "application/json"
|
|
104700
106563
|
};
|
|
@@ -104727,12 +106590,24 @@ products.command(`products-measurement-families-list`).description(``).action(
|
|
|
104727
106590
|
}
|
|
104728
106591
|
)
|
|
104729
106592
|
);
|
|
104730
|
-
products.command(`products-measurement-families-create`).description(``).action(
|
|
106593
|
+
products.command(`products-measurement-families-create`).description(``).requiredOption(`--code <code>`, ``).requiredOption(`--standard-_unit <standard-_unit>`, ``).option(`--labels <labels>`, ``).option(`--units <units>`, ``).action(
|
|
104731
106594
|
actionRunner(
|
|
104732
|
-
async () => {
|
|
106595
|
+
async ({ code, standard_unit, labels, units }) => {
|
|
104733
106596
|
const _client = await sdkForProject();
|
|
104734
106597
|
const _apiPath = `/products/measurement_families`;
|
|
104735
106598
|
const _payload = {};
|
|
106599
|
+
if (code !== void 0) {
|
|
106600
|
+
_payload[`code`] = code;
|
|
106601
|
+
}
|
|
106602
|
+
if (labels !== void 0) {
|
|
106603
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
106604
|
+
}
|
|
106605
|
+
if (standard_unit !== void 0) {
|
|
106606
|
+
_payload[`standard_unit`] = standard_unit;
|
|
106607
|
+
}
|
|
106608
|
+
if (units !== void 0) {
|
|
106609
|
+
_payload[`units`] = JSON.parse(units);
|
|
106610
|
+
}
|
|
104736
106611
|
const _headers = {
|
|
104737
106612
|
"content-type": "application/json"
|
|
104738
106613
|
};
|
|
@@ -104784,12 +106659,24 @@ products.command(`products-measurement-families-get`).description(``).requiredOp
|
|
|
104784
106659
|
}
|
|
104785
106660
|
)
|
|
104786
106661
|
);
|
|
104787
|
-
products.command(`products-measurement-families-update`).description(``).requiredOption(`--id <id>`, ``).action(
|
|
106662
|
+
products.command(`products-measurement-families-update`).description(``).requiredOption(`--id <id>`, ``).option(`--code <code>`, ``).option(`--labels <labels>`, ``).option(`--standard-_unit <standard-_unit>`, ``).option(`--units <units>`, ``).action(
|
|
104788
106663
|
actionRunner(
|
|
104789
|
-
async ({ id }) => {
|
|
106664
|
+
async ({ id, code, labels, standard_unit, units }) => {
|
|
104790
106665
|
const _client = await sdkForProject();
|
|
104791
106666
|
const _apiPath = `/products/measurement_families/{id}`.replace(`{id}`, id);
|
|
104792
106667
|
const _payload = {};
|
|
106668
|
+
if (code !== void 0) {
|
|
106669
|
+
_payload[`code`] = code;
|
|
106670
|
+
}
|
|
106671
|
+
if (labels !== void 0) {
|
|
106672
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
106673
|
+
}
|
|
106674
|
+
if (standard_unit !== void 0) {
|
|
106675
|
+
_payload[`standard_unit`] = standard_unit;
|
|
106676
|
+
}
|
|
106677
|
+
if (units !== void 0) {
|
|
106678
|
+
_payload[`units`] = JSON.parse(units);
|
|
106679
|
+
}
|
|
104793
106680
|
const _headers = {
|
|
104794
106681
|
"content-type": "application/json"
|
|
104795
106682
|
};
|
|
@@ -104822,12 +106709,27 @@ products.command(`products-product-associations-list`).description(``).action(
|
|
|
104822
106709
|
}
|
|
104823
106710
|
)
|
|
104824
106711
|
);
|
|
104825
|
-
products.command(`products-product-associations-create`).description(``).action(
|
|
106712
|
+
products.command(`products-product-associations-create`).description(``).requiredOption(`--association-_type-_id <association-_type-_id>`, ``).requiredOption(`--product-_id <product-_id>`, ``).requiredOption(`--target-_product-_id <target-_product-_id>`, ``).option(`--position <position>`, ``, parseInteger).option(`--quantity <quantity>`, ``, parseInteger).action(
|
|
104826
106713
|
actionRunner(
|
|
104827
|
-
async () => {
|
|
106714
|
+
async ({ association_type_id, product_id, target_product_id, position, quantity }) => {
|
|
104828
106715
|
const _client = await sdkForProject();
|
|
104829
106716
|
const _apiPath = `/products/product_associations`;
|
|
104830
106717
|
const _payload = {};
|
|
106718
|
+
if (association_type_id !== void 0) {
|
|
106719
|
+
_payload[`association_type_id`] = association_type_id;
|
|
106720
|
+
}
|
|
106721
|
+
if (position !== void 0) {
|
|
106722
|
+
_payload[`position`] = position;
|
|
106723
|
+
}
|
|
106724
|
+
if (product_id !== void 0) {
|
|
106725
|
+
_payload[`product_id`] = product_id;
|
|
106726
|
+
}
|
|
106727
|
+
if (quantity !== void 0) {
|
|
106728
|
+
_payload[`quantity`] = quantity;
|
|
106729
|
+
}
|
|
106730
|
+
if (target_product_id !== void 0) {
|
|
106731
|
+
_payload[`target_product_id`] = target_product_id;
|
|
106732
|
+
}
|
|
104831
106733
|
const _headers = {
|
|
104832
106734
|
"content-type": "application/json"
|
|
104833
106735
|
};
|
|
@@ -104879,12 +106781,27 @@ products.command(`products-product-associations-get`).description(``).requiredOp
|
|
|
104879
106781
|
}
|
|
104880
106782
|
)
|
|
104881
106783
|
);
|
|
104882
|
-
products.command(`products-product-associations-update`).description(``).requiredOption(`--id <id>`, ``).action(
|
|
106784
|
+
products.command(`products-product-associations-update`).description(``).requiredOption(`--id <id>`, ``).option(`--association-_type-_id <association-_type-_id>`, ``).option(`--position <position>`, ``, parseInteger).option(`--product-_id <product-_id>`, ``).option(`--quantity <quantity>`, ``, parseInteger).option(`--target-_product-_id <target-_product-_id>`, ``).action(
|
|
104883
106785
|
actionRunner(
|
|
104884
|
-
async ({ id }) => {
|
|
106786
|
+
async ({ id, association_type_id, position, product_id, quantity, target_product_id }) => {
|
|
104885
106787
|
const _client = await sdkForProject();
|
|
104886
106788
|
const _apiPath = `/products/product_associations/{id}`.replace(`{id}`, id);
|
|
104887
106789
|
const _payload = {};
|
|
106790
|
+
if (association_type_id !== void 0) {
|
|
106791
|
+
_payload[`association_type_id`] = association_type_id;
|
|
106792
|
+
}
|
|
106793
|
+
if (position !== void 0) {
|
|
106794
|
+
_payload[`position`] = position;
|
|
106795
|
+
}
|
|
106796
|
+
if (product_id !== void 0) {
|
|
106797
|
+
_payload[`product_id`] = product_id;
|
|
106798
|
+
}
|
|
106799
|
+
if (quantity !== void 0) {
|
|
106800
|
+
_payload[`quantity`] = quantity;
|
|
106801
|
+
}
|
|
106802
|
+
if (target_product_id !== void 0) {
|
|
106803
|
+
_payload[`target_product_id`] = target_product_id;
|
|
106804
|
+
}
|
|
104888
106805
|
const _headers = {
|
|
104889
106806
|
"content-type": "application/json"
|
|
104890
106807
|
};
|
|
@@ -104917,12 +106834,21 @@ products.command(`products-product-categories-list`).description(``).action(
|
|
|
104917
106834
|
}
|
|
104918
106835
|
)
|
|
104919
106836
|
);
|
|
104920
|
-
products.command(`products-product-categories-create`).description(``).action(
|
|
106837
|
+
products.command(`products-product-categories-create`).description(``).requiredOption(`--category-_id <category-_id>`, ``).requiredOption(`--product-_id <product-_id>`, ``).option(`--position <position>`, ``, parseInteger).action(
|
|
104921
106838
|
actionRunner(
|
|
104922
|
-
async () => {
|
|
106839
|
+
async ({ category_id, product_id, position }) => {
|
|
104923
106840
|
const _client = await sdkForProject();
|
|
104924
106841
|
const _apiPath = `/products/product_categories`;
|
|
104925
106842
|
const _payload = {};
|
|
106843
|
+
if (category_id !== void 0) {
|
|
106844
|
+
_payload[`category_id`] = category_id;
|
|
106845
|
+
}
|
|
106846
|
+
if (position !== void 0) {
|
|
106847
|
+
_payload[`position`] = position;
|
|
106848
|
+
}
|
|
106849
|
+
if (product_id !== void 0) {
|
|
106850
|
+
_payload[`product_id`] = product_id;
|
|
106851
|
+
}
|
|
104926
106852
|
const _headers = {
|
|
104927
106853
|
"content-type": "application/json"
|
|
104928
106854
|
};
|
|
@@ -104974,12 +106900,21 @@ products.command(`products-product-categories-get`).description(``).requiredOpti
|
|
|
104974
106900
|
}
|
|
104975
106901
|
)
|
|
104976
106902
|
);
|
|
104977
|
-
products.command(`products-product-categories-update`).description(``).requiredOption(`--id <id>`, ``).action(
|
|
106903
|
+
products.command(`products-product-categories-update`).description(``).requiredOption(`--id <id>`, ``).option(`--category-_id <category-_id>`, ``).option(`--position <position>`, ``, parseInteger).option(`--product-_id <product-_id>`, ``).action(
|
|
104978
106904
|
actionRunner(
|
|
104979
|
-
async ({ id }) => {
|
|
106905
|
+
async ({ id, category_id, position, product_id }) => {
|
|
104980
106906
|
const _client = await sdkForProject();
|
|
104981
106907
|
const _apiPath = `/products/product_categories/{id}`.replace(`{id}`, id);
|
|
104982
106908
|
const _payload = {};
|
|
106909
|
+
if (category_id !== void 0) {
|
|
106910
|
+
_payload[`category_id`] = category_id;
|
|
106911
|
+
}
|
|
106912
|
+
if (position !== void 0) {
|
|
106913
|
+
_payload[`position`] = position;
|
|
106914
|
+
}
|
|
106915
|
+
if (product_id !== void 0) {
|
|
106916
|
+
_payload[`product_id`] = product_id;
|
|
106917
|
+
}
|
|
104983
106918
|
const _headers = {
|
|
104984
106919
|
"content-type": "application/json"
|
|
104985
106920
|
};
|
|
@@ -105012,12 +106947,21 @@ products.command(`products-reference-entities-list`).description(``).action(
|
|
|
105012
106947
|
}
|
|
105013
106948
|
)
|
|
105014
106949
|
);
|
|
105015
|
-
products.command(`products-reference-entities-create`).description(``).action(
|
|
106950
|
+
products.command(`products-reference-entities-create`).description(``).requiredOption(`--code <code>`, ``).option(`--image <image>`, ``).option(`--labels <labels>`, ``).action(
|
|
105016
106951
|
actionRunner(
|
|
105017
|
-
async () => {
|
|
106952
|
+
async ({ code, image, labels }) => {
|
|
105018
106953
|
const _client = await sdkForProject();
|
|
105019
106954
|
const _apiPath = `/products/reference_entities`;
|
|
105020
106955
|
const _payload = {};
|
|
106956
|
+
if (code !== void 0) {
|
|
106957
|
+
_payload[`code`] = code;
|
|
106958
|
+
}
|
|
106959
|
+
if (image !== void 0) {
|
|
106960
|
+
_payload[`image`] = image;
|
|
106961
|
+
}
|
|
106962
|
+
if (labels !== void 0) {
|
|
106963
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
106964
|
+
}
|
|
105021
106965
|
const _headers = {
|
|
105022
106966
|
"content-type": "application/json"
|
|
105023
106967
|
};
|
|
@@ -105069,12 +107013,21 @@ products.command(`products-reference-entities-get`).description(``).requiredOpti
|
|
|
105069
107013
|
}
|
|
105070
107014
|
)
|
|
105071
107015
|
);
|
|
105072
|
-
products.command(`products-reference-entities-update`).description(``).requiredOption(`--id <id>`, ``).action(
|
|
107016
|
+
products.command(`products-reference-entities-update`).description(``).requiredOption(`--id <id>`, ``).option(`--code <code>`, ``).option(`--image <image>`, ``).option(`--labels <labels>`, ``).action(
|
|
105073
107017
|
actionRunner(
|
|
105074
|
-
async ({ id }) => {
|
|
107018
|
+
async ({ id, code, image, labels }) => {
|
|
105075
107019
|
const _client = await sdkForProject();
|
|
105076
107020
|
const _apiPath = `/products/reference_entities/{id}`.replace(`{id}`, id);
|
|
105077
107021
|
const _payload = {};
|
|
107022
|
+
if (code !== void 0) {
|
|
107023
|
+
_payload[`code`] = code;
|
|
107024
|
+
}
|
|
107025
|
+
if (image !== void 0) {
|
|
107026
|
+
_payload[`image`] = image;
|
|
107027
|
+
}
|
|
107028
|
+
if (labels !== void 0) {
|
|
107029
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
107030
|
+
}
|
|
105078
107031
|
const _headers = {
|
|
105079
107032
|
"content-type": "application/json"
|
|
105080
107033
|
};
|
|
@@ -105107,12 +107060,24 @@ products.command(`products-reference-entity-records-list`).description(``).actio
|
|
|
105107
107060
|
}
|
|
105108
107061
|
)
|
|
105109
107062
|
);
|
|
105110
|
-
products.command(`products-reference-entity-records-create`).description(``).action(
|
|
107063
|
+
products.command(`products-reference-entity-records-create`).description(``).requiredOption(`--code <code>`, ``).requiredOption(`--reference-_entity-_id <reference-_entity-_id>`, ``).option(`--attribute-_values <attribute-_values>`, ``).option(`--labels <labels>`, ``).action(
|
|
105111
107064
|
actionRunner(
|
|
105112
|
-
async () => {
|
|
107065
|
+
async ({ code, reference_entity_id, attribute_values, labels }) => {
|
|
105113
107066
|
const _client = await sdkForProject();
|
|
105114
107067
|
const _apiPath = `/products/reference_entity_records`;
|
|
105115
107068
|
const _payload = {};
|
|
107069
|
+
if (attribute_values !== void 0) {
|
|
107070
|
+
_payload[`attribute_values`] = JSON.parse(attribute_values);
|
|
107071
|
+
}
|
|
107072
|
+
if (code !== void 0) {
|
|
107073
|
+
_payload[`code`] = code;
|
|
107074
|
+
}
|
|
107075
|
+
if (labels !== void 0) {
|
|
107076
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
107077
|
+
}
|
|
107078
|
+
if (reference_entity_id !== void 0) {
|
|
107079
|
+
_payload[`reference_entity_id`] = reference_entity_id;
|
|
107080
|
+
}
|
|
105116
107081
|
const _headers = {
|
|
105117
107082
|
"content-type": "application/json"
|
|
105118
107083
|
};
|
|
@@ -105164,12 +107129,24 @@ products.command(`products-reference-entity-records-get`).description(``).requir
|
|
|
105164
107129
|
}
|
|
105165
107130
|
)
|
|
105166
107131
|
);
|
|
105167
|
-
products.command(`products-reference-entity-records-update`).description(``).requiredOption(`--id <id>`, ``).action(
|
|
107132
|
+
products.command(`products-reference-entity-records-update`).description(``).requiredOption(`--id <id>`, ``).option(`--attribute-_values <attribute-_values>`, ``).option(`--code <code>`, ``).option(`--labels <labels>`, ``).option(`--reference-_entity-_id <reference-_entity-_id>`, ``).action(
|
|
105168
107133
|
actionRunner(
|
|
105169
|
-
async ({ id }) => {
|
|
107134
|
+
async ({ id, attribute_values, code, labels, reference_entity_id }) => {
|
|
105170
107135
|
const _client = await sdkForProject();
|
|
105171
107136
|
const _apiPath = `/products/reference_entity_records/{id}`.replace(`{id}`, id);
|
|
105172
107137
|
const _payload = {};
|
|
107138
|
+
if (attribute_values !== void 0) {
|
|
107139
|
+
_payload[`attribute_values`] = JSON.parse(attribute_values);
|
|
107140
|
+
}
|
|
107141
|
+
if (code !== void 0) {
|
|
107142
|
+
_payload[`code`] = code;
|
|
107143
|
+
}
|
|
107144
|
+
if (labels !== void 0) {
|
|
107145
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
107146
|
+
}
|
|
107147
|
+
if (reference_entity_id !== void 0) {
|
|
107148
|
+
_payload[`reference_entity_id`] = reference_entity_id;
|
|
107149
|
+
}
|
|
105173
107150
|
const _headers = {
|
|
105174
107151
|
"content-type": "application/json"
|
|
105175
107152
|
};
|
|
@@ -105221,12 +107198,46 @@ products.command(`products-get`).description(``).requiredOption(`--id <id>`, ``)
|
|
|
105221
107198
|
}
|
|
105222
107199
|
)
|
|
105223
107200
|
);
|
|
105224
|
-
products.command(`products-update`).description(``).requiredOption(`--id <id>`, ``).
|
|
107201
|
+
products.command(`products-update`).description(``).requiredOption(`--id <id>`, ``).option(`--attribute-_values <attribute-_values>`, ``).option(`--completeness <completeness>`, ``).option(`--deleted-_at <deleted-_at>`, ``).option(
|
|
107202
|
+
`--enabled [value]`,
|
|
107203
|
+
``,
|
|
107204
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
107205
|
+
).option(`--family-_id <family-_id>`, ``).option(`--family-_variant-_id <family-_variant-_id>`, ``).option(`--kind <kind>`, ``).option(`--parent-_id <parent-_id>`, ``).option(`--quantified-_associations <quantified-_associations>`, ``).option(`--sku <sku>`, ``).action(
|
|
105225
107206
|
actionRunner(
|
|
105226
|
-
async ({ id }) => {
|
|
107207
|
+
async ({ id, attribute_values, completeness, deleted_at, enabled, family_id, family_variant_id, kind, parent_id, quantified_associations, sku }) => {
|
|
105227
107208
|
const _client = await sdkForProject();
|
|
105228
107209
|
const _apiPath = `/products/{id}`.replace(`{id}`, id);
|
|
105229
107210
|
const _payload = {};
|
|
107211
|
+
if (attribute_values !== void 0) {
|
|
107212
|
+
_payload[`attribute_values`] = JSON.parse(attribute_values);
|
|
107213
|
+
}
|
|
107214
|
+
if (completeness !== void 0) {
|
|
107215
|
+
_payload[`completeness`] = JSON.parse(completeness);
|
|
107216
|
+
}
|
|
107217
|
+
if (deleted_at !== void 0) {
|
|
107218
|
+
_payload[`deleted_at`] = deleted_at;
|
|
107219
|
+
}
|
|
107220
|
+
if (enabled !== void 0) {
|
|
107221
|
+
_payload[`enabled`] = enabled;
|
|
107222
|
+
}
|
|
107223
|
+
if (family_id !== void 0) {
|
|
107224
|
+
_payload[`family_id`] = family_id;
|
|
107225
|
+
}
|
|
107226
|
+
if (family_variant_id !== void 0) {
|
|
107227
|
+
_payload[`family_variant_id`] = family_variant_id;
|
|
107228
|
+
}
|
|
107229
|
+
if (kind !== void 0) {
|
|
107230
|
+
_payload[`kind`] = kind;
|
|
107231
|
+
}
|
|
107232
|
+
if (parent_id !== void 0) {
|
|
107233
|
+
_payload[`parent_id`] = parent_id;
|
|
107234
|
+
}
|
|
107235
|
+
if (quantified_associations !== void 0) {
|
|
107236
|
+
_payload[`quantified_associations`] = JSON.parse(quantified_associations);
|
|
107237
|
+
}
|
|
107238
|
+
if (sku !== void 0) {
|
|
107239
|
+
_payload[`sku`] = sku;
|
|
107240
|
+
}
|
|
105230
107241
|
const _headers = {
|
|
105231
107242
|
"content-type": "application/json"
|
|
105232
107243
|
};
|
|
@@ -105406,12 +107417,67 @@ shipping.command(`shipping-methods-list`).description(``).action(
|
|
|
105406
107417
|
}
|
|
105407
107418
|
)
|
|
105408
107419
|
);
|
|
105409
|
-
shipping.command(`shipping-methods-create`).description(``).
|
|
107420
|
+
shipping.command(`shipping-methods-create`).description(``).requiredOption(`--code <code>`, `Stable method code, unique per tenant (e.g. standard, express).`).requiredOption(`--name <name>`, `Display name.`).option(`--carrier <carrier>`, `Carrier anchor for the upcoming carrier connect (dynamic rates, tracking links).`).option(`--countries [countries...]`, `Allowed ISO 3166-1 alpha-2 codes; null or empty = worldwide.`).option(`--currency <currency>`, `ISO 4217 code (default EUR).`).option(`--description <description>`, ``).option(
|
|
107421
|
+
`--enabled [value]`,
|
|
107422
|
+
`Only enabled methods appear in rate responses (default false).`,
|
|
107423
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
107424
|
+
).option(`--eta-_days-_max <eta-_days-_max>`, `Delivery-time estimate for the checkout (days, upper bound).`, parseInteger).option(`--eta-_days-_min <eta-_days-_min>`, `Delivery-time estimate for the checkout (days, lower bound).`, parseInteger).option(`--free-_above <free-_above>`, `Free shipping at or above this order value \u2014 wins over every pricing model.`, parseInteger).option(`--labels <labels>`, `Localized display names keyed by locale (e.g. {de, en}).`).option(`--matrix-_attribute <matrix-_attribute>`, `Attribute name for matrix_basis 'attribute'.`).option(`--matrix-_basis <matrix-_basis>`, `The measure a matrix method prices over; 'attribute' reads matrix_attribute from the rate request.`).option(`--metadata <metadata>`, `Free-form metadata.`).option(`--position <position>`, `Sort order in the checkout (default 0).`, parseInteger).option(`--price <price>`, `The fixed price (default 0) \u2014 ignored for 'free' and 'matrix'.`, parseInteger).option(`--pricing-_type <pricing-_type>`, `Pricing model (default 'fixed'): one price, no price, or tiered over a measure.`).action(
|
|
105410
107425
|
actionRunner(
|
|
105411
|
-
async () => {
|
|
107426
|
+
async ({ code, name, carrier, countries, currency, description: description2, enabled, eta_days_max, eta_days_min, free_above, labels, matrix_attribute, matrix_basis, metadata, position, price, pricing_type }) => {
|
|
105412
107427
|
const _client = await sdkForProject();
|
|
105413
107428
|
const _apiPath = `/shipping/methods`;
|
|
105414
107429
|
const _payload = {};
|
|
107430
|
+
if (carrier !== void 0) {
|
|
107431
|
+
_payload[`carrier`] = carrier;
|
|
107432
|
+
}
|
|
107433
|
+
if (code !== void 0) {
|
|
107434
|
+
_payload[`code`] = code;
|
|
107435
|
+
}
|
|
107436
|
+
if (countries !== void 0) {
|
|
107437
|
+
_payload[`countries`] = countries;
|
|
107438
|
+
}
|
|
107439
|
+
if (currency !== void 0) {
|
|
107440
|
+
_payload[`currency`] = currency;
|
|
107441
|
+
}
|
|
107442
|
+
if (description2 !== void 0) {
|
|
107443
|
+
_payload[`description`] = description2;
|
|
107444
|
+
}
|
|
107445
|
+
if (enabled !== void 0) {
|
|
107446
|
+
_payload[`enabled`] = enabled;
|
|
107447
|
+
}
|
|
107448
|
+
if (eta_days_max !== void 0) {
|
|
107449
|
+
_payload[`eta_days_max`] = eta_days_max;
|
|
107450
|
+
}
|
|
107451
|
+
if (eta_days_min !== void 0) {
|
|
107452
|
+
_payload[`eta_days_min`] = eta_days_min;
|
|
107453
|
+
}
|
|
107454
|
+
if (free_above !== void 0) {
|
|
107455
|
+
_payload[`free_above`] = free_above;
|
|
107456
|
+
}
|
|
107457
|
+
if (labels !== void 0) {
|
|
107458
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
107459
|
+
}
|
|
107460
|
+
if (matrix_attribute !== void 0) {
|
|
107461
|
+
_payload[`matrix_attribute`] = matrix_attribute;
|
|
107462
|
+
}
|
|
107463
|
+
if (matrix_basis !== void 0) {
|
|
107464
|
+
_payload[`matrix_basis`] = matrix_basis;
|
|
107465
|
+
}
|
|
107466
|
+
if (metadata !== void 0) {
|
|
107467
|
+
_payload[`metadata`] = JSON.parse(metadata);
|
|
107468
|
+
}
|
|
107469
|
+
if (name !== void 0) {
|
|
107470
|
+
_payload[`name`] = name;
|
|
107471
|
+
}
|
|
107472
|
+
if (position !== void 0) {
|
|
107473
|
+
_payload[`position`] = position;
|
|
107474
|
+
}
|
|
107475
|
+
if (price !== void 0) {
|
|
107476
|
+
_payload[`price`] = price;
|
|
107477
|
+
}
|
|
107478
|
+
if (pricing_type !== void 0) {
|
|
107479
|
+
_payload[`pricing_type`] = pricing_type;
|
|
107480
|
+
}
|
|
105415
107481
|
const _headers = {
|
|
105416
107482
|
"content-type": "application/json"
|
|
105417
107483
|
};
|
|
@@ -105482,12 +107548,67 @@ shipping.command(`shipping-methods-get`).description(``).requiredOption(`--id <i
|
|
|
105482
107548
|
}
|
|
105483
107549
|
)
|
|
105484
107550
|
);
|
|
105485
|
-
shipping.command(`shipping-methods-update`).description(``).requiredOption(`--id <id>`, ``).
|
|
107551
|
+
shipping.command(`shipping-methods-update`).description(``).requiredOption(`--id <id>`, ``).option(`--carrier <carrier>`, `Carrier anchor for the upcoming carrier connect (dynamic rates, tracking links).`).option(`--code <code>`, `Stable method code, unique per tenant (e.g. standard, express).`).option(`--countries [countries...]`, `Allowed ISO 3166-1 alpha-2 codes; null or empty = worldwide.`).option(`--currency <currency>`, `ISO 4217 code (default EUR).`).option(`--description <description>`, ``).option(
|
|
107552
|
+
`--enabled [value]`,
|
|
107553
|
+
`Only enabled methods appear in rate responses (default false).`,
|
|
107554
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
107555
|
+
).option(`--eta-_days-_max <eta-_days-_max>`, `Delivery-time estimate for the checkout (days, upper bound).`, parseInteger).option(`--eta-_days-_min <eta-_days-_min>`, `Delivery-time estimate for the checkout (days, lower bound).`, parseInteger).option(`--free-_above <free-_above>`, `Free shipping at or above this order value \u2014 wins over every pricing model.`, parseInteger).option(`--labels <labels>`, `Localized display names keyed by locale (e.g. {de, en}).`).option(`--matrix-_attribute <matrix-_attribute>`, `Attribute name for matrix_basis 'attribute'.`).option(`--matrix-_basis <matrix-_basis>`, `The measure a matrix method prices over; 'attribute' reads matrix_attribute from the rate request.`).option(`--metadata <metadata>`, `Free-form metadata.`).option(`--name <name>`, `Display name.`).option(`--position <position>`, `Sort order in the checkout (default 0).`, parseInteger).option(`--price <price>`, `The fixed price (default 0) \u2014 ignored for 'free' and 'matrix'.`, parseInteger).option(`--pricing-_type <pricing-_type>`, `Pricing model (default 'fixed'): one price, no price, or tiered over a measure.`).action(
|
|
105486
107556
|
actionRunner(
|
|
105487
|
-
async ({ id }) => {
|
|
107557
|
+
async ({ id, carrier, code, countries, currency, description: description2, enabled, eta_days_max, eta_days_min, free_above, labels, matrix_attribute, matrix_basis, metadata, name, position, price, pricing_type }) => {
|
|
105488
107558
|
const _client = await sdkForProject();
|
|
105489
107559
|
const _apiPath = `/shipping/methods/{id}`.replace(`{id}`, id);
|
|
105490
107560
|
const _payload = {};
|
|
107561
|
+
if (carrier !== void 0) {
|
|
107562
|
+
_payload[`carrier`] = carrier;
|
|
107563
|
+
}
|
|
107564
|
+
if (code !== void 0) {
|
|
107565
|
+
_payload[`code`] = code;
|
|
107566
|
+
}
|
|
107567
|
+
if (countries !== void 0) {
|
|
107568
|
+
_payload[`countries`] = countries;
|
|
107569
|
+
}
|
|
107570
|
+
if (currency !== void 0) {
|
|
107571
|
+
_payload[`currency`] = currency;
|
|
107572
|
+
}
|
|
107573
|
+
if (description2 !== void 0) {
|
|
107574
|
+
_payload[`description`] = description2;
|
|
107575
|
+
}
|
|
107576
|
+
if (enabled !== void 0) {
|
|
107577
|
+
_payload[`enabled`] = enabled;
|
|
107578
|
+
}
|
|
107579
|
+
if (eta_days_max !== void 0) {
|
|
107580
|
+
_payload[`eta_days_max`] = eta_days_max;
|
|
107581
|
+
}
|
|
107582
|
+
if (eta_days_min !== void 0) {
|
|
107583
|
+
_payload[`eta_days_min`] = eta_days_min;
|
|
107584
|
+
}
|
|
107585
|
+
if (free_above !== void 0) {
|
|
107586
|
+
_payload[`free_above`] = free_above;
|
|
107587
|
+
}
|
|
107588
|
+
if (labels !== void 0) {
|
|
107589
|
+
_payload[`labels`] = JSON.parse(labels);
|
|
107590
|
+
}
|
|
107591
|
+
if (matrix_attribute !== void 0) {
|
|
107592
|
+
_payload[`matrix_attribute`] = matrix_attribute;
|
|
107593
|
+
}
|
|
107594
|
+
if (matrix_basis !== void 0) {
|
|
107595
|
+
_payload[`matrix_basis`] = matrix_basis;
|
|
107596
|
+
}
|
|
107597
|
+
if (metadata !== void 0) {
|
|
107598
|
+
_payload[`metadata`] = JSON.parse(metadata);
|
|
107599
|
+
}
|
|
107600
|
+
if (name !== void 0) {
|
|
107601
|
+
_payload[`name`] = name;
|
|
107602
|
+
}
|
|
107603
|
+
if (position !== void 0) {
|
|
107604
|
+
_payload[`position`] = position;
|
|
107605
|
+
}
|
|
107606
|
+
if (price !== void 0) {
|
|
107607
|
+
_payload[`price`] = price;
|
|
107608
|
+
}
|
|
107609
|
+
if (pricing_type !== void 0) {
|
|
107610
|
+
_payload[`pricing_type`] = pricing_type;
|
|
107611
|
+
}
|
|
105491
107612
|
const _headers = {
|
|
105492
107613
|
"content-type": "application/json"
|
|
105493
107614
|
};
|
|
@@ -105520,12 +107641,21 @@ shipping.command(`shipping-tiers-list`).description(``).requiredOption(`--method
|
|
|
105520
107641
|
}
|
|
105521
107642
|
)
|
|
105522
107643
|
);
|
|
105523
|
-
shipping.command(`shipping-tiers-create`).description(``).requiredOption(`--method-_id <method-_id>`, ``).action(
|
|
107644
|
+
shipping.command(`shipping-tiers-create`).description(``).requiredOption(`--method-_id <method-_id>`, ``).option(`--from-_value <from-_value>`, `Tier threshold (default 0) \u2014 the tier with the highest from_value at or below the measured value wins.`, parseInteger).option(`--position <position>`, `Sort order (default 0; bulk replace derives it from the array index).`, parseInteger).option(`--price <price>`, `Price of this tier (default 0).`, parseInteger).action(
|
|
105524
107645
|
actionRunner(
|
|
105525
|
-
async ({ method_id }) => {
|
|
107646
|
+
async ({ method_id, from_value, position, price }) => {
|
|
105526
107647
|
const _client = await sdkForProject();
|
|
105527
107648
|
const _apiPath = `/shipping/methods/{method_id}/tiers`.replace(`{method_id}`, method_id);
|
|
105528
107649
|
const _payload = {};
|
|
107650
|
+
if (from_value !== void 0) {
|
|
107651
|
+
_payload[`from_value`] = from_value;
|
|
107652
|
+
}
|
|
107653
|
+
if (position !== void 0) {
|
|
107654
|
+
_payload[`position`] = position;
|
|
107655
|
+
}
|
|
107656
|
+
if (price !== void 0) {
|
|
107657
|
+
_payload[`price`] = price;
|
|
107658
|
+
}
|
|
105529
107659
|
const _headers = {
|
|
105530
107660
|
"content-type": "application/json"
|
|
105531
107661
|
};
|
|
@@ -105539,12 +107669,15 @@ shipping.command(`shipping-tiers-create`).description(``).requiredOption(`--meth
|
|
|
105539
107669
|
}
|
|
105540
107670
|
)
|
|
105541
107671
|
);
|
|
105542
|
-
shipping.command(`shipping-tiers-replace`).description(``).requiredOption(`--method-_id <method-_id>`, ``).action(
|
|
107672
|
+
shipping.command(`shipping-tiers-replace`).description(``).requiredOption(`--method-_id <method-_id>`, ``).requiredOption(`--tiers [tiers...]`, `The complete new tier set (set semantics) \u2014 positions are derived from the array order.`).action(
|
|
105543
107673
|
actionRunner(
|
|
105544
|
-
async ({ method_id }) => {
|
|
107674
|
+
async ({ method_id, tiers }) => {
|
|
105545
107675
|
const _client = await sdkForProject();
|
|
105546
107676
|
const _apiPath = `/shipping/methods/{method_id}/tiers`.replace(`{method_id}`, method_id);
|
|
105547
107677
|
const _payload = {};
|
|
107678
|
+
if (tiers !== void 0) {
|
|
107679
|
+
_payload[`tiers`] = tiers;
|
|
107680
|
+
}
|
|
105548
107681
|
const _headers = {
|
|
105549
107682
|
"content-type": "application/json"
|
|
105550
107683
|
};
|
|
@@ -105596,12 +107729,21 @@ shipping.command(`shipping-tiers-get`).description(``).requiredOption(`--method-
|
|
|
105596
107729
|
}
|
|
105597
107730
|
)
|
|
105598
107731
|
);
|
|
105599
|
-
shipping.command(`shipping-tiers-update`).description(``).requiredOption(`--method-_id <method-_id>`, ``).requiredOption(`--id <id>`, ``).action(
|
|
107732
|
+
shipping.command(`shipping-tiers-update`).description(``).requiredOption(`--method-_id <method-_id>`, ``).requiredOption(`--id <id>`, ``).option(`--from-_value <from-_value>`, `Tier threshold (default 0) \u2014 the tier with the highest from_value at or below the measured value wins.`, parseInteger).option(`--position <position>`, `Sort order (default 0; bulk replace derives it from the array index).`, parseInteger).option(`--price <price>`, `Price of this tier (default 0).`, parseInteger).action(
|
|
105600
107733
|
actionRunner(
|
|
105601
|
-
async ({ method_id, id }) => {
|
|
107734
|
+
async ({ method_id, id, from_value, position, price }) => {
|
|
105602
107735
|
const _client = await sdkForProject();
|
|
105603
107736
|
const _apiPath = `/shipping/methods/{method_id}/tiers/{id}`.replace(`{method_id}`, method_id).replace(`{id}`, id);
|
|
105604
107737
|
const _payload = {};
|
|
107738
|
+
if (from_value !== void 0) {
|
|
107739
|
+
_payload[`from_value`] = from_value;
|
|
107740
|
+
}
|
|
107741
|
+
if (position !== void 0) {
|
|
107742
|
+
_payload[`position`] = position;
|
|
107743
|
+
}
|
|
107744
|
+
if (price !== void 0) {
|
|
107745
|
+
_payload[`price`] = price;
|
|
107746
|
+
}
|
|
105605
107747
|
const _headers = {
|
|
105606
107748
|
"content-type": "application/json"
|
|
105607
107749
|
};
|
|
@@ -105615,12 +107757,30 @@ shipping.command(`shipping-tiers-update`).description(``).requiredOption(`--meth
|
|
|
105615
107757
|
}
|
|
105616
107758
|
)
|
|
105617
107759
|
);
|
|
105618
|
-
shipping.command(`shipping-rates`).description(``).action(
|
|
107760
|
+
shipping.command(`shipping-rates`).description(``).option(`--attributes <attributes>`, `Measure values for attribute matrices, keyed by attribute name.`).option(`--country <country>`, `Destination ISO 3166-1 alpha-2 code \u2014 checked against method country restrictions.`).option(`--currency <currency>`, `Echoed into the rates (default 'EUR').`).option(`--order-_value <order-_value>`, `Order value (default 0) \u2014 drives free-above thresholds and order_value matrices.`, parseInteger).option(`--quantity <quantity>`, `Total quantity \u2014 measure for quantity matrices.`, parseInteger).option(`--weight <weight>`, `Total weight \u2014 measure for weight matrices.`, parseInteger).action(
|
|
105619
107761
|
actionRunner(
|
|
105620
|
-
async () => {
|
|
107762
|
+
async ({ attributes, country, currency, order_value, quantity, weight }) => {
|
|
105621
107763
|
const _client = await sdkForProject();
|
|
105622
107764
|
const _apiPath = `/shipping/rates`;
|
|
105623
107765
|
const _payload = {};
|
|
107766
|
+
if (attributes !== void 0) {
|
|
107767
|
+
_payload[`attributes`] = JSON.parse(attributes);
|
|
107768
|
+
}
|
|
107769
|
+
if (country !== void 0) {
|
|
107770
|
+
_payload[`country`] = country;
|
|
107771
|
+
}
|
|
107772
|
+
if (currency !== void 0) {
|
|
107773
|
+
_payload[`currency`] = currency;
|
|
107774
|
+
}
|
|
107775
|
+
if (order_value !== void 0) {
|
|
107776
|
+
_payload[`order_value`] = order_value;
|
|
107777
|
+
}
|
|
107778
|
+
if (quantity !== void 0) {
|
|
107779
|
+
_payload[`quantity`] = quantity;
|
|
107780
|
+
}
|
|
107781
|
+
if (weight !== void 0) {
|
|
107782
|
+
_payload[`weight`] = weight;
|
|
107783
|
+
}
|
|
105624
107784
|
const _headers = {
|
|
105625
107785
|
"content-type": "application/json"
|
|
105626
107786
|
};
|
|
@@ -106933,7 +109093,7 @@ tokens.command(`tokens-update`).description(`Update a token by its unique ID. Us
|
|
|
106933
109093
|
// lib/commands/about.ts
|
|
106934
109094
|
var about = new Command("about").description("Show information about this CLI and how it was generated").action(() => {
|
|
106935
109095
|
log("name: Revenexx CLI");
|
|
106936
|
-
log("version: 0.0.
|
|
109096
|
+
log("version: 0.0.4");
|
|
106937
109097
|
log("language: cli");
|
|
106938
109098
|
log("generator: revenexx/sdk-generator");
|
|
106939
109099
|
log("generatorUrl: https://github.com/revenexx/sdk-generator");
|