@types/chrome 0.0.220 → 0.0.221

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. chrome/README.md +1 -1
  2. chrome/index.d.ts +71 -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: Fri, 10 Mar 2023 11:02:34 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
@@ -3562,17 +3562,17 @@ declare namespace chrome.fileSystemProvider {
3562
3562
  }
3563
3563
 
3564
3564
  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. */
3565
+ /** True if it is a directory. Must be provided if requested in `options`. */
3566
+ isDirectory?: boolean;
3567
+ /** Name of this entry (not full path name). Must not contain '/'. For root it must be empty. Must be provided if requested in `options`. */
3568
+ name?: string;
3569
+ /** File size in bytes. Must be provided if requested in `options`. */
3570
+ size?: number;
3571
+ /** The last modified time of this entry. Must be provided if requested in `options`. */
3572
+ modificationTime?: Date;
3573
+ /** Optional. Mime type for the entry. Always optional, but should provided if requested in `options`. */
3574
3574
  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. */
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. */
3576
3576
  thumbnail?: string | undefined;
3577
3577
  }
3578
3578
 
@@ -3612,8 +3612,8 @@ declare namespace chrome.fileSystemProvider {
3612
3612
  fileSystemId: string;
3613
3613
  /** The unique identifier of this request. */
3614
3614
  requestId: number;
3615
- /** The path of the entry to return the list of actions for. */
3616
- entryPath: string;
3615
+ /** List of paths of entries for the list of actions. */
3616
+ entryPaths: string[];
3617
3617
  }
3618
3618
 
3619
3619
  /** @since Since Chrome 45. Warning: this is the current Beta channel. */
@@ -3630,8 +3630,8 @@ declare namespace chrome.fileSystemProvider {
3630
3630
  fileSystemId: string;
3631
3631
  /** The unique identifier of this request. */
3632
3632
  requestId: number;
3633
- /** The path of the entry to be used for the action. */
3634
- entryPath: string;
3633
+ /** The set of paths of the entries to be used for the action. */
3634
+ entryPaths: string[];
3635
3635
  /** The identifier of the action to be executed. */
3636
3636
  actionId: string;
3637
3637
  }
@@ -3699,11 +3699,33 @@ declare namespace chrome.fileSystemProvider {
3699
3699
  export interface MetadataRequestedEventOptions extends EntryPathRequestedEventOptions {
3700
3700
  /** Set to true if the thumbnail is requested. */
3701
3701
  thumbnail: boolean;
3702
+ /** Set to true if is_directory value is requested. */
3703
+ isDirectory: boolean;
3704
+ /** Set to true if name value is requested. */
3705
+ name: boolean;
3706
+ /** Set to true if size value is requested. */
3707
+ size: boolean;
3708
+ /** Set to true if modificationTime value is requested. */
3709
+ modificationTime: boolean;
3710
+ /** Set to true if mimeType value is requested. */
3711
+ mimeType: boolean;
3702
3712
  }
3703
3713
 
3704
3714
  export interface DirectoryPathRequestedEventOptions extends RequestedEventOptions {
3705
3715
  /** The path of the directory which is to be operated on. */
3706
3716
  directoryPath: string;
3717
+ /** Set to true if is_directory value is requested. */
3718
+ isDirectory: boolean;
3719
+ /** Set to true if name value is requested. */
3720
+ name: boolean;
3721
+ /** Set to true if size value is requested. */
3722
+ size: boolean;
3723
+ /** Set to true if modificationTime value is requested. */
3724
+ modificationTime: boolean;
3725
+ /** Set to true if mimeType value is requested. */
3726
+ mimeType: boolean;
3727
+ /** Set to true if the thumbnail is requested. */
3728
+ thumbnail: boolean;
3707
3729
  }
3708
3730
 
3709
3731
  export interface FilePathRequestedEventOptions extends RequestedEventOptions {
@@ -3878,6 +3900,24 @@ declare namespace chrome.fileSystemProvider {
3878
3900
  export interface OptionlessRequestedEvent
3879
3901
  extends chrome.events.Event<(successCallback: Function, errorCallback: (error: string) => void) => void> { }
3880
3902
 
3903
+ export interface GetActionsRequested
3904
+ extends chrome.events.Event<
3905
+ (
3906
+ options: GetActionsRequestedOptions,
3907
+ successCallback: (actions: Action[]) => void,
3908
+ errorCallback: (error: string) => void,
3909
+ ) => void
3910
+ > {}
3911
+
3912
+ export interface ExecuteActionRequested
3913
+ extends chrome.events.Event<
3914
+ (
3915
+ options: ExecuteActionRequestedOptions,
3916
+ successCallback: () => void,
3917
+ errorCallback: (error: string) => void,
3918
+ ) => void
3919
+ > {}
3920
+
3881
3921
  /**
3882
3922
  * 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
3923
  * Depending on the type of the file system being mounted, the source option must be set appropriately.
@@ -3961,6 +4001,23 @@ declare namespace chrome.fileSystemProvider {
3961
4001
  * @since Since Chrome 45. Warning: this is the current Beta channel.
3962
4002
  */
3963
4003
  export var onRemoveWatcherRequested: EntryPathRecursiveRequestedEvent;
4004
+
4005
+ /**
4006
+ * Raised when a list of actions for a set of files or directories at
4007
+ * `entryPaths` is requested. All of the returned actions must
4008
+ * be applicable to each entry. If there are no such actions, an empty array
4009
+ * should be returned. The actions must be returned with the
4010
+ * `successCallback` call. In case of an error,
4011
+ * `errorCallback` must be called.
4012
+ */
4013
+ export var onGetActionsRequested: GetActionsRequested;
4014
+
4015
+ /**
4016
+ * Raised when executing an action for a set of files or directories is
4017
+ * requested. After the action is completed, `successCallback`
4018
+ * must be called. On error, `errorCallback` must be called.
4019
+ */
4020
+ export var onExecuteActionRequested: ExecuteActionRequested;
3964
4021
  }
3965
4022
 
3966
4023
  ////////////////////
chrome/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/chrome",
3
- "version": "0.0.220",
3
+ "version": "0.0.221",
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": "aeb2f3acda4d541a79645e8cdf449d06b6bdedd8a5b8c75cf1b56adadb6e64e8",
97
97
  "typeScriptVersion": "4.2"
98
98
  }