@types/chrome 0.0.220 → 0.0.222

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. chrome/README.md +1 -1
  2. chrome/index.d.ts +89 -14
  3. chrome/package.json +2 -2
chrome/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for Chrome extension development (http://
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Mon, 06 Mar 2023 23:32:44 GMT
11
+ * Last updated: Sun, 12 Mar 2023 13:32:32 GMT
12
12
  * Dependencies: [@types/filesystem](https://npmjs.com/package/@types/filesystem), [@types/har-format](https://npmjs.com/package/@types/har-format)
13
13
  * Global values: `chrome`
14
14
 
chrome/index.d.ts CHANGED
@@ -2890,6 +2890,11 @@ declare namespace chrome.downloads {
2890
2890
  conflictAction?: string | undefined;
2891
2891
  }
2892
2892
 
2893
+ export interface UiOptions {
2894
+ /** Enable or disable the download UI. */
2895
+ enabled: boolean;
2896
+ }
2897
+
2893
2898
  export interface DownloadChangedEvent extends chrome.events.Event<(downloadDelta: DownloadDelta) => void> { }
2894
2899
 
2895
2900
  export interface DownloadCreatedEvent extends chrome.events.Event<(downloadItem: DownloadItem) => void> { }
@@ -3026,6 +3031,19 @@ declare namespace chrome.downloads {
3026
3031
  export function drag(downloadId: number): void;
3027
3032
  /** Enable or disable the gray shelf at the bottom of every window associated with the current browser profile. The shelf will be disabled as long as at least one extension has disabled it. Enabling the shelf while at least one other extension has disabled it will return an error through runtime.lastError. Requires the "downloads.shelf" permission in addition to the "downloads" permission. */
3028
3033
  export function setShelfEnabled(enabled: boolean): void;
3034
+ /**
3035
+ * Change the download UI of every window associated with the current browser profile. As long as at least one extension has set UiOptions.enabled to false, the download UI will be hidden. Setting UiOptions.enabled to true while at least one other extension has disabled it will return an error through runtime.lastError. Requires the "downloads.ui" permission in addition to the "downloads" permission.
3036
+ * @param options Encapsulate a change to the download UI.
3037
+ * @since Chrome 105
3038
+ */
3039
+ export function setUiOptions(options: UiOptions): Promise<void>;
3040
+ /**
3041
+ * Change the download UI of every window associated with the current browser profile. As long as at least one extension has set UiOptions.enabled to false, the download UI will be hidden. Setting UiOptions.enabled to true while at least one other extension has disabled it will return an error through runtime.lastError. Requires the "downloads.ui" permission in addition to the "downloads" permission.
3042
+ * @param options Encapsulate a change to the download UI.
3043
+ * @param callback Called when the setUiOptions request is completed.
3044
+ * @since Chrome 105
3045
+ */
3046
+ export function setUiOptions(options: UiOptions, callback: () => void): void;
3029
3047
 
3030
3048
  /** When any of a DownloadItem's properties except bytesReceived and estimatedEndTime changes, this event fires with the downloadId and an object containing the properties that changed. */
3031
3049
  export var onChanged: DownloadChangedEvent;
@@ -3562,17 +3580,17 @@ declare namespace chrome.fileSystemProvider {
3562
3580
  }
3563
3581
 
3564
3582
  export interface EntryMetadata {
3565
- /** True if it is a directory. */
3566
- isDirectory: boolean;
3567
- /** Name of this entry (not full path name). Must not contain '/'. For root it must be empty. */
3568
- name: string;
3569
- /** File size in bytes. */
3570
- size: number;
3571
- /** The last modified time of this entry. */
3572
- modificationTime: Date;
3573
- /** Optional. Mime type for the entry. */
3583
+ /** True if it is a directory. Must be provided if requested in `options`. */
3584
+ isDirectory?: boolean;
3585
+ /** Name of this entry (not full path name). Must not contain '/'. For root it must be empty. Must be provided if requested in `options`. */
3586
+ name?: string;
3587
+ /** File size in bytes. Must be provided if requested in `options`. */
3588
+ size?: number;
3589
+ /** The last modified time of this entry. Must be provided if requested in `options`. */
3590
+ modificationTime?: Date;
3591
+ /** Optional. Mime type for the entry. Always optional, but should provided if requested in `options`. */
3574
3592
  mimeType?: string | undefined;
3575
- /** Optional. 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 onGetMetadataRequested event. */
3593
+ /** Optional. 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 onGetMetadataRequested event. */
3576
3594
  thumbnail?: string | undefined;
3577
3595
  }
3578
3596
 
@@ -3612,8 +3630,8 @@ declare namespace chrome.fileSystemProvider {
3612
3630
  fileSystemId: string;
3613
3631
  /** The unique identifier of this request. */
3614
3632
  requestId: number;
3615
- /** The path of the entry to return the list of actions for. */
3616
- entryPath: string;
3633
+ /** List of paths of entries for the list of actions. */
3634
+ entryPaths: string[];
3617
3635
  }
3618
3636
 
3619
3637
  /** @since Since Chrome 45. Warning: this is the current Beta channel. */
@@ -3630,8 +3648,8 @@ declare namespace chrome.fileSystemProvider {
3630
3648
  fileSystemId: string;
3631
3649
  /** The unique identifier of this request. */
3632
3650
  requestId: number;
3633
- /** The path of the entry to be used for the action. */
3634
- entryPath: string;
3651
+ /** The set of paths of the entries to be used for the action. */
3652
+ entryPaths: string[];
3635
3653
  /** The identifier of the action to be executed. */
3636
3654
  actionId: string;
3637
3655
  }
@@ -3699,11 +3717,33 @@ declare namespace chrome.fileSystemProvider {
3699
3717
  export interface MetadataRequestedEventOptions extends EntryPathRequestedEventOptions {
3700
3718
  /** Set to true if the thumbnail is requested. */
3701
3719
  thumbnail: boolean;
3720
+ /** Set to true if is_directory value is requested. */
3721
+ isDirectory: boolean;
3722
+ /** Set to true if name value is requested. */
3723
+ name: boolean;
3724
+ /** Set to true if size value is requested. */
3725
+ size: boolean;
3726
+ /** Set to true if modificationTime value is requested. */
3727
+ modificationTime: boolean;
3728
+ /** Set to true if mimeType value is requested. */
3729
+ mimeType: boolean;
3702
3730
  }
3703
3731
 
3704
3732
  export interface DirectoryPathRequestedEventOptions extends RequestedEventOptions {
3705
3733
  /** The path of the directory which is to be operated on. */
3706
3734
  directoryPath: string;
3735
+ /** Set to true if is_directory value is requested. */
3736
+ isDirectory: boolean;
3737
+ /** Set to true if name value is requested. */
3738
+ name: boolean;
3739
+ /** Set to true if size value is requested. */
3740
+ size: boolean;
3741
+ /** Set to true if modificationTime value is requested. */
3742
+ modificationTime: boolean;
3743
+ /** Set to true if mimeType value is requested. */
3744
+ mimeType: boolean;
3745
+ /** Set to true if the thumbnail is requested. */
3746
+ thumbnail: boolean;
3707
3747
  }
3708
3748
 
3709
3749
  export interface FilePathRequestedEventOptions extends RequestedEventOptions {
@@ -3878,6 +3918,24 @@ declare namespace chrome.fileSystemProvider {
3878
3918
  export interface OptionlessRequestedEvent
3879
3919
  extends chrome.events.Event<(successCallback: Function, errorCallback: (error: string) => void) => void> { }
3880
3920
 
3921
+ export interface GetActionsRequested
3922
+ extends chrome.events.Event<
3923
+ (
3924
+ options: GetActionsRequestedOptions,
3925
+ successCallback: (actions: Action[]) => void,
3926
+ errorCallback: (error: string) => void,
3927
+ ) => void
3928
+ > {}
3929
+
3930
+ export interface ExecuteActionRequested
3931
+ extends chrome.events.Event<
3932
+ (
3933
+ options: ExecuteActionRequestedOptions,
3934
+ successCallback: () => void,
3935
+ errorCallback: (error: string) => void,
3936
+ ) => void
3937
+ > {}
3938
+
3881
3939
  /**
3882
3940
  * Mounts a file system with the given fileSystemId and displayName. displayName will be shown in the left panel of 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.
3883
3941
  * Depending on the type of the file system being mounted, the source option must be set appropriately.
@@ -3961,6 +4019,23 @@ declare namespace chrome.fileSystemProvider {
3961
4019
  * @since Since Chrome 45. Warning: this is the current Beta channel.
3962
4020
  */
3963
4021
  export var onRemoveWatcherRequested: EntryPathRecursiveRequestedEvent;
4022
+
4023
+ /**
4024
+ * Raised when a list of actions for a set of files or directories at
4025
+ * `entryPaths` is requested. All of the returned actions must
4026
+ * be applicable to each entry. If there are no such actions, an empty array
4027
+ * should be returned. The actions must be returned with the
4028
+ * `successCallback` call. In case of an error,
4029
+ * `errorCallback` must be called.
4030
+ */
4031
+ export var onGetActionsRequested: GetActionsRequested;
4032
+
4033
+ /**
4034
+ * Raised when executing an action for a set of files or directories is
4035
+ * requested. After the action is completed, `successCallback`
4036
+ * must be called. On error, `errorCallback` must be called.
4037
+ */
4038
+ export var onExecuteActionRequested: ExecuteActionRequested;
3964
4039
  }
3965
4040
 
3966
4041
  ////////////////////
chrome/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/chrome",
3
- "version": "0.0.220",
3
+ "version": "0.0.222",
4
4
  "description": "TypeScript definitions for Chrome extension development",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome",
6
6
  "license": "MIT",
@@ -93,6 +93,6 @@
93
93
  "@types/filesystem": "*",
94
94
  "@types/har-format": "*"
95
95
  },
96
- "typesPublisherContentHash": "2e46caad2c34ed12445ec7f1aced10dc244b91ed4fe8eefddd26ec31a4d4e87b",
96
+ "typesPublisherContentHash": "a65eecc1cc99f3dcb852a4c4d53d7b0667fe41258bee4c615976b800986ebccb",
97
97
  "typeScriptVersion": "4.2"
98
98
  }