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

Commit 16317dd

Browse files
committed
PATCH: fix serializer user project (#448)
Breaking Change: - key to for GroupUser create view - Route pk for userProject views is now UserProject pk and not FosUser pk Some other change: - fix serializer of userProject for swagger and libs - add missing invitation user project from project and group - fix some test
1 parent 08c85ca commit 16317dd

14 files changed

Lines changed: 241 additions & 405 deletions

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,6 @@ Class | Method | HTTP request | Description
239239
*bimdata.CollaborationApi* | [**fullUpdateManageGroup**](docs/CollaborationApi.md#fullUpdateManageGroup) | **PUT** /cloud/{cloud_pk}/project/{project_pk}/group/{id} | Update all fields of a group
240240
*bimdata.CollaborationApi* | [**fullUpdateProject**](docs/CollaborationApi.md#fullUpdateProject) | **PUT** /cloud/{cloud_pk}/project/{id} | Update all fields of a project
241241
*bimdata.CollaborationApi* | [**fullUpdateProjectAccessToken**](docs/CollaborationApi.md#fullUpdateProjectAccessToken) | **PUT** /cloud/{cloud_pk}/project/{project_pk}/access-token/{token} | Update all fields of a token
242-
*bimdata.CollaborationApi* | [**fullUpdateProjectUser**](docs/CollaborationApi.md#fullUpdateProjectUser) | **PUT** /cloud/{cloud_pk}/project/{project_pk}/user/{id} | Update all fields of a project user
243242
*bimdata.CollaborationApi* | [**getClassification**](docs/CollaborationApi.md#getClassification) | **GET** /cloud/{cloud_pk}/project/{project_pk}/classification/{id} | Retrieve a classification
244243
*bimdata.CollaborationApi* | [**getClassifications**](docs/CollaborationApi.md#getClassifications) | **GET** /cloud/{cloud_pk}/project/{project_pk}/classification | Retrieve all classifications
245244
*bimdata.CollaborationApi* | [**getCloud**](docs/CollaborationApi.md#getCloud) | **GET** /cloud/{id} | Retrieve one cloud
@@ -264,7 +263,6 @@ Class | Method | HTTP request | Description
264263
*bimdata.CollaborationApi* | [**getProjectSize**](docs/CollaborationApi.md#getProjectSize) | **GET** /cloud/{cloud_pk}/project/{id}/size | Get size of all ifc files in the project
265264
*bimdata.CollaborationApi* | [**getProjectSubTree**](docs/CollaborationApi.md#getProjectSubTree) | **GET** /cloud/{cloud_pk}/project/subtree | Retrieve the complete projects tree of the cloud
266265
*bimdata.CollaborationApi* | [**getProjectTree**](docs/CollaborationApi.md#getProjectTree) | **GET** /cloud/{cloud_pk}/project/{id}/tree | Retrieve the complete DMS tree
267-
*bimdata.CollaborationApi* | [**getProjectUser**](docs/CollaborationApi.md#getProjectUser) | **GET** /cloud/{cloud_pk}/project/{project_pk}/user/{id} | Retrieve a user in a project
268266
*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
269267
*bimdata.CollaborationApi* | [**getProjects**](docs/CollaborationApi.md#getProjects) | **GET** /cloud/{cloud_pk}/project | Retrieve all projects
270268
*bimdata.CollaborationApi* | [**getSelfProjects**](docs/CollaborationApi.md#getSelfProjects) | **GET** /user/projects | List current user's projects
@@ -280,7 +278,7 @@ Class | Method | HTTP request | Description
280278
*bimdata.CollaborationApi* | [**updateManageGroup**](docs/CollaborationApi.md#updateManageGroup) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/group/{id} | Update some fields of a group
281279
*bimdata.CollaborationApi* | [**updateProject**](docs/CollaborationApi.md#updateProject) | **PATCH** /cloud/{cloud_pk}/project/{id} | Update some fields of a project
282280
*bimdata.CollaborationApi* | [**updateProjectAccessToken**](docs/CollaborationApi.md#updateProjectAccessToken) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/access-token/{token} | Update some fields of a token
283-
*bimdata.CollaborationApi* | [**updateProjectUser**](docs/CollaborationApi.md#updateProjectUser) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/user/{id} | Update some fields of a project user
281+
*bimdata.CollaborationApi* | [**updateProjectUser**](docs/CollaborationApi.md#updateProjectUser) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/user/{id} | Change the user role in the cloud
284282
*bimdata.CollaborationApi* | [**updateSelfUser**](docs/CollaborationApi.md#updateSelfUser) | **PATCH** /user | Update info of the current user
285283
*bimdata.IfcApi* | [**addIfcErrors**](docs/IfcApi.md#addIfcErrors) | **POST** /cloud/{cloud_pk}/project/{project_pk}/ifc/{id}/errors | Add errors to IFC
286284
*bimdata.IfcApi* | [**bulkDeleteIfcClassifications**](docs/IfcApi.md#bulkDeleteIfcClassifications) | **DELETE** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/classification/list_destroy | Remove all classifications from model's elements
@@ -451,7 +449,6 @@ Class | Method | HTTP request | Description
451449
- [bimdata.Feature](docs/Feature.md)
452450
- [bimdata.Folder](docs/Folder.md)
453451
- [bimdata.FolderGroupPermission](docs/FolderGroupPermission.md)
454-
- [bimdata.FosUserId](docs/FosUserId.md)
455452
- [bimdata.FullTopic](docs/FullTopic.md)
456453
- [bimdata.GroupFolder](docs/GroupFolder.md)
457454
- [bimdata.Ifc](docs/Ifc.md)
@@ -530,6 +527,7 @@ Class | Method | HTTP request | Description
530527
- [bimdata.User](docs/User.md)
531528
- [bimdata.UserCloudUpdate](docs/UserCloudUpdate.md)
532529
- [bimdata.UserProject](docs/UserProject.md)
530+
- [bimdata.UserProjectId](docs/UserProjectId.md)
533531
- [bimdata.UserProjectUpdate](docs/UserProjectUpdate.md)
534532
- [bimdata.ViewSetupHints](docs/ViewSetupHints.md)
535533
- [bimdata.Viewpoint](docs/Viewpoint.md)

docs/CollaborationApi.md

Lines changed: 16 additions & 140 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ Method | HTTP request | Description
3636
[**fullUpdateManageGroup**](CollaborationApi.md#fullUpdateManageGroup) | **PUT** /cloud/{cloud_pk}/project/{project_pk}/group/{id} | Update all fields of a group
3737
[**fullUpdateProject**](CollaborationApi.md#fullUpdateProject) | **PUT** /cloud/{cloud_pk}/project/{id} | Update all fields of a project
3838
[**fullUpdateProjectAccessToken**](CollaborationApi.md#fullUpdateProjectAccessToken) | **PUT** /cloud/{cloud_pk}/project/{project_pk}/access-token/{token} | Update all fields of a token
39-
[**fullUpdateProjectUser**](CollaborationApi.md#fullUpdateProjectUser) | **PUT** /cloud/{cloud_pk}/project/{project_pk}/user/{id} | Update all fields of a project user
4039
[**getClassification**](CollaborationApi.md#getClassification) | **GET** /cloud/{cloud_pk}/project/{project_pk}/classification/{id} | Retrieve a classification
4140
[**getClassifications**](CollaborationApi.md#getClassifications) | **GET** /cloud/{cloud_pk}/project/{project_pk}/classification | Retrieve all classifications
4241
[**getCloud**](CollaborationApi.md#getCloud) | **GET** /cloud/{id} | Retrieve one cloud
@@ -61,7 +60,6 @@ Method | HTTP request | Description
6160
[**getProjectSize**](CollaborationApi.md#getProjectSize) | **GET** /cloud/{cloud_pk}/project/{id}/size | Get size of all ifc files in the project
6261
[**getProjectSubTree**](CollaborationApi.md#getProjectSubTree) | **GET** /cloud/{cloud_pk}/project/subtree | Retrieve the complete projects tree of the cloud
6362
[**getProjectTree**](CollaborationApi.md#getProjectTree) | **GET** /cloud/{cloud_pk}/project/{id}/tree | Retrieve the complete DMS tree
64-
[**getProjectUser**](CollaborationApi.md#getProjectUser) | **GET** /cloud/{cloud_pk}/project/{project_pk}/user/{id} | Retrieve a user in a project
6563
[**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
6664
[**getProjects**](CollaborationApi.md#getProjects) | **GET** /cloud/{cloud_pk}/project | Retrieve all projects
6765
[**getSelfProjects**](CollaborationApi.md#getSelfProjects) | **GET** /user/projects | List current user's projects
@@ -77,7 +75,7 @@ Method | HTTP request | Description
7775
[**updateManageGroup**](CollaborationApi.md#updateManageGroup) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/group/{id} | Update some fields of a group
7876
[**updateProject**](CollaborationApi.md#updateProject) | **PATCH** /cloud/{cloud_pk}/project/{id} | Update some fields of a project
7977
[**updateProjectAccessToken**](CollaborationApi.md#updateProjectAccessToken) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/access-token/{token} | Update some fields of a token
80-
[**updateProjectUser**](CollaborationApi.md#updateProjectUser) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/user/{id} | Update some fields of a project user
78+
[**updateProjectUser**](CollaborationApi.md#updateProjectUser) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/user/{id} | Change the user role in the cloud
8179
[**updateSelfUser**](CollaborationApi.md#updateSelfUser) | **PATCH** /user | Update info of the current user
8280

8381

@@ -88,7 +86,7 @@ Method | HTTP request | Description
8886
8987
Add a user to a group
9088

91-
Add a user to a group. Must be an admin of the project Required scopes: org:manage
89+
Add a userproject to a group. Must be an admin of the project Required scopes: org:manage
9290

9391
### Example
9492

@@ -111,7 +109,7 @@ let apiInstance = new bimdata.CollaborationApi();
111109
let cloudPk = "cloudPk_example"; // String |
112110
let groupPk = "groupPk_example"; // String |
113111
let projectPk = "projectPk_example"; // String |
114-
let data = new bimdata.FosUserId(); // FosUserId |
112+
let data = new bimdata.UserProjectId(); // UserProjectId |
115113
apiInstance.addGroupMember(cloudPk, groupPk, projectPk, data).then((data) => {
116114
console.log('API called successfully. Returned data: ' + data);
117115
}, (error) => {
@@ -128,7 +126,7 @@ Name | Type | Description | Notes
128126
**cloudPk** | **String**| |
129127
**groupPk** | **String**| |
130128
**projectPk** | **String**| |
131-
**data** | [**FosUserId**](FosUserId.md)| |
129+
**data** | [**UserProjectId**](UserProjectId.md)| |
132130

133131
### Return type
134132

@@ -1166,7 +1164,7 @@ null (empty response body)
11661164
11671165
Delete a user from a group
11681166

1169-
Delete a user from a group. Must be an admin of the project Required scopes: org:manage
1167+
Delete a userproject from a group. Id is the userproject_id. Must be an admin of the project. Required scopes: org:manage
11701168

11711169
### Example
11721170

@@ -1188,7 +1186,7 @@ client_credentials.accessToken = 'YOUR ACCESS TOKEN';
11881186
let apiInstance = new bimdata.CollaborationApi();
11891187
let cloudPk = "cloudPk_example"; // String |
11901188
let groupPk = "groupPk_example"; // String |
1191-
let id = 56; // Number | A unique integer value identifying this fos user.
1189+
let id = "id_example"; // String |
11921190
let projectPk = "projectPk_example"; // String |
11931191
apiInstance.deleteGroupMember(cloudPk, groupPk, id, projectPk).then(() => {
11941192
console.log('API called successfully.');
@@ -1205,7 +1203,7 @@ Name | Type | Description | Notes
12051203
------------- | ------------- | ------------- | -------------
12061204
**cloudPk** | **String**| |
12071205
**groupPk** | **String**| |
1208-
**id** | **Number**| A unique integer value identifying this fos user. |
1206+
**id** | **String**| |
12091207
**projectPk** | **String**| |
12101208

12111209
### Return type
@@ -1427,7 +1425,7 @@ client_credentials.accessToken = 'YOUR ACCESS TOKEN';
14271425

14281426
let apiInstance = new bimdata.CollaborationApi();
14291427
let cloudPk = "cloudPk_example"; // String |
1430-
let id = 56; // Number | A unique integer value identifying this fos user.
1428+
let id = "id_example"; // String |
14311429
let projectPk = "projectPk_example"; // String |
14321430
apiInstance.deleteProjectUser(cloudPk, id, projectPk).then(() => {
14331431
console.log('API called successfully.');
@@ -1443,7 +1441,7 @@ apiInstance.deleteProjectUser(cloudPk, id, projectPk).then(() => {
14431441
Name | Type | Description | Notes
14441442
------------- | ------------- | ------------- | -------------
14451443
**cloudPk** | **String**| |
1446-
**id** | **Number**| A unique integer value identifying this fos user. |
1444+
**id** | **String**| |
14471445
**projectPk** | **String**| |
14481446

14491447
### Return type
@@ -2030,68 +2028,6 @@ Name | Type | Description | Notes
20302028
- **Accept**: application/json
20312029

20322030

2033-
## fullUpdateProjectUser
2034-
2035-
> User fullUpdateProjectUser(cloudPk, id, projectPk, data)
2036-
2037-
Update all fields of a project user
2038-
2039-
Change the user role in the cloud Required scopes: cloud:manage
2040-
2041-
### Example
2042-
2043-
```javascript
2044-
import bimdata from '@bimdata/bimdata-api-client';
2045-
let defaultClient = bimdata.ApiClient.instance;
2046-
// Configure API key authorization: Bearer
2047-
let Bearer = defaultClient.authentications['Bearer'];
2048-
Bearer.apiKey = 'YOUR API KEY';
2049-
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
2050-
//Bearer.apiKeyPrefix = 'Token';
2051-
// Configure OAuth2 access token for authorization: bimdata_connect
2052-
let bimdata_connect = defaultClient.authentications['bimdata_connect'];
2053-
bimdata_connect.accessToken = 'YOUR ACCESS TOKEN';
2054-
// Configure OAuth2 access token for authorization: client_credentials
2055-
let client_credentials = defaultClient.authentications['client_credentials'];
2056-
client_credentials.accessToken = 'YOUR ACCESS TOKEN';
2057-
2058-
let apiInstance = new bimdata.CollaborationApi();
2059-
let cloudPk = "cloudPk_example"; // String |
2060-
let id = 56; // Number | A unique integer value identifying this fos user.
2061-
let projectPk = "projectPk_example"; // String |
2062-
let data = new bimdata.UserProjectUpdate(); // UserProjectUpdate |
2063-
apiInstance.fullUpdateProjectUser(cloudPk, id, projectPk, data).then((data) => {
2064-
console.log('API called successfully. Returned data: ' + data);
2065-
}, (error) => {
2066-
console.error(error);
2067-
});
2068-
2069-
```
2070-
2071-
### Parameters
2072-
2073-
2074-
Name | Type | Description | Notes
2075-
------------- | ------------- | ------------- | -------------
2076-
**cloudPk** | **String**| |
2077-
**id** | **Number**| A unique integer value identifying this fos user. |
2078-
**projectPk** | **String**| |
2079-
**data** | [**UserProjectUpdate**](UserProjectUpdate.md)| |
2080-
2081-
### Return type
2082-
2083-
[**User**](User.md)
2084-
2085-
### Authorization
2086-
2087-
[Bearer](../README.md#Bearer), [bimdata_connect](../README.md#bimdata_connect), [client_credentials](../README.md#client_credentials)
2088-
2089-
### HTTP request headers
2090-
2091-
- **Content-Type**: application/json
2092-
- **Accept**: application/json
2093-
2094-
20952031
## getClassification
20962032

20972033
> Classification getClassification(cloudPk, id, projectPk)
@@ -3488,69 +3424,9 @@ Name | Type | Description | Notes
34883424
- **Accept**: application/json
34893425

34903426

3491-
## getProjectUser
3492-
3493-
> User getProjectUser(cloudPk, id, projectPk)
3494-
3495-
Retrieve a user in a project
3496-
3497-
Each member of a project can see other members of the project Required scopes: cloud:read, bcf:read
3498-
3499-
### Example
3500-
3501-
```javascript
3502-
import bimdata from '@bimdata/bimdata-api-client';
3503-
let defaultClient = bimdata.ApiClient.instance;
3504-
// Configure API key authorization: Bearer
3505-
let Bearer = defaultClient.authentications['Bearer'];
3506-
Bearer.apiKey = 'YOUR API KEY';
3507-
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
3508-
//Bearer.apiKeyPrefix = 'Token';
3509-
// Configure OAuth2 access token for authorization: bimdata_connect
3510-
let bimdata_connect = defaultClient.authentications['bimdata_connect'];
3511-
bimdata_connect.accessToken = 'YOUR ACCESS TOKEN';
3512-
// Configure OAuth2 access token for authorization: client_credentials
3513-
let client_credentials = defaultClient.authentications['client_credentials'];
3514-
client_credentials.accessToken = 'YOUR ACCESS TOKEN';
3515-
3516-
let apiInstance = new bimdata.CollaborationApi();
3517-
let cloudPk = "cloudPk_example"; // String |
3518-
let id = 56; // Number | A unique integer value identifying this fos user.
3519-
let projectPk = "projectPk_example"; // String |
3520-
apiInstance.getProjectUser(cloudPk, id, projectPk).then((data) => {
3521-
console.log('API called successfully. Returned data: ' + data);
3522-
}, (error) => {
3523-
console.error(error);
3524-
});
3525-
3526-
```
3527-
3528-
### Parameters
3529-
3530-
3531-
Name | Type | Description | Notes
3532-
------------- | ------------- | ------------- | -------------
3533-
**cloudPk** | **String**| |
3534-
**id** | **Number**| A unique integer value identifying this fos user. |
3535-
**projectPk** | **String**| |
3536-
3537-
### Return type
3538-
3539-
[**User**](User.md)
3540-
3541-
### Authorization
3542-
3543-
[Bearer](../README.md#Bearer), [bimdata_connect](../README.md#bimdata_connect), [client_credentials](../README.md#client_credentials)
3544-
3545-
### HTTP request headers
3546-
3547-
- **Content-Type**: Not defined
3548-
- **Accept**: application/json
3549-
3550-
35513427
## getProjectUsers
35523428

3553-
> [User] getProjectUsers(cloudPk, projectPk, opts)
3429+
> [UserProject] getProjectUsers(cloudPk, projectPk, opts)
35543430
35553431
Retrieve all users in a project, or a list with a filter by email
35563432

@@ -3604,7 +3480,7 @@ Name | Type | Description | Notes
36043480

36053481
### Return type
36063482

3607-
[**[User]**](User.md)
3483+
[**[UserProject]**](UserProject.md)
36083484

36093485
### Authorization
36103486

@@ -4448,9 +4324,9 @@ Name | Type | Description | Notes
44484324

44494325
## updateProjectUser
44504326

4451-
> User updateProjectUser(cloudPk, id, projectPk, data)
4327+
> UserProject updateProjectUser(cloudPk, id, projectPk, data)
44524328
4453-
Update some fields of a project user
4329+
Change the user role in the cloud
44544330

44554331
Change the user role in the cloud Required scopes: cloud:manage
44564332

@@ -4473,7 +4349,7 @@ client_credentials.accessToken = 'YOUR ACCESS TOKEN';
44734349

44744350
let apiInstance = new bimdata.CollaborationApi();
44754351
let cloudPk = "cloudPk_example"; // String |
4476-
let id = 56; // Number | A unique integer value identifying this fos user.
4352+
let id = "id_example"; // String |
44774353
let projectPk = "projectPk_example"; // String |
44784354
let data = new bimdata.UserProjectUpdate(); // UserProjectUpdate |
44794355
apiInstance.updateProjectUser(cloudPk, id, projectPk, data).then((data) => {
@@ -4490,13 +4366,13 @@ apiInstance.updateProjectUser(cloudPk, id, projectPk, data).then((data) => {
44904366
Name | Type | Description | Notes
44914367
------------- | ------------- | ------------- | -------------
44924368
**cloudPk** | **String**| |
4493-
**id** | **Number**| A unique integer value identifying this fos user. |
4369+
**id** | **String**| |
44944370
**projectPk** | **String**| |
44954371
**data** | [**UserProjectUpdate**](UserProjectUpdate.md)| |
44964372

44974373
### Return type
44984374

4499-
[**User**](User.md)
4375+
[**UserProject**](UserProject.md)
45004376

45014377
### Authorization
45024378

docs/Size.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7+
**isUnsupervised** | **Boolean** | | [optional] [readonly]
78
**managedBy** | **String** | |
8-
**role** | **String** | |
9+
**role** | **Number** | |
910
**totalSize** | **Number** | | [optional] [readonly]
1011
**smartDataSize** | **Number** | | [optional] [readonly]
1112
**totalSizeAvailable** | **Number** | | [optional] [readonly]
@@ -27,14 +28,3 @@ Name | Type | Description | Notes
2728

2829

2930

30-
31-
## Enum: RoleEnum
32-
33-
34-
* `A` (value: `"A"`)
35-
36-
* `D` (value: `"D"`)
37-
38-
39-
40-

docs/UserProject.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**role** | **Number** | User's role in the project | [optional]
8-
**user** | [**User**](User.md) | | [optional]
9-
**invitation** | [**ProjectInvitation**](ProjectInvitation.md) | | [optional]
10-
**project** | **Number** | |
7+
**id** | **Number** | | [optional] [readonly]
8+
**userId** | **Number** | | [optional] [readonly]
9+
**invitationId** | **Number** | | [optional] [readonly]
10+
**email** | **String** | | [optional] [readonly]
11+
**firstname** | **String** | | [optional] [readonly]
12+
**lastname** | **String** | | [optional] [readonly]
13+
**profilePicture** | **String** | | [optional] [readonly]
14+
**role** | **Number** | | [optional] [readonly]
1115

1216

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# bimdata.FosUserId
1+
# bimdata.UserProjectId
22

33
## Properties
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**userId** | **Number** | |
7+
**userprojectId** | **Number** | |
88

99

0 commit comments

Comments
 (0)