TypeSafeSDK.Prepared (TypeSafeSDK v0.2.0)

Copy Markdown View Source

A validated question set with wire encoding and finite caller-key metadata.

Construct with TypeSafeSDK.prepare/1 or prepare!/1; reuse across states. No HTTP call, dynamic atom creation, or process state is involved. Treat the fields as opaque: editing them bypasses preparation invariants.

Summary

Types

t()

@type t() :: %TypeSafeSDK.Prepared{
  count: pos_integer(),
  definitions: map(),
  encoded: struct(),
  json: binary(),
  keys: map()
}

Functions

new(prepared)

@spec new(t() | map() | list()) :: {:ok, t()} | {:error, TypeSafeSDK.Error.t()}

new!(questions)

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