@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/iife/sdk.js CHANGED
@@ -4405,6 +4405,7 @@
4405
4405
  endpoint: 'https://api.revenexx.com',
4406
4406
  endpointRealtime: '',
4407
4407
  tenant: '',
4408
+ market: '',
4408
4409
  apikeyauth: '',
4409
4410
  bearerauth: ''
4410
4411
  };
@@ -4415,7 +4416,7 @@
4415
4416
  'x-sdk-name': 'Revenexx Web',
4416
4417
  'x-sdk-platform': '',
4417
4418
  'x-sdk-language': 'web',
4418
- 'x-sdk-version': '0.0.13'
4419
+ 'x-sdk-version': '0.0.15'
4419
4420
  };
4420
4421
 
4421
4422
  /**
@@ -4473,6 +4474,22 @@
4473
4474
  return this;
4474
4475
  }
4475
4476
 
4477
+ /**
4478
+ * Set Market
4479
+ *
4480
+ * The active market slug to scope requests to, sent as the
4481
+ * X-Revenexx-Market header. Optional — omit it to see only global rows.
4482
+ *
4483
+ * @param value string
4484
+ *
4485
+ * @return {this}
4486
+ */
4487
+ setMarket(value) {
4488
+ this.headers['X-Revenexx-Market'] = value;
4489
+ this.config.market = value;
4490
+ return this;
4491
+ }
4492
+
4476
4493
  /**
4477
4494
  * Set ApiKeyAuth
4478
4495
  *
@@ -7598,7 +7615,6 @@
7598
7615
  * @param {string} params.contactId - Owning customer contact.
7599
7616
  * @param {string} params.currency - ISO 4217 code (default EUR).
7600
7617
  * @param {boolean} params.isCurrent - Make this THE current cart of its owner.
7601
- * @param {string} params.marketId -
7602
7618
  * @param {object} params.metadata - Free-form metadata.
7603
7619
  * @param {string} params.name - Display name (default 'Cart').
7604
7620
  * @param {string} params.sessionKey - Owning guest session.
@@ -7612,7 +7628,6 @@
7612
7628
  * @param {string} contactId - Owning customer contact.
7613
7629
  * @param {string} currency - ISO 4217 code (default EUR).
7614
7630
  * @param {boolean} isCurrent - Make this THE current cart of its owner.
7615
- * @param {string} marketId -
7616
7631
  * @param {object} metadata - Free-form metadata.
7617
7632
  * @param {string} name - Display name (default 'Cart').
7618
7633
  * @param {string} sessionKey - Owning guest session.
@@ -7631,17 +7646,15 @@
7631
7646
  contactId: rest[0],
7632
7647
  currency: rest[1],
7633
7648
  isCurrent: rest[2],
7634
- marketId: rest[3],
7635
- metadata: rest[4],
7636
- name: rest[5],
7637
- sessionKey: rest[6]
7649
+ metadata: rest[3],
7650
+ name: rest[4],
7651
+ sessionKey: rest[5]
7638
7652
  };
7639
7653
  }
7640
7654
  const channelId = params.channelId;
7641
7655
  const contactId = params.contactId;
7642
7656
  const currency = params.currency;
7643
7657
  const isCurrent = params.isCurrent;
7644
- const marketId = params.marketId;
7645
7658
  const metadata = params.metadata;
7646
7659
  const name = params.name;
7647
7660
  const sessionKey = params.sessionKey;
@@ -7659,9 +7672,6 @@
7659
7672
  if (typeof isCurrent !== 'undefined') {
7660
7673
  apiPayload['is_current'] = isCurrent;
7661
7674
  }
7662
- if (typeof marketId !== 'undefined') {
7663
- apiPayload['market_id'] = marketId;
7664
- }
7665
7675
  if (typeof metadata !== 'undefined') {
7666
7676
  apiPayload['metadata'] = metadata;
7667
7677
  }
@@ -8698,7 +8708,6 @@
8698
8708
  * @param {string} params.id -
8699
8709
  * @param {string} params.channelId -
8700
8710
  * @param {string} params.currency - ISO 4217 code.
8701
- * @param {string} params.marketId -
8702
8711
  * @param {object} params.metadata - Free-form metadata.
8703
8712
  * @param {string} params.name -
8704
8713
  * @throws {RevenexxException}
@@ -8710,7 +8719,6 @@
8710
8719
  * @param {string} id -
8711
8720
  * @param {string} channelId -
8712
8721
  * @param {string} currency - ISO 4217 code.
8713
- * @param {string} marketId -
8714
8722
  * @param {object} metadata - Free-form metadata.
8715
8723
  * @param {string} name -
8716
8724
  * @throws {RevenexxException}
@@ -8727,15 +8735,13 @@
8727
8735
  id: paramsOrFirst,
8728
8736
  channelId: rest[0],
8729
8737
  currency: rest[1],
8730
- marketId: rest[2],
8731
- metadata: rest[3],
8732
- name: rest[4]
8738
+ metadata: rest[2],
8739
+ name: rest[3]
8733
8740
  };
8734
8741
  }
8735
8742
  const id = params.id;
8736
8743
  const channelId = params.channelId;
8737
8744
  const currency = params.currency;
8738
- const marketId = params.marketId;
8739
8745
  const metadata = params.metadata;
8740
8746
  const name = params.name;
8741
8747
  if (typeof id === 'undefined') {
@@ -8749,9 +8755,6 @@
8749
8755
  if (typeof currency !== 'undefined') {
8750
8756
  apiPayload['currency'] = currency;
8751
8757
  }
8752
- if (typeof marketId !== 'undefined') {
8753
- apiPayload['market_id'] = marketId;
8754
- }
8755
8758
  if (typeof metadata !== 'undefined') {
8756
8759
  apiPayload['metadata'] = metadata;
8757
8760
  }
@@ -17050,7 +17053,6 @@
17050
17053
  * @param {string} params.contactId - Filter to one ordering contact.
17051
17054
  * @param {string} params.organizationId - Filter to one B2B organization.
17052
17055
  * @param {string} params.channelId - Filter to one sales channel.
17053
- * @param {string} params.marketId - Filter to one market.
17054
17056
  * @param {string} params.number - Filter by exact order number.
17055
17057
  * @param {number} params.limit - Page size (default 50, max 200).
17056
17058
  * @param {number} params.offset - Row offset for pagination (default 0).
@@ -17067,7 +17069,6 @@
17067
17069
  * @param {string} contactId - Filter to one ordering contact.
17068
17070
  * @param {string} organizationId - Filter to one B2B organization.
17069
17071
  * @param {string} channelId - Filter to one sales channel.
17070
- * @param {string} marketId - Filter to one market.
17071
17072
  * @param {string} number - Filter by exact order number.
17072
17073
  * @param {number} limit - Page size (default 50, max 200).
17073
17074
  * @param {number} offset - Row offset for pagination (default 0).
@@ -17079,7 +17080,7 @@
17079
17080
 
17080
17081
  ordersList(paramsOrFirst, ...rest) {
17081
17082
  let params;
17082
- 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)) {
17083
+ 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)) {
17083
17084
  params = paramsOrFirst || {};
17084
17085
  } else {
17085
17086
  params = {
@@ -17089,11 +17090,10 @@
17089
17090
  contactId: rest[2],
17090
17091
  organizationId: rest[3],
17091
17092
  channelId: rest[4],
17092
- marketId: rest[5],
17093
- number: rest[6],
17094
- limit: rest[7],
17095
- offset: rest[8],
17096
- order: rest[9]
17093
+ number: rest[5],
17094
+ limit: rest[6],
17095
+ offset: rest[7],
17096
+ order: rest[8]
17097
17097
  };
17098
17098
  }
17099
17099
  const status = params.status;
@@ -17102,7 +17102,6 @@
17102
17102
  const contactId = params.contactId;
17103
17103
  const organizationId = params.organizationId;
17104
17104
  const channelId = params.channelId;
17105
- const marketId = params.marketId;
17106
17105
  const number = params.number;
17107
17106
  const limit = params.limit;
17108
17107
  const offset = params.offset;
@@ -17127,9 +17126,6 @@
17127
17126
  if (typeof channelId !== 'undefined') {
17128
17127
  apiPayload['channel_id'] = channelId;
17129
17128
  }
17130
- if (typeof marketId !== 'undefined') {
17131
- apiPayload['market_id'] = marketId;
17132
- }
17133
17129
  if (typeof number !== 'undefined') {
17134
17130
  apiPayload['number'] = number;
17135
17131
  }
@@ -17486,7 +17482,6 @@
17486
17482
  * @param {string} params.currency - ISO 4217 code (default EUR).
17487
17483
  * @param {string} params.customerOrderNumber - The buyer's own order/PO number.
17488
17484
  * @param {number} params.grandTotal - Override — computed as subtotal + shipping + tax when omitted.
17489
- * @param {string} params.marketId -
17490
17485
  * @param {object} params.metadata - Free-form metadata.
17491
17486
  * @param {string} params.organizationId - B2B organization.
17492
17487
  * @param {object} params.payment - Frozen payment snapshot — a known 'payment.status' seeds payment_status (otherwise 'open').
@@ -17509,7 +17504,6 @@
17509
17504
  * @param {string} currency - ISO 4217 code (default EUR).
17510
17505
  * @param {string} customerOrderNumber - The buyer's own order/PO number.
17511
17506
  * @param {number} grandTotal - Override — computed as subtotal + shipping + tax when omitted.
17512
- * @param {string} marketId -
17513
17507
  * @param {object} metadata - Free-form metadata.
17514
17508
  * @param {string} organizationId - B2B organization.
17515
17509
  * @param {object} payment - Frozen payment snapshot — a known 'payment.status' seeds payment_status (otherwise 'open').
@@ -17524,7 +17518,7 @@
17524
17518
 
17525
17519
  ordersPlace(paramsOrFirst, ...rest) {
17526
17520
  let params;
17527
- 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 || 'marketId' in paramsOrFirst || 'metadata' in paramsOrFirst || 'organizationId' in paramsOrFirst || 'payment' in paramsOrFirst || 'shipping' in paramsOrFirst || 'shippingAddress' in paramsOrFirst || 'shippingTotal' in paramsOrFirst || 'userData' in paramsOrFirst)) {
17521
+ 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)) {
17528
17522
  params = paramsOrFirst || {};
17529
17523
  } else {
17530
17524
  params = {
@@ -17537,14 +17531,13 @@
17537
17531
  currency: rest[5],
17538
17532
  customerOrderNumber: rest[6],
17539
17533
  grandTotal: rest[7],
17540
- marketId: rest[8],
17541
- metadata: rest[9],
17542
- organizationId: rest[10],
17543
- payment: rest[11],
17544
- shipping: rest[12],
17545
- shippingAddress: rest[13],
17546
- shippingTotal: rest[14],
17547
- userData: rest[15]
17534
+ metadata: rest[8],
17535
+ organizationId: rest[9],
17536
+ payment: rest[10],
17537
+ shipping: rest[11],
17538
+ shippingAddress: rest[12],
17539
+ shippingTotal: rest[13],
17540
+ userData: rest[14]
17548
17541
  };
17549
17542
  }
17550
17543
  const items = params.items;
@@ -17556,7 +17549,6 @@
17556
17549
  const currency = params.currency;
17557
17550
  const customerOrderNumber = params.customerOrderNumber;
17558
17551
  const grandTotal = params.grandTotal;
17559
- const marketId = params.marketId;
17560
17552
  const metadata = params.metadata;
17561
17553
  const organizationId = params.organizationId;
17562
17554
  const payment = params.payment;
@@ -17625,9 +17617,6 @@
17625
17617
  }
17626
17618
  });
17627
17619
  }
17628
- if (typeof marketId !== 'undefined') {
17629
- apiPayload['market_id'] = marketId;
17630
- }
17631
17620
  if (typeof metadata !== 'undefined') {
17632
17621
  apiPayload['metadata'] = metadata;
17633
17622
  }
@@ -21907,10 +21896,10 @@
21907
21896
  * @param {string} params.description -
21908
21897
  * @param {boolean} params.isDefault - Default lists resolve last within their group.
21909
21898
  * @param {object} params.labels - Localised names ({de, en, …}).
21910
- * @param {string} params.marketId - Scope: only this market.
21911
21899
  * @param {object} params.metadata - Free-form metadata.
21912
21900
  * @param {string} params.organizationId - Scope: only this organization.
21913
21901
  * @param {number} params.priority - Tie-breaker within a specificity group (higher wins, default 0).
21902
+ * @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).
21914
21903
  * @param {PriceListStatus} params.status - Default 'active' — only active lists resolve.
21915
21904
  * @param {boolean} params.taxIncluded - Gross (true) or net (false, default) prices.
21916
21905
  * @param {string} params.validFrom - Validity window start.
@@ -21929,10 +21918,10 @@
21929
21918
  * @param {string} description -
21930
21919
  * @param {boolean} isDefault - Default lists resolve last within their group.
21931
21920
  * @param {object} labels - Localised names ({de, en, …}).
21932
- * @param {string} marketId - Scope: only this market.
21933
21921
  * @param {object} metadata - Free-form metadata.
21934
21922
  * @param {string} organizationId - Scope: only this organization.
21935
21923
  * @param {number} priority - Tie-breaker within a specificity group (higher wins, default 0).
21924
+ * @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).
21936
21925
  * @param {PriceListStatus} status - Default 'active' — only active lists resolve.
21937
21926
  * @param {boolean} taxIncluded - Gross (true) or net (false, default) prices.
21938
21927
  * @param {string} validFrom - Validity window start.
@@ -21956,10 +21945,10 @@
21956
21945
  description: rest[4],
21957
21946
  isDefault: rest[5],
21958
21947
  labels: rest[6],
21959
- marketId: rest[7],
21960
- metadata: rest[8],
21961
- organizationId: rest[9],
21962
- priority: rest[10],
21948
+ metadata: rest[7],
21949
+ organizationId: rest[8],
21950
+ priority: rest[9],
21951
+ requiresAuth: rest[10],
21963
21952
  status: rest[11],
21964
21953
  taxIncluded: rest[12],
21965
21954
  validFrom: rest[13],
@@ -21974,10 +21963,10 @@
21974
21963
  const description = params.description;
21975
21964
  const isDefault = params.isDefault;
21976
21965
  const labels = params.labels;
21977
- const marketId = params.marketId;
21978
21966
  const metadata = params.metadata;
21979
21967
  const organizationId = params.organizationId;
21980
21968
  const priority = params.priority;
21969
+ const requiresAuth = params.requiresAuth;
21981
21970
  const status = params.status;
21982
21971
  const taxIncluded = params.taxIncluded;
21983
21972
  const validFrom = params.validFrom;
@@ -22011,9 +22000,6 @@
22011
22000
  if (typeof labels !== 'undefined') {
22012
22001
  apiPayload['labels'] = labels;
22013
22002
  }
22014
- if (typeof marketId !== 'undefined') {
22015
- apiPayload['market_id'] = marketId;
22016
- }
22017
22003
  if (typeof metadata !== 'undefined') {
22018
22004
  apiPayload['metadata'] = metadata;
22019
22005
  }
@@ -22026,6 +22012,9 @@
22026
22012
  if (typeof priority !== 'undefined') {
22027
22013
  apiPayload['priority'] = priority;
22028
22014
  }
22015
+ if (typeof requiresAuth !== 'undefined') {
22016
+ apiPayload['requires_auth'] = requiresAuth;
22017
+ }
22029
22018
  if (typeof status !== 'undefined') {
22030
22019
  apiPayload['status'] = status;
22031
22020
  }
@@ -22138,11 +22127,11 @@
22138
22127
  * @param {string} params.description -
22139
22128
  * @param {boolean} params.isDefault - Default lists resolve last within their group.
22140
22129
  * @param {object} params.labels - Localised names ({de, en, …}).
22141
- * @param {string} params.marketId - Scope: only this market.
22142
22130
  * @param {object} params.metadata - Free-form metadata.
22143
22131
  * @param {string} params.name -
22144
22132
  * @param {string} params.organizationId - Scope: only this organization.
22145
22133
  * @param {number} params.priority - Tie-breaker within a specificity group (higher wins, default 0).
22134
+ * @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).
22146
22135
  * @param {PriceListStatus} params.status - Default 'active' — only active lists resolve.
22147
22136
  * @param {boolean} params.taxIncluded - Gross (true) or net (false, default) prices.
22148
22137
  * @param {string} params.validFrom - Validity window start.
@@ -22161,11 +22150,11 @@
22161
22150
  * @param {string} description -
22162
22151
  * @param {boolean} isDefault - Default lists resolve last within their group.
22163
22152
  * @param {object} labels - Localised names ({de, en, …}).
22164
- * @param {string} marketId - Scope: only this market.
22165
22153
  * @param {object} metadata - Free-form metadata.
22166
22154
  * @param {string} name -
22167
22155
  * @param {string} organizationId - Scope: only this organization.
22168
22156
  * @param {number} priority - Tie-breaker within a specificity group (higher wins, default 0).
22157
+ * @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).
22169
22158
  * @param {PriceListStatus} status - Default 'active' — only active lists resolve.
22170
22159
  * @param {boolean} taxIncluded - Gross (true) or net (false, default) prices.
22171
22160
  * @param {string} validFrom - Validity window start.
@@ -22189,11 +22178,11 @@
22189
22178
  description: rest[4],
22190
22179
  isDefault: rest[5],
22191
22180
  labels: rest[6],
22192
- marketId: rest[7],
22193
- metadata: rest[8],
22194
- name: rest[9],
22195
- organizationId: rest[10],
22196
- priority: rest[11],
22181
+ metadata: rest[7],
22182
+ name: rest[8],
22183
+ organizationId: rest[9],
22184
+ priority: rest[10],
22185
+ requiresAuth: rest[11],
22197
22186
  status: rest[12],
22198
22187
  taxIncluded: rest[13],
22199
22188
  validFrom: rest[14],
@@ -22208,11 +22197,11 @@
22208
22197
  const description = params.description;
22209
22198
  const isDefault = params.isDefault;
22210
22199
  const labels = params.labels;
22211
- const marketId = params.marketId;
22212
22200
  const metadata = params.metadata;
22213
22201
  const name = params.name;
22214
22202
  const organizationId = params.organizationId;
22215
22203
  const priority = params.priority;
22204
+ const requiresAuth = params.requiresAuth;
22216
22205
  const status = params.status;
22217
22206
  const taxIncluded = params.taxIncluded;
22218
22207
  const validFrom = params.validFrom;
@@ -22243,9 +22232,6 @@
22243
22232
  if (typeof labels !== 'undefined') {
22244
22233
  apiPayload['labels'] = labels;
22245
22234
  }
22246
- if (typeof marketId !== 'undefined') {
22247
- apiPayload['market_id'] = marketId;
22248
- }
22249
22235
  if (typeof metadata !== 'undefined') {
22250
22236
  apiPayload['metadata'] = metadata;
22251
22237
  }
@@ -22258,6 +22244,9 @@
22258
22244
  if (typeof priority !== 'undefined') {
22259
22245
  apiPayload['priority'] = priority;
22260
22246
  }
22247
+ if (typeof requiresAuth !== 'undefined') {
22248
+ apiPayload['requires_auth'] = requiresAuth;
22249
+ }
22261
22250
  if (typeof status !== 'undefined') {
22262
22251
  apiPayload['status'] = status;
22263
22252
  }
@@ -27404,6 +27393,57 @@
27404
27393
  }
27405
27394
  }
27406
27395
 
27396
+ class Settings {
27397
+ client;
27398
+ constructor(client) {
27399
+ this.client = client;
27400
+ }
27401
+
27402
+ /**
27403
+ * 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`).
27404
+ *
27405
+ * @param {string} params.app - App name, e.g. `pages`.
27406
+ * @param {string} params.market - Resolve market-scoped settings for this market code; falls back to the tenant value.
27407
+ * @throws {RevenexxException}
27408
+ * @returns {Promise<{}>}
27409
+ */
27410
+
27411
+ /**
27412
+ * 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`).
27413
+ *
27414
+ * @param {string} app - App name, e.g. `pages`.
27415
+ * @param {string} market - Resolve market-scoped settings for this market code; falls back to the tenant value.
27416
+ * @throws {RevenexxException}
27417
+ * @returns {Promise<{}>}
27418
+ * @deprecated Use the object parameter style method for a better developer experience.
27419
+ */
27420
+
27421
+ settingsGetAppSettings(paramsOrFirst, ...rest) {
27422
+ let params;
27423
+ if (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
27424
+ params = paramsOrFirst || {};
27425
+ } else {
27426
+ params = {
27427
+ app: paramsOrFirst,
27428
+ market: rest[0]
27429
+ };
27430
+ }
27431
+ const app = params.app;
27432
+ const market = params.market;
27433
+ if (typeof app === 'undefined') {
27434
+ throw new RevenexxException('Missing required parameter: "app"');
27435
+ }
27436
+ const apiPath = '/v1/settings/apps/{app}'.replace('{app}', app);
27437
+ const apiPayload = {};
27438
+ if (typeof market !== 'undefined') {
27439
+ apiPayload['market'] = market;
27440
+ }
27441
+ const uri = new URL(this.client.config.endpoint + apiPath);
27442
+ const apiHeaders = {};
27443
+ return this.client.call('get', uri, apiHeaders, apiPayload);
27444
+ }
27445
+ }
27446
+
27407
27447
  class Shipping {
27408
27448
  client;
27409
27449
  constructor(client) {
@@ -33572,6 +33612,7 @@
33572
33612
  exports.Runtimes = Runtimes;
33573
33613
  exports.Scopes = Scopes;
33574
33614
  exports.Search = Search;
33615
+ exports.Settings = Settings;
33575
33616
  exports.Shipping = Shipping;
33576
33617
  exports.ShippingMethodMatrixBasis = ShippingMethodMatrixBasis;
33577
33618
  exports.ShippingMethodPricingType = ShippingMethodPricingType;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@revenexx/sdk",
3
3
  "homepage": "https://revenexx.com",
4
4
  "description": "Revenexx Web SDK for browsers and SSR frameworks.",
5
- "version": "0.0.13",
5
+ "version": "0.0.15",
6
6
  "license": "MIT",
7
7
  "files": [
8
8
  "dist",
package/src/client.ts CHANGED
@@ -372,12 +372,14 @@ class Client {
372
372
  endpoint: string;
373
373
  endpointRealtime: string;
374
374
  tenant: string;
375
+ market: string;
375
376
  apikeyauth: string;
376
377
  bearerauth: string;
377
378
  } = {
378
379
  endpoint: 'https://api.revenexx.com',
379
380
  endpointRealtime: '',
380
381
  tenant: '',
382
+ market: '',
381
383
  apikeyauth: '',
382
384
  bearerauth: '',
383
385
  };
@@ -388,7 +390,7 @@ class Client {
388
390
  'x-sdk-name': 'Revenexx Web',
389
391
  'x-sdk-platform': '',
390
392
  'x-sdk-language': 'web',
391
- 'x-sdk-version': '0.0.13',
393
+ 'x-sdk-version': '0.0.15',
392
394
  };
393
395
 
394
396
  /**
@@ -451,6 +453,22 @@ class Client {
451
453
  return this;
452
454
  }
453
455
 
456
+ /**
457
+ * Set Market
458
+ *
459
+ * The active market slug to scope requests to, sent as the
460
+ * X-Revenexx-Market header. Optional — omit it to see only global rows.
461
+ *
462
+ * @param value string
463
+ *
464
+ * @return {this}
465
+ */
466
+ setMarket(value: string): this {
467
+ this.headers['X-Revenexx-Market'] = value;
468
+ this.config.market = value;
469
+ return this;
470
+ }
471
+
454
472
  /**
455
473
  * Set ApiKeyAuth
456
474
  *
package/src/index.ts CHANGED
@@ -23,6 +23,7 @@ export { Payments } from './services/payments';
23
23
  export { Prices } from './services/prices';
24
24
  export { Products } from './services/products';
25
25
  export { Search } from './services/search';
26
+ export { Settings } from './services/settings';
26
27
  export { Shipping } from './services/shipping';
27
28
  export { Sites } from './services/sites';
28
29
  export { Storage } from './services/storage';
package/src/models.ts CHANGED
@@ -1150,10 +1150,6 @@ export namespace Models {
1150
1150
  *
1151
1151
  */
1152
1152
  item_count?: number;
1153
- /**
1154
- *
1155
- */
1156
- market_id?: string | null;
1157
1153
  /**
1158
1154
  *
1159
1155
  */
@@ -1230,10 +1226,6 @@ export namespace Models {
1230
1226
  * Make this THE current cart of its owner.
1231
1227
  */
1232
1228
  is_current?: boolean | null;
1233
- /**
1234
- *
1235
- */
1236
- market_id?: string | null;
1237
1229
  /**
1238
1230
  * Free-form metadata.
1239
1231
  */
@@ -1536,10 +1528,6 @@ export namespace Models {
1536
1528
  * ISO 4217 code.
1537
1529
  */
1538
1530
  currency?: string | null;
1539
- /**
1540
- *
1541
- */
1542
- market_id?: string | null;
1543
1531
  /**
1544
1532
  * Free-form metadata.
1545
1533
  */
@@ -3626,10 +3614,6 @@ export namespace Models {
3626
3614
  *
3627
3615
  */
3628
3616
  item_count?: number;
3629
- /**
3630
- *
3631
- */
3632
- market_id?: string | null;
3633
3617
  /**
3634
3618
  *
3635
3619
  */
@@ -3892,10 +3876,6 @@ export namespace Models {
3892
3876
  *
3893
3877
  */
3894
3878
  items?: OrderItem[];
3895
- /**
3896
- *
3897
- */
3898
- market_id?: string | null;
3899
3879
  /**
3900
3880
  *
3901
3881
  */
@@ -4718,10 +4698,6 @@ export namespace Models {
4718
4698
  * The order positions (at most 500).
4719
4699
  */
4720
4700
  items: OrderItemCreateRequest[];
4721
- /**
4722
- *
4723
- */
4724
- market_id?: string | null;
4725
4701
  /**
4726
4702
  * Free-form metadata.
4727
4703
  */
@@ -5992,10 +5968,6 @@ export namespace Models {
5992
5968
  *
5993
5969
  */
5994
5970
  labels?: object | null;
5995
- /**
5996
- *
5997
- */
5998
- market_id?: string | null;
5999
5971
  /**
6000
5972
  *
6001
5973
  */
@@ -6012,6 +5984,10 @@ export namespace Models {
6012
5984
  *
6013
5985
  */
6014
5986
  priority?: number;
5987
+ /**
5988
+ *
5989
+ */
5990
+ requires_auth?: boolean;
6015
5991
  /**
6016
5992
  *
6017
5993
  */
@@ -6066,10 +6042,6 @@ export namespace Models {
6066
6042
  * Localised names ({de, en, …}).
6067
6043
  */
6068
6044
  labels?: object | null;
6069
- /**
6070
- * Scope: only this market.
6071
- */
6072
- market_id?: string | null;
6073
6045
  /**
6074
6046
  * Free-form metadata.
6075
6047
  */
@@ -6086,6 +6058,10 @@ export namespace Models {
6086
6058
  * Tie-breaker within a specificity group (higher wins, default 0).
6087
6059
  */
6088
6060
  priority?: number;
6061
+ /**
6062
+ * 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).
6063
+ */
6064
+ requires_auth?: boolean;
6089
6065
  /**
6090
6066
  * Default 'active' — only active lists resolve.
6091
6067
  */
@@ -6136,10 +6112,6 @@ export namespace Models {
6136
6112
  * Localised names ({de, en, …}).
6137
6113
  */
6138
6114
  labels?: object | null;
6139
- /**
6140
- * Scope: only this market.
6141
- */
6142
- market_id?: string | null;
6143
6115
  /**
6144
6116
  * Free-form metadata.
6145
6117
  */
@@ -6156,6 +6128,10 @@ export namespace Models {
6156
6128
  * Tie-breaker within a specificity group (higher wins, default 0).
6157
6129
  */
6158
6130
  priority?: number;
6131
+ /**
6132
+ * 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).
6133
+ */
6134
+ requires_auth?: boolean;
6159
6135
  /**
6160
6136
  * Default 'active' — only active lists resolve.
6161
6137
  */