chrome-types 0.1.74 → 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 +117 -8
  2. package/index.d.ts +70 -5
  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 Wed Dec 15 2021 22:29:07 GMT+0000 (Coordinated Universal Time)
18
- // Built at 3b76b1d66afc55f20ba6462f45fbafd2d3d026d6
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;
@@ -22603,6 +22632,47 @@ declare namespace chrome {
22603
22632
  application: string,
22604
22633
  ): Port;
22605
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
+
22606
22676
  /**
22607
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}.
22608
22678
  *
@@ -22625,8 +22695,9 @@ declare namespace chrome {
22625
22695
 
22626
22696
  /**
22627
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
22628
22699
  */
22629
- responseCallback?: (
22700
+ callback?: (
22630
22701
  response: any,
22631
22702
  ) => void,
22632
22703
  ): void;
@@ -22650,8 +22721,9 @@ declare namespace chrome {
22650
22721
 
22651
22722
  /**
22652
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
22653
22725
  */
22654
- responseCallback?: (
22726
+ callback?: (
22655
22727
  response: any,
22656
22728
  ) => void,
22657
22729
  ): void;
@@ -27954,6 +28026,20 @@ declare namespace chrome {
27954
28026
  },
27955
28027
  ): runtime.Port;
27956
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
+
27957
28043
  /**
27958
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.
27959
28045
  *
@@ -27968,12 +28054,34 @@ declare namespace chrome {
27968
28054
 
27969
28055
  /**
27970
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
27971
28058
  */
27972
- responseCallback?: (
28059
+ callback?: (
27973
28060
  response: any,
27974
28061
  ) => void,
27975
28062
  ): void;
27976
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
+
27977
28085
  /**
27978
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.
27979
28087
  *
@@ -27995,8 +28103,9 @@ declare namespace chrome {
27995
28103
 
27996
28104
  /**
27997
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
27998
28107
  */
27999
- responseCallback?: (
28108
+ callback?: (
28000
28109
  response: any,
28001
28110
  ) => void,
28002
28111
  ): void;
package/index.d.ts CHANGED
@@ -14,8 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- // Generated on Wed Dec 15 2021 22:29:01 GMT+0000 (Coordinated Universal Time)
18
- // Built at 3b76b1d66afc55f20ba6462f45fbafd2d3d026d6
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
 
@@ -15514,6 +15514,47 @@ declare namespace chrome {
15514
15514
  application: string,
15515
15515
  ): Port;
15516
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
+
15517
15558
  /**
15518
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}.
15519
15560
  *
@@ -15536,8 +15577,9 @@ declare namespace chrome {
15536
15577
 
15537
15578
  /**
15538
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
15539
15581
  */
15540
- responseCallback?: (
15582
+ callback?: (
15541
15583
  response: any,
15542
15584
  ) => void,
15543
15585
  ): void;
@@ -15561,8 +15603,9 @@ declare namespace chrome {
15561
15603
 
15562
15604
  /**
15563
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
15564
15607
  */
15565
- responseCallback?: (
15608
+ callback?: (
15566
15609
  response: any,
15567
15610
  ) => void,
15568
15611
  ): void;
@@ -18348,6 +18391,27 @@ declare namespace chrome {
18348
18391
  },
18349
18392
  ): runtime.Port;
18350
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
+
18351
18415
  /**
18352
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.
18353
18417
  *
@@ -18369,8 +18433,9 @@ declare namespace chrome {
18369
18433
 
18370
18434
  /**
18371
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
18372
18437
  */
18373
- responseCallback?: (
18438
+ callback?: (
18374
18439
  response: any,
18375
18440
  ) => void,
18376
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": "5dbc01a35996ed47"
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.74"
19
+ "version": "0.1.75"
20
20
  }