import { IccDoctemplateApi } from '../icc-api'; import { IccCryptoXApi } from './icc-crypto-x-api'; import * as models from '../icc-api/model/models'; import { DocumentTemplate } from '../icc-api/model/models'; import { AuthenticationProvider } from './auth/AuthenticationProvider'; export declare class IccDoctemplateXApi extends IccDoctemplateApi { crypto: IccCryptoXApi; authenticationProvider: AuthenticationProvider; fetchImpl: (input: RequestInfo, init?: RequestInit) => Promise; constructor(host: string, headers: { [key: string]: string; }, crypto: IccCryptoXApi, authenticationProvider?: AuthenticationProvider, fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise); /** * Creates a new instance of document template with initialised metadata (not persisted in the database). * @param user the current user, used to set the owner. * @param template the template content as a string, which will be converted to an ArrayBuffer attachment. * @param c optional initial data to merge into the document template. Metadata such as id, creation date, and guid * will be automatically generated if not provided. * @return a new DocumentTemplate instance with populated metadata fields. */ newInstance(user: models.User, template: string, c: any): Promise; /** * @deprecated not implemented. Always rejects with an error. * @param ownerId the id of the owner. * @return always rejects. */ findAllByOwnerId(ownerId: string): Promise>; /** * Builds the URL for downloading a document template attachment. * @param documentId the id of the document template. * @param attachmentId the id of the attachment. * @return the fully qualified URL to the attachment resource. */ getAttachmentUrl(documentId: string, attachmentId: string): string; /** * Retrieves the text content of a document template attachment. Decodes binary responses as UTF-8 text, and * returns text/plain, text/html, or text/xml content directly. Returns false for unsupported content types. * @param documentTemplateId the id of the document template. * @param attachmentId the id of the attachment. * @return the attachment text content as a string, or false if the content type is unsupported. */ getAttachmentText(documentTemplateId: string, attachmentId: string): Promise; }