import type { AttributeMode, CookiePriority, CookieSameSite, CookieSourceScheme, Method } from './enums.js'; /** A HTTP header input type */ export interface HeaderInput { /** The name of the HTTP header */ name: string; /** The value of the HTTP header */ value: string; } export interface CookiePartitionKeyInput { sourceOrigin: string; hasCrossSiteAncestor?: boolean; } /** The cookie to be sent to the page */ export interface CookieInput { /** Cookie domain */ domain?: string; /** Cookie expiration date, session cookie if not set */ expires?: number; /** True if cookie is http-only */ httpOnly?: boolean; /** Cookie name */ name: string; /** Cookie path */ path?: string; priority?: CookiePriority; sourceScheme?: CookieSourceScheme; partitionKey?: CookiePartitionKeyInput; /** Cookie SameSite type */ sameSite?: CookieSameSite; /** True if cookie is secure */ secure?: boolean; /** The request-URI to associate with the setting of the cookie. This value can affect the default domain, path, source port, and source scheme values of the created cookie */ url?: string; /** Cookie value */ value: string; } /** Options for cleaning up the DOM prior to exporting its content. Many options are available, and this query can destructively remove non-text DOM nodes, DOM attributes, and gratuitous whitespace characters. Since these operations are destructive in their nature it's recommended to run them at the very end of your query in order to preserve page functionality */ export interface CleanInput { /** * When true (default is true) this will remove non-textual nodes from the DOM like scripts, links, video, canvas, etc. You may override this by specifying a `selectors` argument for DOM selectors to remove. * * @default true */ removeNonTextNodes?: boolean; /** * When true (default is false) this will remove all attributes on all DOM nodes. Useful for "cleaning" up all HTML markup but preserving the structure overall. You can specify specific attributes to remove with `attributes` argument * * @default false */ removeAttributes?: boolean; /** * Removes any characters in the HTML by a regex pattern and arn in order. By default this is true and removes newlines, returns, tabs, multi-spaces and HTML comments in that order. You may supply your own regex by using the `regexes` argument * * @default true */ removeRegex?: boolean; /** A list of selectors to remove from the page when `removeNonTextNodes` is set to true (`true` by default). */ selectors?: string[]; /** A list of attributes to remove from all DOM nodes. When this isn't specified, and `removeAttributes` is true, all attributes on all DOM nodes are removed. `removeNonTextNodes` must be set to `true` for this to take effect */ attributes?: string[]; /** * Controls how the `attributes` field is interpreted. When set to "allow", the `attributes` field specifies which attributes to keep. When set to "deny" (default), the `attributes` field specifies which attributes to remove. Defaults to "deny" for backward compatibility. * * @default DENY */ mode?: AttributeMode; /** * When `removeRegex` is set to "true" this list of regex items, without the beginning and ending `/`, are removed from the page. These are each run in order and replaced with a single space character to preserve some of their contents * * @default [" +", "\n", "\r", "\t", "<\\!--.*?-->"] */ regexes?: string[]; } /** A resource URL and its replacement archive path when rewriting HTML for export. */ export interface HTMLResourcePathInput { /** The absolute resource URL found in the page. */ url: string; /** The relative path used for the resource in the exported archive. */ path: string; } /** Options for rewriting page resource URLs before returning HTML. */ export interface HTMLRewriteInput { /** The base URL used to resolve relative resource URLs. */ baseURL: string; /** The resources to rewrite from absolute URLs to archive-relative paths. */ resources: HTMLResourcePathInput[]; } /** The specific request to perform a conditional action on */ export interface RequestInput { /** The HTTP Method of the request */ method?: Method; /** The pattern of the request URL to wait for, using glob-style pattern-matching */ url?: string; } /** The specific response to perform a conditional action on */ export interface ResponseInput { /** The HTTP Response code(s) of the URL to wait for. Can be a single HTTP code or a list of desired codes */ statuses?: number[]; /** * The HTTP Response code(s) of the URL to wait for. Can be a single HTTP code or a list of desired codes * * @deprecated Use `statuses` field instead as it is more consistent in BrowserQL. */ codes?: number[]; /** The pattern of the response URL to wait for, using glob-style pattern-matching */ url?: string; } /** The clipping to be applied to the screenshot */ export interface ScreenshotClip { /** The height of the clip, in pixels */ height?: number; /** The scale factor of the clip */ scale?: number; /** The width of the clip, in pixels */ width?: number; /** The x coordinate to start clipping, in pixels */ x?: number; /** The y coordinate to start clipping, in pixels */ y?: number; } //# sourceMappingURL=inputs.d.ts.map