@types/chrome 0.0.257 → 0.0.259
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- chrome/README.md +1 -1
- chrome/index.d.ts +96 -3
- 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: Thu, 25 Jan 2024 16:39:09 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
|
////////////////////
|
@@ -7798,16 +7878,29 @@ declare namespace chrome.scripting {
|
|
7798
7878
|
/* The JavaScript world for a script to execute within. */
|
7799
7879
|
export type ExecutionWorld = "ISOLATED" | "MAIN";
|
7800
7880
|
|
7801
|
-
export interface InjectionResult<T> {
|
7802
|
-
|
7881
|
+
export interface InjectionResult<T extends any = any> {
|
7882
|
+
/**
|
7883
|
+
* The document associated with the injection.
|
7884
|
+
* @since Chrome 106.
|
7885
|
+
*/
|
7886
|
+
documentId: string;
|
7887
|
+
/**
|
7888
|
+
* The frame associated with the injection.
|
7889
|
+
* @since Chrome 90.
|
7890
|
+
*/
|
7803
7891
|
frameId: number;
|
7804
7892
|
/* The result of the script execution. */
|
7805
|
-
result
|
7893
|
+
result?: T | undefined;
|
7806
7894
|
}
|
7807
7895
|
|
7808
7896
|
export interface InjectionTarget {
|
7809
7897
|
/* Whether the script should inject into all frames within the tab. Defaults to false. This must not be true if frameIds is specified. */
|
7810
7898
|
allFrames?: boolean | undefined;
|
7899
|
+
/**
|
7900
|
+
* The IDs of specific documentIds to inject into. This must not be set if frameIds is set.
|
7901
|
+
* @since Chrome 106.
|
7902
|
+
*/
|
7903
|
+
documentIds?: string[] | undefined;
|
7811
7904
|
/* The IDs of specific frames to inject into. */
|
7812
7905
|
frameIds?: number[] | undefined;
|
7813
7906
|
/* The ID of the tab into which to inject. */
|
chrome/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/chrome",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.259",
|
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": "abb8f366929ce60903f4d0a14e5676af6111f1d473ce3e63fe8e52d4a8ea5bc8",
|
97
97
|
"typeScriptVersion": "4.6"
|
98
98
|
}
|