@sasjs/adapter 3.10.15 → 3.10.17

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/README.md CHANGED
@@ -125,9 +125,9 @@ sasJs.request("/path/to/my/service", dataObject)
125
125
  })
126
126
  ```
127
127
 
128
- We supply the path to the SAS service, and a data object.
128
+ We supply the path to the SAS service, and a data object.
129
129
 
130
- If the path starts with a `/` then it should be a full path to the service. If there is no leading `/` then it is relative to the `appLoc`.
130
+ If the path starts with a `/` then it should be a full path to the service. If there is no leading `/` then it is relative to the `appLoc`.
131
131
 
132
132
  The data object can be null (for services with no input), or can contain one or more "tables" in the following format:
133
133
 
@@ -159,7 +159,7 @@ The SAS type (char/numeric) of the values is determined according to a set of ru
159
159
 
160
160
  * If the values are numeric, the SAS type is numeric
161
161
  * If the values are all string, the SAS type is character
162
- * If the values contain a single character (a-Z + underscore + .) AND a numeric, then the SAS type is numeric (with special missing values).
162
+ * If the values contain a single character (a-Z + underscore + .) AND a numeric, then the SAS type is numeric (with special missing values).
163
163
  * `null` is set to either '.' or '' depending on the assigned or derived type per the above rules. If entire column is `null` then the type will be numeric.
164
164
 
165
165
  The following table illustrates the formats applied to columns under various scenarios:
@@ -237,8 +237,8 @@ run;
237
237
  %webout(OBJ,a) /* Rows in table `a` are objects (easy to use) */
238
238
  %webout(ARR,b) /* Rows in table `b` are arrays (compact) */
239
239
  %webout(OBJ,c,fmt=N) /* Table `c` is sent unformatted (raw) */
240
- %webout(OBJ,c,label=d) /* Rename table as `d` in output JSON */
241
- %webout(OBJ,c,label=e, maxobs=10) /* send only 10 rows back */
240
+ %webout(OBJ,c,dslabel=d) /* Rename table as `d` in output JSON */
241
+ %webout(OBJ,c,dslabel=e, maxobs=10) /* send only 10 rows back */
242
242
  %webout(CLOSE) /* Close the JSON and add default variables */
243
243
  ```
244
244
 
@@ -332,7 +332,7 @@ If you find this library useful, help us grow our star graph!
332
332
 
333
333
  ## Contributors ✨
334
334
  <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
335
- [![All Contributors](https://img.shields.io/badge/all_contributors-7-orange.svg?style=flat-square)](#contributors-)
335
+ [![All Contributors](https://img.shields.io/badge/all_contributors-8-orange.svg?style=flat-square)](#contributors-)
336
336
  <!-- ALL-CONTRIBUTORS-BADGE:END -->
337
337
 
338
338
  Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
@@ -350,6 +350,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
350
350
  <td align="center"><a href="https://github.com/sabhas"><img src="https://avatars.githubusercontent.com/u/82647447?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Sabir Hassan</b></sub></a><br /><a href="https://github.com/sasjs/adapter/commits?author=sabhas" title="Code">💻</a> <a href="https://github.com/sasjs/adapter/pulls?q=is%3Apr+reviewed-by%3Asabhas" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/sasjs/adapter/commits?author=sabhas" title="Tests">⚠️</a> <a href="#ideas-sabhas" title="Ideas, Planning, & Feedback">🤔</a></td>
351
351
  <td align="center"><a href="https://github.com/VladislavParhomchik"><img src="https://avatars.githubusercontent.com/u/83717836?v=4?s=100" width="100px;" alt=""/><br /><sub><b>VladislavParhomchik</b></sub></a><br /><a href="https://github.com/sasjs/adapter/commits?author=VladislavParhomchik" title="Tests">⚠️</a> <a href="https://github.com/sasjs/adapter/pulls?q=is%3Apr+reviewed-by%3AVladislavParhomchik" title="Reviewed Pull Requests">👀</a></td>
352
352
  </tr>
353
+ <tr>
354
+ <td align="center"><a href="http://rudvfaden.github.io/"><img src="https://avatars.githubusercontent.com/u/2445577?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Rud Faden</b></sub></a><br /><a href="#userTesting-rudvfaden" title="User Testing">📓</a> <a href="https://github.com/sasjs/adapter/commits?author=rudvfaden" title="Documentation">📖</a></td>
355
+ </tr>
353
356
  </table>
354
357
 
355
358
  <!-- markdownlint-restore -->
package/SASjs.d.ts CHANGED
@@ -219,11 +219,7 @@ export default class SASjs {
219
219
  * Checks whether a session is active, or login is required.
220
220
  * @returns - a promise which resolves with an object containing two values - a boolean `isLoggedIn`, and a string `userName`.
221
221
  */
222
- checkSession(): Promise<{
223
- isLoggedIn: boolean;
224
- userName: string;
225
- loginForm?: any;
226
- }>;
222
+ checkSession(): Promise<import("./types/Login").LoginResultInternal>;
227
223
  /**
228
224
  * Logs into the SAS server with the supplied credentials.
229
225
  * @param username - a string representing the username.
@@ -313,12 +309,8 @@ export default class SASjs {
313
309
  example?: {} | undefined;
314
310
  } | undefined>;
315
311
  executeJobSASjs(query: ExecutionQuery, authConfig?: AuthConfig): Promise<{
316
- status: string;
317
- message: string;
318
- log?: string | undefined;
319
- logPath?: string | undefined;
320
- error?: {} | undefined;
321
- _webout?: string | undefined;
312
+ result: any;
313
+ log: any;
322
314
  } | undefined>;
323
315
  /**
324
316
  * Kicks off execution of the given job via the compute API.
@@ -10,13 +10,9 @@ export declare class SASjsApiClient {
10
10
  streamServiceName?: string | undefined;
11
11
  example?: {} | undefined;
12
12
  }>;
13
- executeJob(query: ExecutionQuery, authConfig?: AuthConfig): Promise<{
14
- status: string;
15
- message: string;
16
- log?: string | undefined;
17
- logPath?: string | undefined;
18
- error?: {} | undefined;
19
- _webout?: string | undefined;
13
+ executeJob(query: ExecutionQuery, appLoc: string, authConfig?: AuthConfig): Promise<{
14
+ result: any;
15
+ log: any;
20
16
  }>;
21
17
  /**
22
18
  * Executes code on a SASJS server.
@@ -1,2 +1,2 @@
1
1
  import { Job } from '../../types';
2
- export declare const getFileStream: (job: Job, filePath?: string | undefined) => Promise<any>;
2
+ export declare const getFileStream: (job: Job, filePath?: string) => Promise<any>;
@@ -1,12 +1,13 @@
1
1
  import { ServerType } from '@sasjs/utils/types';
2
2
  import { RequestClient } from '../request/RequestClient';
3
- import { LoginOptions, LoginResult } from '../types/Login';
3
+ import { LoginOptions, LoginResult, LoginResultInternal } from '../types/Login';
4
4
  export declare class AuthManager {
5
5
  private serverUrl;
6
6
  private serverType;
7
7
  private requestClient;
8
8
  private loginCallback;
9
9
  userName: string;
10
+ userLongName: string;
10
11
  private loginUrl;
11
12
  private logoutUrl;
12
13
  private redirectedLoginUrl;
@@ -29,17 +30,15 @@ export declare class AuthManager {
29
30
  * Checks whether a session is active, or login is required.
30
31
  * @returns - a promise which resolves with an object containing three values
31
32
  * - a boolean `isLoggedIn`
32
- * - a string `userName` and
33
+ * - a string `userName`,
34
+ * - a string `userFullName` and
33
35
  * - a form `loginForm` if not loggedin.
34
36
  */
35
- checkSession(): Promise<{
36
- isLoggedIn: boolean;
37
- userName: string;
38
- loginForm?: any;
39
- }>;
37
+ checkSession(): Promise<LoginResultInternal>;
40
38
  private getNewLoginForm;
41
39
  private fetchUserName;
42
40
  private extractUserName;
41
+ private extractUserLongName;
43
42
  private getLoginForm;
44
43
  private setLoginUrl;
45
44
  /**