@verdocs/js-sdk 4.2.75 → 4.2.79
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/index.d.mts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -2
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -864,6 +864,13 @@ const changePassword = (endpoint, params) => endpoint.api //
|
|
|
864
864
|
* if (status !== 'OK') {
|
|
865
865
|
* window.alert(`Please check your email for instructions on how to reset your password.`);
|
|
866
866
|
* }
|
|
867
|
+
*
|
|
868
|
+
* // Collect code and new password from the user, then call:
|
|
869
|
+
*
|
|
870
|
+
* const {success} = await resetPassword({ email, code, new_password });
|
|
871
|
+
* if (status !== 'OK') {
|
|
872
|
+
* window.alert(`Please check your verification code and try again.`);
|
|
873
|
+
* }
|
|
867
874
|
* ```
|
|
868
875
|
*/
|
|
869
876
|
const resetPassword = (endpoint, params) => endpoint.api //
|
|
@@ -1109,9 +1116,7 @@ class VerdocsEndpoint {
|
|
|
1109
1116
|
static getDefault() {
|
|
1110
1117
|
if (!globalThis$1[ENDPOINT_KEY]) {
|
|
1111
1118
|
globalThis$1[ENDPOINT_KEY] = new VerdocsEndpoint();
|
|
1112
|
-
// window.console.debug('[JS_SDK] Created default endpoint', globalThis[ENDPOINT_KEY].baseURL);
|
|
1113
1119
|
}
|
|
1114
|
-
window?.console?.debug('[JS_SDK] Getting default endpoint', globalThis$1[ENDPOINT_KEY].endpointId);
|
|
1115
1120
|
return globalThis$1[ENDPOINT_KEY];
|
|
1116
1121
|
}
|
|
1117
1122
|
/**
|
|
@@ -1368,6 +1373,9 @@ class VerdocsEndpoint {
|
|
|
1368
1373
|
this.nextListenerId++;
|
|
1369
1374
|
const listenerSymbol = Symbol.for('' + this.nextListenerId);
|
|
1370
1375
|
this.sessionListeners.set(listenerSymbol, listener);
|
|
1376
|
+
// Perform an immediate notification in case this listener subscribed after the endpoint's session was
|
|
1377
|
+
// already loaded.
|
|
1378
|
+
listener(this, this.session, this.profile);
|
|
1371
1379
|
return () => {
|
|
1372
1380
|
this.sessionListeners.delete(listenerSymbol);
|
|
1373
1381
|
};
|