1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-06 04:00:05 +00:00

feat: add method for executing scripts on sasjs server

This commit is contained in:
2022-04-13 18:22:26 +05:00
parent 77487bfa35
commit 73ee214b61
2 changed files with 33 additions and 0 deletions

View File

@@ -97,6 +97,17 @@ export default class SASjs {
)
}
/**
* Executes code against a SAS JS server
* @param code - a string of code from the file to run.
* @param authConfig - (optional) a valid client, secret, refresh and access tokens that are authorised to execute scripts.
*/
public async executeScriptSASjs(code: string, authConfig?: AuthConfig) {
this.isMethodSupported('executeScriptSASJS', [ServerType.Sasjs])
return await this.sasJSApiClient?.executeScript(code, authConfig)
}
/**
* Executes sas code in a SAS Viya compute session.
* @param fileName - name of the file to run. It will be converted to path to the file being submitted for execution.