-
Notifications
You must be signed in to change notification settings - Fork 0
/
configuration.mustache
65 lines (61 loc) · 1.69 KB
/
configuration.mustache
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// tslint:disable
{{>licenseInfo}}
import { Observable } from 'rxjs';
import { AjaxRequest, AjaxResponse } from 'rxjs/ajax';
export interface ConfigurationParameters {
ajax?: (request: AjaxRequest) => Observable<AjaxResponse>;
apiKey?: string | ((name: string) => string);
username?: string;
password?: string;
accessToken?: string | ((name: string, scopes?: string[]) => (string | undefined));
basePath?: string;
}
export class Configuration {
/**
* parameter for apiKey security
* @param name security name
* @memberof Configuration
*/
apiKey?: string | ((name: string) => string);
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
username?: string;
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
password?: string;
/**
* parameter for oauth2 security
* @param name security name
* @param scopes oauth2 scope
* @memberof Configuration
*/
accessToken?: string | ((name: string, scopes?: string[]) => (string | undefined));
/**
* override base path
*
* @type {string}
* @memberof Configuration
*/
basePath?: string;
/**
* override ajax request generator
* @memberof Configuration
*/
ajax?: (request: AjaxRequest) => Observable<AjaxResponse>;
constructor(param: ConfigurationParameters = {}) {
this.apiKey = param.apiKey;
this.username = param.username;
this.password = param.password;
this.accessToken = param.accessToken;
this.basePath = param.basePath;
this.ajax = param.ajax;
}
}