Skip to content
This repository was archived by the owner on Nov 18, 2025. It is now read-only.

Commit edfb063

Browse files
committed
MINOR: Feature/smart files (#463)
* allow many model types * add tests * fix document name * more cleanup * update ci poetry version * do not reprocess on file update * fix export,merge and optimize queues * add types.py * more contants
1 parent 189098b commit edfb063

8 files changed

Lines changed: 41 additions & 21 deletions

File tree

docs/Ifc.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**id** | **Number** | | [optional] [readonly]
88
**name** | **String** | | [optional] [readonly]
9+
**type** | **String** | | [optional] [readonly]
910
**creator** | [**User**](User.md) | | [optional]
1011
**status** | **String** | | [optional] [readonly]
1112
**source** | **String** | | [optional]

docs/IfcApi.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2826,7 +2826,7 @@ null (empty response body)
28262826
28272827
Export IFC
28282828

2829-
Export IFC as requested in parameters. When the export is finished, a new IFC file with will be created in the same folder than the original IFC. You can query the folder or subscribe to the new document webhook to retrieve the result Required scopes: ifc:write
2829+
Only works for IFC files. Export IFC as requested in parameters. When the export is finished, a new IFC file with will be created in the same folder than the original IFC. You can query the folder or subscribe to the new document webhook to retrieve the result Required scopes: ifc:write
28302830

28312831
### Example
28322832

@@ -4594,7 +4594,7 @@ Name | Type | Description | Notes
45944594
45954595
Retrieve all models
45964596

4597-
Retrieve all models Required scopes: ifc:read
4597+
Retrieve all models. For legacy reasons, this route is named IFC but now handle all models types (DWG, PDF, IFC, etc). The field `type` allows you to discriminate which kind of model it is. Required scopes: ifc:read
45984598

45994599
### Example
46004600

@@ -4618,7 +4618,8 @@ let cloudPk = "cloudPk_example"; // String |
46184618
let projectPk = "projectPk_example"; // String |
46194619
let opts = {
46204620
'status': "status_example", // String | Filter the returned list by status
4621-
'source': "source_example" // String | Filter the returned list by source
4621+
'source': "source_example", // String | Filter the returned list by source
4622+
'type': "type_example" // String | Filter the returned list by type
46224623
};
46234624
apiInstance.getIfcs(cloudPk, projectPk, opts).then((data) => {
46244625
console.log('API called successfully. Returned data: ' + data);
@@ -4637,6 +4638,7 @@ Name | Type | Description | Notes
46374638
**projectPk** | **String**| |
46384639
**status** | **String**| Filter the returned list by status | [optional]
46394640
**source** | **String**| Filter the returned list by source | [optional]
4641+
**type** | **String**| Filter the returned list by type | [optional]
46404642

46414643
### Return type
46424644

@@ -5968,7 +5970,7 @@ Name | Type | Description | Notes
59685970
59695971
Merge IFC files
59705972

5971-
Merge IFC files. The merged IFC file will be put in the same folder that the first IFC of the list Required scopes: ifc:write
5973+
Only works for IFC files. Merge IFC files. The merged IFC file will be put in the same folder that the first IFC of the list Required scopes: ifc:write
59725974

59735975
### Example
59745976

@@ -6028,7 +6030,7 @@ null (empty response body)
60286030
60296031
Optimize the IFC
60306032

6031-
Optimize the IFC. A new optimized IFC file will be put in the same folder that the original IFC Required scopes: ifc:write
6033+
Only works for IFC files. Optimize the IFC. A new optimized IFC file will be put in the same folder that the original IFC Required scopes: ifc:write
60326034

60336035
### Example
60346036

docs/ProcessorHandler.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**id** | **Number** | | [optional] [readonly]
8-
**processor** | **Number** | | [optional] [readonly]
8+
**worker** | **String** | | [optional] [readonly]
99
**status** | **String** | | [optional]
1010
**detailMessage** | **String** | | [optional]
1111

src/api/IfcApi.js

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3097,7 +3097,7 @@ export default class IfcApi {
30973097

30983098
/**
30993099
* Export IFC
3100-
* Export IFC as requested in parameters. When the export is finished, a new IFC file with will be created in the same folder than the original IFC. You can query the folder or subscribe to the new document webhook to retrieve the result Required scopes: ifc:write
3100+
* Only works for IFC files. Export IFC as requested in parameters. When the export is finished, a new IFC file with will be created in the same folder than the original IFC. You can query the folder or subscribe to the new document webhook to retrieve the result Required scopes: ifc:write
31013101
* @param {String} cloudPk
31023102
* @param {Number} id A unique integer value identifying this ifc.
31033103
* @param {String} projectPk
@@ -3148,7 +3148,7 @@ export default class IfcApi {
31483148

31493149
/**
31503150
* Export IFC
3151-
* Export IFC as requested in parameters. When the export is finished, a new IFC file with will be created in the same folder than the original IFC. You can query the folder or subscribe to the new document webhook to retrieve the result Required scopes: ifc:write
3151+
* Only works for IFC files. Export IFC as requested in parameters. When the export is finished, a new IFC file with will be created in the same folder than the original IFC. You can query the folder or subscribe to the new document webhook to retrieve the result Required scopes: ifc:write
31523152
* @param {String} cloudPk
31533153
* @param {Number} id A unique integer value identifying this ifc.
31543154
* @param {String} projectPk
@@ -5107,12 +5107,13 @@ export default class IfcApi {
51075107

51085108
/**
51095109
* Retrieve all models
5110-
* Retrieve all models Required scopes: ifc:read
5110+
* Retrieve all models. For legacy reasons, this route is named IFC but now handle all models types (DWG, PDF, IFC, etc). The field `type` allows you to discriminate which kind of model it is. Required scopes: ifc:read
51115111
* @param {String} cloudPk
51125112
* @param {String} projectPk
51135113
* @param {Object} opts Optional parameters
51145114
* @param {String} opts.status Filter the returned list by status
51155115
* @param {String} opts.source Filter the returned list by source
5116+
* @param {String} opts.type Filter the returned list by type
51165117
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/Ifc>} and HTTP response
51175118
*/
51185119
getIfcsWithHttpInfo(cloudPk, projectPk, opts) {
@@ -5133,7 +5134,8 @@ export default class IfcApi {
51335134
};
51345135
let queryParams = {
51355136
'status': opts['status'],
5136-
'source': opts['source']
5137+
'source': opts['source'],
5138+
'type': opts['type']
51375139
};
51385140
let headerParams = {
51395141
};
@@ -5153,12 +5155,13 @@ export default class IfcApi {
51535155

51545156
/**
51555157
* Retrieve all models
5156-
* Retrieve all models Required scopes: ifc:read
5158+
* Retrieve all models. For legacy reasons, this route is named IFC but now handle all models types (DWG, PDF, IFC, etc). The field `type` allows you to discriminate which kind of model it is. Required scopes: ifc:read
51575159
* @param {String} cloudPk
51585160
* @param {String} projectPk
51595161
* @param {Object} opts Optional parameters
51605162
* @param {String} opts.status Filter the returned list by status
51615163
* @param {String} opts.source Filter the returned list by source
5164+
* @param {String} opts.type Filter the returned list by type
51625165
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/Ifc>}
51635166
*/
51645167
getIfcs(cloudPk, projectPk, opts) {
@@ -6607,7 +6610,7 @@ export default class IfcApi {
66076610

66086611
/**
66096612
* Merge IFC files
6610-
* Merge IFC files. The merged IFC file will be put in the same folder that the first IFC of the list Required scopes: ifc:write
6613+
* Only works for IFC files. Merge IFC files. The merged IFC file will be put in the same folder that the first IFC of the list Required scopes: ifc:write
66116614
* @param {String} cloudPk
66126615
* @param {String} projectPk
66136616
* @param {module:model/IfcMerge} data
@@ -6652,7 +6655,7 @@ export default class IfcApi {
66526655

66536656
/**
66546657
* Merge IFC files
6655-
* Merge IFC files. The merged IFC file will be put in the same folder that the first IFC of the list Required scopes: ifc:write
6658+
* Only works for IFC files. Merge IFC files. The merged IFC file will be put in the same folder that the first IFC of the list Required scopes: ifc:write
66566659
* @param {String} cloudPk
66576660
* @param {String} projectPk
66586661
* @param {module:model/IfcMerge} data
@@ -6668,7 +6671,7 @@ export default class IfcApi {
66686671

66696672
/**
66706673
* Optimize the IFC
6671-
* Optimize the IFC. A new optimized IFC file will be put in the same folder that the original IFC Required scopes: ifc:write
6674+
* Only works for IFC files. Optimize the IFC. A new optimized IFC file will be put in the same folder that the original IFC Required scopes: ifc:write
66726675
* @param {String} cloudPk
66736676
* @param {Number} id A unique integer value identifying this ifc.
66746677
* @param {String} projectPk
@@ -6719,7 +6722,7 @@ export default class IfcApi {
67196722

67206723
/**
67216724
* Optimize the IFC
6722-
* Optimize the IFC. A new optimized IFC file will be put in the same folder that the original IFC Required scopes: ifc:write
6725+
* Only works for IFC files. Optimize the IFC. A new optimized IFC file will be put in the same folder that the original IFC Required scopes: ifc:write
67236726
* @param {String} cloudPk
67246727
* @param {Number} id A unique integer value identifying this ifc.
67256728
* @param {String} projectPk

src/model/Ifc.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ class Ifc {
5555
if (data.hasOwnProperty('name')) {
5656
obj['name'] = ApiClient.convertToType(data['name'], 'String');
5757
}
58+
if (data.hasOwnProperty('type')) {
59+
obj['type'] = ApiClient.convertToType(data['type'], 'String');
60+
}
5861
if (data.hasOwnProperty('creator')) {
5962
obj['creator'] = User.constructFromObject(data['creator']);
6063
}
@@ -138,6 +141,11 @@ Ifc.prototype['id'] = undefined;
138141
*/
139142
Ifc.prototype['name'] = undefined;
140143

144+
/**
145+
* @member {String} type
146+
*/
147+
Ifc.prototype['type'] = undefined;
148+
141149
/**
142150
* @member {module:model/User} creator
143151
*/

src/model/ProcessorHandler.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ class ProcessorHandler {
5050
if (data.hasOwnProperty('id')) {
5151
obj['id'] = ApiClient.convertToType(data['id'], 'Number');
5252
}
53-
if (data.hasOwnProperty('processor')) {
54-
obj['processor'] = ApiClient.convertToType(data['processor'], 'Number');
53+
if (data.hasOwnProperty('worker')) {
54+
obj['worker'] = ApiClient.convertToType(data['worker'], 'String');
5555
}
5656
if (data.hasOwnProperty('status')) {
5757
obj['status'] = ApiClient.convertToType(data['status'], 'String');
@@ -72,9 +72,9 @@ class ProcessorHandler {
7272
ProcessorHandler.prototype['id'] = undefined;
7373

7474
/**
75-
* @member {Number} processor
75+
* @member {String} worker
7676
*/
77-
ProcessorHandler.prototype['processor'] = undefined;
77+
ProcessorHandler.prototype['worker'] = undefined;
7878

7979
/**
8080
* @member {module:model/ProcessorHandler.StatusEnum} status

test/model/Ifc.spec.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@
6666
//expect(instance).to.be();
6767
});
6868

69+
it('should have the property type (base name: "type")', function() {
70+
// uncomment below and update the code to test the property type
71+
//var instane = new bimdata.Ifc();
72+
//expect(instance).to.be();
73+
});
74+
6975
it('should have the property creator (base name: "creator")', function() {
7076
// uncomment below and update the code to test the property creator
7177
//var instane = new bimdata.Ifc();

test/model/ProcessorHandler.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@
6060
//expect(instance).to.be();
6161
});
6262

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

0 commit comments

Comments
 (0)