Skip to content
This repository was archived by the owner on Nov 18, 2025. It is now read-only.

Commit c0912f6

Browse files
committed
MINOR: filtering by email for list cloud user and project user
1 parent 595fbeb commit c0912f6

5 files changed

Lines changed: 78 additions & 28 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ Class | Method | HTTP request | Description
234234
*bimdata.CollaborationApi* | [**getCloudInvitations**](docs/CollaborationApi.md#getCloudInvitations) | **GET** /cloud/{cloud_pk}/invitation | Retrieve all pending invitations in the cloud
235235
*bimdata.CollaborationApi* | [**getCloudSize**](docs/CollaborationApi.md#getCloudSize) | **GET** /cloud/{id}/size | Get size of all files in the cloud
236236
*bimdata.CollaborationApi* | [**getCloudUser**](docs/CollaborationApi.md#getCloudUser) | **GET** /cloud/{cloud_pk}/user/{id} | Retrieve a user in a cloud
237-
*bimdata.CollaborationApi* | [**getCloudUsers**](docs/CollaborationApi.md#getCloudUsers) | **GET** /cloud/{cloud_pk}/user | Retrieve all users in a cloud
237+
*bimdata.CollaborationApi* | [**getCloudUsers**](docs/CollaborationApi.md#getCloudUsers) | **GET** /cloud/{cloud_pk}/user | Retrieve all users in a cloud, or a list with a filter by email
238238
*bimdata.CollaborationApi* | [**getClouds**](docs/CollaborationApi.md#getClouds) | **GET** /cloud | Retrieve all clouds
239239
*bimdata.CollaborationApi* | [**getDocument**](docs/CollaborationApi.md#getDocument) | **GET** /cloud/{cloud_pk}/project/{project_pk}/document/{id} | Retrieve a document
240240
*bimdata.CollaborationApi* | [**getDocuments**](docs/CollaborationApi.md#getDocuments) | **GET** /cloud/{cloud_pk}/project/{project_pk}/document | Retrieve all documents
@@ -246,7 +246,7 @@ Class | Method | HTTP request | Description
246246
*bimdata.CollaborationApi* | [**getProjectSubTree**](docs/CollaborationApi.md#getProjectSubTree) | **GET** /cloud/{cloud_pk}/project/subtree | Retrieve the complete projects tree of the cloud
247247
*bimdata.CollaborationApi* | [**getProjectTree**](docs/CollaborationApi.md#getProjectTree) | **GET** /cloud/{cloud_pk}/project/{id}/tree | Retrieve the complete DMS tree
248248
*bimdata.CollaborationApi* | [**getProjectUser**](docs/CollaborationApi.md#getProjectUser) | **GET** /cloud/{cloud_pk}/project/{project_pk}/user/{id} | Retrieve a user in a project
249-
*bimdata.CollaborationApi* | [**getProjectUsers**](docs/CollaborationApi.md#getProjectUsers) | **GET** /cloud/{cloud_pk}/project/{project_pk}/user | Retrieve all users in a project
249+
*bimdata.CollaborationApi* | [**getProjectUsers**](docs/CollaborationApi.md#getProjectUsers) | **GET** /cloud/{cloud_pk}/project/{project_pk}/user | Retrieve all users in a project, or a list with a filter by email
250250
*bimdata.CollaborationApi* | [**getProjects**](docs/CollaborationApi.md#getProjects) | **GET** /cloud/{cloud_pk}/project | Retrieve all projects
251251
*bimdata.CollaborationApi* | [**getSelfProjects**](docs/CollaborationApi.md#getSelfProjects) | **GET** /user/projects | List current user's projects
252252
*bimdata.CollaborationApi* | [**getSelfUser**](docs/CollaborationApi.md#getSelfUser) | **GET** /user | Get info about the current user
@@ -387,7 +387,7 @@ Class | Method | HTTP request | Description
387387
*bimdata.IfcApi* | [**updateZone**](docs/IfcApi.md#updateZone) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/zone/{id} | Update some fields of a zone
388388
*bimdata.IfcApi* | [**updateZoneSpace**](docs/IfcApi.md#updateZoneSpace) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/zone/{zone_pk}/space/{id} | Update some fields of a space
389389
*bimdata.SsoApi* | [**acceptInvitation**](docs/SsoApi.md#acceptInvitation) | **POST** /identity-provider/invitation/{id}/accept | Accept an invitation
390-
*bimdata.SsoApi* | [**deleteUser**](docs/SsoApi.md#deleteUser) | **DELETE** /identity-provider/user | Delete user form BIMData
390+
*bimdata.SsoApi* | [**deleteUser**](docs/SsoApi.md#deleteUser) | **DELETE** /identity-provider/user | Delete user from BIMData
391391
*bimdata.SsoApi* | [**denyInvitation**](docs/SsoApi.md#denyInvitation) | **POST** /identity-provider/invitation/{id}/deny | Deny an invitation
392392
*bimdata.SsoApi* | [**getInvitation**](docs/SsoApi.md#getInvitation) | **GET** /identity-provider/invitation/{id} | Retrieve an invitation
393393
*bimdata.SsoApi* | [**getInvitations**](docs/SsoApi.md#getInvitations) | **GET** /identity-provider/invitation | Retrieve all invitations

docs/CollaborationApi.md

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Method | HTTP request | Description
3232
[**getCloudInvitations**](CollaborationApi.md#getCloudInvitations) | **GET** /cloud/{cloud_pk}/invitation | Retrieve all pending invitations in the cloud
3333
[**getCloudSize**](CollaborationApi.md#getCloudSize) | **GET** /cloud/{id}/size | Get size of all files in the cloud
3434
[**getCloudUser**](CollaborationApi.md#getCloudUser) | **GET** /cloud/{cloud_pk}/user/{id} | Retrieve a user in a cloud
35-
[**getCloudUsers**](CollaborationApi.md#getCloudUsers) | **GET** /cloud/{cloud_pk}/user | Retrieve all users in a cloud
35+
[**getCloudUsers**](CollaborationApi.md#getCloudUsers) | **GET** /cloud/{cloud_pk}/user | Retrieve all users in a cloud, or a list with a filter by email
3636
[**getClouds**](CollaborationApi.md#getClouds) | **GET** /cloud | Retrieve all clouds
3737
[**getDocument**](CollaborationApi.md#getDocument) | **GET** /cloud/{cloud_pk}/project/{project_pk}/document/{id} | Retrieve a document
3838
[**getDocuments**](CollaborationApi.md#getDocuments) | **GET** /cloud/{cloud_pk}/project/{project_pk}/document | Retrieve all documents
@@ -44,7 +44,7 @@ Method | HTTP request | Description
4444
[**getProjectSubTree**](CollaborationApi.md#getProjectSubTree) | **GET** /cloud/{cloud_pk}/project/subtree | Retrieve the complete projects tree of the cloud
4545
[**getProjectTree**](CollaborationApi.md#getProjectTree) | **GET** /cloud/{cloud_pk}/project/{id}/tree | Retrieve the complete DMS tree
4646
[**getProjectUser**](CollaborationApi.md#getProjectUser) | **GET** /cloud/{cloud_pk}/project/{project_pk}/user/{id} | Retrieve a user in a project
47-
[**getProjectUsers**](CollaborationApi.md#getProjectUsers) | **GET** /cloud/{cloud_pk}/project/{project_pk}/user | Retrieve all users in a project
47+
[**getProjectUsers**](CollaborationApi.md#getProjectUsers) | **GET** /cloud/{cloud_pk}/project/{project_pk}/user | Retrieve all users in a project, or a list with a filter by email
4848
[**getProjects**](CollaborationApi.md#getProjects) | **GET** /cloud/{cloud_pk}/project | Retrieve all projects
4949
[**getSelfProjects**](CollaborationApi.md#getSelfProjects) | **GET** /user/projects | List current user's projects
5050
[**getSelfUser**](CollaborationApi.md#getSelfUser) | **GET** /user | Get info about the current user
@@ -1747,11 +1747,11 @@ Name | Type | Description | Notes
17471747

17481748
## getCloudUsers
17491749

1750-
> [User] getCloudUsers(cloudPk)
1750+
> [User] getCloudUsers(cloudPk, opts)
17511751
1752-
Retrieve all users in a cloud
1752+
Retrieve all users in a cloud, or a list with a filter by email
17531753

1754-
Only administrators can see all cloud members Required scopes: cloud:read
1754+
Only administrators can see cloud members. Required scopes: cloud:read
17551755

17561756
### Example
17571757

@@ -1772,7 +1772,13 @@ client_credentials.accessToken = 'YOUR ACCESS TOKEN';
17721772

17731773
let apiInstance = new bimdata.CollaborationApi();
17741774
let cloudPk = "cloudPk_example"; // String |
1775-
apiInstance.getCloudUsers(cloudPk).then((data) => {
1775+
let opts = {
1776+
'email': "email_example", // String | Filter the returned list by email
1777+
'emailContains': "emailContains_example", // String | Filter the returned list by email__contains
1778+
'emailStartswith': "emailStartswith_example", // String | Filter the returned list by email__startswith
1779+
'emailEndswith': "emailEndswith_example" // String | Filter the returned list by email__endswith
1780+
};
1781+
apiInstance.getCloudUsers(cloudPk, opts).then((data) => {
17761782
console.log('API called successfully. Returned data: ' + data);
17771783
}, (error) => {
17781784
console.error(error);
@@ -1786,6 +1792,10 @@ apiInstance.getCloudUsers(cloudPk).then((data) => {
17861792
Name | Type | Description | Notes
17871793
------------- | ------------- | ------------- | -------------
17881794
**cloudPk** | **String**| |
1795+
**email** | **String**| Filter the returned list by email | [optional]
1796+
**emailContains** | **String**| Filter the returned list by email__contains | [optional]
1797+
**emailStartswith** | **String**| Filter the returned list by email__startswith | [optional]
1798+
**emailEndswith** | **String**| Filter the returned list by email__endswith | [optional]
17891799

17901800
### Return type
17911801

@@ -2439,9 +2449,9 @@ Name | Type | Description | Notes
24392449

24402450
## getProjectUsers
24412451

2442-
> [User] getProjectUsers(cloudPk, projectPk)
2452+
> [User] getProjectUsers(cloudPk, projectPk, opts)
24432453
2444-
Retrieve all users in a project
2454+
Retrieve all users in a project, or a list with a filter by email
24452455

24462456
Each member of a project can see other members of the project Required scopes: cloud:read
24472457

@@ -2465,7 +2475,13 @@ client_credentials.accessToken = 'YOUR ACCESS TOKEN';
24652475
let apiInstance = new bimdata.CollaborationApi();
24662476
let cloudPk = "cloudPk_example"; // String |
24672477
let projectPk = "projectPk_example"; // String |
2468-
apiInstance.getProjectUsers(cloudPk, projectPk).then((data) => {
2478+
let opts = {
2479+
'email': "email_example", // String | Filter the returned list by email
2480+
'emailContains': "emailContains_example", // String | Filter the returned list by email__contains
2481+
'emailStartswith': "emailStartswith_example", // String | Filter the returned list by email__startswith
2482+
'emailEndswith': "emailEndswith_example" // String | Filter the returned list by email__endswith
2483+
};
2484+
apiInstance.getProjectUsers(cloudPk, projectPk, opts).then((data) => {
24692485
console.log('API called successfully. Returned data: ' + data);
24702486
}, (error) => {
24712487
console.error(error);
@@ -2480,6 +2496,10 @@ Name | Type | Description | Notes
24802496
------------- | ------------- | ------------- | -------------
24812497
**cloudPk** | **String**| |
24822498
**projectPk** | **String**| |
2499+
**email** | **String**| Filter the returned list by email | [optional]
2500+
**emailContains** | **String**| Filter the returned list by email__contains | [optional]
2501+
**emailStartswith** | **String**| Filter the returned list by email__startswith | [optional]
2502+
**emailEndswith** | **String**| Filter the returned list by email__endswith | [optional]
24832503

24842504
### Return type
24852505

docs/SsoApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ All URIs are relative to *https://api.bimdata.io*
55
Method | HTTP request | Description
66
------------- | ------------- | -------------
77
[**acceptInvitation**](SsoApi.md#acceptInvitation) | **POST** /identity-provider/invitation/{id}/accept | Accept an invitation
8-
[**deleteUser**](SsoApi.md#deleteUser) | **DELETE** /identity-provider/user | Delete user form BIMData
8+
[**deleteUser**](SsoApi.md#deleteUser) | **DELETE** /identity-provider/user | Delete user from BIMData
99
[**denyInvitation**](SsoApi.md#denyInvitation) | **POST** /identity-provider/invitation/{id}/deny | Deny an invitation
1010
[**getInvitation**](SsoApi.md#getInvitation) | **GET** /identity-provider/invitation/{id} | Retrieve an invitation
1111
[**getInvitations**](SsoApi.md#getInvitations) | **GET** /identity-provider/invitation | Retrieve all invitations
@@ -72,7 +72,7 @@ null (empty response body)
7272

7373
> deleteUser(data)
7474
75-
Delete user form BIMData
75+
Delete user from BIMData
7676

7777
NON HANDLED EDGE CASE: The user has been created on the identity provider (exists on the IDP) The user (or an app) has requested an access token (exists on keycloak) But the user has never used the API (doesn't exist on the API) So the API can't delete the user and can't forward the call to keycloak so a zombie user will stay on keycloak
7878

src/api/CollaborationApi.js

Lines changed: 42 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1728,12 +1728,18 @@ export default class CollaborationApi {
17281728

17291729

17301730
/**
1731-
* Retrieve all users in a cloud
1732-
* Only administrators can see all cloud members Required scopes: cloud:read
1731+
* Retrieve all users in a cloud, or a list with a filter by email
1732+
* Only administrators can see cloud members. Required scopes: cloud:read
17331733
* @param {String} cloudPk
1734+
* @param {Object} opts Optional parameters
1735+
* @param {String} opts.email Filter the returned list by email
1736+
* @param {String} opts.emailContains Filter the returned list by email__contains
1737+
* @param {String} opts.emailStartswith Filter the returned list by email__startswith
1738+
* @param {String} opts.emailEndswith Filter the returned list by email__endswith
17341739
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/User>} and HTTP response
17351740
*/
1736-
getCloudUsersWithHttpInfo(cloudPk) {
1741+
getCloudUsersWithHttpInfo(cloudPk, opts) {
1742+
opts = opts || {};
17371743
let postBody = null;
17381744
// verify the required parameter 'cloudPk' is set
17391745
if (cloudPk === undefined || cloudPk === null) {
@@ -1744,6 +1750,10 @@ export default class CollaborationApi {
17441750
'cloud_pk': cloudPk
17451751
};
17461752
let queryParams = {
1753+
'email': opts['email'],
1754+
'email__contains': opts['emailContains'],
1755+
'email__startswith': opts['emailStartswith'],
1756+
'email__endswith': opts['emailEndswith']
17471757
};
17481758
let headerParams = {
17491759
};
@@ -1762,13 +1772,18 @@ export default class CollaborationApi {
17621772
}
17631773

17641774
/**
1765-
* Retrieve all users in a cloud
1766-
* Only administrators can see all cloud members Required scopes: cloud:read
1775+
* Retrieve all users in a cloud, or a list with a filter by email
1776+
* Only administrators can see cloud members. Required scopes: cloud:read
17671777
* @param {String} cloudPk
1778+
* @param {Object} opts Optional parameters
1779+
* @param {String} opts.email Filter the returned list by email
1780+
* @param {String} opts.emailContains Filter the returned list by email__contains
1781+
* @param {String} opts.emailStartswith Filter the returned list by email__startswith
1782+
* @param {String} opts.emailEndswith Filter the returned list by email__endswith
17681783
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/User>}
17691784
*/
1770-
getCloudUsers(cloudPk) {
1771-
return this.getCloudUsersWithHttpInfo(cloudPk)
1785+
getCloudUsers(cloudPk, opts) {
1786+
return this.getCloudUsersWithHttpInfo(cloudPk, opts)
17721787
.then(function(response_and_data) {
17731788
return response_and_data.data;
17741789
});
@@ -2381,13 +2396,19 @@ export default class CollaborationApi {
23812396

23822397

23832398
/**
2384-
* Retrieve all users in a project
2399+
* Retrieve all users in a project, or a list with a filter by email
23852400
* Each member of a project can see other members of the project Required scopes: cloud:read
23862401
* @param {String} cloudPk
23872402
* @param {String} projectPk
2403+
* @param {Object} opts Optional parameters
2404+
* @param {String} opts.email Filter the returned list by email
2405+
* @param {String} opts.emailContains Filter the returned list by email__contains
2406+
* @param {String} opts.emailStartswith Filter the returned list by email__startswith
2407+
* @param {String} opts.emailEndswith Filter the returned list by email__endswith
23882408
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/User>} and HTTP response
23892409
*/
2390-
getProjectUsersWithHttpInfo(cloudPk, projectPk) {
2410+
getProjectUsersWithHttpInfo(cloudPk, projectPk, opts) {
2411+
opts = opts || {};
23912412
let postBody = null;
23922413
// verify the required parameter 'cloudPk' is set
23932414
if (cloudPk === undefined || cloudPk === null) {
@@ -2403,6 +2424,10 @@ export default class CollaborationApi {
24032424
'project_pk': projectPk
24042425
};
24052426
let queryParams = {
2427+
'email': opts['email'],
2428+
'email__contains': opts['emailContains'],
2429+
'email__startswith': opts['emailStartswith'],
2430+
'email__endswith': opts['emailEndswith']
24062431
};
24072432
let headerParams = {
24082433
};
@@ -2421,14 +2446,19 @@ export default class CollaborationApi {
24212446
}
24222447

24232448
/**
2424-
* Retrieve all users in a project
2449+
* Retrieve all users in a project, or a list with a filter by email
24252450
* Each member of a project can see other members of the project Required scopes: cloud:read
24262451
* @param {String} cloudPk
24272452
* @param {String} projectPk
2453+
* @param {Object} opts Optional parameters
2454+
* @param {String} opts.email Filter the returned list by email
2455+
* @param {String} opts.emailContains Filter the returned list by email__contains
2456+
* @param {String} opts.emailStartswith Filter the returned list by email__startswith
2457+
* @param {String} opts.emailEndswith Filter the returned list by email__endswith
24282458
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/User>}
24292459
*/
2430-
getProjectUsers(cloudPk, projectPk) {
2431-
return this.getProjectUsersWithHttpInfo(cloudPk, projectPk)
2460+
getProjectUsers(cloudPk, projectPk, opts) {
2461+
return this.getProjectUsersWithHttpInfo(cloudPk, projectPk, opts)
24322462
.then(function(response_and_data) {
24332463
return response_and_data.data;
24342464
});

src/api/SsoApi.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export default class SsoApi {
8585

8686

8787
/**
88-
* Delete user form BIMData
88+
* Delete user from BIMData
8989
* NON HANDLED EDGE CASE: The user has been created on the identity provider (exists on the IDP) The user (or an app) has requested an access token (exists on keycloak) But the user has never used the API (doesn't exist on the API) So the API can't delete the user and can't forward the call to keycloak so a zombie user will stay on keycloak
9090
* @param {module:model/SelectUser} data
9191
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
@@ -118,7 +118,7 @@ export default class SsoApi {
118118
}
119119

120120
/**
121-
* Delete user form BIMData
121+
* Delete user from BIMData
122122
* NON HANDLED EDGE CASE: The user has been created on the identity provider (exists on the IDP) The user (or an app) has requested an access token (exists on keycloak) But the user has never used the API (doesn't exist on the API) So the API can't delete the user and can't forward the call to keycloak so a zombie user will stay on keycloak
123123
* @param {module:model/SelectUser} data
124124
* @return {Promise} a {@link https://www.promisejs.org/|Promise}

0 commit comments

Comments
 (0)