Skip to content

Commit 93f86a5

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

19 files changed

+681
-343
lines changed

.openapi-generator/FILES

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ bimdata_api_client/model/components_parent_request.py
4141
bimdata_api_client/model/create_building_by_name_request.py
4242
bimdata_api_client/model/create_model_request.py
4343
bimdata_api_client/model/create_multi_page_model_request.py
44+
bimdata_api_client/model/create_user_request.py
4445
bimdata_api_client/model/detailed_extensions.py
4546
bimdata_api_client/model/direction.py
4647
bimdata_api_client/model/direction_request.py
@@ -120,7 +121,6 @@ bimdata_api_client/model/patched_pin_request.py
120121
bimdata_api_client/model/patched_positioning_plan_request.py
121122
bimdata_api_client/model/patched_priority_request.py
122123
bimdata_api_client/model/patched_processor_handler_request.py
123-
bimdata_api_client/model/patched_project_access_token_request.py
124124
bimdata_api_client/model/patched_project_request.py
125125
bimdata_api_client/model/patched_property_definition_request.py
126126
bimdata_api_client/model/patched_property_request.py
@@ -198,6 +198,7 @@ bimdata_api_client/model/raw_system_request.py
198198
bimdata_api_client/model/raw_unit.py
199199
bimdata_api_client/model/raw_unit_request.py
200200
bimdata_api_client/model/recursive_folder_children.py
201+
bimdata_api_client/model/select_user_request.py
201202
bimdata_api_client/model/self_bcf_user.py
202203
bimdata_api_client/model/self_user.py
203204
bimdata_api_client/model/short_user.py
@@ -281,6 +282,7 @@ docs/ComponentsParentRequest.md
281282
docs/CreateBuildingByNameRequest.md
282283
docs/CreateModelRequest.md
283284
docs/CreateMultiPageModelRequest.md
285+
docs/CreateUserRequest.md
284286
docs/DetailedExtensions.md
285287
docs/Direction.md
286288
docs/DirectionRequest.md
@@ -362,7 +364,6 @@ docs/PatchedPinRequest.md
362364
docs/PatchedPositioningPlanRequest.md
363365
docs/PatchedPriorityRequest.md
364366
docs/PatchedProcessorHandlerRequest.md
365-
docs/PatchedProjectAccessTokenRequest.md
366367
docs/PatchedProjectRequest.md
367368
docs/PatchedPropertyDefinitionRequest.md
368369
docs/PatchedPropertyRequest.md
@@ -440,6 +441,7 @@ docs/RawSystemRequest.md
440441
docs/RawUnit.md
441442
docs/RawUnitRequest.md
442443
docs/RecursiveFolderChildren.md
444+
docs/SelectUserRequest.md
443445
docs/SelfBcfUser.md
444446
docs/SelfUser.md
445447
docs/ShortUser.md
@@ -526,6 +528,7 @@ test/test_components_parent_request.py
526528
test/test_create_building_by_name_request.py
527529
test/test_create_model_request.py
528530
test/test_create_multi_page_model_request.py
531+
test/test_create_user_request.py
529532
test/test_detailed_extensions.py
530533
test/test_direction.py
531534
test/test_direction_request.py
@@ -607,7 +610,6 @@ test/test_patched_pin_request.py
607610
test/test_patched_positioning_plan_request.py
608611
test/test_patched_priority_request.py
609612
test/test_patched_processor_handler_request.py
610-
test/test_patched_project_access_token_request.py
611613
test/test_patched_project_request.py
612614
test/test_patched_property_definition_request.py
613615
test/test_patched_property_request.py
@@ -685,6 +687,7 @@ test/test_raw_system_request.py
685687
test/test_raw_unit.py
686688
test/test_raw_unit_request.py
687689
test/test_recursive_folder_children.py
690+
test/test_select_user_request.py
688691
test/test_self_bcf_user.py
689692
test/test_self_user.py
690693
test/test_short_user.py

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,6 @@ Class | Method | HTTP request | Description
325325
*CollaborationApi* | [**update_manage_group**](docs/CollaborationApi.md#update_manage_group) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/group/{id} | Update some fields of a group
326326
*CollaborationApi* | [**update_preview_file**](docs/CollaborationApi.md#update_preview_file) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/document/{id}/preview-file | Update preview of the document
327327
*CollaborationApi* | [**update_project**](docs/CollaborationApi.md#update_project) | **PATCH** /cloud/{cloud_pk}/project/{id} | Update some fields of a project
328-
*CollaborationApi* | [**update_project_access_token**](docs/CollaborationApi.md#update_project_access_token) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/access-token/{token} | Update some fields of a token
329328
*CollaborationApi* | [**update_project_user**](docs/CollaborationApi.md#update_project_user) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/user/{id} | Change the user role in the cloud
330329
*CollaborationApi* | [**update_tag**](docs/CollaborationApi.md#update_tag) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/tag/{id} | Update some fields of the tag
331330
*CollaborationApi* | [**update_validation**](docs/CollaborationApi.md#update_validation) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/document/{document_pk}/visa/{visa_pk}/validation/{id} | Update the validator of validation
@@ -626,6 +625,7 @@ Class | Method | HTTP request | Description
626625
*ModelApi* | [**update_zone**](docs/ModelApi.md#update_zone) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/zone/{id} | Update some fields of a zone
627626
*ModelApi* | [**update_zone_space**](docs/ModelApi.md#update_zone_space) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/zone/{zone_pk}/space/{id} | Update some fields of a space
628627
*SsoApi* | [**accept_invitation**](docs/SsoApi.md#accept_invitation) | **POST** /identity-provider/invitation/{id}/accept | Accept an invitation
628+
*SsoApi* | [**create_user**](docs/SsoApi.md#create_user) | **POST** /identity-provider/user | Create a user
629629
*SsoApi* | [**delete_user**](docs/SsoApi.md#delete_user) | **DELETE** /identity-provider/user | Delete user from BIMData
630630
*SsoApi* | [**deny_invitation**](docs/SsoApi.md#deny_invitation) | **POST** /identity-provider/invitation/{id}/deny | Deny an invitation
631631
*SsoApi* | [**get_invitation**](docs/SsoApi.md#get_invitation) | **GET** /identity-provider/invitation/{id} | Retrieve an invitation
@@ -666,6 +666,7 @@ Class | Method | HTTP request | Description
666666
- [CreateBuildingByNameRequest](docs/CreateBuildingByNameRequest.md)
667667
- [CreateModelRequest](docs/CreateModelRequest.md)
668668
- [CreateMultiPageModelRequest](docs/CreateMultiPageModelRequest.md)
669+
- [CreateUserRequest](docs/CreateUserRequest.md)
669670
- [DetailedExtensions](docs/DetailedExtensions.md)
670671
- [Direction](docs/Direction.md)
671672
- [DirectionRequest](docs/DirectionRequest.md)
@@ -745,7 +746,6 @@ Class | Method | HTTP request | Description
745746
- [PatchedPositioningPlanRequest](docs/PatchedPositioningPlanRequest.md)
746747
- [PatchedPriorityRequest](docs/PatchedPriorityRequest.md)
747748
- [PatchedProcessorHandlerRequest](docs/PatchedProcessorHandlerRequest.md)
748-
- [PatchedProjectAccessTokenRequest](docs/PatchedProjectAccessTokenRequest.md)
749749
- [PatchedProjectRequest](docs/PatchedProjectRequest.md)
750750
- [PatchedPropertyDefinitionRequest](docs/PatchedPropertyDefinitionRequest.md)
751751
- [PatchedPropertyRequest](docs/PatchedPropertyRequest.md)
@@ -823,6 +823,7 @@ Class | Method | HTTP request | Description
823823
- [RawUnit](docs/RawUnit.md)
824824
- [RawUnitRequest](docs/RawUnitRequest.md)
825825
- [RecursiveFolderChildren](docs/RecursiveFolderChildren.md)
826+
- [SelectUserRequest](docs/SelectUserRequest.md)
826827
- [SelfBcfUser](docs/SelfBcfUser.md)
827828
- [SelfUser](docs/SelfUser.md)
828829
- [ShortUser](docs/ShortUser.md)

bimdata_api_client/api/collaboration_api.py

Lines changed: 1 addition & 163 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
from bimdata_api_client.model.patched_folder_without_children_request import PatchedFolderWithoutChildrenRequest
4646
from bimdata_api_client.model.patched_group_folder_request import PatchedGroupFolderRequest
4747
from bimdata_api_client.model.patched_group_request import PatchedGroupRequest
48-
from bimdata_api_client.model.patched_project_access_token_request import PatchedProjectAccessTokenRequest
4948
from bimdata_api_client.model.patched_project_request import PatchedProjectRequest
5049
from bimdata_api_client.model.patched_tag_request import PatchedTagRequest
5150
from bimdata_api_client.model.patched_user_cloud_update_request import PatchedUserCloudUpdateRequest
@@ -6790,80 +6789,6 @@ def __init__(self, api_client=None):
67906789
},
67916790
api_client=api_client
67926791
)
6793-
self.update_project_access_token_endpoint = _Endpoint(
6794-
settings={
6795-
'response_type': (ProjectAccessToken,),
6796-
'auth': [
6797-
'ApiKey',
6798-
'BIMData_Connect',
6799-
'BIMData_Connect',
6800-
'Bearer'
6801-
],
6802-
'endpoint_path': '/cloud/{cloud_pk}/project/{project_pk}/access-token/{token}',
6803-
'operation_id': 'update_project_access_token',
6804-
'http_method': 'PATCH',
6805-
'servers': None,
6806-
},
6807-
params_map={
6808-
'all': [
6809-
'cloud_pk',
6810-
'project_pk',
6811-
'token',
6812-
'patched_project_access_token_request',
6813-
],
6814-
'required': [
6815-
'cloud_pk',
6816-
'project_pk',
6817-
'token',
6818-
],
6819-
'nullable': [
6820-
],
6821-
'enum': [
6822-
],
6823-
'validation': [
6824-
]
6825-
},
6826-
root_map={
6827-
'validations': {
6828-
},
6829-
'allowed_values': {
6830-
},
6831-
'openapi_types': {
6832-
'cloud_pk':
6833-
(int,),
6834-
'project_pk':
6835-
(int,),
6836-
'token':
6837-
(str,),
6838-
'patched_project_access_token_request':
6839-
(PatchedProjectAccessTokenRequest,),
6840-
},
6841-
'attribute_map': {
6842-
'cloud_pk': 'cloud_pk',
6843-
'project_pk': 'project_pk',
6844-
'token': 'token',
6845-
},
6846-
'location_map': {
6847-
'cloud_pk': 'path',
6848-
'project_pk': 'path',
6849-
'token': 'path',
6850-
'patched_project_access_token_request': 'body',
6851-
},
6852-
'collection_format_map': {
6853-
}
6854-
},
6855-
headers_map={
6856-
'accept': [
6857-
'application/json'
6858-
],
6859-
'content_type': [
6860-
'application/json',
6861-
'application/x-www-form-urlencoded',
6862-
'multipart/form-data'
6863-
]
6864-
},
6865-
api_client=api_client
6866-
)
68676792
self.update_project_user_endpoint = _Endpoint(
68686793
settings={
68696794
'response_type': (UserProject,),
@@ -8373,7 +8298,7 @@ def create_document(
83738298
):
83748299
"""Create a document # noqa: E501
83758300

8376-
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 # noqa: E501
8301+
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 # noqa: E501
83778302
This method makes a synchronous HTTP request by default. To make an
83788303
asynchronous HTTP request, please pass async_req=True
83798304

@@ -15918,93 +15843,6 @@ def update_project(
1591815843
id
1591915844
return self.update_project_endpoint.call_with_http_info(**kwargs)
1592015845

15921-
def update_project_access_token(
15922-
self,
15923-
cloud_pk,
15924-
project_pk,
15925-
token,
15926-
**kwargs
15927-
):
15928-
"""Update some fields of a token # noqa: E501
15929-
15930-
You can update the expiration date field Required scopes: org:manage # noqa: E501
15931-
This method makes a synchronous HTTP request by default. To make an
15932-
asynchronous HTTP request, please pass async_req=True
15933-
15934-
>>> thread = api.update_project_access_token(cloud_pk, project_pk, token, async_req=True)
15935-
>>> result = thread.get()
15936-
15937-
Args:
15938-
cloud_pk (int): A unique integer value identifying this cloud.
15939-
project_pk (int): A unique integer value identifying this project.
15940-
token (str):
15941-
15942-
Keyword Args:
15943-
patched_project_access_token_request (PatchedProjectAccessTokenRequest): [optional]
15944-
_return_http_data_only (bool): response data without head status
15945-
code and headers. Default is True.
15946-
_preload_content (bool): if False, the urllib3.HTTPResponse object
15947-
will be returned without reading/decoding response data.
15948-
Default is True.
15949-
_request_timeout (int/float/tuple): timeout setting for this request. If
15950-
one number provided, it will be total request timeout. It can also
15951-
be a pair (tuple) of (connection, read) timeouts.
15952-
Default is None.
15953-
_check_input_type (bool): specifies if type checking
15954-
should be done one the data sent to the server.
15955-
Default is True.
15956-
_check_return_type (bool): specifies if type checking
15957-
should be done one the data received from the server.
15958-
Default is True.
15959-
_spec_property_naming (bool): True if the variable names in the input data
15960-
are serialized names, as specified in the OpenAPI document.
15961-
False if the variable names in the input data
15962-
are pythonic names, e.g. snake case (default)
15963-
_content_type (str/None): force body content-type.
15964-
Default is None and content-type will be predicted by allowed
15965-
content-types and body.
15966-
_host_index (int/None): specifies the index of the server
15967-
that we want to use.
15968-
Default is read from the configuration.
15969-
async_req (bool): execute request asynchronously
15970-
15971-
Returns:
15972-
ProjectAccessToken
15973-
If the method is called asynchronously, returns the request
15974-
thread.
15975-
"""
15976-
kwargs['async_req'] = kwargs.get(
15977-
'async_req', False
15978-
)
15979-
kwargs['_return_http_data_only'] = kwargs.get(
15980-
'_return_http_data_only', True
15981-
)
15982-
kwargs['_preload_content'] = kwargs.get(
15983-
'_preload_content', True
15984-
)
15985-
kwargs['_request_timeout'] = kwargs.get(
15986-
'_request_timeout', None
15987-
)
15988-
kwargs['_check_input_type'] = kwargs.get(
15989-
'_check_input_type', True
15990-
)
15991-
kwargs['_check_return_type'] = kwargs.get(
15992-
'_check_return_type', True
15993-
)
15994-
kwargs['_spec_property_naming'] = kwargs.get(
15995-
'_spec_property_naming', False
15996-
)
15997-
kwargs['_content_type'] = kwargs.get(
15998-
'_content_type')
15999-
kwargs['_host_index'] = kwargs.get('_host_index')
16000-
kwargs['cloud_pk'] = \
16001-
cloud_pk
16002-
kwargs['project_pk'] = \
16003-
project_pk
16004-
kwargs['token'] = \
16005-
token
16006-
return self.update_project_access_token_endpoint.call_with_http_info(**kwargs)
16007-
1600815846
def update_project_user(
1600915847
self,
1601015848
cloud_pk,

0 commit comments

Comments
 (0)