mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-31 11:07:32 +08:00
Merge pull request #19466 from jhcao23/master
Update GoogleAuth.grantOfflineAccess
This commit is contained in:
17
types/gapi.auth2/index.d.ts
vendored
17
types/gapi.auth2/index.d.ts
vendored
@@ -42,11 +42,7 @@ declare namespace gapi.auth2 {
|
||||
/**
|
||||
* Get permission from the user to access the specified scopes offline.
|
||||
*/
|
||||
grantOfflineAccess(options?: {
|
||||
scope?: string;
|
||||
prompt?: "select_account" | "consent";
|
||||
app_package_name?: string;
|
||||
}): any;
|
||||
grantOfflineAccess(options?: OfflineAccessOptions): Promise<{code: string}>;
|
||||
|
||||
/**
|
||||
* Attaches the sign-in flow to the specified container's click handler.
|
||||
@@ -107,6 +103,17 @@ declare namespace gapi.auth2 {
|
||||
scope?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Definitions by: John <https://github.com/jhcao23>
|
||||
* Interface that represents the different configuration parameters for the GoogleAuth.grantOfflineAccess(options) method.
|
||||
* Reference: https://developers.google.com/api-client-library/javascript/reference/referencedocs#gapiauth2offlineaccessoptions
|
||||
*/
|
||||
interface OfflineAccessOptions {
|
||||
scope?: string;
|
||||
prompt?: "select_account" | "consent";
|
||||
app_package_name?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Interface that represents the different configuration parameters for the gapi.auth2.init method.
|
||||
* Reference: https://developers.google.com/api-client-library/javascript/reference/referencedocs#gapiauth2clientconfig
|
||||
|
||||
Reference in New Issue
Block a user