export type DocumentHtmlCollapsibleDisplaySettings = {arrowClosed?: string | undefined, arrowColor?: string | undefined, arrowLocation?: string | undefined, arrowOpen?: string | undefined, arrowSize?: string | undefined, arrowStyle?: string | undefined, containerStyle?: string | undefined, labelStyle?: string | undefined, onlyArrowIsClickable?: boolean | undefined, outerLabelAndArrowStyle?: string | undefined}; export type DocumentHtmlDisplaySettings = {cellStyle?: string | undefined, collapsibleSettings?: DocumentHtmlCollapsibleDisplaySettings | undefined, display?: string | undefined, displayLabel?: string | undefined, displayOrder?: number | undefined, displayPageNumber?: number | undefined, hideLabelWhenOpened?: boolean | undefined, inlineOuterStyle?: string | undefined, labelWhenOpened?: string | undefined, preLabel?: string | undefined, scrollToTopWhenOpened?: boolean | undefined, tableStyle?: string | undefined}; export type DocumentHtmlDisplayAnchor = {caseSensitive?: boolean | undefined, displaySettings?: DocumentHtmlDisplaySettings | undefined, endAnchor?: string | undefined, removeEndAnchor?: boolean | undefined, removeStartAnchor?: boolean | undefined, startAnchor?: string | undefined}; export type DocumentHtmlDefinition = {displayAnchorPrefix?: string | undefined, displayAnchors?: Array | undefined, displayOrder?: string | undefined, displayPageNumber?: string | undefined, documentGuid?: string | undefined, documentId?: string | undefined, headerLabel?: string | undefined, maxScreenWidth?: string | undefined, removeEmptyTags?: string | undefined, showMobileOptimizedToggle?: string | undefined, source?: string | undefined}; export type CreateApiV21AccountsAccountIdTemplatesTemplateIdResponsiveHtmlPreviewArgs = {accountId: string, templateId: string, body: DocumentHtmlDefinition}; export type CreateApiV21AccountsAccountIdTemplatesTemplateIdResponsiveHtmlPreviewOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Creates a preview of the responsive versions of all of the documents associated with a template. * * POST /v2.1/accounts/{accountId}/templates/{templateId}/responsive_html_preview */ export const createApiV21AccountsAccountIdTemplatesTemplateIdResponsiveHtmlPreview = async (args: CreateApiV21AccountsAccountIdTemplatesTemplateIdResponsiveHtmlPreviewArgs, options?: CreateApiV21AccountsAccountIdTemplatesTemplateIdResponsiveHtmlPreviewOptions) => { const {baseUrl = "https://www.docusign.net/restapi", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "*/*") const url = `${baseUrl.replace(/\/+$/, '')}/v2.1/accounts/${encodeURIComponent(String(args.accountId))}/templates/${encodeURIComponent(String(args.templateId))}/responsive_html_preview${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.blob() };