@revenexx/sdk 0.0.11 → 0.0.12

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 CHANGED
@@ -657,7 +657,7 @@ class Client {
657
657
  'x-sdk-name': 'Revenexx Web',
658
658
  'x-sdk-platform': '',
659
659
  'x-sdk-language': 'web',
660
- 'x-sdk-version': '0.0.11'
660
+ 'x-sdk-version': '0.0.12'
661
661
  };
662
662
 
663
663
  /**
@@ -6190,12 +6190,76 @@ class Customers {
6190
6190
 
6191
6191
  /**
6192
6192
  *
6193
+ * @param {string} params.organizationId - Filter to one organization.
6194
+ * @param {string} params.role - Filter by role (buyer | approver | admin | requester).
6195
+ * @param {string} params.status - Filter by status (invited | active | blocked).
6196
+ * @param {string} params.email - Filter by exact email.
6197
+ * @param {number} params.limit - Page size (default 50, max 200).
6198
+ * @param {number} params.offset - Row offset for pagination (default 0).
6199
+ * @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
6200
+ * @throws {RevenexxException}
6201
+ * @returns {Promise<{}>}
6202
+ */
6203
+
6204
+ /**
6205
+ *
6206
+ * @param {string} organizationId - Filter to one organization.
6207
+ * @param {string} role - Filter by role (buyer | approver | admin | requester).
6208
+ * @param {string} status - Filter by status (invited | active | blocked).
6209
+ * @param {string} email - Filter by exact email.
6210
+ * @param {number} limit - Page size (default 50, max 200).
6211
+ * @param {number} offset - Row offset for pagination (default 0).
6212
+ * @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
6193
6213
  * @throws {RevenexxException}
6194
6214
  * @returns {Promise<{}>}
6215
+ * @deprecated Use the object parameter style method for a better developer experience.
6195
6216
  */
6196
- customersContactsList() {
6217
+
6218
+ customersContactsList(paramsOrFirst, ...rest) {
6219
+ let params;
6220
+ if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
6221
+ params = paramsOrFirst || {};
6222
+ } else {
6223
+ params = {
6224
+ organizationId: paramsOrFirst,
6225
+ role: rest[0],
6226
+ status: rest[1],
6227
+ email: rest[2],
6228
+ limit: rest[3],
6229
+ offset: rest[4],
6230
+ order: rest[5]
6231
+ };
6232
+ }
6233
+ const organizationId = params.organizationId;
6234
+ const role = params.role;
6235
+ const status = params.status;
6236
+ const email = params.email;
6237
+ const limit = params.limit;
6238
+ const offset = params.offset;
6239
+ const order = params.order;
6197
6240
  const apiPath = '/v1/customers/contacts';
6198
6241
  const apiPayload = {};
6242
+ if (typeof organizationId !== 'undefined') {
6243
+ apiPayload['organization_id'] = organizationId;
6244
+ }
6245
+ if (typeof role !== 'undefined') {
6246
+ apiPayload['role'] = role;
6247
+ }
6248
+ if (typeof status !== 'undefined') {
6249
+ apiPayload['status'] = status;
6250
+ }
6251
+ if (typeof email !== 'undefined') {
6252
+ apiPayload['email'] = email;
6253
+ }
6254
+ if (typeof limit !== 'undefined') {
6255
+ apiPayload['limit'] = limit;
6256
+ }
6257
+ if (typeof offset !== 'undefined') {
6258
+ apiPayload['offset'] = offset;
6259
+ }
6260
+ if (typeof order !== 'undefined') {
6261
+ apiPayload['order'] = order;
6262
+ }
6199
6263
  const uri = new URL(this.client.config.endpoint + apiPath);
6200
6264
  const apiHeaders = {};
6201
6265
  return this.client.call('get', uri, apiHeaders, apiPayload);