@types/chrome 0.0.273 → 0.0.275

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 +62 -6
  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: Sun, 29 Sep 2024 20:36:13 GMT
11
+ * Last updated: Wed, 02 Oct 2024 19:07:20 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
@@ -1822,6 +1822,11 @@ declare namespace chrome.cookies {
1822
1822
  domain: string;
1823
1823
  /** The name of the cookie. */
1824
1824
  name: string;
1825
+ /**
1826
+ * The partition key for reading or modifying cookies with the Partitioned attribute.
1827
+ * @since Chrome 119
1828
+ */
1829
+ partitionKey?: CookiePartitionKey;
1825
1830
  /** The ID of the cookie store containing this cookie, as provided in getAllCookieStores(). */
1826
1831
  storeId: string;
1827
1832
  /** The value of the cookie. */
@@ -1845,6 +1850,12 @@ declare namespace chrome.cookies {
1845
1850
  sameSite: SameSiteStatus;
1846
1851
  }
1847
1852
 
1853
+ /** Represents a partitioned cookie's partition key. */
1854
+ export interface CookiePartitionKey {
1855
+ /** The top-level site the partitioned cookie is available in. */
1856
+ topLevelSite?: string | undefined;
1857
+ }
1858
+
1848
1859
  /** Represents a cookie store in the browser. An incognito mode window, for instance, uses a separate cookie store from a non-incognito window. */
1849
1860
  export interface CookieStore {
1850
1861
  /** The unique identifier for the cookie store. */
@@ -1858,6 +1869,11 @@ declare namespace chrome.cookies {
1858
1869
  domain?: string | undefined;
1859
1870
  /** Optional. Filters the cookies by name. */
1860
1871
  name?: string | undefined;
1872
+ /**
1873
+ * The partition key for reading or modifying cookies with the Partitioned attribute.
1874
+ * @since Chrome 119
1875
+ */
1876
+ partitionKey?: CookiePartitionKey | undefined;
1861
1877
  /** Optional. Restricts the retrieved cookies to those that would match the given URL. */
1862
1878
  url?: string | undefined;
1863
1879
  /** Optional. The cookie store to retrieve cookies from. If omitted, the current execution context's cookie store will be used. */
@@ -1875,6 +1891,11 @@ declare namespace chrome.cookies {
1875
1891
  domain?: string | undefined;
1876
1892
  /** Optional. The name of the cookie. Empty by default if omitted. */
1877
1893
  name?: string | undefined;
1894
+ /**
1895
+ * The partition key for reading or modifying cookies with the Partitioned attribute.
1896
+ * @since Chrome 119
1897
+ */
1898
+ partitionKey?: CookiePartitionKey | undefined;
1878
1899
  /** The request-URI to associate with the setting of the cookie. This value can affect the default domain and path values of the created cookie. If host permissions for this URL are not specified in the manifest file, the API call will fail. */
1879
1900
  url: string;
1880
1901
  /** Optional. The ID of the cookie store in which to set the cookie. By default, the cookie is set in the current execution context's cookie store. */
@@ -1896,10 +1917,19 @@ declare namespace chrome.cookies {
1896
1917
  sameSite?: SameSiteStatus | undefined;
1897
1918
  }
1898
1919
 
1899
- export interface Details {
1920
+ /** Details to identify the cookie. */
1921
+ export interface CookieDetails {
1922
+ /** The name of the cookie to access. */
1900
1923
  name: string;
1901
- url: string;
1924
+ /**
1925
+ * The partition key for reading or modifying cookies with the Partitioned attribute.
1926
+ * @since Chrome 119
1927
+ */
1928
+ partitionKey?: CookiePartitionKey | undefined;
1929
+ /** The ID of the cookie store in which to look for the cookie. By default, the current execution context's cookie store will be used. */
1902
1930
  storeId?: string | undefined;
1931
+ /** The URL with which the cookie to access is associated. This argument may be a full URL, in which case any data following the URL path (e.g. the query string) is simply ignored. If host permissions for this URL are not specified in the manifest file, the API call will fail. */
1932
+ url: string;
1903
1933
  }
1904
1934
 
1905
1935
  export interface CookieChangeInfo {
@@ -1955,24 +1985,24 @@ declare namespace chrome.cookies {
1955
1985
  * @param details Information to identify the cookie to remove.
1956
1986
  * @return The `remove` method provides its result via callback or returned as a `Promise` (MV3 only).
1957
1987
  */
1958
- export function remove(details: Details): Promise<Details>;
1988
+ export function remove(details: CookieDetails): Promise<CookieDetails>;
1959
1989
  /**
1960
1990
  * Deletes a cookie by name.
1961
1991
  * @param details Information to identify the cookie to remove.
1962
1992
  */
1963
- export function remove(details: Details, callback?: (details: Details) => void): void;
1993
+ export function remove(details: CookieDetails, callback?: (details: CookieDetails) => void): void;
1964
1994
  /**
1965
1995
  * Retrieves information about a single cookie. If more than one cookie of the same name exists for the given URL, the one with the longest path will be returned. For cookies with the same path length, the cookie with the earliest creation time will be returned.
1966
1996
  * @param details Details to identify the cookie being retrieved.
1967
1997
  * Parameter cookie: Contains details about the cookie. This parameter is null if no such cookie was found.
1968
1998
  */
1969
- export function get(details: Details, callback: (cookie: Cookie | null) => void): void;
1999
+ export function get(details: CookieDetails, callback: (cookie: Cookie | null) => void): void;
1970
2000
  /**
1971
2001
  * Retrieves information about a single cookie. If more than one cookie of the same name exists for the given URL, the one with the longest path will be returned. For cookies with the same path length, the cookie with the earliest creation time will be returned.
1972
2002
  * @param details Details to identify the cookie being retrieved.
1973
2003
  * @return The `get` method provides its result via callback or returned as a `Promise` (MV3 only).
1974
2004
  */
1975
- export function get(details: Details): Promise<Cookie | null>;
2005
+ export function get(details: CookieDetails): Promise<Cookie | null>;
1976
2006
 
1977
2007
  /** Fired when a cookie is set or removed. As a special case, note that updating a cookie's properties is implemented as a two step process: the cookie to be updated is first removed entirely, generating a notification with "cause" of "overwrite" . Afterwards, a new cookie is written with the updated values, generating a second notification with "cause" "explicit". */
1978
2008
  export var onChanged: CookieChangedEvent;
@@ -7493,6 +7523,7 @@ declare namespace chrome.runtime {
7493
7523
  | "system.display"
7494
7524
  | "system.memory"
7495
7525
  | "system.storage"
7526
+ | "systemLog"
7496
7527
  | "tabCapture"
7497
7528
  | "tabGroups"
7498
7529
  | "tabs"
@@ -9413,6 +9444,31 @@ declare namespace chrome.system.display {
9413
9444
  export const onDisplayChanged: chrome.events.Event<() => void>;
9414
9445
  }
9415
9446
 
9447
+ ////////////////////
9448
+ // SystemLog
9449
+ ////////////////////
9450
+ /**
9451
+ * Use the chrome.systemLog API to record Chrome system logs from extensions.
9452
+ *
9453
+ * Permissions: "systemLog"
9454
+ *
9455
+ * Note: This API is only for extensions pre-installed by policy.
9456
+ * @platform ChromeOS only
9457
+ * @since Chrome 125
9458
+ */
9459
+ declare namespace chrome.systemLog {
9460
+ export interface MessageOptions {
9461
+ message: string;
9462
+ }
9463
+
9464
+ /**
9465
+ * Adds a new log record.
9466
+ * Can return its result via Promise in Manifest V3 or later.
9467
+ */
9468
+ export function add(options: MessageOptions): Promise<void>;
9469
+ export function add(options: MessageOptions, callback: () => void): void;
9470
+ }
9471
+
9416
9472
  ////////////////////
9417
9473
  // TabCapture
9418
9474
  ////////////////////
chrome/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/chrome",
3
- "version": "0.0.273",
3
+ "version": "0.0.275",
4
4
  "description": "TypeScript definitions for chrome",
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": "2a75c93252a186c037a6da9faff445b85ad221b8e56562fb415f9e440ff51096",
96
+ "typesPublisherContentHash": "28d212168a740540fced1a60a357c40d3a3e5535e79e56f6ce810482806f9b37",
97
97
  "typeScriptVersion": "4.8"
98
98
  }