@inweb/client 25.4.10 → 25.4.11
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 +51 -86
- package/dist/client.js.map +1 -1
- package/dist/client.min.js +1 -1
- package/dist/client.module.js +5 -15
- package/dist/client.module.js.map +1 -1
- package/lib/Api/Client.d.ts +15 -37
- package/lib/Api/Job.d.ts +2 -5
- package/lib/Api/Model.d.ts +8 -2
- package/lib/Api/User.d.ts +17 -26
- package/package.json +2 -2
- package/src/Api/Client.ts +25 -53
- package/src/Api/FetchError.ts +0 -1
- package/src/Api/Job.ts +2 -5
- package/src/Api/Model.ts +8 -2
- package/src/Api/User.ts +17 -29
package/dist/client.js
CHANGED
|
@@ -160,6 +160,8 @@
|
|
|
160
160
|
/**
|
|
161
161
|
* Returns model viewpoint list.
|
|
162
162
|
*
|
|
163
|
+
* _**Note**: Assemblу models do not support viewpoints_.
|
|
164
|
+
*
|
|
163
165
|
* @async
|
|
164
166
|
*/
|
|
165
167
|
getViewpoints() {
|
|
@@ -170,6 +172,8 @@
|
|
|
170
172
|
/**
|
|
171
173
|
* Add new model viewpoint. To create a new viewpoint use `Viewer.createViewpoint()`.
|
|
172
174
|
*
|
|
175
|
+
* _**Note**: Assemblу models do not support viewpoints_.
|
|
176
|
+
*
|
|
173
177
|
* @async
|
|
174
178
|
* @param viewpoint - Viewpoint.
|
|
175
179
|
*/
|
|
@@ -182,6 +186,8 @@
|
|
|
182
186
|
/**
|
|
183
187
|
* Delete model viewpoint.
|
|
184
188
|
*
|
|
189
|
+
* _**Note**: Assemblу models do not support viewpoints_.
|
|
190
|
+
*
|
|
185
191
|
* @async
|
|
186
192
|
* @param guid - Viewpoint GUID.
|
|
187
193
|
* @returns Returns the raw data of a deleted viewpoint.
|
|
@@ -710,7 +716,6 @@
|
|
|
710
716
|
*/
|
|
711
717
|
constructor(status, message) {
|
|
712
718
|
super(message || statusText(status));
|
|
713
|
-
this.name = "FetchError";
|
|
714
719
|
this.status = status;
|
|
715
720
|
this.statusText = statusText(status);
|
|
716
721
|
}
|
|
@@ -1778,7 +1783,7 @@
|
|
|
1778
1783
|
}
|
|
1779
1784
|
/**
|
|
1780
1785
|
* Job type. Can be `properties`, `geomerty`, `geomertyGltf`, `validation`, `clash`, `dwg`,
|
|
1781
|
-
* `obj`, `gltf`, `glb`, `vsf`, `pdf
|
|
1786
|
+
* `obj`, `gltf`, `glb`, `vsf`, `pdf` or `3dpdf`.
|
|
1782
1787
|
*
|
|
1783
1788
|
* @readonly
|
|
1784
1789
|
*/
|
|
@@ -1829,10 +1834,7 @@
|
|
|
1829
1834
|
return this;
|
|
1830
1835
|
}
|
|
1831
1836
|
/**
|
|
1832
|
-
* Update job data on the server.
|
|
1833
|
-
*
|
|
1834
|
-
* Only admins can update job data, if the current logged in user does not have administrator
|
|
1835
|
-
* rights, an exception will be thrown.
|
|
1837
|
+
* Update job data on the server. Only admins can update job data.
|
|
1836
1838
|
*
|
|
1837
1839
|
* @async
|
|
1838
1840
|
* @param data - Raw job data.
|
|
@@ -3402,8 +3404,8 @@
|
|
|
3402
3404
|
return this.data.canCreateProject;
|
|
3403
3405
|
}
|
|
3404
3406
|
/**
|
|
3405
|
-
*
|
|
3406
|
-
*
|
|
3407
|
+
* User account registration time (UTC) in the format specified in <a
|
|
3408
|
+
* href="https://www.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601</a>.
|
|
3407
3409
|
*
|
|
3408
3410
|
* @readonly
|
|
3409
3411
|
*/
|
|
@@ -3495,8 +3497,8 @@
|
|
|
3495
3497
|
return this.data.isEmailConfirmed;
|
|
3496
3498
|
}
|
|
3497
3499
|
/**
|
|
3498
|
-
* User last update time (UTC) in the format specified in
|
|
3499
|
-
*
|
|
3500
|
+
* User last update time (UTC) in the format specified in <a
|
|
3501
|
+
* href="https://www.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601</a>.
|
|
3500
3502
|
*/
|
|
3501
3503
|
get lastModified() {
|
|
3502
3504
|
return this.data.lastModified;
|
|
@@ -3511,8 +3513,8 @@
|
|
|
3511
3513
|
this._data.lastName = value;
|
|
3512
3514
|
}
|
|
3513
3515
|
/**
|
|
3514
|
-
* User last sign in time (UTC) in the format specified in
|
|
3515
|
-
*
|
|
3516
|
+
* User last sign in time (UTC) in the format specified in <a
|
|
3517
|
+
* href="https://www.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601</a>.
|
|
3516
3518
|
*/
|
|
3517
3519
|
get lastSignIn() {
|
|
3518
3520
|
return this.data.lastSignIn;
|
|
@@ -3525,12 +3527,6 @@
|
|
|
3525
3527
|
get projectsLimit() {
|
|
3526
3528
|
return this.data.projectsLimit;
|
|
3527
3529
|
}
|
|
3528
|
-
/**
|
|
3529
|
-
* The identity provider used to create the account. Can be `ldap`, `oauth`, `saml` or empty.
|
|
3530
|
-
*/
|
|
3531
|
-
get providerType() {
|
|
3532
|
-
return this.data.providerType;
|
|
3533
|
-
}
|
|
3534
3530
|
/**
|
|
3535
3531
|
* The user's access token (API key). Use {@link Client.signInWithToken()} to log in using token.
|
|
3536
3532
|
*
|
|
@@ -3549,10 +3545,9 @@
|
|
|
3549
3545
|
this._data.userName = value;
|
|
3550
3546
|
}
|
|
3551
3547
|
/**
|
|
3552
|
-
* Refresh user data.
|
|
3553
|
-
*
|
|
3554
|
-
*
|
|
3555
|
-
* administrator rights, hi can only checkout himself, otherwise an exception will be thrown.
|
|
3548
|
+
* Refresh user data. Only admins can checkout other users, if the current logged in user
|
|
3549
|
+
* does not have administrator rights, hi can only checkout himself, otherwise an exception
|
|
3550
|
+
* will be thrown.
|
|
3556
3551
|
*/
|
|
3557
3552
|
async checkout() {
|
|
3558
3553
|
if (this.id === this.httpClient.signInUserId) {
|
|
@@ -3568,10 +3563,9 @@
|
|
|
3568
3563
|
return this;
|
|
3569
3564
|
}
|
|
3570
3565
|
/**
|
|
3571
|
-
* Update user data on the server.
|
|
3572
|
-
*
|
|
3573
|
-
*
|
|
3574
|
-
* administrator rights, hi can only update himself, otherwise an exception will be thrown.
|
|
3566
|
+
* Update user data on the server. Only admins can update other users, if the current logged
|
|
3567
|
+
* in user does not have administrator rights, hi can only update himself, otherwise an
|
|
3568
|
+
* exception will be thrown.
|
|
3575
3569
|
*
|
|
3576
3570
|
* @async
|
|
3577
3571
|
* @param data - Raw user data.
|
|
@@ -3590,10 +3584,8 @@
|
|
|
3590
3584
|
return this;
|
|
3591
3585
|
}
|
|
3592
3586
|
/**
|
|
3593
|
-
* Delete a user from the server.
|
|
3594
|
-
*
|
|
3595
|
-
* Only admins can delete users, if the current logged in user does not have administrator
|
|
3596
|
-
* rights, an exception will be thrown.
|
|
3587
|
+
* Delete a user from the server. Only admins can delete users, if the current logged in user
|
|
3588
|
+
* does not have administrator rights, an exception will be thrown.
|
|
3597
3589
|
*
|
|
3598
3590
|
* Admins can delete themselves or other admins. An admin can only delete himself if he is
|
|
3599
3591
|
* not the last administrator.
|
|
@@ -3625,10 +3617,9 @@
|
|
|
3625
3617
|
return this.update(this.data);
|
|
3626
3618
|
}
|
|
3627
3619
|
/**
|
|
3628
|
-
* Set or remove the user avatar.
|
|
3629
|
-
*
|
|
3630
|
-
*
|
|
3631
|
-
* administrator rights, he can only set his own avatar, otherwise an exception will be thrown.
|
|
3620
|
+
* Set or remove the user avatar. Only admins can set the avatar of other users, if the
|
|
3621
|
+
* current logged in user does not have administrator rights, he can only set his own avatar,
|
|
3622
|
+
* otherwise an exception will be thrown.
|
|
3632
3623
|
*
|
|
3633
3624
|
* @async
|
|
3634
3625
|
* @param image - Avatar image. Can be a <a
|
|
@@ -3768,7 +3759,7 @@
|
|
|
3768
3759
|
.then((data) => ({
|
|
3769
3760
|
...data,
|
|
3770
3761
|
server: data.version,
|
|
3771
|
-
client: "25.4.
|
|
3762
|
+
client: "25.4.11",
|
|
3772
3763
|
}));
|
|
3773
3764
|
}
|
|
3774
3765
|
/**
|
|
@@ -3840,6 +3831,20 @@
|
|
|
3840
3831
|
const data = await response.json();
|
|
3841
3832
|
return this.setCurrentUser(data);
|
|
3842
3833
|
}
|
|
3834
|
+
/**
|
|
3835
|
+
* Get the list of server indentity providers.
|
|
3836
|
+
*
|
|
3837
|
+
* To sign in with the provider in your web application:
|
|
3838
|
+
*
|
|
3839
|
+
* - Open the `provider.url` link using `window.open()`.
|
|
3840
|
+
* - Add a `/oauth` path (server-defined) handler to the router. In this handler, show an error
|
|
3841
|
+
* message if the `error` search parameter is present, or log in with the `token` search parameter.
|
|
3842
|
+
*
|
|
3843
|
+
* @async
|
|
3844
|
+
*/
|
|
3845
|
+
getIdentityProviders() {
|
|
3846
|
+
return this.httpClient.get("/identity").then((response) => response.json());
|
|
3847
|
+
}
|
|
3843
3848
|
// Save the current logged in user information for internal use.
|
|
3844
3849
|
setCurrentUser(data) {
|
|
3845
3850
|
this._user = new User(data, this.httpClient);
|
|
@@ -3862,43 +3867,8 @@
|
|
|
3862
3867
|
return this._user;
|
|
3863
3868
|
}
|
|
3864
3869
|
/**
|
|
3865
|
-
*
|
|
3866
|
-
*
|
|
3867
|
-
* To sign in with the provider in your web application:
|
|
3868
|
-
*
|
|
3869
|
-
* - Open the `provider.url` link using `window.open()`.
|
|
3870
|
-
* - Add a `/oauth` path (server-defined) handler to the router. In this handler, show an error
|
|
3871
|
-
* message if the `error` search parameter is present, or log in with the `token` search parameter.
|
|
3872
|
-
*
|
|
3873
|
-
* @async
|
|
3874
|
-
*/
|
|
3875
|
-
getIdentityProviders() {
|
|
3876
|
-
return this.httpClient.get("/identity").then((response) => response.json());
|
|
3877
|
-
}
|
|
3878
|
-
/**
|
|
3879
|
-
* Returns the current server settings.
|
|
3880
|
-
*
|
|
3881
|
-
* @async
|
|
3882
|
-
*/
|
|
3883
|
-
getServerSettings() {
|
|
3884
|
-
return this.httpClient.get("/settings").then((response) => response.json());
|
|
3885
|
-
}
|
|
3886
|
-
/**
|
|
3887
|
-
* Change server settings.
|
|
3888
|
-
*
|
|
3889
|
-
* Only admins can change server settings, if the current logged in user does not have
|
|
3890
|
-
* administrator rights, an exception will be thrown.
|
|
3891
|
-
*
|
|
3892
|
-
* @async
|
|
3893
|
-
*/
|
|
3894
|
-
updateServerSettings(settings) {
|
|
3895
|
-
return this.httpClient.put("/settings", settings).then((response) => response.json());
|
|
3896
|
-
}
|
|
3897
|
-
/**
|
|
3898
|
-
* Returns a list of server users.
|
|
3899
|
-
*
|
|
3900
|
-
* Only admins can get a list of users, if the current logged in user does not have
|
|
3901
|
-
* administrator rights, an exception will be thrown.
|
|
3870
|
+
* Returns a list of server users. Only admins can get a list of users, if the current logged
|
|
3871
|
+
* in user does not have administrator rights, an exception will be thrown.
|
|
3902
3872
|
*
|
|
3903
3873
|
* @async
|
|
3904
3874
|
*/
|
|
@@ -3910,10 +3880,9 @@
|
|
|
3910
3880
|
.then((array) => array.map((data) => new User(data, this.httpClient)));
|
|
3911
3881
|
}
|
|
3912
3882
|
/**
|
|
3913
|
-
* Returns the user information.
|
|
3914
|
-
*
|
|
3915
|
-
*
|
|
3916
|
-
* rights, hi can only get himself, otherwise an exception will be thrown.
|
|
3883
|
+
* Returns the user information. Only admins can get other users, if the current logged in
|
|
3884
|
+
* user does not have administrator rights, hi can only get himself, otherwise an exception
|
|
3885
|
+
* will be thrown.
|
|
3917
3886
|
*
|
|
3918
3887
|
* @async
|
|
3919
3888
|
* @param userId - User ID.
|
|
@@ -3935,10 +3904,8 @@
|
|
|
3935
3904
|
}
|
|
3936
3905
|
}
|
|
3937
3906
|
/**
|
|
3938
|
-
* Create a new user.
|
|
3939
|
-
*
|
|
3940
|
-
* Only admins can create users, if the current logged in user does not have administrator
|
|
3941
|
-
* rights, an exception will be thrown.
|
|
3907
|
+
* Create a new user. Only admins can create users, if the current logged in user does not
|
|
3908
|
+
* have administrator rights, an exception will be thrown.
|
|
3942
3909
|
*
|
|
3943
3910
|
* @async
|
|
3944
3911
|
* @param email - User email. Cannot be empty.
|
|
@@ -3952,7 +3919,7 @@
|
|
|
3952
3919
|
* @param params.lastName - Last name.
|
|
3953
3920
|
* @param params.canCreateProject - `true` if user is allowed to create a project.
|
|
3954
3921
|
* @param params.projectsLimit - The maximum number of projects that the user can create.
|
|
3955
|
-
* @param params.storageLimit - The size of the file storage available to the user
|
|
3922
|
+
* @param params.storageLimit - The size of the file storage available to the user.
|
|
3956
3923
|
*/
|
|
3957
3924
|
createUser(email, password, params = {}) {
|
|
3958
3925
|
const { isAdmin, userName, ...rest } = params;
|
|
@@ -3971,10 +3938,8 @@
|
|
|
3971
3938
|
.then((data) => new User(data, this.httpClient));
|
|
3972
3939
|
}
|
|
3973
3940
|
/**
|
|
3974
|
-
* Delete a user from the server.
|
|
3975
|
-
*
|
|
3976
|
-
* Only admins can delete users, if the current logged in user does not have administrator
|
|
3977
|
-
* rights, an exception will be thrown.
|
|
3941
|
+
* Delete a user from the server. Only admins can delete users, if the current logged in user
|
|
3942
|
+
* does not have administrator rights, an exception will be thrown.
|
|
3978
3943
|
*
|
|
3979
3944
|
* Admins can delete themselves or other admins. An admin can only delete himself if he is
|
|
3980
3945
|
* not the last administrator.
|
|
@@ -4487,7 +4452,7 @@
|
|
|
4487
4452
|
}
|
|
4488
4453
|
|
|
4489
4454
|
///////////////////////////////////////////////////////////////////////////////
|
|
4490
|
-
const version = "25.4.
|
|
4455
|
+
const version = "25.4.11";
|
|
4491
4456
|
|
|
4492
4457
|
exports.Assembly = Assembly;
|
|
4493
4458
|
exports.ClashTest = ClashTest;
|