@sasjs/adapter 3.0.2 → 3.1.0

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/node/SASjs.d.ts CHANGED
@@ -196,9 +196,10 @@ export default class SASjs {
196
196
  setDebugState(value: boolean): void;
197
197
  /**
198
198
  * Checks whether a session is active, or login is required.
199
+ * @param accessToken - an optional access token is required for SASjs server type.
199
200
  * @returns - a promise which resolves with an object containing two values - a boolean `isLoggedIn`, and a string `userName`.
200
201
  */
201
- checkSession(): Promise<{
202
+ checkSession(accessToken?: string): Promise<{
202
203
  isLoggedIn: boolean;
203
204
  userName: string;
204
205
  loginForm?: any;
@@ -211,8 +212,12 @@ export default class SASjs {
211
212
  logIn(username?: string, password?: string, options?: LoginOptions): Promise<LoginResult>;
212
213
  /**
213
214
  * Logs out of the configured SAS server.
215
+ * @param accessToken - an optional access token is required for SASjs server type.
214
216
  */
215
- logOut(): Promise<boolean>;
217
+ logOut(accessToken?: string): Promise<boolean> | Promise<{
218
+ result: unknown;
219
+ etag: string;
220
+ }>;
216
221
  /**
217
222
  * Uploads a file to the given service.
218
223
  * @param sasJob - the path to the SAS program (ultimately resolves to
@@ -27,12 +27,13 @@ export declare class AuthManager {
27
27
  private sendLoginRequest;
28
28
  /**
29
29
  * Checks whether a session is active, or login is required.
30
+ * @param accessToken - an optional access token is required for SASjs server type.
30
31
  * @returns - a promise which resolves with an object containing three values
31
32
  * - a boolean `isLoggedIn`
32
33
  * - a string `userName` and
33
34
  * - a form `loginForm` if not loggedin.
34
35
  */
35
- checkSession(): Promise<{
36
+ checkSession(accessToken?: string): Promise<{
36
37
  isLoggedIn: boolean;
37
38
  userName: string;
38
39
  loginForm?: any;
@@ -44,6 +45,10 @@ export declare class AuthManager {
44
45
  private setLoginUrl;
45
46
  /**
46
47
  * Logs out of the configured SAS server.
48
+ * @param accessToken - an optional access token is required for SASjs server type.
47
49
  */
48
- logOut(): Promise<boolean>;
50
+ logOut(accessToken?: string): Promise<boolean> | Promise<{
51
+ result: unknown;
52
+ etag: string;
53
+ }>;
49
54
  }