Skip to content

Commit b2cbf9a

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 00845c2 commit b2cbf9a

10 files changed

+72
-27
lines changed

docs/CollaborationApi.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ Name | Type | Description | Notes
960960
961961
Create a document
962962

963-
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
963+
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
964964

965965
### Example
966966

@@ -995,7 +995,8 @@ let opts = {
995995
'description': "description_example", // String | Description of the file
996996
'modelSource': "modelSource_example", // String | Define the model.source field if the upload is a Model (IFC, PDF, DWG...) * `UPLOAD` - UPLOAD * `SPLIT` - SPLIT * `MERGE` - MERGE * `EXPORT` - EXPORT * `OPTIMIZED` - OPTIMIZED
997997
'ifcSource': "ifcSource_example", // String | 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
998-
'successorOf': 56 // Number | Old document version to replace. Only for create
998+
'successorOf': 56, // Number | Old document version to replace. Only for create
999+
'processHint': "processHint_example" // String | Provide a info about the document in order to customize the way it is processed. * `PHOTOSPHERE` - PHOTOSPHERE
9991000
};
10001001
apiInstance.createDocument(cloudPk, projectPk, name, file, opts).then((data) => {
10011002
console.log('API called successfully. Returned data: ' + data);
@@ -1020,6 +1021,7 @@ Name | Type | Description | Notes
10201021
**modelSource** | **String**| 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]
10211022
**ifcSource** | **String**| 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]
10221023
**successorOf** | **Number**| Old document version to replace. Only for create | [optional]
1024+
**processHint** | **String**| Provide a info about the document in order to customize the way it is processed. * `PHOTOSPHERE` - PHOTOSPHERE | [optional]
10231025

10241026
### Return type
10251027

docs/ModelApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,7 +1270,7 @@ Name | Type | Description | Notes
12701270
12711271
Create a relation between a 2d model and a building
12721272

1273-
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
1273+
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
12741274

12751275
### Example
12761276

@@ -2772,7 +2772,7 @@ Name | Type | Description | Notes
27722772
27732773
Create a relation between a 2d model and a storey
27742774

2775-
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
2775+
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
27762776

27772777
### Example
27782778

docs/PatchedDocumentRequest.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Name | Type | Description | Notes
1212
**modelSource** | **String** | 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
**ifcSource** | **String** | 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
**successorOf** | **Number** | Old document version to replace. Only for create | [optional]
15+
**processHint** | **String** | Provide a info about the document in order to customize the way it is processed. * `PHOTOSPHERE` - PHOTOSPHERE | [optional]
1516

1617

1718

@@ -48,3 +49,12 @@ Name | Type | Description | Notes
4849

4950

5051

52+
53+
## Enum: ProcessHintEnum
54+
55+
56+
* `PHOTOSPHERE` (value: `"PHOTOSPHERE"`)
57+
58+
59+
60+

docs/WriteFolderRequest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7+
**name** | **String** | Name of the folder |
78
**defaultPermission** | **Number** | Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write | [optional]
89
**parentId** | **Number** | | [optional]
9-
**name** | **String** | Name of the folder |
1010
**children** | [**[WriteFolderRequest]**](WriteFolderRequest.md) | | [optional]
1111

1212

src/api/CollaborationApi.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ export default class CollaborationApi {
866866

867867
/**
868868
* Create a document
869-
* 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
869+
* 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
870870
* @param {Number} cloudPk A unique integer value identifying this cloud.
871871
* @param {Number} projectPk A unique integer value identifying this project.
872872
* @param {String} name Shown name of the file
@@ -878,6 +878,7 @@ export default class CollaborationApi {
878878
* @param {module:model/String} opts.modelSource Define the model.source field if the upload is a Model (IFC, PDF, DWG...) * `UPLOAD` - UPLOAD * `SPLIT` - SPLIT * `MERGE` - MERGE * `EXPORT` - EXPORT * `OPTIMIZED` - OPTIMIZED
879879
* @param {module:model/String} opts.ifcSource 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
880880
* @param {Number} opts.successorOf Old document version to replace. Only for create
881+
* @param {module:model/String} opts.processHint Provide a info about the document in order to customize the way it is processed. * `PHOTOSPHERE` - PHOTOSPHERE
881882
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Document} and HTTP response
882883
*/
883884
createDocumentWithHttpInfo(cloudPk, projectPk, name, file, opts) {
@@ -916,7 +917,8 @@ export default class CollaborationApi {
916917
'file': file,
917918
'model_source': opts['modelSource'],
918919
'ifc_source': opts['ifcSource'],
919-
'successor_of': opts['successorOf']
920+
'successor_of': opts['successorOf'],
921+
'process_hint': opts['processHint']
920922
};
921923

922924
let authNames = ['ApiKey', 'BIMData_Connect', 'BIMData_Connect', 'Bearer'];
@@ -932,7 +934,7 @@ export default class CollaborationApi {
932934

933935
/**
934936
* Create a document
935-
* 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
937+
* 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
936938
* @param {Number} cloudPk A unique integer value identifying this cloud.
937939
* @param {Number} projectPk A unique integer value identifying this project.
938940
* @param {String} name Shown name of the file
@@ -944,6 +946,7 @@ export default class CollaborationApi {
944946
* @param {module:model/String} opts.modelSource Define the model.source field if the upload is a Model (IFC, PDF, DWG...) * `UPLOAD` - UPLOAD * `SPLIT` - SPLIT * `MERGE` - MERGE * `EXPORT` - EXPORT * `OPTIMIZED` - OPTIMIZED
945947
* @param {module:model/String} opts.ifcSource 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
946948
* @param {Number} opts.successorOf Old document version to replace. Only for create
949+
* @param {module:model/String} opts.processHint Provide a info about the document in order to customize the way it is processed. * `PHOTOSPHERE` - PHOTOSPHERE
947950
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Document}
948951
*/
949952
createDocument(cloudPk, projectPk, name, file, opts) {

src/api/ModelApi.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,7 +1243,7 @@ export default class ModelApi {
12431243

12441244
/**
12451245
* Create a relation between a 2d model and a building
1246-
* 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
1246+
* 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
12471247
* @param {String} buildingUuid
12481248
* @param {Number} cloudPk A unique integer value identifying this cloud.
12491249
* @param {Number} modelPk A unique integer value identifying this model.
@@ -1300,7 +1300,7 @@ export default class ModelApi {
13001300

13011301
/**
13021302
* Create a relation between a 2d model and a building
1303-
* 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
1303+
* 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
13041304
* @param {String} buildingUuid
13051305
* @param {Number} cloudPk A unique integer value identifying this cloud.
13061306
* @param {Number} modelPk A unique integer value identifying this model.
@@ -2805,7 +2805,7 @@ export default class ModelApi {
28052805

28062806
/**
28072807
* Create a relation between a 2d model and a storey
2808-
* 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
2808+
* 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
28092809
* @param {Number} cloudPk A unique integer value identifying this cloud.
28102810
* @param {Number} modelPk A unique integer value identifying this model.
28112811
* @param {Number} projectPk A unique integer value identifying this project.
@@ -2862,7 +2862,7 @@ export default class ModelApi {
28622862

28632863
/**
28642864
* Create a relation between a 2d model and a storey
2865-
* 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
2865+
* 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
28662866
* @param {Number} cloudPk A unique integer value identifying this cloud.
28672867
* @param {Number} modelPk A unique integer value identifying this model.
28682868
* @param {Number} projectPk A unique integer value identifying this project.

src/model/PatchedDocumentRequest.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ class PatchedDocumentRequest {
7171
if (data.hasOwnProperty('successor_of')) {
7272
obj['successor_of'] = ApiClient.convertToType(data['successor_of'], 'Number');
7373
}
74+
if (data.hasOwnProperty('process_hint')) {
75+
obj['process_hint'] = ApiClient.convertToType(data['process_hint'], 'String');
76+
}
7477
}
7578
return obj;
7679
}
@@ -124,6 +127,12 @@ PatchedDocumentRequest.prototype['ifc_source'] = undefined;
124127
*/
125128
PatchedDocumentRequest.prototype['successor_of'] = undefined;
126129

130+
/**
131+
* Provide a info about the document in order to customize the way it is processed. * `PHOTOSPHERE` - PHOTOSPHERE
132+
* @member {module:model/PatchedDocumentRequest.ProcessHintEnum} process_hint
133+
*/
134+
PatchedDocumentRequest.prototype['process_hint'] = undefined;
135+
127136

128137

129138

@@ -206,6 +215,21 @@ PatchedDocumentRequest['IfcSourceEnum'] = {
206215
};
207216

208217

218+
/**
219+
* Allowed values for the <code>process_hint</code> property.
220+
* @enum {String}
221+
* @readonly
222+
*/
223+
PatchedDocumentRequest['ProcessHintEnum'] = {
224+
225+
/**
226+
* value: "PHOTOSPHERE"
227+
* @const
228+
*/
229+
"PHOTOSPHERE": "PHOTOSPHERE"
230+
};
231+
232+
209233

210234
export default PatchedDocumentRequest;
211235

src/model/WriteFolderRequest.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ class WriteFolderRequest {
4949
if (data) {
5050
obj = obj || new WriteFolderRequest();
5151

52+
if (data.hasOwnProperty('name')) {
53+
obj['name'] = ApiClient.convertToType(data['name'], 'String');
54+
}
5255
if (data.hasOwnProperty('default_permission')) {
5356
obj['default_permission'] = ApiClient.convertToType(data['default_permission'], 'Number');
5457
}
5558
if (data.hasOwnProperty('parent_id')) {
5659
obj['parent_id'] = ApiClient.convertToType(data['parent_id'], 'Number');
5760
}
58-
if (data.hasOwnProperty('name')) {
59-
obj['name'] = ApiClient.convertToType(data['name'], 'String');
60-
}
6161
if (data.hasOwnProperty('children')) {
6262
obj['children'] = ApiClient.convertToType(data['children'], [WriteFolderRequest]);
6363
}
@@ -68,6 +68,12 @@ class WriteFolderRequest {
6868

6969
}
7070

71+
/**
72+
* Name of the folder
73+
* @member {String} name
74+
*/
75+
WriteFolderRequest.prototype['name'] = undefined;
76+
7177
/**
7278
* Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write
7379
* @member {module:model/WriteFolderRequest.DefaultPermissionEnum} default_permission
@@ -79,12 +85,6 @@ WriteFolderRequest.prototype['default_permission'] = undefined;
7985
*/
8086
WriteFolderRequest.prototype['parent_id'] = undefined;
8187

82-
/**
83-
* Name of the folder
84-
* @member {String} name
85-
*/
86-
WriteFolderRequest.prototype['name'] = undefined;
87-
8888
/**
8989
* @member {Array.<module:model/WriteFolderRequest>} children
9090
*/

test/model/PatchedDocumentRequest.spec.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@
102102
//expect(instance).to.be();
103103
});
104104

105+
it('should have the property processHint (base name: "process_hint")', function() {
106+
// uncomment below and update the code to test the property processHint
107+
//var instance = new bimdata.PatchedDocumentRequest();
108+
//expect(instance).to.be();
109+
});
110+
105111
});
106112

107113
}));

test/model/WriteFolderRequest.spec.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,20 @@
5454
//expect(instance).to.be.a(bimdata.WriteFolderRequest);
5555
});
5656

57-
it('should have the property defaultPermission (base name: "default_permission")', function() {
58-
// uncomment below and update the code to test the property defaultPermission
57+
it('should have the property name (base name: "name")', function() {
58+
// uncomment below and update the code to test the property name
5959
//var instance = new bimdata.WriteFolderRequest();
6060
//expect(instance).to.be();
6161
});
6262

63-
it('should have the property parentId (base name: "parent_id")', function() {
64-
// uncomment below and update the code to test the property parentId
63+
it('should have the property defaultPermission (base name: "default_permission")', function() {
64+
// uncomment below and update the code to test the property defaultPermission
6565
//var instance = new bimdata.WriteFolderRequest();
6666
//expect(instance).to.be();
6767
});
6868

69-
it('should have the property name (base name: "name")', function() {
70-
// uncomment below and update the code to test the property name
69+
it('should have the property parentId (base name: "parent_id")', function() {
70+
// uncomment below and update the code to test the property parentId
7171
//var instance = new bimdata.WriteFolderRequest();
7272
//expect(instance).to.be();
7373
});

0 commit comments

Comments
 (0)