CDPotion.Domain.Storage (cdpotion v0.1.4)

Summary

Types

description not provided :(

description not provided :(

description not provided :(

Enum of interest group access types.

Ad advertising element inside an interest group.

The full details of an interest group.

description not provided :(

Bundles the parameters for shared storage access events whose presence/absence can vary according to SharedStorageAccessType.

Enum of shared storage access types.

Struct for a single key-value pair in an origin's shared storage.

Details for an origin's shared storage.

Pair of reporting metadata details for a candidate URL for selectURL().

Bundles a candidate URL with its reporting metadata.

description not provided :(

description not provided :(

description not provided :(

description not provided :(

Enum of possible storage types.

Pair of issuer origin and number of available (signed, but not used) Trust Tokens from that issuer.

description not provided :(

description not provided :(

Usage for a storage type.

Functions

Clears all entries for a given origin's shared storage.

Removes all Trust Tokens issued by the provided issuerOrigin. Leaves other stored data, including the issuer's Redemption Records, intact.

Deletes entry for key (if it exists) for a given origin's shared storage.

Deletes the Storage Bucket with the given storage key and bucket name.

Returns all browser cookies.

Gets details for a named interest group.

Gets the entries in an given origin's shared storage.

Gets metadata for an origin's shared storage.

Returns a storage key given a frame id.

Returns the number of stored Trust Tokens per issuer for the current browsing context.

Returns usage and quota in bytes.

Override quota for the specified origin

Resets the budget for ownerOrigin by clearing all budget withdrawals.

Deletes state for sites identified as potential bounce trackers, immediately.

Enables/disables issuing of Attribution Reporting events.

Enables/Disables issuing of interestGroupAccessed events.

Sets entry with key and value for a given origin's shared storage.

Enables/disables issuing of sharedStorageAccessed events.

Set tracking for a storage key's buckets.

Registers origin to be notified when an update occurs to its cache storage list.

Registers storage key to be notified when an update occurs to its cache storage list.

Registers origin to be notified when an update occurs to its IndexedDB.

Registers storage key to be notified when an update occurs to its IndexedDB.

Unregisters origin from receiving notifications for cache storage.

Unregisters storage key from receiving notifications for cache storage.

Unregisters origin from receiving notifications for IndexedDB.

Unregisters storage key from receiving notifications for IndexedDB.

Types

Link to this type

attribution_reporting_aggregation_keys_entry()

@type attribution_reporting_aggregation_keys_entry() :: %{
  key: String.t(),
  value: unsigned_int128_as_base16()
}

description not provided :(

Link to this type

attribution_reporting_filter_data_entry()

@type attribution_reporting_filter_data_entry() :: %{
  key: String.t(),
  values: [String.t()]
}

description not provided :(

Link to this type

attribution_reporting_source_registration()

@type attribution_reporting_source_registration() :: %{
  aggregatableReportWindow: integer() | nil,
  aggregationKeys: [attribution_reporting_aggregation_keys_entry()],
  debugKey: unsigned_int64_as_base10() | nil,
  destinationSites: [String.t()],
  eventId: unsigned_int64_as_base10(),
  eventReportWindow: integer() | nil,
  expiry: integer() | nil,
  filterData: [attribution_reporting_filter_data_entry()],
  priority: signed_int64_as_base10(),
  reportingOrigin: String.t(),
  sourceOrigin: String.t(),
  time: CDPotion.Domain.Network.time_since_epoch(),
  type: attribution_reporting_source_type()
}

description not provided :(

Link to this type

attribution_reporting_source_registration_result()

@type attribution_reporting_source_registration_result() ::
  :success
  | :internalError
  | :insufficientSourceCapacity
  | :insufficientUniqueDestinationCapacity
  | :excessiveReportingOrigins
  | :prohibitedByBrowserPolicy
  | :successNoised
  | :destinationReportingLimitReached
  | :destinationGlobalLimitReached
  | :destinationBothLimitsReached
  | :reportingOriginsPerSiteLimitReached

description not provided :(

Link to this type

attribution_reporting_source_type()

@type attribution_reporting_source_type() :: :navigation | :event

description not provided :(

Link to this type

interest_group_access_type()

@type interest_group_access_type() :: :join | :leave | :update | :loaded | :bid | :win

Enum of interest group access types.

Link to this type

interest_group_ad()

@type interest_group_ad() :: %{metadata: String.t() | nil, renderUrl: String.t()}

Ad advertising element inside an interest group.

Link to this type

interest_group_details()

@type interest_group_details() :: %{
  adComponents: [interest_group_ad()],
  ads: [interest_group_ad()],
  biddingUrl: String.t() | nil,
  biddingWasmHelperUrl: String.t() | nil,
  expirationTime: CDPotion.Domain.Network.time_since_epoch(),
  joiningOrigin: String.t(),
  name: String.t(),
  ownerOrigin: String.t(),
  trustedBiddingSignalsKeys: [String.t()],
  trustedBiddingSignalsUrl: String.t() | nil,
  updateUrl: String.t() | nil,
  userBiddingSignals: String.t() | nil
}

The full details of an interest group.

Link to this type

serialized_storage_key()

@type serialized_storage_key() :: String.t()

description not provided :(

Link to this type

shared_storage_access_params()

@type shared_storage_access_params() :: %{
  ignoreIfPresent: boolean() | nil,
  key: String.t() | nil,
  operationName: String.t() | nil,
  scriptSourceUrl: String.t() | nil,
  serializedData: String.t() | nil,
  urlsWithMetadata: [shared_storage_url_with_metadata()] | nil,
  value: String.t() | nil
}

Bundles the parameters for shared storage access events whose presence/absence can vary according to SharedStorageAccessType.

Link to this type

shared_storage_access_type()

@type shared_storage_access_type() ::
  :documentAddModule
  | :documentSelectURL
  | :documentRun
  | :documentSet
  | :documentAppend
  | :documentDelete
  | :documentClear
  | :workletSet
  | :workletAppend
  | :workletDelete
  | :workletClear
  | :workletGet
  | :workletKeys
  | :workletEntries
  | :workletLength
  | :workletRemainingBudget

Enum of shared storage access types.

Link to this type

shared_storage_entry()

@type shared_storage_entry() :: %{key: String.t(), value: String.t()}

Struct for a single key-value pair in an origin's shared storage.

Link to this type

shared_storage_metadata()

@type shared_storage_metadata() :: %{
  creationTime: CDPotion.Domain.Network.time_since_epoch(),
  length: integer(),
  remainingBudget: number()
}

Details for an origin's shared storage.

Link to this type

shared_storage_reporting_metadata()

@type shared_storage_reporting_metadata() :: %{
  eventType: String.t(),
  reportingUrl: String.t()
}

Pair of reporting metadata details for a candidate URL for selectURL().

Link to this type

shared_storage_url_with_metadata()

@type shared_storage_url_with_metadata() :: %{
  reportingMetadata: [shared_storage_reporting_metadata()],
  url: String.t()
}

Bundles a candidate URL with its reporting metadata.

Link to this type

signed_int64_as_base10()

@type signed_int64_as_base10() :: String.t()

description not provided :(

Link to this type

storage_bucket()

@type storage_bucket() :: %{
  name: String.t() | nil,
  storageKey: serialized_storage_key()
}

description not provided :(

Link to this type

storage_bucket_info()

@type storage_bucket_info() :: %{
  bucket: storage_bucket(),
  durability: storage_buckets_durability(),
  expiration: CDPotion.Domain.Network.time_since_epoch(),
  id: String.t(),
  persistent: boolean(),
  quota: number()
}

description not provided :(

Link to this type

storage_buckets_durability()

@type storage_buckets_durability() :: :relaxed | :strict

description not provided :(

Link to this type

storage_type()

@type storage_type() ::
  :appcache
  | :cookies
  | :file_systems
  | :indexeddb
  | :local_storage
  | :shader_cache
  | :websql
  | :service_workers
  | :cache_storage
  | :interest_groups
  | :shared_storage
  | :storage_buckets
  | :all
  | :other

Enum of possible storage types.

Link to this type

trust_tokens()

@type trust_tokens() :: %{count: number(), issuerOrigin: String.t()}

Pair of issuer origin and number of available (signed, but not used) Trust Tokens from that issuer.

Link to this type

unsigned_int64_as_base10()

@type unsigned_int64_as_base10() :: String.t()

description not provided :(

Link to this type

unsigned_int128_as_base16()

@type unsigned_int128_as_base16() :: String.t()

description not provided :(

Link to this type

usage_for_type()

@type usage_for_type() :: %{storageType: storage_type(), usage: number()}

Usage for a storage type.

Functions

Link to this function

clear_cookies(browser_context_id \\ nil)

@spec clear_cookies(CDPotion.Domain.Browser.browser_context_id()) ::
  {String.t(), map()}

Clears cookies.

Parameters:

  • (Optional) browser_context_id: Browser context to use when called on the browser endpoint.
Link to this function

clear_data_for_origin(origin, storage_types)

@spec clear_data_for_origin(String.t(), String.t()) :: {String.t(), map()}

Clears storage for origin.

Parameters:

  • (Required) origin: Security origin.
  • (Required) storage_types: Comma separated list of StorageType to clear.
Link to this function

clear_data_for_storage_key(storage_key, storage_types)

@spec clear_data_for_storage_key(String.t(), String.t()) :: {String.t(), map()}

Clears storage for storage key.

Parameters:

  • (Required) storage_key: Storage key.
  • (Required) storage_types: Comma separated list of StorageType to clear.
Link to this function

clear_shared_storage_entries(owner_origin)

@spec clear_shared_storage_entries(String.t()) :: {String.t(), map()}

Clears all entries for a given origin's shared storage.

Parameters:

  • (Required) owner_origin: description not provided :(
Link to this function

clear_trust_tokens(issuer_origin)

@spec clear_trust_tokens(String.t()) :: {String.t(), map()}

Removes all Trust Tokens issued by the provided issuerOrigin. Leaves other stored data, including the issuer's Redemption Records, intact.

Parameters:

  • (Required) issuer_origin: description not provided :(
Link to this function

delete_shared_storage_entry(owner_origin, key)

@spec delete_shared_storage_entry(String.t(), String.t()) :: {String.t(), map()}

Deletes entry for key (if it exists) for a given origin's shared storage.

Parameters:

  • (Required) owner_origin: description not provided :(
  • (Required) key: description not provided :(
Link to this function

delete_storage_bucket(bucket)

@spec delete_storage_bucket(storage_bucket()) :: {String.t(), map()}

Deletes the Storage Bucket with the given storage key and bucket name.

Parameters:

  • (Required) bucket: description not provided :(
Link to this function

get_cookies(browser_context_id \\ nil)

Returns all browser cookies.

Parameters:

  • (Optional) browser_context_id: Browser context to use when called on the browser endpoint.
Link to this function

get_interest_group_details(owner_origin, name)

@spec get_interest_group_details(String.t(), String.t()) :: {String.t(), map()}

Gets details for a named interest group.

Parameters:

  • (Required) owner_origin: description not provided :(
  • (Required) name: description not provided :(
Link to this function

get_shared_storage_entries(owner_origin)

@spec get_shared_storage_entries(String.t()) :: {String.t(), map()}

Gets the entries in an given origin's shared storage.

Parameters:

  • (Required) owner_origin: description not provided :(
Link to this function

get_shared_storage_metadata(owner_origin)

@spec get_shared_storage_metadata(String.t()) :: {String.t(), map()}

Gets metadata for an origin's shared storage.

Parameters:

  • (Required) owner_origin: description not provided :(
Link to this function

get_storage_key_for_frame(frame_id)

@spec get_storage_key_for_frame(CDPotion.Domain.Page.frame_id()) ::
  {String.t(), map()}

Returns a storage key given a frame id.

Parameters:

  • (Required) frame_id: description not provided :(
Link to this function

get_trust_tokens()

@spec get_trust_tokens() :: {String.t(), map()}

Returns the number of stored Trust Tokens per issuer for the current browsing context.

Link to this function

get_usage_and_quota(origin)

@spec get_usage_and_quota(String.t()) :: {String.t(), map()}

Returns usage and quota in bytes.

Parameters:

  • (Required) origin: Security origin.
Link to this function

override_quota_for_origin(origin, quota_size \\ nil)

@spec override_quota_for_origin(String.t(), number()) :: {String.t(), map()}

Override quota for the specified origin

Parameters:

  • (Required) origin: Security origin.
  • (Optional) quota_size: The quota size (in bytes) to override the original quota with. If this is called multiple times, the overridden quota will be equal to the quotaSize provided in the final call. If this is called without specifying a quotaSize, the quota will be reset to the default value for the specified origin. If this is called multiple times with different origins, the override will be maintained for each origin until it is disabled (called without a quotaSize).
Link to this function

reset_shared_storage_budget(owner_origin)

@spec reset_shared_storage_budget(String.t()) :: {String.t(), map()}

Resets the budget for ownerOrigin by clearing all budget withdrawals.

Parameters:

  • (Required) owner_origin: description not provided :(
Link to this function

run_bounce_tracking_mitigations()

@spec run_bounce_tracking_mitigations() :: {String.t(), map()}

Deletes state for sites identified as potential bounce trackers, immediately.

Link to this function

set_attribution_reporting_local_testing_mode(enabled)

@spec set_attribution_reporting_local_testing_mode(boolean()) :: {String.t(), map()}

https://wicg.github.io/attribution-reporting-api/

Parameters:

  • (Required) enabled: If enabled, noise is suppressed and reports are sent immediately.
Link to this function

set_attribution_reporting_tracking(enable)

@spec set_attribution_reporting_tracking(boolean()) :: {String.t(), map()}

Enables/disables issuing of Attribution Reporting events.

Parameters:

  • (Required) enable: description not provided :(
Link to this function

set_cookies(cookies, browser_context_id \\ nil)

Sets given cookies.

Parameters:

  • (Required) cookies: Cookies to be set.
  • (Optional) browser_context_id: Browser context to use when called on the browser endpoint.
Link to this function

set_interest_group_tracking(enable)

@spec set_interest_group_tracking(boolean()) :: {String.t(), map()}

Enables/Disables issuing of interestGroupAccessed events.

Parameters:

  • (Required) enable: description not provided :(
Link to this function

set_shared_storage_entry(owner_origin, key, value, ignore_if_present \\ nil)

@spec set_shared_storage_entry(String.t(), String.t(), String.t(), boolean()) ::
  {String.t(), map()}

Sets entry with key and value for a given origin's shared storage.

Parameters:

  • (Required) owner_origin: description not provided :(
  • (Required) key: description not provided :(
  • (Required) value: description not provided :(
  • (Optional) ignore_if_present: If ignoreIfPresent is included and true, then only sets the entry if key doesn't already exist.
Link to this function

set_shared_storage_tracking(enable)

@spec set_shared_storage_tracking(boolean()) :: {String.t(), map()}

Enables/disables issuing of sharedStorageAccessed events.

Parameters:

  • (Required) enable: description not provided :(
Link to this function

set_storage_bucket_tracking(storage_key, enable)

@spec set_storage_bucket_tracking(String.t(), boolean()) :: {String.t(), map()}

Set tracking for a storage key's buckets.

Parameters:

  • (Required) storage_key: description not provided :(
  • (Required) enable: description not provided :(
Link to this function

track_cache_storage_for_origin(origin)

@spec track_cache_storage_for_origin(String.t()) :: {String.t(), map()}

Registers origin to be notified when an update occurs to its cache storage list.

Parameters:

  • (Required) origin: Security origin.
Link to this function

track_cache_storage_for_storage_key(storage_key)

@spec track_cache_storage_for_storage_key(String.t()) :: {String.t(), map()}

Registers storage key to be notified when an update occurs to its cache storage list.

Parameters:

  • (Required) storage_key: Storage key.
Link to this function

track_indexed_db_for_origin(origin)

@spec track_indexed_db_for_origin(String.t()) :: {String.t(), map()}

Registers origin to be notified when an update occurs to its IndexedDB.

Parameters:

  • (Required) origin: Security origin.
Link to this function

track_indexed_db_for_storage_key(storage_key)

@spec track_indexed_db_for_storage_key(String.t()) :: {String.t(), map()}

Registers storage key to be notified when an update occurs to its IndexedDB.

Parameters:

  • (Required) storage_key: Storage key.
Link to this function

untrack_cache_storage_for_origin(origin)

@spec untrack_cache_storage_for_origin(String.t()) :: {String.t(), map()}

Unregisters origin from receiving notifications for cache storage.

Parameters:

  • (Required) origin: Security origin.
Link to this function

untrack_cache_storage_for_storage_key(storage_key)

@spec untrack_cache_storage_for_storage_key(String.t()) :: {String.t(), map()}

Unregisters storage key from receiving notifications for cache storage.

Parameters:

  • (Required) storage_key: Storage key.
Link to this function

untrack_indexed_db_for_origin(origin)

@spec untrack_indexed_db_for_origin(String.t()) :: {String.t(), map()}

Unregisters origin from receiving notifications for IndexedDB.

Parameters:

  • (Required) origin: Security origin.
Link to this function

untrack_indexed_db_for_storage_key(storage_key)

@spec untrack_indexed_db_for_storage_key(String.t()) :: {String.t(), map()}

Unregisters storage key from receiving notifications for IndexedDB.

Parameters:

  • (Required) storage_key: Storage key.