@types/chrome 0.0.272 → 0.0.274
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 +93 -10
- 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: Wed,
|
11
|
+
* Last updated: Wed, 02 Oct 2024 18:10:02 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
@@ -3211,7 +3211,7 @@ declare namespace chrome.enterprise.platformKeys {
|
|
3211
3211
|
export interface Token {
|
3212
3212
|
/**
|
3213
3213
|
* Uniquely identifies this Token.
|
3214
|
-
* Static IDs are
|
3214
|
+
* Static IDs are `user` and `system`, referring to the platform's user-specific and the system-wide hardware token, respectively. Any other tokens (with other identifiers) might be returned by enterprise.platformKeys.getTokens.
|
3215
3215
|
*/
|
3216
3216
|
id: string;
|
3217
3217
|
/**
|
@@ -3240,7 +3240,7 @@ declare namespace chrome.enterprise.platformKeys {
|
|
3240
3240
|
* Which Enterprise Key to challenge.
|
3241
3241
|
* @since Chrome 110
|
3242
3242
|
*/
|
3243
|
-
scope: Scope
|
3243
|
+
scope: `${Scope}`;
|
3244
3244
|
/**
|
3245
3245
|
* If present, registers the challenged key with the specified scope's token.
|
3246
3246
|
* The key can then be associated with a certificate and used like any other signing key.
|
@@ -3254,20 +3254,26 @@ declare namespace chrome.enterprise.platformKeys {
|
|
3254
3254
|
/**
|
3255
3255
|
* Which algorithm the registered key should use.
|
3256
3256
|
*/
|
3257
|
-
algorithm: Algorithm
|
3257
|
+
algorithm: `${Algorithm}`;
|
3258
3258
|
}
|
3259
3259
|
|
3260
3260
|
/**
|
3261
|
-
* @since Chrome 110
|
3262
3261
|
* Type of key to generate.
|
3262
|
+
* @since Chrome 110
|
3263
3263
|
*/
|
3264
|
-
|
3264
|
+
export enum Algorithm {
|
3265
|
+
ECDSA = "ECDSA",
|
3266
|
+
RSA = "RSA",
|
3267
|
+
}
|
3265
3268
|
|
3266
3269
|
/**
|
3267
|
-
* @since Chrome 110
|
3268
3270
|
* Whether to use the Enterprise User Key or the Enterprise Machine Key.
|
3271
|
+
* @since Chrome 110
|
3269
3272
|
*/
|
3270
|
-
|
3273
|
+
export enum Scope {
|
3274
|
+
USER = "USER",
|
3275
|
+
MACHINE = "MACHINE",
|
3276
|
+
}
|
3271
3277
|
|
3272
3278
|
/**
|
3273
3279
|
* 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).
|
@@ -3275,6 +3281,7 @@ declare namespace chrome.enterprise.platformKeys {
|
|
3275
3281
|
* Parameter tokens: The list of available tokens.
|
3276
3282
|
*/
|
3277
3283
|
export function getTokens(callback: (tokens: Token[]) => void): void;
|
3284
|
+
|
3278
3285
|
/**
|
3279
3286
|
* 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.
|
3280
3287
|
* @param tokenId The id of a Token returned by getTokens.
|
@@ -3282,6 +3289,7 @@ declare namespace chrome.enterprise.platformKeys {
|
|
3282
3289
|
* Parameter certificates: The list of certificates, each in DER encoding of a X.509 certificate.
|
3283
3290
|
*/
|
3284
3291
|
export function getCertificates(tokenId: string, callback: (certificates: ArrayBuffer[]) => void): void;
|
3292
|
+
|
3285
3293
|
/**
|
3286
3294
|
* 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.
|
3287
3295
|
* @param tokenId The id of a Token returned by getTokens.
|
@@ -3289,6 +3297,7 @@ declare namespace chrome.enterprise.platformKeys {
|
|
3289
3297
|
* @param callback Called back when this operation is finished.
|
3290
3298
|
*/
|
3291
3299
|
export function importCertificate(tokenId: string, certificate: ArrayBuffer, callback?: () => void): void;
|
3300
|
+
|
3292
3301
|
/**
|
3293
3302
|
* 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.
|
3294
3303
|
* @param tokenId The id of a Token returned by getTokens.
|
@@ -3296,6 +3305,7 @@ declare namespace chrome.enterprise.platformKeys {
|
|
3296
3305
|
* @param callback Called back when this operation is finished.
|
3297
3306
|
*/
|
3298
3307
|
export function removeCertificate(tokenId: string, certificate: ArrayBuffer, callback?: () => void): void;
|
3308
|
+
|
3299
3309
|
/**
|
3300
3310
|
* 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:
|
3301
3311
|
*
|
@@ -3311,6 +3321,7 @@ declare namespace chrome.enterprise.platformKeys {
|
|
3311
3321
|
* @since Chrome 110
|
3312
3322
|
*/
|
3313
3323
|
export function challengeKey(options: ChallengeKeyOptions, callback: (response: ArrayBuffer) => void): void;
|
3324
|
+
|
3314
3325
|
/**
|
3315
3326
|
* @deprecated Deprecated since Chrome 110, use enterprise.platformKeys.challengeKey instead.
|
3316
3327
|
*
|
@@ -3328,11 +3339,13 @@ declare namespace chrome.enterprise.platformKeys {
|
|
3328
3339
|
* @param callback Called back with the challenge response.
|
3329
3340
|
* @since Chrome 50
|
3330
3341
|
*/
|
3342
|
+
|
3331
3343
|
export function challengeMachineKey(
|
3332
3344
|
challenge: ArrayBuffer,
|
3333
3345
|
registerKey: boolean,
|
3334
3346
|
callback: (response: ArrayBuffer) => void,
|
3335
3347
|
): void;
|
3348
|
+
|
3336
3349
|
export function challengeMachineKey(challenge: ArrayBuffer, callback: (response: ArrayBuffer) => void): void;
|
3337
3350
|
/**
|
3338
3351
|
* @deprecated Deprecated since Chrome 110, use enterprise.platformKeys.challengeKey instead.
|
@@ -3351,6 +3364,7 @@ declare namespace chrome.enterprise.platformKeys {
|
|
3351
3364
|
* @param callback Called back with the challenge response.
|
3352
3365
|
* @since Chrome 50
|
3353
3366
|
*/
|
3367
|
+
|
3354
3368
|
export function challengeUserKey(
|
3355
3369
|
challenge: ArrayBuffer,
|
3356
3370
|
registerKey: boolean,
|
@@ -3411,6 +3425,32 @@ declare namespace chrome.enterprise.deviceAttributes {
|
|
3411
3425
|
export function getDeviceHostname(callback: (hostname: string) => void): void;
|
3412
3426
|
}
|
3413
3427
|
|
3428
|
+
////////////////////
|
3429
|
+
// Enterprise Hardware Platform
|
3430
|
+
////////////////////
|
3431
|
+
/**
|
3432
|
+
* Use the chrome.enterprise.hardwarePlatform API to get the manufacturer and model of the hardware platform where the browser runs.
|
3433
|
+
*
|
3434
|
+
* Permissions: "enterprise.hardwarePlatform"
|
3435
|
+
*
|
3436
|
+
* Note: This API is only for extensions pre-installed by policy.
|
3437
|
+
* @platform ChromeOS only
|
3438
|
+
* @since Chrome 71
|
3439
|
+
*/
|
3440
|
+
declare namespace chrome.enterprise.hardwarePlatform {
|
3441
|
+
export interface HardwarePlatformInfo {
|
3442
|
+
manufacturer: string;
|
3443
|
+
model: string;
|
3444
|
+
}
|
3445
|
+
|
3446
|
+
/**
|
3447
|
+
* Obtains the manufacturer and model for the hardware platform and, if the extension is authorized, returns it via callback.
|
3448
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
3449
|
+
*/
|
3450
|
+
export function getHardwarePlatformInfo(): Promise<HardwarePlatformInfo>;
|
3451
|
+
export function getHardwarePlatformInfo(callback: (info: HardwarePlatformInfo) => void): void;
|
3452
|
+
}
|
3453
|
+
|
3414
3454
|
////////////////////
|
3415
3455
|
// Enterprise Networking Attributes
|
3416
3456
|
////////////////////
|
@@ -6607,14 +6647,31 @@ declare namespace chrome.platformKeys {
|
|
6607
6647
|
////////////////////
|
6608
6648
|
/**
|
6609
6649
|
* Use the chrome.power API to override the system's power management features.
|
6610
|
-
* Permissions:
|
6650
|
+
* Permissions: "power"
|
6611
6651
|
* @since Chrome 27
|
6612
6652
|
*/
|
6613
6653
|
declare namespace chrome.power {
|
6614
|
-
|
6615
|
-
|
6654
|
+
export enum Level {
|
6655
|
+
/** Prevents the display from being turned off or dimmed, or the system from sleeping in response to user inactivity */
|
6656
|
+
DISPLAY = "display",
|
6657
|
+
/** Prevents the system from sleeping in response to user inactivity. */
|
6658
|
+
SYSTEM = "system",
|
6659
|
+
}
|
6660
|
+
|
6661
|
+
/** Requests that power management be temporarily disabled. `level` describes the degree to which power management should be disabled. If a request previously made by the same app is still active, it will be replaced by the new request. */
|
6662
|
+
export function requestKeepAwake(level: `${Level}`): void;
|
6663
|
+
|
6616
6664
|
/** Releases a request previously made via requestKeepAwake(). */
|
6617
6665
|
export function releaseKeepAwake(): void;
|
6666
|
+
|
6667
|
+
/**
|
6668
|
+
* Reports a user activity in order to awake the screen from a dimmed or turned off state or from a screensaver. Exits the screensaver if it is currently active.
|
6669
|
+
* Can return its result via Promise in Manifest V3 or later.
|
6670
|
+
* @platform ChromeOS only
|
6671
|
+
* @since Chrome 113
|
6672
|
+
*/
|
6673
|
+
export function reportActivity(): Promise<void>;
|
6674
|
+
export function reportActivity(callback: () => void): void;
|
6618
6675
|
}
|
6619
6676
|
|
6620
6677
|
////////////////////
|
@@ -7436,6 +7493,7 @@ declare namespace chrome.runtime {
|
|
7436
7493
|
| "system.display"
|
7437
7494
|
| "system.memory"
|
7438
7495
|
| "system.storage"
|
7496
|
+
| "systemLog"
|
7439
7497
|
| "tabCapture"
|
7440
7498
|
| "tabGroups"
|
7441
7499
|
| "tabs"
|
@@ -9356,6 +9414,31 @@ declare namespace chrome.system.display {
|
|
9356
9414
|
export const onDisplayChanged: chrome.events.Event<() => void>;
|
9357
9415
|
}
|
9358
9416
|
|
9417
|
+
////////////////////
|
9418
|
+
// SystemLog
|
9419
|
+
////////////////////
|
9420
|
+
/**
|
9421
|
+
* Use the chrome.systemLog API to record Chrome system logs from extensions.
|
9422
|
+
*
|
9423
|
+
* Permissions: "systemLog"
|
9424
|
+
*
|
9425
|
+
* Note: This API is only for extensions pre-installed by policy.
|
9426
|
+
* @platform ChromeOS only
|
9427
|
+
* @since Chrome 125
|
9428
|
+
*/
|
9429
|
+
declare namespace chrome.systemLog {
|
9430
|
+
export interface MessageOptions {
|
9431
|
+
message: string;
|
9432
|
+
}
|
9433
|
+
|
9434
|
+
/**
|
9435
|
+
* Adds a new log record.
|
9436
|
+
* Can return its result via Promise in Manifest V3 or later.
|
9437
|
+
*/
|
9438
|
+
export function add(options: MessageOptions): Promise<void>;
|
9439
|
+
export function add(options: MessageOptions, callback: () => void): void;
|
9440
|
+
}
|
9441
|
+
|
9359
9442
|
////////////////////
|
9360
9443
|
// TabCapture
|
9361
9444
|
////////////////////
|
chrome/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/chrome",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.274",
|
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": "cd89f522cf6bb0e688b9d3791fa8dba9cee8bbceeb0ee9d6897aa3d3b54d83aa",
|
97
97
|
"typeScriptVersion": "4.8"
|
98
98
|
}
|