@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/dist/client.js
CHANGED
|
@@ -1913,8 +1913,8 @@
|
|
|
1913
1913
|
return this._data;
|
|
1914
1914
|
}
|
|
1915
1915
|
set data(value) {
|
|
1916
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
1917
|
-
var
|
|
1916
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
1917
|
+
var _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
1918
1918
|
this._data = value;
|
|
1919
1919
|
this._data.previewUrl = value.preview
|
|
1920
1920
|
? `${this.httpClient.serverUrl}${this.path}/preview?updated=${value.updatedAt}`
|
|
@@ -1922,24 +1922,26 @@
|
|
|
1922
1922
|
// owner since 24.8
|
|
1923
1923
|
if (typeof this._data.owner === "string")
|
|
1924
1924
|
this._data.owner = { userId: this._data.owner };
|
|
1925
|
-
(_a = (
|
|
1925
|
+
(_a = (_o = this._data).owner) !== null && _a !== void 0 ? _a : (_o.owner = {});
|
|
1926
1926
|
this._data.owner.avatarUrl = `${this.httpClient.serverUrl}/users/${this._data.owner.userId}/avatar`;
|
|
1927
1927
|
this._data.owner.fullName = userFullName(this._data.owner);
|
|
1928
1928
|
this._data.owner.initials = userInitials(this._data.owner.fullName);
|
|
1929
1929
|
// status since 24.9
|
|
1930
|
-
(_b = (
|
|
1931
|
-
(_c = (
|
|
1932
|
-
(_e = (
|
|
1933
|
-
(_g = (
|
|
1930
|
+
(_b = (_p = this._data).status) !== null && _b !== void 0 ? _b : (_p.status = {});
|
|
1931
|
+
(_c = (_q = this._data.status).geometry) !== null && _c !== void 0 ? _c : (_q.geometry = { state: (_d = this._data.geometryStatus) !== null && _d !== void 0 ? _d : "none" });
|
|
1932
|
+
(_e = (_r = this._data.status).properties) !== null && _e !== void 0 ? _e : (_r.properties = { state: (_f = this._data.propertiesStatus) !== null && _f !== void 0 ? _f : "none" });
|
|
1933
|
+
(_g = (_s = this._data.status).validation) !== null && _g !== void 0 ? _g : (_s.validation = { state: (_h = this._data.validationStatus) !== null && _h !== void 0 ? _h : "none" });
|
|
1934
1934
|
// updatedBy since 24.10
|
|
1935
|
-
(_j = (
|
|
1935
|
+
(_j = (_t = this._data).updatedBy) !== null && _j !== void 0 ? _j : (_t.updatedBy = {});
|
|
1936
1936
|
this._data.updatedBy.avatarUrl = `${this.httpClient.serverUrl}/users/${this._data.updatedBy.userId}/avatar`;
|
|
1937
1937
|
this._data.updatedBy.fullName = userFullName(this._data.updatedBy);
|
|
1938
1938
|
this._data.updatedBy.initials = userInitials(this._data.updatedBy.fullName);
|
|
1939
1939
|
// versions since 24.10
|
|
1940
|
-
(_k = (
|
|
1940
|
+
(_k = (_u = this._data).versions) !== null && _k !== void 0 ? _k : (_u.versions = [{ ...value }]);
|
|
1941
1941
|
// geometryGltf status since 24.12
|
|
1942
|
-
(_l = (
|
|
1942
|
+
(_l = (_v = this._data.status).geometryGltf) !== null && _l !== void 0 ? _l : (_v.geometryGltf = { state: "none" });
|
|
1943
|
+
// isFileDeleted since 25.7
|
|
1944
|
+
(_m = (_w = this._data).isFileDeleted) !== null && _m !== void 0 ? _m : (_w.isFileDeleted = false);
|
|
1943
1945
|
}
|
|
1944
1946
|
/**
|
|
1945
1947
|
* Returns a list of files in different formats in which the active version of the file was
|
|
@@ -1977,6 +1979,14 @@
|
|
|
1977
1979
|
get id() {
|
|
1978
1980
|
return this.data.id;
|
|
1979
1981
|
}
|
|
1982
|
+
/**
|
|
1983
|
+
* Returns `true` if source of the active file version has been deleted.
|
|
1984
|
+
*
|
|
1985
|
+
* @readonly
|
|
1986
|
+
*/
|
|
1987
|
+
get isFileDeleted() {
|
|
1988
|
+
return this.data.isFileDeleted;
|
|
1989
|
+
}
|
|
1980
1990
|
/**
|
|
1981
1991
|
* File name, including the extension.
|
|
1982
1992
|
*/
|
|
@@ -2642,6 +2652,14 @@
|
|
|
2642
2652
|
this._useVersion = version;
|
|
2643
2653
|
return this;
|
|
2644
2654
|
}
|
|
2655
|
+
/**
|
|
2656
|
+
* Delete the source of the active file version.
|
|
2657
|
+
*/
|
|
2658
|
+
async deleteSource() {
|
|
2659
|
+
const response = await this.internalDelete("/source");
|
|
2660
|
+
this.data = await response.json();
|
|
2661
|
+
return this;
|
|
2662
|
+
}
|
|
2645
2663
|
}
|
|
2646
2664
|
|
|
2647
2665
|
///////////////////////////////////////////////////////////////////////////////
|
|
@@ -3774,7 +3792,7 @@
|
|
|
3774
3792
|
.then((data) => ({
|
|
3775
3793
|
...data,
|
|
3776
3794
|
server: data.version,
|
|
3777
|
-
client: "25.7.
|
|
3795
|
+
client: "25.7.4",
|
|
3778
3796
|
}));
|
|
3779
3797
|
}
|
|
3780
3798
|
/**
|
|
@@ -4466,7 +4484,7 @@
|
|
|
4466
4484
|
}
|
|
4467
4485
|
|
|
4468
4486
|
///////////////////////////////////////////////////////////////////////////////
|
|
4469
|
-
const version = "25.7.
|
|
4487
|
+
const version = "25.7.4";
|
|
4470
4488
|
|
|
4471
4489
|
exports.Assembly = Assembly;
|
|
4472
4490
|
exports.ClashTest = ClashTest;
|