chrome-types 0.1.71 → 0.1.75

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 +136 -12
  2. package/index.d.ts +89 -9
  3. package/package.json +2 -2
package/_all.d.ts CHANGED
@@ -14,8 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- // Generated on Thu Nov 18 2021 22:28:56 GMT+0000 (Coordinated Universal Time)
18
- // Built at 5887b956bd313cce39d879b055791b577e8094ea
17
+ // Generated on Thu Dec 23 2021 22:27:55 GMT+0000 (Coordinated Universal Time)
18
+ // Built at 1c12e5c64d415f66405ebf2161c9d396ccd0fd6c
19
19
 
20
20
  // Includes all types, including MV2 + Platform Apps APIs.
21
21
 
@@ -12487,6 +12487,33 @@ declare namespace chrome {
12487
12487
  sendResponse: () => void,
12488
12488
  ) => void>;
12489
12489
 
12490
+ /**
12491
+ * Sends a single request to other listeners within the extension. Similar to {@link runtime.connect}, but only sends a single request with an optional response. The {@link extension.onRequest} event is fired in each page of the extension.
12492
+ *
12493
+ * @chrome-returns-extra since Pending
12494
+ * @param extensionId The extension ID of the extension you want to connect to. If omitted, default is your own extension.
12495
+ * @deprecated Please use {@link runtime.sendMessage}.
12496
+ * @chrome-max-manifest MV2
12497
+ */
12498
+ export function sendRequest(
12499
+
12500
+ extensionId: string,
12501
+
12502
+ request: any,
12503
+ ): Promise<any>;
12504
+
12505
+ /**
12506
+ * Sends a single request to other listeners within the extension. Similar to {@link runtime.connect}, but only sends a single request with an optional response. The {@link extension.onRequest} event is fired in each page of the extension.
12507
+ *
12508
+ * @chrome-returns-extra since Pending
12509
+ * @deprecated Please use {@link runtime.sendMessage}.
12510
+ * @chrome-max-manifest MV2
12511
+ */
12512
+ export function sendRequest(
12513
+
12514
+ request: any,
12515
+ ): Promise<any>;
12516
+
12490
12517
  /**
12491
12518
  * Sends a single request to other listeners within the extension. Similar to {@link runtime.connect}, but only sends a single request with an optional response. The {@link extension.onRequest} event is fired in each page of the extension.
12492
12519
  *
@@ -12502,8 +12529,9 @@ declare namespace chrome {
12502
12529
 
12503
12530
  /**
12504
12531
  * @param response The JSON response object sent by the handler of the request. If an error occurs while connecting to the extension, the callback will be called with no arguments and {@link runtime.lastError} will be set to the error message.
12532
+ * @since Pending
12505
12533
  */
12506
- responseCallback?: (
12534
+ callback?: (
12507
12535
  response: any,
12508
12536
  ) => void,
12509
12537
  ): void;
@@ -12520,8 +12548,9 @@ declare namespace chrome {
12520
12548
 
12521
12549
  /**
12522
12550
  * @param response The JSON response object sent by the handler of the request. If an error occurs while connecting to the extension, the callback will be called with no arguments and {@link runtime.lastError} will be set to the error message.
12551
+ * @since Pending
12523
12552
  */
12524
- responseCallback?: (
12553
+ callback?: (
12525
12554
  response: any,
12526
12555
  ) => void,
12527
12556
  ): void;
@@ -12589,6 +12618,13 @@ declare namespace chrome {
12589
12618
  windowId?: number,
12590
12619
  ): Window[];
12591
12620
 
12621
+ /**
12622
+ * Retrieves the state of the extension's access to Incognito-mode. This corresponds to the user-controlled per-extension 'Allowed in Incognito' setting accessible via the chrome://extensions page.
12623
+ *
12624
+ * @chrome-returns-extra since Pending
12625
+ */
12626
+ export function isAllowedIncognitoAccess(): Promise<boolean>;
12627
+
12592
12628
  /**
12593
12629
  * Retrieves the state of the extension's access to Incognito-mode. This corresponds to the user-controlled per-extension 'Allowed in Incognito' setting accessible via the chrome://extensions page.
12594
12630
  */
@@ -12597,11 +12633,18 @@ declare namespace chrome {
12597
12633
  /**
12598
12634
  * @param isAllowedAccess True if the extension has access to Incognito mode, false otherwise.
12599
12635
  */
12600
- callback: (
12636
+ callback?: (
12601
12637
  isAllowedAccess: boolean,
12602
12638
  ) => void,
12603
12639
  ): void;
12604
12640
 
12641
+ /**
12642
+ * Retrieves the state of the extension's access to the 'file://' scheme. This corresponds to the user-controlled per-extension 'Allow access to File URLs' setting accessible via the chrome://extensions page.
12643
+ *
12644
+ * @chrome-returns-extra since Pending
12645
+ */
12646
+ export function isAllowedFileSchemeAccess(): Promise<boolean>;
12647
+
12605
12648
  /**
12606
12649
  * Retrieves the state of the extension's access to the 'file://' scheme. This corresponds to the user-controlled per-extension 'Allow access to File URLs' setting accessible via the chrome://extensions page.
12607
12650
  */
@@ -12610,7 +12653,7 @@ declare namespace chrome {
12610
12653
  /**
12611
12654
  * @param isAllowedAccess True if the extension can access the 'file://' scheme, false otherwise.
12612
12655
  */
12613
- callback: (
12656
+ callback?: (
12614
12657
  isAllowedAccess: boolean,
12615
12658
  ) => void,
12616
12659
  ): void;
@@ -12990,6 +13033,7 @@ declare namespace chrome {
12990
13033
  * @chrome-permission fileBrowserHandler
12991
13034
  * @chrome-disallow-service-workers
12992
13035
  * @chrome-platform chromeos
13036
+ * @chrome-platform lacros
12993
13037
  */
12994
13038
  export namespace fileBrowserHandler {
12995
13039
 
@@ -21371,7 +21415,7 @@ declare namespace chrome {
21371
21415
  /**
21372
21416
  * The maximum number of times that {@link submitJob} can be called per minute.
21373
21417
  */
21374
- export const MAX_SUBMIT_JOB_CALLS_PER_MINUTE: 20;
21418
+ export const MAX_SUBMIT_JOB_CALLS_PER_MINUTE: 40;
21375
21419
 
21376
21420
  /**
21377
21421
  * The maximum number of times that {@link getPrinterInfo} can be called per minute.
@@ -22588,6 +22632,47 @@ declare namespace chrome {
22588
22632
  application: string,
22589
22633
  ): Port;
22590
22634
 
22635
+ /**
22636
+ * Sends a single message to event listeners within your extension/app or a different extension/app. Similar to {@link runtime.connect} but only sends a single message, with an optional response. If sending to your extension, the {@link runtime.onMessage} event will be fired in every frame of your extension (except for the sender's frame), or {@link runtime.onMessageExternal}, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use {@link tabs.sendMessage}.
22637
+ *
22638
+ * @chrome-returns-extra since Pending
22639
+ * @param extensionId The ID of the extension/app to send the message to. If omitted, the message will be sent to your own extension/app. Required if sending messages from a web page for [web messaging](https://developer.chrome.com/docs/extensions/manifest/externally_connectable).
22640
+ * @param message The message to send. This message should be a JSON-ifiable object.
22641
+ */
22642
+ export function sendMessage(
22643
+
22644
+ extensionId: string,
22645
+
22646
+ message: any,
22647
+
22648
+ options?: {
22649
+
22650
+ /**
22651
+ * Whether the TLS channel ID will be passed into onMessageExternal for processes that are listening for the connection event.
22652
+ */
22653
+ includeTlsChannelId?: boolean,
22654
+ },
22655
+ ): Promise<any>;
22656
+
22657
+ /**
22658
+ * Sends a single message to event listeners within your extension/app or a different extension/app. Similar to {@link runtime.connect} but only sends a single message, with an optional response. If sending to your extension, the {@link runtime.onMessage} event will be fired in every frame of your extension (except for the sender's frame), or {@link runtime.onMessageExternal}, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use {@link tabs.sendMessage}.
22659
+ *
22660
+ * @chrome-returns-extra since Pending
22661
+ * @param message The message to send. This message should be a JSON-ifiable object.
22662
+ */
22663
+ export function sendMessage(
22664
+
22665
+ message: any,
22666
+
22667
+ options?: {
22668
+
22669
+ /**
22670
+ * Whether the TLS channel ID will be passed into onMessageExternal for processes that are listening for the connection event.
22671
+ */
22672
+ includeTlsChannelId?: boolean,
22673
+ },
22674
+ ): Promise<any>;
22675
+
22591
22676
  /**
22592
22677
  * Sends a single message to event listeners within your extension/app or a different extension/app. Similar to {@link runtime.connect} but only sends a single message, with an optional response. If sending to your extension, the {@link runtime.onMessage} event will be fired in every frame of your extension (except for the sender's frame), or {@link runtime.onMessageExternal}, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use {@link tabs.sendMessage}.
22593
22678
  *
@@ -22610,8 +22695,9 @@ declare namespace chrome {
22610
22695
 
22611
22696
  /**
22612
22697
  * @param response The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and {@link runtime.lastError} will be set to the error message.
22698
+ * @since Pending
22613
22699
  */
22614
- responseCallback?: (
22700
+ callback?: (
22615
22701
  response: any,
22616
22702
  ) => void,
22617
22703
  ): void;
@@ -22635,8 +22721,9 @@ declare namespace chrome {
22635
22721
 
22636
22722
  /**
22637
22723
  * @param response The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and {@link runtime.lastError} will be set to the error message.
22724
+ * @since Pending
22638
22725
  */
22639
- responseCallback?: (
22726
+ callback?: (
22640
22727
  response: any,
22641
22728
  ) => void,
22642
22729
  ): void;
@@ -27120,7 +27207,7 @@ declare namespace chrome {
27120
27207
  /**
27121
27208
  * The group's color.
27122
27209
  */
27123
- export type Color = "grey" | "blue" | "red" | "yellow" | "green" | "pink" | "purple" | "cyan";
27210
+ export type Color = "grey" | "blue" | "red" | "yellow" | "green" | "pink" | "purple" | "cyan" | "orange";
27124
27211
 
27125
27212
  export interface TabGroup {
27126
27213
 
@@ -27939,6 +28026,20 @@ declare namespace chrome {
27939
28026
  },
27940
28027
  ): runtime.Port;
27941
28028
 
28029
+ /**
28030
+ * Sends a single request to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The {@link extension.onRequest} event is fired in each content script running in the specified tab for the current extension.
28031
+ *
28032
+ * @chrome-returns-extra since Pending
28033
+ * @deprecated Please use {@link runtime.sendMessage}.
28034
+ * @chrome-max-manifest MV2
28035
+ */
28036
+ export function sendRequest(
28037
+
28038
+ tabId: number,
28039
+
28040
+ request: any,
28041
+ ): Promise<any>;
28042
+
27942
28043
  /**
27943
28044
  * Sends a single request to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The {@link extension.onRequest} event is fired in each content script running in the specified tab for the current extension.
27944
28045
  *
@@ -27953,12 +28054,34 @@ declare namespace chrome {
27953
28054
 
27954
28055
  /**
27955
28056
  * @param response The JSON response object sent by the handler of the request. If an error occurs while connecting to the specified tab, the callback is called with no arguments and {@link runtime.lastError} is set to the error message.
28057
+ * @since Pending
27956
28058
  */
27957
- responseCallback?: (
28059
+ callback?: (
27958
28060
  response: any,
27959
28061
  ) => void,
27960
28062
  ): void;
27961
28063
 
28064
+ /**
28065
+ * Sends a single message to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The {@link runtime.onMessage} event is fired in each content script running in the specified tab for the current extension.
28066
+ *
28067
+ * @chrome-returns-extra since Pending
28068
+ * @param message The message to send. This message should be a JSON-ifiable object.
28069
+ */
28070
+ export function sendMessage(
28071
+
28072
+ tabId: number,
28073
+
28074
+ message: any,
28075
+
28076
+ options?: {
28077
+
28078
+ /**
28079
+ * Send a message to a specific [frame](https://developer.chrome.com/docs/extensions/reference/webNavigation/#frame_ids) identified by `frameId` instead of all frames in the tab.
28080
+ */
28081
+ frameId?: number,
28082
+ },
28083
+ ): Promise<any>;
28084
+
27962
28085
  /**
27963
28086
  * Sends a single message to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The {@link runtime.onMessage} event is fired in each content script running in the specified tab for the current extension.
27964
28087
  *
@@ -27980,8 +28103,9 @@ declare namespace chrome {
27980
28103
 
27981
28104
  /**
27982
28105
  * @param response The JSON response object sent by the handler of the message. If an error occurs while connecting to the specified tab, the callback is called with no arguments and {@link runtime.lastError} is set to the error message.
28106
+ * @since Pending
27983
28107
  */
27984
- responseCallback?: (
28108
+ callback?: (
27985
28109
  response: any,
27986
28110
  ) => void,
27987
28111
  ): void;
package/index.d.ts CHANGED
@@ -14,8 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- // Generated on Thu Nov 18 2021 22:28:51 GMT+0000 (Coordinated Universal Time)
18
- // Built at 5887b956bd313cce39d879b055791b577e8094ea
17
+ // Generated on Thu Dec 23 2021 22:27:51 GMT+0000 (Coordinated Universal Time)
18
+ // Built at 1c12e5c64d415f66405ebf2161c9d396ccd0fd6c
19
19
 
20
20
  // Includes MV3+ APIs only.
21
21
 
@@ -8455,6 +8455,13 @@ declare namespace chrome {
8455
8455
  */
8456
8456
  export function getBackgroundPage(): Window | undefined;
8457
8457
 
8458
+ /**
8459
+ * Retrieves the state of the extension's access to Incognito-mode. This corresponds to the user-controlled per-extension 'Allowed in Incognito' setting accessible via the chrome://extensions page.
8460
+ *
8461
+ * @chrome-returns-extra since Pending
8462
+ */
8463
+ export function isAllowedIncognitoAccess(): Promise<boolean>;
8464
+
8458
8465
  /**
8459
8466
  * Retrieves the state of the extension's access to Incognito-mode. This corresponds to the user-controlled per-extension 'Allowed in Incognito' setting accessible via the chrome://extensions page.
8460
8467
  */
@@ -8463,11 +8470,18 @@ declare namespace chrome {
8463
8470
  /**
8464
8471
  * @param isAllowedAccess True if the extension has access to Incognito mode, false otherwise.
8465
8472
  */
8466
- callback: (
8473
+ callback?: (
8467
8474
  isAllowedAccess: boolean,
8468
8475
  ) => void,
8469
8476
  ): void;
8470
8477
 
8478
+ /**
8479
+ * Retrieves the state of the extension's access to the 'file://' scheme. This corresponds to the user-controlled per-extension 'Allow access to File URLs' setting accessible via the chrome://extensions page.
8480
+ *
8481
+ * @chrome-returns-extra since Pending
8482
+ */
8483
+ export function isAllowedFileSchemeAccess(): Promise<boolean>;
8484
+
8471
8485
  /**
8472
8486
  * Retrieves the state of the extension's access to the 'file://' scheme. This corresponds to the user-controlled per-extension 'Allow access to File URLs' setting accessible via the chrome://extensions page.
8473
8487
  */
@@ -8476,7 +8490,7 @@ declare namespace chrome {
8476
8490
  /**
8477
8491
  * @param isAllowedAccess True if the extension can access the 'file://' scheme, false otherwise.
8478
8492
  */
8479
- callback: (
8493
+ callback?: (
8480
8494
  isAllowedAccess: boolean,
8481
8495
  ) => void,
8482
8496
  ): void;
@@ -8856,6 +8870,7 @@ declare namespace chrome {
8856
8870
  * @chrome-permission fileBrowserHandler
8857
8871
  * @chrome-disallow-service-workers
8858
8872
  * @chrome-platform chromeos
8873
+ * @chrome-platform lacros
8859
8874
  */
8860
8875
  export namespace fileBrowserHandler {
8861
8876
 
@@ -14293,7 +14308,7 @@ declare namespace chrome {
14293
14308
  /**
14294
14309
  * The maximum number of times that {@link submitJob} can be called per minute.
14295
14310
  */
14296
- export const MAX_SUBMIT_JOB_CALLS_PER_MINUTE: 20;
14311
+ export const MAX_SUBMIT_JOB_CALLS_PER_MINUTE: 40;
14297
14312
 
14298
14313
  /**
14299
14314
  * The maximum number of times that {@link getPrinterInfo} can be called per minute.
@@ -15499,6 +15514,47 @@ declare namespace chrome {
15499
15514
  application: string,
15500
15515
  ): Port;
15501
15516
 
15517
+ /**
15518
+ * Sends a single message to event listeners within your extension/app or a different extension/app. Similar to {@link runtime.connect} but only sends a single message, with an optional response. If sending to your extension, the {@link runtime.onMessage} event will be fired in every frame of your extension (except for the sender's frame), or {@link runtime.onMessageExternal}, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use {@link tabs.sendMessage}.
15519
+ *
15520
+ * @chrome-returns-extra since Pending
15521
+ * @param extensionId The ID of the extension/app to send the message to. If omitted, the message will be sent to your own extension/app. Required if sending messages from a web page for [web messaging](https://developer.chrome.com/docs/extensions/manifest/externally_connectable).
15522
+ * @param message The message to send. This message should be a JSON-ifiable object.
15523
+ */
15524
+ export function sendMessage(
15525
+
15526
+ extensionId: string,
15527
+
15528
+ message: any,
15529
+
15530
+ options?: {
15531
+
15532
+ /**
15533
+ * Whether the TLS channel ID will be passed into onMessageExternal for processes that are listening for the connection event.
15534
+ */
15535
+ includeTlsChannelId?: boolean,
15536
+ },
15537
+ ): Promise<any>;
15538
+
15539
+ /**
15540
+ * Sends a single message to event listeners within your extension/app or a different extension/app. Similar to {@link runtime.connect} but only sends a single message, with an optional response. If sending to your extension, the {@link runtime.onMessage} event will be fired in every frame of your extension (except for the sender's frame), or {@link runtime.onMessageExternal}, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use {@link tabs.sendMessage}.
15541
+ *
15542
+ * @chrome-returns-extra since Pending
15543
+ * @param message The message to send. This message should be a JSON-ifiable object.
15544
+ */
15545
+ export function sendMessage(
15546
+
15547
+ message: any,
15548
+
15549
+ options?: {
15550
+
15551
+ /**
15552
+ * Whether the TLS channel ID will be passed into onMessageExternal for processes that are listening for the connection event.
15553
+ */
15554
+ includeTlsChannelId?: boolean,
15555
+ },
15556
+ ): Promise<any>;
15557
+
15502
15558
  /**
15503
15559
  * Sends a single message to event listeners within your extension/app or a different extension/app. Similar to {@link runtime.connect} but only sends a single message, with an optional response. If sending to your extension, the {@link runtime.onMessage} event will be fired in every frame of your extension (except for the sender's frame), or {@link runtime.onMessageExternal}, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use {@link tabs.sendMessage}.
15504
15560
  *
@@ -15521,8 +15577,9 @@ declare namespace chrome {
15521
15577
 
15522
15578
  /**
15523
15579
  * @param response The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and {@link runtime.lastError} will be set to the error message.
15580
+ * @since Pending
15524
15581
  */
15525
- responseCallback?: (
15582
+ callback?: (
15526
15583
  response: any,
15527
15584
  ) => void,
15528
15585
  ): void;
@@ -15546,8 +15603,9 @@ declare namespace chrome {
15546
15603
 
15547
15604
  /**
15548
15605
  * @param response The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and {@link runtime.lastError} will be set to the error message.
15606
+ * @since Pending
15549
15607
  */
15550
- responseCallback?: (
15608
+ callback?: (
15551
15609
  response: any,
15552
15610
  ) => void,
15553
15611
  ): void;
@@ -17569,7 +17627,7 @@ declare namespace chrome {
17569
17627
  /**
17570
17628
  * The group's color.
17571
17629
  */
17572
- export type Color = "grey" | "blue" | "red" | "yellow" | "green" | "pink" | "purple" | "cyan";
17630
+ export type Color = "grey" | "blue" | "red" | "yellow" | "green" | "pink" | "purple" | "cyan" | "orange";
17573
17631
 
17574
17632
  export interface TabGroup {
17575
17633
 
@@ -18333,6 +18391,27 @@ declare namespace chrome {
18333
18391
  },
18334
18392
  ): runtime.Port;
18335
18393
 
18394
+ /**
18395
+ * Sends a single message to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The {@link runtime.onMessage} event is fired in each content script running in the specified tab for the current extension.
18396
+ *
18397
+ * @chrome-returns-extra since Pending
18398
+ * @param message The message to send. This message should be a JSON-ifiable object.
18399
+ */
18400
+ export function sendMessage(
18401
+
18402
+ tabId: number,
18403
+
18404
+ message: any,
18405
+
18406
+ options?: {
18407
+
18408
+ /**
18409
+ * Send a message to a specific [frame](https://developer.chrome.com/docs/extensions/reference/webNavigation/#frame_ids) identified by `frameId` instead of all frames in the tab.
18410
+ */
18411
+ frameId?: number,
18412
+ },
18413
+ ): Promise<any>;
18414
+
18336
18415
  /**
18337
18416
  * Sends a single message to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The {@link runtime.onMessage} event is fired in each content script running in the specified tab for the current extension.
18338
18417
  *
@@ -18354,8 +18433,9 @@ declare namespace chrome {
18354
18433
 
18355
18434
  /**
18356
18435
  * @param response The JSON response object sent by the handler of the message. If an error occurs while connecting to the specified tab, the callback is called with no arguments and {@link runtime.lastError} is set to the error message.
18436
+ * @since Pending
18357
18437
  */
18358
- responseCallback?: (
18438
+ callback?: (
18359
18439
  response: any,
18360
18440
  ) => void,
18361
18441
  ): void;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "module",
6
6
  "name": "chrome-types",
7
7
  "config": {
8
- "build-hash": "de94d779cadd0cb5"
8
+ "build-hash": "f90541d5ad8767fe"
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.71"
19
+ "version": "0.1.75"
20
20
  }