@sasjs/adapter 3.4.2 → 3.6.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.
@@ -0,0 +1,10 @@
1
+ import { AuthConfig, ExtraResponseAttributes, ServerType } from '@sasjs/utils/types';
2
+ import { RequestClient } from '../request/RequestClient';
3
+ import { BaseJobExecutor } from './JobExecutor';
4
+ export declare class SasJsJobExecutor extends BaseJobExecutor {
5
+ private jobsPath;
6
+ private requestClient;
7
+ constructor(serverUrl: string, serverType: ServerType, jobsPath: string, requestClient: RequestClient);
8
+ execute(sasJob: string, data: any, config: any, loginRequiredCallback?: any, authConfig?: AuthConfig, extraResponseAttributes?: ExtraResponseAttributes[]): Promise<unknown>;
9
+ private getRequestParams;
10
+ }
@@ -1,6 +1,7 @@
1
1
  export * from './ComputeJobExecutor';
2
+ export * from './FileUploader';
2
3
  export * from './JesJobExecutor';
3
4
  export * from './JobExecutor';
4
5
  export * from './Sas9JobExecutor';
6
+ export * from './SasJsJobExecutor';
5
7
  export * from './WebJobExecutor';
6
- export * from './FileUploader';
package/node/SASjs.d.ts CHANGED
@@ -21,9 +21,25 @@ export default class SASjs {
21
21
  private computeJobExecutor;
22
22
  private jesJobExecutor;
23
23
  private sas9JobExecutor;
24
+ private sasJsJobExecutor;
24
25
  constructor(config?: Partial<SASjsConfig>);
25
26
  getCsrfToken(type?: 'general' | 'file'): import("./types").CsrfToken | undefined;
27
+ /**
28
+ * Executes the sas code against SAS9 server
29
+ * @param linesOfCode - lines of sas code from the file to run.
30
+ * @param username - a string representing the username.
31
+ * @param password - a string representing the password.
32
+ */
26
33
  executeScriptSAS9(linesOfCode: string[], userName: string, password: string): Promise<string | undefined>;
34
+ /**
35
+ * Executes the sas code against SASViya server
36
+ * @param fileName - name of the file to run. It will be converted to path to the file being submitted for execution.
37
+ * @param linesOfCode - lines of sas code from the file to run.
38
+ * @param contextName - context name on which code will be run on the server.
39
+ * @param authConfig - (optional) the access token, refresh token, client and secret for authorizing the request.
40
+ * @param debug - (optional) if true, global debug config will be overriden
41
+ */
42
+ executeScriptSASViya(fileName: string, linesOfCode: string[], contextName: string, authConfig?: AuthConfig, debug?: boolean): Promise<any>;
27
43
  /**
28
44
  * Gets compute contexts.
29
45
  * @param accessToken - an access token for an authorized user.
@@ -106,15 +122,6 @@ export default class SASjs {
106
122
  */
107
123
  getComputeContextById(contextId: string, accessToken?: string): Promise<import("./types").ContextAllAttributes>;
108
124
  createSession(contextName: string, accessToken: string): Promise<import("./types").Session>;
109
- /**
110
- * Executes the sas code against given sas server
111
- * @param fileName - name of the file to run. It will be converted to path to the file being submitted for execution.
112
- * @param linesOfCode - lines of sas code from the file to run.
113
- * @param contextName - context name on which code will be run on the server.
114
- * @param authConfig - (optional) the access token, refresh token, client and secret for authorizing the request.
115
- * @param debug - (optional) if true, global debug config will be overriden
116
- */
117
- executeScriptSASViya(fileName: string, linesOfCode: string[], contextName: string, authConfig?: AuthConfig, debug?: boolean): Promise<any>;
118
125
  /**
119
126
  * Creates a folder in the logical SAS folder tree
120
127
  * @param folderName - name of the folder to be created.
@@ -317,6 +324,7 @@ export default class SASjs {
317
324
  log?: string | undefined;
318
325
  logPath?: string | undefined;
319
326
  error?: {} | undefined;
327
+ _webout?: string | undefined;
320
328
  } | undefined>;
321
329
  /**
322
330
  * Kicks off execution of the given job via the compute API.
@@ -17,6 +17,7 @@ export declare class SASjsApiClient {
17
17
  log?: string | undefined;
18
18
  logPath?: string | undefined;
19
19
  error?: {} | undefined;
20
+ _webout?: string | undefined;
20
21
  }>;
21
22
  /**
22
23
  * Exchanges the auth code for an access token for the given client.