mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-16 08:30:07 +00:00
feat: added public method executeJob
This commit is contained in:
20
src/SASjs.ts
20
src/SASjs.ts
@@ -8,7 +8,8 @@ import {
|
|||||||
VerboseMode,
|
VerboseMode,
|
||||||
ErrorResponse,
|
ErrorResponse,
|
||||||
LoginOptions,
|
LoginOptions,
|
||||||
LoginResult
|
LoginResult,
|
||||||
|
ExecutionQuery
|
||||||
} from './types'
|
} from './types'
|
||||||
import { SASViyaApiClient } from './SASViyaApiClient'
|
import { SASViyaApiClient } from './SASViyaApiClient'
|
||||||
import { SAS9ApiClient } from './SAS9ApiClient'
|
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.
|
* Gets compute contexts.
|
||||||
* @param accessToken - an access token for an authorised user.
|
* @param accessToken - an access token for an authorised user.
|
||||||
|
|||||||
Reference in New Issue
Block a user