chrome-types 0.1.207 → 0.1.209

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 +415 -89
  2. package/index.d.ts +6 -4
  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 Tue Jun 20 2023 22:30:02 GMT+0000 (Coordinated Universal Time)
18
- // Built at 02414af8e71af39ab91eaedd45e18bc09437d537
17
+ // Generated on Fri Jun 23 2023 22:29:27 GMT+0000 (Coordinated Universal Time)
18
+ // Built at 899323e36e4d7ae713b9b39016ef1837c9abe79a
19
19
 
20
20
  // Includes all types, including MV2 + Platform Apps APIs.
21
21
 
@@ -1612,6 +1612,22 @@ declare namespace chrome {
1612
1612
  */
1613
1613
  export const onRestored: events.Event<() => void>;
1614
1614
 
1615
+ /**
1616
+ * The size and position of a window can be specified in a number of different ways. The most simple option is not specifying anything at all, in which case a default size and platform dependent position will be used.
1617
+ *
1618
+ * To set the position, size and constraints of the window, use the `innerBounds` or `outerBounds` properties. Inner bounds do not include window decorations. Outer bounds include the window's title bar and frame. Note that the padding between the inner and outer bounds is determined by the OS. Therefore setting the same property for both inner and outer bounds is considered an error (for example, setting both `innerBounds.left` and `outerBounds.left`).
1619
+ *
1620
+ * To automatically remember the positions of windows you can give them ids. If a window has an id, This id is used to remember the size and position of the window whenever it is moved or resized. This size and position is then used instead of the specified bounds on subsequent opening of a window with the same id. If you need to open a window with an id at a location other than the remembered default, you can create it hidden, move it to the desired location, then show it.
1621
+ *
1622
+ * @chrome-returns-extra since Pending
1623
+ */
1624
+ export function create(
1625
+
1626
+ url: string,
1627
+
1628
+ options?: CreateWindowOptions,
1629
+ ): Promise<AppWindow>;
1630
+
1615
1631
  /**
1616
1632
  * The size and position of a window can be specified in a number of different ways. The most simple option is not specifying anything at all, in which case a default size and platform dependent position will be used.
1617
1633
  *
@@ -4422,6 +4438,17 @@ declare namespace chrome {
4422
4438
  url: string;
4423
4439
  }
4424
4440
 
4441
+ /**
4442
+ * Opens a new tab in a browser window associated with the current application and Chrome profile. If no browser window for the Chrome profile is opened, a new one is opened prior to creating the new tab.
4443
+ *
4444
+ * @chrome-returns-extra since Pending
4445
+ * @param options Configures how the tab should be opened.
4446
+ */
4447
+ export function openTab(
4448
+
4449
+ options: OpenTabOptions,
4450
+ ): Promise<void>;
4451
+
4425
4452
  /**
4426
4453
  * Opens a new tab in a browser window associated with the current application and Chrome profile. If no browser window for the Chrome profile is opened, a new one is opened prior to creating the new tab.
4427
4454
  *
@@ -12421,36 +12448,66 @@ declare namespace chrome {
12421
12448
 
12422
12449
  /**
12423
12450
  * Get the display path of an Entry object. The display path is based on the full path of the file or directory on the local file system, but may be made more readable for display purposes.
12451
+ *
12452
+ * @chrome-returns-extra since Pending
12424
12453
  */
12425
12454
  export function getDisplayPath(
12426
12455
 
12427
12456
  entry: Entry,
12457
+ ): Promise<string>;
12428
12458
 
12429
- callback: (
12459
+ /**
12460
+ * Get the display path of an Entry object. The display path is based on the full path of the file or directory on the local file system, but may be made more readable for display purposes.
12461
+ */
12462
+ export function getDisplayPath(
12463
+
12464
+ entry: Entry,
12465
+
12466
+ callback?: (
12430
12467
  displayPath: string,
12431
12468
  ) => void,
12432
12469
  ): void;
12433
12470
 
12434
12471
  /**
12435
12472
  * Get a writable Entry from another Entry. This call will fail with a runtime error if the application does not have the 'write' permission under 'fileSystem'. If entry is a DirectoryEntry, this call will fail if the application does not have the 'directory' permission under 'fileSystem'.
12473
+ *
12474
+ * @chrome-returns-extra since Pending
12436
12475
  */
12437
12476
  export function getWritableEntry(
12438
12477
 
12439
12478
  entry: Entry,
12479
+ ): Promise<Entry>;
12440
12480
 
12441
- callback: (
12481
+ /**
12482
+ * Get a writable Entry from another Entry. This call will fail with a runtime error if the application does not have the 'write' permission under 'fileSystem'. If entry is a DirectoryEntry, this call will fail if the application does not have the 'directory' permission under 'fileSystem'.
12483
+ */
12484
+ export function getWritableEntry(
12485
+
12486
+ entry: Entry,
12487
+
12488
+ callback?: (
12442
12489
  entry: Entry,
12443
12490
  ) => void,
12444
12491
  ): void;
12445
12492
 
12446
12493
  /**
12447
12494
  * Gets whether this Entry is writable or not.
12495
+ *
12496
+ * @chrome-returns-extra since Pending
12448
12497
  */
12449
12498
  export function isWritableEntry(
12450
12499
 
12451
12500
  entry: Entry,
12501
+ ): Promise<boolean>;
12452
12502
 
12453
- callback: (
12503
+ /**
12504
+ * Gets whether this Entry is writable or not.
12505
+ */
12506
+ export function isWritableEntry(
12507
+
12508
+ entry: Entry,
12509
+
12510
+ callback?: (
12454
12511
  isWritable: boolean,
12455
12512
  ) => void,
12456
12513
  ): void;
@@ -12493,12 +12550,22 @@ declare namespace chrome {
12493
12550
 
12494
12551
  /**
12495
12552
  * Returns whether the app has permission to restore the entry with the given id.
12553
+ *
12554
+ * @chrome-returns-extra since Pending
12496
12555
  */
12497
12556
  export function isRestorable(
12498
12557
 
12499
12558
  id: string,
12559
+ ): Promise<boolean>;
12500
12560
 
12501
- callback: (
12561
+ /**
12562
+ * Returns whether the app has permission to restore the entry with the given id.
12563
+ */
12564
+ export function isRestorable(
12565
+
12566
+ id: string,
12567
+
12568
+ callback?: (
12502
12569
  isRestorable: boolean,
12503
12570
  ) => void,
12504
12571
  ): void;
@@ -12514,17 +12581,36 @@ declare namespace chrome {
12514
12581
  /**
12515
12582
  * Requests access to a file system for a volume represented by `options.volumeId`. If `options.writable` is set to true, then the file system will be writable. Otherwise, it will be read-only. The `writable` option requires the `"fileSystem": {"write"}` permission in the manifest. Available to kiosk apps running in kiosk session only. For manual-launch kiosk mode, a confirmation dialog will be shown on top of the active app window. In case of an error, `fileSystem` will be undefined, and `chrome.runtime.lastError` will be set.
12516
12583
  *
12584
+ * @chrome-returns-extra since Pending
12517
12585
  * @since Chrome 44
12518
12586
  */
12519
12587
  export function requestFileSystem(
12520
12588
 
12521
12589
  options: RequestFileSystemOptions,
12590
+ ): Promise<FileSystem | undefined>;
12522
12591
 
12523
- callback: (
12592
+ /**
12593
+ * Requests access to a file system for a volume represented by `options.volumeId`. If `options.writable` is set to true, then the file system will be writable. Otherwise, it will be read-only. The `writable` option requires the `"fileSystem": {"write"}` permission in the manifest. Available to kiosk apps running in kiosk session only. For manual-launch kiosk mode, a confirmation dialog will be shown on top of the active app window. In case of an error, `fileSystem` will be undefined, and `chrome.runtime.lastError` will be set.
12594
+ *
12595
+ * @since Chrome 44
12596
+ */
12597
+ export function requestFileSystem(
12598
+
12599
+ options: RequestFileSystemOptions,
12600
+
12601
+ callback?: (
12524
12602
  fileSystem?: FileSystem,
12525
12603
  ) => void,
12526
12604
  ): void;
12527
12605
 
12606
+ /**
12607
+ * Returns a list of volumes available for `requestFileSystem()`. The `"fileSystem": {"requestFileSystem"}` manifest permission is required. Available to kiosk apps running in the kiosk session only. In case of an error, `volumes` will be undefined, and `chrome.runtime.lastError` will be set.
12608
+ *
12609
+ * @chrome-returns-extra since Pending
12610
+ * @since Chrome 44
12611
+ */
12612
+ export function getVolumeList(): Promise<Volume[] | undefined>;
12613
+
12528
12614
  /**
12529
12615
  * Returns a list of volumes available for `requestFileSystem()`. The `"fileSystem": {"requestFileSystem"}` manifest permission is required. Available to kiosk apps running in the kiosk session only. In case of an error, `volumes` will be undefined, and `chrome.runtime.lastError` will be set.
12530
12616
  *
@@ -12532,7 +12618,7 @@ declare namespace chrome {
12532
12618
  */
12533
12619
  export function getVolumeList(
12534
12620
 
12535
- callback: (
12621
+ callback?: (
12536
12622
  volumes?: Volume[],
12537
12623
  ) => void,
12538
12624
  ): void;
@@ -14602,13 +14688,24 @@ declare namespace chrome {
14602
14688
  /**
14603
14689
  * Enumerate connected HID devices.
14604
14690
  *
14691
+ * @chrome-returns-extra since Pending
14605
14692
  * @param options The properties to search for on target devices.
14606
14693
  */
14607
14694
  export function getDevices(
14608
14695
 
14609
14696
  options: GetDevicesOptions,
14697
+ ): Promise<HidDeviceInfo[]>;
14610
14698
 
14611
- callback: (
14699
+ /**
14700
+ * Enumerate connected HID devices.
14701
+ *
14702
+ * @param options The properties to search for on target devices.
14703
+ */
14704
+ export function getDevices(
14705
+
14706
+ options: GetDevicesOptions,
14707
+
14708
+ callback?: (
14612
14709
  devices: HidDeviceInfo[],
14613
14710
  ) => void,
14614
14711
  ): void;
@@ -14616,17 +14713,39 @@ declare namespace chrome {
14616
14713
  /**
14617
14714
  * Open a connection to an HID device for communication.
14618
14715
  *
14716
+ * @chrome-returns-extra since Pending
14619
14717
  * @param deviceId The {@link HidDeviceInfo.deviceId} of the device to open.
14620
14718
  */
14621
14719
  export function connect(
14622
14720
 
14623
14721
  deviceId: number,
14722
+ ): Promise<HidConnectInfo>;
14624
14723
 
14625
- callback: (
14724
+ /**
14725
+ * Open a connection to an HID device for communication.
14726
+ *
14727
+ * @param deviceId The {@link HidDeviceInfo.deviceId} of the device to open.
14728
+ */
14729
+ export function connect(
14730
+
14731
+ deviceId: number,
14732
+
14733
+ callback?: (
14626
14734
  connection: HidConnectInfo,
14627
14735
  ) => void,
14628
14736
  ): void;
14629
14737
 
14738
+ /**
14739
+ * Disconnect from a device. Invoking operations on a device after calling this is safe but has no effect.
14740
+ *
14741
+ * @chrome-returns-extra since Pending
14742
+ * @param connectionId The `connectionId` returned by {@link connect}.
14743
+ */
14744
+ export function disconnect(
14745
+
14746
+ connectionId: number,
14747
+ ): Promise<void>;
14748
+
14630
14749
  /**
14631
14750
  * Disconnect from a device. Invoking operations on a device after calling this is safe but has no effect.
14632
14751
  *
@@ -14663,6 +14782,7 @@ declare namespace chrome {
14663
14782
  *
14664
14783
  * _Note:_ Do not include a report ID prefix in `data`. It will be added if necessary.
14665
14784
  *
14785
+ * @chrome-returns-extra since Pending
14666
14786
  * @param connectionId The `connectionId` returned by {@link connect}.
14667
14787
  * @param reportId The report ID to use, or `0` if none.
14668
14788
  * @param data The report data.
@@ -14674,10 +14794,42 @@ declare namespace chrome {
14674
14794
  reportId: number,
14675
14795
 
14676
14796
  data: ArrayBuffer,
14797
+ ): Promise<void>;
14798
+
14799
+ /**
14800
+ * Send an output report to the device.
14801
+ *
14802
+ * _Note:_ Do not include a report ID prefix in `data`. It will be added if necessary.
14803
+ *
14804
+ * @param connectionId The `connectionId` returned by {@link connect}.
14805
+ * @param reportId The report ID to use, or `0` if none.
14806
+ * @param data The report data.
14807
+ */
14808
+ export function send(
14677
14809
 
14678
- callback: () => void,
14810
+ connectionId: number,
14811
+
14812
+ reportId: number,
14813
+
14814
+ data: ArrayBuffer,
14815
+
14816
+ callback?: () => void,
14679
14817
  ): void;
14680
14818
 
14819
+ /**
14820
+ * Request a feature report from the device.
14821
+ *
14822
+ * @chrome-returns-extra since Pending
14823
+ * @param connectionId The `connectionId` returned by {@link connect}.
14824
+ * @param reportId The report ID, or `0` if none.
14825
+ */
14826
+ export function receiveFeatureReport(
14827
+
14828
+ connectionId: number,
14829
+
14830
+ reportId: number,
14831
+ ): Promise<ArrayBuffer>;
14832
+
14681
14833
  /**
14682
14834
  * Request a feature report from the device.
14683
14835
  *
@@ -14693,7 +14845,7 @@ declare namespace chrome {
14693
14845
  /**
14694
14846
  * @param data The report data, including a report ID prefix if one is sent by the device.
14695
14847
  */
14696
- callback: (
14848
+ callback?: (
14697
14849
  data: ArrayBuffer,
14698
14850
  ) => void,
14699
14851
  ): void;
@@ -14703,6 +14855,7 @@ declare namespace chrome {
14703
14855
  *
14704
14856
  * _Note:_ Do not include a report ID prefix in `data`. It will be added if necessary.
14705
14857
  *
14858
+ * @chrome-returns-extra since Pending
14706
14859
  * @param connectionId The `connectionId` returned by {@link connect}.
14707
14860
  * @param reportId The report ID to use, or `0` if none.
14708
14861
  * @param data The report data.
@@ -14714,8 +14867,26 @@ declare namespace chrome {
14714
14867
  reportId: number,
14715
14868
 
14716
14869
  data: ArrayBuffer,
14870
+ ): Promise<void>;
14717
14871
 
14718
- callback: () => void,
14872
+ /**
14873
+ * Send a feature report to the device.
14874
+ *
14875
+ * _Note:_ Do not include a report ID prefix in `data`. It will be added if necessary.
14876
+ *
14877
+ * @param connectionId The `connectionId` returned by {@link connect}.
14878
+ * @param reportId The report ID to use, or `0` if none.
14879
+ * @param data The report data.
14880
+ */
14881
+ export function sendFeatureReport(
14882
+
14883
+ connectionId: number,
14884
+
14885
+ reportId: number,
14886
+
14887
+ data: ArrayBuffer,
14888
+
14889
+ callback?: () => void,
14719
14890
  ): void;
14720
14891
  }
14721
14892
 
@@ -17580,54 +17751,6 @@ declare namespace chrome {
17580
17751
  ) => void,
17581
17752
  ): void;
17582
17753
 
17583
- /**
17584
- * Checks if the replacement android app can be installed. Errors generated by this API are reported by setting {@link runtime.lastError} and executing the function's regular callback.
17585
- *
17586
- * @alpha
17587
- * @chrome-manifest replacement_android_app
17588
- * @chrome-channel trunk
17589
- * @chrome-platform-apps
17590
- */
17591
- export function canInstallReplacementAndroidApp(): Promise<boolean>;
17592
-
17593
- /**
17594
- * Checks if the replacement android app can be installed. Errors generated by this API are reported by setting {@link runtime.lastError} and executing the function's regular callback.
17595
- *
17596
- * @alpha
17597
- * @chrome-manifest replacement_android_app
17598
- * @chrome-channel trunk
17599
- * @chrome-platform-apps
17600
- */
17601
- export function canInstallReplacementAndroidApp(
17602
-
17603
- callback?: (
17604
- result: boolean,
17605
- ) => void,
17606
- ): void;
17607
-
17608
- /**
17609
- * Prompts the user to install the replacement Android app from the manifest. Errors generated by this API are reported by setting {@link runtime.lastError} and executing the function's regular callback.
17610
- *
17611
- * @alpha
17612
- * @chrome-manifest replacement_android_app
17613
- * @chrome-channel trunk
17614
- * @chrome-platform-apps
17615
- */
17616
- export function installReplacementAndroidApp(): Promise<void>;
17617
-
17618
- /**
17619
- * Prompts the user to install the replacement Android app from the manifest. Errors generated by this API are reported by setting {@link runtime.lastError} and executing the function's regular callback.
17620
- *
17621
- * @alpha
17622
- * @chrome-manifest replacement_android_app
17623
- * @chrome-channel trunk
17624
- * @chrome-platform-apps
17625
- */
17626
- export function installReplacementAndroidApp(
17627
-
17628
- callback?: () => void,
17629
- ): void;
17630
-
17631
17754
  /**
17632
17755
  * Launches the replacement\_web\_app specified in the manifest. Prompts the user to install if not already installed.
17633
17756
  *
@@ -21288,6 +21411,8 @@ declare namespace chrome {
21288
21411
 
21289
21412
  /**
21290
21413
  * Print ticket in [CJT format](https://developers.google.com/cloud-print/docs/cdd#cjt).
21414
+ *
21415
+ * The CJT reference is marked as deprecated. It is deprecated for Google Cloud Print only. is not deprecated for ChromeOS printing.
21291
21416
  */
21292
21417
  ticket: {[name: string]: any};
21293
21418
 
@@ -21494,7 +21619,7 @@ declare namespace chrome {
21494
21619
  ) => void>;
21495
21620
 
21496
21621
  /**
21497
- * Submits the job for print. If the extension is not listed in PrintingAPIExtensionsAllowlist policy, the user will be prompted to accept the print job.
21622
+ * Submits the job for print. Use the [`PrintingAPIExtensionsAllowlist`](https://chromeenterprise.google/policies/#PrintingAPIExtensionsAllowlist) to bypass promting the user to confirm printing.
21498
21623
  *
21499
21624
  * @chrome-returns-extra since Chrome 100
21500
21625
  */
@@ -21504,7 +21629,7 @@ declare namespace chrome {
21504
21629
  ): Promise<SubmitJobResponse>;
21505
21630
 
21506
21631
  /**
21507
- * Submits the job for print. If the extension is not listed in PrintingAPIExtensionsAllowlist policy, the user will be prompted to accept the print job.
21632
+ * Submits the job for print. Use the [`PrintingAPIExtensionsAllowlist`](https://chromeenterprise.google/policies/#PrintingAPIExtensionsAllowlist) to bypass promting the user to confirm printing.
21508
21633
  */
21509
21634
  export function submitJob(
21510
21635
 
@@ -23818,6 +23943,13 @@ declare namespace chrome {
23818
23943
  info: ReceiveErrorInfo,
23819
23944
  ) => void>;
23820
23945
 
23946
+ /**
23947
+ * Returns information about available serial devices on the system. The list is regenerated each time this method is called.
23948
+ *
23949
+ * @chrome-returns-extra since Pending
23950
+ */
23951
+ export function getDevices(): Promise<DeviceInfo[]>;
23952
+
23821
23953
  /**
23822
23954
  * Returns information about available serial devices on the system. The list is regenerated each time this method is called.
23823
23955
  *
@@ -23825,7 +23957,7 @@ declare namespace chrome {
23825
23957
  */
23826
23958
  export function getDevices(
23827
23959
 
23828
- callback: (
23960
+ callback?: (
23829
23961
  ports: DeviceInfo[],
23830
23962
  ) => void,
23831
23963
  ): void;
@@ -23833,36 +23965,49 @@ declare namespace chrome {
23833
23965
  /**
23834
23966
  * Connects to a given serial port.
23835
23967
  *
23968
+ * @chrome-returns-extra since Pending
23836
23969
  * @param path The system path of the serial port to open.
23837
23970
  * @param options Port configuration options.
23838
- * @param callback Called when the connection has been opened.
23839
23971
  */
23840
23972
  export function connect(
23841
23973
 
23842
23974
  path: string,
23843
23975
 
23844
- options: ConnectionOptions,
23845
-
23846
- callback: (
23847
- connectionInfo: ConnectionInfo,
23848
- ) => void,
23849
- ): void;
23976
+ options?: ConnectionOptions,
23977
+ ): Promise<ConnectionInfo>;
23850
23978
 
23851
23979
  /**
23852
23980
  * Connects to a given serial port.
23853
23981
  *
23854
23982
  * @param path The system path of the serial port to open.
23983
+ * @param options Port configuration options.
23855
23984
  * @param callback Called when the connection has been opened.
23856
23985
  */
23857
23986
  export function connect(
23858
23987
 
23859
23988
  path: string,
23860
23989
 
23861
- callback: (
23990
+ options?: ConnectionOptions,
23991
+
23992
+ callback?: (
23862
23993
  connectionInfo: ConnectionInfo,
23863
23994
  ) => void,
23864
23995
  ): void;
23865
23996
 
23997
+ /**
23998
+ * Update the option settings on an open serial port connection.
23999
+ *
24000
+ * @chrome-returns-extra since Pending
24001
+ * @param connectionId The id of the opened connection.
24002
+ * @param options Port configuration options.
24003
+ */
24004
+ export function update(
24005
+
24006
+ connectionId: number,
24007
+
24008
+ options: ConnectionOptions,
24009
+ ): Promise<boolean>;
24010
+
23866
24011
  /**
23867
24012
  * Update the option settings on an open serial port connection.
23868
24013
  *
@@ -23876,11 +24021,22 @@ declare namespace chrome {
23876
24021
 
23877
24022
  options: ConnectionOptions,
23878
24023
 
23879
- callback: (
24024
+ callback?: (
23880
24025
  result: boolean,
23881
24026
  ) => void,
23882
24027
  ): void;
23883
24028
 
24029
+ /**
24030
+ * Disconnects from a serial port.
24031
+ *
24032
+ * @chrome-returns-extra since Pending
24033
+ * @param connectionId The id of the opened connection.
24034
+ */
24035
+ export function disconnect(
24036
+
24037
+ connectionId: number,
24038
+ ): Promise<boolean>;
24039
+
23884
24040
  /**
23885
24041
  * Disconnects from a serial port.
23886
24042
  *
@@ -23891,11 +24047,25 @@ declare namespace chrome {
23891
24047
 
23892
24048
  connectionId: number,
23893
24049
 
23894
- callback: (
24050
+ callback?: (
23895
24051
  result: boolean,
23896
24052
  ) => void,
23897
24053
  ): void;
23898
24054
 
24055
+ /**
24056
+ * Pauses or unpauses an open connection.
24057
+ *
24058
+ * @chrome-returns-extra since Pending
24059
+ * @param connectionId The id of the opened connection.
24060
+ * @param paused Flag to indicate whether to pause or unpause.
24061
+ */
24062
+ export function setPaused(
24063
+
24064
+ connectionId: number,
24065
+
24066
+ paused: boolean,
24067
+ ): Promise<void>;
24068
+
23899
24069
  /**
23900
24070
  * Pauses or unpauses an open connection.
23901
24071
  *
@@ -23909,9 +24079,20 @@ declare namespace chrome {
23909
24079
 
23910
24080
  paused: boolean,
23911
24081
 
23912
- callback: () => void,
24082
+ callback?: () => void,
23913
24083
  ): void;
23914
24084
 
24085
+ /**
24086
+ * Retrieves the state of a given connection.
24087
+ *
24088
+ * @chrome-returns-extra since Pending
24089
+ * @param connectionId The id of the opened connection.
24090
+ */
24091
+ export function getInfo(
24092
+
24093
+ connectionId: number,
24094
+ ): Promise<ConnectionInfo>;
24095
+
23915
24096
  /**
23916
24097
  * Retrieves the state of a given connection.
23917
24098
  *
@@ -23922,11 +24103,18 @@ declare namespace chrome {
23922
24103
 
23923
24104
  connectionId: number,
23924
24105
 
23925
- callback: (
24106
+ callback?: (
23926
24107
  connectionInfo: ConnectionInfo,
23927
24108
  ) => void,
23928
24109
  ): void;
23929
24110
 
24111
+ /**
24112
+ * Retrieves the list of currently opened serial port connections owned by the application.
24113
+ *
24114
+ * @chrome-returns-extra since Pending
24115
+ */
24116
+ export function getConnections(): Promise<ConnectionInfo[]>;
24117
+
23930
24118
  /**
23931
24119
  * Retrieves the list of currently opened serial port connections owned by the application.
23932
24120
  *
@@ -23934,11 +24122,25 @@ declare namespace chrome {
23934
24122
  */
23935
24123
  export function getConnections(
23936
24124
 
23937
- callback: (
24125
+ callback?: (
23938
24126
  connectionInfos: ConnectionInfo[],
23939
24127
  ) => void,
23940
24128
  ): void;
23941
24129
 
24130
+ /**
24131
+ * Writes data to the given connection.
24132
+ *
24133
+ * @chrome-returns-extra since Pending
24134
+ * @param connectionId The id of the connection.
24135
+ * @param data The data to send.
24136
+ */
24137
+ export function send(
24138
+
24139
+ connectionId: number,
24140
+
24141
+ data: ArrayBuffer,
24142
+ ): Promise<SendInfo>;
24143
+
23942
24144
  /**
23943
24145
  * Writes data to the given connection.
23944
24146
  *
@@ -23952,23 +24154,44 @@ declare namespace chrome {
23952
24154
 
23953
24155
  data: ArrayBuffer,
23954
24156
 
23955
- callback: (
24157
+ callback?: (
23956
24158
  sendInfo: SendInfo,
23957
24159
  ) => void,
23958
24160
  ): void;
23959
24161
 
23960
24162
  /**
23961
24163
  * Flushes all bytes in the given connection's input and output buffers.
24164
+ *
24165
+ * @chrome-returns-extra since Pending
23962
24166
  */
23963
24167
  export function flush(
23964
24168
 
23965
24169
  connectionId: number,
24170
+ ): Promise<boolean>;
23966
24171
 
23967
- callback: (
24172
+ /**
24173
+ * Flushes all bytes in the given connection's input and output buffers.
24174
+ */
24175
+ export function flush(
24176
+
24177
+ connectionId: number,
24178
+
24179
+ callback?: (
23968
24180
  result: boolean,
23969
24181
  ) => void,
23970
24182
  ): void;
23971
24183
 
24184
+ /**
24185
+ * Retrieves the state of control signals on a given connection.
24186
+ *
24187
+ * @chrome-returns-extra since Pending
24188
+ * @param connectionId The id of the connection.
24189
+ */
24190
+ export function getControlSignals(
24191
+
24192
+ connectionId: number,
24193
+ ): Promise<DeviceControlSignals>;
24194
+
23972
24195
  /**
23973
24196
  * Retrieves the state of control signals on a given connection.
23974
24197
  *
@@ -23979,11 +24202,25 @@ declare namespace chrome {
23979
24202
 
23980
24203
  connectionId: number,
23981
24204
 
23982
- callback: (
24205
+ callback?: (
23983
24206
  signals: DeviceControlSignals,
23984
24207
  ) => void,
23985
24208
  ): void;
23986
24209
 
24210
+ /**
24211
+ * Sets the state of control signals on a given connection.
24212
+ *
24213
+ * @chrome-returns-extra since Pending
24214
+ * @param connectionId The id of the connection.
24215
+ * @param signals The set of signal changes to send to the device.
24216
+ */
24217
+ export function setControlSignals(
24218
+
24219
+ connectionId: number,
24220
+
24221
+ signals: HostControlSignals,
24222
+ ): Promise<boolean>;
24223
+
23987
24224
  /**
23988
24225
  * Sets the state of control signals on a given connection.
23989
24226
  *
@@ -23997,11 +24234,23 @@ declare namespace chrome {
23997
24234
 
23998
24235
  signals: HostControlSignals,
23999
24236
 
24000
- callback: (
24237
+ callback?: (
24001
24238
  result: boolean,
24002
24239
  ) => void,
24003
24240
  ): void;
24004
24241
 
24242
+ /**
24243
+ * Suspends character transmission on a given connection and places the transmission line in a break state until the clearBreak is called.
24244
+ *
24245
+ * @chrome-returns-extra since Pending
24246
+ * @param connectionId The id of the connection.
24247
+ * @since Chrome 45
24248
+ */
24249
+ export function setBreak(
24250
+
24251
+ connectionId: number,
24252
+ ): Promise<boolean>;
24253
+
24005
24254
  /**
24006
24255
  * Suspends character transmission on a given connection and places the transmission line in a break state until the clearBreak is called.
24007
24256
  *
@@ -24012,11 +24261,23 @@ declare namespace chrome {
24012
24261
 
24013
24262
  connectionId: number,
24014
24263
 
24015
- callback: (
24264
+ callback?: (
24016
24265
  result: boolean,
24017
24266
  ) => void,
24018
24267
  ): void;
24019
24268
 
24269
+ /**
24270
+ * Restore character transmission on a given connection and place the transmission line in a nonbreak state.
24271
+ *
24272
+ * @chrome-returns-extra since Pending
24273
+ * @param connectionId The id of the connection.
24274
+ * @since Chrome 45
24275
+ */
24276
+ export function clearBreak(
24277
+
24278
+ connectionId: number,
24279
+ ): Promise<boolean>;
24280
+
24020
24281
  /**
24021
24282
  * Restore character transmission on a given connection and place the transmission line in a nonbreak state.
24022
24283
  *
@@ -24027,7 +24288,7 @@ declare namespace chrome {
24027
24288
 
24028
24289
  connectionId: number,
24029
24290
 
24030
- callback: (
24291
+ callback?: (
24031
24292
  result: boolean,
24032
24293
  ) => void,
24033
24294
  ): void;
@@ -26547,6 +26808,17 @@ declare namespace chrome {
26547
26808
  detail: FileInfo,
26548
26809
  ) => void>;
26549
26810
 
26811
+ /**
26812
+ * Returns a syncable filesystem backed by Google Drive. The returned `DOMFileSystem` instance can be operated on in the same way as the Temporary and Persistant file systems (see [http://dev.w3.org/2009/dap/file-system/file-dir-sys.html](https://dev.w3.org/2009/dap/file-system/file-dir-sys.html)).
26813
+ *
26814
+ * Calling this multiple times from the same app will return the same handle to the same file system.
26815
+ *
26816
+ * Note this call can fail. For example, if the user is not signed in to Chrome or if there is no network operation. To handle these errors it is important chrome.runtime.lastError is checked in the callback.
26817
+ *
26818
+ * @chrome-returns-extra since Pending
26819
+ */
26820
+ export function requestFileSystem(): Promise<DOMFileSystem>;
26821
+
26550
26822
  /**
26551
26823
  * Returns a syncable filesystem backed by Google Drive. The returned `DOMFileSystem` instance can be operated on in the same way as the Temporary and Persistant file systems (see [http://dev.w3.org/2009/dap/file-system/file-dir-sys.html](https://dev.w3.org/2009/dap/file-system/file-dir-sys.html)).
26552
26824
  *
@@ -26558,11 +26830,21 @@ declare namespace chrome {
26558
26830
  */
26559
26831
  export function requestFileSystem(
26560
26832
 
26561
- callback: (
26833
+ callback?: (
26562
26834
  fileSystem: DOMFileSystem,
26563
26835
  ) => void,
26564
26836
  ): void;
26565
26837
 
26838
+ /**
26839
+ * Sets the default conflict resolution policy for the `'syncable'` file storage for the app. By default it is set to `'last_write_win'`. When conflict resolution policy is set to `'last_write_win'` conflicts for existing files are automatically resolved next time the file is updated. `callback` can be optionally given to know if the request has succeeded or not.
26840
+ *
26841
+ * @chrome-returns-extra since Pending
26842
+ */
26843
+ export function setConflictResolutionPolicy(
26844
+
26845
+ policy: ConflictResolutionPolicy,
26846
+ ): Promise<void>;
26847
+
26566
26848
  /**
26567
26849
  * Sets the default conflict resolution policy for the `'syncable'` file storage for the app. By default it is set to `'last_write_win'`. When conflict resolution policy is set to `'last_write_win'` conflicts for existing files are automatically resolved next time the file is updated. `callback` can be optionally given to know if the request has succeeded or not.
26568
26850
  *
@@ -26575,6 +26857,13 @@ declare namespace chrome {
26575
26857
  callback?: () => void,
26576
26858
  ): void;
26577
26859
 
26860
+ /**
26861
+ * Gets the current conflict resolution policy.
26862
+ *
26863
+ * @chrome-returns-extra since Pending
26864
+ */
26865
+ export function getConflictResolutionPolicy(): Promise<ConflictResolutionPolicy>;
26866
+
26578
26867
  /**
26579
26868
  * Gets the current conflict resolution policy.
26580
26869
  *
@@ -26582,11 +26871,21 @@ declare namespace chrome {
26582
26871
  */
26583
26872
  export function getConflictResolutionPolicy(
26584
26873
 
26585
- callback: (
26874
+ callback?: (
26586
26875
  policy: ConflictResolutionPolicy,
26587
26876
  ) => void,
26588
26877
  ): void;
26589
26878
 
26879
+ /**
26880
+ * Returns the current usage and quota in bytes for the `'syncable'` file storage for the app.
26881
+ *
26882
+ * @chrome-returns-extra since Pending
26883
+ */
26884
+ export function getUsageAndQuota(
26885
+
26886
+ fileSystem: DOMFileSystem,
26887
+ ): Promise<StorageInfo>;
26888
+
26590
26889
  /**
26591
26890
  * Returns the current usage and quota in bytes for the `'syncable'` file storage for the app.
26592
26891
  *
@@ -26596,11 +26895,21 @@ declare namespace chrome {
26596
26895
 
26597
26896
  fileSystem: DOMFileSystem,
26598
26897
 
26599
- callback: (
26898
+ callback?: (
26600
26899
  info: StorageInfo,
26601
26900
  ) => void,
26602
26901
  ): void;
26603
26902
 
26903
+ /**
26904
+ * Returns the {@link FileStatus} for the given `fileEntry`. The status value can be `'synced'`, `'pending'` or `'conflicting'`. Note that `'conflicting'` state only happens when the service's conflict resolution policy is set to `'manual'`.
26905
+ *
26906
+ * @chrome-returns-extra since Pending
26907
+ */
26908
+ export function getFileStatus(
26909
+
26910
+ fileEntry: Entry,
26911
+ ): Promise<FileStatus>;
26912
+
26604
26913
  /**
26605
26914
  * Returns the {@link FileStatus} for the given `fileEntry`. The status value can be `'synced'`, `'pending'` or `'conflicting'`. Note that `'conflicting'` state only happens when the service's conflict resolution policy is set to `'manual'`.
26606
26915
  *
@@ -26610,11 +26919,21 @@ declare namespace chrome {
26610
26919
 
26611
26920
  fileEntry: Entry,
26612
26921
 
26613
- callback: (
26922
+ callback?: (
26614
26923
  status: FileStatus,
26615
26924
  ) => void,
26616
26925
  ): void;
26617
26926
 
26927
+ /**
26928
+ * Returns each {@link FileStatus} for the given `fileEntry` array. Typically called with the result from dirReader.readEntries().
26929
+ *
26930
+ * @chrome-returns-extra since Pending
26931
+ */
26932
+ export function getFileStatuses(
26933
+
26934
+ fileEntries: {[name: string]: any}[],
26935
+ ): Promise<FileStatusInfo[]>;
26936
+
26618
26937
  /**
26619
26938
  * Returns each {@link FileStatus} for the given `fileEntry` array. Typically called with the result from dirReader.readEntries().
26620
26939
  *
@@ -26624,11 +26943,18 @@ declare namespace chrome {
26624
26943
 
26625
26944
  fileEntries: {[name: string]: any}[],
26626
26945
 
26627
- callback: (
26946
+ callback?: (
26628
26947
  status: FileStatusInfo[],
26629
26948
  ) => void,
26630
26949
  ): void;
26631
26950
 
26951
+ /**
26952
+ * Returns the current sync backend status.
26953
+ *
26954
+ * @chrome-returns-extra since Pending
26955
+ */
26956
+ export function getServiceStatus(): Promise<ServiceStatus>;
26957
+
26632
26958
  /**
26633
26959
  * Returns the current sync backend status.
26634
26960
  *
@@ -26636,7 +26962,7 @@ declare namespace chrome {
26636
26962
  */
26637
26963
  export function getServiceStatus(
26638
26964
 
26639
- callback: (
26965
+ callback?: (
26640
26966
  status: ServiceStatus,
26641
26967
  ) => void,
26642
26968
  ): void;
package/index.d.ts CHANGED
@@ -14,8 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- // Generated on Tue Jun 20 2023 22:29:56 GMT+0000 (Coordinated Universal Time)
18
- // Built at 02414af8e71af39ab91eaedd45e18bc09437d537
17
+ // Generated on Fri Jun 23 2023 22:29:22 GMT+0000 (Coordinated Universal Time)
18
+ // Built at 899323e36e4d7ae713b9b39016ef1837c9abe79a
19
19
 
20
20
  // Includes MV3+ APIs only.
21
21
 
@@ -16175,6 +16175,8 @@ declare namespace chrome {
16175
16175
 
16176
16176
  /**
16177
16177
  * Print ticket in [CJT format](https://developers.google.com/cloud-print/docs/cdd#cjt).
16178
+ *
16179
+ * The CJT reference is marked as deprecated. It is deprecated for Google Cloud Print only. is not deprecated for ChromeOS printing.
16178
16180
  */
16179
16181
  ticket: {[name: string]: any};
16180
16182
 
@@ -16381,7 +16383,7 @@ declare namespace chrome {
16381
16383
  ) => void>;
16382
16384
 
16383
16385
  /**
16384
- * Submits the job for print. If the extension is not listed in PrintingAPIExtensionsAllowlist policy, the user will be prompted to accept the print job.
16386
+ * Submits the job for print. Use the [`PrintingAPIExtensionsAllowlist`](https://chromeenterprise.google/policies/#PrintingAPIExtensionsAllowlist) to bypass promting the user to confirm printing.
16385
16387
  *
16386
16388
  * @chrome-returns-extra since Chrome 100
16387
16389
  */
@@ -16391,7 +16393,7 @@ declare namespace chrome {
16391
16393
  ): Promise<SubmitJobResponse>;
16392
16394
 
16393
16395
  /**
16394
- * Submits the job for print. If the extension is not listed in PrintingAPIExtensionsAllowlist policy, the user will be prompted to accept the print job.
16396
+ * Submits the job for print. Use the [`PrintingAPIExtensionsAllowlist`](https://chromeenterprise.google/policies/#PrintingAPIExtensionsAllowlist) to bypass promting the user to confirm printing.
16395
16397
  */
16396
16398
  export function submitJob(
16397
16399
 
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "module",
6
6
  "name": "chrome-types",
7
7
  "config": {
8
- "build-hash": "0edf70fe9e89c745"
8
+ "build-hash": "33e9f8bf9dcba419"
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.207"
19
+ "version": "0.1.209"
20
20
  }