-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtypes.js
55 lines (54 loc) · 1.79 KB
/
types.js
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
/**
* @typedef {Object} SyncOptions
* @property {string} [credsFile]
* @property {string} [clientId]
* @property {string} [scope]
* @property {string} [authServerUrl]
* @property {string} [authorizationUrl]
* @property {string} [tokenEndpoint]
* @property {string} [tokenServerUrl]
* @property {import('./auth/oauth-base').OAuthOptions} [oauthOptions]
*
* @typedef {Object} OAuthToken
* @property {string} access_token
* @property {string} token_type
* @property {string} scope
* @property {number} expires_in
* @property {number} auth_at
* @property {string} refresh_token
*
* @typedef {Object} SyncToken
* @property {string} id
* @property {string} key
* @property {number} uid
* @property {string} api_endpoint
* @property {number} duration
* @property {string} hashalg
* @property {string} hashed_fxa_uid
* @property {string} node_type
*
* @typedef {Object} KeyBundle
* @property {string} encryptionKey
* @property {string} hmacKey
*
* @typedef {Object} ParsedKeyBundle
* @property {Buffer} encryptionKey
* @property {Buffer} hmacKey
*
* @typedef {Object} SyncKeyBundle
* @property {string} encryptionKey
* @property {string} hmacKey
* @property {string} kid
*
* @typedef {Object} SyncCredentials
* @property {OAuthToken} oauthToken - The OAuth token required to authenticate to the TokenServer.
* @property {SyncKeyBundle} syncKeyBundle - The Sync key bundle required to decrypt the collection keys.
* @property {SyncToken} token - The token object required to call the Firefox Sync API.
* @property {number} tokenIssuedAt - Timestamp in milliseconds of when the token was issued to preemptively refresh it.
*
* @typedef {Object} BSO
* @property {string} id
* @property {string} payload
*/
// Does nothing but required for TypeScript to import this file.
module.exports = {}