@sasjs/adapter 3.8.5 → 3.9.2

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/SASjs.d.ts CHANGED
@@ -24,13 +24,19 @@ export default class SASjs {
24
24
  constructor(config?: Partial<SASjsConfig>);
25
25
  getCsrfToken(type?: 'general' | 'file'): import("./types").CsrfToken | undefined;
26
26
  /**
27
- * Executes code against a SAS 9 server. Requires a runner to be present in
27
+ * Executes SAS code on a SAS 9 server. Requires a runner to be present in
28
28
  * the users home directory in metadata.
29
29
  * @param linesOfCode - lines of sas code from the file to run.
30
30
  * @param username - a string representing the username.
31
31
  * @param password - a string representing the password.
32
32
  */
33
33
  executeScriptSAS9(linesOfCode: string[], userName: string, password: string): Promise<string | undefined>;
34
+ /**
35
+ * Executes SAS code on a SASJS server
36
+ * @param code - a string of code from the file to run.
37
+ * @param authConfig - (optional) a valid client, secret, refresh and access tokens that are authorised to execute scripts.
38
+ */
39
+ executeScriptSASjs(code: string, authConfig?: AuthConfig): Promise<string | undefined>;
34
40
  /**
35
41
  * Executes sas code in a SAS Viya compute session.
36
42
  * @param fileName - name of the file to run. It will be converted to path to the file being submitted for execution.
@@ -18,6 +18,12 @@ export declare class SASjsApiClient {
18
18
  error?: {} | undefined;
19
19
  _webout?: string | undefined;
20
20
  }>;
21
+ /**
22
+ * Executes code on a SASJS server.
23
+ * @param code - a string of code to execute.
24
+ * @param authConfig - an object for authentication.
25
+ */
26
+ executeScript(code: string, authConfig?: AuthConfig): Promise<string>;
21
27
  /**
22
28
  * Exchanges the auth code for an access token for the given client.
23
29
  * @param clientId - the client ID to authenticate with.