@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/iife/sdk.js CHANGED
@@ -4415,7 +4415,7 @@
4415
4415
  'x-sdk-name': 'Revenexx Web',
4416
4416
  'x-sdk-platform': '',
4417
4417
  'x-sdk-language': 'web',
4418
- 'x-sdk-version': '0.0.11'
4418
+ 'x-sdk-version': '0.0.12'
4419
4419
  };
4420
4420
 
4421
4421
  /**
@@ -9948,12 +9948,76 @@
9948
9948
 
9949
9949
  /**
9950
9950
  *
9951
+ * @param {string} params.organizationId - Filter to one organization.
9952
+ * @param {string} params.role - Filter by role (buyer | approver | admin | requester).
9953
+ * @param {string} params.status - Filter by status (invited | active | blocked).
9954
+ * @param {string} params.email - Filter by exact email.
9955
+ * @param {number} params.limit - Page size (default 50, max 200).
9956
+ * @param {number} params.offset - Row offset for pagination (default 0).
9957
+ * @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
9958
+ * @throws {RevenexxException}
9959
+ * @returns {Promise<{}>}
9960
+ */
9961
+
9962
+ /**
9963
+ *
9964
+ * @param {string} organizationId - Filter to one organization.
9965
+ * @param {string} role - Filter by role (buyer | approver | admin | requester).
9966
+ * @param {string} status - Filter by status (invited | active | blocked).
9967
+ * @param {string} email - Filter by exact email.
9968
+ * @param {number} limit - Page size (default 50, max 200).
9969
+ * @param {number} offset - Row offset for pagination (default 0).
9970
+ * @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
9951
9971
  * @throws {RevenexxException}
9952
9972
  * @returns {Promise<{}>}
9973
+ * @deprecated Use the object parameter style method for a better developer experience.
9953
9974
  */
9954
- customersContactsList() {
9975
+
9976
+ customersContactsList(paramsOrFirst, ...rest) {
9977
+ let params;
9978
+ if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) {
9979
+ params = paramsOrFirst || {};
9980
+ } else {
9981
+ params = {
9982
+ organizationId: paramsOrFirst,
9983
+ role: rest[0],
9984
+ status: rest[1],
9985
+ email: rest[2],
9986
+ limit: rest[3],
9987
+ offset: rest[4],
9988
+ order: rest[5]
9989
+ };
9990
+ }
9991
+ const organizationId = params.organizationId;
9992
+ const role = params.role;
9993
+ const status = params.status;
9994
+ const email = params.email;
9995
+ const limit = params.limit;
9996
+ const offset = params.offset;
9997
+ const order = params.order;
9955
9998
  const apiPath = '/v1/customers/contacts';
9956
9999
  const apiPayload = {};
10000
+ if (typeof organizationId !== 'undefined') {
10001
+ apiPayload['organization_id'] = organizationId;
10002
+ }
10003
+ if (typeof role !== 'undefined') {
10004
+ apiPayload['role'] = role;
10005
+ }
10006
+ if (typeof status !== 'undefined') {
10007
+ apiPayload['status'] = status;
10008
+ }
10009
+ if (typeof email !== 'undefined') {
10010
+ apiPayload['email'] = email;
10011
+ }
10012
+ if (typeof limit !== 'undefined') {
10013
+ apiPayload['limit'] = limit;
10014
+ }
10015
+ if (typeof offset !== 'undefined') {
10016
+ apiPayload['offset'] = offset;
10017
+ }
10018
+ if (typeof order !== 'undefined') {
10019
+ apiPayload['order'] = order;
10020
+ }
9957
10021
  const uri = new URL(this.client.config.endpoint + apiPath);
9958
10022
  const apiHeaders = {};
9959
10023
  return this.client.call('get', uri, apiHeaders, apiPayload);
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.11",
5
+ "version": "0.0.12",
6
6
  "license": "MIT",
7
7
  "files": [
8
8
  "dist",
package/src/client.ts CHANGED
@@ -388,7 +388,7 @@ class Client {
388
388
  'x-sdk-name': 'Revenexx Web',
389
389
  'x-sdk-platform': '',
390
390
  'x-sdk-language': 'web',
391
- 'x-sdk-version': '0.0.11',
391
+ 'x-sdk-version': '0.0.12',
392
392
  };
393
393
 
394
394
  /**
@@ -907,13 +907,83 @@ export class Customers {
907
907
 
908
908
  /**
909
909
  *
910
+ * @param {string} params.organizationId - Filter to one organization.
911
+ * @param {string} params.role - Filter by role (buyer | approver | admin | requester).
912
+ * @param {string} params.status - Filter by status (invited | active | blocked).
913
+ * @param {string} params.email - Filter by exact email.
914
+ * @param {number} params.limit - Page size (default 50, max 200).
915
+ * @param {number} params.offset - Row offset for pagination (default 0).
916
+ * @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
917
+ * @throws {RevenexxException}
918
+ * @returns {Promise<{}>}
919
+ */
920
+ customersContactsList(params?: { organizationId?: string, role?: string, status?: string, email?: string, limit?: number, offset?: number, order?: string }): Promise<{}>;
921
+ /**
922
+ *
923
+ * @param {string} organizationId - Filter to one organization.
924
+ * @param {string} role - Filter by role (buyer | approver | admin | requester).
925
+ * @param {string} status - Filter by status (invited | active | blocked).
926
+ * @param {string} email - Filter by exact email.
927
+ * @param {number} limit - Page size (default 50, max 200).
928
+ * @param {number} offset - Row offset for pagination (default 0).
929
+ * @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
910
930
  * @throws {RevenexxException}
911
931
  * @returns {Promise<{}>}
932
+ * @deprecated Use the object parameter style method for a better developer experience.
912
933
  */
913
- customersContactsList(): Promise<{}> {
934
+ customersContactsList(organizationId?: string, role?: string, status?: string, email?: string, limit?: number, offset?: number, order?: string): Promise<{}>;
935
+ customersContactsList(
936
+ paramsOrFirst?: { organizationId?: string, role?: string, status?: string, email?: string, limit?: number, offset?: number, order?: string } | string,
937
+ ...rest: [(string)?, (string)?, (string)?, (number)?, (number)?, (string)?]
938
+ ): Promise<{}> {
939
+ let params: { organizationId?: string, role?: string, status?: string, email?: string, limit?: number, offset?: number, order?: string };
940
+
941
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
942
+ params = (paramsOrFirst || {}) as { organizationId?: string, role?: string, status?: string, email?: string, limit?: number, offset?: number, order?: string };
943
+ } else {
944
+ params = {
945
+ organizationId: paramsOrFirst as string,
946
+ role: rest[0] as string,
947
+ status: rest[1] as string,
948
+ email: rest[2] as string,
949
+ limit: rest[3] as number,
950
+ offset: rest[4] as number,
951
+ order: rest[5] as string
952
+ };
953
+ }
954
+
955
+ const organizationId = params.organizationId;
956
+ const role = params.role;
957
+ const status = params.status;
958
+ const email = params.email;
959
+ const limit = params.limit;
960
+ const offset = params.offset;
961
+ const order = params.order;
962
+
914
963
 
915
964
  const apiPath = '/v1/customers/contacts';
916
965
  const apiPayload: Payload = {};
966
+ if (typeof organizationId !== 'undefined') {
967
+ apiPayload['organization_id'] = organizationId;
968
+ }
969
+ if (typeof role !== 'undefined') {
970
+ apiPayload['role'] = role;
971
+ }
972
+ if (typeof status !== 'undefined') {
973
+ apiPayload['status'] = status;
974
+ }
975
+ if (typeof email !== 'undefined') {
976
+ apiPayload['email'] = email;
977
+ }
978
+ if (typeof limit !== 'undefined') {
979
+ apiPayload['limit'] = limit;
980
+ }
981
+ if (typeof offset !== 'undefined') {
982
+ apiPayload['offset'] = offset;
983
+ }
984
+ if (typeof order !== 'undefined') {
985
+ apiPayload['order'] = order;
986
+ }
917
987
  const uri = new URL(this.client.config.endpoint + apiPath);
918
988
 
919
989
  const apiHeaders: { [header: string]: string } = {
@@ -319,10 +319,39 @@ export declare class Customers {
319
319
  customersAuthRegister(email: string, password: string, firstName?: string, lastName?: string, locale?: string, organizationId?: string, organizationName?: string): Promise<Models.AuthRegisterResponse>;
320
320
  /**
321
321
  *
322
+ * @param {string} params.organizationId - Filter to one organization.
323
+ * @param {string} params.role - Filter by role (buyer | approver | admin | requester).
324
+ * @param {string} params.status - Filter by status (invited | active | blocked).
325
+ * @param {string} params.email - Filter by exact email.
326
+ * @param {number} params.limit - Page size (default 50, max 200).
327
+ * @param {number} params.offset - Row offset for pagination (default 0).
328
+ * @param {string} params.order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
329
+ * @throws {RevenexxException}
330
+ * @returns {Promise<{}>}
331
+ */
332
+ customersContactsList(params?: {
333
+ organizationId?: string;
334
+ role?: string;
335
+ status?: string;
336
+ email?: string;
337
+ limit?: number;
338
+ offset?: number;
339
+ order?: string;
340
+ }): Promise<{}>;
341
+ /**
342
+ *
343
+ * @param {string} organizationId - Filter to one organization.
344
+ * @param {string} role - Filter by role (buyer | approver | admin | requester).
345
+ * @param {string} status - Filter by status (invited | active | blocked).
346
+ * @param {string} email - Filter by exact email.
347
+ * @param {number} limit - Page size (default 50, max 200).
348
+ * @param {number} offset - Row offset for pagination (default 0).
349
+ * @param {string} order - Sort as 'column.asc' | 'column.desc', e.g. 'created_at.desc'.
322
350
  * @throws {RevenexxException}
323
351
  * @returns {Promise<{}>}
352
+ * @deprecated Use the object parameter style method for a better developer experience.
324
353
  */
325
- customersContactsList(): Promise<{}>;
354
+ customersContactsList(organizationId?: string, role?: string, status?: string, email?: string, limit?: number, offset?: number, order?: string): Promise<{}>;
326
355
  /**
327
356
  *
328
357
  * @param {string} params.email -