Skip to content

Commit 479d5b2

Browse files
committed
PATCH: Allow crop_path to be null on Mask2D. (#867)
1 parent a4bfab8 commit 479d5b2

File tree

11 files changed

+117
-120
lines changed

11 files changed

+117
-120
lines changed

docs/CollaborationApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ Name | Type | Description | Notes
882882
883883
Create a document
884884

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

887887
### Example
888888

docs/Mask2D.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** | | [readonly]
8-
**cropPath** | **[[Number]]** | Crop path of the manually created mask to show only a part of the model. |
8+
**cropPath** | **[[Number]]** | Crop path of the manually created mask to show only a part of the model. | [optional]
99
**grayscale** | **Boolean** | Whether the mask is grayscale | [optional]
1010
**opacity** | **Number** | Opacity of the mask (0-1) | [optional]
1111
**brightness** | **Number** | Brightness of the mask | [optional]

docs/Mask2DRequest.md

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

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**cropPath** | **[[Number]]** | Crop path of the manually created mask to show only a part of the model. |
7+
**cropPath** | **[[Number]]** | Crop path of the manually created mask to show only a part of the model. | [optional]
88
**grayscale** | **Boolean** | Whether the mask is grayscale | [optional]
99
**opacity** | **Number** | Opacity of the mask (0-1) | [optional]
1010
**brightness** | **Number** | Brightness of the mask | [optional]

docs/ModelApi.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1820,7 +1820,7 @@ Name | Type | Description | Notes
18201820

18211821
## createMask2D
18221822

1823-
> Mask2D createMask2D(cloudPk, id, projectPk, mask2DRequest)
1823+
> Mask2D createMask2D(cloudPk, id, projectPk, opts)
18241824
18251825
Create or update a 2D mask for the model
18261826

@@ -1846,8 +1846,10 @@ let apiInstance = new bimdata.ModelApi();
18461846
let cloudPk = 56; // Number |
18471847
let id = 56; // Number | A unique integer value identifying this model.
18481848
let projectPk = 56; // Number |
1849-
let mask2DRequest = new bimdata.Mask2DRequest(); // Mask2DRequest |
1850-
apiInstance.createMask2D(cloudPk, id, projectPk, mask2DRequest).then((data) => {
1849+
let opts = {
1850+
'mask2DRequest': new bimdata.Mask2DRequest() // Mask2DRequest |
1851+
};
1852+
apiInstance.createMask2D(cloudPk, id, projectPk, opts).then((data) => {
18511853
console.log('API called successfully. Returned data: ' + data);
18521854
}, (error) => {
18531855
console.error(error);
@@ -1863,7 +1865,7 @@ Name | Type | Description | Notes
18631865
**cloudPk** | **Number**| |
18641866
**id** | **Number**| A unique integer value identifying this model. |
18651867
**projectPk** | **Number**| |
1866-
**mask2DRequest** | [**Mask2DRequest**](Mask2DRequest.md)| |
1868+
**mask2DRequest** | [**Mask2DRequest**](Mask2DRequest.md)| | [optional]
18671869

18681870
### Return type
18691871

docs/WriteFolder.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**type** | **String** | DEPRECATED: Use 'nature' instead. Value is \"Folder\". It is usefull to parse the tree and discriminate folders and files | [readonly]
8-
**name** | **String** | Name of the folder |
7+
**updatedAt** | **Date** | Date of the last update | [readonly]
98
**id** | **Number** | | [readonly]
10-
**groupsPermissions** | [**[GroupFolderRead]**](GroupFolderRead.md) | List of group permissions | [readonly]
11-
**defaultPermission** | **Number** | Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write | [optional]
12-
**parentId** | **Number** | | [optional]
9+
**type** | **String** | DEPRECATED: Use 'nature' instead. Value is \"Folder\". It is usefull to parse the tree and discriminate folders and files | [readonly]
1310
**createdAt** | **Date** | Creation date | [readonly]
14-
**updatedAt** | **Date** | Date of the last update | [readonly]
11+
**userPermission** | **Number** | Aggregate of group user permissions and folder default permission | [readonly]
1512
**nature** | **String** | Value is \"Folder\". It is usefull to parse the tree and discriminate folders and files | [readonly]
13+
**groupsPermissions** | [**[GroupFolderRead]**](GroupFolderRead.md) | List of group permissions | [readonly]
14+
**name** | **String** | Name of the folder |
15+
**defaultPermission** | **Number** | Permission for a Folder * `1` - denied * `50` - read_only * `100` - read_write | [optional]
1616
**createdBy** | [**ShortUser**](ShortUser.md) | | [readonly]
17-
**userPermission** | **Number** | Aggregate of group user permissions and folder default permission | [readonly]
17+
**parentId** | **Number** | | [optional]
1818
**children** | [**[WriteFolder]**](WriteFolder.md) | | [optional]
1919

2020

2121

22-
## Enum: DefaultPermissionEnum
22+
## Enum: UserPermissionEnum
2323

2424

2525
* `1` (value: `1`)
@@ -32,7 +32,7 @@ Name | Type | Description | Notes
3232

3333

3434

35-
## Enum: UserPermissionEnum
35+
## Enum: DefaultPermissionEnum
3636

3737

3838
* `1` (value: `1`)

src/api/CollaborationApi.js

Lines changed: 2 additions & 2 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 {'IFC', 'POINT_CLOUD', 'DXF', 'DWG', 'OBJ', 'GLTF'}, a model will be created and attached to this document Required scopes: document:write
869+
* Create a document. If the document is one of {'GLTF', 'POINT_CLOUD', 'IFC', 'DXF', 'OBJ', '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
@@ -934,7 +934,7 @@ export default class CollaborationApi {
934934

935935
/**
936936
* Create a document
937-
* Create a document. If the document is one of {'IFC', 'POINT_CLOUD', 'DXF', 'DWG', 'OBJ', 'GLTF'}, a model will be created and attached to this document Required scopes: document:write
937+
* Create a document. If the document is one of {'GLTF', 'POINT_CLOUD', 'IFC', 'DXF', 'OBJ', 'DWG'}, a model will be created and attached to this document Required scopes: document:write
938938
* @param {Number} cloudPk A unique integer value identifying this cloud.
939939
* @param {Number} projectPk A unique integer value identifying this project.
940940
* @param {String} name Shown name of the file

src/api/ModelApi.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2026,11 +2026,13 @@ export default class ModelApi {
20262026
* @param {Number} cloudPk
20272027
* @param {Number} id A unique integer value identifying this model.
20282028
* @param {Number} projectPk
2029-
* @param {module:model/Mask2DRequest} mask2DRequest
2029+
* @param {Object} opts Optional parameters
2030+
* @param {module:model/Mask2DRequest} opts.mask2DRequest
20302031
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Mask2D} and HTTP response
20312032
*/
2032-
createMask2DWithHttpInfo(cloudPk, id, projectPk, mask2DRequest) {
2033-
let postBody = mask2DRequest;
2033+
createMask2DWithHttpInfo(cloudPk, id, projectPk, opts) {
2034+
opts = opts || {};
2035+
let postBody = opts['mask2DRequest'];
20342036
// verify the required parameter 'cloudPk' is set
20352037
if (cloudPk === undefined || cloudPk === null) {
20362038
throw new Error("Missing the required parameter 'cloudPk' when calling createMask2D");
@@ -2043,10 +2045,6 @@ export default class ModelApi {
20432045
if (projectPk === undefined || projectPk === null) {
20442046
throw new Error("Missing the required parameter 'projectPk' when calling createMask2D");
20452047
}
2046-
// verify the required parameter 'mask2DRequest' is set
2047-
if (mask2DRequest === undefined || mask2DRequest === null) {
2048-
throw new Error("Missing the required parameter 'mask2DRequest' when calling createMask2D");
2049-
}
20502048

20512049
let pathParams = {
20522050
'cloud_pk': cloudPk,
@@ -2077,11 +2075,12 @@ export default class ModelApi {
20772075
* @param {Number} cloudPk
20782076
* @param {Number} id A unique integer value identifying this model.
20792077
* @param {Number} projectPk
2080-
* @param {module:model/Mask2DRequest} mask2DRequest
2078+
* @param {Object} opts Optional parameters
2079+
* @param {module:model/Mask2DRequest} opts.mask2DRequest
20812080
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Mask2D}
20822081
*/
2083-
createMask2D(cloudPk, id, projectPk, mask2DRequest) {
2084-
return this.createMask2DWithHttpInfo(cloudPk, id, projectPk, mask2DRequest)
2082+
createMask2D(cloudPk, id, projectPk, opts) {
2083+
return this.createMask2DWithHttpInfo(cloudPk, id, projectPk, opts)
20852084
.then(function(response_and_data) {
20862085
return response_and_data.data;
20872086
});

src/model/Mask2D.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,21 @@ class Mask2D {
2323
* Constructs a new <code>Mask2D</code>.
2424
* @alias module:model/Mask2D
2525
* @param id {Number}
26-
* @param cropPath {Array.<Array.<Number>>} Crop path of the manually created mask to show only a part of the model.
2726
* @param createdAt {Date} Creation date
2827
* @param updatedAt {Date} Date of the last update
2928
*/
30-
constructor(id, cropPath, createdAt, updatedAt) {
29+
constructor(id, createdAt, updatedAt) {
3130

32-
Mask2D.initialize(this, id, cropPath, createdAt, updatedAt);
31+
Mask2D.initialize(this, id, createdAt, updatedAt);
3332
}
3433

3534
/**
3635
* Initializes the fields of this object.
3736
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
3837
* Only for internal use.
3938
*/
40-
static initialize(obj, id, cropPath, createdAt, updatedAt) {
39+
static initialize(obj, id, createdAt, updatedAt) {
4140
obj['id'] = id;
42-
obj['crop_path'] = cropPath;
4341
obj['created_at'] = createdAt;
4442
obj['updated_at'] = updatedAt;
4543
}

src/model/Mask2DRequest.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,18 @@ class Mask2DRequest {
2222
/**
2323
* Constructs a new <code>Mask2DRequest</code>.
2424
* @alias module:model/Mask2DRequest
25-
* @param cropPath {Array.<Array.<Number>>} Crop path of the manually created mask to show only a part of the model.
2625
*/
27-
constructor(cropPath) {
26+
constructor() {
2827

29-
Mask2DRequest.initialize(this, cropPath);
28+
Mask2DRequest.initialize(this);
3029
}
3130

3231
/**
3332
* Initializes the fields of this object.
3433
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
3534
* Only for internal use.
3635
*/
37-
static initialize(obj, cropPath) {
38-
obj['crop_path'] = cropPath;
36+
static initialize(obj) {
3937
}
4038

4139
/**

0 commit comments

Comments
 (0)