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