@verdocs/js-sdk 2.0.0 → 2.0.1

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.
@@ -40,11 +40,16 @@ export declare class VerdocsEndpoint {
40
40
  private baseURL;
41
41
  private clientID;
42
42
  private timeout;
43
- private session;
44
43
  private token;
45
44
  private nextListenerId;
46
45
  private sessionListeners;
47
46
  private requestLoggerId;
47
+ /**
48
+ * The current user session, or null if not authenticated. May be either a User or Signing session. If set, the
49
+ * presence of the `document_id` field can be used to differentiate the types. Only signing sessions are associated
50
+ * with Documents.
51
+ */
52
+ session: TSession;
48
53
  api: AxiosInstance;
49
54
  Documents: typeof Documents;
50
55
  /**
@@ -184,5 +189,5 @@ export declare class VerdocsEndpoint {
184
189
  * Load a persisted session from localStorage. Typically called once after the endpoint is configured when the app
185
190
  * or component starts.
186
191
  */
187
- loadSession(source: string): VerdocsEndpoint;
192
+ loadSession(): VerdocsEndpoint;
188
193
  }
@@ -43,11 +43,16 @@ var VerdocsEndpoint = /** @class */ (function () {
43
43
  this.baseURL = 'https://api.verdocs.com';
44
44
  this.clientID = 'not-set';
45
45
  this.timeout = 3000;
46
- this.session = null;
47
46
  this.token = null;
48
47
  this.nextListenerId = 0;
49
48
  this.sessionListeners = new Map();
50
49
  this.requestLoggerId = null;
50
+ /**
51
+ * The current user session, or null if not authenticated. May be either a User or Signing session. If set, the
52
+ * presence of the `document_id` field can be used to differentiate the types. Only signing sessions are associated
53
+ * with Documents.
54
+ */
55
+ this.session = null;
51
56
  this.Documents = Documents;
52
57
  this.baseURL = (options === null || options === void 0 ? void 0 : options.baseURL) || 'https://api.verdocs.com';
53
58
  this.timeout = (options === null || options === void 0 ? void 0 : options.timeout) || 3000;
@@ -267,7 +272,7 @@ var VerdocsEndpoint = /** @class */ (function () {
267
272
  * Load a persisted session from localStorage. Typically called once after the endpoint is configured when the app
268
273
  * or component starts.
269
274
  */
270
- VerdocsEndpoint.prototype.loadSession = function (source) {
275
+ VerdocsEndpoint.prototype.loadSession = function () {
271
276
  var token = localStorage.getItem(this.sessionStorageKey());
272
277
  if (!token) {
273
278
  return this.clearSession();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdocs/js-sdk",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "private": false,
5
5
  "homepage": "https://github.com/Verdocs/js-sdk",
6
6
  "description": "Verdocs JS SDK",