@revenexx/sdk 0.0.13 → 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/esm/sdk.js
CHANGED
|
@@ -641,6 +641,7 @@ class Client {
|
|
|
641
641
|
endpoint: 'https://api.revenexx.com',
|
|
642
642
|
endpointRealtime: '',
|
|
643
643
|
tenant: '',
|
|
644
|
+
market: '',
|
|
644
645
|
apikeyauth: '',
|
|
645
646
|
bearerauth: ''
|
|
646
647
|
};
|
|
@@ -651,7 +652,7 @@ class Client {
|
|
|
651
652
|
'x-sdk-name': 'Revenexx Web',
|
|
652
653
|
'x-sdk-platform': '',
|
|
653
654
|
'x-sdk-language': 'web',
|
|
654
|
-
'x-sdk-version': '0.0.
|
|
655
|
+
'x-sdk-version': '0.0.15'
|
|
655
656
|
};
|
|
656
657
|
|
|
657
658
|
/**
|
|
@@ -709,6 +710,22 @@ class Client {
|
|
|
709
710
|
return this;
|
|
710
711
|
}
|
|
711
712
|
|
|
713
|
+
/**
|
|
714
|
+
* Set Market
|
|
715
|
+
*
|
|
716
|
+
* The active market slug to scope requests to, sent as the
|
|
717
|
+
* X-Revenexx-Market header. Optional — omit it to see only global rows.
|
|
718
|
+
*
|
|
719
|
+
* @param value string
|
|
720
|
+
*
|
|
721
|
+
* @return {this}
|
|
722
|
+
*/
|
|
723
|
+
setMarket(value) {
|
|
724
|
+
this.headers['X-Revenexx-Market'] = value;
|
|
725
|
+
this.config.market = value;
|
|
726
|
+
return this;
|
|
727
|
+
}
|
|
728
|
+
|
|
712
729
|
/**
|
|
713
730
|
* Set ApiKeyAuth
|
|
714
731
|
*
|
|
@@ -3834,7 +3851,6 @@ class Carts {
|
|
|
3834
3851
|
* @param {string} params.contactId - Owning customer contact.
|
|
3835
3852
|
* @param {string} params.currency - ISO 4217 code (default EUR).
|
|
3836
3853
|
* @param {boolean} params.isCurrent - Make this THE current cart of its owner.
|
|
3837
|
-
* @param {string} params.marketId -
|
|
3838
3854
|
* @param {object} params.metadata - Free-form metadata.
|
|
3839
3855
|
* @param {string} params.name - Display name (default 'Cart').
|
|
3840
3856
|
* @param {string} params.sessionKey - Owning guest session.
|
|
@@ -3848,7 +3864,6 @@ class Carts {
|
|
|
3848
3864
|
* @param {string} contactId - Owning customer contact.
|
|
3849
3865
|
* @param {string} currency - ISO 4217 code (default EUR).
|
|
3850
3866
|
* @param {boolean} isCurrent - Make this THE current cart of its owner.
|
|
3851
|
-
* @param {string} marketId -
|
|
3852
3867
|
* @param {object} metadata - Free-form metadata.
|
|
3853
3868
|
* @param {string} name - Display name (default 'Cart').
|
|
3854
3869
|
* @param {string} sessionKey - Owning guest session.
|
|
@@ -3867,17 +3882,15 @@ class Carts {
|
|
|
3867
3882
|
contactId: rest[0],
|
|
3868
3883
|
currency: rest[1],
|
|
3869
3884
|
isCurrent: rest[2],
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
sessionKey: rest[6]
|
|
3885
|
+
metadata: rest[3],
|
|
3886
|
+
name: rest[4],
|
|
3887
|
+
sessionKey: rest[5]
|
|
3874
3888
|
};
|
|
3875
3889
|
}
|
|
3876
3890
|
const channelId = params.channelId;
|
|
3877
3891
|
const contactId = params.contactId;
|
|
3878
3892
|
const currency = params.currency;
|
|
3879
3893
|
const isCurrent = params.isCurrent;
|
|
3880
|
-
const marketId = params.marketId;
|
|
3881
3894
|
const metadata = params.metadata;
|
|
3882
3895
|
const name = params.name;
|
|
3883
3896
|
const sessionKey = params.sessionKey;
|
|
@@ -3895,9 +3908,6 @@ class Carts {
|
|
|
3895
3908
|
if (typeof isCurrent !== 'undefined') {
|
|
3896
3909
|
apiPayload['is_current'] = isCurrent;
|
|
3897
3910
|
}
|
|
3898
|
-
if (typeof marketId !== 'undefined') {
|
|
3899
|
-
apiPayload['market_id'] = marketId;
|
|
3900
|
-
}
|
|
3901
3911
|
if (typeof metadata !== 'undefined') {
|
|
3902
3912
|
apiPayload['metadata'] = metadata;
|
|
3903
3913
|
}
|
|
@@ -4934,7 +4944,6 @@ class Carts {
|
|
|
4934
4944
|
* @param {string} params.id -
|
|
4935
4945
|
* @param {string} params.channelId -
|
|
4936
4946
|
* @param {string} params.currency - ISO 4217 code.
|
|
4937
|
-
* @param {string} params.marketId -
|
|
4938
4947
|
* @param {object} params.metadata - Free-form metadata.
|
|
4939
4948
|
* @param {string} params.name -
|
|
4940
4949
|
* @throws {RevenexxException}
|
|
@@ -4946,7 +4955,6 @@ class Carts {
|
|
|
4946
4955
|
* @param {string} id -
|
|
4947
4956
|
* @param {string} channelId -
|
|
4948
4957
|
* @param {string} currency - ISO 4217 code.
|
|
4949
|
-
* @param {string} marketId -
|
|
4950
4958
|
* @param {object} metadata - Free-form metadata.
|
|
4951
4959
|
* @param {string} name -
|
|
4952
4960
|
* @throws {RevenexxException}
|
|
@@ -4963,15 +4971,13 @@ class Carts {
|
|
|
4963
4971
|
id: paramsOrFirst,
|
|
4964
4972
|
channelId: rest[0],
|
|
4965
4973
|
currency: rest[1],
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
name: rest[4]
|
|
4974
|
+
metadata: rest[2],
|
|
4975
|
+
name: rest[3]
|
|
4969
4976
|
};
|
|
4970
4977
|
}
|
|
4971
4978
|
const id = params.id;
|
|
4972
4979
|
const channelId = params.channelId;
|
|
4973
4980
|
const currency = params.currency;
|
|
4974
|
-
const marketId = params.marketId;
|
|
4975
4981
|
const metadata = params.metadata;
|
|
4976
4982
|
const name = params.name;
|
|
4977
4983
|
if (typeof id === 'undefined') {
|
|
@@ -4985,9 +4991,6 @@ class Carts {
|
|
|
4985
4991
|
if (typeof currency !== 'undefined') {
|
|
4986
4992
|
apiPayload['currency'] = currency;
|
|
4987
4993
|
}
|
|
4988
|
-
if (typeof marketId !== 'undefined') {
|
|
4989
|
-
apiPayload['market_id'] = marketId;
|
|
4990
|
-
}
|
|
4991
4994
|
if (typeof metadata !== 'undefined') {
|
|
4992
4995
|
apiPayload['metadata'] = metadata;
|
|
4993
4996
|
}
|
|
@@ -13286,7 +13289,6 @@ class Orders {
|
|
|
13286
13289
|
* @param {string} params.contactId - Filter to one ordering contact.
|
|
13287
13290
|
* @param {string} params.organizationId - Filter to one B2B organization.
|
|
13288
13291
|
* @param {string} params.channelId - Filter to one sales channel.
|
|
13289
|
-
* @param {string} params.marketId - Filter to one market.
|
|
13290
13292
|
* @param {string} params.number - Filter by exact order number.
|
|
13291
13293
|
* @param {number} params.limit - Page size (default 50, max 200).
|
|
13292
13294
|
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
@@ -13303,7 +13305,6 @@ class Orders {
|
|
|
13303
13305
|
* @param {string} contactId - Filter to one ordering contact.
|
|
13304
13306
|
* @param {string} organizationId - Filter to one B2B organization.
|
|
13305
13307
|
* @param {string} channelId - Filter to one sales channel.
|
|
13306
|
-
* @param {string} marketId - Filter to one market.
|
|
13307
13308
|
* @param {string} number - Filter by exact order number.
|
|
13308
13309
|
* @param {number} limit - Page size (default 50, max 200).
|
|
13309
13310
|
* @param {number} offset - Row offset for pagination (default 0).
|
|
@@ -13315,7 +13316,7 @@ class Orders {
|
|
|
13315
13316
|
|
|
13316
13317
|
ordersList(paramsOrFirst, ...rest) {
|
|
13317
13318
|
let params;
|
|
13318
|
-
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 || '
|
|
13319
|
+
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)) {
|
|
13319
13320
|
params = paramsOrFirst || {};
|
|
13320
13321
|
} else {
|
|
13321
13322
|
params = {
|
|
@@ -13325,11 +13326,10 @@ class Orders {
|
|
|
13325
13326
|
contactId: rest[2],
|
|
13326
13327
|
organizationId: rest[3],
|
|
13327
13328
|
channelId: rest[4],
|
|
13328
|
-
|
|
13329
|
-
|
|
13330
|
-
|
|
13331
|
-
|
|
13332
|
-
order: rest[9]
|
|
13329
|
+
number: rest[5],
|
|
13330
|
+
limit: rest[6],
|
|
13331
|
+
offset: rest[7],
|
|
13332
|
+
order: rest[8]
|
|
13333
13333
|
};
|
|
13334
13334
|
}
|
|
13335
13335
|
const status = params.status;
|
|
@@ -13338,7 +13338,6 @@ class Orders {
|
|
|
13338
13338
|
const contactId = params.contactId;
|
|
13339
13339
|
const organizationId = params.organizationId;
|
|
13340
13340
|
const channelId = params.channelId;
|
|
13341
|
-
const marketId = params.marketId;
|
|
13342
13341
|
const number = params.number;
|
|
13343
13342
|
const limit = params.limit;
|
|
13344
13343
|
const offset = params.offset;
|
|
@@ -13363,9 +13362,6 @@ class Orders {
|
|
|
13363
13362
|
if (typeof channelId !== 'undefined') {
|
|
13364
13363
|
apiPayload['channel_id'] = channelId;
|
|
13365
13364
|
}
|
|
13366
|
-
if (typeof marketId !== 'undefined') {
|
|
13367
|
-
apiPayload['market_id'] = marketId;
|
|
13368
|
-
}
|
|
13369
13365
|
if (typeof number !== 'undefined') {
|
|
13370
13366
|
apiPayload['number'] = number;
|
|
13371
13367
|
}
|
|
@@ -13722,7 +13718,6 @@ class Orders {
|
|
|
13722
13718
|
* @param {string} params.currency - ISO 4217 code (default EUR).
|
|
13723
13719
|
* @param {string} params.customerOrderNumber - The buyer's own order/PO number.
|
|
13724
13720
|
* @param {number} params.grandTotal - Override — computed as subtotal + shipping + tax when omitted.
|
|
13725
|
-
* @param {string} params.marketId -
|
|
13726
13721
|
* @param {object} params.metadata - Free-form metadata.
|
|
13727
13722
|
* @param {string} params.organizationId - B2B organization.
|
|
13728
13723
|
* @param {object} params.payment - Frozen payment snapshot — a known 'payment.status' seeds payment_status (otherwise 'open').
|
|
@@ -13745,7 +13740,6 @@ class Orders {
|
|
|
13745
13740
|
* @param {string} currency - ISO 4217 code (default EUR).
|
|
13746
13741
|
* @param {string} customerOrderNumber - The buyer's own order/PO number.
|
|
13747
13742
|
* @param {number} grandTotal - Override — computed as subtotal + shipping + tax when omitted.
|
|
13748
|
-
* @param {string} marketId -
|
|
13749
13743
|
* @param {object} metadata - Free-form metadata.
|
|
13750
13744
|
* @param {string} organizationId - B2B organization.
|
|
13751
13745
|
* @param {object} payment - Frozen payment snapshot — a known 'payment.status' seeds payment_status (otherwise 'open').
|
|
@@ -13760,7 +13754,7 @@ class Orders {
|
|
|
13760
13754
|
|
|
13761
13755
|
ordersPlace(paramsOrFirst, ...rest) {
|
|
13762
13756
|
let params;
|
|
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 || '
|
|
13757
|
+
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)) {
|
|
13764
13758
|
params = paramsOrFirst || {};
|
|
13765
13759
|
} else {
|
|
13766
13760
|
params = {
|
|
@@ -13773,14 +13767,13 @@ class Orders {
|
|
|
13773
13767
|
currency: rest[5],
|
|
13774
13768
|
customerOrderNumber: rest[6],
|
|
13775
13769
|
grandTotal: rest[7],
|
|
13776
|
-
|
|
13777
|
-
|
|
13778
|
-
|
|
13779
|
-
|
|
13780
|
-
|
|
13781
|
-
|
|
13782
|
-
|
|
13783
|
-
userData: rest[15]
|
|
13770
|
+
metadata: rest[8],
|
|
13771
|
+
organizationId: rest[9],
|
|
13772
|
+
payment: rest[10],
|
|
13773
|
+
shipping: rest[11],
|
|
13774
|
+
shippingAddress: rest[12],
|
|
13775
|
+
shippingTotal: rest[13],
|
|
13776
|
+
userData: rest[14]
|
|
13784
13777
|
};
|
|
13785
13778
|
}
|
|
13786
13779
|
const items = params.items;
|
|
@@ -13792,7 +13785,6 @@ class Orders {
|
|
|
13792
13785
|
const currency = params.currency;
|
|
13793
13786
|
const customerOrderNumber = params.customerOrderNumber;
|
|
13794
13787
|
const grandTotal = params.grandTotal;
|
|
13795
|
-
const marketId = params.marketId;
|
|
13796
13788
|
const metadata = params.metadata;
|
|
13797
13789
|
const organizationId = params.organizationId;
|
|
13798
13790
|
const payment = params.payment;
|
|
@@ -13861,9 +13853,6 @@ class Orders {
|
|
|
13861
13853
|
}
|
|
13862
13854
|
});
|
|
13863
13855
|
}
|
|
13864
|
-
if (typeof marketId !== 'undefined') {
|
|
13865
|
-
apiPayload['market_id'] = marketId;
|
|
13866
|
-
}
|
|
13867
13856
|
if (typeof metadata !== 'undefined') {
|
|
13868
13857
|
apiPayload['metadata'] = metadata;
|
|
13869
13858
|
}
|
|
@@ -18143,10 +18132,10 @@ class Prices {
|
|
|
18143
18132
|
* @param {string} params.description -
|
|
18144
18133
|
* @param {boolean} params.isDefault - Default lists resolve last within their group.
|
|
18145
18134
|
* @param {object} params.labels - Localised names ({de, en, …}).
|
|
18146
|
-
* @param {string} params.marketId - Scope: only this market.
|
|
18147
18135
|
* @param {object} params.metadata - Free-form metadata.
|
|
18148
18136
|
* @param {string} params.organizationId - Scope: only this organization.
|
|
18149
18137
|
* @param {number} params.priority - Tie-breaker within a specificity group (higher wins, default 0).
|
|
18138
|
+
* @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).
|
|
18150
18139
|
* @param {PriceListStatus} params.status - Default 'active' — only active lists resolve.
|
|
18151
18140
|
* @param {boolean} params.taxIncluded - Gross (true) or net (false, default) prices.
|
|
18152
18141
|
* @param {string} params.validFrom - Validity window start.
|
|
@@ -18165,10 +18154,10 @@ class Prices {
|
|
|
18165
18154
|
* @param {string} description -
|
|
18166
18155
|
* @param {boolean} isDefault - Default lists resolve last within their group.
|
|
18167
18156
|
* @param {object} labels - Localised names ({de, en, …}).
|
|
18168
|
-
* @param {string} marketId - Scope: only this market.
|
|
18169
18157
|
* @param {object} metadata - Free-form metadata.
|
|
18170
18158
|
* @param {string} organizationId - Scope: only this organization.
|
|
18171
18159
|
* @param {number} priority - Tie-breaker within a specificity group (higher wins, default 0).
|
|
18160
|
+
* @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).
|
|
18172
18161
|
* @param {PriceListStatus} status - Default 'active' — only active lists resolve.
|
|
18173
18162
|
* @param {boolean} taxIncluded - Gross (true) or net (false, default) prices.
|
|
18174
18163
|
* @param {string} validFrom - Validity window start.
|
|
@@ -18192,10 +18181,10 @@ class Prices {
|
|
|
18192
18181
|
description: rest[4],
|
|
18193
18182
|
isDefault: rest[5],
|
|
18194
18183
|
labels: rest[6],
|
|
18195
|
-
|
|
18196
|
-
|
|
18197
|
-
|
|
18198
|
-
|
|
18184
|
+
metadata: rest[7],
|
|
18185
|
+
organizationId: rest[8],
|
|
18186
|
+
priority: rest[9],
|
|
18187
|
+
requiresAuth: rest[10],
|
|
18199
18188
|
status: rest[11],
|
|
18200
18189
|
taxIncluded: rest[12],
|
|
18201
18190
|
validFrom: rest[13],
|
|
@@ -18210,10 +18199,10 @@ class Prices {
|
|
|
18210
18199
|
const description = params.description;
|
|
18211
18200
|
const isDefault = params.isDefault;
|
|
18212
18201
|
const labels = params.labels;
|
|
18213
|
-
const marketId = params.marketId;
|
|
18214
18202
|
const metadata = params.metadata;
|
|
18215
18203
|
const organizationId = params.organizationId;
|
|
18216
18204
|
const priority = params.priority;
|
|
18205
|
+
const requiresAuth = params.requiresAuth;
|
|
18217
18206
|
const status = params.status;
|
|
18218
18207
|
const taxIncluded = params.taxIncluded;
|
|
18219
18208
|
const validFrom = params.validFrom;
|
|
@@ -18247,9 +18236,6 @@ class Prices {
|
|
|
18247
18236
|
if (typeof labels !== 'undefined') {
|
|
18248
18237
|
apiPayload['labels'] = labels;
|
|
18249
18238
|
}
|
|
18250
|
-
if (typeof marketId !== 'undefined') {
|
|
18251
|
-
apiPayload['market_id'] = marketId;
|
|
18252
|
-
}
|
|
18253
18239
|
if (typeof metadata !== 'undefined') {
|
|
18254
18240
|
apiPayload['metadata'] = metadata;
|
|
18255
18241
|
}
|
|
@@ -18262,6 +18248,9 @@ class Prices {
|
|
|
18262
18248
|
if (typeof priority !== 'undefined') {
|
|
18263
18249
|
apiPayload['priority'] = priority;
|
|
18264
18250
|
}
|
|
18251
|
+
if (typeof requiresAuth !== 'undefined') {
|
|
18252
|
+
apiPayload['requires_auth'] = requiresAuth;
|
|
18253
|
+
}
|
|
18265
18254
|
if (typeof status !== 'undefined') {
|
|
18266
18255
|
apiPayload['status'] = status;
|
|
18267
18256
|
}
|
|
@@ -18374,11 +18363,11 @@ class Prices {
|
|
|
18374
18363
|
* @param {string} params.description -
|
|
18375
18364
|
* @param {boolean} params.isDefault - Default lists resolve last within their group.
|
|
18376
18365
|
* @param {object} params.labels - Localised names ({de, en, …}).
|
|
18377
|
-
* @param {string} params.marketId - Scope: only this market.
|
|
18378
18366
|
* @param {object} params.metadata - Free-form metadata.
|
|
18379
18367
|
* @param {string} params.name -
|
|
18380
18368
|
* @param {string} params.organizationId - Scope: only this organization.
|
|
18381
18369
|
* @param {number} params.priority - Tie-breaker within a specificity group (higher wins, default 0).
|
|
18370
|
+
* @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).
|
|
18382
18371
|
* @param {PriceListStatus} params.status - Default 'active' — only active lists resolve.
|
|
18383
18372
|
* @param {boolean} params.taxIncluded - Gross (true) or net (false, default) prices.
|
|
18384
18373
|
* @param {string} params.validFrom - Validity window start.
|
|
@@ -18397,11 +18386,11 @@ class Prices {
|
|
|
18397
18386
|
* @param {string} description -
|
|
18398
18387
|
* @param {boolean} isDefault - Default lists resolve last within their group.
|
|
18399
18388
|
* @param {object} labels - Localised names ({de, en, …}).
|
|
18400
|
-
* @param {string} marketId - Scope: only this market.
|
|
18401
18389
|
* @param {object} metadata - Free-form metadata.
|
|
18402
18390
|
* @param {string} name -
|
|
18403
18391
|
* @param {string} organizationId - Scope: only this organization.
|
|
18404
18392
|
* @param {number} priority - Tie-breaker within a specificity group (higher wins, default 0).
|
|
18393
|
+
* @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).
|
|
18405
18394
|
* @param {PriceListStatus} status - Default 'active' — only active lists resolve.
|
|
18406
18395
|
* @param {boolean} taxIncluded - Gross (true) or net (false, default) prices.
|
|
18407
18396
|
* @param {string} validFrom - Validity window start.
|
|
@@ -18425,11 +18414,11 @@ class Prices {
|
|
|
18425
18414
|
description: rest[4],
|
|
18426
18415
|
isDefault: rest[5],
|
|
18427
18416
|
labels: rest[6],
|
|
18428
|
-
|
|
18429
|
-
|
|
18430
|
-
|
|
18431
|
-
|
|
18432
|
-
|
|
18417
|
+
metadata: rest[7],
|
|
18418
|
+
name: rest[8],
|
|
18419
|
+
organizationId: rest[9],
|
|
18420
|
+
priority: rest[10],
|
|
18421
|
+
requiresAuth: rest[11],
|
|
18433
18422
|
status: rest[12],
|
|
18434
18423
|
taxIncluded: rest[13],
|
|
18435
18424
|
validFrom: rest[14],
|
|
@@ -18444,11 +18433,11 @@ class Prices {
|
|
|
18444
18433
|
const description = params.description;
|
|
18445
18434
|
const isDefault = params.isDefault;
|
|
18446
18435
|
const labels = params.labels;
|
|
18447
|
-
const marketId = params.marketId;
|
|
18448
18436
|
const metadata = params.metadata;
|
|
18449
18437
|
const name = params.name;
|
|
18450
18438
|
const organizationId = params.organizationId;
|
|
18451
18439
|
const priority = params.priority;
|
|
18440
|
+
const requiresAuth = params.requiresAuth;
|
|
18452
18441
|
const status = params.status;
|
|
18453
18442
|
const taxIncluded = params.taxIncluded;
|
|
18454
18443
|
const validFrom = params.validFrom;
|
|
@@ -18479,9 +18468,6 @@ class Prices {
|
|
|
18479
18468
|
if (typeof labels !== 'undefined') {
|
|
18480
18469
|
apiPayload['labels'] = labels;
|
|
18481
18470
|
}
|
|
18482
|
-
if (typeof marketId !== 'undefined') {
|
|
18483
|
-
apiPayload['market_id'] = marketId;
|
|
18484
|
-
}
|
|
18485
18471
|
if (typeof metadata !== 'undefined') {
|
|
18486
18472
|
apiPayload['metadata'] = metadata;
|
|
18487
18473
|
}
|
|
@@ -18494,6 +18480,9 @@ class Prices {
|
|
|
18494
18480
|
if (typeof priority !== 'undefined') {
|
|
18495
18481
|
apiPayload['priority'] = priority;
|
|
18496
18482
|
}
|
|
18483
|
+
if (typeof requiresAuth !== 'undefined') {
|
|
18484
|
+
apiPayload['requires_auth'] = requiresAuth;
|
|
18485
|
+
}
|
|
18497
18486
|
if (typeof status !== 'undefined') {
|
|
18498
18487
|
apiPayload['status'] = status;
|
|
18499
18488
|
}
|
|
@@ -23640,6 +23629,57 @@ class Search {
|
|
|
23640
23629
|
}
|
|
23641
23630
|
}
|
|
23642
23631
|
|
|
23632
|
+
class Settings {
|
|
23633
|
+
client;
|
|
23634
|
+
constructor(client) {
|
|
23635
|
+
this.client = client;
|
|
23636
|
+
}
|
|
23637
|
+
|
|
23638
|
+
/**
|
|
23639
|
+
* 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`).
|
|
23640
|
+
*
|
|
23641
|
+
* @param {string} params.app - App name, e.g. `pages`.
|
|
23642
|
+
* @param {string} params.market - Resolve market-scoped settings for this market code; falls back to the tenant value.
|
|
23643
|
+
* @throws {RevenexxException}
|
|
23644
|
+
* @returns {Promise<{}>}
|
|
23645
|
+
*/
|
|
23646
|
+
|
|
23647
|
+
/**
|
|
23648
|
+
* 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`).
|
|
23649
|
+
*
|
|
23650
|
+
* @param {string} app - App name, e.g. `pages`.
|
|
23651
|
+
* @param {string} market - Resolve market-scoped settings for this market code; falls back to the tenant value.
|
|
23652
|
+
* @throws {RevenexxException}
|
|
23653
|
+
* @returns {Promise<{}>}
|
|
23654
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
23655
|
+
*/
|
|
23656
|
+
|
|
23657
|
+
settingsGetAppSettings(paramsOrFirst, ...rest) {
|
|
23658
|
+
let params;
|
|
23659
|
+
if (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
|
|
23660
|
+
params = paramsOrFirst || {};
|
|
23661
|
+
} else {
|
|
23662
|
+
params = {
|
|
23663
|
+
app: paramsOrFirst,
|
|
23664
|
+
market: rest[0]
|
|
23665
|
+
};
|
|
23666
|
+
}
|
|
23667
|
+
const app = params.app;
|
|
23668
|
+
const market = params.market;
|
|
23669
|
+
if (typeof app === 'undefined') {
|
|
23670
|
+
throw new RevenexxException('Missing required parameter: "app"');
|
|
23671
|
+
}
|
|
23672
|
+
const apiPath = '/v1/settings/apps/{app}'.replace('{app}', app);
|
|
23673
|
+
const apiPayload = {};
|
|
23674
|
+
if (typeof market !== 'undefined') {
|
|
23675
|
+
apiPayload['market'] = market;
|
|
23676
|
+
}
|
|
23677
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
23678
|
+
const apiHeaders = {};
|
|
23679
|
+
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
23680
|
+
}
|
|
23681
|
+
}
|
|
23682
|
+
|
|
23643
23683
|
class Shipping {
|
|
23644
23684
|
client;
|
|
23645
23685
|
constructor(client) {
|
|
@@ -29701,5 +29741,5 @@ let MessageStatus = /*#__PURE__*/function (MessageStatus) {
|
|
|
29701
29741
|
return MessageStatus;
|
|
29702
29742
|
}({});
|
|
29703
29743
|
|
|
29704
|
-
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 };
|
|
29744
|
+
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, Settings, Shipping, ShippingMethodMatrixBasis, ShippingMethodPricingType, Sites, Storage, StoreAssetRequestVisibility, Theme, Timezone, Tokens, Type, UseCases, Visibility };
|
|
29705
29745
|
//# sourceMappingURL=sdk.js.map
|