Skip to content

Commit 02c7125

Browse files
committed
PATCH: add head_id field to Document serializer (#669)
1 parent 9e7ba06 commit 02c7125

4 files changed

Lines changed: 15 additions & 9 deletions

File tree

bimdata_api_client/api/collaboration_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8373,7 +8373,7 @@ def create_document(
83738373
):
83748374
"""Create a document # noqa: E501
83758375

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

bimdata_api_client/model/document.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,9 @@ def openapi_types():
129129
'model_id': (int, none_type,), # noqa: E501
130130
'model_type': (str, none_type,), # noqa: E501
131131
'ifc_id': (int, none_type,), # noqa: E501
132-
'user_permission': (int,), # noqa: E501
132+
'head_id': (int, none_type,), # noqa: E501
133133
'is_head_version': (bool,), # noqa: E501
134+
'user_permission': (int,), # noqa: E501
134135
'office_preview': (str, none_type,), # noqa: E501
135136
'parent_id': (int, none_type,), # noqa: E501
136137
'file_name': (str,), # noqa: E501
@@ -156,8 +157,9 @@ def discriminator():
156157
'model_id': 'model_id', # noqa: E501
157158
'model_type': 'model_type', # noqa: E501
158159
'ifc_id': 'ifc_id', # noqa: E501
159-
'user_permission': 'user_permission', # noqa: E501
160+
'head_id': 'head_id', # noqa: E501
160161
'is_head_version': 'is_head_version', # noqa: E501
162+
'user_permission': 'user_permission', # noqa: E501
161163
'office_preview': 'office_preview', # noqa: E501
162164
'parent_id': 'parent_id', # noqa: E501
163165
'file_name': 'file_name', # noqa: E501
@@ -176,16 +178,17 @@ def discriminator():
176178
'model_id', # noqa: E501
177179
'model_type', # noqa: E501
178180
'ifc_id', # noqa: E501
179-
'user_permission', # noqa: E501
181+
'head_id', # noqa: E501
180182
'is_head_version', # noqa: E501
183+
'user_permission', # noqa: E501
181184
'office_preview', # noqa: E501
182185
}
183186

184187
_composed_schemas = {}
185188

186189
@classmethod
187190
@convert_js_args_to_python_args
188-
def _from_openapi_data(cls, id, created_by, project, name, file, size, tags, visas, created_at, updated_at, model_id, model_type, ifc_id, user_permission, is_head_version, office_preview, *args, **kwargs): # noqa: E501
191+
def _from_openapi_data(cls, id, created_by, project, name, file, size, tags, visas, created_at, updated_at, model_id, model_type, ifc_id, head_id, is_head_version, user_permission, office_preview, *args, **kwargs): # noqa: E501
189192
"""Document - a model defined in OpenAPI
190193
191194
Args:
@@ -202,8 +205,9 @@ def _from_openapi_data(cls, id, created_by, project, name, file, size, tags, vis
202205
model_id (int, none_type):
203206
model_type (str, none_type): Model's type. Values can be IFC, DWG, DXF, GLTF, PDF, JPEG, PNG, OBJ, POINT_CLOUD
204207
ifc_id (int, none_type): DEPRECATED: Use 'model_id' instead.
205-
user_permission (int): Aggregate of group user permissions and folder default permission
208+
head_id (int, none_type): Document id of head version
206209
is_head_version (bool): Document is a head of version or is owned by another document
210+
user_permission (int): Aggregate of group user permissions and folder default permission
207211
office_preview (str, none_type): Office files will be converted as pdf to provide a web preview. Supported extensions are .ppt, .pptx, .odp, .xls, .xlsx, .ods, .doc, .docx, .odt
208212
209213
Keyword Args:
@@ -280,8 +284,9 @@ def _from_openapi_data(cls, id, created_by, project, name, file, size, tags, vis
280284
self.model_id = model_id
281285
self.model_type = model_type
282286
self.ifc_id = ifc_id
283-
self.user_permission = user_permission
287+
self.head_id = head_id
284288
self.is_head_version = is_head_version
289+
self.user_permission = user_permission
285290
self.office_preview = office_preview
286291
for var_name, var_value in kwargs.items():
287292
if var_name not in self.attribute_map and \

docs/CollaborationApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1527,7 +1527,7 @@ Name | Type | Description | Notes
15271527
15281528
Create a document
15291529

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

15321532
### Example
15331533

docs/Document.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ Name | Type | Description | Notes
1717
**model_id** | **int, none_type** | | [readonly]
1818
**model_type** | **str, none_type** | Model's type. Values can be IFC, DWG, DXF, GLTF, PDF, JPEG, PNG, OBJ, POINT_CLOUD | [readonly]
1919
**ifc_id** | **int, none_type** | DEPRECATED: Use 'model_id' instead. | [readonly]
20-
**user_permission** | **int** | Aggregate of group user permissions and folder default permission | [readonly]
20+
**head_id** | **int, none_type** | Document id of head version | [readonly]
2121
**is_head_version** | **bool** | Document is a head of version or is owned by another document | [readonly]
22+
**user_permission** | **int** | Aggregate of group user permissions and folder default permission | [readonly]
2223
**office_preview** | **str, none_type** | Office files will be converted as pdf to provide a web preview. Supported extensions are .ppt, .pptx, .odp, .xls, .xlsx, .ods, .doc, .docx, .odt | [readonly]
2324
**parent_id** | **int, none_type** | | [optional]
2425
**file_name** | **str** | Full name of the file | [optional]

0 commit comments

Comments
 (0)