@verdocs/js-sdk 2.0.3 → 2.0.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/VerdocsEndpoint.d.ts +5 -0
- package/VerdocsEndpoint.js +7 -0
- package/package.json +1 -1
package/VerdocsEndpoint.d.ts
CHANGED
|
@@ -175,6 +175,11 @@ export declare class VerdocsEndpoint {
|
|
|
175
175
|
* ```
|
|
176
176
|
*/
|
|
177
177
|
setToken(token: string | null): VerdocsEndpoint;
|
|
178
|
+
/**
|
|
179
|
+
* Retrieves the current session token, if any. Tokens should rarely be used for direct actions, but this is
|
|
180
|
+
* required by the `<VerdocsView>` and other components to authorize requests to raw PDF files.
|
|
181
|
+
*/
|
|
182
|
+
getToken(): string | null;
|
|
178
183
|
private sessionStorageKey;
|
|
179
184
|
/**
|
|
180
185
|
* Clear the active session.
|
package/VerdocsEndpoint.js
CHANGED
|
@@ -230,6 +230,13 @@ var VerdocsEndpoint = /** @class */ (function () {
|
|
|
230
230
|
this.notifySessionListeners();
|
|
231
231
|
return this;
|
|
232
232
|
};
|
|
233
|
+
/**
|
|
234
|
+
* Retrieves the current session token, if any. Tokens should rarely be used for direct actions, but this is
|
|
235
|
+
* required by the `<VerdocsView>` and other components to authorize requests to raw PDF files.
|
|
236
|
+
*/
|
|
237
|
+
VerdocsEndpoint.prototype.getToken = function () {
|
|
238
|
+
return this.token;
|
|
239
|
+
};
|
|
233
240
|
VerdocsEndpoint.prototype.sessionStorageKey = function () {
|
|
234
241
|
return "verdocs-session-".concat(this.getSessionType(), "-").concat(this.getEnvironment());
|
|
235
242
|
};
|