Skip to main content

cdp_driver/protocol/
storage.rs

1// @generated by `just generate-methods` from protocol/*.json.
2// Do not edit by hand; edit xtask/ and regenerate.
3
4//! The `Storage` domain.
5//!
6//! Types, command parameters and event payloads for the `Storage`
7//! domain. The method-name constants for the same domain are in
8//! [`crate::methods`].
9//!
10//! This domain is experimental and may change without notice.
11
12use serde::{Deserialize, Serialize};
13
14pub type SerializedStorageKey = String;
15
16/// Enum of possible storage types.
17#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
18pub enum StorageType {
19    /// `cookies`
20    #[serde(rename = "cookies")]
21    Cookies,
22    /// `file_systems`
23    #[serde(rename = "file_systems")]
24    FileSystems,
25    /// `indexeddb`
26    #[serde(rename = "indexeddb")]
27    Indexeddb,
28    /// `local_storage`
29    #[serde(rename = "local_storage")]
30    LocalStorage,
31    /// `shader_cache`
32    #[serde(rename = "shader_cache")]
33    ShaderCache,
34    /// `websql`
35    #[serde(rename = "websql")]
36    Websql,
37    /// `service_workers`
38    #[serde(rename = "service_workers")]
39    ServiceWorkers,
40    /// `cache_storage`
41    #[serde(rename = "cache_storage")]
42    CacheStorage,
43    /// `storage_buckets`
44    #[serde(rename = "storage_buckets")]
45    StorageBuckets,
46    /// `all`
47    #[serde(rename = "all")]
48    All,
49    /// `other`
50    #[serde(rename = "other")]
51    Other,
52    /// A value this vendored schema does not list. Chrome adds values ahead of
53    /// the published protocol, so an unrecognised one is kept as it arrived
54    /// rather than failing the payload it came in.
55    #[serde(untagged)]
56    Unrecognized(String),
57}
58
59/// Usage for a storage type.
60#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
61pub struct UsageForType {
62    /// Name of storage type.
63    #[serde(rename = "storageType")]
64    pub storage_type: StorageType,
65    /// Storage usage (bytes).
66    pub usage: f64,
67}
68
69/// Pair of issuer origin and number of available (signed, but not used) Trust
70/// Tokens from that issuer.
71///
72/// Experimental: may change without notice.
73#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
74pub struct TrustTokens {
75    #[serde(rename = "issuerOrigin")]
76    pub issuer_origin: String,
77    pub count: f64,
78}
79
80/// Details of a stored Private Verification Token.
81///
82/// Experimental: may change without notice.
83#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
84pub struct PrivateVerificationToken {
85    /// Unique identifier of the token in the database.
86    pub id: String,
87    /// Origin of the token issuer.
88    #[serde(rename = "issuerOrigin")]
89    pub issuer_origin: String,
90    /// Public key ID used to issue the token.
91    #[serde(rename = "keyId")]
92    pub key_id: i64,
93    /// Expiration timestamp in seconds since the epoch.
94    pub expiration: crate::protocol::network::TimeSinceEpoch,
95    /// Token creation timestamp in seconds since the epoch.
96    #[serde(rename = "creationTime")]
97    pub creation_time: crate::protocol::network::TimeSinceEpoch,
98    /// Token protocol version.
99    pub version: i64,
100    /// Base64-encoded serialized token.
101    pub token: String,
102}
103
104/// Configuration for a Private Verification Tokens issuer.
105///
106/// Experimental: may change without notice.
107#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
108pub struct PrivateVerificationTokensIssuerConfig {
109    /// Origin of the token issuer.
110    #[serde(rename = "issuerOrigin")]
111    pub issuer_origin: String,
112    /// Origins authorized to redeem tokens from this issuer.
113    #[serde(rename = "redeemerOrigins")]
114    pub redeemer_origins: Vec<String>,
115}
116
117#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
118pub enum StorageBucketsDurability {
119    /// `relaxed`
120    #[serde(rename = "relaxed")]
121    Relaxed,
122    /// `strict`
123    #[serde(rename = "strict")]
124    Strict,
125    /// A value this vendored schema does not list. Chrome adds values ahead of
126    /// the published protocol, so an unrecognised one is kept as it arrived
127    /// rather than failing the payload it came in.
128    #[serde(untagged)]
129    Unrecognized(String),
130}
131
132#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
133pub struct StorageBucket {
134    #[serde(rename = "storageKey")]
135    pub storage_key: SerializedStorageKey,
136    /// If not specified, it is the default bucket of the storageKey.
137    #[serde(default, skip_serializing_if = "Option::is_none")]
138    pub name: Option<String>,
139}
140
141#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
142pub struct StorageBucketInfo {
143    pub bucket: StorageBucket,
144    pub id: String,
145    pub expiration: crate::protocol::network::TimeSinceEpoch,
146    /// Storage quota (bytes).
147    pub quota: f64,
148    pub persistent: bool,
149    pub durability: StorageBucketsDurability,
150}
151
152/// Returns a storage key given a frame id. Deprecated. Please use
153/// Storage.getStorageKey instead.
154///
155/// Deprecated in the protocol.
156///
157/// Parameters of `Storage.getStorageKeyForFrame`.
158#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
159pub struct GetStorageKeyForFrameParams {
160    #[serde(rename = "frameId")]
161    pub frame_id: crate::protocol::page::FrameId,
162}
163
164/// What `Storage.getStorageKeyForFrame` answers with.
165#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
166pub struct GetStorageKeyForFrameReturns {
167    #[serde(rename = "storageKey")]
168    pub storage_key: SerializedStorageKey,
169}
170
171impl crate::typed::Command for GetStorageKeyForFrameParams {
172    const METHOD: &'static str = "Storage.getStorageKeyForFrame";
173    type Returns = GetStorageKeyForFrameReturns;
174}
175
176/// Returns storage key for the given frame. If no frame ID is provided, the
177/// storage key of the target executing this command is returned.
178///
179/// Experimental: may change without notice.
180///
181/// Parameters of `Storage.getStorageKey`.
182#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
183pub struct GetStorageKeyParams {
184    #[serde(rename = "frameId", default, skip_serializing_if = "Option::is_none")]
185    pub frame_id: Option<crate::protocol::page::FrameId>,
186}
187
188/// What `Storage.getStorageKey` answers with.
189#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
190pub struct GetStorageKeyReturns {
191    #[serde(rename = "storageKey")]
192    pub storage_key: SerializedStorageKey,
193}
194
195impl crate::typed::Command for GetStorageKeyParams {
196    const METHOD: &'static str = "Storage.getStorageKey";
197    type Returns = GetStorageKeyReturns;
198}
199
200/// Clears storage for origin.
201///
202/// Parameters of `Storage.clearDataForOrigin`.
203#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
204pub struct ClearDataForOriginParams {
205    /// Security origin.
206    pub origin: String,
207    /// Comma separated list of StorageType to clear.
208    #[serde(rename = "storageTypes")]
209    pub storage_types: String,
210}
211
212impl crate::typed::Command for ClearDataForOriginParams {
213    const METHOD: &'static str = "Storage.clearDataForOrigin";
214    type Returns = crate::typed::NoReturns;
215}
216
217/// Clears storage for storage key.
218///
219/// Parameters of `Storage.clearDataForStorageKey`.
220#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
221pub struct ClearDataForStorageKeyParams {
222    /// Storage key.
223    #[serde(rename = "storageKey")]
224    pub storage_key: String,
225    /// Comma separated list of StorageType to clear.
226    #[serde(rename = "storageTypes")]
227    pub storage_types: String,
228}
229
230impl crate::typed::Command for ClearDataForStorageKeyParams {
231    const METHOD: &'static str = "Storage.clearDataForStorageKey";
232    type Returns = crate::typed::NoReturns;
233}
234
235/// Returns all browser cookies.
236///
237/// Parameters of `Storage.getCookies`.
238#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
239pub struct GetCookiesParams {
240    /// Browser context to use when called on the browser endpoint.
241    #[serde(
242        rename = "browserContextId",
243        default,
244        skip_serializing_if = "Option::is_none"
245    )]
246    pub browser_context_id: Option<crate::protocol::browser::BrowserContextId>,
247}
248
249/// What `Storage.getCookies` answers with.
250#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
251pub struct GetCookiesReturns {
252    /// Array of cookie objects.
253    pub cookies: Vec<crate::protocol::network::Cookie>,
254}
255
256impl crate::typed::Command for GetCookiesParams {
257    const METHOD: &'static str = "Storage.getCookies";
258    type Returns = GetCookiesReturns;
259}
260
261/// Sets given cookies.
262///
263/// Parameters of `Storage.setCookies`.
264#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
265pub struct SetCookiesParams {
266    /// Cookies to be set.
267    pub cookies: Vec<crate::protocol::network::CookieParam>,
268    /// Browser context to use when called on the browser endpoint.
269    #[serde(
270        rename = "browserContextId",
271        default,
272        skip_serializing_if = "Option::is_none"
273    )]
274    pub browser_context_id: Option<crate::protocol::browser::BrowserContextId>,
275}
276
277impl crate::typed::Command for SetCookiesParams {
278    const METHOD: &'static str = "Storage.setCookies";
279    type Returns = crate::typed::NoReturns;
280}
281
282/// Clears cookies.
283///
284/// Parameters of `Storage.clearCookies`.
285#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
286pub struct ClearCookiesParams {
287    /// Browser context to use when called on the browser endpoint.
288    #[serde(
289        rename = "browserContextId",
290        default,
291        skip_serializing_if = "Option::is_none"
292    )]
293    pub browser_context_id: Option<crate::protocol::browser::BrowserContextId>,
294}
295
296impl crate::typed::Command for ClearCookiesParams {
297    const METHOD: &'static str = "Storage.clearCookies";
298    type Returns = crate::typed::NoReturns;
299}
300
301/// Returns usage and quota in bytes.
302///
303/// Parameters of `Storage.getUsageAndQuota`.
304#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
305pub struct GetUsageAndQuotaParams {
306    /// Security origin.
307    pub origin: String,
308}
309
310/// What `Storage.getUsageAndQuota` answers with.
311#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
312pub struct GetUsageAndQuotaReturns {
313    /// Storage usage (bytes).
314    pub usage: f64,
315    /// Storage quota (bytes).
316    pub quota: f64,
317    /// Whether or not the origin has an active storage quota override
318    #[serde(rename = "overrideActive")]
319    pub override_active: bool,
320    /// Storage usage per type (bytes).
321    #[serde(rename = "usageBreakdown")]
322    pub usage_breakdown: Vec<UsageForType>,
323}
324
325impl crate::typed::Command for GetUsageAndQuotaParams {
326    const METHOD: &'static str = "Storage.getUsageAndQuota";
327    type Returns = GetUsageAndQuotaReturns;
328}
329
330/// Override quota for the specified origin
331///
332/// Experimental: may change without notice.
333///
334/// Parameters of `Storage.overrideQuotaForOrigin`.
335#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
336pub struct OverrideQuotaForOriginParams {
337    /// Security origin.
338    pub origin: String,
339    /// The quota size (in bytes) to override the original quota with. If this is
340    /// called multiple times, the overridden quota will be equal to the quotaSize
341    /// provided in the final call. If this is called without specifying a
342    /// quotaSize, the quota will be reset to the default value for the specified
343    /// origin. If this is called multiple times with different origins, the
344    /// override will be maintained for each origin until it is disabled (called
345    /// without a quotaSize).
346    #[serde(rename = "quotaSize", default, skip_serializing_if = "Option::is_none")]
347    pub quota_size: Option<f64>,
348}
349
350impl crate::typed::Command for OverrideQuotaForOriginParams {
351    const METHOD: &'static str = "Storage.overrideQuotaForOrigin";
352    type Returns = crate::typed::NoReturns;
353}
354
355/// Registers origin to be notified when an update occurs to its cache storage
356/// list.
357///
358/// Parameters of `Storage.trackCacheStorageForOrigin`.
359#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
360pub struct TrackCacheStorageForOriginParams {
361    /// Security origin.
362    pub origin: String,
363}
364
365impl crate::typed::Command for TrackCacheStorageForOriginParams {
366    const METHOD: &'static str = "Storage.trackCacheStorageForOrigin";
367    type Returns = crate::typed::NoReturns;
368}
369
370/// Registers storage key to be notified when an update occurs to its cache
371/// storage list.
372///
373/// Parameters of `Storage.trackCacheStorageForStorageKey`.
374#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
375pub struct TrackCacheStorageForStorageKeyParams {
376    /// Storage key.
377    #[serde(rename = "storageKey")]
378    pub storage_key: String,
379}
380
381impl crate::typed::Command for TrackCacheStorageForStorageKeyParams {
382    const METHOD: &'static str = "Storage.trackCacheStorageForStorageKey";
383    type Returns = crate::typed::NoReturns;
384}
385
386/// Registers origin to be notified when an update occurs to its IndexedDB.
387///
388/// Parameters of `Storage.trackIndexedDBForOrigin`.
389#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
390pub struct TrackIndexedDbForOriginParams {
391    /// Security origin.
392    pub origin: String,
393}
394
395impl crate::typed::Command for TrackIndexedDbForOriginParams {
396    const METHOD: &'static str = "Storage.trackIndexedDBForOrigin";
397    type Returns = crate::typed::NoReturns;
398}
399
400/// Registers storage key to be notified when an update occurs to its
401/// IndexedDB.
402///
403/// Parameters of `Storage.trackIndexedDBForStorageKey`.
404#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
405pub struct TrackIndexedDbForStorageKeyParams {
406    /// Storage key.
407    #[serde(rename = "storageKey")]
408    pub storage_key: String,
409}
410
411impl crate::typed::Command for TrackIndexedDbForStorageKeyParams {
412    const METHOD: &'static str = "Storage.trackIndexedDBForStorageKey";
413    type Returns = crate::typed::NoReturns;
414}
415
416/// Unregisters origin from receiving notifications for cache storage.
417///
418/// Parameters of `Storage.untrackCacheStorageForOrigin`.
419#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
420pub struct UntrackCacheStorageForOriginParams {
421    /// Security origin.
422    pub origin: String,
423}
424
425impl crate::typed::Command for UntrackCacheStorageForOriginParams {
426    const METHOD: &'static str = "Storage.untrackCacheStorageForOrigin";
427    type Returns = crate::typed::NoReturns;
428}
429
430/// Unregisters storage key from receiving notifications for cache storage.
431///
432/// Parameters of `Storage.untrackCacheStorageForStorageKey`.
433#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
434pub struct UntrackCacheStorageForStorageKeyParams {
435    /// Storage key.
436    #[serde(rename = "storageKey")]
437    pub storage_key: String,
438}
439
440impl crate::typed::Command for UntrackCacheStorageForStorageKeyParams {
441    const METHOD: &'static str = "Storage.untrackCacheStorageForStorageKey";
442    type Returns = crate::typed::NoReturns;
443}
444
445/// Unregisters origin from receiving notifications for IndexedDB.
446///
447/// Parameters of `Storage.untrackIndexedDBForOrigin`.
448#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
449pub struct UntrackIndexedDbForOriginParams {
450    /// Security origin.
451    pub origin: String,
452}
453
454impl crate::typed::Command for UntrackIndexedDbForOriginParams {
455    const METHOD: &'static str = "Storage.untrackIndexedDBForOrigin";
456    type Returns = crate::typed::NoReturns;
457}
458
459/// Unregisters storage key from receiving notifications for IndexedDB.
460///
461/// Parameters of `Storage.untrackIndexedDBForStorageKey`.
462#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
463pub struct UntrackIndexedDbForStorageKeyParams {
464    /// Storage key.
465    #[serde(rename = "storageKey")]
466    pub storage_key: String,
467}
468
469impl crate::typed::Command for UntrackIndexedDbForStorageKeyParams {
470    const METHOD: &'static str = "Storage.untrackIndexedDBForStorageKey";
471    type Returns = crate::typed::NoReturns;
472}
473
474/// Returns the number of stored Trust Tokens per issuer for the current
475/// browsing context.
476///
477/// Experimental: may change without notice.
478///
479/// Parameters of `Storage.getTrustTokens`.
480#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
481pub struct GetTrustTokensParams {}
482
483/// What `Storage.getTrustTokens` answers with.
484#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
485pub struct GetTrustTokensReturns {
486    pub tokens: Vec<TrustTokens>,
487}
488
489impl crate::typed::Command for GetTrustTokensParams {
490    const METHOD: &'static str = "Storage.getTrustTokens";
491    type Returns = GetTrustTokensReturns;
492}
493
494/// Removes all Trust Tokens issued by the provided issuerOrigin. Leaves other
495/// stored data, including the issuer's Redemption Records, intact.
496///
497/// Experimental: may change without notice.
498///
499/// Parameters of `Storage.clearTrustTokens`.
500#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
501pub struct ClearTrustTokensParams {
502    #[serde(rename = "issuerOrigin")]
503    pub issuer_origin: String,
504}
505
506/// What `Storage.clearTrustTokens` answers with.
507#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
508pub struct ClearTrustTokensReturns {
509    /// True if any tokens were deleted, false otherwise.
510    #[serde(rename = "didDeleteTokens")]
511    pub did_delete_tokens: bool,
512}
513
514impl crate::typed::Command for ClearTrustTokensParams {
515    const METHOD: &'static str = "Storage.clearTrustTokens";
516    type Returns = ClearTrustTokensReturns;
517}
518
519/// Returns all stored Private Verification Tokens for the current browsing
520/// context.
521///
522/// Experimental: may change without notice.
523///
524/// Parameters of `Storage.getPrivateVerificationTokens`.
525#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
526pub struct GetPrivateVerificationTokensParams {}
527
528/// What `Storage.getPrivateVerificationTokens` answers with.
529#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
530pub struct GetPrivateVerificationTokensReturns {
531    pub tokens: Vec<PrivateVerificationToken>,
532}
533
534impl crate::typed::Command for GetPrivateVerificationTokensParams {
535    const METHOD: &'static str = "Storage.getPrivateVerificationTokens";
536    type Returns = GetPrivateVerificationTokensReturns;
537}
538
539/// Returns the configured Private Verification Tokens issuers and their
540/// redeemer origins.
541///
542/// Experimental: may change without notice.
543///
544/// Parameters of `Storage.getPrivateVerificationTokensIssuerConfigs`.
545#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
546pub struct GetPrivateVerificationTokensIssuerConfigsParams {}
547
548/// What `Storage.getPrivateVerificationTokensIssuerConfigs` answers with.
549#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
550pub struct GetPrivateVerificationTokensIssuerConfigsReturns {
551    pub configs: Vec<PrivateVerificationTokensIssuerConfig>,
552}
553
554impl crate::typed::Command for GetPrivateVerificationTokensIssuerConfigsParams {
555    const METHOD: &'static str = "Storage.getPrivateVerificationTokensIssuerConfigs";
556    type Returns = GetPrivateVerificationTokensIssuerConfigsReturns;
557}
558
559/// Removes all Private Verification Tokens issued by the provided
560/// issuerOrigin.
561///
562/// Experimental: may change without notice.
563///
564/// Parameters of `Storage.clearPrivateVerificationTokens`.
565#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
566pub struct ClearPrivateVerificationTokensParams {
567    #[serde(rename = "issuerOrigin")]
568    pub issuer_origin: String,
569}
570
571impl crate::typed::Command for ClearPrivateVerificationTokensParams {
572    const METHOD: &'static str = "Storage.clearPrivateVerificationTokens";
573    type Returns = crate::typed::NoReturns;
574}
575
576/// Removes a specific Private Verification Token by its ID.
577///
578/// Experimental: may change without notice.
579///
580/// Parameters of `Storage.deletePrivateVerificationToken`.
581#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
582pub struct DeletePrivateVerificationTokenParams {
583    #[serde(rename = "tokenId")]
584    pub token_id: String,
585}
586
587impl crate::typed::Command for DeletePrivateVerificationTokenParams {
588    const METHOD: &'static str = "Storage.deletePrivateVerificationToken";
589    type Returns = crate::typed::NoReturns;
590}
591
592/// Set tracking for Private Verification Tokens.
593///
594/// Experimental: may change without notice.
595///
596/// Parameters of `Storage.setPrivateVerificationTokensTracking`.
597#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
598pub struct SetPrivateVerificationTokensTrackingParams {
599    pub enable: bool,
600}
601
602impl crate::typed::Command for SetPrivateVerificationTokensTrackingParams {
603    const METHOD: &'static str = "Storage.setPrivateVerificationTokensTracking";
604    type Returns = crate::typed::NoReturns;
605}
606
607/// Set tracking for a storage key's buckets.
608///
609/// Experimental: may change without notice.
610///
611/// Parameters of `Storage.setStorageBucketTracking`.
612#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
613pub struct SetStorageBucketTrackingParams {
614    #[serde(rename = "storageKey")]
615    pub storage_key: String,
616    pub enable: bool,
617}
618
619impl crate::typed::Command for SetStorageBucketTrackingParams {
620    const METHOD: &'static str = "Storage.setStorageBucketTracking";
621    type Returns = crate::typed::NoReturns;
622}
623
624/// Deletes the Storage Bucket with the given storage key and bucket name.
625///
626/// Experimental: may change without notice.
627///
628/// Parameters of `Storage.deleteStorageBucket`.
629#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
630pub struct DeleteStorageBucketParams {
631    pub bucket: StorageBucket,
632}
633
634impl crate::typed::Command for DeleteStorageBucketParams {
635    const METHOD: &'static str = "Storage.deleteStorageBucket";
636    type Returns = crate::typed::NoReturns;
637}
638
639/// Deletes state for sites identified as potential bounce trackers,
640/// immediately.
641///
642/// Experimental: may change without notice.
643///
644/// Parameters of `Storage.runBounceTrackingMitigations`.
645#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
646pub struct RunBounceTrackingMitigationsParams {}
647
648/// What `Storage.runBounceTrackingMitigations` answers with.
649#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
650pub struct RunBounceTrackingMitigationsReturns {
651    #[serde(rename = "deletedSites")]
652    pub deleted_sites: Vec<String>,
653}
654
655impl crate::typed::Command for RunBounceTrackingMitigationsParams {
656    const METHOD: &'static str = "Storage.runBounceTrackingMitigations";
657    type Returns = RunBounceTrackingMitigationsReturns;
658}
659
660/// A cache's contents have been modified.
661///
662/// Payload of the `Storage.cacheStorageContentUpdated` event.
663#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
664pub struct CacheStorageContentUpdatedEvent {
665    /// Origin to update.
666    pub origin: String,
667    /// Storage key to update.
668    #[serde(rename = "storageKey")]
669    pub storage_key: String,
670    /// Storage bucket to update.
671    #[serde(rename = "bucketId")]
672    pub bucket_id: String,
673    /// Name of cache in origin.
674    #[serde(rename = "cacheName")]
675    pub cache_name: String,
676}
677
678impl crate::typed::Event for CacheStorageContentUpdatedEvent {
679    const METHOD: &'static str = "Storage.cacheStorageContentUpdated";
680}
681
682/// A cache has been added/deleted.
683///
684/// Payload of the `Storage.cacheStorageListUpdated` event.
685#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
686pub struct CacheStorageListUpdatedEvent {
687    /// Origin to update.
688    pub origin: String,
689    /// Storage key to update.
690    #[serde(rename = "storageKey")]
691    pub storage_key: String,
692    /// Storage bucket to update.
693    #[serde(rename = "bucketId")]
694    pub bucket_id: String,
695}
696
697impl crate::typed::Event for CacheStorageListUpdatedEvent {
698    const METHOD: &'static str = "Storage.cacheStorageListUpdated";
699}
700
701/// The origin's IndexedDB object store has been modified.
702///
703/// Payload of the `Storage.indexedDBContentUpdated` event.
704#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
705pub struct IndexedDbContentUpdatedEvent {
706    /// Origin to update.
707    pub origin: String,
708    /// Storage key to update.
709    #[serde(rename = "storageKey")]
710    pub storage_key: String,
711    /// Storage bucket to update.
712    #[serde(rename = "bucketId")]
713    pub bucket_id: String,
714    /// Database to update.
715    #[serde(rename = "databaseName")]
716    pub database_name: String,
717    /// ObjectStore to update.
718    #[serde(rename = "objectStoreName")]
719    pub object_store_name: String,
720}
721
722impl crate::typed::Event for IndexedDbContentUpdatedEvent {
723    const METHOD: &'static str = "Storage.indexedDBContentUpdated";
724}
725
726/// The origin's IndexedDB database list has been modified.
727///
728/// Payload of the `Storage.indexedDBListUpdated` event.
729#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
730pub struct IndexedDbListUpdatedEvent {
731    /// Origin to update.
732    pub origin: String,
733    /// Storage key to update.
734    #[serde(rename = "storageKey")]
735    pub storage_key: String,
736    /// Storage bucket to update.
737    #[serde(rename = "bucketId")]
738    pub bucket_id: String,
739}
740
741impl crate::typed::Event for IndexedDbListUpdatedEvent {
742    const METHOD: &'static str = "Storage.indexedDBListUpdated";
743}
744
745/// Payload of the `Storage.storageBucketCreatedOrUpdated` event.
746#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
747pub struct StorageBucketCreatedOrUpdatedEvent {
748    #[serde(rename = "bucketInfo")]
749    pub bucket_info: StorageBucketInfo,
750}
751
752impl crate::typed::Event for StorageBucketCreatedOrUpdatedEvent {
753    const METHOD: &'static str = "Storage.storageBucketCreatedOrUpdated";
754}
755
756/// Payload of the `Storage.storageBucketDeleted` event.
757#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
758pub struct StorageBucketDeletedEvent {
759    #[serde(rename = "bucketId")]
760    pub bucket_id: String,
761}
762
763impl crate::typed::Event for StorageBucketDeletedEvent {
764    const METHOD: &'static str = "Storage.storageBucketDeleted";
765}
766
767/// Private Verification Tokens have been stored or deleted.
768///
769/// Experimental: may change without notice.
770///
771/// Payload of the `Storage.privateVerificationTokensUpdated` event.
772#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
773pub struct PrivateVerificationTokensUpdatedEvent {}
774
775impl crate::typed::Event for PrivateVerificationTokensUpdatedEvent {
776    const METHOD: &'static str = "Storage.privateVerificationTokensUpdated";
777}