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';PoliPageOptions
Section titled “PoliPageOptions”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.
ProjectModeInput
Section titled “ProjectModeInput”Render against a stored project + template by slug. Use version to target a specific published version; omit to render the draft.
InlineModeInput
Section titled “InlineModeInput”Render with raw HTML inline. No project resolution.
PreviewResult
Section titled “PreviewResult”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.
DocumentDescriptor
Section titled “DocumentDescriptor”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.
DocumentPreviewResult
Section titled “DocumentPreviewResult”Result of client.documents.preview(id). The deployed API uses pageCount (singular) here — different from render.preview’s totalPages field.
Thumbnail
Section titled “Thumbnail”A single page thumbnail returned by documents.thumbnails. Spec §6.3.
ThumbnailOptions
Section titled “ThumbnailOptions”Options for client.documents.thumbnails(id, options). Spec §6.3.
RenderNamespace
Section titled “RenderNamespace”The render namespace exposed as client.render. Hosts the four render operations defined by spec v1.3 §5.1–§5.3.
DocumentsNamespace
Section titled “DocumentsNamespace”The documents namespace exposed as client.documents. Hosts the four stored-document operations defined by spec v1.3 §6.
RequestEvent
Section titled “RequestEvent”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.
ResponseEvent
Section titled “ResponseEvent”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.
RetryEvent
Section titled “RetryEvent”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.