diff --git a/.testENV b/.testENV index c9a62f00..eac72e3e 100644 --- a/.testENV +++ b/.testENV @@ -49,3 +49,4 @@ TRAVELLING_AUDIT_DELETE_ENABLE=true ## Email TRAVELLING_EMAIL_TEST_ENABLE=false +TRAVELLING_EMAIL_GMAIL_DEDUPE=true diff --git a/CHANGELOG.md b/CHANGELOG.md index 405ff595..fb5d0055 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,93 @@ +#### [v4.1.0](https://github.com/Trazi-Ventures/travelling/compare/v4.0.1...v4.1.0) + +- Added param's filtering on users endpoints [`70414c7`](https://github.com/Trazi-Ventures/travelling/commit/70414c768e6b0523d162e623814978709e1318b7) +- Updated sdk [`cd95404`](https://github.com/Trazi-Ventures/travelling/commit/cd95404a1405ba984522d6063b867b74285807fd) + +#### [v4.0.1](https://github.com/Trazi-Ventures/travelling/compare/v4.0.0...v4.0.1) + +> 12 September 2023 + +- Update package.json [`aebd216`](https://github.com/Trazi-Ventures/travelling/commit/aebd216c8db7558a570f327835e04fcb98b6b062) +- Updated web sdk to remove double exports [`f7fd354`](https://github.com/Trazi-Ventures/travelling/commit/f7fd354aea5ecaf363f22d53643c442079d9120d) + +### [v4.0.0](https://github.com/Trazi-Ventures/travelling/compare/v3.3.0...v4.0.0) + +> 21 August 2023 + +- Added ability to change default eprofile [`1986203`](https://github.com/Trazi-Ventures/travelling/commit/19862031613249ed51aab7c85663b265d9939eca) + +#### [v3.3.0](https://github.com/Trazi-Ventures/travelling/compare/v3.2.7...v3.3.0) + +> 14 August 2023 + +- Feature #107 Add Gmail dedupe config [`#39`](https://github.com/Trazi-Ventures/travelling/pull/39) +- Update users-get.js [`9f457c2`](https://github.com/Trazi-Ventures/travelling/commit/9f457c2d75ea20b9dd5ac9b956b8b777b2527581) +- Move logic back to interfaces [`7df3b29`](https://github.com/Trazi-Ventures/travelling/commit/7df3b29d8078f1cb6a8b3dc49926f39a282815e6) +- Remove conditional around create user test [`67356da`](https://github.com/Trazi-Ventures/travelling/commit/67356dad5c0c223d78bbc30acd6f348fbe52144c) +- Remove unused var [`0e74f03`](https://github.com/Trazi-Ventures/travelling/commit/0e74f03950e654716fb254e55553a0b09def774f) +- Change scope, and order of if [`cc008a6`](https://github.com/Trazi-Ventures/travelling/commit/cc008a6ccba3e7b7bfc8ed4e85bd43eac752823e) +- oop [`5b3e508`](https://github.com/Trazi-Ventures/travelling/commit/5b3e50818788d3d36a7f59e63edb71c1d9fc54ee) +- consolidate logic to checkUser [`858e861`](https://github.com/Trazi-Ventures/travelling/commit/858e861ace793f20b54d9c321311026c4206aa9e) +- Move into util func [`65acf8a`](https://github.com/Trazi-Ventures/travelling/commit/65acf8ab0e719fcb40b90b8033a4ed2b0cb303e2) +- Update tests to use DeDupe [`28afe82`](https://github.com/Trazi-Ventures/travelling/commit/28afe82737b320c4bd26e21cfc0d7408fd942c22) +- Move dedupe below valid user check [`14ab80e`](https://github.com/Trazi-Ventures/travelling/commit/14ab80e99843fc2cc3705d177c568a54556ea55b) +- Remove unnecesary lowercase [`5f3bfb5`](https://github.com/Trazi-Ventures/travelling/commit/5f3bfb5146e2cd0bcd6b02a3f8fd329671fd3a68) +- Remove oop test db setup, default new config to false [`c62fc94`](https://github.com/Trazi-Ventures/travelling/commit/c62fc94eeeaa3f8f54515ece645691167bfc6267) +- Update config, add gmail dedupe check, add tests [`6c644c3`](https://github.com/Trazi-Ventures/travelling/commit/6c644c3d5af40e0073037ef2d5de83032ec7e173) + +#### [v3.2.7](https://github.com/Trazi-Ventures/travelling/compare/v3.2.6...v3.2.7) + +> 21 June 2023 + +- Feature #88 Add route redirects [`#38`](https://github.com/Trazi-Ventures/travelling/pull/38) +- add tests [`f8548d2`](https://github.com/Trazi-Ventures/travelling/commit/f8548d230e4afff23f843f6ae55db0c526e17e10) +- use other param [`23d0206`](https://github.com/Trazi-Ventures/travelling/commit/23d02064366c8bcdd40e028f2b1091fd194a4881) +- add route redirect logic [`fc3272a`](https://github.com/Trazi-Ventures/travelling/commit/fc3272ae350b8500dc4b0c9f448b3a4fdccaccb2) +- add route redirect logic [`200bbc9`](https://github.com/Trazi-Ventures/travelling/commit/200bbc9b6a53ff00399cc69fd4ed4f3c589c884a) +- Revert "redirects start" [`e2fd904`](https://github.com/Trazi-Ventures/travelling/commit/e2fd9044cc5954ed10637140f1f9159703bacc67) +- Revert "redirects start" [`fa45685`](https://github.com/Trazi-Ventures/travelling/commit/fa456854812802f4c1f064a06a59882452781054) +- redirects start [`a3fd160`](https://github.com/Trazi-Ventures/travelling/commit/a3fd1601fd16123a72e7479bf1a67bb8ca45a1d5) +- redirects start [`d650bfe`](https://github.com/Trazi-Ventures/travelling/commit/d650bfe664c2d3455c374d84fa5df87ba6ee5a49) + +#### [v3.2.6](https://github.com/Trazi-Ventures/travelling/compare/v3.2.5...v3.2.6) + +> 21 June 2023 + +#### [v3.2.5](https://github.com/Trazi-Ventures/travelling/compare/v3.2.4...v3.2.5) + +> 21 June 2023 + +- Update regex.js [`77b9bcb`](https://github.com/Trazi-Ventures/travelling/commit/77b9bcbd3fc3f7ecaafa8e1eeb8487de49b26d76) +- Update package.json [`4ffdf10`](https://github.com/Trazi-Ventures/travelling/commit/4ffdf105f5f874e59bc7ff44f74c2767e856d5e7) + +#### [v3.2.4](https://github.com/Trazi-Ventures/travelling/compare/v3.2.3...v3.2.4) + +> 19 May 2023 + +- Fix #102 Fix max login attempts account locking [`#37`](https://github.com/Trazi-Ventures/travelling/pull/37) +- Merge pull request #37 from Trazi-Ventures/fix-#102-lock-accounts-on-max-attempts [`#102`](https://github.com/Trazi-Ventures/travelling/issues/102) +- Fix max attempts lock user issue [`8fc5c96`](https://github.com/Trazi-Ventures/travelling/commit/8fc5c96ba68fdccc7da0b6dbaf11b65cb28cc89b) + +#### [v3.2.3](https://github.com/Trazi-Ventures/travelling/compare/v3.2.2...v3.2.3) + +> 12 May 2023 + +- Fix #101 password recovery email data [`#101`](https://github.com/Trazi-Ventures/travelling/issues/101) + +#### [v3.2.2](https://github.com/Trazi-Ventures/travelling/compare/v3.2.1...v3.2.2) + +> 12 May 2023 + +- Feature #101 Add data to password recovery email [`#36`](https://github.com/Trazi-Ventures/travelling/pull/36) +- add data to password recovery email [`3c4baeb`](https://github.com/Trazi-Ventures/travelling/commit/3c4baeb46d6eb27e5c920f78179df03dd18d280a) +- Update Travelling.postman_collection.json [`474eff0`](https://github.com/Trazi-Ventures/travelling/commit/474eff08a76ef20325ccb210eea56736770cb759) + #### [v3.2.1](https://github.com/Trazi-Ventures/travelling/compare/v3.2.0...v3.2.1) +> 22 March 2023 + - Update package.json [`e34774f`](https://github.com/Trazi-Ventures/travelling/commit/e34774f2cc05617d3b97aa2cf8bd4d5b949f2f02) #### [v3.2.0](https://github.com/Trazi-Ventures/travelling/compare/v3.1.5...v3.2.0) diff --git a/README.md b/README.md index e66323ec..24fd82f2 100644 --- a/README.md +++ b/README.md @@ -1247,151 +1247,31 @@ Path: api/v1/groups/import body ```json { - "group": { - "anonymous": { - "type": "group", - "allowed": [ - { - "route": "/travelling/portal/*", - "host": null, - "name": "*-travelling-portal-*" - }, - { - "route": "/travelling/api/v1/auth/*", - "host": null, - "name": "*-travelling-api-v1-auth-*" - }, - { - "route": "/travelling/api/v1/user/me/route/allowed", - "host": null, - "method": "GET", - "name": "get-travelling-api-v1-user-me-route-allowed" - }, - { - "route": "/travelling/api/v1/user/me/permission/allowed/*", - "host": null, - "method": "GET", - "name": "get-travelling-api-v1-user-me-permission-allowed-*" - }, - { - "route": "/travelling/assets/*", - "host": null, - "removeFromPath": "/travelling/assets/", - "method": "GET", - "name": "get-travelling-assets-*" - }, - { - "route": "/travelling/api/v1/config/password", - "host": null, - "method": "GET", - "name": "get-travelling-api-v1-config-password" - }, - { - "route": "/favicon.ico", - "host": null, - "method": "GET", - "name": "get-favicon.ico" - } - ], - "inherited": null, - "is_default": false - }, - "group3": { - "type": "group", - "allowed": null, - "inherited": [ - "testgroup|group1", - "group|group2" - ], - "is_default": false - }, - "superadmin": { - "type": "group", - "allowed": [ - { - "host": null, - "route": "/travelling/*", - "name": "*-travelling-*" - }, - { - "name": "test-one-*-three" - } - ], - "inherited": [ - "group|anonymous" - ], - "is_default": false - }, - "group4": { - "type": "group", - "allowed": null, - "inherited": [], - "is_default": false - }, - "group2": { - "type": "group", - "allowed": [ - { - "route": "/test/get", - "host": "https://127.0.0.1:4268/:username/:group", - "removeFromPath": "/test/get", - "method": "GET", - "name": "get-test-get" - }, - { - "route": "/test/post", - "host": "http://127.0.0.1:4267/?id=:id&permission=:permission", - "removeFromPath": "/test/post", - "method": "POST", - "name": "post-test-post" - } - ], - "inherited": [ - "testgroup|group1" - ], - "is_default": false - }, - "group5": { - "type": "group", - "allowed": [ - { - "route": "/test/delete/:grouptype", - "host": "https://127.0.0.1:4268", - "removeFromPath": "/test/delete", - "method": "DELETE", - "name": "delete-test-delete-:grouptype" - } - ], - "inherited": [ - "group|group4", - "group|superadmin" - ], - "is_default": true - }, - "group1": { - "type": "group", - "allowed": null, - "inherited": null, - "is_default": false - } - }, - "testgroup": { - "group1": { - "type": "testgroup", - "allowed": null, - "inherited": [ - "group|group4" - ], - "is_default": false - }, - "superadmin": { - "type": "testgroup", - "allowed": null, - "inherited": null, - "is_default": false - } + "group": { + "anonymous": { + "allowed": [ + {"method": "GET", "route": "/account/portal/*"}, + {"method": "GET", "route": "/account/assets/*"}, + {"method": "GET", "route": "/favicon.ico"}, + {"method": "GET", "route": "/account/api/v1/auth/logout"}, + {"method": "PUT", "route": "/account/api/v1/auth/password/forgot"}, + {"method": "PUT", "route": "/account/api/v1/auth/password/reset"}, + {"method": "GET", "route": "/account/api/v1/auth/activate"}, + {"method": "POST", "route": "/account/api/v1/auth/token"}, + {"method": "GET", "route": "/account/api/v1/auth/login/otp"}, + {"method": "POST","route":"/account/api/v1/auth/oauth/authorize"}, + {"method": "GET","route":"/account/api/v1/auth/oauth/authorize"}, + {"method": "GET", "route": "/account/api/v1/user/me/permission/allowed/*"}, + {"method": "GET", "route": "/account/api/v1/user/me/route/allowed"}, + {"method": "GET", "route": "/account/api/v1/config/password"}, + {"method": "GET", "route": "/account/api/v1/config/portal/webclient"}, + {"method": "GET", "route": "/account/metrics"}, + {"method": "GET", "route": "/account/health"} + ] } + } } + ``` @@ -2617,7 +2497,7 @@ body * [Users](#Users) * [.byGroupRequest(group_request, authorization_bearer)](#Users.byGroupRequest) * [.count(limit, skip, filter, ids, authorization_bearer)](#Users.count) - * [.get(sort, limit, skip, filter, sortdir, ids, authorization_bearer)](#Users.get) + * [.get(sort, limit, skip, filter, sortdir, ids, params, authorization_bearer)](#Users.get) @@ -2692,7 +2572,7 @@ Path: api/v1/users/count -### Users.get(sort, limit, skip, filter, sortdir, ids, authorization_bearer) +### Users.get(sort, limit, skip, filter, sortdir, ids, params, authorization_bearer) get - Gets all the users ##### Filter Params @@ -2728,6 +2608,7 @@ Path: api/v1/users | filter | any | Filter parameters (example: locked=false,created_on>2021-06-03,created_on<2021-06-06) (example: locked=false,created_on>2021-06-03,created_on<2021-06-06) | | sortdir | any | Sort direction (example ascending order: ASC) (example: ASC) | | ids | any | Comma seperated id values used in inclusion query (example: d0323874-9b24-4bc5-ae38-fb8808c4e453,08c4c17f-317b-4be8-bfbd-451a274a3f7f) | +| params | any | (example: id) | | authorization_bearer | string | The client_credentials generated OAUth2 access token. | @@ -2737,7 +2618,7 @@ Path: api/v1/users * [UsersDomain](#UsersDomain) * [.count(domain, limit, skip, filter, ids, authorization_bearer)](#UsersDomain.count) - * [.get(domain, sort, limit, skip, filter, sortdir, ids, authorization_bearer)](#UsersDomain.get) + * [.get(domain, sort, limit, skip, filter, sortdir, ids, params, authorization_bearer)](#UsersDomain.get) @@ -2780,7 +2661,7 @@ Path: api/v1/users/domain/:domain/count -### UsersDomain.get(domain, sort, limit, skip, filter, sortdir, ids, authorization_bearer) +### UsersDomain.get(domain, sort, limit, skip, filter, sortdir, ids, params, authorization_bearer) get - Gets all the users ##### Filter Params @@ -2817,6 +2698,7 @@ Path: api/v1/users/domain/:domain | filter | any | Filter parameters (example: locked=false,created_on>2021-06-03,created_on<2021-06-06) (example: created_on>2021-06-01,created_on<2021-06-08) | | sortdir | any | Sort direction (example ascending order: ASC) (example: ASC) | | ids | any | Comma seperated id values used in inclusion query (example: d0323874-9b24-4bc5-ae38-fb8808c4e453,08c4c17f-317b-4be8-bfbd-451a274a3f7f) | +| params | any | (example: id,created_on) | | authorization_bearer | string | The client_credentials generated OAUth2 access token. | @@ -3806,7 +3688,7 @@ Path: api/v1/auth/register/domain/:domain | Param | Type | Description | | --- | --- | --- | | body | Object | | -| domain | any | Domain name (example: test.com) (example: traziventures.com) | +| domain | any | Domain name (example: test.com) (example: contactsource.com) | | randomPassword | any | Generates a random password on the backend securely if set to `true` (example: true) | | authorization_bearer | string | The client_credentials generated OAUth2 access token. | @@ -3814,8 +3696,8 @@ Path: api/v1/auth/register/domain/:domain body ```json { - "email": "test@test.com", - "password": "Pas5w0r!d" + "email": "mark+test@trazi.com", + "password": "Trazi123**" } ``` @@ -3889,8 +3771,94 @@ const { Travelling } = require('./sdk.js')('http://127.0.0.1'); +#### [v4.1.0](https://github.com/Trazi-Ventures/travelling/compare/v4.0.1...v4.1.0) + +- Added param's filtering on users endpoints [`70414c7`](https://github.com/Trazi-Ventures/travelling/commit/70414c768e6b0523d162e623814978709e1318b7) +- Updated sdk [`cd95404`](https://github.com/Trazi-Ventures/travelling/commit/cd95404a1405ba984522d6063b867b74285807fd) + +#### [v4.0.1](https://github.com/Trazi-Ventures/travelling/compare/v4.0.0...v4.0.1) + +> 12 September 2023 + +- Update package.json [`aebd216`](https://github.com/Trazi-Ventures/travelling/commit/aebd216c8db7558a570f327835e04fcb98b6b062) +- Updated web sdk to remove double exports [`f7fd354`](https://github.com/Trazi-Ventures/travelling/commit/f7fd354aea5ecaf363f22d53643c442079d9120d) + +### [v4.0.0](https://github.com/Trazi-Ventures/travelling/compare/v3.3.0...v4.0.0) + +> 21 August 2023 + +- Added ability to change default eprofile [`1986203`](https://github.com/Trazi-Ventures/travelling/commit/19862031613249ed51aab7c85663b265d9939eca) + +#### [v3.3.0](https://github.com/Trazi-Ventures/travelling/compare/v3.2.7...v3.3.0) + +> 14 August 2023 + +- Feature #107 Add Gmail dedupe config [`#39`](https://github.com/Trazi-Ventures/travelling/pull/39) +- Update users-get.js [`9f457c2`](https://github.com/Trazi-Ventures/travelling/commit/9f457c2d75ea20b9dd5ac9b956b8b777b2527581) +- Move logic back to interfaces [`7df3b29`](https://github.com/Trazi-Ventures/travelling/commit/7df3b29d8078f1cb6a8b3dc49926f39a282815e6) +- Remove conditional around create user test [`67356da`](https://github.com/Trazi-Ventures/travelling/commit/67356dad5c0c223d78bbc30acd6f348fbe52144c) +- Remove unused var [`0e74f03`](https://github.com/Trazi-Ventures/travelling/commit/0e74f03950e654716fb254e55553a0b09def774f) +- Change scope, and order of if [`cc008a6`](https://github.com/Trazi-Ventures/travelling/commit/cc008a6ccba3e7b7bfc8ed4e85bd43eac752823e) +- oop [`5b3e508`](https://github.com/Trazi-Ventures/travelling/commit/5b3e50818788d3d36a7f59e63edb71c1d9fc54ee) +- consolidate logic to checkUser [`858e861`](https://github.com/Trazi-Ventures/travelling/commit/858e861ace793f20b54d9c321311026c4206aa9e) +- Move into util func [`65acf8a`](https://github.com/Trazi-Ventures/travelling/commit/65acf8ab0e719fcb40b90b8033a4ed2b0cb303e2) +- Update tests to use DeDupe [`28afe82`](https://github.com/Trazi-Ventures/travelling/commit/28afe82737b320c4bd26e21cfc0d7408fd942c22) +- Move dedupe below valid user check [`14ab80e`](https://github.com/Trazi-Ventures/travelling/commit/14ab80e99843fc2cc3705d177c568a54556ea55b) +- Remove unnecesary lowercase [`5f3bfb5`](https://github.com/Trazi-Ventures/travelling/commit/5f3bfb5146e2cd0bcd6b02a3f8fd329671fd3a68) +- Remove oop test db setup, default new config to false [`c62fc94`](https://github.com/Trazi-Ventures/travelling/commit/c62fc94eeeaa3f8f54515ece645691167bfc6267) +- Update config, add gmail dedupe check, add tests [`6c644c3`](https://github.com/Trazi-Ventures/travelling/commit/6c644c3d5af40e0073037ef2d5de83032ec7e173) + +#### [v3.2.7](https://github.com/Trazi-Ventures/travelling/compare/v3.2.6...v3.2.7) + +> 21 June 2023 + +- Feature #88 Add route redirects [`#38`](https://github.com/Trazi-Ventures/travelling/pull/38) +- add tests [`f8548d2`](https://github.com/Trazi-Ventures/travelling/commit/f8548d230e4afff23f843f6ae55db0c526e17e10) +- use other param [`23d0206`](https://github.com/Trazi-Ventures/travelling/commit/23d02064366c8bcdd40e028f2b1091fd194a4881) +- add route redirect logic [`fc3272a`](https://github.com/Trazi-Ventures/travelling/commit/fc3272ae350b8500dc4b0c9f448b3a4fdccaccb2) +- add route redirect logic [`200bbc9`](https://github.com/Trazi-Ventures/travelling/commit/200bbc9b6a53ff00399cc69fd4ed4f3c589c884a) +- Revert "redirects start" [`e2fd904`](https://github.com/Trazi-Ventures/travelling/commit/e2fd9044cc5954ed10637140f1f9159703bacc67) +- Revert "redirects start" [`fa45685`](https://github.com/Trazi-Ventures/travelling/commit/fa456854812802f4c1f064a06a59882452781054) +- redirects start [`a3fd160`](https://github.com/Trazi-Ventures/travelling/commit/a3fd1601fd16123a72e7479bf1a67bb8ca45a1d5) +- redirects start [`d650bfe`](https://github.com/Trazi-Ventures/travelling/commit/d650bfe664c2d3455c374d84fa5df87ba6ee5a49) + +#### [v3.2.6](https://github.com/Trazi-Ventures/travelling/compare/v3.2.5...v3.2.6) + +> 21 June 2023 + +#### [v3.2.5](https://github.com/Trazi-Ventures/travelling/compare/v3.2.4...v3.2.5) + +> 21 June 2023 + +- Update regex.js [`77b9bcb`](https://github.com/Trazi-Ventures/travelling/commit/77b9bcbd3fc3f7ecaafa8e1eeb8487de49b26d76) +- Update package.json [`4ffdf10`](https://github.com/Trazi-Ventures/travelling/commit/4ffdf105f5f874e59bc7ff44f74c2767e856d5e7) + +#### [v3.2.4](https://github.com/Trazi-Ventures/travelling/compare/v3.2.3...v3.2.4) + +> 19 May 2023 + +- Fix #102 Fix max login attempts account locking [`#37`](https://github.com/Trazi-Ventures/travelling/pull/37) +- Merge pull request #37 from Trazi-Ventures/fix-#102-lock-accounts-on-max-attempts [`#102`](https://github.com/Trazi-Ventures/travelling/issues/102) +- Fix max attempts lock user issue [`8fc5c96`](https://github.com/Trazi-Ventures/travelling/commit/8fc5c96ba68fdccc7da0b6dbaf11b65cb28cc89b) + +#### [v3.2.3](https://github.com/Trazi-Ventures/travelling/compare/v3.2.2...v3.2.3) + +> 12 May 2023 + +- Fix #101 password recovery email data [`#101`](https://github.com/Trazi-Ventures/travelling/issues/101) + +#### [v3.2.2](https://github.com/Trazi-Ventures/travelling/compare/v3.2.1...v3.2.2) + +> 12 May 2023 + +- Feature #101 Add data to password recovery email [`#36`](https://github.com/Trazi-Ventures/travelling/pull/36) +- add data to password recovery email [`3c4baeb`](https://github.com/Trazi-Ventures/travelling/commit/3c4baeb46d6eb27e5c920f78179df03dd18d280a) +- Update Travelling.postman_collection.json [`474eff0`](https://github.com/Trazi-Ventures/travelling/commit/474eff08a76ef20325ccb210eea56736770cb759) + #### [v3.2.1](https://github.com/Trazi-Ventures/travelling/compare/v3.2.0...v3.2.1) +> 22 March 2023 + - Update package.json [`e34774f`](https://github.com/Trazi-Ventures/travelling/commit/e34774f2cc05617d3b97aa2cf8bd4d5b949f2f02) #### [v3.2.0](https://github.com/Trazi-Ventures/travelling/compare/v3.1.5...v3.2.0) diff --git a/include/database/index.js b/include/database/index.js index 396fae5a..09044ad3 100644 --- a/include/database/index.js +++ b/include/database/index.js @@ -24,7 +24,9 @@ class Database { //config.log.logger.trace('checkAuth: ', users); if (users == null || users.length == 0) { - if(span) {span.end();} + if (span) { + span.end(); + } throw { user: null, err: { @@ -47,7 +49,9 @@ class Database { // Locked check if (user.locked) { - if(span) {span.end();} + if (span) { + span.end(); + } throw { user: user, err: { @@ -59,13 +63,26 @@ class Database { // Password check if (user.password == (await crypto.hash(password, null, user.getEncryptedProfile(user)))) { - if (config.login.maxLoginAttempts && (user.failed_login_attempts + 1) >= config.login.maxLoginAttempts && (!user.last_login.ip || user.last_login.ip !== ip)) { - config.log.warn(helpers.text(`[Security Flag]: Possible attempt at account hijacking via password brute force. Attacker IP: ${parse.getIp(req)} on account ${sessionUser.email} (${sessionUser.domain})`,span)) - await lockUserFailedPassword(user, span); + if ( + config.login.maxLoginAttempts && + user.failed_login_attempts + 1 >= config.login.maxLoginAttempts && + (!user.last_login.ip || user.last_login.ip !== ip) + ) { + config.log.warn( + helpers.text( + `[Security Flag]: Possible attempt at account hijacking via password brute force. Attacker IP: ${parse.getIp( + req + )} on account ${sessionUser.email} (${sessionUser.domain})`, + span + ) + ); + await this.lockUserFailedPassword(user, span); } else { user.failed_login_attempts = 0; await user.updated(); - if(span) {span.end();} + if (span) { + span.end(); + } return { user, err: null }; } } else { @@ -75,11 +92,13 @@ class Database { // Failed login if (config.login.maxLoginAttempts && user.failed_login_attempts >= config.login.maxLoginAttempts) { - await lockUserFailedPassword(user, span); + await this.lockUserFailedPassword(user, span); } else { await user.updated(); } - if(span) {span.end();} + if (span) { + span.end(); + } throw { user: user, err: { @@ -89,14 +108,16 @@ class Database { }; } - static async lockUserFailedPassword(user,span) { + static async lockUserFailedPassword(user, span) { user.locked = true; user.locked_reason = config.user.locked.message; user.change_password = true; await user.updated(); - if(span) {span.end();} - + if (span) { + span.end(); + } + throw { user: user, err: { @@ -124,6 +145,7 @@ class Database { userProp.domain = domain; userProp.change_username = false; userProp.change_password = false; + userProp.eprofile = config.pg.crypto.eprofile; if (config.registration.requireManualActivation) { userProp.locked = true; diff --git a/include/database/models/basemodel.js b/include/database/models/basemodel.js index f4593024..9bcbfb3c 100644 --- a/include/database/models/basemodel.js +++ b/include/database/models/basemodel.js @@ -11,7 +11,8 @@ BaseModel.findAllByFilter = async function ({ limit, skip, count, - ids + ids, + params }) { var keys = []; var values = []; @@ -20,11 +21,27 @@ BaseModel.findAllByFilter = async function ({ if (!query) { if (count) { query = `SELECT COUNT(id) FROM ${this.table} `; + } + else if(params) { + if (params.indexOf(',') > -1) { + params = params.split(','); + } else { + params = [params]; + } + var query = `SELECT ` + for (var i = 0; i < params.length; i++) { + + if (this._defaultModel[params[i]] === null || typeof this._defaultModel[params[i]] === 'string') { + query += `${params[i]}${params.length > i + 1 ? ',' : ''}`; + } + } + query += ` FROM ${this.table} `; + } else { query = `SELECT * FROM ${this.table} `; } } - + console.log(query) if ((limit && isNaN(limit)) || (skip && isNaN(skip))) { throw new Error('Invalid filter'); } diff --git a/include/database/models/group.js b/include/database/models/group.js index 1b63b4c9..5d7ce26f 100644 --- a/include/database/models/group.js +++ b/include/database/models/group.js @@ -16,7 +16,8 @@ class Group extends Base(BaseModel, 'groups', { method: String, remove_from_path: String, route: String, - host: String + host: String, + redirect: String } **/ allowed: null, diff --git a/include/database/models/token.js b/include/database/models/token.js index 49a72d0a..82ee711d 100644 --- a/include/database/models/token.js +++ b/include/database/models/token.js @@ -28,6 +28,7 @@ class Token extends Base(BaseModel, 'tokens', { secret CHARACTER varying(350), secret_encrypt text, __secret_encrypt character varying(258), + eprofile character varying(350), PRIMARY KEY (id, user_id) );`); } diff --git a/include/routes/v1/functions/auth.js b/include/routes/v1/functions/auth.js index 7e293d10..41abd456 100644 --- a/include/routes/v1/functions/auth.js +++ b/include/routes/v1/functions/auth.js @@ -110,6 +110,10 @@ var registerRoute = async (req, res) => { var isValid = await checkValidUser(req.body); + if (config.email.validation.internal.dedupeGmail && req.body.email.includes('@gmail.com')) { + req.body.email = Email.dedupeGmail(req.body.email); + } + if (isValid === true) { isValid = await Database.checkDupe(req.body); } @@ -122,7 +126,7 @@ var registerRoute = async (req, res) => { var username = config.user.username.enabled ? req.body.username.toLowerCase() : ''; var password = req.body.password; - var email = req.body.email.toLowerCase(); + var email = req.body.email; var domain = 'default'; var groupRequest; diff --git a/include/routes/v1/functions/groups.js b/include/routes/v1/functions/groups.js index 49eacec6..c2925c80 100644 --- a/include/routes/v1/functions/groups.js +++ b/include/routes/v1/functions/groups.js @@ -234,7 +234,8 @@ async function getUsersByGroup(req, res, router) { skip: req.query.skip, sort: req.query.sort, sortdir: req.query.sortdir, - count: !!req.returnCountOnly + count: !!req.returnCountOnly, + params: req.query.params }) ); } catch { diff --git a/include/routes/v1/functions/users.js b/include/routes/v1/functions/users.js index 32a6f00b..c213df47 100644 --- a/include/routes/v1/functions/users.js +++ b/include/routes/v1/functions/users.js @@ -8,6 +8,7 @@ const Database = require('../../../database'); const User = require('../../../database/models/user'); const regex = require('../../../utils/regex'); const CookieToken = require('../../../utils/cookietoken'); +const EmailUtils = require('../../../utils/email'); async function deleteUser(opts) { var id = userUtils.getId(opts.req); @@ -172,6 +173,14 @@ async function editUser(opts) { model.domain = domain; } + if (model.email) { + model.email = model.email.toLowerCase(); + + if (config.email.validation.internal.dedupeGmail && model.email.includes('@gmail.com')) { + model.email = EmailUtils.dedupeGmail(model.email); + } + } + isValid = await Database.checkDupe(model); } diff --git a/include/routes/v1/users.js b/include/routes/v1/users.js index e6a39558..116061e9 100644 --- a/include/routes/v1/users.js +++ b/include/routes/v1/users.js @@ -188,7 +188,8 @@ module.exports = function (app, opts, done) { skip: req.query.skip, filter: req.query.filter, sortdir: req.query.sortdir, - ids: req.query.ids + ids: req.query.ids, + params: req.query.params }); } catch { res.code(400).send({ @@ -237,7 +238,8 @@ module.exports = function (app, opts, done) { skip: req.query.skip, filter: req.query.filter, sortdir: req.query.sortdir, - ids: req.query.ids + ids: req.query.ids, + params: req.query.params }); } catch { res.code(400).send({ diff --git a/include/server/groupmanager.js b/include/server/groupmanager.js index a839d77d..ad9147bd 100644 --- a/include/server/groupmanager.js +++ b/include/server/groupmanager.js @@ -58,13 +58,14 @@ class GroupManager { this.mergedRoutes[grps[i].type][grps[i].name] = this.groupInheritedMerge(new Group(grps[i]._), grps, span); for (var j = 0; j < this.mergedRoutes[grps[i].type][grps[i].name].length; j++) { - allPossibleRoutesTemp[this.mergedRoutes[grps[i].type][grps[i].name][j].route] = true; + allPossibleRoutesTemp[this.mergedRoutes[grps[i].type][grps[i].name][j].route] = + this.mergedRoutes[grps[i].type][grps[i].name][j]; } } - allPossibleRoutesTemp = Object.keys(allPossibleRoutesTemp); - for (let i = 0; i < allPossibleRoutesTemp.length; i++) { - var t = allPossibleRoutesTemp[i].split('/'); + const allPossibleRoutesTempKeys = Object.keys(allPossibleRoutesTemp); + for (let i = 0; i < allPossibleRoutesTempKeys.length; i++) { + var t = allPossibleRoutesTempKeys[i].split('/'); t.shift(); var last = this.allPossibleRoutes; @@ -75,7 +76,9 @@ class GroupManager { last[t[j]] = {}; } - last[t[j]].name = allPossibleRoutesTemp[i]; + last[t[j]].name = allPossibleRoutesTempKeys[i]; + last[t[j]].redirect = allPossibleRoutesTemp[allPossibleRoutesTempKeys[i]].redirect; + last = last[t[j]]; } } diff --git a/include/server/router.js b/include/server/router.js index 192733bb..4fb44ed3 100644 --- a/include/server/router.js +++ b/include/server/router.js @@ -73,10 +73,10 @@ class Router { var groups = await gm.currentGroup(req, res); if (sessionUser && sessionUser.locked) { - if(config.user.locked.message !== sessionUser.locked_reason) { + if (config.user.locked.message !== sessionUser.locked_reason) { req.logout(req, res); res.code(401).send('Account Locked'); - if(span) { + if (span) { span.end(); } return false; @@ -94,7 +94,7 @@ class Router { r = this.isRouteAllowed(req.raw.method, req.raw.url, groups[i].routes, sessionUser, routedGroup, headersDomain); if (r) { - possibleRoute = r.route; + possibleRoute = r; break; } } @@ -107,17 +107,17 @@ class Router { for (var i = 0; i < troute.length; i++) { if (last[troute[i]]) { - possibleRoute = last[troute[i]].name; + possibleRoute = last[troute[i]]; last = last[troute[i]]; } else if (last['*']) { - possibleRoute = last['*'].name; + possibleRoute = last['*']; last = last['*']; } } } if (req.raw.url.indexOf(config.portal.path) == 0) { - if(span) { + if (span) { span.end(); } return false; @@ -137,6 +137,8 @@ class Router { // console.log(req.raw.url, req.raw.url, config.portal.path) this.setBackurl(res, req); res.redirect(config.portal.path); + } else if (possibleRoute && possibleRoute.redirect) { + res.redirect(possibleRoute.redirect); } else { res.code(401).send('Access Denied'); } @@ -157,7 +159,7 @@ class Router { ) ); } - if(span) { + if (span) { span.end(); } return false; @@ -191,10 +193,14 @@ class Router { } if (config.stats.captureGroupRoutes && req.raw.url.indexOf('/' + config.serviceName + '/') == -1) { - this.nstats.addWeb({ routerPath: possibleRoute, method: req.raw.method, socket: req.raw.socket }, res, sTime); + this.nstats.addWeb( + { routerPath: possibleRoute.name, method: req.raw.method, socket: req.raw.socket }, + res, + sTime + ); } - if(span) { + if (span) { span.end(); } @@ -241,7 +247,9 @@ class Router { helpers.text( (sessionUser.username || sessionUser.email) + ' (' + - routedGroup.type + ':' + routedGroup.name + + routedGroup.type + + ':' + + routedGroup.name + ',' + sessionUser.domain + ') | ' + @@ -256,14 +264,21 @@ class Router { } else { log.info( helpers.text( - 'Unregistered User' + ' (anonymous)' + ' | ' + parse.getIp(req) + ' | [' + req.raw.method + '] ' + req.raw.url, + 'Unregistered User' + + ' (anonymous)' + + ' | ' + + parse.getIp(req) + + ' | [' + + req.raw.method + + '] ' + + req.raw.url, span ) ); } } - if(span) { + if (span) { span.end(); } @@ -271,7 +286,11 @@ class Router { } if (config.stats.captureGroupRoutes) { - this.nstats.addWeb({ routerPath: possibleRoute, method: req.raw.method, socket: req.raw.socket }, res, sTime); + this.nstats.addWeb( + { routerPath: possibleRoute.route, method: req.raw.method, socket: req.raw.socket }, + res, + sTime + ); } var target = { @@ -293,7 +312,9 @@ class Router { helpers.text( (sessionUser.username || sessionUser.email) + ' (' + - routedGroup.type + ':' + routedGroup.name + + routedGroup.type + + ':' + + routedGroup.name + ',' + sessionUser.domain + ') | ' + @@ -334,7 +355,7 @@ class Router { this.proxy.ws(req.raw, req._wssocket, target); } - if(span) { + if (span) { span.end(); } @@ -354,14 +375,14 @@ class Router { this.proxy.web(req.raw, res.raw, target); } - if(span) { + if (span) { span.end(); } return true; } - if(span) { + if (span) { span.end(); } @@ -375,7 +396,7 @@ class Router { // Should never get here; log.wtf(helpers.text('router you what?', span)); - if(span) { + if (span) { span.end(); } diff --git a/include/token/index.js b/include/token/index.js index ed715b45..e8d29ff9 100644 --- a/include/token/index.js +++ b/include/token/index.js @@ -103,7 +103,8 @@ class TokenHandler { type, name, urls, - secret: secret.toString('hex') + secret: secret.toString('hex'), + eprofile: config.pg.crypto.eprofile }); token.secret = secret.toString('hex'); diff --git a/include/utils/config.js b/include/utils/config.js index ee86a1b7..c59cd76c 100644 --- a/include/utils/config.js +++ b/include/utils/config.js @@ -220,6 +220,7 @@ const config = { ), secret: misc.isSetDefault(process.env.TRAVELLING_PG_CRYPTO_IMPLEMENTATION_SECRET, null), salt: misc.isSetDefault(process.env.TRAVELLING_PG_CRYPTO_IMPLEMENTATION_SALT, null), + eprofile: misc.isSetDefault(process.env.TRAVELLING_PG_CRYPTO_IMPLEMENTATION_EPROFILE, null), encryptUserData: misc.isSetDefault(misc.stringToBool(process.env.TRAVELLING_PG_CRYPTO_ENCRYPT_USER_DATA), false) } }, @@ -237,6 +238,9 @@ const config = { false ), method: misc.isSetDefault(process.env.TRAVELLING_EMAIL_VALIDATION_EXTERNAL_METHOD, 'GET') + }, + internal: { + dedupeGmail: misc.isSetDefault(misc.stringToBool(process.env.TRAVELLING_EMAIL_GMAIL_DEDUPE), false) } }, from: misc.isSetDefault(process.env.TRAVELLING_EMAIL_FROM, null), diff --git a/include/utils/email.js b/include/utils/email.js index 78290933..edff7b90 100644 --- a/include/utils/email.js +++ b/include/utils/email.js @@ -28,7 +28,12 @@ const restTransporter = { simple: false, uri, json: true, - body: { user: mail.data.user, token: mail.data.token, clientip: mail.data.clientip } + body: { + user: mail.data.user, + token: mail.data.token, + clientip: mail.data.clientip, + data: mail.data.data ? { ip: mail.data.data.ip, tokenExpiry: mail.data.data.tokenExpiry } : {} + } }); callback(null, true); } catch (e) { @@ -76,12 +81,18 @@ class Email { resetPasswordSubject: Handlebars.compile( fs.readFileSync(require('path').resolve(config.email.template.passwordResetSubject), 'utf-8') ), - activationBody: Handlebars.compile(fs.readFileSync(require('path').resolve(config.email.template.activationBody), 'utf-8')), + activationBody: Handlebars.compile( + fs.readFileSync(require('path').resolve(config.email.template.activationBody), 'utf-8') + ), activationSubject: Handlebars.compile( fs.readFileSync(require('path').resolve(config.email.template.activationSubject), 'utf-8') ), - welcomeBody: Handlebars.compile(fs.readFileSync(require('path').resolve(config.email.template.welcomeBody), 'utf-8')), - welcomeSubject: Handlebars.compile(fs.readFileSync(require('path').resolve(config.email.template.welcomeSubject), 'utf-8')) + welcomeBody: Handlebars.compile( + fs.readFileSync(require('path').resolve(config.email.template.welcomeBody), 'utf-8') + ), + welcomeSubject: Handlebars.compile( + fs.readFileSync(require('path').resolve(config.email.template.welcomeSubject), 'utf-8') + ) }; } @@ -102,6 +113,10 @@ class Email { subject = templates.resetPasswordSubject({ user }); } + const d = new Date(); + const e = new Date(d.getTime() + config.email.recovery.expiration * 1000); + const tokenExpiry = e.toUTCString(); // Could change display formatting here. + var info = await transporter.sendMail({ from: config.email.from, to: email, @@ -111,7 +126,8 @@ class Email { user, config, token, - clientip + clientip, + data: { ip: clientip, tokenExpiry: tokenExpiry.toString() } }); if (config.email.test.enable) { @@ -190,6 +206,19 @@ class Email { config.log.logger.debug(testInfo); } } + + static dedupeGmail(emailRaw = '') { + let [email, domain] = emailRaw.toLowerCase().split('@'); + if (email.indexOf('.') > -1) { + email = email.replace(/\./g, ''); + } + + if (email.indexOf('+') > -1) { + email = email.split('+')[0]; + } + + return `${email}@${domain}`; + } } module.exports = Email; diff --git a/include/utils/regex.js b/include/utils/regex.js index 23983572..aeca430a 100644 --- a/include/utils/regex.js +++ b/include/utils/regex.js @@ -22,7 +22,7 @@ const regex = { '}$' ), // safeName: new RegExp(/^[A-Za-z0-9_\/\?\-\@\#\$\%\!\^\&\*\.]{1,350}$/g) - safeName: new RegExp(/^[A-Za-z0-9\ \.\-\_\@]{1,350}$/), + safeName: new RegExp(/^[A-Za-z0-9\ \.\-\_\@\#]{1,350}$/), userData: new RegExp(/^[A-Za-z0-9\ \.\,\!\?\$\:\;\~\#\%\&\-\_\@\n\t\(\)\{\}\[\]\"]{1,}$/), base64Image: new RegExp( '^(data:\\w+\\/[a-zA-Z\\+\\-\\.]+;base64,)(?:[A-Za-z0-9+\\/]{4})*(?:[A-Za-z0-9+\\/]{2}==|[A-Za-z0-9+/]{3}=)?$', diff --git a/package.json b/package.json index 5dc14796..8e1a5df6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@trazi/travelling", - "version": "3.2.1", + "version": "4.1.0", "description": "A dynamic route level groups permissions middleman service", "main": "index.js", "scripts": { @@ -48,7 +48,7 @@ "adost": "^2.0.0", "aws-sdk": "^2.516.0", "dotenv": "^8.2.0", - "fasquest": "^3.1.1", + "fasquest": "^3.1.3", "fast-proxy": "^1.0.0", "fastify": "^3.11.0", "fastify-cookie": "^5.1.0", @@ -63,7 +63,7 @@ "nodemailer": "^6.3.0", "nstats": "4.2.0", "wog": "latest", - "zcs": "^2.2.0" + "zcs": "^2.4.0" }, "devDependencies": { "@abeai/recho": "^1.4.0", @@ -76,7 +76,7 @@ "jest-junit": "^11.0.1", "jsdoc-to-markdown": "^8.0.0", "mdsquash": "^1.0.6", - "postgen": "^5.0.0", + "postgen": "^5.0.4", "prettier": "^2.0.5", "prettier-eslint": "^11.0.0" } diff --git a/scripts/sql/patch_2.sql b/scripts/sql/patch_2.sql new file mode 100644 index 00000000..8f99707c --- /dev/null +++ b/scripts/sql/patch_2.sql @@ -0,0 +1,2 @@ + ALTER TABLE tokens + ADD COLUMN IF NOT EXISTS eprofile character varying(350) \ No newline at end of file diff --git a/sdk/README.md b/sdk/README.md index c947b8d8..b3f34e4f 100644 --- a/sdk/README.md +++ b/sdk/README.md @@ -409,151 +409,31 @@ Path: api/v1/groups/import body ```json { - "group": { - "anonymous": { - "type": "group", - "allowed": [ - { - "route": "/travelling/portal/*", - "host": null, - "name": "*-travelling-portal-*" - }, - { - "route": "/travelling/api/v1/auth/*", - "host": null, - "name": "*-travelling-api-v1-auth-*" - }, - { - "route": "/travelling/api/v1/user/me/route/allowed", - "host": null, - "method": "GET", - "name": "get-travelling-api-v1-user-me-route-allowed" - }, - { - "route": "/travelling/api/v1/user/me/permission/allowed/*", - "host": null, - "method": "GET", - "name": "get-travelling-api-v1-user-me-permission-allowed-*" - }, - { - "route": "/travelling/assets/*", - "host": null, - "removeFromPath": "/travelling/assets/", - "method": "GET", - "name": "get-travelling-assets-*" - }, - { - "route": "/travelling/api/v1/config/password", - "host": null, - "method": "GET", - "name": "get-travelling-api-v1-config-password" - }, - { - "route": "/favicon.ico", - "host": null, - "method": "GET", - "name": "get-favicon.ico" - } - ], - "inherited": null, - "is_default": false - }, - "group3": { - "type": "group", - "allowed": null, - "inherited": [ - "testgroup|group1", - "group|group2" - ], - "is_default": false - }, - "superadmin": { - "type": "group", - "allowed": [ - { - "host": null, - "route": "/travelling/*", - "name": "*-travelling-*" - }, - { - "name": "test-one-*-three" - } - ], - "inherited": [ - "group|anonymous" - ], - "is_default": false - }, - "group4": { - "type": "group", - "allowed": null, - "inherited": [], - "is_default": false - }, - "group2": { - "type": "group", - "allowed": [ - { - "route": "/test/get", - "host": "https://127.0.0.1:4268/:username/:group", - "removeFromPath": "/test/get", - "method": "GET", - "name": "get-test-get" - }, - { - "route": "/test/post", - "host": "http://127.0.0.1:4267/?id=:id&permission=:permission", - "removeFromPath": "/test/post", - "method": "POST", - "name": "post-test-post" - } - ], - "inherited": [ - "testgroup|group1" - ], - "is_default": false - }, - "group5": { - "type": "group", - "allowed": [ - { - "route": "/test/delete/:grouptype", - "host": "https://127.0.0.1:4268", - "removeFromPath": "/test/delete", - "method": "DELETE", - "name": "delete-test-delete-:grouptype" - } - ], - "inherited": [ - "group|group4", - "group|superadmin" - ], - "is_default": true - }, - "group1": { - "type": "group", - "allowed": null, - "inherited": null, - "is_default": false - } - }, - "testgroup": { - "group1": { - "type": "testgroup", - "allowed": null, - "inherited": [ - "group|group4" - ], - "is_default": false - }, - "superadmin": { - "type": "testgroup", - "allowed": null, - "inherited": null, - "is_default": false - } + "group": { + "anonymous": { + "allowed": [ + {"method": "GET", "route": "/account/portal/*"}, + {"method": "GET", "route": "/account/assets/*"}, + {"method": "GET", "route": "/favicon.ico"}, + {"method": "GET", "route": "/account/api/v1/auth/logout"}, + {"method": "PUT", "route": "/account/api/v1/auth/password/forgot"}, + {"method": "PUT", "route": "/account/api/v1/auth/password/reset"}, + {"method": "GET", "route": "/account/api/v1/auth/activate"}, + {"method": "POST", "route": "/account/api/v1/auth/token"}, + {"method": "GET", "route": "/account/api/v1/auth/login/otp"}, + {"method": "POST","route":"/account/api/v1/auth/oauth/authorize"}, + {"method": "GET","route":"/account/api/v1/auth/oauth/authorize"}, + {"method": "GET", "route": "/account/api/v1/user/me/permission/allowed/*"}, + {"method": "GET", "route": "/account/api/v1/user/me/route/allowed"}, + {"method": "GET", "route": "/account/api/v1/config/password"}, + {"method": "GET", "route": "/account/api/v1/config/portal/webclient"}, + {"method": "GET", "route": "/account/metrics"}, + {"method": "GET", "route": "/account/health"} + ] } + } } + ``` @@ -1779,7 +1659,7 @@ body * [Users](#Users) * [.byGroupRequest(group_request, authorization_bearer)](#Users.byGroupRequest) * [.count(limit, skip, filter, ids, authorization_bearer)](#Users.count) - * [.get(sort, limit, skip, filter, sortdir, ids, authorization_bearer)](#Users.get) + * [.get(sort, limit, skip, filter, sortdir, ids, params, authorization_bearer)](#Users.get) @@ -1854,7 +1734,7 @@ Path: api/v1/users/count -### Users.get(sort, limit, skip, filter, sortdir, ids, authorization_bearer) +### Users.get(sort, limit, skip, filter, sortdir, ids, params, authorization_bearer) get - Gets all the users ##### Filter Params @@ -1890,6 +1770,7 @@ Path: api/v1/users | filter | any | Filter parameters (example: locked=false,created_on>2021-06-03,created_on<2021-06-06) (example: locked=false,created_on>2021-06-03,created_on<2021-06-06) | | sortdir | any | Sort direction (example ascending order: ASC) (example: ASC) | | ids | any | Comma seperated id values used in inclusion query (example: d0323874-9b24-4bc5-ae38-fb8808c4e453,08c4c17f-317b-4be8-bfbd-451a274a3f7f) | +| params | any | (example: id) | | authorization_bearer | string | The client_credentials generated OAUth2 access token. | @@ -1899,7 +1780,7 @@ Path: api/v1/users * [UsersDomain](#UsersDomain) * [.count(domain, limit, skip, filter, ids, authorization_bearer)](#UsersDomain.count) - * [.get(domain, sort, limit, skip, filter, sortdir, ids, authorization_bearer)](#UsersDomain.get) + * [.get(domain, sort, limit, skip, filter, sortdir, ids, params, authorization_bearer)](#UsersDomain.get) @@ -1942,7 +1823,7 @@ Path: api/v1/users/domain/:domain/count -### UsersDomain.get(domain, sort, limit, skip, filter, sortdir, ids, authorization_bearer) +### UsersDomain.get(domain, sort, limit, skip, filter, sortdir, ids, params, authorization_bearer) get - Gets all the users ##### Filter Params @@ -1979,6 +1860,7 @@ Path: api/v1/users/domain/:domain | filter | any | Filter parameters (example: locked=false,created_on>2021-06-03,created_on<2021-06-06) (example: created_on>2021-06-01,created_on<2021-06-08) | | sortdir | any | Sort direction (example ascending order: ASC) (example: ASC) | | ids | any | Comma seperated id values used in inclusion query (example: d0323874-9b24-4bc5-ae38-fb8808c4e453,08c4c17f-317b-4be8-bfbd-451a274a3f7f) | +| params | any | (example: id,created_on) | | authorization_bearer | string | The client_credentials generated OAUth2 access token. | @@ -2968,7 +2850,7 @@ Path: api/v1/auth/register/domain/:domain | Param | Type | Description | | --- | --- | --- | | body | Object | | -| domain | any | Domain name (example: test.com) (example: traziventures.com) | +| domain | any | Domain name (example: test.com) (example: contactsource.com) | | randomPassword | any | Generates a random password on the backend securely if set to `true` (example: true) | | authorization_bearer | string | The client_credentials generated OAUth2 access token. | @@ -2976,8 +2858,8 @@ Path: api/v1/auth/register/domain/:domain body ```json { - "email": "test@test.com", - "password": "Pas5w0r!d" + "email": "mark+test@trazi.com", + "password": "Trazi123**" } ``` diff --git a/sdk/Travelling.postman_collection.json b/sdk/Travelling.postman_collection.json index 8012e5da..4f443e27 100644 --- a/sdk/Travelling.postman_collection.json +++ b/sdk/Travelling.postman_collection.json @@ -3,7 +3,7 @@ "_postman_id": "9718a487-a9bf-41ec-b272-fc0438da73d3", "name": "Travelling", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "_exporter_id": "15847205" + "_exporter_id": "208035" }, "item": [ { @@ -187,7 +187,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"email\": \"test@test.com\",\n\t\"password\": \"Pas5w0r!d\"\n}", + "raw": "{\n\t\"email\": \"mark+test@trazi.com\",\n\t\"password\": \"Trazi123**\"\n}", "options": { "raw": { "language": "json" @@ -218,76 +218,14 @@ "variable": [ { "key": "domain", - "value": "traziventures.com", + "value": "contactsource.com", "description": "Domain name (example: test.com)" } ] }, "description": "Register a user\n\n`group_request`\tis optional." }, - "response": [ - { - "name": "Register User", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "name": "Content-Type", - "value": "application/json", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n\t\"username\":\"user1\",\n\t\"password\":\"swagmoney69xd420\",\n\t\"email\": \"test@test.com\"\n}" - }, - "url": { - "raw": "{{TRAVELLING}}/api/v1/auth/register", - "host": [ - "{{TRAVELLING}}" - ], - "path": [ - "api", - "v1", - "auth", - "register" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "content-type", - "value": "application/json; charset=utf-8" - }, - { - "key": "set-cookie", - "value": "trav:tok=537709f9a7e7b32ecad6a1f1ca620a48a3df61708d530db3e82a60e33ebf5e752d6a0d39f58975aeee1dc2c561a5f8295417343108576a48e8fbfc2f92cae4cb36b2ffdd5c13b577a32745c44cbcfdccf7b399ce5b1dc17a477d0d41551e2628%2F09057a5665f51469fdb227edea8faff0; Path=/; Expires=Thu, 19 Sep 2019 19:57:38 GMT; HttpOnly; Secure" - }, - { - "key": "set-cookie", - "value": "trav:ssid=9UDLGJpD307kZSLAeKHvBBRfyl-d2J6u.VS080%2BKNf3y280f2XW%2FThFKGGjPrzkFnjIL7yCMPKQE; Path=/; HttpOnly; Secure" - }, - { - "key": "content-length", - "value": "24" - }, - { - "key": "Date", - "value": "Tue, 20 Aug 2019 19:57:38 GMT" - }, - { - "key": "Connection", - "value": "keep-alive" - } - ], - "cookie": [], - "body": "{\n \"msg\": \"Access Granted\"\n}" - } - ] + "response": [] }, { "name": "Login", @@ -1737,7 +1675,7 @@ } ], "cookie": [], - "body": "{\n \"id\": 10,\n \"username\": \"user6\",\n \"password\": \"bcc690dfa35c3214ef67a63383e0420e177c47577c8e31a90b3ba94e2b923b93\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": null,\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password_token\": null,\n \"email_verify_token\": null,\n \"group_id\": 2,\n \"email\": \"joseph@gmail.com\",\n \"created_on\": \"1567005382100\",\n \"last_login\": null,\n \"client_id\": null,\n \"client_secret\": null,\n \"client_refresh\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": 2,\n \"name\": \"superadmin\",\n \"type\": \"group\",\n \"allowed\": [\n {\n \"host\": null,\n \"route\": \"/travelling/*\",\n \"method\": \"*\",\n \"name\": \"*-travelling-*\"\n },\n {\n \"route\": \"/test/:username\",\n \"host\": \"http://127.0.0.1:1237/:permission\",\n \"removeFromPath\": \"test\",\n \"method\": \"*\",\n \"name\": \"*-test-:username\"\n }\n ],\n \"inherited\": null,\n \"is_default\": true\n }\n}" + "body": "{\n \"id\": 10,\n \"username\": \"user6\",\n \"password\": \"bcc690dfa35c3214ef67a63383e0420e177c47577c8e31a90b3ba94e2b923b93\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": null,\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password_token\": null,\n \"email_verify_token\": null,\n \"group_id\": 2,\n \"email\": \"joseph@abe.ai\",\n \"created_on\": \"1567005382100\",\n \"last_login\": null,\n \"client_id\": null,\n \"client_secret\": null,\n \"client_refresh\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": 2,\n \"name\": \"superadmin\",\n \"type\": \"group\",\n \"allowed\": [\n {\n \"host\": null,\n \"route\": \"/travelling/*\",\n \"method\": \"*\",\n \"name\": \"*-travelling-*\"\n },\n {\n \"route\": \"/test/:username\",\n \"host\": \"http://127.0.0.1:1237/:permission\",\n \"removeFromPath\": \"test\",\n \"method\": \"*\",\n \"name\": \"*-test-:username\"\n }\n ],\n \"inherited\": null,\n \"is_default\": true\n }\n}" } ] }, @@ -3323,6 +3261,11 @@ "value": "d0323874-9b24-4bc5-ae38-fb8808c4e453,08c4c17f-317b-4be8-bfbd-451a274a3f7f", "description": "Comma seperated id values used in inclusion query", "disabled": true + }, + { + "key": "params", + "value": "id,created_on", + "disabled": true } ], "variable": [ @@ -3458,6 +3401,11 @@ "value": "d0323874-9b24-4bc5-ae38-fb8808c4e453,08c4c17f-317b-4be8-bfbd-451a274a3f7f", "description": "Comma seperated id values used in inclusion query", "disabled": true + }, + { + "key": "params", + "value": "id", + "disabled": true } ] }, @@ -3697,7 +3645,7 @@ } ], "cookie": [], - "body": "{\n \"id\": \"bda05e2c-a8de-464e-949c-656e527c374c\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"email\": \"jt6@gmail.com\",\n \"created_on\": \"1568648238097\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"name\": \"group9\",\n \"type\": \"accounts\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": true\n }\n}" + "body": "{\n \"id\": \"bda05e2c-a8de-464e-949c-656e527c374c\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"email\": \"jt6@abe.ai\",\n \"created_on\": \"1568648238097\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"name\": \"group9\",\n \"type\": \"accounts\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": true\n }\n}" } ] }, @@ -3837,7 +3785,7 @@ } ], "cookie": [], - "body": "{\n \"id\": \"bda05e2c-a8de-464e-949c-656e527c374c\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"email\": \"jt6@gmail.com\",\n \"created_on\": \"1568648238097\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"name\": \"group9\",\n \"type\": \"accounts\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": true\n }\n}" + "body": "{\n \"id\": \"bda05e2c-a8de-464e-949c-656e527c374c\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"email\": \"jt6@abe.ai\",\n \"created_on\": \"1568648238097\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"name\": \"group9\",\n \"type\": \"accounts\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": true\n }\n}" } ] }, @@ -4030,7 +3978,7 @@ } ], "cookie": [], - "body": "{\n \"id\": \"bda05e2c-a8de-464e-949c-656e527c374c\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"email\": \"jt6@gmail.com\",\n \"created_on\": \"1568648238097\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"name\": \"group9\",\n \"type\": \"accounts\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": true\n }\n}" + "body": "{\n \"id\": \"bda05e2c-a8de-464e-949c-656e527c374c\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"email\": \"jt6@abe.ai\",\n \"created_on\": \"1568648238097\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"name\": \"group9\",\n \"type\": \"accounts\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": true\n }\n}" } ] } @@ -4150,7 +4098,7 @@ } ], "cookie": [], - "body": "{\n \"id\": \"bda05e2c-a8de-464e-949c-656e527c374c\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"email\": \"jt6@gmail.com\",\n \"created_on\": \"1568648238097\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"name\": \"group9\",\n \"type\": \"accounts\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": true\n }\n}" + "body": "{\n \"id\": \"bda05e2c-a8de-464e-949c-656e527c374c\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"email\": \"jt6@abe.ai\",\n \"created_on\": \"1568648238097\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"name\": \"group9\",\n \"type\": \"accounts\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": true\n }\n}" } ] }, @@ -4266,7 +4214,7 @@ } ], "cookie": [], - "body": "{\n \"id\": \"bda05e2c-a8de-464e-949c-656e527c374c\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"email\": \"jt6@gmail.com\",\n \"created_on\": \"1568648238097\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"name\": \"group9\",\n \"type\": \"accounts\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": true\n }\n}" + "body": "{\n \"id\": \"bda05e2c-a8de-464e-949c-656e527c374c\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"email\": \"jt6@abe.ai\",\n \"created_on\": \"1568648238097\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"name\": \"group9\",\n \"type\": \"accounts\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": true\n }\n}" } ] }, @@ -4401,7 +4349,7 @@ } ], "cookie": [], - "body": "{\n \"id\": \"bda05e2c-a8de-464e-949c-656e527c374c\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"email\": \"jt6@gmail.com\",\n \"created_on\": \"1568648238097\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"name\": \"group9\",\n \"type\": \"accounts\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": true\n }\n}" + "body": "{\n \"id\": \"bda05e2c-a8de-464e-949c-656e527c374c\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"email\": \"jt6@abe.ai\",\n \"created_on\": \"1568648238097\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"name\": \"group9\",\n \"type\": \"accounts\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": true\n }\n}" } ] }, @@ -4542,7 +4490,7 @@ } ], "cookie": [], - "body": "{\n \"id\": \"bda05e2c-a8de-464e-949c-656e527c374c\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"email\": \"jt6@gmail.com\",\n \"created_on\": \"1568648238097\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"name\": \"group9\",\n \"type\": \"accounts\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": true\n }\n}" + "body": "{\n \"id\": \"bda05e2c-a8de-464e-949c-656e527c374c\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"email\": \"jt6@abe.ai\",\n \"created_on\": \"1568648238097\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"name\": \"group9\",\n \"type\": \"accounts\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": true\n }\n}" } ] }, @@ -4832,7 +4780,7 @@ } ], "cookie": [], - "body": "{\n \"id\": \"bda05e2c-a8de-464e-949c-656e527c374c\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"email\": \"jt6@gmail.com\",\n \"created_on\": \"1568648238097\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"name\": \"group9\",\n \"type\": \"accounts\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": true\n }\n}" + "body": "{\n \"id\": \"bda05e2c-a8de-464e-949c-656e527c374c\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"email\": \"jt6@abe.ai\",\n \"created_on\": \"1568648238097\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"name\": \"group9\",\n \"type\": \"accounts\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": true\n }\n}" } ] } @@ -4964,7 +4912,7 @@ } ], "cookie": [], - "body": "[\n {\n \"id\": \"e517e311-fb37-4ca9-be4f-ff821ff9767d\",\n \"username\": \"user5\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": null,\n \"group_request\": null,\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt@gmail.com\",\n \"created_on\": \"1568395971209\",\n \"last_login\": {\n \"date\": 1568416018554,\n \"ip\": \"127.0.0.1\"\n },\n \"user_data\": {\n \"activeAccountID\": \"09A75A84-A921-4F68-8FEF-B8392E3702C2\",\n \"activeAgentID\": \"3C49E289-31F0-47D3-922E-D67ECD027B50\",\n \"currentCuiConfigID\": \"41415261-9498-4387-BC87-9ED443E5CE1A\",\n \"agentSlug\": \"MercMoney\"\n },\n \"eprofile\": null\n },\n {\n \"id\": \"4d8f1190-5c7b-4dec-b766-be4a24a5df6c\",\n \"username\": \"user7\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt4@gmail.com\",\n \"created_on\": \"1568396383891\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n },\n {\n \"id\": \"234d53a1-8b0b-4c7f-b98f-41138c41bc35\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": null,\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt2@gmail.com\",\n \"created_on\": \"1568396224587\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n }\n]" + "body": "[\n {\n \"id\": \"e517e311-fb37-4ca9-be4f-ff821ff9767d\",\n \"username\": \"user5\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": null,\n \"group_request\": null,\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt@abe.ai\",\n \"created_on\": \"1568395971209\",\n \"last_login\": {\n \"date\": 1568416018554,\n \"ip\": \"127.0.0.1\"\n },\n \"user_data\": {\n \"activeAccountID\": \"09A75A84-A921-4F68-8FEF-B8392E3702C2\",\n \"activeAgentID\": \"3C49E289-31F0-47D3-922E-D67ECD027B50\",\n \"currentCuiConfigID\": \"41415261-9498-4387-BC87-9ED443E5CE1A\",\n \"agentSlug\": \"MercMoney\"\n },\n \"eprofile\": null\n },\n {\n \"id\": \"4d8f1190-5c7b-4dec-b766-be4a24a5df6c\",\n \"username\": \"user7\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt4@abe.ai\",\n \"created_on\": \"1568396383891\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n },\n {\n \"id\": \"234d53a1-8b0b-4c7f-b98f-41138c41bc35\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": null,\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt2@abe.ai\",\n \"created_on\": \"1568396224587\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n }\n]" } ] }, @@ -5080,7 +5028,7 @@ } ], "cookie": [], - "body": "[\n {\n \"id\": \"e517e311-fb37-4ca9-be4f-ff821ff9767d\",\n \"username\": \"user5\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": null,\n \"group_request\": null,\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt@gmail.com\",\n \"created_on\": \"1568395971209\",\n \"last_login\": {\n \"date\": 1568416018554,\n \"ip\": \"127.0.0.1\"\n },\n \"user_data\": {\n \"activeAccountID\": \"09A75A84-A921-4F68-8FEF-B8392E3702C2\",\n \"activeAgentID\": \"3C49E289-31F0-47D3-922E-D67ECD027B50\",\n \"currentCuiConfigID\": \"41415261-9498-4387-BC87-9ED443E5CE1A\",\n \"agentSlug\": \"MercMoney\"\n },\n \"eprofile\": null\n },\n {\n \"id\": \"4d8f1190-5c7b-4dec-b766-be4a24a5df6c\",\n \"username\": \"user7\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt4@gmail.com\",\n \"created_on\": \"1568396383891\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n },\n {\n \"id\": \"234d53a1-8b0b-4c7f-b98f-41138c41bc35\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": null,\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt2@gmail.com\",\n \"created_on\": \"1568396224587\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n }\n]" + "body": "[\n {\n \"id\": \"e517e311-fb37-4ca9-be4f-ff821ff9767d\",\n \"username\": \"user5\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": null,\n \"group_request\": null,\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt@abe.ai\",\n \"created_on\": \"1568395971209\",\n \"last_login\": {\n \"date\": 1568416018554,\n \"ip\": \"127.0.0.1\"\n },\n \"user_data\": {\n \"activeAccountID\": \"09A75A84-A921-4F68-8FEF-B8392E3702C2\",\n \"activeAgentID\": \"3C49E289-31F0-47D3-922E-D67ECD027B50\",\n \"currentCuiConfigID\": \"41415261-9498-4387-BC87-9ED443E5CE1A\",\n \"agentSlug\": \"MercMoney\"\n },\n \"eprofile\": null\n },\n {\n \"id\": \"4d8f1190-5c7b-4dec-b766-be4a24a5df6c\",\n \"username\": \"user7\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt4@abe.ai\",\n \"created_on\": \"1568396383891\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n },\n {\n \"id\": \"234d53a1-8b0b-4c7f-b98f-41138c41bc35\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": null,\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt2@abe.ai\",\n \"created_on\": \"1568396224587\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n }\n]" } ] }, @@ -5168,7 +5116,7 @@ } ], "cookie": [], - "body": "[\n {\n \"id\": \"5f7c8f01-83b4-44a1-9318-91cc8d12d2f0\",\n \"username\": \"user9\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"1ac1756c-3ead-4821-8a97-3af516dcaaf3\",\n \"email\": \"jt9@gmail.com\",\n \"created_on\": \"1568412135673\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n },\n {\n \"id\": \"f93474bc-8dc3-48bd-acf7-842e30ad2708\",\n \"username\": \"user39\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"7ec8c351-7b8a-4ea8-95cc-0d990b225768\",\n \"email\": \"jt94@gmail.com\",\n \"created_on\": \"1568416015887\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n },\n {\n \"id\": \"e517e311-fb37-4ca9-be4f-ff821ff9767d\",\n \"username\": \"user5\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": null,\n \"group_request\": null,\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt@gmail.com\",\n \"created_on\": \"1568395971209\",\n \"last_login\": {\n \"date\": 1568416018554,\n \"ip\": \"127.0.0.1\"\n },\n \"user_data\": {\n \"activeAccountID\": \"09A75A84-A921-4F68-8FEF-B8392E3702C2\",\n \"activeAgentID\": \"3C49E289-31F0-47D3-922E-D67ECD027B50\",\n \"currentCuiConfigID\": \"41415261-9498-4387-BC87-9ED443E5CE1A\",\n \"agentSlug\": \"MercMoney\"\n },\n \"eprofile\": null\n },\n {\n \"id\": \"4d8f1190-5c7b-4dec-b766-be4a24a5df6c\",\n \"username\": \"user7\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt4@gmail.com\",\n \"created_on\": \"1568396383891\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n },\n {\n \"id\": \"234d53a1-8b0b-4c7f-b98f-41138c41bc35\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": null,\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt2@gmail.com\",\n \"created_on\": \"1568396224587\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n }\n]" + "body": "[\n {\n \"id\": \"5f7c8f01-83b4-44a1-9318-91cc8d12d2f0\",\n \"username\": \"user9\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"1ac1756c-3ead-4821-8a97-3af516dcaaf3\",\n \"email\": \"jt9@abe.ai\",\n \"created_on\": \"1568412135673\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n },\n {\n \"id\": \"f93474bc-8dc3-48bd-acf7-842e30ad2708\",\n \"username\": \"user39\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"7ec8c351-7b8a-4ea8-95cc-0d990b225768\",\n \"email\": \"jt94@abe.ai\",\n \"created_on\": \"1568416015887\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n },\n {\n \"id\": \"e517e311-fb37-4ca9-be4f-ff821ff9767d\",\n \"username\": \"user5\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": null,\n \"group_request\": null,\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt@abe.ai\",\n \"created_on\": \"1568395971209\",\n \"last_login\": {\n \"date\": 1568416018554,\n \"ip\": \"127.0.0.1\"\n },\n \"user_data\": {\n \"activeAccountID\": \"09A75A84-A921-4F68-8FEF-B8392E3702C2\",\n \"activeAgentID\": \"3C49E289-31F0-47D3-922E-D67ECD027B50\",\n \"currentCuiConfigID\": \"41415261-9498-4387-BC87-9ED443E5CE1A\",\n \"agentSlug\": \"MercMoney\"\n },\n \"eprofile\": null\n },\n {\n \"id\": \"4d8f1190-5c7b-4dec-b766-be4a24a5df6c\",\n \"username\": \"user7\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt4@abe.ai\",\n \"created_on\": \"1568396383891\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n },\n {\n \"id\": \"234d53a1-8b0b-4c7f-b98f-41138c41bc35\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": null,\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt2@abe.ai\",\n \"created_on\": \"1568396224587\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n }\n]" } ] } @@ -5669,7 +5617,7 @@ } ], "cookie": [], - "body": "{\n \"id\": \"bda05e2c-a8de-464e-949c-656e527c374c\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"email\": \"jt6@gmail.com\",\n \"created_on\": \"1568648238097\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"name\": \"group9\",\n \"type\": \"accounts\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": true\n }\n}" + "body": "{\n \"id\": \"bda05e2c-a8de-464e-949c-656e527c374c\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"email\": \"jt6@abe.ai\",\n \"created_on\": \"1568648238097\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"name\": \"group9\",\n \"type\": \"accounts\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": true\n }\n}" } ] }, @@ -6560,7 +6508,7 @@ } ], "cookie": [], - "body": "{\n \"id\": \"bda05e2c-a8de-464e-949c-656e527c374c\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"email\": \"jt6@gmail.com\",\n \"created_on\": \"1568648238097\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"name\": \"group9\",\n \"type\": \"accounts\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": true\n }\n}" + "body": "{\n \"id\": \"bda05e2c-a8de-464e-949c-656e527c374c\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"email\": \"jt6@abe.ai\",\n \"created_on\": \"1568648238097\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"name\": \"group9\",\n \"type\": \"accounts\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": true\n }\n}" } ] }, @@ -6683,7 +6631,7 @@ } ], "cookie": [], - "body": "{\n \"id\": \"bda05e2c-a8de-464e-949c-656e527c374c\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"email\": \"jt6@gmail.com\",\n \"created_on\": \"1568648238097\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"name\": \"group9\",\n \"type\": \"accounts\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": true\n }\n}" + "body": "{\n \"id\": \"bda05e2c-a8de-464e-949c-656e527c374c\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"email\": \"jt6@abe.ai\",\n \"created_on\": \"1568648238097\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"name\": \"group9\",\n \"type\": \"accounts\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": true\n }\n}" } ] }, @@ -6825,7 +6773,7 @@ } ], "cookie": [], - "body": "{\n \"id\": \"bda05e2c-a8de-464e-949c-656e527c374c\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"email\": \"jt6@gmail.com\",\n \"created_on\": \"1568648238097\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"name\": \"group9\",\n \"type\": \"accounts\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": true\n }\n}" + "body": "{\n \"id\": \"bda05e2c-a8de-464e-949c-656e527c374c\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"email\": \"jt6@abe.ai\",\n \"created_on\": \"1568648238097\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"name\": \"group9\",\n \"type\": \"accounts\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": true\n }\n}" } ] }, @@ -6973,7 +6921,7 @@ } ], "cookie": [], - "body": "{\n \"id\": \"bda05e2c-a8de-464e-949c-656e527c374c\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"email\": \"jt6@gmail.com\",\n \"created_on\": \"1568648238097\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"name\": \"group9\",\n \"type\": \"accounts\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": true\n }\n}" + "body": "{\n \"id\": \"bda05e2c-a8de-464e-949c-656e527c374c\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"email\": \"jt6@abe.ai\",\n \"created_on\": \"1568648238097\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"name\": \"group9\",\n \"type\": \"accounts\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": true\n }\n}" } ] }, @@ -7291,7 +7239,7 @@ } ], "cookie": [], - "body": "{\n \"id\": \"bda05e2c-a8de-464e-949c-656e527c374c\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"email\": \"jt6@gmail.com\",\n \"created_on\": \"1568648238097\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"name\": \"group9\",\n \"type\": \"accounts\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": true\n }\n}" + "body": "{\n \"id\": \"bda05e2c-a8de-464e-949c-656e527c374c\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"email\": \"jt6@abe.ai\",\n \"created_on\": \"1568648238097\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"name\": \"group9\",\n \"type\": \"accounts\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": true\n }\n}" } ] } @@ -7416,7 +7364,7 @@ } ], "cookie": [], - "body": "[\n {\n \"id\": \"e517e311-fb37-4ca9-be4f-ff821ff9767d\",\n \"username\": \"user5\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": null,\n \"group_request\": null,\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt@gmail.com\",\n \"created_on\": \"1568395971209\",\n \"last_login\": {\n \"date\": 1568416018554,\n \"ip\": \"127.0.0.1\"\n },\n \"user_data\": {\n \"activeAccountID\": \"09A75A84-A921-4F68-8FEF-B8392E3702C2\",\n \"activeAgentID\": \"3C49E289-31F0-47D3-922E-D67ECD027B50\",\n \"currentCuiConfigID\": \"41415261-9498-4387-BC87-9ED443E5CE1A\",\n \"agentSlug\": \"MercMoney\"\n },\n \"eprofile\": null\n },\n {\n \"id\": \"4d8f1190-5c7b-4dec-b766-be4a24a5df6c\",\n \"username\": \"user7\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt4@gmail.com\",\n \"created_on\": \"1568396383891\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n },\n {\n \"id\": \"234d53a1-8b0b-4c7f-b98f-41138c41bc35\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": null,\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt2@gmail.com\",\n \"created_on\": \"1568396224587\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n }\n]" + "body": "[\n {\n \"id\": \"e517e311-fb37-4ca9-be4f-ff821ff9767d\",\n \"username\": \"user5\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": null,\n \"group_request\": null,\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt@abe.ai\",\n \"created_on\": \"1568395971209\",\n \"last_login\": {\n \"date\": 1568416018554,\n \"ip\": \"127.0.0.1\"\n },\n \"user_data\": {\n \"activeAccountID\": \"09A75A84-A921-4F68-8FEF-B8392E3702C2\",\n \"activeAgentID\": \"3C49E289-31F0-47D3-922E-D67ECD027B50\",\n \"currentCuiConfigID\": \"41415261-9498-4387-BC87-9ED443E5CE1A\",\n \"agentSlug\": \"MercMoney\"\n },\n \"eprofile\": null\n },\n {\n \"id\": \"4d8f1190-5c7b-4dec-b766-be4a24a5df6c\",\n \"username\": \"user7\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt4@abe.ai\",\n \"created_on\": \"1568396383891\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n },\n {\n \"id\": \"234d53a1-8b0b-4c7f-b98f-41138c41bc35\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": null,\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt2@abe.ai\",\n \"created_on\": \"1568396224587\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n }\n]" } ] }, @@ -7525,7 +7473,7 @@ } ], "cookie": [], - "body": "[\n {\n \"id\": \"e517e311-fb37-4ca9-be4f-ff821ff9767d\",\n \"username\": \"user5\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": null,\n \"group_request\": null,\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt@gmail.com\",\n \"created_on\": \"1568395971209\",\n \"last_login\": {\n \"date\": 1568416018554,\n \"ip\": \"127.0.0.1\"\n },\n \"user_data\": {\n \"activeAccountID\": \"09A75A84-A921-4F68-8FEF-B8392E3702C2\",\n \"activeAgentID\": \"3C49E289-31F0-47D3-922E-D67ECD027B50\",\n \"currentCuiConfigID\": \"41415261-9498-4387-BC87-9ED443E5CE1A\",\n \"agentSlug\": \"MercMoney\"\n },\n \"eprofile\": null\n },\n {\n \"id\": \"4d8f1190-5c7b-4dec-b766-be4a24a5df6c\",\n \"username\": \"user7\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt4@gmail.com\",\n \"created_on\": \"1568396383891\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n },\n {\n \"id\": \"234d53a1-8b0b-4c7f-b98f-41138c41bc35\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": null,\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt2@gmail.com\",\n \"created_on\": \"1568396224587\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n }\n]" + "body": "[\n {\n \"id\": \"e517e311-fb37-4ca9-be4f-ff821ff9767d\",\n \"username\": \"user5\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": null,\n \"group_request\": null,\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt@abe.ai\",\n \"created_on\": \"1568395971209\",\n \"last_login\": {\n \"date\": 1568416018554,\n \"ip\": \"127.0.0.1\"\n },\n \"user_data\": {\n \"activeAccountID\": \"09A75A84-A921-4F68-8FEF-B8392E3702C2\",\n \"activeAgentID\": \"3C49E289-31F0-47D3-922E-D67ECD027B50\",\n \"currentCuiConfigID\": \"41415261-9498-4387-BC87-9ED443E5CE1A\",\n \"agentSlug\": \"MercMoney\"\n },\n \"eprofile\": null\n },\n {\n \"id\": \"4d8f1190-5c7b-4dec-b766-be4a24a5df6c\",\n \"username\": \"user7\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt4@abe.ai\",\n \"created_on\": \"1568396383891\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n },\n {\n \"id\": \"234d53a1-8b0b-4c7f-b98f-41138c41bc35\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": null,\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt2@abe.ai\",\n \"created_on\": \"1568396224587\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n }\n]" } ] }, @@ -7607,7 +7555,7 @@ } ], "cookie": [], - "body": "[\n {\n \"id\": \"5f7c8f01-83b4-44a1-9318-91cc8d12d2f0\",\n \"username\": \"user9\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"1ac1756c-3ead-4821-8a97-3af516dcaaf3\",\n \"email\": \"jt9@gmail.com\",\n \"created_on\": \"1568412135673\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n },\n {\n \"id\": \"f93474bc-8dc3-48bd-acf7-842e30ad2708\",\n \"username\": \"user39\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"7ec8c351-7b8a-4ea8-95cc-0d990b225768\",\n \"email\": \"jt94@gmail.com\",\n \"created_on\": \"1568416015887\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n },\n {\n \"id\": \"e517e311-fb37-4ca9-be4f-ff821ff9767d\",\n \"username\": \"user5\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": null,\n \"group_request\": null,\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt@gmail.com\",\n \"created_on\": \"1568395971209\",\n \"last_login\": {\n \"date\": 1568416018554,\n \"ip\": \"127.0.0.1\"\n },\n \"user_data\": {\n \"activeAccountID\": \"09A75A84-A921-4F68-8FEF-B8392E3702C2\",\n \"activeAgentID\": \"3C49E289-31F0-47D3-922E-D67ECD027B50\",\n \"currentCuiConfigID\": \"41415261-9498-4387-BC87-9ED443E5CE1A\",\n \"agentSlug\": \"MercMoney\"\n },\n \"eprofile\": null\n },\n {\n \"id\": \"4d8f1190-5c7b-4dec-b766-be4a24a5df6c\",\n \"username\": \"user7\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt4@gmail.com\",\n \"created_on\": \"1568396383891\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n },\n {\n \"id\": \"234d53a1-8b0b-4c7f-b98f-41138c41bc35\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": null,\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt2@gmail.com\",\n \"created_on\": \"1568396224587\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n }\n]" + "body": "[\n {\n \"id\": \"5f7c8f01-83b4-44a1-9318-91cc8d12d2f0\",\n \"username\": \"user9\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"1ac1756c-3ead-4821-8a97-3af516dcaaf3\",\n \"email\": \"jt9@abe.ai\",\n \"created_on\": \"1568412135673\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n },\n {\n \"id\": \"f93474bc-8dc3-48bd-acf7-842e30ad2708\",\n \"username\": \"user39\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"7ec8c351-7b8a-4ea8-95cc-0d990b225768\",\n \"email\": \"jt94@abe.ai\",\n \"created_on\": \"1568416015887\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n },\n {\n \"id\": \"e517e311-fb37-4ca9-be4f-ff821ff9767d\",\n \"username\": \"user5\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": false,\n \"locked_reason\": null,\n \"group_request\": null,\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt@abe.ai\",\n \"created_on\": \"1568395971209\",\n \"last_login\": {\n \"date\": 1568416018554,\n \"ip\": \"127.0.0.1\"\n },\n \"user_data\": {\n \"activeAccountID\": \"09A75A84-A921-4F68-8FEF-B8392E3702C2\",\n \"activeAgentID\": \"3C49E289-31F0-47D3-922E-D67ECD027B50\",\n \"currentCuiConfigID\": \"41415261-9498-4387-BC87-9ED443E5CE1A\",\n \"agentSlug\": \"MercMoney\"\n },\n \"eprofile\": null\n },\n {\n \"id\": \"4d8f1190-5c7b-4dec-b766-be4a24a5df6c\",\n \"username\": \"user7\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt4@abe.ai\",\n \"created_on\": \"1568396383891\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n },\n {\n \"id\": \"234d53a1-8b0b-4c7f-b98f-41138c41bc35\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": null,\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6172b28b-7455-4f9e-bf63-9e7a05107133\",\n \"email\": \"jt2@abe.ai\",\n \"created_on\": \"1568396224587\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null\n }\n]" } ] } @@ -7849,7 +7797,7 @@ } ], "cookie": [], - "body": "{\n \"id\": \"bda05e2c-a8de-464e-949c-656e527c374c\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"email\": \"jt6@gmail.com\",\n \"created_on\": \"1568648238097\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"name\": \"group9\",\n \"type\": \"accounts\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": true\n }\n}" + "body": "{\n \"id\": \"bda05e2c-a8de-464e-949c-656e527c374c\",\n \"username\": \"user6\",\n \"password\": \"17c24abfa17fda309c844062bc23b1cbf7af96cc0bd1c399800fc23be18a86f8\",\n \"avatar\": null,\n \"locked\": true,\n \"locked_reason\": \"Activation Required, email your admin to get your account activated\",\n \"group_request\": \"superadmin\",\n \"failed_login_attempts\": 0,\n \"change_username\": false,\n \"change_password\": false,\n \"reset_password\": false,\n \"email_verify\": false,\n \"group_id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"email\": \"jt6@abe.ai\",\n \"created_on\": \"1568648238097\",\n \"last_login\": null,\n \"user_data\": null,\n \"eprofile\": null,\n \"group\": {\n \"id\": \"6b88967a-1b9e-41ae-8140-9cc3969c3345\",\n \"name\": \"group9\",\n \"type\": \"accounts\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": true\n }\n}" } ] }, @@ -8888,7 +8836,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"group\": {\n \"anonymous\": {\n \"type\": \"group\",\n \"allowed\": [\n {\n \"route\": \"/travelling/portal/*\",\n \"host\": null,\n \"name\": \"*-travelling-portal-*\"\n },\n {\n \"route\": \"/travelling/api/v1/auth/*\",\n \"host\": null,\n \"name\": \"*-travelling-api-v1-auth-*\"\n },\n {\n \"route\": \"/travelling/api/v1/user/me/route/allowed\",\n \"host\": null,\n \"method\": \"GET\",\n \"name\": \"get-travelling-api-v1-user-me-route-allowed\"\n },\n {\n \"route\": \"/travelling/api/v1/user/me/permission/allowed/*\",\n \"host\": null,\n \"method\": \"GET\",\n \"name\": \"get-travelling-api-v1-user-me-permission-allowed-*\"\n },\n {\n \"route\": \"/travelling/assets/*\",\n \"host\": null,\n \"removeFromPath\": \"/travelling/assets/\",\n \"method\": \"GET\",\n \"name\": \"get-travelling-assets-*\"\n },\n {\n \"route\": \"/travelling/api/v1/config/password\",\n \"host\": null,\n \"method\": \"GET\",\n \"name\": \"get-travelling-api-v1-config-password\"\n },\n {\n \"route\": \"/favicon.ico\",\n \"host\": null,\n \"method\": \"GET\",\n \"name\": \"get-favicon.ico\"\n }\n ],\n \"inherited\": null,\n \"is_default\": false\n },\n \"group3\": {\n \"type\": \"group\",\n \"allowed\": null,\n \"inherited\": [\n \"testgroup|group1\",\n \"group|group2\"\n ],\n \"is_default\": false\n },\n \"superadmin\": {\n \"type\": \"group\",\n \"allowed\": [\n {\n \"host\": null,\n \"route\": \"/travelling/*\",\n \"name\": \"*-travelling-*\"\n },\n {\n \"name\": \"test-one-*-three\"\n }\n ],\n \"inherited\": [\n \"group|anonymous\"\n ],\n \"is_default\": false\n },\n \"group4\": {\n \"type\": \"group\",\n \"allowed\": null,\n \"inherited\": [],\n \"is_default\": false\n },\n \"group2\": {\n \"type\": \"group\",\n \"allowed\": [\n {\n \"route\": \"/test/get\",\n \"host\": \"https://127.0.0.1:4268/:username/:group\",\n \"removeFromPath\": \"/test/get\",\n \"method\": \"GET\",\n \"name\": \"get-test-get\"\n },\n {\n \"route\": \"/test/post\",\n \"host\": \"http://127.0.0.1:4267/?id=:id&permission=:permission\",\n \"removeFromPath\": \"/test/post\",\n \"method\": \"POST\",\n \"name\": \"post-test-post\"\n }\n ],\n \"inherited\": [\n \"testgroup|group1\"\n ],\n \"is_default\": false\n },\n \"group5\": {\n \"type\": \"group\",\n \"allowed\": [\n {\n \"route\": \"/test/delete/:grouptype\",\n \"host\": \"https://127.0.0.1:4268\",\n \"removeFromPath\": \"/test/delete\",\n \"method\": \"DELETE\",\n \"name\": \"delete-test-delete-:grouptype\"\n }\n ],\n \"inherited\": [\n \"group|group4\",\n \"group|superadmin\"\n ],\n \"is_default\": true\n },\n \"group1\": {\n \"type\": \"group\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": false\n }\n },\n \"testgroup\": {\n \"group1\": {\n \"type\": \"testgroup\",\n \"allowed\": null,\n \"inherited\": [\n \"group|group4\"\n ],\n \"is_default\": false\n },\n \"superadmin\": {\n \"type\": \"testgroup\",\n \"allowed\": null,\n \"inherited\": null,\n \"is_default\": false\n }\n }\n}", + "raw": "{\n \"group\": {\n \"anonymous\": {\n \"allowed\": [\n {\"method\": \"GET\", \"route\": \"/account/portal/*\"},\n {\"method\": \"GET\", \"route\": \"/account/assets/*\"},\n {\"method\": \"GET\", \"route\": \"/favicon.ico\"},\n {\"method\": \"GET\", \"route\": \"/account/api/v1/auth/logout\"},\n {\"method\": \"PUT\", \"route\": \"/account/api/v1/auth/password/forgot\"},\n {\"method\": \"PUT\", \"route\": \"/account/api/v1/auth/password/reset\"},\n {\"method\": \"GET\", \"route\": \"/account/api/v1/auth/activate\"},\n {\"method\": \"POST\", \"route\": \"/account/api/v1/auth/token\"},\n {\"method\": \"GET\", \"route\": \"/account/api/v1/auth/login/otp\"},\n {\"method\": \"POST\",\"route\":\"/account/api/v1/auth/oauth/authorize\"},\n {\"method\": \"GET\",\"route\":\"/account/api/v1/auth/oauth/authorize\"},\n {\"method\": \"GET\", \"route\": \"/account/api/v1/user/me/permission/allowed/*\"},\n {\"method\": \"GET\", \"route\": \"/account/api/v1/user/me/route/allowed\"},\n {\"method\": \"GET\", \"route\": \"/account/api/v1/config/password\"},\n {\"method\": \"GET\", \"route\": \"/account/api/v1/config/portal/webclient\"},\n {\"method\": \"GET\", \"route\": \"/account/metrics\"},\n {\"method\": \"GET\", \"route\": \"/account/health\"}\n ]\n }\n }\n}\n", "options": { "raw": { "language": "json" diff --git a/sdk/node/index.js b/sdk/node/index.js index ea69a6f9..e5fd9234 100644 --- a/sdk/node/index.js +++ b/sdk/node/index.js @@ -865,151 +865,31 @@ function SDK(host, opts) { * body * ```json * { - * "group": { - * "anonymous": { - * "type": "group", - * "allowed": [ - * { - * "route": "/travelling/portal/*", - * "host": null, - * "name": "*-travelling-portal-*" - * }, - * { - * "route": "/travelling/api/v1/auth/*", - * "host": null, - * "name": "*-travelling-api-v1-auth-*" - * }, - * { - * "route": "/travelling/api/v1/user/me/route/allowed", - * "host": null, - * "method": "GET", - * "name": "get-travelling-api-v1-user-me-route-allowed" - * }, - * { - * "route": "/travelling/api/v1/user/me/permission/allowed/*", - * "host": null, - * "method": "GET", - * "name": "get-travelling-api-v1-user-me-permission-allowed-*" - * }, - * { - * "route": "/travelling/assets/*", - * "host": null, - * "removeFromPath": "/travelling/assets/", - * "method": "GET", - * "name": "get-travelling-assets-*" - * }, - * { - * "route": "/travelling/api/v1/config/password", - * "host": null, - * "method": "GET", - * "name": "get-travelling-api-v1-config-password" - * }, - * { - * "route": "/favicon.ico", - * "host": null, - * "method": "GET", - * "name": "get-favicon.ico" - * } - * ], - * "inherited": null, - * "is_default": false - * }, - * "group3": { - * "type": "group", - * "allowed": null, - * "inherited": [ - * "testgroup|group1", - * "group|group2" - * ], - * "is_default": false - * }, - * "superadmin": { - * "type": "group", - * "allowed": [ - * { - * "host": null, - * "route": "/travelling/*", - * "name": "*-travelling-*" - * }, - * { - * "name": "test-one-*-three" - * } - * ], - * "inherited": [ - * "group|anonymous" - * ], - * "is_default": false - * }, - * "group4": { - * "type": "group", - * "allowed": null, - * "inherited": [], - * "is_default": false - * }, - * "group2": { - * "type": "group", - * "allowed": [ - * { - * "route": "/test/get", - * "host": "https://127.0.0.1:4268/:username/:group", - * "removeFromPath": "/test/get", - * "method": "GET", - * "name": "get-test-get" - * }, - * { - * "route": "/test/post", - * "host": "http://127.0.0.1:4267/?id=:id&permission=:permission", - * "removeFromPath": "/test/post", - * "method": "POST", - * "name": "post-test-post" - * } - * ], - * "inherited": [ - * "testgroup|group1" - * ], - * "is_default": false - * }, - * "group5": { - * "type": "group", - * "allowed": [ - * { - * "route": "/test/delete/:grouptype", - * "host": "https://127.0.0.1:4268", - * "removeFromPath": "/test/delete", - * "method": "DELETE", - * "name": "delete-test-delete-:grouptype" - * } - * ], - * "inherited": [ - * "group|group4", - * "group|superadmin" - * ], - * "is_default": true - * }, - * "group1": { - * "type": "group", - * "allowed": null, - * "inherited": null, - * "is_default": false - * } - * }, - * "testgroup": { - * "group1": { - * "type": "testgroup", - * "allowed": null, - * "inherited": [ - * "group|group4" - * ], - * "is_default": false - * }, - * "superadmin": { - * "type": "testgroup", - * "allowed": null, - * "inherited": null, - * "is_default": false - * } + * "group": { + * "anonymous": { + * "allowed": [ + * {"method": "GET", "route": "/account/portal/*"}, + * {"method": "GET", "route": "/account/assets/*"}, + * {"method": "GET", "route": "/favicon.ico"}, + * {"method": "GET", "route": "/account/api/v1/auth/logout"}, + * {"method": "PUT", "route": "/account/api/v1/auth/password/forgot"}, + * {"method": "PUT", "route": "/account/api/v1/auth/password/reset"}, + * {"method": "GET", "route": "/account/api/v1/auth/activate"}, + * {"method": "POST", "route": "/account/api/v1/auth/token"}, + * {"method": "GET", "route": "/account/api/v1/auth/login/otp"}, + * {"method": "POST","route":"/account/api/v1/auth/oauth/authorize"}, + * {"method": "GET","route":"/account/api/v1/auth/oauth/authorize"}, + * {"method": "GET", "route": "/account/api/v1/user/me/permission/allowed/*"}, + * {"method": "GET", "route": "/account/api/v1/user/me/route/allowed"}, + * {"method": "GET", "route": "/account/api/v1/config/password"}, + * {"method": "GET", "route": "/account/api/v1/config/portal/webclient"}, + * {"method": "GET", "route": "/account/metrics"}, + * {"method": "GET", "route": "/account/health"} + * ] * } + * } * } + * * ``` */ static async import(body, authorization_bearer, opts) { @@ -3290,6 +3170,7 @@ function SDK(host, opts) { * @param {any} filter Filter parameters (example: locked=false,created_on>2021-06-03,created_on<2021-06-06) (example: locked=false,created_on>2021-06-03,created_on<2021-06-06) * @param {any} sortdir Sort direction (example ascending order: ASC) (example: ASC) * @param {any} ids Comma seperated id values used in inclusion query (example: d0323874-9b24-4bc5-ae38-fb8808c4e453,08c4c17f-317b-4be8-bfbd-451a274a3f7f) + * @param {any} params (example: id) * @param {string} authorization_bearer The client_credentials generated OAUth2 access token. */ static async get( @@ -3299,6 +3180,7 @@ function SDK(host, opts) { filter, sortdir, ids, + params, authorization_bearer, opts ) { @@ -3306,7 +3188,7 @@ function SDK(host, opts) { method: 'GET', simple: false, uri: hostUrl + '/' + `api/v1/users`, - qs: { sort, limit, skip, filter, sortdir, ids }, + qs: { sort, limit, skip, filter, sortdir, ids, params }, authorization: { bearer: authorization_bearer, }, @@ -3430,6 +3312,7 @@ function SDK(host, opts) { * @param {any} filter Filter parameters (example: locked=false,created_on>2021-06-03,created_on<2021-06-06) (example: created_on>2021-06-01,created_on<2021-06-08) * @param {any} sortdir Sort direction (example ascending order: ASC) (example: ASC) * @param {any} ids Comma seperated id values used in inclusion query (example: d0323874-9b24-4bc5-ae38-fb8808c4e453,08c4c17f-317b-4be8-bfbd-451a274a3f7f) + * @param {any} params (example: id,created_on) * @param {string} authorization_bearer The client_credentials generated OAUth2 access token. */ static async get( @@ -3440,6 +3323,7 @@ function SDK(host, opts) { filter, sortdir, ids, + params, authorization_bearer, opts ) { @@ -3447,7 +3331,7 @@ function SDK(host, opts) { method: 'GET', simple: false, uri: hostUrl + '/' + `api/v1/users/domain/${domain}`, - qs: { sort, limit, skip, filter, sortdir, ids }, + qs: { sort, limit, skip, filter, sortdir, ids, params }, authorization: { bearer: authorization_bearer, }, @@ -5226,15 +5110,15 @@ function SDK(host, opts) { * * Path: api/v1/auth/register/domain/:domain * @param {Object} body - * @param {any} domain Domain name (example: test.com) (example: traziventures.com) + * @param {any} domain Domain name (example: test.com) (example: contactsource.com) * @param {any} randomPassword Generates a random password on the backend securely if set to `true` (example: true) * @param {string} authorization_bearer The client_credentials generated OAUth2 access token. * @example * body * ```json * { - * "email": "test@test.com", - * "password": "Pas5w0r!d" + * "email": "mark+test@trazi.com", + * "password": "Trazi123**" * } * ``` */ diff --git a/sdk/package.json b/sdk/package.json index f4cd2c62..dbc898bb 100644 --- a/sdk/package.json +++ b/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@trazi/travelling-sdk", - "version": "2.15.1", + "version": "2.15.4", "description": "", "main": "node/index.js", "files": [ diff --git a/sdk/web/index.mjs b/sdk/web/index.mjs index 9063a621..b7f7ab26 100644 --- a/sdk/web/index.mjs +++ b/sdk/web/index.mjs @@ -1,8 +1,8 @@ 'use strict'; -function hasOwnProperty(e, t) { +function hasOwnProperty$1(e, t) { return Object.prototype.hasOwnProperty.call(e, t); } -var isArray = +var isArray$2 = Array.isArray || function (e) { return '[object Array]' === Object.prototype.toString.call(e); @@ -25,10 +25,10 @@ function stringify(e, t, n, r) { (n = n || '='), null === e && (e = void 0), 'object' == typeof e - ? map(objectKeys(e), function (r) { + ? map$1(objectKeys(e), function (r) { var o = encodeURIComponent(stringifyPrimitive(r)) + n; - return isArray(e[r]) - ? map(e[r], function (e) { + return isArray$2(e[r]) + ? map$1(e[r], function (e) { return o + encodeURIComponent(stringifyPrimitive(e)); }).join(t) : o + encodeURIComponent(stringifyPrimitive(e[r])); @@ -40,7 +40,7 @@ function stringify(e, t, n, r) { : '' ); } -function map(e, t) { +function map$1(e, t) { if (e.map) return e.map(t); for (var n = [], r = 0; r < e.length; r++) n.push(t(e[r], r)); return n; @@ -52,40 +52,41 @@ var objectKeys = for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.push(n); return t; }; -function parse(e, t, n, r) { +function parse$1(e, t, n, r) { (t = t || '&'), (n = n || '='); var o = {}; if ('string' != typeof e || 0 === e.length) return o; + var a = /\+/g; e = e.split(t); - var a = 1e3; - r && 'number' == typeof r.maxKeys && (a = r.maxKeys); - var s = e.length; - 0 < a && s > a && (s = a); - for (var d = 0; d < s; ++d) { - var l, - h, + var s = 1e3; + r && 'number' == typeof r.maxKeys && (s = r.maxKeys); + var d = e.length; + 0 < s && d > s && (d = s); + for (var l = 0; l < d; ++l) { + var h, p, u, - f = e[d].replace(/\+/g, '%20'), - c = f.indexOf(n); - 0 <= c - ? ((l = f.substr(0, c)), (h = f.substr(c + 1))) - : ((l = f), (h = '')), - (p = decodeURIComponent(l)), + f, + c = e[l].replace(a, '%20'), + g = c.indexOf(n); + 0 <= g + ? ((h = c.substr(0, g)), (p = c.substr(g + 1))) + : ((h = c), (p = '')), (u = decodeURIComponent(h)), - hasOwnProperty(o, p) - ? isArray(o[p]) - ? o[p].push(u) - : (o[p] = [o[p], u]) - : (o[p] = u); + (f = decodeURIComponent(p)), + hasOwnProperty$1(o, u) + ? isArray$2(o[u]) + ? o[u].push(f) + : (o[u] = [o[u], f]) + : (o[u] = f); } return o; } var qs = { encode: stringify, stringify: stringify, - decode: parse, - parse: parse, + decode: parse$1, + parse: parse$1, }, maxInt = 2147483647, base = 36, @@ -109,7 +110,7 @@ var qs = { function error(e) { throw new RangeError(errors[e]); } -function map$1(e, t) { +function map(e, t) { for (var n = e.length, r = []; n--; ) r[n] = t(e[n]); return r; } @@ -119,7 +120,7 @@ function mapDomain(e, t) { 1 < n.length && ((r = n[0] + '@'), (e = n[1])), (e = e.replace(regexSeparators, '.')); var o = e.split('.'), - a = map$1(o, t).join('.'); + a = map(o, t).join('.'); return r + a; } function ucs2decode(e) { @@ -349,9 +350,9 @@ function write(t, n, r, o, a, l) { w = 8 * l - a - 1, R = (1 << w) - 1, v = R >> 1, - x = 23 === a ? g(2, -24) - g(2, -77) : 0, - E = o ? 0 : l - 1, - L = o ? 1 : -1, + S = 23 === a ? g(2, -24) - g(2, -77) : 0, + L = o ? 0 : l - 1, + x = o ? 1 : -1, d = 0 > n || (0 === n && 0 > 1 / n) ? 1 : 0; for ( n = f(n), @@ -359,7 +360,7 @@ function write(t, n, r, o, a, l) { ? ((b = isNaN(n) ? 1 : 0), (y = R)) : ((y = h(u(n) / p)), 1 > n * (_ = g(2, -y)) && (y--, (_ *= 2)), - (n += 1 <= y + v ? x / _ : x * g(2, 1 - v)), + (n += 1 <= y + v ? S / _ : S * g(2, 1 - v)), 2 <= n * _ && (y++, (_ /= 2)), y + v >= R ? ((b = 0), (y = R)) @@ -367,14 +368,14 @@ function write(t, n, r, o, a, l) { ? ((b = (n * _ - 1) * g(2, a)), (y += v)) : ((b = n * g(2, v - 1) * g(2, a)), (y = 0))); 8 <= a; - t[r + E] = 255 & b, E += L, b /= 256, a -= 8 + t[r + L] = 255 & b, L += x, b /= 256, a -= 8 ); for ( y = (y << a) | b, w += a; 0 < w; - t[r + E] = 255 & y, E += L, y /= 256, w -= 8 + t[r + L] = 255 & y, L += x, y /= 256, w -= 8 ); - t[r + E - L] |= 128 * d; + t[r + L - x] |= 128 * d; } var toString = {}.toString, isArray$1 = @@ -383,8 +384,9 @@ var toString = {}.toString, return '[object Array]' == toString.call(e); }, INSPECT_MAX_BYTES = 50; -Buffer$1.TYPED_ARRAY_SUPPORT = - !(global$1.TYPED_ARRAY_SUPPORT !== void 0) || global$1.TYPED_ARRAY_SUPPORT; +(Buffer$1.TYPED_ARRAY_SUPPORT = + !(global$1.TYPED_ARRAY_SUPPORT !== void 0) || global$1.TYPED_ARRAY_SUPPORT), + kMaxLength(); function kMaxLength() { return Buffer$1.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823; } @@ -1592,7 +1594,8 @@ var inherits, release: release, config: config, uptime: uptime, - }; + }, + process = browser$1; inherits = 'function' == typeof Object.create ? function (e, t) { @@ -1615,7 +1618,7 @@ inherits = }; var inherits$1 = inherits, formatRegExp = /%[sdj%]/g; -function format(e) { +function format$1(e) { if (!isString(e)) { for (var t = [], n = 0; n < arguments.length; n++) t.push(inspect(arguments[n])); @@ -1653,8 +1656,8 @@ function format(e) { function deprecate(e, t) { function n() { if (!r) { - if (browser$1.throwDeprecation) throw new Error(t); - else browser$1.traceDeprecation ? console.trace(t) : console.error(t); + if (process.throwDeprecation) throw new Error(t); + else process.traceDeprecation ? console.trace(t) : console.error(t); r = !0; } return e.apply(this, arguments); @@ -1663,7 +1666,7 @@ function deprecate(e, t) { return function () { return deprecate(e, t).apply(this, arguments); }; - if (!0 === browser$1.noDeprecation) return e; + if (!0 === process.noDeprecation) return e; var r = !1; return n; } @@ -1671,14 +1674,14 @@ var debugEnviron, debugs = {}; function debuglog(e) { if ( - (isUndefined(debugEnviron) && - (debugEnviron = browser$1.env.NODE_DEBUG || ''), + (isUndefined(debugEnviron) && (debugEnviron = process.env.NODE_DEBUG || ''), (e = e.toUpperCase()), !debugs[e]) ) if (new RegExp('\\b' + e + '\\b', 'i').test(debugEnviron)) { + var t = 0; debugs[e] = function () { - var t = format.apply(null, arguments); + var t = format$1.apply(null, arguments); console.error('%s %d: %s', e, 0, t); }; } else debugs[e] = function () {}; @@ -1735,13 +1738,13 @@ function stylizeWithColor(e, t) { 'm' : e; } -function stylizeNoColor(e) { +function stylizeNoColor(e, t) { return e; } function arrayToHash(e) { var t = {}; return ( - e.forEach(function (e) { + e.forEach(function (e, n) { t[e] = !0; }), t @@ -1751,7 +1754,7 @@ function formatValue(e, t, r) { if ( e.customInspect && t && - isFunction(t.inspect) && + isFunction$1(t.inspect) && t.inspect !== inspect && !(t.constructor && t.constructor.prototype === t) ) { @@ -1768,7 +1771,7 @@ function formatValue(e, t, r) { ) return formatError(t); if (0 === i.length) { - if (isFunction(t)) { + if (isFunction$1(t)) { var d = t.name ? ': ' + t.name : ''; return e.stylize('[Function' + d + ']', 'special'); } @@ -1780,7 +1783,7 @@ function formatValue(e, t, r) { var l = '', h = !1, p = ['{', '}']; - if ((isArray$2(t) && ((h = !0), (p = ['[', ']'])), isFunction(t))) { + if ((isArray(t) && ((h = !0), (p = ['[', ']'])), isFunction$1(t))) { var u = t.name ? ': ' + t.name : ''; l = ' [Function' + u + ']'; } @@ -1832,7 +1835,7 @@ function formatError(e) { } function formatArray(e, t, n, r, o) { for (var a = [], s = 0, d = t.length; s < d; ++s) - hasOwnProperty$1(t, s + '') + hasOwnProperty(t, s + '') ? a.push(formatProperty(e, t, n, r, s + '', !0)) : a.push(''); return ( @@ -1851,7 +1854,7 @@ function formatProperty(e, t, n, r, o, a) { ? (s = e.stylize('[Getter/Setter]', 'special')) : (s = e.stylize('[Getter]', 'special')) : d.set && (s = e.stylize('[Setter]', 'special')), - hasOwnProperty$1(r, o) || (i = '[' + o + ']'), + hasOwnProperty(r, o) || (i = '[' + o + ']'), s || (0 > e.seen.indexOf(d.value) ? ((s = isNull(n) @@ -1898,7 +1901,7 @@ function reduceToSingleString(e, t, n) { ? n[0] + ('' === t ? '' : t + '\n ') + ' ' + e.join(',\n ') + ' ' + n[1] : n[0] + t + ' ' + e.join(', ') + ' ' + n[1]; } -function isArray$2(e) { +function isArray(e) { return Array.isArray(e); } function isBoolean(e) { @@ -1934,7 +1937,7 @@ function isError(t) { ('[object Error]' === objectToString(t) || t instanceof Error) ); } -function isFunction(e) { +function isFunction$1(e) { return 'function' == typeof e; } function objectToString(e) { @@ -1945,7 +1948,7 @@ function _extend(e, t) { for (var n = Object.keys(t), r = n.length; r--; ) e[n[r]] = t[n[r]]; return e; } -function hasOwnProperty$1(e, t) { +function hasOwnProperty(e, t) { return Object.prototype.hasOwnProperty.call(e, t); } var url = { @@ -2000,80 +2003,81 @@ function urlParse(e, t, n) { return r.parse(e, t, n), r; } Url.prototype.parse = function (e, t, n) { - return parse$1(this, e, t, n); + return parse(this, e, t, n); }; -function parse$1(e, t, n, r) { +function parse(e, t, n, r) { if (!isString(t)) throw new TypeError("Parameter 'url' must be a string, not " + typeof t); var o = t.indexOf('?'), a = -1 !== o && o < t.indexOf('#') ? '?' : '#', - d = t.split(a); - (d[0] = d[0].replace(/\\/g, '/')), (t = d.join(a)); - var u = t; - if (((u = u.trim()), !r && 1 === t.split('#').length)) { - var f = simplePathPattern.exec(u); - if (f) + d = t.split(a), + u = /\\/g; + (d[0] = d[0].replace(u, '/')), (t = d.join(a)); + var f = t; + if (((f = f.trim()), !r && 1 === t.split('#').length)) { + var c = simplePathPattern.exec(f); + if (c) return ( - (e.path = u), - (e.href = u), - (e.pathname = f[1]), - f[2] - ? ((e.search = f[2]), - (e.query = n ? parse(e.search.substr(1)) : e.search.substr(1))) + (e.path = f), + (e.href = f), + (e.pathname = c[1]), + c[2] + ? ((e.search = c[2]), + (e.query = n ? parse$1(e.search.substr(1)) : e.search.substr(1))) : n && ((e.search = ''), (e.query = {})), e ); } - var c = protocolPattern.exec(u); - if (c) { - c = c[0]; - var g = c.toLowerCase(); - (e.protocol = g), (u = u.substr(c.length)); + var g = protocolPattern.exec(f); + if (g) { + g = g[0]; + var m = g.toLowerCase(); + (e.protocol = m), (f = f.substr(g.length)); } - if (r || c || u.match(/^\/\/[^@\/]+@[^@\/]+/)) { - var m = '//' === u.substr(0, 2); - m && !(c && hostlessProtocol[c]) && ((u = u.substr(2)), (e.slashes = !0)); + if (r || g || f.match(/^\/\/[^@\/]+@[^@\/]+/)) { + var y = '//' === f.substr(0, 2); + y && !(g && hostlessProtocol[g]) && ((f = f.substr(2)), (e.slashes = !0)); } - var y, b, _, w; - if (!hostlessProtocol[c] && (m || (c && !slashedProtocol[c]))) { - var R = -1; - for (y = 0; y < hostEndingChars.length; y++) - (b = u.indexOf(hostEndingChars[y])), - -1 !== b && (-1 === R || b < R) && (R = b); - var v, x; + var b, _, w, R; + if (!hostlessProtocol[g] && (y || (g && !slashedProtocol[g]))) { + var v = -1; + for (b = 0; b < hostEndingChars.length; b++) + (_ = f.indexOf(hostEndingChars[b])), + -1 !== _ && (-1 === v || _ < v) && (v = _); + var S, L; for ( - x = -1 === R ? u.lastIndexOf('@') : u.lastIndexOf('@', R), - -1 !== x && - ((v = u.slice(0, x)), - (u = u.slice(x + 1)), - (e.auth = decodeURIComponent(v))), - R = -1, - y = 0; - y < nonHostChars.length; - y++ + L = -1 === v ? f.lastIndexOf('@') : f.lastIndexOf('@', v), + -1 !== L && + ((S = f.slice(0, L)), + (f = f.slice(L + 1)), + (e.auth = decodeURIComponent(S))), + v = -1, + b = 0; + b < nonHostChars.length; + b++ ) - (b = u.indexOf(nonHostChars[y])), - -1 !== b && (-1 === R || b < R) && (R = b); - -1 === R && (R = u.length), - (e.host = u.slice(0, R)), - (u = u.slice(R)), + (_ = f.indexOf(nonHostChars[b])), + -1 !== _ && (-1 === v || _ < v) && (v = _); + -1 === v && (v = f.length), + (e.host = f.slice(0, v)), + (f = f.slice(v)), parseHost(e), (e.hostname = e.hostname || ''); - var E = '[' === e.hostname[0] && ']' === e.hostname[e.hostname.length - 1]; - if (!E) { - var L = e.hostname.split(/\./); - for (y = 0, _ = L.length; y < _; y++) { - var S = L[y]; - if (S && !S.match(hostnamePartPattern)) { - for (var A = '', C = 0, O = S.length; C < O; C++) - A += 127 < S.charCodeAt(C) ? 'x' : S[C]; + var x = '[' === e.hostname[0] && ']' === e.hostname[e.hostname.length - 1]; + if (!x) { + var E = e.hostname.split(/\./); + for (b = 0, w = E.length; b < w; b++) { + var C = E[b]; + if (C && !C.match(hostnamePartPattern)) { + for (var A = '', T = 0, P = C.length; T < P; T++) + A += 127 < C.charCodeAt(T) ? 'x' : C[T]; if (!A.match(hostnamePartPattern)) { - var P = L.slice(0, y), - k = L.slice(y + 1), - T = S.match(hostnamePartStart); - T && (P.push(T[1]), k.unshift(T[2])), - k.length && (u = '/' + k.join('.') + u), - (e.hostname = P.join('.')); + var O = E.slice(0, b), + B = E.slice(b + 1), + M = C.match(hostnamePartStart); + M && (O.push(M[1]), B.unshift(M[2])), + B.length && (f = '/' + B.join('.') + f), + (e.hostname = O.join('.')); break; } } @@ -2081,47 +2085,47 @@ function parse$1(e, t, n, r) { } (e.hostname = e.hostname.length > hostnameMaxLen ? '' : e.hostname.toLowerCase()), - E || (e.hostname = toASCII(e.hostname)), - (w = e.port ? ':' + e.port : ''); - var B = e.hostname || ''; - (e.host = B + w), + x || (e.hostname = toASCII(e.hostname)), + (R = e.port ? ':' + e.port : ''); + var q = e.hostname || ''; + (e.host = q + R), (e.href += e.host), - E && + x && ((e.hostname = e.hostname.substr(1, e.hostname.length - 2)), - '/' !== u[0] && (u = '/' + u)); + '/' !== f[0] && (f = '/' + f)); } - if (!unsafeProtocol[g]) - for (y = 0, _ = autoEscape.length; y < _; y++) { - var h = autoEscape[y]; - if (-1 !== u.indexOf(h)) { - var q = encodeURIComponent(h); - q === h && (q = escape(h)), (u = u.split(h).join(q)); + if (!unsafeProtocol[m]) + for (b = 0, w = autoEscape.length; b < w; b++) { + var h = autoEscape[b]; + if (-1 !== f.indexOf(h)) { + var U = encodeURIComponent(h); + U === h && (U = escape(h)), (f = f.split(h).join(U)); } } - var M = u.indexOf('#'); - -1 !== M && ((e.hash = u.substr(M)), (u = u.slice(0, M))); - var U = u.indexOf('?'); + var I = f.indexOf('#'); + -1 !== I && ((e.hash = f.substr(I)), (f = f.slice(0, I))); + var D = f.indexOf('?'); if ( - (-1 === U + (-1 === D ? n && ((e.search = ''), (e.query = {})) - : ((e.search = u.substr(U)), - (e.query = u.substr(U + 1)), - n && (e.query = parse(e.query)), - (u = u.slice(0, U))), - u && (e.pathname = u), - slashedProtocol[g] && e.hostname && !e.pathname && (e.pathname = '/'), + : ((e.search = f.substr(D)), + (e.query = f.substr(D + 1)), + n && (e.query = parse$1(e.query)), + (f = f.slice(0, D))), + f && (e.pathname = f), + slashedProtocol[m] && e.hostname && !e.pathname && (e.pathname = '/'), e.pathname || e.search) ) { - w = e.pathname || ''; - var I = e.search || ''; - e.path = w + I; + R = e.pathname || ''; + var Y = e.search || ''; + e.path = R + Y; } - return (e.href = format$1(e)), e; + return (e.href = format(e)), e; } function urlFormat(e) { - return isString(e) && (e = parse$1({}, e)), format$1(e); + return isString(e) && (e = parse({}, e)), format(e); } -function format$1(e) { +function format(e) { var t = e.auth || ''; t && ((t = encodeURIComponent(t)), (t = t.replace(/%3A/i, ':')), (t += '@')); var n = e.protocol || '', @@ -2158,7 +2162,7 @@ function format$1(e) { ); } Url.prototype.format = function () { - return format$1(this); + return format(this); }; function urlResolve(e, t) { return urlParse(e, !1, !0).resolve(t); @@ -2241,7 +2245,7 @@ function urlResolveObject(e, t) { e.host && ('' === u[0] ? (u[0] = e.host) : u.unshift(e.host)), (e.host = null)), (b = b && ('' === u[0] || '' === w[0]))); - var x; + var S; if (y) (r.host = e.host || '' === e.host ? e.host : r.host), (r.hostname = e.hostname || '' === e.hostname ? e.hostname : r.hostname), @@ -2258,8 +2262,8 @@ function urlResolveObject(e, t) { return ( R && ((r.hostname = r.host = w.shift()), - (x = !!(r.host && 0 < r.host.indexOf('@')) && r.host.split('@')), - x && ((r.auth = x.shift()), (r.host = r.hostname = x.shift()))), + (S = !!(r.host && 0 < r.host.indexOf('@')) && r.host.split('@')), + S && ((r.auth = S.shift()), (r.host = r.hostname = S.shift()))), (r.search = e.search), (r.query = e.query), (isNull(r.pathname) && isNull(r.search)) || @@ -2275,32 +2279,32 @@ function urlResolveObject(e, t) { r ); for ( - var E = w.slice(-1)[0], - L = - ((r.host || e.host || 1 < w.length) && ('.' === E || '..' === E)) || - '' === E, - S = 0, - A = w.length; - 0 <= A; - A-- + var L = w.slice(-1)[0], + x = + ((r.host || e.host || 1 < w.length) && ('.' === L || '..' === L)) || + '' === L, + E = 0, + C = w.length; + 0 <= C; + C-- ) - (E = w[A]), - '.' === E - ? w.splice(A, 1) - : '..' === E - ? (w.splice(A, 1), S++) - : S && (w.splice(A, 1), S--); - if (!b && !_) for (; S--; S) w.unshift('..'); + (L = w[C]), + '.' === L + ? w.splice(C, 1) + : '..' === L + ? (w.splice(C, 1), E++) + : E && (w.splice(C, 1), E--); + if (!b && !_) for (; E--; E) w.unshift('..'); b && '' !== w[0] && (!w[0] || '/' !== w[0].charAt(0)) && w.unshift(''), - L && '/' !== w.join('/').substr(-1) && w.push(''); - var C = '' === w[0] || (w[0] && '/' === w[0].charAt(0)); + x && '/' !== w.join('/').substr(-1) && w.push(''); + var A = '' === w[0] || (w[0] && '/' === w[0].charAt(0)); return ( R && - ((r.hostname = r.host = C ? '' : w.length ? w.shift() : ''), - (x = !!(r.host && 0 < r.host.indexOf('@')) && r.host.split('@')), - x && ((r.auth = x.shift()), (r.host = r.hostname = x.shift()))), + ((r.hostname = r.host = A ? '' : w.length ? w.shift() : ''), + (S = !!(r.host && 0 < r.host.indexOf('@')) && r.host.split('@')), + S && ((r.auth = S.shift()), (r.host = r.hostname = S.shift()))), (b = b || (r.host && w.length)), - b && !C && w.unshift(''), + b && !A && w.unshift(''), w.length ? (r.pathname = w.join('/')) : ((r.pathname = null), (r.path = null)), @@ -2325,8 +2329,7 @@ function parseHost(e) { t && (e.hostname = t); } var _blobConstructor, - hasFetch = - isFunction$1(global$1.fetch) && isFunction$1(global$1.ReadableStream); + hasFetch = isFunction(global$1.fetch) && isFunction(global$1.ReadableStream); function blobConstructor() { if ('undefined' != typeof _blobConstructor) return _blobConstructor; try { @@ -2349,14 +2352,14 @@ function checkTypeSupport(e) { } var haveArrayBuffer = 'undefined' != typeof global$1.ArrayBuffer, haveSlice = - haveArrayBuffer && isFunction$1(global$1.ArrayBuffer.prototype.slice), + haveArrayBuffer && isFunction(global$1.ArrayBuffer.prototype.slice), arraybuffer = haveArrayBuffer && checkTypeSupport('arraybuffer'), msstream = !hasFetch && haveSlice && checkTypeSupport('ms-stream'), mozchunkedarraybuffer = !hasFetch && haveArrayBuffer && checkTypeSupport('moz-chunked-arraybuffer'), - overrideMimeType = isFunction$1(xhr.overrideMimeType), - vbArray = isFunction$1(global$1.VBArray); -function isFunction$1(e) { + overrideMimeType = isFunction(xhr.overrideMimeType), + vbArray = isFunction(global$1.VBArray); +function isFunction(e) { return 'function' == typeof e; } xhr = null; @@ -2378,7 +2381,7 @@ function EventEmitter() { ((this._events = new EventHandlers()), (this._eventsCount = 0)), (this._maxListeners = this._maxListeners || void 0); }), - (EventEmitter.prototype.setMaxListeners = function (e) { + (EventEmitter.prototype.setMaxListeners = function t(e) { if ('number' != typeof e || 0 > e || isNaN(e)) throw new TypeError('"n" argument must be a positive number'); return (this._maxListeners = e), this; @@ -2388,7 +2391,7 @@ function $getMaxListeners(e) { ? EventEmitter.defaultMaxListeners : e._maxListeners; } -EventEmitter.prototype.getMaxListeners = function () { +EventEmitter.prototype.getMaxListeners = function e() { return $getMaxListeners(this); }; function emitNone(e, t, n) { @@ -2421,49 +2424,49 @@ function emitMany(e, t, n, r) { for (var o = e.length, a = arrayClone(e, o), s = 0; s < o; ++s) a[s].apply(n, r); } -EventEmitter.prototype.emit = function (e) { - var t, - n, +EventEmitter.prototype.emit = function t(e) { + var n, r, o, a, s, d, - l = 'error' === e; - if (((s = this._events), s)) l = l && null == s.error; - else if (!l) return !1; - if (((d = this.domain), l)) { - if (((t = arguments[1]), d)) - t || (t = new Error('Uncaught, unspecified "error" event')), - (t.domainEmitter = this), - (t.domain = d), - (t.domainThrown = !1), - d.emit('error', t); - else if (t instanceof Error) throw t; + l, + h = 'error' === e; + if (((d = this._events), d)) h = h && null == d.error; + else if (!h) return !1; + if (((l = this.domain), h)) { + if (((n = arguments[1]), l)) + n || (n = new Error('Uncaught, unspecified "error" event')), + (n.domainEmitter = this), + (n.domain = l), + (n.domainThrown = !1), + l.emit('error', n); + else if (n instanceof Error) throw n; else { - var h = new Error('Uncaught, unspecified "error" event. (' + t + ')'); - throw ((h.context = t), h); + var p = new Error('Uncaught, unspecified "error" event. (' + n + ')'); + throw ((p.context = n), p); } return !1; } - if (((n = s[e]), !n)) return !1; - var p = 'function' == typeof n; - switch (((r = arguments.length), r)) { + if (((r = d[e]), !r)) return !1; + var u = 'function' == typeof r; + switch (((o = arguments.length), o)) { case 1: - emitNone(n, p, this); + emitNone(r, u, this); break; case 2: - emitOne(n, p, this, arguments[1]); + emitOne(r, u, this, arguments[1]); break; case 3: - emitTwo(n, p, this, arguments[1], arguments[2]); + emitTwo(r, u, this, arguments[1], arguments[2]); break; case 4: - emitThree(n, p, this, arguments[1], arguments[2], arguments[3]); + emitThree(r, u, this, arguments[1], arguments[2], arguments[3]); break; default: - for (o = Array(r - 1), a = 1; a < r; a++) o[a - 1] = arguments[a]; - emitMany(n, p, this, o); + for (a = Array(o - 1), s = 1; s < o; s++) a[s - 1] = arguments[s]; + emitMany(r, u, this, a); } return !0; }; @@ -2509,11 +2512,11 @@ function _addListener(e, t, n, r) { function emitWarning(t) { 'function' == typeof console.warn ? console.warn(t) : console.log(t); } -(EventEmitter.prototype.addListener = function (e, t) { +(EventEmitter.prototype.addListener = function n(e, t) { return _addListener(this, e, t, !1); }), (EventEmitter.prototype.on = EventEmitter.prototype.addListener), - (EventEmitter.prototype.prependListener = function (e, t) { + (EventEmitter.prototype.prependListener = function n(e, t) { return _addListener(this, e, t, !0); }); function _onceWrap(e, t, n) { @@ -2523,59 +2526,59 @@ function _onceWrap(e, t, n) { var o = !1; return (r.listener = n), r; } -(EventEmitter.prototype.once = function (e, t) { +(EventEmitter.prototype.once = function n(e, t) { if ('function' != typeof t) throw new TypeError('"listener" argument must be a function'); return this.on(e, _onceWrap(this, e, t)), this; }), - (EventEmitter.prototype.prependOnceListener = function (e, t) { + (EventEmitter.prototype.prependOnceListener = function n(e, t) { if ('function' != typeof t) throw new TypeError('"listener" argument must be a function'); return this.prependListener(e, _onceWrap(this, e, t)), this; }), - (EventEmitter.prototype.removeListener = function (e, t) { - var n, r, o, a, s; + (EventEmitter.prototype.removeListener = function n(e, t) { + var r, o, a, s, d; if ('function' != typeof t) throw new TypeError('"listener" argument must be a function'); - if (((r = this._events), !r)) return this; - if (((n = r[e]), !n)) return this; - if (n === t || (n.listener && n.listener === t)) + if (((o = this._events), !o)) return this; + if (((r = o[e]), !r)) return this; + if (r === t || (r.listener && r.listener === t)) 0 == --this._eventsCount ? (this._events = new EventHandlers()) - : (delete r[e], - r.removeListener && this.emit('removeListener', e, n.listener || t)); - else if ('function' != typeof n) { - for (o = -1, a = n.length; 0 < a--; ) - if (n[a] === t || (n[a].listener && n[a].listener === t)) { - (s = n[a].listener), (o = a); + : (delete o[e], + o.removeListener && this.emit('removeListener', e, r.listener || t)); + else if ('function' != typeof r) { + for (a = -1, s = r.length; 0 < s--; ) + if (r[s] === t || (r[s].listener && r[s].listener === t)) { + (d = r[s].listener), (a = s); break; } - if (0 > o) return this; - if (1 === n.length) { - if (((n[0] = void 0), 0 == --this._eventsCount)) + if (0 > a) return this; + if (1 === r.length) { + if (((r[0] = void 0), 0 == --this._eventsCount)) return (this._events = new EventHandlers()), this; - delete r[e]; - } else spliceOne(n, o); - r.removeListener && this.emit('removeListener', e, s || t); + delete o[e]; + } else spliceOne(r, a); + o.removeListener && this.emit('removeListener', e, d || t); } return this; }), - (EventEmitter.prototype.removeAllListeners = function (e) { - var t, n; - if (((n = this._events), !n)) return this; - if (!n.removeListener) + (EventEmitter.prototype.removeAllListeners = function t(e) { + var n, r; + if (((r = this._events), !r)) return this; + if (!r.removeListener) return ( 0 === arguments.length ? ((this._events = new EventHandlers()), (this._eventsCount = 0)) - : n[e] && + : r[e] && (0 == --this._eventsCount ? (this._events = new EventHandlers()) - : delete n[e]), + : delete r[e]), this ); if (0 === arguments.length) { - for (var r, o = Object.keys(n), a = 0; a < o.length; ++a) - (r = o[a]), 'removeListener' === r || this.removeAllListeners(r); + for (var o, a = Object.keys(r), s = 0; s < a.length; ++s) + (o = a[s]), 'removeListener' !== o && this.removeAllListeners(o); return ( this.removeAllListeners('removeListener'), (this._events = new EventHandlers()), @@ -2583,35 +2586,35 @@ function _onceWrap(e, t, n) { this ); } - if (((t = n[e]), 'function' == typeof t)) this.removeListener(e, t); - else if (t) - do this.removeListener(e, t[t.length - 1]); - while (t[0]); + if (((n = r[e]), 'function' == typeof n)) this.removeListener(e, n); + else if (n) + do this.removeListener(e, n[n.length - 1]); + while (n[0]); return this; }), - (EventEmitter.prototype.listeners = function (e) { - var t, - n, - r = this._events; + (EventEmitter.prototype.listeners = function t(e) { + var n, + r, + o = this._events; return ( - r - ? ((t = r[e]), - (n = t - ? 'function' == typeof t - ? [t.listener || t] - : unwrapListeners(t) + o + ? ((n = o[e]), + (r = n + ? 'function' == typeof n + ? [n.listener || n] + : unwrapListeners(n) : [])) - : (n = []), - n + : (r = []), + r ); }), (EventEmitter.listenerCount = function (e, t) { return 'function' == typeof e.listenerCount ? e.listenerCount(t) - : listenerCount.call(e, t); + : listenerCount$1.call(e, t); }), - (EventEmitter.prototype.listenerCount = listenerCount); -function listenerCount(e) { + (EventEmitter.prototype.listenerCount = listenerCount$1); +function listenerCount$1(e) { var t = this._events; if (t) { var n = t[e]; @@ -2620,7 +2623,7 @@ function listenerCount(e) { } return 0; } -EventEmitter.prototype.eventNames = function () { +EventEmitter.prototype.eventNames = function e() { return 0 < this._eventsCount ? Reflect.ownKeys(this._events) : []; }; function spliceOne(e, t) { @@ -2815,7 +2818,7 @@ function prependListener(e, t, n) { : (e._events[t] = [n, e._events[t]]) : e.on(t, n)); } -function listenerCount$1(e, t) { +function listenerCount(e, t) { return e.listeners(t).length; } function ReadableState(e, t) { @@ -3032,7 +3035,7 @@ function maybeReadMore_(e, t) { n = t.length; t.readingMore = !1; } -(Readable.prototype._read = function () { +(Readable.prototype._read = function (e) { this.emit('error', new Error('not implemented')); }), (Readable.prototype.pipe = function (e, t) { @@ -3074,7 +3077,7 @@ function maybeReadMore_(e, t) { debug('onerror', t), l(), e.removeListener('error', i), - 0 === listenerCount$1(e, 'error') && e.emit('error', t); + 0 === listenerCount(e, 'error') && e.emit('error', t); } function s() { e.removeListener('finish', d), l(); @@ -3231,8 +3234,9 @@ function flow(e) { return e[t].apply(e, arguments); }; })(a)); + var n = ['error', 'close', 'destroy', 'pause', 'resume']; return ( - forEach(['error', 'close', 'destroy', 'pause', 'resume'], function (t) { + forEach(n, function (t) { e.on(t, o.emit.bind(o, t)); }), (o._read = function (t) { @@ -3369,9 +3373,9 @@ function WritableState(e, t) { (this.bufferedRequestCount = 0), (this.corkedRequestsFree = new CorkedRequest(this)); } -WritableState.prototype.getBuffer = function () { - for (var e = this.bufferedRequest, t = []; e; ) t.push(e), (e = e.next); - return t; +WritableState.prototype.getBuffer = function e() { + for (var t = this.bufferedRequest, n = []; t; ) n.push(t), (t = t.next); + return n; }; function Writable(e) { return this instanceof Writable || this instanceof Duplex @@ -3434,7 +3438,7 @@ function validChunk(e, t, n, r) { e.bufferedRequest && clearBuffer(this, e)); }), - (Writable.prototype.setDefaultEncoding = function (e) { + (Writable.prototype.setDefaultEncoding = function t(e) { if ( ('string' == typeof e && (e = e.toLowerCase()), !( @@ -3634,6 +3638,146 @@ function onend() { function onEndNT(e) { e.end(); } +inherits$1(Transform, Duplex); +function TransformState(e) { + (this.afterTransform = function (t, n) { + return afterTransform(e, t, n); + }), + (this.needTransform = !1), + (this.transforming = !1), + (this.writecb = null), + (this.writechunk = null), + (this.writeencoding = null); +} +function afterTransform(e, t, n) { + var r = e._transformState; + r.transforming = !1; + var o = r.writecb; + if (!o) return e.emit('error', new Error('no writecb in Transform class')); + (r.writechunk = null), + (r.writecb = null), + null !== n && n !== void 0 && e.push(n), + o(t); + var a = e._readableState; + (a.reading = !1), + (a.needReadable || a.length < a.highWaterMark) && e._read(a.highWaterMark); +} +function Transform(e) { + if (!(this instanceof Transform)) return new Transform(e); + Duplex.call(this, e), (this._transformState = new TransformState(this)); + var t = this; + (this._readableState.needReadable = !0), + (this._readableState.sync = !1), + e && + ('function' == typeof e.transform && (this._transform = e.transform), + 'function' == typeof e.flush && (this._flush = e.flush)), + this.once('prefinish', function () { + 'function' == typeof this._flush + ? this._flush(function (e) { + done(t, e); + }) + : done(t); + }); +} +(Transform.prototype.push = function (e, t) { + return ( + (this._transformState.needTransform = !1), + Duplex.prototype.push.call(this, e, t) + ); +}), + (Transform.prototype._transform = function (e, t, n) { + throw new Error('Not implemented'); + }), + (Transform.prototype._write = function (e, t, n) { + var r = this._transformState; + if ( + ((r.writecb = n), + (r.writechunk = e), + (r.writeencoding = t), + !r.transforming) + ) { + var o = this._readableState; + (r.needTransform || o.needReadable || o.length < o.highWaterMark) && + this._read(o.highWaterMark); + } + }), + (Transform.prototype._read = function (e) { + var t = this._transformState; + null !== t.writechunk && t.writecb && !t.transforming + ? ((t.transforming = !0), + this._transform(t.writechunk, t.writeencoding, t.afterTransform)) + : (t.needTransform = !0); + }); +function done(e, t) { + if (t) return e.emit('error', t); + var n = e._writableState, + r = e._transformState; + if (n.length) throw new Error('Calling transform done when ws.length != 0'); + if (r.transforming) + throw new Error('Calling transform done when still transforming'); + return e.push(null); +} +inherits$1(PassThrough, Transform); +function PassThrough(e) { + return this instanceof PassThrough + ? void Transform.call(this, e) + : new PassThrough(e); +} +(PassThrough.prototype._transform = function (e, t, n) { + n(null, e); +}), + inherits$1(Stream, EventEmitter), + (Stream.Readable = Readable), + (Stream.Writable = Writable), + (Stream.Duplex = Duplex), + (Stream.Transform = Transform), + (Stream.PassThrough = PassThrough), + (Stream.Stream = Stream); +function Stream() { + EventEmitter.call(this); +} +Stream.prototype.pipe = function (e, t) { + function n(t) { + e.writable && !1 === e.write(t) && d.pause && d.pause(); + } + function r() { + d.readable && d.resume && d.resume(); + } + function o() { + l || ((l = !0), e.end()); + } + function a() { + l || ((l = !0), 'function' == typeof e.destroy && e.destroy()); + } + function i(e) { + if ((s(), 0 === EventEmitter.listenerCount(this, 'error'))) throw e; + } + function s() { + d.removeListener('data', n), + e.removeListener('drain', r), + d.removeListener('end', o), + d.removeListener('close', a), + d.removeListener('error', i), + e.removeListener('error', i), + d.removeListener('end', s), + d.removeListener('close', s), + e.removeListener('close', s); + } + var d = this; + d.on('data', n), + e.on('drain', r), + e._isStdio || (t && !1 === t.end) || (d.on('end', o), d.on('close', a)); + var l = !1; + return ( + d.on('error', i), + e.on('error', i), + d.on('end', s), + d.on('close', s), + e.on('close', s), + e.emit('pipe', d), + e + ); +}; var rStates = { UNSENT: 0, OPENED: 1, @@ -3650,7 +3794,7 @@ function IncomingMessage(e, t, n) { (r.trailers = {}), (r.rawTrailers = []), r.on('end', function () { - browser$1.nextTick(function () { + process.nextTick(function () { r.emit('close'); }); }); @@ -3900,7 +4044,7 @@ var unsafeHeaders = [ try { a.open(e._opts.method, e._opts.url, !0); } catch (t) { - return void browser$1.nextTick(function () { + return void process.nextTick(function () { e.emit('error', t); }); } @@ -3930,7 +4074,7 @@ var unsafeHeaders = [ try { a.send(t); } catch (t) { - return void browser$1.nextTick(function () { + return void process.nextTick(function () { e.emit('error', t); }); } @@ -4127,20 +4271,15 @@ class Fasquest { }); } _request(e, n, r = 0) { - var o = this._setOptions({ ...e }); - o.json && o.body && (o.body = JSON.stringify(o.body)), - o.body && - !o.headers['Content-Length'] && - (o.headers['Content-Length'] = Buffer.byteLength(o.body)); - var a = client[o.proto].request(o, (e) => { + var o = this._setOptions(e), + a = client[o.proto].request(o, (e) => { (e.body = ''), e.on('data', (t) => { e.body += t; }), e.on('end', () => { if ( - (clearTimeout(i), - delete o.agent, + (o.timeout && clearTimeout(i), -1 !== REDIRECT_CODES.indexOf(e.statusCode) && r < o.redirect_max) ) return ( @@ -4158,8 +4297,9 @@ class Fasquest { ? n(a, e, new SimpleError()) : n(a, e, null); }); - }), - i = setTimeout(() => { + }); + if (o.timeout) + var i = setTimeout(() => { a.destroy(); }, o.timeout || 6e4); a.on('error', (t) => { @@ -4167,29 +4307,46 @@ class Fasquest { -1 < t.message.indexOf('socket hang up') ? new RequestTimeoutError(t) : new RequestError(t); - return delete o.agent, n(a, null, e); + return n(a, null, e); }), o.body && a.write(o.body), a.end(); } _setOptions(e) { - if (((e.simple = !1 !== e.simple), (e.method = e.method || 'GET'), e.qs)) { - var t = qs.stringify(e.qs); - 0 < t.length && (e.uri += (-1 < e.uri.indexOf('?') ? '&' : '?') + t); + var t = { + simple: !1 !== e.simple, + method: e.method || 'GET', + uri: e.uri, + timeout: e.timeout, + }; + if (e.qs) { + var n = qs.stringify(e.qs); + 0 < n.length && (t.uri += (-1 < t.uri.indexOf('?') ? '&' : '?') + n); } + if ( + ((t = this._uri_to_options(t.uri, t)), + (t.agent = e.agent || this.agent[e.proto]), + (t.headers = {}), + e.headers) + ) + for (var r = Object.keys(e.headers), o = 0; o < r.length; o++) + t.headers[r[o]] = e.headers[r[o]]; return ( - this._uri_to_options(e), - (e.agent = e.agent || this.agent[e.proto]), - e.headers || (e.headers = {}), e.json - ? (e.headers['Content-Type'] = 'application/json') - : e.form && - ((e.body = qs.stringify(e.form)), - (e.headers['Content-Type'] = 'application/x-www-form-urlencoded'), - (e.headers['Content-Length'] = Buffer.byteLength(e.body))), + ? ((t.headers['Content-Type'] = 'application/json'), + e.body && (t.body = JSON.stringify(e.body))) + : e.form + ? ((t.body = qs.stringify(e.form)), + (t.headers['Content-Type'] = 'application/x-www-form-urlencoded'), + (t.headers['Content-Length'] = Buffer.byteLength(t.body))) + : e.body && + ((t.headers['Content-Length'] = Buffer.byteLength(e.body)), + !t.headers['Content-Type'] && + (t.headers['Content-Type'] = 'text/plain'), + (t.body = e.body)), e.authorization && (e.authorization.basic - ? (e.headers.Authorization = + ? (t.headers.Authorization = 'Basic ' + Buffer.from( e.authorization.basic.client + @@ -4198,36 +4355,37 @@ class Fasquest { 'ascii' ).toString('base64')) : e.authorization.bearer && - (e.headers.Authorization = 'Bearer ' + e.authorization.bearer), - delete e.authorization), - e.redirect_max || 0 === e.redirect_max || (e.redirect_max = 5), - e + (t.headers.Authorization = 'Bearer ' + e.authorization.bearer)), + e.redirect_max || 0 === e.redirect_max || (t.redirect_max = 5), + t ); } - _uri_to_options(e) { - var t = { proto: '', path: '', port: 80, host: '' }, - n = e.uri.split('://'); - if (((t.proto = n[0]), -1 < n[1].indexOf(':'))) { - const e = n[1].split(':'), - r = e[1].indexOf('/'); - -1 < r - ? ((n[1] = e[1]), (t.path = n[1].slice(r)), (t.port = n[1].slice(0, r))) - : (t.port = e[1]), - (t.host = e[0]); - } else t.port = 'https' == t.proto ? 443 : 80; - const r = n[1].indexOf('/'); - -1 < r - ? ((t.path = t.path || n[1].slice(r)), - (t.host = t.host || n[1].slice(0, r))) - : ((t.path = t.path || '/'), (t.host = t.host || n[1])), - (e.proto = t.proto), - (e.path = t.path), - (e.port = t.port), - (e.host = t.host); + _uri_to_options(e, t) { + var n = { proto: '', path: '', port: 80, host: '' }, + r = e.split('://'); + n.proto = r[0]; + var o = r[1].indexOf(':'); + if (-1 < o && !isNaN(r[1][o + 1])) { + const e = r[1].indexOf('/'); + -1 < e + ? ((n.path = r[1].slice(e)), (n.port = r[1].slice(o + 1, e))) + : (n.port = r[1].slice(o + 1)), + (n.host = r[1].slice(0, o)); + } else n.port = 'https' == n.proto ? 443 : 80; + const a = r[1].indexOf('/'); + return ( + -1 < a + ? ((n.path = n.path || r[1].slice(a)), + (n.host = n.host || r[1].slice(0, a))) + : ((n.path = n.path || '/'), (n.host = n.host || r[1])), + (t.proto = n.proto), + (t.path = n.path), + (t.port = n.port), + (t.host = n.host), + t + ); } } -var Fasquest_1 = new Fasquest(); -export default Fasquest_1; /** * SDK - importing the SDK for use @@ -4860,151 +5018,31 @@ function SDK(host, opts) { * body * ```json * { - * "group": { - * "anonymous": { - * "type": "group", - * "allowed": [ - * { - * "route": "/travelling/portal/*", - * "host": null, - * "name": "*-travelling-portal-*" - * }, - * { - * "route": "/travelling/api/v1/auth/*", - * "host": null, - * "name": "*-travelling-api-v1-auth-*" - * }, - * { - * "route": "/travelling/api/v1/user/me/route/allowed", - * "host": null, - * "method": "GET", - * "name": "get-travelling-api-v1-user-me-route-allowed" - * }, - * { - * "route": "/travelling/api/v1/user/me/permission/allowed/*", - * "host": null, - * "method": "GET", - * "name": "get-travelling-api-v1-user-me-permission-allowed-*" - * }, - * { - * "route": "/travelling/assets/*", - * "host": null, - * "removeFromPath": "/travelling/assets/", - * "method": "GET", - * "name": "get-travelling-assets-*" - * }, - * { - * "route": "/travelling/api/v1/config/password", - * "host": null, - * "method": "GET", - * "name": "get-travelling-api-v1-config-password" - * }, - * { - * "route": "/favicon.ico", - * "host": null, - * "method": "GET", - * "name": "get-favicon.ico" - * } - * ], - * "inherited": null, - * "is_default": false - * }, - * "group3": { - * "type": "group", - * "allowed": null, - * "inherited": [ - * "testgroup|group1", - * "group|group2" - * ], - * "is_default": false - * }, - * "superadmin": { - * "type": "group", - * "allowed": [ - * { - * "host": null, - * "route": "/travelling/*", - * "name": "*-travelling-*" - * }, - * { - * "name": "test-one-*-three" - * } - * ], - * "inherited": [ - * "group|anonymous" - * ], - * "is_default": false - * }, - * "group4": { - * "type": "group", - * "allowed": null, - * "inherited": [], - * "is_default": false - * }, - * "group2": { - * "type": "group", - * "allowed": [ - * { - * "route": "/test/get", - * "host": "https://127.0.0.1:4268/:username/:group", - * "removeFromPath": "/test/get", - * "method": "GET", - * "name": "get-test-get" - * }, - * { - * "route": "/test/post", - * "host": "http://127.0.0.1:4267/?id=:id&permission=:permission", - * "removeFromPath": "/test/post", - * "method": "POST", - * "name": "post-test-post" - * } - * ], - * "inherited": [ - * "testgroup|group1" - * ], - * "is_default": false - * }, - * "group5": { - * "type": "group", - * "allowed": [ - * { - * "route": "/test/delete/:grouptype", - * "host": "https://127.0.0.1:4268", - * "removeFromPath": "/test/delete", - * "method": "DELETE", - * "name": "delete-test-delete-:grouptype" - * } - * ], - * "inherited": [ - * "group|group4", - * "group|superadmin" - * ], - * "is_default": true - * }, - * "group1": { - * "type": "group", - * "allowed": null, - * "inherited": null, - * "is_default": false - * } - * }, - * "testgroup": { - * "group1": { - * "type": "testgroup", - * "allowed": null, - * "inherited": [ - * "group|group4" - * ], - * "is_default": false - * }, - * "superadmin": { - * "type": "testgroup", - * "allowed": null, - * "inherited": null, - * "is_default": false - * } + * "group": { + * "anonymous": { + * "allowed": [ + * {"method": "GET", "route": "/account/portal/*"}, + * {"method": "GET", "route": "/account/assets/*"}, + * {"method": "GET", "route": "/favicon.ico"}, + * {"method": "GET", "route": "/account/api/v1/auth/logout"}, + * {"method": "PUT", "route": "/account/api/v1/auth/password/forgot"}, + * {"method": "PUT", "route": "/account/api/v1/auth/password/reset"}, + * {"method": "GET", "route": "/account/api/v1/auth/activate"}, + * {"method": "POST", "route": "/account/api/v1/auth/token"}, + * {"method": "GET", "route": "/account/api/v1/auth/login/otp"}, + * {"method": "POST","route":"/account/api/v1/auth/oauth/authorize"}, + * {"method": "GET","route":"/account/api/v1/auth/oauth/authorize"}, + * {"method": "GET", "route": "/account/api/v1/user/me/permission/allowed/*"}, + * {"method": "GET", "route": "/account/api/v1/user/me/route/allowed"}, + * {"method": "GET", "route": "/account/api/v1/config/password"}, + * {"method": "GET", "route": "/account/api/v1/config/portal/webclient"}, + * {"method": "GET", "route": "/account/metrics"}, + * {"method": "GET", "route": "/account/health"} + * ] * } + * } * } + * * ``` */ static async import(body, authorization_bearer, opts) { @@ -7285,6 +7323,7 @@ function SDK(host, opts) { * @param {any} filter Filter parameters (example: locked=false,created_on>2021-06-03,created_on<2021-06-06) (example: locked=false,created_on>2021-06-03,created_on<2021-06-06) * @param {any} sortdir Sort direction (example ascending order: ASC) (example: ASC) * @param {any} ids Comma seperated id values used in inclusion query (example: d0323874-9b24-4bc5-ae38-fb8808c4e453,08c4c17f-317b-4be8-bfbd-451a274a3f7f) + * @param {any} params (example: id) * @param {string} authorization_bearer The client_credentials generated OAUth2 access token. */ static async get( @@ -7294,6 +7333,7 @@ function SDK(host, opts) { filter, sortdir, ids, + params, authorization_bearer, opts ) { @@ -7301,7 +7341,7 @@ function SDK(host, opts) { method: 'GET', simple: false, uri: hostUrl + '/' + `api/v1/users`, - qs: { sort, limit, skip, filter, sortdir, ids }, + qs: { sort, limit, skip, filter, sortdir, ids, params }, authorization: { bearer: authorization_bearer, }, @@ -7425,6 +7465,7 @@ function SDK(host, opts) { * @param {any} filter Filter parameters (example: locked=false,created_on>2021-06-03,created_on<2021-06-06) (example: created_on>2021-06-01,created_on<2021-06-08) * @param {any} sortdir Sort direction (example ascending order: ASC) (example: ASC) * @param {any} ids Comma seperated id values used in inclusion query (example: d0323874-9b24-4bc5-ae38-fb8808c4e453,08c4c17f-317b-4be8-bfbd-451a274a3f7f) + * @param {any} params (example: id,created_on) * @param {string} authorization_bearer The client_credentials generated OAUth2 access token. */ static async get( @@ -7435,6 +7476,7 @@ function SDK(host, opts) { filter, sortdir, ids, + params, authorization_bearer, opts ) { @@ -7442,7 +7484,7 @@ function SDK(host, opts) { method: 'GET', simple: false, uri: hostUrl + '/' + `api/v1/users/domain/${domain}`, - qs: { sort, limit, skip, filter, sortdir, ids }, + qs: { sort, limit, skip, filter, sortdir, ids, params }, authorization: { bearer: authorization_bearer, }, @@ -9221,15 +9263,15 @@ function SDK(host, opts) { * * Path: api/v1/auth/register/domain/:domain * @param {Object} body - * @param {any} domain Domain name (example: test.com) (example: traziventures.com) + * @param {any} domain Domain name (example: test.com) (example: contactsource.com) * @param {any} randomPassword Generates a random password on the backend securely if set to `true` (example: true) * @param {string} authorization_bearer The client_credentials generated OAUth2 access token. * @example * body * ```json * { - * "email": "test@test.com", - * "password": "Pas5w0r!d" + * "email": "mark+test@trazi.com", + * "password": "Trazi123**" * } * ``` */ diff --git a/tests/endpoints/auth-register.js b/tests/endpoints/auth-register.js index 856b6de1..2b1fb678 100644 --- a/tests/endpoints/auth-register.js +++ b/tests/endpoints/auth-register.js @@ -146,6 +146,19 @@ module.exports = () => { expect(res.statusCode).toEqual(200); }); + + test('Create Test User [test_domain_7] - GMAIL', async () => { + var res = await Travelling.Auth.Domain.register( + { + username: 'test_domain_7', + password: 'Pas5w0r!d6', + email: 'test@gmail.com' + }, + 'traziventures.com' + ); + + expect(res.statusCode).toEqual(200); + }); }); describe('Invalid', () => { @@ -214,6 +227,28 @@ module.exports = () => { expect(res.statusCode).toEqual(400); }); + if (config.email.validation.internal.dedupeGmail) { + test('Duplicate Email - with GMAIL dedupe (+)', async () => { + var res = await Travelling.Auth.register({ + username: 'test1', + password: 'Pas5w0r!d', + email: 'test+123+6969@gmail.com' + }); + + expect(res.statusCode).toEqual(400); + }); + + test('Duplicate Email - with GMAIL dedupe (.)', async () => { + var res = await Travelling.Auth.register({ + username: 'test1', + password: 'Pas5w0r!d', + email: 't.e.s.t+123+6969@gmail.com' + }); + + expect(res.statusCode).toEqual(400); + }); + } + test('No Email', async () => { var res = await Travelling.Auth.register({ username: 'test1', diff --git a/tests/endpoints/user-edit.js b/tests/endpoints/user-edit.js index 1771fb7c..586f64e7 100644 --- a/tests/endpoints/user-edit.js +++ b/tests/endpoints/user-edit.js @@ -333,6 +333,28 @@ module.exports = () => { ); expect([400, 404]).toContain(editUserDataPropertyValueRes.statusCode); }); + + if (config.email.validation.internal.dedupeGmail) { + test('Edit Current User (user 1) - Edit user data with dupe gmail', async () => { + // First edit user to have gmail email + const editRes = await Travelling.User.Current.editPropertyValue( + 'email', + 'testing.guy@gmail.com', + userContainer.user1Token + ); + + expect(editRes).toHaveProperty('statusCode', 200); + + // Attempt to edit user data with dupe email properties (+, .) + const invalidRes = await Travelling.User.Current.editPropertyValue( + 'email', + 't.e.stinggu.y+123213@gmail.com', + userContainer.user1Token + ); + + expect(invalidRes).toHaveProperty('statusCode', 400); + }); + } }); }); diff --git a/tests/endpoints/users-get.js b/tests/endpoints/users-get.js index f911f894..b0023d65 100644 --- a/tests/endpoints/users-get.js +++ b/tests/endpoints/users-get.js @@ -14,7 +14,7 @@ module.exports = () => { userContainer.users = res.body; expect(res.statusCode).toEqual(200); - expect(res.body).toHaveLength(9); + expect(res.body).toHaveLength(10); // Make sure we dont have any hashes expect(res.body[0]).not.toHaveProperty('__email'); @@ -25,7 +25,7 @@ module.exports = () => { var res = await Travelling.Users.get('created_on', null, null, null, null, null, userContainer.user1Token); expect(res.statusCode).toEqual(200); - expect(res.body).toHaveLength(9); + expect(res.body).toHaveLength(10); }); test('Get Users with limit', async () => { @@ -39,14 +39,14 @@ module.exports = () => { var res = await Travelling.Users.get(null, null, 2, null, null, null, userContainer.user1Token); expect(res.statusCode).toEqual(200); - expect(res.body).toHaveLength(7); + expect(res.body).toHaveLength(8); }); test('Get Users with sortdir', async () => { var res = await Travelling.Users.get(null, null, null, null, 'ASC', null, userContainer.user1Token); expect(res.statusCode).toEqual(200); - expect(res.body).toHaveLength(9); + expect(res.body).toHaveLength(10); }); test('Get Users with ids', async () => { @@ -91,7 +91,7 @@ module.exports = () => { var res = await Travelling.Users.get(null, null, null, 'locked=false', null, null, userContainer.user1Token); expect(res.statusCode).toEqual(200); - expect(res.body).toHaveLength(7); + expect(res.body).toHaveLength(8); }); test('Get Users with filter created_on in date range', async () => { @@ -112,7 +112,7 @@ module.exports = () => { ); expect(res.statusCode).toEqual(200); - expect(res.body).toHaveLength(9); + expect(res.body).toHaveLength(10); }); test('Get Users with filter created_on out of date range', async () => { @@ -154,7 +154,7 @@ module.exports = () => { ); expect(res.statusCode).toEqual(200); - expect(res.body).toHaveLength(7); + expect(res.body).toHaveLength(8); }); test('Get Users with sort and limit', async () => { @@ -217,7 +217,7 @@ module.exports = () => { var res = await Travelling.Users.get( 'created_on', 1, - 9, + 10, `created_on >= ${yesterday.toISOString()}, created_on <= ${tomorrow.toISOString()}`, 'ASC', null, @@ -524,7 +524,7 @@ module.exports = () => { var res = await Travelling.Users.count(null, null, null, null, userContainer.user1Token); expect(res.statusCode).toEqual(200); - expect(res.body.count).toEqual(9); + expect(res.body.count).toEqual(10); }); test('Get Users Count with limit', async () => { @@ -538,7 +538,7 @@ module.exports = () => { var res = await Travelling.Users.count(null, 3, null, null, userContainer.user1Token); expect(res.statusCode).toEqual(200); - expect(res.body.count).toEqual(6); + expect(res.body.count).toEqual(7); }); test('Get Users Count with limit and skip', async () => { @@ -564,7 +564,7 @@ module.exports = () => { ); expect(res.statusCode).toEqual(200); - expect(res.body.count).toEqual(9); + expect(res.body.count).toEqual(10); }); test('Get Users Count by Domain', async () => { @@ -616,7 +616,7 @@ module.exports = () => { var res = await Travelling.Group.Users.get(superadminGroup.id, '', '', '', '', '', userContainer.user1Token); expect(res.statusCode).toEqual(200); - expect(res.body).toHaveLength(9); + expect(res.body).toHaveLength(10); // Make sure we dont have any hashes expect(res.body[0]).not.toHaveProperty('__email'); @@ -627,14 +627,14 @@ module.exports = () => { var res = await Travelling.Group.Users.count(superadminGroup.id, '', '', '', userContainer.user1Token); expect(res.statusCode).toEqual(200); - expect(res.body.count).toBe(9); + expect(res.body.count).toBe(10); }); test('Users by group name', async () => { var res = await Travelling.Group.Users.get('superadmin', '', '', '', '', '', userContainer.user1Token); expect(res.statusCode).toEqual(200); - expect(res.body).toHaveLength(9); + expect(res.body).toHaveLength(10); }); test('Users by group name - limit', async () => { @@ -669,7 +669,7 @@ module.exports = () => { ); expect(res.statusCode).toEqual(200); - expect(res.body).toHaveLength(9); + expect(res.body).toHaveLength(10); }); test('Users by group name - sort', async () => { @@ -684,7 +684,7 @@ module.exports = () => { ); expect(resDESC.statusCode).toEqual(200); - expect(resDESC.body).toHaveLength(9); + expect(resDESC.body).toHaveLength(10); let sortedDESC = true; @@ -715,7 +715,7 @@ module.exports = () => { ); expect(resASC.statusCode).toEqual(200); - expect(resASC.body).toHaveLength(9); + expect(resASC.body).toHaveLength(10); let sortedASC = true; @@ -740,7 +740,7 @@ module.exports = () => { var res = await Travelling.Group.Users.count('superadmin', '', '', '', userContainer.user1Token); expect(res.statusCode).toEqual(200); - expect(res.body.count).toBe(9); + expect(res.body.count).toBe(10); }); test('Users by group type and ID', async () => { @@ -756,7 +756,7 @@ module.exports = () => { ); expect(res.statusCode).toEqual(200); - expect(res.body).toHaveLength(9); + expect(res.body).toHaveLength(10); }); test('Users count by group type and ID', async () => { @@ -770,7 +770,7 @@ module.exports = () => { ); expect(res.statusCode).toEqual(200); - expect(res.body.count).toBe(9); + expect(res.body.count).toBe(10); }); test('Users by group type and Name', async () => { @@ -786,14 +786,14 @@ module.exports = () => { ); expect(res.statusCode).toEqual(200); - expect(res.body).toHaveLength(9); + expect(res.body).toHaveLength(10); }); - test('Users by group type and Name', async () => { + test('Users count by group type and Name', async () => { var res = await Travelling.Group.Type.Users.count('superadmin', 'group', '', '', '', userContainer.user1Token); expect(res.statusCode).toEqual(200); - expect(res.body.count).toBe(9); + expect(res.body.count).toBe(10); }); }); diff --git a/tests/routes.js b/tests/routes.js index 9a9fea04..5fc74b4a 100644 --- a/tests/routes.js +++ b/tests/routes.js @@ -1,5 +1,5 @@ const config = require('../include/utils/config'); -const { Travelling } = require('../sdk/node')('http://127.0.0.1:6969/' + config.serviceName,{ +const { Travelling } = require('../sdk/node')('http://127.0.0.1:6969/' + config.serviceName, { resolveWithFullResponse: true }); var userContainer = require('./include/UserContainer.js'); @@ -69,6 +69,67 @@ module.exports = () => { expect(res.body.params).toEqual({ param1: 'routes', param2: 'group5' }); }); + test('[GET] redirect route - to health check with unauthenticated user', async () => { + const originalVal = config.misc.deniedRedirect; + + // Set deniedRedirect to false for this test + config.misc.deniedRedirect = false; + + await Travelling.Group.addRoute( + { + method: '*', + route: '/test-domain-redirect', + name: 'test-domain-redirect', + domain: '*', + redirect: 'http://example.com' + }, + 'group6', + accessToken + ); + + var res = await fasq.request({ + method: 'GET', + resolveWithFullResponse: true, + simple: false, + uri: 'http://127.0.0.1:6969/test-domain-redirect', + authorization: { + bearer: '' + } + }); + + config.misc.deniedRedirect = originalVal; + + expect(res.body).not.toBe('Access Denied'); + expect(res.body.includes('html')).toBe(true); + expect(res.statusCode).toEqual(200); + }); + + test('[GET] access denied on route with no redirect', async () => { + await Travelling.Group.addRoute( + { + method: '*', + route: '/test-domain-nada', + name: 'test-domain-nada', + domain: '*' + }, + 'group6', + accessToken + ); + + var res = await fasq.request({ + method: 'GET', + resolveWithFullResponse: true, + simple: false, + uri: 'http://127.0.0.1:6969/test-domain-nada', + authorization: { + bearer: userContainer.user1Token // User1 shouldnt have group 6 + } + }); + + expect(res.statusCode).toEqual(401); + expect(res.body).toBe('Access Denied'); + }); + test('[POST] with ID and Permission in Query Params HTTP', async () => { await Travelling.Group.addRoute( {