Skip to content

Types

The Node.js SDK exposes the types below. Import any of them with a type-only import:

import type { PoliPageOptions, RenderInput, DocumentDescriptor } from '@poli-page/sdk';

Poli Page SDK for Node.js — public surface.

The behavioural contract (options, defaults, errors, retry policy, HTTP rules) is shared across every official Poli Page SDK.

Render against a stored project + template by slug. Use version to target a specific published version; omit to render the draft.

Render with raw HTML inline. No project resolution.

Poli Page SDK for Node.js — public surface.

The behavioural contract (options, defaults, errors, retry policy, HTTP rules) is shared across every official Poli Page SDK.

Stored document returned by client.render.document and client.documents.get. Top-level fields are system-controlled; metadata echoes caller-supplied data. downloadPdf() fetches the PDF bytes from presignedPdfUrl on demand.

Result of client.documents.preview(id). The deployed API uses pageCount (singular) here — different from render.preview’s totalPages field.

A single page thumbnail returned by documents.thumbnails. Spec §6.3.

Options for client.documents.thumbnails(id, options). Spec §6.3.

The render namespace exposed as client.render. Hosts the four render operations defined by spec v1.3 §5.1–§5.3.

The documents namespace exposed as client.documents. Hosts the four stored-document operations defined by spec v1.3 §6.

Poli Page SDK for Node.js — public surface.

The behavioural contract (options, defaults, errors, retry policy, HTTP rules) is shared across every official Poli Page SDK.

Poli Page SDK for Node.js — public surface.

The behavioural contract (options, defaults, errors, retry policy, HTTP rules) is shared across every official Poli Page SDK.

Poli Page SDK for Node.js — public surface.

The behavioural contract (options, defaults, errors, retry policy, HTTP rules) is shared across every official Poli Page SDK.

For type aliases (PageFormat, Orientation, RenderInput, RenderMetadata, PoliPageErrorCode) and the full set of fields on each interface, see the source on GitHub.