@inweb/client 25.7.2 → 25.7.4
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.
- package/dist/client.js +30 -12
- package/dist/client.js.map +1 -1
- package/dist/client.min.js +1 -1
- package/dist/client.module.js +21 -12
- package/dist/client.module.js.map +1 -1
- package/lib/Api/File.d.ts +10 -0
- package/package.json +2 -2
- package/src/Api/File.ts +20 -0
package/lib/Api/File.d.ts
CHANGED
|
@@ -74,6 +74,12 @@ export declare class File {
|
|
|
74
74
|
* @readonly
|
|
75
75
|
*/
|
|
76
76
|
get id(): string;
|
|
77
|
+
/**
|
|
78
|
+
* Returns `true` if source of the active file version has been deleted.
|
|
79
|
+
*
|
|
80
|
+
* @readonly
|
|
81
|
+
*/
|
|
82
|
+
get isFileDeleted(): boolean;
|
|
77
83
|
/**
|
|
78
84
|
* File name, including the extension.
|
|
79
85
|
*/
|
|
@@ -554,4 +560,8 @@ export declare class File {
|
|
|
554
560
|
* size and status fields to the version you selected.
|
|
555
561
|
*/
|
|
556
562
|
useVersion(version?: number): this;
|
|
563
|
+
/**
|
|
564
|
+
* Delete the source of the active file version.
|
|
565
|
+
*/
|
|
566
|
+
deleteSource(): Promise<this>;
|
|
557
567
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inweb/client",
|
|
3
|
-
"version": "25.7.
|
|
3
|
+
"version": "25.7.4",
|
|
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
|
"docs": "typedoc"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@inweb/eventemitter2": "~25.7.
|
|
29
|
+
"@inweb/eventemitter2": "~25.7.4"
|
|
30
30
|
}
|
|
31
31
|
}
|
package/src/Api/File.ts
CHANGED
|
@@ -140,6 +140,8 @@ export class File {
|
|
|
140
140
|
this._data.versions ??= [{ ...value }];
|
|
141
141
|
// geometryGltf status since 24.12
|
|
142
142
|
this._data.status.geometryGltf ??= { state: "none" };
|
|
143
|
+
// isFileDeleted since 25.7
|
|
144
|
+
this._data.isFileDeleted ??= false;
|
|
143
145
|
}
|
|
144
146
|
|
|
145
147
|
/**
|
|
@@ -178,6 +180,15 @@ export class File {
|
|
|
178
180
|
return this.data.id;
|
|
179
181
|
}
|
|
180
182
|
|
|
183
|
+
/**
|
|
184
|
+
* Returns `true` if source of the active file version has been deleted.
|
|
185
|
+
*
|
|
186
|
+
* @readonly
|
|
187
|
+
*/
|
|
188
|
+
get isFileDeleted(): boolean {
|
|
189
|
+
return this.data.isFileDeleted;
|
|
190
|
+
}
|
|
191
|
+
|
|
181
192
|
/**
|
|
182
193
|
* File name, including the extension.
|
|
183
194
|
*/
|
|
@@ -941,4 +952,13 @@ export class File {
|
|
|
941
952
|
this._useVersion = version;
|
|
942
953
|
return this;
|
|
943
954
|
}
|
|
955
|
+
|
|
956
|
+
/**
|
|
957
|
+
* Delete the source of the active file version.
|
|
958
|
+
*/
|
|
959
|
+
async deleteSource(): Promise<this> {
|
|
960
|
+
const response = await this.internalDelete("/source");
|
|
961
|
+
this.data = await response.json();
|
|
962
|
+
return this;
|
|
963
|
+
}
|
|
944
964
|
}
|