@types/chrome 0.0.300 → 0.0.301

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 +110 -0
  3. chrome/package.json +2 -2
chrome/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for chrome (http://developer.chrome.com/e
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Thu, 30 Jan 2025 16:37:44 GMT
11
+ * Last updated: Mon, 03 Feb 2025 11:02:25 GMT
12
12
  * Dependencies: [@types/filesystem](https://npmjs.com/package/@types/filesystem), [@types/har-format](https://npmjs.com/package/@types/har-format)
13
13
 
14
14
  # Credits
chrome/index.d.ts CHANGED
@@ -7596,6 +7596,116 @@ declare namespace chrome {
7596
7596
  export var onProxyError: ProxyErrorEvent;
7597
7597
  }
7598
7598
 
7599
+ ////////////////////
7600
+ // ReadingList
7601
+ ////////////////////
7602
+ /**
7603
+ * Use the `chrome.readingList` API to read from and modify the items in the Reading List.
7604
+ *
7605
+ * Permissions: "readingList"
7606
+ * @since Chrome 120, MV3
7607
+ */
7608
+ export namespace readingList {
7609
+ export interface AddEntryOptions {
7610
+ /** Will be `true` if the entry has been read. */
7611
+ hasBeenRead: boolean;
7612
+ /** The title of the entry. */
7613
+ title: string;
7614
+ /** The url of the entry. */
7615
+ url: string;
7616
+ }
7617
+
7618
+ export interface QueryInfo {
7619
+ /** Indicates whether to search for read (`true`) or unread (`false`) items. */
7620
+ hasBeenRead?: boolean | undefined;
7621
+ /** A title to search for. */
7622
+ title?: string | undefined;
7623
+ /** A url to search for. */
7624
+ url?: string | undefined;
7625
+ }
7626
+
7627
+ export interface ReadingListEntry {
7628
+ /** The time the entry was created. Recorded in milliseconds since Jan 1, 1970. */
7629
+ creationTime: number;
7630
+ /** Will be `true` if the entry has been read. */
7631
+ hasBeenRead: boolean;
7632
+ /** The last time the entry was updated. This value is in milliseconds since Jan 1, 1970. */
7633
+ lastUpdateTime: number;
7634
+ /** The title of the entry. */
7635
+ title: string;
7636
+ /** The url of the entry. */
7637
+ url: string;
7638
+ }
7639
+
7640
+ export interface RemoveOptions {
7641
+ /** The url to remove. */
7642
+ url: string;
7643
+ }
7644
+
7645
+ export interface UpdateEntryOptions {
7646
+ /** The updated read status. The existing status remains if a value isn't provided. */
7647
+ hasBeenRead?: boolean | undefined;
7648
+ /** The new title. The existing tile remains if a value isn't provided. */
7649
+ title?: string | undefined;
7650
+ /** The url that will be updated. */
7651
+ url: string;
7652
+ }
7653
+
7654
+ /**
7655
+ * Adds an entry to the reading list if it does not exist.
7656
+ * @since Chrome 120, MV3
7657
+ * @param entry The entry to add to the reading list.
7658
+ * @param callback
7659
+ */
7660
+ export function addEntry(entry: AddEntryOptions): Promise<void>;
7661
+ export function addEntry(entry: AddEntryOptions, callback: () => void): void;
7662
+
7663
+ /**
7664
+ * Retrieves all entries that match the `QueryInfo` properties. Properties that are not provided will not be matched.
7665
+ * @since Chrome 120, MV3
7666
+ * @param info The properties to search for.
7667
+ * @param callback
7668
+ */
7669
+ export function query(info: QueryInfo): Promise<ReadingListEntry[]>;
7670
+ export function query(info: QueryInfo, callback: (entries: ReadingListEntry[]) => void): void;
7671
+
7672
+ /**
7673
+ * Removes an entry from the reading list if it exists.
7674
+ * @since Chrome 120, MV3
7675
+ * @param info The entry to remove from the reading list.
7676
+ * @param callback
7677
+ */
7678
+ export function removeEntry(info: RemoveOptions): Promise<void>;
7679
+ export function removeEntry(info: RemoveOptions, callback: () => void): void;
7680
+
7681
+ /**
7682
+ * Updates a reading list entry if it exists.
7683
+ * @since Chrome 120, MV3
7684
+ * @param info The entry to update.
7685
+ * @param callback
7686
+ */
7687
+ export function updateEntry(info: UpdateEntryOptions): Promise<void>;
7688
+ export function updateEntry(info: UpdateEntryOptions, callback: () => void): void;
7689
+
7690
+ /**
7691
+ * Triggered when a ReadingListEntry is added to the reading list.
7692
+ * @since Chrome 120, MV3
7693
+ */
7694
+ export const onEntryAdded: chrome.events.Event<(entry: ReadingListEntry) => void>;
7695
+
7696
+ /**
7697
+ * Triggered when a ReadingListEntry is removed from the reading list.
7698
+ * @since Chrome 120, MV3
7699
+ */
7700
+ export const onEntryRemoved: chrome.events.Event<(entry: ReadingListEntry) => void>;
7701
+
7702
+ /**
7703
+ * Triggered when a ReadingListEntry is updated in the reading list.
7704
+ * @since Chrome 120, MV3
7705
+ */
7706
+ export const onEntryUpdated: chrome.events.Event<(entry: ReadingListEntry) => void>;
7707
+ }
7708
+
7599
7709
  ////////////////////
7600
7710
  // Search
7601
7711
  ////////////////////
chrome/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/chrome",
3
- "version": "0.0.300",
3
+ "version": "0.0.301",
4
4
  "description": "TypeScript definitions for chrome",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome",
6
6
  "license": "MIT",
@@ -94,6 +94,6 @@
94
94
  "@types/har-format": "*"
95
95
  },
96
96
  "peerDependencies": {},
97
- "typesPublisherContentHash": "0cbcca2b19b5e0ccd0a0fdd1266a84b83ad6a9bf73b0c8a4a84e60e15f0aec1e",
97
+ "typesPublisherContentHash": "9ddc7f638f558fc657440fa08d4ed99ac5456e7a6752f3759d30ba53ba7c1804",
98
98
  "typeScriptVersion": "5.0"
99
99
  }