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

feat(context-edit): restricted editing system compute contexts

This commit is contained in:
Yury Shkoda
2020-12-29 11:11:26 +03:00
parent dfb9c28f3a
commit 9d0c3410a5
3 changed files with 41 additions and 10 deletions

View File

@@ -116,6 +116,15 @@ export default class SASjs {
return await this.sasViyaApiClient!.getLauncherContexts(accessToken)
}
/**
* Gets default(system) launcher contexts.
*/
public getDefaultComputeContexts() {
this.isMethodSupported('getDefaultComputeContexts', ServerType.SASViya)
return this.sasViyaApiClient!.getDefaultComputeContexts()
}
/**
* Gets executable compute contexts.
* @param accessToken - an access token for an authorized user.
@@ -184,14 +193,14 @@ export default class SASjs {
* @param editedContext - an object with the properties to be updated.
* @param accessToken - an access token for an authorized user.
*/
public async editContext(
public async editComputeContext(
contextName: string,
editedContext: EditContextInput,
accessToken?: string
) {
this.isMethodSupported('editContext', ServerType.SASViya)
this.isMethodSupported('editComputeContext', ServerType.SASViya)
return await this.sasViyaApiClient!.editContext(
return await this.sasViyaApiClient!.editComputeContext(
contextName,
editedContext,
accessToken