@types/chrome 0.0.299 → 0.0.300
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 +39 -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: Thu, 30 Jan 2025 16:37:44 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,
|
chrome/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/chrome",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.300",
|
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": "0cbcca2b19b5e0ccd0a0fdd1266a84b83ad6a9bf73b0c8a4a84e60e15f0aec1e",
|
98
98
|
"typeScriptVersion": "5.0"
|
99
99
|
}
|