@types/chrome 0.0.212 → 0.0.214
Sign up to get free protection for your applications and to get access to all the features.
- chrome/README.md +2 -2
- chrome/index.d.ts +24 -2
- chrome/package.json +7 -2
chrome/README.md
CHANGED
@@ -8,9 +8,9 @@ This package contains type definitions for Chrome extension development (http://
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome.
|
9
9
|
|
10
10
|
### Additional Details
|
11
|
-
* Last updated: Sat,
|
11
|
+
* Last updated: Sat, 18 Feb 2023 01:02:37 GMT
|
12
12
|
* Dependencies: [@types/filesystem](https://npmjs.com/package/@types/filesystem), [@types/har-format](https://npmjs.com/package/@types/har-format)
|
13
13
|
* Global values: `chrome`
|
14
14
|
|
15
15
|
# Credits
|
16
|
-
These definitions were written by [Matthew Kimber](https://github.com/matthewkimber), [otiai10](https://github.com/otiai10), [sreimer15](https://github.com/sreimer15), [MatCarlson](https://github.com/MatCarlson), [ekinsol](https://github.com/ekinsol), [Brian Wilson](https://github.com/echoabstract), [Sebastiaan Pasma](https://github.com/spasma), [bdbai](https://github.com/bdbai), [pokutuna](https://github.com/pokutuna), [Jason Xian](https://github.com/JasonXian), [userTim](https://github.com/usertim), [Idan Zeierman](https://github.com/idan315), [Nicolas Rodriguez](https://github.com/nicolas377),
|
16
|
+
These definitions were written by [Matthew Kimber](https://github.com/matthewkimber), [otiai10](https://github.com/otiai10), [sreimer15](https://github.com/sreimer15), [MatCarlson](https://github.com/MatCarlson), [ekinsol](https://github.com/ekinsol), [Brian Wilson](https://github.com/echoabstract), [Sebastiaan Pasma](https://github.com/spasma), [bdbai](https://github.com/bdbai), [pokutuna](https://github.com/pokutuna), [Jason Xian](https://github.com/JasonXian), [userTim](https://github.com/usertim), [Idan Zeierman](https://github.com/idan315), [Nicolas Rodriguez](https://github.com/nicolas377), [Ido Salomon](https://github.com/idosal), and [Federico Brigante](https://github.com/fregante).
|
chrome/index.d.ts
CHANGED
@@ -14,6 +14,7 @@
|
|
14
14
|
// Idan Zeierman <https://github.com/idan315>
|
15
15
|
// Nicolas Rodriguez <https://github.com/nicolas377>
|
16
16
|
// Ido Salomon <https://github.com/idosal>
|
17
|
+
// Federico Brigante <https://github.com/fregante>
|
17
18
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
18
19
|
// TypeScript Version: 2.4
|
19
20
|
|
@@ -4784,17 +4785,32 @@ declare namespace chrome.identity {
|
|
4784
4785
|
|
4785
4786
|
export interface SignInChangeEvent extends chrome.events.Event<(account: AccountInfo, signedIn: boolean) => void> { }
|
4786
4787
|
|
4788
|
+
export interface GetAuthTokenResult {
|
4789
|
+
/**
|
4790
|
+
* Optional.
|
4791
|
+
* A list of OAuth2 scopes granted to the extension.
|
4792
|
+
*/
|
4793
|
+
grantedScopes?: string[]
|
4794
|
+
/**
|
4795
|
+
* Optional.
|
4796
|
+
* The specific token associated with the request.
|
4797
|
+
*/
|
4798
|
+
token?: string
|
4799
|
+
}
|
4800
|
+
|
4787
4801
|
/**
|
4788
4802
|
* Resets the state of the Identity API:
|
4789
4803
|
*
|
4790
4804
|
* * Removes all OAuth2 access tokens from the token cache
|
4791
4805
|
* * Removes user's account preferences
|
4792
4806
|
* * De-authorizes the user from all auth flows
|
4807
|
+
* If `callback` is not provided, the function returns a Promise when the state has been cleared.
|
4793
4808
|
* @since Chrome 87.
|
4794
4809
|
* @param callback Called when the state has been cleared.
|
4795
4810
|
* The parameter should be a function that looks like this:
|
4796
4811
|
* () => {...};
|
4797
4812
|
*/
|
4813
|
+
export function clearAllCachedAuthTokens(): Promise<void>;
|
4798
4814
|
export function clearAllCachedAuthTokens(callback: () => void): void;
|
4799
4815
|
|
4800
4816
|
/**
|
@@ -4802,18 +4818,21 @@ declare namespace chrome.identity {
|
|
4802
4818
|
* getAccounts is only supported on dev channel.
|
4803
4819
|
* Dev channel only.
|
4804
4820
|
*/
|
4821
|
+
export function getAccounts(): Promise<AccountInfo[]>;
|
4805
4822
|
export function getAccounts(callback: (accounts: AccountInfo[]) => void): void;
|
4806
4823
|
|
4807
4824
|
/**
|
4808
4825
|
* Gets an OAuth2 access token using the client ID and scopes specified in the oauth2 section of manifest.json.
|
4809
4826
|
* The Identity API caches access tokens in memory, so it's ok to call getAuthToken non-interactively any time a token is required. The token cache automatically handles expiration.
|
4810
4827
|
* For a good user experience it is important interactive token requests are initiated by UI in your app explaining what the authorization is for. Failing to do this will cause your users to get authorization requests, or Chrome sign in screens if they are not signed in, with with no context. In particular, do not use getAuthToken interactively when your app is first launched.
|
4828
|
+
* If `callback` is not provided, the function returns a Promise that resolves with the token.
|
4811
4829
|
* @param details Token options.
|
4812
4830
|
* @param callback Called with an OAuth2 access token as specified by the manifest, or undefined if there was an error.
|
4813
4831
|
* If you specify the callback parameter, it should be a function that looks like this:
|
4814
4832
|
* function(string token) {...};
|
4815
4833
|
*/
|
4816
|
-
export function getAuthToken(details: TokenDetails
|
4834
|
+
export function getAuthToken(details: TokenDetails): Promise<GetAuthTokenResult>;
|
4835
|
+
export function getAuthToken(details: TokenDetails, callback: (token?: string, grantedScopes?: string[]) => void): void;
|
4817
4836
|
|
4818
4837
|
/**
|
4819
4838
|
* Retrieves email address and obfuscated gaia id of the user signed into a profile.
|
@@ -4831,12 +4850,14 @@ declare namespace chrome.identity {
|
|
4831
4850
|
/**
|
4832
4851
|
* Removes an OAuth2 access token from the Identity API's token cache.
|
4833
4852
|
* If an access token is discovered to be invalid, it should be passed to removeCachedAuthToken to remove it from the cache. The app may then retrieve a fresh token with getAuthToken.
|
4853
|
+
* If `callback` is not provided, the function returns a Promise when the state has been removed from the cache.
|
4834
4854
|
* @param details Token information.
|
4835
4855
|
* @param callback Called when the token has been removed from the cache.
|
4836
4856
|
* If you specify the callback parameter, it should be a function that looks like this:
|
4837
4857
|
* function() {...};
|
4838
4858
|
*/
|
4839
|
-
export function removeCachedAuthToken(details: TokenInformation
|
4859
|
+
export function removeCachedAuthToken(details: TokenInformation): Promise<void>;
|
4860
|
+
export function removeCachedAuthToken(details: TokenInformation, callback: () => void): void;
|
4840
4861
|
|
4841
4862
|
/**
|
4842
4863
|
* Starts an auth flow at the specified URL.
|
@@ -7200,6 +7221,7 @@ declare namespace chrome.runtime {
|
|
7200
7221
|
| 'enterprise.networkingAttributes'
|
7201
7222
|
| 'enterprise.platformKeys'
|
7202
7223
|
| 'experimental'
|
7224
|
+
| 'favicon'
|
7203
7225
|
| 'fileBrowserHandler'
|
7204
7226
|
| 'fileSystemProvider'
|
7205
7227
|
| 'fontSettings'
|
chrome/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/chrome",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.214",
|
4
4
|
"description": "TypeScript definitions for Chrome extension development",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome",
|
6
6
|
"license": "MIT",
|
@@ -74,6 +74,11 @@
|
|
74
74
|
"name": "Ido Salomon",
|
75
75
|
"url": "https://github.com/idosal",
|
76
76
|
"githubUsername": "idosal"
|
77
|
+
},
|
78
|
+
{
|
79
|
+
"name": "Federico Brigante",
|
80
|
+
"url": "https://github.com/fregante",
|
81
|
+
"githubUsername": "fregante"
|
77
82
|
}
|
78
83
|
],
|
79
84
|
"main": "",
|
@@ -88,6 +93,6 @@
|
|
88
93
|
"@types/filesystem": "*",
|
89
94
|
"@types/har-format": "*"
|
90
95
|
},
|
91
|
-
"typesPublisherContentHash": "
|
96
|
+
"typesPublisherContentHash": "7a84048d2293ad0662e244dd0717a09a9d05da169dee3b30b2acceaa09feb3f4",
|
92
97
|
"typeScriptVersion": "4.2"
|
93
98
|
}
|