chrome-types 0.1.77 → 0.1.81

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.
Files changed (3) hide show
  1. package/_all.d.ts +114 -8
  2. package/index.d.ts +114 -8
  3. package/package.json +2 -2
package/_all.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Google LLC
2
+ * Copyright 2022 Google LLC
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -14,8 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- // Generated on Wed Dec 29 2021 22:27:56 GMT+0000 (Coordinated Universal Time)
18
- // Built at df76446c6f2a16cdb754fe1bc45fa179dc79b7da
17
+ // Generated on Mon Jan 10 2022 22:28:37 GMT+0000 (Coordinated Universal Time)
18
+ // Built at f8a907b65889273e71d9a38b8c0a76da86db28c2
19
19
 
20
20
  // Includes all types, including MV2 + Platform Apps APIs.
21
21
 
@@ -7301,6 +7301,13 @@ declare namespace chrome {
7301
7301
  */
7302
7302
  all_frames?: boolean;
7303
7303
 
7304
+ /**
7305
+ * Whether the script should inject into any frames where the URL belongs to a scheme that would never match a specified Match Pattern, including about:, data:, blob:, and filesystem: schemes. In these cases, in order to determine if the script should inject, the origin of the URL is checked. If the origin is `null` (as is the case for data: URLs), then the "initiator" or "creator" origin is used (i.e., the origin of the frame that created or navigated this frame). Note that this may not be the parent frame, if the frame was navigated by another frame in the document hierarchy.
7306
+ *
7307
+ * @since Pending
7308
+ */
7309
+ match_origin_as_fallback?: boolean;
7310
+
7304
7311
  /**
7305
7312
  * Whether the script should inject into an about:blank frame where the parent or opener frame matches one of the patterns declared in matches. Defaults to false.
7306
7313
  */
@@ -8755,6 +8762,7 @@ declare namespace chrome {
8755
8762
  * Declarative event action that shows the extension's {@link pageAction page action} while the corresponding conditions are met. This action can be used without [host permissions](https://developer.chrome.com/docs/extensions/declare_permissions#host-permissions), but the extension must have a page action. If the extension has the [activeTab](https://developer.chrome.com/docs/extensions/activeTab) permission, clicking the page action grants access to the active tab.
8756
8763
  *
8757
8764
  * @deprecated Please use {@link declarativeContent.ShowAction}.
8765
+ * @chrome-deprecated-since Chrome 97
8758
8766
  */
8759
8767
  export class ShowPageAction {
8760
8768
  constructor(arg: ShowPageAction);
@@ -8763,7 +8771,7 @@ declare namespace chrome {
8763
8771
  /**
8764
8772
  * Declarative event action that shows the extension's toolbar action ({@link pageAction page action} or {@link browserAction browser action}) while the corresponding conditions are met. This action can be used without [host permissions](https://developer.chrome.com/docs/extensions/declare_permissions#host-permissions). If the extension has the [activeTab](https://developer.chrome.com/docs/extensions/activeTab) permission, clicking the page action grants access to the active tab.
8765
8773
  *
8766
- * @since Pending
8774
+ * @since Chrome 97
8767
8775
  */
8768
8776
  export class ShowAction {
8769
8777
  constructor(arg: ShowAction);
@@ -12047,7 +12055,7 @@ declare namespace chrome {
12047
12055
  *
12048
12056
  * Keys generated on a specific `Token` cannot be used with any other Tokens, nor can they be used with `window.crypto.subtle`. Equally, `Key` objects created with `window.crypto.subtle` cannot be used with this interface.
12049
12057
  *
12050
- * @since Pending
12058
+ * @since Chrome 97
12051
12059
  */
12052
12060
  softwareBackedSubtleCrypto: SubtleCrypto;
12053
12061
  }
@@ -15846,6 +15854,13 @@ declare namespace chrome {
15846
15854
  */
15847
15855
  export type LanguageCode = string;
15848
15856
 
15857
+ /**
15858
+ * Gets the accept-languages of the browser. This is different from the locale used by the browser; to get the locale, use {@link i18n.getUILanguage}.
15859
+ *
15860
+ * @chrome-returns-extra since Pending
15861
+ */
15862
+ export function getAcceptLanguages(): Promise<LanguageCode[]>;
15863
+
15849
15864
  /**
15850
15865
  * Gets the accept-languages of the browser. This is different from the locale used by the browser; to get the locale, use {@link i18n.getUILanguage}.
15851
15866
  */
@@ -15854,7 +15869,7 @@ declare namespace chrome {
15854
15869
  /**
15855
15870
  * @param languages Array of LanguageCode
15856
15871
  */
15857
- callback: (
15872
+ callback?: (
15858
15873
  languages: LanguageCode[],
15859
15874
  ) => void,
15860
15875
  ): void;
@@ -15892,6 +15907,37 @@ declare namespace chrome {
15892
15907
  */
15893
15908
  export function getUILanguage(): string;
15894
15909
 
15910
+ /**
15911
+ * Detects the language of the provided text using CLD.
15912
+ *
15913
+ * @chrome-returns-extra since Pending
15914
+ * @param text User input string to be translated.
15915
+ * @since Chrome 47
15916
+ */
15917
+ export function detectLanguage(
15918
+
15919
+ text: string,
15920
+ ): Promise<{
15921
+
15922
+ /**
15923
+ * CLD detected language reliability
15924
+ */
15925
+ isReliable: boolean,
15926
+
15927
+ /**
15928
+ * array of detectedLanguage
15929
+ */
15930
+ languages: {
15931
+
15932
+ language: LanguageCode,
15933
+
15934
+ /**
15935
+ * The percentage of the detected language
15936
+ */
15937
+ percentage: number,
15938
+ }[],
15939
+ }>;
15940
+
15895
15941
  /**
15896
15942
  * Detects the language of the provided text using CLD.
15897
15943
  *
@@ -15905,7 +15951,7 @@ declare namespace chrome {
15905
15951
  /**
15906
15952
  * @param result LanguageDetectionResult object that holds detected langugae reliability and array of DetectedLanguage
15907
15953
  */
15908
- callback: (
15954
+ callback?: (
15909
15955
  result: {
15910
15956
 
15911
15957
  /**
@@ -31379,7 +31425,7 @@ declare namespace chrome {
31379
31425
  }
31380
31426
 
31381
31427
  /**
31382
- * The webAuthenticationProxy API lets remote desktop software running on a remote host intercept Web Authentication API requests in order to handle them on a local client.
31428
+ * The webAuthenticationProxy API lets remote desktop software running on a remote host intercept Web Authentication API (WebAuthn) requests in order to handle them on a local client.
31383
31429
  *
31384
31430
  * @alpha
31385
31431
  * @chrome-permission webAuthenticationProxy
@@ -31396,6 +31442,41 @@ declare namespace chrome {
31396
31442
  requestId: number;
31397
31443
  }
31398
31444
 
31445
+ export interface CreateRequest {
31446
+
31447
+ /**
31448
+ * An opaque identifier for the request.
31449
+ */
31450
+ requestId: number;
31451
+
31452
+ /**
31453
+ * An JSON serialized representation of the PublicKeyCredentialCreationOptions passed to navigator.credentials.create().
31454
+ *
31455
+ * TODO(crbug.com/1231802): Reference deserialization method or document format.
31456
+ */
31457
+ requestDetailsJson: string;
31458
+ }
31459
+
31460
+ export interface CreateResponseDetails {
31461
+
31462
+ /**
31463
+ * The requestId of the `CreateRequest`.
31464
+ */
31465
+ requestId: number;
31466
+
31467
+ /**
31468
+ * The `name` property of the `DOMException`, if any, yielded by the remote request.
31469
+ */
31470
+ errorName?: string;
31471
+
31472
+ /**
31473
+ * A JSON serialized representation of the `PublicKeyCredential` (https://w3c.github.io/webauthn/#publickeycredential), if any, yielded by the remote request.
31474
+ *
31475
+ * TODO(crbug.com/1231802): Reference serialization method or document format.
31476
+ */
31477
+ responseJson?: string;
31478
+ }
31479
+
31399
31480
  export interface IsUvpaaResponseDetails {
31400
31481
 
31401
31482
  requestId: number;
@@ -31403,6 +31484,13 @@ declare namespace chrome {
31403
31484
  isUvpaa: boolean;
31404
31485
  }
31405
31486
 
31487
+ /**
31488
+ * Fires when a WebAuthn navigator.credentials.create() call occurs. The extension must supply a response by calling completeCreateCredentialRequest() with the given requestId.
31489
+ */
31490
+ export const onCreateRequest: events.Event<(
31491
+ requestInfo: CreateRequest,
31492
+ ) => void>;
31493
+
31406
31494
  /**
31407
31495
  * Fires when a PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable() call occurs. The extension must supply a response by calling completeIsUvpaaRequest() with the given requestId.
31408
31496
  */
@@ -31410,6 +31498,24 @@ declare namespace chrome {
31410
31498
  requestInfo: IsUvpaaRequest,
31411
31499
  ) => void>;
31412
31500
 
31501
+ /**
31502
+ * Reports the result of a navigator.credentials.create() call. The extension must call this for every onCreateRequest event it has received; but not if onRequestCanceled has been called for that particular requestId.
31503
+ */
31504
+ export function completeCreateRequest(
31505
+
31506
+ details: CreateResponseDetails,
31507
+ ): Promise<void>;
31508
+
31509
+ /**
31510
+ * Reports the result of a navigator.credentials.create() call. The extension must call this for every onCreateRequest event it has received; but not if onRequestCanceled has been called for that particular requestId.
31511
+ */
31512
+ export function completeCreateRequest(
31513
+
31514
+ details: CreateResponseDetails,
31515
+
31516
+ callback?: () => void,
31517
+ ): void;
31518
+
31413
31519
  /**
31414
31520
  * Reports the result of a PublicKeyCredential.isUserVerifyingPlatformAuthenticator() call. The extension must call this for every onIsUvpaaRequest event it has received; but not if onRequestCanceled has been called for that particular requestId.
31415
31521
  */
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Google LLC
2
+ * Copyright 2022 Google LLC
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -14,8 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- // Generated on Wed Dec 29 2021 22:27:51 GMT+0000 (Coordinated Universal Time)
18
- // Built at df76446c6f2a16cdb754fe1bc45fa179dc79b7da
17
+ // Generated on Mon Jan 10 2022 22:28:32 GMT+0000 (Coordinated Universal Time)
18
+ // Built at f8a907b65889273e71d9a38b8c0a76da86db28c2
19
19
 
20
20
  // Includes MV3+ APIs only.
21
21
 
@@ -3868,6 +3868,13 @@ declare namespace chrome {
3868
3868
  */
3869
3869
  all_frames?: boolean;
3870
3870
 
3871
+ /**
3872
+ * Whether the script should inject into any frames where the URL belongs to a scheme that would never match a specified Match Pattern, including about:, data:, blob:, and filesystem: schemes. In these cases, in order to determine if the script should inject, the origin of the URL is checked. If the origin is `null` (as is the case for data: URLs), then the "initiator" or "creator" origin is used (i.e., the origin of the frame that created or navigated this frame). Note that this may not be the parent frame, if the frame was navigated by another frame in the document hierarchy.
3873
+ *
3874
+ * @since Pending
3875
+ */
3876
+ match_origin_as_fallback?: boolean;
3877
+
3871
3878
  /**
3872
3879
  * Whether the script should inject into an about:blank frame where the parent or opener frame matches one of the patterns declared in matches. Defaults to false.
3873
3880
  */
@@ -5322,6 +5329,7 @@ declare namespace chrome {
5322
5329
  * Declarative event action that shows the extension's {@link pageAction page action} while the corresponding conditions are met. This action can be used without [host permissions](https://developer.chrome.com/docs/extensions/declare_permissions#host-permissions), but the extension must have a page action. If the extension has the [activeTab](https://developer.chrome.com/docs/extensions/activeTab) permission, clicking the page action grants access to the active tab.
5323
5330
  *
5324
5331
  * @deprecated Please use {@link declarativeContent.ShowAction}.
5332
+ * @chrome-deprecated-since Chrome 97
5325
5333
  */
5326
5334
  export class ShowPageAction {
5327
5335
  constructor(arg: ShowPageAction);
@@ -5330,7 +5338,7 @@ declare namespace chrome {
5330
5338
  /**
5331
5339
  * Declarative event action that shows the extension's toolbar action ({@link pageAction page action} or {@link browserAction browser action}) while the corresponding conditions are met. This action can be used without [host permissions](https://developer.chrome.com/docs/extensions/declare_permissions#host-permissions). If the extension has the [activeTab](https://developer.chrome.com/docs/extensions/activeTab) permission, clicking the page action grants access to the active tab.
5332
5340
  *
5333
- * @since Pending
5341
+ * @since Chrome 97
5334
5342
  */
5335
5343
  export class ShowAction {
5336
5344
  constructor(arg: ShowAction);
@@ -8018,7 +8026,7 @@ declare namespace chrome {
8018
8026
  *
8019
8027
  * Keys generated on a specific `Token` cannot be used with any other Tokens, nor can they be used with `window.crypto.subtle`. Equally, `Key` objects created with `window.crypto.subtle` cannot be used with this interface.
8020
8028
  *
8021
- * @since Pending
8029
+ * @since Chrome 97
8022
8030
  */
8023
8031
  softwareBackedSubtleCrypto: SubtleCrypto;
8024
8032
  }
@@ -11147,6 +11155,13 @@ declare namespace chrome {
11147
11155
  */
11148
11156
  export type LanguageCode = string;
11149
11157
 
11158
+ /**
11159
+ * Gets the accept-languages of the browser. This is different from the locale used by the browser; to get the locale, use {@link i18n.getUILanguage}.
11160
+ *
11161
+ * @chrome-returns-extra since Pending
11162
+ */
11163
+ export function getAcceptLanguages(): Promise<LanguageCode[]>;
11164
+
11150
11165
  /**
11151
11166
  * Gets the accept-languages of the browser. This is different from the locale used by the browser; to get the locale, use {@link i18n.getUILanguage}.
11152
11167
  */
@@ -11155,7 +11170,7 @@ declare namespace chrome {
11155
11170
  /**
11156
11171
  * @param languages Array of LanguageCode
11157
11172
  */
11158
- callback: (
11173
+ callback?: (
11159
11174
  languages: LanguageCode[],
11160
11175
  ) => void,
11161
11176
  ): void;
@@ -11193,6 +11208,37 @@ declare namespace chrome {
11193
11208
  */
11194
11209
  export function getUILanguage(): string;
11195
11210
 
11211
+ /**
11212
+ * Detects the language of the provided text using CLD.
11213
+ *
11214
+ * @chrome-returns-extra since Pending
11215
+ * @param text User input string to be translated.
11216
+ * @since Chrome 47
11217
+ */
11218
+ export function detectLanguage(
11219
+
11220
+ text: string,
11221
+ ): Promise<{
11222
+
11223
+ /**
11224
+ * CLD detected language reliability
11225
+ */
11226
+ isReliable: boolean,
11227
+
11228
+ /**
11229
+ * array of detectedLanguage
11230
+ */
11231
+ languages: {
11232
+
11233
+ language: LanguageCode,
11234
+
11235
+ /**
11236
+ * The percentage of the detected language
11237
+ */
11238
+ percentage: number,
11239
+ }[],
11240
+ }>;
11241
+
11196
11242
  /**
11197
11243
  * Detects the language of the provided text using CLD.
11198
11244
  *
@@ -11206,7 +11252,7 @@ declare namespace chrome {
11206
11252
  /**
11207
11253
  * @param result LanguageDetectionResult object that holds detected langugae reliability and array of DetectedLanguage
11208
11254
  */
11209
- callback: (
11255
+ callback?: (
11210
11256
  result: {
11211
11257
 
11212
11258
  /**
@@ -20665,7 +20711,7 @@ declare namespace chrome {
20665
20711
  }
20666
20712
 
20667
20713
  /**
20668
- * The webAuthenticationProxy API lets remote desktop software running on a remote host intercept Web Authentication API requests in order to handle them on a local client.
20714
+ * The webAuthenticationProxy API lets remote desktop software running on a remote host intercept Web Authentication API (WebAuthn) requests in order to handle them on a local client.
20669
20715
  *
20670
20716
  * @alpha
20671
20717
  * @chrome-permission webAuthenticationProxy
@@ -20682,6 +20728,41 @@ declare namespace chrome {
20682
20728
  requestId: number;
20683
20729
  }
20684
20730
 
20731
+ export interface CreateRequest {
20732
+
20733
+ /**
20734
+ * An opaque identifier for the request.
20735
+ */
20736
+ requestId: number;
20737
+
20738
+ /**
20739
+ * An JSON serialized representation of the PublicKeyCredentialCreationOptions passed to navigator.credentials.create().
20740
+ *
20741
+ * TODO(crbug.com/1231802): Reference deserialization method or document format.
20742
+ */
20743
+ requestDetailsJson: string;
20744
+ }
20745
+
20746
+ export interface CreateResponseDetails {
20747
+
20748
+ /**
20749
+ * The requestId of the `CreateRequest`.
20750
+ */
20751
+ requestId: number;
20752
+
20753
+ /**
20754
+ * The `name` property of the `DOMException`, if any, yielded by the remote request.
20755
+ */
20756
+ errorName?: string;
20757
+
20758
+ /**
20759
+ * A JSON serialized representation of the `PublicKeyCredential` (https://w3c.github.io/webauthn/#publickeycredential), if any, yielded by the remote request.
20760
+ *
20761
+ * TODO(crbug.com/1231802): Reference serialization method or document format.
20762
+ */
20763
+ responseJson?: string;
20764
+ }
20765
+
20685
20766
  export interface IsUvpaaResponseDetails {
20686
20767
 
20687
20768
  requestId: number;
@@ -20689,6 +20770,13 @@ declare namespace chrome {
20689
20770
  isUvpaa: boolean;
20690
20771
  }
20691
20772
 
20773
+ /**
20774
+ * Fires when a WebAuthn navigator.credentials.create() call occurs. The extension must supply a response by calling completeCreateCredentialRequest() with the given requestId.
20775
+ */
20776
+ export const onCreateRequest: events.Event<(
20777
+ requestInfo: CreateRequest,
20778
+ ) => void>;
20779
+
20692
20780
  /**
20693
20781
  * Fires when a PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable() call occurs. The extension must supply a response by calling completeIsUvpaaRequest() with the given requestId.
20694
20782
  */
@@ -20696,6 +20784,24 @@ declare namespace chrome {
20696
20784
  requestInfo: IsUvpaaRequest,
20697
20785
  ) => void>;
20698
20786
 
20787
+ /**
20788
+ * Reports the result of a navigator.credentials.create() call. The extension must call this for every onCreateRequest event it has received; but not if onRequestCanceled has been called for that particular requestId.
20789
+ */
20790
+ export function completeCreateRequest(
20791
+
20792
+ details: CreateResponseDetails,
20793
+ ): Promise<void>;
20794
+
20795
+ /**
20796
+ * Reports the result of a navigator.credentials.create() call. The extension must call this for every onCreateRequest event it has received; but not if onRequestCanceled has been called for that particular requestId.
20797
+ */
20798
+ export function completeCreateRequest(
20799
+
20800
+ details: CreateResponseDetails,
20801
+
20802
+ callback?: () => void,
20803
+ ): void;
20804
+
20699
20805
  /**
20700
20806
  * Reports the result of a PublicKeyCredential.isUserVerifyingPlatformAuthenticator() call. The extension must call this for every onIsUvpaaRequest event it has received; but not if onRequestCanceled has been called for that particular requestId.
20701
20807
  */
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "module",
6
6
  "name": "chrome-types",
7
7
  "config": {
8
- "build-hash": "d8fa02cc593612ae"
8
+ "build-hash": "b88727c431205e24"
9
9
  },
10
10
  "repository": {
11
11
  "type": "git",
@@ -16,5 +16,5 @@
16
16
  "url": "https://github.com/GoogleChrome/chrome-types/issues"
17
17
  },
18
18
  "homepage": "https://github.com/GoogleChrome/chrome-types",
19
- "version": "0.1.77"
19
+ "version": "0.1.81"
20
20
  }