UNPKG

chromiumly

Version:

A lightweight Typescript library that interacts with Gotenberg's different modules to convert a variety of document formats to PDF files.

38 lines (37 loc) 1.19 kB
import { PathLikeOrReadStream } from '../../common'; import { DownloadFrom, WebhookOptions } from '../../common/types'; export type EmulatedMediaType = 'screen' | 'print'; export type EmulatedMediaFeature = { name: string; value: string; }; export type Cookie = { name: string; value: string; domain: string; path?: string; secure?: boolean; httpOnly?: boolean; sameSite?: 'Strict' | 'Lax' | 'None'; }; export type ChromiumOptions = { header?: PathLikeOrReadStream; footer?: PathLikeOrReadStream; emulatedMediaType?: EmulatedMediaType; emulatedMediaFeatures?: EmulatedMediaFeature[]; waitDelay?: string; waitForExpression?: string; waitForSelector?: string; extraHttpHeaders?: Record<string, string>; failOnHttpStatusCodes?: number[]; failOnConsoleExceptions?: boolean; failOnResourceHttpStatusCodes?: number[]; ignoreResourceHttpStatusDomains?: string[]; failOnResourceLoadingFailed?: boolean; skipNetworkIdleEvent?: boolean; skipNetworkAlmostIdleEvent?: boolean; generateDocumentOutline?: boolean; cookies?: Cookie[]; downloadFrom?: DownloadFrom; webhook?: WebhookOptions; };