-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtypes.d.ts
51 lines (51 loc) · 1.08 KB
/
types.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
50
51
export type SyncOptions = {
credsFile?: string;
clientId?: string;
scope?: string;
authServerUrl?: string;
authorizationUrl?: string;
tokenEndpoint?: string;
tokenServerUrl?: string;
oauthOptions?: import('./auth/oauth-base').OAuthOptions;
};
export type OAuthToken = {
access_token: string;
token_type: string;
scope: string;
expires_in: number;
auth_at: number;
refresh_token: string;
};
export type SyncToken = {
id: string;
key: string;
uid: number;
api_endpoint: string;
duration: number;
hashalg: string;
hashed_fxa_uid: string;
node_type: string;
};
export type KeyBundle = {
encryptionKey: string;
hmacKey: string;
};
export type ParsedKeyBundle = {
encryptionKey: Buffer;
hmacKey: Buffer;
};
export type SyncKeyBundle = {
encryptionKey: string;
hmacKey: string;
kid: string;
};
export type SyncCredentials = {
oauthToken: OAuthToken;
syncKeyBundle: SyncKeyBundle;
token: SyncToken;
tokenIssuedAt: number;
};
export type BSO = {
id: string;
payload: string;
};