-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
40 lines (32 loc) · 1.12 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
// Type definitions for digits-web-sdk 1.x
// Project: https://docs.fabric.io/web/digits/installation.html; https://cdn.digits.com/1/sdk.js
// Definitions by: Antoine Beauvais-Lacasse <https://github.com/beaulac>
interface DigitsInitOptions {
consumerKey: string;
}
interface DigitsEmbedOptions {
container: string;
}
interface DigitsStatusResponse {
readonly status: string;
readonly oauth_echo_headers?: DigitsStatusOAuthEchoHeaders;
}
interface DigitsStatusOAuthEchoHeaders {
readonly oauth_echo_header?: string;
readonly oauth_echo_service?: string;
}
interface DigitsLoginResponse {
readonly oauth_echo_headers: DigitsLoginOAuthEchoHeaders;
}
interface DigitsLoginOAuthEchoHeaders {
readonly 'X-Auth-Service-Provider': string;
readonly 'X-Verify-Credentials-Authorization': string;
}
interface DigitsStatic {
init(options: DigitsInitOptions): void;
isInitialized(): boolean;
getLoginStatus(): ZeptoPromise<DigitsStatusResponse>;
logIn(): ZeptoPromise<DigitsLoginResponse>;
embed(options: DigitsEmbedOptions): ZeptoPromise<DigitsLoginResponse>;
}
declare let Digits: DigitsStatic;