@types/chrome 0.0.257 → 0.0.258
Sign up to get free protection for your applications and to get access to all the features.
- chrome/README.md +1 -1
- chrome/index.d.ts +80 -0
- chrome/package.json +2 -2
chrome/README.md
CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for chrome (http://developer.chrome.com/e
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome.
|
9
9
|
|
10
10
|
### Additional Details
|
11
|
-
* Last updated:
|
11
|
+
* Last updated: Wed, 17 Jan 2024 07:06:54 GMT
|
12
12
|
* Dependencies: [@types/filesystem](https://npmjs.com/package/@types/filesystem), [@types/har-format](https://npmjs.com/package/@types/har-format)
|
13
13
|
|
14
14
|
# Credits
|
chrome/index.d.ts
CHANGED
@@ -5394,6 +5394,86 @@ declare namespace chrome.input.ime {
|
|
5394
5394
|
export var onReset: InputResetEvent;
|
5395
5395
|
}
|
5396
5396
|
|
5397
|
+
/**
|
5398
|
+
* Use chrome.instanceID to access the Instance ID service.
|
5399
|
+
* Permissions: "gcm"
|
5400
|
+
* @since Chrome 44.
|
5401
|
+
*/
|
5402
|
+
declare namespace chrome.instanceID {
|
5403
|
+
export interface TokenRefreshEvent extends chrome.events.Event<() => void> {}
|
5404
|
+
|
5405
|
+
/**
|
5406
|
+
* Resets the app instance identifier and revokes all tokens associated with it.
|
5407
|
+
*
|
5408
|
+
* The `deleteID()` method doesn't return any value, but can be used with a callback or asynchronously,
|
5409
|
+
* with a Promise (MV3 only).
|
5410
|
+
*/
|
5411
|
+
export function deleteID(): Promise<void>;
|
5412
|
+
export function deleteID(callback: () => void): void;
|
5413
|
+
|
5414
|
+
interface DeleteTokenParams {
|
5415
|
+
/**
|
5416
|
+
* Identifies the entity that is authorized to access resources associated with this Instance ID.
|
5417
|
+
* It can be a project ID from Google developer console.
|
5418
|
+
*/
|
5419
|
+
authorizedEntity: string;
|
5420
|
+
/**
|
5421
|
+
* Identifies authorized actions that the authorized entity can take.
|
5422
|
+
* In other words, the scope that is used to obtain the token.
|
5423
|
+
* E.g. for sending GCM messages, `GCM` scope should be used.
|
5424
|
+
*/
|
5425
|
+
scope: string;
|
5426
|
+
}
|
5427
|
+
/**
|
5428
|
+
* Revoked a granted token.
|
5429
|
+
*
|
5430
|
+
* The `deleteToken()` method doesn't return any value, but can be used with a callback or
|
5431
|
+
* asynchronously, with a Promise (MV3 only).
|
5432
|
+
*/
|
5433
|
+
export function deleteToken(deleteTokenParams: DeleteTokenParams): Promise<void>;
|
5434
|
+
export function deleteToken(
|
5435
|
+
deleteTokenParams: DeleteTokenParams,
|
5436
|
+
callback: () => void,
|
5437
|
+
): void;
|
5438
|
+
|
5439
|
+
/**
|
5440
|
+
* Retrieves the time when the InstanceID has been generated.
|
5441
|
+
*
|
5442
|
+
* @return The time when the Instance ID has been generated, represented in milliseconds since the epoch.
|
5443
|
+
* It can return via a callback or asynchronously, with a Promise (MV3 only).
|
5444
|
+
*/
|
5445
|
+
export function getCreationTime(): Promise<number>;
|
5446
|
+
export function getCreationTime(callback: (creationTime: number) => void): void;
|
5447
|
+
|
5448
|
+
/**
|
5449
|
+
* Retrieves an identifier for the app instance.
|
5450
|
+
* The same ID will be returned as long as the application identity has not been revoked or expired.
|
5451
|
+
*
|
5452
|
+
* @return An Instance ID assigned to the app instance. Can be returned by a callback or a Promise (MV3 only).
|
5453
|
+
*/
|
5454
|
+
export function getID(): Promise<string>;
|
5455
|
+
export function getID(callback: (instanceID: string) => void): void;
|
5456
|
+
|
5457
|
+
interface GetTokenParams extends DeleteTokenParams {
|
5458
|
+
/**
|
5459
|
+
* Allows including a small number of string key/value pairs that will be associated with the token
|
5460
|
+
* and may be used in processing the request.
|
5461
|
+
*
|
5462
|
+
* @deprecated Since Chrome 89. `options` are deprecated and will be ignored.
|
5463
|
+
*/
|
5464
|
+
options?: { [key: string]: string };
|
5465
|
+
}
|
5466
|
+
/**
|
5467
|
+
* Return a token that allows the authorized entity to access the service defined by scope.
|
5468
|
+
*
|
5469
|
+
* @return A token assigned by the requested service. Can be returned by a callback or a Promise (MV3 only).
|
5470
|
+
*/
|
5471
|
+
export function getToken(getTokenParams: GetTokenParams): Promise<string>;
|
5472
|
+
export function getToken(getTokenParams: GetTokenParams, callback: (token: string) => void): void;
|
5473
|
+
|
5474
|
+
export var onTokenRefresh: TokenRefreshEvent;
|
5475
|
+
}
|
5476
|
+
|
5397
5477
|
////////////////////
|
5398
5478
|
// LoginState
|
5399
5479
|
////////////////////
|
chrome/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/chrome",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.258",
|
4
4
|
"description": "TypeScript definitions for chrome",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome",
|
6
6
|
"license": "MIT",
|
@@ -93,6 +93,6 @@
|
|
93
93
|
"@types/filesystem": "*",
|
94
94
|
"@types/har-format": "*"
|
95
95
|
},
|
96
|
-
"typesPublisherContentHash": "
|
96
|
+
"typesPublisherContentHash": "581693ead7a4b515a196100a0b909475c8e789d7eccb65e95f3bc6e2faedafc1",
|
97
97
|
"typeScriptVersion": "4.6"
|
98
98
|
}
|