|
| 1 | +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. |
| 2 | + |
| 3 | +import { APIResource } from '../../core/resource'; |
| 4 | +import { APIPromise } from '../../core/api-promise'; |
| 5 | +import { RequestOptions } from '../../internal/request-options'; |
| 6 | + |
| 7 | +export class ExportHTML extends APIResource { |
| 8 | + /** |
| 9 | + * Export a design as rendered HTML. |
| 10 | + */ |
| 11 | + create(params: ExportHTMLCreateParams, options?: RequestOptions): APIPromise<ExportHTMLCreateResponse> { |
| 12 | + const { projectId, ...body } = params; |
| 13 | + return this._client.post('/v3/templates/export/html', { query: { projectId }, body, ...options }); |
| 14 | + } |
| 15 | +} |
| 16 | + |
| 17 | +export interface ExportHTMLCreateResponse { |
| 18 | + data?: ExportHTMLCreateResponse.Data; |
| 19 | + |
| 20 | + success?: boolean; |
| 21 | +} |
| 22 | + |
| 23 | +export namespace ExportHTMLCreateResponse { |
| 24 | + export interface Data { |
| 25 | + chunks?: Data.Chunks; |
| 26 | + |
| 27 | + html?: string; |
| 28 | + } |
| 29 | + |
| 30 | + export namespace Data { |
| 31 | + export interface Chunks { |
| 32 | + body?: string; |
| 33 | + |
| 34 | + css?: string; |
| 35 | + |
| 36 | + fonts?: Array<unknown>; |
| 37 | + |
| 38 | + js?: string; |
| 39 | + } |
| 40 | + } |
| 41 | +} |
| 42 | + |
| 43 | +export interface ExportHTMLCreateParams { |
| 44 | + /** |
| 45 | + * Body param: Unlayer design JSON |
| 46 | + */ |
| 47 | + design: unknown; |
| 48 | + |
| 49 | + /** |
| 50 | + * Query param: The project ID (required for PAT auth, auto-resolved for API key |
| 51 | + * auth) |
| 52 | + */ |
| 53 | + projectId?: string; |
| 54 | + |
| 55 | + /** |
| 56 | + * Body param |
| 57 | + */ |
| 58 | + customJS?: string | Array<string>; |
| 59 | + |
| 60 | + /** |
| 61 | + * Body param |
| 62 | + */ |
| 63 | + designTags?: unknown; |
| 64 | + |
| 65 | + /** |
| 66 | + * Body param |
| 67 | + */ |
| 68 | + designTagsConfig?: unknown; |
| 69 | + |
| 70 | + /** |
| 71 | + * Body param |
| 72 | + */ |
| 73 | + displayMode?: 'email' | 'web' | 'popup' | 'document'; |
| 74 | + |
| 75 | + /** |
| 76 | + * Body param |
| 77 | + */ |
| 78 | + editorVersion?: string; |
| 79 | + |
| 80 | + /** |
| 81 | + * Body param |
| 82 | + */ |
| 83 | + language?: string; |
| 84 | + |
| 85 | + /** |
| 86 | + * Body param |
| 87 | + */ |
| 88 | + languages?: Array<string>; |
| 89 | + |
| 90 | + /** |
| 91 | + * Body param |
| 92 | + */ |
| 93 | + mergeTags?: unknown; |
| 94 | + |
| 95 | + /** |
| 96 | + * Body param |
| 97 | + */ |
| 98 | + mergeTagsSchema?: unknown; |
| 99 | + |
| 100 | + /** |
| 101 | + * Body param |
| 102 | + */ |
| 103 | + safeHtml?: boolean; |
| 104 | +} |
| 105 | + |
| 106 | +export declare namespace ExportHTML { |
| 107 | + export { |
| 108 | + type ExportHTMLCreateResponse as ExportHTMLCreateResponse, |
| 109 | + type ExportHTMLCreateParams as ExportHTMLCreateParams, |
| 110 | + }; |
| 111 | +} |
0 commit comments