/**
 * Cloudflare BROWSER-RENDERING API
 *
 * Generated from Cloudflare TypeScript SDK.
 * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service browser-rendering
 */
import * as Schema from "effect/Schema";
import * as API from "../client/api.js";
import * as T from "../traits.js";
import {} from "../errors.js";
import { SensitiveString } from "../sensitive.js";
export const CreateContentRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    cacheTTL: Schema.optional(Schema.Number).pipe(T.HttpQuery("cacheTTL")),
    url: Schema.String,
    actionTimeout: Schema.optional(Schema.Number),
    addScriptTag: Schema.optional(Schema.Array(Schema.Struct({
        id: Schema.optional(Schema.String),
        content: Schema.optional(Schema.String),
        type: Schema.optional(Schema.String),
        url: Schema.optional(Schema.String),
    }))),
    addStyleTag: Schema.optional(Schema.Array(Schema.Struct({
        content: Schema.optional(Schema.String),
        url: Schema.optional(Schema.String),
    }))),
    allowRequestPattern: Schema.optional(Schema.Array(Schema.String)),
    allowResourceTypes: Schema.optional(Schema.Array(Schema.Literals([
        "document",
        "stylesheet",
        "image",
        "media",
        "font",
        "script",
        "texttrack",
        "xhr",
        "fetch",
        "prefetch",
        "eventsource",
        "websocket",
        "manifest",
        "signedexchange",
        "ping",
        "cspviolationreport",
        "preflight",
        "other",
    ]))),
    authenticate: Schema.optional(Schema.Struct({
        password: SensitiveString,
        username: Schema.String,
    })),
    bestAttempt: Schema.optional(Schema.Boolean),
    cookies: Schema.optional(Schema.Array(Schema.Struct({
        name: Schema.String,
        value: Schema.String,
        domain: Schema.optional(Schema.String),
        expires: Schema.optional(Schema.Number),
        httpOnly: Schema.optional(Schema.Boolean),
        partitionKey: Schema.optional(Schema.String),
        path: Schema.optional(Schema.String),
        priority: Schema.optional(Schema.Literals(["Low", "Medium", "High"])),
        sameParty: Schema.optional(Schema.Boolean),
        sameSite: Schema.optional(Schema.Literals(["Strict", "Lax", "None"])),
        secure: Schema.optional(Schema.Boolean),
        sourcePort: Schema.optional(Schema.Number),
        sourceScheme: Schema.optional(Schema.Literals(["Unset", "NonSecure", "Secure"])),
        url: Schema.optional(Schema.String),
    }))),
    emulateMediaType: Schema.optional(Schema.String),
    gotoOptions: Schema.optional(Schema.Struct({
        referer: Schema.optional(Schema.String),
        referrerPolicy: Schema.optional(Schema.String),
        timeout: Schema.optional(Schema.Number),
        waitUntil: Schema.optional(Schema.Union([
            Schema.Literal("load"),
            Schema.Literal("domcontentloaded"),
            Schema.Literal("networkidle0"),
            Schema.Literal("networkidle2"),
            Schema.Array(Schema.Literals([
                "load",
                "domcontentloaded",
                "networkidle0",
                "networkidle2",
            ])),
        ])),
    })),
    rejectRequestPattern: Schema.optional(Schema.Array(Schema.String)),
    rejectResourceTypes: Schema.optional(Schema.Array(Schema.Literals([
        "document",
        "stylesheet",
        "image",
        "media",
        "font",
        "script",
        "texttrack",
        "xhr",
        "fetch",
        "prefetch",
        "eventsource",
        "websocket",
        "manifest",
        "signedexchange",
        "ping",
        "cspviolationreport",
        "preflight",
        "other",
    ]))),
    setExtraHTTPHeaders: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
    setJavaScriptEnabled: Schema.optional(Schema.Boolean),
    userAgent: Schema.optional(Schema.String),
    viewport: Schema.optional(Schema.Struct({
        height: Schema.Number,
        width: Schema.Number,
        deviceScaleFactor: Schema.optional(Schema.Number),
        hasTouch: Schema.optional(Schema.Boolean),
        isLandscape: Schema.optional(Schema.Boolean),
        isMobile: Schema.optional(Schema.Boolean),
    })),
    waitForSelector: Schema.optional(Schema.Struct({
        selector: Schema.String,
        hidden: Schema.optional(Schema.Literal(true)),
        timeout: Schema.optional(Schema.Number),
        visible: Schema.optional(Schema.Literal(true)),
    })),
    waitForTimeout: Schema.optional(Schema.Number),
}).pipe(T.Http({
    method: "POST",
    path: "/accounts/{account_id}/browser-rendering/content",
}));
export const CreateContentResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.String.pipe(T.ResponsePath("result"));
export const createContent = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateContentRequest,
    output: CreateContentResponse,
    errors: [],
}));
export const CreateJsonRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    cacheTTL: Schema.optional(Schema.Number).pipe(T.HttpQuery("cacheTTL")),
    html: Schema.String,
    actionTimeout: Schema.optional(Schema.Number),
    addScriptTag: Schema.optional(Schema.Array(Schema.Struct({
        id: Schema.optional(Schema.String),
        content: Schema.optional(Schema.String),
        type: Schema.optional(Schema.String),
        url: Schema.optional(Schema.String),
    }))),
    addStyleTag: Schema.optional(Schema.Array(Schema.Struct({
        content: Schema.optional(Schema.String),
        url: Schema.optional(Schema.String),
    }))),
    allowRequestPattern: Schema.optional(Schema.Array(Schema.String)),
    allowResourceTypes: Schema.optional(Schema.Array(Schema.Literals([
        "document",
        "stylesheet",
        "image",
        "media",
        "font",
        "script",
        "texttrack",
        "xhr",
        "fetch",
        "prefetch",
        "eventsource",
        "websocket",
        "manifest",
        "signedexchange",
        "ping",
        "cspviolationreport",
        "preflight",
        "other",
    ]))),
    authenticate: Schema.optional(Schema.Struct({
        password: SensitiveString,
        username: Schema.String,
    })),
    bestAttempt: Schema.optional(Schema.Boolean),
    cookies: Schema.optional(Schema.Array(Schema.Struct({
        name: Schema.String,
        value: Schema.String,
        domain: Schema.optional(Schema.String),
        expires: Schema.optional(Schema.Number),
        httpOnly: Schema.optional(Schema.Boolean),
        partitionKey: Schema.optional(Schema.String),
        path: Schema.optional(Schema.String),
        priority: Schema.optional(Schema.Literals(["Low", "Medium", "High"])),
        sameParty: Schema.optional(Schema.Boolean),
        sameSite: Schema.optional(Schema.Literals(["Strict", "Lax", "None"])),
        secure: Schema.optional(Schema.Boolean),
        sourcePort: Schema.optional(Schema.Number),
        sourceScheme: Schema.optional(Schema.Literals(["Unset", "NonSecure", "Secure"])),
        url: Schema.optional(Schema.String),
    }))),
    customAi: Schema.optional(Schema.Array(Schema.Struct({
        authorization: Schema.String,
        model: Schema.String,
    }))),
    emulateMediaType: Schema.optional(Schema.String),
    gotoOptions: Schema.optional(Schema.Struct({
        referer: Schema.optional(Schema.String),
        referrerPolicy: Schema.optional(Schema.String),
        timeout: Schema.optional(Schema.Number),
        waitUntil: Schema.optional(Schema.Union([
            Schema.Literal("load"),
            Schema.Literal("domcontentloaded"),
            Schema.Literal("networkidle0"),
            Schema.Literal("networkidle2"),
            Schema.Array(Schema.Literals([
                "load",
                "domcontentloaded",
                "networkidle0",
                "networkidle2",
            ])),
        ])),
    })),
    prompt: Schema.optional(Schema.String),
    rejectRequestPattern: Schema.optional(Schema.Array(Schema.String)),
    rejectResourceTypes: Schema.optional(Schema.Array(Schema.Literals([
        "document",
        "stylesheet",
        "image",
        "media",
        "font",
        "script",
        "texttrack",
        "xhr",
        "fetch",
        "prefetch",
        "eventsource",
        "websocket",
        "manifest",
        "signedexchange",
        "ping",
        "cspviolationreport",
        "preflight",
        "other",
    ]))),
    responseFormat: Schema.optional(Schema.Struct({
        type: Schema.String,
        jsonSchema: Schema.optional(Schema.Union([
            Schema.Record(Schema.String, Schema.Unknown),
            Schema.Null,
        ])),
    }).pipe(Schema.encodeKeys({ type: "type", jsonSchema: "json_schema" }))),
    setExtraHTTPHeaders: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
    setJavaScriptEnabled: Schema.optional(Schema.Boolean),
    userAgent: Schema.optional(Schema.String),
    viewport: Schema.optional(Schema.Struct({
        height: Schema.Number,
        width: Schema.Number,
        deviceScaleFactor: Schema.optional(Schema.Number),
        hasTouch: Schema.optional(Schema.Boolean),
        isLandscape: Schema.optional(Schema.Boolean),
        isMobile: Schema.optional(Schema.Boolean),
    })),
    waitForSelector: Schema.optional(Schema.Struct({
        selector: Schema.String,
        hidden: Schema.optional(Schema.Literal(true)),
        timeout: Schema.optional(Schema.Number),
        visible: Schema.optional(Schema.Literal(true)),
    })),
    waitForTimeout: Schema.optional(Schema.Number),
}).pipe(Schema.encodeKeys({
    html: "html",
    actionTimeout: "actionTimeout",
    addScriptTag: "addScriptTag",
    addStyleTag: "addStyleTag",
    allowRequestPattern: "allowRequestPattern",
    allowResourceTypes: "allowResourceTypes",
    authenticate: "authenticate",
    bestAttempt: "bestAttempt",
    cookies: "cookies",
    customAi: "custom_ai",
    emulateMediaType: "emulateMediaType",
    gotoOptions: "gotoOptions",
    prompt: "prompt",
    rejectRequestPattern: "rejectRequestPattern",
    rejectResourceTypes: "rejectResourceTypes",
    responseFormat: "response_format",
    setExtraHTTPHeaders: "setExtraHTTPHeaders",
    setJavaScriptEnabled: "setJavaScriptEnabled",
    userAgent: "userAgent",
    viewport: "viewport",
    waitForSelector: "waitForSelector",
    waitForTimeout: "waitForTimeout",
}), T.Http({
    method: "POST",
    path: "/accounts/{account_id}/browser-rendering/json",
}));
export const CreateJsonResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Record(Schema.String, Schema.Unknown).pipe(T.ResponsePath("result"));
export const createJson = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateJsonRequest,
    output: CreateJsonResponse,
    errors: [],
}));
export const CreateLinkRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    cacheTTL: Schema.optional(Schema.Number).pipe(T.HttpQuery("cacheTTL")),
    html: Schema.String,
    actionTimeout: Schema.optional(Schema.Number),
    addScriptTag: Schema.optional(Schema.Array(Schema.Struct({
        id: Schema.optional(Schema.String),
        content: Schema.optional(Schema.String),
        type: Schema.optional(Schema.String),
        url: Schema.optional(Schema.String),
    }))),
    addStyleTag: Schema.optional(Schema.Array(Schema.Struct({
        content: Schema.optional(Schema.String),
        url: Schema.optional(Schema.String),
    }))),
    allowRequestPattern: Schema.optional(Schema.Array(Schema.String)),
    allowResourceTypes: Schema.optional(Schema.Array(Schema.Literals([
        "document",
        "stylesheet",
        "image",
        "media",
        "font",
        "script",
        "texttrack",
        "xhr",
        "fetch",
        "prefetch",
        "eventsource",
        "websocket",
        "manifest",
        "signedexchange",
        "ping",
        "cspviolationreport",
        "preflight",
        "other",
    ]))),
    authenticate: Schema.optional(Schema.Struct({
        password: SensitiveString,
        username: Schema.String,
    })),
    bestAttempt: Schema.optional(Schema.Boolean),
    cookies: Schema.optional(Schema.Array(Schema.Struct({
        name: Schema.String,
        value: Schema.String,
        domain: Schema.optional(Schema.String),
        expires: Schema.optional(Schema.Number),
        httpOnly: Schema.optional(Schema.Boolean),
        partitionKey: Schema.optional(Schema.String),
        path: Schema.optional(Schema.String),
        priority: Schema.optional(Schema.Literals(["Low", "Medium", "High"])),
        sameParty: Schema.optional(Schema.Boolean),
        sameSite: Schema.optional(Schema.Literals(["Strict", "Lax", "None"])),
        secure: Schema.optional(Schema.Boolean),
        sourcePort: Schema.optional(Schema.Number),
        sourceScheme: Schema.optional(Schema.Literals(["Unset", "NonSecure", "Secure"])),
        url: Schema.optional(Schema.String),
    }))),
    emulateMediaType: Schema.optional(Schema.String),
    excludeExternalLinks: Schema.optional(Schema.Boolean),
    gotoOptions: Schema.optional(Schema.Struct({
        referer: Schema.optional(Schema.String),
        referrerPolicy: Schema.optional(Schema.String),
        timeout: Schema.optional(Schema.Number),
        waitUntil: Schema.optional(Schema.Union([
            Schema.Literal("load"),
            Schema.Literal("domcontentloaded"),
            Schema.Literal("networkidle0"),
            Schema.Literal("networkidle2"),
            Schema.Array(Schema.Literals([
                "load",
                "domcontentloaded",
                "networkidle0",
                "networkidle2",
            ])),
        ])),
    })),
    rejectRequestPattern: Schema.optional(Schema.Array(Schema.String)),
    rejectResourceTypes: Schema.optional(Schema.Array(Schema.Literals([
        "document",
        "stylesheet",
        "image",
        "media",
        "font",
        "script",
        "texttrack",
        "xhr",
        "fetch",
        "prefetch",
        "eventsource",
        "websocket",
        "manifest",
        "signedexchange",
        "ping",
        "cspviolationreport",
        "preflight",
        "other",
    ]))),
    setExtraHTTPHeaders: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
    setJavaScriptEnabled: Schema.optional(Schema.Boolean),
    userAgent: Schema.optional(Schema.String),
    viewport: Schema.optional(Schema.Struct({
        height: Schema.Number,
        width: Schema.Number,
        deviceScaleFactor: Schema.optional(Schema.Number),
        hasTouch: Schema.optional(Schema.Boolean),
        isLandscape: Schema.optional(Schema.Boolean),
        isMobile: Schema.optional(Schema.Boolean),
    })),
    visibleLinksOnly: Schema.optional(Schema.Boolean),
    waitForSelector: Schema.optional(Schema.Struct({
        selector: Schema.String,
        hidden: Schema.optional(Schema.Literal(true)),
        timeout: Schema.optional(Schema.Number),
        visible: Schema.optional(Schema.Literal(true)),
    })),
    waitForTimeout: Schema.optional(Schema.Number),
}).pipe(T.Http({
    method: "POST",
    path: "/accounts/{account_id}/browser-rendering/links",
}));
export const CreateLinkResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(Schema.String).pipe(T.ResponsePath("result"));
export const createLink = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateLinkRequest,
    output: CreateLinkResponse,
    errors: [],
}));
export const CreateMarkdownRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    cacheTTL: Schema.optional(Schema.Number).pipe(T.HttpQuery("cacheTTL")),
    url: Schema.String,
    actionTimeout: Schema.optional(Schema.Number),
    addScriptTag: Schema.optional(Schema.Array(Schema.Struct({
        id: Schema.optional(Schema.String),
        content: Schema.optional(Schema.String),
        type: Schema.optional(Schema.String),
        url: Schema.optional(Schema.String),
    }))),
    addStyleTag: Schema.optional(Schema.Array(Schema.Struct({
        content: Schema.optional(Schema.String),
        url: Schema.optional(Schema.String),
    }))),
    allowRequestPattern: Schema.optional(Schema.Array(Schema.String)),
    allowResourceTypes: Schema.optional(Schema.Array(Schema.Literals([
        "document",
        "stylesheet",
        "image",
        "media",
        "font",
        "script",
        "texttrack",
        "xhr",
        "fetch",
        "prefetch",
        "eventsource",
        "websocket",
        "manifest",
        "signedexchange",
        "ping",
        "cspviolationreport",
        "preflight",
        "other",
    ]))),
    authenticate: Schema.optional(Schema.Struct({
        password: SensitiveString,
        username: Schema.String,
    })),
    bestAttempt: Schema.optional(Schema.Boolean),
    cookies: Schema.optional(Schema.Array(Schema.Struct({
        name: Schema.String,
        value: Schema.String,
        domain: Schema.optional(Schema.String),
        expires: Schema.optional(Schema.Number),
        httpOnly: Schema.optional(Schema.Boolean),
        partitionKey: Schema.optional(Schema.String),
        path: Schema.optional(Schema.String),
        priority: Schema.optional(Schema.Literals(["Low", "Medium", "High"])),
        sameParty: Schema.optional(Schema.Boolean),
        sameSite: Schema.optional(Schema.Literals(["Strict", "Lax", "None"])),
        secure: Schema.optional(Schema.Boolean),
        sourcePort: Schema.optional(Schema.Number),
        sourceScheme: Schema.optional(Schema.Literals(["Unset", "NonSecure", "Secure"])),
        url: Schema.optional(Schema.String),
    }))),
    emulateMediaType: Schema.optional(Schema.String),
    gotoOptions: Schema.optional(Schema.Struct({
        referer: Schema.optional(Schema.String),
        referrerPolicy: Schema.optional(Schema.String),
        timeout: Schema.optional(Schema.Number),
        waitUntil: Schema.optional(Schema.Union([
            Schema.Literal("load"),
            Schema.Literal("domcontentloaded"),
            Schema.Literal("networkidle0"),
            Schema.Literal("networkidle2"),
            Schema.Array(Schema.Literals([
                "load",
                "domcontentloaded",
                "networkidle0",
                "networkidle2",
            ])),
        ])),
    })),
    rejectRequestPattern: Schema.optional(Schema.Array(Schema.String)),
    rejectResourceTypes: Schema.optional(Schema.Array(Schema.Literals([
        "document",
        "stylesheet",
        "image",
        "media",
        "font",
        "script",
        "texttrack",
        "xhr",
        "fetch",
        "prefetch",
        "eventsource",
        "websocket",
        "manifest",
        "signedexchange",
        "ping",
        "cspviolationreport",
        "preflight",
        "other",
    ]))),
    setExtraHTTPHeaders: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
    setJavaScriptEnabled: Schema.optional(Schema.Boolean),
    userAgent: Schema.optional(Schema.String),
    viewport: Schema.optional(Schema.Struct({
        height: Schema.Number,
        width: Schema.Number,
        deviceScaleFactor: Schema.optional(Schema.Number),
        hasTouch: Schema.optional(Schema.Boolean),
        isLandscape: Schema.optional(Schema.Boolean),
        isMobile: Schema.optional(Schema.Boolean),
    })),
    waitForSelector: Schema.optional(Schema.Struct({
        selector: Schema.String,
        hidden: Schema.optional(Schema.Literal(true)),
        timeout: Schema.optional(Schema.Number),
        visible: Schema.optional(Schema.Literal(true)),
    })),
    waitForTimeout: Schema.optional(Schema.Number),
}).pipe(T.Http({
    method: "POST",
    path: "/accounts/{account_id}/browser-rendering/markdown",
}));
export const CreateMarkdownResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.String.pipe(T.ResponsePath("result"));
export const createMarkdown = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateMarkdownRequest,
    output: CreateMarkdownResponse,
    errors: [],
}));
export const CreatePdfRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    cacheTTL: Schema.optional(Schema.Number).pipe(T.HttpQuery("cacheTTL")),
    html: Schema.String,
    actionTimeout: Schema.optional(Schema.Number),
    addScriptTag: Schema.optional(Schema.Array(Schema.Struct({
        id: Schema.optional(Schema.String),
        content: Schema.optional(Schema.String),
        type: Schema.optional(Schema.String),
        url: Schema.optional(Schema.String),
    }))),
    addStyleTag: Schema.optional(Schema.Array(Schema.Struct({
        content: Schema.optional(Schema.String),
        url: Schema.optional(Schema.String),
    }))),
    allowRequestPattern: Schema.optional(Schema.Array(Schema.String)),
    allowResourceTypes: Schema.optional(Schema.Array(Schema.Literals([
        "document",
        "stylesheet",
        "image",
        "media",
        "font",
        "script",
        "texttrack",
        "xhr",
        "fetch",
        "prefetch",
        "eventsource",
        "websocket",
        "manifest",
        "signedexchange",
        "ping",
        "cspviolationreport",
        "preflight",
        "other",
    ]))),
    authenticate: Schema.optional(Schema.Struct({
        password: SensitiveString,
        username: Schema.String,
    })),
    bestAttempt: Schema.optional(Schema.Boolean),
    cookies: Schema.optional(Schema.Array(Schema.Struct({
        name: Schema.String,
        value: Schema.String,
        domain: Schema.optional(Schema.String),
        expires: Schema.optional(Schema.Number),
        httpOnly: Schema.optional(Schema.Boolean),
        partitionKey: Schema.optional(Schema.String),
        path: Schema.optional(Schema.String),
        priority: Schema.optional(Schema.Literals(["Low", "Medium", "High"])),
        sameParty: Schema.optional(Schema.Boolean),
        sameSite: Schema.optional(Schema.Literals(["Strict", "Lax", "None"])),
        secure: Schema.optional(Schema.Boolean),
        sourcePort: Schema.optional(Schema.Number),
        sourceScheme: Schema.optional(Schema.Literals(["Unset", "NonSecure", "Secure"])),
        url: Schema.optional(Schema.String),
    }))),
    emulateMediaType: Schema.optional(Schema.String),
    gotoOptions: Schema.optional(Schema.Struct({
        referer: Schema.optional(Schema.String),
        referrerPolicy: Schema.optional(Schema.String),
        timeout: Schema.optional(Schema.Number),
        waitUntil: Schema.optional(Schema.Union([
            Schema.Literal("load"),
            Schema.Literal("domcontentloaded"),
            Schema.Literal("networkidle0"),
            Schema.Literal("networkidle2"),
            Schema.Array(Schema.Literals([
                "load",
                "domcontentloaded",
                "networkidle0",
                "networkidle2",
            ])),
        ])),
    })),
    pdfOptions: Schema.optional(Schema.Struct({
        displayHeaderFooter: Schema.optional(Schema.Boolean),
        footerTemplate: Schema.optional(Schema.String),
        format: Schema.optional(Schema.Literals([
            "letter",
            "legal",
            "tabloid",
            "ledger",
            "a0",
            "a1",
            "a2",
            "a3",
            "a4",
            "a5",
            "a6",
        ])),
        headerTemplate: Schema.optional(Schema.String),
        height: Schema.optional(Schema.Union([Schema.String, Schema.Number])),
        landscape: Schema.optional(Schema.Boolean),
        margin: Schema.optional(Schema.Struct({
            bottom: Schema.optional(Schema.Union([Schema.String, Schema.Number])),
            left: Schema.optional(Schema.Union([Schema.String, Schema.Number])),
            right: Schema.optional(Schema.Union([Schema.String, Schema.Number])),
            top: Schema.optional(Schema.Union([Schema.String, Schema.Number])),
        })),
        omitBackground: Schema.optional(Schema.Boolean),
        outline: Schema.optional(Schema.Boolean),
        pageRanges: Schema.optional(Schema.String),
        preferCSSPageSize: Schema.optional(Schema.Boolean),
        printBackground: Schema.optional(Schema.Boolean),
        scale: Schema.optional(Schema.Number),
        tagged: Schema.optional(Schema.Boolean),
        timeout: Schema.optional(Schema.Number),
        width: Schema.optional(Schema.Union([Schema.String, Schema.Number])),
    })),
    rejectRequestPattern: Schema.optional(Schema.Array(Schema.String)),
    rejectResourceTypes: Schema.optional(Schema.Array(Schema.Literals([
        "document",
        "stylesheet",
        "image",
        "media",
        "font",
        "script",
        "texttrack",
        "xhr",
        "fetch",
        "prefetch",
        "eventsource",
        "websocket",
        "manifest",
        "signedexchange",
        "ping",
        "cspviolationreport",
        "preflight",
        "other",
    ]))),
    setExtraHTTPHeaders: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
    setJavaScriptEnabled: Schema.optional(Schema.Boolean),
    userAgent: Schema.optional(Schema.String),
    viewport: Schema.optional(Schema.Struct({
        height: Schema.Number,
        width: Schema.Number,
        deviceScaleFactor: Schema.optional(Schema.Number),
        hasTouch: Schema.optional(Schema.Boolean),
        isLandscape: Schema.optional(Schema.Boolean),
        isMobile: Schema.optional(Schema.Boolean),
    })),
    waitForSelector: Schema.optional(Schema.Struct({
        selector: Schema.String,
        hidden: Schema.optional(Schema.Literal(true)),
        timeout: Schema.optional(Schema.Number),
        visible: Schema.optional(Schema.Literal(true)),
    })),
    waitForTimeout: Schema.optional(Schema.Number),
}).pipe(T.Http({
    method: "POST",
    path: "/accounts/{account_id}/browser-rendering/pdf",
}));
export const CreatePdfResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
export const createPdf = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreatePdfRequest,
    output: CreatePdfResponse,
    errors: [],
}));
export const CreateScrapeRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    cacheTTL: Schema.optional(Schema.Number).pipe(T.HttpQuery("cacheTTL")),
    elements: Schema.Array(Schema.Struct({
        selector: Schema.String,
    })),
    html: Schema.String,
    actionTimeout: Schema.optional(Schema.Number),
    addScriptTag: Schema.optional(Schema.Array(Schema.Struct({
        id: Schema.optional(Schema.String),
        content: Schema.optional(Schema.String),
        type: Schema.optional(Schema.String),
        url: Schema.optional(Schema.String),
    }))),
    addStyleTag: Schema.optional(Schema.Array(Schema.Struct({
        content: Schema.optional(Schema.String),
        url: Schema.optional(Schema.String),
    }))),
    allowRequestPattern: Schema.optional(Schema.Array(Schema.String)),
    allowResourceTypes: Schema.optional(Schema.Array(Schema.Literals([
        "document",
        "stylesheet",
        "image",
        "media",
        "font",
        "script",
        "texttrack",
        "xhr",
        "fetch",
        "prefetch",
        "eventsource",
        "websocket",
        "manifest",
        "signedexchange",
        "ping",
        "cspviolationreport",
        "preflight",
        "other",
    ]))),
    authenticate: Schema.optional(Schema.Struct({
        password: SensitiveString,
        username: Schema.String,
    })),
    bestAttempt: Schema.optional(Schema.Boolean),
    cookies: Schema.optional(Schema.Array(Schema.Struct({
        name: Schema.String,
        value: Schema.String,
        domain: Schema.optional(Schema.String),
        expires: Schema.optional(Schema.Number),
        httpOnly: Schema.optional(Schema.Boolean),
        partitionKey: Schema.optional(Schema.String),
        path: Schema.optional(Schema.String),
        priority: Schema.optional(Schema.Literals(["Low", "Medium", "High"])),
        sameParty: Schema.optional(Schema.Boolean),
        sameSite: Schema.optional(Schema.Literals(["Strict", "Lax", "None"])),
        secure: Schema.optional(Schema.Boolean),
        sourcePort: Schema.optional(Schema.Number),
        sourceScheme: Schema.optional(Schema.Literals(["Unset", "NonSecure", "Secure"])),
        url: Schema.optional(Schema.String),
    }))),
    emulateMediaType: Schema.optional(Schema.String),
    gotoOptions: Schema.optional(Schema.Struct({
        referer: Schema.optional(Schema.String),
        referrerPolicy: Schema.optional(Schema.String),
        timeout: Schema.optional(Schema.Number),
        waitUntil: Schema.optional(Schema.Union([
            Schema.Literal("load"),
            Schema.Literal("domcontentloaded"),
            Schema.Literal("networkidle0"),
            Schema.Literal("networkidle2"),
            Schema.Array(Schema.Literals([
                "load",
                "domcontentloaded",
                "networkidle0",
                "networkidle2",
            ])),
        ])),
    })),
    rejectRequestPattern: Schema.optional(Schema.Array(Schema.String)),
    rejectResourceTypes: Schema.optional(Schema.Array(Schema.Literals([
        "document",
        "stylesheet",
        "image",
        "media",
        "font",
        "script",
        "texttrack",
        "xhr",
        "fetch",
        "prefetch",
        "eventsource",
        "websocket",
        "manifest",
        "signedexchange",
        "ping",
        "cspviolationreport",
        "preflight",
        "other",
    ]))),
    setExtraHTTPHeaders: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
    setJavaScriptEnabled: Schema.optional(Schema.Boolean),
    userAgent: Schema.optional(Schema.String),
    viewport: Schema.optional(Schema.Struct({
        height: Schema.Number,
        width: Schema.Number,
        deviceScaleFactor: Schema.optional(Schema.Number),
        hasTouch: Schema.optional(Schema.Boolean),
        isLandscape: Schema.optional(Schema.Boolean),
        isMobile: Schema.optional(Schema.Boolean),
    })),
    waitForSelector: Schema.optional(Schema.Struct({
        selector: Schema.String,
        hidden: Schema.optional(Schema.Literal(true)),
        timeout: Schema.optional(Schema.Number),
        visible: Schema.optional(Schema.Literal(true)),
    })),
    waitForTimeout: Schema.optional(Schema.Number),
}).pipe(T.Http({
    method: "POST",
    path: "/accounts/{account_id}/browser-rendering/scrape",
}));
export const CreateScrapeResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(Schema.Struct({
    results: Schema.Struct({
        attributes: Schema.Array(Schema.Struct({
            name: Schema.String,
            value: Schema.String,
        })),
        height: Schema.Number,
        html: Schema.String,
        left: Schema.Number,
        text: Schema.String,
        top: Schema.Number,
        width: Schema.Number,
    }),
    selector: Schema.String,
})).pipe(T.ResponsePath("result"));
export const createScrape = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateScrapeRequest,
    output: CreateScrapeResponse,
    errors: [],
}));
export const CreateScreenshotRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    cacheTTL: Schema.optional(Schema.Number).pipe(T.HttpQuery("cacheTTL")),
    html: Schema.String,
    actionTimeout: Schema.optional(Schema.Number),
    addScriptTag: Schema.optional(Schema.Array(Schema.Struct({
        id: Schema.optional(Schema.String),
        content: Schema.optional(Schema.String),
        type: Schema.optional(Schema.String),
        url: Schema.optional(Schema.String),
    }))),
    addStyleTag: Schema.optional(Schema.Array(Schema.Struct({
        content: Schema.optional(Schema.String),
        url: Schema.optional(Schema.String),
    }))),
    allowRequestPattern: Schema.optional(Schema.Array(Schema.String)),
    allowResourceTypes: Schema.optional(Schema.Array(Schema.Literals([
        "document",
        "stylesheet",
        "image",
        "media",
        "font",
        "script",
        "texttrack",
        "xhr",
        "fetch",
        "prefetch",
        "eventsource",
        "websocket",
        "manifest",
        "signedexchange",
        "ping",
        "cspviolationreport",
        "preflight",
        "other",
    ]))),
    authenticate: Schema.optional(Schema.Struct({
        password: SensitiveString,
        username: Schema.String,
    })),
    bestAttempt: Schema.optional(Schema.Boolean),
    cookies: Schema.optional(Schema.Array(Schema.Struct({
        name: Schema.String,
        value: Schema.String,
        domain: Schema.optional(Schema.String),
        expires: Schema.optional(Schema.Number),
        httpOnly: Schema.optional(Schema.Boolean),
        partitionKey: Schema.optional(Schema.String),
        path: Schema.optional(Schema.String),
        priority: Schema.optional(Schema.Literals(["Low", "Medium", "High"])),
        sameParty: Schema.optional(Schema.Boolean),
        sameSite: Schema.optional(Schema.Literals(["Strict", "Lax", "None"])),
        secure: Schema.optional(Schema.Boolean),
        sourcePort: Schema.optional(Schema.Number),
        sourceScheme: Schema.optional(Schema.Literals(["Unset", "NonSecure", "Secure"])),
        url: Schema.optional(Schema.String),
    }))),
    emulateMediaType: Schema.optional(Schema.String),
    gotoOptions: Schema.optional(Schema.Struct({
        referer: Schema.optional(Schema.String),
        referrerPolicy: Schema.optional(Schema.String),
        timeout: Schema.optional(Schema.Number),
        waitUntil: Schema.optional(Schema.Union([
            Schema.Literal("load"),
            Schema.Literal("domcontentloaded"),
            Schema.Literal("networkidle0"),
            Schema.Literal("networkidle2"),
            Schema.Array(Schema.Literals([
                "load",
                "domcontentloaded",
                "networkidle0",
                "networkidle2",
            ])),
        ])),
    })),
    rejectRequestPattern: Schema.optional(Schema.Array(Schema.String)),
    rejectResourceTypes: Schema.optional(Schema.Array(Schema.Literals([
        "document",
        "stylesheet",
        "image",
        "media",
        "font",
        "script",
        "texttrack",
        "xhr",
        "fetch",
        "prefetch",
        "eventsource",
        "websocket",
        "manifest",
        "signedexchange",
        "ping",
        "cspviolationreport",
        "preflight",
        "other",
    ]))),
    screenshotOptions: Schema.optional(Schema.Struct({
        captureBeyondViewport: Schema.optional(Schema.Boolean),
        clip: Schema.optional(Schema.Struct({
            height: Schema.Number,
            width: Schema.Number,
            x: Schema.Number,
            y: Schema.Number,
            scale: Schema.optional(Schema.Number),
        })),
        encoding: Schema.optional(Schema.Literals(["binary", "base64"])),
        fromSurface: Schema.optional(Schema.Boolean),
        fullPage: Schema.optional(Schema.Boolean),
        omitBackground: Schema.optional(Schema.Boolean),
        optimizeForSpeed: Schema.optional(Schema.Boolean),
        quality: Schema.optional(Schema.Number),
        type: Schema.optional(Schema.Literals(["png", "jpeg", "webp"])),
    })),
    scrollPage: Schema.optional(Schema.Boolean),
    selector: Schema.optional(Schema.String),
    setExtraHTTPHeaders: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
    setJavaScriptEnabled: Schema.optional(Schema.Boolean),
    userAgent: Schema.optional(Schema.String),
    viewport: Schema.optional(Schema.Struct({
        height: Schema.Number,
        width: Schema.Number,
        deviceScaleFactor: Schema.optional(Schema.Number),
        hasTouch: Schema.optional(Schema.Boolean),
        isLandscape: Schema.optional(Schema.Boolean),
        isMobile: Schema.optional(Schema.Boolean),
    })),
    waitForSelector: Schema.optional(Schema.Struct({
        selector: Schema.String,
        hidden: Schema.optional(Schema.Literal(true)),
        timeout: Schema.optional(Schema.Number),
        visible: Schema.optional(Schema.Literal(true)),
    })),
    waitForTimeout: Schema.optional(Schema.Number),
}).pipe(T.Http({
    method: "POST",
    path: "/accounts/{account_id}/browser-rendering/screenshot",
}));
export const CreateScreenshotResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    success: Schema.Boolean,
    errors: Schema.optional(Schema.Union([
        Schema.Array(Schema.Struct({
            code: Schema.Number,
            message: Schema.String,
        })),
        Schema.Null,
    ])),
});
export const createScreenshot = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateScreenshotRequest,
    output: CreateScreenshotResponse,
    errors: [],
}));
export const CreateSnapshotRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    cacheTTL: Schema.optional(Schema.Number).pipe(T.HttpQuery("cacheTTL")),
    html: Schema.String,
    actionTimeout: Schema.optional(Schema.Number),
    addScriptTag: Schema.optional(Schema.Array(Schema.Struct({
        id: Schema.optional(Schema.String),
        content: Schema.optional(Schema.String),
        type: Schema.optional(Schema.String),
        url: Schema.optional(Schema.String),
    }))),
    addStyleTag: Schema.optional(Schema.Array(Schema.Struct({
        content: Schema.optional(Schema.String),
        url: Schema.optional(Schema.String),
    }))),
    allowRequestPattern: Schema.optional(Schema.Array(Schema.String)),
    allowResourceTypes: Schema.optional(Schema.Array(Schema.Literals([
        "document",
        "stylesheet",
        "image",
        "media",
        "font",
        "script",
        "texttrack",
        "xhr",
        "fetch",
        "prefetch",
        "eventsource",
        "websocket",
        "manifest",
        "signedexchange",
        "ping",
        "cspviolationreport",
        "preflight",
        "other",
    ]))),
    authenticate: Schema.optional(Schema.Struct({
        password: SensitiveString,
        username: Schema.String,
    })),
    bestAttempt: Schema.optional(Schema.Boolean),
    cookies: Schema.optional(Schema.Array(Schema.Struct({
        name: Schema.String,
        value: Schema.String,
        domain: Schema.optional(Schema.String),
        expires: Schema.optional(Schema.Number),
        httpOnly: Schema.optional(Schema.Boolean),
        partitionKey: Schema.optional(Schema.String),
        path: Schema.optional(Schema.String),
        priority: Schema.optional(Schema.Literals(["Low", "Medium", "High"])),
        sameParty: Schema.optional(Schema.Boolean),
        sameSite: Schema.optional(Schema.Literals(["Strict", "Lax", "None"])),
        secure: Schema.optional(Schema.Boolean),
        sourcePort: Schema.optional(Schema.Number),
        sourceScheme: Schema.optional(Schema.Literals(["Unset", "NonSecure", "Secure"])),
        url: Schema.optional(Schema.String),
    }))),
    emulateMediaType: Schema.optional(Schema.String),
    gotoOptions: Schema.optional(Schema.Struct({
        referer: Schema.optional(Schema.String),
        referrerPolicy: Schema.optional(Schema.String),
        timeout: Schema.optional(Schema.Number),
        waitUntil: Schema.optional(Schema.Union([
            Schema.Literal("load"),
            Schema.Literal("domcontentloaded"),
            Schema.Literal("networkidle0"),
            Schema.Literal("networkidle2"),
            Schema.Array(Schema.Literals([
                "load",
                "domcontentloaded",
                "networkidle0",
                "networkidle2",
            ])),
        ])),
    })),
    rejectRequestPattern: Schema.optional(Schema.Array(Schema.String)),
    rejectResourceTypes: Schema.optional(Schema.Array(Schema.Literals([
        "document",
        "stylesheet",
        "image",
        "media",
        "font",
        "script",
        "texttrack",
        "xhr",
        "fetch",
        "prefetch",
        "eventsource",
        "websocket",
        "manifest",
        "signedexchange",
        "ping",
        "cspviolationreport",
        "preflight",
        "other",
    ]))),
    screenshotOptions: Schema.optional(Schema.Struct({
        captureBeyondViewport: Schema.optional(Schema.Boolean),
        clip: Schema.optional(Schema.Struct({
            height: Schema.Number,
            width: Schema.Number,
            x: Schema.Number,
            y: Schema.Number,
            scale: Schema.optional(Schema.Number),
        })),
        fromSurface: Schema.optional(Schema.Boolean),
        fullPage: Schema.optional(Schema.Boolean),
        omitBackground: Schema.optional(Schema.Boolean),
        optimizeForSpeed: Schema.optional(Schema.Boolean),
        quality: Schema.optional(Schema.Number),
        type: Schema.optional(Schema.Literals(["png", "jpeg", "webp"])),
    })),
    setExtraHTTPHeaders: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
    setJavaScriptEnabled: Schema.optional(Schema.Boolean),
    userAgent: Schema.optional(Schema.String),
    viewport: Schema.optional(Schema.Struct({
        height: Schema.Number,
        width: Schema.Number,
        deviceScaleFactor: Schema.optional(Schema.Number),
        hasTouch: Schema.optional(Schema.Boolean),
        isLandscape: Schema.optional(Schema.Boolean),
        isMobile: Schema.optional(Schema.Boolean),
    })),
    waitForSelector: Schema.optional(Schema.Struct({
        selector: Schema.String,
        hidden: Schema.optional(Schema.Literal(true)),
        timeout: Schema.optional(Schema.Number),
        visible: Schema.optional(Schema.Literal(true)),
    })),
    waitForTimeout: Schema.optional(Schema.Number),
}).pipe(T.Http({
    method: "POST",
    path: "/accounts/{account_id}/browser-rendering/snapshot",
}));
export const CreateSnapshotResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    content: Schema.String,
    screenshot: Schema.String,
}).pipe(T.ResponsePath("result"));
export const createSnapshot = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateSnapshotRequest,
    output: CreateSnapshotResponse,
    errors: [],
}));
//# sourceMappingURL=browser-rendering.js.map