@revenexx/sdk 0.0.14 → 0.0.15
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 +109 -68
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +109 -69
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +109 -68
- package/package.json +1 -1
- package/src/client.ts +19 -1
- package/src/index.ts +1 -0
- package/src/models.ts +12 -36
- package/src/services/carts.ts +17 -31
- package/src/services/orders.ts +25 -39
- package/src/services/prices.ts +33 -33
- package/src/services/settings.ts +71 -0
- package/types/client.d.ts +12 -0
- package/types/index.d.ts +1 -0
- package/types/models.d.ts +12 -36
- package/types/services/carts.d.ts +2 -8
- package/types/services/orders.d.ts +2 -8
- package/types/services/prices.d.ts +8 -8
- package/types/services/settings.d.ts +27 -0
package/dist/cjs/sdk.js
CHANGED
|
@@ -647,6 +647,7 @@ class Client {
|
|
|
647
647
|
endpoint: 'https://api.revenexx.com',
|
|
648
648
|
endpointRealtime: '',
|
|
649
649
|
tenant: '',
|
|
650
|
+
market: '',
|
|
650
651
|
apikeyauth: '',
|
|
651
652
|
bearerauth: ''
|
|
652
653
|
};
|
|
@@ -657,7 +658,7 @@ class Client {
|
|
|
657
658
|
'x-sdk-name': 'Revenexx Web',
|
|
658
659
|
'x-sdk-platform': '',
|
|
659
660
|
'x-sdk-language': 'web',
|
|
660
|
-
'x-sdk-version': '0.0.
|
|
661
|
+
'x-sdk-version': '0.0.15'
|
|
661
662
|
};
|
|
662
663
|
|
|
663
664
|
/**
|
|
@@ -715,6 +716,22 @@ class Client {
|
|
|
715
716
|
return this;
|
|
716
717
|
}
|
|
717
718
|
|
|
719
|
+
/**
|
|
720
|
+
* Set Market
|
|
721
|
+
*
|
|
722
|
+
* The active market slug to scope requests to, sent as the
|
|
723
|
+
* X-Revenexx-Market header. Optional — omit it to see only global rows.
|
|
724
|
+
*
|
|
725
|
+
* @param value string
|
|
726
|
+
*
|
|
727
|
+
* @return {this}
|
|
728
|
+
*/
|
|
729
|
+
setMarket(value) {
|
|
730
|
+
this.headers['X-Revenexx-Market'] = value;
|
|
731
|
+
this.config.market = value;
|
|
732
|
+
return this;
|
|
733
|
+
}
|
|
734
|
+
|
|
718
735
|
/**
|
|
719
736
|
* Set ApiKeyAuth
|
|
720
737
|
*
|
|
@@ -3840,7 +3857,6 @@ class Carts {
|
|
|
3840
3857
|
* @param {string} params.contactId - Owning customer contact.
|
|
3841
3858
|
* @param {string} params.currency - ISO 4217 code (default EUR).
|
|
3842
3859
|
* @param {boolean} params.isCurrent - Make this THE current cart of its owner.
|
|
3843
|
-
* @param {string} params.marketId -
|
|
3844
3860
|
* @param {object} params.metadata - Free-form metadata.
|
|
3845
3861
|
* @param {string} params.name - Display name (default 'Cart').
|
|
3846
3862
|
* @param {string} params.sessionKey - Owning guest session.
|
|
@@ -3854,7 +3870,6 @@ class Carts {
|
|
|
3854
3870
|
* @param {string} contactId - Owning customer contact.
|
|
3855
3871
|
* @param {string} currency - ISO 4217 code (default EUR).
|
|
3856
3872
|
* @param {boolean} isCurrent - Make this THE current cart of its owner.
|
|
3857
|
-
* @param {string} marketId -
|
|
3858
3873
|
* @param {object} metadata - Free-form metadata.
|
|
3859
3874
|
* @param {string} name - Display name (default 'Cart').
|
|
3860
3875
|
* @param {string} sessionKey - Owning guest session.
|
|
@@ -3873,17 +3888,15 @@ class Carts {
|
|
|
3873
3888
|
contactId: rest[0],
|
|
3874
3889
|
currency: rest[1],
|
|
3875
3890
|
isCurrent: rest[2],
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
sessionKey: rest[6]
|
|
3891
|
+
metadata: rest[3],
|
|
3892
|
+
name: rest[4],
|
|
3893
|
+
sessionKey: rest[5]
|
|
3880
3894
|
};
|
|
3881
3895
|
}
|
|
3882
3896
|
const channelId = params.channelId;
|
|
3883
3897
|
const contactId = params.contactId;
|
|
3884
3898
|
const currency = params.currency;
|
|
3885
3899
|
const isCurrent = params.isCurrent;
|
|
3886
|
-
const marketId = params.marketId;
|
|
3887
3900
|
const metadata = params.metadata;
|
|
3888
3901
|
const name = params.name;
|
|
3889
3902
|
const sessionKey = params.sessionKey;
|
|
@@ -3901,9 +3914,6 @@ class Carts {
|
|
|
3901
3914
|
if (typeof isCurrent !== 'undefined') {
|
|
3902
3915
|
apiPayload['is_current'] = isCurrent;
|
|
3903
3916
|
}
|
|
3904
|
-
if (typeof marketId !== 'undefined') {
|
|
3905
|
-
apiPayload['market_id'] = marketId;
|
|
3906
|
-
}
|
|
3907
3917
|
if (typeof metadata !== 'undefined') {
|
|
3908
3918
|
apiPayload['metadata'] = metadata;
|
|
3909
3919
|
}
|
|
@@ -4940,7 +4950,6 @@ class Carts {
|
|
|
4940
4950
|
* @param {string} params.id -
|
|
4941
4951
|
* @param {string} params.channelId -
|
|
4942
4952
|
* @param {string} params.currency - ISO 4217 code.
|
|
4943
|
-
* @param {string} params.marketId -
|
|
4944
4953
|
* @param {object} params.metadata - Free-form metadata.
|
|
4945
4954
|
* @param {string} params.name -
|
|
4946
4955
|
* @throws {RevenexxException}
|
|
@@ -4952,7 +4961,6 @@ class Carts {
|
|
|
4952
4961
|
* @param {string} id -
|
|
4953
4962
|
* @param {string} channelId -
|
|
4954
4963
|
* @param {string} currency - ISO 4217 code.
|
|
4955
|
-
* @param {string} marketId -
|
|
4956
4964
|
* @param {object} metadata - Free-form metadata.
|
|
4957
4965
|
* @param {string} name -
|
|
4958
4966
|
* @throws {RevenexxException}
|
|
@@ -4969,15 +4977,13 @@ class Carts {
|
|
|
4969
4977
|
id: paramsOrFirst,
|
|
4970
4978
|
channelId: rest[0],
|
|
4971
4979
|
currency: rest[1],
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
name: rest[4]
|
|
4980
|
+
metadata: rest[2],
|
|
4981
|
+
name: rest[3]
|
|
4975
4982
|
};
|
|
4976
4983
|
}
|
|
4977
4984
|
const id = params.id;
|
|
4978
4985
|
const channelId = params.channelId;
|
|
4979
4986
|
const currency = params.currency;
|
|
4980
|
-
const marketId = params.marketId;
|
|
4981
4987
|
const metadata = params.metadata;
|
|
4982
4988
|
const name = params.name;
|
|
4983
4989
|
if (typeof id === 'undefined') {
|
|
@@ -4991,9 +4997,6 @@ class Carts {
|
|
|
4991
4997
|
if (typeof currency !== 'undefined') {
|
|
4992
4998
|
apiPayload['currency'] = currency;
|
|
4993
4999
|
}
|
|
4994
|
-
if (typeof marketId !== 'undefined') {
|
|
4995
|
-
apiPayload['market_id'] = marketId;
|
|
4996
|
-
}
|
|
4997
5000
|
if (typeof metadata !== 'undefined') {
|
|
4998
5001
|
apiPayload['metadata'] = metadata;
|
|
4999
5002
|
}
|
|
@@ -13292,7 +13295,6 @@ class Orders {
|
|
|
13292
13295
|
* @param {string} params.contactId - Filter to one ordering contact.
|
|
13293
13296
|
* @param {string} params.organizationId - Filter to one B2B organization.
|
|
13294
13297
|
* @param {string} params.channelId - Filter to one sales channel.
|
|
13295
|
-
* @param {string} params.marketId - Filter to one market.
|
|
13296
13298
|
* @param {string} params.number - Filter by exact order number.
|
|
13297
13299
|
* @param {number} params.limit - Page size (default 50, max 200).
|
|
13298
13300
|
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
@@ -13309,7 +13311,6 @@ class Orders {
|
|
|
13309
13311
|
* @param {string} contactId - Filter to one ordering contact.
|
|
13310
13312
|
* @param {string} organizationId - Filter to one B2B organization.
|
|
13311
13313
|
* @param {string} channelId - Filter to one sales channel.
|
|
13312
|
-
* @param {string} marketId - Filter to one market.
|
|
13313
13314
|
* @param {string} number - Filter by exact order number.
|
|
13314
13315
|
* @param {number} limit - Page size (default 50, max 200).
|
|
13315
13316
|
* @param {number} offset - Row offset for pagination (default 0).
|
|
@@ -13321,7 +13322,7 @@ class Orders {
|
|
|
13321
13322
|
|
|
13322
13323
|
ordersList(paramsOrFirst, ...rest) {
|
|
13323
13324
|
let params;
|
|
13324
|
-
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 || '
|
|
13325
|
+
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 || 'number' in paramsOrFirst || 'limit' in paramsOrFirst || 'offset' in paramsOrFirst || 'order' in paramsOrFirst)) {
|
|
13325
13326
|
params = paramsOrFirst || {};
|
|
13326
13327
|
} else {
|
|
13327
13328
|
params = {
|
|
@@ -13331,11 +13332,10 @@ class Orders {
|
|
|
13331
13332
|
contactId: rest[2],
|
|
13332
13333
|
organizationId: rest[3],
|
|
13333
13334
|
channelId: rest[4],
|
|
13334
|
-
|
|
13335
|
-
|
|
13336
|
-
|
|
13337
|
-
|
|
13338
|
-
order: rest[9]
|
|
13335
|
+
number: rest[5],
|
|
13336
|
+
limit: rest[6],
|
|
13337
|
+
offset: rest[7],
|
|
13338
|
+
order: rest[8]
|
|
13339
13339
|
};
|
|
13340
13340
|
}
|
|
13341
13341
|
const status = params.status;
|
|
@@ -13344,7 +13344,6 @@ class Orders {
|
|
|
13344
13344
|
const contactId = params.contactId;
|
|
13345
13345
|
const organizationId = params.organizationId;
|
|
13346
13346
|
const channelId = params.channelId;
|
|
13347
|
-
const marketId = params.marketId;
|
|
13348
13347
|
const number = params.number;
|
|
13349
13348
|
const limit = params.limit;
|
|
13350
13349
|
const offset = params.offset;
|
|
@@ -13369,9 +13368,6 @@ class Orders {
|
|
|
13369
13368
|
if (typeof channelId !== 'undefined') {
|
|
13370
13369
|
apiPayload['channel_id'] = channelId;
|
|
13371
13370
|
}
|
|
13372
|
-
if (typeof marketId !== 'undefined') {
|
|
13373
|
-
apiPayload['market_id'] = marketId;
|
|
13374
|
-
}
|
|
13375
13371
|
if (typeof number !== 'undefined') {
|
|
13376
13372
|
apiPayload['number'] = number;
|
|
13377
13373
|
}
|
|
@@ -13728,7 +13724,6 @@ class Orders {
|
|
|
13728
13724
|
* @param {string} params.currency - ISO 4217 code (default EUR).
|
|
13729
13725
|
* @param {string} params.customerOrderNumber - The buyer's own order/PO number.
|
|
13730
13726
|
* @param {number} params.grandTotal - Override — computed as subtotal + shipping + tax when omitted.
|
|
13731
|
-
* @param {string} params.marketId -
|
|
13732
13727
|
* @param {object} params.metadata - Free-form metadata.
|
|
13733
13728
|
* @param {string} params.organizationId - B2B organization.
|
|
13734
13729
|
* @param {object} params.payment - Frozen payment snapshot — a known 'payment.status' seeds payment_status (otherwise 'open').
|
|
@@ -13751,7 +13746,6 @@ class Orders {
|
|
|
13751
13746
|
* @param {string} currency - ISO 4217 code (default EUR).
|
|
13752
13747
|
* @param {string} customerOrderNumber - The buyer's own order/PO number.
|
|
13753
13748
|
* @param {number} grandTotal - Override — computed as subtotal + shipping + tax when omitted.
|
|
13754
|
-
* @param {string} marketId -
|
|
13755
13749
|
* @param {object} metadata - Free-form metadata.
|
|
13756
13750
|
* @param {string} organizationId - B2B organization.
|
|
13757
13751
|
* @param {object} payment - Frozen payment snapshot — a known 'payment.status' seeds payment_status (otherwise 'open').
|
|
@@ -13766,7 +13760,7 @@ class Orders {
|
|
|
13766
13760
|
|
|
13767
13761
|
ordersPlace(paramsOrFirst, ...rest) {
|
|
13768
13762
|
let params;
|
|
13769
|
-
if (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('items' in paramsOrFirst || 'billingAddress' in paramsOrFirst || 'buyer' in paramsOrFirst || 'cartId' in paramsOrFirst || 'channelId' in paramsOrFirst || 'contactId' in paramsOrFirst || 'currency' in paramsOrFirst || 'customerOrderNumber' in paramsOrFirst || 'grandTotal' in paramsOrFirst || '
|
|
13763
|
+
if (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('items' in paramsOrFirst || 'billingAddress' in paramsOrFirst || 'buyer' in paramsOrFirst || 'cartId' in paramsOrFirst || 'channelId' in paramsOrFirst || 'contactId' in paramsOrFirst || 'currency' in paramsOrFirst || 'customerOrderNumber' in paramsOrFirst || 'grandTotal' in paramsOrFirst || 'metadata' in paramsOrFirst || 'organizationId' in paramsOrFirst || 'payment' in paramsOrFirst || 'shipping' in paramsOrFirst || 'shippingAddress' in paramsOrFirst || 'shippingTotal' in paramsOrFirst || 'userData' in paramsOrFirst)) {
|
|
13770
13764
|
params = paramsOrFirst || {};
|
|
13771
13765
|
} else {
|
|
13772
13766
|
params = {
|
|
@@ -13779,14 +13773,13 @@ class Orders {
|
|
|
13779
13773
|
currency: rest[5],
|
|
13780
13774
|
customerOrderNumber: rest[6],
|
|
13781
13775
|
grandTotal: rest[7],
|
|
13782
|
-
|
|
13783
|
-
|
|
13784
|
-
|
|
13785
|
-
|
|
13786
|
-
|
|
13787
|
-
|
|
13788
|
-
|
|
13789
|
-
userData: rest[15]
|
|
13776
|
+
metadata: rest[8],
|
|
13777
|
+
organizationId: rest[9],
|
|
13778
|
+
payment: rest[10],
|
|
13779
|
+
shipping: rest[11],
|
|
13780
|
+
shippingAddress: rest[12],
|
|
13781
|
+
shippingTotal: rest[13],
|
|
13782
|
+
userData: rest[14]
|
|
13790
13783
|
};
|
|
13791
13784
|
}
|
|
13792
13785
|
const items = params.items;
|
|
@@ -13798,7 +13791,6 @@ class Orders {
|
|
|
13798
13791
|
const currency = params.currency;
|
|
13799
13792
|
const customerOrderNumber = params.customerOrderNumber;
|
|
13800
13793
|
const grandTotal = params.grandTotal;
|
|
13801
|
-
const marketId = params.marketId;
|
|
13802
13794
|
const metadata = params.metadata;
|
|
13803
13795
|
const organizationId = params.organizationId;
|
|
13804
13796
|
const payment = params.payment;
|
|
@@ -13867,9 +13859,6 @@ class Orders {
|
|
|
13867
13859
|
}
|
|
13868
13860
|
});
|
|
13869
13861
|
}
|
|
13870
|
-
if (typeof marketId !== 'undefined') {
|
|
13871
|
-
apiPayload['market_id'] = marketId;
|
|
13872
|
-
}
|
|
13873
13862
|
if (typeof metadata !== 'undefined') {
|
|
13874
13863
|
apiPayload['metadata'] = metadata;
|
|
13875
13864
|
}
|
|
@@ -18149,10 +18138,10 @@ class Prices {
|
|
|
18149
18138
|
* @param {string} params.description -
|
|
18150
18139
|
* @param {boolean} params.isDefault - Default lists resolve last within their group.
|
|
18151
18140
|
* @param {object} params.labels - Localised names ({de, en, …}).
|
|
18152
|
-
* @param {string} params.marketId - Scope: only this market.
|
|
18153
18141
|
* @param {object} params.metadata - Free-form metadata.
|
|
18154
18142
|
* @param {string} params.organizationId - Scope: only this organization.
|
|
18155
18143
|
* @param {number} params.priority - Tie-breaker within a specificity group (higher wins, default 0).
|
|
18144
|
+
* @param {boolean} params.requiresAuth - Gate: when true the list resolves only for an authenticated buyer (contact or organization context); anonymous resolve calls get on_request. Default false (open to everyone).
|
|
18156
18145
|
* @param {PriceListStatus} params.status - Default 'active' — only active lists resolve.
|
|
18157
18146
|
* @param {boolean} params.taxIncluded - Gross (true) or net (false, default) prices.
|
|
18158
18147
|
* @param {string} params.validFrom - Validity window start.
|
|
@@ -18171,10 +18160,10 @@ class Prices {
|
|
|
18171
18160
|
* @param {string} description -
|
|
18172
18161
|
* @param {boolean} isDefault - Default lists resolve last within their group.
|
|
18173
18162
|
* @param {object} labels - Localised names ({de, en, …}).
|
|
18174
|
-
* @param {string} marketId - Scope: only this market.
|
|
18175
18163
|
* @param {object} metadata - Free-form metadata.
|
|
18176
18164
|
* @param {string} organizationId - Scope: only this organization.
|
|
18177
18165
|
* @param {number} priority - Tie-breaker within a specificity group (higher wins, default 0).
|
|
18166
|
+
* @param {boolean} requiresAuth - Gate: when true the list resolves only for an authenticated buyer (contact or organization context); anonymous resolve calls get on_request. Default false (open to everyone).
|
|
18178
18167
|
* @param {PriceListStatus} status - Default 'active' — only active lists resolve.
|
|
18179
18168
|
* @param {boolean} taxIncluded - Gross (true) or net (false, default) prices.
|
|
18180
18169
|
* @param {string} validFrom - Validity window start.
|
|
@@ -18198,10 +18187,10 @@ class Prices {
|
|
|
18198
18187
|
description: rest[4],
|
|
18199
18188
|
isDefault: rest[5],
|
|
18200
18189
|
labels: rest[6],
|
|
18201
|
-
|
|
18202
|
-
|
|
18203
|
-
|
|
18204
|
-
|
|
18190
|
+
metadata: rest[7],
|
|
18191
|
+
organizationId: rest[8],
|
|
18192
|
+
priority: rest[9],
|
|
18193
|
+
requiresAuth: rest[10],
|
|
18205
18194
|
status: rest[11],
|
|
18206
18195
|
taxIncluded: rest[12],
|
|
18207
18196
|
validFrom: rest[13],
|
|
@@ -18216,10 +18205,10 @@ class Prices {
|
|
|
18216
18205
|
const description = params.description;
|
|
18217
18206
|
const isDefault = params.isDefault;
|
|
18218
18207
|
const labels = params.labels;
|
|
18219
|
-
const marketId = params.marketId;
|
|
18220
18208
|
const metadata = params.metadata;
|
|
18221
18209
|
const organizationId = params.organizationId;
|
|
18222
18210
|
const priority = params.priority;
|
|
18211
|
+
const requiresAuth = params.requiresAuth;
|
|
18223
18212
|
const status = params.status;
|
|
18224
18213
|
const taxIncluded = params.taxIncluded;
|
|
18225
18214
|
const validFrom = params.validFrom;
|
|
@@ -18253,9 +18242,6 @@ class Prices {
|
|
|
18253
18242
|
if (typeof labels !== 'undefined') {
|
|
18254
18243
|
apiPayload['labels'] = labels;
|
|
18255
18244
|
}
|
|
18256
|
-
if (typeof marketId !== 'undefined') {
|
|
18257
|
-
apiPayload['market_id'] = marketId;
|
|
18258
|
-
}
|
|
18259
18245
|
if (typeof metadata !== 'undefined') {
|
|
18260
18246
|
apiPayload['metadata'] = metadata;
|
|
18261
18247
|
}
|
|
@@ -18268,6 +18254,9 @@ class Prices {
|
|
|
18268
18254
|
if (typeof priority !== 'undefined') {
|
|
18269
18255
|
apiPayload['priority'] = priority;
|
|
18270
18256
|
}
|
|
18257
|
+
if (typeof requiresAuth !== 'undefined') {
|
|
18258
|
+
apiPayload['requires_auth'] = requiresAuth;
|
|
18259
|
+
}
|
|
18271
18260
|
if (typeof status !== 'undefined') {
|
|
18272
18261
|
apiPayload['status'] = status;
|
|
18273
18262
|
}
|
|
@@ -18380,11 +18369,11 @@ class Prices {
|
|
|
18380
18369
|
* @param {string} params.description -
|
|
18381
18370
|
* @param {boolean} params.isDefault - Default lists resolve last within their group.
|
|
18382
18371
|
* @param {object} params.labels - Localised names ({de, en, …}).
|
|
18383
|
-
* @param {string} params.marketId - Scope: only this market.
|
|
18384
18372
|
* @param {object} params.metadata - Free-form metadata.
|
|
18385
18373
|
* @param {string} params.name -
|
|
18386
18374
|
* @param {string} params.organizationId - Scope: only this organization.
|
|
18387
18375
|
* @param {number} params.priority - Tie-breaker within a specificity group (higher wins, default 0).
|
|
18376
|
+
* @param {boolean} params.requiresAuth - Gate: when true the list resolves only for an authenticated buyer (contact or organization context); anonymous resolve calls get on_request. Default false (open to everyone).
|
|
18388
18377
|
* @param {PriceListStatus} params.status - Default 'active' — only active lists resolve.
|
|
18389
18378
|
* @param {boolean} params.taxIncluded - Gross (true) or net (false, default) prices.
|
|
18390
18379
|
* @param {string} params.validFrom - Validity window start.
|
|
@@ -18403,11 +18392,11 @@ class Prices {
|
|
|
18403
18392
|
* @param {string} description -
|
|
18404
18393
|
* @param {boolean} isDefault - Default lists resolve last within their group.
|
|
18405
18394
|
* @param {object} labels - Localised names ({de, en, …}).
|
|
18406
|
-
* @param {string} marketId - Scope: only this market.
|
|
18407
18395
|
* @param {object} metadata - Free-form metadata.
|
|
18408
18396
|
* @param {string} name -
|
|
18409
18397
|
* @param {string} organizationId - Scope: only this organization.
|
|
18410
18398
|
* @param {number} priority - Tie-breaker within a specificity group (higher wins, default 0).
|
|
18399
|
+
* @param {boolean} requiresAuth - Gate: when true the list resolves only for an authenticated buyer (contact or organization context); anonymous resolve calls get on_request. Default false (open to everyone).
|
|
18411
18400
|
* @param {PriceListStatus} status - Default 'active' — only active lists resolve.
|
|
18412
18401
|
* @param {boolean} taxIncluded - Gross (true) or net (false, default) prices.
|
|
18413
18402
|
* @param {string} validFrom - Validity window start.
|
|
@@ -18431,11 +18420,11 @@ class Prices {
|
|
|
18431
18420
|
description: rest[4],
|
|
18432
18421
|
isDefault: rest[5],
|
|
18433
18422
|
labels: rest[6],
|
|
18434
|
-
|
|
18435
|
-
|
|
18436
|
-
|
|
18437
|
-
|
|
18438
|
-
|
|
18423
|
+
metadata: rest[7],
|
|
18424
|
+
name: rest[8],
|
|
18425
|
+
organizationId: rest[9],
|
|
18426
|
+
priority: rest[10],
|
|
18427
|
+
requiresAuth: rest[11],
|
|
18439
18428
|
status: rest[12],
|
|
18440
18429
|
taxIncluded: rest[13],
|
|
18441
18430
|
validFrom: rest[14],
|
|
@@ -18450,11 +18439,11 @@ class Prices {
|
|
|
18450
18439
|
const description = params.description;
|
|
18451
18440
|
const isDefault = params.isDefault;
|
|
18452
18441
|
const labels = params.labels;
|
|
18453
|
-
const marketId = params.marketId;
|
|
18454
18442
|
const metadata = params.metadata;
|
|
18455
18443
|
const name = params.name;
|
|
18456
18444
|
const organizationId = params.organizationId;
|
|
18457
18445
|
const priority = params.priority;
|
|
18446
|
+
const requiresAuth = params.requiresAuth;
|
|
18458
18447
|
const status = params.status;
|
|
18459
18448
|
const taxIncluded = params.taxIncluded;
|
|
18460
18449
|
const validFrom = params.validFrom;
|
|
@@ -18485,9 +18474,6 @@ class Prices {
|
|
|
18485
18474
|
if (typeof labels !== 'undefined') {
|
|
18486
18475
|
apiPayload['labels'] = labels;
|
|
18487
18476
|
}
|
|
18488
|
-
if (typeof marketId !== 'undefined') {
|
|
18489
|
-
apiPayload['market_id'] = marketId;
|
|
18490
|
-
}
|
|
18491
18477
|
if (typeof metadata !== 'undefined') {
|
|
18492
18478
|
apiPayload['metadata'] = metadata;
|
|
18493
18479
|
}
|
|
@@ -18500,6 +18486,9 @@ class Prices {
|
|
|
18500
18486
|
if (typeof priority !== 'undefined') {
|
|
18501
18487
|
apiPayload['priority'] = priority;
|
|
18502
18488
|
}
|
|
18489
|
+
if (typeof requiresAuth !== 'undefined') {
|
|
18490
|
+
apiPayload['requires_auth'] = requiresAuth;
|
|
18491
|
+
}
|
|
18503
18492
|
if (typeof status !== 'undefined') {
|
|
18504
18493
|
apiPayload['status'] = status;
|
|
18505
18494
|
}
|
|
@@ -23646,6 +23635,57 @@ class Search {
|
|
|
23646
23635
|
}
|
|
23647
23636
|
}
|
|
23648
23637
|
|
|
23638
|
+
class Settings {
|
|
23639
|
+
client;
|
|
23640
|
+
constructor(client) {
|
|
23641
|
+
this.client = client;
|
|
23642
|
+
}
|
|
23643
|
+
|
|
23644
|
+
/**
|
|
23645
|
+
* The tenant's effective settings for the app — the declared schema's defaults merged with stored tenant/market values. Sensitive settings are masked (listed in `masked`, omitted from `settings`).
|
|
23646
|
+
*
|
|
23647
|
+
* @param {string} params.app - App name, e.g. `pages`.
|
|
23648
|
+
* @param {string} params.market - Resolve market-scoped settings for this market code; falls back to the tenant value.
|
|
23649
|
+
* @throws {RevenexxException}
|
|
23650
|
+
* @returns {Promise<{}>}
|
|
23651
|
+
*/
|
|
23652
|
+
|
|
23653
|
+
/**
|
|
23654
|
+
* The tenant's effective settings for the app — the declared schema's defaults merged with stored tenant/market values. Sensitive settings are masked (listed in `masked`, omitted from `settings`).
|
|
23655
|
+
*
|
|
23656
|
+
* @param {string} app - App name, e.g. `pages`.
|
|
23657
|
+
* @param {string} market - Resolve market-scoped settings for this market code; falls back to the tenant value.
|
|
23658
|
+
* @throws {RevenexxException}
|
|
23659
|
+
* @returns {Promise<{}>}
|
|
23660
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
23661
|
+
*/
|
|
23662
|
+
|
|
23663
|
+
settingsGetAppSettings(paramsOrFirst, ...rest) {
|
|
23664
|
+
let params;
|
|
23665
|
+
if (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
23666
|
+
params = paramsOrFirst || {};
|
|
23667
|
+
} else {
|
|
23668
|
+
params = {
|
|
23669
|
+
app: paramsOrFirst,
|
|
23670
|
+
market: rest[0]
|
|
23671
|
+
};
|
|
23672
|
+
}
|
|
23673
|
+
const app = params.app;
|
|
23674
|
+
const market = params.market;
|
|
23675
|
+
if (typeof app === 'undefined') {
|
|
23676
|
+
throw new RevenexxException('Missing required parameter: "app"');
|
|
23677
|
+
}
|
|
23678
|
+
const apiPath = '/v1/settings/apps/{app}'.replace('{app}', app);
|
|
23679
|
+
const apiPayload = {};
|
|
23680
|
+
if (typeof market !== 'undefined') {
|
|
23681
|
+
apiPayload['market'] = market;
|
|
23682
|
+
}
|
|
23683
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
23684
|
+
const apiHeaders = {};
|
|
23685
|
+
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
23686
|
+
}
|
|
23687
|
+
}
|
|
23688
|
+
|
|
23649
23689
|
class Shipping {
|
|
23650
23690
|
client;
|
|
23651
23691
|
constructor(client) {
|
|
@@ -29814,6 +29854,7 @@ exports.Runtime = Runtime;
|
|
|
29814
29854
|
exports.Runtimes = Runtimes;
|
|
29815
29855
|
exports.Scopes = Scopes;
|
|
29816
29856
|
exports.Search = Search;
|
|
29857
|
+
exports.Settings = Settings;
|
|
29817
29858
|
exports.Shipping = Shipping;
|
|
29818
29859
|
exports.ShippingMethodMatrixBasis = ShippingMethodMatrixBasis;
|
|
29819
29860
|
exports.ShippingMethodPricingType = ShippingMethodPricingType;
|