Exosphere.Community.Preference.Ai (Exosphere v0.3.0)

Copy Markdown View Source

Declares a user's preferences regarding AI usage of their public data. A record at key 'self' with globalScope establishes default preferences. Additional records keyed by TID establish scoped overrides for specific entities or content collections.

Record schema community.lexicon.preference.ai.

Fields

  • preferences: ref #preferenceSet
  • scope: What this record's preferences apply to.
  • updated_at: Timestamp of the most recent change to this record.

Summary

Functions

Decode a wire-format map. Delegates to new/1.

Build and validate from a map of attrs (atom or wire string keys).

Build and validate, raising ArgumentError on error.

Encode to the wire-format map. Record schemas include "$type".

The lexicon type ID (nsid or nsid#def) this module was generated from.

Types

Functions

from_map(map)

@spec from_map(map()) ::
  {:ok, t()} | {:error, [{path :: String.t(), message :: String.t()}]}

Decode a wire-format map. Delegates to new/1.

new(attrs)

@spec new(map()) ::
  {:ok, t()} | {:error, [{path :: String.t(), message :: String.t()}]}

Build and validate from a map of attrs (atom or wire string keys).

Unknown keys are kept in extra and re-emitted by to_map/1.

new!(attrs)

@spec new!(map()) :: t()

Build and validate, raising ArgumentError on error.

to_map(struct)

@spec to_map(t()) :: map()

Encode to the wire-format map. Record schemas include "$type".

type_id()

@spec type_id() :: String.t()

The lexicon type ID (nsid or nsid#def) this module was generated from.