// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../../resource'; import * as Core from '../../core'; export class Content extends APIResource { /** * Fetches rendered HTML content from provided URL or HTML. Check available options * like `gotoOptions` and `waitFor*` to control page load behaviour. */ create(params: ContentCreateParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id, cacheTTL, ...body } = params; return ( this._client.post(`/accounts/${account_id}/browser-rendering/content`, { query: { cacheTTL }, body, ...options, }) as Core.APIPromise<{ result: ContentCreateResponse }> )._thenUnwrap((obj) => obj.result); } } /** * HTML content */ export type ContentCreateResponse = string; export interface ContentCreateParams { /** * Path param: Account ID. */ account_id: string; /** * Query param: Cache TTL default is 5s. Set to 0 to disable. */ cacheTTL?: number; /** * Body param: Adds a `