import { APIResource } from "../../core/resource.mjs";
import { APIPromise } from "../../core/api-promise.mjs";
import { RequestOptions } from "../../internal/request-options.mjs";
export declare class BaseSnapshot extends APIResource {
static readonly _key: readonly ['browserRendering', 'snapshot'];
/**
* Returns the page's HTML content and screenshot. Control page loading with
* `gotoOptions` and `waitFor*` options. Customize screenshots with `viewport`,
* `fullPage`, `clip` and others.
*
* @example
* ```ts
* const snapshot =
* await client.browserRendering.snapshot.create({
* account_id: 'account_id',
* html: '
Hello World!
',
* formats: ['content', 'screenshot'],
* });
* ```
*/
create(params: SnapshotCreateParams, options?: RequestOptions): APIPromise;
}
export declare class Snapshot extends BaseSnapshot {
}
export interface SnapshotCreateResponse {
/**
* Accessibility tree node
*/
accessibilityTree?: SnapshotCreateResponse.AccessibilityTree;
/**
* HTML content.
*/
content?: string;
/**
* Markdown content.
*/
markdown?: string;
/**
* Base64 encoded image.
*/
screenshot?: string;
}
export declare namespace SnapshotCreateResponse {
/**
* Accessibility tree node
*/
interface AccessibilityTree {
role: string;
autocomplete?: string;
checked?: boolean | 'mixed';
children?: Array;
description?: string;
disabled?: boolean;
expanded?: boolean;
focused?: boolean;
haspopup?: string;
invalid?: string;
keyshortcuts?: string;
level?: number;
modal?: boolean;
multiline?: boolean;
multiselectable?: boolean;
name?: string;
orientation?: string;
pressed?: boolean | 'mixed';
readonly?: boolean;
required?: boolean;
roledescription?: string;
selected?: boolean;
value?: string | number;
valuemax?: number;
valuemin?: number;
valuetext?: string;
}
}
export type SnapshotCreateParams = SnapshotCreateParams.Variant0 | SnapshotCreateParams.Variant1;
export declare namespace SnapshotCreateParams {
interface Variant0 {
/**
* Path param: Account ID.
*/
account_id: string;
/**
* Body param: Set the content of the page, eg: `Hello World!!
`. Either
* `html` or `url` must be set.
*/
html: string;
/**
* Query param: Cache TTL default is 5s. Set to 0 to disable.
*/
cacheTTL?: number;
/**
* Body param: The maximum duration allowed for the browser action to complete
* after the page has loaded (such as taking screenshots, extracting content, or
* generating PDFs). If this time limit is exceeded, the action stops and returns a
* timeout error.
*/
actionTimeout?: number;
/**
* Body param: Adds a `