/** * DocRaptor * A native client library for the DocRaptor HTML to PDF/XLS service. * * The version of the OpenAPI document: 2.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ declare const BASE_PATH: string; interface ConfigurationParameters { basePath?: string; fetchApi?: FetchAPI; middleware?: Middleware[]; queryParamsStringify?: (params: HTTPQuery) => string; username?: string; password?: string; apiKey?: string | ((name: string) => string); accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); headers?: HTTPHeaders; credentials?: RequestCredentials; } declare class Configuration { private configuration; constructor(configuration?: ConfigurationParameters); set config(configuration: Configuration); get basePath(): string; get fetchApi(): FetchAPI | undefined; get middleware(): Middleware[]; get queryParamsStringify(): (params: HTTPQuery) => string; get username(): string | undefined; get password(): string | undefined; get apiKey(): ((name: string) => string) | undefined; get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined; get headers(): HTTPHeaders | undefined; get credentials(): RequestCredentials | undefined; } declare const DefaultConfig: Configuration; /** * This is the base class for all generated API classes. */ declare class BaseAPI { protected configuration: Configuration; private static readonly jsonRegex; private middleware; constructor(configuration?: Configuration); withMiddleware(this: T, ...middlewares: Middleware[]): T; withPreMiddleware(this: T, ...preMiddlewares: Array): T; withPostMiddleware(this: T, ...postMiddlewares: Array): T; /** * Check if the given MIME is a JSON MIME. * JSON MIME examples: * application/json * application/json; charset=UTF8 * APPLICATION/JSON * application/vnd.company+json * @param mime - MIME (Multipurpose Internet Mail Extensions) * @return True if the given MIME is JSON, false otherwise. */ protected isJsonMime(mime: string | null | undefined): boolean; protected request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise; private createFetchParams; private fetchApi; /** * Create a shallow clone of `this` by constructing a new instance * and then shallow cloning data members. */ private clone; } declare class ResponseError extends Error { response: Response; name: "ResponseError"; constructor(response: Response, msg?: string); } declare class FetchError extends Error { cause: Error; name: "FetchError"; constructor(cause: Error, msg?: string); } declare class RequiredError extends Error { field: string; name: "RequiredError"; constructor(field: string, msg?: string); } declare const COLLECTION_FORMATS: { csv: string; ssv: string; tsv: string; pipes: string; }; type FetchAPI = WindowOrWorkerGlobalScope['fetch']; type Json = any; type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; type HTTPHeaders = { [key: string]: string; }; type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery; }; type HTTPBody = Json | FormData | URLSearchParams; type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody; }; type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; type InitOverrideFunction = (requestContext: { init: HTTPRequestInit; context: RequestOpts; }) => Promise; interface FetchParams { url: string; init: RequestInit; } interface RequestOpts { path: string; method: HTTPMethod; headers: HTTPHeaders; query?: HTTPQuery; body?: HTTPBody; } declare function exists(json: any, key: string): boolean; declare function querystring(params: HTTPQuery, prefix?: string): string; declare function mapValues(data: any, fn: (item: any) => any): {}; declare function canConsumeForm(consumes: Consume[]): boolean; interface Consume { contentType: string; } interface RequestContext { fetch: FetchAPI; url: string; init: RequestInit; } interface ResponseContext { fetch: FetchAPI; url: string; init: RequestInit; response: Response; } interface ErrorContext { fetch: FetchAPI; url: string; init: RequestInit; error: unknown; response?: Response; } interface Middleware { pre?(context: RequestContext): Promise; post?(context: ResponseContext): Promise; onError?(context: ErrorContext): Promise; } interface ApiResponse { raw: Response; value(): Promise; } interface ResponseTransformer { (json: any): T; } declare class JSONApiResponse { raw: Response; private transformer; constructor(raw: Response, transformer?: ResponseTransformer); value(): Promise; } declare class VoidApiResponse { raw: Response; constructor(raw: Response); value(): Promise; } declare class BlobApiResponse { raw: Response; constructor(raw: Response); value(): Promise; } declare class TextApiResponse { raw: Response; constructor(raw: Response); value(): Promise; } /** * DocRaptor * A native client library for the DocRaptor HTML to PDF/XLS service. * * The version of the OpenAPI document: 2.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface AsyncDoc */ interface AsyncDoc { /** * The identifier used to get the status of the document using the status API. * @type {string} * @memberof AsyncDoc */ statusId?: string; } /** * Check if a given object implements the AsyncDoc interface. */ declare function instanceOfAsyncDoc(value: object): boolean; declare function AsyncDocFromJSON(json: any): AsyncDoc; declare function AsyncDocFromJSONTyped(json: any, ignoreDiscriminator: boolean): AsyncDoc; declare function AsyncDocToJSON(value?: AsyncDoc | null): any; /** * DocRaptor * A native client library for the DocRaptor HTML to PDF/XLS service. * * The version of the OpenAPI document: 2.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface PrinceOptions */ interface PrinceOptions { /** * Set the baseurl for assets. * @type {string} * @memberof PrinceOptions */ baseurl?: string; /** * Disable XML inclusion. * @type {boolean} * @memberof PrinceOptions */ noXinclude?: boolean; /** * Disable network access. * @type {boolean} * @memberof PrinceOptions */ noNetwork?: boolean; /** * Disables parallel fetching of assets during PDF creation. Useful if your asset host has strict rate limiting. * @type {boolean} * @memberof PrinceOptions */ noParallelDownloads?: boolean; /** * Set the user for HTTP authentication. * @type {string} * @memberof PrinceOptions */ httpUser?: string; /** * Set the password for HTTP authentication. * @type {string} * @memberof PrinceOptions */ httpPassword?: string; /** * Set the HTTP proxy server. * @type {string} * @memberof PrinceOptions */ httpProxy?: string; /** * Set the HTTP request timeout. * @type {number} * @memberof PrinceOptions */ httpTimeout?: number; /** * Disable SSL verification. * @type {boolean} * @memberof PrinceOptions */ insecure?: boolean; /** * Specify the CSS media type. Defaults to "print" but you may want to use "screen" for web styles. * @type {string} * @memberof PrinceOptions */ media?: string; /** * Ignore author stylesheets. * @type {boolean} * @memberof PrinceOptions */ noAuthorStyle?: boolean; /** * Ignore default stylesheets. * @type {boolean} * @memberof PrinceOptions */ noDefaultStyle?: boolean; /** * Disable font embedding in PDFs. * @type {boolean} * @memberof PrinceOptions */ noEmbedFonts?: boolean; /** * Disable font subsetting in PDFs. * @type {boolean} * @memberof PrinceOptions */ noSubsetFonts?: boolean; /** * Disable PDF compression. * @type {boolean} * @memberof PrinceOptions */ noCompress?: boolean; /** * Encrypt PDF output. * @type {boolean} * @memberof PrinceOptions */ encrypt?: boolean; /** * Set encryption key size. * @type {number} * @memberof PrinceOptions */ keyBits?: number; /** * Set the PDF user password. * @type {string} * @memberof PrinceOptions */ userPassword?: string; /** * Set the PDF owner password. * @type {string} * @memberof PrinceOptions */ ownerPassword?: string; /** * Disallow printing of this PDF. * @type {boolean} * @memberof PrinceOptions */ disallowPrint?: boolean; /** * Disallow copying of this PDF. * @type {boolean} * @memberof PrinceOptions */ disallowCopy?: boolean; /** * Disallow annotation of this PDF. * @type {boolean} * @memberof PrinceOptions */ disallowAnnotate?: boolean; /** * Disallow modification of this PDF. * @type {boolean} * @memberof PrinceOptions */ disallowModify?: boolean; /** * Enable Prince debug mode. * @type {boolean} * @memberof PrinceOptions */ debug?: boolean; /** * Specify the input format. * @type {string} * @memberof PrinceOptions */ input?: PrinceOptionsInputEnum; /** * Deprecated, use the appropriate `pipeline` version. Specify a specific verison of PrinceXML to use. * @type {string} * @memberof PrinceOptions */ version?: string; /** * Enable PrinceXML JavaScript. DocRaptor JavaScript parsing is also available elsewhere. * @type {boolean} * @memberof PrinceOptions */ javascript?: boolean; /** * Set the DPI when rendering CSS. Defaults to 96 but can be set with Prince 9.0 and up. * @type {number} * @memberof PrinceOptions */ cssDpi?: number; /** * In Prince 9.0 and up you can set the PDF profile. * @type {string} * @memberof PrinceOptions */ profile?: string; /** * Specify the PDF title, part of the document's metadata. * @type {string} * @memberof PrinceOptions */ pdfTitle?: string; } /** * @export */ declare const PrinceOptionsInputEnum: { readonly Html: "html"; readonly Xml: "xml"; readonly Auto: "auto"; }; type PrinceOptionsInputEnum = typeof PrinceOptionsInputEnum[keyof typeof PrinceOptionsInputEnum]; /** * Check if a given object implements the PrinceOptions interface. */ declare function instanceOfPrinceOptions(value: object): boolean; declare function PrinceOptionsFromJSON(json: any): PrinceOptions; declare function PrinceOptionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PrinceOptions; declare function PrinceOptionsToJSON(value?: PrinceOptions | null): any; /** * DocRaptor * A native client library for the DocRaptor HTML to PDF/XLS service. * * The version of the OpenAPI document: 2.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface Doc */ interface Doc { /** * A name for identifying your document. * @type {string} * @memberof Doc */ name: string; /** * The type of document being created. * @type {string} * @memberof Doc */ documentType: DocDocumentTypeEnum; /** * The HTML data to be transformed into a document. You must supply content using document_content or document_url. * * @type {string} * @memberof Doc */ documentContent: string; /** * The URL to fetch the HTML data to be transformed into a document. You must supply content using document_content or document_url. * * @type {string} * @memberof Doc */ documentUrl?: string; /** * Enable test mode for this document. Test documents are not charged for but include a watermark. * @type {boolean} * @memberof Doc */ test?: boolean; /** * Specify a specific verison of the DocRaptor Pipeline to use. * @type {string} * @memberof Doc */ pipeline?: string; /** * Force strict HTML validation. * @type {string} * @memberof Doc */ strict?: DocStrictEnum; /** * Failed loading of images/javascripts/stylesheets/etc. will not cause the rendering to stop. * @type {boolean} * @memberof Doc */ ignoreResourceErrors?: boolean; /** * Prevent console.log from stopping document rendering during JavaScript execution. * @type {boolean} * @memberof Doc */ ignoreConsoleMessages?: boolean; /** * A field for storing a small amount of metadata with this document. * @type {string} * @memberof Doc */ tag?: string; /** * Request support help with this request if it succeeds. * @type {boolean} * @memberof Doc */ help?: boolean; /** * Enable DocRaptor JavaScript parsing. PrinceXML JavaScript parsing is also available elsewhere. * @type {boolean} * @memberof Doc */ javascript?: boolean; /** * Set HTTP referrer when generating this document. * @type {string} * @memberof Doc */ referrer?: string; /** * A URL that will receive a POST request after successfully completing an asynchronous document. The POST data will include download_url and download_id similar to status API responses. WARNING: this only works on asynchronous documents. * * @type {string} * @memberof Doc */ callbackUrl?: string; /** * The number of times a hosted document can be downloaded. If no limit is specified, the document will be available for an unlimited number of downloads. * @type {number} * @memberof Doc */ hostedDownloadLimit?: number; /** * The date and time at which a hosted document will be removed and no longer available. Must be a properly formatted ISO 8601 datetime, like 1981-01-23T08:02:30-05:00. * @type {string} * @memberof Doc */ hostedExpiresAt?: string; /** * * @type {PrinceOptions} * @memberof Doc */ princeOptions?: PrinceOptions; } /** * @export */ declare const DocDocumentTypeEnum: { readonly Pdf: "pdf"; readonly Xls: "xls"; readonly Xlsx: "xlsx"; }; type DocDocumentTypeEnum = typeof DocDocumentTypeEnum[keyof typeof DocDocumentTypeEnum]; /** * @export */ declare const DocStrictEnum: { readonly None: "none"; readonly Html: "html"; }; type DocStrictEnum = typeof DocStrictEnum[keyof typeof DocStrictEnum]; /** * Check if a given object implements the Doc interface. */ declare function instanceOfDoc(value: object): boolean; declare function DocFromJSON(json: any): Doc; declare function DocFromJSONTyped(json: any, ignoreDiscriminator: boolean): Doc; declare function DocToJSON(value?: Doc | null): any; /** * DocRaptor * A native client library for the DocRaptor HTML to PDF/XLS service. * * The version of the OpenAPI document: 2.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface DocStatus */ interface DocStatus { /** * The present status of the document. Can be queued, working, completed, and failed. * @type {string} * @memberof DocStatus */ status?: string; /** * The URL where the document can be retrieved. This URL may only be used a few times. * @type {string} * @memberof DocStatus */ downloadUrl?: string; /** * The identifier for downloading the document with the download API. * @type {string} * @memberof DocStatus */ downloadId?: string; /** * Additional information. * @type {string} * @memberof DocStatus */ message?: string; /** * Number of PDF pages in document. * @type {number} * @memberof DocStatus */ numberOfPages?: number; /** * Error information. * @type {string} * @memberof DocStatus */ validationErrors?: string; } /** * Check if a given object implements the DocStatus interface. */ declare function instanceOfDocStatus(value: object): boolean; declare function DocStatusFromJSON(json: any): DocStatus; declare function DocStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): DocStatus; declare function DocStatusToJSON(value?: DocStatus | null): any; /** * DocRaptor * A native client library for the DocRaptor HTML to PDF/XLS service. * * The version of the OpenAPI document: 2.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ interface CreateAsyncDocRequest { doc: Doc; } interface CreateDocRequest { doc: Doc; } interface CreateHostedAsyncDocRequest { doc: Doc; } interface CreateHostedDocRequest { doc: Doc; } interface ExpireRequest { id: string; } interface GetAsyncDocRequest { id: string; } interface GetAsyncDocStatusRequest { id: string; } /** * */ declare class DocApi extends BaseAPI { /** * Creates a document asynchronously. You must use a callback url or the returned status id and the status API to find out when it completes. Then use the download API to get the document. */ createAsyncDocRaw(requestParameters: CreateAsyncDocRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Creates a document asynchronously. You must use a callback url or the returned status id and the status API to find out when it completes. Then use the download API to get the document. */ createAsyncDoc(requestParameters: CreateAsyncDocRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * Creates a document synchronously. */ createDocRaw(requestParameters: CreateDocRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Creates a document synchronously. */ createDoc(requestParameters: CreateDocRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * Creates a hosted document asynchronously. You must use a callback url or the returned status id and the status API to find out when it completes. Then use the download API to get the document. */ createHostedAsyncDocRaw(requestParameters: CreateHostedAsyncDocRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Creates a hosted document asynchronously. You must use a callback url or the returned status id and the status API to find out when it completes. Then use the download API to get the document. */ createHostedAsyncDoc(requestParameters: CreateHostedAsyncDocRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * Creates a hosted document synchronously. */ createHostedDocRaw(requestParameters: CreateHostedDocRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Creates a hosted document synchronously. */ createHostedDoc(requestParameters: CreateHostedDocRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * Expires a previously created hosted doc. */ expireRaw(requestParameters: ExpireRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Expires a previously created hosted doc. */ expire(requestParameters: ExpireRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * Downloads a finished document. */ getAsyncDocRaw(requestParameters: GetAsyncDocRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Downloads a finished document. */ getAsyncDoc(requestParameters: GetAsyncDocRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; /** * Check on the status of an asynchronously created document. */ getAsyncDocStatusRaw(requestParameters: GetAsyncDocStatusRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise>; /** * Check on the status of an asynchronously created document. */ getAsyncDocStatus(requestParameters: GetAsyncDocStatusRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise; } export { type ApiResponse, type AsyncDoc, AsyncDocFromJSON, AsyncDocFromJSONTyped, AsyncDocToJSON, BASE_PATH, BaseAPI, BlobApiResponse, COLLECTION_FORMATS, Configuration, type ConfigurationParameters, type Consume, type CreateAsyncDocRequest, type CreateDocRequest, type CreateHostedAsyncDocRequest, type CreateHostedDocRequest, DefaultConfig, type Doc, DocApi, DocDocumentTypeEnum, DocFromJSON, DocFromJSONTyped, type DocStatus, DocStatusFromJSON, DocStatusFromJSONTyped, DocStatusToJSON, DocStrictEnum, DocToJSON, type ErrorContext, type ExpireRequest, type FetchAPI, FetchError, type FetchParams, type GetAsyncDocRequest, type GetAsyncDocStatusRequest, type HTTPBody, type HTTPHeaders, type HTTPMethod, type HTTPQuery, type HTTPRequestInit, type InitOverrideFunction, JSONApiResponse, type Json, type Middleware, type ModelPropertyNaming, type PrinceOptions, PrinceOptionsFromJSON, PrinceOptionsFromJSONTyped, PrinceOptionsInputEnum, PrinceOptionsToJSON, type RequestContext, type RequestOpts, RequiredError, type ResponseContext, ResponseError, type ResponseTransformer, TextApiResponse, VoidApiResponse, canConsumeForm, exists, instanceOfAsyncDoc, instanceOfDoc, instanceOfDocStatus, instanceOfPrinceOptions, mapValues, querystring };