forked from mhlabs/aws-sdk-sso
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.d.ts
49 lines (43 loc) · 1.36 KB
/
index.d.ts
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
import * as AWS from "aws-sdk";
import { IniLoader, ParsedIniData } from "@aws-sdk/shared-ini-file-loader";
import { Credentials } from "aws-sdk/lib/credentials";
type provider = () => Credentials;
export module "aws-sdk" {
export * as util from "aws-sdk/lib/util";
export const util: {
iniLoader: typeof IniLoader;
inherit<C, F, R extends typeof C & typeof F>(
klass: typeof C,
features: typeof F
): InstanceType<R>;
defaultProfile: string;
getProfilesFromSharedConfig(iniLoader, filePath): ParsedIniData;
error<E, O>(err: E, options?: O): E;
fn: {
noop: () => {};
callback: (err) => {};
makeAsync: (fn, expectedArgs) => (...args: any[]) => any;
};
update<T1, T2>(obj1: T1, obj2: T2): T1 & T2;
};
export class Credentials extends AWS.Credentials {
protected coalesceRefresh(callback: (err) => void, sync?: boolean): void;
}
export interface SsoProfile {
profile?: string;
sso_region: string;
sso_start_url: string;
sso_role_name: string;
sso_account_id: string;
}
export interface SsoCredentialsOptions {
profile?: string;
filename?: string;
}
export class SingleSignOnCredentials extends Credentials {
constructor(options?: SsoCredentialsOptions);
expired: boolean;
load(callback: (err) => void): void;
refresh(callback: (err) => void): void;
}
}