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

Commit 6c9efcb

Browse files
committed
PATCH: reorder document history
1 parent a1456e4 commit 6c9efcb

3 files changed

Lines changed: 125 additions & 3 deletions

File tree

docs/Document.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,41 @@ Name | Type | Description | Notes
1717
**createdAt** | **Date** | Creation date | [readonly]
1818
**updatedAt** | **Date** | Date of the last update | [readonly]
1919
**modelId** | **Number** | | [readonly]
20+
**modelType** | **String** | Model's type. Values can be IFC, DWG, DXF, GLTF, PDF, JPEG, PNG, OBJ, DAE, BFX | [readonly]
2021
**ifcId** | **Number** | DEPRECATED: Use 'model_id' instead. | [readonly]
2122
**userPermission** | **Number** | Aggregate of group user permissions and folder default permission | [readonly]
2223

2324

2425

26+
## Enum: ModelTypeEnum
27+
28+
29+
* `IFC` (value: `"IFC"`)
30+
31+
* `DWG` (value: `"DWG"`)
32+
33+
* `DXF` (value: `"DXF"`)
34+
35+
* `GLTF` (value: `"GLTF"`)
36+
37+
* `PDF` (value: `"PDF"`)
38+
39+
* `JPEG` (value: `"JPEG"`)
40+
41+
* `PNG` (value: `"PNG"`)
42+
43+
* `OBJ` (value: `"OBJ"`)
44+
45+
* `DAE` (value: `"DAE"`)
46+
47+
* `BFX` (value: `"BFX"`)
48+
49+
* `null` (value: `"null"`)
50+
51+
52+
53+
54+
2555
## Enum: UserPermissionEnum
2656

2757

src/model/Document.js

Lines changed: 89 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,21 @@ class Document {
3333
* @param createdAt {Date} Creation date
3434
* @param updatedAt {Date} Date of the last update
3535
* @param modelId {Number}
36+
* @param modelType {module:model/Document.ModelTypeEnum} Model's type. Values can be IFC, DWG, DXF, GLTF, PDF, JPEG, PNG, OBJ, DAE, BFX
3637
* @param ifcId {Number} DEPRECATED: Use 'model_id' instead.
3738
* @param userPermission {module:model/Document.UserPermissionEnum} Aggregate of group user permissions and folder default permission
3839
*/
39-
constructor(id, createdBy, project, name, file, tags, createdAt, updatedAt, modelId, ifcId, userPermission) {
40+
constructor(id, createdBy, project, name, file, tags, createdAt, updatedAt, modelId, modelType, ifcId, userPermission) {
4041

41-
Document.initialize(this, id, createdBy, project, name, file, tags, createdAt, updatedAt, modelId, ifcId, userPermission);
42+
Document.initialize(this, id, createdBy, project, name, file, tags, createdAt, updatedAt, modelId, modelType, ifcId, userPermission);
4243
}
4344

4445
/**
4546
* Initializes the fields of this object.
4647
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
4748
* Only for internal use.
4849
*/
49-
static initialize(obj, id, createdBy, project, name, file, tags, createdAt, updatedAt, modelId, ifcId, userPermission) {
50+
static initialize(obj, id, createdBy, project, name, file, tags, createdAt, updatedAt, modelId, modelType, ifcId, userPermission) {
5051
obj['id'] = id;
5152
obj['created_by'] = createdBy;
5253
obj['project'] = project;
@@ -56,6 +57,7 @@ class Document {
5657
obj['created_at'] = createdAt;
5758
obj['updated_at'] = updatedAt;
5859
obj['model_id'] = modelId;
60+
obj['model_type'] = modelType;
5961
obj['ifc_id'] = ifcId;
6062
obj['user_permission'] = userPermission;
6163
}
@@ -110,6 +112,9 @@ class Document {
110112
if (data.hasOwnProperty('model_id')) {
111113
obj['model_id'] = ApiClient.convertToType(data['model_id'], 'Number');
112114
}
115+
if (data.hasOwnProperty('model_type')) {
116+
obj['model_type'] = ApiClient.convertToType(data['model_type'], 'String');
117+
}
113118
if (data.hasOwnProperty('ifc_id')) {
114119
obj['ifc_id'] = ApiClient.convertToType(data['ifc_id'], 'Number');
115120
}
@@ -194,6 +199,12 @@ Document.prototype['updated_at'] = undefined;
194199
*/
195200
Document.prototype['model_id'] = undefined;
196201

202+
/**
203+
* Model's type. Values can be IFC, DWG, DXF, GLTF, PDF, JPEG, PNG, OBJ, DAE, BFX
204+
* @member {module:model/Document.ModelTypeEnum} model_type
205+
*/
206+
Document.prototype['model_type'] = undefined;
207+
197208
/**
198209
* DEPRECATED: Use 'model_id' instead.
199210
* @member {Number} ifc_id
@@ -210,6 +221,81 @@ Document.prototype['user_permission'] = undefined;
210221

211222

212223

224+
/**
225+
* Allowed values for the <code>model_type</code> property.
226+
* @enum {String}
227+
* @readonly
228+
*/
229+
Document['ModelTypeEnum'] = {
230+
231+
/**
232+
* value: "IFC"
233+
* @const
234+
*/
235+
"IFC": "IFC",
236+
237+
/**
238+
* value: "DWG"
239+
* @const
240+
*/
241+
"DWG": "DWG",
242+
243+
/**
244+
* value: "DXF"
245+
* @const
246+
*/
247+
"DXF": "DXF",
248+
249+
/**
250+
* value: "GLTF"
251+
* @const
252+
*/
253+
"GLTF": "GLTF",
254+
255+
/**
256+
* value: "PDF"
257+
* @const
258+
*/
259+
"PDF": "PDF",
260+
261+
/**
262+
* value: "JPEG"
263+
* @const
264+
*/
265+
"JPEG": "JPEG",
266+
267+
/**
268+
* value: "PNG"
269+
* @const
270+
*/
271+
"PNG": "PNG",
272+
273+
/**
274+
* value: "OBJ"
275+
* @const
276+
*/
277+
"OBJ": "OBJ",
278+
279+
/**
280+
* value: "DAE"
281+
* @const
282+
*/
283+
"DAE": "DAE",
284+
285+
/**
286+
* value: "BFX"
287+
* @const
288+
*/
289+
"BFX": "BFX",
290+
291+
/**
292+
* value: "null"
293+
* @const
294+
*/
295+
"null": "null"
296+
};
297+
298+
213299
/**
214300
* Allowed values for the <code>user_permission</code> property.
215301
* @enum {Number}

test/model/Document.spec.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,12 @@
132132
//expect(instance).to.be();
133133
});
134134

135+
it('should have the property modelType (base name: "model_type")', function() {
136+
// uncomment below and update the code to test the property modelType
137+
//var instance = new bimdata.Document();
138+
//expect(instance).to.be();
139+
});
140+
135141
it('should have the property ifcId (base name: "ifc_id")', function() {
136142
// uncomment below and update the code to test the property ifcId
137143
//var instance = new bimdata.Document();

0 commit comments

Comments
 (0)