@inweb/client 25.9.6 → 25.9.8
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 +159 -88
- package/dist/client.js.map +1 -1
- package/dist/client.min.js +1 -1
- package/dist/client.module.js +2 -2
- package/dist/client.module.js.map +1 -1
- package/lib/Api/Assembly.d.ts +30 -18
- package/lib/Api/ClashTest.d.ts +11 -6
- package/lib/Api/Client.d.ts +32 -15
- package/lib/Api/File.d.ts +22 -12
- package/lib/Api/IAssembly.d.ts +26 -0
- package/lib/Api/IFile.d.ts +39 -1
- package/lib/Api/Job.d.ts +10 -5
- package/lib/Api/Member.d.ts +8 -4
- package/lib/Api/Model.d.ts +7 -5
- package/lib/Api/Permission.d.ts +24 -17
- package/lib/Api/Project.d.ts +16 -9
- package/lib/Api/Role.d.ts +8 -4
- package/lib/Api/User.d.ts +11 -4
- package/lib/index.d.ts +2 -2
- package/package.json +2 -2
- package/src/Api/Assembly.ts +31 -18
- package/src/Api/ClashTest.ts +11 -6
- package/src/Api/Client.ts +25 -16
- package/src/Api/File.ts +22 -12
- package/src/Api/IAssembly.ts +33 -0
- package/src/Api/IFile.ts +47 -1
- package/src/Api/Job.ts +10 -5
- package/src/Api/Member.ts +8 -4
- package/src/Api/Model.ts +7 -5
- package/src/Api/Permission.ts +24 -17
- package/src/Api/Project.ts +16 -9
- package/src/Api/Role.ts +8 -4
- package/src/Api/User.ts +11 -4
- package/src/index.ts +10 -2
package/dist/client.js
CHANGED
|
@@ -144,8 +144,9 @@
|
|
|
144
144
|
// acknowledge and accept the above terms.
|
|
145
145
|
///////////////////////////////////////////////////////////////////////////////
|
|
146
146
|
/**
|
|
147
|
-
* Provides properties and methods for working with view of the
|
|
148
|
-
* for `dwg` it is a `Model` space or layout, and for
|
|
147
|
+
* Provides properties and methods for working with view of the {@link File | file} or
|
|
148
|
+
* {@link Assembly| assembly}. For example, for `dwg` it is a `Model` space or layout, and for
|
|
149
|
+
* `rvt` files it is a `3D` view.
|
|
149
150
|
*/
|
|
150
151
|
class Model {
|
|
151
152
|
/**
|
|
@@ -283,7 +284,7 @@
|
|
|
283
284
|
* Saves a new model owner file/assembly viewpoint to the server. To create a new viewpoint
|
|
284
285
|
* use `Viewer.createViewpoint()`.
|
|
285
286
|
*
|
|
286
|
-
* @param viewpoint - Viewpoint.
|
|
287
|
+
* @param viewpoint - Viewpoint object.
|
|
287
288
|
*/
|
|
288
289
|
saveViewpoint(viewpoint) {
|
|
289
290
|
return this._file.saveViewpoint({
|
|
@@ -509,7 +510,8 @@
|
|
|
509
510
|
*/
|
|
510
511
|
class ClashTest {
|
|
511
512
|
/**
|
|
512
|
-
* @param data - Raw test data received from the server.
|
|
513
|
+
* @param data - Raw test data received from the server. For more information, see
|
|
514
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Assemblies | Open Cloud Assemblies API}.
|
|
513
515
|
* @param basePath - The clash test API base path of the file/assembly that owns the test.
|
|
514
516
|
* @param httpClient - HTTP client instance used to send requests to the REST API server.
|
|
515
517
|
*/
|
|
@@ -550,7 +552,8 @@
|
|
|
550
552
|
return this.data.createdAt;
|
|
551
553
|
}
|
|
552
554
|
/**
|
|
553
|
-
* Raw test data received from the server.
|
|
555
|
+
* Raw test data received from the server. For more information, see
|
|
556
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Assemblies | Open Cloud Assemblies API}.
|
|
554
557
|
*
|
|
555
558
|
* @readonly
|
|
556
559
|
*/
|
|
@@ -668,7 +671,8 @@
|
|
|
668
671
|
/**
|
|
669
672
|
* Updates test data on the server.
|
|
670
673
|
*
|
|
671
|
-
* @param data - Raw test data.
|
|
674
|
+
* @param data - Raw test data. For more information, see
|
|
675
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Assemblies | Open Cloud Assemblies API}.
|
|
672
676
|
*/
|
|
673
677
|
async update(data) {
|
|
674
678
|
const response = await this.internalPut("", data);
|
|
@@ -678,7 +682,8 @@
|
|
|
678
682
|
/**
|
|
679
683
|
* Deletes a test and its results report from the server.
|
|
680
684
|
*
|
|
681
|
-
* @returns Returns the raw data of a deleted test.
|
|
685
|
+
* @returns Returns the raw data of a deleted test. For more information, see
|
|
686
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Assemblies | Open Cloud Assemblies API}.
|
|
682
687
|
*/
|
|
683
688
|
delete() {
|
|
684
689
|
return this.internalDelete("").then((response) => response.json());
|
|
@@ -713,7 +718,7 @@
|
|
|
713
718
|
return waitFor(checkDone, params).then(() => this);
|
|
714
719
|
}
|
|
715
720
|
/**
|
|
716
|
-
* Returns a
|
|
721
|
+
* Returns a list of detected clashes for this test.
|
|
717
722
|
*/
|
|
718
723
|
getReport() {
|
|
719
724
|
return this.internalGet("/report").then((response) => response.json());
|
|
@@ -748,8 +753,9 @@
|
|
|
748
753
|
*/
|
|
749
754
|
class Assembly {
|
|
750
755
|
/**
|
|
751
|
-
* @param data - Raw assembly data received from the server.
|
|
752
|
-
*
|
|
756
|
+
* @param data - Raw assembly data received from the server. For more information, see
|
|
757
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Assemblies | Open Cloud Assemblies API}.
|
|
758
|
+
* @param httpClient - HTTP client instance used to send requests to the REST API server.
|
|
753
759
|
*/
|
|
754
760
|
constructor(data, httpClient) {
|
|
755
761
|
this.path = `/assemblies/${data.id}`;
|
|
@@ -800,9 +806,8 @@
|
|
|
800
806
|
return this.data.created;
|
|
801
807
|
}
|
|
802
808
|
/**
|
|
803
|
-
*
|
|
804
|
-
*
|
|
805
|
-
* @readonly
|
|
809
|
+
* Returns the raw assembly data received from the server. For more information, see
|
|
810
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Assemblies | Open Cloud Assemblies API}.
|
|
806
811
|
*/
|
|
807
812
|
get data() {
|
|
808
813
|
return this._data;
|
|
@@ -913,7 +918,8 @@
|
|
|
913
918
|
/**
|
|
914
919
|
* Updates assembly data on the server.
|
|
915
920
|
*
|
|
916
|
-
* @param data - Raw assembly data.
|
|
921
|
+
* @param data - Raw assembly data. For more information, see
|
|
922
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Assemblies | Open Cloud Assemblies API}.
|
|
917
923
|
*/
|
|
918
924
|
async update(data) {
|
|
919
925
|
const response = await this.internalPut("", data);
|
|
@@ -923,7 +929,8 @@
|
|
|
923
929
|
/**
|
|
924
930
|
* Deletes an assembly from the server.
|
|
925
931
|
*
|
|
926
|
-
* @returns Returns the raw data of a deleted assembly.
|
|
932
|
+
* @returns Returns the raw data of a deleted assembly. For more information, see
|
|
933
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Assemblies | Open Cloud Assemblies API}.
|
|
927
934
|
*/
|
|
928
935
|
delete() {
|
|
929
936
|
return this.internalDelete("").then((response) => response.json());
|
|
@@ -971,12 +978,18 @@
|
|
|
971
978
|
obj[handle] = transform;
|
|
972
979
|
return this.update({ transform: obj });
|
|
973
980
|
}
|
|
981
|
+
/**
|
|
982
|
+
* Object properties.
|
|
983
|
+
*
|
|
984
|
+
* @typedef {any} Properties
|
|
985
|
+
* @property {string} handle - Object original handle.
|
|
986
|
+
* @property {string | any} * - Object property. Can be `any` for nested properties.
|
|
987
|
+
*/
|
|
974
988
|
/**
|
|
975
989
|
* Returns the properties for an objects in the assembly.
|
|
976
990
|
*
|
|
977
991
|
* @param handles - Object original handle or handles array. Specify `undefined` to get
|
|
978
992
|
* properties for all objects in the assembly.
|
|
979
|
-
* @returns {Promise<any>}
|
|
980
993
|
*/
|
|
981
994
|
getProperties(handles) {
|
|
982
995
|
const relativePath = handles !== undefined ? `/properties?handles=${handles}` : "/properties";
|
|
@@ -1017,7 +1030,8 @@
|
|
|
1017
1030
|
return this.internalGet(`/properties/tree`).then((response) => response.json());
|
|
1018
1031
|
}
|
|
1019
1032
|
/**
|
|
1020
|
-
* Returns a list of assembly viewpoints.
|
|
1033
|
+
* Returns a list of assembly viewpoints. For more information, see
|
|
1034
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#AssemblyViewpoints | Open Cloud Assembly Viewpoints API}.
|
|
1021
1035
|
*/
|
|
1022
1036
|
getViewpoints() {
|
|
1023
1037
|
return this.internalGet("/viewpoints")
|
|
@@ -1027,7 +1041,8 @@
|
|
|
1027
1041
|
/**
|
|
1028
1042
|
* Saves a new assembly viewpoint to the server. To create a viewpoint use `Viewer.createViewpoint()`.
|
|
1029
1043
|
*
|
|
1030
|
-
* @param viewpoint - Viewpoint.
|
|
1044
|
+
* @param viewpoint - Viewpoint object. For more information, see
|
|
1045
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#AssemblyViewpoints | Open Cloud Assembly Viewpoints API}.
|
|
1031
1046
|
*/
|
|
1032
1047
|
saveViewpoint(viewpoint) {
|
|
1033
1048
|
return this.internalPost("/viewpoints", viewpoint).then((response) => response.json());
|
|
@@ -1036,13 +1051,14 @@
|
|
|
1036
1051
|
* Deletes the specified assembly viewpoint.
|
|
1037
1052
|
*
|
|
1038
1053
|
* @param guid - Viewpoint GUID.
|
|
1039
|
-
* @returns Returns
|
|
1054
|
+
* @returns Returns a deleted viewpoint. For more information, see
|
|
1055
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#AssemblyViewpoints | Open Cloud Assembly Viewpoints API}.
|
|
1040
1056
|
*/
|
|
1041
1057
|
deleteViewpoint(guid) {
|
|
1042
1058
|
return this.internalDelete(`/viewpoints/${guid}`).then((response) => response.json());
|
|
1043
1059
|
}
|
|
1044
1060
|
/**
|
|
1045
|
-
* Returns viewpoint snapshot as base64-encoded
|
|
1061
|
+
* Returns the viewpoint snapshot as base64-encoded
|
|
1046
1062
|
* {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}.
|
|
1047
1063
|
*
|
|
1048
1064
|
* @param guid - Viewpoint GUID.
|
|
@@ -1051,7 +1067,7 @@
|
|
|
1051
1067
|
return this.internalGet(`/viewpoints/${guid}/snapshot`).then((response) => response.text());
|
|
1052
1068
|
}
|
|
1053
1069
|
/**
|
|
1054
|
-
* Returns viewpoint snapshot data.
|
|
1070
|
+
* Returns the viewpoint snapshot data.
|
|
1055
1071
|
*
|
|
1056
1072
|
* @param guid - Viewpoint GUID.
|
|
1057
1073
|
* @param bitmapGuid - Bitmap GUID.
|
|
@@ -1268,7 +1284,8 @@
|
|
|
1268
1284
|
* Deletes the specified assembly clash test.
|
|
1269
1285
|
*
|
|
1270
1286
|
* @param testId - Test ID.
|
|
1271
|
-
* @returns Returns the raw data of a deleted test.
|
|
1287
|
+
* @returns Returns the raw data of a deleted test. For more information, see
|
|
1288
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Assemblies | Open Cloud Assemblies API}.
|
|
1272
1289
|
*/
|
|
1273
1290
|
deleteClashTest(testId) {
|
|
1274
1291
|
return this.internalDelete(`/clashes/${testId}`).then((response) => response.json());
|
|
@@ -1636,11 +1653,12 @@
|
|
|
1636
1653
|
///////////////////////////////////////////////////////////////////////////////
|
|
1637
1654
|
/**
|
|
1638
1655
|
* Provides properties and methods for obtaining information about {@link File | file} actions
|
|
1639
|
-
* granted to a specific
|
|
1656
|
+
* granted to a specific user, project, or group.
|
|
1640
1657
|
*/
|
|
1641
1658
|
class Permission {
|
|
1642
1659
|
/**
|
|
1643
|
-
* @param data - Raw permission data received from the server.
|
|
1660
|
+
* @param data - Raw permission data received from the server. For more information, see
|
|
1661
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Permission | Open Cloud Permissions API}.
|
|
1644
1662
|
* @param fileId - Owner file ID.
|
|
1645
1663
|
* @param httpClient - HTTP client instance used to send requests to the REST API server.
|
|
1646
1664
|
*/
|
|
@@ -1666,6 +1684,20 @@
|
|
|
1666
1684
|
* - `write` - The ability to modify file name, description and references.
|
|
1667
1685
|
* - `readViewpoint` - The ability to read file viewpoints.
|
|
1668
1686
|
* - `createViewpoint` - The ability to create file viewpoints.
|
|
1687
|
+
*
|
|
1688
|
+
* @example <caption>Change file permissions for the the specified project.</caption>
|
|
1689
|
+
* const myFile = client.getFile(myFileId);
|
|
1690
|
+
* const permissions = await myFile.getPermissions();
|
|
1691
|
+
* const projectPermissions = permissions.filter((permission) =>
|
|
1692
|
+
* permission.grantedTo.some((x) => x.project?.id === myProjectId)
|
|
1693
|
+
* );
|
|
1694
|
+
* const newActions = ["read", "readSourceFile", "update"];
|
|
1695
|
+
* await Promise.all(
|
|
1696
|
+
* projectPermissions.map((permission) => {
|
|
1697
|
+
* permission.actions = newActions;
|
|
1698
|
+
* return permission.save();
|
|
1699
|
+
* })
|
|
1700
|
+
* );
|
|
1669
1701
|
*/
|
|
1670
1702
|
get actions() {
|
|
1671
1703
|
return this.data.actions;
|
|
@@ -1674,7 +1706,8 @@
|
|
|
1674
1706
|
this._data.actions = value;
|
|
1675
1707
|
}
|
|
1676
1708
|
/**
|
|
1677
|
-
* Raw permission data received from the server.
|
|
1709
|
+
* Raw permission data received from the server. For more information, see
|
|
1710
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Permission | Open Cloud Permissions API}.
|
|
1678
1711
|
*
|
|
1679
1712
|
* @readonly
|
|
1680
1713
|
*/
|
|
@@ -1693,7 +1726,7 @@
|
|
|
1693
1726
|
return this.data.id;
|
|
1694
1727
|
}
|
|
1695
1728
|
/**
|
|
1696
|
-
* A list of
|
|
1729
|
+
* A list of users, projects, or groups that will get access to the file.
|
|
1697
1730
|
*/
|
|
1698
1731
|
get grantedTo() {
|
|
1699
1732
|
return this.data.grantedTo;
|
|
@@ -1721,18 +1754,8 @@
|
|
|
1721
1754
|
/**
|
|
1722
1755
|
* Updates permission data on the server.
|
|
1723
1756
|
*
|
|
1724
|
-
* @
|
|
1725
|
-
*
|
|
1726
|
-
* const permissions = await myFile.getPermissions();
|
|
1727
|
-
* const projectPermissions = permissions.filter((permission) =>
|
|
1728
|
-
* permission.grantedTo.some((x) => x.project?.id === myProjectId)
|
|
1729
|
-
* );
|
|
1730
|
-
* const newActions = ["read", "readSourceFile", "update"];
|
|
1731
|
-
* await Promise.allSettled(
|
|
1732
|
-
* projectPermissions.map((permission) => permission.update({ newActions }))
|
|
1733
|
-
* );
|
|
1734
|
-
*
|
|
1735
|
-
* @param data - Raw permission data.
|
|
1757
|
+
* @param data - Raw permission data. For more information, see
|
|
1758
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Permission | Open Cloud Permissions API}.
|
|
1736
1759
|
*/
|
|
1737
1760
|
async update(data) {
|
|
1738
1761
|
const response = await this.internalPut(data);
|
|
@@ -1742,7 +1765,8 @@
|
|
|
1742
1765
|
/**
|
|
1743
1766
|
* Removes a permission from the file.
|
|
1744
1767
|
*
|
|
1745
|
-
* @returns Returns the raw data of a deleted permission.
|
|
1768
|
+
* @returns Returns the raw data of a deleted permission. For more information, see
|
|
1769
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Permission | Open Cloud Permissions API}.
|
|
1746
1770
|
*/
|
|
1747
1771
|
delete() {
|
|
1748
1772
|
return this.internalDelete().then((response) => response.json());
|
|
@@ -1783,7 +1807,8 @@
|
|
|
1783
1807
|
*/
|
|
1784
1808
|
class Job {
|
|
1785
1809
|
/**
|
|
1786
|
-
* @param data - Raw job data received from the server.
|
|
1810
|
+
* @param data - Raw job data received from the server. For more information, see
|
|
1811
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Jobs | Open Cloud Jobs API}.
|
|
1787
1812
|
* @param httpClient - HTTP client instance used to send requests to the REST API server.
|
|
1788
1813
|
*/
|
|
1789
1814
|
constructor(data, httpClient) {
|
|
@@ -1825,7 +1850,8 @@
|
|
|
1825
1850
|
return this.data.createdAt;
|
|
1826
1851
|
}
|
|
1827
1852
|
/**
|
|
1828
|
-
* Raw job data received from the server.
|
|
1853
|
+
* Raw job data received from the server. For more information, see
|
|
1854
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Jobs | Open Cloud Jobs API}.
|
|
1829
1855
|
*
|
|
1830
1856
|
* @readonly
|
|
1831
1857
|
*/
|
|
@@ -1878,7 +1904,8 @@
|
|
|
1878
1904
|
return this.data.outputFormat;
|
|
1879
1905
|
}
|
|
1880
1906
|
/**
|
|
1881
|
-
* Parameters
|
|
1907
|
+
* Parameters with which the job runner was started. For more information, see
|
|
1908
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Jobs | Open Cloud Jobs API}.
|
|
1882
1909
|
*
|
|
1883
1910
|
* @readonly
|
|
1884
1911
|
*/
|
|
@@ -1924,7 +1951,8 @@
|
|
|
1924
1951
|
* Only administrators can update job data. If the current logged in user is not an
|
|
1925
1952
|
* administrator, an exception will be thrown.
|
|
1926
1953
|
*
|
|
1927
|
-
* @param data - Raw job data.
|
|
1954
|
+
* @param data - Raw job data. For more information, see
|
|
1955
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Jobs | Open Cloud Jobs API}.
|
|
1928
1956
|
*/
|
|
1929
1957
|
async update(data) {
|
|
1930
1958
|
const response = await this.internalPut(data);
|
|
@@ -1935,7 +1963,8 @@
|
|
|
1935
1963
|
* Deletes a job from the server job list. Jobs that are in progress or have already been
|
|
1936
1964
|
* completed cannot be deleted.
|
|
1937
1965
|
*
|
|
1938
|
-
* @returns Returns the raw data of a deleted job.
|
|
1966
|
+
* @returns Returns the raw data of a deleted job. For more information, see
|
|
1967
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Jobs | Open Cloud Jobs API}.
|
|
1939
1968
|
*/
|
|
1940
1969
|
delete() {
|
|
1941
1970
|
return this.internalDelete().then((response) => response.json());
|
|
@@ -1999,7 +2028,8 @@
|
|
|
1999
2028
|
*/
|
|
2000
2029
|
class File {
|
|
2001
2030
|
/**
|
|
2002
|
-
* @param data - Raw file data received from the server.
|
|
2031
|
+
* @param data - Raw file data received from the server. For more information, see
|
|
2032
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Files | Open Cloud Files API}.
|
|
2003
2033
|
* @param httpClient - HTTP client instance used to send requests to the REST API server.
|
|
2004
2034
|
*/
|
|
2005
2035
|
constructor(data, httpClient) {
|
|
@@ -2058,7 +2088,8 @@
|
|
|
2058
2088
|
this.data.customFields = value;
|
|
2059
2089
|
}
|
|
2060
2090
|
/**
|
|
2061
|
-
* Raw file data received from the server.
|
|
2091
|
+
* Raw file data received from the server. For more information, see
|
|
2092
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Files | Open Cloud Files API}.
|
|
2062
2093
|
*
|
|
2063
2094
|
* @readonly
|
|
2064
2095
|
*/
|
|
@@ -2262,7 +2293,8 @@
|
|
|
2262
2293
|
/**
|
|
2263
2294
|
* Updates file data on the server.
|
|
2264
2295
|
*
|
|
2265
|
-
* @param data - Raw file data.
|
|
2296
|
+
* @param data - Raw file data. For more information, see
|
|
2297
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Files | Open Cloud Files API}.
|
|
2266
2298
|
*/
|
|
2267
2299
|
async update(data) {
|
|
2268
2300
|
const response = await this.internalPut("", data);
|
|
@@ -2275,7 +2307,8 @@
|
|
|
2275
2307
|
* You cannot delete a version file using `delete()`, only the original file. To delete a
|
|
2276
2308
|
* version file use {@link deleteVersion | deleteVersion()}.
|
|
2277
2309
|
*
|
|
2278
|
-
* @returns Returns the raw data of a deleted file.
|
|
2310
|
+
* @returns Returns the raw data of a deleted file. For more information, see
|
|
2311
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Files | Open Cloud Files API}.
|
|
2279
2312
|
*/
|
|
2280
2313
|
delete() {
|
|
2281
2314
|
return this.internalDelete("").then((response) => response.json());
|
|
@@ -2337,7 +2370,7 @@
|
|
|
2337
2370
|
*
|
|
2338
2371
|
* @typedef {any} Properties
|
|
2339
2372
|
* @property {string} handle - Object original handle.
|
|
2340
|
-
* @property {string | any}
|
|
2373
|
+
* @property {string | any} - Object property. Can be `any` for nested properties.
|
|
2341
2374
|
*/
|
|
2342
2375
|
/**
|
|
2343
2376
|
* Returns the properties for an objects in the active version of the file.
|
|
@@ -2400,7 +2433,8 @@
|
|
|
2400
2433
|
return this.internalGet(`/properties/tree`).then((response) => response.json());
|
|
2401
2434
|
}
|
|
2402
2435
|
/**
|
|
2403
|
-
* Returns a list of file viewpoints.
|
|
2436
|
+
* Returns a list of file viewpoints. For more information, see
|
|
2437
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#FileViewpoints | Open Cloud File Viewpoints API}.
|
|
2404
2438
|
*/
|
|
2405
2439
|
getViewpoints() {
|
|
2406
2440
|
return this.internalGet("/viewpoints")
|
|
@@ -2410,7 +2444,8 @@
|
|
|
2410
2444
|
/**
|
|
2411
2445
|
* Saves a new file viewpoint to the server. To create a viewpoint use `Viewer.createViewpoint()`.
|
|
2412
2446
|
*
|
|
2413
|
-
* @param viewpoint - Viewpoint.
|
|
2447
|
+
* @param viewpoint - Viewpoint object. For more information, see
|
|
2448
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#FileViewpoints | Open Cloud File Viewpoints API}.
|
|
2414
2449
|
*/
|
|
2415
2450
|
saveViewpoint(viewpoint) {
|
|
2416
2451
|
return this.internalPost("/viewpoints", viewpoint).then((response) => response.json());
|
|
@@ -2419,7 +2454,8 @@
|
|
|
2419
2454
|
* Deletes the specified file viewpoint.
|
|
2420
2455
|
*
|
|
2421
2456
|
* @param guid - Viewpoint GUID.
|
|
2422
|
-
* @returns Returns the raw data of a deleted viewpoint.
|
|
2457
|
+
* @returns Returns the raw data of a deleted viewpoint. For more information, see
|
|
2458
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#FileViewpoints | Open Cloud File Viewpoints API}.
|
|
2423
2459
|
*/
|
|
2424
2460
|
deleteViewpoint(guid) {
|
|
2425
2461
|
return this.internalDelete(`/viewpoints/${guid}`).then((response) => response.json());
|
|
@@ -2695,7 +2731,8 @@
|
|
|
2695
2731
|
* Removes the specified permission from the file.
|
|
2696
2732
|
*
|
|
2697
2733
|
* @param permissionId - Permission ID.
|
|
2698
|
-
* @returns Returns the raw data of a deleted permission.
|
|
2734
|
+
* @returns Returns the raw data of a deleted permission. For more information, see
|
|
2735
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Permission | Open Cloud File Permissions API}.
|
|
2699
2736
|
*/
|
|
2700
2737
|
deletePermission(permissionId) {
|
|
2701
2738
|
return this.internalDelete(`/permissions/${permissionId}`).then((response) => response.json());
|
|
@@ -2776,6 +2813,8 @@
|
|
|
2776
2813
|
* Deletes the specified version file.
|
|
2777
2814
|
*
|
|
2778
2815
|
* @param version - Version to delete.
|
|
2816
|
+
* @returns Returns the raw data of a deleted version file. For more information, see
|
|
2817
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Files | Open Cloud Files API}.
|
|
2779
2818
|
*/
|
|
2780
2819
|
async deleteVersion(version) {
|
|
2781
2820
|
const response = await this.internalDelete(`/versions/${version}`);
|
|
@@ -2858,7 +2897,8 @@
|
|
|
2858
2897
|
*/
|
|
2859
2898
|
class Role {
|
|
2860
2899
|
/**
|
|
2861
|
-
* @param data - Raw role data received from the server.
|
|
2900
|
+
* @param data - Raw role data received from the server. For more information, see
|
|
2901
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.
|
|
2862
2902
|
* @param projectId - Owner project ID.
|
|
2863
2903
|
* @param httpClient - HTTP client instance used to send requests to the REST API server.
|
|
2864
2904
|
*/
|
|
@@ -2886,7 +2926,8 @@
|
|
|
2886
2926
|
this._data.description = value;
|
|
2887
2927
|
}
|
|
2888
2928
|
/**
|
|
2889
|
-
* Raw role data received from the server.
|
|
2929
|
+
* Raw role data received from the server. For more information, see
|
|
2930
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.
|
|
2890
2931
|
*
|
|
2891
2932
|
* @readonly
|
|
2892
2933
|
*/
|
|
@@ -2925,7 +2966,8 @@
|
|
|
2925
2966
|
/**
|
|
2926
2967
|
* Updates role data on the server.
|
|
2927
2968
|
*
|
|
2928
|
-
* @param data - Raw role data.
|
|
2969
|
+
* @param data - Raw role data. For more information, see
|
|
2970
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.
|
|
2929
2971
|
*/
|
|
2930
2972
|
async update(data) {
|
|
2931
2973
|
const response = await this.internalPut(data);
|
|
@@ -2935,7 +2977,8 @@
|
|
|
2935
2977
|
/**
|
|
2936
2978
|
* Deletes a role from the project.
|
|
2937
2979
|
*
|
|
2938
|
-
* @returns Returns the raw data of a deleted role.
|
|
2980
|
+
* @returns Returns the raw data of a deleted role. For more information, see
|
|
2981
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.
|
|
2939
2982
|
*/
|
|
2940
2983
|
delete() {
|
|
2941
2984
|
return this.internalDelete().then((response) => response.json());
|
|
@@ -2977,7 +3020,8 @@
|
|
|
2977
3020
|
*/
|
|
2978
3021
|
class Member {
|
|
2979
3022
|
/**
|
|
2980
|
-
* @param data - Raw member data received from the server.
|
|
3023
|
+
* @param data - Raw member data received from the server. For more information, see
|
|
3024
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.
|
|
2981
3025
|
* @param projectId - Owner project ID.
|
|
2982
3026
|
* @param httpClient - HTTP client instance used to send requests to the REST API server.
|
|
2983
3027
|
*/
|
|
@@ -2996,7 +3040,8 @@
|
|
|
2996
3040
|
return this.httpClient.delete(`/projects/${this.projectId}/members/${this.id}`);
|
|
2997
3041
|
}
|
|
2998
3042
|
/**
|
|
2999
|
-
* Raw member data received from the server.
|
|
3043
|
+
* Raw member data received from the server. For more information, see
|
|
3044
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.
|
|
3000
3045
|
*
|
|
3001
3046
|
* @readonly
|
|
3002
3047
|
*/
|
|
@@ -3054,7 +3099,8 @@
|
|
|
3054
3099
|
/**
|
|
3055
3100
|
* Updates member data on the server.
|
|
3056
3101
|
*
|
|
3057
|
-
* @param data - Raw member data.
|
|
3102
|
+
* @param data - Raw member data. For more information, see
|
|
3103
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.
|
|
3058
3104
|
*/
|
|
3059
3105
|
async update(data) {
|
|
3060
3106
|
const response = await this.internalPut(data);
|
|
@@ -3064,7 +3110,8 @@
|
|
|
3064
3110
|
/**
|
|
3065
3111
|
* Removes a member from the project.
|
|
3066
3112
|
*
|
|
3067
|
-
* @returns Returns the raw data of a deleted member.
|
|
3113
|
+
* @returns Returns the raw data of a deleted member. For more information, see
|
|
3114
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.
|
|
3068
3115
|
*/
|
|
3069
3116
|
delete() {
|
|
3070
3117
|
return this.internalDelete().then((response) => response.json());
|
|
@@ -3106,7 +3153,8 @@
|
|
|
3106
3153
|
*/
|
|
3107
3154
|
class Project {
|
|
3108
3155
|
/**
|
|
3109
|
-
* @param data - Raw project data received from the server.
|
|
3156
|
+
* @param data - Raw project data received from the server. For more information, see
|
|
3157
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.
|
|
3110
3158
|
* @param httpClient - HTTP client instance used to send requests to the REST API server.
|
|
3111
3159
|
*/
|
|
3112
3160
|
constructor(data, httpClient) {
|
|
@@ -3152,7 +3200,8 @@
|
|
|
3152
3200
|
this.data.customFields = value;
|
|
3153
3201
|
}
|
|
3154
3202
|
/**
|
|
3155
|
-
* Raw project data received from the server.
|
|
3203
|
+
* Raw project data received from the server. For more information, see
|
|
3204
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.
|
|
3156
3205
|
*
|
|
3157
3206
|
* @readonly
|
|
3158
3207
|
*/
|
|
@@ -3284,7 +3333,8 @@
|
|
|
3284
3333
|
/**
|
|
3285
3334
|
* Updates project data on the server.
|
|
3286
3335
|
*
|
|
3287
|
-
* @param data - Raw project data.
|
|
3336
|
+
* @param data - Raw project data. For more information, see
|
|
3337
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.
|
|
3288
3338
|
*/
|
|
3289
3339
|
async update(data) {
|
|
3290
3340
|
const response = await this.internalPut("", data);
|
|
@@ -3294,7 +3344,8 @@
|
|
|
3294
3344
|
/**
|
|
3295
3345
|
* Deletes a project from the server.
|
|
3296
3346
|
*
|
|
3297
|
-
* @returns Returns the raw data of a deleted project.
|
|
3347
|
+
* @returns Returns the raw data of a deleted project. For more information, see
|
|
3348
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.
|
|
3298
3349
|
*/
|
|
3299
3350
|
delete() {
|
|
3300
3351
|
return this.internalDelete("")
|
|
@@ -3384,7 +3435,8 @@
|
|
|
3384
3435
|
* Deletes the specified project role.
|
|
3385
3436
|
*
|
|
3386
3437
|
* @param name - Role name.
|
|
3387
|
-
* @returns Returns the raw data of a deleted role.
|
|
3438
|
+
* @returns Returns the raw data of a deleted role. For more information, see
|
|
3439
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.
|
|
3388
3440
|
*/
|
|
3389
3441
|
deleteRole(name) {
|
|
3390
3442
|
return this.internalDelete(`/roles/${name}`).then((response) => response.json());
|
|
@@ -3422,7 +3474,8 @@
|
|
|
3422
3474
|
* Removes the specified member from a project.
|
|
3423
3475
|
*
|
|
3424
3476
|
* @param memberId - Member ID.
|
|
3425
|
-
* @returns Returns the raw data of a deleted member.
|
|
3477
|
+
* @returns Returns the raw data of a deleted member. For more information, see
|
|
3478
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.
|
|
3426
3479
|
*/
|
|
3427
3480
|
removeMember(memberId) {
|
|
3428
3481
|
return this.internalDelete(`/members/${memberId}`).then((response) => response.json());
|
|
@@ -3440,7 +3493,8 @@
|
|
|
3440
3493
|
* @property {string} file.reference - File ID.
|
|
3441
3494
|
*/
|
|
3442
3495
|
/**
|
|
3443
|
-
* Returns a list of project files.
|
|
3496
|
+
* Returns a list of project files. For more information, see
|
|
3497
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/bcf3.html#ProjectFilesInformation | Open Cloud BCF3 API}.
|
|
3444
3498
|
*
|
|
3445
3499
|
* This list contains all files that the project has access to. To add a file to this list,
|
|
3446
3500
|
* create a {@link IGrantedTo.project | project} permission on the file using
|
|
@@ -3505,7 +3559,7 @@
|
|
|
3505
3559
|
/**
|
|
3506
3560
|
* Adds a file to the project with specified permissions.
|
|
3507
3561
|
*
|
|
3508
|
-
* To change file permissions for the project use {@link Permission.
|
|
3562
|
+
* To change file permissions for the project use {@link Permission.actions}.
|
|
3509
3563
|
*
|
|
3510
3564
|
* @param fileId - File ID.
|
|
3511
3565
|
* @param actions - Actions are allowed to be performed on a file:
|
|
@@ -3575,7 +3629,8 @@
|
|
|
3575
3629
|
*/
|
|
3576
3630
|
class User {
|
|
3577
3631
|
/**
|
|
3578
|
-
* @param data - Raw user data received from the server.
|
|
3632
|
+
* @param data - Raw user data received from the server. For more information, see
|
|
3633
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Users | Open Cloud Users API}.
|
|
3579
3634
|
* @param httpClient - HTTP client instance used to send requests to the REST API server.
|
|
3580
3635
|
*/
|
|
3581
3636
|
constructor(data, httpClient) {
|
|
@@ -3621,7 +3676,8 @@
|
|
|
3621
3676
|
this._data.customFields = value;
|
|
3622
3677
|
}
|
|
3623
3678
|
/**
|
|
3624
|
-
* Raw user data received from the server.
|
|
3679
|
+
* Raw user data received from the server. For more information, see
|
|
3680
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Users | Open Cloud Users API}.
|
|
3625
3681
|
*
|
|
3626
3682
|
* @readonly
|
|
3627
3683
|
*/
|
|
@@ -3648,6 +3704,9 @@
|
|
|
3648
3704
|
/**
|
|
3649
3705
|
* The user's email confirmation code, or an empty string if the email has already been confirmed.
|
|
3650
3706
|
*
|
|
3707
|
+
* To send the confirmation code to the server, use
|
|
3708
|
+
* {@link Client.confirmUserEmail | Client.confirmUserEmail()}.
|
|
3709
|
+
*
|
|
3651
3710
|
* @readonly
|
|
3652
3711
|
*/
|
|
3653
3712
|
get emailConfirmationId() {
|
|
@@ -3815,7 +3874,8 @@
|
|
|
3815
3874
|
* Only administrators can update other users. If the current logged in user is not an
|
|
3816
3875
|
* administrator, they can only update themself, otherwise an exception will be thrown.
|
|
3817
3876
|
*
|
|
3818
|
-
* @param data - Raw user data.
|
|
3877
|
+
* @param data - Raw user data. For more information, see
|
|
3878
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Users | Open Cloud Users API}.
|
|
3819
3879
|
*/
|
|
3820
3880
|
async update(data) {
|
|
3821
3881
|
if (this.httpClient.signInUserIsAdmin) {
|
|
@@ -3844,7 +3904,8 @@
|
|
|
3844
3904
|
*
|
|
3845
3905
|
* You need to re-login after deleting the current logged in user.
|
|
3846
3906
|
*
|
|
3847
|
-
* @returns Returns the raw data of a deleted user.
|
|
3907
|
+
* @returns Returns the raw data of a deleted user. For more information, see
|
|
3908
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Users | Open Cloud Users API}.
|
|
3848
3909
|
*/
|
|
3849
3910
|
delete() {
|
|
3850
3911
|
if (this.httpClient.signInUserIsAdmin) {
|
|
@@ -4069,15 +4130,10 @@
|
|
|
4069
4130
|
this._user = null;
|
|
4070
4131
|
return this;
|
|
4071
4132
|
}
|
|
4072
|
-
/**
|
|
4073
|
-
* The Object represents server version information.
|
|
4074
|
-
*
|
|
4075
|
-
* @typedef {any} VersionResult
|
|
4076
|
-
* @property {string} version - The server version.
|
|
4077
|
-
* @property {string} hash - Build hash.
|
|
4078
|
-
*/
|
|
4079
4133
|
/**
|
|
4080
4134
|
* Returns client and server versions.
|
|
4135
|
+
*
|
|
4136
|
+
* No login is required to obtain the version.
|
|
4081
4137
|
*/
|
|
4082
4138
|
version() {
|
|
4083
4139
|
return this.httpClient
|
|
@@ -4086,12 +4142,14 @@
|
|
|
4086
4142
|
.then((data) => ({
|
|
4087
4143
|
...data,
|
|
4088
4144
|
server: data.version,
|
|
4089
|
-
client: "25.9.
|
|
4145
|
+
client: "25.9.8",
|
|
4090
4146
|
}));
|
|
4091
4147
|
}
|
|
4092
4148
|
/**
|
|
4093
4149
|
* Registers a new user on the server.
|
|
4094
4150
|
*
|
|
4151
|
+
* No login is required to register a new user.
|
|
4152
|
+
*
|
|
4095
4153
|
* @param email - User email. Cannot be empty. Must be unique within the server.
|
|
4096
4154
|
* @param password - User password. Cannot be empty. Password can only contain letters (a-z,
|
|
4097
4155
|
* A-Z), numbers (0-9), and special characters (~!@#$%^&*()_-+={}[]<>|/'":;.,?).
|
|
@@ -4185,6 +4243,9 @@
|
|
|
4185
4243
|
}
|
|
4186
4244
|
/**
|
|
4187
4245
|
* Returns the current server settings.
|
|
4246
|
+
*
|
|
4247
|
+
* @returns Returns an object with server settings. For more information, see
|
|
4248
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Settings | Open Cloud Settings API}.
|
|
4188
4249
|
*/
|
|
4189
4250
|
getServerSettings() {
|
|
4190
4251
|
return this.httpClient.get("/settings").then((response) => response.json());
|
|
@@ -4194,6 +4255,11 @@
|
|
|
4194
4255
|
*
|
|
4195
4256
|
* Only administrators can change server settings. If the current logged in user is not an
|
|
4196
4257
|
* administrator, an exception will be thrown.
|
|
4258
|
+
*
|
|
4259
|
+
* @param settings - An object with the new server settings or part of the settings. For more
|
|
4260
|
+
* information, see
|
|
4261
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Settings | Open Cloud Settings API}.
|
|
4262
|
+
* @returns Returns an object with updated server settings.
|
|
4197
4263
|
*/
|
|
4198
4264
|
updateServerSettings(settings) {
|
|
4199
4265
|
return this.httpClient.put("/settings", settings).then((response) => response.json());
|
|
@@ -4285,7 +4351,8 @@
|
|
|
4285
4351
|
* You need to re-login after deleting the current logged in user.
|
|
4286
4352
|
*
|
|
4287
4353
|
* @param userId - User ID.
|
|
4288
|
-
* @returns Returns the raw data of a deleted user.
|
|
4354
|
+
* @returns Returns the raw data of a deleted user. For more information, see
|
|
4355
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Users | Open Cloud Users API}.
|
|
4289
4356
|
*/
|
|
4290
4357
|
deleteUser(userId) {
|
|
4291
4358
|
if (this.httpClient.signInUserIsAdmin) {
|
|
@@ -4325,7 +4392,7 @@
|
|
|
4325
4392
|
* @param ids - List of file IDs to return.
|
|
4326
4393
|
* @param sortByDesc - Allows to specify the descending order of the result. By default,
|
|
4327
4394
|
* files are sorted by name in ascending order.
|
|
4328
|
-
* @param
|
|
4395
|
+
* @param sortField - Allows to specify sort field.
|
|
4329
4396
|
*/
|
|
4330
4397
|
getFiles(start, limit, name, ext, ids, sortByDesc, sortField) {
|
|
4331
4398
|
const searchParams = new URLSearchParams();
|
|
@@ -4438,7 +4505,8 @@
|
|
|
4438
4505
|
* version file use {@link File.deleteVersion | File.deleteVersion()}.
|
|
4439
4506
|
*
|
|
4440
4507
|
* @param fileId - File ID.
|
|
4441
|
-
* @returns Returns the raw data of a deleted file.
|
|
4508
|
+
* @returns Returns the raw data of a deleted file. For more information, see
|
|
4509
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Files | Open Cloud Files API}.
|
|
4442
4510
|
*/
|
|
4443
4511
|
deleteFile(fileId) {
|
|
4444
4512
|
return this.httpClient.delete(`/files/${fileId}`).then((response) => response.json());
|
|
@@ -4549,7 +4617,8 @@
|
|
|
4549
4617
|
* already been completed cannot be deleted.
|
|
4550
4618
|
*
|
|
4551
4619
|
* @param jobId - Job ID.
|
|
4552
|
-
* @returns Returns the raw data of a deleted job.
|
|
4620
|
+
* @returns Returns the raw data of a deleted job. For more information, see
|
|
4621
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Jobs | Open Cloud Jobs API}.
|
|
4553
4622
|
*/
|
|
4554
4623
|
deleteJob(jobId) {
|
|
4555
4624
|
return this.httpClient.delete(`/jobs/${jobId}`).then((response) => response.json());
|
|
@@ -4649,7 +4718,8 @@
|
|
|
4649
4718
|
* Deletes the specified assembly from the server.
|
|
4650
4719
|
*
|
|
4651
4720
|
* @param assemblyId - Assembly ID.
|
|
4652
|
-
* @returns Returns the raw data of a deleted assembly.
|
|
4721
|
+
* @returns Returns the raw data of a deleted assembly. For more information, see
|
|
4722
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Assemblies | Open Cloud API}.
|
|
4653
4723
|
*/
|
|
4654
4724
|
deleteAssembly(assemblyId) {
|
|
4655
4725
|
return this.httpClient.delete(`/assemblies/${assemblyId}`).then((response) => response.json());
|
|
@@ -4761,7 +4831,8 @@
|
|
|
4761
4831
|
* Deletes the specified project from the server.
|
|
4762
4832
|
*
|
|
4763
4833
|
* @param projectId - Project ID.
|
|
4764
|
-
* @returns Returns the raw data of a deleted project.
|
|
4834
|
+
* @returns Returns the raw data of a deleted project. For more information, see
|
|
4835
|
+
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Project | Open Cloud Projects API}.
|
|
4765
4836
|
*/
|
|
4766
4837
|
deleteProject(projectId) {
|
|
4767
4838
|
return this.httpClient
|
|
@@ -4801,7 +4872,7 @@
|
|
|
4801
4872
|
// By use of this software, its documentation or related materials, you
|
|
4802
4873
|
// acknowledge and accept the above terms.
|
|
4803
4874
|
///////////////////////////////////////////////////////////////////////////////
|
|
4804
|
-
const version = "25.9.
|
|
4875
|
+
const version = "25.9.8";
|
|
4805
4876
|
|
|
4806
4877
|
exports.Assembly = Assembly;
|
|
4807
4878
|
exports.ClashTest = ClashTest;
|