Skip to content

Commit 8897518

Browse files
committed
MINOR: add infos to users lists (#934)
* add infos to users lists * migrate in_all_projects * fix doc
1 parent 6488ef4 commit 8897518

22 files changed

+485
-324
lines changed

.openapi-generator/FILES

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ bimdata_api_client/model/transform_request.py
260260
bimdata_api_client/model/unit.py
261261
bimdata_api_client/model/unit_request.py
262262
bimdata_api_client/model/user.py
263+
bimdata_api_client/model/user_cloud.py
263264
bimdata_api_client/model/user_invitation.py
264265
bimdata_api_client/model/user_project.py
265266
bimdata_api_client/model/user_project_id_request.py
@@ -546,6 +547,7 @@ docs/TransformRequest.md
546547
docs/Unit.md
547548
docs/UnitRequest.md
548549
docs/User.md
550+
docs/UserCloud.md
549551
docs/UserInvitation.md
550552
docs/UserProject.md
551553
docs/UserProjectIdRequest.md
@@ -834,6 +836,7 @@ test/test_transform_request.py
834836
test/test_unit.py
835837
test/test_unit_request.py
836838
test/test_user.py
839+
test/test_user_cloud.py
837840
test/test_user_invitation.py
838841
test/test_user_project.py
839842
test/test_user_project_id_request.py

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,6 @@ Class | Method | HTTP request | Description
280280
*CollaborationApi* | [**get_cloud**](docs/CollaborationApi.md#get_cloud) | **GET** /cloud/{id} | Retrieve one cloud
281281
*CollaborationApi* | [**get_cloud_invitations**](docs/CollaborationApi.md#get_cloud_invitations) | **GET** /cloud/{cloud_pk}/invitation | Retrieve all pending invitations in the cloud
282282
*CollaborationApi* | [**get_cloud_size**](docs/CollaborationApi.md#get_cloud_size) | **GET** /cloud/{id}/size | Get size of the cloud
283-
*CollaborationApi* | [**get_cloud_user**](docs/CollaborationApi.md#get_cloud_user) | **GET** /cloud/{cloud_pk}/user/{id} | Retrieve a user in a cloud
284283
*CollaborationApi* | [**get_cloud_users**](docs/CollaborationApi.md#get_cloud_users) | **GET** /cloud/{cloud_pk}/user | Retrieve all users in a cloud, or a list with a filter by email
285284
*CollaborationApi* | [**get_clouds**](docs/CollaborationApi.md#get_clouds) | **GET** /cloud | Retrieve all clouds
286285
*CollaborationApi* | [**get_document**](docs/CollaborationApi.md#get_document) | **GET** /cloud/{cloud_pk}/project/{project_pk}/document/{id} | Retrieve a document
@@ -784,6 +783,7 @@ Class | Method | HTTP request | Description
784783
- [Unit](docs/Unit.md)
785784
- [UnitRequest](docs/UnitRequest.md)
786785
- [User](docs/User.md)
786+
- [UserCloud](docs/UserCloud.md)
787787
- [UserInvitation](docs/UserInvitation.md)
788788
- [UserProject](docs/UserProject.md)
789789
- [UserProjectIdRequest](docs/UserProjectIdRequest.md)

bimdata_api_client/api/collaboration_api.py

Lines changed: 4 additions & 145 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
from bimdata_api_client.model.tag_id_request import TagIdRequest
7171
from bimdata_api_client.model.tag_request import TagRequest
7272
from bimdata_api_client.model.user import User
73+
from bimdata_api_client.model.user_cloud import UserCloud
7374
from bimdata_api_client.model.user_invitation import UserInvitation
7475
from bimdata_api_client.model.user_project import UserProject
7576
from bimdata_api_client.model.user_project_id_request import UserProjectIdRequest
@@ -3127,69 +3128,9 @@ def __init__(self, api_client=None):
31273128
},
31283129
api_client=api_client
31293130
)
3130-
self.get_cloud_user_endpoint = _Endpoint(
3131-
settings={
3132-
'response_type': (User,),
3133-
'auth': [
3134-
'ApiKey',
3135-
'BIMData_Connect',
3136-
'BIMData_Connect',
3137-
'Bearer'
3138-
],
3139-
'endpoint_path': '/cloud/{cloud_pk}/user/{id}',
3140-
'operation_id': 'get_cloud_user',
3141-
'http_method': 'GET',
3142-
'servers': None,
3143-
},
3144-
params_map={
3145-
'all': [
3146-
'cloud_pk',
3147-
'id',
3148-
],
3149-
'required': [
3150-
'cloud_pk',
3151-
'id',
3152-
],
3153-
'nullable': [
3154-
],
3155-
'enum': [
3156-
],
3157-
'validation': [
3158-
]
3159-
},
3160-
root_map={
3161-
'validations': {
3162-
},
3163-
'allowed_values': {
3164-
},
3165-
'openapi_types': {
3166-
'cloud_pk':
3167-
(int,),
3168-
'id':
3169-
(int,),
3170-
},
3171-
'attribute_map': {
3172-
'cloud_pk': 'cloud_pk',
3173-
'id': 'id',
3174-
},
3175-
'location_map': {
3176-
'cloud_pk': 'path',
3177-
'id': 'path',
3178-
},
3179-
'collection_format_map': {
3180-
}
3181-
},
3182-
headers_map={
3183-
'accept': [
3184-
'application/json'
3185-
],
3186-
'content_type': [],
3187-
},
3188-
api_client=api_client
3189-
)
31903131
self.get_cloud_users_endpoint = _Endpoint(
31913132
settings={
3192-
'response_type': ([User],),
3133+
'response_type': ([UserCloud],),
31933134
'auth': [
31943135
'ApiKey',
31953136
'BIMData_Connect',
@@ -8940,7 +8881,7 @@ def create_document(
89408881
):
89418882
"""Create a document # noqa: E501
89428883

8943-
Create a document. If the document is one of {'GLTF', 'OBJ', 'PHOTOSPHERE', 'DWG', 'DXF', 'POINT_CLOUD', 'IFC'}, a model will be created and attached to this document Required scopes: document:write # noqa: E501
8884+
Create a document. If the document is one of {'OBJ', 'IFC', 'GLTF', 'DWG', 'DXF', 'PHOTOSPHERE', 'POINT_CLOUD'}, a model will be created and attached to this document Required scopes: document:write # noqa: E501
89448885
This method makes a synchronous HTTP request by default. To make an
89458886
asynchronous HTTP request, please pass async_req=True
89468887

@@ -11688,88 +11629,6 @@ def get_cloud_size(
1168811629
id
1168911630
return self.get_cloud_size_endpoint.call_with_http_info(**kwargs)
1169011631

11691-
def get_cloud_user(
11692-
self,
11693-
cloud_pk,
11694-
id,
11695-
**kwargs
11696-
):
11697-
"""Retrieve a user in a cloud # noqa: E501
11698-
11699-
Only administrators can see a cloud member Required scopes: cloud:read # noqa: E501
11700-
This method makes a synchronous HTTP request by default. To make an
11701-
asynchronous HTTP request, please pass async_req=True
11702-
11703-
>>> thread = api.get_cloud_user(cloud_pk, id, async_req=True)
11704-
>>> result = thread.get()
11705-
11706-
Args:
11707-
cloud_pk (int):
11708-
id (int): A unique integer value identifying this fos user.
11709-
11710-
Keyword Args:
11711-
_return_http_data_only (bool): response data without head status
11712-
code and headers. Default is True.
11713-
_preload_content (bool): if False, the urllib3.HTTPResponse object
11714-
will be returned without reading/decoding response data.
11715-
Default is True.
11716-
_request_timeout (int/float/tuple): timeout setting for this request. If
11717-
one number provided, it will be total request timeout. It can also
11718-
be a pair (tuple) of (connection, read) timeouts.
11719-
Default is None.
11720-
_check_input_type (bool): specifies if type checking
11721-
should be done one the data sent to the server.
11722-
Default is True.
11723-
_check_return_type (bool): specifies if type checking
11724-
should be done one the data received from the server.
11725-
Default is True.
11726-
_spec_property_naming (bool): True if the variable names in the input data
11727-
are serialized names, as specified in the OpenAPI document.
11728-
False if the variable names in the input data
11729-
are pythonic names, e.g. snake case (default)
11730-
_content_type (str/None): force body content-type.
11731-
Default is None and content-type will be predicted by allowed
11732-
content-types and body.
11733-
_host_index (int/None): specifies the index of the server
11734-
that we want to use.
11735-
Default is read from the configuration.
11736-
async_req (bool): execute request asynchronously
11737-
11738-
Returns:
11739-
User
11740-
If the method is called asynchronously, returns the request
11741-
thread.
11742-
"""
11743-
kwargs['async_req'] = kwargs.get(
11744-
'async_req', False
11745-
)
11746-
kwargs['_return_http_data_only'] = kwargs.get(
11747-
'_return_http_data_only', True
11748-
)
11749-
kwargs['_preload_content'] = kwargs.get(
11750-
'_preload_content', True
11751-
)
11752-
kwargs['_request_timeout'] = kwargs.get(
11753-
'_request_timeout', None
11754-
)
11755-
kwargs['_check_input_type'] = kwargs.get(
11756-
'_check_input_type', True
11757-
)
11758-
kwargs['_check_return_type'] = kwargs.get(
11759-
'_check_return_type', True
11760-
)
11761-
kwargs['_spec_property_naming'] = kwargs.get(
11762-
'_spec_property_naming', False
11763-
)
11764-
kwargs['_content_type'] = kwargs.get(
11765-
'_content_type')
11766-
kwargs['_host_index'] = kwargs.get('_host_index')
11767-
kwargs['cloud_pk'] = \
11768-
cloud_pk
11769-
kwargs['id'] = \
11770-
id
11771-
return self.get_cloud_user_endpoint.call_with_http_info(**kwargs)
11772-
1177311632
def get_cloud_users(
1177411633
self,
1177511634
cloud_pk,
@@ -11820,7 +11679,7 @@ def get_cloud_users(
1182011679
async_req (bool): execute request asynchronously
1182111680

1182211681
Returns:
11823-
[User]
11682+
[UserCloud]
1182411683
If the method is called asynchronously, returns the request
1182511684
thread.
1182611685
"""

bimdata_api_client/model/cloud_role.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ class CloudRole(ModelNormal):
6464

6565
validations = {
6666
('role',): {
67-
'inclusive_maximum': 32767,
68-
'inclusive_minimum': -32768,
67+
'inclusive_maximum': 2147483647,
68+
'inclusive_minimum': 0,
6969
},
7070
}
7171

bimdata_api_client/model/document_text.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ class DocumentText(ModelNormal):
5858
allowed_values = {
5959
('language',): {
6060
'None': None,
61-
'SPANISH': "spanish",
6261
'GERMAN': "german",
63-
'ITALIAN': "italian",
64-
'ENGLISH': "english",
6562
'FRENCH': "french",
63+
'SPANISH': "spanish",
64+
'ENGLISH': "english",
65+
'ITALIAN': "italian",
6666
'NULL': "null",
6767
},
6868
}
@@ -153,7 +153,7 @@ def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501
153153
through its discriminator because we passed in
154154
_visited_composed_classes = (Animal,)
155155
text (str, none_type): The full text representation of a document if the feature is enabled and the file format supported. [optional] # noqa: E501
156-
language (str, none_type): * `spanish` - spanish * `german` - german * `italian` - italian * `english` - english * `french` - french. [optional] # noqa: E501
156+
language (str, none_type): * `german` - german * `french` - french * `spanish` - spanish * `english` - english * `italian` - italian. [optional] # noqa: E501
157157
"""
158158

159159
_check_type = kwargs.pop('_check_type', True)
@@ -237,7 +237,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
237237
through its discriminator because we passed in
238238
_visited_composed_classes = (Animal,)
239239
text (str, none_type): The full text representation of a document if the feature is enabled and the file format supported. [optional] # noqa: E501
240-
language (str, none_type): * `spanish` - spanish * `german` - german * `italian` - italian * `english` - english * `french` - french. [optional] # noqa: E501
240+
language (str, none_type): * `german` - german * `french` - french * `spanish` - spanish * `english` - english * `italian` - italian. [optional] # noqa: E501
241241
"""
242242

243243
_check_type = kwargs.pop('_check_type', True)

bimdata_api_client/model/folder_user_project.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ class FolderUserProject(ModelNormal):
6161
'50': 50,
6262
'25': 25,
6363
},
64+
('cloud_role',): {
65+
'100': 100,
66+
'50': 50,
67+
},
6468
('permission',): {
6569
'1': 1,
6670
'50': 50,
@@ -101,6 +105,8 @@ def openapi_types():
101105
'profile_picture': (str, none_type,), # noqa: E501
102106
'sub': (str, none_type,), # noqa: E501
103107
'role': (int,), # noqa: E501
108+
'cloud_role': (int,), # noqa: E501
109+
'in_all_projects': (bool,), # noqa: E501
104110
'permission': (int,), # noqa: E501
105111
}
106112

@@ -119,6 +125,8 @@ def discriminator():
119125
'profile_picture': 'profile_picture', # noqa: E501
120126
'sub': 'sub', # noqa: E501
121127
'role': 'role', # noqa: E501
128+
'cloud_role': 'cloud_role', # noqa: E501
129+
'in_all_projects': 'in_all_projects', # noqa: E501
122130
'permission': 'permission', # noqa: E501
123131
}
124132

@@ -132,14 +140,16 @@ def discriminator():
132140
'profile_picture', # noqa: E501
133141
'sub', # noqa: E501
134142
'role', # noqa: E501
143+
'cloud_role', # noqa: E501
144+
'in_all_projects', # noqa: E501
135145
'permission', # noqa: E501
136146
}
137147

138148
_composed_schemas = {}
139149

140150
@classmethod
141151
@convert_js_args_to_python_args
142-
def _from_openapi_data(cls, id, user_id, invitation_id, email, firstname, lastname, profile_picture, sub, role, permission, *args, **kwargs): # noqa: E501
152+
def _from_openapi_data(cls, id, user_id, invitation_id, email, firstname, lastname, profile_picture, sub, role, cloud_role, in_all_projects, permission, *args, **kwargs): # noqa: E501
143153
"""FolderUserProject - a model defined in OpenAPI
144154
145155
Args:
@@ -152,6 +162,8 @@ def _from_openapi_data(cls, id, user_id, invitation_id, email, firstname, lastna
152162
profile_picture (str, none_type):
153163
sub (str, none_type):
154164
role (int): * `100` - admin * `50` - user * `25` - guest
165+
cloud_role (int): * `100` - admin * `50` - user
166+
in_all_projects (bool):
155167
permission (int): * `1` - denied * `50` - read_only * `100` - read_write
156168
157169
Keyword Args:
@@ -221,6 +233,8 @@ def _from_openapi_data(cls, id, user_id, invitation_id, email, firstname, lastna
221233
self.profile_picture = profile_picture
222234
self.sub = sub
223235
self.role = role
236+
self.cloud_role = cloud_role
237+
self.in_all_projects = in_all_projects
224238
self.permission = permission
225239
for var_name, var_value in kwargs.items():
226240
if var_name not in self.attribute_map and \

bimdata_api_client/model/patched_document_text_request.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ class PatchedDocumentTextRequest(ModelNormal):
5858
allowed_values = {
5959
('language',): {
6060
'None': None,
61-
'SPANISH': "spanish",
6261
'GERMAN': "german",
63-
'ITALIAN': "italian",
64-
'ENGLISH': "english",
6562
'FRENCH': "french",
63+
'SPANISH': "spanish",
64+
'ENGLISH': "english",
65+
'ITALIAN': "italian",
6666
'NULL': "null",
6767
},
6868
}
@@ -147,7 +147,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
147147
through its discriminator because we passed in
148148
_visited_composed_classes = (Animal,)
149149
text (str, none_type): The full text representation of a document if the feature is enabled and the file format supported. [optional] # noqa: E501
150-
language (str, none_type): * `spanish` - spanish * `german` - german * `italian` - italian * `english` - english * `french` - french. [optional] # noqa: E501
150+
language (str, none_type): * `german` - german * `french` - french * `spanish` - spanish * `english` - english * `italian` - italian. [optional] # noqa: E501
151151
"""
152152

153153
_check_type = kwargs.pop('_check_type', True)
@@ -230,7 +230,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
230230
through its discriminator because we passed in
231231
_visited_composed_classes = (Animal,)
232232
text (str, none_type): The full text representation of a document if the feature is enabled and the file format supported. [optional] # noqa: E501
233-
language (str, none_type): * `spanish` - spanish * `german` - german * `italian` - italian * `english` - english * `french` - french. [optional] # noqa: E501
233+
language (str, none_type): * `german` - german * `french` - french * `spanish` - spanish * `english` - english * `italian` - italian. [optional] # noqa: E501
234234
"""
235235

236236
_check_type = kwargs.pop('_check_type', True)

bimdata_api_client/model/patched_user_project_update_request.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ class PatchedUserProjectUpdateRequest(ModelNormal):
6565

6666
validations = {
6767
('role',): {
68-
'inclusive_maximum': 32767,
69-
'inclusive_minimum': -32768,
68+
'inclusive_maximum': 2147483647,
69+
'inclusive_minimum': 0,
7070
},
7171
}
7272

bimdata_api_client/model/project_role.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ class ProjectRole(ModelNormal):
6565

6666
validations = {
6767
('role',): {
68-
'inclusive_maximum': 32767,
69-
'inclusive_minimum': -32768,
68+
'inclusive_maximum': 2147483647,
69+
'inclusive_minimum': 0,
7070
},
7171
}
7272

0 commit comments

Comments
 (0)