Skip to content

Commit 556b744

Browse files
committed
PATCH: fix(storey): allow to add photosphere as storey plan + fix process_hint on createDocument (#790)
* fix(storey): allow to add photosphere as storey plan * fix(storey): create STOREY_CHILD_TYPES list + add 'process_hint' to Docuemnt serializer fields
1 parent f024c41 commit 556b744

File tree

6 files changed

+30
-8
lines changed

6 files changed

+30
-8
lines changed

bimdata_api_client/api/collaboration_api.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -962,6 +962,7 @@ def __init__(self, api_client=None):
962962
'model_source',
963963
'ifc_source',
964964
'successor_of',
965+
'process_hint',
965966
],
966967
'required': [
967968
'cloud_pk',
@@ -976,6 +977,7 @@ def __init__(self, api_client=None):
976977
'enum': [
977978
'model_source',
978979
'ifc_source',
980+
'process_hint',
979981
],
980982
'validation': [
981983
'name',
@@ -1010,6 +1012,10 @@ def __init__(self, api_client=None):
10101012
"EXPORT": "EXPORT",
10111013
"OPTIMIZED": "OPTIMIZED"
10121014
},
1015+
('process_hint',): {
1016+
1017+
"PHOTOSPHERE": "PHOTOSPHERE"
1018+
},
10131019
},
10141020
'openapi_types': {
10151021
'cloud_pk':
@@ -1032,6 +1038,8 @@ def __init__(self, api_client=None):
10321038
(str,),
10331039
'successor_of':
10341040
(int,),
1041+
'process_hint':
1042+
(str,),
10351043
},
10361044
'attribute_map': {
10371045
'cloud_pk': 'cloud_pk',
@@ -1044,6 +1052,7 @@ def __init__(self, api_client=None):
10441052
'model_source': 'model_source',
10451053
'ifc_source': 'ifc_source',
10461054
'successor_of': 'successor_of',
1055+
'process_hint': 'process_hint',
10471056
},
10481057
'location_map': {
10491058
'cloud_pk': 'path',
@@ -1056,6 +1065,7 @@ def __init__(self, api_client=None):
10561065
'model_source': 'form',
10571066
'ifc_source': 'form',
10581067
'successor_of': 'form',
1068+
'process_hint': 'form',
10591069
},
10601070
'collection_format_map': {
10611071
}
@@ -8805,7 +8815,7 @@ def create_document(
88058815
):
88068816
"""Create a document # noqa: E501
88078817

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

@@ -8825,6 +8835,7 @@ def create_document(
88258835
model_source (str): Define the model.source field if the upload is a Model (IFC, PDF, DWG...) * `UPLOAD` - UPLOAD * `SPLIT` - SPLIT * `MERGE` - MERGE * `EXPORT` - EXPORT * `OPTIMIZED` - OPTIMIZED. [optional]
88268836
ifc_source (str): DEPRECATED: Use 'model_source' instead. Define the model.source field if the upload is a Model (IFC, PDF, DWG...) * `UPLOAD` - UPLOAD * `SPLIT` - SPLIT * `MERGE` - MERGE * `EXPORT` - EXPORT * `OPTIMIZED` - OPTIMIZED. [optional]
88278837
successor_of (int): Old document version to replace. Only for create. [optional]
8838+
process_hint (str): Provide a info about the document in order to customize the way it is processed. * `PHOTOSPHERE` - PHOTOSPHERE. [optional] if omitted the server will use the default value of "PHOTOSPHERE"
88288839
_return_http_data_only (bool): response data without head status
88298840
code and headers. Default is True.
88308841
_preload_content (bool): if False, the urllib3.HTTPResponse object

bimdata_api_client/api/model_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13347,7 +13347,7 @@ def create_building_plan(
1334713347
):
1334813348
"""Create a relation between a 2d model and a building # noqa: E501
1334913349

13350-
Create a relation between a 2d model and a building. The model type must be one of : ('DWG', 'DXF', 'PDF', 'JPEG', 'PNG') Required scopes: ifc:write, model:write # noqa: E501
13350+
Create a relation between a 2d model and a building. The model type must be one of : ('DWG', 'DXF', 'PDF', 'JPEG', 'PNG', 'PHOTOSPHERE') Required scopes: ifc:write, model:write # noqa: E501
1335113351
This method makes a synchronous HTTP request by default. To make an
1335213352
asynchronous HTTP request, please pass async_req=True
1335313353

@@ -15356,7 +15356,7 @@ def create_storey_plan(
1535615356
):
1535715357
"""Create a relation between a 2d model and a storey # noqa: E501
1535815358

15359-
Create a relation between a 2d model and a storey. The model type must be one of : ('DWG', 'DXF', 'PDF', 'JPEG', 'PNG') Required scopes: ifc:write, model:write # noqa: E501
15359+
Create a relation between a 2d model and a storey. The model type must be one of : ('DWG', 'DXF', 'PDF', 'JPEG', 'PNG', 'PHOTOSPHERE') Required scopes: ifc:write, model:write # noqa: E501
1536015360
This method makes a synchronous HTTP request by default. To make an
1536115361
asynchronous HTTP request, please pass async_req=True
1536215362

bimdata_api_client/model/patched_document_request.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ class PatchedDocumentRequest(ModelNormal):
7070
'EXPORT': "EXPORT",
7171
'OPTIMIZED': "OPTIMIZED",
7272
},
73+
('process_hint',): {
74+
'PHOTOSPHERE': "PHOTOSPHERE",
75+
},
7376
}
7477

7578
validations = {
@@ -112,6 +115,7 @@ def openapi_types():
112115
'model_source': (str,), # noqa: E501
113116
'ifc_source': (str,), # noqa: E501
114117
'successor_of': (int,), # noqa: E501
118+
'process_hint': (str,), # noqa: E501
115119
}
116120

117121
@cached_property
@@ -128,6 +132,7 @@ def discriminator():
128132
'model_source': 'model_source', # noqa: E501
129133
'ifc_source': 'ifc_source', # noqa: E501
130134
'successor_of': 'successor_of', # noqa: E501
135+
'process_hint': 'process_hint', # noqa: E501
131136
}
132137

133138
read_only_vars = {
@@ -179,6 +184,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
179184
model_source (str): Define the model.source field if the upload is a Model (IFC, PDF, DWG...) * `UPLOAD` - UPLOAD * `SPLIT` - SPLIT * `MERGE` - MERGE * `EXPORT` - EXPORT * `OPTIMIZED` - OPTIMIZED. [optional] # noqa: E501
180185
ifc_source (str): DEPRECATED: Use 'model_source' instead. Define the model.source field if the upload is a Model (IFC, PDF, DWG...) * `UPLOAD` - UPLOAD * `SPLIT` - SPLIT * `MERGE` - MERGE * `EXPORT` - EXPORT * `OPTIMIZED` - OPTIMIZED. [optional] # noqa: E501
181186
successor_of (int): Old document version to replace. Only for create. [optional] # noqa: E501
187+
process_hint (str): Provide a info about the document in order to customize the way it is processed. * `PHOTOSPHERE` - PHOTOSPHERE. [optional] if omitted the server will use the default value of "PHOTOSPHERE" # noqa: E501
182188
"""
183189

184190
_check_type = kwargs.pop('_check_type', True)
@@ -268,6 +274,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
268274
model_source (str): Define the model.source field if the upload is a Model (IFC, PDF, DWG...) * `UPLOAD` - UPLOAD * `SPLIT` - SPLIT * `MERGE` - MERGE * `EXPORT` - EXPORT * `OPTIMIZED` - OPTIMIZED. [optional] # noqa: E501
269275
ifc_source (str): DEPRECATED: Use 'model_source' instead. Define the model.source field if the upload is a Model (IFC, PDF, DWG...) * `UPLOAD` - UPLOAD * `SPLIT` - SPLIT * `MERGE` - MERGE * `EXPORT` - EXPORT * `OPTIMIZED` - OPTIMIZED. [optional] # noqa: E501
270276
successor_of (int): Old document version to replace. Only for create. [optional] # noqa: E501
277+
process_hint (str): Provide a info about the document in order to customize the way it is processed. * `PHOTOSPHERE` - PHOTOSPHERE. [optional] if omitted the server will use the default value of "PHOTOSPHERE" # noqa: E501
271278
"""
272279

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

docs/CollaborationApi.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,9 +1481,9 @@ with bimdata_api_client.ApiClient(configuration) as api_client:
14811481
id = 1 # int | A unique integer value identifying this project.
14821482
write_folder_request = [
14831483
WriteFolderRequest(
1484+
name="name_example",
14841485
default_permission=1,
14851486
parent_id=1,
1486-
name="name_example",
14871487
children=[
14881488
WriteFolderRequest(),
14891489
],
@@ -1540,7 +1540,7 @@ Name | Type | Description | Notes
15401540
15411541
Create a document
15421542

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

15451545
### Example
15461546

@@ -1604,6 +1604,7 @@ with bimdata_api_client.ApiClient(configuration) as api_client:
16041604
model_source = "UPLOAD" # str | Define the model.source field if the upload is a Model (IFC, PDF, DWG...) * `UPLOAD` - UPLOAD * `SPLIT` - SPLIT * `MERGE` - MERGE * `EXPORT` - EXPORT * `OPTIMIZED` - OPTIMIZED (optional)
16051605
ifc_source = "UPLOAD" # str | DEPRECATED: Use 'model_source' instead. Define the model.source field if the upload is a Model (IFC, PDF, DWG...) * `UPLOAD` - UPLOAD * `SPLIT` - SPLIT * `MERGE` - MERGE * `EXPORT` - EXPORT * `OPTIMIZED` - OPTIMIZED (optional)
16061606
successor_of = 1 # int | Old document version to replace. Only for create (optional)
1607+
process_hint = "PHOTOSPHERE" # str | Provide a info about the document in order to customize the way it is processed. * `PHOTOSPHERE` - PHOTOSPHERE (optional) if omitted the server will use the default value of "PHOTOSPHERE"
16071608

16081609
# example passing only required values which don't have defaults set
16091610
try:
@@ -1617,7 +1618,7 @@ with bimdata_api_client.ApiClient(configuration) as api_client:
16171618
# and optional values
16181619
try:
16191620
# Create a document
1620-
api_response = api_instance.create_document(cloud_pk, project_pk, name, file, parent_id=parent_id, file_name=file_name, description=description, model_source=model_source, ifc_source=ifc_source, successor_of=successor_of)
1621+
api_response = api_instance.create_document(cloud_pk, project_pk, name, file, parent_id=parent_id, file_name=file_name, description=description, model_source=model_source, ifc_source=ifc_source, successor_of=successor_of, process_hint=process_hint)
16211622
pprint(api_response)
16221623
except bimdata_api_client.ApiException as e:
16231624
print("Exception when calling CollaborationApi->create_document: %s\n" % e)
@@ -1638,6 +1639,7 @@ Name | Type | Description | Notes
16381639
**model_source** | **str**| Define the model.source field if the upload is a Model (IFC, PDF, DWG...) * `UPLOAD` - UPLOAD * `SPLIT` - SPLIT * `MERGE` - MERGE * `EXPORT` - EXPORT * `OPTIMIZED` - OPTIMIZED | [optional]
16391640
**ifc_source** | **str**| DEPRECATED: Use 'model_source' instead. Define the model.source field if the upload is a Model (IFC, PDF, DWG...) * `UPLOAD` - UPLOAD * `SPLIT` - SPLIT * `MERGE` - MERGE * `EXPORT` - EXPORT * `OPTIMIZED` - OPTIMIZED | [optional]
16401641
**successor_of** | **int**| Old document version to replace. Only for create | [optional]
1642+
**process_hint** | **str**| Provide a info about the document in order to customize the way it is processed. * `PHOTOSPHERE` - PHOTOSPHERE | [optional] if omitted the server will use the default value of "PHOTOSPHERE"
16411643

16421644
### Return type
16431645

@@ -10875,6 +10877,7 @@ with bimdata_api_client.ApiClient(configuration) as api_client:
1087510877
model_source="UPLOAD",
1087610878
ifc_source="UPLOAD",
1087710879
successor_of=1,
10880+
process_hint="PHOTOSPHERE",
1087810881
) # PatchedDocumentRequest | (optional)
1087910882

1088010883
# example passing only required values which don't have defaults set

docs/ModelApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2160,7 +2160,7 @@ Name | Type | Description | Notes
21602160

21612161
Create a relation between a 2d model and a building
21622162

2163-
Create a relation between a 2d model and a building. The model type must be one of : ('DWG', 'DXF', 'PDF', 'JPEG', 'PNG') Required scopes: ifc:write, model:write
2163+
Create a relation between a 2d model and a building. The model type must be one of : ('DWG', 'DXF', 'PDF', 'JPEG', 'PNG', 'PHOTOSPHERE') Required scopes: ifc:write, model:write
21642164

21652165
### Example
21662166

@@ -4942,7 +4942,7 @@ Name | Type | Description | Notes
49424942

49434943
Create a relation between a 2d model and a storey
49444944

4945-
Create a relation between a 2d model and a storey. The model type must be one of : ('DWG', 'DXF', 'PDF', 'JPEG', 'PNG') Required scopes: ifc:write, model:write
4945+
Create a relation between a 2d model and a storey. The model type must be one of : ('DWG', 'DXF', 'PDF', 'JPEG', 'PNG', 'PHOTOSPHERE') Required scopes: ifc:write, model:write
49464946

49474947
### Example
49484948

docs/PatchedDocumentRequest.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Name | Type | Description | Notes
1212
**model_source** | **str** | Define the model.source field if the upload is a Model (IFC, PDF, DWG...) * `UPLOAD` - UPLOAD * `SPLIT` - SPLIT * `MERGE` - MERGE * `EXPORT` - EXPORT * `OPTIMIZED` - OPTIMIZED | [optional]
1313
**ifc_source** | **str** | DEPRECATED: Use 'model_source' instead. Define the model.source field if the upload is a Model (IFC, PDF, DWG...) * `UPLOAD` - UPLOAD * `SPLIT` - SPLIT * `MERGE` - MERGE * `EXPORT` - EXPORT * `OPTIMIZED` - OPTIMIZED | [optional]
1414
**successor_of** | **int** | Old document version to replace. Only for create | [optional]
15+
**process_hint** | **str** | Provide a info about the document in order to customize the way it is processed. * `PHOTOSPHERE` - PHOTOSPHERE | [optional] if omitted the server will use the default value of "PHOTOSPHERE"
1516
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
1617

1718
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

0 commit comments

Comments
 (0)