TypeSafeSDK.Response (TypeSafeSDK v0.4.1)

Copy Markdown View Source

Answer accessors and bounded metadata for TypeSafe responses.

Summary

Functions

choices(response)

See TypeSafeSDK.SystemOneResponse.choices/1.

fetch(response, id)

See TypeSafeSDK.SystemOneResponse.fetch/2.

fetch!(response, id)

See TypeSafeSDK.SystemOneResponse.fetch!/2.

metadata(response)

Return stable structural metadata without raw request/response content.

nouls(response)

See TypeSafeSDK.SystemOneResponse.nouls/1.

raw_http_response!(response)

See TypeSafeSDK.SystemOneResponse.raw_http_response!/1.

request_id!(response)

See TypeSafeSDK.SystemOneResponse.request_id!/1.

scores(response)

See TypeSafeSDK.SystemOneResponse.scores/1.

values(system_one_response)

@spec values(TypeSafeSDK.SystemOneResponse.t()) :: %{
  required(atom() | String.t()) => term()
}

Project enriched answers to their primary semantic values while preserving caller keys.

Unknown future answer types are omitted because they live in unknown_answers, not the validated answers map. This is a convenience projection, not a second response model; use the answer structs when confidence/distributions matter.