@inweb/client 25.3.23 → 25.3.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -37,7 +37,7 @@ export interface IFileReferences {
37
37
  }
38
38
  export interface IFileVersionInfo {
39
39
  fileId: string;
40
- status: object;
40
+ status: IFileStatus;
41
41
  version: number;
42
42
  createdAt: string;
43
43
  size: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inweb/client",
3
- "version": "25.3.23",
3
+ "version": "25.3.25",
4
4
  "description": "JavaScript REST API client for the Open Cloud Server",
5
5
  "homepage": "https://cloud.opendesign.com/docs/index.html",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -26,6 +26,6 @@
26
26
  "ts-docs": "typedoc"
27
27
  },
28
28
  "dependencies": {
29
- "@inweb/eventemitter2": "^25.3.19"
29
+ "@inweb/eventemitter2": "^25.3.25"
30
30
  }
31
31
  }
package/src/Api/File.ts CHANGED
@@ -134,6 +134,8 @@ export class File {
134
134
  this._data.updatedBy.avatarUrl = `${this.httpClient.serverUrl}/users/${this._data.updatedBy.userId}/avatar`;
135
135
  this._data.updatedBy.fullName = userFullName(this._data.updatedBy);
136
136
  this._data.updatedBy.initials = userInitials(this._data.updatedBy.fullName);
137
+ // versions since 24.10
138
+ this._data.versions ??= [{ ...value }];
137
139
  // geometryGltf status since 24.12
138
140
  this._data.status.geometryGltf ??= { state: "none" };
139
141
  }
@@ -865,11 +867,16 @@ export class File {
865
867
  .then((xhr: XMLHttpRequest) => JSON.parse(xhr.responseText))
866
868
  .then((data) => new File(data, this.httpClient));
867
869
 
868
- if (params.geometry === undefined && this.geometryType !== "") params.geometry = true;
869
- if (params.properties === undefined && this.status.properties.state !== "none") params.properties = true;
870
+ let geometryType = "";
871
+ if (this.versions[0].status.geometryGltf.state !== "none") geometryType = "gltf";
872
+ if (this.versions[0].status.geometry.state !== "none") geometryType = "vsfx";
873
+
874
+ params = { ...params };
875
+ if (params.geometry === undefined) params.geometry = geometryType !== "";
876
+ if (params.properties === undefined) params.properties = this.versions[0].status.properties.state !== "none";
870
877
 
871
878
  const jobs: string[] = [];
872
- if (params.geometry) jobs.push((await result.extractGeometry(this.geometryType)).outputFormat);
879
+ if (params.geometry) jobs.push((await result.extractGeometry(geometryType)).outputFormat);
873
880
  if (params.properties) jobs.push((await result.extractProperties()).outputFormat);
874
881
  if (params.waitForDone && jobs.length > 0) await result.waitForDone(jobs, true, params);
875
882
 
package/src/Api/IFile.ts CHANGED
@@ -66,7 +66,7 @@ export interface IFileReferences {
66
66
 
67
67
  export interface IFileVersionInfo {
68
68
  fileId: string;
69
- status: object;
69
+ status: IFileStatus;
70
70
  version: number;
71
71
  createdAt: string;
72
72
  size: number;