@revenexx/sdk 0.0.7 → 0.0.10
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 +377 -23
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +376 -24
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +377 -23
- package/package.json +1 -1
- package/src/client.ts +30 -1
- package/src/enums/fulfillment-status.ts +5 -0
- package/src/enums/order-fulfillment-status.ts +5 -0
- package/src/enums/order-status.ts +7 -0
- package/src/enums/payment-status.ts +9 -0
- package/src/enums/status.ts +7 -0
- package/src/index.ts +3 -1
- package/src/services/carts.ts +1 -1
- package/src/services/inventories.ts +5 -5
- package/src/services/orderlists.ts +2 -2
- package/src/services/orders.ts +106 -6
- package/src/services/prices.ts +3 -3
- package/src/services/search.ts +1 -1
- package/src/services/shipping.ts +1 -1
- package/types/client.d.ts +11 -0
- package/types/enums/fulfillment-status.d.ts +5 -0
- package/types/enums/order-fulfillment-status.d.ts +5 -0
- package/types/enums/order-status.d.ts +7 -0
- package/types/enums/payment-status.d.ts +9 -0
- package/types/enums/status.d.ts +7 -0
- package/types/index.d.ts +3 -1
- package/types/services/orders.d.ts +45 -2
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.10'
|
|
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)) {
|
|
@@ -4502,7 +4525,20 @@ class Carts {
|
|
|
4502
4525
|
const apiPath = '/v1/carts/{cart_id}/items'.replace('{cart_id}', cartId);
|
|
4503
4526
|
const apiPayload = {};
|
|
4504
4527
|
if (typeof items !== 'undefined') {
|
|
4505
|
-
apiPayload['items'] = items
|
|
4528
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
4529
|
+
"productId": {
|
|
4530
|
+
"wire": "product_id",
|
|
4531
|
+
"children": null
|
|
4532
|
+
},
|
|
4533
|
+
"taxRate": {
|
|
4534
|
+
"wire": "tax_rate",
|
|
4535
|
+
"children": null
|
|
4536
|
+
},
|
|
4537
|
+
"unitPrice": {
|
|
4538
|
+
"wire": "unit_price",
|
|
4539
|
+
"children": null
|
|
4540
|
+
}
|
|
4541
|
+
});
|
|
4506
4542
|
}
|
|
4507
4543
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4508
4544
|
const apiHeaders = {
|
|
@@ -6791,7 +6827,12 @@ class Inventories {
|
|
|
6791
6827
|
const apiPath = '/v1/inventories/adjust';
|
|
6792
6828
|
const apiPayload = {};
|
|
6793
6829
|
if (typeof items !== 'undefined') {
|
|
6794
|
-
apiPayload['items'] = items
|
|
6830
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
6831
|
+
"productId": {
|
|
6832
|
+
"wire": "product_id",
|
|
6833
|
+
"children": null
|
|
6834
|
+
}
|
|
6835
|
+
});
|
|
6795
6836
|
}
|
|
6796
6837
|
if (typeof locationCode !== 'undefined') {
|
|
6797
6838
|
apiPayload['location_code'] = locationCode;
|
|
@@ -6841,7 +6882,12 @@ class Inventories {
|
|
|
6841
6882
|
const apiPath = '/v1/inventories/availability';
|
|
6842
6883
|
const apiPayload = {};
|
|
6843
6884
|
if (typeof items !== 'undefined') {
|
|
6844
|
-
apiPayload['items'] = items
|
|
6885
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
6886
|
+
"productId": {
|
|
6887
|
+
"wire": "product_id",
|
|
6888
|
+
"children": null
|
|
6889
|
+
}
|
|
6890
|
+
});
|
|
6845
6891
|
}
|
|
6846
6892
|
if (typeof locationCode !== 'undefined') {
|
|
6847
6893
|
apiPayload['location_code'] = locationCode;
|
|
@@ -7261,7 +7307,12 @@ class Inventories {
|
|
|
7261
7307
|
const apiPath = '/v1/inventories/receive';
|
|
7262
7308
|
const apiPayload = {};
|
|
7263
7309
|
if (typeof items !== 'undefined') {
|
|
7264
|
-
apiPayload['items'] = items
|
|
7310
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
7311
|
+
"productId": {
|
|
7312
|
+
"wire": "product_id",
|
|
7313
|
+
"children": null
|
|
7314
|
+
}
|
|
7315
|
+
});
|
|
7265
7316
|
}
|
|
7266
7317
|
if (typeof locationCode !== 'undefined') {
|
|
7267
7318
|
apiPayload['location_code'] = locationCode;
|
|
@@ -7409,7 +7460,12 @@ class Inventories {
|
|
|
7409
7460
|
apiPayload['expires_at'] = expiresAt;
|
|
7410
7461
|
}
|
|
7411
7462
|
if (typeof items !== 'undefined') {
|
|
7412
|
-
apiPayload['items'] = items
|
|
7463
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
7464
|
+
"productId": {
|
|
7465
|
+
"wire": "product_id",
|
|
7466
|
+
"children": null
|
|
7467
|
+
}
|
|
7468
|
+
});
|
|
7413
7469
|
}
|
|
7414
7470
|
if (typeof orderRef !== 'undefined') {
|
|
7415
7471
|
apiPayload['order_ref'] = orderRef;
|
|
@@ -7464,7 +7520,12 @@ class Inventories {
|
|
|
7464
7520
|
const apiPath = '/v1/inventories/restock';
|
|
7465
7521
|
const apiPayload = {};
|
|
7466
7522
|
if (typeof items !== 'undefined') {
|
|
7467
|
-
apiPayload['items'] = items
|
|
7523
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
7524
|
+
"productId": {
|
|
7525
|
+
"wire": "product_id",
|
|
7526
|
+
"children": null
|
|
7527
|
+
}
|
|
7528
|
+
});
|
|
7468
7529
|
}
|
|
7469
7530
|
if (typeof locationCode !== 'undefined') {
|
|
7470
7531
|
apiPayload['location_code'] = locationCode;
|
|
@@ -11935,7 +11996,36 @@ class Orderlists {
|
|
|
11935
11996
|
const apiPath = '/v1/orderlists';
|
|
11936
11997
|
const apiPayload = {};
|
|
11937
11998
|
if (typeof items !== 'undefined') {
|
|
11938
|
-
apiPayload['items'] = items
|
|
11999
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
12000
|
+
"categorySlug": {
|
|
12001
|
+
"wire": "category_slug",
|
|
12002
|
+
"children": null
|
|
12003
|
+
},
|
|
12004
|
+
"costCenterId": {
|
|
12005
|
+
"wire": "cost_center_id",
|
|
12006
|
+
"children": null
|
|
12007
|
+
},
|
|
12008
|
+
"customSku": {
|
|
12009
|
+
"wire": "custom_sku",
|
|
12010
|
+
"children": null
|
|
12011
|
+
},
|
|
12012
|
+
"positionTexts": {
|
|
12013
|
+
"wire": "position_texts",
|
|
12014
|
+
"children": null
|
|
12015
|
+
},
|
|
12016
|
+
"productId": {
|
|
12017
|
+
"wire": "product_id",
|
|
12018
|
+
"children": null
|
|
12019
|
+
},
|
|
12020
|
+
"subcategorySlug": {
|
|
12021
|
+
"wire": "subcategory_slug",
|
|
12022
|
+
"children": null
|
|
12023
|
+
},
|
|
12024
|
+
"taxRate": {
|
|
12025
|
+
"wire": "tax_rate",
|
|
12026
|
+
"children": null
|
|
12027
|
+
}
|
|
12028
|
+
});
|
|
11939
12029
|
}
|
|
11940
12030
|
if (typeof kind !== 'undefined') {
|
|
11941
12031
|
apiPayload['kind'] = kind;
|
|
@@ -12331,7 +12421,36 @@ class Orderlists {
|
|
|
12331
12421
|
const apiPath = '/v1/orderlists/{list_id}/items'.replace('{list_id}', listId);
|
|
12332
12422
|
const apiPayload = {};
|
|
12333
12423
|
if (typeof items !== 'undefined') {
|
|
12334
|
-
apiPayload['items'] = items
|
|
12424
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
12425
|
+
"categorySlug": {
|
|
12426
|
+
"wire": "category_slug",
|
|
12427
|
+
"children": null
|
|
12428
|
+
},
|
|
12429
|
+
"costCenterId": {
|
|
12430
|
+
"wire": "cost_center_id",
|
|
12431
|
+
"children": null
|
|
12432
|
+
},
|
|
12433
|
+
"customSku": {
|
|
12434
|
+
"wire": "custom_sku",
|
|
12435
|
+
"children": null
|
|
12436
|
+
},
|
|
12437
|
+
"positionTexts": {
|
|
12438
|
+
"wire": "position_texts",
|
|
12439
|
+
"children": null
|
|
12440
|
+
},
|
|
12441
|
+
"productId": {
|
|
12442
|
+
"wire": "product_id",
|
|
12443
|
+
"children": null
|
|
12444
|
+
},
|
|
12445
|
+
"subcategorySlug": {
|
|
12446
|
+
"wire": "subcategory_slug",
|
|
12447
|
+
"children": null
|
|
12448
|
+
},
|
|
12449
|
+
"taxRate": {
|
|
12450
|
+
"wire": "tax_rate",
|
|
12451
|
+
"children": null
|
|
12452
|
+
}
|
|
12453
|
+
});
|
|
12335
12454
|
}
|
|
12336
12455
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12337
12456
|
const apiHeaders = {
|
|
@@ -12582,12 +12701,104 @@ class Orders {
|
|
|
12582
12701
|
|
|
12583
12702
|
/**
|
|
12584
12703
|
*
|
|
12704
|
+
* @param {OrderStatus} params.status - Filter by order status (exact match).
|
|
12705
|
+
* @param {OrderPaymentStatus} params.paymentStatus - Filter by payment status (exact match).
|
|
12706
|
+
* @param {OrderFulfillmentStatus} params.fulfillmentStatus - Filter by fulfillment status (exact match).
|
|
12707
|
+
* @param {string} params.contactId - Filter to one ordering contact.
|
|
12708
|
+
* @param {string} params.organizationId - Filter to one B2B organization.
|
|
12709
|
+
* @param {string} params.channelId - Filter to one sales channel.
|
|
12710
|
+
* @param {string} params.marketId - Filter to one market.
|
|
12711
|
+
* @param {string} params.number - Filter by exact order number.
|
|
12712
|
+
* @param {number} params.limit - Page size (default 50, max 200).
|
|
12713
|
+
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
12714
|
+
* @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
12715
|
+
* @throws {RevenexxException}
|
|
12716
|
+
* @returns {Promise<{}>}
|
|
12717
|
+
*/
|
|
12718
|
+
|
|
12719
|
+
/**
|
|
12720
|
+
*
|
|
12721
|
+
* @param {OrderStatus} status - Filter by order status (exact match).
|
|
12722
|
+
* @param {OrderPaymentStatus} paymentStatus - Filter by payment status (exact match).
|
|
12723
|
+
* @param {OrderFulfillmentStatus} fulfillmentStatus - Filter by fulfillment status (exact match).
|
|
12724
|
+
* @param {string} contactId - Filter to one ordering contact.
|
|
12725
|
+
* @param {string} organizationId - Filter to one B2B organization.
|
|
12726
|
+
* @param {string} channelId - Filter to one sales channel.
|
|
12727
|
+
* @param {string} marketId - Filter to one market.
|
|
12728
|
+
* @param {string} number - Filter by exact order number.
|
|
12729
|
+
* @param {number} limit - Page size (default 50, max 200).
|
|
12730
|
+
* @param {number} offset - Row offset for pagination (default 0).
|
|
12731
|
+
* @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
|
|
12585
12732
|
* @throws {RevenexxException}
|
|
12586
12733
|
* @returns {Promise<{}>}
|
|
12734
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
12587
12735
|
*/
|
|
12588
|
-
|
|
12736
|
+
|
|
12737
|
+
ordersList(paramsOrFirst, ...rest) {
|
|
12738
|
+
let params;
|
|
12739
|
+
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)) {
|
|
12740
|
+
params = paramsOrFirst || {};
|
|
12741
|
+
} else {
|
|
12742
|
+
params = {
|
|
12743
|
+
status: paramsOrFirst,
|
|
12744
|
+
paymentStatus: rest[0],
|
|
12745
|
+
fulfillmentStatus: rest[1],
|
|
12746
|
+
contactId: rest[2],
|
|
12747
|
+
organizationId: rest[3],
|
|
12748
|
+
channelId: rest[4],
|
|
12749
|
+
marketId: rest[5],
|
|
12750
|
+
number: rest[6],
|
|
12751
|
+
limit: rest[7],
|
|
12752
|
+
offset: rest[8],
|
|
12753
|
+
order: rest[9]
|
|
12754
|
+
};
|
|
12755
|
+
}
|
|
12756
|
+
const status = params.status;
|
|
12757
|
+
const paymentStatus = params.paymentStatus;
|
|
12758
|
+
const fulfillmentStatus = params.fulfillmentStatus;
|
|
12759
|
+
const contactId = params.contactId;
|
|
12760
|
+
const organizationId = params.organizationId;
|
|
12761
|
+
const channelId = params.channelId;
|
|
12762
|
+
const marketId = params.marketId;
|
|
12763
|
+
const number = params.number;
|
|
12764
|
+
const limit = params.limit;
|
|
12765
|
+
const offset = params.offset;
|
|
12766
|
+
const order = params.order;
|
|
12589
12767
|
const apiPath = '/v1/orders';
|
|
12590
12768
|
const apiPayload = {};
|
|
12769
|
+
if (typeof status !== 'undefined') {
|
|
12770
|
+
apiPayload['status'] = status;
|
|
12771
|
+
}
|
|
12772
|
+
if (typeof paymentStatus !== 'undefined') {
|
|
12773
|
+
apiPayload['payment_status'] = paymentStatus;
|
|
12774
|
+
}
|
|
12775
|
+
if (typeof fulfillmentStatus !== 'undefined') {
|
|
12776
|
+
apiPayload['fulfillment_status'] = fulfillmentStatus;
|
|
12777
|
+
}
|
|
12778
|
+
if (typeof contactId !== 'undefined') {
|
|
12779
|
+
apiPayload['contact_id'] = contactId;
|
|
12780
|
+
}
|
|
12781
|
+
if (typeof organizationId !== 'undefined') {
|
|
12782
|
+
apiPayload['organization_id'] = organizationId;
|
|
12783
|
+
}
|
|
12784
|
+
if (typeof channelId !== 'undefined') {
|
|
12785
|
+
apiPayload['channel_id'] = channelId;
|
|
12786
|
+
}
|
|
12787
|
+
if (typeof marketId !== 'undefined') {
|
|
12788
|
+
apiPayload['market_id'] = marketId;
|
|
12789
|
+
}
|
|
12790
|
+
if (typeof number !== 'undefined') {
|
|
12791
|
+
apiPayload['number'] = number;
|
|
12792
|
+
}
|
|
12793
|
+
if (typeof limit !== 'undefined') {
|
|
12794
|
+
apiPayload['limit'] = limit;
|
|
12795
|
+
}
|
|
12796
|
+
if (typeof offset !== 'undefined') {
|
|
12797
|
+
apiPayload['offset'] = offset;
|
|
12798
|
+
}
|
|
12799
|
+
if (typeof order !== 'undefined') {
|
|
12800
|
+
apiPayload['order'] = order;
|
|
12801
|
+
}
|
|
12591
12802
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12592
12803
|
const apiHeaders = {};
|
|
12593
12804
|
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
@@ -13004,7 +13215,36 @@ class Orders {
|
|
|
13004
13215
|
apiPayload['grand_total'] = grandTotal;
|
|
13005
13216
|
}
|
|
13006
13217
|
if (typeof items !== 'undefined') {
|
|
13007
|
-
apiPayload['items'] = items
|
|
13218
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
13219
|
+
"costCenter": {
|
|
13220
|
+
"wire": "cost_center",
|
|
13221
|
+
"children": null
|
|
13222
|
+
},
|
|
13223
|
+
"positionText": {
|
|
13224
|
+
"wire": "position_text",
|
|
13225
|
+
"children": null
|
|
13226
|
+
},
|
|
13227
|
+
"productId": {
|
|
13228
|
+
"wire": "product_id",
|
|
13229
|
+
"children": null
|
|
13230
|
+
},
|
|
13231
|
+
"taxAmount": {
|
|
13232
|
+
"wire": "tax_amount",
|
|
13233
|
+
"children": null
|
|
13234
|
+
},
|
|
13235
|
+
"taxRate": {
|
|
13236
|
+
"wire": "tax_rate",
|
|
13237
|
+
"children": null
|
|
13238
|
+
},
|
|
13239
|
+
"unitPrice": {
|
|
13240
|
+
"wire": "unit_price",
|
|
13241
|
+
"children": null
|
|
13242
|
+
},
|
|
13243
|
+
"userData": {
|
|
13244
|
+
"wire": "user_data",
|
|
13245
|
+
"children": null
|
|
13246
|
+
}
|
|
13247
|
+
});
|
|
13008
13248
|
}
|
|
13009
13249
|
if (typeof marketId !== 'undefined') {
|
|
13010
13250
|
apiPayload['market_id'] = marketId;
|
|
@@ -13470,7 +13710,12 @@ class Orders {
|
|
|
13470
13710
|
apiPayload['cancelled_by'] = cancelledBy;
|
|
13471
13711
|
}
|
|
13472
13712
|
if (typeof positions !== 'undefined') {
|
|
13473
|
-
apiPayload['positions'] = positions
|
|
13713
|
+
apiPayload['positions'] = Client.toWireKeys(positions, {
|
|
13714
|
+
"orderItemId": {
|
|
13715
|
+
"wire": "order_item_id",
|
|
13716
|
+
"children": null
|
|
13717
|
+
}
|
|
13718
|
+
});
|
|
13474
13719
|
}
|
|
13475
13720
|
if (typeof reason !== 'undefined') {
|
|
13476
13721
|
apiPayload['reason'] = reason;
|
|
@@ -13585,7 +13830,12 @@ class Orders {
|
|
|
13585
13830
|
apiPayload['metadata'] = metadata;
|
|
13586
13831
|
}
|
|
13587
13832
|
if (typeof positions !== 'undefined') {
|
|
13588
|
-
apiPayload['positions'] = positions
|
|
13833
|
+
apiPayload['positions'] = Client.toWireKeys(positions, {
|
|
13834
|
+
"orderItemId": {
|
|
13835
|
+
"wire": "order_item_id",
|
|
13836
|
+
"children": null
|
|
13837
|
+
}
|
|
13838
|
+
});
|
|
13589
13839
|
}
|
|
13590
13840
|
if (typeof reason !== 'undefined') {
|
|
13591
13841
|
apiPayload['reason'] = reason;
|
|
@@ -13828,7 +14078,12 @@ class Orders {
|
|
|
13828
14078
|
apiPayload['number'] = number;
|
|
13829
14079
|
}
|
|
13830
14080
|
if (typeof positions !== 'undefined') {
|
|
13831
|
-
apiPayload['positions'] = positions
|
|
14081
|
+
apiPayload['positions'] = Client.toWireKeys(positions, {
|
|
14082
|
+
"orderItemId": {
|
|
14083
|
+
"wire": "order_item_id",
|
|
14084
|
+
"children": null
|
|
14085
|
+
}
|
|
14086
|
+
});
|
|
13832
14087
|
}
|
|
13833
14088
|
if (typeof shippedAt !== 'undefined') {
|
|
13834
14089
|
apiPayload['shipped_at'] = shippedAt;
|
|
@@ -17471,7 +17726,32 @@ class Prices {
|
|
|
17471
17726
|
const apiPath = '/v1/prices/lists/{list_id}/entries'.replace('{list_id}', listId);
|
|
17472
17727
|
const apiPayload = {};
|
|
17473
17728
|
if (typeof entries !== 'undefined') {
|
|
17474
|
-
apiPayload['entries'] = entries
|
|
17729
|
+
apiPayload['entries'] = Client.toWireKeys(entries, {
|
|
17730
|
+
"priceType": {
|
|
17731
|
+
"wire": "price_type",
|
|
17732
|
+
"children": null
|
|
17733
|
+
},
|
|
17734
|
+
"productId": {
|
|
17735
|
+
"wire": "product_id",
|
|
17736
|
+
"children": null
|
|
17737
|
+
},
|
|
17738
|
+
"quantityMin": {
|
|
17739
|
+
"wire": "quantity_min",
|
|
17740
|
+
"children": null
|
|
17741
|
+
},
|
|
17742
|
+
"unitPrice": {
|
|
17743
|
+
"wire": "unit_price",
|
|
17744
|
+
"children": null
|
|
17745
|
+
},
|
|
17746
|
+
"validFrom": {
|
|
17747
|
+
"wire": "valid_from",
|
|
17748
|
+
"children": null
|
|
17749
|
+
},
|
|
17750
|
+
"validUntil": {
|
|
17751
|
+
"wire": "valid_until",
|
|
17752
|
+
"children": null
|
|
17753
|
+
}
|
|
17754
|
+
});
|
|
17475
17755
|
}
|
|
17476
17756
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
17477
17757
|
const apiHeaders = {
|
|
@@ -17518,7 +17798,32 @@ class Prices {
|
|
|
17518
17798
|
const apiPath = '/v1/prices/lists/{list_id}/entries/bulk'.replace('{list_id}', listId);
|
|
17519
17799
|
const apiPayload = {};
|
|
17520
17800
|
if (typeof entries !== 'undefined') {
|
|
17521
|
-
apiPayload['entries'] = entries
|
|
17801
|
+
apiPayload['entries'] = Client.toWireKeys(entries, {
|
|
17802
|
+
"priceType": {
|
|
17803
|
+
"wire": "price_type",
|
|
17804
|
+
"children": null
|
|
17805
|
+
},
|
|
17806
|
+
"productId": {
|
|
17807
|
+
"wire": "product_id",
|
|
17808
|
+
"children": null
|
|
17809
|
+
},
|
|
17810
|
+
"quantityMin": {
|
|
17811
|
+
"wire": "quantity_min",
|
|
17812
|
+
"children": null
|
|
17813
|
+
},
|
|
17814
|
+
"unitPrice": {
|
|
17815
|
+
"wire": "unit_price",
|
|
17816
|
+
"children": null
|
|
17817
|
+
},
|
|
17818
|
+
"validFrom": {
|
|
17819
|
+
"wire": "valid_from",
|
|
17820
|
+
"children": null
|
|
17821
|
+
},
|
|
17822
|
+
"validUntil": {
|
|
17823
|
+
"wire": "valid_until",
|
|
17824
|
+
"children": null
|
|
17825
|
+
}
|
|
17826
|
+
});
|
|
17522
17827
|
}
|
|
17523
17828
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
17524
17829
|
const apiHeaders = {
|
|
@@ -17785,7 +18090,12 @@ class Prices {
|
|
|
17785
18090
|
apiPayload['currency'] = currency;
|
|
17786
18091
|
}
|
|
17787
18092
|
if (typeof items !== 'undefined') {
|
|
17788
|
-
apiPayload['items'] = items
|
|
18093
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
18094
|
+
"productId": {
|
|
18095
|
+
"wire": "product_id",
|
|
18096
|
+
"children": null
|
|
18097
|
+
}
|
|
18098
|
+
});
|
|
17789
18099
|
}
|
|
17790
18100
|
if (typeof marketId !== 'undefined') {
|
|
17791
18101
|
apiPayload['market_id'] = marketId;
|
|
@@ -21742,7 +22052,28 @@ class Search {
|
|
|
21742
22052
|
const apiPath = '/v1/search/multi_search';
|
|
21743
22053
|
const apiPayload = {};
|
|
21744
22054
|
if (typeof searches !== 'undefined') {
|
|
21745
|
-
apiPayload['searches'] = searches
|
|
22055
|
+
apiPayload['searches'] = Client.toWireKeys(searches, {
|
|
22056
|
+
"facetBy": {
|
|
22057
|
+
"wire": "facet_by",
|
|
22058
|
+
"children": null
|
|
22059
|
+
},
|
|
22060
|
+
"filterBy": {
|
|
22061
|
+
"wire": "filter_by",
|
|
22062
|
+
"children": null
|
|
22063
|
+
},
|
|
22064
|
+
"perPage": {
|
|
22065
|
+
"wire": "per_page",
|
|
22066
|
+
"children": null
|
|
22067
|
+
},
|
|
22068
|
+
"queryBy": {
|
|
22069
|
+
"wire": "query_by",
|
|
22070
|
+
"children": null
|
|
22071
|
+
},
|
|
22072
|
+
"sortBy": {
|
|
22073
|
+
"wire": "sort_by",
|
|
22074
|
+
"children": null
|
|
22075
|
+
}
|
|
22076
|
+
});
|
|
21746
22077
|
}
|
|
21747
22078
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
21748
22079
|
const apiHeaders = {
|
|
@@ -22296,7 +22627,12 @@ class Shipping {
|
|
|
22296
22627
|
const apiPath = '/v1/shipping/methods/{method_id}/tiers'.replace('{method_id}', methodId);
|
|
22297
22628
|
const apiPayload = {};
|
|
22298
22629
|
if (typeof tiers !== 'undefined') {
|
|
22299
|
-
apiPayload['tiers'] = tiers
|
|
22630
|
+
apiPayload['tiers'] = Client.toWireKeys(tiers, {
|
|
22631
|
+
"fromValue": {
|
|
22632
|
+
"wire": "from_value",
|
|
22633
|
+
"children": null
|
|
22634
|
+
}
|
|
22635
|
+
});
|
|
22300
22636
|
}
|
|
22301
22637
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
22302
22638
|
const apiHeaders = {
|
|
@@ -27177,10 +27513,13 @@ let OrderListKind = /*#__PURE__*/function (OrderListKind) {
|
|
|
27177
27513
|
return OrderListKind;
|
|
27178
27514
|
}({});
|
|
27179
27515
|
|
|
27180
|
-
let
|
|
27181
|
-
|
|
27182
|
-
|
|
27183
|
-
|
|
27516
|
+
let OrderStatus = /*#__PURE__*/function (OrderStatus) {
|
|
27517
|
+
OrderStatus["Pending"] = "pending";
|
|
27518
|
+
OrderStatus["Placed"] = "placed";
|
|
27519
|
+
OrderStatus["InFulfillment"] = "in_fulfillment";
|
|
27520
|
+
OrderStatus["Completed"] = "completed";
|
|
27521
|
+
OrderStatus["Cancelled"] = "cancelled";
|
|
27522
|
+
return OrderStatus;
|
|
27184
27523
|
}({});
|
|
27185
27524
|
|
|
27186
27525
|
let OrderPaymentStatus = /*#__PURE__*/function (OrderPaymentStatus) {
|
|
@@ -27194,6 +27533,19 @@ let OrderPaymentStatus = /*#__PURE__*/function (OrderPaymentStatus) {
|
|
|
27194
27533
|
return OrderPaymentStatus;
|
|
27195
27534
|
}({});
|
|
27196
27535
|
|
|
27536
|
+
let OrderFulfillmentStatus = /*#__PURE__*/function (OrderFulfillmentStatus) {
|
|
27537
|
+
OrderFulfillmentStatus["Unfulfilled"] = "unfulfilled";
|
|
27538
|
+
OrderFulfillmentStatus["Partial"] = "partial";
|
|
27539
|
+
OrderFulfillmentStatus["Fulfilled"] = "fulfilled";
|
|
27540
|
+
return OrderFulfillmentStatus;
|
|
27541
|
+
}({});
|
|
27542
|
+
|
|
27543
|
+
let OrderCommentVisibility = /*#__PURE__*/function (OrderCommentVisibility) {
|
|
27544
|
+
OrderCommentVisibility["Internal"] = "internal";
|
|
27545
|
+
OrderCommentVisibility["Customer"] = "customer";
|
|
27546
|
+
return OrderCommentVisibility;
|
|
27547
|
+
}({});
|
|
27548
|
+
|
|
27197
27549
|
let PageStatus = /*#__PURE__*/function (PageStatus) {
|
|
27198
27550
|
PageStatus["Draft"] = "draft";
|
|
27199
27551
|
PageStatus["Published"] = "published";
|
|
@@ -27735,5 +28087,5 @@ let MessageStatus = /*#__PURE__*/function (MessageStatus) {
|
|
|
27735
28087
|
return MessageStatus;
|
|
27736
28088
|
}({});
|
|
27737
28089
|
|
|
27738
|
-
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 };
|
|
28090
|
+
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 };
|
|
27739
28091
|
//# sourceMappingURL=sdk.js.map
|