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

Merge branch 'master' into service-pack-with-file-resource

This commit is contained in:
Allan Bowe
2021-06-13 11:56:54 +03:00
committed by GitHub
6 changed files with 69 additions and 13 deletions

View File

@@ -14,6 +14,7 @@ import {
Sas9JobExecutor
} from './job-execution'
import { ErrorResponse } from './types/errors'
import { ExtraResponseAttributes } from '@sasjs/utils/types'
const defaultConfig: SASjsConfig = {
serverUrl: '',
@@ -575,13 +576,17 @@ export default class SASjs {
* `await request(sasJobPath, data, config, () => setIsLoggedIn(false))`
* If you are not passing in any data and configuration, it will look like so:
* `await request(sasJobPath, {}, {}, () => setIsLoggedIn(false))`
* @param extraResponseAttributes - a array of predefined values that are used
* to provide extra attributes (same names as those values) to be added in response
* Supported values are declared in ExtraResponseAttributes type.
*/
public async request(
sasJob: string,
data: { [key: string]: any },
config: { [key: string]: any } = {},
loginRequiredCallback?: () => any,
accessToken?: string
accessToken?: string,
extraResponseAttributes: ExtraResponseAttributes[] = []
) {
config = {
...this.sasjsConfig,
@@ -603,7 +608,8 @@ export default class SASjs {
data,
config,
loginRequiredCallback,
accessToken
accessToken,
extraResponseAttributes
)
}
} else if (