1
0
mirror of https://github.com/sasjs/adapter.git synced 2025-12-11 01:14:36 +00:00

feat: added public method executeJob

This commit is contained in:
Yury Shkoda
2023-08-14 17:01:15 +03:00
parent 681abf5b3b
commit 7a4feddd82

View File

@@ -8,7 +8,8 @@ import {
VerboseMode,
ErrorResponse,
LoginOptions,
LoginResult
LoginResult,
ExecutionQuery
} from './types'
import { SASViyaApiClient } from './SASViyaApiClient'
import { SAS9ApiClient } from './SAS9ApiClient'
@@ -160,6 +161,23 @@ export default class SASjs {
}
}
/**
* Executes job on SASJS server.
* @param query - an object containing job path and debug level.
* @param appLoc - an application path.
* @param authConfig - an object for authentication.
* @returns a promise that resolves into job execution result and log.
*/
public async executeJob(
query: ExecutionQuery,
appLoc: string,
authConfig?: AuthConfig
) {
this.isMethodSupported('executeScript', [ServerType.Sasjs])
return await this.sasJSApiClient?.executeJob(query, appLoc, authConfig)
}
/**
* Gets compute contexts.
* @param accessToken - an access token for an authorised user.