Skip to content

Document methods: render

The Document Verbs render as typed SDK methods, with inputs, result, refusals and an example.

Reference for Document, one group of Document methods.

Document.render

Render produces a file from a Document in the format the reader asks for. Verb page.

TypeScript
interface DocumentVerbs {
  render(input: DocumentRenderInput, options?: SB.CallOptions): SB.Call<DocumentRenderOutput>
}

Emits Document.rendered.

Inputs

InputTypeRequiredDescription
documentDocumentrequiredThe Document to render.
formatstringrequiredThe file format.

Returns

OutputTypeRequiredDescription
fileurlrequiredWhere the file lives.
documentDocumentrequiredThe Document rendered.

Refuses when

CheckErrorFixThen call
The input does not match the schema of the operation.invalid-inputRead the schema of the operation, then send every required field with the right type.None.
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

TypeScript
import { $ } from 'startup-builder'

const { file, document } = await $.Document.render({ document: 'document_af2wijcmRy', format: 'Example format' })