@types/chrome 0.0.299 → 0.0.301
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 +149 -32
- 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: Mon, 03 Feb 2025 11:02:25 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
@@ -3601,94 +3601,101 @@ declare namespace chrome {
|
|
3601
3601
|
|
3602
3602
|
/**
|
3603
3603
|
* Returns the available Tokens. In a regular user's session the list will always contain the user's token with id "user". If a system-wide TPM token is available, the returned list will also contain the system-wide token with id "system". The system-wide token will be the same for all sessions on this device (device in the sense of e.g. a Chromebook).
|
3604
|
-
*
|
3605
|
-
*
|
3604
|
+
*
|
3605
|
+
* Can return its result via Promise since Chrome 131.
|
3606
3606
|
*/
|
3607
|
+
export function getTokens(): Promise<Token[]>;
|
3607
3608
|
export function getTokens(callback: (tokens: Token[]) => void): void;
|
3608
3609
|
|
3609
3610
|
/**
|
3610
3611
|
* Returns the list of all client certificates available from the given token. Can be used to check for the existence and expiration of client certificates that are usable for a certain authentication.
|
3611
3612
|
* @param tokenId The id of a Token returned by getTokens.
|
3612
|
-
*
|
3613
|
-
*
|
3613
|
+
*
|
3614
|
+
* Can return its result via Promise since Chrome 131.
|
3614
3615
|
*/
|
3616
|
+
export function getCertificates(tokenId: string): Promise<ArrayBuffer[]>;
|
3615
3617
|
export function getCertificates(tokenId: string, callback: (certificates: ArrayBuffer[]) => void): void;
|
3616
3618
|
|
3617
3619
|
/**
|
3618
|
-
* Imports certificate to the given token if the certified key is already stored in this token. After a successful certification request, this function should be used to store the obtained certificate and to make it available to the operating system and browser for authentication.
|
3620
|
+
* Imports `certificate` to the given token if the certified key is already stored in this token. After a successful certification request, this function should be used to store the obtained certificate and to make it available to the operating system and browser for authentication.
|
3619
3621
|
* @param tokenId The id of a Token returned by getTokens.
|
3620
3622
|
* @param certificate The DER encoding of a X.509 certificate.
|
3621
|
-
*
|
3623
|
+
*
|
3624
|
+
* Can return its result via Promise since Chrome 131.
|
3622
3625
|
*/
|
3623
|
-
export function importCertificate(tokenId: string, certificate: ArrayBuffer
|
3626
|
+
export function importCertificate(tokenId: string, certificate: ArrayBuffer): Promise<void>;
|
3627
|
+
export function importCertificate(tokenId: string, certificate: ArrayBuffer, callback: () => void): void;
|
3624
3628
|
|
3625
3629
|
/**
|
3626
|
-
* Removes certificate from the given token if present. Should be used to remove obsolete certificates so that they are not considered during authentication and do not clutter the certificate choice. Should be used to free storage in the certificate store.
|
3630
|
+
* Removes `certificate` from the given token if present. Should be used to remove obsolete certificates so that they are not considered during authentication and do not clutter the certificate choice. Should be used to free storage in the certificate store.
|
3627
3631
|
* @param tokenId The id of a Token returned by getTokens.
|
3628
3632
|
* @param certificate The DER encoding of a X.509 certificate.
|
3629
|
-
*
|
3633
|
+
*
|
3634
|
+
* Can return its result via Promise since Chrome 131.
|
3630
3635
|
*/
|
3631
|
-
export function removeCertificate(tokenId: string, certificate: ArrayBuffer
|
3636
|
+
export function removeCertificate(tokenId: string, certificate: ArrayBuffer): Promise<void>;
|
3637
|
+
export function removeCertificate(tokenId: string, certificate: ArrayBuffer, callback: () => void): void;
|
3632
3638
|
|
3633
3639
|
/**
|
3634
|
-
* Challenges a hardware-backed Enterprise Machine Key and emits the response as part of a remote attestation protocol. Only useful on
|
3640
|
+
* Similar to `challengeMachineKey` and `challengeUserKey`, but allows specifying the algorithm of a registered key. Challenges a hardware-backed Enterprise Machine Key and emits the response as part of a remote attestation protocol. Only useful on ChromeOS and in conjunction with the Verified Access Web API which both issues challenges and verifies responses.
|
3635
3641
|
*
|
3636
|
-
*
|
3637
|
-
* * The current device is managed by the domain specified during verification.
|
3638
|
-
* * The current signed-in user is managed by the domain specified during verification.
|
3639
|
-
* * The current device state complies with enterprise device policy. For example, a policy may specify that the device must not be in developer mode.
|
3640
|
-
* * Any device identity emitted by the verification is tightly bound to the hardware of the current device.
|
3642
|
+
* A successful verification by the Verified Access Web API is a strong signal that the current device is a legitimate ChromeOS device, the current device is managed by the domain specified during verification, the current signed-in user is managed by the domain specified during verification, and the current device state complies with enterprise device policy. For example, a policy may specify that the device must not be in developer mode. Any device identity emitted by the verification is tightly bound to the hardware of the current device. If `user` Scope is specified, the identity is also tightly bound to the current signed-in user.
|
3641
3643
|
*
|
3642
|
-
* This function is highly restricted and will fail if the current device is not managed, the current user is not managed, or if this operation has not explicitly been enabled for the caller by enterprise device policy. The
|
3643
|
-
*
|
3644
|
-
* @param
|
3644
|
+
* This function is highly restricted and will fail if the current device is not managed, the current user is not managed, or if this operation has not explicitly been enabled for the caller by enterprise device policy. The challenged key does not reside in the `system` or `user` token and is not accessible by any other API.
|
3645
|
+
*
|
3646
|
+
* @param options Object containing the fields defined in {@link ChallengeKeyOptions}.
|
3647
|
+
*
|
3648
|
+
* Can return its result via Promise since Chrome 131.
|
3645
3649
|
* @since Chrome 110
|
3646
3650
|
*/
|
3651
|
+
export function challengeKey(options: ChallengeKeyOptions): Promise<ArrayBuffer>;
|
3647
3652
|
export function challengeKey(options: ChallengeKeyOptions, callback: (response: ArrayBuffer) => void): void;
|
3648
3653
|
|
3649
3654
|
/**
|
3650
|
-
* @deprecated Deprecated since Chrome 110, use
|
3655
|
+
* @deprecated Deprecated since Chrome 110, use {@link challengeKey} instead.
|
3651
3656
|
*
|
3652
3657
|
* Challenges a hardware-backed Enterprise Machine Key and emits the response as part of a remote attestation protocol. Only useful on Chrome OS and in conjunction with the Verified Access Web API which both issues challenges and verifies responses. A successful verification by the Verified Access Web API is a strong signal of all of the following:
|
3653
3658
|
*
|
3654
|
-
* * The current device is a legitimate
|
3659
|
+
* * The current device is a legitimate ChromeOS device.
|
3655
3660
|
* * The current device is managed by the domain specified during verification.
|
3656
3661
|
* * The current signed-in user is managed by the domain specified during verification.
|
3657
3662
|
* * The current device state complies with enterprise device policy. For example, a policy may specify that the device must not be in developer mode.
|
3658
3663
|
* * Any device identity emitted by the verification is tightly bound to the hardware of the current device.
|
3659
3664
|
*
|
3660
|
-
* This function is highly restricted and will fail if the current device is not managed, the current user is not managed, or if this operation has not explicitly been enabled for the caller by enterprise device policy. The Enterprise Machine Key does not reside in the
|
3665
|
+
* This function is highly restricted and will fail if the current device is not managed, the current user is not managed, or if this operation has not explicitly been enabled for the caller by enterprise device policy. The Enterprise Machine Key does not reside in the `system` token and is not accessible by any other API.
|
3661
3666
|
* @param challenge A challenge as emitted by the Verified Access Web API.
|
3662
|
-
* @param registerKey If set, the current Enterprise Machine Key is registered with the
|
3663
|
-
*
|
3667
|
+
* @param registerKey If set, the current Enterprise Machine Key is registered with the `system` token and relinquishes the Enterprise Machine Key role. The key can then be associated with a certificate and used like any other signing key. This key is 2048-bit RSA. Subsequent calls to this function will then generate a new Enterprise Machine Key. Since Chrome 59.
|
3668
|
+
*
|
3669
|
+
* Can return its result via Promise since Chrome 131.
|
3664
3670
|
* @since Chrome 50
|
3665
3671
|
*/
|
3666
|
-
|
3672
|
+
export function challengeMachineKey(challenge: ArrayBuffer): Promise<ArrayBuffer>;
|
3673
|
+
export function challengeMachineKey(challenge: ArrayBuffer, registerKey: boolean): Promise<ArrayBuffer>;
|
3674
|
+
export function challengeMachineKey(challenge: ArrayBuffer, callback: (response: ArrayBuffer) => void): void;
|
3667
3675
|
export function challengeMachineKey(
|
3668
3676
|
challenge: ArrayBuffer,
|
3669
3677
|
registerKey: boolean,
|
3670
3678
|
callback: (response: ArrayBuffer) => void,
|
3671
3679
|
): void;
|
3672
3680
|
|
3673
|
-
export function challengeMachineKey(challenge: ArrayBuffer, callback: (response: ArrayBuffer) => void): void;
|
3674
3681
|
/**
|
3675
|
-
* @deprecated Deprecated since Chrome 110, use
|
3682
|
+
* @deprecated Deprecated since Chrome 110, use {@link challengeKey} instead.
|
3676
3683
|
*
|
3677
|
-
* Challenges a hardware-backed Enterprise User Key and emits the response as part of a remote attestation protocol. Only useful on
|
3684
|
+
* Challenges a hardware-backed Enterprise User Key and emits the response as part of a remote attestation protocol. Only useful on ChromeOS and in conjunction with the Verified Access Web API which both issues challenges and verifies responses. A successful verification by the Verified Access Web API is a strong signal of all of the following:
|
3678
3685
|
*
|
3679
|
-
* * The current device is a legitimate
|
3686
|
+
* * The current device is a legitimate ChromeOS device.
|
3680
3687
|
* * The current device is managed by the domain specified during verification.
|
3681
3688
|
* * The current signed-in user is managed by the domain specified during verification.
|
3682
3689
|
* * The current device state complies with enterprise user policy. For example, a policy may specify that the device must not be in developer mode.
|
3683
3690
|
* * The public key emitted by the verification is tightly bound to the hardware of the current device and to the current signed-in user.
|
3684
3691
|
*
|
3685
|
-
* This function is highly restricted and will fail if the current device is not managed, the current user is not managed, or if this operation has not explicitly been enabled for the caller by enterprise user policy. The Enterprise User Key does not reside in the
|
3692
|
+
* This function is highly restricted and will fail if the current device is not managed, the current user is not managed, or if this operation has not explicitly been enabled for the caller by enterprise user policy. The Enterprise User Key does not reside in the `user` token and is not accessible by any other API.
|
3686
3693
|
* @param challenge A challenge as emitted by the Verified Access Web API.
|
3687
|
-
* @param registerKey If set, the current Enterprise User Key is registered with the
|
3694
|
+
* @param registerKey If set, the current Enterprise User Key is registered with the `user` token and relinquishes the Enterprise User Key role. The key can then be associated with a certificate and used like any other signing key. This key is 2048-bit RSA. Subsequent calls to this function will then generate a new Enterprise User Key.
|
3688
3695
|
* @param callback Called back with the challenge response.
|
3689
3696
|
* @since Chrome 50
|
3690
3697
|
*/
|
3691
|
-
|
3698
|
+
export function challengeUserKey(challenge: ArrayBuffer, registerKey: boolean): Promise<ArrayBuffer>;
|
3692
3699
|
export function challengeUserKey(
|
3693
3700
|
challenge: ArrayBuffer,
|
3694
3701
|
registerKey: boolean,
|
@@ -7589,6 +7596,116 @@ declare namespace chrome {
|
|
7589
7596
|
export var onProxyError: ProxyErrorEvent;
|
7590
7597
|
}
|
7591
7598
|
|
7599
|
+
////////////////////
|
7600
|
+
// ReadingList
|
7601
|
+
////////////////////
|
7602
|
+
/**
|
7603
|
+
* Use the `chrome.readingList` API to read from and modify the items in the Reading List.
|
7604
|
+
*
|
7605
|
+
* Permissions: "readingList"
|
7606
|
+
* @since Chrome 120, MV3
|
7607
|
+
*/
|
7608
|
+
export namespace readingList {
|
7609
|
+
export interface AddEntryOptions {
|
7610
|
+
/** Will be `true` if the entry has been read. */
|
7611
|
+
hasBeenRead: boolean;
|
7612
|
+
/** The title of the entry. */
|
7613
|
+
title: string;
|
7614
|
+
/** The url of the entry. */
|
7615
|
+
url: string;
|
7616
|
+
}
|
7617
|
+
|
7618
|
+
export interface QueryInfo {
|
7619
|
+
/** Indicates whether to search for read (`true`) or unread (`false`) items. */
|
7620
|
+
hasBeenRead?: boolean | undefined;
|
7621
|
+
/** A title to search for. */
|
7622
|
+
title?: string | undefined;
|
7623
|
+
/** A url to search for. */
|
7624
|
+
url?: string | undefined;
|
7625
|
+
}
|
7626
|
+
|
7627
|
+
export interface ReadingListEntry {
|
7628
|
+
/** The time the entry was created. Recorded in milliseconds since Jan 1, 1970. */
|
7629
|
+
creationTime: number;
|
7630
|
+
/** Will be `true` if the entry has been read. */
|
7631
|
+
hasBeenRead: boolean;
|
7632
|
+
/** The last time the entry was updated. This value is in milliseconds since Jan 1, 1970. */
|
7633
|
+
lastUpdateTime: number;
|
7634
|
+
/** The title of the entry. */
|
7635
|
+
title: string;
|
7636
|
+
/** The url of the entry. */
|
7637
|
+
url: string;
|
7638
|
+
}
|
7639
|
+
|
7640
|
+
export interface RemoveOptions {
|
7641
|
+
/** The url to remove. */
|
7642
|
+
url: string;
|
7643
|
+
}
|
7644
|
+
|
7645
|
+
export interface UpdateEntryOptions {
|
7646
|
+
/** The updated read status. The existing status remains if a value isn't provided. */
|
7647
|
+
hasBeenRead?: boolean | undefined;
|
7648
|
+
/** The new title. The existing tile remains if a value isn't provided. */
|
7649
|
+
title?: string | undefined;
|
7650
|
+
/** The url that will be updated. */
|
7651
|
+
url: string;
|
7652
|
+
}
|
7653
|
+
|
7654
|
+
/**
|
7655
|
+
* Adds an entry to the reading list if it does not exist.
|
7656
|
+
* @since Chrome 120, MV3
|
7657
|
+
* @param entry The entry to add to the reading list.
|
7658
|
+
* @param callback
|
7659
|
+
*/
|
7660
|
+
export function addEntry(entry: AddEntryOptions): Promise<void>;
|
7661
|
+
export function addEntry(entry: AddEntryOptions, callback: () => void): void;
|
7662
|
+
|
7663
|
+
/**
|
7664
|
+
* Retrieves all entries that match the `QueryInfo` properties. Properties that are not provided will not be matched.
|
7665
|
+
* @since Chrome 120, MV3
|
7666
|
+
* @param info The properties to search for.
|
7667
|
+
* @param callback
|
7668
|
+
*/
|
7669
|
+
export function query(info: QueryInfo): Promise<ReadingListEntry[]>;
|
7670
|
+
export function query(info: QueryInfo, callback: (entries: ReadingListEntry[]) => void): void;
|
7671
|
+
|
7672
|
+
/**
|
7673
|
+
* Removes an entry from the reading list if it exists.
|
7674
|
+
* @since Chrome 120, MV3
|
7675
|
+
* @param info The entry to remove from the reading list.
|
7676
|
+
* @param callback
|
7677
|
+
*/
|
7678
|
+
export function removeEntry(info: RemoveOptions): Promise<void>;
|
7679
|
+
export function removeEntry(info: RemoveOptions, callback: () => void): void;
|
7680
|
+
|
7681
|
+
/**
|
7682
|
+
* Updates a reading list entry if it exists.
|
7683
|
+
* @since Chrome 120, MV3
|
7684
|
+
* @param info The entry to update.
|
7685
|
+
* @param callback
|
7686
|
+
*/
|
7687
|
+
export function updateEntry(info: UpdateEntryOptions): Promise<void>;
|
7688
|
+
export function updateEntry(info: UpdateEntryOptions, callback: () => void): void;
|
7689
|
+
|
7690
|
+
/**
|
7691
|
+
* Triggered when a ReadingListEntry is added to the reading list.
|
7692
|
+
* @since Chrome 120, MV3
|
7693
|
+
*/
|
7694
|
+
export const onEntryAdded: chrome.events.Event<(entry: ReadingListEntry) => void>;
|
7695
|
+
|
7696
|
+
/**
|
7697
|
+
* Triggered when a ReadingListEntry is removed from the reading list.
|
7698
|
+
* @since Chrome 120, MV3
|
7699
|
+
*/
|
7700
|
+
export const onEntryRemoved: chrome.events.Event<(entry: ReadingListEntry) => void>;
|
7701
|
+
|
7702
|
+
/**
|
7703
|
+
* Triggered when a ReadingListEntry is updated in the reading list.
|
7704
|
+
* @since Chrome 120, MV3
|
7705
|
+
*/
|
7706
|
+
export const onEntryUpdated: chrome.events.Event<(entry: ReadingListEntry) => void>;
|
7707
|
+
}
|
7708
|
+
|
7592
7709
|
////////////////////
|
7593
7710
|
// Search
|
7594
7711
|
////////////////////
|
chrome/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/chrome",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.301",
|
4
4
|
"description": "TypeScript definitions for chrome",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome",
|
6
6
|
"license": "MIT",
|
@@ -94,6 +94,6 @@
|
|
94
94
|
"@types/har-format": "*"
|
95
95
|
},
|
96
96
|
"peerDependencies": {},
|
97
|
-
"typesPublisherContentHash": "
|
97
|
+
"typesPublisherContentHash": "9ddc7f638f558fc657440fa08d4ed99ac5456e7a6752f3759d30ba53ba7c1804",
|
98
98
|
"typeScriptVersion": "5.0"
|
99
99
|
}
|