cdp-driver 0.3.0

Chrome DevTools Protocol client for AI agent browser control
Documentation
// @generated by `just generate-methods` from protocol/*.json.
// Do not edit by hand; edit xtask/ and regenerate.

//! The `Storage` domain.
//!
//! Method names for the `Storage` domain, for use with
//! [`CdpClient::call`](crate::CdpClient::call).
//!
//! This domain is experimental and may change without notice.

/// Returns a storage key given a frame id. Deprecated. Please use
/// Storage.getStorageKey instead.
///
/// Deprecated in the protocol.
///
/// Parameters:
/// - `frameId`: Page.FrameId
///
/// Returns: `storageKey`
pub const GET_STORAGE_KEY_FOR_FRAME: &str = "Storage.getStorageKeyForFrame";

/// Returns storage key for the given frame. If no frame ID is provided, the
/// storage key of the target executing this command is returned.
///
/// Experimental: may change without notice.
///
/// Parameters:
/// - `frameId`: Page.FrameId (optional)
///
/// Returns: `storageKey`
pub const GET_STORAGE_KEY: &str = "Storage.getStorageKey";

/// Clears storage for origin.
///
/// Parameters:
/// - `origin`: string
/// - `storageTypes`: string
pub const CLEAR_DATA_FOR_ORIGIN: &str = "Storage.clearDataForOrigin";

/// Clears storage for storage key.
///
/// Parameters:
/// - `storageKey`: string
/// - `storageTypes`: string
pub const CLEAR_DATA_FOR_STORAGE_KEY: &str = "Storage.clearDataForStorageKey";

/// Returns all browser cookies.
///
/// Parameters:
/// - `browserContextId`: Browser.BrowserContextID (optional)
///
/// Returns: `cookies`
pub const GET_COOKIES: &str = "Storage.getCookies";

/// Sets given cookies.
///
/// Parameters:
/// - `cookies`: array
/// - `browserContextId`: Browser.BrowserContextID (optional)
pub const SET_COOKIES: &str = "Storage.setCookies";

/// Clears cookies.
///
/// Parameters:
/// - `browserContextId`: Browser.BrowserContextID (optional)
pub const CLEAR_COOKIES: &str = "Storage.clearCookies";

/// Returns usage and quota in bytes.
///
/// Parameters:
/// - `origin`: string
///
/// Returns: `usage`, `quota`, `overrideActive`, `usageBreakdown`
pub const GET_USAGE_AND_QUOTA: &str = "Storage.getUsageAndQuota";

/// Override quota for the specified origin
///
/// Experimental: may change without notice.
///
/// Parameters:
/// - `origin`: string
/// - `quotaSize`: number (optional)
pub const OVERRIDE_QUOTA_FOR_ORIGIN: &str = "Storage.overrideQuotaForOrigin";

/// Registers origin to be notified when an update occurs to its cache storage
/// list.
///
/// Parameters:
/// - `origin`: string
pub const TRACK_CACHE_STORAGE_FOR_ORIGIN: &str = "Storage.trackCacheStorageForOrigin";

/// Registers storage key to be notified when an update occurs to its cache
/// storage list.
///
/// Parameters:
/// - `storageKey`: string
pub const TRACK_CACHE_STORAGE_FOR_STORAGE_KEY: &str = "Storage.trackCacheStorageForStorageKey";

/// Registers origin to be notified when an update occurs to its IndexedDB.
///
/// Parameters:
/// - `origin`: string
pub const TRACK_INDEXED_DB_FOR_ORIGIN: &str = "Storage.trackIndexedDBForOrigin";

/// Registers storage key to be notified when an update occurs to its
/// IndexedDB.
///
/// Parameters:
/// - `storageKey`: string
pub const TRACK_INDEXED_DB_FOR_STORAGE_KEY: &str = "Storage.trackIndexedDBForStorageKey";

/// Unregisters origin from receiving notifications for cache storage.
///
/// Parameters:
/// - `origin`: string
pub const UNTRACK_CACHE_STORAGE_FOR_ORIGIN: &str = "Storage.untrackCacheStorageForOrigin";

/// Unregisters storage key from receiving notifications for cache storage.
///
/// Parameters:
/// - `storageKey`: string
pub const UNTRACK_CACHE_STORAGE_FOR_STORAGE_KEY: &str = "Storage.untrackCacheStorageForStorageKey";

/// Unregisters origin from receiving notifications for IndexedDB.
///
/// Parameters:
/// - `origin`: string
pub const UNTRACK_INDEXED_DB_FOR_ORIGIN: &str = "Storage.untrackIndexedDBForOrigin";

/// Unregisters storage key from receiving notifications for IndexedDB.
///
/// Parameters:
/// - `storageKey`: string
pub const UNTRACK_INDEXED_DB_FOR_STORAGE_KEY: &str = "Storage.untrackIndexedDBForStorageKey";

/// Returns the number of stored Trust Tokens per issuer for the current
/// browsing context.
///
/// Experimental: may change without notice.
///
/// Returns: `tokens`
pub const GET_TRUST_TOKENS: &str = "Storage.getTrustTokens";

/// Removes all Trust Tokens issued by the provided issuerOrigin. Leaves other
/// stored data, including the issuer's Redemption Records, intact.
///
/// Experimental: may change without notice.
///
/// Parameters:
/// - `issuerOrigin`: string
///
/// Returns: `didDeleteTokens`
pub const CLEAR_TRUST_TOKENS: &str = "Storage.clearTrustTokens";

/// Gets metadata for an origin's shared storage.
///
/// Experimental: may change without notice.
///
/// Parameters:
/// - `ownerOrigin`: string
///
/// Returns: `metadata`
pub const GET_SHARED_STORAGE_METADATA: &str = "Storage.getSharedStorageMetadata";

/// Gets the entries in an given origin's shared storage.
///
/// Experimental: may change without notice.
///
/// Parameters:
/// - `ownerOrigin`: string
///
/// Returns: `entries`
pub const GET_SHARED_STORAGE_ENTRIES: &str = "Storage.getSharedStorageEntries";

/// Sets entry with `key` and `value` for a given origin's shared storage.
///
/// Experimental: may change without notice.
///
/// Parameters:
/// - `ownerOrigin`: string
/// - `key`: string
/// - `value`: string
/// - `ignoreIfPresent`: boolean (optional)
pub const SET_SHARED_STORAGE_ENTRY: &str = "Storage.setSharedStorageEntry";

/// Deletes entry for `key` (if it exists) for a given origin's shared
/// storage.
///
/// Experimental: may change without notice.
///
/// Parameters:
/// - `ownerOrigin`: string
/// - `key`: string
pub const DELETE_SHARED_STORAGE_ENTRY: &str = "Storage.deleteSharedStorageEntry";

/// Clears all entries for a given origin's shared storage.
///
/// Experimental: may change without notice.
///
/// Parameters:
/// - `ownerOrigin`: string
pub const CLEAR_SHARED_STORAGE_ENTRIES: &str = "Storage.clearSharedStorageEntries";

/// Resets the budget for `ownerOrigin` by clearing all budget withdrawals.
///
/// Experimental: may change without notice.
///
/// Parameters:
/// - `ownerOrigin`: string
pub const RESET_SHARED_STORAGE_BUDGET: &str = "Storage.resetSharedStorageBudget";

/// Enables/disables issuing of sharedStorageAccessed events.
///
/// Experimental: may change without notice.
///
/// Parameters:
/// - `enable`: boolean
pub const SET_SHARED_STORAGE_TRACKING: &str = "Storage.setSharedStorageTracking";

/// Set tracking for a storage key's buckets.
///
/// Experimental: may change without notice.
///
/// Parameters:
/// - `storageKey`: string
/// - `enable`: boolean
pub const SET_STORAGE_BUCKET_TRACKING: &str = "Storage.setStorageBucketTracking";

/// Deletes the Storage Bucket with the given storage key and bucket name.
///
/// Experimental: may change without notice.
///
/// Parameters:
/// - `bucket`: StorageBucket
pub const DELETE_STORAGE_BUCKET: &str = "Storage.deleteStorageBucket";

/// Deletes state for sites identified as potential bounce trackers,
/// immediately.
///
/// Experimental: may change without notice.
///
/// Returns: `deletedSites`
pub const RUN_BOUNCE_TRACKING_MITIGATIONS: &str = "Storage.runBounceTrackingMitigations";

/// Returns the effective Related Website Sets in use by this profile for the
/// browser session. The effective Related Website Sets will not change during
/// a browser session.
///
/// Experimental: may change without notice.
///
/// Returns: `sets`
pub const GET_RELATED_WEBSITE_SETS: &str = "Storage.getRelatedWebsiteSets";