Skip to content

Commit b390dec

Browse files
committed
MINOR: feat(organization): add main_model field to Project model
1 parent 34d96c5 commit b390dec

14 files changed

+69
-6
lines changed

docs/CollaborationApi.md

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

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

961961
### Example
962962

docs/PatchedProjectRequest.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
99
**description** | **String** | | [optional]
1010
**status** | **String** | * `A` - active * `D` - deleted | [optional]
1111
**parentId** | **Number** | | [optional]
12+
**mainModelId** | **Number** | | [optional]
1213

1314

1415

docs/Project.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
1414
**updatedAt** | **Date** | Date of the last update | [readonly]
1515
**parentId** | **Number** | | [optional]
1616
**rootFolderId** | **Number** | | [readonly]
17+
**mainModelId** | **Number** | | [optional]
1718

1819

1920

docs/ProjectRequest.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
99
**description** | **String** | | [optional]
1010
**status** | **String** | * `A` - active * `D` - deleted | [optional]
1111
**parentId** | **Number** | | [optional]
12+
**mainModelId** | **Number** | | [optional]
1213

1314

1415

docs/ProjectWithChildren.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
1414
**parentId** | **Number** | | [optional]
1515
**children** | [**[ProjectWithChildren]**](ProjectWithChildren.md) | | [readonly]
1616
**rootFolderId** | **Number** | | [readonly]
17+
**mainModelId** | **Number** | Main model of the project | [readonly]
1718

1819

1920

src/api/CollaborationApi.js

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

860860
/**
861861
* Create a document
862-
* Create a document. If the document is one of {'OBJ', 'DWG', 'IFC', 'DXF', 'POINT_CLOUD', 'GLTF'}, a model will be created and attached to this document Required scopes: document:write
862+
* Create a document. If the document is one of {'IFC', 'GLTF', 'POINT_CLOUD', 'DXF', 'OBJ', 'DWG'}, a model will be created and attached to this document Required scopes: document:write
863863
* @param {Number} cloudPk A unique integer value identifying this cloud.
864864
* @param {Number} projectPk A unique integer value identifying this project.
865865
* @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', 'DWG', 'IFC', 'DXF', 'POINT_CLOUD', 'GLTF'}, a model will be created and attached to this document Required scopes: document:write
928+
* Create a document. If the document is one of {'IFC', 'GLTF', 'POINT_CLOUD', '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/model/PatchedProjectRequest.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ class PatchedProjectRequest {
6262
if (data.hasOwnProperty('parent_id')) {
6363
obj['parent_id'] = ApiClient.convertToType(data['parent_id'], 'Number');
6464
}
65+
if (data.hasOwnProperty('main_model_id')) {
66+
obj['main_model_id'] = ApiClient.convertToType(data['main_model_id'], 'Number');
67+
}
6568
}
6669
return obj;
6770
}
@@ -96,6 +99,11 @@ PatchedProjectRequest.prototype['status'] = undefined;
9699
*/
97100
PatchedProjectRequest.prototype['parent_id'] = undefined;
98101

102+
/**
103+
* @member {Number} main_model_id
104+
*/
105+
PatchedProjectRequest.prototype['main_model_id'] = undefined;
106+
99107

100108

101109

src/model/Project.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ class Project {
9090
if (data.hasOwnProperty('root_folder_id')) {
9191
obj['root_folder_id'] = ApiClient.convertToType(data['root_folder_id'], 'Number');
9292
}
93+
if (data.hasOwnProperty('main_model_id')) {
94+
obj['main_model_id'] = ApiClient.convertToType(data['main_model_id'], 'Number');
95+
}
9396
}
9497
return obj;
9598
}
@@ -151,6 +154,11 @@ Project.prototype['parent_id'] = undefined;
151154
*/
152155
Project.prototype['root_folder_id'] = undefined;
153156

157+
/**
158+
* @member {Number} main_model_id
159+
*/
160+
Project.prototype['main_model_id'] = undefined;
161+
154162

155163

156164

src/model/ProjectRequest.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ class ProjectRequest {
6464
if (data.hasOwnProperty('parent_id')) {
6565
obj['parent_id'] = ApiClient.convertToType(data['parent_id'], 'Number');
6666
}
67+
if (data.hasOwnProperty('main_model_id')) {
68+
obj['main_model_id'] = ApiClient.convertToType(data['main_model_id'], 'Number');
69+
}
6770
}
6871
return obj;
6972
}
@@ -98,6 +101,11 @@ ProjectRequest.prototype['status'] = undefined;
98101
*/
99102
ProjectRequest.prototype['parent_id'] = undefined;
100103

104+
/**
105+
* @member {Number} main_model_id
106+
*/
107+
ProjectRequest.prototype['main_model_id'] = undefined;
108+
101109

102110

103111

src/model/ProjectWithChildren.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,26 @@ class ProjectWithChildren {
2828
* @param updatedAt {Date} Date of the last update
2929
* @param children {Array.<module:model/ProjectWithChildren>}
3030
* @param rootFolderId {Number}
31+
* @param mainModelId {Number} Main model of the project
3132
*/
32-
constructor(id, name, createdAt, updatedAt, children, rootFolderId) {
33+
constructor(id, name, createdAt, updatedAt, children, rootFolderId, mainModelId) {
3334

34-
ProjectWithChildren.initialize(this, id, name, createdAt, updatedAt, children, rootFolderId);
35+
ProjectWithChildren.initialize(this, id, name, createdAt, updatedAt, children, rootFolderId, mainModelId);
3536
}
3637

3738
/**
3839
* Initializes the fields of this object.
3940
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
4041
* Only for internal use.
4142
*/
42-
static initialize(obj, id, name, createdAt, updatedAt, children, rootFolderId) {
43+
static initialize(obj, id, name, createdAt, updatedAt, children, rootFolderId, mainModelId) {
4344
obj['id'] = id;
4445
obj['name'] = name;
4546
obj['created_at'] = createdAt;
4647
obj['updated_at'] = updatedAt;
4748
obj['children'] = children;
4849
obj['root_folder_id'] = rootFolderId;
50+
obj['main_model_id'] = mainModelId;
4951
}
5052

5153
/**
@@ -89,6 +91,9 @@ class ProjectWithChildren {
8991
if (data.hasOwnProperty('root_folder_id')) {
9092
obj['root_folder_id'] = ApiClient.convertToType(data['root_folder_id'], 'Number');
9193
}
94+
if (data.hasOwnProperty('main_model_id')) {
95+
obj['main_model_id'] = ApiClient.convertToType(data['main_model_id'], 'Number');
96+
}
9297
}
9398
return obj;
9499
}
@@ -150,6 +155,12 @@ ProjectWithChildren.prototype['children'] = undefined;
150155
*/
151156
ProjectWithChildren.prototype['root_folder_id'] = undefined;
152157

158+
/**
159+
* Main model of the project
160+
* @member {Number} main_model_id
161+
*/
162+
ProjectWithChildren.prototype['main_model_id'] = undefined;
163+
153164

154165

155166

0 commit comments

Comments
 (0)