// Contract for the `ir` package: semantic model built over `spec/`.

///|
declare pub fn Presence::is_optional(self : Presence) -> Bool

///|
declare pub fn Presence::allows_null(self : Presence) -> Bool

///|
declare pub fn TypeDef::name(self : TypeDef) -> String

///|
declare pub fn TypeDef::source(self : TypeDef) -> String

///|
declare pub fn IrOptions::default() -> IrOptions

///|
declare pub fn build_ir(
  loaded : @spec.LoadedSpec,
  options? : IrOptions,
) -> IrModel raise @spec.SpecError

///|
declare pub fn group_for(
  tags : Array[String],
  tag_counts : Map[String, Int32],
  global_tags? : Array[String],
) -> String

///|
declare pub fn IrModel::diags(self : IrModel) -> @spec.Diagnostics

///|
declare pub fn IrModel::defs(self : IrModel) -> Array[TypeDef]

///|
declare pub fn IrModel::def(self : IrModel, name : String) -> TypeDef?

///|
declare pub fn IrModel::component_name(
  self : IrModel,
  component : String,
) -> String?

///|
declare pub fn ApiDiff::breaking(self : ApiDiff) -> Array[ApiChange]

///|
declare pub fn ApiDiff::non_breaking(self : ApiDiff) -> Array[ApiChange]

///|
declare pub fn ApiDiff::has_breaking(self : ApiDiff) -> Bool

///|
declare pub fn ApiDiff::is_empty(self : ApiDiff) -> Bool

///|
declare pub fn ApiDiff::render_text(self : ApiDiff) -> String

///|
declare pub fn ApiDiff::to_json(self : ApiDiff) -> @cjson.Json

///|
declare pub fn diff_ir(old_ir : IrModel, new_ir : IrModel) -> ApiDiff

///|
declare pub fn[V : IrVisitor] IrModel::walk(self : IrModel, visitor : V) -> Unit

///|
declare pub fn IrHooks::empty() -> IrHooks

///|
declare pub fn IrModel::transform(self : IrModel, hooks : IrHooks) -> IrModel

///|
declare pub fn IrModel::accounting(self : IrModel) -> Array[(String, String)]

///|
declare pub fn IrModel::operations(self : IrModel) -> Array[OpIR]

///|
declare pub fn IrModel::groups(self : IrModel) -> Array[(String, Array[String])]

///|
declare pub fn IrModel::info(self : IrModel) -> InfoIR

///|
declare pub fn ServerIR::default_url(self : ServerIR) -> String

///|
declare pub fn IrModel::servers(self : IrModel) -> Array[ServerIR]

///|
declare pub fn IrModel::tags(self : IrModel) -> Array[TagIR]

///|
declare pub fn IrModel::security_schemes(
  self : IrModel,
) -> Array[SecuritySchemeIR]

///|
declare pub fn field_type_to_text(field_type : FieldType) -> String

///|
declare pub fn type_def_to_text(def : TypeDef) -> String

///|
declare pub fn op_to_text(op : OpIR) -> String

///|
declare pub fn IrModel::summary(self : IrModel) -> String