# <my-domain> contract v0.1.0
# Domain contract: typed shape for <describe what kind of data>.
# Consumers receive the schema via OCI pull and bind values via cabling.

# Helper enums and sub-records.
let _<TypeName> = [| 'value_one, 'value_two |] in

let _<NestedRecord> = {
  field_a | String,
  field_b | _<TypeName>,
} in

# Top-level context type — this is what consumers receive at the binding point.
# Convention: name it <DomainName>Context.
let _<MyDomain>Context = {
  schema_version | String | default = "0.1.0",
  workspace      | String,                            # provided by the consumer
  mode_id        | String,                            # provided by the mode invoking this binding

  # ── Replace below with your domain-specific fields ──
  endpoint       | String
                 | doc "Description of what this field means.",
  options        | _<NestedRecord> | optional
                 | doc "Optional structured config.",
  flags          | Array String | default = [],
} in

{
  <TypeName>          = _<TypeName>,
  <NestedRecord>      = _<NestedRecord>,
  <MyDomain>Context  = _<MyDomain>Context,
}
