@revenexx/sdk 0.0.9 → 0.0.11
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/dist/cjs/sdk.js +1051 -49
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +1050 -50
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +1051 -49
- package/package.json +1 -1
- package/src/client.ts +30 -1
- package/src/enums/order-fulfillment-status.ts +5 -0
- package/src/enums/order-status.ts +7 -0
- package/src/index.ts +3 -1
- package/src/services/carts.ts +65 -2
- package/src/services/customers.ts +57 -1
- package/src/services/inventories.ts +5 -5
- package/src/services/orderlists.ts +66 -3
- package/src/services/orders.ts +23 -21
- package/src/services/prices.ts +3 -3
- package/src/services/products.ts +688 -16
- package/src/services/search.ts +1 -1
- package/src/services/shipping.ts +1 -1
- package/types/client.d.ts +11 -0
- package/types/enums/order-fulfillment-status.d.ts +5 -0
- package/types/enums/order-status.d.ts +7 -0
- package/types/index.d.ts +3 -1
- package/types/services/carts.d.ts +27 -1
- package/types/services/customers.d.ts +24 -1
- package/types/services/orderlists.d.ts +27 -1
- package/types/services/orders.d.ts +13 -11
- package/types/services/products.d.ts +288 -16
package/dist/esm/sdk.js
CHANGED
|
@@ -651,7 +651,7 @@ class Client {
|
|
|
651
651
|
'x-sdk-name': 'Revenexx Web',
|
|
652
652
|
'x-sdk-platform': '',
|
|
653
653
|
'x-sdk-language': 'web',
|
|
654
|
-
'x-sdk-version': '0.0.
|
|
654
|
+
'x-sdk-version': '0.0.11'
|
|
655
655
|
};
|
|
656
656
|
|
|
657
657
|
/**
|
|
@@ -1131,6 +1131,29 @@ class Client {
|
|
|
1131
1131
|
}
|
|
1132
1132
|
return data;
|
|
1133
1133
|
}
|
|
1134
|
+
|
|
1135
|
+
/**
|
|
1136
|
+
* Recursively renames an argument's DECLARED keys to their snake_case wire
|
|
1137
|
+
* names, using a map generated from the API contract. Free-form subtrees
|
|
1138
|
+
* (metadata / user_data — keys absent from the map, with no `children`) are
|
|
1139
|
+
* passed through untouched, so user data is never mangled. For arrays the
|
|
1140
|
+
* same element map is applied to every item.
|
|
1141
|
+
*/
|
|
1142
|
+
static toWireKeys(value, map) {
|
|
1143
|
+
if (Array.isArray(value)) {
|
|
1144
|
+
return value.map(item => Client.toWireKeys(item, map));
|
|
1145
|
+
}
|
|
1146
|
+
if (value === null || typeof value !== 'object' || value instanceof File || value instanceof Blob || value instanceof Date) {
|
|
1147
|
+
return value;
|
|
1148
|
+
}
|
|
1149
|
+
const output = {};
|
|
1150
|
+
for (const [key, item] of Object.entries(value)) {
|
|
1151
|
+
const entry = map[key];
|
|
1152
|
+
const wireKey = entry ? entry.wire : key;
|
|
1153
|
+
output[wireKey] = entry && entry.children ? Client.toWireKeys(item, entry.children) : item;
|
|
1154
|
+
}
|
|
1155
|
+
return output;
|
|
1156
|
+
}
|
|
1134
1157
|
static flatten(data, prefix = '') {
|
|
1135
1158
|
let output = {};
|
|
1136
1159
|
for (const [key, value] of Object.entries(data)) {
|
|
@@ -3737,12 +3760,69 @@ class Carts {
|
|
|
3737
3760
|
|
|
3738
3761
|
/**
|
|
3739
3762
|
*
|
|
3763
|
+
* @param {string} params.contactId - Filter to one owning contact.
|
|
3764
|
+
* @param {string} params.sessionKey - Filter to one guest session.
|
|
3765
|
+
* @param {string} params.status - Filter by cart status (e.g. active).
|
|
3766
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
3767
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
3768
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
3769
|
+
* @throws {RevenexxException}
|
|
3770
|
+
* @returns {Promise<{}>}
|
|
3771
|
+
*/
|
|
3772
|
+
|
|
3773
|
+
/**
|
|
3774
|
+
*
|
|
3775
|
+
* @param {string} contactId - Filter to one owning contact.
|
|
3776
|
+
* @param {string} sessionKey - Filter to one guest session.
|
|
3777
|
+
* @param {string} status - Filter by cart status (e.g. active).
|
|
3778
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
3779
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
3780
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
3740
3781
|
* @throws {RevenexxException}
|
|
3741
3782
|
* @returns {Promise<{}>}
|
|
3783
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3742
3784
|
*/
|
|
3743
|
-
|
|
3785
|
+
|
|
3786
|
+
cartsList(paramsOrFirst, ...rest) {
|
|
3787
|
+
let params;
|
|
3788
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
3789
|
+
params = paramsOrFirst || {};
|
|
3790
|
+
} else {
|
|
3791
|
+
params = {
|
|
3792
|
+
contactId: paramsOrFirst,
|
|
3793
|
+
sessionKey: rest[0],
|
|
3794
|
+
status: rest[1],
|
|
3795
|
+
limit: rest[2],
|
|
3796
|
+
offset: rest[3],
|
|
3797
|
+
order: rest[4]
|
|
3798
|
+
};
|
|
3799
|
+
}
|
|
3800
|
+
const contactId = params.contactId;
|
|
3801
|
+
const sessionKey = params.sessionKey;
|
|
3802
|
+
const status = params.status;
|
|
3803
|
+
const limit = params.limit;
|
|
3804
|
+
const offset = params.offset;
|
|
3805
|
+
const order = params.order;
|
|
3744
3806
|
const apiPath = '/v1/carts';
|
|
3745
3807
|
const apiPayload = {};
|
|
3808
|
+
if (typeof contactId !== 'undefined') {
|
|
3809
|
+
apiPayload['contact_id'] = contactId;
|
|
3810
|
+
}
|
|
3811
|
+
if (typeof sessionKey !== 'undefined') {
|
|
3812
|
+
apiPayload['session_key'] = sessionKey;
|
|
3813
|
+
}
|
|
3814
|
+
if (typeof status !== 'undefined') {
|
|
3815
|
+
apiPayload['status'] = status;
|
|
3816
|
+
}
|
|
3817
|
+
if (typeof limit !== 'undefined') {
|
|
3818
|
+
apiPayload['limit'] = limit;
|
|
3819
|
+
}
|
|
3820
|
+
if (typeof offset !== 'undefined') {
|
|
3821
|
+
apiPayload['offset'] = offset;
|
|
3822
|
+
}
|
|
3823
|
+
if (typeof order !== 'undefined') {
|
|
3824
|
+
apiPayload['order'] = order;
|
|
3825
|
+
}
|
|
3746
3826
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3747
3827
|
const apiHeaders = {};
|
|
3748
3828
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -4502,7 +4582,20 @@ class Carts {
|
|
|
4502
4582
|
const apiPath = '/v1/carts/{cart_id}/items'.replace('{cart_id}', cartId);
|
|
4503
4583
|
const apiPayload = {};
|
|
4504
4584
|
if (typeof items !== 'undefined') {
|
|
4505
|
-
apiPayload['items'] = items
|
|
4585
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
4586
|
+
"productId": {
|
|
4587
|
+
"wire": "product_id",
|
|
4588
|
+
"children": null
|
|
4589
|
+
},
|
|
4590
|
+
"taxRate": {
|
|
4591
|
+
"wire": "tax_rate",
|
|
4592
|
+
"children": null
|
|
4593
|
+
},
|
|
4594
|
+
"unitPrice": {
|
|
4595
|
+
"wire": "unit_price",
|
|
4596
|
+
"children": null
|
|
4597
|
+
}
|
|
4598
|
+
});
|
|
4506
4599
|
}
|
|
4507
4600
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4508
4601
|
const apiHeaders = {
|
|
@@ -5355,12 +5448,62 @@ class Customers {
|
|
|
5355
5448
|
|
|
5356
5449
|
/**
|
|
5357
5450
|
*
|
|
5451
|
+
* @param {string} params.contactId - Filter to one owning contact.
|
|
5452
|
+
* @param {string} params.organizationId - Filter to one organization.
|
|
5453
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
5454
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
5455
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
5456
|
+
* @throws {RevenexxException}
|
|
5457
|
+
* @returns {Promise<{}>}
|
|
5458
|
+
*/
|
|
5459
|
+
|
|
5460
|
+
/**
|
|
5461
|
+
*
|
|
5462
|
+
* @param {string} contactId - Filter to one owning contact.
|
|
5463
|
+
* @param {string} organizationId - Filter to one organization.
|
|
5464
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
5465
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
5466
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
5358
5467
|
* @throws {RevenexxException}
|
|
5359
5468
|
* @returns {Promise<{}>}
|
|
5469
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
5360
5470
|
*/
|
|
5361
|
-
|
|
5471
|
+
|
|
5472
|
+
customersAddressesList(paramsOrFirst, ...rest) {
|
|
5473
|
+
let params;
|
|
5474
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
5475
|
+
params = paramsOrFirst || {};
|
|
5476
|
+
} else {
|
|
5477
|
+
params = {
|
|
5478
|
+
contactId: paramsOrFirst,
|
|
5479
|
+
organizationId: rest[0],
|
|
5480
|
+
limit: rest[1],
|
|
5481
|
+
offset: rest[2],
|
|
5482
|
+
order: rest[3]
|
|
5483
|
+
};
|
|
5484
|
+
}
|
|
5485
|
+
const contactId = params.contactId;
|
|
5486
|
+
const organizationId = params.organizationId;
|
|
5487
|
+
const limit = params.limit;
|
|
5488
|
+
const offset = params.offset;
|
|
5489
|
+
const order = params.order;
|
|
5362
5490
|
const apiPath = '/v1/customers/addresses';
|
|
5363
5491
|
const apiPayload = {};
|
|
5492
|
+
if (typeof contactId !== 'undefined') {
|
|
5493
|
+
apiPayload['contact_id'] = contactId;
|
|
5494
|
+
}
|
|
5495
|
+
if (typeof organizationId !== 'undefined') {
|
|
5496
|
+
apiPayload['organization_id'] = organizationId;
|
|
5497
|
+
}
|
|
5498
|
+
if (typeof limit !== 'undefined') {
|
|
5499
|
+
apiPayload['limit'] = limit;
|
|
5500
|
+
}
|
|
5501
|
+
if (typeof offset !== 'undefined') {
|
|
5502
|
+
apiPayload['offset'] = offset;
|
|
5503
|
+
}
|
|
5504
|
+
if (typeof order !== 'undefined') {
|
|
5505
|
+
apiPayload['order'] = order;
|
|
5506
|
+
}
|
|
5364
5507
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5365
5508
|
const apiHeaders = {};
|
|
5366
5509
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -6791,7 +6934,12 @@ class Inventories {
|
|
|
6791
6934
|
const apiPath = '/v1/inventories/adjust';
|
|
6792
6935
|
const apiPayload = {};
|
|
6793
6936
|
if (typeof items !== 'undefined') {
|
|
6794
|
-
apiPayload['items'] = items
|
|
6937
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
6938
|
+
"productId": {
|
|
6939
|
+
"wire": "product_id",
|
|
6940
|
+
"children": null
|
|
6941
|
+
}
|
|
6942
|
+
});
|
|
6795
6943
|
}
|
|
6796
6944
|
if (typeof locationCode !== 'undefined') {
|
|
6797
6945
|
apiPayload['location_code'] = locationCode;
|
|
@@ -6841,7 +6989,12 @@ class Inventories {
|
|
|
6841
6989
|
const apiPath = '/v1/inventories/availability';
|
|
6842
6990
|
const apiPayload = {};
|
|
6843
6991
|
if (typeof items !== 'undefined') {
|
|
6844
|
-
apiPayload['items'] = items
|
|
6992
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
6993
|
+
"productId": {
|
|
6994
|
+
"wire": "product_id",
|
|
6995
|
+
"children": null
|
|
6996
|
+
}
|
|
6997
|
+
});
|
|
6845
6998
|
}
|
|
6846
6999
|
if (typeof locationCode !== 'undefined') {
|
|
6847
7000
|
apiPayload['location_code'] = locationCode;
|
|
@@ -7261,7 +7414,12 @@ class Inventories {
|
|
|
7261
7414
|
const apiPath = '/v1/inventories/receive';
|
|
7262
7415
|
const apiPayload = {};
|
|
7263
7416
|
if (typeof items !== 'undefined') {
|
|
7264
|
-
apiPayload['items'] = items
|
|
7417
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
7418
|
+
"productId": {
|
|
7419
|
+
"wire": "product_id",
|
|
7420
|
+
"children": null
|
|
7421
|
+
}
|
|
7422
|
+
});
|
|
7265
7423
|
}
|
|
7266
7424
|
if (typeof locationCode !== 'undefined') {
|
|
7267
7425
|
apiPayload['location_code'] = locationCode;
|
|
@@ -7409,7 +7567,12 @@ class Inventories {
|
|
|
7409
7567
|
apiPayload['expires_at'] = expiresAt;
|
|
7410
7568
|
}
|
|
7411
7569
|
if (typeof items !== 'undefined') {
|
|
7412
|
-
apiPayload['items'] = items
|
|
7570
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
7571
|
+
"productId": {
|
|
7572
|
+
"wire": "product_id",
|
|
7573
|
+
"children": null
|
|
7574
|
+
}
|
|
7575
|
+
});
|
|
7413
7576
|
}
|
|
7414
7577
|
if (typeof orderRef !== 'undefined') {
|
|
7415
7578
|
apiPayload['order_ref'] = orderRef;
|
|
@@ -7464,7 +7627,12 @@ class Inventories {
|
|
|
7464
7627
|
const apiPath = '/v1/inventories/restock';
|
|
7465
7628
|
const apiPayload = {};
|
|
7466
7629
|
if (typeof items !== 'undefined') {
|
|
7467
|
-
apiPayload['items'] = items
|
|
7630
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
7631
|
+
"productId": {
|
|
7632
|
+
"wire": "product_id",
|
|
7633
|
+
"children": null
|
|
7634
|
+
}
|
|
7635
|
+
});
|
|
7468
7636
|
}
|
|
7469
7637
|
if (typeof locationCode !== 'undefined') {
|
|
7470
7638
|
apiPayload['location_code'] = locationCode;
|
|
@@ -11859,12 +12027,69 @@ class Orderlists {
|
|
|
11859
12027
|
|
|
11860
12028
|
/**
|
|
11861
12029
|
*
|
|
12030
|
+
* @param {string} params.ownerId - Filter to one owning contact.
|
|
12031
|
+
* @param {string} params.organizationId - Filter to one organization.
|
|
12032
|
+
* @param {string} params.kind - Filter by list kind (shopping | label).
|
|
12033
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
12034
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
12035
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
12036
|
+
* @throws {RevenexxException}
|
|
12037
|
+
* @returns {Promise<{}>}
|
|
12038
|
+
*/
|
|
12039
|
+
|
|
12040
|
+
/**
|
|
12041
|
+
*
|
|
12042
|
+
* @param {string} ownerId - Filter to one owning contact.
|
|
12043
|
+
* @param {string} organizationId - Filter to one organization.
|
|
12044
|
+
* @param {string} kind - Filter by list kind (shopping | label).
|
|
12045
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
12046
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
12047
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
11862
12048
|
* @throws {RevenexxException}
|
|
11863
12049
|
* @returns {Promise<{}>}
|
|
12050
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
11864
12051
|
*/
|
|
11865
|
-
|
|
12052
|
+
|
|
12053
|
+
orderlistsList(paramsOrFirst, ...rest) {
|
|
12054
|
+
let params;
|
|
12055
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
12056
|
+
params = paramsOrFirst || {};
|
|
12057
|
+
} else {
|
|
12058
|
+
params = {
|
|
12059
|
+
ownerId: paramsOrFirst,
|
|
12060
|
+
organizationId: rest[0],
|
|
12061
|
+
kind: rest[1],
|
|
12062
|
+
limit: rest[2],
|
|
12063
|
+
offset: rest[3],
|
|
12064
|
+
order: rest[4]
|
|
12065
|
+
};
|
|
12066
|
+
}
|
|
12067
|
+
const ownerId = params.ownerId;
|
|
12068
|
+
const organizationId = params.organizationId;
|
|
12069
|
+
const kind = params.kind;
|
|
12070
|
+
const limit = params.limit;
|
|
12071
|
+
const offset = params.offset;
|
|
12072
|
+
const order = params.order;
|
|
11866
12073
|
const apiPath = '/v1/orderlists';
|
|
11867
12074
|
const apiPayload = {};
|
|
12075
|
+
if (typeof ownerId !== 'undefined') {
|
|
12076
|
+
apiPayload['owner_id'] = ownerId;
|
|
12077
|
+
}
|
|
12078
|
+
if (typeof organizationId !== 'undefined') {
|
|
12079
|
+
apiPayload['organization_id'] = organizationId;
|
|
12080
|
+
}
|
|
12081
|
+
if (typeof kind !== 'undefined') {
|
|
12082
|
+
apiPayload['kind'] = kind;
|
|
12083
|
+
}
|
|
12084
|
+
if (typeof limit !== 'undefined') {
|
|
12085
|
+
apiPayload['limit'] = limit;
|
|
12086
|
+
}
|
|
12087
|
+
if (typeof offset !== 'undefined') {
|
|
12088
|
+
apiPayload['offset'] = offset;
|
|
12089
|
+
}
|
|
12090
|
+
if (typeof order !== 'undefined') {
|
|
12091
|
+
apiPayload['order'] = order;
|
|
12092
|
+
}
|
|
11868
12093
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11869
12094
|
const apiHeaders = {};
|
|
11870
12095
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -11935,7 +12160,36 @@ class Orderlists {
|
|
|
11935
12160
|
const apiPath = '/v1/orderlists';
|
|
11936
12161
|
const apiPayload = {};
|
|
11937
12162
|
if (typeof items !== 'undefined') {
|
|
11938
|
-
apiPayload['items'] = items
|
|
12163
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
12164
|
+
"categorySlug": {
|
|
12165
|
+
"wire": "category_slug",
|
|
12166
|
+
"children": null
|
|
12167
|
+
},
|
|
12168
|
+
"costCenterId": {
|
|
12169
|
+
"wire": "cost_center_id",
|
|
12170
|
+
"children": null
|
|
12171
|
+
},
|
|
12172
|
+
"customSku": {
|
|
12173
|
+
"wire": "custom_sku",
|
|
12174
|
+
"children": null
|
|
12175
|
+
},
|
|
12176
|
+
"positionTexts": {
|
|
12177
|
+
"wire": "position_texts",
|
|
12178
|
+
"children": null
|
|
12179
|
+
},
|
|
12180
|
+
"productId": {
|
|
12181
|
+
"wire": "product_id",
|
|
12182
|
+
"children": null
|
|
12183
|
+
},
|
|
12184
|
+
"subcategorySlug": {
|
|
12185
|
+
"wire": "subcategory_slug",
|
|
12186
|
+
"children": null
|
|
12187
|
+
},
|
|
12188
|
+
"taxRate": {
|
|
12189
|
+
"wire": "tax_rate",
|
|
12190
|
+
"children": null
|
|
12191
|
+
}
|
|
12192
|
+
});
|
|
11939
12193
|
}
|
|
11940
12194
|
if (typeof kind !== 'undefined') {
|
|
11941
12195
|
apiPayload['kind'] = kind;
|
|
@@ -12331,7 +12585,36 @@ class Orderlists {
|
|
|
12331
12585
|
const apiPath = '/v1/orderlists/{list_id}/items'.replace('{list_id}', listId);
|
|
12332
12586
|
const apiPayload = {};
|
|
12333
12587
|
if (typeof items !== 'undefined') {
|
|
12334
|
-
apiPayload['items'] = items
|
|
12588
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
12589
|
+
"categorySlug": {
|
|
12590
|
+
"wire": "category_slug",
|
|
12591
|
+
"children": null
|
|
12592
|
+
},
|
|
12593
|
+
"costCenterId": {
|
|
12594
|
+
"wire": "cost_center_id",
|
|
12595
|
+
"children": null
|
|
12596
|
+
},
|
|
12597
|
+
"customSku": {
|
|
12598
|
+
"wire": "custom_sku",
|
|
12599
|
+
"children": null
|
|
12600
|
+
},
|
|
12601
|
+
"positionTexts": {
|
|
12602
|
+
"wire": "position_texts",
|
|
12603
|
+
"children": null
|
|
12604
|
+
},
|
|
12605
|
+
"productId": {
|
|
12606
|
+
"wire": "product_id",
|
|
12607
|
+
"children": null
|
|
12608
|
+
},
|
|
12609
|
+
"subcategorySlug": {
|
|
12610
|
+
"wire": "subcategory_slug",
|
|
12611
|
+
"children": null
|
|
12612
|
+
},
|
|
12613
|
+
"taxRate": {
|
|
12614
|
+
"wire": "tax_rate",
|
|
12615
|
+
"children": null
|
|
12616
|
+
}
|
|
12617
|
+
});
|
|
12335
12618
|
}
|
|
12336
12619
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12337
12620
|
const apiHeaders = {
|
|
@@ -12582,9 +12865,9 @@ class Orders {
|
|
|
12582
12865
|
|
|
12583
12866
|
/**
|
|
12584
12867
|
*
|
|
12585
|
-
* @param {
|
|
12586
|
-
* @param {
|
|
12587
|
-
* @param {
|
|
12868
|
+
* @param {OrderStatus} params.status - Filter by order status (exact match).
|
|
12869
|
+
* @param {OrderPaymentStatus} params.paymentStatus - Filter by payment status (exact match).
|
|
12870
|
+
* @param {OrderFulfillmentStatus} params.fulfillmentStatus - Filter by fulfillment status (exact match).
|
|
12588
12871
|
* @param {string} params.contactId - Filter to one ordering contact.
|
|
12589
12872
|
* @param {string} params.organizationId - Filter to one B2B organization.
|
|
12590
12873
|
* @param {string} params.channelId - Filter to one sales channel.
|
|
@@ -12599,9 +12882,9 @@ class Orders {
|
|
|
12599
12882
|
|
|
12600
12883
|
/**
|
|
12601
12884
|
*
|
|
12602
|
-
* @param {
|
|
12603
|
-
* @param {
|
|
12604
|
-
* @param {
|
|
12885
|
+
* @param {OrderStatus} status - Filter by order status (exact match).
|
|
12886
|
+
* @param {OrderPaymentStatus} paymentStatus - Filter by payment status (exact match).
|
|
12887
|
+
* @param {OrderFulfillmentStatus} fulfillmentStatus - Filter by fulfillment status (exact match).
|
|
12605
12888
|
* @param {string} contactId - Filter to one ordering contact.
|
|
12606
12889
|
* @param {string} organizationId - Filter to one B2B organization.
|
|
12607
12890
|
* @param {string} channelId - Filter to one sales channel.
|
|
@@ -12617,7 +12900,7 @@ class Orders {
|
|
|
12617
12900
|
|
|
12618
12901
|
ordersList(paramsOrFirst, ...rest) {
|
|
12619
12902
|
let params;
|
|
12620
|
-
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
12903
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('status' in paramsOrFirst || 'paymentStatus' in paramsOrFirst || 'fulfillmentStatus' in paramsOrFirst || 'contactId' in paramsOrFirst || 'organizationId' in paramsOrFirst || 'channelId' in paramsOrFirst || 'marketId' in paramsOrFirst || 'number' in paramsOrFirst || 'limit' in paramsOrFirst || 'offset' in paramsOrFirst || 'order' in paramsOrFirst)) {
|
|
12621
12904
|
params = paramsOrFirst || {};
|
|
12622
12905
|
} else {
|
|
12623
12906
|
params = {
|
|
@@ -13096,7 +13379,36 @@ class Orders {
|
|
|
13096
13379
|
apiPayload['grand_total'] = grandTotal;
|
|
13097
13380
|
}
|
|
13098
13381
|
if (typeof items !== 'undefined') {
|
|
13099
|
-
apiPayload['items'] = items
|
|
13382
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
13383
|
+
"costCenter": {
|
|
13384
|
+
"wire": "cost_center",
|
|
13385
|
+
"children": null
|
|
13386
|
+
},
|
|
13387
|
+
"positionText": {
|
|
13388
|
+
"wire": "position_text",
|
|
13389
|
+
"children": null
|
|
13390
|
+
},
|
|
13391
|
+
"productId": {
|
|
13392
|
+
"wire": "product_id",
|
|
13393
|
+
"children": null
|
|
13394
|
+
},
|
|
13395
|
+
"taxAmount": {
|
|
13396
|
+
"wire": "tax_amount",
|
|
13397
|
+
"children": null
|
|
13398
|
+
},
|
|
13399
|
+
"taxRate": {
|
|
13400
|
+
"wire": "tax_rate",
|
|
13401
|
+
"children": null
|
|
13402
|
+
},
|
|
13403
|
+
"unitPrice": {
|
|
13404
|
+
"wire": "unit_price",
|
|
13405
|
+
"children": null
|
|
13406
|
+
},
|
|
13407
|
+
"userData": {
|
|
13408
|
+
"wire": "user_data",
|
|
13409
|
+
"children": null
|
|
13410
|
+
}
|
|
13411
|
+
});
|
|
13100
13412
|
}
|
|
13101
13413
|
if (typeof marketId !== 'undefined') {
|
|
13102
13414
|
apiPayload['market_id'] = marketId;
|
|
@@ -13562,7 +13874,12 @@ class Orders {
|
|
|
13562
13874
|
apiPayload['cancelled_by'] = cancelledBy;
|
|
13563
13875
|
}
|
|
13564
13876
|
if (typeof positions !== 'undefined') {
|
|
13565
|
-
apiPayload['positions'] = positions
|
|
13877
|
+
apiPayload['positions'] = Client.toWireKeys(positions, {
|
|
13878
|
+
"orderItemId": {
|
|
13879
|
+
"wire": "order_item_id",
|
|
13880
|
+
"children": null
|
|
13881
|
+
}
|
|
13882
|
+
});
|
|
13566
13883
|
}
|
|
13567
13884
|
if (typeof reason !== 'undefined') {
|
|
13568
13885
|
apiPayload['reason'] = reason;
|
|
@@ -13677,7 +13994,12 @@ class Orders {
|
|
|
13677
13994
|
apiPayload['metadata'] = metadata;
|
|
13678
13995
|
}
|
|
13679
13996
|
if (typeof positions !== 'undefined') {
|
|
13680
|
-
apiPayload['positions'] = positions
|
|
13997
|
+
apiPayload['positions'] = Client.toWireKeys(positions, {
|
|
13998
|
+
"orderItemId": {
|
|
13999
|
+
"wire": "order_item_id",
|
|
14000
|
+
"children": null
|
|
14001
|
+
}
|
|
14002
|
+
});
|
|
13681
14003
|
}
|
|
13682
14004
|
if (typeof reason !== 'undefined') {
|
|
13683
14005
|
apiPayload['reason'] = reason;
|
|
@@ -13920,7 +14242,12 @@ class Orders {
|
|
|
13920
14242
|
apiPayload['number'] = number;
|
|
13921
14243
|
}
|
|
13922
14244
|
if (typeof positions !== 'undefined') {
|
|
13923
|
-
apiPayload['positions'] = positions
|
|
14245
|
+
apiPayload['positions'] = Client.toWireKeys(positions, {
|
|
14246
|
+
"orderItemId": {
|
|
14247
|
+
"wire": "order_item_id",
|
|
14248
|
+
"children": null
|
|
14249
|
+
}
|
|
14250
|
+
});
|
|
13924
14251
|
}
|
|
13925
14252
|
if (typeof shippedAt !== 'undefined') {
|
|
13926
14253
|
apiPayload['shipped_at'] = shippedAt;
|
|
@@ -17563,7 +17890,32 @@ class Prices {
|
|
|
17563
17890
|
const apiPath = '/v1/prices/lists/{list_id}/entries'.replace('{list_id}', listId);
|
|
17564
17891
|
const apiPayload = {};
|
|
17565
17892
|
if (typeof entries !== 'undefined') {
|
|
17566
|
-
apiPayload['entries'] = entries
|
|
17893
|
+
apiPayload['entries'] = Client.toWireKeys(entries, {
|
|
17894
|
+
"priceType": {
|
|
17895
|
+
"wire": "price_type",
|
|
17896
|
+
"children": null
|
|
17897
|
+
},
|
|
17898
|
+
"productId": {
|
|
17899
|
+
"wire": "product_id",
|
|
17900
|
+
"children": null
|
|
17901
|
+
},
|
|
17902
|
+
"quantityMin": {
|
|
17903
|
+
"wire": "quantity_min",
|
|
17904
|
+
"children": null
|
|
17905
|
+
},
|
|
17906
|
+
"unitPrice": {
|
|
17907
|
+
"wire": "unit_price",
|
|
17908
|
+
"children": null
|
|
17909
|
+
},
|
|
17910
|
+
"validFrom": {
|
|
17911
|
+
"wire": "valid_from",
|
|
17912
|
+
"children": null
|
|
17913
|
+
},
|
|
17914
|
+
"validUntil": {
|
|
17915
|
+
"wire": "valid_until",
|
|
17916
|
+
"children": null
|
|
17917
|
+
}
|
|
17918
|
+
});
|
|
17567
17919
|
}
|
|
17568
17920
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
17569
17921
|
const apiHeaders = {
|
|
@@ -17610,7 +17962,32 @@ class Prices {
|
|
|
17610
17962
|
const apiPath = '/v1/prices/lists/{list_id}/entries/bulk'.replace('{list_id}', listId);
|
|
17611
17963
|
const apiPayload = {};
|
|
17612
17964
|
if (typeof entries !== 'undefined') {
|
|
17613
|
-
apiPayload['entries'] = entries
|
|
17965
|
+
apiPayload['entries'] = Client.toWireKeys(entries, {
|
|
17966
|
+
"priceType": {
|
|
17967
|
+
"wire": "price_type",
|
|
17968
|
+
"children": null
|
|
17969
|
+
},
|
|
17970
|
+
"productId": {
|
|
17971
|
+
"wire": "product_id",
|
|
17972
|
+
"children": null
|
|
17973
|
+
},
|
|
17974
|
+
"quantityMin": {
|
|
17975
|
+
"wire": "quantity_min",
|
|
17976
|
+
"children": null
|
|
17977
|
+
},
|
|
17978
|
+
"unitPrice": {
|
|
17979
|
+
"wire": "unit_price",
|
|
17980
|
+
"children": null
|
|
17981
|
+
},
|
|
17982
|
+
"validFrom": {
|
|
17983
|
+
"wire": "valid_from",
|
|
17984
|
+
"children": null
|
|
17985
|
+
},
|
|
17986
|
+
"validUntil": {
|
|
17987
|
+
"wire": "valid_until",
|
|
17988
|
+
"children": null
|
|
17989
|
+
}
|
|
17990
|
+
});
|
|
17614
17991
|
}
|
|
17615
17992
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
17616
17993
|
const apiHeaders = {
|
|
@@ -17877,7 +18254,12 @@ class Prices {
|
|
|
17877
18254
|
apiPayload['currency'] = currency;
|
|
17878
18255
|
}
|
|
17879
18256
|
if (typeof items !== 'undefined') {
|
|
17880
|
-
apiPayload['items'] = items
|
|
18257
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
18258
|
+
"productId": {
|
|
18259
|
+
"wire": "product_id",
|
|
18260
|
+
"children": null
|
|
18261
|
+
}
|
|
18262
|
+
});
|
|
17881
18263
|
}
|
|
17882
18264
|
if (typeof marketId !== 'undefined') {
|
|
17883
18265
|
apiPayload['market_id'] = marketId;
|
|
@@ -17901,12 +18283,48 @@ class Products {
|
|
|
17901
18283
|
|
|
17902
18284
|
/**
|
|
17903
18285
|
*
|
|
18286
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
18287
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
18288
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
18289
|
+
* @throws {RevenexxException}
|
|
18290
|
+
* @returns {Promise<{}>}
|
|
18291
|
+
*/
|
|
18292
|
+
|
|
18293
|
+
/**
|
|
18294
|
+
*
|
|
18295
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
18296
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
18297
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
17904
18298
|
* @throws {RevenexxException}
|
|
17905
18299
|
* @returns {Promise<{}>}
|
|
18300
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
17906
18301
|
*/
|
|
17907
|
-
|
|
18302
|
+
|
|
18303
|
+
productsList(paramsOrFirst, ...rest) {
|
|
18304
|
+
let params;
|
|
18305
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
18306
|
+
params = paramsOrFirst || {};
|
|
18307
|
+
} else {
|
|
18308
|
+
params = {
|
|
18309
|
+
limit: paramsOrFirst,
|
|
18310
|
+
offset: rest[0],
|
|
18311
|
+
order: rest[1]
|
|
18312
|
+
};
|
|
18313
|
+
}
|
|
18314
|
+
const limit = params.limit;
|
|
18315
|
+
const offset = params.offset;
|
|
18316
|
+
const order = params.order;
|
|
17908
18317
|
const apiPath = '/v1/products';
|
|
17909
18318
|
const apiPayload = {};
|
|
18319
|
+
if (typeof limit !== 'undefined') {
|
|
18320
|
+
apiPayload['limit'] = limit;
|
|
18321
|
+
}
|
|
18322
|
+
if (typeof offset !== 'undefined') {
|
|
18323
|
+
apiPayload['offset'] = offset;
|
|
18324
|
+
}
|
|
18325
|
+
if (typeof order !== 'undefined') {
|
|
18326
|
+
apiPayload['order'] = order;
|
|
18327
|
+
}
|
|
17910
18328
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
17911
18329
|
const apiHeaders = {};
|
|
17912
18330
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -18024,12 +18442,48 @@ class Products {
|
|
|
18024
18442
|
|
|
18025
18443
|
/**
|
|
18026
18444
|
*
|
|
18445
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
18446
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
18447
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
18448
|
+
* @throws {RevenexxException}
|
|
18449
|
+
* @returns {Promise<{}>}
|
|
18450
|
+
*/
|
|
18451
|
+
|
|
18452
|
+
/**
|
|
18453
|
+
*
|
|
18454
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
18455
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
18456
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
18027
18457
|
* @throws {RevenexxException}
|
|
18028
18458
|
* @returns {Promise<{}>}
|
|
18459
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
18029
18460
|
*/
|
|
18030
|
-
|
|
18461
|
+
|
|
18462
|
+
productsAssetFamiliesList(paramsOrFirst, ...rest) {
|
|
18463
|
+
let params;
|
|
18464
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
18465
|
+
params = paramsOrFirst || {};
|
|
18466
|
+
} else {
|
|
18467
|
+
params = {
|
|
18468
|
+
limit: paramsOrFirst,
|
|
18469
|
+
offset: rest[0],
|
|
18470
|
+
order: rest[1]
|
|
18471
|
+
};
|
|
18472
|
+
}
|
|
18473
|
+
const limit = params.limit;
|
|
18474
|
+
const offset = params.offset;
|
|
18475
|
+
const order = params.order;
|
|
18031
18476
|
const apiPath = '/v1/products/asset_families';
|
|
18032
18477
|
const apiPayload = {};
|
|
18478
|
+
if (typeof limit !== 'undefined') {
|
|
18479
|
+
apiPayload['limit'] = limit;
|
|
18480
|
+
}
|
|
18481
|
+
if (typeof offset !== 'undefined') {
|
|
18482
|
+
apiPayload['offset'] = offset;
|
|
18483
|
+
}
|
|
18484
|
+
if (typeof order !== 'undefined') {
|
|
18485
|
+
apiPayload['order'] = order;
|
|
18486
|
+
}
|
|
18033
18487
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
18034
18488
|
const apiHeaders = {};
|
|
18035
18489
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -18219,12 +18673,48 @@ class Products {
|
|
|
18219
18673
|
|
|
18220
18674
|
/**
|
|
18221
18675
|
*
|
|
18676
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
18677
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
18678
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
18222
18679
|
* @throws {RevenexxException}
|
|
18223
18680
|
* @returns {Promise<{}>}
|
|
18224
18681
|
*/
|
|
18225
|
-
|
|
18226
|
-
|
|
18682
|
+
|
|
18683
|
+
/**
|
|
18684
|
+
*
|
|
18685
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
18686
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
18687
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
18688
|
+
* @throws {RevenexxException}
|
|
18689
|
+
* @returns {Promise<{}>}
|
|
18690
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
18691
|
+
*/
|
|
18692
|
+
|
|
18693
|
+
productsAssetsList(paramsOrFirst, ...rest) {
|
|
18694
|
+
let params;
|
|
18695
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
18696
|
+
params = paramsOrFirst || {};
|
|
18697
|
+
} else {
|
|
18698
|
+
params = {
|
|
18699
|
+
limit: paramsOrFirst,
|
|
18700
|
+
offset: rest[0],
|
|
18701
|
+
order: rest[1]
|
|
18702
|
+
};
|
|
18703
|
+
}
|
|
18704
|
+
const limit = params.limit;
|
|
18705
|
+
const offset = params.offset;
|
|
18706
|
+
const order = params.order;
|
|
18707
|
+
const apiPath = '/v1/products/assets';
|
|
18227
18708
|
const apiPayload = {};
|
|
18709
|
+
if (typeof limit !== 'undefined') {
|
|
18710
|
+
apiPayload['limit'] = limit;
|
|
18711
|
+
}
|
|
18712
|
+
if (typeof offset !== 'undefined') {
|
|
18713
|
+
apiPayload['offset'] = offset;
|
|
18714
|
+
}
|
|
18715
|
+
if (typeof order !== 'undefined') {
|
|
18716
|
+
apiPayload['order'] = order;
|
|
18717
|
+
}
|
|
18228
18718
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
18229
18719
|
const apiHeaders = {};
|
|
18230
18720
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -18431,12 +18921,48 @@ class Products {
|
|
|
18431
18921
|
|
|
18432
18922
|
/**
|
|
18433
18923
|
*
|
|
18924
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
18925
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
18926
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
18434
18927
|
* @throws {RevenexxException}
|
|
18435
18928
|
* @returns {Promise<{}>}
|
|
18436
18929
|
*/
|
|
18437
|
-
|
|
18930
|
+
|
|
18931
|
+
/**
|
|
18932
|
+
*
|
|
18933
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
18934
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
18935
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
18936
|
+
* @throws {RevenexxException}
|
|
18937
|
+
* @returns {Promise<{}>}
|
|
18938
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
18939
|
+
*/
|
|
18940
|
+
|
|
18941
|
+
productsAssociationTypesList(paramsOrFirst, ...rest) {
|
|
18942
|
+
let params;
|
|
18943
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
18944
|
+
params = paramsOrFirst || {};
|
|
18945
|
+
} else {
|
|
18946
|
+
params = {
|
|
18947
|
+
limit: paramsOrFirst,
|
|
18948
|
+
offset: rest[0],
|
|
18949
|
+
order: rest[1]
|
|
18950
|
+
};
|
|
18951
|
+
}
|
|
18952
|
+
const limit = params.limit;
|
|
18953
|
+
const offset = params.offset;
|
|
18954
|
+
const order = params.order;
|
|
18438
18955
|
const apiPath = '/v1/products/association_types';
|
|
18439
18956
|
const apiPayload = {};
|
|
18957
|
+
if (typeof limit !== 'undefined') {
|
|
18958
|
+
apiPayload['limit'] = limit;
|
|
18959
|
+
}
|
|
18960
|
+
if (typeof offset !== 'undefined') {
|
|
18961
|
+
apiPayload['offset'] = offset;
|
|
18962
|
+
}
|
|
18963
|
+
if (typeof order !== 'undefined') {
|
|
18964
|
+
apiPayload['order'] = order;
|
|
18965
|
+
}
|
|
18440
18966
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
18441
18967
|
const apiHeaders = {};
|
|
18442
18968
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -18640,12 +19166,48 @@ class Products {
|
|
|
18640
19166
|
|
|
18641
19167
|
/**
|
|
18642
19168
|
*
|
|
19169
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
19170
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
19171
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
19172
|
+
* @throws {RevenexxException}
|
|
19173
|
+
* @returns {Promise<{}>}
|
|
19174
|
+
*/
|
|
19175
|
+
|
|
19176
|
+
/**
|
|
19177
|
+
*
|
|
19178
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
19179
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
19180
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
18643
19181
|
* @throws {RevenexxException}
|
|
18644
19182
|
* @returns {Promise<{}>}
|
|
19183
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
18645
19184
|
*/
|
|
18646
|
-
|
|
19185
|
+
|
|
19186
|
+
productsAttributeGroupsList(paramsOrFirst, ...rest) {
|
|
19187
|
+
let params;
|
|
19188
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
19189
|
+
params = paramsOrFirst || {};
|
|
19190
|
+
} else {
|
|
19191
|
+
params = {
|
|
19192
|
+
limit: paramsOrFirst,
|
|
19193
|
+
offset: rest[0],
|
|
19194
|
+
order: rest[1]
|
|
19195
|
+
};
|
|
19196
|
+
}
|
|
19197
|
+
const limit = params.limit;
|
|
19198
|
+
const offset = params.offset;
|
|
19199
|
+
const order = params.order;
|
|
18647
19200
|
const apiPath = '/v1/products/attribute_groups';
|
|
18648
19201
|
const apiPayload = {};
|
|
19202
|
+
if (typeof limit !== 'undefined') {
|
|
19203
|
+
apiPayload['limit'] = limit;
|
|
19204
|
+
}
|
|
19205
|
+
if (typeof offset !== 'undefined') {
|
|
19206
|
+
apiPayload['offset'] = offset;
|
|
19207
|
+
}
|
|
19208
|
+
if (typeof order !== 'undefined') {
|
|
19209
|
+
apiPayload['order'] = order;
|
|
19210
|
+
}
|
|
18649
19211
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
18650
19212
|
const apiHeaders = {};
|
|
18651
19213
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -18835,12 +19397,48 @@ class Products {
|
|
|
18835
19397
|
|
|
18836
19398
|
/**
|
|
18837
19399
|
*
|
|
19400
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
19401
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
19402
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
18838
19403
|
* @throws {RevenexxException}
|
|
18839
19404
|
* @returns {Promise<{}>}
|
|
18840
19405
|
*/
|
|
18841
|
-
|
|
19406
|
+
|
|
19407
|
+
/**
|
|
19408
|
+
*
|
|
19409
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
19410
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
19411
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
19412
|
+
* @throws {RevenexxException}
|
|
19413
|
+
* @returns {Promise<{}>}
|
|
19414
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
19415
|
+
*/
|
|
19416
|
+
|
|
19417
|
+
productsAttributeOptionsList(paramsOrFirst, ...rest) {
|
|
19418
|
+
let params;
|
|
19419
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
19420
|
+
params = paramsOrFirst || {};
|
|
19421
|
+
} else {
|
|
19422
|
+
params = {
|
|
19423
|
+
limit: paramsOrFirst,
|
|
19424
|
+
offset: rest[0],
|
|
19425
|
+
order: rest[1]
|
|
19426
|
+
};
|
|
19427
|
+
}
|
|
19428
|
+
const limit = params.limit;
|
|
19429
|
+
const offset = params.offset;
|
|
19430
|
+
const order = params.order;
|
|
18842
19431
|
const apiPath = '/v1/products/attribute_options';
|
|
18843
19432
|
const apiPayload = {};
|
|
19433
|
+
if (typeof limit !== 'undefined') {
|
|
19434
|
+
apiPayload['limit'] = limit;
|
|
19435
|
+
}
|
|
19436
|
+
if (typeof offset !== 'undefined') {
|
|
19437
|
+
apiPayload['offset'] = offset;
|
|
19438
|
+
}
|
|
19439
|
+
if (typeof order !== 'undefined') {
|
|
19440
|
+
apiPayload['order'] = order;
|
|
19441
|
+
}
|
|
18844
19442
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
18845
19443
|
const apiHeaders = {};
|
|
18846
19444
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -19061,12 +19659,48 @@ class Products {
|
|
|
19061
19659
|
|
|
19062
19660
|
/**
|
|
19063
19661
|
*
|
|
19662
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
19663
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
19664
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
19665
|
+
* @throws {RevenexxException}
|
|
19666
|
+
* @returns {Promise<{}>}
|
|
19667
|
+
*/
|
|
19668
|
+
|
|
19669
|
+
/**
|
|
19670
|
+
*
|
|
19671
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
19672
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
19673
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
19064
19674
|
* @throws {RevenexxException}
|
|
19065
19675
|
* @returns {Promise<{}>}
|
|
19676
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
19066
19677
|
*/
|
|
19067
|
-
|
|
19678
|
+
|
|
19679
|
+
productsAttributesList(paramsOrFirst, ...rest) {
|
|
19680
|
+
let params;
|
|
19681
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
19682
|
+
params = paramsOrFirst || {};
|
|
19683
|
+
} else {
|
|
19684
|
+
params = {
|
|
19685
|
+
limit: paramsOrFirst,
|
|
19686
|
+
offset: rest[0],
|
|
19687
|
+
order: rest[1]
|
|
19688
|
+
};
|
|
19689
|
+
}
|
|
19690
|
+
const limit = params.limit;
|
|
19691
|
+
const offset = params.offset;
|
|
19692
|
+
const order = params.order;
|
|
19068
19693
|
const apiPath = '/v1/products/attributes';
|
|
19069
19694
|
const apiPayload = {};
|
|
19695
|
+
if (typeof limit !== 'undefined') {
|
|
19696
|
+
apiPayload['limit'] = limit;
|
|
19697
|
+
}
|
|
19698
|
+
if (typeof offset !== 'undefined') {
|
|
19699
|
+
apiPayload['offset'] = offset;
|
|
19700
|
+
}
|
|
19701
|
+
if (typeof order !== 'undefined') {
|
|
19702
|
+
apiPayload['order'] = order;
|
|
19703
|
+
}
|
|
19070
19704
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
19071
19705
|
const apiHeaders = {};
|
|
19072
19706
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -19457,12 +20091,48 @@ class Products {
|
|
|
19457
20091
|
|
|
19458
20092
|
/**
|
|
19459
20093
|
*
|
|
20094
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
20095
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
20096
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
20097
|
+
* @throws {RevenexxException}
|
|
20098
|
+
* @returns {Promise<{}>}
|
|
20099
|
+
*/
|
|
20100
|
+
|
|
20101
|
+
/**
|
|
20102
|
+
*
|
|
20103
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
20104
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
20105
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
19460
20106
|
* @throws {RevenexxException}
|
|
19461
20107
|
* @returns {Promise<{}>}
|
|
20108
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
19462
20109
|
*/
|
|
19463
|
-
|
|
20110
|
+
|
|
20111
|
+
productsCategoriesList(paramsOrFirst, ...rest) {
|
|
20112
|
+
let params;
|
|
20113
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
20114
|
+
params = paramsOrFirst || {};
|
|
20115
|
+
} else {
|
|
20116
|
+
params = {
|
|
20117
|
+
limit: paramsOrFirst,
|
|
20118
|
+
offset: rest[0],
|
|
20119
|
+
order: rest[1]
|
|
20120
|
+
};
|
|
20121
|
+
}
|
|
20122
|
+
const limit = params.limit;
|
|
20123
|
+
const offset = params.offset;
|
|
20124
|
+
const order = params.order;
|
|
19464
20125
|
const apiPath = '/v1/products/categories';
|
|
19465
20126
|
const apiPayload = {};
|
|
20127
|
+
if (typeof limit !== 'undefined') {
|
|
20128
|
+
apiPayload['limit'] = limit;
|
|
20129
|
+
}
|
|
20130
|
+
if (typeof offset !== 'undefined') {
|
|
20131
|
+
apiPayload['offset'] = offset;
|
|
20132
|
+
}
|
|
20133
|
+
if (typeof order !== 'undefined') {
|
|
20134
|
+
apiPayload['order'] = order;
|
|
20135
|
+
}
|
|
19466
20136
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
19467
20137
|
const apiHeaders = {};
|
|
19468
20138
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -19694,12 +20364,48 @@ class Products {
|
|
|
19694
20364
|
|
|
19695
20365
|
/**
|
|
19696
20366
|
*
|
|
20367
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
20368
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
20369
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
19697
20370
|
* @throws {RevenexxException}
|
|
19698
20371
|
* @returns {Promise<{}>}
|
|
19699
20372
|
*/
|
|
19700
|
-
|
|
20373
|
+
|
|
20374
|
+
/**
|
|
20375
|
+
*
|
|
20376
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
20377
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
20378
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
20379
|
+
* @throws {RevenexxException}
|
|
20380
|
+
* @returns {Promise<{}>}
|
|
20381
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
20382
|
+
*/
|
|
20383
|
+
|
|
20384
|
+
productsFamiliesList(paramsOrFirst, ...rest) {
|
|
20385
|
+
let params;
|
|
20386
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
20387
|
+
params = paramsOrFirst || {};
|
|
20388
|
+
} else {
|
|
20389
|
+
params = {
|
|
20390
|
+
limit: paramsOrFirst,
|
|
20391
|
+
offset: rest[0],
|
|
20392
|
+
order: rest[1]
|
|
20393
|
+
};
|
|
20394
|
+
}
|
|
20395
|
+
const limit = params.limit;
|
|
20396
|
+
const offset = params.offset;
|
|
20397
|
+
const order = params.order;
|
|
19701
20398
|
const apiPath = '/v1/products/families';
|
|
19702
20399
|
const apiPayload = {};
|
|
20400
|
+
if (typeof limit !== 'undefined') {
|
|
20401
|
+
apiPayload['limit'] = limit;
|
|
20402
|
+
}
|
|
20403
|
+
if (typeof offset !== 'undefined') {
|
|
20404
|
+
apiPayload['offset'] = offset;
|
|
20405
|
+
}
|
|
20406
|
+
if (typeof order !== 'undefined') {
|
|
20407
|
+
apiPayload['order'] = order;
|
|
20408
|
+
}
|
|
19703
20409
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
19704
20410
|
const apiHeaders = {};
|
|
19705
20411
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -19903,12 +20609,48 @@ class Products {
|
|
|
19903
20609
|
|
|
19904
20610
|
/**
|
|
19905
20611
|
*
|
|
20612
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
20613
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
20614
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
20615
|
+
* @throws {RevenexxException}
|
|
20616
|
+
* @returns {Promise<{}>}
|
|
20617
|
+
*/
|
|
20618
|
+
|
|
20619
|
+
/**
|
|
20620
|
+
*
|
|
20621
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
20622
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
20623
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
19906
20624
|
* @throws {RevenexxException}
|
|
19907
20625
|
* @returns {Promise<{}>}
|
|
20626
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
19908
20627
|
*/
|
|
19909
|
-
|
|
20628
|
+
|
|
20629
|
+
productsFamilyAttributesList(paramsOrFirst, ...rest) {
|
|
20630
|
+
let params;
|
|
20631
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
20632
|
+
params = paramsOrFirst || {};
|
|
20633
|
+
} else {
|
|
20634
|
+
params = {
|
|
20635
|
+
limit: paramsOrFirst,
|
|
20636
|
+
offset: rest[0],
|
|
20637
|
+
order: rest[1]
|
|
20638
|
+
};
|
|
20639
|
+
}
|
|
20640
|
+
const limit = params.limit;
|
|
20641
|
+
const offset = params.offset;
|
|
20642
|
+
const order = params.order;
|
|
19910
20643
|
const apiPath = '/v1/products/family_attributes';
|
|
19911
20644
|
const apiPayload = {};
|
|
20645
|
+
if (typeof limit !== 'undefined') {
|
|
20646
|
+
apiPayload['limit'] = limit;
|
|
20647
|
+
}
|
|
20648
|
+
if (typeof offset !== 'undefined') {
|
|
20649
|
+
apiPayload['offset'] = offset;
|
|
20650
|
+
}
|
|
20651
|
+
if (typeof order !== 'undefined') {
|
|
20652
|
+
apiPayload['order'] = order;
|
|
20653
|
+
}
|
|
19912
20654
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
19913
20655
|
const apiHeaders = {};
|
|
19914
20656
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -20129,12 +20871,48 @@ class Products {
|
|
|
20129
20871
|
|
|
20130
20872
|
/**
|
|
20131
20873
|
*
|
|
20874
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
20875
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
20876
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
20877
|
+
* @throws {RevenexxException}
|
|
20878
|
+
* @returns {Promise<{}>}
|
|
20879
|
+
*/
|
|
20880
|
+
|
|
20881
|
+
/**
|
|
20882
|
+
*
|
|
20883
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
20884
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
20885
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
20132
20886
|
* @throws {RevenexxException}
|
|
20133
20887
|
* @returns {Promise<{}>}
|
|
20888
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
20134
20889
|
*/
|
|
20135
|
-
|
|
20890
|
+
|
|
20891
|
+
productsFamilyVariantsList(paramsOrFirst, ...rest) {
|
|
20892
|
+
let params;
|
|
20893
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
20894
|
+
params = paramsOrFirst || {};
|
|
20895
|
+
} else {
|
|
20896
|
+
params = {
|
|
20897
|
+
limit: paramsOrFirst,
|
|
20898
|
+
offset: rest[0],
|
|
20899
|
+
order: rest[1]
|
|
20900
|
+
};
|
|
20901
|
+
}
|
|
20902
|
+
const limit = params.limit;
|
|
20903
|
+
const offset = params.offset;
|
|
20904
|
+
const order = params.order;
|
|
20136
20905
|
const apiPath = '/v1/products/family_variants';
|
|
20137
20906
|
const apiPayload = {};
|
|
20907
|
+
if (typeof limit !== 'undefined') {
|
|
20908
|
+
apiPayload['limit'] = limit;
|
|
20909
|
+
}
|
|
20910
|
+
if (typeof offset !== 'undefined') {
|
|
20911
|
+
apiPayload['offset'] = offset;
|
|
20912
|
+
}
|
|
20913
|
+
if (typeof order !== 'undefined') {
|
|
20914
|
+
apiPayload['order'] = order;
|
|
20915
|
+
}
|
|
20138
20916
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
20139
20917
|
const apiHeaders = {};
|
|
20140
20918
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -20341,12 +21119,48 @@ class Products {
|
|
|
20341
21119
|
|
|
20342
21120
|
/**
|
|
20343
21121
|
*
|
|
21122
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
21123
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
21124
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
20344
21125
|
* @throws {RevenexxException}
|
|
20345
21126
|
* @returns {Promise<{}>}
|
|
20346
21127
|
*/
|
|
20347
|
-
|
|
21128
|
+
|
|
21129
|
+
/**
|
|
21130
|
+
*
|
|
21131
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
21132
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
21133
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
21134
|
+
* @throws {RevenexxException}
|
|
21135
|
+
* @returns {Promise<{}>}
|
|
21136
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
21137
|
+
*/
|
|
21138
|
+
|
|
21139
|
+
productsMeasurementFamiliesList(paramsOrFirst, ...rest) {
|
|
21140
|
+
let params;
|
|
21141
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
21142
|
+
params = paramsOrFirst || {};
|
|
21143
|
+
} else {
|
|
21144
|
+
params = {
|
|
21145
|
+
limit: paramsOrFirst,
|
|
21146
|
+
offset: rest[0],
|
|
21147
|
+
order: rest[1]
|
|
21148
|
+
};
|
|
21149
|
+
}
|
|
21150
|
+
const limit = params.limit;
|
|
21151
|
+
const offset = params.offset;
|
|
21152
|
+
const order = params.order;
|
|
20348
21153
|
const apiPath = '/v1/products/measurement_families';
|
|
20349
21154
|
const apiPayload = {};
|
|
21155
|
+
if (typeof limit !== 'undefined') {
|
|
21156
|
+
apiPayload['limit'] = limit;
|
|
21157
|
+
}
|
|
21158
|
+
if (typeof offset !== 'undefined') {
|
|
21159
|
+
apiPayload['offset'] = offset;
|
|
21160
|
+
}
|
|
21161
|
+
if (typeof order !== 'undefined') {
|
|
21162
|
+
apiPayload['order'] = order;
|
|
21163
|
+
}
|
|
20350
21164
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
20351
21165
|
const apiHeaders = {};
|
|
20352
21166
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -20553,12 +21367,48 @@ class Products {
|
|
|
20553
21367
|
|
|
20554
21368
|
/**
|
|
20555
21369
|
*
|
|
21370
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
21371
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
21372
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
20556
21373
|
* @throws {RevenexxException}
|
|
20557
21374
|
* @returns {Promise<{}>}
|
|
20558
21375
|
*/
|
|
20559
|
-
|
|
21376
|
+
|
|
21377
|
+
/**
|
|
21378
|
+
*
|
|
21379
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
21380
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
21381
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
21382
|
+
* @throws {RevenexxException}
|
|
21383
|
+
* @returns {Promise<{}>}
|
|
21384
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
21385
|
+
*/
|
|
21386
|
+
|
|
21387
|
+
productsProductAssociationsList(paramsOrFirst, ...rest) {
|
|
21388
|
+
let params;
|
|
21389
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
21390
|
+
params = paramsOrFirst || {};
|
|
21391
|
+
} else {
|
|
21392
|
+
params = {
|
|
21393
|
+
limit: paramsOrFirst,
|
|
21394
|
+
offset: rest[0],
|
|
21395
|
+
order: rest[1]
|
|
21396
|
+
};
|
|
21397
|
+
}
|
|
21398
|
+
const limit = params.limit;
|
|
21399
|
+
const offset = params.offset;
|
|
21400
|
+
const order = params.order;
|
|
20560
21401
|
const apiPath = '/v1/products/product_associations';
|
|
20561
21402
|
const apiPayload = {};
|
|
21403
|
+
if (typeof limit !== 'undefined') {
|
|
21404
|
+
apiPayload['limit'] = limit;
|
|
21405
|
+
}
|
|
21406
|
+
if (typeof offset !== 'undefined') {
|
|
21407
|
+
apiPayload['offset'] = offset;
|
|
21408
|
+
}
|
|
21409
|
+
if (typeof order !== 'undefined') {
|
|
21410
|
+
apiPayload['order'] = order;
|
|
21411
|
+
}
|
|
20562
21412
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
20563
21413
|
const apiHeaders = {};
|
|
20564
21414
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -20782,12 +21632,48 @@ class Products {
|
|
|
20782
21632
|
|
|
20783
21633
|
/**
|
|
20784
21634
|
*
|
|
21635
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
21636
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
21637
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
21638
|
+
* @throws {RevenexxException}
|
|
21639
|
+
* @returns {Promise<{}>}
|
|
21640
|
+
*/
|
|
21641
|
+
|
|
21642
|
+
/**
|
|
21643
|
+
*
|
|
21644
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
21645
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
21646
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
20785
21647
|
* @throws {RevenexxException}
|
|
20786
21648
|
* @returns {Promise<{}>}
|
|
21649
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
20787
21650
|
*/
|
|
20788
|
-
|
|
21651
|
+
|
|
21652
|
+
productsProductCategoriesList(paramsOrFirst, ...rest) {
|
|
21653
|
+
let params;
|
|
21654
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
21655
|
+
params = paramsOrFirst || {};
|
|
21656
|
+
} else {
|
|
21657
|
+
params = {
|
|
21658
|
+
limit: paramsOrFirst,
|
|
21659
|
+
offset: rest[0],
|
|
21660
|
+
order: rest[1]
|
|
21661
|
+
};
|
|
21662
|
+
}
|
|
21663
|
+
const limit = params.limit;
|
|
21664
|
+
const offset = params.offset;
|
|
21665
|
+
const order = params.order;
|
|
20789
21666
|
const apiPath = '/v1/products/product_categories';
|
|
20790
21667
|
const apiPayload = {};
|
|
21668
|
+
if (typeof limit !== 'undefined') {
|
|
21669
|
+
apiPayload['limit'] = limit;
|
|
21670
|
+
}
|
|
21671
|
+
if (typeof offset !== 'undefined') {
|
|
21672
|
+
apiPayload['offset'] = offset;
|
|
21673
|
+
}
|
|
21674
|
+
if (typeof order !== 'undefined') {
|
|
21675
|
+
apiPayload['order'] = order;
|
|
21676
|
+
}
|
|
20791
21677
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
20792
21678
|
const apiHeaders = {};
|
|
20793
21679
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -20980,12 +21866,48 @@ class Products {
|
|
|
20980
21866
|
|
|
20981
21867
|
/**
|
|
20982
21868
|
*
|
|
21869
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
21870
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
21871
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
21872
|
+
* @throws {RevenexxException}
|
|
21873
|
+
* @returns {Promise<{}>}
|
|
21874
|
+
*/
|
|
21875
|
+
|
|
21876
|
+
/**
|
|
21877
|
+
*
|
|
21878
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
21879
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
21880
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
20983
21881
|
* @throws {RevenexxException}
|
|
20984
21882
|
* @returns {Promise<{}>}
|
|
21883
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
20985
21884
|
*/
|
|
20986
|
-
|
|
21885
|
+
|
|
21886
|
+
productsReferenceEntitiesList(paramsOrFirst, ...rest) {
|
|
21887
|
+
let params;
|
|
21888
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
21889
|
+
params = paramsOrFirst || {};
|
|
21890
|
+
} else {
|
|
21891
|
+
params = {
|
|
21892
|
+
limit: paramsOrFirst,
|
|
21893
|
+
offset: rest[0],
|
|
21894
|
+
order: rest[1]
|
|
21895
|
+
};
|
|
21896
|
+
}
|
|
21897
|
+
const limit = params.limit;
|
|
21898
|
+
const offset = params.offset;
|
|
21899
|
+
const order = params.order;
|
|
20987
21900
|
const apiPath = '/v1/products/reference_entities';
|
|
20988
21901
|
const apiPayload = {};
|
|
21902
|
+
if (typeof limit !== 'undefined') {
|
|
21903
|
+
apiPayload['limit'] = limit;
|
|
21904
|
+
}
|
|
21905
|
+
if (typeof offset !== 'undefined') {
|
|
21906
|
+
apiPayload['offset'] = offset;
|
|
21907
|
+
}
|
|
21908
|
+
if (typeof order !== 'undefined') {
|
|
21909
|
+
apiPayload['order'] = order;
|
|
21910
|
+
}
|
|
20989
21911
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
20990
21912
|
const apiHeaders = {};
|
|
20991
21913
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -21175,12 +22097,48 @@ class Products {
|
|
|
21175
22097
|
|
|
21176
22098
|
/**
|
|
21177
22099
|
*
|
|
22100
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
22101
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
22102
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
22103
|
+
* @throws {RevenexxException}
|
|
22104
|
+
* @returns {Promise<{}>}
|
|
22105
|
+
*/
|
|
22106
|
+
|
|
22107
|
+
/**
|
|
22108
|
+
*
|
|
22109
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
22110
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
22111
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
21178
22112
|
* @throws {RevenexxException}
|
|
21179
22113
|
* @returns {Promise<{}>}
|
|
22114
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
21180
22115
|
*/
|
|
21181
|
-
|
|
22116
|
+
|
|
22117
|
+
productsReferenceEntityRecordsList(paramsOrFirst, ...rest) {
|
|
22118
|
+
let params;
|
|
22119
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
22120
|
+
params = paramsOrFirst || {};
|
|
22121
|
+
} else {
|
|
22122
|
+
params = {
|
|
22123
|
+
limit: paramsOrFirst,
|
|
22124
|
+
offset: rest[0],
|
|
22125
|
+
order: rest[1]
|
|
22126
|
+
};
|
|
22127
|
+
}
|
|
22128
|
+
const limit = params.limit;
|
|
22129
|
+
const offset = params.offset;
|
|
22130
|
+
const order = params.order;
|
|
21182
22131
|
const apiPath = '/v1/products/reference_entity_records';
|
|
21183
22132
|
const apiPayload = {};
|
|
22133
|
+
if (typeof limit !== 'undefined') {
|
|
22134
|
+
apiPayload['limit'] = limit;
|
|
22135
|
+
}
|
|
22136
|
+
if (typeof offset !== 'undefined') {
|
|
22137
|
+
apiPayload['offset'] = offset;
|
|
22138
|
+
}
|
|
22139
|
+
if (typeof order !== 'undefined') {
|
|
22140
|
+
apiPayload['order'] = order;
|
|
22141
|
+
}
|
|
21184
22142
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
21185
22143
|
const apiHeaders = {};
|
|
21186
22144
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -21834,7 +22792,28 @@ class Search {
|
|
|
21834
22792
|
const apiPath = '/v1/search/multi_search';
|
|
21835
22793
|
const apiPayload = {};
|
|
21836
22794
|
if (typeof searches !== 'undefined') {
|
|
21837
|
-
apiPayload['searches'] = searches
|
|
22795
|
+
apiPayload['searches'] = Client.toWireKeys(searches, {
|
|
22796
|
+
"facetBy": {
|
|
22797
|
+
"wire": "facet_by",
|
|
22798
|
+
"children": null
|
|
22799
|
+
},
|
|
22800
|
+
"filterBy": {
|
|
22801
|
+
"wire": "filter_by",
|
|
22802
|
+
"children": null
|
|
22803
|
+
},
|
|
22804
|
+
"perPage": {
|
|
22805
|
+
"wire": "per_page",
|
|
22806
|
+
"children": null
|
|
22807
|
+
},
|
|
22808
|
+
"queryBy": {
|
|
22809
|
+
"wire": "query_by",
|
|
22810
|
+
"children": null
|
|
22811
|
+
},
|
|
22812
|
+
"sortBy": {
|
|
22813
|
+
"wire": "sort_by",
|
|
22814
|
+
"children": null
|
|
22815
|
+
}
|
|
22816
|
+
});
|
|
21838
22817
|
}
|
|
21839
22818
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
21840
22819
|
const apiHeaders = {
|
|
@@ -22388,7 +23367,12 @@ class Shipping {
|
|
|
22388
23367
|
const apiPath = '/v1/shipping/methods/{method_id}/tiers'.replace('{method_id}', methodId);
|
|
22389
23368
|
const apiPayload = {};
|
|
22390
23369
|
if (typeof tiers !== 'undefined') {
|
|
22391
|
-
apiPayload['tiers'] = tiers
|
|
23370
|
+
apiPayload['tiers'] = Client.toWireKeys(tiers, {
|
|
23371
|
+
"fromValue": {
|
|
23372
|
+
"wire": "from_value",
|
|
23373
|
+
"children": null
|
|
23374
|
+
}
|
|
23375
|
+
});
|
|
22392
23376
|
}
|
|
22393
23377
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
22394
23378
|
const apiHeaders = {
|
|
@@ -27269,10 +28253,13 @@ let OrderListKind = /*#__PURE__*/function (OrderListKind) {
|
|
|
27269
28253
|
return OrderListKind;
|
|
27270
28254
|
}({});
|
|
27271
28255
|
|
|
27272
|
-
let
|
|
27273
|
-
|
|
27274
|
-
|
|
27275
|
-
|
|
28256
|
+
let OrderStatus = /*#__PURE__*/function (OrderStatus) {
|
|
28257
|
+
OrderStatus["Pending"] = "pending";
|
|
28258
|
+
OrderStatus["Placed"] = "placed";
|
|
28259
|
+
OrderStatus["InFulfillment"] = "in_fulfillment";
|
|
28260
|
+
OrderStatus["Completed"] = "completed";
|
|
28261
|
+
OrderStatus["Cancelled"] = "cancelled";
|
|
28262
|
+
return OrderStatus;
|
|
27276
28263
|
}({});
|
|
27277
28264
|
|
|
27278
28265
|
let OrderPaymentStatus = /*#__PURE__*/function (OrderPaymentStatus) {
|
|
@@ -27286,6 +28273,19 @@ let OrderPaymentStatus = /*#__PURE__*/function (OrderPaymentStatus) {
|
|
|
27286
28273
|
return OrderPaymentStatus;
|
|
27287
28274
|
}({});
|
|
27288
28275
|
|
|
28276
|
+
let OrderFulfillmentStatus = /*#__PURE__*/function (OrderFulfillmentStatus) {
|
|
28277
|
+
OrderFulfillmentStatus["Unfulfilled"] = "unfulfilled";
|
|
28278
|
+
OrderFulfillmentStatus["Partial"] = "partial";
|
|
28279
|
+
OrderFulfillmentStatus["Fulfilled"] = "fulfilled";
|
|
28280
|
+
return OrderFulfillmentStatus;
|
|
28281
|
+
}({});
|
|
28282
|
+
|
|
28283
|
+
let OrderCommentVisibility = /*#__PURE__*/function (OrderCommentVisibility) {
|
|
28284
|
+
OrderCommentVisibility["Internal"] = "internal";
|
|
28285
|
+
OrderCommentVisibility["Customer"] = "customer";
|
|
28286
|
+
return OrderCommentVisibility;
|
|
28287
|
+
}({});
|
|
28288
|
+
|
|
27289
28289
|
let PageStatus = /*#__PURE__*/function (PageStatus) {
|
|
27290
28290
|
PageStatus["Draft"] = "draft";
|
|
27291
28291
|
PageStatus["Published"] = "published";
|
|
@@ -27827,5 +28827,5 @@ let MessageStatus = /*#__PURE__*/function (MessageStatus) {
|
|
|
27827
28827
|
return MessageStatus;
|
|
27828
28828
|
}({});
|
|
27829
28829
|
|
|
27830
|
-
export { Adapter, AddressType, Apps, AttributeBooleanStatus, AttributeDatetimeStatus, AttributeEmailStatus, AttributeEnumStatus, AttributeFloatStatus, AttributeIntegerStatus, AttributeIpStatus, AttributeLineStatus, AttributeLongtextStatus, AttributeMediumtextStatus, AttributePointStatus, AttributePolygonStatus, AttributeRelationshipStatus, AttributeStringStatus, AttributeTextStatus, AttributeUrlStatus, AttributeVarcharStatus, Avatars, BuildRuntime, CartExportFormat, CartIoApplyMode, CartIoDirection, CartIoEntity, CartIoFormat, CartItemType, Carts, Channel, ChannelStatus, ChannelType, Channels, Client, Code, Collection, ColumnBooleanStatus, ColumnDatetimeStatus, ColumnEmailStatus, ColumnEnumStatus, ColumnFloatStatus, ColumnIntegerStatus, ColumnIpStatus, ColumnLineStatus, ColumnLongtextStatus, ColumnMediumtextStatus, ColumnPointStatus, ColumnPolygonStatus, ColumnRelationshipStatus, ColumnStringStatus, ColumnTextStatus, ColumnUrlStatus, ColumnVarcharStatus, Condition, ContactRole, ContactStatus, Customers, DatabaseType, DeploymentStatus, ExecutionStatus, ExecutionTrigger, Framework, Greetings, HealthAntivirusStatus, HealthStatusStatus, ID, IndexStatus, Inventories, Locale, LocationType, MarketStatus, Markets, MessageStatus, Messaging, Method, Operator, OrderCommentVisibility, OrderItemType, OrderListKind, OrderPaymentStatus, Orderlists, Orders, OrganizationStatus, Output, PageStatus, Pages, PaymentFeeType, PaymentMethodKind, Payments, Permission, Permissions, PriceEntryType, PriceListStatus, Prices, Priority, Products, Query, Range, Realtime, RevenexxException, Role, Runtime, Runtimes, Scopes, Search, Shipping, ShippingMethodMatrixBasis, ShippingMethodPricingType, Sites, Storage, StoreAssetRequestVisibility, Theme, Timezone, Tokens, Type, UseCases, Visibility };
|
|
28830
|
+
export { Adapter, AddressType, Apps, AttributeBooleanStatus, AttributeDatetimeStatus, AttributeEmailStatus, AttributeEnumStatus, AttributeFloatStatus, AttributeIntegerStatus, AttributeIpStatus, AttributeLineStatus, AttributeLongtextStatus, AttributeMediumtextStatus, AttributePointStatus, AttributePolygonStatus, AttributeRelationshipStatus, AttributeStringStatus, AttributeTextStatus, AttributeUrlStatus, AttributeVarcharStatus, Avatars, BuildRuntime, CartExportFormat, CartIoApplyMode, CartIoDirection, CartIoEntity, CartIoFormat, CartItemType, Carts, Channel, ChannelStatus, ChannelType, Channels, Client, Code, Collection, ColumnBooleanStatus, ColumnDatetimeStatus, ColumnEmailStatus, ColumnEnumStatus, ColumnFloatStatus, ColumnIntegerStatus, ColumnIpStatus, ColumnLineStatus, ColumnLongtextStatus, ColumnMediumtextStatus, ColumnPointStatus, ColumnPolygonStatus, ColumnRelationshipStatus, ColumnStringStatus, ColumnTextStatus, ColumnUrlStatus, ColumnVarcharStatus, Condition, ContactRole, ContactStatus, Customers, DatabaseType, DeploymentStatus, ExecutionStatus, ExecutionTrigger, Framework, Greetings, HealthAntivirusStatus, HealthStatusStatus, ID, IndexStatus, Inventories, Locale, LocationType, MarketStatus, Markets, MessageStatus, Messaging, Method, Operator, OrderCommentVisibility, OrderFulfillmentStatus, OrderItemType, OrderListKind, OrderPaymentStatus, OrderStatus, Orderlists, Orders, OrganizationStatus, Output, PageStatus, Pages, PaymentFeeType, PaymentMethodKind, Payments, Permission, Permissions, PriceEntryType, PriceListStatus, Prices, Priority, Products, Query, Range, Realtime, RevenexxException, Role, Runtime, Runtimes, Scopes, Search, Shipping, ShippingMethodMatrixBasis, ShippingMethodPricingType, Sites, Storage, StoreAssetRequestVisibility, Theme, Timezone, Tokens, Type, UseCases, Visibility };
|
|
27831
28831
|
//# sourceMappingURL=sdk.js.map
|