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

Commit acaaa01

Browse files
committed
PATCH: Feat/multipage pdf (#596)
* create multipage-pdf * fix create_model tests * fix tests * add explicit comment to signal function * update help_text for parent and children
1 parent 5a197d2 commit acaaa01

17 files changed

+496
-6
lines changed

.openapi-generator/FILES

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ docs/ComponentsParent.md
3333
docs/ComponentsParentRequest.md
3434
docs/CreateBuildingByNameRequest.md
3535
docs/CreateModelRequest.md
36+
docs/CreateMultiPageModelRequest.md
3637
docs/DetailedExtensions.md
3738
docs/Direction.md
3839
docs/DirectionRequest.md
@@ -293,6 +294,7 @@ src/model/ComponentsParent.js
293294
src/model/ComponentsParentRequest.js
294295
src/model/CreateBuildingByNameRequest.js
295296
src/model/CreateModelRequest.js
297+
src/model/CreateMultiPageModelRequest.js
296298
src/model/DetailedExtensions.js
297299
src/model/Direction.js
298300
src/model/DirectionRequest.js
@@ -545,6 +547,7 @@ test/model/ComponentsParent.spec.js
545547
test/model/ComponentsParentRequest.spec.js
546548
test/model/CreateBuildingByNameRequest.spec.js
547549
test/model/CreateModelRequest.spec.js
550+
test/model/CreateMultiPageModelRequest.spec.js
548551
test/model/DetailedExtensions.spec.js
549552
test/model/Direction.spec.js
550553
test/model/DirectionRequest.spec.js

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ Class | Method | HTTP request | Description
360360
*bimdata.IfcApi* | [**createIfcUnitDeprecated**](docs/IfcApi.md#createIfcUnitDeprecated) | **POST** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/unit | Create a Unit on a model
361361
*bimdata.IfcApi* | [**createLayerDeprecated**](docs/IfcApi.md#createLayerDeprecated) | **POST** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/layer | Create a layer in the model
362362
*bimdata.IfcApi* | [**createMetaBuildingDeprecated**](docs/IfcApi.md#createMetaBuildingDeprecated) | **POST** /cloud/{cloud_pk}/project/{project_pk}/ifc/create-metabuilding | Create an empty 3D Model
363+
*bimdata.IfcApi* | [**createMultiPageIfcDeprecated**](docs/IfcApi.md#createMultiPageIfcDeprecated) | **POST** /cloud/{cloud_pk}/project/{project_pk}/ifc/{id}/create-multipage-model | Create a multi page model
363364
*bimdata.IfcApi* | [**createPropertySetDeprecated**](docs/IfcApi.md#createPropertySetDeprecated) | **POST** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/propertyset | Create one or many PropertySet
364365
*bimdata.IfcApi* | [**createPropertySetElementRelationsDeprecated**](docs/IfcApi.md#createPropertySetElementRelationsDeprecated) | **POST** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/propertyset-element | Create association between PropertySet and element
365366
*bimdata.IfcApi* | [**createRawElementsDeprecated**](docs/IfcApi.md#createRawElementsDeprecated) | **POST** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/element/raw | Create elements in an optimized format
@@ -514,6 +515,7 @@ Class | Method | HTTP request | Description
514515
*bimdata.ModelApi* | [**createModel**](docs/ModelApi.md#createModel) | **POST** /cloud/{cloud_pk}/project/{project_pk}/model/create-model | Make a PDF or Image file a Model
515516
*bimdata.ModelApi* | [**createModelPropertyDefinition**](docs/ModelApi.md#createModelPropertyDefinition) | **POST** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/propertydefinition | Create a PropertyDefinition on the model
516517
*bimdata.ModelApi* | [**createModelUnit**](docs/ModelApi.md#createModelUnit) | **POST** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/unit | Create a Unit on a model
518+
*bimdata.ModelApi* | [**createMultiPageModel**](docs/ModelApi.md#createMultiPageModel) | **POST** /cloud/{cloud_pk}/project/{project_pk}/model/{id}/create-multipage-model | Create a multi page model
517519
*bimdata.ModelApi* | [**createPropertySet**](docs/ModelApi.md#createPropertySet) | **POST** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/propertyset | Create one or many PropertySet
518520
*bimdata.ModelApi* | [**createPropertySetElementRelations**](docs/ModelApi.md#createPropertySetElementRelations) | **POST** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/propertyset-element | Create association between PropertySet and element
519521
*bimdata.ModelApi* | [**createRawElements**](docs/ModelApi.md#createRawElements) | **POST** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/element/raw | Create elements in an optimized format
@@ -674,6 +676,7 @@ Class | Method | HTTP request | Description
674676
- [bimdata.ComponentsParentRequest](docs/ComponentsParentRequest.md)
675677
- [bimdata.CreateBuildingByNameRequest](docs/CreateBuildingByNameRequest.md)
676678
- [bimdata.CreateModelRequest](docs/CreateModelRequest.md)
679+
- [bimdata.CreateMultiPageModelRequest](docs/CreateMultiPageModelRequest.md)
677680
- [bimdata.DetailedExtensions](docs/DetailedExtensions.md)
678681
- [bimdata.Direction](docs/Direction.md)
679682
- [bimdata.DirectionRequest](docs/DirectionRequest.md)

docs/CollaborationApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,7 @@ Name | Type | Description | Notes
954954
955955
Create a document
956956

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

959959
### Example
960960

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# bimdata.CreateMultiPageModelRequest
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**mapFiles** | **[File]** | |
8+
9+

docs/IfcApi.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Method | HTTP request | Description
3434
[**createIfcUnitDeprecated**](IfcApi.md#createIfcUnitDeprecated) | **POST** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/unit | Create a Unit on a model
3535
[**createLayerDeprecated**](IfcApi.md#createLayerDeprecated) | **POST** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/layer | Create a layer in the model
3636
[**createMetaBuildingDeprecated**](IfcApi.md#createMetaBuildingDeprecated) | **POST** /cloud/{cloud_pk}/project/{project_pk}/ifc/create-metabuilding | Create an empty 3D Model
37+
[**createMultiPageIfcDeprecated**](IfcApi.md#createMultiPageIfcDeprecated) | **POST** /cloud/{cloud_pk}/project/{project_pk}/ifc/{id}/create-multipage-model | Create a multi page model
3738
[**createPropertySetDeprecated**](IfcApi.md#createPropertySetDeprecated) | **POST** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/propertyset | Create one or many PropertySet
3839
[**createPropertySetElementRelationsDeprecated**](IfcApi.md#createPropertySetElementRelationsDeprecated) | **POST** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/propertyset-element | Create association between PropertySet and element
3940
[**createRawElementsDeprecated**](IfcApi.md#createRawElementsDeprecated) | **POST** /cloud/{cloud_pk}/project/{project_pk}/ifc/{ifc_pk}/element/raw | Create elements in an optimized format
@@ -2221,6 +2222,73 @@ Name | Type | Description | Notes
22212222
- **Accept**: application/json
22222223

22232224

2225+
## createMultiPageIfcDeprecated
2226+
2227+
> Model createMultiPageIfcDeprecated(cloudPk, id, projectPk, createMultiPageModelRequest)
2228+
2229+
Create a multi page model
2230+
2231+
Create a multi page model Required scopes: ifc:write, model:write
2232+
2233+
### Example
2234+
2235+
```javascript
2236+
import bimdata from '@bimdata/bimdata-api-client';
2237+
let defaultClient = bimdata.ApiClient.instance;
2238+
// Configure API key authorization: ApiKey
2239+
let ApiKey = defaultClient.authentications['ApiKey'];
2240+
ApiKey.apiKey = 'YOUR API KEY';
2241+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
2242+
//ApiKey.apiKeyPrefix = 'Token';
2243+
// Configure OAuth2 access token for authorization: BIMData_Connect
2244+
let BIMData_Connect = defaultClient.authentications['BIMData_Connect'];
2245+
BIMData_Connect.accessToken = 'YOUR ACCESS TOKEN';
2246+
// Configure OAuth2 access token for authorization: BIMData_Connect
2247+
let BIMData_Connect = defaultClient.authentications['BIMData_Connect'];
2248+
BIMData_Connect.accessToken = 'YOUR ACCESS TOKEN';
2249+
// Configure API key authorization: Bearer
2250+
let Bearer = defaultClient.authentications['Bearer'];
2251+
Bearer.apiKey = 'YOUR API KEY';
2252+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
2253+
//Bearer.apiKeyPrefix = 'Token';
2254+
2255+
let apiInstance = new bimdata.IfcApi();
2256+
let cloudPk = 56; // Number |
2257+
let id = 56; // Number | A unique integer value identifying this model.
2258+
let projectPk = 56; // Number |
2259+
let createMultiPageModelRequest = new bimdata.CreateMultiPageModelRequest(); // CreateMultiPageModelRequest |
2260+
apiInstance.createMultiPageIfcDeprecated(cloudPk, id, projectPk, createMultiPageModelRequest).then((data) => {
2261+
console.log('API called successfully. Returned data: ' + data);
2262+
}, (error) => {
2263+
console.error(error);
2264+
});
2265+
2266+
```
2267+
2268+
### Parameters
2269+
2270+
2271+
Name | Type | Description | Notes
2272+
------------- | ------------- | ------------- | -------------
2273+
**cloudPk** | **Number**| |
2274+
**id** | **Number**| A unique integer value identifying this model. |
2275+
**projectPk** | **Number**| |
2276+
**createMultiPageModelRequest** | [**CreateMultiPageModelRequest**](CreateMultiPageModelRequest.md)| |
2277+
2278+
### Return type
2279+
2280+
[**Model**](Model.md)
2281+
2282+
### Authorization
2283+
2284+
[ApiKey](../README.md#ApiKey), [BIMData_Connect](../README.md#BIMData_Connect), [BIMData_Connect](../README.md#BIMData_Connect), [Bearer](../README.md#Bearer)
2285+
2286+
### HTTP request headers
2287+
2288+
- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
2289+
- **Accept**: application/json
2290+
2291+
22242292
## createPropertySetDeprecated
22252293

22262294
> [PropertySet] createPropertySetDeprecated(cloudPk, ifcPk, projectPk, propertySetRequest)

docs/Model.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ Name | Type | Description | Notes
3131
**version** | **String** | This field is only for information. Updating it won't impact the export. | [optional]
3232
**northVector** | **[[Number]]** | This field is only for information. Updating it won't impact the export. | [optional]
3333
**recommanded2dAngle** | **Number** | This is the angle in clockwise degree to apply on the 2D to optimise the horizontality of objects. This field is only for information. Updating it won't impact the export. | [optional]
34+
**pageNumber** | **Number** | The page number of the related pdf | [readonly]
35+
**children** | [**[Model]**](Model.md) | Contains additional pages of a pdf | [readonly]
3436

3537

3638

docs/ModelApi.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Method | HTTP request | Description
3232
[**createModel**](ModelApi.md#createModel) | **POST** /cloud/{cloud_pk}/project/{project_pk}/model/create-model | Make a PDF or Image file a Model
3333
[**createModelPropertyDefinition**](ModelApi.md#createModelPropertyDefinition) | **POST** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/propertydefinition | Create a PropertyDefinition on the model
3434
[**createModelUnit**](ModelApi.md#createModelUnit) | **POST** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/unit | Create a Unit on a model
35+
[**createMultiPageModel**](ModelApi.md#createMultiPageModel) | **POST** /cloud/{cloud_pk}/project/{project_pk}/model/{id}/create-multipage-model | Create a multi page model
3536
[**createPropertySet**](ModelApi.md#createPropertySet) | **POST** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/propertyset | Create one or many PropertySet
3637
[**createPropertySetElementRelations**](ModelApi.md#createPropertySetElementRelations) | **POST** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/propertyset-element | Create association between PropertySet and element
3738
[**createRawElements**](ModelApi.md#createRawElements) | **POST** /cloud/{cloud_pk}/project/{project_pk}/model/{model_pk}/element/raw | Create elements in an optimized format
@@ -2070,6 +2071,73 @@ Name | Type | Description | Notes
20702071
- **Accept**: application/json
20712072

20722073

2074+
## createMultiPageModel
2075+
2076+
> Model createMultiPageModel(cloudPk, id, projectPk, createMultiPageModelRequest)
2077+
2078+
Create a multi page model
2079+
2080+
Create a multi page model Required scopes: ifc:write, model:write
2081+
2082+
### Example
2083+
2084+
```javascript
2085+
import bimdata from '@bimdata/bimdata-api-client';
2086+
let defaultClient = bimdata.ApiClient.instance;
2087+
// Configure API key authorization: ApiKey
2088+
let ApiKey = defaultClient.authentications['ApiKey'];
2089+
ApiKey.apiKey = 'YOUR API KEY';
2090+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
2091+
//ApiKey.apiKeyPrefix = 'Token';
2092+
// Configure OAuth2 access token for authorization: BIMData_Connect
2093+
let BIMData_Connect = defaultClient.authentications['BIMData_Connect'];
2094+
BIMData_Connect.accessToken = 'YOUR ACCESS TOKEN';
2095+
// Configure OAuth2 access token for authorization: BIMData_Connect
2096+
let BIMData_Connect = defaultClient.authentications['BIMData_Connect'];
2097+
BIMData_Connect.accessToken = 'YOUR ACCESS TOKEN';
2098+
// Configure API key authorization: Bearer
2099+
let Bearer = defaultClient.authentications['Bearer'];
2100+
Bearer.apiKey = 'YOUR API KEY';
2101+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
2102+
//Bearer.apiKeyPrefix = 'Token';
2103+
2104+
let apiInstance = new bimdata.ModelApi();
2105+
let cloudPk = 56; // Number |
2106+
let id = 56; // Number | A unique integer value identifying this model.
2107+
let projectPk = 56; // Number |
2108+
let createMultiPageModelRequest = new bimdata.CreateMultiPageModelRequest(); // CreateMultiPageModelRequest |
2109+
apiInstance.createMultiPageModel(cloudPk, id, projectPk, createMultiPageModelRequest).then((data) => {
2110+
console.log('API called successfully. Returned data: ' + data);
2111+
}, (error) => {
2112+
console.error(error);
2113+
});
2114+
2115+
```
2116+
2117+
### Parameters
2118+
2119+
2120+
Name | Type | Description | Notes
2121+
------------- | ------------- | ------------- | -------------
2122+
**cloudPk** | **Number**| |
2123+
**id** | **Number**| A unique integer value identifying this model. |
2124+
**projectPk** | **Number**| |
2125+
**createMultiPageModelRequest** | [**CreateMultiPageModelRequest**](CreateMultiPageModelRequest.md)| |
2126+
2127+
### Return type
2128+
2129+
[**Model**](Model.md)
2130+
2131+
### Authorization
2132+
2133+
[ApiKey](../README.md#ApiKey), [BIMData_Connect](../README.md#BIMData_Connect), [BIMData_Connect](../README.md#BIMData_Connect), [Bearer](../README.md#Bearer)
2134+
2135+
### HTTP request headers
2136+
2137+
- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
2138+
- **Accept**: application/json
2139+
2140+
20732141
## createPropertySet
20742142

20752143
> [PropertySet] createPropertySet(cloudPk, modelPk, projectPk, propertySetRequest)

src/api/CollaborationApi.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ export default class CollaborationApi {
857857

858858
/**
859859
* Create a document
860-
* Create a document. If the document is one of {'OBJ', 'DXF', 'IFC', 'DWG', 'DAE', 'BFX', 'GLTF', 'POINT_CLOUD'}, a model will be created and attached to this document Required scopes: document:write
860+
* Create a document. If the document is one of {'PDF', 'GLTF', 'BFX', 'DAE', 'POINT_CLOUD', 'IFC', 'DXF', 'OBJ', 'DWG'}, a model will be created and attached to this document Required scopes: document:write
861861
* @param {Number} cloudPk A unique integer value identifying this cloud.
862862
* @param {Number} projectPk A unique integer value identifying this project.
863863
* @param {String} name Shown name of the file
@@ -925,7 +925,7 @@ export default class CollaborationApi {
925925

926926
/**
927927
* Create a document
928-
* Create a document. If the document is one of {'OBJ', 'DXF', 'IFC', 'DWG', 'DAE', 'BFX', 'GLTF', 'POINT_CLOUD'}, a model will be created and attached to this document Required scopes: document:write
928+
* Create a document. If the document is one of {'PDF', 'GLTF', 'BFX', 'DAE', 'POINT_CLOUD', 'IFC', 'DXF', 'OBJ', 'DWG'}, a model will be created and attached to this document Required scopes: document:write
929929
* @param {Number} cloudPk A unique integer value identifying this cloud.
930930
* @param {Number} projectPk A unique integer value identifying this project.
931931
* @param {String} name Shown name of the file

src/api/IfcApi.js

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import Classification from '../model/Classification';
2121
import ClassificationRequest from '../model/ClassificationRequest';
2222
import CreateBuildingByNameRequest from '../model/CreateBuildingByNameRequest';
2323
import CreateModelRequest from '../model/CreateModelRequest';
24+
import CreateMultiPageModelRequest from '../model/CreateMultiPageModelRequest';
2425
import Document from '../model/Document';
2526
import DocumentWithElementList from '../model/DocumentWithElementList';
2627
import Element from '../model/Element';
@@ -2224,6 +2225,74 @@ export default class IfcApi {
22242225
}
22252226

22262227

2228+
/**
2229+
* Create a multi page model
2230+
* Create a multi page model Required scopes: ifc:write, model:write
2231+
* @param {Number} cloudPk
2232+
* @param {Number} id A unique integer value identifying this model.
2233+
* @param {Number} projectPk
2234+
* @param {module:model/CreateMultiPageModelRequest} createMultiPageModelRequest
2235+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Model} and HTTP response
2236+
*/
2237+
createMultiPageIfcDeprecatedWithHttpInfo(cloudPk, id, projectPk, createMultiPageModelRequest) {
2238+
let postBody = createMultiPageModelRequest;
2239+
// verify the required parameter 'cloudPk' is set
2240+
if (cloudPk === undefined || cloudPk === null) {
2241+
throw new Error("Missing the required parameter 'cloudPk' when calling createMultiPageIfcDeprecated");
2242+
}
2243+
// verify the required parameter 'id' is set
2244+
if (id === undefined || id === null) {
2245+
throw new Error("Missing the required parameter 'id' when calling createMultiPageIfcDeprecated");
2246+
}
2247+
// verify the required parameter 'projectPk' is set
2248+
if (projectPk === undefined || projectPk === null) {
2249+
throw new Error("Missing the required parameter 'projectPk' when calling createMultiPageIfcDeprecated");
2250+
}
2251+
// verify the required parameter 'createMultiPageModelRequest' is set
2252+
if (createMultiPageModelRequest === undefined || createMultiPageModelRequest === null) {
2253+
throw new Error("Missing the required parameter 'createMultiPageModelRequest' when calling createMultiPageIfcDeprecated");
2254+
}
2255+
2256+
let pathParams = {
2257+
'cloud_pk': cloudPk,
2258+
'id': id,
2259+
'project_pk': projectPk
2260+
};
2261+
let queryParams = {
2262+
};
2263+
let headerParams = {
2264+
};
2265+
let formParams = {
2266+
};
2267+
2268+
let authNames = ['ApiKey', 'BIMData_Connect', 'BIMData_Connect', 'Bearer'];
2269+
let contentTypes = ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'];
2270+
let accepts = ['application/json'];
2271+
let returnType = Model;
2272+
return this.apiClient.callApi(
2273+
'/cloud/{cloud_pk}/project/{project_pk}/ifc/{id}/create-multipage-model', 'POST',
2274+
pathParams, queryParams, headerParams, formParams, postBody,
2275+
authNames, contentTypes, accepts, returnType, null
2276+
);
2277+
}
2278+
2279+
/**
2280+
* Create a multi page model
2281+
* Create a multi page model Required scopes: ifc:write, model:write
2282+
* @param {Number} cloudPk
2283+
* @param {Number} id A unique integer value identifying this model.
2284+
* @param {Number} projectPk
2285+
* @param {module:model/CreateMultiPageModelRequest} createMultiPageModelRequest
2286+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Model}
2287+
*/
2288+
createMultiPageIfcDeprecated(cloudPk, id, projectPk, createMultiPageModelRequest) {
2289+
return this.createMultiPageIfcDeprecatedWithHttpInfo(cloudPk, id, projectPk, createMultiPageModelRequest)
2290+
.then(function(response_and_data) {
2291+
return response_and_data.data;
2292+
});
2293+
}
2294+
2295+
22272296
/**
22282297
* Create one or many PropertySet
22292298
* Bulk create available. You can either post an object or a list of objects. Is you post a list, the response will be a list (in the same order) of created objects or of errors if any If at least one create succeeded, the status code will be 201. If every create failed, the status code we'll be 400 with the list of errors Required scopes: ifc:write, model:write

0 commit comments

Comments
 (0)