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