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

Commit e173e6d

Browse files
committed
MINOR: Add SSO create user route(#674)
* create-user route * email_impersonation in project access token
1 parent a6fc713 commit e173e6d

21 files changed

+413
-220
lines changed

.openapi-generator/FILES

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ docs/ComponentsParentRequest.md
3030
docs/CreateBuildingByNameRequest.md
3131
docs/CreateModelRequest.md
3232
docs/CreateMultiPageModelRequest.md
33+
docs/CreateUserRequest.md
3334
docs/DetailedExtensions.md
3435
docs/Direction.md
3536
docs/DirectionRequest.md
@@ -110,7 +111,6 @@ docs/PatchedPinRequest.md
110111
docs/PatchedPositioningPlanRequest.md
111112
docs/PatchedPriorityRequest.md
112113
docs/PatchedProcessorHandlerRequest.md
113-
docs/PatchedProjectAccessTokenRequest.md
114114
docs/PatchedProjectRequest.md
115115
docs/PatchedPropertyDefinitionRequest.md
116116
docs/PatchedPropertyRequest.md
@@ -189,6 +189,7 @@ docs/RawSystemRequest.md
189189
docs/RawUnit.md
190190
docs/RawUnitRequest.md
191191
docs/RecursiveFolderChildren.md
192+
docs/SelectUserRequest.md
192193
docs/SelfBcfUser.md
193194
docs/SelfUser.md
194195
docs/ShortUser.md
@@ -279,6 +280,7 @@ src/model/ComponentsParentRequest.js
279280
src/model/CreateBuildingByNameRequest.js
280281
src/model/CreateModelRequest.js
281282
src/model/CreateMultiPageModelRequest.js
283+
src/model/CreateUserRequest.js
282284
src/model/DetailedExtensions.js
283285
src/model/Direction.js
284286
src/model/DirectionRequest.js
@@ -357,7 +359,6 @@ src/model/PatchedPinRequest.js
357359
src/model/PatchedPositioningPlanRequest.js
358360
src/model/PatchedPriorityRequest.js
359361
src/model/PatchedProcessorHandlerRequest.js
360-
src/model/PatchedProjectAccessTokenRequest.js
361362
src/model/PatchedProjectRequest.js
362363
src/model/PatchedPropertyDefinitionRequest.js
363364
src/model/PatchedPropertyRequest.js
@@ -436,6 +437,7 @@ src/model/RawSystemRequest.js
436437
src/model/RawUnit.js
437438
src/model/RawUnitRequest.js
438439
src/model/RecursiveFolderChildren.js
440+
src/model/SelectUserRequest.js
439441
src/model/SelfBcfUser.js
440442
src/model/SelfUser.js
441443
src/model/ShortUser.js
@@ -520,6 +522,7 @@ test/model/ComponentsParentRequest.spec.js
520522
test/model/CreateBuildingByNameRequest.spec.js
521523
test/model/CreateModelRequest.spec.js
522524
test/model/CreateMultiPageModelRequest.spec.js
525+
test/model/CreateUserRequest.spec.js
523526
test/model/DetailedExtensions.spec.js
524527
test/model/Direction.spec.js
525528
test/model/DirectionRequest.spec.js
@@ -598,7 +601,6 @@ test/model/PatchedPinRequest.spec.js
598601
test/model/PatchedPositioningPlanRequest.spec.js
599602
test/model/PatchedPriorityRequest.spec.js
600603
test/model/PatchedProcessorHandlerRequest.spec.js
601-
test/model/PatchedProjectAccessTokenRequest.spec.js
602604
test/model/PatchedProjectRequest.spec.js
603605
test/model/PatchedPropertyDefinitionRequest.spec.js
604606
test/model/PatchedPropertyRequest.spec.js
@@ -677,6 +679,7 @@ test/model/RawSystemRequest.spec.js
677679
test/model/RawUnit.spec.js
678680
test/model/RawUnitRequest.spec.js
679681
test/model/RecursiveFolderChildren.spec.js
682+
test/model/SelectUserRequest.spec.js
680683
test/model/SelfBcfUser.spec.js
681684
test/model/SelfUser.spec.js
682685
test/model/ShortUser.spec.js

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,6 @@ Class | Method | HTTP request | Description
306306
*bimdata.CollaborationApi* | [**updateManageGroup**](docs/CollaborationApi.md#updateManageGroup) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/group/{id} | Update some fields of a group
307307
*bimdata.CollaborationApi* | [**updatePreviewFile**](docs/CollaborationApi.md#updatePreviewFile) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/document/{id}/preview-file | Update preview of the document
308308
*bimdata.CollaborationApi* | [**updateProject**](docs/CollaborationApi.md#updateProject) | **PATCH** /cloud/{cloud_pk}/project/{id} | Update some fields of a project
309-
*bimdata.CollaborationApi* | [**updateProjectAccessToken**](docs/CollaborationApi.md#updateProjectAccessToken) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/access-token/{token} | Update some fields of a token
310309
*bimdata.CollaborationApi* | [**updateProjectUser**](docs/CollaborationApi.md#updateProjectUser) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/user/{id} | Change the user role in the cloud
311310
*bimdata.CollaborationApi* | [**updateTag**](docs/CollaborationApi.md#updateTag) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/tag/{id} | Update some fields of the tag
312311
*bimdata.CollaborationApi* | [**updateValidation**](docs/CollaborationApi.md#updateValidation) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/document/{document_pk}/visa/{visa_pk}/validation/{id} | Update the validator of validation
@@ -607,6 +606,7 @@ Class | Method | HTTP request | Description
607606
*bimdata.ModelApi* | [**updateZone**](docs/ModelApi.md#updateZone) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/zone/{id} | Update some fields of a zone
608607
*bimdata.ModelApi* | [**updateZoneSpace**](docs/ModelApi.md#updateZoneSpace) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/zone/{zone_pk}/space/{id} | Update some fields of a space
609608
*bimdata.SsoApi* | [**acceptInvitation**](docs/SsoApi.md#acceptInvitation) | **POST** /identity-provider/invitation/{id}/accept | Accept an invitation
609+
*bimdata.SsoApi* | [**createUser**](docs/SsoApi.md#createUser) | **POST** /identity-provider/user | Create a user
610610
*bimdata.SsoApi* | [**deleteUser**](docs/SsoApi.md#deleteUser) | **DELETE** /identity-provider/user | Delete user from BIMData
611611
*bimdata.SsoApi* | [**denyInvitation**](docs/SsoApi.md#denyInvitation) | **POST** /identity-provider/invitation/{id}/deny | Deny an invitation
612612
*bimdata.SsoApi* | [**getInvitation**](docs/SsoApi.md#getInvitation) | **GET** /identity-provider/invitation/{id} | Retrieve an invitation
@@ -647,6 +647,7 @@ Class | Method | HTTP request | Description
647647
- [bimdata.CreateBuildingByNameRequest](docs/CreateBuildingByNameRequest.md)
648648
- [bimdata.CreateModelRequest](docs/CreateModelRequest.md)
649649
- [bimdata.CreateMultiPageModelRequest](docs/CreateMultiPageModelRequest.md)
650+
- [bimdata.CreateUserRequest](docs/CreateUserRequest.md)
650651
- [bimdata.DetailedExtensions](docs/DetailedExtensions.md)
651652
- [bimdata.Direction](docs/Direction.md)
652653
- [bimdata.DirectionRequest](docs/DirectionRequest.md)
@@ -725,7 +726,6 @@ Class | Method | HTTP request | Description
725726
- [bimdata.PatchedPositioningPlanRequest](docs/PatchedPositioningPlanRequest.md)
726727
- [bimdata.PatchedPriorityRequest](docs/PatchedPriorityRequest.md)
727728
- [bimdata.PatchedProcessorHandlerRequest](docs/PatchedProcessorHandlerRequest.md)
728-
- [bimdata.PatchedProjectAccessTokenRequest](docs/PatchedProjectAccessTokenRequest.md)
729729
- [bimdata.PatchedProjectRequest](docs/PatchedProjectRequest.md)
730730
- [bimdata.PatchedPropertyDefinitionRequest](docs/PatchedPropertyDefinitionRequest.md)
731731
- [bimdata.PatchedPropertyRequest](docs/PatchedPropertyRequest.md)
@@ -804,6 +804,7 @@ Class | Method | HTTP request | Description
804804
- [bimdata.RawUnit](docs/RawUnit.md)
805805
- [bimdata.RawUnitRequest](docs/RawUnitRequest.md)
806806
- [bimdata.RecursiveFolderChildren](docs/RecursiveFolderChildren.md)
807+
- [bimdata.SelectUserRequest](docs/SelectUserRequest.md)
807808
- [bimdata.SelfBcfUser](docs/SelfBcfUser.md)
808809
- [bimdata.SelfUser](docs/SelfUser.md)
809810
- [bimdata.ShortUser](docs/ShortUser.md)

docs/CollaborationApi.md

Lines changed: 1 addition & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ Method | HTTP request | Description
106106
[**updateManageGroup**](CollaborationApi.md#updateManageGroup) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/group/{id} | Update some fields of a group
107107
[**updatePreviewFile**](CollaborationApi.md#updatePreviewFile) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/document/{id}/preview-file | Update preview of the document
108108
[**updateProject**](CollaborationApi.md#updateProject) | **PATCH** /cloud/{cloud_pk}/project/{id} | Update some fields of a project
109-
[**updateProjectAccessToken**](CollaborationApi.md#updateProjectAccessToken) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/access-token/{token} | Update some fields of a token
110109
[**updateProjectUser**](CollaborationApi.md#updateProjectUser) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/user/{id} | Change the user role in the cloud
111110
[**updateTag**](CollaborationApi.md#updateTag) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/tag/{id} | Update some fields of the tag
112111
[**updateValidation**](CollaborationApi.md#updateValidation) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/document/{document_pk}/visa/{visa_pk}/validation/{id} | Update the validator of validation
@@ -956,7 +955,7 @@ Name | Type | Description | Notes
956955
957956
Create a document
958957

959-
Create a document. If the document is one of {'POINT_CLOUD', 'OBJ', 'DWG', 'IFC', 'DXF', 'GLTF'}, a model will be created and attached to this document Required scopes: document:write
958+
Create a document. If the document is one of {'OBJ', 'DWG', 'IFC', 'GLTF', 'DXF', 'POINT_CLOUD'}, a model will be created and attached to this document Required scopes: document:write
960959

961960
### Example
962961

@@ -6745,75 +6744,6 @@ Name | Type | Description | Notes
67456744
- **Accept**: application/json
67466745

67476746

6748-
## updateProjectAccessToken
6749-
6750-
> ProjectAccessToken updateProjectAccessToken(cloudPk, projectPk, token, opts)
6751-
6752-
Update some fields of a token
6753-
6754-
You can update the expiration date field Required scopes: org:manage
6755-
6756-
### Example
6757-
6758-
```javascript
6759-
import bimdata from '@bimdata/bimdata-api-client';
6760-
let defaultClient = bimdata.ApiClient.instance;
6761-
// Configure API key authorization: ApiKey
6762-
let ApiKey = defaultClient.authentications['ApiKey'];
6763-
ApiKey.apiKey = 'YOUR API KEY';
6764-
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
6765-
//ApiKey.apiKeyPrefix = 'Token';
6766-
// Configure OAuth2 access token for authorization: BIMData_Connect
6767-
let BIMData_Connect = defaultClient.authentications['BIMData_Connect'];
6768-
BIMData_Connect.accessToken = 'YOUR ACCESS TOKEN';
6769-
// Configure OAuth2 access token for authorization: BIMData_Connect
6770-
let BIMData_Connect = defaultClient.authentications['BIMData_Connect'];
6771-
BIMData_Connect.accessToken = 'YOUR ACCESS TOKEN';
6772-
// Configure API key authorization: Bearer
6773-
let Bearer = defaultClient.authentications['Bearer'];
6774-
Bearer.apiKey = 'YOUR API KEY';
6775-
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
6776-
//Bearer.apiKeyPrefix = 'Token';
6777-
6778-
let apiInstance = new bimdata.CollaborationApi();
6779-
let cloudPk = 56; // Number | A unique integer value identifying this cloud.
6780-
let projectPk = 56; // Number | A unique integer value identifying this project.
6781-
let token = "token_example"; // String |
6782-
let opts = {
6783-
'patchedProjectAccessTokenRequest': new bimdata.PatchedProjectAccessTokenRequest() // PatchedProjectAccessTokenRequest |
6784-
};
6785-
apiInstance.updateProjectAccessToken(cloudPk, projectPk, token, opts).then((data) => {
6786-
console.log('API called successfully. Returned data: ' + data);
6787-
}, (error) => {
6788-
console.error(error);
6789-
});
6790-
6791-
```
6792-
6793-
### Parameters
6794-
6795-
6796-
Name | Type | Description | Notes
6797-
------------- | ------------- | ------------- | -------------
6798-
**cloudPk** | **Number**| A unique integer value identifying this cloud. |
6799-
**projectPk** | **Number**| A unique integer value identifying this project. |
6800-
**token** | **String**| |
6801-
**patchedProjectAccessTokenRequest** | [**PatchedProjectAccessTokenRequest**](PatchedProjectAccessTokenRequest.md)| | [optional]
6802-
6803-
### Return type
6804-
6805-
[**ProjectAccessToken**](ProjectAccessToken.md)
6806-
6807-
### Authorization
6808-
6809-
[ApiKey](../README.md#ApiKey), [BIMData_Connect](../README.md#BIMData_Connect), [BIMData_Connect](../README.md#BIMData_Connect), [Bearer](../README.md#Bearer)
6810-
6811-
### HTTP request headers
6812-
6813-
- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
6814-
- **Accept**: application/json
6815-
6816-
68176747
## updateProjectUser
68186748

68196749
> UserProject updateProjectUser(cloudPk, id, projectPk, opts)

docs/CreateUserRequest.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# bimdata.CreateUserRequest
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**email** | **String** | |
8+
**firstname** | **String** | |
9+
**lastname** | **String** | |
10+
**profilePicture** | **String** | | [optional]
11+
12+

docs/PatchedProjectAccessTokenRequest.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

docs/ProjectAccessToken.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
77
**token** | **String** | | [readonly]
88
**scopes** | **[String]** | |
99
**expiresAt** | **Date** | | [optional]
10+
**emailImpersonation** | **String** | If the request is made from an SSO application, you can link the token to a user. All calls made with the token will populate created_by fields with the user. If the user don't have access to some data, the token won't have access. | [optional]
1011

1112

1213

docs/ProjectAccessTokenRequest.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**scopes** | **[String]** | |
88
**expiresAt** | **Date** | | [optional]
9+
**emailImpersonation** | **String** | If the request is made from an SSO application, you can link the token to a user. All calls made with the token will populate created_by fields with the user. If the user don't have access to some data, the token won't have access. | [optional]
910

1011

1112

docs/SelectUserRequest.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# bimdata.SelectUserRequest
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**email** | **String** | |
8+
9+

docs/SsoApi.md

Lines changed: 70 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ All URIs are relative to *http://localhost*
55
Method | HTTP request | Description
66
------------- | ------------- | -------------
77
[**acceptInvitation**](SsoApi.md#acceptInvitation) | **POST** /identity-provider/invitation/{id}/accept | Accept an invitation
8+
[**createUser**](SsoApi.md#createUser) | **POST** /identity-provider/user | Create a user
89
[**deleteUser**](SsoApi.md#deleteUser) | **DELETE** /identity-provider/user | Delete user from BIMData
910
[**denyInvitation**](SsoApi.md#denyInvitation) | **POST** /identity-provider/invitation/{id}/deny | Deny an invitation
1011
[**getInvitation**](SsoApi.md#getInvitation) | **GET** /identity-provider/invitation/{id} | Retrieve an invitation
@@ -73,9 +74,70 @@ null (empty response body)
7374
- **Accept**: Not defined
7475

7576

77+
## createUser
78+
79+
> ShortUser createUser(createUserRequest)
80+
81+
Create a user
82+
83+
Create a user, linked to the provider. This route is only useful when used with `ProjetAccessToken`s
84+
85+
### Example
86+
87+
```javascript
88+
import bimdata from '@bimdata/bimdata-api-client';
89+
let defaultClient = bimdata.ApiClient.instance;
90+
// Configure API key authorization: ApiKey
91+
let ApiKey = defaultClient.authentications['ApiKey'];
92+
ApiKey.apiKey = 'YOUR API KEY';
93+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
94+
//ApiKey.apiKeyPrefix = 'Token';
95+
// Configure OAuth2 access token for authorization: BIMData_Connect
96+
let BIMData_Connect = defaultClient.authentications['BIMData_Connect'];
97+
BIMData_Connect.accessToken = 'YOUR ACCESS TOKEN';
98+
// Configure OAuth2 access token for authorization: BIMData_Connect
99+
let BIMData_Connect = defaultClient.authentications['BIMData_Connect'];
100+
BIMData_Connect.accessToken = 'YOUR ACCESS TOKEN';
101+
// Configure API key authorization: Bearer
102+
let Bearer = defaultClient.authentications['Bearer'];
103+
Bearer.apiKey = 'YOUR API KEY';
104+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
105+
//Bearer.apiKeyPrefix = 'Token';
106+
107+
let apiInstance = new bimdata.SsoApi();
108+
let createUserRequest = new bimdata.CreateUserRequest(); // CreateUserRequest |
109+
apiInstance.createUser(createUserRequest).then((data) => {
110+
console.log('API called successfully. Returned data: ' + data);
111+
}, (error) => {
112+
console.error(error);
113+
});
114+
115+
```
116+
117+
### Parameters
118+
119+
120+
Name | Type | Description | Notes
121+
------------- | ------------- | ------------- | -------------
122+
**createUserRequest** | [**CreateUserRequest**](CreateUserRequest.md)| |
123+
124+
### Return type
125+
126+
[**ShortUser**](ShortUser.md)
127+
128+
### Authorization
129+
130+
[ApiKey](../README.md#ApiKey), [BIMData_Connect](../README.md#BIMData_Connect), [BIMData_Connect](../README.md#BIMData_Connect), [Bearer](../README.md#Bearer)
131+
132+
### HTTP request headers
133+
134+
- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
135+
- **Accept**: application/json
136+
137+
76138
## deleteUser
77139

78-
> deleteUser()
140+
> deleteUser(selectUserRequest)
79141
80142
Delete user from BIMData
81143

@@ -104,7 +166,8 @@ Bearer.apiKey = 'YOUR API KEY';
104166
//Bearer.apiKeyPrefix = 'Token';
105167

106168
let apiInstance = new bimdata.SsoApi();
107-
apiInstance.deleteUser().then(() => {
169+
let selectUserRequest = new bimdata.SelectUserRequest(); // SelectUserRequest |
170+
apiInstance.deleteUser(selectUserRequest).then(() => {
108171
console.log('API called successfully.');
109172
}, (error) => {
110173
console.error(error);
@@ -114,7 +177,10 @@ apiInstance.deleteUser().then(() => {
114177

115178
### Parameters
116179

117-
This endpoint does not need any parameter.
180+
181+
Name | Type | Description | Notes
182+
------------- | ------------- | ------------- | -------------
183+
**selectUserRequest** | [**SelectUserRequest**](SelectUserRequest.md)| |
118184

119185
### Return type
120186

@@ -126,7 +192,7 @@ null (empty response body)
126192

127193
### HTTP request headers
128194

129-
- **Content-Type**: Not defined
195+
- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
130196
- **Accept**: Not defined
131197

132198

0 commit comments

Comments
 (0)