chrome-types 0.1.105 → 0.1.108

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 +147 -3
  2. package/index.d.ts +137 -3
  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 Apr 27 2022 22:29:20 GMT+0000 (Coordinated Universal Time)
18
- // Built at 31eab34a25bfaa9bba663c59fe9f30ebf66fa5ed
17
+ // Generated on Fri May 06 2022 22:29:08 GMT+0000 (Coordinated Universal Time)
18
+ // Built at 26ccfbe1726242734603208c6866138080086114
19
19
 
20
20
  // Includes all types, including MV2 + Platform Apps APIs.
21
21
 
@@ -9361,6 +9361,37 @@ declare namespace chrome {
9361
9361
  type: ResourceType;
9362
9362
  }
9363
9363
 
9364
+ /**
9365
+ * @since Pending
9366
+ */
9367
+ export interface TestMatchRequestDetails {
9368
+
9369
+ /**
9370
+ * The URL of the hypothetical request.
9371
+ */
9372
+ url: string;
9373
+
9374
+ /**
9375
+ * The initiator URL (if any) for the hypothetical request.
9376
+ */
9377
+ initiator?: string;
9378
+
9379
+ /**
9380
+ * Standard HTTP method of the hypothetical request. Defaults to "get" for HTTP requests and is ignored for non-HTTP requests.
9381
+ */
9382
+ method?: RequestMethod;
9383
+
9384
+ /**
9385
+ * The resource type of the hypothetical request.
9386
+ */
9387
+ type: ResourceType;
9388
+
9389
+ /**
9390
+ * The ID of the tab in which the hypothetical request takes place. Does not need to correspond to a real tab ID. Default is -1, meaning that the request isn't related to a tab.
9391
+ */
9392
+ tabId?: number;
9393
+ }
9394
+
9364
9395
  export interface MatchedRuleInfoDebug {
9365
9396
 
9366
9397
  rule: MatchedRule;
@@ -9405,6 +9436,17 @@ declare namespace chrome {
9405
9436
  reason?: UnsupportedRegexReason;
9406
9437
  }
9407
9438
 
9439
+ /**
9440
+ * @since Pending
9441
+ */
9442
+ export interface TestMatchOutcomeResult {
9443
+
9444
+ /**
9445
+ * The rules (if any) that match the hypothetical request.
9446
+ */
9447
+ matchedRules: MatchedRule[];
9448
+ }
9449
+
9408
9450
  /**
9409
9451
  * @since Chrome 87
9410
9452
  */
@@ -9794,6 +9836,31 @@ declare namespace chrome {
9794
9836
  count: number,
9795
9837
  ) => void,
9796
9838
  ): void;
9839
+
9840
+ /**
9841
+ * Checks if any of the extension's declarativeNetRequest rules would match a hypothetical request. Note: Only available for unpacked extensions as this is only intended to be used during extension development.
9842
+ *
9843
+ * @since Pending
9844
+ */
9845
+ export function testMatchOutcome(
9846
+
9847
+ request: TestMatchRequestDetails,
9848
+ ): Promise<TestMatchOutcomeResult>;
9849
+
9850
+ /**
9851
+ * Checks if any of the extension's declarativeNetRequest rules would match a hypothetical request. Note: Only available for unpacked extensions as this is only intended to be used during extension development.
9852
+ *
9853
+ * @param callback Called with the details of matched rules.
9854
+ * @since Pending
9855
+ */
9856
+ export function testMatchOutcome(
9857
+
9858
+ request: TestMatchRequestDetails,
9859
+
9860
+ callback?: (
9861
+ result: TestMatchOutcomeResult,
9862
+ ) => void,
9863
+ ): void;
9797
9864
  }
9798
9865
 
9799
9866
  /**
@@ -24922,6 +24989,13 @@ declare namespace chrome {
24922
24989
  socketId: number;
24923
24990
  }
24924
24991
 
24992
+ /**
24993
+ * DNS resolution preferences. The default is `any` and uses the current OS config which may return IPv4 or IPv6. `ipv4` forces IPv4, and `ipv6` forces IPv6.
24994
+ *
24995
+ * @since Pending
24996
+ */
24997
+ export type DnsQueryType = "any" | "ipv4" | "ipv6";
24998
+
24925
24999
  export interface SendInfo {
24926
25000
 
24927
25001
  /**
@@ -25172,6 +25246,36 @@ declare namespace chrome {
25172
25246
  ) => void,
25173
25247
  ): void;
25174
25248
 
25249
+ /**
25250
+ * Connects the socket to a remote machine. When the `connect` operation completes successfully, `onReceive` events are raised when data is received from the peer. If a network error occurs while the runtime is receiving packets, a `onReceiveError` event is raised, at which point no more `onReceive` event will be raised for this socket until the `resume` method is called.
25251
+ *
25252
+ * @param socketId The socket identifier.
25253
+ * @param peerAddress The address of the remote machine. DNS name, IPv4 and IPv6 formats are supported.
25254
+ * @param peerPort The port of the remote machine.
25255
+ * @param dnsQueryType The address resolution preference.
25256
+ * @param callback Called when the connect attempt is complete.
25257
+ */
25258
+ export function connect(
25259
+
25260
+ socketId: number,
25261
+
25262
+ peerAddress: string,
25263
+
25264
+ peerPort: number,
25265
+
25266
+ /**
25267
+ * @since Pending
25268
+ */
25269
+ dnsQueryType: DnsQueryType,
25270
+
25271
+ /**
25272
+ * @param result The result code returned from the underlying network call. A negative value indicates an error.
25273
+ */
25274
+ callback: (
25275
+ result: number,
25276
+ ) => void,
25277
+ ): void;
25278
+
25175
25279
  /**
25176
25280
  * Connects the socket to a remote machine. When the `connect` operation completes successfully, `onReceive` events are raised when data is received from the peer. If a network error occurs while the runtime is receiving packets, a `onReceiveError` event is raised, at which point no more `onReceive` event will be raised for this socket until the `resume` method is called.
25177
25281
  *
@@ -25620,6 +25724,13 @@ declare namespace chrome {
25620
25724
  socketId: number;
25621
25725
  }
25622
25726
 
25727
+ /**
25728
+ * DNS resolution preferences. The default is `any` and uses the current OS config which may return IPv4 or IPv6. `ipv4` forces IPv4, and `ipv6` forces IPv6.
25729
+ *
25730
+ * @since Pending
25731
+ */
25732
+ export type DnsQueryType = "any" | "ipv4" | "ipv6";
25733
+
25623
25734
  export interface SendInfo {
25624
25735
 
25625
25736
  /**
@@ -25811,6 +25922,39 @@ declare namespace chrome {
25811
25922
  ) => void,
25812
25923
  ): void;
25813
25924
 
25925
+ /**
25926
+ * Sends data on the given socket to the given address and port. The socket must be bound to a local port before calling this method.
25927
+ *
25928
+ * @param socketId The socket ID.
25929
+ * @param data The data to send.
25930
+ * @param address The address of the remote machine.
25931
+ * @param port The port of the remote machine.
25932
+ * @param dnsQueryType The address resolution preference.
25933
+ * @param callback Called when the `send` operation completes.
25934
+ */
25935
+ export function send(
25936
+
25937
+ socketId: number,
25938
+
25939
+ data: ArrayBuffer,
25940
+
25941
+ address: string,
25942
+
25943
+ port: number,
25944
+
25945
+ /**
25946
+ * @since Pending
25947
+ */
25948
+ dnsQueryType: DnsQueryType,
25949
+
25950
+ /**
25951
+ * @param sendInfo Result of the `send` method.
25952
+ */
25953
+ callback: (
25954
+ sendInfo: SendInfo,
25955
+ ) => void,
25956
+ ): void;
25957
+
25814
25958
  /**
25815
25959
  * Sends data on the given socket to the given address and port. The socket must be bound to a local port before calling this method.
25816
25960
  *
@@ -31766,7 +31910,7 @@ declare namespace chrome {
31766
31910
  matches?: string[];
31767
31911
 
31768
31912
  /**
31769
- * List of extension IDs the "resources" are accessible to.
31913
+ * List of extension IDs the "resources" are accessible to. A wildcard can be used, denoted by "\*".
31770
31914
  */
31771
31915
  extension_ids?: string[];
31772
31916
 
package/index.d.ts CHANGED
@@ -14,8 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- // Generated on Wed Apr 27 2022 22:29:15 GMT+0000 (Coordinated Universal Time)
18
- // Built at 31eab34a25bfaa9bba663c59fe9f30ebf66fa5ed
17
+ // Generated on Fri May 06 2022 22:29:04 GMT+0000 (Coordinated Universal Time)
18
+ // Built at 26ccfbe1726242734603208c6866138080086114
19
19
 
20
20
  // Includes MV3+ APIs only.
21
21
 
@@ -6164,6 +6164,37 @@ declare namespace chrome {
6164
6164
  type: ResourceType;
6165
6165
  }
6166
6166
 
6167
+ /**
6168
+ * @since Pending
6169
+ */
6170
+ export interface TestMatchRequestDetails {
6171
+
6172
+ /**
6173
+ * The URL of the hypothetical request.
6174
+ */
6175
+ url: string;
6176
+
6177
+ /**
6178
+ * The initiator URL (if any) for the hypothetical request.
6179
+ */
6180
+ initiator?: string;
6181
+
6182
+ /**
6183
+ * Standard HTTP method of the hypothetical request. Defaults to "get" for HTTP requests and is ignored for non-HTTP requests.
6184
+ */
6185
+ method?: RequestMethod;
6186
+
6187
+ /**
6188
+ * The resource type of the hypothetical request.
6189
+ */
6190
+ type: ResourceType;
6191
+
6192
+ /**
6193
+ * The ID of the tab in which the hypothetical request takes place. Does not need to correspond to a real tab ID. Default is -1, meaning that the request isn't related to a tab.
6194
+ */
6195
+ tabId?: number;
6196
+ }
6197
+
6167
6198
  export interface MatchedRuleInfoDebug {
6168
6199
 
6169
6200
  rule: MatchedRule;
@@ -6208,6 +6239,17 @@ declare namespace chrome {
6208
6239
  reason?: UnsupportedRegexReason;
6209
6240
  }
6210
6241
 
6242
+ /**
6243
+ * @since Pending
6244
+ */
6245
+ export interface TestMatchOutcomeResult {
6246
+
6247
+ /**
6248
+ * The rules (if any) that match the hypothetical request.
6249
+ */
6250
+ matchedRules: MatchedRule[];
6251
+ }
6252
+
6211
6253
  /**
6212
6254
  * @since Chrome 87
6213
6255
  */
@@ -6597,6 +6639,31 @@ declare namespace chrome {
6597
6639
  count: number,
6598
6640
  ) => void,
6599
6641
  ): void;
6642
+
6643
+ /**
6644
+ * Checks if any of the extension's declarativeNetRequest rules would match a hypothetical request. Note: Only available for unpacked extensions as this is only intended to be used during extension development.
6645
+ *
6646
+ * @since Pending
6647
+ */
6648
+ export function testMatchOutcome(
6649
+
6650
+ request: TestMatchRequestDetails,
6651
+ ): Promise<TestMatchOutcomeResult>;
6652
+
6653
+ /**
6654
+ * Checks if any of the extension's declarativeNetRequest rules would match a hypothetical request. Note: Only available for unpacked extensions as this is only intended to be used during extension development.
6655
+ *
6656
+ * @param callback Called with the details of matched rules.
6657
+ * @since Pending
6658
+ */
6659
+ export function testMatchOutcome(
6660
+
6661
+ request: TestMatchRequestDetails,
6662
+
6663
+ callback?: (
6664
+ result: TestMatchOutcomeResult,
6665
+ ) => void,
6666
+ ): void;
6600
6667
  }
6601
6668
 
6602
6669
  /**
@@ -18729,6 +18796,11 @@ declare namespace chrome {
18729
18796
  socketId: number;
18730
18797
  }
18731
18798
 
18799
+ /**
18800
+ * DNS resolution preferences. The default is `any` and uses the current OS config which may return IPv4 or IPv6. `ipv4` forces IPv4, and `ipv6` forces IPv6.
18801
+ */
18802
+ export type DnsQueryType = "any" | "ipv4" | "ipv6";
18803
+
18732
18804
  export interface SendInfo {
18733
18805
 
18734
18806
  /**
@@ -18979,6 +19051,33 @@ declare namespace chrome {
18979
19051
  ) => void,
18980
19052
  ): void;
18981
19053
 
19054
+ /**
19055
+ * Connects the socket to a remote machine. When the `connect` operation completes successfully, `onReceive` events are raised when data is received from the peer. If a network error occurs while the runtime is receiving packets, a `onReceiveError` event is raised, at which point no more `onReceive` event will be raised for this socket until the `resume` method is called.
19056
+ *
19057
+ * @param socketId The socket identifier.
19058
+ * @param peerAddress The address of the remote machine. DNS name, IPv4 and IPv6 formats are supported.
19059
+ * @param peerPort The port of the remote machine.
19060
+ * @param dnsQueryType The address resolution preference.
19061
+ * @param callback Called when the connect attempt is complete.
19062
+ */
19063
+ export function connect(
19064
+
19065
+ socketId: number,
19066
+
19067
+ peerAddress: string,
19068
+
19069
+ peerPort: number,
19070
+
19071
+ dnsQueryType: DnsQueryType,
19072
+
19073
+ /**
19074
+ * @param result The result code returned from the underlying network call. A negative value indicates an error.
19075
+ */
19076
+ callback: (
19077
+ result: number,
19078
+ ) => void,
19079
+ ): void;
19080
+
18982
19081
  /**
18983
19082
  * Connects the socket to a remote machine. When the `connect` operation completes successfully, `onReceive` events are raised when data is received from the peer. If a network error occurs while the runtime is receiving packets, a `onReceiveError` event is raised, at which point no more `onReceive` event will be raised for this socket until the `resume` method is called.
18984
19083
  *
@@ -19433,6 +19532,11 @@ declare namespace chrome {
19433
19532
  socketId: number;
19434
19533
  }
19435
19534
 
19535
+ /**
19536
+ * DNS resolution preferences. The default is `any` and uses the current OS config which may return IPv4 or IPv6. `ipv4` forces IPv4, and `ipv6` forces IPv6.
19537
+ */
19538
+ export type DnsQueryType = "any" | "ipv4" | "ipv6";
19539
+
19436
19540
  export interface SendInfo {
19437
19541
 
19438
19542
  /**
@@ -19624,6 +19728,36 @@ declare namespace chrome {
19624
19728
  ) => void,
19625
19729
  ): void;
19626
19730
 
19731
+ /**
19732
+ * Sends data on the given socket to the given address and port. The socket must be bound to a local port before calling this method.
19733
+ *
19734
+ * @param socketId The socket ID.
19735
+ * @param data The data to send.
19736
+ * @param address The address of the remote machine.
19737
+ * @param port The port of the remote machine.
19738
+ * @param dnsQueryType The address resolution preference.
19739
+ * @param callback Called when the `send` operation completes.
19740
+ */
19741
+ export function send(
19742
+
19743
+ socketId: number,
19744
+
19745
+ data: ArrayBuffer,
19746
+
19747
+ address: string,
19748
+
19749
+ port: number,
19750
+
19751
+ dnsQueryType: DnsQueryType,
19752
+
19753
+ /**
19754
+ * @param sendInfo Result of the `send` method.
19755
+ */
19756
+ callback: (
19757
+ sendInfo: SendInfo,
19758
+ ) => void,
19759
+ ): void;
19760
+
19627
19761
  /**
19628
19762
  * Sends data on the given socket to the given address and port. The socket must be bound to a local port before calling this method.
19629
19763
  *
@@ -25010,7 +25144,7 @@ declare namespace chrome {
25010
25144
  matches?: string[];
25011
25145
 
25012
25146
  /**
25013
- * List of extension IDs the "resources" are accessible to.
25147
+ * List of extension IDs the "resources" are accessible to. A wildcard can be used, denoted by "\*".
25014
25148
  */
25015
25149
  extension_ids?: string[];
25016
25150
 
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "module",
6
6
  "name": "chrome-types",
7
7
  "config": {
8
- "build-hash": "2e75d8c43482ac10"
8
+ "build-hash": "c775af485d60fbd2"
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.105"
19
+ "version": "0.1.108"
20
20
  }