Skip to content

Commit 1ffebb7

Browse files
committed
Fix typos and add prettier
1 parent 41db15e commit 1ffebb7

File tree

2 files changed

+47
-38
lines changed

2 files changed

+47
-38
lines changed

index.d.ts

Lines changed: 43 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,44 @@
1+
export interface BaseAuthConfiguration {
2+
issuer: string;
3+
clientId: string;
4+
}
15
export interface AuthConfiguration extends BaseAuthConfiguration {
2-
scopes: string[];
3-
redirectUrl: string;
4-
aditionalParameters?: {[name: string]: string};
5-
}
6-
7-
export interface BaseAuthConfiguration{
8-
issuer: string;
9-
clientId: string;
10-
}
11-
12-
export interface RevokeConfiguration{
13-
clientId: string;
14-
issuer: string;
15-
}
16-
17-
export interface AuthorizeResult {
18-
accessToken: string;
19-
accessTokenExpirationDate: string;
20-
aditionalParameters?: {[name: string]: string};
21-
idToken: string;
22-
refreshToken: string;
23-
tokenType: string;
24-
}
25-
26-
export interface RevokeConfiguration {
27-
tokenToRevoke: string;
28-
sendClientId?: boolean;
29-
}
30-
31-
export interface RefreshConfiguration {
32-
refreshToken: string;
33-
}
34-
35-
export function authorize(config: AuthConfiguration): Promise<AuthorizeResult>;
36-
37-
export function refresh(config: AuthConfiguration, refreshConfig: RefreshConfiguration): Promise<AuthorizeResult>;
38-
39-
export function revoke(config: BaseAuthConfiguration, revokeConfig: RevokeConfiguration): Promise<void>;
6+
scopes: string[];
7+
redirectUrl: string;
8+
additionalParameters?: { [name: string]: string };
9+
}
10+
11+
export interface RevokeConfiguration {
12+
clientId: string;
13+
issuer: string;
14+
}
15+
16+
export interface AuthorizeResult {
17+
accessToken: string;
18+
accessTokenExpirationDate: string;
19+
additionalParameters?: { [name: string]: string };
20+
idToken: string;
21+
refreshToken: string;
22+
tokenType: string;
23+
}
24+
25+
export interface RevokeConfiguration {
26+
tokenToRevoke: string;
27+
sendClientId?: boolean;
28+
}
29+
30+
export interface RefreshConfiguration {
31+
refreshToken: string;
32+
}
33+
34+
export function authorize(config: AuthConfiguration): Promise<AuthorizeResult>;
35+
36+
export function refresh(
37+
config: AuthConfiguration,
38+
refreshConfig: RefreshConfiguration
39+
): Promise<AuthorizeResult>;
40+
41+
export function revoke(
42+
config: BaseAuthConfiguration,
43+
revokeConfig: RevokeConfiguration
44+
): Promise<void>;

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
"*.js": [
1414
"eslint --fix",
1515
"git add"
16+
],
17+
"*.ts": [
18+
"prettier --write",
19+
"git add"
1620
]
1721
},
1822
"files": [

0 commit comments

Comments
 (0)