@revenexx/sdk 0.0.9 → 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 +291 -29
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +290 -30
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +291 -29
- 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 +1 -1
- package/src/services/inventories.ts +5 -5
- package/src/services/orderlists.ts +2 -2
- package/src/services/orders.ts +23 -21
- 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/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/orders.d.ts +13 -11
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,9 +12701,9 @@ class Orders {
|
|
|
12582
12701
|
|
|
12583
12702
|
/**
|
|
12584
12703
|
*
|
|
12585
|
-
* @param {
|
|
12586
|
-
* @param {
|
|
12587
|
-
* @param {
|
|
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).
|
|
12588
12707
|
* @param {string} params.contactId - Filter to one ordering contact.
|
|
12589
12708
|
* @param {string} params.organizationId - Filter to one B2B organization.
|
|
12590
12709
|
* @param {string} params.channelId - Filter to one sales channel.
|
|
@@ -12599,9 +12718,9 @@ class Orders {
|
|
|
12599
12718
|
|
|
12600
12719
|
/**
|
|
12601
12720
|
*
|
|
12602
|
-
* @param {
|
|
12603
|
-
* @param {
|
|
12604
|
-
* @param {
|
|
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).
|
|
12605
12724
|
* @param {string} contactId - Filter to one ordering contact.
|
|
12606
12725
|
* @param {string} organizationId - Filter to one B2B organization.
|
|
12607
12726
|
* @param {string} channelId - Filter to one sales channel.
|
|
@@ -12617,7 +12736,7 @@ class Orders {
|
|
|
12617
12736
|
|
|
12618
12737
|
ordersList(paramsOrFirst, ...rest) {
|
|
12619
12738
|
let params;
|
|
12620
|
-
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
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)) {
|
|
12621
12740
|
params = paramsOrFirst || {};
|
|
12622
12741
|
} else {
|
|
12623
12742
|
params = {
|
|
@@ -13096,7 +13215,36 @@ class Orders {
|
|
|
13096
13215
|
apiPayload['grand_total'] = grandTotal;
|
|
13097
13216
|
}
|
|
13098
13217
|
if (typeof items !== 'undefined') {
|
|
13099
|
-
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
|
+
});
|
|
13100
13248
|
}
|
|
13101
13249
|
if (typeof marketId !== 'undefined') {
|
|
13102
13250
|
apiPayload['market_id'] = marketId;
|
|
@@ -13562,7 +13710,12 @@ class Orders {
|
|
|
13562
13710
|
apiPayload['cancelled_by'] = cancelledBy;
|
|
13563
13711
|
}
|
|
13564
13712
|
if (typeof positions !== 'undefined') {
|
|
13565
|
-
apiPayload['positions'] = positions
|
|
13713
|
+
apiPayload['positions'] = Client.toWireKeys(positions, {
|
|
13714
|
+
"orderItemId": {
|
|
13715
|
+
"wire": "order_item_id",
|
|
13716
|
+
"children": null
|
|
13717
|
+
}
|
|
13718
|
+
});
|
|
13566
13719
|
}
|
|
13567
13720
|
if (typeof reason !== 'undefined') {
|
|
13568
13721
|
apiPayload['reason'] = reason;
|
|
@@ -13677,7 +13830,12 @@ class Orders {
|
|
|
13677
13830
|
apiPayload['metadata'] = metadata;
|
|
13678
13831
|
}
|
|
13679
13832
|
if (typeof positions !== 'undefined') {
|
|
13680
|
-
apiPayload['positions'] = positions
|
|
13833
|
+
apiPayload['positions'] = Client.toWireKeys(positions, {
|
|
13834
|
+
"orderItemId": {
|
|
13835
|
+
"wire": "order_item_id",
|
|
13836
|
+
"children": null
|
|
13837
|
+
}
|
|
13838
|
+
});
|
|
13681
13839
|
}
|
|
13682
13840
|
if (typeof reason !== 'undefined') {
|
|
13683
13841
|
apiPayload['reason'] = reason;
|
|
@@ -13920,7 +14078,12 @@ class Orders {
|
|
|
13920
14078
|
apiPayload['number'] = number;
|
|
13921
14079
|
}
|
|
13922
14080
|
if (typeof positions !== 'undefined') {
|
|
13923
|
-
apiPayload['positions'] = positions
|
|
14081
|
+
apiPayload['positions'] = Client.toWireKeys(positions, {
|
|
14082
|
+
"orderItemId": {
|
|
14083
|
+
"wire": "order_item_id",
|
|
14084
|
+
"children": null
|
|
14085
|
+
}
|
|
14086
|
+
});
|
|
13924
14087
|
}
|
|
13925
14088
|
if (typeof shippedAt !== 'undefined') {
|
|
13926
14089
|
apiPayload['shipped_at'] = shippedAt;
|
|
@@ -17563,7 +17726,32 @@ class Prices {
|
|
|
17563
17726
|
const apiPath = '/v1/prices/lists/{list_id}/entries'.replace('{list_id}', listId);
|
|
17564
17727
|
const apiPayload = {};
|
|
17565
17728
|
if (typeof entries !== 'undefined') {
|
|
17566
|
-
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
|
+
});
|
|
17567
17755
|
}
|
|
17568
17756
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
17569
17757
|
const apiHeaders = {
|
|
@@ -17610,7 +17798,32 @@ class Prices {
|
|
|
17610
17798
|
const apiPath = '/v1/prices/lists/{list_id}/entries/bulk'.replace('{list_id}', listId);
|
|
17611
17799
|
const apiPayload = {};
|
|
17612
17800
|
if (typeof entries !== 'undefined') {
|
|
17613
|
-
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
|
+
});
|
|
17614
17827
|
}
|
|
17615
17828
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
17616
17829
|
const apiHeaders = {
|
|
@@ -17877,7 +18090,12 @@ class Prices {
|
|
|
17877
18090
|
apiPayload['currency'] = currency;
|
|
17878
18091
|
}
|
|
17879
18092
|
if (typeof items !== 'undefined') {
|
|
17880
|
-
apiPayload['items'] = items
|
|
18093
|
+
apiPayload['items'] = Client.toWireKeys(items, {
|
|
18094
|
+
"productId": {
|
|
18095
|
+
"wire": "product_id",
|
|
18096
|
+
"children": null
|
|
18097
|
+
}
|
|
18098
|
+
});
|
|
17881
18099
|
}
|
|
17882
18100
|
if (typeof marketId !== 'undefined') {
|
|
17883
18101
|
apiPayload['market_id'] = marketId;
|
|
@@ -21834,7 +22052,28 @@ class Search {
|
|
|
21834
22052
|
const apiPath = '/v1/search/multi_search';
|
|
21835
22053
|
const apiPayload = {};
|
|
21836
22054
|
if (typeof searches !== 'undefined') {
|
|
21837
|
-
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
|
+
});
|
|
21838
22077
|
}
|
|
21839
22078
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
21840
22079
|
const apiHeaders = {
|
|
@@ -22388,7 +22627,12 @@ class Shipping {
|
|
|
22388
22627
|
const apiPath = '/v1/shipping/methods/{method_id}/tiers'.replace('{method_id}', methodId);
|
|
22389
22628
|
const apiPayload = {};
|
|
22390
22629
|
if (typeof tiers !== 'undefined') {
|
|
22391
|
-
apiPayload['tiers'] = tiers
|
|
22630
|
+
apiPayload['tiers'] = Client.toWireKeys(tiers, {
|
|
22631
|
+
"fromValue": {
|
|
22632
|
+
"wire": "from_value",
|
|
22633
|
+
"children": null
|
|
22634
|
+
}
|
|
22635
|
+
});
|
|
22392
22636
|
}
|
|
22393
22637
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
22394
22638
|
const apiHeaders = {
|
|
@@ -27269,10 +27513,13 @@ let OrderListKind = /*#__PURE__*/function (OrderListKind) {
|
|
|
27269
27513
|
return OrderListKind;
|
|
27270
27514
|
}({});
|
|
27271
27515
|
|
|
27272
|
-
let
|
|
27273
|
-
|
|
27274
|
-
|
|
27275
|
-
|
|
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;
|
|
27276
27523
|
}({});
|
|
27277
27524
|
|
|
27278
27525
|
let OrderPaymentStatus = /*#__PURE__*/function (OrderPaymentStatus) {
|
|
@@ -27286,6 +27533,19 @@ let OrderPaymentStatus = /*#__PURE__*/function (OrderPaymentStatus) {
|
|
|
27286
27533
|
return OrderPaymentStatus;
|
|
27287
27534
|
}({});
|
|
27288
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
|
+
|
|
27289
27549
|
let PageStatus = /*#__PURE__*/function (PageStatus) {
|
|
27290
27550
|
PageStatus["Draft"] = "draft";
|
|
27291
27551
|
PageStatus["Published"] = "published";
|
|
@@ -27827,5 +28087,5 @@ let MessageStatus = /*#__PURE__*/function (MessageStatus) {
|
|
|
27827
28087
|
return MessageStatus;
|
|
27828
28088
|
}({});
|
|
27829
28089
|
|
|
27830
|
-
export { Adapter, AddressType, Apps, AttributeBooleanStatus, AttributeDatetimeStatus, AttributeEmailStatus, AttributeEnumStatus, AttributeFloatStatus, AttributeIntegerStatus, AttributeIpStatus, AttributeLineStatus, AttributeLongtextStatus, AttributeMediumtextStatus, AttributePointStatus, AttributePolygonStatus, AttributeRelationshipStatus, AttributeStringStatus, AttributeTextStatus, AttributeUrlStatus, AttributeVarcharStatus, Avatars, BuildRuntime, CartExportFormat, CartIoApplyMode, CartIoDirection, CartIoEntity, CartIoFormat, CartItemType, Carts, Channel, ChannelStatus, ChannelType, Channels, Client, Code, Collection, ColumnBooleanStatus, ColumnDatetimeStatus, ColumnEmailStatus, ColumnEnumStatus, ColumnFloatStatus, ColumnIntegerStatus, ColumnIpStatus, ColumnLineStatus, ColumnLongtextStatus, ColumnMediumtextStatus, ColumnPointStatus, ColumnPolygonStatus, ColumnRelationshipStatus, ColumnStringStatus, ColumnTextStatus, ColumnUrlStatus, ColumnVarcharStatus, Condition, ContactRole, ContactStatus, Customers, DatabaseType, DeploymentStatus, ExecutionStatus, ExecutionTrigger, Framework, Greetings, HealthAntivirusStatus, HealthStatusStatus, ID, IndexStatus, Inventories, Locale, LocationType, MarketStatus, Markets, MessageStatus, Messaging, Method, Operator, OrderCommentVisibility, OrderItemType, OrderListKind, OrderPaymentStatus, Orderlists, Orders, OrganizationStatus, Output, PageStatus, Pages, PaymentFeeType, PaymentMethodKind, Payments, Permission, Permissions, PriceEntryType, PriceListStatus, Prices, Priority, Products, Query, Range, Realtime, RevenexxException, Role, Runtime, Runtimes, Scopes, Search, Shipping, ShippingMethodMatrixBasis, ShippingMethodPricingType, Sites, Storage, StoreAssetRequestVisibility, Theme, Timezone, Tokens, Type, UseCases, Visibility };
|
|
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 };
|
|
27831
28091
|
//# sourceMappingURL=sdk.js.map
|