@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/cjs/sdk.js
CHANGED
|
@@ -657,7 +657,7 @@ class Client {
|
|
|
657
657
|
'x-sdk-name': 'Revenexx Web',
|
|
658
658
|
'x-sdk-platform': '',
|
|
659
659
|
'x-sdk-language': 'web',
|
|
660
|
-
'x-sdk-version': '0.0.
|
|
660
|
+
'x-sdk-version': '0.0.11'
|
|
661
661
|
};
|
|
662
662
|
|
|
663
663
|
/**
|
|
@@ -1137,6 +1137,29 @@ class Client {
|
|
|
1137
1137
|
}
|
|
1138
1138
|
return data;
|
|
1139
1139
|
}
|
|
1140
|
+
|
|
1141
|
+
/**
|
|
1142
|
+
* Recursively renames an argument's DECLARED keys to their snake_case wire
|
|
1143
|
+
* names, using a map generated from the API contract. Free-form subtrees
|
|
1144
|
+
* (metadata / user_data — keys absent from the map, with no `children`) are
|
|
1145
|
+
* passed through untouched, so user data is never mangled. For arrays the
|
|
1146
|
+
* same element map is applied to every item.
|
|
1147
|
+
*/
|
|
1148
|
+
static toWireKeys(value, map) {
|
|
1149
|
+
if (Array.isArray(value)) {
|
|
1150
|
+
return value.map(item => Client.toWireKeys(item, map));
|
|
1151
|
+
}
|
|
1152
|
+
if (value === null || typeof value !== 'object' || value instanceof File || value instanceof Blob || value instanceof Date) {
|
|
1153
|
+
return value;
|
|
1154
|
+
}
|
|
1155
|
+
const output = {};
|
|
1156
|
+
for (const [key, item] of Object.entries(value)) {
|
|
1157
|
+
const entry = map[key];
|
|
1158
|
+
const wireKey = entry ? entry.wire : key;
|
|
1159
|
+
output[wireKey] = entry && entry.children ? Client.toWireKeys(item, entry.children) : item;
|
|
1160
|
+
}
|
|
1161
|
+
return output;
|
|
1162
|
+
}
|
|
1140
1163
|
static flatten(data, prefix = '') {
|
|
1141
1164
|
let output = {};
|
|
1142
1165
|
for (const [key, value] of Object.entries(data)) {
|
|
@@ -3743,12 +3766,69 @@ class Carts {
|
|
|
3743
3766
|
|
|
3744
3767
|
/**
|
|
3745
3768
|
*
|
|
3769
|
+
* @param {string} params.contactId - Filter to one owning contact.
|
|
3770
|
+
* @param {string} params.sessionKey - Filter to one guest session.
|
|
3771
|
+
* @param {string} params.status - Filter by cart status (e.g. active).
|
|
3772
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
3773
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
3774
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
3775
|
+
* @throws {RevenexxException}
|
|
3776
|
+
* @returns {Promise<{}>}
|
|
3777
|
+
*/
|
|
3778
|
+
|
|
3779
|
+
/**
|
|
3780
|
+
*
|
|
3781
|
+
* @param {string} contactId - Filter to one owning contact.
|
|
3782
|
+
* @param {string} sessionKey - Filter to one guest session.
|
|
3783
|
+
* @param {string} status - Filter by cart status (e.g. active).
|
|
3784
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
3785
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
3786
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
3746
3787
|
* @throws {RevenexxException}
|
|
3747
3788
|
* @returns {Promise<{}>}
|
|
3789
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3748
3790
|
*/
|
|
3749
|
-
|
|
3791
|
+
|
|
3792
|
+
cartsList(paramsOrFirst, ...rest) {
|
|
3793
|
+
let params;
|
|
3794
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
3795
|
+
params = paramsOrFirst || {};
|
|
3796
|
+
} else {
|
|
3797
|
+
params = {
|
|
3798
|
+
contactId: paramsOrFirst,
|
|
3799
|
+
sessionKey: rest[0],
|
|
3800
|
+
status: rest[1],
|
|
3801
|
+
limit: rest[2],
|
|
3802
|
+
offset: rest[3],
|
|
3803
|
+
order: rest[4]
|
|
3804
|
+
};
|
|
3805
|
+
}
|
|
3806
|
+
const contactId = params.contactId;
|
|
3807
|
+
const sessionKey = params.sessionKey;
|
|
3808
|
+
const status = params.status;
|
|
3809
|
+
const limit = params.limit;
|
|
3810
|
+
const offset = params.offset;
|
|
3811
|
+
const order = params.order;
|
|
3750
3812
|
const apiPath = '/v1/carts';
|
|
3751
3813
|
const apiPayload = {};
|
|
3814
|
+
if (typeof contactId !== 'undefined') {
|
|
3815
|
+
apiPayload['contact_id'] = contactId;
|
|
3816
|
+
}
|
|
3817
|
+
if (typeof sessionKey !== 'undefined') {
|
|
3818
|
+
apiPayload['session_key'] = sessionKey;
|
|
3819
|
+
}
|
|
3820
|
+
if (typeof status !== 'undefined') {
|
|
3821
|
+
apiPayload['status'] = status;
|
|
3822
|
+
}
|
|
3823
|
+
if (typeof limit !== 'undefined') {
|
|
3824
|
+
apiPayload['limit'] = limit;
|
|
3825
|
+
}
|
|
3826
|
+
if (typeof offset !== 'undefined') {
|
|
3827
|
+
apiPayload['offset'] = offset;
|
|
3828
|
+
}
|
|
3829
|
+
if (typeof order !== 'undefined') {
|
|
3830
|
+
apiPayload['order'] = order;
|
|
3831
|
+
}
|
|
3752
3832
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3753
3833
|
const apiHeaders = {};
|
|
3754
3834
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -4508,7 +4588,20 @@ class Carts {
|
|
|
4508
4588
|
const apiPath = '/v1/carts/{cart_id}/items'.replace('{cart_id}', cartId);
|
|
4509
4589
|
const apiPayload = {};
|
|
4510
4590
|
if (typeof items !== 'undefined') {
|
|
4511
|
-
apiPayload['items'] = items
|
|
4591
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
4592
|
+
"productId": {
|
|
4593
|
+
"wire": "product_id",
|
|
4594
|
+
"children": null
|
|
4595
|
+
},
|
|
4596
|
+
"taxRate": {
|
|
4597
|
+
"wire": "tax_rate",
|
|
4598
|
+
"children": null
|
|
4599
|
+
},
|
|
4600
|
+
"unitPrice": {
|
|
4601
|
+
"wire": "unit_price",
|
|
4602
|
+
"children": null
|
|
4603
|
+
}
|
|
4604
|
+
});
|
|
4512
4605
|
}
|
|
4513
4606
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4514
4607
|
const apiHeaders = {
|
|
@@ -5361,12 +5454,62 @@ class Customers {
|
|
|
5361
5454
|
|
|
5362
5455
|
/**
|
|
5363
5456
|
*
|
|
5457
|
+
* @param {string} params.contactId - Filter to one owning contact.
|
|
5458
|
+
* @param {string} params.organizationId - Filter to one organization.
|
|
5459
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
5460
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
5461
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
5462
|
+
* @throws {RevenexxException}
|
|
5463
|
+
* @returns {Promise<{}>}
|
|
5464
|
+
*/
|
|
5465
|
+
|
|
5466
|
+
/**
|
|
5467
|
+
*
|
|
5468
|
+
* @param {string} contactId - Filter to one owning contact.
|
|
5469
|
+
* @param {string} organizationId - Filter to one organization.
|
|
5470
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
5471
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
5472
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
5364
5473
|
* @throws {RevenexxException}
|
|
5365
5474
|
* @returns {Promise<{}>}
|
|
5475
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
5366
5476
|
*/
|
|
5367
|
-
|
|
5477
|
+
|
|
5478
|
+
customersAddressesList(paramsOrFirst, ...rest) {
|
|
5479
|
+
let params;
|
|
5480
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
5481
|
+
params = paramsOrFirst || {};
|
|
5482
|
+
} else {
|
|
5483
|
+
params = {
|
|
5484
|
+
contactId: paramsOrFirst,
|
|
5485
|
+
organizationId: rest[0],
|
|
5486
|
+
limit: rest[1],
|
|
5487
|
+
offset: rest[2],
|
|
5488
|
+
order: rest[3]
|
|
5489
|
+
};
|
|
5490
|
+
}
|
|
5491
|
+
const contactId = params.contactId;
|
|
5492
|
+
const organizationId = params.organizationId;
|
|
5493
|
+
const limit = params.limit;
|
|
5494
|
+
const offset = params.offset;
|
|
5495
|
+
const order = params.order;
|
|
5368
5496
|
const apiPath = '/v1/customers/addresses';
|
|
5369
5497
|
const apiPayload = {};
|
|
5498
|
+
if (typeof contactId !== 'undefined') {
|
|
5499
|
+
apiPayload['contact_id'] = contactId;
|
|
5500
|
+
}
|
|
5501
|
+
if (typeof organizationId !== 'undefined') {
|
|
5502
|
+
apiPayload['organization_id'] = organizationId;
|
|
5503
|
+
}
|
|
5504
|
+
if (typeof limit !== 'undefined') {
|
|
5505
|
+
apiPayload['limit'] = limit;
|
|
5506
|
+
}
|
|
5507
|
+
if (typeof offset !== 'undefined') {
|
|
5508
|
+
apiPayload['offset'] = offset;
|
|
5509
|
+
}
|
|
5510
|
+
if (typeof order !== 'undefined') {
|
|
5511
|
+
apiPayload['order'] = order;
|
|
5512
|
+
}
|
|
5370
5513
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5371
5514
|
const apiHeaders = {};
|
|
5372
5515
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -6797,7 +6940,12 @@ class Inventories {
|
|
|
6797
6940
|
const apiPath = '/v1/inventories/adjust';
|
|
6798
6941
|
const apiPayload = {};
|
|
6799
6942
|
if (typeof items !== 'undefined') {
|
|
6800
|
-
apiPayload['items'] = items
|
|
6943
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
6944
|
+
"productId": {
|
|
6945
|
+
"wire": "product_id",
|
|
6946
|
+
"children": null
|
|
6947
|
+
}
|
|
6948
|
+
});
|
|
6801
6949
|
}
|
|
6802
6950
|
if (typeof locationCode !== 'undefined') {
|
|
6803
6951
|
apiPayload['location_code'] = locationCode;
|
|
@@ -6847,7 +6995,12 @@ class Inventories {
|
|
|
6847
6995
|
const apiPath = '/v1/inventories/availability';
|
|
6848
6996
|
const apiPayload = {};
|
|
6849
6997
|
if (typeof items !== 'undefined') {
|
|
6850
|
-
apiPayload['items'] = items
|
|
6998
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
6999
|
+
"productId": {
|
|
7000
|
+
"wire": "product_id",
|
|
7001
|
+
"children": null
|
|
7002
|
+
}
|
|
7003
|
+
});
|
|
6851
7004
|
}
|
|
6852
7005
|
if (typeof locationCode !== 'undefined') {
|
|
6853
7006
|
apiPayload['location_code'] = locationCode;
|
|
@@ -7267,7 +7420,12 @@ class Inventories {
|
|
|
7267
7420
|
const apiPath = '/v1/inventories/receive';
|
|
7268
7421
|
const apiPayload = {};
|
|
7269
7422
|
if (typeof items !== 'undefined') {
|
|
7270
|
-
apiPayload['items'] = items
|
|
7423
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
7424
|
+
"productId": {
|
|
7425
|
+
"wire": "product_id",
|
|
7426
|
+
"children": null
|
|
7427
|
+
}
|
|
7428
|
+
});
|
|
7271
7429
|
}
|
|
7272
7430
|
if (typeof locationCode !== 'undefined') {
|
|
7273
7431
|
apiPayload['location_code'] = locationCode;
|
|
@@ -7415,7 +7573,12 @@ class Inventories {
|
|
|
7415
7573
|
apiPayload['expires_at'] = expiresAt;
|
|
7416
7574
|
}
|
|
7417
7575
|
if (typeof items !== 'undefined') {
|
|
7418
|
-
apiPayload['items'] = items
|
|
7576
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
7577
|
+
"productId": {
|
|
7578
|
+
"wire": "product_id",
|
|
7579
|
+
"children": null
|
|
7580
|
+
}
|
|
7581
|
+
});
|
|
7419
7582
|
}
|
|
7420
7583
|
if (typeof orderRef !== 'undefined') {
|
|
7421
7584
|
apiPayload['order_ref'] = orderRef;
|
|
@@ -7470,7 +7633,12 @@ class Inventories {
|
|
|
7470
7633
|
const apiPath = '/v1/inventories/restock';
|
|
7471
7634
|
const apiPayload = {};
|
|
7472
7635
|
if (typeof items !== 'undefined') {
|
|
7473
|
-
apiPayload['items'] = items
|
|
7636
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
7637
|
+
"productId": {
|
|
7638
|
+
"wire": "product_id",
|
|
7639
|
+
"children": null
|
|
7640
|
+
}
|
|
7641
|
+
});
|
|
7474
7642
|
}
|
|
7475
7643
|
if (typeof locationCode !== 'undefined') {
|
|
7476
7644
|
apiPayload['location_code'] = locationCode;
|
|
@@ -11865,12 +12033,69 @@ class Orderlists {
|
|
|
11865
12033
|
|
|
11866
12034
|
/**
|
|
11867
12035
|
*
|
|
12036
|
+
* @param {string} params.ownerId - Filter to one owning contact.
|
|
12037
|
+
* @param {string} params.organizationId - Filter to one organization.
|
|
12038
|
+
* @param {string} params.kind - Filter by list kind (shopping | label).
|
|
12039
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
12040
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
12041
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
12042
|
+
* @throws {RevenexxException}
|
|
12043
|
+
* @returns {Promise<{}>}
|
|
12044
|
+
*/
|
|
12045
|
+
|
|
12046
|
+
/**
|
|
12047
|
+
*
|
|
12048
|
+
* @param {string} ownerId - Filter to one owning contact.
|
|
12049
|
+
* @param {string} organizationId - Filter to one organization.
|
|
12050
|
+
* @param {string} kind - Filter by list kind (shopping | label).
|
|
12051
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
12052
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
12053
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
11868
12054
|
* @throws {RevenexxException}
|
|
11869
12055
|
* @returns {Promise<{}>}
|
|
12056
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
11870
12057
|
*/
|
|
11871
|
-
|
|
12058
|
+
|
|
12059
|
+
orderlistsList(paramsOrFirst, ...rest) {
|
|
12060
|
+
let params;
|
|
12061
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
12062
|
+
params = paramsOrFirst || {};
|
|
12063
|
+
} else {
|
|
12064
|
+
params = {
|
|
12065
|
+
ownerId: paramsOrFirst,
|
|
12066
|
+
organizationId: rest[0],
|
|
12067
|
+
kind: rest[1],
|
|
12068
|
+
limit: rest[2],
|
|
12069
|
+
offset: rest[3],
|
|
12070
|
+
order: rest[4]
|
|
12071
|
+
};
|
|
12072
|
+
}
|
|
12073
|
+
const ownerId = params.ownerId;
|
|
12074
|
+
const organizationId = params.organizationId;
|
|
12075
|
+
const kind = params.kind;
|
|
12076
|
+
const limit = params.limit;
|
|
12077
|
+
const offset = params.offset;
|
|
12078
|
+
const order = params.order;
|
|
11872
12079
|
const apiPath = '/v1/orderlists';
|
|
11873
12080
|
const apiPayload = {};
|
|
12081
|
+
if (typeof ownerId !== 'undefined') {
|
|
12082
|
+
apiPayload['owner_id'] = ownerId;
|
|
12083
|
+
}
|
|
12084
|
+
if (typeof organizationId !== 'undefined') {
|
|
12085
|
+
apiPayload['organization_id'] = organizationId;
|
|
12086
|
+
}
|
|
12087
|
+
if (typeof kind !== 'undefined') {
|
|
12088
|
+
apiPayload['kind'] = kind;
|
|
12089
|
+
}
|
|
12090
|
+
if (typeof limit !== 'undefined') {
|
|
12091
|
+
apiPayload['limit'] = limit;
|
|
12092
|
+
}
|
|
12093
|
+
if (typeof offset !== 'undefined') {
|
|
12094
|
+
apiPayload['offset'] = offset;
|
|
12095
|
+
}
|
|
12096
|
+
if (typeof order !== 'undefined') {
|
|
12097
|
+
apiPayload['order'] = order;
|
|
12098
|
+
}
|
|
11874
12099
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11875
12100
|
const apiHeaders = {};
|
|
11876
12101
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -11941,7 +12166,36 @@ class Orderlists {
|
|
|
11941
12166
|
const apiPath = '/v1/orderlists';
|
|
11942
12167
|
const apiPayload = {};
|
|
11943
12168
|
if (typeof items !== 'undefined') {
|
|
11944
|
-
apiPayload['items'] = items
|
|
12169
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
12170
|
+
"categorySlug": {
|
|
12171
|
+
"wire": "category_slug",
|
|
12172
|
+
"children": null
|
|
12173
|
+
},
|
|
12174
|
+
"costCenterId": {
|
|
12175
|
+
"wire": "cost_center_id",
|
|
12176
|
+
"children": null
|
|
12177
|
+
},
|
|
12178
|
+
"customSku": {
|
|
12179
|
+
"wire": "custom_sku",
|
|
12180
|
+
"children": null
|
|
12181
|
+
},
|
|
12182
|
+
"positionTexts": {
|
|
12183
|
+
"wire": "position_texts",
|
|
12184
|
+
"children": null
|
|
12185
|
+
},
|
|
12186
|
+
"productId": {
|
|
12187
|
+
"wire": "product_id",
|
|
12188
|
+
"children": null
|
|
12189
|
+
},
|
|
12190
|
+
"subcategorySlug": {
|
|
12191
|
+
"wire": "subcategory_slug",
|
|
12192
|
+
"children": null
|
|
12193
|
+
},
|
|
12194
|
+
"taxRate": {
|
|
12195
|
+
"wire": "tax_rate",
|
|
12196
|
+
"children": null
|
|
12197
|
+
}
|
|
12198
|
+
});
|
|
11945
12199
|
}
|
|
11946
12200
|
if (typeof kind !== 'undefined') {
|
|
11947
12201
|
apiPayload['kind'] = kind;
|
|
@@ -12337,7 +12591,36 @@ class Orderlists {
|
|
|
12337
12591
|
const apiPath = '/v1/orderlists/{list_id}/items'.replace('{list_id}', listId);
|
|
12338
12592
|
const apiPayload = {};
|
|
12339
12593
|
if (typeof items !== 'undefined') {
|
|
12340
|
-
apiPayload['items'] = items
|
|
12594
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
12595
|
+
"categorySlug": {
|
|
12596
|
+
"wire": "category_slug",
|
|
12597
|
+
"children": null
|
|
12598
|
+
},
|
|
12599
|
+
"costCenterId": {
|
|
12600
|
+
"wire": "cost_center_id",
|
|
12601
|
+
"children": null
|
|
12602
|
+
},
|
|
12603
|
+
"customSku": {
|
|
12604
|
+
"wire": "custom_sku",
|
|
12605
|
+
"children": null
|
|
12606
|
+
},
|
|
12607
|
+
"positionTexts": {
|
|
12608
|
+
"wire": "position_texts",
|
|
12609
|
+
"children": null
|
|
12610
|
+
},
|
|
12611
|
+
"productId": {
|
|
12612
|
+
"wire": "product_id",
|
|
12613
|
+
"children": null
|
|
12614
|
+
},
|
|
12615
|
+
"subcategorySlug": {
|
|
12616
|
+
"wire": "subcategory_slug",
|
|
12617
|
+
"children": null
|
|
12618
|
+
},
|
|
12619
|
+
"taxRate": {
|
|
12620
|
+
"wire": "tax_rate",
|
|
12621
|
+
"children": null
|
|
12622
|
+
}
|
|
12623
|
+
});
|
|
12341
12624
|
}
|
|
12342
12625
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12343
12626
|
const apiHeaders = {
|
|
@@ -12588,9 +12871,9 @@ class Orders {
|
|
|
12588
12871
|
|
|
12589
12872
|
/**
|
|
12590
12873
|
*
|
|
12591
|
-
* @param {
|
|
12592
|
-
* @param {
|
|
12593
|
-
* @param {
|
|
12874
|
+
* @param {OrderStatus} params.status - Filter by order status (exact match).
|
|
12875
|
+
* @param {OrderPaymentStatus} params.paymentStatus - Filter by payment status (exact match).
|
|
12876
|
+
* @param {OrderFulfillmentStatus} params.fulfillmentStatus - Filter by fulfillment status (exact match).
|
|
12594
12877
|
* @param {string} params.contactId - Filter to one ordering contact.
|
|
12595
12878
|
* @param {string} params.organizationId - Filter to one B2B organization.
|
|
12596
12879
|
* @param {string} params.channelId - Filter to one sales channel.
|
|
@@ -12605,9 +12888,9 @@ class Orders {
|
|
|
12605
12888
|
|
|
12606
12889
|
/**
|
|
12607
12890
|
*
|
|
12608
|
-
* @param {
|
|
12609
|
-
* @param {
|
|
12610
|
-
* @param {
|
|
12891
|
+
* @param {OrderStatus} status - Filter by order status (exact match).
|
|
12892
|
+
* @param {OrderPaymentStatus} paymentStatus - Filter by payment status (exact match).
|
|
12893
|
+
* @param {OrderFulfillmentStatus} fulfillmentStatus - Filter by fulfillment status (exact match).
|
|
12611
12894
|
* @param {string} contactId - Filter to one ordering contact.
|
|
12612
12895
|
* @param {string} organizationId - Filter to one B2B organization.
|
|
12613
12896
|
* @param {string} channelId - Filter to one sales channel.
|
|
@@ -12623,7 +12906,7 @@ class Orders {
|
|
|
12623
12906
|
|
|
12624
12907
|
ordersList(paramsOrFirst, ...rest) {
|
|
12625
12908
|
let params;
|
|
12626
|
-
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
12909
|
+
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)) {
|
|
12627
12910
|
params = paramsOrFirst || {};
|
|
12628
12911
|
} else {
|
|
12629
12912
|
params = {
|
|
@@ -13102,7 +13385,36 @@ class Orders {
|
|
|
13102
13385
|
apiPayload['grand_total'] = grandTotal;
|
|
13103
13386
|
}
|
|
13104
13387
|
if (typeof items !== 'undefined') {
|
|
13105
|
-
apiPayload['items'] = items
|
|
13388
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
13389
|
+
"costCenter": {
|
|
13390
|
+
"wire": "cost_center",
|
|
13391
|
+
"children": null
|
|
13392
|
+
},
|
|
13393
|
+
"positionText": {
|
|
13394
|
+
"wire": "position_text",
|
|
13395
|
+
"children": null
|
|
13396
|
+
},
|
|
13397
|
+
"productId": {
|
|
13398
|
+
"wire": "product_id",
|
|
13399
|
+
"children": null
|
|
13400
|
+
},
|
|
13401
|
+
"taxAmount": {
|
|
13402
|
+
"wire": "tax_amount",
|
|
13403
|
+
"children": null
|
|
13404
|
+
},
|
|
13405
|
+
"taxRate": {
|
|
13406
|
+
"wire": "tax_rate",
|
|
13407
|
+
"children": null
|
|
13408
|
+
},
|
|
13409
|
+
"unitPrice": {
|
|
13410
|
+
"wire": "unit_price",
|
|
13411
|
+
"children": null
|
|
13412
|
+
},
|
|
13413
|
+
"userData": {
|
|
13414
|
+
"wire": "user_data",
|
|
13415
|
+
"children": null
|
|
13416
|
+
}
|
|
13417
|
+
});
|
|
13106
13418
|
}
|
|
13107
13419
|
if (typeof marketId !== 'undefined') {
|
|
13108
13420
|
apiPayload['market_id'] = marketId;
|
|
@@ -13568,7 +13880,12 @@ class Orders {
|
|
|
13568
13880
|
apiPayload['cancelled_by'] = cancelledBy;
|
|
13569
13881
|
}
|
|
13570
13882
|
if (typeof positions !== 'undefined') {
|
|
13571
|
-
apiPayload['positions'] = positions
|
|
13883
|
+
apiPayload['positions'] = Client.toWireKeys(positions, {
|
|
13884
|
+
"orderItemId": {
|
|
13885
|
+
"wire": "order_item_id",
|
|
13886
|
+
"children": null
|
|
13887
|
+
}
|
|
13888
|
+
});
|
|
13572
13889
|
}
|
|
13573
13890
|
if (typeof reason !== 'undefined') {
|
|
13574
13891
|
apiPayload['reason'] = reason;
|
|
@@ -13683,7 +14000,12 @@ class Orders {
|
|
|
13683
14000
|
apiPayload['metadata'] = metadata;
|
|
13684
14001
|
}
|
|
13685
14002
|
if (typeof positions !== 'undefined') {
|
|
13686
|
-
apiPayload['positions'] = positions
|
|
14003
|
+
apiPayload['positions'] = Client.toWireKeys(positions, {
|
|
14004
|
+
"orderItemId": {
|
|
14005
|
+
"wire": "order_item_id",
|
|
14006
|
+
"children": null
|
|
14007
|
+
}
|
|
14008
|
+
});
|
|
13687
14009
|
}
|
|
13688
14010
|
if (typeof reason !== 'undefined') {
|
|
13689
14011
|
apiPayload['reason'] = reason;
|
|
@@ -13926,7 +14248,12 @@ class Orders {
|
|
|
13926
14248
|
apiPayload['number'] = number;
|
|
13927
14249
|
}
|
|
13928
14250
|
if (typeof positions !== 'undefined') {
|
|
13929
|
-
apiPayload['positions'] = positions
|
|
14251
|
+
apiPayload['positions'] = Client.toWireKeys(positions, {
|
|
14252
|
+
"orderItemId": {
|
|
14253
|
+
"wire": "order_item_id",
|
|
14254
|
+
"children": null
|
|
14255
|
+
}
|
|
14256
|
+
});
|
|
13930
14257
|
}
|
|
13931
14258
|
if (typeof shippedAt !== 'undefined') {
|
|
13932
14259
|
apiPayload['shipped_at'] = shippedAt;
|
|
@@ -17569,7 +17896,32 @@ class Prices {
|
|
|
17569
17896
|
const apiPath = '/v1/prices/lists/{list_id}/entries'.replace('{list_id}', listId);
|
|
17570
17897
|
const apiPayload = {};
|
|
17571
17898
|
if (typeof entries !== 'undefined') {
|
|
17572
|
-
apiPayload['entries'] = entries
|
|
17899
|
+
apiPayload['entries'] = Client.toWireKeys(entries, {
|
|
17900
|
+
"priceType": {
|
|
17901
|
+
"wire": "price_type",
|
|
17902
|
+
"children": null
|
|
17903
|
+
},
|
|
17904
|
+
"productId": {
|
|
17905
|
+
"wire": "product_id",
|
|
17906
|
+
"children": null
|
|
17907
|
+
},
|
|
17908
|
+
"quantityMin": {
|
|
17909
|
+
"wire": "quantity_min",
|
|
17910
|
+
"children": null
|
|
17911
|
+
},
|
|
17912
|
+
"unitPrice": {
|
|
17913
|
+
"wire": "unit_price",
|
|
17914
|
+
"children": null
|
|
17915
|
+
},
|
|
17916
|
+
"validFrom": {
|
|
17917
|
+
"wire": "valid_from",
|
|
17918
|
+
"children": null
|
|
17919
|
+
},
|
|
17920
|
+
"validUntil": {
|
|
17921
|
+
"wire": "valid_until",
|
|
17922
|
+
"children": null
|
|
17923
|
+
}
|
|
17924
|
+
});
|
|
17573
17925
|
}
|
|
17574
17926
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
17575
17927
|
const apiHeaders = {
|
|
@@ -17616,7 +17968,32 @@ class Prices {
|
|
|
17616
17968
|
const apiPath = '/v1/prices/lists/{list_id}/entries/bulk'.replace('{list_id}', listId);
|
|
17617
17969
|
const apiPayload = {};
|
|
17618
17970
|
if (typeof entries !== 'undefined') {
|
|
17619
|
-
apiPayload['entries'] = entries
|
|
17971
|
+
apiPayload['entries'] = Client.toWireKeys(entries, {
|
|
17972
|
+
"priceType": {
|
|
17973
|
+
"wire": "price_type",
|
|
17974
|
+
"children": null
|
|
17975
|
+
},
|
|
17976
|
+
"productId": {
|
|
17977
|
+
"wire": "product_id",
|
|
17978
|
+
"children": null
|
|
17979
|
+
},
|
|
17980
|
+
"quantityMin": {
|
|
17981
|
+
"wire": "quantity_min",
|
|
17982
|
+
"children": null
|
|
17983
|
+
},
|
|
17984
|
+
"unitPrice": {
|
|
17985
|
+
"wire": "unit_price",
|
|
17986
|
+
"children": null
|
|
17987
|
+
},
|
|
17988
|
+
"validFrom": {
|
|
17989
|
+
"wire": "valid_from",
|
|
17990
|
+
"children": null
|
|
17991
|
+
},
|
|
17992
|
+
"validUntil": {
|
|
17993
|
+
"wire": "valid_until",
|
|
17994
|
+
"children": null
|
|
17995
|
+
}
|
|
17996
|
+
});
|
|
17620
17997
|
}
|
|
17621
17998
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
17622
17999
|
const apiHeaders = {
|
|
@@ -17883,7 +18260,12 @@ class Prices {
|
|
|
17883
18260
|
apiPayload['currency'] = currency;
|
|
17884
18261
|
}
|
|
17885
18262
|
if (typeof items !== 'undefined') {
|
|
17886
|
-
apiPayload['items'] = items
|
|
18263
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
18264
|
+
"productId": {
|
|
18265
|
+
"wire": "product_id",
|
|
18266
|
+
"children": null
|
|
18267
|
+
}
|
|
18268
|
+
});
|
|
17887
18269
|
}
|
|
17888
18270
|
if (typeof marketId !== 'undefined') {
|
|
17889
18271
|
apiPayload['market_id'] = marketId;
|
|
@@ -17907,12 +18289,48 @@ class Products {
|
|
|
17907
18289
|
|
|
17908
18290
|
/**
|
|
17909
18291
|
*
|
|
18292
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
18293
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
18294
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
18295
|
+
* @throws {RevenexxException}
|
|
18296
|
+
* @returns {Promise<{}>}
|
|
18297
|
+
*/
|
|
18298
|
+
|
|
18299
|
+
/**
|
|
18300
|
+
*
|
|
18301
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
18302
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
18303
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
17910
18304
|
* @throws {RevenexxException}
|
|
17911
18305
|
* @returns {Promise<{}>}
|
|
18306
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
17912
18307
|
*/
|
|
17913
|
-
|
|
18308
|
+
|
|
18309
|
+
productsList(paramsOrFirst, ...rest) {
|
|
18310
|
+
let params;
|
|
18311
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
18312
|
+
params = paramsOrFirst || {};
|
|
18313
|
+
} else {
|
|
18314
|
+
params = {
|
|
18315
|
+
limit: paramsOrFirst,
|
|
18316
|
+
offset: rest[0],
|
|
18317
|
+
order: rest[1]
|
|
18318
|
+
};
|
|
18319
|
+
}
|
|
18320
|
+
const limit = params.limit;
|
|
18321
|
+
const offset = params.offset;
|
|
18322
|
+
const order = params.order;
|
|
17914
18323
|
const apiPath = '/v1/products';
|
|
17915
18324
|
const apiPayload = {};
|
|
18325
|
+
if (typeof limit !== 'undefined') {
|
|
18326
|
+
apiPayload['limit'] = limit;
|
|
18327
|
+
}
|
|
18328
|
+
if (typeof offset !== 'undefined') {
|
|
18329
|
+
apiPayload['offset'] = offset;
|
|
18330
|
+
}
|
|
18331
|
+
if (typeof order !== 'undefined') {
|
|
18332
|
+
apiPayload['order'] = order;
|
|
18333
|
+
}
|
|
17916
18334
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
17917
18335
|
const apiHeaders = {};
|
|
17918
18336
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -18030,12 +18448,48 @@ class Products {
|
|
|
18030
18448
|
|
|
18031
18449
|
/**
|
|
18032
18450
|
*
|
|
18451
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
18452
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
18453
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
18454
|
+
* @throws {RevenexxException}
|
|
18455
|
+
* @returns {Promise<{}>}
|
|
18456
|
+
*/
|
|
18457
|
+
|
|
18458
|
+
/**
|
|
18459
|
+
*
|
|
18460
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
18461
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
18462
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
18033
18463
|
* @throws {RevenexxException}
|
|
18034
18464
|
* @returns {Promise<{}>}
|
|
18465
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
18035
18466
|
*/
|
|
18036
|
-
|
|
18467
|
+
|
|
18468
|
+
productsAssetFamiliesList(paramsOrFirst, ...rest) {
|
|
18469
|
+
let params;
|
|
18470
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
18471
|
+
params = paramsOrFirst || {};
|
|
18472
|
+
} else {
|
|
18473
|
+
params = {
|
|
18474
|
+
limit: paramsOrFirst,
|
|
18475
|
+
offset: rest[0],
|
|
18476
|
+
order: rest[1]
|
|
18477
|
+
};
|
|
18478
|
+
}
|
|
18479
|
+
const limit = params.limit;
|
|
18480
|
+
const offset = params.offset;
|
|
18481
|
+
const order = params.order;
|
|
18037
18482
|
const apiPath = '/v1/products/asset_families';
|
|
18038
18483
|
const apiPayload = {};
|
|
18484
|
+
if (typeof limit !== 'undefined') {
|
|
18485
|
+
apiPayload['limit'] = limit;
|
|
18486
|
+
}
|
|
18487
|
+
if (typeof offset !== 'undefined') {
|
|
18488
|
+
apiPayload['offset'] = offset;
|
|
18489
|
+
}
|
|
18490
|
+
if (typeof order !== 'undefined') {
|
|
18491
|
+
apiPayload['order'] = order;
|
|
18492
|
+
}
|
|
18039
18493
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
18040
18494
|
const apiHeaders = {};
|
|
18041
18495
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -18225,12 +18679,48 @@ class Products {
|
|
|
18225
18679
|
|
|
18226
18680
|
/**
|
|
18227
18681
|
*
|
|
18682
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
18683
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
18684
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
18228
18685
|
* @throws {RevenexxException}
|
|
18229
18686
|
* @returns {Promise<{}>}
|
|
18230
18687
|
*/
|
|
18231
|
-
|
|
18232
|
-
|
|
18688
|
+
|
|
18689
|
+
/**
|
|
18690
|
+
*
|
|
18691
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
18692
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
18693
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
18694
|
+
* @throws {RevenexxException}
|
|
18695
|
+
* @returns {Promise<{}>}
|
|
18696
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
18697
|
+
*/
|
|
18698
|
+
|
|
18699
|
+
productsAssetsList(paramsOrFirst, ...rest) {
|
|
18700
|
+
let params;
|
|
18701
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
18702
|
+
params = paramsOrFirst || {};
|
|
18703
|
+
} else {
|
|
18704
|
+
params = {
|
|
18705
|
+
limit: paramsOrFirst,
|
|
18706
|
+
offset: rest[0],
|
|
18707
|
+
order: rest[1]
|
|
18708
|
+
};
|
|
18709
|
+
}
|
|
18710
|
+
const limit = params.limit;
|
|
18711
|
+
const offset = params.offset;
|
|
18712
|
+
const order = params.order;
|
|
18713
|
+
const apiPath = '/v1/products/assets';
|
|
18233
18714
|
const apiPayload = {};
|
|
18715
|
+
if (typeof limit !== 'undefined') {
|
|
18716
|
+
apiPayload['limit'] = limit;
|
|
18717
|
+
}
|
|
18718
|
+
if (typeof offset !== 'undefined') {
|
|
18719
|
+
apiPayload['offset'] = offset;
|
|
18720
|
+
}
|
|
18721
|
+
if (typeof order !== 'undefined') {
|
|
18722
|
+
apiPayload['order'] = order;
|
|
18723
|
+
}
|
|
18234
18724
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
18235
18725
|
const apiHeaders = {};
|
|
18236
18726
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -18437,12 +18927,48 @@ class Products {
|
|
|
18437
18927
|
|
|
18438
18928
|
/**
|
|
18439
18929
|
*
|
|
18930
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
18931
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
18932
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
18440
18933
|
* @throws {RevenexxException}
|
|
18441
18934
|
* @returns {Promise<{}>}
|
|
18442
18935
|
*/
|
|
18443
|
-
|
|
18936
|
+
|
|
18937
|
+
/**
|
|
18938
|
+
*
|
|
18939
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
18940
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
18941
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
18942
|
+
* @throws {RevenexxException}
|
|
18943
|
+
* @returns {Promise<{}>}
|
|
18944
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
18945
|
+
*/
|
|
18946
|
+
|
|
18947
|
+
productsAssociationTypesList(paramsOrFirst, ...rest) {
|
|
18948
|
+
let params;
|
|
18949
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
18950
|
+
params = paramsOrFirst || {};
|
|
18951
|
+
} else {
|
|
18952
|
+
params = {
|
|
18953
|
+
limit: paramsOrFirst,
|
|
18954
|
+
offset: rest[0],
|
|
18955
|
+
order: rest[1]
|
|
18956
|
+
};
|
|
18957
|
+
}
|
|
18958
|
+
const limit = params.limit;
|
|
18959
|
+
const offset = params.offset;
|
|
18960
|
+
const order = params.order;
|
|
18444
18961
|
const apiPath = '/v1/products/association_types';
|
|
18445
18962
|
const apiPayload = {};
|
|
18963
|
+
if (typeof limit !== 'undefined') {
|
|
18964
|
+
apiPayload['limit'] = limit;
|
|
18965
|
+
}
|
|
18966
|
+
if (typeof offset !== 'undefined') {
|
|
18967
|
+
apiPayload['offset'] = offset;
|
|
18968
|
+
}
|
|
18969
|
+
if (typeof order !== 'undefined') {
|
|
18970
|
+
apiPayload['order'] = order;
|
|
18971
|
+
}
|
|
18446
18972
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
18447
18973
|
const apiHeaders = {};
|
|
18448
18974
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -18646,12 +19172,48 @@ class Products {
|
|
|
18646
19172
|
|
|
18647
19173
|
/**
|
|
18648
19174
|
*
|
|
19175
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
19176
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
19177
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
19178
|
+
* @throws {RevenexxException}
|
|
19179
|
+
* @returns {Promise<{}>}
|
|
19180
|
+
*/
|
|
19181
|
+
|
|
19182
|
+
/**
|
|
19183
|
+
*
|
|
19184
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
19185
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
19186
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
18649
19187
|
* @throws {RevenexxException}
|
|
18650
19188
|
* @returns {Promise<{}>}
|
|
19189
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
18651
19190
|
*/
|
|
18652
|
-
|
|
19191
|
+
|
|
19192
|
+
productsAttributeGroupsList(paramsOrFirst, ...rest) {
|
|
19193
|
+
let params;
|
|
19194
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
19195
|
+
params = paramsOrFirst || {};
|
|
19196
|
+
} else {
|
|
19197
|
+
params = {
|
|
19198
|
+
limit: paramsOrFirst,
|
|
19199
|
+
offset: rest[0],
|
|
19200
|
+
order: rest[1]
|
|
19201
|
+
};
|
|
19202
|
+
}
|
|
19203
|
+
const limit = params.limit;
|
|
19204
|
+
const offset = params.offset;
|
|
19205
|
+
const order = params.order;
|
|
18653
19206
|
const apiPath = '/v1/products/attribute_groups';
|
|
18654
19207
|
const apiPayload = {};
|
|
19208
|
+
if (typeof limit !== 'undefined') {
|
|
19209
|
+
apiPayload['limit'] = limit;
|
|
19210
|
+
}
|
|
19211
|
+
if (typeof offset !== 'undefined') {
|
|
19212
|
+
apiPayload['offset'] = offset;
|
|
19213
|
+
}
|
|
19214
|
+
if (typeof order !== 'undefined') {
|
|
19215
|
+
apiPayload['order'] = order;
|
|
19216
|
+
}
|
|
18655
19217
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
18656
19218
|
const apiHeaders = {};
|
|
18657
19219
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -18841,12 +19403,48 @@ class Products {
|
|
|
18841
19403
|
|
|
18842
19404
|
/**
|
|
18843
19405
|
*
|
|
19406
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
19407
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
19408
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
18844
19409
|
* @throws {RevenexxException}
|
|
18845
19410
|
* @returns {Promise<{}>}
|
|
18846
19411
|
*/
|
|
18847
|
-
|
|
19412
|
+
|
|
19413
|
+
/**
|
|
19414
|
+
*
|
|
19415
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
19416
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
19417
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
19418
|
+
* @throws {RevenexxException}
|
|
19419
|
+
* @returns {Promise<{}>}
|
|
19420
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
19421
|
+
*/
|
|
19422
|
+
|
|
19423
|
+
productsAttributeOptionsList(paramsOrFirst, ...rest) {
|
|
19424
|
+
let params;
|
|
19425
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
19426
|
+
params = paramsOrFirst || {};
|
|
19427
|
+
} else {
|
|
19428
|
+
params = {
|
|
19429
|
+
limit: paramsOrFirst,
|
|
19430
|
+
offset: rest[0],
|
|
19431
|
+
order: rest[1]
|
|
19432
|
+
};
|
|
19433
|
+
}
|
|
19434
|
+
const limit = params.limit;
|
|
19435
|
+
const offset = params.offset;
|
|
19436
|
+
const order = params.order;
|
|
18848
19437
|
const apiPath = '/v1/products/attribute_options';
|
|
18849
19438
|
const apiPayload = {};
|
|
19439
|
+
if (typeof limit !== 'undefined') {
|
|
19440
|
+
apiPayload['limit'] = limit;
|
|
19441
|
+
}
|
|
19442
|
+
if (typeof offset !== 'undefined') {
|
|
19443
|
+
apiPayload['offset'] = offset;
|
|
19444
|
+
}
|
|
19445
|
+
if (typeof order !== 'undefined') {
|
|
19446
|
+
apiPayload['order'] = order;
|
|
19447
|
+
}
|
|
18850
19448
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
18851
19449
|
const apiHeaders = {};
|
|
18852
19450
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -19067,12 +19665,48 @@ class Products {
|
|
|
19067
19665
|
|
|
19068
19666
|
/**
|
|
19069
19667
|
*
|
|
19668
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
19669
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
19670
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
19671
|
+
* @throws {RevenexxException}
|
|
19672
|
+
* @returns {Promise<{}>}
|
|
19673
|
+
*/
|
|
19674
|
+
|
|
19675
|
+
/**
|
|
19676
|
+
*
|
|
19677
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
19678
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
19679
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
19070
19680
|
* @throws {RevenexxException}
|
|
19071
19681
|
* @returns {Promise<{}>}
|
|
19682
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
19072
19683
|
*/
|
|
19073
|
-
|
|
19684
|
+
|
|
19685
|
+
productsAttributesList(paramsOrFirst, ...rest) {
|
|
19686
|
+
let params;
|
|
19687
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
19688
|
+
params = paramsOrFirst || {};
|
|
19689
|
+
} else {
|
|
19690
|
+
params = {
|
|
19691
|
+
limit: paramsOrFirst,
|
|
19692
|
+
offset: rest[0],
|
|
19693
|
+
order: rest[1]
|
|
19694
|
+
};
|
|
19695
|
+
}
|
|
19696
|
+
const limit = params.limit;
|
|
19697
|
+
const offset = params.offset;
|
|
19698
|
+
const order = params.order;
|
|
19074
19699
|
const apiPath = '/v1/products/attributes';
|
|
19075
19700
|
const apiPayload = {};
|
|
19701
|
+
if (typeof limit !== 'undefined') {
|
|
19702
|
+
apiPayload['limit'] = limit;
|
|
19703
|
+
}
|
|
19704
|
+
if (typeof offset !== 'undefined') {
|
|
19705
|
+
apiPayload['offset'] = offset;
|
|
19706
|
+
}
|
|
19707
|
+
if (typeof order !== 'undefined') {
|
|
19708
|
+
apiPayload['order'] = order;
|
|
19709
|
+
}
|
|
19076
19710
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
19077
19711
|
const apiHeaders = {};
|
|
19078
19712
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -19463,12 +20097,48 @@ class Products {
|
|
|
19463
20097
|
|
|
19464
20098
|
/**
|
|
19465
20099
|
*
|
|
20100
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
20101
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
20102
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
20103
|
+
* @throws {RevenexxException}
|
|
20104
|
+
* @returns {Promise<{}>}
|
|
20105
|
+
*/
|
|
20106
|
+
|
|
20107
|
+
/**
|
|
20108
|
+
*
|
|
20109
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
20110
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
20111
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
19466
20112
|
* @throws {RevenexxException}
|
|
19467
20113
|
* @returns {Promise<{}>}
|
|
20114
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
19468
20115
|
*/
|
|
19469
|
-
|
|
20116
|
+
|
|
20117
|
+
productsCategoriesList(paramsOrFirst, ...rest) {
|
|
20118
|
+
let params;
|
|
20119
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
20120
|
+
params = paramsOrFirst || {};
|
|
20121
|
+
} else {
|
|
20122
|
+
params = {
|
|
20123
|
+
limit: paramsOrFirst,
|
|
20124
|
+
offset: rest[0],
|
|
20125
|
+
order: rest[1]
|
|
20126
|
+
};
|
|
20127
|
+
}
|
|
20128
|
+
const limit = params.limit;
|
|
20129
|
+
const offset = params.offset;
|
|
20130
|
+
const order = params.order;
|
|
19470
20131
|
const apiPath = '/v1/products/categories';
|
|
19471
20132
|
const apiPayload = {};
|
|
20133
|
+
if (typeof limit !== 'undefined') {
|
|
20134
|
+
apiPayload['limit'] = limit;
|
|
20135
|
+
}
|
|
20136
|
+
if (typeof offset !== 'undefined') {
|
|
20137
|
+
apiPayload['offset'] = offset;
|
|
20138
|
+
}
|
|
20139
|
+
if (typeof order !== 'undefined') {
|
|
20140
|
+
apiPayload['order'] = order;
|
|
20141
|
+
}
|
|
19472
20142
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
19473
20143
|
const apiHeaders = {};
|
|
19474
20144
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -19700,12 +20370,48 @@ class Products {
|
|
|
19700
20370
|
|
|
19701
20371
|
/**
|
|
19702
20372
|
*
|
|
20373
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
20374
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
20375
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
19703
20376
|
* @throws {RevenexxException}
|
|
19704
20377
|
* @returns {Promise<{}>}
|
|
19705
20378
|
*/
|
|
19706
|
-
|
|
20379
|
+
|
|
20380
|
+
/**
|
|
20381
|
+
*
|
|
20382
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
20383
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
20384
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
20385
|
+
* @throws {RevenexxException}
|
|
20386
|
+
* @returns {Promise<{}>}
|
|
20387
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
20388
|
+
*/
|
|
20389
|
+
|
|
20390
|
+
productsFamiliesList(paramsOrFirst, ...rest) {
|
|
20391
|
+
let params;
|
|
20392
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
20393
|
+
params = paramsOrFirst || {};
|
|
20394
|
+
} else {
|
|
20395
|
+
params = {
|
|
20396
|
+
limit: paramsOrFirst,
|
|
20397
|
+
offset: rest[0],
|
|
20398
|
+
order: rest[1]
|
|
20399
|
+
};
|
|
20400
|
+
}
|
|
20401
|
+
const limit = params.limit;
|
|
20402
|
+
const offset = params.offset;
|
|
20403
|
+
const order = params.order;
|
|
19707
20404
|
const apiPath = '/v1/products/families';
|
|
19708
20405
|
const apiPayload = {};
|
|
20406
|
+
if (typeof limit !== 'undefined') {
|
|
20407
|
+
apiPayload['limit'] = limit;
|
|
20408
|
+
}
|
|
20409
|
+
if (typeof offset !== 'undefined') {
|
|
20410
|
+
apiPayload['offset'] = offset;
|
|
20411
|
+
}
|
|
20412
|
+
if (typeof order !== 'undefined') {
|
|
20413
|
+
apiPayload['order'] = order;
|
|
20414
|
+
}
|
|
19709
20415
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
19710
20416
|
const apiHeaders = {};
|
|
19711
20417
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -19909,12 +20615,48 @@ class Products {
|
|
|
19909
20615
|
|
|
19910
20616
|
/**
|
|
19911
20617
|
*
|
|
20618
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
20619
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
20620
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
20621
|
+
* @throws {RevenexxException}
|
|
20622
|
+
* @returns {Promise<{}>}
|
|
20623
|
+
*/
|
|
20624
|
+
|
|
20625
|
+
/**
|
|
20626
|
+
*
|
|
20627
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
20628
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
20629
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
19912
20630
|
* @throws {RevenexxException}
|
|
19913
20631
|
* @returns {Promise<{}>}
|
|
20632
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
19914
20633
|
*/
|
|
19915
|
-
|
|
20634
|
+
|
|
20635
|
+
productsFamilyAttributesList(paramsOrFirst, ...rest) {
|
|
20636
|
+
let params;
|
|
20637
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
20638
|
+
params = paramsOrFirst || {};
|
|
20639
|
+
} else {
|
|
20640
|
+
params = {
|
|
20641
|
+
limit: paramsOrFirst,
|
|
20642
|
+
offset: rest[0],
|
|
20643
|
+
order: rest[1]
|
|
20644
|
+
};
|
|
20645
|
+
}
|
|
20646
|
+
const limit = params.limit;
|
|
20647
|
+
const offset = params.offset;
|
|
20648
|
+
const order = params.order;
|
|
19916
20649
|
const apiPath = '/v1/products/family_attributes';
|
|
19917
20650
|
const apiPayload = {};
|
|
20651
|
+
if (typeof limit !== 'undefined') {
|
|
20652
|
+
apiPayload['limit'] = limit;
|
|
20653
|
+
}
|
|
20654
|
+
if (typeof offset !== 'undefined') {
|
|
20655
|
+
apiPayload['offset'] = offset;
|
|
20656
|
+
}
|
|
20657
|
+
if (typeof order !== 'undefined') {
|
|
20658
|
+
apiPayload['order'] = order;
|
|
20659
|
+
}
|
|
19918
20660
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
19919
20661
|
const apiHeaders = {};
|
|
19920
20662
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -20135,12 +20877,48 @@ class Products {
|
|
|
20135
20877
|
|
|
20136
20878
|
/**
|
|
20137
20879
|
*
|
|
20880
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
20881
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
20882
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
20883
|
+
* @throws {RevenexxException}
|
|
20884
|
+
* @returns {Promise<{}>}
|
|
20885
|
+
*/
|
|
20886
|
+
|
|
20887
|
+
/**
|
|
20888
|
+
*
|
|
20889
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
20890
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
20891
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
20138
20892
|
* @throws {RevenexxException}
|
|
20139
20893
|
* @returns {Promise<{}>}
|
|
20894
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
20140
20895
|
*/
|
|
20141
|
-
|
|
20896
|
+
|
|
20897
|
+
productsFamilyVariantsList(paramsOrFirst, ...rest) {
|
|
20898
|
+
let params;
|
|
20899
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
20900
|
+
params = paramsOrFirst || {};
|
|
20901
|
+
} else {
|
|
20902
|
+
params = {
|
|
20903
|
+
limit: paramsOrFirst,
|
|
20904
|
+
offset: rest[0],
|
|
20905
|
+
order: rest[1]
|
|
20906
|
+
};
|
|
20907
|
+
}
|
|
20908
|
+
const limit = params.limit;
|
|
20909
|
+
const offset = params.offset;
|
|
20910
|
+
const order = params.order;
|
|
20142
20911
|
const apiPath = '/v1/products/family_variants';
|
|
20143
20912
|
const apiPayload = {};
|
|
20913
|
+
if (typeof limit !== 'undefined') {
|
|
20914
|
+
apiPayload['limit'] = limit;
|
|
20915
|
+
}
|
|
20916
|
+
if (typeof offset !== 'undefined') {
|
|
20917
|
+
apiPayload['offset'] = offset;
|
|
20918
|
+
}
|
|
20919
|
+
if (typeof order !== 'undefined') {
|
|
20920
|
+
apiPayload['order'] = order;
|
|
20921
|
+
}
|
|
20144
20922
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
20145
20923
|
const apiHeaders = {};
|
|
20146
20924
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -20347,12 +21125,48 @@ class Products {
|
|
|
20347
21125
|
|
|
20348
21126
|
/**
|
|
20349
21127
|
*
|
|
21128
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
21129
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
21130
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
20350
21131
|
* @throws {RevenexxException}
|
|
20351
21132
|
* @returns {Promise<{}>}
|
|
20352
21133
|
*/
|
|
20353
|
-
|
|
21134
|
+
|
|
21135
|
+
/**
|
|
21136
|
+
*
|
|
21137
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
21138
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
21139
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
21140
|
+
* @throws {RevenexxException}
|
|
21141
|
+
* @returns {Promise<{}>}
|
|
21142
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
21143
|
+
*/
|
|
21144
|
+
|
|
21145
|
+
productsMeasurementFamiliesList(paramsOrFirst, ...rest) {
|
|
21146
|
+
let params;
|
|
21147
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
21148
|
+
params = paramsOrFirst || {};
|
|
21149
|
+
} else {
|
|
21150
|
+
params = {
|
|
21151
|
+
limit: paramsOrFirst,
|
|
21152
|
+
offset: rest[0],
|
|
21153
|
+
order: rest[1]
|
|
21154
|
+
};
|
|
21155
|
+
}
|
|
21156
|
+
const limit = params.limit;
|
|
21157
|
+
const offset = params.offset;
|
|
21158
|
+
const order = params.order;
|
|
20354
21159
|
const apiPath = '/v1/products/measurement_families';
|
|
20355
21160
|
const apiPayload = {};
|
|
21161
|
+
if (typeof limit !== 'undefined') {
|
|
21162
|
+
apiPayload['limit'] = limit;
|
|
21163
|
+
}
|
|
21164
|
+
if (typeof offset !== 'undefined') {
|
|
21165
|
+
apiPayload['offset'] = offset;
|
|
21166
|
+
}
|
|
21167
|
+
if (typeof order !== 'undefined') {
|
|
21168
|
+
apiPayload['order'] = order;
|
|
21169
|
+
}
|
|
20356
21170
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
20357
21171
|
const apiHeaders = {};
|
|
20358
21172
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -20559,12 +21373,48 @@ class Products {
|
|
|
20559
21373
|
|
|
20560
21374
|
/**
|
|
20561
21375
|
*
|
|
21376
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
21377
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
21378
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
20562
21379
|
* @throws {RevenexxException}
|
|
20563
21380
|
* @returns {Promise<{}>}
|
|
20564
21381
|
*/
|
|
20565
|
-
|
|
21382
|
+
|
|
21383
|
+
/**
|
|
21384
|
+
*
|
|
21385
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
21386
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
21387
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
21388
|
+
* @throws {RevenexxException}
|
|
21389
|
+
* @returns {Promise<{}>}
|
|
21390
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
21391
|
+
*/
|
|
21392
|
+
|
|
21393
|
+
productsProductAssociationsList(paramsOrFirst, ...rest) {
|
|
21394
|
+
let params;
|
|
21395
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
21396
|
+
params = paramsOrFirst || {};
|
|
21397
|
+
} else {
|
|
21398
|
+
params = {
|
|
21399
|
+
limit: paramsOrFirst,
|
|
21400
|
+
offset: rest[0],
|
|
21401
|
+
order: rest[1]
|
|
21402
|
+
};
|
|
21403
|
+
}
|
|
21404
|
+
const limit = params.limit;
|
|
21405
|
+
const offset = params.offset;
|
|
21406
|
+
const order = params.order;
|
|
20566
21407
|
const apiPath = '/v1/products/product_associations';
|
|
20567
21408
|
const apiPayload = {};
|
|
21409
|
+
if (typeof limit !== 'undefined') {
|
|
21410
|
+
apiPayload['limit'] = limit;
|
|
21411
|
+
}
|
|
21412
|
+
if (typeof offset !== 'undefined') {
|
|
21413
|
+
apiPayload['offset'] = offset;
|
|
21414
|
+
}
|
|
21415
|
+
if (typeof order !== 'undefined') {
|
|
21416
|
+
apiPayload['order'] = order;
|
|
21417
|
+
}
|
|
20568
21418
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
20569
21419
|
const apiHeaders = {};
|
|
20570
21420
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -20788,12 +21638,48 @@ class Products {
|
|
|
20788
21638
|
|
|
20789
21639
|
/**
|
|
20790
21640
|
*
|
|
21641
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
21642
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
21643
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
21644
|
+
* @throws {RevenexxException}
|
|
21645
|
+
* @returns {Promise<{}>}
|
|
21646
|
+
*/
|
|
21647
|
+
|
|
21648
|
+
/**
|
|
21649
|
+
*
|
|
21650
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
21651
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
21652
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
20791
21653
|
* @throws {RevenexxException}
|
|
20792
21654
|
* @returns {Promise<{}>}
|
|
21655
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
20793
21656
|
*/
|
|
20794
|
-
|
|
21657
|
+
|
|
21658
|
+
productsProductCategoriesList(paramsOrFirst, ...rest) {
|
|
21659
|
+
let params;
|
|
21660
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
21661
|
+
params = paramsOrFirst || {};
|
|
21662
|
+
} else {
|
|
21663
|
+
params = {
|
|
21664
|
+
limit: paramsOrFirst,
|
|
21665
|
+
offset: rest[0],
|
|
21666
|
+
order: rest[1]
|
|
21667
|
+
};
|
|
21668
|
+
}
|
|
21669
|
+
const limit = params.limit;
|
|
21670
|
+
const offset = params.offset;
|
|
21671
|
+
const order = params.order;
|
|
20795
21672
|
const apiPath = '/v1/products/product_categories';
|
|
20796
21673
|
const apiPayload = {};
|
|
21674
|
+
if (typeof limit !== 'undefined') {
|
|
21675
|
+
apiPayload['limit'] = limit;
|
|
21676
|
+
}
|
|
21677
|
+
if (typeof offset !== 'undefined') {
|
|
21678
|
+
apiPayload['offset'] = offset;
|
|
21679
|
+
}
|
|
21680
|
+
if (typeof order !== 'undefined') {
|
|
21681
|
+
apiPayload['order'] = order;
|
|
21682
|
+
}
|
|
20797
21683
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
20798
21684
|
const apiHeaders = {};
|
|
20799
21685
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -20986,12 +21872,48 @@ class Products {
|
|
|
20986
21872
|
|
|
20987
21873
|
/**
|
|
20988
21874
|
*
|
|
21875
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
21876
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
21877
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
21878
|
+
* @throws {RevenexxException}
|
|
21879
|
+
* @returns {Promise<{}>}
|
|
21880
|
+
*/
|
|
21881
|
+
|
|
21882
|
+
/**
|
|
21883
|
+
*
|
|
21884
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
21885
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
21886
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
20989
21887
|
* @throws {RevenexxException}
|
|
20990
21888
|
* @returns {Promise<{}>}
|
|
21889
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
20991
21890
|
*/
|
|
20992
|
-
|
|
21891
|
+
|
|
21892
|
+
productsReferenceEntitiesList(paramsOrFirst, ...rest) {
|
|
21893
|
+
let params;
|
|
21894
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
21895
|
+
params = paramsOrFirst || {};
|
|
21896
|
+
} else {
|
|
21897
|
+
params = {
|
|
21898
|
+
limit: paramsOrFirst,
|
|
21899
|
+
offset: rest[0],
|
|
21900
|
+
order: rest[1]
|
|
21901
|
+
};
|
|
21902
|
+
}
|
|
21903
|
+
const limit = params.limit;
|
|
21904
|
+
const offset = params.offset;
|
|
21905
|
+
const order = params.order;
|
|
20993
21906
|
const apiPath = '/v1/products/reference_entities';
|
|
20994
21907
|
const apiPayload = {};
|
|
21908
|
+
if (typeof limit !== 'undefined') {
|
|
21909
|
+
apiPayload['limit'] = limit;
|
|
21910
|
+
}
|
|
21911
|
+
if (typeof offset !== 'undefined') {
|
|
21912
|
+
apiPayload['offset'] = offset;
|
|
21913
|
+
}
|
|
21914
|
+
if (typeof order !== 'undefined') {
|
|
21915
|
+
apiPayload['order'] = order;
|
|
21916
|
+
}
|
|
20995
21917
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
20996
21918
|
const apiHeaders = {};
|
|
20997
21919
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -21181,12 +22103,48 @@ class Products {
|
|
|
21181
22103
|
|
|
21182
22104
|
/**
|
|
21183
22105
|
*
|
|
22106
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
22107
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
22108
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
22109
|
+
* @throws {RevenexxException}
|
|
22110
|
+
* @returns {Promise<{}>}
|
|
22111
|
+
*/
|
|
22112
|
+
|
|
22113
|
+
/**
|
|
22114
|
+
*
|
|
22115
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
22116
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
22117
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
21184
22118
|
* @throws {RevenexxException}
|
|
21185
22119
|
* @returns {Promise<{}>}
|
|
22120
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
21186
22121
|
*/
|
|
21187
|
-
|
|
22122
|
+
|
|
22123
|
+
productsReferenceEntityRecordsList(paramsOrFirst, ...rest) {
|
|
22124
|
+
let params;
|
|
22125
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
22126
|
+
params = paramsOrFirst || {};
|
|
22127
|
+
} else {
|
|
22128
|
+
params = {
|
|
22129
|
+
limit: paramsOrFirst,
|
|
22130
|
+
offset: rest[0],
|
|
22131
|
+
order: rest[1]
|
|
22132
|
+
};
|
|
22133
|
+
}
|
|
22134
|
+
const limit = params.limit;
|
|
22135
|
+
const offset = params.offset;
|
|
22136
|
+
const order = params.order;
|
|
21188
22137
|
const apiPath = '/v1/products/reference_entity_records';
|
|
21189
22138
|
const apiPayload = {};
|
|
22139
|
+
if (typeof limit !== 'undefined') {
|
|
22140
|
+
apiPayload['limit'] = limit;
|
|
22141
|
+
}
|
|
22142
|
+
if (typeof offset !== 'undefined') {
|
|
22143
|
+
apiPayload['offset'] = offset;
|
|
22144
|
+
}
|
|
22145
|
+
if (typeof order !== 'undefined') {
|
|
22146
|
+
apiPayload['order'] = order;
|
|
22147
|
+
}
|
|
21190
22148
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
21191
22149
|
const apiHeaders = {};
|
|
21192
22150
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -21840,7 +22798,28 @@ class Search {
|
|
|
21840
22798
|
const apiPath = '/v1/search/multi_search';
|
|
21841
22799
|
const apiPayload = {};
|
|
21842
22800
|
if (typeof searches !== 'undefined') {
|
|
21843
|
-
apiPayload['searches'] = searches
|
|
22801
|
+
apiPayload['searches'] = Client.toWireKeys(searches, {
|
|
22802
|
+
"facetBy": {
|
|
22803
|
+
"wire": "facet_by",
|
|
22804
|
+
"children": null
|
|
22805
|
+
},
|
|
22806
|
+
"filterBy": {
|
|
22807
|
+
"wire": "filter_by",
|
|
22808
|
+
"children": null
|
|
22809
|
+
},
|
|
22810
|
+
"perPage": {
|
|
22811
|
+
"wire": "per_page",
|
|
22812
|
+
"children": null
|
|
22813
|
+
},
|
|
22814
|
+
"queryBy": {
|
|
22815
|
+
"wire": "query_by",
|
|
22816
|
+
"children": null
|
|
22817
|
+
},
|
|
22818
|
+
"sortBy": {
|
|
22819
|
+
"wire": "sort_by",
|
|
22820
|
+
"children": null
|
|
22821
|
+
}
|
|
22822
|
+
});
|
|
21844
22823
|
}
|
|
21845
22824
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
21846
22825
|
const apiHeaders = {
|
|
@@ -22394,7 +23373,12 @@ class Shipping {
|
|
|
22394
23373
|
const apiPath = '/v1/shipping/methods/{method_id}/tiers'.replace('{method_id}', methodId);
|
|
22395
23374
|
const apiPayload = {};
|
|
22396
23375
|
if (typeof tiers !== 'undefined') {
|
|
22397
|
-
apiPayload['tiers'] = tiers
|
|
23376
|
+
apiPayload['tiers'] = Client.toWireKeys(tiers, {
|
|
23377
|
+
"fromValue": {
|
|
23378
|
+
"wire": "from_value",
|
|
23379
|
+
"children": null
|
|
23380
|
+
}
|
|
23381
|
+
});
|
|
22398
23382
|
}
|
|
22399
23383
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
22400
23384
|
const apiHeaders = {
|
|
@@ -27275,10 +28259,13 @@ let OrderListKind = /*#__PURE__*/function (OrderListKind) {
|
|
|
27275
28259
|
return OrderListKind;
|
|
27276
28260
|
}({});
|
|
27277
28261
|
|
|
27278
|
-
let
|
|
27279
|
-
|
|
27280
|
-
|
|
27281
|
-
|
|
28262
|
+
let OrderStatus = /*#__PURE__*/function (OrderStatus) {
|
|
28263
|
+
OrderStatus["Pending"] = "pending";
|
|
28264
|
+
OrderStatus["Placed"] = "placed";
|
|
28265
|
+
OrderStatus["InFulfillment"] = "in_fulfillment";
|
|
28266
|
+
OrderStatus["Completed"] = "completed";
|
|
28267
|
+
OrderStatus["Cancelled"] = "cancelled";
|
|
28268
|
+
return OrderStatus;
|
|
27282
28269
|
}({});
|
|
27283
28270
|
|
|
27284
28271
|
let OrderPaymentStatus = /*#__PURE__*/function (OrderPaymentStatus) {
|
|
@@ -27292,6 +28279,19 @@ let OrderPaymentStatus = /*#__PURE__*/function (OrderPaymentStatus) {
|
|
|
27292
28279
|
return OrderPaymentStatus;
|
|
27293
28280
|
}({});
|
|
27294
28281
|
|
|
28282
|
+
let OrderFulfillmentStatus = /*#__PURE__*/function (OrderFulfillmentStatus) {
|
|
28283
|
+
OrderFulfillmentStatus["Unfulfilled"] = "unfulfilled";
|
|
28284
|
+
OrderFulfillmentStatus["Partial"] = "partial";
|
|
28285
|
+
OrderFulfillmentStatus["Fulfilled"] = "fulfilled";
|
|
28286
|
+
return OrderFulfillmentStatus;
|
|
28287
|
+
}({});
|
|
28288
|
+
|
|
28289
|
+
let OrderCommentVisibility = /*#__PURE__*/function (OrderCommentVisibility) {
|
|
28290
|
+
OrderCommentVisibility["Internal"] = "internal";
|
|
28291
|
+
OrderCommentVisibility["Customer"] = "customer";
|
|
28292
|
+
return OrderCommentVisibility;
|
|
28293
|
+
}({});
|
|
28294
|
+
|
|
27295
28295
|
let PageStatus = /*#__PURE__*/function (PageStatus) {
|
|
27296
28296
|
PageStatus["Draft"] = "draft";
|
|
27297
28297
|
PageStatus["Published"] = "published";
|
|
@@ -27910,9 +28910,11 @@ exports.Messaging = Messaging;
|
|
|
27910
28910
|
exports.Method = Method;
|
|
27911
28911
|
exports.Operator = Operator;
|
|
27912
28912
|
exports.OrderCommentVisibility = OrderCommentVisibility;
|
|
28913
|
+
exports.OrderFulfillmentStatus = OrderFulfillmentStatus;
|
|
27913
28914
|
exports.OrderItemType = OrderItemType;
|
|
27914
28915
|
exports.OrderListKind = OrderListKind;
|
|
27915
28916
|
exports.OrderPaymentStatus = OrderPaymentStatus;
|
|
28917
|
+
exports.OrderStatus = OrderStatus;
|
|
27916
28918
|
exports.Orderlists = Orderlists;
|
|
27917
28919
|
exports.Orders = Orders;
|
|
27918
28920
|
exports.OrganizationStatus = OrganizationStatus;
|