UNPKG

2.11 kBTypeScriptView Raw
1export interface Credentials {
2 /**
3 * This field is only present if the access_type parameter was set to offline in the authentication request. For details, see Refresh tokens.
4 */
5 refresh_token?: string | null;
6 /**
7 * The time in ms at which this token is thought to expire.
8 */
9 expiry_date?: number | null;
10 /**
11 * A token that can be sent to a Google API.
12 */
13 access_token?: string | null;
14 /**
15 * Identifies the type of token returned. At this time, this field always has the value Bearer.
16 */
17 token_type?: string | null;
18 /**
19 * A JWT that contains identity information about the user that is digitally signed by Google.
20 */
21 id_token?: string | null;
22 /**
23 * The scopes of access granted by the access_token expressed as a list of space-delimited, case-sensitive strings.
24 */
25 scope?: string;
26}
27export interface CredentialRequest {
28 /**
29 * This field is only present if the access_type parameter was set to offline in the authentication request. For details, see Refresh tokens.
30 */
31 refresh_token?: string;
32 /**
33 * A token that can be sent to a Google API.
34 */
35 access_token?: string;
36 /**
37 * Identifies the type of token returned. At this time, this field always has the value Bearer.
38 */
39 token_type?: string;
40 /**
41 * The remaining lifetime of the access token in seconds.
42 */
43 expires_in?: number;
44 /**
45 * A JWT that contains identity information about the user that is digitally signed by Google.
46 */
47 id_token?: string;
48 /**
49 * The scopes of access granted by the access_token expressed as a list of space-delimited, case-sensitive strings.
50 */
51 scope?: string;
52}
53export interface JWTInput {
54 type?: string;
55 client_email?: string;
56 private_key?: string;
57 private_key_id?: string;
58 project_id?: string;
59 client_id?: string;
60 client_secret?: string;
61 refresh_token?: string;
62 quota_project_id?: string;
63}
64export interface CredentialBody {
65 client_email?: string;
66 private_key?: string;
67}