chrome-types 0.1.446 → 0.1.448

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 +93 -1231
  2. package/index.d.ts +92 -1230
  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 Fri Sep 11 2026 22:24:21 GMT+0000 (Coordinated Universal Time)
18
- // Built at 1eb755efcbc96b5fcf3af53b1ff00a9497e2e44b
17
+ // Generated on Sat Sep 19 2026 22:23:22 GMT+0000 (Coordinated Universal Time)
18
+ // Built at 63e7f8905f1321aa5729bac838d4f95bdc72405d
19
19
 
20
20
  // Includes all types, including MV2 + Platform Apps APIs.
21
21
 
@@ -14253,1194 +14253,6 @@ declare namespace chrome {
14253
14253
  ): void;
14254
14254
  }
14255
14255
 
14256
- /**
14257
- * Use the `chrome.fileSystemProvider` API to create file systems, that can be accessible from the file manager on Chrome OS.
14258
- *
14259
- * @chrome-permission fileSystemProvider
14260
- * @chrome-platform chromeos
14261
- */
14262
- export namespace fileSystemProvider {
14263
-
14264
- /**
14265
- * Error codes used by providing extensions in response to requests as well as in case of errors when calling methods of the API. For success, `"OK"` must be used.
14266
- */
14267
- export type ProviderError = "OK" | "FAILED" | "IN_USE" | "EXISTS" | "NOT_FOUND" | "ACCESS_DENIED" | "TOO_MANY_OPENED" | "NO_MEMORY" | "NO_SPACE" | "NOT_A_DIRECTORY" | "INVALID_OPERATION" | "SECURITY" | "ABORT" | "NOT_A_FILE" | "NOT_EMPTY" | "INVALID_URL" | "IO";
14268
-
14269
- /**
14270
- * Mode of opening a file. Used by {@link onOpenFileRequested}.
14271
- */
14272
- export type OpenFileMode = "READ" | "WRITE";
14273
-
14274
- /**
14275
- * Type of a change detected on the observed directory.
14276
- */
14277
- export type ChangeType = "CHANGED" | "DELETED";
14278
-
14279
- /**
14280
- * List of common actions. `"SHARE"` is for sharing files with others. `"SAVE_FOR_OFFLINE"` for pinning (saving for offline access). `"OFFLINE_NOT_NECESSARY"` for notifying that the file doesn't need to be stored for offline access anymore. Used by {@link onGetActionsRequested} and {@link onExecuteActionRequested}.
14281
- *
14282
- * @since Chrome 45
14283
- */
14284
- export type CommonActionId = "SAVE_FOR_OFFLINE" | "OFFLINE_NOT_NECESSARY" | "SHARE";
14285
-
14286
- /**
14287
- * @since Chrome 117
14288
- */
14289
- export interface CloudIdentifier {
14290
-
14291
- /**
14292
- * Identifier for the cloud storage provider (e.g. 'drive.google.com').
14293
- */
14294
- providerName: string;
14295
-
14296
- /**
14297
- * The provider's identifier for the given file/directory.
14298
- */
14299
- id: string;
14300
- }
14301
-
14302
- /**
14303
- * @since Chrome 125
14304
- */
14305
- export interface CloudFileInfo {
14306
-
14307
- /**
14308
- * A tag that represents the version of the file.
14309
- */
14310
- versionTag?: string;
14311
- }
14312
-
14313
- export interface EntryMetadata {
14314
-
14315
- /**
14316
- * True if it is a directory. Must be provided if requested in `options`.
14317
- */
14318
- isDirectory?: boolean;
14319
-
14320
- /**
14321
- * Name of this entry (not full path name). Must not contain '/'. For root it must be empty. Must be provided if requested in `options`.
14322
- */
14323
- name?: string;
14324
-
14325
- /**
14326
- * File size in bytes. Must be provided if requested in `options`.
14327
- */
14328
- size?: number;
14329
-
14330
- /**
14331
- * The last modified time of this entry. Must be provided if requested in `options`.
14332
- */
14333
- modificationTime?: Date;
14334
-
14335
- /**
14336
- * Mime type for the entry. Always optional, but should be provided if requested in `options`.
14337
- */
14338
- mimeType?: string;
14339
-
14340
- /**
14341
- * Thumbnail image as a data URI in either PNG, JPEG or WEBP format, at most 32 KB in size. Optional, but can be provided only when explicitly requested by the {@link onGetMetadataRequested} event.
14342
- */
14343
- thumbnail?: string;
14344
-
14345
- /**
14346
- * Cloud storage representation of this entry. Must be provided if requested in `options` and the file is backed by cloud storage. For local files not backed by cloud storage, it should be undefined when requested.
14347
- *
14348
- * @since Chrome 117
14349
- */
14350
- cloudIdentifier?: CloudIdentifier;
14351
-
14352
- /**
14353
- * Information that identifies a specific file in the underlying cloud file system. Must be provided if requested in `options` and the file is backed by cloud storage.
14354
- *
14355
- * @since Chrome 125
14356
- */
14357
- cloudFileInfo?: CloudFileInfo;
14358
- }
14359
-
14360
- export interface Watcher {
14361
-
14362
- /**
14363
- * The path of the entry being observed.
14364
- */
14365
- entryPath: string;
14366
-
14367
- /**
14368
- * Whether watching should include all child entries recursively. It can be true for directories only.
14369
- */
14370
- recursive: boolean;
14371
-
14372
- /**
14373
- * Tag used by the last notification for the watcher.
14374
- */
14375
- lastTag?: string;
14376
- }
14377
-
14378
- export interface OpenedFile {
14379
-
14380
- /**
14381
- * A request ID to be be used by consecutive read/write and close requests.
14382
- */
14383
- openRequestId: number;
14384
-
14385
- /**
14386
- * The path of the opened file.
14387
- */
14388
- filePath: string;
14389
-
14390
- /**
14391
- * Whether the file was opened for reading or writing.
14392
- */
14393
- mode: OpenFileMode;
14394
- }
14395
-
14396
- export interface FileSystemInfo {
14397
-
14398
- /**
14399
- * The identifier of the file system.
14400
- */
14401
- fileSystemId: string;
14402
-
14403
- /**
14404
- * A human-readable name for the file system.
14405
- */
14406
- displayName: string;
14407
-
14408
- /**
14409
- * Whether the file system supports operations which may change contents of the file system (such as creating, deleting or writing to files).
14410
- */
14411
- writable: boolean;
14412
-
14413
- /**
14414
- * The maximum number of files that can be opened at once. If 0, then not limited.
14415
- */
14416
- openedFilesLimit: number;
14417
-
14418
- /**
14419
- * List of currently opened files.
14420
- */
14421
- openedFiles: OpenedFile[];
14422
-
14423
- /**
14424
- * Whether the file system supports the `tag` field for observing directories.
14425
- *
14426
- * @since Chrome 45
14427
- */
14428
- supportsNotifyTag?: boolean;
14429
-
14430
- /**
14431
- * List of watchers.
14432
- *
14433
- * @since Chrome 45
14434
- */
14435
- watchers: Watcher[];
14436
- }
14437
-
14438
- export interface MountOptions {
14439
-
14440
- /**
14441
- * The string indentifier of the file system. Must be unique per each extension.
14442
- */
14443
- fileSystemId: string;
14444
-
14445
- /**
14446
- * A human-readable name for the file system.
14447
- */
14448
- displayName: string;
14449
-
14450
- /**
14451
- * Whether the file system supports operations which may change contents of the file system (such as creating, deleting or writing to files).
14452
- */
14453
- writable?: boolean;
14454
-
14455
- /**
14456
- * The maximum number of files that can be opened at once. If not specified, or 0, then not limited.
14457
- */
14458
- openedFilesLimit?: number;
14459
-
14460
- /**
14461
- * Whether the file system supports the `tag` field for observed directories.
14462
- *
14463
- * @since Chrome 45
14464
- */
14465
- supportsNotifyTag?: boolean;
14466
-
14467
- /**
14468
- * Whether the framework should resume the file system at the next sign-in session. True by default.
14469
- *
14470
- * @since Chrome 64
14471
- */
14472
- persistent?: boolean;
14473
- }
14474
-
14475
- export interface UnmountOptions {
14476
-
14477
- /**
14478
- * The identifier of the file system to be unmounted.
14479
- */
14480
- fileSystemId: string;
14481
- }
14482
-
14483
- export interface UnmountRequestedOptions {
14484
-
14485
- /**
14486
- * The identifier of the file system to be unmounted.
14487
- */
14488
- fileSystemId: string;
14489
-
14490
- /**
14491
- * The unique identifier of this request.
14492
- */
14493
- requestId: number;
14494
- }
14495
-
14496
- export interface GetMetadataRequestedOptions {
14497
-
14498
- /**
14499
- * The identifier of the file system related to this operation.
14500
- */
14501
- fileSystemId: string;
14502
-
14503
- /**
14504
- * The unique identifier of this request.
14505
- */
14506
- requestId: number;
14507
-
14508
- /**
14509
- * The path of the entry to fetch metadata about.
14510
- */
14511
- entryPath: string;
14512
-
14513
- /**
14514
- * Set to `true` if `is_directory` value is requested.
14515
- *
14516
- * @since Chrome 49
14517
- */
14518
- isDirectory: boolean;
14519
-
14520
- /**
14521
- * Set to `true` if `name` value is requested.
14522
- *
14523
- * @since Chrome 49
14524
- */
14525
- name: boolean;
14526
-
14527
- /**
14528
- * Set to `true` if `size` value is requested.
14529
- *
14530
- * @since Chrome 49
14531
- */
14532
- size: boolean;
14533
-
14534
- /**
14535
- * Set to `true` if `modificationTime` value is requested.
14536
- *
14537
- * @since Chrome 49
14538
- */
14539
- modificationTime: boolean;
14540
-
14541
- /**
14542
- * Set to `true` if `mimeType` value is requested.
14543
- *
14544
- * @since Chrome 49
14545
- */
14546
- mimeType: boolean;
14547
-
14548
- /**
14549
- * Set to `true` if `thumbnail` value is requested.
14550
- */
14551
- thumbnail: boolean;
14552
-
14553
- /**
14554
- * Set to `true` if `cloudIdentifier` value is requested.
14555
- *
14556
- * @since Chrome 117
14557
- */
14558
- cloudIdentifier: boolean;
14559
-
14560
- /**
14561
- * Set to `true` if `cloudFileInfo` value is requested.
14562
- *
14563
- * @since Chrome 125
14564
- */
14565
- cloudFileInfo: boolean;
14566
- }
14567
-
14568
- /**
14569
- * @since Chrome 45
14570
- */
14571
- export interface GetActionsRequestedOptions {
14572
-
14573
- /**
14574
- * The identifier of the file system related to this operation.
14575
- */
14576
- fileSystemId: string;
14577
-
14578
- /**
14579
- * The unique identifier of this request.
14580
- */
14581
- requestId: number;
14582
-
14583
- /**
14584
- * List of paths of entries for the list of actions.
14585
- *
14586
- * @since Chrome 47
14587
- */
14588
- entryPaths: string[];
14589
- }
14590
-
14591
- export interface ReadDirectoryRequestedOptions {
14592
-
14593
- /**
14594
- * The identifier of the file system related to this operation.
14595
- */
14596
- fileSystemId: string;
14597
-
14598
- /**
14599
- * The unique identifier of this request.
14600
- */
14601
- requestId: number;
14602
-
14603
- /**
14604
- * The path of the directory which contents are requested.
14605
- */
14606
- directoryPath: string;
14607
-
14608
- /**
14609
- * Set to `true` if `is_directory` value is requested.
14610
- *
14611
- * @since Chrome 49
14612
- */
14613
- isDirectory: boolean;
14614
-
14615
- /**
14616
- * Set to `true` if `name` value is requested.
14617
- *
14618
- * @since Chrome 49
14619
- */
14620
- name: boolean;
14621
-
14622
- /**
14623
- * Set to `true` if `size` value is requested.
14624
- *
14625
- * @since Chrome 49
14626
- */
14627
- size: boolean;
14628
-
14629
- /**
14630
- * Set to `true` if `modificationTime` value is requested.
14631
- *
14632
- * @since Chrome 49
14633
- */
14634
- modificationTime: boolean;
14635
-
14636
- /**
14637
- * Set to `true` if `mimeType` value is requested.
14638
- *
14639
- * @since Chrome 49
14640
- */
14641
- mimeType: boolean;
14642
-
14643
- /**
14644
- * Set to `true` if `thumbnail` value is requested.
14645
- *
14646
- * @since Chrome 49
14647
- */
14648
- thumbnail: boolean;
14649
- }
14650
-
14651
- export interface OpenFileRequestedOptions {
14652
-
14653
- /**
14654
- * The identifier of the file system related to this operation.
14655
- */
14656
- fileSystemId: string;
14657
-
14658
- /**
14659
- * A request ID which will be used by consecutive read/write and close requests.
14660
- */
14661
- requestId: number;
14662
-
14663
- /**
14664
- * The path of the file to be opened.
14665
- */
14666
- filePath: string;
14667
-
14668
- /**
14669
- * Whether the file will be used for reading or writing.
14670
- */
14671
- mode: OpenFileMode;
14672
- }
14673
-
14674
- export interface CloseFileRequestedOptions {
14675
-
14676
- /**
14677
- * The identifier of the file system related to this operation.
14678
- */
14679
- fileSystemId: string;
14680
-
14681
- /**
14682
- * The unique identifier of this request.
14683
- */
14684
- requestId: number;
14685
-
14686
- /**
14687
- * A request ID used to open the file.
14688
- */
14689
- openRequestId: number;
14690
- }
14691
-
14692
- export interface ReadFileRequestedOptions {
14693
-
14694
- /**
14695
- * The identifier of the file system related to this operation.
14696
- */
14697
- fileSystemId: string;
14698
-
14699
- /**
14700
- * The unique identifier of this request.
14701
- */
14702
- requestId: number;
14703
-
14704
- /**
14705
- * A request ID used to open the file.
14706
- */
14707
- openRequestId: number;
14708
-
14709
- /**
14710
- * Position in the file (in bytes) to start reading from.
14711
- */
14712
- offset: number;
14713
-
14714
- /**
14715
- * Number of bytes to be returned.
14716
- */
14717
- length: number;
14718
- }
14719
-
14720
- export interface CreateDirectoryRequestedOptions {
14721
-
14722
- /**
14723
- * The identifier of the file system related to this operation.
14724
- */
14725
- fileSystemId: string;
14726
-
14727
- /**
14728
- * The unique identifier of this request.
14729
- */
14730
- requestId: number;
14731
-
14732
- /**
14733
- * The path of the directory to be created.
14734
- */
14735
- directoryPath: string;
14736
-
14737
- /**
14738
- * Whether the operation is recursive (for directories only).
14739
- */
14740
- recursive: boolean;
14741
- }
14742
-
14743
- export interface DeleteEntryRequestedOptions {
14744
-
14745
- /**
14746
- * The identifier of the file system related to this operation.
14747
- */
14748
- fileSystemId: string;
14749
-
14750
- /**
14751
- * The unique identifier of this request.
14752
- */
14753
- requestId: number;
14754
-
14755
- /**
14756
- * The path of the entry to be deleted.
14757
- */
14758
- entryPath: string;
14759
-
14760
- /**
14761
- * Whether the operation is recursive (for directories only).
14762
- */
14763
- recursive: boolean;
14764
- }
14765
-
14766
- export interface CreateFileRequestedOptions {
14767
-
14768
- /**
14769
- * The identifier of the file system related to this operation.
14770
- */
14771
- fileSystemId: string;
14772
-
14773
- /**
14774
- * The unique identifier of this request.
14775
- */
14776
- requestId: number;
14777
-
14778
- /**
14779
- * The path of the file to be created.
14780
- */
14781
- filePath: string;
14782
- }
14783
-
14784
- export interface CopyEntryRequestedOptions {
14785
-
14786
- /**
14787
- * The identifier of the file system related to this operation.
14788
- */
14789
- fileSystemId: string;
14790
-
14791
- /**
14792
- * The unique identifier of this request.
14793
- */
14794
- requestId: number;
14795
-
14796
- /**
14797
- * The source path of the entry to be copied.
14798
- */
14799
- sourcePath: string;
14800
-
14801
- /**
14802
- * The destination path for the copy operation.
14803
- */
14804
- targetPath: string;
14805
- }
14806
-
14807
- export interface MoveEntryRequestedOptions {
14808
-
14809
- /**
14810
- * The identifier of the file system related to this operation.
14811
- */
14812
- fileSystemId: string;
14813
-
14814
- /**
14815
- * The unique identifier of this request.
14816
- */
14817
- requestId: number;
14818
-
14819
- /**
14820
- * The source path of the entry to be moved into a new place.
14821
- */
14822
- sourcePath: string;
14823
-
14824
- /**
14825
- * The destination path for the copy operation.
14826
- */
14827
- targetPath: string;
14828
- }
14829
-
14830
- export interface TruncateRequestedOptions {
14831
-
14832
- /**
14833
- * The identifier of the file system related to this operation.
14834
- */
14835
- fileSystemId: string;
14836
-
14837
- /**
14838
- * The unique identifier of this request.
14839
- */
14840
- requestId: number;
14841
-
14842
- /**
14843
- * The path of the file to be truncated.
14844
- */
14845
- filePath: string;
14846
-
14847
- /**
14848
- * Number of bytes to be retained after the operation completes.
14849
- */
14850
- length: number;
14851
- }
14852
-
14853
- export interface WriteFileRequestedOptions {
14854
-
14855
- /**
14856
- * The identifier of the file system related to this operation.
14857
- */
14858
- fileSystemId: string;
14859
-
14860
- /**
14861
- * The unique identifier of this request.
14862
- */
14863
- requestId: number;
14864
-
14865
- /**
14866
- * A request ID used to open the file.
14867
- */
14868
- openRequestId: number;
14869
-
14870
- /**
14871
- * Position in the file (in bytes) to start writing the bytes from.
14872
- */
14873
- offset: number;
14874
-
14875
- /**
14876
- * Buffer of bytes to be written to the file.
14877
- */
14878
- data: ArrayBuffer;
14879
- }
14880
-
14881
- export interface AbortRequestedOptions {
14882
-
14883
- /**
14884
- * The identifier of the file system related to this operation.
14885
- */
14886
- fileSystemId: string;
14887
-
14888
- /**
14889
- * The unique identifier of this request.
14890
- */
14891
- requestId: number;
14892
-
14893
- /**
14894
- * An ID of the request to be aborted.
14895
- */
14896
- operationRequestId: number;
14897
- }
14898
-
14899
- export interface AddWatcherRequestedOptions {
14900
-
14901
- /**
14902
- * The identifier of the file system related to this operation.
14903
- */
14904
- fileSystemId: string;
14905
-
14906
- /**
14907
- * The unique identifier of this request.
14908
- */
14909
- requestId: number;
14910
-
14911
- /**
14912
- * The path of the entry to be observed.
14913
- */
14914
- entryPath: string;
14915
-
14916
- /**
14917
- * Whether observing should include all child entries recursively. It can be true for directories only.
14918
- */
14919
- recursive: boolean;
14920
- }
14921
-
14922
- export interface RemoveWatcherRequestedOptions {
14923
-
14924
- /**
14925
- * The identifier of the file system related to this operation.
14926
- */
14927
- fileSystemId: string;
14928
-
14929
- /**
14930
- * The unique identifier of this request.
14931
- */
14932
- requestId: number;
14933
-
14934
- /**
14935
- * The path of the watched entry.
14936
- */
14937
- entryPath: string;
14938
-
14939
- /**
14940
- * Mode of the watcher.
14941
- */
14942
- recursive: boolean;
14943
- }
14944
-
14945
- /**
14946
- * @since Chrome 45
14947
- */
14948
- export interface Action {
14949
-
14950
- /**
14951
- * The identifier of the action. Any string or {@link CommonActionId} for common actions.
14952
- */
14953
- id: string;
14954
-
14955
- /**
14956
- * The title of the action. It may be ignored for common actions.
14957
- */
14958
- title?: string;
14959
- }
14960
-
14961
- /**
14962
- * @since Chrome 45
14963
- */
14964
- export interface ExecuteActionRequestedOptions {
14965
-
14966
- /**
14967
- * The identifier of the file system related to this operation.
14968
- */
14969
- fileSystemId: string;
14970
-
14971
- /**
14972
- * The unique identifier of this request.
14973
- */
14974
- requestId: number;
14975
-
14976
- /**
14977
- * The set of paths of the entries to be used for the action.
14978
- *
14979
- * @since Chrome 47
14980
- */
14981
- entryPaths: string[];
14982
-
14983
- /**
14984
- * The identifier of the action to be executed.
14985
- */
14986
- actionId: string;
14987
- }
14988
-
14989
- export interface Change {
14990
-
14991
- /**
14992
- * The path of the changed entry.
14993
- */
14994
- entryPath: string;
14995
-
14996
- /**
14997
- * The type of the change which happened to the entry.
14998
- */
14999
- changeType: ChangeType;
15000
-
15001
- /**
15002
- * Information relating to the file if backed by a cloud file system.
15003
- *
15004
- * @since Chrome 125
15005
- */
15006
- cloudFileInfo?: CloudFileInfo;
15007
- }
15008
-
15009
- export interface NotifyOptions {
15010
-
15011
- /**
15012
- * The identifier of the file system related to this change.
15013
- */
15014
- fileSystemId: string;
15015
-
15016
- /**
15017
- * The path of the observed entry.
15018
- */
15019
- observedPath: string;
15020
-
15021
- /**
15022
- * Mode of the observed entry.
15023
- */
15024
- recursive: boolean;
15025
-
15026
- /**
15027
- * The type of the change which happened to the observed entry. If it is DELETED, then the observed entry will be automatically removed from the list of observed entries.
15028
- */
15029
- changeType: ChangeType;
15030
-
15031
- /**
15032
- * List of changes to entries within the observed directory (including the entry itself)
15033
- */
15034
- changes?: Change[];
15035
-
15036
- /**
15037
- * Tag for the notification. Required if the file system was mounted with the `supportsNotifyTag` option. Note, that this flag is necessary to provide notifications about changes which changed even when the system was shutdown.
15038
- */
15039
- tag?: string;
15040
- }
15041
-
15042
- /**
15043
- * @since Chrome 44
15044
- */
15045
- export interface ConfigureRequestedOptions {
15046
-
15047
- /**
15048
- * The identifier of the file system to be configured.
15049
- */
15050
- fileSystemId: string;
15051
-
15052
- /**
15053
- * The unique identifier of this request.
15054
- */
15055
- requestId: number;
15056
- }
15057
-
15058
- /**
15059
- * Raised when unmounting for the file system with the `fileSystemId` identifier is requested. In the response, the {@link unmount} API method must be called together with `successCallback`. If unmounting is not possible (eg. due to a pending operation), then `errorCallback` must be called.
15060
- */
15061
- export const onUnmountRequested: events.Event<(
15062
- options: UnmountRequestedOptions,
15063
- successCallback: () => void,
15064
- errorCallback: (
15065
- error: ProviderError,
15066
- ) => void,
15067
- ) => void>;
15068
-
15069
- /**
15070
- * Raised when metadata of a file or a directory at `entryPath` is requested. The metadata must be returned with the `successCallback` call. In case of an error, `errorCallback` must be called.
15071
- */
15072
- export const onGetMetadataRequested: events.Event<(
15073
- options: GetMetadataRequestedOptions,
15074
- successCallback: (
15075
- metadata: EntryMetadata,
15076
- ) => void,
15077
- errorCallback: (
15078
- error: ProviderError,
15079
- ) => void,
15080
- ) => void>;
15081
-
15082
- /**
15083
- * Raised when a list of actions for a set of files or directories at `entryPaths` is requested. All of the returned actions must be applicable to each entry. If there are no such actions, an empty array should be returned. The actions must be returned with the `successCallback` call. In case of an error, `errorCallback` must be called.
15084
- *
15085
- * @since Chrome 48
15086
- */
15087
- export const onGetActionsRequested: events.Event<(
15088
- options: GetActionsRequestedOptions,
15089
- successCallback: (
15090
- actions: Action[],
15091
- ) => void,
15092
- errorCallback: (
15093
- error: ProviderError,
15094
- ) => void,
15095
- ) => void>;
15096
-
15097
- /**
15098
- * Raised when contents of a directory at `directoryPath` are requested. The results must be returned in chunks by calling the `successCallback` several times. In case of an error, `errorCallback` must be called.
15099
- */
15100
- export const onReadDirectoryRequested: events.Event<(
15101
- options: ReadDirectoryRequestedOptions,
15102
- successCallback: (
15103
- entries: EntryMetadata[],
15104
- hasMore: boolean,
15105
- ) => void,
15106
- errorCallback: (
15107
- error: ProviderError,
15108
- ) => void,
15109
- ) => void>;
15110
-
15111
- /**
15112
- * Raised when opening a file at `filePath` is requested. If the file does not exist, then the operation must fail. Maximum number of files opened at once can be specified with `MountOptions`.
15113
- */
15114
- export const onOpenFileRequested: events.Event<(
15115
- options: OpenFileRequestedOptions,
15116
- successCallback: (
15117
- /**
15118
- * @since Chrome 125
15119
- */
15120
- metadata?: EntryMetadata,
15121
- ) => void,
15122
- errorCallback: (
15123
- error: ProviderError,
15124
- ) => void,
15125
- ) => void>;
15126
-
15127
- /**
15128
- * Raised when opening a file previously opened with `openRequestId` is requested to be closed.
15129
- */
15130
- export const onCloseFileRequested: events.Event<(
15131
- options: CloseFileRequestedOptions,
15132
- successCallback: () => void,
15133
- errorCallback: (
15134
- error: ProviderError,
15135
- ) => void,
15136
- ) => void>;
15137
-
15138
- /**
15139
- * Raised when reading contents of a file opened previously with `openRequestId` is requested. The results must be returned in chunks by calling `successCallback` several times. In case of an error, `errorCallback` must be called.
15140
- */
15141
- export const onReadFileRequested: events.Event<(
15142
- options: ReadFileRequestedOptions,
15143
- successCallback: (
15144
- data: ArrayBuffer,
15145
- hasMore: boolean,
15146
- ) => void,
15147
- errorCallback: (
15148
- error: ProviderError,
15149
- ) => void,
15150
- ) => void>;
15151
-
15152
- /**
15153
- * Raised when creating a directory is requested. The operation must fail with the EXISTS error if the target directory already exists. If `recursive` is true, then all of the missing directories on the directory path must be created.
15154
- */
15155
- export const onCreateDirectoryRequested: events.Event<(
15156
- options: CreateDirectoryRequestedOptions,
15157
- successCallback: () => void,
15158
- errorCallback: (
15159
- error: ProviderError,
15160
- ) => void,
15161
- ) => void>;
15162
-
15163
- /**
15164
- * Raised when deleting an entry is requested. If `recursive` is true, and the entry is a directory, then all of the entries inside must be recursively deleted as well.
15165
- */
15166
- export const onDeleteEntryRequested: events.Event<(
15167
- options: DeleteEntryRequestedOptions,
15168
- successCallback: () => void,
15169
- errorCallback: (
15170
- error: ProviderError,
15171
- ) => void,
15172
- ) => void>;
15173
-
15174
- /**
15175
- * Raised when creating a file is requested. If the file already exists, then `errorCallback` must be called with the `"EXISTS"` error code.
15176
- */
15177
- export const onCreateFileRequested: events.Event<(
15178
- options: CreateFileRequestedOptions,
15179
- successCallback: () => void,
15180
- errorCallback: (
15181
- error: ProviderError,
15182
- ) => void,
15183
- ) => void>;
15184
-
15185
- /**
15186
- * Raised when copying an entry (recursively if a directory) is requested. If an error occurs, then `errorCallback` must be called.
15187
- */
15188
- export const onCopyEntryRequested: events.Event<(
15189
- options: CopyEntryRequestedOptions,
15190
- successCallback: () => void,
15191
- errorCallback: (
15192
- error: ProviderError,
15193
- ) => void,
15194
- ) => void>;
15195
-
15196
- /**
15197
- * Raised when moving an entry (recursively if a directory) is requested. If an error occurs, then `errorCallback` must be called.
15198
- */
15199
- export const onMoveEntryRequested: events.Event<(
15200
- options: MoveEntryRequestedOptions,
15201
- successCallback: () => void,
15202
- errorCallback: (
15203
- error: ProviderError,
15204
- ) => void,
15205
- ) => void>;
15206
-
15207
- /**
15208
- * Raised when truncating a file to a desired length is requested. If an error occurs, then `errorCallback` must be called.
15209
- */
15210
- export const onTruncateRequested: events.Event<(
15211
- options: TruncateRequestedOptions,
15212
- successCallback: () => void,
15213
- errorCallback: (
15214
- error: ProviderError,
15215
- ) => void,
15216
- ) => void>;
15217
-
15218
- /**
15219
- * Raised when writing contents to a file opened previously with `openRequestId` is requested.
15220
- */
15221
- export const onWriteFileRequested: events.Event<(
15222
- options: WriteFileRequestedOptions,
15223
- successCallback: () => void,
15224
- errorCallback: (
15225
- error: ProviderError,
15226
- ) => void,
15227
- ) => void>;
15228
-
15229
- /**
15230
- * Raised when aborting an operation with `operationRequestId` is requested. The operation executed with `operationRequestId` must be immediately stopped and `successCallback` of this abort request executed. If aborting fails, then `errorCallback` must be called. Note, that callbacks of the aborted operation must not be called, as they will be ignored. Despite calling `errorCallback`, the request may be forcibly aborted.
15231
- */
15232
- export const onAbortRequested: events.Event<(
15233
- options: AbortRequestedOptions,
15234
- successCallback: () => void,
15235
- errorCallback: (
15236
- error: ProviderError,
15237
- ) => void,
15238
- ) => void>;
15239
-
15240
- /**
15241
- * Raised when showing a configuration dialog for `fileSystemId` is requested. If it's handled, the `file_system_provider.configurable` manfiest option must be set to true.
15242
- *
15243
- * @since Chrome 44
15244
- */
15245
- export const onConfigureRequested: events.Event<(
15246
- options: ConfigureRequestedOptions,
15247
- successCallback: () => void,
15248
- errorCallback: (
15249
- error: ProviderError,
15250
- ) => void,
15251
- ) => void>;
15252
-
15253
- /**
15254
- * Raised when showing a dialog for mounting a new file system is requested. If the extension/app is a file handler, then this event shouldn't be handled. Instead `app.runtime.onLaunched` should be handled in order to mount new file systems when a file is opened. For multiple mounts, the `file_system_provider.multiple_mounts` manifest option must be set to true.
15255
- *
15256
- * @since Chrome 44
15257
- */
15258
- export const onMountRequested: events.Event<(
15259
- successCallback: () => void,
15260
- errorCallback: (
15261
- error: ProviderError,
15262
- ) => void,
15263
- ) => void>;
15264
-
15265
- /**
15266
- * Raised when setting a new directory watcher is requested. If an error occurs, then `errorCallback` must be called.
15267
- *
15268
- * @since Chrome 45
15269
- */
15270
- export const onAddWatcherRequested: events.Event<(
15271
- options: AddWatcherRequestedOptions,
15272
- successCallback: () => void,
15273
- errorCallback: (
15274
- error: ProviderError,
15275
- ) => void,
15276
- ) => void>;
15277
-
15278
- /**
15279
- * Raised when the watcher should be removed. If an error occurs, then `errorCallback` must be called.
15280
- *
15281
- * @since Chrome 45
15282
- */
15283
- export const onRemoveWatcherRequested: events.Event<(
15284
- options: RemoveWatcherRequestedOptions,
15285
- successCallback: () => void,
15286
- errorCallback: (
15287
- error: ProviderError,
15288
- ) => void,
15289
- ) => void>;
15290
-
15291
- /**
15292
- * Raised when executing an action for a set of files or directories is\\ requested. After the action is completed, `successCallback` must be called. On error, `errorCallback` must be called.
15293
- *
15294
- * @since Chrome 48
15295
- */
15296
- export const onExecuteActionRequested: events.Event<(
15297
- options: ExecuteActionRequestedOptions,
15298
- successCallback: () => void,
15299
- errorCallback: (
15300
- error: ProviderError,
15301
- ) => void,
15302
- ) => void>;
15303
-
15304
- /**
15305
- * Mounts a file system with the given `fileSystemId` and `displayName`. `displayName` will be shown in the left panel of the Files app. `displayName` can contain any characters including '/', but cannot be an empty string. `displayName` must be descriptive but doesn't have to be unique. The `fileSystemId` must not be an empty string.
15306
- *
15307
- * Depending on the type of the file system being mounted, the `source` option must be set appropriately.
15308
- *
15309
- * In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
15310
- *
15311
- * @chrome-returns-extra since Chrome 96
15312
- * @returns A generic result callback to indicate success or failure.
15313
- */
15314
- export function mount(
15315
-
15316
- options: MountOptions,
15317
- ): Promise<void>;
15318
-
15319
- /**
15320
- * Mounts a file system with the given `fileSystemId` and `displayName`. `displayName` will be shown in the left panel of the Files app. `displayName` can contain any characters including '/', but cannot be an empty string. `displayName` must be descriptive but doesn't have to be unique. The `fileSystemId` must not be an empty string.
15321
- *
15322
- * Depending on the type of the file system being mounted, the `source` option must be set appropriately.
15323
- *
15324
- * In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
15325
- */
15326
- export function mount(
15327
-
15328
- options: MountOptions,
15329
-
15330
- callback?: () => void,
15331
- ): void;
15332
-
15333
- /**
15334
- * Unmounts a file system with the given `fileSystemId`. It must be called after {@link onUnmountRequested} is invoked. Also, the providing extension can decide to perform unmounting if not requested (eg. in case of lost connection, or a file error).
15335
- *
15336
- * In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
15337
- *
15338
- * @chrome-returns-extra since Chrome 96
15339
- * @returns A generic result callback to indicate success or failure.
15340
- */
15341
- export function unmount(
15342
-
15343
- options: UnmountOptions,
15344
- ): Promise<void>;
15345
-
15346
- /**
15347
- * Unmounts a file system with the given `fileSystemId`. It must be called after {@link onUnmountRequested} is invoked. Also, the providing extension can decide to perform unmounting if not requested (eg. in case of lost connection, or a file error).
15348
- *
15349
- * In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
15350
- */
15351
- export function unmount(
15352
-
15353
- options: UnmountOptions,
15354
-
15355
- callback?: () => void,
15356
- ): void;
15357
-
15358
- /**
15359
- * Returns all file systems mounted by the extension.
15360
- *
15361
- * @chrome-returns-extra since Chrome 96
15362
- * @returns Callback to receive the result of {@link getAll} function.
15363
- */
15364
- export function getAll(): Promise<FileSystemInfo[]>;
15365
-
15366
- /**
15367
- * Returns all file systems mounted by the extension.
15368
- */
15369
- export function getAll(
15370
-
15371
- callback?: (
15372
- fileSystems: FileSystemInfo[],
15373
- ) => void,
15374
- ): void;
15375
-
15376
- /**
15377
- * Returns information about a file system with the passed `fileSystemId`.
15378
- *
15379
- * @chrome-returns-extra since Chrome 96
15380
- * @returns Callback to receive the result of {@link get} function.
15381
- */
15382
- export function get(
15383
-
15384
- fileSystemId: string,
15385
- ): Promise<FileSystemInfo>;
15386
-
15387
- /**
15388
- * Returns information about a file system with the passed `fileSystemId`.
15389
- */
15390
- export function get(
15391
-
15392
- fileSystemId: string,
15393
-
15394
- callback?: (
15395
- fileSystem: FileSystemInfo,
15396
- ) => void,
15397
- ): void;
15398
-
15399
- /**
15400
- * Notifies about changes in the watched directory at `observedPath` in `recursive` mode. If the file system is mounted with `supportsNotifyTag`, then `tag` must be provided, and all changes since the last notification always reported, even if the system was shutdown. The last tag can be obtained with {@link getAll}.
15401
- *
15402
- * To use, the `file_system_provider.notify` manifest option must be set to true.
15403
- *
15404
- * Value of `tag` can be any string which is unique per call, so it's possible to identify the last registered notification. Eg. if the providing extension starts after a reboot, and the last registered notification's tag is equal to "123", then it should call {@link notify} for all changes which happened since the change tagged as "123". It cannot be an empty string.
15405
- *
15406
- * Not all providers are able to provide a tag, but if the file system has a changelog, then the tag can be eg. a change number, or a revision number.
15407
- *
15408
- * Note that if a parent directory is removed, then all descendant entries are also removed, and if they are watched, then the API must be notified about the fact. Also, if a directory is renamed, then all descendant entries are in fact removed, as there is no entry under their original paths anymore.
15409
- *
15410
- * In case of an error, {@link runtime.lastError} will be set will a corresponding error code.
15411
- *
15412
- * @chrome-returns-extra since Chrome 96
15413
- * @returns A generic result callback to indicate success or failure.
15414
- * @since Chrome 45
15415
- */
15416
- export function notify(
15417
-
15418
- options: NotifyOptions,
15419
- ): Promise<void>;
15420
-
15421
- /**
15422
- * Notifies about changes in the watched directory at `observedPath` in `recursive` mode. If the file system is mounted with `supportsNotifyTag`, then `tag` must be provided, and all changes since the last notification always reported, even if the system was shutdown. The last tag can be obtained with {@link getAll}.
15423
- *
15424
- * To use, the `file_system_provider.notify` manifest option must be set to true.
15425
- *
15426
- * Value of `tag` can be any string which is unique per call, so it's possible to identify the last registered notification. Eg. if the providing extension starts after a reboot, and the last registered notification's tag is equal to "123", then it should call {@link notify} for all changes which happened since the change tagged as "123". It cannot be an empty string.
15427
- *
15428
- * Not all providers are able to provide a tag, but if the file system has a changelog, then the tag can be eg. a change number, or a revision number.
15429
- *
15430
- * Note that if a parent directory is removed, then all descendant entries are also removed, and if they are watched, then the API must be notified about the fact. Also, if a directory is renamed, then all descendant entries are in fact removed, as there is no entry under their original paths anymore.
15431
- *
15432
- * In case of an error, {@link runtime.lastError} will be set will a corresponding error code.
15433
- *
15434
- * @since Chrome 45
15435
- */
15436
- export function notify(
15437
-
15438
- options: NotifyOptions,
15439
-
15440
- callback?: () => void,
15441
- ): void;
15442
- }
15443
-
15444
14256
  /**
15445
14257
  * Use the `chrome.fontSettings` API to manage Chrome's font settings.
15446
14258
  *
@@ -16332,7 +15144,7 @@ declare namespace chrome {
16332
15144
  vendorId?: number;
16333
15145
 
16334
15146
  /**
16335
- * Device product ID, only checked only if the vendor ID matches.
15147
+ * Device product ID, checked only if the vendor ID matches.
16336
15148
  */
16337
15149
  productId?: number;
16338
15150
 
@@ -19560,43 +18372,6 @@ declare namespace chrome {
19560
18372
  */
19561
18373
  startup_pages?: string[];
19562
18374
  }
19563
-
19564
- /**
19565
- * For `"file"` the source is a file passed via `onLaunched` event. For `"device"` contents are fetched from an external device (eg. plugged via USB), without using `file_handlers`. Finally, for `"network"` source, contents should be fetched via network.
19566
- *
19567
- * @since Chrome 44
19568
- */
19569
- export type FileSystemProviderSource = "file" | "device" | "network";
19570
-
19571
- /**
19572
- * Represents capabilities of a providing extension.
19573
- *
19574
- * @since Chrome 44
19575
- */
19576
- export interface FileSystemProviderCapabilities {
19577
-
19578
- /**
19579
- * Whether configuring via `onConfigureRequested` is supported. By default: `false`.
19580
- */
19581
- configurable?: boolean;
19582
-
19583
- /**
19584
- * Whether multiple (more than one) mounted file systems are supported. By default: `false`.
19585
- */
19586
- multiple_mounts?: boolean;
19587
-
19588
- /**
19589
- * Whether setting watchers and notifying about changes is supported. By default: `false`.
19590
- *
19591
- * @since Chrome 45
19592
- */
19593
- watchable?: boolean;
19594
-
19595
- /**
19596
- * Source of data for mounted file systems.
19597
- */
19598
- source: FileSystemProviderSource;
19599
- }
19600
18375
  }
19601
18376
 
19602
18377
  /**
@@ -28849,7 +27624,7 @@ declare namespace chrome {
28849
27624
  export interface SocketProperties {
28850
27625
 
28851
27626
  /**
28852
- * Flag indicating if the socket is left open when the event page of the application is unloaded (see [Manage App Lifecycle](https://developer.chrome.com/docs/apps/app_lifecycle)). The default value is "false." When the application is loaded, any sockets previously opened with persistent=true can be fetched with `getSockets`.
27627
+ * Flag indicating if the socket is left open when the event page of the application is unloaded (see [Manage App Lifecycle](https://developer.chrome.com/docs/apps/app_lifecycle)). The default value is "false". When the application is loaded, any sockets previously opened with persistent=true can be fetched with `getSockets`.
28853
27628
  */
28854
27629
  persistent?: boolean;
28855
27630
 
@@ -28910,7 +27685,7 @@ declare namespace chrome {
28910
27685
  name?: string;
28911
27686
 
28912
27687
  /**
28913
- * The size of the buffer used to receive data. If no buffer size has been specified explictly, the value is not provided.
27688
+ * The size of the buffer used to receive data. If no buffer size has been specified explicitly, the value is not provided.
28914
27689
  */
28915
27690
  bufferSize?: number;
28916
27691
 
@@ -28974,7 +27749,7 @@ declare namespace chrome {
28974
27749
  ) => void>;
28975
27750
 
28976
27751
  /**
28977
- * Event raised when a network error occured while the runtime was waiting for data on the socket address and port. Once this event is raised, the socket is paused and no more `onReceive` events will be raised for this socket until the socket is resumed.
27752
+ * Event raised when a network error occurred while the runtime was waiting for data on the socket address and port. Once this event is raised, the socket is paused and no more `onReceive` events will be raised for this socket until the socket is resumed.
28978
27753
  */
28979
27754
  export const onReceiveError: events.Event<(
28980
27755
  info: ReceiveErrorInfo,
@@ -29041,6 +27816,7 @@ declare namespace chrome {
29041
27816
  * Pauses or unpauses a socket. A paused socket is blocked from firing `onReceive` events.
29042
27817
  *
29043
27818
  * @chrome-returns-extra since Chrome 121
27819
+ * @param socketId The socket ID.
29044
27820
  * @param paused Flag to indicate whether to pause or unpause.
29045
27821
  */
29046
27822
  export function setPaused(
@@ -29053,6 +27829,7 @@ declare namespace chrome {
29053
27829
  /**
29054
27830
  * Pauses or unpauses a socket. A paused socket is blocked from firing `onReceive` events.
29055
27831
  *
27832
+ * @param socketId The socket ID.
29056
27833
  * @param paused Flag to indicate whether to pause or unpause.
29057
27834
  */
29058
27835
  export function setPaused(
@@ -32226,6 +31003,18 @@ declare namespace chrome {
32226
31003
  * The ID of the tab that opened this tab. If specified, the opener tab must be in the same window as the newly created tab.
32227
31004
  */
32228
31005
  openerTabId?: number,
31006
+
31007
+ /**
31008
+ * The ID of an existing tab to create a split view with. If specified, the split-with tab must meet the following conditions:
31009
+ *
31010
+ * * It must not be an already split tab.
31011
+ * * It must be in the same window as the newly created tab.
31012
+ * * If `windowId` is specified, it must be the same as the split-with tab's window ID.
31013
+ * * If `index` is specified, it must be an index adjacent to the split-with tab and will affect the relative positioning of the newly created tab.
31014
+ *
31015
+ * @since Pending
31016
+ */
31017
+ splitWithTabId?: number,
32229
31018
  },
32230
31019
  ): Promise<Tab>;
32231
31020
 
@@ -32272,6 +31061,18 @@ declare namespace chrome {
32272
31061
  * The ID of the tab that opened this tab. If specified, the opener tab must be in the same window as the newly created tab.
32273
31062
  */
32274
31063
  openerTabId?: number,
31064
+
31065
+ /**
31066
+ * The ID of an existing tab to create a split view with. If specified, the split-with tab must meet the following conditions:
31067
+ *
31068
+ * * It must not be an already split tab.
31069
+ * * It must be in the same window as the newly created tab.
31070
+ * * If `windowId` is specified, it must be the same as the split-with tab's window ID.
31071
+ * * If `index` is specified, it must be an index adjacent to the split-with tab and will affect the relative positioning of the newly created tab.
31072
+ *
31073
+ * @since Pending
31074
+ */
31075
+ splitWithTabId?: number,
32275
31076
  },
32276
31077
 
32277
31078
  /**
@@ -32282,6 +31083,43 @@ declare namespace chrome {
32282
31083
  ) => void,
32283
31084
  ): void;
32284
31085
 
31086
+ /**
31087
+ * Splits two existing tabs into a Split View.
31088
+ *
31089
+ * @param tabIds An array of exactly two tab IDs to pair into a Split View. All tabs must meet the following conditions:
31090
+
31091
+ * They must be adjacent.
31092
+ * They must not already be in a split view.
31093
+ * They must have matching `windowId`, `pinned`, and `groupId` states.
31094
+ * @since Pending
31095
+ */
31096
+ export function createSplit(
31097
+
31098
+ tabIds: [number, number],
31099
+ ): Promise<number>;
31100
+
31101
+ /**
31102
+ * Splits two existing tabs into a Split View.
31103
+ *
31104
+ * @param tabIds An array of exactly two tab IDs to pair into a Split View. All tabs must meet the following conditions:
31105
+
31106
+ * They must be adjacent.
31107
+ * They must not already be in a split view.
31108
+ * They must have matching `windowId`, `pinned`, and `groupId` states.
31109
+ * @since Pending
31110
+ */
31111
+ export function createSplit(
31112
+
31113
+ tabIds: [number, number],
31114
+
31115
+ /**
31116
+ * @param splitViewId The ID of the newly created Split View containing the tabs specified.
31117
+ */
31118
+ callback?: (
31119
+ splitViewId: number,
31120
+ ) => void,
31121
+ ): void;
31122
+
32285
31123
  /**
32286
31124
  * Duplicates a tab.
32287
31125
  *
@@ -33045,6 +31883,30 @@ declare namespace chrome {
33045
31883
  callback?: () => void,
33046
31884
  ): void;
33047
31885
 
31886
+ /**
31887
+ * Separates the tabs in a Split View into independent tabs.
31888
+ *
31889
+ * @param splitViewId The ID of the Split View to separate.
31890
+ * @since Pending
31891
+ */
31892
+ export function unsplit(
31893
+
31894
+ splitViewId: number,
31895
+ ): Promise<void>;
31896
+
31897
+ /**
31898
+ * Separates the tabs in a Split View into independent tabs.
31899
+ *
31900
+ * @param splitViewId The ID of the Split View to separate.
31901
+ * @since Pending
31902
+ */
31903
+ export function unsplit(
31904
+
31905
+ splitViewId: number,
31906
+
31907
+ callback?: () => void,
31908
+ ): void;
31909
+
33048
31910
  /**
33049
31911
  * Detects the primary language of the content in a tab.
33050
31912
  *