@evergis/api 4.1.50 → 4.1.52
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/LICENSE +21 -21
- package/README.md +12 -12
- package/dist/Api.d.ts +0 -1
- package/dist/api.esm.js +4 -4
- package/dist/api.esm.js.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Everpoint
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Everpoint
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
# @evergis/api
|
|
2
|
-
|
|
3
|
-
Библиотека API.
|
|
4
|
-
|
|
5
|
-
### Генерирование API
|
|
6
|
-
|
|
7
|
-
```shell
|
|
8
|
-
$ yarn generate
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
***ВАЖНО!!!***: Никогда и ни при каких обстоятельствах нельзя вручную править файлы,
|
|
12
|
-
размещенные в директории `src/__generated__`!
|
|
1
|
+
# @evergis/api
|
|
2
|
+
|
|
3
|
+
Библиотека API.
|
|
4
|
+
|
|
5
|
+
### Генерирование API
|
|
6
|
+
|
|
7
|
+
```shell
|
|
8
|
+
$ yarn generate
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
***ВАЖНО!!!***: Никогда и ни при каких обстоятельствах нельзя вручную править файлы,
|
|
12
|
+
размещенные в директории `src/__generated__`!
|
package/dist/Api.d.ts
CHANGED
|
@@ -57,7 +57,6 @@ export declare class Api extends EventEmitter {
|
|
|
57
57
|
protected readonly http: HttpClient;
|
|
58
58
|
private readonly wsUrl;
|
|
59
59
|
private readonly urlPath;
|
|
60
|
-
private refreshingToken;
|
|
61
60
|
constructor({ url, wsUrl, wsKeepAlive, snappingHubUrl, http, urlPath, httpOptions, }: ApiParams);
|
|
62
61
|
get isShared(): boolean;
|
|
63
62
|
get isPresentation(): boolean;
|
package/dist/api.esm.js
CHANGED
|
@@ -2783,11 +2783,9 @@ class Api extends EventEmitter {
|
|
|
2783
2783
|
http;
|
|
2784
2784
|
wsUrl;
|
|
2785
2785
|
urlPath;
|
|
2786
|
-
refreshingToken;
|
|
2787
2786
|
constructor({ url, wsUrl, wsKeepAlive, snappingHubUrl, http, urlPath, httpOptions, }) {
|
|
2788
2787
|
super();
|
|
2789
2788
|
const { hooks } = httpOptions || {};
|
|
2790
|
-
this.refreshingToken = false;
|
|
2791
2789
|
this.http =
|
|
2792
2790
|
http ||
|
|
2793
2791
|
new HttpClient({
|
|
@@ -2818,8 +2816,7 @@ class Api extends EventEmitter {
|
|
|
2818
2816
|
case 401:
|
|
2819
2817
|
try {
|
|
2820
2818
|
const refreshToken = window.localStorage.getItem(STORAGE_REFRESH_TOKEN_KEY);
|
|
2821
|
-
if (
|
|
2822
|
-
this.refreshingToken = true;
|
|
2819
|
+
if (refreshToken) {
|
|
2823
2820
|
const refreshTokenResponse = await this.account.refreshToken({
|
|
2824
2821
|
refreshToken,
|
|
2825
2822
|
});
|
|
@@ -2878,6 +2875,9 @@ class Api extends EventEmitter {
|
|
|
2878
2875
|
withCredentials: true,
|
|
2879
2876
|
skipNegotiation: true,
|
|
2880
2877
|
transport: HttpTransportType.WebSockets,
|
|
2878
|
+
accessTokenFactory: () => {
|
|
2879
|
+
return window.localStorage.getItem(STORAGE_TOKEN_KEY) || "";
|
|
2880
|
+
},
|
|
2881
2881
|
})
|
|
2882
2882
|
.withAutomaticReconnect()
|
|
2883
2883
|
.build()
|