@types/chrome 0.0.274 → 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 +36 -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: Wed, 02 Oct 2024 18:10:02 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;
chrome/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/chrome",
3
- "version": "0.0.274",
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": "cd89f522cf6bb0e688b9d3791fa8dba9cee8bbceeb0ee9d6897aa3d3b54d83aa",
96
+ "typesPublisherContentHash": "28d212168a740540fced1a60a357c40d3a3e5535e79e56f6ce810482806f9b37",
97
97
  "typeScriptVersion": "4.8"
98
98
  }