Full article body in plain text markdown. The SDK base64-encodes this before sending.
Optionalteaser?: stringOptional article teaser in plain text markdown. The SDK base64-encodes this before sending.
Optionalteaser?: stringOptional article teaser in plain text markdown. The SDK base64-encodes this before sending.
Full HTML body. The SDK base64-encodes this before sending. Mutually exclusive with content_uri.
Optionalcontent_uri?: neverNot accepted alongside inline content_body — submitting both is rejected with 400.
Optionalteaser?: stringOptional article teaser in plain text markdown. The SDK base64-encodes this before sending.
Optionalcontent_body?: neverNot accepted alongside remote content_uri — submitting both is rejected with 400.
Optionalteaser?: stringOptional article teaser in plain text markdown. The SDK base64-encodes this before sending.
Optionalcontent_body?: neverNot accepted for pdf/image/video content.
Optionalteaser?: stringOptional article teaser in plain text markdown. The SDK base64-encodes this before sending.
The union is assembled here rather than aliased from
components['schemas']['Content']. The OpenAPI spec defines Content as a
flat object (no oneOf/discriminator), so openapi-typescript cannot
generate the discriminated union that callers need for type-narrowing.
Every field except content_body and teaser is picked from the generated
schema, so it cannot drift. Those two stay hand-typed because the generated
ones document a base64 string the caller encodes, and the SDK takes plain text
and encodes it itself. A compile-time assignability guard below
(_ContentDriftGuard) errors if the union stops fitting the generated schema.
TODO: remove the hand-written union and alias the generated type once
ledewire.yml uses oneOf + discriminator for the Content schema.
Content creation request body — a discriminated union on
content_type.'markdown'requirescontent_body(plain text markdown — the SDK encodes it to base64 before transmission).'external_ref'requirescontent_uri(the external resource URL) and optionallyexternal_identifier(namespaced platform ID, e.g.vimeo:123).'html'is either inline (content_body, plain HTML — the SDK base64-encodes it before sending) or remote (content_uri) — exactly one of the two, never both. The two shapes are modelled as separate union members, each disallowing the other's field via?: never, so passing both is a compile-time error.'pdf','image', and'video'all requirecontent_uri(the SDK never acceptscontent_bodyfor these types).