@sasjs/adapter 3.7.1 → 3.7.5

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
@@ -21,18 +21,18 @@ export default class SASjs {
21
21
  private computeJobExecutor;
22
22
  private jesJobExecutor;
23
23
  private sas9JobExecutor;
24
- private sasJsJobExecutor;
25
24
  constructor(config?: Partial<SASjsConfig>);
26
25
  getCsrfToken(type?: 'general' | 'file'): import("./types").CsrfToken | undefined;
27
26
  /**
28
- * Executes the sas code against SAS9 server
27
+ * Executes code against a SAS 9 server. Requires a runner to be present in
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
34
  /**
35
- * Executes the sas code against SASViya server
35
+ * Executes sas code in a SAS Viya compute session.
36
36
  * @param fileName - name of the file to run. It will be converted to path to the file being submitted for execution.
37
37
  * @param linesOfCode - lines of sas code from the file to run.
38
38
  * @param contextName - context name on which code will be run on the server.
@@ -251,7 +251,8 @@ export default class SASjs {
251
251
  [key: string]: any;
252
252
  }, loginRequiredCallback?: () => any): Promise<unknown>;
253
253
  /**
254
- * Makes a request to the SAS Service specified in `SASjob`. The response
254
+ * Makes a request to program specified in `SASjob` (could be a Viya Job, a
255
+ * SAS 9 Stored Process, or a SASjs Server Stored Program). The response
255
256
  * object will always contain table names in lowercase, and column names in
256
257
  * uppercase. Values are returned formatted by default, unformatted
257
258
  * values can be configured as an option in the `%webout` macro.
@@ -260,7 +261,8 @@ export default class SASjs {
260
261
  * the SAS `_program` parameter to run a Job Definition or SAS 9 Stored
261
262
  * Process). Is prepended at runtime with the value of `appLoc`.
262
263
  * @param data - a JSON object containing one or more tables to be sent to
263
- * SAS. Can be `null` if no inputs required.
264
+ * SAS. For an example of the table structure, see the project README. This
265
+ * value can be `null` if no inputs are required.
264
266
  * @param config - provide any changes to the config here, for instance to
265
267
  * enable/disable `debug`. Any change provided will override the global config,
266
268
  * for that particular function call.
@@ -1 +1,11 @@
1
- export declare const generateFileUploadForm: (formData: FormData, data: any) => FormData;
1
+ import * as NodeFormData from 'form-data';
2
+ /**
3
+ * One of the approaches SASjs takes to send tables-formatted JSON (see README)
4
+ * to SAS is as multipart form data, where each table is provided as a specially
5
+ * formatted CSV file.
6
+ * @param formData Different objects are used depending on whether the adapter is
7
+ * running in the browser, or in the CLI
8
+ * @param data Special, tables-formatted JSON (see README)
9
+ * @returns Populated formData
10
+ */
11
+ export declare const generateFileUploadForm: (formData: FormData | NodeFormData, data: any) => FormData | NodeFormData;
@@ -1,4 +1,5 @@
1
- export declare const generateTableUploadForm: (formData: FormData, data: any) => {
2
- formData: FormData;
1
+ import * as NodeFormData from 'form-data';
2
+ export declare const generateTableUploadForm: (formData: FormData | NodeFormData, data: any) => {
3
+ formData: NodeFormData | FormData;
3
4
  requestParams: any;
4
5
  };