Cloudflare's Clef wire format (Effect's CloudflareSchema): the
questions and images of a decisions request and the answers of its
response, as TypedDict types with their schemas.
Values#
| Attribute | Type | Description |
|---|---|---|
ENTRY | UnionSchema[str | dict[str, bool | int | float | str | Sequence[JsonValue] | Mapping[str, JsonValue] | None] | tuple[bool | int | float | str | Sequence[JsonValue] | Mapping[str, JsonValue] | None, ...], str | Mapping[str, bool | int | float | str | Sequence[JsonValue] | Mapping[str, JsonValue] | None] | Sequence[bool | int | float | str | Sequence[JsonValue] | Mapping[str, JsonValue] | None], Never, Never] | |
CHOICE_QUESTION | StructSchema[ChoiceQuestion, Never, Never] | |
SCORE_QUESTION | StructSchema[ScoreQuestion, Never, Never] | |
NOUL_QUESTION | StructSchema[NoulQuestion, Never, Never] | |
QUESTION | UnionSchema[ChoiceQuestion | ScoreQuestion | NoulQuestion, Mapping[str, object], Never, Never] | |
IMAGE | UnionSchema[str | Base64Image, str | Mapping[str, object], Never, Never] | |
DECISIONS_REQUEST | StructSchema[DecisionsRequest, Never, Never] | |
CHOICE_ANSWER | StructSchema[ChoiceAnswer, Never, Never] | |
SCORE_ANSWER | StructSchema[ScoreAnswer, Never, Never] | |
NOUL_ANSWER | StructSchema[NoulAnswer, Never, Never] | |
ANSWER | UnionSchema[ChoiceAnswer | ScoreAnswer | NoulAnswer, Mapping[str, object], Never, Never] | |
DECISIONS_RESPONSE | StructSchema[DecisionsResponse, Never, Never] |
Types#
| Type | Definition | Description |
|---|---|---|
Entry | type Entry = str | Mapping[str, JsonValue] | Sequence[JsonValue] | Instructions or a description: a string, a JSON object or a JSON array. |
Question | type Question = ChoiceQuestion | ScoreQuestion | NoulQuestion | |
Image | type Image = str | Base64Image | A |
Answer | type Answer = ChoiceAnswer | ScoreAnswer | NoulAnswer |