browser_rendering

package
v7.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin

This is an alias to an internal value.

View Source
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare

This is an alias to an internal value.

View Source
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser

This is an alias to an internal value.

View Source
const CertificateCADigicert = shared.CertificateCADigicert

This is an alias to an internal value.

View Source
const CertificateCAGoogle = shared.CertificateCAGoogle

This is an alias to an internal value.

View Source
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt

This is an alias to an internal value.

View Source
const CertificateCASSLCom = shared.CertificateCASSLCom

This is an alias to an internal value.

View Source
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA

This is an alias to an internal value.

View Source
const CloudflareTunnelConfigSrcCloudflare = shared.CloudflareTunnelConfigSrcCloudflare

This is an alias to an internal value.

View Source
const CloudflareTunnelConfigSrcLocal = shared.CloudflareTunnelConfigSrcLocal

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeMagic = shared.CloudflareTunnelTunTypeMagic

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARP = shared.CloudflareTunnelTunTypeWARP

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector

This is an alias to an internal value.

View Source
const MemberPoliciesAccessAllow = shared.MemberPoliciesAccessAllow

This is an alias to an internal value.

View Source
const MemberPoliciesAccessDeny = shared.MemberPoliciesAccessDeny

This is an alias to an internal value.

View Source
const MemberStatusAccepted = shared.MemberStatusAccepted

This is an alias to an internal value.

View Source
const MemberStatusPending = shared.MemberStatusPending

This is an alias to an internal value.

View Source
const RatePlanIDBusiness = shared.RatePlanIDBusiness

This is an alias to an internal value.

View Source
const RatePlanIDEnterprise = shared.RatePlanIDEnterprise

This is an alias to an internal value.

View Source
const RatePlanIDFree = shared.RatePlanIDFree

This is an alias to an internal value.

View Source
const RatePlanIDLite = shared.RatePlanIDLite

This is an alias to an internal value.

View Source
const RatePlanIDPartnersBusiness = shared.RatePlanIDPartnersBusiness

This is an alias to an internal value.

View Source
const RatePlanIDPartnersEnterprise = shared.RatePlanIDPartnersEnterprise

This is an alias to an internal value.

View Source
const RatePlanIDPartnersFree = shared.RatePlanIDPartnersFree

This is an alias to an internal value.

View Source
const RatePlanIDPartnersPro = shared.RatePlanIDPartnersPro

This is an alias to an internal value.

View Source
const RatePlanIDPro = shared.RatePlanIDPro

This is an alias to an internal value.

View Source
const RatePlanIDProPlus = shared.RatePlanIDProPlus

This is an alias to an internal value.

View Source
const SortDirectionAsc = shared.SortDirectionAsc

This is an alias to an internal value.

View Source
const SortDirectionDesc = shared.SortDirectionDesc

This is an alias to an internal value.

View Source
const SubscriptionFrequencyMonthly = shared.SubscriptionFrequencyMonthly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyQuarterly = shared.SubscriptionFrequencyQuarterly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyWeekly = shared.SubscriptionFrequencyWeekly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyYearly = shared.SubscriptionFrequencyYearly

This is an alias to an internal value.

View Source
const SubscriptionStateAwaitingPayment = shared.SubscriptionStateAwaitingPayment

This is an alias to an internal value.

View Source
const SubscriptionStateCancelled = shared.SubscriptionStateCancelled

This is an alias to an internal value.

View Source
const SubscriptionStateExpired = shared.SubscriptionStateExpired

This is an alias to an internal value.

View Source
const SubscriptionStateFailed = shared.SubscriptionStateFailed

This is an alias to an internal value.

View Source
const SubscriptionStatePaid = shared.SubscriptionStatePaid

This is an alias to an internal value.

View Source
const SubscriptionStateProvisioned = shared.SubscriptionStateProvisioned

This is an alias to an internal value.

View Source
const SubscriptionStateTrial = shared.SubscriptionStateTrial

This is an alias to an internal value.

View Source
const TokenPolicyEffectAllow = shared.TokenPolicyEffectAllow

This is an alias to an internal value.

View Source
const TokenPolicyEffectDeny = shared.TokenPolicyEffectDeny

This is an alias to an internal value.

View Source
const TokenStatusActive = shared.TokenStatusActive

This is an alias to an internal value.

View Source
const TokenStatusDisabled = shared.TokenStatusDisabled

This is an alias to an internal value.

View Source
const TokenStatusExpired = shared.TokenStatusExpired

This is an alias to an internal value.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASN

type ASN = shared.ASN

This is an alias to an internal type.

type ASNParam

type ASNParam = shared.ASNParam

This is an alias to an internal type.

type AuditLog

type AuditLog = shared.AuditLog

This is an alias to an internal type.

type AuditLogAction

type AuditLogAction = shared.AuditLogAction

This is an alias to an internal type.

type AuditLogActor

type AuditLogActor = shared.AuditLogActor

This is an alias to an internal type.

type AuditLogActorType

type AuditLogActorType = shared.AuditLogActorType

The type of actor, whether a User, Cloudflare Admin, or an Automated System.

This is an alias to an internal type.

type AuditLogOwner

type AuditLogOwner = shared.AuditLogOwner

This is an alias to an internal type.

type AuditLogResource

type AuditLogResource = shared.AuditLogResource

This is an alias to an internal type.

type BrowserRenderingService

type BrowserRenderingService struct {
	Options    []option.RequestOption
	Content    *ContentService
	PDF        *PDFService
	Scrape     *ScrapeService
	Screenshot *ScreenshotService
	Snapshot   *SnapshotService
	Json       *JsonService
	Links      *LinkService
	Markdown   *MarkdownService
	Crawl      *CrawlService
	Devtools   *DevtoolService
}

BrowserRenderingService contains methods and other services that help with interacting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBrowserRenderingService method instead.

func NewBrowserRenderingService

func NewBrowserRenderingService(opts ...option.RequestOption) (r *BrowserRenderingService)

NewBrowserRenderingService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type CertificateCA

type CertificateCA = shared.CertificateCA

The Certificate Authority that will issue the certificate

This is an alias to an internal type.

type CertificateRequestType

type CertificateRequestType = shared.CertificateRequestType

Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).

This is an alias to an internal type.

type CloudflareTunnel

type CloudflareTunnel = shared.CloudflareTunnel

A Cloudflare Tunnel that connects your origin to Cloudflare's edge.

This is an alias to an internal type.

type CloudflareTunnelConfigSrc

type CloudflareTunnelConfigSrc = shared.CloudflareTunnelConfigSrc

Indicates if this is a locally or remotely configured tunnel. If `local`, manage the tunnel using a YAML file on the origin machine. If `cloudflare`, manage the tunnel on the Zero Trust dashboard.

This is an alias to an internal type.

type CloudflareTunnelConnection

type CloudflareTunnelConnection = shared.CloudflareTunnelConnection

This is an alias to an internal type.

type CloudflareTunnelStatus

type CloudflareTunnelStatus = shared.CloudflareTunnelStatus

The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).

This is an alias to an internal type.

type CloudflareTunnelTunType

type CloudflareTunnelTunType = shared.CloudflareTunnelTunType

The type of tunnel.

This is an alias to an internal type.

type ContentNewParams

type ContentNewParams struct {
	// Account ID.
	AccountID param.Field[string]       `path:"account_id" api:"required"`
	Body      ContentNewParamsBodyUnion `json:"body" api:"required"`
	// Cache TTL default is 5s. Set to 0 to disable.
	CacheTTL param.Field[float64] `query:"cacheTTL"`
}

func (ContentNewParams) MarshalJSON

func (r ContentNewParams) MarshalJSON() (data []byte, err error)

func (ContentNewParams) URLQuery

func (r ContentNewParams) URLQuery() (v url.Values)

URLQuery serializes ContentNewParams's query parameters as `url.Values`.

type ContentNewParamsBody

type ContentNewParamsBody struct {
	// 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       param.Field[float64]     `json:"actionTimeout"`
	AddScriptTag        param.Field[interface{}] `json:"addScriptTag"`
	AddStyleTag         param.Field[interface{}] `json:"addStyleTag"`
	AllowRequestPattern param.Field[interface{}] `json:"allowRequestPattern"`
	AllowResourceTypes  param.Field[interface{}] `json:"allowResourceTypes"`
	Authenticate        param.Field[interface{}] `json:"authenticate"`
	// Attempt to proceed when 'awaited' events fail or timeout.
	BestAttempt      param.Field[bool]        `json:"bestAttempt"`
	Cookies          param.Field[interface{}] `json:"cookies"`
	EmulateMediaType param.Field[string]      `json:"emulateMediaType"`
	GotoOptions      param.Field[interface{}] `json:"gotoOptions"`
	// Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or
	// `url` must be set.
	HTML                 param.Field[string]      `json:"html"`
	RejectRequestPattern param.Field[interface{}] `json:"rejectRequestPattern"`
	RejectResourceTypes  param.Field[interface{}] `json:"rejectResourceTypes"`
	SetExtraHTTPHeaders  param.Field[interface{}] `json:"setExtraHTTPHeaders"`
	SetJavaScriptEnabled param.Field[bool]        `json:"setJavaScriptEnabled"`
	// URL to navigate to, eg. `https://example.com`.
	URL             param.Field[string]      `json:"url" format:"uri"`
	UserAgent       param.Field[string]      `json:"userAgent"`
	Viewport        param.Field[interface{}] `json:"viewport"`
	WaitForSelector param.Field[interface{}] `json:"waitForSelector"`
	// Waits for a specified timeout before continuing.
	WaitForTimeout param.Field[float64] `json:"waitForTimeout"`
}

func (ContentNewParamsBody) MarshalJSON

func (r ContentNewParamsBody) MarshalJSON() (data []byte, err error)

type ContentNewParamsBodyObject

type ContentNewParamsBodyObject struct {
	// URL to navigate to, eg. `https://example.com`.
	URL param.Field[string] `json:"url" api:"required" format:"uri"`
	// 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 param.Field[float64] `json:"actionTimeout"`
	// Adds a `<script>` tag into the page with the desired URL or content.
	AddScriptTag param.Field[[]ContentNewParamsBodyObjectAddScriptTag] `json:"addScriptTag"`
	// Adds a `<link rel="stylesheet">` tag into the page with the desired URL or a
	// `<style type="text/css">` tag with the content.
	AddStyleTag param.Field[[]ContentNewParamsBodyObjectAddStyleTag] `json:"addStyleTag"`
	// Only allow requests that match the provided regex patterns, eg. '/^.\*\.(css)'.
	AllowRequestPattern param.Field[[]string] `json:"allowRequestPattern"`
	// Only allow requests that match the provided resource types, eg. 'image' or
	// 'script'.
	AllowResourceTypes param.Field[[]ContentNewParamsBodyObjectAllowResourceType] `json:"allowResourceTypes"`
	// Provide credentials for HTTP authentication.
	Authenticate param.Field[ContentNewParamsBodyObjectAuthenticate] `json:"authenticate"`
	// Attempt to proceed when 'awaited' events fail or timeout.
	BestAttempt param.Field[bool] `json:"bestAttempt"`
	// Check [options](https://pptr.dev/api/puppeteer.page.setcookie).
	Cookies          param.Field[[]ContentNewParamsBodyObjectCookie] `json:"cookies"`
	EmulateMediaType param.Field[string]                             `json:"emulateMediaType"`
	// Check [options](https://pptr.dev/api/puppeteer.gotooptions).
	GotoOptions param.Field[ContentNewParamsBodyObjectGotoOptions] `json:"gotoOptions"`
	// Block undesired requests that match the provided regex patterns, eg.
	// '/^.\*\.(css)'.
	RejectRequestPattern param.Field[[]string] `json:"rejectRequestPattern"`
	// Block undesired requests that match the provided resource types, eg. 'image' or
	// 'script'.
	RejectResourceTypes  param.Field[[]ContentNewParamsBodyObjectRejectResourceType] `json:"rejectResourceTypes"`
	SetExtraHTTPHeaders  param.Field[map[string]string]                              `json:"setExtraHTTPHeaders"`
	SetJavaScriptEnabled param.Field[bool]                                           `json:"setJavaScriptEnabled"`
	UserAgent            param.Field[string]                                         `json:"userAgent"`
	// Check [options](https://pptr.dev/api/puppeteer.page.setviewport).
	Viewport param.Field[ContentNewParamsBodyObjectViewport] `json:"viewport"`
	// Wait for the selector to appear in page. Check
	// [options](https://pptr.dev/api/puppeteer.page.waitforselector).
	WaitForSelector param.Field[ContentNewParamsBodyObjectWaitForSelector] `json:"waitForSelector"`
	// Waits for a specified timeout before continuing.
	WaitForTimeout param.Field[float64] `json:"waitForTimeout"`
}

func (ContentNewParamsBodyObject) MarshalJSON

func (r ContentNewParamsBodyObject) MarshalJSON() (data []byte, err error)

type ContentNewParamsBodyObjectAddScriptTag

type ContentNewParamsBodyObjectAddScriptTag struct {
	ID      param.Field[string] `json:"id"`
	Content param.Field[string] `json:"content"`
	Type    param.Field[string] `json:"type"`
	URL     param.Field[string] `json:"url"`
}

func (ContentNewParamsBodyObjectAddScriptTag) MarshalJSON

func (r ContentNewParamsBodyObjectAddScriptTag) MarshalJSON() (data []byte, err error)

type ContentNewParamsBodyObjectAddStyleTag

type ContentNewParamsBodyObjectAddStyleTag struct {
	Content param.Field[string] `json:"content"`
	URL     param.Field[string] `json:"url"`
}

func (ContentNewParamsBodyObjectAddStyleTag) MarshalJSON

func (r ContentNewParamsBodyObjectAddStyleTag) MarshalJSON() (data []byte, err error)

type ContentNewParamsBodyObjectAllowResourceType

type ContentNewParamsBodyObjectAllowResourceType string
const (
	ContentNewParamsBodyObjectAllowResourceTypeDocument           ContentNewParamsBodyObjectAllowResourceType = "document"
	ContentNewParamsBodyObjectAllowResourceTypeStylesheet         ContentNewParamsBodyObjectAllowResourceType = "stylesheet"
	ContentNewParamsBodyObjectAllowResourceTypeImage              ContentNewParamsBodyObjectAllowResourceType = "image"
	ContentNewParamsBodyObjectAllowResourceTypeMedia              ContentNewParamsBodyObjectAllowResourceType = "media"
	ContentNewParamsBodyObjectAllowResourceTypeFont               ContentNewParamsBodyObjectAllowResourceType = "font"
	ContentNewParamsBodyObjectAllowResourceTypeScript             ContentNewParamsBodyObjectAllowResourceType = "script"
	ContentNewParamsBodyObjectAllowResourceTypeTexttrack          ContentNewParamsBodyObjectAllowResourceType = "texttrack"
	ContentNewParamsBodyObjectAllowResourceTypeXHR                ContentNewParamsBodyObjectAllowResourceType = "xhr"
	ContentNewParamsBodyObjectAllowResourceTypeFetch              ContentNewParamsBodyObjectAllowResourceType = "fetch"
	ContentNewParamsBodyObjectAllowResourceTypePrefetch           ContentNewParamsBodyObjectAllowResourceType = "prefetch"
	ContentNewParamsBodyObjectAllowResourceTypeEventsource        ContentNewParamsBodyObjectAllowResourceType = "eventsource"
	ContentNewParamsBodyObjectAllowResourceTypeWebsocket          ContentNewParamsBodyObjectAllowResourceType = "websocket"
	ContentNewParamsBodyObjectAllowResourceTypeManifest           ContentNewParamsBodyObjectAllowResourceType = "manifest"
	ContentNewParamsBodyObjectAllowResourceTypeSignedexchange     ContentNewParamsBodyObjectAllowResourceType = "signedexchange"
	ContentNewParamsBodyObjectAllowResourceTypePing               ContentNewParamsBodyObjectAllowResourceType = "ping"
	ContentNewParamsBodyObjectAllowResourceTypeCspviolationreport ContentNewParamsBodyObjectAllowResourceType = "cspviolationreport"
	ContentNewParamsBodyObjectAllowResourceTypePreflight          ContentNewParamsBodyObjectAllowResourceType = "preflight"
	ContentNewParamsBodyObjectAllowResourceTypeOther              ContentNewParamsBodyObjectAllowResourceType = "other"
)

func (ContentNewParamsBodyObjectAllowResourceType) IsKnown

type ContentNewParamsBodyObjectAuthenticate

type ContentNewParamsBodyObjectAuthenticate struct {
	Password param.Field[string] `json:"password" api:"required"`
	Username param.Field[string] `json:"username" api:"required"`
}

Provide credentials for HTTP authentication.

func (ContentNewParamsBodyObjectAuthenticate) MarshalJSON

func (r ContentNewParamsBodyObjectAuthenticate) MarshalJSON() (data []byte, err error)

type ContentNewParamsBodyObjectCookie

type ContentNewParamsBodyObjectCookie struct {
	// Cookie name.
	Name         param.Field[string]                                        `json:"name" api:"required"`
	Value        param.Field[string]                                        `json:"value" api:"required"`
	Domain       param.Field[string]                                        `json:"domain"`
	Expires      param.Field[float64]                                       `json:"expires"`
	HTTPOnly     param.Field[bool]                                          `json:"httpOnly"`
	PartitionKey param.Field[string]                                        `json:"partitionKey"`
	Path         param.Field[string]                                        `json:"path"`
	Priority     param.Field[ContentNewParamsBodyObjectCookiesPriority]     `json:"priority"`
	SameParty    param.Field[bool]                                          `json:"sameParty"`
	SameSite     param.Field[ContentNewParamsBodyObjectCookiesSameSite]     `json:"sameSite"`
	Secure       param.Field[bool]                                          `json:"secure"`
	SourcePort   param.Field[float64]                                       `json:"sourcePort"`
	SourceScheme param.Field[ContentNewParamsBodyObjectCookiesSourceScheme] `json:"sourceScheme"`
	URL          param.Field[string]                                        `json:"url"`
}

func (ContentNewParamsBodyObjectCookie) MarshalJSON

func (r ContentNewParamsBodyObjectCookie) MarshalJSON() (data []byte, err error)

type ContentNewParamsBodyObjectCookiesPriority

type ContentNewParamsBodyObjectCookiesPriority string
const (
	ContentNewParamsBodyObjectCookiesPriorityLow    ContentNewParamsBodyObjectCookiesPriority = "Low"
	ContentNewParamsBodyObjectCookiesPriorityMedium ContentNewParamsBodyObjectCookiesPriority = "Medium"
	ContentNewParamsBodyObjectCookiesPriorityHigh   ContentNewParamsBodyObjectCookiesPriority = "High"
)

func (ContentNewParamsBodyObjectCookiesPriority) IsKnown

type ContentNewParamsBodyObjectCookiesSameSite

type ContentNewParamsBodyObjectCookiesSameSite string
const (
	ContentNewParamsBodyObjectCookiesSameSiteStrict ContentNewParamsBodyObjectCookiesSameSite = "Strict"
	ContentNewParamsBodyObjectCookiesSameSiteLax    ContentNewParamsBodyObjectCookiesSameSite = "Lax"
	ContentNewParamsBodyObjectCookiesSameSiteNone   ContentNewParamsBodyObjectCookiesSameSite = "None"
)

func (ContentNewParamsBodyObjectCookiesSameSite) IsKnown

type ContentNewParamsBodyObjectCookiesSourceScheme

type ContentNewParamsBodyObjectCookiesSourceScheme string
const (
	ContentNewParamsBodyObjectCookiesSourceSchemeUnset     ContentNewParamsBodyObjectCookiesSourceScheme = "Unset"
	ContentNewParamsBodyObjectCookiesSourceSchemeNonSecure ContentNewParamsBodyObjectCookiesSourceScheme = "NonSecure"
	ContentNewParamsBodyObjectCookiesSourceSchemeSecure    ContentNewParamsBodyObjectCookiesSourceScheme = "Secure"
)

func (ContentNewParamsBodyObjectCookiesSourceScheme) IsKnown

type ContentNewParamsBodyObjectGotoOptions

type ContentNewParamsBodyObjectGotoOptions struct {
	Referer        param.Field[string]                                              `json:"referer"`
	ReferrerPolicy param.Field[string]                                              `json:"referrerPolicy"`
	Timeout        param.Field[float64]                                             `json:"timeout"`
	WaitUntil      param.Field[ContentNewParamsBodyObjectGotoOptionsWaitUntilUnion] `json:"waitUntil"`
}

Check [options](https://pptr.dev/api/puppeteer.gotooptions).

func (ContentNewParamsBodyObjectGotoOptions) MarshalJSON

func (r ContentNewParamsBodyObjectGotoOptions) MarshalJSON() (data []byte, err error)

type ContentNewParamsBodyObjectGotoOptionsWaitUntilArrayItem

type ContentNewParamsBodyObjectGotoOptionsWaitUntilArrayItem string
const (
	ContentNewParamsBodyObjectGotoOptionsWaitUntilArrayItemLoad             ContentNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "load"
	ContentNewParamsBodyObjectGotoOptionsWaitUntilArrayItemDomcontentloaded ContentNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "domcontentloaded"
	ContentNewParamsBodyObjectGotoOptionsWaitUntilArrayItemNetworkidle0     ContentNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "networkidle0"
	ContentNewParamsBodyObjectGotoOptionsWaitUntilArrayItemNetworkidle2     ContentNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "networkidle2"
)

func (ContentNewParamsBodyObjectGotoOptionsWaitUntilArrayItem) IsKnown

type ContentNewParamsBodyObjectGotoOptionsWaitUntilString

type ContentNewParamsBodyObjectGotoOptionsWaitUntilString string
const (
	ContentNewParamsBodyObjectGotoOptionsWaitUntilStringLoad             ContentNewParamsBodyObjectGotoOptionsWaitUntilString = "load"
	ContentNewParamsBodyObjectGotoOptionsWaitUntilStringDomcontentloaded ContentNewParamsBodyObjectGotoOptionsWaitUntilString = "domcontentloaded"
	ContentNewParamsBodyObjectGotoOptionsWaitUntilStringNetworkidle0     ContentNewParamsBodyObjectGotoOptionsWaitUntilString = "networkidle0"
	ContentNewParamsBodyObjectGotoOptionsWaitUntilStringNetworkidle2     ContentNewParamsBodyObjectGotoOptionsWaitUntilString = "networkidle2"
)

func (ContentNewParamsBodyObjectGotoOptionsWaitUntilString) IsKnown

type ContentNewParamsBodyObjectGotoOptionsWaitUntilUnion

type ContentNewParamsBodyObjectGotoOptionsWaitUntilUnion interface {
	// contains filtered or unexported methods
}

Satisfied by browser_rendering.ContentNewParamsBodyObjectGotoOptionsWaitUntilString, browser_rendering.ContentNewParamsBodyObjectGotoOptionsWaitUntilArray.

type ContentNewParamsBodyObjectRejectResourceType

type ContentNewParamsBodyObjectRejectResourceType string
const (
	ContentNewParamsBodyObjectRejectResourceTypeDocument           ContentNewParamsBodyObjectRejectResourceType = "document"
	ContentNewParamsBodyObjectRejectResourceTypeStylesheet         ContentNewParamsBodyObjectRejectResourceType = "stylesheet"
	ContentNewParamsBodyObjectRejectResourceTypeImage              ContentNewParamsBodyObjectRejectResourceType = "image"
	ContentNewParamsBodyObjectRejectResourceTypeMedia              ContentNewParamsBodyObjectRejectResourceType = "media"
	ContentNewParamsBodyObjectRejectResourceTypeFont               ContentNewParamsBodyObjectRejectResourceType = "font"
	ContentNewParamsBodyObjectRejectResourceTypeScript             ContentNewParamsBodyObjectRejectResourceType = "script"
	ContentNewParamsBodyObjectRejectResourceTypeTexttrack          ContentNewParamsBodyObjectRejectResourceType = "texttrack"
	ContentNewParamsBodyObjectRejectResourceTypeXHR                ContentNewParamsBodyObjectRejectResourceType = "xhr"
	ContentNewParamsBodyObjectRejectResourceTypeFetch              ContentNewParamsBodyObjectRejectResourceType = "fetch"
	ContentNewParamsBodyObjectRejectResourceTypePrefetch           ContentNewParamsBodyObjectRejectResourceType = "prefetch"
	ContentNewParamsBodyObjectRejectResourceTypeEventsource        ContentNewParamsBodyObjectRejectResourceType = "eventsource"
	ContentNewParamsBodyObjectRejectResourceTypeWebsocket          ContentNewParamsBodyObjectRejectResourceType = "websocket"
	ContentNewParamsBodyObjectRejectResourceTypeManifest           ContentNewParamsBodyObjectRejectResourceType = "manifest"
	ContentNewParamsBodyObjectRejectResourceTypeSignedexchange     ContentNewParamsBodyObjectRejectResourceType = "signedexchange"
	ContentNewParamsBodyObjectRejectResourceTypePing               ContentNewParamsBodyObjectRejectResourceType = "ping"
	ContentNewParamsBodyObjectRejectResourceTypeCspviolationreport ContentNewParamsBodyObjectRejectResourceType = "cspviolationreport"
	ContentNewParamsBodyObjectRejectResourceTypePreflight          ContentNewParamsBodyObjectRejectResourceType = "preflight"
	ContentNewParamsBodyObjectRejectResourceTypeOther              ContentNewParamsBodyObjectRejectResourceType = "other"
)

func (ContentNewParamsBodyObjectRejectResourceType) IsKnown

type ContentNewParamsBodyObjectViewport

type ContentNewParamsBodyObjectViewport struct {
	Height            param.Field[float64] `json:"height" api:"required"`
	Width             param.Field[float64] `json:"width" api:"required"`
	DeviceScaleFactor param.Field[float64] `json:"deviceScaleFactor"`
	HasTouch          param.Field[bool]    `json:"hasTouch"`
	IsLandscape       param.Field[bool]    `json:"isLandscape"`
	IsMobile          param.Field[bool]    `json:"isMobile"`
}

Check [options](https://pptr.dev/api/puppeteer.page.setviewport).

func (ContentNewParamsBodyObjectViewport) MarshalJSON

func (r ContentNewParamsBodyObjectViewport) MarshalJSON() (data []byte, err error)

type ContentNewParamsBodyObjectWaitForSelector

type ContentNewParamsBodyObjectWaitForSelector struct {
	Selector param.Field[string]                                           `json:"selector" api:"required"`
	Hidden   param.Field[ContentNewParamsBodyObjectWaitForSelectorHidden]  `json:"hidden"`
	Timeout  param.Field[float64]                                          `json:"timeout"`
	Visible  param.Field[ContentNewParamsBodyObjectWaitForSelectorVisible] `json:"visible"`
}

Wait for the selector to appear in page. Check [options](https://pptr.dev/api/puppeteer.page.waitforselector).

func (ContentNewParamsBodyObjectWaitForSelector) MarshalJSON

func (r ContentNewParamsBodyObjectWaitForSelector) MarshalJSON() (data []byte, err error)

type ContentNewParamsBodyObjectWaitForSelectorHidden

type ContentNewParamsBodyObjectWaitForSelectorHidden bool
const (
	ContentNewParamsBodyObjectWaitForSelectorHiddenTrue ContentNewParamsBodyObjectWaitForSelectorHidden = true
)

func (ContentNewParamsBodyObjectWaitForSelectorHidden) IsKnown

type ContentNewParamsBodyObjectWaitForSelectorVisible

type ContentNewParamsBodyObjectWaitForSelectorVisible bool
const (
	ContentNewParamsBodyObjectWaitForSelectorVisibleTrue ContentNewParamsBodyObjectWaitForSelectorVisible = true
)

func (ContentNewParamsBodyObjectWaitForSelectorVisible) IsKnown

type ContentNewParamsBodyUnion

type ContentNewParamsBodyUnion interface {
	// contains filtered or unexported methods
}

Satisfied by browser_rendering.ContentNewParamsBodyObject, browser_rendering.ContentNewParamsBodyObject, ContentNewParamsBody.

type ContentNewResponseEnvelope

type ContentNewResponseEnvelope struct {
	Meta ContentNewResponseEnvelopeMeta `json:"meta" api:"required"`
	// Response status.
	Success bool                               `json:"success" api:"required"`
	Errors  []ContentNewResponseEnvelopeErrors `json:"errors"`
	// HTML content.
	Result string                         `json:"result"`
	JSON   contentNewResponseEnvelopeJSON `json:"-"`
}

func (*ContentNewResponseEnvelope) UnmarshalJSON

func (r *ContentNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type ContentNewResponseEnvelopeErrors

type ContentNewResponseEnvelopeErrors struct {
	// Error code.
	Code float64 `json:"code" api:"required"`
	// Error message.
	Message string                               `json:"message" api:"required"`
	JSON    contentNewResponseEnvelopeErrorsJSON `json:"-"`
}

func (*ContentNewResponseEnvelopeErrors) UnmarshalJSON

func (r *ContentNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type ContentNewResponseEnvelopeMeta

type ContentNewResponseEnvelopeMeta struct {
	Status float64                            `json:"status"`
	Title  string                             `json:"title"`
	JSON   contentNewResponseEnvelopeMetaJSON `json:"-"`
}

func (*ContentNewResponseEnvelopeMeta) UnmarshalJSON

func (r *ContentNewResponseEnvelopeMeta) UnmarshalJSON(data []byte) (err error)

type ContentService

type ContentService struct {
	Options []option.RequestOption
}

ContentService contains methods and other services that help with interacting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewContentService method instead.

func NewContentService

func NewContentService(opts ...option.RequestOption) (r *ContentService)

NewContentService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ContentService) New

func (r *ContentService) New(ctx context.Context, params ContentNewParams, opts ...option.RequestOption) (res *string, err error)

Fetches rendered HTML content from provided URL or HTML. Check available options like `gotoOptions` and `waitFor*` to control page load behaviour.

type CrawlDeleteParams

type CrawlDeleteParams struct {
	// Account ID.
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type CrawlDeleteResponse

type CrawlDeleteResponse struct {
	// The ID of the cancelled job.
	JobID string `json:"job_id" api:"required"`
	// Cancellation confirmation message.
	Message string                  `json:"message" api:"required"`
	JSON    crawlDeleteResponseJSON `json:"-"`
}

func (*CrawlDeleteResponse) UnmarshalJSON

func (r *CrawlDeleteResponse) UnmarshalJSON(data []byte) (err error)

type CrawlDeleteResponseEnvelope

type CrawlDeleteResponseEnvelope struct {
	Result CrawlDeleteResponse `json:"result" api:"required"`
	// Response status.
	Success bool                                `json:"success" api:"required"`
	Errors  []CrawlDeleteResponseEnvelopeErrors `json:"errors"`
	JSON    crawlDeleteResponseEnvelopeJSON     `json:"-"`
}

func (*CrawlDeleteResponseEnvelope) UnmarshalJSON

func (r *CrawlDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type CrawlDeleteResponseEnvelopeErrors

type CrawlDeleteResponseEnvelopeErrors struct {
	// Error code.
	Code float64 `json:"code" api:"required"`
	// Error message.
	Message string                                `json:"message" api:"required"`
	JSON    crawlDeleteResponseEnvelopeErrorsJSON `json:"-"`
}

func (*CrawlDeleteResponseEnvelopeErrors) UnmarshalJSON

func (r *CrawlDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type CrawlGetParams

type CrawlGetParams struct {
	// Account ID.
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// Cache TTL default is 5s. Set to 0 to disable.
	CacheTTL param.Field[float64] `query:"cacheTTL"`
	// Cursor for pagination.
	Cursor param.Field[float64] `query:"cursor"`
	// Limit for pagination.
	Limit param.Field[float64] `query:"limit"`
	// Filter by URL status.
	Status param.Field[CrawlGetParamsStatus] `query:"status"`
}

func (CrawlGetParams) URLQuery

func (r CrawlGetParams) URLQuery() (v url.Values)

URLQuery serializes CrawlGetParams's query parameters as `url.Values`.

type CrawlGetParamsStatus

type CrawlGetParamsStatus string

Filter by URL status.

const (
	CrawlGetParamsStatusQueued     CrawlGetParamsStatus = "queued"
	CrawlGetParamsStatusErrored    CrawlGetParamsStatus = "errored"
	CrawlGetParamsStatusCompleted  CrawlGetParamsStatus = "completed"
	CrawlGetParamsStatusDisallowed CrawlGetParamsStatus = "disallowed"
	CrawlGetParamsStatusSkipped    CrawlGetParamsStatus = "skipped"
	CrawlGetParamsStatusCancelled  CrawlGetParamsStatus = "cancelled"
)

func (CrawlGetParamsStatus) IsKnown

func (r CrawlGetParamsStatus) IsKnown() bool

type CrawlGetResponse

type CrawlGetResponse struct {
	// Crawl job ID.
	ID string `json:"id" api:"required"`
	// Total seconds spent in browser so far.
	BrowserSecondsUsed float64 `json:"browserSecondsUsed" api:"required"`
	// Total number of URLs that have been crawled so far.
	Finished float64 `json:"finished" api:"required"`
	// List of crawl job records.
	Records []CrawlGetResponseRecord `json:"records" api:"required"`
	// Total number of URLs that were skipped due to include/exclude/subdomain filters.
	// Skipped URLs are included in records but are not counted toward total/finished.
	Skipped float64 `json:"skipped" api:"required"`
	// Current crawl job status.
	Status string `json:"status" api:"required"`
	// Total current number of URLs in the crawl job.
	Total float64 `json:"total" api:"required"`
	// Cursor for pagination.
	Cursor string               `json:"cursor"`
	JSON   crawlGetResponseJSON `json:"-"`
}

func (*CrawlGetResponse) UnmarshalJSON

func (r *CrawlGetResponse) UnmarshalJSON(data []byte) (err error)

type CrawlGetResponseEnvelope

type CrawlGetResponseEnvelope struct {
	Result CrawlGetResponse `json:"result" api:"required"`
	// Response status.
	Success bool                             `json:"success" api:"required"`
	Errors  []CrawlGetResponseEnvelopeErrors `json:"errors"`
	JSON    crawlGetResponseEnvelopeJSON     `json:"-"`
}

func (*CrawlGetResponseEnvelope) UnmarshalJSON

func (r *CrawlGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type CrawlGetResponseEnvelopeErrors

type CrawlGetResponseEnvelopeErrors struct {
	// Error code.
	Code float64 `json:"code" api:"required"`
	// Error message.
	Message string                             `json:"message" api:"required"`
	JSON    crawlGetResponseEnvelopeErrorsJSON `json:"-"`
}

func (*CrawlGetResponseEnvelopeErrors) UnmarshalJSON

func (r *CrawlGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type CrawlGetResponseRecord

type CrawlGetResponseRecord struct {
	Metadata CrawlGetResponseRecordsMetadata `json:"metadata" api:"required"`
	// Current status of the crawled URL.
	Status CrawlGetResponseRecordsStatus `json:"status" api:"required"`
	// Crawled URL.
	URL string `json:"url" api:"required"`
	// HTML content of the crawled URL.
	HTML string `json:"html"`
	// JSON of the content of the crawled URL.
	Json map[string]interface{} `json:"json"`
	// Markdown of the content of the crawled URL.
	Markdown string                     `json:"markdown"`
	JSON     crawlGetResponseRecordJSON `json:"-"`
}

func (*CrawlGetResponseRecord) UnmarshalJSON

func (r *CrawlGetResponseRecord) UnmarshalJSON(data []byte) (err error)

type CrawlGetResponseRecordsMetadata

type CrawlGetResponseRecordsMetadata struct {
	// HTTP status code of the crawled page.
	Status float64 `json:"status" api:"required"`
	// Final URL of the crawled page.
	URL string `json:"url" api:"required"`
	// Title of the crawled page.
	Title string                              `json:"title"`
	JSON  crawlGetResponseRecordsMetadataJSON `json:"-"`
}

func (*CrawlGetResponseRecordsMetadata) UnmarshalJSON

func (r *CrawlGetResponseRecordsMetadata) UnmarshalJSON(data []byte) (err error)

type CrawlGetResponseRecordsStatus

type CrawlGetResponseRecordsStatus string

Current status of the crawled URL.

const (
	CrawlGetResponseRecordsStatusQueued     CrawlGetResponseRecordsStatus = "queued"
	CrawlGetResponseRecordsStatusErrored    CrawlGetResponseRecordsStatus = "errored"
	CrawlGetResponseRecordsStatusCompleted  CrawlGetResponseRecordsStatus = "completed"
	CrawlGetResponseRecordsStatusDisallowed CrawlGetResponseRecordsStatus = "disallowed"
	CrawlGetResponseRecordsStatusSkipped    CrawlGetResponseRecordsStatus = "skipped"
	CrawlGetResponseRecordsStatusCancelled  CrawlGetResponseRecordsStatus = "cancelled"
)

func (CrawlGetResponseRecordsStatus) IsKnown

func (r CrawlGetResponseRecordsStatus) IsKnown() bool

type CrawlNewParams

type CrawlNewParams struct {
	// Account ID.
	AccountID param.Field[string]     `path:"account_id" api:"required"`
	Body      CrawlNewParamsBodyUnion `json:"body" api:"required"`
	// Cache TTL default is 5s. Set to 0 to disable.
	CacheTTL param.Field[float64] `query:"cacheTTL"`
}

func (CrawlNewParams) MarshalJSON

func (r CrawlNewParams) MarshalJSON() (data []byte, err error)

func (CrawlNewParams) URLQuery

func (r CrawlNewParams) URLQuery() (v url.Values)

URLQuery serializes CrawlNewParams's query parameters as `url.Values`.

type CrawlNewParamsBody

type CrawlNewParamsBody struct {
	// URL to navigate to, eg. `https://example.com`.
	URL param.Field[string] `json:"url" api:"required" format:"uri"`
	// 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       param.Field[float64]     `json:"actionTimeout"`
	AddScriptTag        param.Field[interface{}] `json:"addScriptTag"`
	AddStyleTag         param.Field[interface{}] `json:"addStyleTag"`
	AllowRequestPattern param.Field[interface{}] `json:"allowRequestPattern"`
	AllowResourceTypes  param.Field[interface{}] `json:"allowResourceTypes"`
	Authenticate        param.Field[interface{}] `json:"authenticate"`
	// Attempt to proceed when 'awaited' events fail or timeout.
	BestAttempt   param.Field[bool]        `json:"bestAttempt"`
	Cookies       param.Field[interface{}] `json:"cookies"`
	CrawlPurposes param.Field[interface{}] `json:"crawlPurposes"`
	// Maximum number of levels deep the crawler will traverse from the starting URL.
	Depth            param.Field[float64]     `json:"depth"`
	EmulateMediaType param.Field[string]      `json:"emulateMediaType"`
	Formats          param.Field[interface{}] `json:"formats"`
	GotoOptions      param.Field[interface{}] `json:"gotoOptions"`
	JsonOptions      param.Field[interface{}] `json:"jsonOptions"`
	// Maximum number of URLs to crawl.
	Limit param.Field[float64] `json:"limit"`
	// Maximum age of a resource that can be returned from cache in seconds. Default is
	// 1 day.
	MaxAge param.Field[float64] `json:"maxAge"`
	// Unix timestamp (seconds since epoch) indicating to only crawl pages that were
	// modified since this time. For sitemap URLs with a lastmod field, this is
	// compared directly. For other URLs, the crawler will use If-Modified-Since header
	// when fetching. URLs without modification information (no lastmod in sitemap and
	// no Last-Modified header support) will be crawled. Note: This works in
	// conjunction with maxAge - both filters must pass for a cached resource to be
	// used. Must be within the last year and not in the future.
	ModifiedSince        param.Field[int64]       `json:"modifiedSince"`
	Options              param.Field[interface{}] `json:"options"`
	RejectRequestPattern param.Field[interface{}] `json:"rejectRequestPattern"`
	RejectResourceTypes  param.Field[interface{}] `json:"rejectResourceTypes"`
	// Whether to render the page or fetch static content. True by default.
	Render               param.Field[CrawlNewParamsBodyRender] `json:"render"`
	SetExtraHTTPHeaders  param.Field[interface{}]              `json:"setExtraHTTPHeaders"`
	SetJavaScriptEnabled param.Field[bool]                     `json:"setJavaScriptEnabled"`
	// Source of links to crawl. 'sitemaps' - only crawl URLs from sitemaps, 'links' -
	// only crawl URLs scraped from pages, 'all' - crawl both sitemap and scraped links
	// (default).
	Source          param.Field[CrawlNewParamsBodySource] `json:"source"`
	Viewport        param.Field[interface{}]              `json:"viewport"`
	WaitForSelector param.Field[interface{}]              `json:"waitForSelector"`
	// Waits for a specified timeout before continuing.
	WaitForTimeout param.Field[float64] `json:"waitForTimeout"`
}

func (CrawlNewParamsBody) MarshalJSON

func (r CrawlNewParamsBody) MarshalJSON() (data []byte, err error)

type CrawlNewParamsBodyObject

type CrawlNewParamsBodyObject struct {
	// URL to navigate to, eg. `https://example.com`.
	URL param.Field[string] `json:"url" api:"required" format:"uri"`
	// 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 param.Field[float64] `json:"actionTimeout"`
	// Adds a `<script>` tag into the page with the desired URL or content.
	AddScriptTag param.Field[[]CrawlNewParamsBodyObjectAddScriptTag] `json:"addScriptTag"`
	// Adds a `<link rel="stylesheet">` tag into the page with the desired URL or a
	// `<style type="text/css">` tag with the content.
	AddStyleTag param.Field[[]CrawlNewParamsBodyObjectAddStyleTag] `json:"addStyleTag"`
	// Only allow requests that match the provided regex patterns, eg. '/^.\*\.(css)'.
	AllowRequestPattern param.Field[[]string] `json:"allowRequestPattern"`
	// Only allow requests that match the provided resource types, eg. 'image' or
	// 'script'.
	AllowResourceTypes param.Field[[]CrawlNewParamsBodyObjectAllowResourceType] `json:"allowResourceTypes"`
	// Provide credentials for HTTP authentication.
	Authenticate param.Field[CrawlNewParamsBodyObjectAuthenticate] `json:"authenticate"`
	// Attempt to proceed when 'awaited' events fail or timeout.
	BestAttempt param.Field[bool] `json:"bestAttempt"`
	// Check [options](https://pptr.dev/api/puppeteer.page.setcookie).
	Cookies param.Field[[]CrawlNewParamsBodyObjectCookie] `json:"cookies"`
	// List of crawl purposes to respect Content-Signal directives in robots.txt.
	// Allowed values: 'search', 'ai-input', 'ai-train'. Learn more:
	// https://contentsignals.org/. Default: ['search', 'ai-input', 'ai-train'].
	CrawlPurposes param.Field[[]CrawlNewParamsBodyObjectCrawlPurpose] `json:"crawlPurposes"`
	// Maximum number of levels deep the crawler will traverse from the starting URL.
	Depth            param.Field[float64] `json:"depth"`
	EmulateMediaType param.Field[string]  `json:"emulateMediaType"`
	// Formats to return. Default is `html`.
	Formats param.Field[[]CrawlNewParamsBodyObjectFormat] `json:"formats"`
	// Check [options](https://pptr.dev/api/puppeteer.gotooptions).
	GotoOptions param.Field[CrawlNewParamsBodyObjectGotoOptions] `json:"gotoOptions"`
	// Options for JSON extraction.
	JsonOptions param.Field[CrawlNewParamsBodyObjectJsonOptions] `json:"jsonOptions"`
	// Maximum number of URLs to crawl.
	Limit param.Field[float64] `json:"limit"`
	// Maximum age of a resource that can be returned from cache in seconds. Default is
	// 1 day.
	MaxAge param.Field[float64] `json:"maxAge"`
	// Unix timestamp (seconds since epoch) indicating to only crawl pages that were
	// modified since this time. For sitemap URLs with a lastmod field, this is
	// compared directly. For other URLs, the crawler will use If-Modified-Since header
	// when fetching. URLs without modification information (no lastmod in sitemap and
	// no Last-Modified header support) will be crawled. Note: This works in
	// conjunction with maxAge - both filters must pass for a cached resource to be
	// used. Must be within the last year and not in the future.
	ModifiedSince param.Field[int64] `json:"modifiedSince"`
	// Additional options for the crawler.
	Options param.Field[CrawlNewParamsBodyObjectOptions] `json:"options"`
	// Block undesired requests that match the provided regex patterns, eg.
	// '/^.\*\.(css)'.
	RejectRequestPattern param.Field[[]string] `json:"rejectRequestPattern"`
	// Block undesired requests that match the provided resource types, eg. 'image' or
	// 'script'.
	RejectResourceTypes param.Field[[]CrawlNewParamsBodyObjectRejectResourceType] `json:"rejectResourceTypes"`
	// Whether to render the page or fetch static content. True by default.
	Render               param.Field[CrawlNewParamsBodyObjectRender] `json:"render"`
	SetExtraHTTPHeaders  param.Field[map[string]string]              `json:"setExtraHTTPHeaders"`
	SetJavaScriptEnabled param.Field[bool]                           `json:"setJavaScriptEnabled"`
	// Source of links to crawl. 'sitemaps' - only crawl URLs from sitemaps, 'links' -
	// only crawl URLs scraped from pages, 'all' - crawl both sitemap and scraped links
	// (default).
	Source param.Field[CrawlNewParamsBodyObjectSource] `json:"source"`
	// Check [options](https://pptr.dev/api/puppeteer.page.setviewport).
	Viewport param.Field[CrawlNewParamsBodyObjectViewport] `json:"viewport"`
	// Wait for the selector to appear in page. Check
	// [options](https://pptr.dev/api/puppeteer.page.waitforselector).
	WaitForSelector param.Field[CrawlNewParamsBodyObjectWaitForSelector] `json:"waitForSelector"`
	// Waits for a specified timeout before continuing.
	WaitForTimeout param.Field[float64] `json:"waitForTimeout"`
}

func (CrawlNewParamsBodyObject) MarshalJSON

func (r CrawlNewParamsBodyObject) MarshalJSON() (data []byte, err error)

type CrawlNewParamsBodyObjectAddScriptTag

type CrawlNewParamsBodyObjectAddScriptTag struct {
	ID      param.Field[string] `json:"id"`
	Content param.Field[string] `json:"content"`
	Type    param.Field[string] `json:"type"`
	URL     param.Field[string] `json:"url"`
}

func (CrawlNewParamsBodyObjectAddScriptTag) MarshalJSON

func (r CrawlNewParamsBodyObjectAddScriptTag) MarshalJSON() (data []byte, err error)

type CrawlNewParamsBodyObjectAddStyleTag

type CrawlNewParamsBodyObjectAddStyleTag struct {
	Content param.Field[string] `json:"content"`
	URL     param.Field[string] `json:"url"`
}

func (CrawlNewParamsBodyObjectAddStyleTag) MarshalJSON

func (r CrawlNewParamsBodyObjectAddStyleTag) MarshalJSON() (data []byte, err error)

type CrawlNewParamsBodyObjectAllowResourceType

type CrawlNewParamsBodyObjectAllowResourceType string
const (
	CrawlNewParamsBodyObjectAllowResourceTypeDocument           CrawlNewParamsBodyObjectAllowResourceType = "document"
	CrawlNewParamsBodyObjectAllowResourceTypeStylesheet         CrawlNewParamsBodyObjectAllowResourceType = "stylesheet"
	CrawlNewParamsBodyObjectAllowResourceTypeImage              CrawlNewParamsBodyObjectAllowResourceType = "image"
	CrawlNewParamsBodyObjectAllowResourceTypeMedia              CrawlNewParamsBodyObjectAllowResourceType = "media"
	CrawlNewParamsBodyObjectAllowResourceTypeFont               CrawlNewParamsBodyObjectAllowResourceType = "font"
	CrawlNewParamsBodyObjectAllowResourceTypeScript             CrawlNewParamsBodyObjectAllowResourceType = "script"
	CrawlNewParamsBodyObjectAllowResourceTypeTexttrack          CrawlNewParamsBodyObjectAllowResourceType = "texttrack"
	CrawlNewParamsBodyObjectAllowResourceTypeXHR                CrawlNewParamsBodyObjectAllowResourceType = "xhr"
	CrawlNewParamsBodyObjectAllowResourceTypeFetch              CrawlNewParamsBodyObjectAllowResourceType = "fetch"
	CrawlNewParamsBodyObjectAllowResourceTypePrefetch           CrawlNewParamsBodyObjectAllowResourceType = "prefetch"
	CrawlNewParamsBodyObjectAllowResourceTypeEventsource        CrawlNewParamsBodyObjectAllowResourceType = "eventsource"
	CrawlNewParamsBodyObjectAllowResourceTypeWebsocket          CrawlNewParamsBodyObjectAllowResourceType = "websocket"
	CrawlNewParamsBodyObjectAllowResourceTypeManifest           CrawlNewParamsBodyObjectAllowResourceType = "manifest"
	CrawlNewParamsBodyObjectAllowResourceTypeSignedexchange     CrawlNewParamsBodyObjectAllowResourceType = "signedexchange"
	CrawlNewParamsBodyObjectAllowResourceTypePing               CrawlNewParamsBodyObjectAllowResourceType = "ping"
	CrawlNewParamsBodyObjectAllowResourceTypeCspviolationreport CrawlNewParamsBodyObjectAllowResourceType = "cspviolationreport"
	CrawlNewParamsBodyObjectAllowResourceTypePreflight          CrawlNewParamsBodyObjectAllowResourceType = "preflight"
	CrawlNewParamsBodyObjectAllowResourceTypeOther              CrawlNewParamsBodyObjectAllowResourceType = "other"
)

func (CrawlNewParamsBodyObjectAllowResourceType) IsKnown

type CrawlNewParamsBodyObjectAuthenticate

type CrawlNewParamsBodyObjectAuthenticate struct {
	Password param.Field[string] `json:"password" api:"required"`
	Username param.Field[string] `json:"username" api:"required"`
}

Provide credentials for HTTP authentication.

func (CrawlNewParamsBodyObjectAuthenticate) MarshalJSON

func (r CrawlNewParamsBodyObjectAuthenticate) MarshalJSON() (data []byte, err error)

type CrawlNewParamsBodyObjectCookie

type CrawlNewParamsBodyObjectCookie struct {
	// Cookie name.
	Name         param.Field[string]                                      `json:"name" api:"required"`
	Value        param.Field[string]                                      `json:"value" api:"required"`
	Domain       param.Field[string]                                      `json:"domain"`
	Expires      param.Field[float64]                                     `json:"expires"`
	HTTPOnly     param.Field[bool]                                        `json:"httpOnly"`
	PartitionKey param.Field[string]                                      `json:"partitionKey"`
	Path         param.Field[string]                                      `json:"path"`
	Priority     param.Field[CrawlNewParamsBodyObjectCookiesPriority]     `json:"priority"`
	SameParty    param.Field[bool]                                        `json:"sameParty"`
	SameSite     param.Field[CrawlNewParamsBodyObjectCookiesSameSite]     `json:"sameSite"`
	Secure       param.Field[bool]                                        `json:"secure"`
	SourcePort   param.Field[float64]                                     `json:"sourcePort"`
	SourceScheme param.Field[CrawlNewParamsBodyObjectCookiesSourceScheme] `json:"sourceScheme"`
	URL          param.Field[string]                                      `json:"url"`
}

func (CrawlNewParamsBodyObjectCookie) MarshalJSON

func (r CrawlNewParamsBodyObjectCookie) MarshalJSON() (data []byte, err error)

type CrawlNewParamsBodyObjectCookiesPriority

type CrawlNewParamsBodyObjectCookiesPriority string
const (
	CrawlNewParamsBodyObjectCookiesPriorityLow    CrawlNewParamsBodyObjectCookiesPriority = "Low"
	CrawlNewParamsBodyObjectCookiesPriorityMedium CrawlNewParamsBodyObjectCookiesPriority = "Medium"
	CrawlNewParamsBodyObjectCookiesPriorityHigh   CrawlNewParamsBodyObjectCookiesPriority = "High"
)

func (CrawlNewParamsBodyObjectCookiesPriority) IsKnown

type CrawlNewParamsBodyObjectCookiesSameSite

type CrawlNewParamsBodyObjectCookiesSameSite string
const (
	CrawlNewParamsBodyObjectCookiesSameSiteStrict CrawlNewParamsBodyObjectCookiesSameSite = "Strict"
	CrawlNewParamsBodyObjectCookiesSameSiteLax    CrawlNewParamsBodyObjectCookiesSameSite = "Lax"
	CrawlNewParamsBodyObjectCookiesSameSiteNone   CrawlNewParamsBodyObjectCookiesSameSite = "None"
)

func (CrawlNewParamsBodyObjectCookiesSameSite) IsKnown

type CrawlNewParamsBodyObjectCookiesSourceScheme

type CrawlNewParamsBodyObjectCookiesSourceScheme string
const (
	CrawlNewParamsBodyObjectCookiesSourceSchemeUnset     CrawlNewParamsBodyObjectCookiesSourceScheme = "Unset"
	CrawlNewParamsBodyObjectCookiesSourceSchemeNonSecure CrawlNewParamsBodyObjectCookiesSourceScheme = "NonSecure"
	CrawlNewParamsBodyObjectCookiesSourceSchemeSecure    CrawlNewParamsBodyObjectCookiesSourceScheme = "Secure"
)

func (CrawlNewParamsBodyObjectCookiesSourceScheme) IsKnown

type CrawlNewParamsBodyObjectCrawlPurpose

type CrawlNewParamsBodyObjectCrawlPurpose string
const (
	CrawlNewParamsBodyObjectCrawlPurposeSearch  CrawlNewParamsBodyObjectCrawlPurpose = "search"
	CrawlNewParamsBodyObjectCrawlPurposeAIInput CrawlNewParamsBodyObjectCrawlPurpose = "ai-input"
	CrawlNewParamsBodyObjectCrawlPurposeAITrain CrawlNewParamsBodyObjectCrawlPurpose = "ai-train"
)

func (CrawlNewParamsBodyObjectCrawlPurpose) IsKnown

type CrawlNewParamsBodyObjectFormat

type CrawlNewParamsBodyObjectFormat string
const (
	CrawlNewParamsBodyObjectFormatHTML     CrawlNewParamsBodyObjectFormat = "html"
	CrawlNewParamsBodyObjectFormatMarkdown CrawlNewParamsBodyObjectFormat = "markdown"
	CrawlNewParamsBodyObjectFormatJson     CrawlNewParamsBodyObjectFormat = "json"
)

func (CrawlNewParamsBodyObjectFormat) IsKnown

type CrawlNewParamsBodyObjectGotoOptions

type CrawlNewParamsBodyObjectGotoOptions struct {
	Referer        param.Field[string]                                            `json:"referer"`
	ReferrerPolicy param.Field[string]                                            `json:"referrerPolicy"`
	Timeout        param.Field[float64]                                           `json:"timeout"`
	WaitUntil      param.Field[CrawlNewParamsBodyObjectGotoOptionsWaitUntilUnion] `json:"waitUntil"`
}

Check [options](https://pptr.dev/api/puppeteer.gotooptions).

func (CrawlNewParamsBodyObjectGotoOptions) MarshalJSON

func (r CrawlNewParamsBodyObjectGotoOptions) MarshalJSON() (data []byte, err error)

type CrawlNewParamsBodyObjectGotoOptionsWaitUntilArrayItem

type CrawlNewParamsBodyObjectGotoOptionsWaitUntilArrayItem string
const (
	CrawlNewParamsBodyObjectGotoOptionsWaitUntilArrayItemLoad             CrawlNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "load"
	CrawlNewParamsBodyObjectGotoOptionsWaitUntilArrayItemDomcontentloaded CrawlNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "domcontentloaded"
	CrawlNewParamsBodyObjectGotoOptionsWaitUntilArrayItemNetworkidle0     CrawlNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "networkidle0"
	CrawlNewParamsBodyObjectGotoOptionsWaitUntilArrayItemNetworkidle2     CrawlNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "networkidle2"
)

func (CrawlNewParamsBodyObjectGotoOptionsWaitUntilArrayItem) IsKnown

type CrawlNewParamsBodyObjectGotoOptionsWaitUntilString

type CrawlNewParamsBodyObjectGotoOptionsWaitUntilString string
const (
	CrawlNewParamsBodyObjectGotoOptionsWaitUntilStringLoad             CrawlNewParamsBodyObjectGotoOptionsWaitUntilString = "load"
	CrawlNewParamsBodyObjectGotoOptionsWaitUntilStringDomcontentloaded CrawlNewParamsBodyObjectGotoOptionsWaitUntilString = "domcontentloaded"
	CrawlNewParamsBodyObjectGotoOptionsWaitUntilStringNetworkidle0     CrawlNewParamsBodyObjectGotoOptionsWaitUntilString = "networkidle0"
	CrawlNewParamsBodyObjectGotoOptionsWaitUntilStringNetworkidle2     CrawlNewParamsBodyObjectGotoOptionsWaitUntilString = "networkidle2"
)

func (CrawlNewParamsBodyObjectGotoOptionsWaitUntilString) IsKnown

type CrawlNewParamsBodyObjectGotoOptionsWaitUntilUnion

type CrawlNewParamsBodyObjectGotoOptionsWaitUntilUnion interface {
	// contains filtered or unexported methods
}

Satisfied by browser_rendering.CrawlNewParamsBodyObjectGotoOptionsWaitUntilString, browser_rendering.CrawlNewParamsBodyObjectGotoOptionsWaitUntilArray.

type CrawlNewParamsBodyObjectJsonOptions

type CrawlNewParamsBodyObjectJsonOptions struct {
	// Optional list of custom AI models to use for the request. The models will be
	// tried in the order provided, and in case a model returns an error, the next one
	// will be used as fallback.
	CustomAI       param.Field[[]CrawlNewParamsBodyObjectJsonOptionsCustomAI]     `json:"custom_ai"`
	Prompt         param.Field[string]                                            `json:"prompt"`
	ResponseFormat param.Field[CrawlNewParamsBodyObjectJsonOptionsResponseFormat] `json:"response_format"`
}

Options for JSON extraction.

func (CrawlNewParamsBodyObjectJsonOptions) MarshalJSON

func (r CrawlNewParamsBodyObjectJsonOptions) MarshalJSON() (data []byte, err error)

type CrawlNewParamsBodyObjectJsonOptionsCustomAI

type CrawlNewParamsBodyObjectJsonOptionsCustomAI struct {
	// AI model to use for the request. Must be formed as `<provider>/<model_name>`,
	// e.g. `workers-ai/@cf/meta/llama-3.3-70b-instruct-fp8-fast`.
	Model param.Field[string] `json:"model" api:"required"`
	// Authorization token for the AI model: `Bearer <token>`. Not needed for
	// workers-ai models.
	Authorization param.Field[string] `json:"authorization"`
}

func (CrawlNewParamsBodyObjectJsonOptionsCustomAI) MarshalJSON

func (r CrawlNewParamsBodyObjectJsonOptionsCustomAI) MarshalJSON() (data []byte, err error)

type CrawlNewParamsBodyObjectJsonOptionsResponseFormat

type CrawlNewParamsBodyObjectJsonOptionsResponseFormat struct {
	Type param.Field[string] `json:"type" api:"required"`
	// Schema for the response format. More information here:
	// https://developers.cloudflare.com/workers-ai/json-mode/
	JsonSchema param.Field[map[string]CrawlNewParamsBodyObjectJsonOptionsResponseFormatJsonSchemaUnion] `json:"json_schema"`
}

func (CrawlNewParamsBodyObjectJsonOptionsResponseFormat) MarshalJSON

func (r CrawlNewParamsBodyObjectJsonOptionsResponseFormat) MarshalJSON() (data []byte, err error)

type CrawlNewParamsBodyObjectJsonOptionsResponseFormatJsonSchemaArray

type CrawlNewParamsBodyObjectJsonOptionsResponseFormatJsonSchemaArray []string

func (CrawlNewParamsBodyObjectJsonOptionsResponseFormatJsonSchemaArray) ImplementsCrawlNewParamsBodyObjectJsonOptionsResponseFormatJsonSchemaUnion

func (r CrawlNewParamsBodyObjectJsonOptionsResponseFormatJsonSchemaArray) ImplementsCrawlNewParamsBodyObjectJsonOptionsResponseFormatJsonSchemaUnion()

type CrawlNewParamsBodyObjectJsonOptionsResponseFormatJsonSchemaUnion

type CrawlNewParamsBodyObjectJsonOptionsResponseFormatJsonSchemaUnion interface {
	ImplementsCrawlNewParamsBodyObjectJsonOptionsResponseFormatJsonSchemaUnion()
}

Satisfied by shared.UnionString, shared.UnionFloat, shared.UnionBool, browser_rendering.CrawlNewParamsBodyObjectJsonOptionsResponseFormatJsonSchemaArray.

Use [Raw()] to specify an arbitrary value for this param

type CrawlNewParamsBodyObjectOptions

type CrawlNewParamsBodyObjectOptions struct {
	// Exclude links matching the provided wildcard patterns in the crawl job. Example:
	// 'https://example.com/privacy/**'.
	ExcludePatterns param.Field[[]string] `json:"excludePatterns"`
	// Include external links in the crawl job. If set to true, includeSubdomains is
	// ignored.
	IncludeExternalLinks param.Field[bool] `json:"includeExternalLinks"`
	// Include only links matching the provided wildcard patterns in the crawl job.
	// Include patterns are evaluated before exclude patterns. URLs that match any of
	// the specified include patterns will be included in the crawl job. Example:
	// 'https://example.com/blog/**'.
	IncludePatterns param.Field[[]string] `json:"includePatterns"`
	// Include links to subdomains in the crawl job. This option is ignored if
	// includeExternalLinks is true.
	IncludeSubdomains param.Field[bool] `json:"includeSubdomains"`
}

Additional options for the crawler.

func (CrawlNewParamsBodyObjectOptions) MarshalJSON

func (r CrawlNewParamsBodyObjectOptions) MarshalJSON() (data []byte, err error)

type CrawlNewParamsBodyObjectRejectResourceType

type CrawlNewParamsBodyObjectRejectResourceType string
const (
	CrawlNewParamsBodyObjectRejectResourceTypeDocument           CrawlNewParamsBodyObjectRejectResourceType = "document"
	CrawlNewParamsBodyObjectRejectResourceTypeStylesheet         CrawlNewParamsBodyObjectRejectResourceType = "stylesheet"
	CrawlNewParamsBodyObjectRejectResourceTypeImage              CrawlNewParamsBodyObjectRejectResourceType = "image"
	CrawlNewParamsBodyObjectRejectResourceTypeMedia              CrawlNewParamsBodyObjectRejectResourceType = "media"
	CrawlNewParamsBodyObjectRejectResourceTypeFont               CrawlNewParamsBodyObjectRejectResourceType = "font"
	CrawlNewParamsBodyObjectRejectResourceTypeScript             CrawlNewParamsBodyObjectRejectResourceType = "script"
	CrawlNewParamsBodyObjectRejectResourceTypeTexttrack          CrawlNewParamsBodyObjectRejectResourceType = "texttrack"
	CrawlNewParamsBodyObjectRejectResourceTypeXHR                CrawlNewParamsBodyObjectRejectResourceType = "xhr"
	CrawlNewParamsBodyObjectRejectResourceTypeFetch              CrawlNewParamsBodyObjectRejectResourceType = "fetch"
	CrawlNewParamsBodyObjectRejectResourceTypePrefetch           CrawlNewParamsBodyObjectRejectResourceType = "prefetch"
	CrawlNewParamsBodyObjectRejectResourceTypeEventsource        CrawlNewParamsBodyObjectRejectResourceType = "eventsource"
	CrawlNewParamsBodyObjectRejectResourceTypeWebsocket          CrawlNewParamsBodyObjectRejectResourceType = "websocket"
	CrawlNewParamsBodyObjectRejectResourceTypeManifest           CrawlNewParamsBodyObjectRejectResourceType = "manifest"
	CrawlNewParamsBodyObjectRejectResourceTypeSignedexchange     CrawlNewParamsBodyObjectRejectResourceType = "signedexchange"
	CrawlNewParamsBodyObjectRejectResourceTypePing               CrawlNewParamsBodyObjectRejectResourceType = "ping"
	CrawlNewParamsBodyObjectRejectResourceTypeCspviolationreport CrawlNewParamsBodyObjectRejectResourceType = "cspviolationreport"
	CrawlNewParamsBodyObjectRejectResourceTypePreflight          CrawlNewParamsBodyObjectRejectResourceType = "preflight"
	CrawlNewParamsBodyObjectRejectResourceTypeOther              CrawlNewParamsBodyObjectRejectResourceType = "other"
)

func (CrawlNewParamsBodyObjectRejectResourceType) IsKnown

type CrawlNewParamsBodyObjectRender

type CrawlNewParamsBodyObjectRender bool

Whether to render the page or fetch static content. True by default.

const (
	CrawlNewParamsBodyObjectRenderTrue CrawlNewParamsBodyObjectRender = true
)

func (CrawlNewParamsBodyObjectRender) IsKnown

type CrawlNewParamsBodyObjectSource

type CrawlNewParamsBodyObjectSource string

Source of links to crawl. 'sitemaps' - only crawl URLs from sitemaps, 'links' - only crawl URLs scraped from pages, 'all' - crawl both sitemap and scraped links (default).

const (
	CrawlNewParamsBodyObjectSourceSitemaps CrawlNewParamsBodyObjectSource = "sitemaps"
	CrawlNewParamsBodyObjectSourceLinks    CrawlNewParamsBodyObjectSource = "links"
	CrawlNewParamsBodyObjectSourceAll      CrawlNewParamsBodyObjectSource = "all"
)

func (CrawlNewParamsBodyObjectSource) IsKnown

type CrawlNewParamsBodyObjectViewport

type CrawlNewParamsBodyObjectViewport struct {
	Height            param.Field[float64] `json:"height" api:"required"`
	Width             param.Field[float64] `json:"width" api:"required"`
	DeviceScaleFactor param.Field[float64] `json:"deviceScaleFactor"`
	HasTouch          param.Field[bool]    `json:"hasTouch"`
	IsLandscape       param.Field[bool]    `json:"isLandscape"`
	IsMobile          param.Field[bool]    `json:"isMobile"`
}

Check [options](https://pptr.dev/api/puppeteer.page.setviewport).

func (CrawlNewParamsBodyObjectViewport) MarshalJSON

func (r CrawlNewParamsBodyObjectViewport) MarshalJSON() (data []byte, err error)

type CrawlNewParamsBodyObjectWaitForSelector

type CrawlNewParamsBodyObjectWaitForSelector struct {
	Selector param.Field[string]                                         `json:"selector" api:"required"`
	Hidden   param.Field[CrawlNewParamsBodyObjectWaitForSelectorHidden]  `json:"hidden"`
	Timeout  param.Field[float64]                                        `json:"timeout"`
	Visible  param.Field[CrawlNewParamsBodyObjectWaitForSelectorVisible] `json:"visible"`
}

Wait for the selector to appear in page. Check [options](https://pptr.dev/api/puppeteer.page.waitforselector).

func (CrawlNewParamsBodyObjectWaitForSelector) MarshalJSON

func (r CrawlNewParamsBodyObjectWaitForSelector) MarshalJSON() (data []byte, err error)

type CrawlNewParamsBodyObjectWaitForSelectorHidden

type CrawlNewParamsBodyObjectWaitForSelectorHidden bool
const (
	CrawlNewParamsBodyObjectWaitForSelectorHiddenTrue CrawlNewParamsBodyObjectWaitForSelectorHidden = true
)

func (CrawlNewParamsBodyObjectWaitForSelectorHidden) IsKnown

type CrawlNewParamsBodyObjectWaitForSelectorVisible

type CrawlNewParamsBodyObjectWaitForSelectorVisible bool
const (
	CrawlNewParamsBodyObjectWaitForSelectorVisibleTrue CrawlNewParamsBodyObjectWaitForSelectorVisible = true
)

func (CrawlNewParamsBodyObjectWaitForSelectorVisible) IsKnown

type CrawlNewParamsBodyRender

type CrawlNewParamsBodyRender bool

Whether to render the page or fetch static content. True by default.

const (
	CrawlNewParamsBodyRenderTrue  CrawlNewParamsBodyRender = true
	CrawlNewParamsBodyRenderFalse CrawlNewParamsBodyRender = false
)

func (CrawlNewParamsBodyRender) IsKnown

func (r CrawlNewParamsBodyRender) IsKnown() bool

type CrawlNewParamsBodySource

type CrawlNewParamsBodySource string

Source of links to crawl. 'sitemaps' - only crawl URLs from sitemaps, 'links' - only crawl URLs scraped from pages, 'all' - crawl both sitemap and scraped links (default).

const (
	CrawlNewParamsBodySourceSitemaps CrawlNewParamsBodySource = "sitemaps"
	CrawlNewParamsBodySourceLinks    CrawlNewParamsBodySource = "links"
	CrawlNewParamsBodySourceAll      CrawlNewParamsBodySource = "all"
)

func (CrawlNewParamsBodySource) IsKnown

func (r CrawlNewParamsBodySource) IsKnown() bool

type CrawlNewParamsBodyUnion

type CrawlNewParamsBodyUnion interface {
	// contains filtered or unexported methods
}

Satisfied by browser_rendering.CrawlNewParamsBodyObject, browser_rendering.CrawlNewParamsBodyObject, CrawlNewParamsBody.

type CrawlNewResponseEnvelope

type CrawlNewResponseEnvelope struct {
	// Crawl job ID.
	Result string `json:"result" api:"required"`
	// Response status.
	Success bool                             `json:"success" api:"required"`
	Errors  []CrawlNewResponseEnvelopeErrors `json:"errors"`
	JSON    crawlNewResponseEnvelopeJSON     `json:"-"`
}

func (*CrawlNewResponseEnvelope) UnmarshalJSON

func (r *CrawlNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type CrawlNewResponseEnvelopeErrors

type CrawlNewResponseEnvelopeErrors struct {
	// Error code.
	Code float64 `json:"code" api:"required"`
	// Error message.
	Message string                             `json:"message" api:"required"`
	JSON    crawlNewResponseEnvelopeErrorsJSON `json:"-"`
}

func (*CrawlNewResponseEnvelopeErrors) UnmarshalJSON

func (r *CrawlNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type CrawlService

type CrawlService struct {
	Options []option.RequestOption
}

CrawlService contains methods and other services that help with interacting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCrawlService method instead.

func NewCrawlService

func NewCrawlService(opts ...option.RequestOption) (r *CrawlService)

NewCrawlService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*CrawlService) Delete

func (r *CrawlService) Delete(ctx context.Context, jobID string, body CrawlDeleteParams, opts ...option.RequestOption) (res *CrawlDeleteResponse, err error)

Cancels an ongoing crawl job by setting its status to cancelled and stopping all queued URLs.

func (*CrawlService) Get

func (r *CrawlService) Get(ctx context.Context, jobID string, params CrawlGetParams, opts ...option.RequestOption) (res *CrawlGetResponse, err error)

Returns the result of a crawl job.

func (*CrawlService) New

func (r *CrawlService) New(ctx context.Context, params CrawlNewParams, opts ...option.RequestOption) (res *string, err error)

Starts a crawl job for the provided URL and its children. Check available options like `gotoOptions` and `waitFor*` to control page load behaviour.

type DevtoolBrowserConnectParams

type DevtoolBrowserConnectParams struct {
	// Account ID.
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// Keep-alive time in ms (only valid when acquiring new session).
	KeepAlive param.Field[float64] `query:"keep_alive"`
	// Use experimental browser.
	Lab       param.Field[bool] `query:"lab"`
	Recording param.Field[bool] `query:"recording"`
}

func (DevtoolBrowserConnectParams) URLQuery

func (r DevtoolBrowserConnectParams) URLQuery() (v url.Values)

URLQuery serializes DevtoolBrowserConnectParams's query parameters as `url.Values`.

type DevtoolBrowserDeleteParams

type DevtoolBrowserDeleteParams struct {
	// Account ID.
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type DevtoolBrowserDeleteResponse

type DevtoolBrowserDeleteResponse struct {
	Status DevtoolBrowserDeleteResponseStatus `json:"status" api:"required"`
	JSON   devtoolBrowserDeleteResponseJSON   `json:"-"`
}

func (*DevtoolBrowserDeleteResponse) UnmarshalJSON

func (r *DevtoolBrowserDeleteResponse) UnmarshalJSON(data []byte) (err error)

type DevtoolBrowserDeleteResponseStatus

type DevtoolBrowserDeleteResponseStatus string
const (
	DevtoolBrowserDeleteResponseStatusClosing DevtoolBrowserDeleteResponseStatus = "closing"
	DevtoolBrowserDeleteResponseStatusClosed  DevtoolBrowserDeleteResponseStatus = "closed"
)

func (DevtoolBrowserDeleteResponseStatus) IsKnown

type DevtoolBrowserLaunchParams

type DevtoolBrowserLaunchParams struct {
	// Account ID.
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// Keep-alive time in ms (only valid when acquiring new session).
	KeepAlive param.Field[float64] `query:"keep_alive"`
	// Use experimental browser.
	Lab       param.Field[bool] `query:"lab"`
	Recording param.Field[bool] `query:"recording"`
}

func (DevtoolBrowserLaunchParams) URLQuery

func (r DevtoolBrowserLaunchParams) URLQuery() (v url.Values)

URLQuery serializes DevtoolBrowserLaunchParams's query parameters as `url.Values`.

type DevtoolBrowserNewParams

type DevtoolBrowserNewParams struct {
	// Account ID.
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// Keep-alive time in milliseconds.
	KeepAlive param.Field[float64] `query:"keep_alive"`
	// Use experimental browser.
	Lab       param.Field[bool] `query:"lab"`
	Recording param.Field[bool] `query:"recording"`
	// Include browser targets in response.
	Targets param.Field[bool] `query:"targets"`
}

func (DevtoolBrowserNewParams) URLQuery

func (r DevtoolBrowserNewParams) URLQuery() (v url.Values)

URLQuery serializes DevtoolBrowserNewParams's query parameters as `url.Values`.

type DevtoolBrowserNewResponse

type DevtoolBrowserNewResponse struct {
	// Browser session ID.
	SessionID string `json:"sessionId" api:"required"`
	// WebSocket URL for the session.
	WebSocketDebuggerURL string                        `json:"webSocketDebuggerUrl"`
	JSON                 devtoolBrowserNewResponseJSON `json:"-"`
}

func (*DevtoolBrowserNewResponse) UnmarshalJSON

func (r *DevtoolBrowserNewResponse) UnmarshalJSON(data []byte) (err error)

type DevtoolBrowserPageGetParams

type DevtoolBrowserPageGetParams struct {
	// Account ID.
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type DevtoolBrowserPageService

type DevtoolBrowserPageService struct {
	Options []option.RequestOption
}

DevtoolBrowserPageService contains methods and other services that help with interacting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDevtoolBrowserPageService method instead.

func NewDevtoolBrowserPageService

func NewDevtoolBrowserPageService(opts ...option.RequestOption) (r *DevtoolBrowserPageService)

NewDevtoolBrowserPageService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*DevtoolBrowserPageService) Get

func (r *DevtoolBrowserPageService) Get(ctx context.Context, sessionID string, targetID string, query DevtoolBrowserPageGetParams, opts ...option.RequestOption) (err error)

Establishes a WebSocket connection to a specific Chrome DevTools target or page.

type DevtoolBrowserProtocolParams

type DevtoolBrowserProtocolParams struct {
	// Account ID.
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type DevtoolBrowserProtocolResponse

type DevtoolBrowserProtocolResponse struct {
	// List of protocol domains.
	Domains []DevtoolBrowserProtocolResponseDomain `json:"domains" api:"required"`
	// Protocol version.
	Version DevtoolBrowserProtocolResponseVersion `json:"version"`
	JSON    devtoolBrowserProtocolResponseJSON    `json:"-"`
}

func (*DevtoolBrowserProtocolResponse) UnmarshalJSON

func (r *DevtoolBrowserProtocolResponse) UnmarshalJSON(data []byte) (err error)

type DevtoolBrowserProtocolResponseDomain

type DevtoolBrowserProtocolResponseDomain struct {
	// Domain name.
	Domain string `json:"domain" api:"required"`
	// Available commands.
	Commands []map[string]interface{} `json:"commands"`
	// Domain dependencies.
	Dependencies []string `json:"dependencies"`
	// Available events.
	Events []map[string]interface{} `json:"events"`
	// Whether this domain is experimental.
	Experimental bool `json:"experimental"`
	// Type definitions.
	Types []map[string]interface{}                 `json:"types"`
	JSON  devtoolBrowserProtocolResponseDomainJSON `json:"-"`
}

func (*DevtoolBrowserProtocolResponseDomain) UnmarshalJSON

func (r *DevtoolBrowserProtocolResponseDomain) UnmarshalJSON(data []byte) (err error)

type DevtoolBrowserProtocolResponseVersion

type DevtoolBrowserProtocolResponseVersion struct {
	// Major version.
	Major string `json:"major" api:"required"`
	// Minor version.
	Minor string                                    `json:"minor" api:"required"`
	JSON  devtoolBrowserProtocolResponseVersionJSON `json:"-"`
}

Protocol version.

func (*DevtoolBrowserProtocolResponseVersion) UnmarshalJSON

func (r *DevtoolBrowserProtocolResponseVersion) UnmarshalJSON(data []byte) (err error)

type DevtoolBrowserService

type DevtoolBrowserService struct {
	Options []option.RequestOption
	Page    *DevtoolBrowserPageService
	Targets *DevtoolBrowserTargetService
}

DevtoolBrowserService contains methods and other services that help with interacting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDevtoolBrowserService method instead.

func NewDevtoolBrowserService

func NewDevtoolBrowserService(opts ...option.RequestOption) (r *DevtoolBrowserService)

NewDevtoolBrowserService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*DevtoolBrowserService) Connect

func (r *DevtoolBrowserService) Connect(ctx context.Context, sessionID string, params DevtoolBrowserConnectParams, opts ...option.RequestOption) (err error)

Establishes a WebSocket connection to an existing browser session.

func (*DevtoolBrowserService) Delete

Closes an existing browser session.

func (*DevtoolBrowserService) Launch

Acquires and establishes a WebSocket connection to a browser session.

func (*DevtoolBrowserService) New

Get a browser session ID.

func (*DevtoolBrowserService) Protocol

Returns the complete Chrome DevTools Protocol schema including all domains, commands, events, and types. This schema describes the entire CDP API surface.

func (*DevtoolBrowserService) Version

Get browser version metadata.

type DevtoolBrowserTargetActivateParams

type DevtoolBrowserTargetActivateParams struct {
	// Account ID.
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type DevtoolBrowserTargetActivateResponse

type DevtoolBrowserTargetActivateResponse struct {
	// Target activated.
	Message string                                   `json:"message" api:"required"`
	JSON    devtoolBrowserTargetActivateResponseJSON `json:"-"`
}

func (*DevtoolBrowserTargetActivateResponse) UnmarshalJSON

func (r *DevtoolBrowserTargetActivateResponse) UnmarshalJSON(data []byte) (err error)

type DevtoolBrowserTargetCloseParams

type DevtoolBrowserTargetCloseParams struct {
	// Account ID.
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type DevtoolBrowserTargetCloseResponse

type DevtoolBrowserTargetCloseResponse struct {
	// Target is closing.
	Message string                                `json:"message" api:"required"`
	JSON    devtoolBrowserTargetCloseResponseJSON `json:"-"`
}

func (*DevtoolBrowserTargetCloseResponse) UnmarshalJSON

func (r *DevtoolBrowserTargetCloseResponse) UnmarshalJSON(data []byte) (err error)

type DevtoolBrowserTargetGetParams

type DevtoolBrowserTargetGetParams struct {
	// Account ID.
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type DevtoolBrowserTargetGetResponse

type DevtoolBrowserTargetGetResponse struct {
	// Target ID.
	ID string `json:"id" api:"required"`
	// Target type (page, background_page, worker, etc.).
	Type string `json:"type" api:"required"`
	// URL of the target.
	URL string `json:"url" api:"required"`
	// Target description.
	Description string `json:"description"`
	// DevTools frontend URL.
	DevtoolsFrontendURL string `json:"devtoolsFrontendUrl"`
	// Title of the target.
	Title string `json:"title"`
	// WebSocket URL for debugging this target.
	WebSocketDebuggerURL string                              `json:"webSocketDebuggerUrl"`
	JSON                 devtoolBrowserTargetGetResponseJSON `json:"-"`
}

func (*DevtoolBrowserTargetGetResponse) UnmarshalJSON

func (r *DevtoolBrowserTargetGetResponse) UnmarshalJSON(data []byte) (err error)

type DevtoolBrowserTargetListParams

type DevtoolBrowserTargetListParams struct {
	// Account ID.
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type DevtoolBrowserTargetListResponse

type DevtoolBrowserTargetListResponse struct {
	// Target ID.
	ID string `json:"id" api:"required"`
	// Target type (page, background_page, worker, etc.).
	Type string `json:"type" api:"required"`
	// URL of the target.
	URL string `json:"url" api:"required"`
	// Target description.
	Description string `json:"description"`
	// DevTools frontend URL.
	DevtoolsFrontendURL string `json:"devtoolsFrontendUrl"`
	// Title of the target.
	Title string `json:"title"`
	// WebSocket URL for debugging this target.
	WebSocketDebuggerURL string                               `json:"webSocketDebuggerUrl"`
	JSON                 devtoolBrowserTargetListResponseJSON `json:"-"`
}

func (*DevtoolBrowserTargetListResponse) UnmarshalJSON

func (r *DevtoolBrowserTargetListResponse) UnmarshalJSON(data []byte) (err error)

type DevtoolBrowserTargetNewParams

type DevtoolBrowserTargetNewParams struct {
	// Account ID.
	AccountID param.Field[string] `path:"account_id" api:"required"`
	URL       param.Field[string] `query:"url" format:"uri"`
}

func (DevtoolBrowserTargetNewParams) URLQuery

func (r DevtoolBrowserTargetNewParams) URLQuery() (v url.Values)

URLQuery serializes DevtoolBrowserTargetNewParams's query parameters as `url.Values`.

type DevtoolBrowserTargetNewResponse

type DevtoolBrowserTargetNewResponse struct {
	// Target ID.
	ID string `json:"id" api:"required"`
	// Target type (page, background_page, worker, etc.).
	Type string `json:"type" api:"required"`
	// URL of the target.
	URL string `json:"url" api:"required"`
	// Target description.
	Description string `json:"description"`
	// DevTools frontend URL.
	DevtoolsFrontendURL string `json:"devtoolsFrontendUrl"`
	// Title of the target.
	Title string `json:"title"`
	// WebSocket URL for debugging this target.
	WebSocketDebuggerURL string                              `json:"webSocketDebuggerUrl"`
	JSON                 devtoolBrowserTargetNewResponseJSON `json:"-"`
}

func (*DevtoolBrowserTargetNewResponse) UnmarshalJSON

func (r *DevtoolBrowserTargetNewResponse) UnmarshalJSON(data []byte) (err error)

type DevtoolBrowserTargetService

type DevtoolBrowserTargetService struct {
	Options []option.RequestOption
}

DevtoolBrowserTargetService contains methods and other services that help with interacting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDevtoolBrowserTargetService method instead.

func NewDevtoolBrowserTargetService

func NewDevtoolBrowserTargetService(opts ...option.RequestOption) (r *DevtoolBrowserTargetService)

NewDevtoolBrowserTargetService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*DevtoolBrowserTargetService) Activate

Activates (brings to front) a specific browser target by its ID.

func (*DevtoolBrowserTargetService) Close

Closes a specific browser target (tab, page, etc.) by its ID. Returns 'Target is closing' on success or an error if the target is not found.

func (*DevtoolBrowserTargetService) Get

Returns the debuggable target with the given ID.

func (*DevtoolBrowserTargetService) List

Returns a list of all debuggable targets including tabs, pages, service workers, and other browser contexts.

func (*DevtoolBrowserTargetService) New

Opens a new tab in the browser. Optionally specify a URL to navigate to.

type DevtoolBrowserVersionParams

type DevtoolBrowserVersionParams struct {
	// Account ID.
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type DevtoolBrowserVersionResponse

type DevtoolBrowserVersionResponse struct {
	// Browser name and version.
	Browser string `json:"Browser" api:"required"`
	// Chrome DevTools Protocol version.
	ProtocolVersion string `json:"Protocol-Version" api:"required"`
	// User agent string.
	UserAgent string `json:"User-Agent" api:"required"`
	// V8 JavaScript engine version.
	V8Version string `json:"V8-Version" api:"required"`
	// WebKit version.
	WebKitVersion string `json:"WebKit-Version" api:"required"`
	// WebSocket URL for debugging the browser.
	WebSocketDebuggerURL string                            `json:"webSocketDebuggerUrl" api:"required"`
	JSON                 devtoolBrowserVersionResponseJSON `json:"-"`
}

func (*DevtoolBrowserVersionResponse) UnmarshalJSON

func (r *DevtoolBrowserVersionResponse) UnmarshalJSON(data []byte) (err error)

type DevtoolService

type DevtoolService struct {
	Options []option.RequestOption
	Session *DevtoolSessionService
	Browser *DevtoolBrowserService
}

DevtoolService contains methods and other services that help with interacting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDevtoolService method instead.

func NewDevtoolService

func NewDevtoolService(opts ...option.RequestOption) (r *DevtoolService)

NewDevtoolService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type DevtoolSessionGetParams

type DevtoolSessionGetParams struct {
	// Account ID.
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type DevtoolSessionGetResponse

type DevtoolSessionGetResponse struct {
	// Session ID.
	SessionID string `json:"sessionId" api:"required" format:"uuid"`
	// Reason for session closure.
	CloseReason string `json:"closeReason"`
	// Human-readable close reason.
	CloseReasonText string `json:"closeReasonText"`
	// Connection end time.
	ConnectionEndTime float64 `json:"connectionEndTime"`
	// Connection ID.
	ConnectionID string `json:"connectionId"`
	// Connection start time.
	ConnectionStartTime float64 `json:"connectionStartTime"`
	// DevTools frontend URL.
	DevtoolsFrontendURL string `json:"devtoolsFrontendUrl"`
	// Session end time.
	EndTime float64 `json:"endTime"`
	// Last updated timestamp.
	LastUpdated float64 `json:"lastUpdated"`
	// Session start time.
	StartTime float64 `json:"startTime"`
	// WebSocket URL for debugging this target.
	WebSocketDebuggerURL string                        `json:"webSocketDebuggerUrl"`
	JSON                 devtoolSessionGetResponseJSON `json:"-"`
}

func (*DevtoolSessionGetResponse) UnmarshalJSON

func (r *DevtoolSessionGetResponse) UnmarshalJSON(data []byte) (err error)

type DevtoolSessionListParams

type DevtoolSessionListParams struct {
	// Account ID.
	AccountID param.Field[string]  `path:"account_id" api:"required"`
	Limit     param.Field[float64] `query:"limit"`
	Offset    param.Field[float64] `query:"offset"`
}

func (DevtoolSessionListParams) URLQuery

func (r DevtoolSessionListParams) URLQuery() (v url.Values)

URLQuery serializes DevtoolSessionListParams's query parameters as `url.Values`.

type DevtoolSessionListResponse

type DevtoolSessionListResponse struct {
	// Session ID.
	SessionID string `json:"sessionId" api:"required" format:"uuid"`
	// Reason for session closure.
	CloseReason string `json:"closeReason"`
	// Human-readable close reason.
	CloseReasonText string `json:"closeReasonText"`
	// Connection end time.
	ConnectionEndTime float64 `json:"connectionEndTime"`
	// Connection ID.
	ConnectionID string `json:"connectionId"`
	// Connection start time.
	ConnectionStartTime float64 `json:"connectionStartTime"`
	// DevTools frontend URL.
	DevtoolsFrontendURL string `json:"devtoolsFrontendUrl"`
	// Session end time.
	EndTime float64 `json:"endTime"`
	// Last updated timestamp.
	LastUpdated float64 `json:"lastUpdated"`
	// Session start time.
	StartTime float64 `json:"startTime"`
	// WebSocket URL for debugging this target.
	WebSocketDebuggerURL string                         `json:"webSocketDebuggerUrl"`
	JSON                 devtoolSessionListResponseJSON `json:"-"`
}

func (*DevtoolSessionListResponse) UnmarshalJSON

func (r *DevtoolSessionListResponse) UnmarshalJSON(data []byte) (err error)

type DevtoolSessionService

type DevtoolSessionService struct {
	Options []option.RequestOption
}

DevtoolSessionService contains methods and other services that help with interacting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDevtoolSessionService method instead.

func NewDevtoolSessionService

func NewDevtoolSessionService(opts ...option.RequestOption) (r *DevtoolSessionService)

NewDevtoolSessionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*DevtoolSessionService) Get

Get details for a specific browser session.

func (*DevtoolSessionService) List

List active browser sessions.

type Error

type Error = apierror.Error

type ErrorData

type ErrorData = shared.ErrorData

This is an alias to an internal type.

type ErrorDataSource

type ErrorDataSource = shared.ErrorDataSource

This is an alias to an internal type.

type JsonNewParams

type JsonNewParams struct {
	// Account ID.
	AccountID param.Field[string]    `path:"account_id" api:"required"`
	Body      JsonNewParamsBodyUnion `json:"body" api:"required"`
	// Cache TTL default is 5s. Set to 0 to disable.
	CacheTTL param.Field[float64] `query:"cacheTTL"`
}

func (JsonNewParams) MarshalJSON

func (r JsonNewParams) MarshalJSON() (data []byte, err error)

func (JsonNewParams) URLQuery

func (r JsonNewParams) URLQuery() (v url.Values)

URLQuery serializes JsonNewParams's query parameters as `url.Values`.

type JsonNewParamsBody

type JsonNewParamsBody struct {
	// 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       param.Field[float64]     `json:"actionTimeout"`
	AddScriptTag        param.Field[interface{}] `json:"addScriptTag"`
	AddStyleTag         param.Field[interface{}] `json:"addStyleTag"`
	AllowRequestPattern param.Field[interface{}] `json:"allowRequestPattern"`
	AllowResourceTypes  param.Field[interface{}] `json:"allowResourceTypes"`
	Authenticate        param.Field[interface{}] `json:"authenticate"`
	// Attempt to proceed when 'awaited' events fail or timeout.
	BestAttempt      param.Field[bool]        `json:"bestAttempt"`
	Cookies          param.Field[interface{}] `json:"cookies"`
	CustomAI         param.Field[interface{}] `json:"custom_ai"`
	EmulateMediaType param.Field[string]      `json:"emulateMediaType"`
	GotoOptions      param.Field[interface{}] `json:"gotoOptions"`
	// Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or
	// `url` must be set.
	HTML                 param.Field[string]      `json:"html"`
	Prompt               param.Field[string]      `json:"prompt"`
	RejectRequestPattern param.Field[interface{}] `json:"rejectRequestPattern"`
	RejectResourceTypes  param.Field[interface{}] `json:"rejectResourceTypes"`
	ResponseFormat       param.Field[interface{}] `json:"response_format"`
	SetExtraHTTPHeaders  param.Field[interface{}] `json:"setExtraHTTPHeaders"`
	SetJavaScriptEnabled param.Field[bool]        `json:"setJavaScriptEnabled"`
	// URL to navigate to, eg. `https://example.com`.
	URL             param.Field[string]      `json:"url" format:"uri"`
	UserAgent       param.Field[string]      `json:"userAgent"`
	Viewport        param.Field[interface{}] `json:"viewport"`
	WaitForSelector param.Field[interface{}] `json:"waitForSelector"`
	// Waits for a specified timeout before continuing.
	WaitForTimeout param.Field[float64] `json:"waitForTimeout"`
}

func (JsonNewParamsBody) MarshalJSON

func (r JsonNewParamsBody) MarshalJSON() (data []byte, err error)

type JsonNewParamsBodyObject

type JsonNewParamsBodyObject struct {
	// Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or
	// `url` must be set.
	HTML param.Field[string] `json:"html" api:"required"`
	// 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 param.Field[float64] `json:"actionTimeout"`
	// Adds a `<script>` tag into the page with the desired URL or content.
	AddScriptTag param.Field[[]JsonNewParamsBodyObjectAddScriptTag] `json:"addScriptTag"`
	// Adds a `<link rel="stylesheet">` tag into the page with the desired URL or a
	// `<style type="text/css">` tag with the content.
	AddStyleTag param.Field[[]JsonNewParamsBodyObjectAddStyleTag] `json:"addStyleTag"`
	// Only allow requests that match the provided regex patterns, eg. '/^.\*\.(css)'.
	AllowRequestPattern param.Field[[]string] `json:"allowRequestPattern"`
	// Only allow requests that match the provided resource types, eg. 'image' or
	// 'script'.
	AllowResourceTypes param.Field[[]JsonNewParamsBodyObjectAllowResourceType] `json:"allowResourceTypes"`
	// Provide credentials for HTTP authentication.
	Authenticate param.Field[JsonNewParamsBodyObjectAuthenticate] `json:"authenticate"`
	// Attempt to proceed when 'awaited' events fail or timeout.
	BestAttempt param.Field[bool] `json:"bestAttempt"`
	// Check [options](https://pptr.dev/api/puppeteer.page.setcookie).
	Cookies param.Field[[]JsonNewParamsBodyObjectCookie] `json:"cookies"`
	// Optional list of custom AI models to use for the request. The models will be
	// tried in the order provided, and in case a model returns an error, the next one
	// will be used as fallback.
	CustomAI         param.Field[[]JsonNewParamsBodyObjectCustomAI] `json:"custom_ai"`
	EmulateMediaType param.Field[string]                            `json:"emulateMediaType"`
	// Check [options](https://pptr.dev/api/puppeteer.gotooptions).
	GotoOptions param.Field[JsonNewParamsBodyObjectGotoOptions] `json:"gotoOptions"`
	Prompt      param.Field[string]                             `json:"prompt"`
	// Block undesired requests that match the provided regex patterns, eg.
	// '/^.\*\.(css)'.
	RejectRequestPattern param.Field[[]string] `json:"rejectRequestPattern"`
	// Block undesired requests that match the provided resource types, eg. 'image' or
	// 'script'.
	RejectResourceTypes  param.Field[[]JsonNewParamsBodyObjectRejectResourceType] `json:"rejectResourceTypes"`
	ResponseFormat       param.Field[JsonNewParamsBodyObjectResponseFormat]       `json:"response_format"`
	SetExtraHTTPHeaders  param.Field[map[string]string]                           `json:"setExtraHTTPHeaders"`
	SetJavaScriptEnabled param.Field[bool]                                        `json:"setJavaScriptEnabled"`
	UserAgent            param.Field[string]                                      `json:"userAgent"`
	// Check [options](https://pptr.dev/api/puppeteer.page.setviewport).
	Viewport param.Field[JsonNewParamsBodyObjectViewport] `json:"viewport"`
	// Wait for the selector to appear in page. Check
	// [options](https://pptr.dev/api/puppeteer.page.waitforselector).
	WaitForSelector param.Field[JsonNewParamsBodyObjectWaitForSelector] `json:"waitForSelector"`
	// Waits for a specified timeout before continuing.
	WaitForTimeout param.Field[float64] `json:"waitForTimeout"`
}

func (JsonNewParamsBodyObject) MarshalJSON

func (r JsonNewParamsBodyObject) MarshalJSON() (data []byte, err error)

type JsonNewParamsBodyObjectAddScriptTag

type JsonNewParamsBodyObjectAddScriptTag struct {
	ID      param.Field[string] `json:"id"`
	Content param.Field[string] `json:"content"`
	Type    param.Field[string] `json:"type"`
	URL     param.Field[string] `json:"url"`
}

func (JsonNewParamsBodyObjectAddScriptTag) MarshalJSON

func (r JsonNewParamsBodyObjectAddScriptTag) MarshalJSON() (data []byte, err error)

type JsonNewParamsBodyObjectAddStyleTag

type JsonNewParamsBodyObjectAddStyleTag struct {
	Content param.Field[string] `json:"content"`
	URL     param.Field[string] `json:"url"`
}

func (JsonNewParamsBodyObjectAddStyleTag) MarshalJSON

func (r JsonNewParamsBodyObjectAddStyleTag) MarshalJSON() (data []byte, err error)

type JsonNewParamsBodyObjectAllowResourceType

type JsonNewParamsBodyObjectAllowResourceType string
const (
	JsonNewParamsBodyObjectAllowResourceTypeDocument           JsonNewParamsBodyObjectAllowResourceType = "document"
	JsonNewParamsBodyObjectAllowResourceTypeStylesheet         JsonNewParamsBodyObjectAllowResourceType = "stylesheet"
	JsonNewParamsBodyObjectAllowResourceTypeImage              JsonNewParamsBodyObjectAllowResourceType = "image"
	JsonNewParamsBodyObjectAllowResourceTypeMedia              JsonNewParamsBodyObjectAllowResourceType = "media"
	JsonNewParamsBodyObjectAllowResourceTypeFont               JsonNewParamsBodyObjectAllowResourceType = "font"
	JsonNewParamsBodyObjectAllowResourceTypeScript             JsonNewParamsBodyObjectAllowResourceType = "script"
	JsonNewParamsBodyObjectAllowResourceTypeTexttrack          JsonNewParamsBodyObjectAllowResourceType = "texttrack"
	JsonNewParamsBodyObjectAllowResourceTypeXHR                JsonNewParamsBodyObjectAllowResourceType = "xhr"
	JsonNewParamsBodyObjectAllowResourceTypeFetch              JsonNewParamsBodyObjectAllowResourceType = "fetch"
	JsonNewParamsBodyObjectAllowResourceTypePrefetch           JsonNewParamsBodyObjectAllowResourceType = "prefetch"
	JsonNewParamsBodyObjectAllowResourceTypeEventsource        JsonNewParamsBodyObjectAllowResourceType = "eventsource"
	JsonNewParamsBodyObjectAllowResourceTypeWebsocket          JsonNewParamsBodyObjectAllowResourceType = "websocket"
	JsonNewParamsBodyObjectAllowResourceTypeManifest           JsonNewParamsBodyObjectAllowResourceType = "manifest"
	JsonNewParamsBodyObjectAllowResourceTypeSignedexchange     JsonNewParamsBodyObjectAllowResourceType = "signedexchange"
	JsonNewParamsBodyObjectAllowResourceTypePing               JsonNewParamsBodyObjectAllowResourceType = "ping"
	JsonNewParamsBodyObjectAllowResourceTypeCspviolationreport JsonNewParamsBodyObjectAllowResourceType = "cspviolationreport"
	JsonNewParamsBodyObjectAllowResourceTypePreflight          JsonNewParamsBodyObjectAllowResourceType = "preflight"
	JsonNewParamsBodyObjectAllowResourceTypeOther              JsonNewParamsBodyObjectAllowResourceType = "other"
)

func (JsonNewParamsBodyObjectAllowResourceType) IsKnown

type JsonNewParamsBodyObjectAuthenticate

type JsonNewParamsBodyObjectAuthenticate struct {
	Password param.Field[string] `json:"password" api:"required"`
	Username param.Field[string] `json:"username" api:"required"`
}

Provide credentials for HTTP authentication.

func (JsonNewParamsBodyObjectAuthenticate) MarshalJSON

func (r JsonNewParamsBodyObjectAuthenticate) MarshalJSON() (data []byte, err error)

type JsonNewParamsBodyObjectCookie

type JsonNewParamsBodyObjectCookie struct {
	// Cookie name.
	Name         param.Field[string]                                     `json:"name" api:"required"`
	Value        param.Field[string]                                     `json:"value" api:"required"`
	Domain       param.Field[string]                                     `json:"domain"`
	Expires      param.Field[float64]                                    `json:"expires"`
	HTTPOnly     param.Field[bool]                                       `json:"httpOnly"`
	PartitionKey param.Field[string]                                     `json:"partitionKey"`
	Path         param.Field[string]                                     `json:"path"`
	Priority     param.Field[JsonNewParamsBodyObjectCookiesPriority]     `json:"priority"`
	SameParty    param.Field[bool]                                       `json:"sameParty"`
	SameSite     param.Field[JsonNewParamsBodyObjectCookiesSameSite]     `json:"sameSite"`
	Secure       param.Field[bool]                                       `json:"secure"`
	SourcePort   param.Field[float64]                                    `json:"sourcePort"`
	SourceScheme param.Field[JsonNewParamsBodyObjectCookiesSourceScheme] `json:"sourceScheme"`
	URL          param.Field[string]                                     `json:"url"`
}

func (JsonNewParamsBodyObjectCookie) MarshalJSON

func (r JsonNewParamsBodyObjectCookie) MarshalJSON() (data []byte, err error)

type JsonNewParamsBodyObjectCookiesPriority

type JsonNewParamsBodyObjectCookiesPriority string
const (
	JsonNewParamsBodyObjectCookiesPriorityLow    JsonNewParamsBodyObjectCookiesPriority = "Low"
	JsonNewParamsBodyObjectCookiesPriorityMedium JsonNewParamsBodyObjectCookiesPriority = "Medium"
	JsonNewParamsBodyObjectCookiesPriorityHigh   JsonNewParamsBodyObjectCookiesPriority = "High"
)

func (JsonNewParamsBodyObjectCookiesPriority) IsKnown

type JsonNewParamsBodyObjectCookiesSameSite

type JsonNewParamsBodyObjectCookiesSameSite string
const (
	JsonNewParamsBodyObjectCookiesSameSiteStrict JsonNewParamsBodyObjectCookiesSameSite = "Strict"
	JsonNewParamsBodyObjectCookiesSameSiteLax    JsonNewParamsBodyObjectCookiesSameSite = "Lax"
	JsonNewParamsBodyObjectCookiesSameSiteNone   JsonNewParamsBodyObjectCookiesSameSite = "None"
)

func (JsonNewParamsBodyObjectCookiesSameSite) IsKnown

type JsonNewParamsBodyObjectCookiesSourceScheme

type JsonNewParamsBodyObjectCookiesSourceScheme string
const (
	JsonNewParamsBodyObjectCookiesSourceSchemeUnset     JsonNewParamsBodyObjectCookiesSourceScheme = "Unset"
	JsonNewParamsBodyObjectCookiesSourceSchemeNonSecure JsonNewParamsBodyObjectCookiesSourceScheme = "NonSecure"
	JsonNewParamsBodyObjectCookiesSourceSchemeSecure    JsonNewParamsBodyObjectCookiesSourceScheme = "Secure"
)

func (JsonNewParamsBodyObjectCookiesSourceScheme) IsKnown

type JsonNewParamsBodyObjectCustomAI

type JsonNewParamsBodyObjectCustomAI struct {
	// AI model to use for the request. Must be formed as `<provider>/<model_name>`,
	// e.g. `workers-ai/@cf/meta/llama-3.3-70b-instruct-fp8-fast`.
	Model param.Field[string] `json:"model" api:"required"`
	// Authorization token for the AI model: `Bearer <token>`. Not needed for
	// workers-ai models.
	Authorization param.Field[string] `json:"authorization"`
}

func (JsonNewParamsBodyObjectCustomAI) MarshalJSON

func (r JsonNewParamsBodyObjectCustomAI) MarshalJSON() (data []byte, err error)

type JsonNewParamsBodyObjectGotoOptions

type JsonNewParamsBodyObjectGotoOptions struct {
	Referer        param.Field[string]                                           `json:"referer"`
	ReferrerPolicy param.Field[string]                                           `json:"referrerPolicy"`
	Timeout        param.Field[float64]                                          `json:"timeout"`
	WaitUntil      param.Field[JsonNewParamsBodyObjectGotoOptionsWaitUntilUnion] `json:"waitUntil"`
}

Check [options](https://pptr.dev/api/puppeteer.gotooptions).

func (JsonNewParamsBodyObjectGotoOptions) MarshalJSON

func (r JsonNewParamsBodyObjectGotoOptions) MarshalJSON() (data []byte, err error)

type JsonNewParamsBodyObjectGotoOptionsWaitUntilArrayItem

type JsonNewParamsBodyObjectGotoOptionsWaitUntilArrayItem string
const (
	JsonNewParamsBodyObjectGotoOptionsWaitUntilArrayItemLoad             JsonNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "load"
	JsonNewParamsBodyObjectGotoOptionsWaitUntilArrayItemDomcontentloaded JsonNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "domcontentloaded"
	JsonNewParamsBodyObjectGotoOptionsWaitUntilArrayItemNetworkidle0     JsonNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "networkidle0"
	JsonNewParamsBodyObjectGotoOptionsWaitUntilArrayItemNetworkidle2     JsonNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "networkidle2"
)

func (JsonNewParamsBodyObjectGotoOptionsWaitUntilArrayItem) IsKnown

type JsonNewParamsBodyObjectGotoOptionsWaitUntilString

type JsonNewParamsBodyObjectGotoOptionsWaitUntilString string
const (
	JsonNewParamsBodyObjectGotoOptionsWaitUntilStringLoad             JsonNewParamsBodyObjectGotoOptionsWaitUntilString = "load"
	JsonNewParamsBodyObjectGotoOptionsWaitUntilStringDomcontentloaded JsonNewParamsBodyObjectGotoOptionsWaitUntilString = "domcontentloaded"
	JsonNewParamsBodyObjectGotoOptionsWaitUntilStringNetworkidle0     JsonNewParamsBodyObjectGotoOptionsWaitUntilString = "networkidle0"
	JsonNewParamsBodyObjectGotoOptionsWaitUntilStringNetworkidle2     JsonNewParamsBodyObjectGotoOptionsWaitUntilString = "networkidle2"
)

func (JsonNewParamsBodyObjectGotoOptionsWaitUntilString) IsKnown

type JsonNewParamsBodyObjectGotoOptionsWaitUntilUnion

type JsonNewParamsBodyObjectGotoOptionsWaitUntilUnion interface {
	// contains filtered or unexported methods
}

Satisfied by browser_rendering.JsonNewParamsBodyObjectGotoOptionsWaitUntilString, browser_rendering.JsonNewParamsBodyObjectGotoOptionsWaitUntilArray.

type JsonNewParamsBodyObjectRejectResourceType

type JsonNewParamsBodyObjectRejectResourceType string
const (
	JsonNewParamsBodyObjectRejectResourceTypeDocument           JsonNewParamsBodyObjectRejectResourceType = "document"
	JsonNewParamsBodyObjectRejectResourceTypeStylesheet         JsonNewParamsBodyObjectRejectResourceType = "stylesheet"
	JsonNewParamsBodyObjectRejectResourceTypeImage              JsonNewParamsBodyObjectRejectResourceType = "image"
	JsonNewParamsBodyObjectRejectResourceTypeMedia              JsonNewParamsBodyObjectRejectResourceType = "media"
	JsonNewParamsBodyObjectRejectResourceTypeFont               JsonNewParamsBodyObjectRejectResourceType = "font"
	JsonNewParamsBodyObjectRejectResourceTypeScript             JsonNewParamsBodyObjectRejectResourceType = "script"
	JsonNewParamsBodyObjectRejectResourceTypeTexttrack          JsonNewParamsBodyObjectRejectResourceType = "texttrack"
	JsonNewParamsBodyObjectRejectResourceTypeXHR                JsonNewParamsBodyObjectRejectResourceType = "xhr"
	JsonNewParamsBodyObjectRejectResourceTypeFetch              JsonNewParamsBodyObjectRejectResourceType = "fetch"
	JsonNewParamsBodyObjectRejectResourceTypePrefetch           JsonNewParamsBodyObjectRejectResourceType = "prefetch"
	JsonNewParamsBodyObjectRejectResourceTypeEventsource        JsonNewParamsBodyObjectRejectResourceType = "eventsource"
	JsonNewParamsBodyObjectRejectResourceTypeWebsocket          JsonNewParamsBodyObjectRejectResourceType = "websocket"
	JsonNewParamsBodyObjectRejectResourceTypeManifest           JsonNewParamsBodyObjectRejectResourceType = "manifest"
	JsonNewParamsBodyObjectRejectResourceTypeSignedexchange     JsonNewParamsBodyObjectRejectResourceType = "signedexchange"
	JsonNewParamsBodyObjectRejectResourceTypePing               JsonNewParamsBodyObjectRejectResourceType = "ping"
	JsonNewParamsBodyObjectRejectResourceTypeCspviolationreport JsonNewParamsBodyObjectRejectResourceType = "cspviolationreport"
	JsonNewParamsBodyObjectRejectResourceTypePreflight          JsonNewParamsBodyObjectRejectResourceType = "preflight"
	JsonNewParamsBodyObjectRejectResourceTypeOther              JsonNewParamsBodyObjectRejectResourceType = "other"
)

func (JsonNewParamsBodyObjectRejectResourceType) IsKnown

type JsonNewParamsBodyObjectResponseFormat

type JsonNewParamsBodyObjectResponseFormat struct {
	Type param.Field[string] `json:"type" api:"required"`
	// Schema for the response format. More information here:
	// https://developers.cloudflare.com/workers-ai/json-mode/
	JsonSchema param.Field[map[string]JsonNewParamsBodyObjectResponseFormatJsonSchemaUnion] `json:"json_schema"`
}

func (JsonNewParamsBodyObjectResponseFormat) MarshalJSON

func (r JsonNewParamsBodyObjectResponseFormat) MarshalJSON() (data []byte, err error)

type JsonNewParamsBodyObjectResponseFormatJsonSchemaArray

type JsonNewParamsBodyObjectResponseFormatJsonSchemaArray []string

func (JsonNewParamsBodyObjectResponseFormatJsonSchemaArray) ImplementsJsonNewParamsBodyObjectResponseFormatJsonSchemaUnion

func (r JsonNewParamsBodyObjectResponseFormatJsonSchemaArray) ImplementsJsonNewParamsBodyObjectResponseFormatJsonSchemaUnion()

type JsonNewParamsBodyObjectResponseFormatJsonSchemaUnion

type JsonNewParamsBodyObjectResponseFormatJsonSchemaUnion interface {
	ImplementsJsonNewParamsBodyObjectResponseFormatJsonSchemaUnion()
}

Satisfied by shared.UnionString, shared.UnionFloat, shared.UnionBool, browser_rendering.JsonNewParamsBodyObjectResponseFormatJsonSchemaArray.

Use [Raw()] to specify an arbitrary value for this param

type JsonNewParamsBodyObjectViewport

type JsonNewParamsBodyObjectViewport struct {
	Height            param.Field[float64] `json:"height" api:"required"`
	Width             param.Field[float64] `json:"width" api:"required"`
	DeviceScaleFactor param.Field[float64] `json:"deviceScaleFactor"`
	HasTouch          param.Field[bool]    `json:"hasTouch"`
	IsLandscape       param.Field[bool]    `json:"isLandscape"`
	IsMobile          param.Field[bool]    `json:"isMobile"`
}

Check [options](https://pptr.dev/api/puppeteer.page.setviewport).

func (JsonNewParamsBodyObjectViewport) MarshalJSON

func (r JsonNewParamsBodyObjectViewport) MarshalJSON() (data []byte, err error)

type JsonNewParamsBodyObjectWaitForSelector

type JsonNewParamsBodyObjectWaitForSelector struct {
	Selector param.Field[string]                                        `json:"selector" api:"required"`
	Hidden   param.Field[JsonNewParamsBodyObjectWaitForSelectorHidden]  `json:"hidden"`
	Timeout  param.Field[float64]                                       `json:"timeout"`
	Visible  param.Field[JsonNewParamsBodyObjectWaitForSelectorVisible] `json:"visible"`
}

Wait for the selector to appear in page. Check [options](https://pptr.dev/api/puppeteer.page.waitforselector).

func (JsonNewParamsBodyObjectWaitForSelector) MarshalJSON

func (r JsonNewParamsBodyObjectWaitForSelector) MarshalJSON() (data []byte, err error)

type JsonNewParamsBodyObjectWaitForSelectorHidden

type JsonNewParamsBodyObjectWaitForSelectorHidden bool
const (
	JsonNewParamsBodyObjectWaitForSelectorHiddenTrue JsonNewParamsBodyObjectWaitForSelectorHidden = true
)

func (JsonNewParamsBodyObjectWaitForSelectorHidden) IsKnown

type JsonNewParamsBodyObjectWaitForSelectorVisible

type JsonNewParamsBodyObjectWaitForSelectorVisible bool
const (
	JsonNewParamsBodyObjectWaitForSelectorVisibleTrue JsonNewParamsBodyObjectWaitForSelectorVisible = true
)

func (JsonNewParamsBodyObjectWaitForSelectorVisible) IsKnown

type JsonNewParamsBodyUnion

type JsonNewParamsBodyUnion interface {
	// contains filtered or unexported methods
}

Satisfied by browser_rendering.JsonNewParamsBodyObject, browser_rendering.JsonNewParamsBodyObject, JsonNewParamsBody.

type JsonNewResponse

type JsonNewResponse map[string]interface{}

type JsonNewResponseEnvelope

type JsonNewResponseEnvelope struct {
	Result JsonNewResponse `json:"result" api:"required"`
	// Response status.
	Success bool                            `json:"success" api:"required"`
	Errors  []JsonNewResponseEnvelopeErrors `json:"errors"`
	JSON    jsonNewResponseEnvelopeJSON     `json:"-"`
}

func (*JsonNewResponseEnvelope) UnmarshalJSON

func (r *JsonNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type JsonNewResponseEnvelopeErrors

type JsonNewResponseEnvelopeErrors struct {
	// Error code.
	Code float64 `json:"code" api:"required"`
	// Error message.
	Message string                            `json:"message" api:"required"`
	JSON    jsonNewResponseEnvelopeErrorsJSON `json:"-"`
}

func (*JsonNewResponseEnvelopeErrors) UnmarshalJSON

func (r *JsonNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type JsonService

type JsonService struct {
	Options []option.RequestOption
}

JsonService contains methods and other services that help with interacting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewJsonService method instead.

func NewJsonService

func NewJsonService(opts ...option.RequestOption) (r *JsonService)

NewJsonService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*JsonService) New

func (r *JsonService) New(ctx context.Context, params JsonNewParams, opts ...option.RequestOption) (res *JsonNewResponse, err error)

Gets json from a webpage from a provided URL or HTML. Pass `prompt` or `schema` in the body. Control page loading with `gotoOptions` and `waitFor*` options.

type LinkNewParams

type LinkNewParams struct {
	// Account ID.
	AccountID param.Field[string]    `path:"account_id" api:"required"`
	Body      LinkNewParamsBodyUnion `json:"body" api:"required"`
	// Cache TTL default is 5s. Set to 0 to disable.
	CacheTTL param.Field[float64] `query:"cacheTTL"`
}

func (LinkNewParams) MarshalJSON

func (r LinkNewParams) MarshalJSON() (data []byte, err error)

func (LinkNewParams) URLQuery

func (r LinkNewParams) URLQuery() (v url.Values)

URLQuery serializes LinkNewParams's query parameters as `url.Values`.

type LinkNewParamsBody

type LinkNewParamsBody struct {
	// 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       param.Field[float64]     `json:"actionTimeout"`
	AddScriptTag        param.Field[interface{}] `json:"addScriptTag"`
	AddStyleTag         param.Field[interface{}] `json:"addStyleTag"`
	AllowRequestPattern param.Field[interface{}] `json:"allowRequestPattern"`
	AllowResourceTypes  param.Field[interface{}] `json:"allowResourceTypes"`
	Authenticate        param.Field[interface{}] `json:"authenticate"`
	// Attempt to proceed when 'awaited' events fail or timeout.
	BestAttempt          param.Field[bool]        `json:"bestAttempt"`
	Cookies              param.Field[interface{}] `json:"cookies"`
	EmulateMediaType     param.Field[string]      `json:"emulateMediaType"`
	ExcludeExternalLinks param.Field[bool]        `json:"excludeExternalLinks"`
	GotoOptions          param.Field[interface{}] `json:"gotoOptions"`
	// Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or
	// `url` must be set.
	HTML                 param.Field[string]      `json:"html"`
	RejectRequestPattern param.Field[interface{}] `json:"rejectRequestPattern"`
	RejectResourceTypes  param.Field[interface{}] `json:"rejectResourceTypes"`
	SetExtraHTTPHeaders  param.Field[interface{}] `json:"setExtraHTTPHeaders"`
	SetJavaScriptEnabled param.Field[bool]        `json:"setJavaScriptEnabled"`
	// URL to navigate to, eg. `https://example.com`.
	URL              param.Field[string]      `json:"url" format:"uri"`
	UserAgent        param.Field[string]      `json:"userAgent"`
	Viewport         param.Field[interface{}] `json:"viewport"`
	VisibleLinksOnly param.Field[bool]        `json:"visibleLinksOnly"`
	WaitForSelector  param.Field[interface{}] `json:"waitForSelector"`
	// Waits for a specified timeout before continuing.
	WaitForTimeout param.Field[float64] `json:"waitForTimeout"`
}

func (LinkNewParamsBody) MarshalJSON

func (r LinkNewParamsBody) MarshalJSON() (data []byte, err error)

type LinkNewParamsBodyObject

type LinkNewParamsBodyObject struct {
	// Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or
	// `url` must be set.
	HTML param.Field[string] `json:"html" api:"required"`
	// 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 param.Field[float64] `json:"actionTimeout"`
	// Adds a `<script>` tag into the page with the desired URL or content.
	AddScriptTag param.Field[[]LinkNewParamsBodyObjectAddScriptTag] `json:"addScriptTag"`
	// Adds a `<link rel="stylesheet">` tag into the page with the desired URL or a
	// `<style type="text/css">` tag with the content.
	AddStyleTag param.Field[[]LinkNewParamsBodyObjectAddStyleTag] `json:"addStyleTag"`
	// Only allow requests that match the provided regex patterns, eg. '/^.\*\.(css)'.
	AllowRequestPattern param.Field[[]string] `json:"allowRequestPattern"`
	// Only allow requests that match the provided resource types, eg. 'image' or
	// 'script'.
	AllowResourceTypes param.Field[[]LinkNewParamsBodyObjectAllowResourceType] `json:"allowResourceTypes"`
	// Provide credentials for HTTP authentication.
	Authenticate param.Field[LinkNewParamsBodyObjectAuthenticate] `json:"authenticate"`
	// Attempt to proceed when 'awaited' events fail or timeout.
	BestAttempt param.Field[bool] `json:"bestAttempt"`
	// Check [options](https://pptr.dev/api/puppeteer.page.setcookie).
	Cookies              param.Field[[]LinkNewParamsBodyObjectCookie] `json:"cookies"`
	EmulateMediaType     param.Field[string]                          `json:"emulateMediaType"`
	ExcludeExternalLinks param.Field[bool]                            `json:"excludeExternalLinks"`
	// Check [options](https://pptr.dev/api/puppeteer.gotooptions).
	GotoOptions param.Field[LinkNewParamsBodyObjectGotoOptions] `json:"gotoOptions"`
	// Block undesired requests that match the provided regex patterns, eg.
	// '/^.\*\.(css)'.
	RejectRequestPattern param.Field[[]string] `json:"rejectRequestPattern"`
	// Block undesired requests that match the provided resource types, eg. 'image' or
	// 'script'.
	RejectResourceTypes  param.Field[[]LinkNewParamsBodyObjectRejectResourceType] `json:"rejectResourceTypes"`
	SetExtraHTTPHeaders  param.Field[map[string]string]                           `json:"setExtraHTTPHeaders"`
	SetJavaScriptEnabled param.Field[bool]                                        `json:"setJavaScriptEnabled"`
	UserAgent            param.Field[string]                                      `json:"userAgent"`
	// Check [options](https://pptr.dev/api/puppeteer.page.setviewport).
	Viewport         param.Field[LinkNewParamsBodyObjectViewport] `json:"viewport"`
	VisibleLinksOnly param.Field[bool]                            `json:"visibleLinksOnly"`
	// Wait for the selector to appear in page. Check
	// [options](https://pptr.dev/api/puppeteer.page.waitforselector).
	WaitForSelector param.Field[LinkNewParamsBodyObjectWaitForSelector] `json:"waitForSelector"`
	// Waits for a specified timeout before continuing.
	WaitForTimeout param.Field[float64] `json:"waitForTimeout"`
}

func (LinkNewParamsBodyObject) MarshalJSON

func (r LinkNewParamsBodyObject) MarshalJSON() (data []byte, err error)

type LinkNewParamsBodyObjectAddScriptTag

type LinkNewParamsBodyObjectAddScriptTag struct {
	ID      param.Field[string] `json:"id"`
	Content param.Field[string] `json:"content"`
	Type    param.Field[string] `json:"type"`
	URL     param.Field[string] `json:"url"`
}

func (LinkNewParamsBodyObjectAddScriptTag) MarshalJSON

func (r LinkNewParamsBodyObjectAddScriptTag) MarshalJSON() (data []byte, err error)

type LinkNewParamsBodyObjectAddStyleTag

type LinkNewParamsBodyObjectAddStyleTag struct {
	Content param.Field[string] `json:"content"`
	URL     param.Field[string] `json:"url"`
}

func (LinkNewParamsBodyObjectAddStyleTag) MarshalJSON

func (r LinkNewParamsBodyObjectAddStyleTag) MarshalJSON() (data []byte, err error)

type LinkNewParamsBodyObjectAllowResourceType

type LinkNewParamsBodyObjectAllowResourceType string
const (
	LinkNewParamsBodyObjectAllowResourceTypeDocument           LinkNewParamsBodyObjectAllowResourceType = "document"
	LinkNewParamsBodyObjectAllowResourceTypeStylesheet         LinkNewParamsBodyObjectAllowResourceType = "stylesheet"
	LinkNewParamsBodyObjectAllowResourceTypeImage              LinkNewParamsBodyObjectAllowResourceType = "image"
	LinkNewParamsBodyObjectAllowResourceTypeMedia              LinkNewParamsBodyObjectAllowResourceType = "media"
	LinkNewParamsBodyObjectAllowResourceTypeFont               LinkNewParamsBodyObjectAllowResourceType = "font"
	LinkNewParamsBodyObjectAllowResourceTypeScript             LinkNewParamsBodyObjectAllowResourceType = "script"
	LinkNewParamsBodyObjectAllowResourceTypeTexttrack          LinkNewParamsBodyObjectAllowResourceType = "texttrack"
	LinkNewParamsBodyObjectAllowResourceTypeXHR                LinkNewParamsBodyObjectAllowResourceType = "xhr"
	LinkNewParamsBodyObjectAllowResourceTypeFetch              LinkNewParamsBodyObjectAllowResourceType = "fetch"
	LinkNewParamsBodyObjectAllowResourceTypePrefetch           LinkNewParamsBodyObjectAllowResourceType = "prefetch"
	LinkNewParamsBodyObjectAllowResourceTypeEventsource        LinkNewParamsBodyObjectAllowResourceType = "eventsource"
	LinkNewParamsBodyObjectAllowResourceTypeWebsocket          LinkNewParamsBodyObjectAllowResourceType = "websocket"
	LinkNewParamsBodyObjectAllowResourceTypeManifest           LinkNewParamsBodyObjectAllowResourceType = "manifest"
	LinkNewParamsBodyObjectAllowResourceTypeSignedexchange     LinkNewParamsBodyObjectAllowResourceType = "signedexchange"
	LinkNewParamsBodyObjectAllowResourceTypePing               LinkNewParamsBodyObjectAllowResourceType = "ping"
	LinkNewParamsBodyObjectAllowResourceTypeCspviolationreport LinkNewParamsBodyObjectAllowResourceType = "cspviolationreport"
	LinkNewParamsBodyObjectAllowResourceTypePreflight          LinkNewParamsBodyObjectAllowResourceType = "preflight"
	LinkNewParamsBodyObjectAllowResourceTypeOther              LinkNewParamsBodyObjectAllowResourceType = "other"
)

func (LinkNewParamsBodyObjectAllowResourceType) IsKnown

type LinkNewParamsBodyObjectAuthenticate

type LinkNewParamsBodyObjectAuthenticate struct {
	Password param.Field[string] `json:"password" api:"required"`
	Username param.Field[string] `json:"username" api:"required"`
}

Provide credentials for HTTP authentication.

func (LinkNewParamsBodyObjectAuthenticate) MarshalJSON

func (r LinkNewParamsBodyObjectAuthenticate) MarshalJSON() (data []byte, err error)

type LinkNewParamsBodyObjectCookie

type LinkNewParamsBodyObjectCookie struct {
	// Cookie name.
	Name         param.Field[string]                                     `json:"name" api:"required"`
	Value        param.Field[string]                                     `json:"value" api:"required"`
	Domain       param.Field[string]                                     `json:"domain"`
	Expires      param.Field[float64]                                    `json:"expires"`
	HTTPOnly     param.Field[bool]                                       `json:"httpOnly"`
	PartitionKey param.Field[string]                                     `json:"partitionKey"`
	Path         param.Field[string]                                     `json:"path"`
	Priority     param.Field[LinkNewParamsBodyObjectCookiesPriority]     `json:"priority"`
	SameParty    param.Field[bool]                                       `json:"sameParty"`
	SameSite     param.Field[LinkNewParamsBodyObjectCookiesSameSite]     `json:"sameSite"`
	Secure       param.Field[bool]                                       `json:"secure"`
	SourcePort   param.Field[float64]                                    `json:"sourcePort"`
	SourceScheme param.Field[LinkNewParamsBodyObjectCookiesSourceScheme] `json:"sourceScheme"`
	URL          param.Field[string]                                     `json:"url"`
}

func (LinkNewParamsBodyObjectCookie) MarshalJSON

func (r LinkNewParamsBodyObjectCookie) MarshalJSON() (data []byte, err error)

type LinkNewParamsBodyObjectCookiesPriority

type LinkNewParamsBodyObjectCookiesPriority string
const (
	LinkNewParamsBodyObjectCookiesPriorityLow    LinkNewParamsBodyObjectCookiesPriority = "Low"
	LinkNewParamsBodyObjectCookiesPriorityMedium LinkNewParamsBodyObjectCookiesPriority = "Medium"
	LinkNewParamsBodyObjectCookiesPriorityHigh   LinkNewParamsBodyObjectCookiesPriority = "High"
)

func (LinkNewParamsBodyObjectCookiesPriority) IsKnown

type LinkNewParamsBodyObjectCookiesSameSite

type LinkNewParamsBodyObjectCookiesSameSite string
const (
	LinkNewParamsBodyObjectCookiesSameSiteStrict LinkNewParamsBodyObjectCookiesSameSite = "Strict"
	LinkNewParamsBodyObjectCookiesSameSiteLax    LinkNewParamsBodyObjectCookiesSameSite = "Lax"
	LinkNewParamsBodyObjectCookiesSameSiteNone   LinkNewParamsBodyObjectCookiesSameSite = "None"
)

func (LinkNewParamsBodyObjectCookiesSameSite) IsKnown

type LinkNewParamsBodyObjectCookiesSourceScheme

type LinkNewParamsBodyObjectCookiesSourceScheme string
const (
	LinkNewParamsBodyObjectCookiesSourceSchemeUnset     LinkNewParamsBodyObjectCookiesSourceScheme = "Unset"
	LinkNewParamsBodyObjectCookiesSourceSchemeNonSecure LinkNewParamsBodyObjectCookiesSourceScheme = "NonSecure"
	LinkNewParamsBodyObjectCookiesSourceSchemeSecure    LinkNewParamsBodyObjectCookiesSourceScheme = "Secure"
)

func (LinkNewParamsBodyObjectCookiesSourceScheme) IsKnown

type LinkNewParamsBodyObjectGotoOptions

type LinkNewParamsBodyObjectGotoOptions struct {
	Referer        param.Field[string]                                           `json:"referer"`
	ReferrerPolicy param.Field[string]                                           `json:"referrerPolicy"`
	Timeout        param.Field[float64]                                          `json:"timeout"`
	WaitUntil      param.Field[LinkNewParamsBodyObjectGotoOptionsWaitUntilUnion] `json:"waitUntil"`
}

Check [options](https://pptr.dev/api/puppeteer.gotooptions).

func (LinkNewParamsBodyObjectGotoOptions) MarshalJSON

func (r LinkNewParamsBodyObjectGotoOptions) MarshalJSON() (data []byte, err error)

type LinkNewParamsBodyObjectGotoOptionsWaitUntilArrayItem

type LinkNewParamsBodyObjectGotoOptionsWaitUntilArrayItem string
const (
	LinkNewParamsBodyObjectGotoOptionsWaitUntilArrayItemLoad             LinkNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "load"
	LinkNewParamsBodyObjectGotoOptionsWaitUntilArrayItemDomcontentloaded LinkNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "domcontentloaded"
	LinkNewParamsBodyObjectGotoOptionsWaitUntilArrayItemNetworkidle0     LinkNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "networkidle0"
	LinkNewParamsBodyObjectGotoOptionsWaitUntilArrayItemNetworkidle2     LinkNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "networkidle2"
)

func (LinkNewParamsBodyObjectGotoOptionsWaitUntilArrayItem) IsKnown

type LinkNewParamsBodyObjectGotoOptionsWaitUntilString

type LinkNewParamsBodyObjectGotoOptionsWaitUntilString string
const (
	LinkNewParamsBodyObjectGotoOptionsWaitUntilStringLoad             LinkNewParamsBodyObjectGotoOptionsWaitUntilString = "load"
	LinkNewParamsBodyObjectGotoOptionsWaitUntilStringDomcontentloaded LinkNewParamsBodyObjectGotoOptionsWaitUntilString = "domcontentloaded"
	LinkNewParamsBodyObjectGotoOptionsWaitUntilStringNetworkidle0     LinkNewParamsBodyObjectGotoOptionsWaitUntilString = "networkidle0"
	LinkNewParamsBodyObjectGotoOptionsWaitUntilStringNetworkidle2     LinkNewParamsBodyObjectGotoOptionsWaitUntilString = "networkidle2"
)

func (LinkNewParamsBodyObjectGotoOptionsWaitUntilString) IsKnown

type LinkNewParamsBodyObjectGotoOptionsWaitUntilUnion

type LinkNewParamsBodyObjectGotoOptionsWaitUntilUnion interface {
	// contains filtered or unexported methods
}

Satisfied by browser_rendering.LinkNewParamsBodyObjectGotoOptionsWaitUntilString, browser_rendering.LinkNewParamsBodyObjectGotoOptionsWaitUntilArray.

type LinkNewParamsBodyObjectRejectResourceType

type LinkNewParamsBodyObjectRejectResourceType string
const (
	LinkNewParamsBodyObjectRejectResourceTypeDocument           LinkNewParamsBodyObjectRejectResourceType = "document"
	LinkNewParamsBodyObjectRejectResourceTypeStylesheet         LinkNewParamsBodyObjectRejectResourceType = "stylesheet"
	LinkNewParamsBodyObjectRejectResourceTypeImage              LinkNewParamsBodyObjectRejectResourceType = "image"
	LinkNewParamsBodyObjectRejectResourceTypeMedia              LinkNewParamsBodyObjectRejectResourceType = "media"
	LinkNewParamsBodyObjectRejectResourceTypeFont               LinkNewParamsBodyObjectRejectResourceType = "font"
	LinkNewParamsBodyObjectRejectResourceTypeScript             LinkNewParamsBodyObjectRejectResourceType = "script"
	LinkNewParamsBodyObjectRejectResourceTypeTexttrack          LinkNewParamsBodyObjectRejectResourceType = "texttrack"
	LinkNewParamsBodyObjectRejectResourceTypeXHR                LinkNewParamsBodyObjectRejectResourceType = "xhr"
	LinkNewParamsBodyObjectRejectResourceTypeFetch              LinkNewParamsBodyObjectRejectResourceType = "fetch"
	LinkNewParamsBodyObjectRejectResourceTypePrefetch           LinkNewParamsBodyObjectRejectResourceType = "prefetch"
	LinkNewParamsBodyObjectRejectResourceTypeEventsource        LinkNewParamsBodyObjectRejectResourceType = "eventsource"
	LinkNewParamsBodyObjectRejectResourceTypeWebsocket          LinkNewParamsBodyObjectRejectResourceType = "websocket"
	LinkNewParamsBodyObjectRejectResourceTypeManifest           LinkNewParamsBodyObjectRejectResourceType = "manifest"
	LinkNewParamsBodyObjectRejectResourceTypeSignedexchange     LinkNewParamsBodyObjectRejectResourceType = "signedexchange"
	LinkNewParamsBodyObjectRejectResourceTypePing               LinkNewParamsBodyObjectRejectResourceType = "ping"
	LinkNewParamsBodyObjectRejectResourceTypeCspviolationreport LinkNewParamsBodyObjectRejectResourceType = "cspviolationreport"
	LinkNewParamsBodyObjectRejectResourceTypePreflight          LinkNewParamsBodyObjectRejectResourceType = "preflight"
	LinkNewParamsBodyObjectRejectResourceTypeOther              LinkNewParamsBodyObjectRejectResourceType = "other"
)

func (LinkNewParamsBodyObjectRejectResourceType) IsKnown

type LinkNewParamsBodyObjectViewport

type LinkNewParamsBodyObjectViewport struct {
	Height            param.Field[float64] `json:"height" api:"required"`
	Width             param.Field[float64] `json:"width" api:"required"`
	DeviceScaleFactor param.Field[float64] `json:"deviceScaleFactor"`
	HasTouch          param.Field[bool]    `json:"hasTouch"`
	IsLandscape       param.Field[bool]    `json:"isLandscape"`
	IsMobile          param.Field[bool]    `json:"isMobile"`
}

Check [options](https://pptr.dev/api/puppeteer.page.setviewport).

func (LinkNewParamsBodyObjectViewport) MarshalJSON

func (r LinkNewParamsBodyObjectViewport) MarshalJSON() (data []byte, err error)

type LinkNewParamsBodyObjectWaitForSelector

type LinkNewParamsBodyObjectWaitForSelector struct {
	Selector param.Field[string]                                        `json:"selector" api:"required"`
	Hidden   param.Field[LinkNewParamsBodyObjectWaitForSelectorHidden]  `json:"hidden"`
	Timeout  param.Field[float64]                                       `json:"timeout"`
	Visible  param.Field[LinkNewParamsBodyObjectWaitForSelectorVisible] `json:"visible"`
}

Wait for the selector to appear in page. Check [options](https://pptr.dev/api/puppeteer.page.waitforselector).

func (LinkNewParamsBodyObjectWaitForSelector) MarshalJSON

func (r LinkNewParamsBodyObjectWaitForSelector) MarshalJSON() (data []byte, err error)

type LinkNewParamsBodyObjectWaitForSelectorHidden

type LinkNewParamsBodyObjectWaitForSelectorHidden bool
const (
	LinkNewParamsBodyObjectWaitForSelectorHiddenTrue LinkNewParamsBodyObjectWaitForSelectorHidden = true
)

func (LinkNewParamsBodyObjectWaitForSelectorHidden) IsKnown

type LinkNewParamsBodyObjectWaitForSelectorVisible

type LinkNewParamsBodyObjectWaitForSelectorVisible bool
const (
	LinkNewParamsBodyObjectWaitForSelectorVisibleTrue LinkNewParamsBodyObjectWaitForSelectorVisible = true
)

func (LinkNewParamsBodyObjectWaitForSelectorVisible) IsKnown

type LinkNewParamsBodyUnion

type LinkNewParamsBodyUnion interface {
	// contains filtered or unexported methods
}

Satisfied by browser_rendering.LinkNewParamsBodyObject, browser_rendering.LinkNewParamsBodyObject, LinkNewParamsBody.

type LinkNewResponseEnvelope

type LinkNewResponseEnvelope struct {
	Result []string `json:"result" api:"required"`
	// Response status.
	Success bool                            `json:"success" api:"required"`
	Errors  []LinkNewResponseEnvelopeErrors `json:"errors"`
	JSON    linkNewResponseEnvelopeJSON     `json:"-"`
}

func (*LinkNewResponseEnvelope) UnmarshalJSON

func (r *LinkNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type LinkNewResponseEnvelopeErrors

type LinkNewResponseEnvelopeErrors struct {
	// Error code.
	Code float64 `json:"code" api:"required"`
	// Error message.
	Message string                            `json:"message" api:"required"`
	JSON    linkNewResponseEnvelopeErrorsJSON `json:"-"`
}

func (*LinkNewResponseEnvelopeErrors) UnmarshalJSON

func (r *LinkNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type LinkService

type LinkService struct {
	Options []option.RequestOption
}

LinkService contains methods and other services that help with interacting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLinkService method instead.

func NewLinkService

func NewLinkService(opts ...option.RequestOption) (r *LinkService)

NewLinkService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*LinkService) New

func (r *LinkService) New(ctx context.Context, params LinkNewParams, opts ...option.RequestOption) (res *[]string, err error)

Get links from a web page.

type MarkdownNewParams

type MarkdownNewParams struct {
	// Account ID.
	AccountID param.Field[string]        `path:"account_id" api:"required"`
	Body      MarkdownNewParamsBodyUnion `json:"body" api:"required"`
	// Cache TTL default is 5s. Set to 0 to disable.
	CacheTTL param.Field[float64] `query:"cacheTTL"`
}

func (MarkdownNewParams) MarshalJSON

func (r MarkdownNewParams) MarshalJSON() (data []byte, err error)

func (MarkdownNewParams) URLQuery

func (r MarkdownNewParams) URLQuery() (v url.Values)

URLQuery serializes MarkdownNewParams's query parameters as `url.Values`.

type MarkdownNewParamsBody

type MarkdownNewParamsBody struct {
	// 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       param.Field[float64]     `json:"actionTimeout"`
	AddScriptTag        param.Field[interface{}] `json:"addScriptTag"`
	AddStyleTag         param.Field[interface{}] `json:"addStyleTag"`
	AllowRequestPattern param.Field[interface{}] `json:"allowRequestPattern"`
	AllowResourceTypes  param.Field[interface{}] `json:"allowResourceTypes"`
	Authenticate        param.Field[interface{}] `json:"authenticate"`
	// Attempt to proceed when 'awaited' events fail or timeout.
	BestAttempt      param.Field[bool]        `json:"bestAttempt"`
	Cookies          param.Field[interface{}] `json:"cookies"`
	EmulateMediaType param.Field[string]      `json:"emulateMediaType"`
	GotoOptions      param.Field[interface{}] `json:"gotoOptions"`
	// Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or
	// `url` must be set.
	HTML                 param.Field[string]      `json:"html"`
	RejectRequestPattern param.Field[interface{}] `json:"rejectRequestPattern"`
	RejectResourceTypes  param.Field[interface{}] `json:"rejectResourceTypes"`
	SetExtraHTTPHeaders  param.Field[interface{}] `json:"setExtraHTTPHeaders"`
	SetJavaScriptEnabled param.Field[bool]        `json:"setJavaScriptEnabled"`
	// URL to navigate to, eg. `https://example.com`.
	URL             param.Field[string]      `json:"url" format:"uri"`
	UserAgent       param.Field[string]      `json:"userAgent"`
	Viewport        param.Field[interface{}] `json:"viewport"`
	WaitForSelector param.Field[interface{}] `json:"waitForSelector"`
	// Waits for a specified timeout before continuing.
	WaitForTimeout param.Field[float64] `json:"waitForTimeout"`
}

func (MarkdownNewParamsBody) MarshalJSON

func (r MarkdownNewParamsBody) MarshalJSON() (data []byte, err error)

type MarkdownNewParamsBodyObject

type MarkdownNewParamsBodyObject struct {
	// URL to navigate to, eg. `https://example.com`.
	URL param.Field[string] `json:"url" api:"required" format:"uri"`
	// 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 param.Field[float64] `json:"actionTimeout"`
	// Adds a `<script>` tag into the page with the desired URL or content.
	AddScriptTag param.Field[[]MarkdownNewParamsBodyObjectAddScriptTag] `json:"addScriptTag"`
	// Adds a `<link rel="stylesheet">` tag into the page with the desired URL or a
	// `<style type="text/css">` tag with the content.
	AddStyleTag param.Field[[]MarkdownNewParamsBodyObjectAddStyleTag] `json:"addStyleTag"`
	// Only allow requests that match the provided regex patterns, eg. '/^.\*\.(css)'.
	AllowRequestPattern param.Field[[]string] `json:"allowRequestPattern"`
	// Only allow requests that match the provided resource types, eg. 'image' or
	// 'script'.
	AllowResourceTypes param.Field[[]MarkdownNewParamsBodyObjectAllowResourceType] `json:"allowResourceTypes"`
	// Provide credentials for HTTP authentication.
	Authenticate param.Field[MarkdownNewParamsBodyObjectAuthenticate] `json:"authenticate"`
	// Attempt to proceed when 'awaited' events fail or timeout.
	BestAttempt param.Field[bool] `json:"bestAttempt"`
	// Check [options](https://pptr.dev/api/puppeteer.page.setcookie).
	Cookies          param.Field[[]MarkdownNewParamsBodyObjectCookie] `json:"cookies"`
	EmulateMediaType param.Field[string]                              `json:"emulateMediaType"`
	// Check [options](https://pptr.dev/api/puppeteer.gotooptions).
	GotoOptions param.Field[MarkdownNewParamsBodyObjectGotoOptions] `json:"gotoOptions"`
	// Block undesired requests that match the provided regex patterns, eg.
	// '/^.\*\.(css)'.
	RejectRequestPattern param.Field[[]string] `json:"rejectRequestPattern"`
	// Block undesired requests that match the provided resource types, eg. 'image' or
	// 'script'.
	RejectResourceTypes  param.Field[[]MarkdownNewParamsBodyObjectRejectResourceType] `json:"rejectResourceTypes"`
	SetExtraHTTPHeaders  param.Field[map[string]string]                               `json:"setExtraHTTPHeaders"`
	SetJavaScriptEnabled param.Field[bool]                                            `json:"setJavaScriptEnabled"`
	UserAgent            param.Field[string]                                          `json:"userAgent"`
	// Check [options](https://pptr.dev/api/puppeteer.page.setviewport).
	Viewport param.Field[MarkdownNewParamsBodyObjectViewport] `json:"viewport"`
	// Wait for the selector to appear in page. Check
	// [options](https://pptr.dev/api/puppeteer.page.waitforselector).
	WaitForSelector param.Field[MarkdownNewParamsBodyObjectWaitForSelector] `json:"waitForSelector"`
	// Waits for a specified timeout before continuing.
	WaitForTimeout param.Field[float64] `json:"waitForTimeout"`
}

func (MarkdownNewParamsBodyObject) MarshalJSON

func (r MarkdownNewParamsBodyObject) MarshalJSON() (data []byte, err error)

type MarkdownNewParamsBodyObjectAddScriptTag

type MarkdownNewParamsBodyObjectAddScriptTag struct {
	ID      param.Field[string] `json:"id"`
	Content param.Field[string] `json:"content"`
	Type    param.Field[string] `json:"type"`
	URL     param.Field[string] `json:"url"`
}

func (MarkdownNewParamsBodyObjectAddScriptTag) MarshalJSON

func (r MarkdownNewParamsBodyObjectAddScriptTag) MarshalJSON() (data []byte, err error)

type MarkdownNewParamsBodyObjectAddStyleTag

type MarkdownNewParamsBodyObjectAddStyleTag struct {
	Content param.Field[string] `json:"content"`
	URL     param.Field[string] `json:"url"`
}

func (MarkdownNewParamsBodyObjectAddStyleTag) MarshalJSON

func (r MarkdownNewParamsBodyObjectAddStyleTag) MarshalJSON() (data []byte, err error)

type MarkdownNewParamsBodyObjectAllowResourceType

type MarkdownNewParamsBodyObjectAllowResourceType string
const (
	MarkdownNewParamsBodyObjectAllowResourceTypeDocument           MarkdownNewParamsBodyObjectAllowResourceType = "document"
	MarkdownNewParamsBodyObjectAllowResourceTypeStylesheet         MarkdownNewParamsBodyObjectAllowResourceType = "stylesheet"
	MarkdownNewParamsBodyObjectAllowResourceTypeImage              MarkdownNewParamsBodyObjectAllowResourceType = "image"
	MarkdownNewParamsBodyObjectAllowResourceTypeMedia              MarkdownNewParamsBodyObjectAllowResourceType = "media"
	MarkdownNewParamsBodyObjectAllowResourceTypeFont               MarkdownNewParamsBodyObjectAllowResourceType = "font"
	MarkdownNewParamsBodyObjectAllowResourceTypeScript             MarkdownNewParamsBodyObjectAllowResourceType = "script"
	MarkdownNewParamsBodyObjectAllowResourceTypeTexttrack          MarkdownNewParamsBodyObjectAllowResourceType = "texttrack"
	MarkdownNewParamsBodyObjectAllowResourceTypeXHR                MarkdownNewParamsBodyObjectAllowResourceType = "xhr"
	MarkdownNewParamsBodyObjectAllowResourceTypeFetch              MarkdownNewParamsBodyObjectAllowResourceType = "fetch"
	MarkdownNewParamsBodyObjectAllowResourceTypePrefetch           MarkdownNewParamsBodyObjectAllowResourceType = "prefetch"
	MarkdownNewParamsBodyObjectAllowResourceTypeEventsource        MarkdownNewParamsBodyObjectAllowResourceType = "eventsource"
	MarkdownNewParamsBodyObjectAllowResourceTypeWebsocket          MarkdownNewParamsBodyObjectAllowResourceType = "websocket"
	MarkdownNewParamsBodyObjectAllowResourceTypeManifest           MarkdownNewParamsBodyObjectAllowResourceType = "manifest"
	MarkdownNewParamsBodyObjectAllowResourceTypeSignedexchange     MarkdownNewParamsBodyObjectAllowResourceType = "signedexchange"
	MarkdownNewParamsBodyObjectAllowResourceTypePing               MarkdownNewParamsBodyObjectAllowResourceType = "ping"
	MarkdownNewParamsBodyObjectAllowResourceTypeCspviolationreport MarkdownNewParamsBodyObjectAllowResourceType = "cspviolationreport"
	MarkdownNewParamsBodyObjectAllowResourceTypePreflight          MarkdownNewParamsBodyObjectAllowResourceType = "preflight"
	MarkdownNewParamsBodyObjectAllowResourceTypeOther              MarkdownNewParamsBodyObjectAllowResourceType = "other"
)

func (MarkdownNewParamsBodyObjectAllowResourceType) IsKnown

type MarkdownNewParamsBodyObjectAuthenticate

type MarkdownNewParamsBodyObjectAuthenticate struct {
	Password param.Field[string] `json:"password" api:"required"`
	Username param.Field[string] `json:"username" api:"required"`
}

Provide credentials for HTTP authentication.

func (MarkdownNewParamsBodyObjectAuthenticate) MarshalJSON

func (r MarkdownNewParamsBodyObjectAuthenticate) MarshalJSON() (data []byte, err error)

type MarkdownNewParamsBodyObjectCookie

type MarkdownNewParamsBodyObjectCookie struct {
	// Cookie name.
	Name         param.Field[string]                                         `json:"name" api:"required"`
	Value        param.Field[string]                                         `json:"value" api:"required"`
	Domain       param.Field[string]                                         `json:"domain"`
	Expires      param.Field[float64]                                        `json:"expires"`
	HTTPOnly     param.Field[bool]                                           `json:"httpOnly"`
	PartitionKey param.Field[string]                                         `json:"partitionKey"`
	Path         param.Field[string]                                         `json:"path"`
	Priority     param.Field[MarkdownNewParamsBodyObjectCookiesPriority]     `json:"priority"`
	SameParty    param.Field[bool]                                           `json:"sameParty"`
	SameSite     param.Field[MarkdownNewParamsBodyObjectCookiesSameSite]     `json:"sameSite"`
	Secure       param.Field[bool]                                           `json:"secure"`
	SourcePort   param.Field[float64]                                        `json:"sourcePort"`
	SourceScheme param.Field[MarkdownNewParamsBodyObjectCookiesSourceScheme] `json:"sourceScheme"`
	URL          param.Field[string]                                         `json:"url"`
}

func (MarkdownNewParamsBodyObjectCookie) MarshalJSON

func (r MarkdownNewParamsBodyObjectCookie) MarshalJSON() (data []byte, err error)

type MarkdownNewParamsBodyObjectCookiesPriority

type MarkdownNewParamsBodyObjectCookiesPriority string
const (
	MarkdownNewParamsBodyObjectCookiesPriorityLow    MarkdownNewParamsBodyObjectCookiesPriority = "Low"
	MarkdownNewParamsBodyObjectCookiesPriorityMedium MarkdownNewParamsBodyObjectCookiesPriority = "Medium"
	MarkdownNewParamsBodyObjectCookiesPriorityHigh   MarkdownNewParamsBodyObjectCookiesPriority = "High"
)

func (MarkdownNewParamsBodyObjectCookiesPriority) IsKnown

type MarkdownNewParamsBodyObjectCookiesSameSite

type MarkdownNewParamsBodyObjectCookiesSameSite string
const (
	MarkdownNewParamsBodyObjectCookiesSameSiteStrict MarkdownNewParamsBodyObjectCookiesSameSite = "Strict"
	MarkdownNewParamsBodyObjectCookiesSameSiteLax    MarkdownNewParamsBodyObjectCookiesSameSite = "Lax"
	MarkdownNewParamsBodyObjectCookiesSameSiteNone   MarkdownNewParamsBodyObjectCookiesSameSite = "None"
)

func (MarkdownNewParamsBodyObjectCookiesSameSite) IsKnown

type MarkdownNewParamsBodyObjectCookiesSourceScheme

type MarkdownNewParamsBodyObjectCookiesSourceScheme string
const (
	MarkdownNewParamsBodyObjectCookiesSourceSchemeUnset     MarkdownNewParamsBodyObjectCookiesSourceScheme = "Unset"
	MarkdownNewParamsBodyObjectCookiesSourceSchemeNonSecure MarkdownNewParamsBodyObjectCookiesSourceScheme = "NonSecure"
	MarkdownNewParamsBodyObjectCookiesSourceSchemeSecure    MarkdownNewParamsBodyObjectCookiesSourceScheme = "Secure"
)

func (MarkdownNewParamsBodyObjectCookiesSourceScheme) IsKnown

type MarkdownNewParamsBodyObjectGotoOptions

type MarkdownNewParamsBodyObjectGotoOptions struct {
	Referer        param.Field[string]                                               `json:"referer"`
	ReferrerPolicy param.Field[string]                                               `json:"referrerPolicy"`
	Timeout        param.Field[float64]                                              `json:"timeout"`
	WaitUntil      param.Field[MarkdownNewParamsBodyObjectGotoOptionsWaitUntilUnion] `json:"waitUntil"`
}

Check [options](https://pptr.dev/api/puppeteer.gotooptions).

func (MarkdownNewParamsBodyObjectGotoOptions) MarshalJSON

func (r MarkdownNewParamsBodyObjectGotoOptions) MarshalJSON() (data []byte, err error)

type MarkdownNewParamsBodyObjectGotoOptionsWaitUntilArrayItem

type MarkdownNewParamsBodyObjectGotoOptionsWaitUntilArrayItem string
const (
	MarkdownNewParamsBodyObjectGotoOptionsWaitUntilArrayItemLoad             MarkdownNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "load"
	MarkdownNewParamsBodyObjectGotoOptionsWaitUntilArrayItemDomcontentloaded MarkdownNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "domcontentloaded"
	MarkdownNewParamsBodyObjectGotoOptionsWaitUntilArrayItemNetworkidle0     MarkdownNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "networkidle0"
	MarkdownNewParamsBodyObjectGotoOptionsWaitUntilArrayItemNetworkidle2     MarkdownNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "networkidle2"
)

func (MarkdownNewParamsBodyObjectGotoOptionsWaitUntilArrayItem) IsKnown

type MarkdownNewParamsBodyObjectGotoOptionsWaitUntilString

type MarkdownNewParamsBodyObjectGotoOptionsWaitUntilString string
const (
	MarkdownNewParamsBodyObjectGotoOptionsWaitUntilStringLoad             MarkdownNewParamsBodyObjectGotoOptionsWaitUntilString = "load"
	MarkdownNewParamsBodyObjectGotoOptionsWaitUntilStringDomcontentloaded MarkdownNewParamsBodyObjectGotoOptionsWaitUntilString = "domcontentloaded"
	MarkdownNewParamsBodyObjectGotoOptionsWaitUntilStringNetworkidle0     MarkdownNewParamsBodyObjectGotoOptionsWaitUntilString = "networkidle0"
	MarkdownNewParamsBodyObjectGotoOptionsWaitUntilStringNetworkidle2     MarkdownNewParamsBodyObjectGotoOptionsWaitUntilString = "networkidle2"
)

func (MarkdownNewParamsBodyObjectGotoOptionsWaitUntilString) IsKnown

type MarkdownNewParamsBodyObjectGotoOptionsWaitUntilUnion

type MarkdownNewParamsBodyObjectGotoOptionsWaitUntilUnion interface {
	// contains filtered or unexported methods
}

Satisfied by browser_rendering.MarkdownNewParamsBodyObjectGotoOptionsWaitUntilString, browser_rendering.MarkdownNewParamsBodyObjectGotoOptionsWaitUntilArray.

type MarkdownNewParamsBodyObjectRejectResourceType

type MarkdownNewParamsBodyObjectRejectResourceType string
const (
	MarkdownNewParamsBodyObjectRejectResourceTypeDocument           MarkdownNewParamsBodyObjectRejectResourceType = "document"
	MarkdownNewParamsBodyObjectRejectResourceTypeStylesheet         MarkdownNewParamsBodyObjectRejectResourceType = "stylesheet"
	MarkdownNewParamsBodyObjectRejectResourceTypeImage              MarkdownNewParamsBodyObjectRejectResourceType = "image"
	MarkdownNewParamsBodyObjectRejectResourceTypeMedia              MarkdownNewParamsBodyObjectRejectResourceType = "media"
	MarkdownNewParamsBodyObjectRejectResourceTypeFont               MarkdownNewParamsBodyObjectRejectResourceType = "font"
	MarkdownNewParamsBodyObjectRejectResourceTypeScript             MarkdownNewParamsBodyObjectRejectResourceType = "script"
	MarkdownNewParamsBodyObjectRejectResourceTypeTexttrack          MarkdownNewParamsBodyObjectRejectResourceType = "texttrack"
	MarkdownNewParamsBodyObjectRejectResourceTypeXHR                MarkdownNewParamsBodyObjectRejectResourceType = "xhr"
	MarkdownNewParamsBodyObjectRejectResourceTypeFetch              MarkdownNewParamsBodyObjectRejectResourceType = "fetch"
	MarkdownNewParamsBodyObjectRejectResourceTypePrefetch           MarkdownNewParamsBodyObjectRejectResourceType = "prefetch"
	MarkdownNewParamsBodyObjectRejectResourceTypeEventsource        MarkdownNewParamsBodyObjectRejectResourceType = "eventsource"
	MarkdownNewParamsBodyObjectRejectResourceTypeWebsocket          MarkdownNewParamsBodyObjectRejectResourceType = "websocket"
	MarkdownNewParamsBodyObjectRejectResourceTypeManifest           MarkdownNewParamsBodyObjectRejectResourceType = "manifest"
	MarkdownNewParamsBodyObjectRejectResourceTypeSignedexchange     MarkdownNewParamsBodyObjectRejectResourceType = "signedexchange"
	MarkdownNewParamsBodyObjectRejectResourceTypePing               MarkdownNewParamsBodyObjectRejectResourceType = "ping"
	MarkdownNewParamsBodyObjectRejectResourceTypeCspviolationreport MarkdownNewParamsBodyObjectRejectResourceType = "cspviolationreport"
	MarkdownNewParamsBodyObjectRejectResourceTypePreflight          MarkdownNewParamsBodyObjectRejectResourceType = "preflight"
	MarkdownNewParamsBodyObjectRejectResourceTypeOther              MarkdownNewParamsBodyObjectRejectResourceType = "other"
)

func (MarkdownNewParamsBodyObjectRejectResourceType) IsKnown

type MarkdownNewParamsBodyObjectViewport

type MarkdownNewParamsBodyObjectViewport struct {
	Height            param.Field[float64] `json:"height" api:"required"`
	Width             param.Field[float64] `json:"width" api:"required"`
	DeviceScaleFactor param.Field[float64] `json:"deviceScaleFactor"`
	HasTouch          param.Field[bool]    `json:"hasTouch"`
	IsLandscape       param.Field[bool]    `json:"isLandscape"`
	IsMobile          param.Field[bool]    `json:"isMobile"`
}

Check [options](https://pptr.dev/api/puppeteer.page.setviewport).

func (MarkdownNewParamsBodyObjectViewport) MarshalJSON

func (r MarkdownNewParamsBodyObjectViewport) MarshalJSON() (data []byte, err error)

type MarkdownNewParamsBodyObjectWaitForSelector

type MarkdownNewParamsBodyObjectWaitForSelector struct {
	Selector param.Field[string]                                            `json:"selector" api:"required"`
	Hidden   param.Field[MarkdownNewParamsBodyObjectWaitForSelectorHidden]  `json:"hidden"`
	Timeout  param.Field[float64]                                           `json:"timeout"`
	Visible  param.Field[MarkdownNewParamsBodyObjectWaitForSelectorVisible] `json:"visible"`
}

Wait for the selector to appear in page. Check [options](https://pptr.dev/api/puppeteer.page.waitforselector).

func (MarkdownNewParamsBodyObjectWaitForSelector) MarshalJSON

func (r MarkdownNewParamsBodyObjectWaitForSelector) MarshalJSON() (data []byte, err error)

type MarkdownNewParamsBodyObjectWaitForSelectorHidden

type MarkdownNewParamsBodyObjectWaitForSelectorHidden bool
const (
	MarkdownNewParamsBodyObjectWaitForSelectorHiddenTrue MarkdownNewParamsBodyObjectWaitForSelectorHidden = true
)

func (MarkdownNewParamsBodyObjectWaitForSelectorHidden) IsKnown

type MarkdownNewParamsBodyObjectWaitForSelectorVisible

type MarkdownNewParamsBodyObjectWaitForSelectorVisible bool
const (
	MarkdownNewParamsBodyObjectWaitForSelectorVisibleTrue MarkdownNewParamsBodyObjectWaitForSelectorVisible = true
)

func (MarkdownNewParamsBodyObjectWaitForSelectorVisible) IsKnown

type MarkdownNewParamsBodyUnion

type MarkdownNewParamsBodyUnion interface {
	// contains filtered or unexported methods
}

Satisfied by browser_rendering.MarkdownNewParamsBodyObject, browser_rendering.MarkdownNewParamsBodyObject, MarkdownNewParamsBody.

type MarkdownNewResponseEnvelope

type MarkdownNewResponseEnvelope struct {
	// Response status.
	Success bool                                `json:"success" api:"required"`
	Errors  []MarkdownNewResponseEnvelopeErrors `json:"errors"`
	// Markdown content.
	Result string                          `json:"result"`
	JSON   markdownNewResponseEnvelopeJSON `json:"-"`
}

func (*MarkdownNewResponseEnvelope) UnmarshalJSON

func (r *MarkdownNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type MarkdownNewResponseEnvelopeErrors

type MarkdownNewResponseEnvelopeErrors struct {
	// Error code.
	Code float64 `json:"code" api:"required"`
	// Error message.
	Message string                                `json:"message" api:"required"`
	JSON    markdownNewResponseEnvelopeErrorsJSON `json:"-"`
}

func (*MarkdownNewResponseEnvelopeErrors) UnmarshalJSON

func (r *MarkdownNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type MarkdownService

type MarkdownService struct {
	Options []option.RequestOption
}

MarkdownService contains methods and other services that help with interacting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMarkdownService method instead.

func NewMarkdownService

func NewMarkdownService(opts ...option.RequestOption) (r *MarkdownService)

NewMarkdownService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*MarkdownService) New

func (r *MarkdownService) New(ctx context.Context, params MarkdownNewParams, opts ...option.RequestOption) (res *string, err error)

Gets markdown of a webpage from provided URL or HTML. Control page loading with `gotoOptions` and `waitFor*` options.

type Member

type Member = shared.Member

This is an alias to an internal type.

type MemberPoliciesAccess

type MemberPoliciesAccess = shared.MemberPoliciesAccess

Allow or deny operations against the resources.

This is an alias to an internal type.

type MemberPoliciesPermissionGroup

type MemberPoliciesPermissionGroup = shared.MemberPoliciesPermissionGroup

A named group of permissions that map to a group of operations against resources.

This is an alias to an internal type.

type MemberPoliciesPermissionGroupsMeta

type MemberPoliciesPermissionGroupsMeta = shared.MemberPoliciesPermissionGroupsMeta

Attributes associated to the permission group.

This is an alias to an internal type.

type MemberPoliciesResourceGroup

type MemberPoliciesResourceGroup = shared.MemberPoliciesResourceGroup

A group of scoped resources.

This is an alias to an internal type.

type MemberPoliciesResourceGroupsMeta

type MemberPoliciesResourceGroupsMeta = shared.MemberPoliciesResourceGroupsMeta

Attributes associated to the resource group.

This is an alias to an internal type.

type MemberPoliciesResourceGroupsScope

type MemberPoliciesResourceGroupsScope = shared.MemberPoliciesResourceGroupsScope

A scope is a combination of scope objects which provides additional context.

This is an alias to an internal type.

type MemberPoliciesResourceGroupsScopeObject

type MemberPoliciesResourceGroupsScopeObject = shared.MemberPoliciesResourceGroupsScopeObject

A scope object represents any resource that can have actions applied against invite.

This is an alias to an internal type.

type MemberPolicy

type MemberPolicy = shared.MemberPolicy

This is an alias to an internal type.

type MemberStatus

type MemberStatus = shared.MemberStatus

A member's status in the account.

This is an alias to an internal type.

type MemberUser

type MemberUser = shared.MemberUser

Details of the user associated to the membership.

This is an alias to an internal type.

type PDFNewParams

type PDFNewParams struct {
	// Account ID.
	AccountID param.Field[string]   `path:"account_id" api:"required"`
	Body      PDFNewParamsBodyUnion `json:"body" api:"required"`
	// Cache TTL default is 5s. Set to 0 to disable.
	CacheTTL param.Field[float64] `query:"cacheTTL"`
}

func (PDFNewParams) MarshalJSON

func (r PDFNewParams) MarshalJSON() (data []byte, err error)

func (PDFNewParams) URLQuery

func (r PDFNewParams) URLQuery() (v url.Values)

URLQuery serializes PDFNewParams's query parameters as `url.Values`.

type PDFNewParamsBody

type PDFNewParamsBody struct {
	// 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       param.Field[float64]     `json:"actionTimeout"`
	AddScriptTag        param.Field[interface{}] `json:"addScriptTag"`
	AddStyleTag         param.Field[interface{}] `json:"addStyleTag"`
	AllowRequestPattern param.Field[interface{}] `json:"allowRequestPattern"`
	AllowResourceTypes  param.Field[interface{}] `json:"allowResourceTypes"`
	Authenticate        param.Field[interface{}] `json:"authenticate"`
	// Attempt to proceed when 'awaited' events fail or timeout.
	BestAttempt      param.Field[bool]        `json:"bestAttempt"`
	Cookies          param.Field[interface{}] `json:"cookies"`
	EmulateMediaType param.Field[string]      `json:"emulateMediaType"`
	GotoOptions      param.Field[interface{}] `json:"gotoOptions"`
	// Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or
	// `url` must be set.
	HTML                 param.Field[string]      `json:"html"`
	PDFOptions           param.Field[interface{}] `json:"pdfOptions"`
	RejectRequestPattern param.Field[interface{}] `json:"rejectRequestPattern"`
	RejectResourceTypes  param.Field[interface{}] `json:"rejectResourceTypes"`
	SetExtraHTTPHeaders  param.Field[interface{}] `json:"setExtraHTTPHeaders"`
	SetJavaScriptEnabled param.Field[bool]        `json:"setJavaScriptEnabled"`
	// URL to navigate to, eg. `https://example.com`.
	URL             param.Field[string]      `json:"url" format:"uri"`
	UserAgent       param.Field[string]      `json:"userAgent"`
	Viewport        param.Field[interface{}] `json:"viewport"`
	WaitForSelector param.Field[interface{}] `json:"waitForSelector"`
	// Waits for a specified timeout before continuing.
	WaitForTimeout param.Field[float64] `json:"waitForTimeout"`
}

func (PDFNewParamsBody) MarshalJSON

func (r PDFNewParamsBody) MarshalJSON() (data []byte, err error)

type PDFNewParamsBodyObject

type PDFNewParamsBodyObject struct {
	// Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or
	// `url` must be set.
	HTML param.Field[string] `json:"html" api:"required"`
	// 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 param.Field[float64] `json:"actionTimeout"`
	// Adds a `<script>` tag into the page with the desired URL or content.
	AddScriptTag param.Field[[]PDFNewParamsBodyObjectAddScriptTag] `json:"addScriptTag"`
	// Adds a `<link rel="stylesheet">` tag into the page with the desired URL or a
	// `<style type="text/css">` tag with the content.
	AddStyleTag param.Field[[]PDFNewParamsBodyObjectAddStyleTag] `json:"addStyleTag"`
	// Only allow requests that match the provided regex patterns, eg. '/^.\*\.(css)'.
	AllowRequestPattern param.Field[[]string] `json:"allowRequestPattern"`
	// Only allow requests that match the provided resource types, eg. 'image' or
	// 'script'.
	AllowResourceTypes param.Field[[]PDFNewParamsBodyObjectAllowResourceType] `json:"allowResourceTypes"`
	// Provide credentials for HTTP authentication.
	Authenticate param.Field[PDFNewParamsBodyObjectAuthenticate] `json:"authenticate"`
	// Attempt to proceed when 'awaited' events fail or timeout.
	BestAttempt param.Field[bool] `json:"bestAttempt"`
	// Check [options](https://pptr.dev/api/puppeteer.page.setcookie).
	Cookies          param.Field[[]PDFNewParamsBodyObjectCookie] `json:"cookies"`
	EmulateMediaType param.Field[string]                         `json:"emulateMediaType"`
	// Check [options](https://pptr.dev/api/puppeteer.gotooptions).
	GotoOptions param.Field[PDFNewParamsBodyObjectGotoOptions] `json:"gotoOptions"`
	// Check [options](https://pptr.dev/api/puppeteer.pdfoptions).
	PDFOptions param.Field[PDFNewParamsBodyObjectPDFOptions] `json:"pdfOptions"`
	// Block undesired requests that match the provided regex patterns, eg.
	// '/^.\*\.(css)'.
	RejectRequestPattern param.Field[[]string] `json:"rejectRequestPattern"`
	// Block undesired requests that match the provided resource types, eg. 'image' or
	// 'script'.
	RejectResourceTypes  param.Field[[]PDFNewParamsBodyObjectRejectResourceType] `json:"rejectResourceTypes"`
	SetExtraHTTPHeaders  param.Field[map[string]string]                          `json:"setExtraHTTPHeaders"`
	SetJavaScriptEnabled param.Field[bool]                                       `json:"setJavaScriptEnabled"`
	UserAgent            param.Field[string]                                     `json:"userAgent"`
	// Check [options](https://pptr.dev/api/puppeteer.page.setviewport).
	Viewport param.Field[PDFNewParamsBodyObjectViewport] `json:"viewport"`
	// Wait for the selector to appear in page. Check
	// [options](https://pptr.dev/api/puppeteer.page.waitforselector).
	WaitForSelector param.Field[PDFNewParamsBodyObjectWaitForSelector] `json:"waitForSelector"`
	// Waits for a specified timeout before continuing.
	WaitForTimeout param.Field[float64] `json:"waitForTimeout"`
}

func (PDFNewParamsBodyObject) MarshalJSON

func (r PDFNewParamsBodyObject) MarshalJSON() (data []byte, err error)

type PDFNewParamsBodyObjectAddScriptTag

type PDFNewParamsBodyObjectAddScriptTag struct {
	ID      param.Field[string] `json:"id"`
	Content param.Field[string] `json:"content"`
	Type    param.Field[string] `json:"type"`
	URL     param.Field[string] `json:"url"`
}

func (PDFNewParamsBodyObjectAddScriptTag) MarshalJSON

func (r PDFNewParamsBodyObjectAddScriptTag) MarshalJSON() (data []byte, err error)

type PDFNewParamsBodyObjectAddStyleTag

type PDFNewParamsBodyObjectAddStyleTag struct {
	Content param.Field[string] `json:"content"`
	URL     param.Field[string] `json:"url"`
}

func (PDFNewParamsBodyObjectAddStyleTag) MarshalJSON

func (r PDFNewParamsBodyObjectAddStyleTag) MarshalJSON() (data []byte, err error)

type PDFNewParamsBodyObjectAllowResourceType

type PDFNewParamsBodyObjectAllowResourceType string
const (
	PDFNewParamsBodyObjectAllowResourceTypeDocument           PDFNewParamsBodyObjectAllowResourceType = "document"
	PDFNewParamsBodyObjectAllowResourceTypeStylesheet         PDFNewParamsBodyObjectAllowResourceType = "stylesheet"
	PDFNewParamsBodyObjectAllowResourceTypeImage              PDFNewParamsBodyObjectAllowResourceType = "image"
	PDFNewParamsBodyObjectAllowResourceTypeMedia              PDFNewParamsBodyObjectAllowResourceType = "media"
	PDFNewParamsBodyObjectAllowResourceTypeFont               PDFNewParamsBodyObjectAllowResourceType = "font"
	PDFNewParamsBodyObjectAllowResourceTypeScript             PDFNewParamsBodyObjectAllowResourceType = "script"
	PDFNewParamsBodyObjectAllowResourceTypeTexttrack          PDFNewParamsBodyObjectAllowResourceType = "texttrack"
	PDFNewParamsBodyObjectAllowResourceTypeXHR                PDFNewParamsBodyObjectAllowResourceType = "xhr"
	PDFNewParamsBodyObjectAllowResourceTypeFetch              PDFNewParamsBodyObjectAllowResourceType = "fetch"
	PDFNewParamsBodyObjectAllowResourceTypePrefetch           PDFNewParamsBodyObjectAllowResourceType = "prefetch"
	PDFNewParamsBodyObjectAllowResourceTypeEventsource        PDFNewParamsBodyObjectAllowResourceType = "eventsource"
	PDFNewParamsBodyObjectAllowResourceTypeWebsocket          PDFNewParamsBodyObjectAllowResourceType = "websocket"
	PDFNewParamsBodyObjectAllowResourceTypeManifest           PDFNewParamsBodyObjectAllowResourceType = "manifest"
	PDFNewParamsBodyObjectAllowResourceTypeSignedexchange     PDFNewParamsBodyObjectAllowResourceType = "signedexchange"
	PDFNewParamsBodyObjectAllowResourceTypePing               PDFNewParamsBodyObjectAllowResourceType = "ping"
	PDFNewParamsBodyObjectAllowResourceTypeCspviolationreport PDFNewParamsBodyObjectAllowResourceType = "cspviolationreport"
	PDFNewParamsBodyObjectAllowResourceTypePreflight          PDFNewParamsBodyObjectAllowResourceType = "preflight"
	PDFNewParamsBodyObjectAllowResourceTypeOther              PDFNewParamsBodyObjectAllowResourceType = "other"
)

func (PDFNewParamsBodyObjectAllowResourceType) IsKnown

type PDFNewParamsBodyObjectAuthenticate

type PDFNewParamsBodyObjectAuthenticate struct {
	Password param.Field[string] `json:"password" api:"required"`
	Username param.Field[string] `json:"username" api:"required"`
}

Provide credentials for HTTP authentication.

func (PDFNewParamsBodyObjectAuthenticate) MarshalJSON

func (r PDFNewParamsBodyObjectAuthenticate) MarshalJSON() (data []byte, err error)

type PDFNewParamsBodyObjectCookie

type PDFNewParamsBodyObjectCookie struct {
	// Cookie name.
	Name         param.Field[string]                                    `json:"name" api:"required"`
	Value        param.Field[string]                                    `json:"value" api:"required"`
	Domain       param.Field[string]                                    `json:"domain"`
	Expires      param.Field[float64]                                   `json:"expires"`
	HTTPOnly     param.Field[bool]                                      `json:"httpOnly"`
	PartitionKey param.Field[string]                                    `json:"partitionKey"`
	Path         param.Field[string]                                    `json:"path"`
	Priority     param.Field[PDFNewParamsBodyObjectCookiesPriority]     `json:"priority"`
	SameParty    param.Field[bool]                                      `json:"sameParty"`
	SameSite     param.Field[PDFNewParamsBodyObjectCookiesSameSite]     `json:"sameSite"`
	Secure       param.Field[bool]                                      `json:"secure"`
	SourcePort   param.Field[float64]                                   `json:"sourcePort"`
	SourceScheme param.Field[PDFNewParamsBodyObjectCookiesSourceScheme] `json:"sourceScheme"`
	URL          param.Field[string]                                    `json:"url"`
}

func (PDFNewParamsBodyObjectCookie) MarshalJSON

func (r PDFNewParamsBodyObjectCookie) MarshalJSON() (data []byte, err error)

type PDFNewParamsBodyObjectCookiesPriority

type PDFNewParamsBodyObjectCookiesPriority string
const (
	PDFNewParamsBodyObjectCookiesPriorityLow    PDFNewParamsBodyObjectCookiesPriority = "Low"
	PDFNewParamsBodyObjectCookiesPriorityMedium PDFNewParamsBodyObjectCookiesPriority = "Medium"
	PDFNewParamsBodyObjectCookiesPriorityHigh   PDFNewParamsBodyObjectCookiesPriority = "High"
)

func (PDFNewParamsBodyObjectCookiesPriority) IsKnown

type PDFNewParamsBodyObjectCookiesSameSite

type PDFNewParamsBodyObjectCookiesSameSite string
const (
	PDFNewParamsBodyObjectCookiesSameSiteStrict PDFNewParamsBodyObjectCookiesSameSite = "Strict"
	PDFNewParamsBodyObjectCookiesSameSiteLax    PDFNewParamsBodyObjectCookiesSameSite = "Lax"
	PDFNewParamsBodyObjectCookiesSameSiteNone   PDFNewParamsBodyObjectCookiesSameSite = "None"
)

func (PDFNewParamsBodyObjectCookiesSameSite) IsKnown

type PDFNewParamsBodyObjectCookiesSourceScheme

type PDFNewParamsBodyObjectCookiesSourceScheme string
const (
	PDFNewParamsBodyObjectCookiesSourceSchemeUnset     PDFNewParamsBodyObjectCookiesSourceScheme = "Unset"
	PDFNewParamsBodyObjectCookiesSourceSchemeNonSecure PDFNewParamsBodyObjectCookiesSourceScheme = "NonSecure"
	PDFNewParamsBodyObjectCookiesSourceSchemeSecure    PDFNewParamsBodyObjectCookiesSourceScheme = "Secure"
)

func (PDFNewParamsBodyObjectCookiesSourceScheme) IsKnown

type PDFNewParamsBodyObjectGotoOptions

type PDFNewParamsBodyObjectGotoOptions struct {
	Referer        param.Field[string]                                          `json:"referer"`
	ReferrerPolicy param.Field[string]                                          `json:"referrerPolicy"`
	Timeout        param.Field[float64]                                         `json:"timeout"`
	WaitUntil      param.Field[PDFNewParamsBodyObjectGotoOptionsWaitUntilUnion] `json:"waitUntil"`
}

Check [options](https://pptr.dev/api/puppeteer.gotooptions).

func (PDFNewParamsBodyObjectGotoOptions) MarshalJSON

func (r PDFNewParamsBodyObjectGotoOptions) MarshalJSON() (data []byte, err error)

type PDFNewParamsBodyObjectGotoOptionsWaitUntilArrayItem

type PDFNewParamsBodyObjectGotoOptionsWaitUntilArrayItem string
const (
	PDFNewParamsBodyObjectGotoOptionsWaitUntilArrayItemLoad             PDFNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "load"
	PDFNewParamsBodyObjectGotoOptionsWaitUntilArrayItemDomcontentloaded PDFNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "domcontentloaded"
	PDFNewParamsBodyObjectGotoOptionsWaitUntilArrayItemNetworkidle0     PDFNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "networkidle0"
	PDFNewParamsBodyObjectGotoOptionsWaitUntilArrayItemNetworkidle2     PDFNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "networkidle2"
)

func (PDFNewParamsBodyObjectGotoOptionsWaitUntilArrayItem) IsKnown

type PDFNewParamsBodyObjectGotoOptionsWaitUntilString

type PDFNewParamsBodyObjectGotoOptionsWaitUntilString string
const (
	PDFNewParamsBodyObjectGotoOptionsWaitUntilStringLoad             PDFNewParamsBodyObjectGotoOptionsWaitUntilString = "load"
	PDFNewParamsBodyObjectGotoOptionsWaitUntilStringDomcontentloaded PDFNewParamsBodyObjectGotoOptionsWaitUntilString = "domcontentloaded"
	PDFNewParamsBodyObjectGotoOptionsWaitUntilStringNetworkidle0     PDFNewParamsBodyObjectGotoOptionsWaitUntilString = "networkidle0"
	PDFNewParamsBodyObjectGotoOptionsWaitUntilStringNetworkidle2     PDFNewParamsBodyObjectGotoOptionsWaitUntilString = "networkidle2"
)

func (PDFNewParamsBodyObjectGotoOptionsWaitUntilString) IsKnown

type PDFNewParamsBodyObjectGotoOptionsWaitUntilUnion

type PDFNewParamsBodyObjectGotoOptionsWaitUntilUnion interface {
	// contains filtered or unexported methods
}

Satisfied by browser_rendering.PDFNewParamsBodyObjectGotoOptionsWaitUntilString, browser_rendering.PDFNewParamsBodyObjectGotoOptionsWaitUntilArray.

type PDFNewParamsBodyObjectPDFOptions

type PDFNewParamsBodyObjectPDFOptions struct {
	// Whether to show the header and footer.
	DisplayHeaderFooter param.Field[bool] `json:"displayHeaderFooter"`
	// HTML template for the print footer.
	FooterTemplate param.Field[string] `json:"footerTemplate"`
	// Paper format. Takes priority over width and height if set.
	Format param.Field[PDFNewParamsBodyObjectPDFOptionsFormat] `json:"format"`
	// HTML template for the print header.
	HeaderTemplate param.Field[string] `json:"headerTemplate"`
	// Sets the height of paper. Can be a number or string with unit.
	Height param.Field[PDFNewParamsBodyObjectPDFOptionsHeightUnion] `json:"height"`
	// Whether to print in landscape orientation.
	Landscape param.Field[bool] `json:"landscape"`
	// Set the PDF margins. Useful when setting header and footer.
	Margin param.Field[PDFNewParamsBodyObjectPDFOptionsMargin] `json:"margin"`
	// Hides default white background and allows generating pdfs with transparency.
	OmitBackground param.Field[bool] `json:"omitBackground"`
	// Generate document outline.
	Outline param.Field[bool] `json:"outline"`
	// Paper ranges to print, e.g. '1-5, 8, 11-13'.
	PageRanges param.Field[string] `json:"pageRanges"`
	// Give CSS @page size priority over other size declarations.
	PreferCSSPageSize param.Field[bool] `json:"preferCSSPageSize"`
	// Set to true to print background graphics.
	PrintBackground param.Field[bool] `json:"printBackground"`
	// Scales the rendering of the web page. Amount must be between 0.1 and 2.
	Scale param.Field[float64] `json:"scale"`
	// Generate tagged (accessible) PDF.
	Tagged param.Field[bool] `json:"tagged"`
	// Timeout in milliseconds.
	Timeout param.Field[float64] `json:"timeout"`
	// Sets the width of paper. Can be a number or string with unit.
	Width param.Field[PDFNewParamsBodyObjectPDFOptionsWidthUnion] `json:"width"`
}

Check [options](https://pptr.dev/api/puppeteer.pdfoptions).

func (PDFNewParamsBodyObjectPDFOptions) MarshalJSON

func (r PDFNewParamsBodyObjectPDFOptions) MarshalJSON() (data []byte, err error)

type PDFNewParamsBodyObjectPDFOptionsFormat

type PDFNewParamsBodyObjectPDFOptionsFormat string

Paper format. Takes priority over width and height if set.

const (
	PDFNewParamsBodyObjectPDFOptionsFormatLetter  PDFNewParamsBodyObjectPDFOptionsFormat = "letter"
	PDFNewParamsBodyObjectPDFOptionsFormatLegal   PDFNewParamsBodyObjectPDFOptionsFormat = "legal"
	PDFNewParamsBodyObjectPDFOptionsFormatTabloid PDFNewParamsBodyObjectPDFOptionsFormat = "tabloid"
	PDFNewParamsBodyObjectPDFOptionsFormatLedger  PDFNewParamsBodyObjectPDFOptionsFormat = "ledger"
	PDFNewParamsBodyObjectPDFOptionsFormatA0      PDFNewParamsBodyObjectPDFOptionsFormat = "a0"
	PDFNewParamsBodyObjectPDFOptionsFormatA1      PDFNewParamsBodyObjectPDFOptionsFormat = "a1"
	PDFNewParamsBodyObjectPDFOptionsFormatA2      PDFNewParamsBodyObjectPDFOptionsFormat = "a2"
	PDFNewParamsBodyObjectPDFOptionsFormatA3      PDFNewParamsBodyObjectPDFOptionsFormat = "a3"
	PDFNewParamsBodyObjectPDFOptionsFormatA4      PDFNewParamsBodyObjectPDFOptionsFormat = "a4"
	PDFNewParamsBodyObjectPDFOptionsFormatA5      PDFNewParamsBodyObjectPDFOptionsFormat = "a5"
	PDFNewParamsBodyObjectPDFOptionsFormatA6      PDFNewParamsBodyObjectPDFOptionsFormat = "a6"
)

func (PDFNewParamsBodyObjectPDFOptionsFormat) IsKnown

type PDFNewParamsBodyObjectPDFOptionsHeightUnion

type PDFNewParamsBodyObjectPDFOptionsHeightUnion interface {
	ImplementsPDFNewParamsBodyObjectPDFOptionsHeightUnion()
}

Sets the height of paper. Can be a number or string with unit.

Satisfied by shared.UnionString, shared.UnionFloat.

type PDFNewParamsBodyObjectPDFOptionsMargin

Set the PDF margins. Useful when setting header and footer.

func (PDFNewParamsBodyObjectPDFOptionsMargin) MarshalJSON

func (r PDFNewParamsBodyObjectPDFOptionsMargin) MarshalJSON() (data []byte, err error)

type PDFNewParamsBodyObjectPDFOptionsMarginBottomUnion

type PDFNewParamsBodyObjectPDFOptionsMarginBottomUnion interface {
	ImplementsPDFNewParamsBodyObjectPDFOptionsMarginBottomUnion()
}

Satisfied by shared.UnionString, shared.UnionFloat.

type PDFNewParamsBodyObjectPDFOptionsMarginLeftUnion

type PDFNewParamsBodyObjectPDFOptionsMarginLeftUnion interface {
	ImplementsPDFNewParamsBodyObjectPDFOptionsMarginLeftUnion()
}

Satisfied by shared.UnionString, shared.UnionFloat.

type PDFNewParamsBodyObjectPDFOptionsMarginRightUnion

type PDFNewParamsBodyObjectPDFOptionsMarginRightUnion interface {
	ImplementsPDFNewParamsBodyObjectPDFOptionsMarginRightUnion()
}

Satisfied by shared.UnionString, shared.UnionFloat.

type PDFNewParamsBodyObjectPDFOptionsMarginTopUnion

type PDFNewParamsBodyObjectPDFOptionsMarginTopUnion interface {
	ImplementsPDFNewParamsBodyObjectPDFOptionsMarginTopUnion()
}

Satisfied by shared.UnionString, shared.UnionFloat.

type PDFNewParamsBodyObjectPDFOptionsWidthUnion

type PDFNewParamsBodyObjectPDFOptionsWidthUnion interface {
	ImplementsPDFNewParamsBodyObjectPDFOptionsWidthUnion()
}

Sets the width of paper. Can be a number or string with unit.

Satisfied by shared.UnionString, shared.UnionFloat.

type PDFNewParamsBodyObjectRejectResourceType

type PDFNewParamsBodyObjectRejectResourceType string
const (
	PDFNewParamsBodyObjectRejectResourceTypeDocument           PDFNewParamsBodyObjectRejectResourceType = "document"
	PDFNewParamsBodyObjectRejectResourceTypeStylesheet         PDFNewParamsBodyObjectRejectResourceType = "stylesheet"
	PDFNewParamsBodyObjectRejectResourceTypeImage              PDFNewParamsBodyObjectRejectResourceType = "image"
	PDFNewParamsBodyObjectRejectResourceTypeMedia              PDFNewParamsBodyObjectRejectResourceType = "media"
	PDFNewParamsBodyObjectRejectResourceTypeFont               PDFNewParamsBodyObjectRejectResourceType = "font"
	PDFNewParamsBodyObjectRejectResourceTypeScript             PDFNewParamsBodyObjectRejectResourceType = "script"
	PDFNewParamsBodyObjectRejectResourceTypeTexttrack          PDFNewParamsBodyObjectRejectResourceType = "texttrack"
	PDFNewParamsBodyObjectRejectResourceTypeXHR                PDFNewParamsBodyObjectRejectResourceType = "xhr"
	PDFNewParamsBodyObjectRejectResourceTypeFetch              PDFNewParamsBodyObjectRejectResourceType = "fetch"
	PDFNewParamsBodyObjectRejectResourceTypePrefetch           PDFNewParamsBodyObjectRejectResourceType = "prefetch"
	PDFNewParamsBodyObjectRejectResourceTypeEventsource        PDFNewParamsBodyObjectRejectResourceType = "eventsource"
	PDFNewParamsBodyObjectRejectResourceTypeWebsocket          PDFNewParamsBodyObjectRejectResourceType = "websocket"
	PDFNewParamsBodyObjectRejectResourceTypeManifest           PDFNewParamsBodyObjectRejectResourceType = "manifest"
	PDFNewParamsBodyObjectRejectResourceTypeSignedexchange     PDFNewParamsBodyObjectRejectResourceType = "signedexchange"
	PDFNewParamsBodyObjectRejectResourceTypePing               PDFNewParamsBodyObjectRejectResourceType = "ping"
	PDFNewParamsBodyObjectRejectResourceTypeCspviolationreport PDFNewParamsBodyObjectRejectResourceType = "cspviolationreport"
	PDFNewParamsBodyObjectRejectResourceTypePreflight          PDFNewParamsBodyObjectRejectResourceType = "preflight"
	PDFNewParamsBodyObjectRejectResourceTypeOther              PDFNewParamsBodyObjectRejectResourceType = "other"
)

func (PDFNewParamsBodyObjectRejectResourceType) IsKnown

type PDFNewParamsBodyObjectViewport

type PDFNewParamsBodyObjectViewport struct {
	Height            param.Field[float64] `json:"height" api:"required"`
	Width             param.Field[float64] `json:"width" api:"required"`
	DeviceScaleFactor param.Field[float64] `json:"deviceScaleFactor"`
	HasTouch          param.Field[bool]    `json:"hasTouch"`
	IsLandscape       param.Field[bool]    `json:"isLandscape"`
	IsMobile          param.Field[bool]    `json:"isMobile"`
}

Check [options](https://pptr.dev/api/puppeteer.page.setviewport).

func (PDFNewParamsBodyObjectViewport) MarshalJSON

func (r PDFNewParamsBodyObjectViewport) MarshalJSON() (data []byte, err error)

type PDFNewParamsBodyObjectWaitForSelector

type PDFNewParamsBodyObjectWaitForSelector struct {
	Selector param.Field[string]                                       `json:"selector" api:"required"`
	Hidden   param.Field[PDFNewParamsBodyObjectWaitForSelectorHidden]  `json:"hidden"`
	Timeout  param.Field[float64]                                      `json:"timeout"`
	Visible  param.Field[PDFNewParamsBodyObjectWaitForSelectorVisible] `json:"visible"`
}

Wait for the selector to appear in page. Check [options](https://pptr.dev/api/puppeteer.page.waitforselector).

func (PDFNewParamsBodyObjectWaitForSelector) MarshalJSON

func (r PDFNewParamsBodyObjectWaitForSelector) MarshalJSON() (data []byte, err error)

type PDFNewParamsBodyObjectWaitForSelectorHidden

type PDFNewParamsBodyObjectWaitForSelectorHidden bool
const (
	PDFNewParamsBodyObjectWaitForSelectorHiddenTrue PDFNewParamsBodyObjectWaitForSelectorHidden = true
)

func (PDFNewParamsBodyObjectWaitForSelectorHidden) IsKnown

type PDFNewParamsBodyObjectWaitForSelectorVisible

type PDFNewParamsBodyObjectWaitForSelectorVisible bool
const (
	PDFNewParamsBodyObjectWaitForSelectorVisibleTrue PDFNewParamsBodyObjectWaitForSelectorVisible = true
)

func (PDFNewParamsBodyObjectWaitForSelectorVisible) IsKnown

type PDFNewParamsBodyUnion

type PDFNewParamsBodyUnion interface {
	// contains filtered or unexported methods
}

Satisfied by browser_rendering.PDFNewParamsBodyObject, browser_rendering.PDFNewParamsBodyObject, PDFNewParamsBody.

type PDFService

type PDFService struct {
	Options []option.RequestOption
}

PDFService contains methods and other services that help with interacting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPDFService method instead.

func NewPDFService

func NewPDFService(opts ...option.RequestOption) (r *PDFService)

NewPDFService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*PDFService) New

func (r *PDFService) New(ctx context.Context, params PDFNewParams, opts ...option.RequestOption) (res *http.Response, err error)

Fetches rendered PDF from provided URL or HTML. Check available options like `gotoOptions` and `waitFor*` to control page load behaviour.

type Permission

type Permission = shared.Permission

This is an alias to an internal type.

type PermissionGrant

type PermissionGrant = shared.PermissionGrant

This is an alias to an internal type.

type PermissionGrantParam

type PermissionGrantParam = shared.PermissionGrantParam

This is an alias to an internal type.

type RatePlan

type RatePlan = shared.RatePlan

The rate plan applied to the subscription.

This is an alias to an internal type.

type RatePlanID

type RatePlanID = shared.RatePlanID

The ID of the rate plan.

This is an alias to an internal type.

type RatePlanParam

type RatePlanParam = shared.RatePlanParam

The rate plan applied to the subscription.

This is an alias to an internal type.

type ResponseInfo

type ResponseInfo = shared.ResponseInfo

This is an alias to an internal type.

type ResponseInfoSource

type ResponseInfoSource = shared.ResponseInfoSource

This is an alias to an internal type.

type Role

type Role = shared.Role

This is an alias to an internal type.

type RoleParam

type RoleParam = shared.RoleParam

This is an alias to an internal type.

type RolePermissions

type RolePermissions = shared.RolePermissions

This is an alias to an internal type.

type RolePermissionsParam

type RolePermissionsParam = shared.RolePermissionsParam

This is an alias to an internal type.

type ScrapeNewParams

type ScrapeNewParams struct {
	// Account ID.
	AccountID param.Field[string]      `path:"account_id" api:"required"`
	Body      ScrapeNewParamsBodyUnion `json:"body" api:"required"`
	// Cache TTL default is 5s. Set to 0 to disable.
	CacheTTL param.Field[float64] `query:"cacheTTL"`
}

func (ScrapeNewParams) MarshalJSON

func (r ScrapeNewParams) MarshalJSON() (data []byte, err error)

func (ScrapeNewParams) URLQuery

func (r ScrapeNewParams) URLQuery() (v url.Values)

URLQuery serializes ScrapeNewParams's query parameters as `url.Values`.

type ScrapeNewParamsBody

type ScrapeNewParamsBody struct {
	Elements param.Field[interface{}] `json:"elements" api:"required"`
	// 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       param.Field[float64]     `json:"actionTimeout"`
	AddScriptTag        param.Field[interface{}] `json:"addScriptTag"`
	AddStyleTag         param.Field[interface{}] `json:"addStyleTag"`
	AllowRequestPattern param.Field[interface{}] `json:"allowRequestPattern"`
	AllowResourceTypes  param.Field[interface{}] `json:"allowResourceTypes"`
	Authenticate        param.Field[interface{}] `json:"authenticate"`
	// Attempt to proceed when 'awaited' events fail or timeout.
	BestAttempt      param.Field[bool]        `json:"bestAttempt"`
	Cookies          param.Field[interface{}] `json:"cookies"`
	EmulateMediaType param.Field[string]      `json:"emulateMediaType"`
	GotoOptions      param.Field[interface{}] `json:"gotoOptions"`
	// Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or
	// `url` must be set.
	HTML                 param.Field[string]      `json:"html"`
	RejectRequestPattern param.Field[interface{}] `json:"rejectRequestPattern"`
	RejectResourceTypes  param.Field[interface{}] `json:"rejectResourceTypes"`
	SetExtraHTTPHeaders  param.Field[interface{}] `json:"setExtraHTTPHeaders"`
	SetJavaScriptEnabled param.Field[bool]        `json:"setJavaScriptEnabled"`
	// URL to navigate to, eg. `https://example.com`.
	URL             param.Field[string]      `json:"url" format:"uri"`
	UserAgent       param.Field[string]      `json:"userAgent"`
	Viewport        param.Field[interface{}] `json:"viewport"`
	WaitForSelector param.Field[interface{}] `json:"waitForSelector"`
	// Waits for a specified timeout before continuing.
	WaitForTimeout param.Field[float64] `json:"waitForTimeout"`
}

func (ScrapeNewParamsBody) MarshalJSON

func (r ScrapeNewParamsBody) MarshalJSON() (data []byte, err error)

type ScrapeNewParamsBodyObject

type ScrapeNewParamsBodyObject struct {
	Elements param.Field[[]ScrapeNewParamsBodyObjectElement] `json:"elements" api:"required"`
	// Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or
	// `url` must be set.
	HTML param.Field[string] `json:"html" api:"required"`
	// 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 param.Field[float64] `json:"actionTimeout"`
	// Adds a `<script>` tag into the page with the desired URL or content.
	AddScriptTag param.Field[[]ScrapeNewParamsBodyObjectAddScriptTag] `json:"addScriptTag"`
	// Adds a `<link rel="stylesheet">` tag into the page with the desired URL or a
	// `<style type="text/css">` tag with the content.
	AddStyleTag param.Field[[]ScrapeNewParamsBodyObjectAddStyleTag] `json:"addStyleTag"`
	// Only allow requests that match the provided regex patterns, eg. '/^.\*\.(css)'.
	AllowRequestPattern param.Field[[]string] `json:"allowRequestPattern"`
	// Only allow requests that match the provided resource types, eg. 'image' or
	// 'script'.
	AllowResourceTypes param.Field[[]ScrapeNewParamsBodyObjectAllowResourceType] `json:"allowResourceTypes"`
	// Provide credentials for HTTP authentication.
	Authenticate param.Field[ScrapeNewParamsBodyObjectAuthenticate] `json:"authenticate"`
	// Attempt to proceed when 'awaited' events fail or timeout.
	BestAttempt param.Field[bool] `json:"bestAttempt"`
	// Check [options](https://pptr.dev/api/puppeteer.page.setcookie).
	Cookies          param.Field[[]ScrapeNewParamsBodyObjectCookie] `json:"cookies"`
	EmulateMediaType param.Field[string]                            `json:"emulateMediaType"`
	// Check [options](https://pptr.dev/api/puppeteer.gotooptions).
	GotoOptions param.Field[ScrapeNewParamsBodyObjectGotoOptions] `json:"gotoOptions"`
	// Block undesired requests that match the provided regex patterns, eg.
	// '/^.\*\.(css)'.
	RejectRequestPattern param.Field[[]string] `json:"rejectRequestPattern"`
	// Block undesired requests that match the provided resource types, eg. 'image' or
	// 'script'.
	RejectResourceTypes  param.Field[[]ScrapeNewParamsBodyObjectRejectResourceType] `json:"rejectResourceTypes"`
	SetExtraHTTPHeaders  param.Field[map[string]string]                             `json:"setExtraHTTPHeaders"`
	SetJavaScriptEnabled param.Field[bool]                                          `json:"setJavaScriptEnabled"`
	UserAgent            param.Field[string]                                        `json:"userAgent"`
	// Check [options](https://pptr.dev/api/puppeteer.page.setviewport).
	Viewport param.Field[ScrapeNewParamsBodyObjectViewport] `json:"viewport"`
	// Wait for the selector to appear in page. Check
	// [options](https://pptr.dev/api/puppeteer.page.waitforselector).
	WaitForSelector param.Field[ScrapeNewParamsBodyObjectWaitForSelector] `json:"waitForSelector"`
	// Waits for a specified timeout before continuing.
	WaitForTimeout param.Field[float64] `json:"waitForTimeout"`
}

func (ScrapeNewParamsBodyObject) MarshalJSON

func (r ScrapeNewParamsBodyObject) MarshalJSON() (data []byte, err error)

type ScrapeNewParamsBodyObjectAddScriptTag

type ScrapeNewParamsBodyObjectAddScriptTag struct {
	ID      param.Field[string] `json:"id"`
	Content param.Field[string] `json:"content"`
	Type    param.Field[string] `json:"type"`
	URL     param.Field[string] `json:"url"`
}

func (ScrapeNewParamsBodyObjectAddScriptTag) MarshalJSON

func (r ScrapeNewParamsBodyObjectAddScriptTag) MarshalJSON() (data []byte, err error)

type ScrapeNewParamsBodyObjectAddStyleTag

type ScrapeNewParamsBodyObjectAddStyleTag struct {
	Content param.Field[string] `json:"content"`
	URL     param.Field[string] `json:"url"`
}

func (ScrapeNewParamsBodyObjectAddStyleTag) MarshalJSON

func (r ScrapeNewParamsBodyObjectAddStyleTag) MarshalJSON() (data []byte, err error)

type ScrapeNewParamsBodyObjectAllowResourceType

type ScrapeNewParamsBodyObjectAllowResourceType string
const (
	ScrapeNewParamsBodyObjectAllowResourceTypeDocument           ScrapeNewParamsBodyObjectAllowResourceType = "document"
	ScrapeNewParamsBodyObjectAllowResourceTypeStylesheet         ScrapeNewParamsBodyObjectAllowResourceType = "stylesheet"
	ScrapeNewParamsBodyObjectAllowResourceTypeImage              ScrapeNewParamsBodyObjectAllowResourceType = "image"
	ScrapeNewParamsBodyObjectAllowResourceTypeMedia              ScrapeNewParamsBodyObjectAllowResourceType = "media"
	ScrapeNewParamsBodyObjectAllowResourceTypeFont               ScrapeNewParamsBodyObjectAllowResourceType = "font"
	ScrapeNewParamsBodyObjectAllowResourceTypeScript             ScrapeNewParamsBodyObjectAllowResourceType = "script"
	ScrapeNewParamsBodyObjectAllowResourceTypeTexttrack          ScrapeNewParamsBodyObjectAllowResourceType = "texttrack"
	ScrapeNewParamsBodyObjectAllowResourceTypeXHR                ScrapeNewParamsBodyObjectAllowResourceType = "xhr"
	ScrapeNewParamsBodyObjectAllowResourceTypeFetch              ScrapeNewParamsBodyObjectAllowResourceType = "fetch"
	ScrapeNewParamsBodyObjectAllowResourceTypePrefetch           ScrapeNewParamsBodyObjectAllowResourceType = "prefetch"
	ScrapeNewParamsBodyObjectAllowResourceTypeEventsource        ScrapeNewParamsBodyObjectAllowResourceType = "eventsource"
	ScrapeNewParamsBodyObjectAllowResourceTypeWebsocket          ScrapeNewParamsBodyObjectAllowResourceType = "websocket"
	ScrapeNewParamsBodyObjectAllowResourceTypeManifest           ScrapeNewParamsBodyObjectAllowResourceType = "manifest"
	ScrapeNewParamsBodyObjectAllowResourceTypeSignedexchange     ScrapeNewParamsBodyObjectAllowResourceType = "signedexchange"
	ScrapeNewParamsBodyObjectAllowResourceTypePing               ScrapeNewParamsBodyObjectAllowResourceType = "ping"
	ScrapeNewParamsBodyObjectAllowResourceTypeCspviolationreport ScrapeNewParamsBodyObjectAllowResourceType = "cspviolationreport"
	ScrapeNewParamsBodyObjectAllowResourceTypePreflight          ScrapeNewParamsBodyObjectAllowResourceType = "preflight"
	ScrapeNewParamsBodyObjectAllowResourceTypeOther              ScrapeNewParamsBodyObjectAllowResourceType = "other"
)

func (ScrapeNewParamsBodyObjectAllowResourceType) IsKnown

type ScrapeNewParamsBodyObjectAuthenticate

type ScrapeNewParamsBodyObjectAuthenticate struct {
	Password param.Field[string] `json:"password" api:"required"`
	Username param.Field[string] `json:"username" api:"required"`
}

Provide credentials for HTTP authentication.

func (ScrapeNewParamsBodyObjectAuthenticate) MarshalJSON

func (r ScrapeNewParamsBodyObjectAuthenticate) MarshalJSON() (data []byte, err error)

type ScrapeNewParamsBodyObjectCookie

type ScrapeNewParamsBodyObjectCookie struct {
	// Cookie name.
	Name         param.Field[string]                                       `json:"name" api:"required"`
	Value        param.Field[string]                                       `json:"value" api:"required"`
	Domain       param.Field[string]                                       `json:"domain"`
	Expires      param.Field[float64]                                      `json:"expires"`
	HTTPOnly     param.Field[bool]                                         `json:"httpOnly"`
	PartitionKey param.Field[string]                                       `json:"partitionKey"`
	Path         param.Field[string]                                       `json:"path"`
	Priority     param.Field[ScrapeNewParamsBodyObjectCookiesPriority]     `json:"priority"`
	SameParty    param.Field[bool]                                         `json:"sameParty"`
	SameSite     param.Field[ScrapeNewParamsBodyObjectCookiesSameSite]     `json:"sameSite"`
	Secure       param.Field[bool]                                         `json:"secure"`
	SourcePort   param.Field[float64]                                      `json:"sourcePort"`
	SourceScheme param.Field[ScrapeNewParamsBodyObjectCookiesSourceScheme] `json:"sourceScheme"`
	URL          param.Field[string]                                       `json:"url"`
}

func (ScrapeNewParamsBodyObjectCookie) MarshalJSON

func (r ScrapeNewParamsBodyObjectCookie) MarshalJSON() (data []byte, err error)

type ScrapeNewParamsBodyObjectCookiesPriority

type ScrapeNewParamsBodyObjectCookiesPriority string
const (
	ScrapeNewParamsBodyObjectCookiesPriorityLow    ScrapeNewParamsBodyObjectCookiesPriority = "Low"
	ScrapeNewParamsBodyObjectCookiesPriorityMedium ScrapeNewParamsBodyObjectCookiesPriority = "Medium"
	ScrapeNewParamsBodyObjectCookiesPriorityHigh   ScrapeNewParamsBodyObjectCookiesPriority = "High"
)

func (ScrapeNewParamsBodyObjectCookiesPriority) IsKnown

type ScrapeNewParamsBodyObjectCookiesSameSite

type ScrapeNewParamsBodyObjectCookiesSameSite string
const (
	ScrapeNewParamsBodyObjectCookiesSameSiteStrict ScrapeNewParamsBodyObjectCookiesSameSite = "Strict"
	ScrapeNewParamsBodyObjectCookiesSameSiteLax    ScrapeNewParamsBodyObjectCookiesSameSite = "Lax"
	ScrapeNewParamsBodyObjectCookiesSameSiteNone   ScrapeNewParamsBodyObjectCookiesSameSite = "None"
)

func (ScrapeNewParamsBodyObjectCookiesSameSite) IsKnown

type ScrapeNewParamsBodyObjectCookiesSourceScheme

type ScrapeNewParamsBodyObjectCookiesSourceScheme string
const (
	ScrapeNewParamsBodyObjectCookiesSourceSchemeUnset     ScrapeNewParamsBodyObjectCookiesSourceScheme = "Unset"
	ScrapeNewParamsBodyObjectCookiesSourceSchemeNonSecure ScrapeNewParamsBodyObjectCookiesSourceScheme = "NonSecure"
	ScrapeNewParamsBodyObjectCookiesSourceSchemeSecure    ScrapeNewParamsBodyObjectCookiesSourceScheme = "Secure"
)

func (ScrapeNewParamsBodyObjectCookiesSourceScheme) IsKnown

type ScrapeNewParamsBodyObjectElement

type ScrapeNewParamsBodyObjectElement struct {
	Selector param.Field[string] `json:"selector" api:"required"`
}

func (ScrapeNewParamsBodyObjectElement) MarshalJSON

func (r ScrapeNewParamsBodyObjectElement) MarshalJSON() (data []byte, err error)

type ScrapeNewParamsBodyObjectGotoOptions

type ScrapeNewParamsBodyObjectGotoOptions struct {
	Referer        param.Field[string]                                             `json:"referer"`
	ReferrerPolicy param.Field[string]                                             `json:"referrerPolicy"`
	Timeout        param.Field[float64]                                            `json:"timeout"`
	WaitUntil      param.Field[ScrapeNewParamsBodyObjectGotoOptionsWaitUntilUnion] `json:"waitUntil"`
}

Check [options](https://pptr.dev/api/puppeteer.gotooptions).

func (ScrapeNewParamsBodyObjectGotoOptions) MarshalJSON

func (r ScrapeNewParamsBodyObjectGotoOptions) MarshalJSON() (data []byte, err error)

type ScrapeNewParamsBodyObjectGotoOptionsWaitUntilArrayItem

type ScrapeNewParamsBodyObjectGotoOptionsWaitUntilArrayItem string
const (
	ScrapeNewParamsBodyObjectGotoOptionsWaitUntilArrayItemLoad             ScrapeNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "load"
	ScrapeNewParamsBodyObjectGotoOptionsWaitUntilArrayItemDomcontentloaded ScrapeNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "domcontentloaded"
	ScrapeNewParamsBodyObjectGotoOptionsWaitUntilArrayItemNetworkidle0     ScrapeNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "networkidle0"
	ScrapeNewParamsBodyObjectGotoOptionsWaitUntilArrayItemNetworkidle2     ScrapeNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "networkidle2"
)

func (ScrapeNewParamsBodyObjectGotoOptionsWaitUntilArrayItem) IsKnown

type ScrapeNewParamsBodyObjectGotoOptionsWaitUntilString

type ScrapeNewParamsBodyObjectGotoOptionsWaitUntilString string
const (
	ScrapeNewParamsBodyObjectGotoOptionsWaitUntilStringLoad             ScrapeNewParamsBodyObjectGotoOptionsWaitUntilString = "load"
	ScrapeNewParamsBodyObjectGotoOptionsWaitUntilStringDomcontentloaded ScrapeNewParamsBodyObjectGotoOptionsWaitUntilString = "domcontentloaded"
	ScrapeNewParamsBodyObjectGotoOptionsWaitUntilStringNetworkidle0     ScrapeNewParamsBodyObjectGotoOptionsWaitUntilString = "networkidle0"
	ScrapeNewParamsBodyObjectGotoOptionsWaitUntilStringNetworkidle2     ScrapeNewParamsBodyObjectGotoOptionsWaitUntilString = "networkidle2"
)

func (ScrapeNewParamsBodyObjectGotoOptionsWaitUntilString) IsKnown

type ScrapeNewParamsBodyObjectGotoOptionsWaitUntilUnion

type ScrapeNewParamsBodyObjectGotoOptionsWaitUntilUnion interface {
	// contains filtered or unexported methods
}

Satisfied by browser_rendering.ScrapeNewParamsBodyObjectGotoOptionsWaitUntilString, browser_rendering.ScrapeNewParamsBodyObjectGotoOptionsWaitUntilArray.

type ScrapeNewParamsBodyObjectRejectResourceType

type ScrapeNewParamsBodyObjectRejectResourceType string
const (
	ScrapeNewParamsBodyObjectRejectResourceTypeDocument           ScrapeNewParamsBodyObjectRejectResourceType = "document"
	ScrapeNewParamsBodyObjectRejectResourceTypeStylesheet         ScrapeNewParamsBodyObjectRejectResourceType = "stylesheet"
	ScrapeNewParamsBodyObjectRejectResourceTypeImage              ScrapeNewParamsBodyObjectRejectResourceType = "image"
	ScrapeNewParamsBodyObjectRejectResourceTypeMedia              ScrapeNewParamsBodyObjectRejectResourceType = "media"
	ScrapeNewParamsBodyObjectRejectResourceTypeFont               ScrapeNewParamsBodyObjectRejectResourceType = "font"
	ScrapeNewParamsBodyObjectRejectResourceTypeScript             ScrapeNewParamsBodyObjectRejectResourceType = "script"
	ScrapeNewParamsBodyObjectRejectResourceTypeTexttrack          ScrapeNewParamsBodyObjectRejectResourceType = "texttrack"
	ScrapeNewParamsBodyObjectRejectResourceTypeXHR                ScrapeNewParamsBodyObjectRejectResourceType = "xhr"
	ScrapeNewParamsBodyObjectRejectResourceTypeFetch              ScrapeNewParamsBodyObjectRejectResourceType = "fetch"
	ScrapeNewParamsBodyObjectRejectResourceTypePrefetch           ScrapeNewParamsBodyObjectRejectResourceType = "prefetch"
	ScrapeNewParamsBodyObjectRejectResourceTypeEventsource        ScrapeNewParamsBodyObjectRejectResourceType = "eventsource"
	ScrapeNewParamsBodyObjectRejectResourceTypeWebsocket          ScrapeNewParamsBodyObjectRejectResourceType = "websocket"
	ScrapeNewParamsBodyObjectRejectResourceTypeManifest           ScrapeNewParamsBodyObjectRejectResourceType = "manifest"
	ScrapeNewParamsBodyObjectRejectResourceTypeSignedexchange     ScrapeNewParamsBodyObjectRejectResourceType = "signedexchange"
	ScrapeNewParamsBodyObjectRejectResourceTypePing               ScrapeNewParamsBodyObjectRejectResourceType = "ping"
	ScrapeNewParamsBodyObjectRejectResourceTypeCspviolationreport ScrapeNewParamsBodyObjectRejectResourceType = "cspviolationreport"
	ScrapeNewParamsBodyObjectRejectResourceTypePreflight          ScrapeNewParamsBodyObjectRejectResourceType = "preflight"
	ScrapeNewParamsBodyObjectRejectResourceTypeOther              ScrapeNewParamsBodyObjectRejectResourceType = "other"
)

func (ScrapeNewParamsBodyObjectRejectResourceType) IsKnown

type ScrapeNewParamsBodyObjectViewport

type ScrapeNewParamsBodyObjectViewport struct {
	Height            param.Field[float64] `json:"height" api:"required"`
	Width             param.Field[float64] `json:"width" api:"required"`
	DeviceScaleFactor param.Field[float64] `json:"deviceScaleFactor"`
	HasTouch          param.Field[bool]    `json:"hasTouch"`
	IsLandscape       param.Field[bool]    `json:"isLandscape"`
	IsMobile          param.Field[bool]    `json:"isMobile"`
}

Check [options](https://pptr.dev/api/puppeteer.page.setviewport).

func (ScrapeNewParamsBodyObjectViewport) MarshalJSON

func (r ScrapeNewParamsBodyObjectViewport) MarshalJSON() (data []byte, err error)

type ScrapeNewParamsBodyObjectWaitForSelector

type ScrapeNewParamsBodyObjectWaitForSelector struct {
	Selector param.Field[string]                                          `json:"selector" api:"required"`
	Hidden   param.Field[ScrapeNewParamsBodyObjectWaitForSelectorHidden]  `json:"hidden"`
	Timeout  param.Field[float64]                                         `json:"timeout"`
	Visible  param.Field[ScrapeNewParamsBodyObjectWaitForSelectorVisible] `json:"visible"`
}

Wait for the selector to appear in page. Check [options](https://pptr.dev/api/puppeteer.page.waitforselector).

func (ScrapeNewParamsBodyObjectWaitForSelector) MarshalJSON

func (r ScrapeNewParamsBodyObjectWaitForSelector) MarshalJSON() (data []byte, err error)

type ScrapeNewParamsBodyObjectWaitForSelectorHidden

type ScrapeNewParamsBodyObjectWaitForSelectorHidden bool
const (
	ScrapeNewParamsBodyObjectWaitForSelectorHiddenTrue ScrapeNewParamsBodyObjectWaitForSelectorHidden = true
)

func (ScrapeNewParamsBodyObjectWaitForSelectorHidden) IsKnown

type ScrapeNewParamsBodyObjectWaitForSelectorVisible

type ScrapeNewParamsBodyObjectWaitForSelectorVisible bool
const (
	ScrapeNewParamsBodyObjectWaitForSelectorVisibleTrue ScrapeNewParamsBodyObjectWaitForSelectorVisible = true
)

func (ScrapeNewParamsBodyObjectWaitForSelectorVisible) IsKnown

type ScrapeNewParamsBodyUnion

type ScrapeNewParamsBodyUnion interface {
	// contains filtered or unexported methods
}

Satisfied by browser_rendering.ScrapeNewParamsBodyObject, browser_rendering.ScrapeNewParamsBodyObject, ScrapeNewParamsBody.

type ScrapeNewResponse

type ScrapeNewResponse struct {
	Results ScrapeNewResponseResults `json:"results" api:"required"`
	// Selector.
	Selector string                `json:"selector" api:"required"`
	JSON     scrapeNewResponseJSON `json:"-"`
}

func (*ScrapeNewResponse) UnmarshalJSON

func (r *ScrapeNewResponse) UnmarshalJSON(data []byte) (err error)

type ScrapeNewResponseEnvelope

type ScrapeNewResponseEnvelope struct {
	Result []ScrapeNewResponse `json:"result" api:"required"`
	// Response status.
	Success bool                              `json:"success" api:"required"`
	Errors  []ScrapeNewResponseEnvelopeErrors `json:"errors"`
	JSON    scrapeNewResponseEnvelopeJSON     `json:"-"`
}

func (*ScrapeNewResponseEnvelope) UnmarshalJSON

func (r *ScrapeNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type ScrapeNewResponseEnvelopeErrors

type ScrapeNewResponseEnvelopeErrors struct {
	// Error code.
	Code float64 `json:"code" api:"required"`
	// Error message.
	Message string                              `json:"message" api:"required"`
	JSON    scrapeNewResponseEnvelopeErrorsJSON `json:"-"`
}

func (*ScrapeNewResponseEnvelopeErrors) UnmarshalJSON

func (r *ScrapeNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type ScrapeNewResponseResults

type ScrapeNewResponseResults struct {
	Attributes []ScrapeNewResponseResultsAttribute `json:"attributes" api:"required"`
	// Element height.
	Height float64 `json:"height" api:"required"`
	// HTML content.
	HTML string `json:"html" api:"required"`
	// Element left.
	Left float64 `json:"left" api:"required"`
	// Text content.
	Text string `json:"text" api:"required"`
	// Element top.
	Top float64 `json:"top" api:"required"`
	// Element width.
	Width float64                      `json:"width" api:"required"`
	JSON  scrapeNewResponseResultsJSON `json:"-"`
}

func (*ScrapeNewResponseResults) UnmarshalJSON

func (r *ScrapeNewResponseResults) UnmarshalJSON(data []byte) (err error)

type ScrapeNewResponseResultsAttribute

type ScrapeNewResponseResultsAttribute struct {
	// Attribute name.
	Name string `json:"name" api:"required"`
	// Attribute value.
	Value string                                `json:"value" api:"required"`
	JSON  scrapeNewResponseResultsAttributeJSON `json:"-"`
}

func (*ScrapeNewResponseResultsAttribute) UnmarshalJSON

func (r *ScrapeNewResponseResultsAttribute) UnmarshalJSON(data []byte) (err error)

type ScrapeService

type ScrapeService struct {
	Options []option.RequestOption
}

ScrapeService contains methods and other services that help with interacting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewScrapeService method instead.

func NewScrapeService

func NewScrapeService(opts ...option.RequestOption) (r *ScrapeService)

NewScrapeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ScrapeService) New

func (r *ScrapeService) New(ctx context.Context, params ScrapeNewParams, opts ...option.RequestOption) (res *[]ScrapeNewResponse, err error)

Get meta attributes like height, width, text and others of selected elements.

type ScreenshotNewParams

type ScreenshotNewParams struct {
	// Account ID.
	AccountID param.Field[string]          `path:"account_id" api:"required"`
	Body      ScreenshotNewParamsBodyUnion `json:"body" api:"required"`
	// Cache TTL default is 5s. Set to 0 to disable.
	CacheTTL param.Field[float64] `query:"cacheTTL"`
}

func (ScreenshotNewParams) MarshalJSON

func (r ScreenshotNewParams) MarshalJSON() (data []byte, err error)

func (ScreenshotNewParams) URLQuery

func (r ScreenshotNewParams) URLQuery() (v url.Values)

URLQuery serializes ScreenshotNewParams's query parameters as `url.Values`.

type ScreenshotNewParamsBody

type ScreenshotNewParamsBody struct {
	// 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       param.Field[float64]     `json:"actionTimeout"`
	AddScriptTag        param.Field[interface{}] `json:"addScriptTag"`
	AddStyleTag         param.Field[interface{}] `json:"addStyleTag"`
	AllowRequestPattern param.Field[interface{}] `json:"allowRequestPattern"`
	AllowResourceTypes  param.Field[interface{}] `json:"allowResourceTypes"`
	Authenticate        param.Field[interface{}] `json:"authenticate"`
	// Attempt to proceed when 'awaited' events fail or timeout.
	BestAttempt      param.Field[bool]        `json:"bestAttempt"`
	Cookies          param.Field[interface{}] `json:"cookies"`
	EmulateMediaType param.Field[string]      `json:"emulateMediaType"`
	GotoOptions      param.Field[interface{}] `json:"gotoOptions"`
	// Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or
	// `url` must be set.
	HTML                 param.Field[string]      `json:"html"`
	RejectRequestPattern param.Field[interface{}] `json:"rejectRequestPattern"`
	RejectResourceTypes  param.Field[interface{}] `json:"rejectResourceTypes"`
	ScreenshotOptions    param.Field[interface{}] `json:"screenshotOptions"`
	ScrollPage           param.Field[bool]        `json:"scrollPage"`
	Selector             param.Field[string]      `json:"selector"`
	SetExtraHTTPHeaders  param.Field[interface{}] `json:"setExtraHTTPHeaders"`
	SetJavaScriptEnabled param.Field[bool]        `json:"setJavaScriptEnabled"`
	// URL to navigate to, eg. `https://example.com`.
	URL             param.Field[string]      `json:"url" format:"uri"`
	UserAgent       param.Field[string]      `json:"userAgent"`
	Viewport        param.Field[interface{}] `json:"viewport"`
	WaitForSelector param.Field[interface{}] `json:"waitForSelector"`
	// Waits for a specified timeout before continuing.
	WaitForTimeout param.Field[float64] `json:"waitForTimeout"`
}

func (ScreenshotNewParamsBody) MarshalJSON

func (r ScreenshotNewParamsBody) MarshalJSON() (data []byte, err error)

type ScreenshotNewParamsBodyObject

type ScreenshotNewParamsBodyObject struct {
	// Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or
	// `url` must be set.
	HTML param.Field[string] `json:"html" api:"required"`
	// 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 param.Field[float64] `json:"actionTimeout"`
	// Adds a `<script>` tag into the page with the desired URL or content.
	AddScriptTag param.Field[[]ScreenshotNewParamsBodyObjectAddScriptTag] `json:"addScriptTag"`
	// Adds a `<link rel="stylesheet">` tag into the page with the desired URL or a
	// `<style type="text/css">` tag with the content.
	AddStyleTag param.Field[[]ScreenshotNewParamsBodyObjectAddStyleTag] `json:"addStyleTag"`
	// Only allow requests that match the provided regex patterns, eg. '/^.\*\.(css)'.
	AllowRequestPattern param.Field[[]string] `json:"allowRequestPattern"`
	// Only allow requests that match the provided resource types, eg. 'image' or
	// 'script'.
	AllowResourceTypes param.Field[[]ScreenshotNewParamsBodyObjectAllowResourceType] `json:"allowResourceTypes"`
	// Provide credentials for HTTP authentication.
	Authenticate param.Field[ScreenshotNewParamsBodyObjectAuthenticate] `json:"authenticate"`
	// Attempt to proceed when 'awaited' events fail or timeout.
	BestAttempt param.Field[bool] `json:"bestAttempt"`
	// Check [options](https://pptr.dev/api/puppeteer.page.setcookie).
	Cookies          param.Field[[]ScreenshotNewParamsBodyObjectCookie] `json:"cookies"`
	EmulateMediaType param.Field[string]                                `json:"emulateMediaType"`
	// Check [options](https://pptr.dev/api/puppeteer.gotooptions).
	GotoOptions param.Field[ScreenshotNewParamsBodyObjectGotoOptions] `json:"gotoOptions"`
	// Block undesired requests that match the provided regex patterns, eg.
	// '/^.\*\.(css)'.
	RejectRequestPattern param.Field[[]string] `json:"rejectRequestPattern"`
	// Block undesired requests that match the provided resource types, eg. 'image' or
	// 'script'.
	RejectResourceTypes param.Field[[]ScreenshotNewParamsBodyObjectRejectResourceType] `json:"rejectResourceTypes"`
	// Check [options](https://pptr.dev/api/puppeteer.screenshotoptions).
	ScreenshotOptions    param.Field[ScreenshotNewParamsBodyObjectScreenshotOptions] `json:"screenshotOptions"`
	ScrollPage           param.Field[bool]                                           `json:"scrollPage"`
	Selector             param.Field[string]                                         `json:"selector"`
	SetExtraHTTPHeaders  param.Field[map[string]string]                              `json:"setExtraHTTPHeaders"`
	SetJavaScriptEnabled param.Field[bool]                                           `json:"setJavaScriptEnabled"`
	UserAgent            param.Field[string]                                         `json:"userAgent"`
	// Check [options](https://pptr.dev/api/puppeteer.page.setviewport).
	Viewport param.Field[ScreenshotNewParamsBodyObjectViewport] `json:"viewport"`
	// Wait for the selector to appear in page. Check
	// [options](https://pptr.dev/api/puppeteer.page.waitforselector).
	WaitForSelector param.Field[ScreenshotNewParamsBodyObjectWaitForSelector] `json:"waitForSelector"`
	// Waits for a specified timeout before continuing.
	WaitForTimeout param.Field[float64] `json:"waitForTimeout"`
}

func (ScreenshotNewParamsBodyObject) MarshalJSON

func (r ScreenshotNewParamsBodyObject) MarshalJSON() (data []byte, err error)

type ScreenshotNewParamsBodyObjectAddScriptTag

type ScreenshotNewParamsBodyObjectAddScriptTag struct {
	ID      param.Field[string] `json:"id"`
	Content param.Field[string] `json:"content"`
	Type    param.Field[string] `json:"type"`
	URL     param.Field[string] `json:"url"`
}

func (ScreenshotNewParamsBodyObjectAddScriptTag) MarshalJSON

func (r ScreenshotNewParamsBodyObjectAddScriptTag) MarshalJSON() (data []byte, err error)

type ScreenshotNewParamsBodyObjectAddStyleTag

type ScreenshotNewParamsBodyObjectAddStyleTag struct {
	Content param.Field[string] `json:"content"`
	URL     param.Field[string] `json:"url"`
}

func (ScreenshotNewParamsBodyObjectAddStyleTag) MarshalJSON

func (r ScreenshotNewParamsBodyObjectAddStyleTag) MarshalJSON() (data []byte, err error)

type ScreenshotNewParamsBodyObjectAllowResourceType

type ScreenshotNewParamsBodyObjectAllowResourceType string
const (
	ScreenshotNewParamsBodyObjectAllowResourceTypeDocument           ScreenshotNewParamsBodyObjectAllowResourceType = "document"
	ScreenshotNewParamsBodyObjectAllowResourceTypeStylesheet         ScreenshotNewParamsBodyObjectAllowResourceType = "stylesheet"
	ScreenshotNewParamsBodyObjectAllowResourceTypeImage              ScreenshotNewParamsBodyObjectAllowResourceType = "image"
	ScreenshotNewParamsBodyObjectAllowResourceTypeMedia              ScreenshotNewParamsBodyObjectAllowResourceType = "media"
	ScreenshotNewParamsBodyObjectAllowResourceTypeFont               ScreenshotNewParamsBodyObjectAllowResourceType = "font"
	ScreenshotNewParamsBodyObjectAllowResourceTypeScript             ScreenshotNewParamsBodyObjectAllowResourceType = "script"
	ScreenshotNewParamsBodyObjectAllowResourceTypeTexttrack          ScreenshotNewParamsBodyObjectAllowResourceType = "texttrack"
	ScreenshotNewParamsBodyObjectAllowResourceTypeXHR                ScreenshotNewParamsBodyObjectAllowResourceType = "xhr"
	ScreenshotNewParamsBodyObjectAllowResourceTypeFetch              ScreenshotNewParamsBodyObjectAllowResourceType = "fetch"
	ScreenshotNewParamsBodyObjectAllowResourceTypePrefetch           ScreenshotNewParamsBodyObjectAllowResourceType = "prefetch"
	ScreenshotNewParamsBodyObjectAllowResourceTypeEventsource        ScreenshotNewParamsBodyObjectAllowResourceType = "eventsource"
	ScreenshotNewParamsBodyObjectAllowResourceTypeWebsocket          ScreenshotNewParamsBodyObjectAllowResourceType = "websocket"
	ScreenshotNewParamsBodyObjectAllowResourceTypeManifest           ScreenshotNewParamsBodyObjectAllowResourceType = "manifest"
	ScreenshotNewParamsBodyObjectAllowResourceTypeSignedexchange     ScreenshotNewParamsBodyObjectAllowResourceType = "signedexchange"
	ScreenshotNewParamsBodyObjectAllowResourceTypePing               ScreenshotNewParamsBodyObjectAllowResourceType = "ping"
	ScreenshotNewParamsBodyObjectAllowResourceTypeCspviolationreport ScreenshotNewParamsBodyObjectAllowResourceType = "cspviolationreport"
	ScreenshotNewParamsBodyObjectAllowResourceTypePreflight          ScreenshotNewParamsBodyObjectAllowResourceType = "preflight"
	ScreenshotNewParamsBodyObjectAllowResourceTypeOther              ScreenshotNewParamsBodyObjectAllowResourceType = "other"
)

func (ScreenshotNewParamsBodyObjectAllowResourceType) IsKnown

type ScreenshotNewParamsBodyObjectAuthenticate

type ScreenshotNewParamsBodyObjectAuthenticate struct {
	Password param.Field[string] `json:"password" api:"required"`
	Username param.Field[string] `json:"username" api:"required"`
}

Provide credentials for HTTP authentication.

func (ScreenshotNewParamsBodyObjectAuthenticate) MarshalJSON

func (r ScreenshotNewParamsBodyObjectAuthenticate) MarshalJSON() (data []byte, err error)

type ScreenshotNewParamsBodyObjectCookie

type ScreenshotNewParamsBodyObjectCookie struct {
	// Cookie name.
	Name         param.Field[string]                                           `json:"name" api:"required"`
	Value        param.Field[string]                                           `json:"value" api:"required"`
	Domain       param.Field[string]                                           `json:"domain"`
	Expires      param.Field[float64]                                          `json:"expires"`
	HTTPOnly     param.Field[bool]                                             `json:"httpOnly"`
	PartitionKey param.Field[string]                                           `json:"partitionKey"`
	Path         param.Field[string]                                           `json:"path"`
	Priority     param.Field[ScreenshotNewParamsBodyObjectCookiesPriority]     `json:"priority"`
	SameParty    param.Field[bool]                                             `json:"sameParty"`
	SameSite     param.Field[ScreenshotNewParamsBodyObjectCookiesSameSite]     `json:"sameSite"`
	Secure       param.Field[bool]                                             `json:"secure"`
	SourcePort   param.Field[float64]                                          `json:"sourcePort"`
	SourceScheme param.Field[ScreenshotNewParamsBodyObjectCookiesSourceScheme] `json:"sourceScheme"`
	URL          param.Field[string]                                           `json:"url"`
}

func (ScreenshotNewParamsBodyObjectCookie) MarshalJSON

func (r ScreenshotNewParamsBodyObjectCookie) MarshalJSON() (data []byte, err error)

type ScreenshotNewParamsBodyObjectCookiesPriority

type ScreenshotNewParamsBodyObjectCookiesPriority string
const (
	ScreenshotNewParamsBodyObjectCookiesPriorityLow    ScreenshotNewParamsBodyObjectCookiesPriority = "Low"
	ScreenshotNewParamsBodyObjectCookiesPriorityMedium ScreenshotNewParamsBodyObjectCookiesPriority = "Medium"
	ScreenshotNewParamsBodyObjectCookiesPriorityHigh   ScreenshotNewParamsBodyObjectCookiesPriority = "High"
)

func (ScreenshotNewParamsBodyObjectCookiesPriority) IsKnown

type ScreenshotNewParamsBodyObjectCookiesSameSite

type ScreenshotNewParamsBodyObjectCookiesSameSite string
const (
	ScreenshotNewParamsBodyObjectCookiesSameSiteStrict ScreenshotNewParamsBodyObjectCookiesSameSite = "Strict"
	ScreenshotNewParamsBodyObjectCookiesSameSiteLax    ScreenshotNewParamsBodyObjectCookiesSameSite = "Lax"
	ScreenshotNewParamsBodyObjectCookiesSameSiteNone   ScreenshotNewParamsBodyObjectCookiesSameSite = "None"
)

func (ScreenshotNewParamsBodyObjectCookiesSameSite) IsKnown

type ScreenshotNewParamsBodyObjectCookiesSourceScheme

type ScreenshotNewParamsBodyObjectCookiesSourceScheme string
const (
	ScreenshotNewParamsBodyObjectCookiesSourceSchemeUnset     ScreenshotNewParamsBodyObjectCookiesSourceScheme = "Unset"
	ScreenshotNewParamsBodyObjectCookiesSourceSchemeNonSecure ScreenshotNewParamsBodyObjectCookiesSourceScheme = "NonSecure"
	ScreenshotNewParamsBodyObjectCookiesSourceSchemeSecure    ScreenshotNewParamsBodyObjectCookiesSourceScheme = "Secure"
)

func (ScreenshotNewParamsBodyObjectCookiesSourceScheme) IsKnown

type ScreenshotNewParamsBodyObjectGotoOptions

type ScreenshotNewParamsBodyObjectGotoOptions struct {
	Referer        param.Field[string]                                                 `json:"referer"`
	ReferrerPolicy param.Field[string]                                                 `json:"referrerPolicy"`
	Timeout        param.Field[float64]                                                `json:"timeout"`
	WaitUntil      param.Field[ScreenshotNewParamsBodyObjectGotoOptionsWaitUntilUnion] `json:"waitUntil"`
}

Check [options](https://pptr.dev/api/puppeteer.gotooptions).

func (ScreenshotNewParamsBodyObjectGotoOptions) MarshalJSON

func (r ScreenshotNewParamsBodyObjectGotoOptions) MarshalJSON() (data []byte, err error)

type ScreenshotNewParamsBodyObjectGotoOptionsWaitUntilArrayItem

type ScreenshotNewParamsBodyObjectGotoOptionsWaitUntilArrayItem string
const (
	ScreenshotNewParamsBodyObjectGotoOptionsWaitUntilArrayItemLoad             ScreenshotNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "load"
	ScreenshotNewParamsBodyObjectGotoOptionsWaitUntilArrayItemDomcontentloaded ScreenshotNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "domcontentloaded"
	ScreenshotNewParamsBodyObjectGotoOptionsWaitUntilArrayItemNetworkidle0     ScreenshotNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "networkidle0"
	ScreenshotNewParamsBodyObjectGotoOptionsWaitUntilArrayItemNetworkidle2     ScreenshotNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "networkidle2"
)

func (ScreenshotNewParamsBodyObjectGotoOptionsWaitUntilArrayItem) IsKnown

type ScreenshotNewParamsBodyObjectGotoOptionsWaitUntilString

type ScreenshotNewParamsBodyObjectGotoOptionsWaitUntilString string
const (
	ScreenshotNewParamsBodyObjectGotoOptionsWaitUntilStringLoad             ScreenshotNewParamsBodyObjectGotoOptionsWaitUntilString = "load"
	ScreenshotNewParamsBodyObjectGotoOptionsWaitUntilStringDomcontentloaded ScreenshotNewParamsBodyObjectGotoOptionsWaitUntilString = "domcontentloaded"
	ScreenshotNewParamsBodyObjectGotoOptionsWaitUntilStringNetworkidle0     ScreenshotNewParamsBodyObjectGotoOptionsWaitUntilString = "networkidle0"
	ScreenshotNewParamsBodyObjectGotoOptionsWaitUntilStringNetworkidle2     ScreenshotNewParamsBodyObjectGotoOptionsWaitUntilString = "networkidle2"
)

func (ScreenshotNewParamsBodyObjectGotoOptionsWaitUntilString) IsKnown

type ScreenshotNewParamsBodyObjectGotoOptionsWaitUntilUnion

type ScreenshotNewParamsBodyObjectGotoOptionsWaitUntilUnion interface {
	// contains filtered or unexported methods
}

Satisfied by browser_rendering.ScreenshotNewParamsBodyObjectGotoOptionsWaitUntilString, browser_rendering.ScreenshotNewParamsBodyObjectGotoOptionsWaitUntilArray.

type ScreenshotNewParamsBodyObjectRejectResourceType

type ScreenshotNewParamsBodyObjectRejectResourceType string
const (
	ScreenshotNewParamsBodyObjectRejectResourceTypeDocument           ScreenshotNewParamsBodyObjectRejectResourceType = "document"
	ScreenshotNewParamsBodyObjectRejectResourceTypeStylesheet         ScreenshotNewParamsBodyObjectRejectResourceType = "stylesheet"
	ScreenshotNewParamsBodyObjectRejectResourceTypeImage              ScreenshotNewParamsBodyObjectRejectResourceType = "image"
	ScreenshotNewParamsBodyObjectRejectResourceTypeMedia              ScreenshotNewParamsBodyObjectRejectResourceType = "media"
	ScreenshotNewParamsBodyObjectRejectResourceTypeFont               ScreenshotNewParamsBodyObjectRejectResourceType = "font"
	ScreenshotNewParamsBodyObjectRejectResourceTypeScript             ScreenshotNewParamsBodyObjectRejectResourceType = "script"
	ScreenshotNewParamsBodyObjectRejectResourceTypeTexttrack          ScreenshotNewParamsBodyObjectRejectResourceType = "texttrack"
	ScreenshotNewParamsBodyObjectRejectResourceTypeXHR                ScreenshotNewParamsBodyObjectRejectResourceType = "xhr"
	ScreenshotNewParamsBodyObjectRejectResourceTypeFetch              ScreenshotNewParamsBodyObjectRejectResourceType = "fetch"
	ScreenshotNewParamsBodyObjectRejectResourceTypePrefetch           ScreenshotNewParamsBodyObjectRejectResourceType = "prefetch"
	ScreenshotNewParamsBodyObjectRejectResourceTypeEventsource        ScreenshotNewParamsBodyObjectRejectResourceType = "eventsource"
	ScreenshotNewParamsBodyObjectRejectResourceTypeWebsocket          ScreenshotNewParamsBodyObjectRejectResourceType = "websocket"
	ScreenshotNewParamsBodyObjectRejectResourceTypeManifest           ScreenshotNewParamsBodyObjectRejectResourceType = "manifest"
	ScreenshotNewParamsBodyObjectRejectResourceTypeSignedexchange     ScreenshotNewParamsBodyObjectRejectResourceType = "signedexchange"
	ScreenshotNewParamsBodyObjectRejectResourceTypePing               ScreenshotNewParamsBodyObjectRejectResourceType = "ping"
	ScreenshotNewParamsBodyObjectRejectResourceTypeCspviolationreport ScreenshotNewParamsBodyObjectRejectResourceType = "cspviolationreport"
	ScreenshotNewParamsBodyObjectRejectResourceTypePreflight          ScreenshotNewParamsBodyObjectRejectResourceType = "preflight"
	ScreenshotNewParamsBodyObjectRejectResourceTypeOther              ScreenshotNewParamsBodyObjectRejectResourceType = "other"
)

func (ScreenshotNewParamsBodyObjectRejectResourceType) IsKnown

type ScreenshotNewParamsBodyObjectScreenshotOptions

type ScreenshotNewParamsBodyObjectScreenshotOptions struct {
	CaptureBeyondViewport param.Field[bool]                                                   `json:"captureBeyondViewport"`
	Clip                  param.Field[ScreenshotNewParamsBodyObjectScreenshotOptionsClip]     `json:"clip"`
	Encoding              param.Field[ScreenshotNewParamsBodyObjectScreenshotOptionsEncoding] `json:"encoding"`
	FromSurface           param.Field[bool]                                                   `json:"fromSurface"`
	FullPage              param.Field[bool]                                                   `json:"fullPage"`
	OmitBackground        param.Field[bool]                                                   `json:"omitBackground"`
	OptimizeForSpeed      param.Field[bool]                                                   `json:"optimizeForSpeed"`
	Quality               param.Field[float64]                                                `json:"quality"`
	Type                  param.Field[ScreenshotNewParamsBodyObjectScreenshotOptionsType]     `json:"type"`
}

Check [options](https://pptr.dev/api/puppeteer.screenshotoptions).

func (ScreenshotNewParamsBodyObjectScreenshotOptions) MarshalJSON

func (r ScreenshotNewParamsBodyObjectScreenshotOptions) MarshalJSON() (data []byte, err error)

type ScreenshotNewParamsBodyObjectScreenshotOptionsClip

type ScreenshotNewParamsBodyObjectScreenshotOptionsClip struct {
	Height param.Field[float64] `json:"height" api:"required"`
	Width  param.Field[float64] `json:"width" api:"required"`
	X      param.Field[float64] `json:"x" api:"required"`
	Y      param.Field[float64] `json:"y" api:"required"`
	Scale  param.Field[float64] `json:"scale"`
}

func (ScreenshotNewParamsBodyObjectScreenshotOptionsClip) MarshalJSON

func (r ScreenshotNewParamsBodyObjectScreenshotOptionsClip) MarshalJSON() (data []byte, err error)

type ScreenshotNewParamsBodyObjectScreenshotOptionsEncoding

type ScreenshotNewParamsBodyObjectScreenshotOptionsEncoding string
const (
	ScreenshotNewParamsBodyObjectScreenshotOptionsEncodingBinary ScreenshotNewParamsBodyObjectScreenshotOptionsEncoding = "binary"
	ScreenshotNewParamsBodyObjectScreenshotOptionsEncodingBase64 ScreenshotNewParamsBodyObjectScreenshotOptionsEncoding = "base64"
)

func (ScreenshotNewParamsBodyObjectScreenshotOptionsEncoding) IsKnown

type ScreenshotNewParamsBodyObjectScreenshotOptionsType

type ScreenshotNewParamsBodyObjectScreenshotOptionsType string
const (
	ScreenshotNewParamsBodyObjectScreenshotOptionsTypePNG  ScreenshotNewParamsBodyObjectScreenshotOptionsType = "png"
	ScreenshotNewParamsBodyObjectScreenshotOptionsTypeJPEG ScreenshotNewParamsBodyObjectScreenshotOptionsType = "jpeg"
	ScreenshotNewParamsBodyObjectScreenshotOptionsTypeWebP ScreenshotNewParamsBodyObjectScreenshotOptionsType = "webp"
)

func (ScreenshotNewParamsBodyObjectScreenshotOptionsType) IsKnown

type ScreenshotNewParamsBodyObjectViewport

type ScreenshotNewParamsBodyObjectViewport struct {
	Height            param.Field[float64] `json:"height" api:"required"`
	Width             param.Field[float64] `json:"width" api:"required"`
	DeviceScaleFactor param.Field[float64] `json:"deviceScaleFactor"`
	HasTouch          param.Field[bool]    `json:"hasTouch"`
	IsLandscape       param.Field[bool]    `json:"isLandscape"`
	IsMobile          param.Field[bool]    `json:"isMobile"`
}

Check [options](https://pptr.dev/api/puppeteer.page.setviewport).

func (ScreenshotNewParamsBodyObjectViewport) MarshalJSON

func (r ScreenshotNewParamsBodyObjectViewport) MarshalJSON() (data []byte, err error)

type ScreenshotNewParamsBodyObjectWaitForSelector

type ScreenshotNewParamsBodyObjectWaitForSelector struct {
	Selector param.Field[string]                                              `json:"selector" api:"required"`
	Hidden   param.Field[ScreenshotNewParamsBodyObjectWaitForSelectorHidden]  `json:"hidden"`
	Timeout  param.Field[float64]                                             `json:"timeout"`
	Visible  param.Field[ScreenshotNewParamsBodyObjectWaitForSelectorVisible] `json:"visible"`
}

Wait for the selector to appear in page. Check [options](https://pptr.dev/api/puppeteer.page.waitforselector).

func (ScreenshotNewParamsBodyObjectWaitForSelector) MarshalJSON

func (r ScreenshotNewParamsBodyObjectWaitForSelector) MarshalJSON() (data []byte, err error)

type ScreenshotNewParamsBodyObjectWaitForSelectorHidden

type ScreenshotNewParamsBodyObjectWaitForSelectorHidden bool
const (
	ScreenshotNewParamsBodyObjectWaitForSelectorHiddenTrue ScreenshotNewParamsBodyObjectWaitForSelectorHidden = true
)

func (ScreenshotNewParamsBodyObjectWaitForSelectorHidden) IsKnown

type ScreenshotNewParamsBodyObjectWaitForSelectorVisible

type ScreenshotNewParamsBodyObjectWaitForSelectorVisible bool
const (
	ScreenshotNewParamsBodyObjectWaitForSelectorVisibleTrue ScreenshotNewParamsBodyObjectWaitForSelectorVisible = true
)

func (ScreenshotNewParamsBodyObjectWaitForSelectorVisible) IsKnown

type ScreenshotNewParamsBodyUnion

type ScreenshotNewParamsBodyUnion interface {
	// contains filtered or unexported methods
}

Satisfied by browser_rendering.ScreenshotNewParamsBodyObject, browser_rendering.ScreenshotNewParamsBodyObject, ScreenshotNewParamsBody.

type ScreenshotNewResponse

type ScreenshotNewResponse struct {
	// Response status.
	Success bool                         `json:"success" api:"required"`
	Errors  []ScreenshotNewResponseError `json:"errors"`
	JSON    screenshotNewResponseJSON    `json:"-"`
}

func (*ScreenshotNewResponse) UnmarshalJSON

func (r *ScreenshotNewResponse) UnmarshalJSON(data []byte) (err error)

type ScreenshotNewResponseError

type ScreenshotNewResponseError struct {
	// Error code.
	Code float64 `json:"code" api:"required"`
	// Error message.
	Message string                         `json:"message" api:"required"`
	JSON    screenshotNewResponseErrorJSON `json:"-"`
}

func (*ScreenshotNewResponseError) UnmarshalJSON

func (r *ScreenshotNewResponseError) UnmarshalJSON(data []byte) (err error)

type ScreenshotService

type ScreenshotService struct {
	Options []option.RequestOption
}

ScreenshotService contains methods and other services that help with interacting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewScreenshotService method instead.

func NewScreenshotService

func NewScreenshotService(opts ...option.RequestOption) (r *ScreenshotService)

NewScreenshotService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ScreenshotService) New

Takes a screenshot of a webpage from provided URL or HTML. Control page loading with `gotoOptions` and `waitFor*` options. Customize screenshots with `viewport`, `fullPage`, `clip` and others.

type SnapshotNewParams

type SnapshotNewParams struct {
	// Account ID.
	AccountID param.Field[string]        `path:"account_id" api:"required"`
	Body      SnapshotNewParamsBodyUnion `json:"body" api:"required"`
	// Cache TTL default is 5s. Set to 0 to disable.
	CacheTTL param.Field[float64] `query:"cacheTTL"`
}

func (SnapshotNewParams) MarshalJSON

func (r SnapshotNewParams) MarshalJSON() (data []byte, err error)

func (SnapshotNewParams) URLQuery

func (r SnapshotNewParams) URLQuery() (v url.Values)

URLQuery serializes SnapshotNewParams's query parameters as `url.Values`.

type SnapshotNewParamsBody

type SnapshotNewParamsBody struct {
	// 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       param.Field[float64]     `json:"actionTimeout"`
	AddScriptTag        param.Field[interface{}] `json:"addScriptTag"`
	AddStyleTag         param.Field[interface{}] `json:"addStyleTag"`
	AllowRequestPattern param.Field[interface{}] `json:"allowRequestPattern"`
	AllowResourceTypes  param.Field[interface{}] `json:"allowResourceTypes"`
	Authenticate        param.Field[interface{}] `json:"authenticate"`
	// Attempt to proceed when 'awaited' events fail or timeout.
	BestAttempt      param.Field[bool]        `json:"bestAttempt"`
	Cookies          param.Field[interface{}] `json:"cookies"`
	EmulateMediaType param.Field[string]      `json:"emulateMediaType"`
	GotoOptions      param.Field[interface{}] `json:"gotoOptions"`
	// Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or
	// `url` must be set.
	HTML                 param.Field[string]      `json:"html"`
	RejectRequestPattern param.Field[interface{}] `json:"rejectRequestPattern"`
	RejectResourceTypes  param.Field[interface{}] `json:"rejectResourceTypes"`
	ScreenshotOptions    param.Field[interface{}] `json:"screenshotOptions"`
	SetExtraHTTPHeaders  param.Field[interface{}] `json:"setExtraHTTPHeaders"`
	SetJavaScriptEnabled param.Field[bool]        `json:"setJavaScriptEnabled"`
	// URL to navigate to, eg. `https://example.com`.
	URL             param.Field[string]      `json:"url" format:"uri"`
	UserAgent       param.Field[string]      `json:"userAgent"`
	Viewport        param.Field[interface{}] `json:"viewport"`
	WaitForSelector param.Field[interface{}] `json:"waitForSelector"`
	// Waits for a specified timeout before continuing.
	WaitForTimeout param.Field[float64] `json:"waitForTimeout"`
}

func (SnapshotNewParamsBody) MarshalJSON

func (r SnapshotNewParamsBody) MarshalJSON() (data []byte, err error)

type SnapshotNewParamsBodyObject

type SnapshotNewParamsBodyObject struct {
	// Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or
	// `url` must be set.
	HTML param.Field[string] `json:"html" api:"required"`
	// 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 param.Field[float64] `json:"actionTimeout"`
	// Adds a `<script>` tag into the page with the desired URL or content.
	AddScriptTag param.Field[[]SnapshotNewParamsBodyObjectAddScriptTag] `json:"addScriptTag"`
	// Adds a `<link rel="stylesheet">` tag into the page with the desired URL or a
	// `<style type="text/css">` tag with the content.
	AddStyleTag param.Field[[]SnapshotNewParamsBodyObjectAddStyleTag] `json:"addStyleTag"`
	// Only allow requests that match the provided regex patterns, eg. '/^.\*\.(css)'.
	AllowRequestPattern param.Field[[]string] `json:"allowRequestPattern"`
	// Only allow requests that match the provided resource types, eg. 'image' or
	// 'script'.
	AllowResourceTypes param.Field[[]SnapshotNewParamsBodyObjectAllowResourceType] `json:"allowResourceTypes"`
	// Provide credentials for HTTP authentication.
	Authenticate param.Field[SnapshotNewParamsBodyObjectAuthenticate] `json:"authenticate"`
	// Attempt to proceed when 'awaited' events fail or timeout.
	BestAttempt param.Field[bool] `json:"bestAttempt"`
	// Check [options](https://pptr.dev/api/puppeteer.page.setcookie).
	Cookies          param.Field[[]SnapshotNewParamsBodyObjectCookie] `json:"cookies"`
	EmulateMediaType param.Field[string]                              `json:"emulateMediaType"`
	// Check [options](https://pptr.dev/api/puppeteer.gotooptions).
	GotoOptions param.Field[SnapshotNewParamsBodyObjectGotoOptions] `json:"gotoOptions"`
	// Block undesired requests that match the provided regex patterns, eg.
	// '/^.\*\.(css)'.
	RejectRequestPattern param.Field[[]string] `json:"rejectRequestPattern"`
	// Block undesired requests that match the provided resource types, eg. 'image' or
	// 'script'.
	RejectResourceTypes  param.Field[[]SnapshotNewParamsBodyObjectRejectResourceType] `json:"rejectResourceTypes"`
	ScreenshotOptions    param.Field[SnapshotNewParamsBodyObjectScreenshotOptions]    `json:"screenshotOptions"`
	SetExtraHTTPHeaders  param.Field[map[string]string]                               `json:"setExtraHTTPHeaders"`
	SetJavaScriptEnabled param.Field[bool]                                            `json:"setJavaScriptEnabled"`
	UserAgent            param.Field[string]                                          `json:"userAgent"`
	// Check [options](https://pptr.dev/api/puppeteer.page.setviewport).
	Viewport param.Field[SnapshotNewParamsBodyObjectViewport] `json:"viewport"`
	// Wait for the selector to appear in page. Check
	// [options](https://pptr.dev/api/puppeteer.page.waitforselector).
	WaitForSelector param.Field[SnapshotNewParamsBodyObjectWaitForSelector] `json:"waitForSelector"`
	// Waits for a specified timeout before continuing.
	WaitForTimeout param.Field[float64] `json:"waitForTimeout"`
}

func (SnapshotNewParamsBodyObject) MarshalJSON

func (r SnapshotNewParamsBodyObject) MarshalJSON() (data []byte, err error)

type SnapshotNewParamsBodyObjectAddScriptTag

type SnapshotNewParamsBodyObjectAddScriptTag struct {
	ID      param.Field[string] `json:"id"`
	Content param.Field[string] `json:"content"`
	Type    param.Field[string] `json:"type"`
	URL     param.Field[string] `json:"url"`
}

func (SnapshotNewParamsBodyObjectAddScriptTag) MarshalJSON

func (r SnapshotNewParamsBodyObjectAddScriptTag) MarshalJSON() (data []byte, err error)

type SnapshotNewParamsBodyObjectAddStyleTag

type SnapshotNewParamsBodyObjectAddStyleTag struct {
	Content param.Field[string] `json:"content"`
	URL     param.Field[string] `json:"url"`
}

func (SnapshotNewParamsBodyObjectAddStyleTag) MarshalJSON

func (r SnapshotNewParamsBodyObjectAddStyleTag) MarshalJSON() (data []byte, err error)

type SnapshotNewParamsBodyObjectAllowResourceType

type SnapshotNewParamsBodyObjectAllowResourceType string
const (
	SnapshotNewParamsBodyObjectAllowResourceTypeDocument           SnapshotNewParamsBodyObjectAllowResourceType = "document"
	SnapshotNewParamsBodyObjectAllowResourceTypeStylesheet         SnapshotNewParamsBodyObjectAllowResourceType = "stylesheet"
	SnapshotNewParamsBodyObjectAllowResourceTypeImage              SnapshotNewParamsBodyObjectAllowResourceType = "image"
	SnapshotNewParamsBodyObjectAllowResourceTypeMedia              SnapshotNewParamsBodyObjectAllowResourceType = "media"
	SnapshotNewParamsBodyObjectAllowResourceTypeFont               SnapshotNewParamsBodyObjectAllowResourceType = "font"
	SnapshotNewParamsBodyObjectAllowResourceTypeScript             SnapshotNewParamsBodyObjectAllowResourceType = "script"
	SnapshotNewParamsBodyObjectAllowResourceTypeTexttrack          SnapshotNewParamsBodyObjectAllowResourceType = "texttrack"
	SnapshotNewParamsBodyObjectAllowResourceTypeXHR                SnapshotNewParamsBodyObjectAllowResourceType = "xhr"
	SnapshotNewParamsBodyObjectAllowResourceTypeFetch              SnapshotNewParamsBodyObjectAllowResourceType = "fetch"
	SnapshotNewParamsBodyObjectAllowResourceTypePrefetch           SnapshotNewParamsBodyObjectAllowResourceType = "prefetch"
	SnapshotNewParamsBodyObjectAllowResourceTypeEventsource        SnapshotNewParamsBodyObjectAllowResourceType = "eventsource"
	SnapshotNewParamsBodyObjectAllowResourceTypeWebsocket          SnapshotNewParamsBodyObjectAllowResourceType = "websocket"
	SnapshotNewParamsBodyObjectAllowResourceTypeManifest           SnapshotNewParamsBodyObjectAllowResourceType = "manifest"
	SnapshotNewParamsBodyObjectAllowResourceTypeSignedexchange     SnapshotNewParamsBodyObjectAllowResourceType = "signedexchange"
	SnapshotNewParamsBodyObjectAllowResourceTypePing               SnapshotNewParamsBodyObjectAllowResourceType = "ping"
	SnapshotNewParamsBodyObjectAllowResourceTypeCspviolationreport SnapshotNewParamsBodyObjectAllowResourceType = "cspviolationreport"
	SnapshotNewParamsBodyObjectAllowResourceTypePreflight          SnapshotNewParamsBodyObjectAllowResourceType = "preflight"
	SnapshotNewParamsBodyObjectAllowResourceTypeOther              SnapshotNewParamsBodyObjectAllowResourceType = "other"
)

func (SnapshotNewParamsBodyObjectAllowResourceType) IsKnown

type SnapshotNewParamsBodyObjectAuthenticate

type SnapshotNewParamsBodyObjectAuthenticate struct {
	Password param.Field[string] `json:"password" api:"required"`
	Username param.Field[string] `json:"username" api:"required"`
}

Provide credentials for HTTP authentication.

func (SnapshotNewParamsBodyObjectAuthenticate) MarshalJSON

func (r SnapshotNewParamsBodyObjectAuthenticate) MarshalJSON() (data []byte, err error)

type SnapshotNewParamsBodyObjectCookie

type SnapshotNewParamsBodyObjectCookie struct {
	// Cookie name.
	Name         param.Field[string]                                         `json:"name" api:"required"`
	Value        param.Field[string]                                         `json:"value" api:"required"`
	Domain       param.Field[string]                                         `json:"domain"`
	Expires      param.Field[float64]                                        `json:"expires"`
	HTTPOnly     param.Field[bool]                                           `json:"httpOnly"`
	PartitionKey param.Field[string]                                         `json:"partitionKey"`
	Path         param.Field[string]                                         `json:"path"`
	Priority     param.Field[SnapshotNewParamsBodyObjectCookiesPriority]     `json:"priority"`
	SameParty    param.Field[bool]                                           `json:"sameParty"`
	SameSite     param.Field[SnapshotNewParamsBodyObjectCookiesSameSite]     `json:"sameSite"`
	Secure       param.Field[bool]                                           `json:"secure"`
	SourcePort   param.Field[float64]                                        `json:"sourcePort"`
	SourceScheme param.Field[SnapshotNewParamsBodyObjectCookiesSourceScheme] `json:"sourceScheme"`
	URL          param.Field[string]                                         `json:"url"`
}

func (SnapshotNewParamsBodyObjectCookie) MarshalJSON

func (r SnapshotNewParamsBodyObjectCookie) MarshalJSON() (data []byte, err error)

type SnapshotNewParamsBodyObjectCookiesPriority

type SnapshotNewParamsBodyObjectCookiesPriority string
const (
	SnapshotNewParamsBodyObjectCookiesPriorityLow    SnapshotNewParamsBodyObjectCookiesPriority = "Low"
	SnapshotNewParamsBodyObjectCookiesPriorityMedium SnapshotNewParamsBodyObjectCookiesPriority = "Medium"
	SnapshotNewParamsBodyObjectCookiesPriorityHigh   SnapshotNewParamsBodyObjectCookiesPriority = "High"
)

func (SnapshotNewParamsBodyObjectCookiesPriority) IsKnown

type SnapshotNewParamsBodyObjectCookiesSameSite

type SnapshotNewParamsBodyObjectCookiesSameSite string
const (
	SnapshotNewParamsBodyObjectCookiesSameSiteStrict SnapshotNewParamsBodyObjectCookiesSameSite = "Strict"
	SnapshotNewParamsBodyObjectCookiesSameSiteLax    SnapshotNewParamsBodyObjectCookiesSameSite = "Lax"
	SnapshotNewParamsBodyObjectCookiesSameSiteNone   SnapshotNewParamsBodyObjectCookiesSameSite = "None"
)

func (SnapshotNewParamsBodyObjectCookiesSameSite) IsKnown

type SnapshotNewParamsBodyObjectCookiesSourceScheme

type SnapshotNewParamsBodyObjectCookiesSourceScheme string
const (
	SnapshotNewParamsBodyObjectCookiesSourceSchemeUnset     SnapshotNewParamsBodyObjectCookiesSourceScheme = "Unset"
	SnapshotNewParamsBodyObjectCookiesSourceSchemeNonSecure SnapshotNewParamsBodyObjectCookiesSourceScheme = "NonSecure"
	SnapshotNewParamsBodyObjectCookiesSourceSchemeSecure    SnapshotNewParamsBodyObjectCookiesSourceScheme = "Secure"
)

func (SnapshotNewParamsBodyObjectCookiesSourceScheme) IsKnown

type SnapshotNewParamsBodyObjectGotoOptions

type SnapshotNewParamsBodyObjectGotoOptions struct {
	Referer        param.Field[string]                                               `json:"referer"`
	ReferrerPolicy param.Field[string]                                               `json:"referrerPolicy"`
	Timeout        param.Field[float64]                                              `json:"timeout"`
	WaitUntil      param.Field[SnapshotNewParamsBodyObjectGotoOptionsWaitUntilUnion] `json:"waitUntil"`
}

Check [options](https://pptr.dev/api/puppeteer.gotooptions).

func (SnapshotNewParamsBodyObjectGotoOptions) MarshalJSON

func (r SnapshotNewParamsBodyObjectGotoOptions) MarshalJSON() (data []byte, err error)

type SnapshotNewParamsBodyObjectGotoOptionsWaitUntilArrayItem

type SnapshotNewParamsBodyObjectGotoOptionsWaitUntilArrayItem string
const (
	SnapshotNewParamsBodyObjectGotoOptionsWaitUntilArrayItemLoad             SnapshotNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "load"
	SnapshotNewParamsBodyObjectGotoOptionsWaitUntilArrayItemDomcontentloaded SnapshotNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "domcontentloaded"
	SnapshotNewParamsBodyObjectGotoOptionsWaitUntilArrayItemNetworkidle0     SnapshotNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "networkidle0"
	SnapshotNewParamsBodyObjectGotoOptionsWaitUntilArrayItemNetworkidle2     SnapshotNewParamsBodyObjectGotoOptionsWaitUntilArrayItem = "networkidle2"
)

func (SnapshotNewParamsBodyObjectGotoOptionsWaitUntilArrayItem) IsKnown

type SnapshotNewParamsBodyObjectGotoOptionsWaitUntilString

type SnapshotNewParamsBodyObjectGotoOptionsWaitUntilString string
const (
	SnapshotNewParamsBodyObjectGotoOptionsWaitUntilStringLoad             SnapshotNewParamsBodyObjectGotoOptionsWaitUntilString = "load"
	SnapshotNewParamsBodyObjectGotoOptionsWaitUntilStringDomcontentloaded SnapshotNewParamsBodyObjectGotoOptionsWaitUntilString = "domcontentloaded"
	SnapshotNewParamsBodyObjectGotoOptionsWaitUntilStringNetworkidle0     SnapshotNewParamsBodyObjectGotoOptionsWaitUntilString = "networkidle0"
	SnapshotNewParamsBodyObjectGotoOptionsWaitUntilStringNetworkidle2     SnapshotNewParamsBodyObjectGotoOptionsWaitUntilString = "networkidle2"
)

func (SnapshotNewParamsBodyObjectGotoOptionsWaitUntilString) IsKnown

type SnapshotNewParamsBodyObjectGotoOptionsWaitUntilUnion

type SnapshotNewParamsBodyObjectGotoOptionsWaitUntilUnion interface {
	// contains filtered or unexported methods
}

Satisfied by browser_rendering.SnapshotNewParamsBodyObjectGotoOptionsWaitUntilString, browser_rendering.SnapshotNewParamsBodyObjectGotoOptionsWaitUntilArray.

type SnapshotNewParamsBodyObjectRejectResourceType

type SnapshotNewParamsBodyObjectRejectResourceType string
const (
	SnapshotNewParamsBodyObjectRejectResourceTypeDocument           SnapshotNewParamsBodyObjectRejectResourceType = "document"
	SnapshotNewParamsBodyObjectRejectResourceTypeStylesheet         SnapshotNewParamsBodyObjectRejectResourceType = "stylesheet"
	SnapshotNewParamsBodyObjectRejectResourceTypeImage              SnapshotNewParamsBodyObjectRejectResourceType = "image"
	SnapshotNewParamsBodyObjectRejectResourceTypeMedia              SnapshotNewParamsBodyObjectRejectResourceType = "media"
	SnapshotNewParamsBodyObjectRejectResourceTypeFont               SnapshotNewParamsBodyObjectRejectResourceType = "font"
	SnapshotNewParamsBodyObjectRejectResourceTypeScript             SnapshotNewParamsBodyObjectRejectResourceType = "script"
	SnapshotNewParamsBodyObjectRejectResourceTypeTexttrack          SnapshotNewParamsBodyObjectRejectResourceType = "texttrack"
	SnapshotNewParamsBodyObjectRejectResourceTypeXHR                SnapshotNewParamsBodyObjectRejectResourceType = "xhr"
	SnapshotNewParamsBodyObjectRejectResourceTypeFetch              SnapshotNewParamsBodyObjectRejectResourceType = "fetch"
	SnapshotNewParamsBodyObjectRejectResourceTypePrefetch           SnapshotNewParamsBodyObjectRejectResourceType = "prefetch"
	SnapshotNewParamsBodyObjectRejectResourceTypeEventsource        SnapshotNewParamsBodyObjectRejectResourceType = "eventsource"
	SnapshotNewParamsBodyObjectRejectResourceTypeWebsocket          SnapshotNewParamsBodyObjectRejectResourceType = "websocket"
	SnapshotNewParamsBodyObjectRejectResourceTypeManifest           SnapshotNewParamsBodyObjectRejectResourceType = "manifest"
	SnapshotNewParamsBodyObjectRejectResourceTypeSignedexchange     SnapshotNewParamsBodyObjectRejectResourceType = "signedexchange"
	SnapshotNewParamsBodyObjectRejectResourceTypePing               SnapshotNewParamsBodyObjectRejectResourceType = "ping"
	SnapshotNewParamsBodyObjectRejectResourceTypeCspviolationreport SnapshotNewParamsBodyObjectRejectResourceType = "cspviolationreport"
	SnapshotNewParamsBodyObjectRejectResourceTypePreflight          SnapshotNewParamsBodyObjectRejectResourceType = "preflight"
	SnapshotNewParamsBodyObjectRejectResourceTypeOther              SnapshotNewParamsBodyObjectRejectResourceType = "other"
)

func (SnapshotNewParamsBodyObjectRejectResourceType) IsKnown

type SnapshotNewParamsBodyObjectScreenshotOptions

type SnapshotNewParamsBodyObjectScreenshotOptions struct {
	CaptureBeyondViewport param.Field[bool]                                             `json:"captureBeyondViewport"`
	Clip                  param.Field[SnapshotNewParamsBodyObjectScreenshotOptionsClip] `json:"clip"`
	FromSurface           param.Field[bool]                                             `json:"fromSurface"`
	FullPage              param.Field[bool]                                             `json:"fullPage"`
	OmitBackground        param.Field[bool]                                             `json:"omitBackground"`
	OptimizeForSpeed      param.Field[bool]                                             `json:"optimizeForSpeed"`
	Quality               param.Field[float64]                                          `json:"quality"`
	Type                  param.Field[SnapshotNewParamsBodyObjectScreenshotOptionsType] `json:"type"`
}

func (SnapshotNewParamsBodyObjectScreenshotOptions) MarshalJSON

func (r SnapshotNewParamsBodyObjectScreenshotOptions) MarshalJSON() (data []byte, err error)

type SnapshotNewParamsBodyObjectScreenshotOptionsClip

type SnapshotNewParamsBodyObjectScreenshotOptionsClip struct {
	Height param.Field[float64] `json:"height" api:"required"`
	Width  param.Field[float64] `json:"width" api:"required"`
	X      param.Field[float64] `json:"x" api:"required"`
	Y      param.Field[float64] `json:"y" api:"required"`
	Scale  param.Field[float64] `json:"scale"`
}

func (SnapshotNewParamsBodyObjectScreenshotOptionsClip) MarshalJSON

func (r SnapshotNewParamsBodyObjectScreenshotOptionsClip) MarshalJSON() (data []byte, err error)

type SnapshotNewParamsBodyObjectScreenshotOptionsType

type SnapshotNewParamsBodyObjectScreenshotOptionsType string
const (
	SnapshotNewParamsBodyObjectScreenshotOptionsTypePNG  SnapshotNewParamsBodyObjectScreenshotOptionsType = "png"
	SnapshotNewParamsBodyObjectScreenshotOptionsTypeJPEG SnapshotNewParamsBodyObjectScreenshotOptionsType = "jpeg"
	SnapshotNewParamsBodyObjectScreenshotOptionsTypeWebP SnapshotNewParamsBodyObjectScreenshotOptionsType = "webp"
)

func (SnapshotNewParamsBodyObjectScreenshotOptionsType) IsKnown

type SnapshotNewParamsBodyObjectViewport

type SnapshotNewParamsBodyObjectViewport struct {
	Height            param.Field[float64] `json:"height" api:"required"`
	Width             param.Field[float64] `json:"width" api:"required"`
	DeviceScaleFactor param.Field[float64] `json:"deviceScaleFactor"`
	HasTouch          param.Field[bool]    `json:"hasTouch"`
	IsLandscape       param.Field[bool]    `json:"isLandscape"`
	IsMobile          param.Field[bool]    `json:"isMobile"`
}

Check [options](https://pptr.dev/api/puppeteer.page.setviewport).

func (SnapshotNewParamsBodyObjectViewport) MarshalJSON

func (r SnapshotNewParamsBodyObjectViewport) MarshalJSON() (data []byte, err error)

type SnapshotNewParamsBodyObjectWaitForSelector

type SnapshotNewParamsBodyObjectWaitForSelector struct {
	Selector param.Field[string]                                            `json:"selector" api:"required"`
	Hidden   param.Field[SnapshotNewParamsBodyObjectWaitForSelectorHidden]  `json:"hidden"`
	Timeout  param.Field[float64]                                           `json:"timeout"`
	Visible  param.Field[SnapshotNewParamsBodyObjectWaitForSelectorVisible] `json:"visible"`
}

Wait for the selector to appear in page. Check [options](https://pptr.dev/api/puppeteer.page.waitforselector).

func (SnapshotNewParamsBodyObjectWaitForSelector) MarshalJSON

func (r SnapshotNewParamsBodyObjectWaitForSelector) MarshalJSON() (data []byte, err error)

type SnapshotNewParamsBodyObjectWaitForSelectorHidden

type SnapshotNewParamsBodyObjectWaitForSelectorHidden bool
const (
	SnapshotNewParamsBodyObjectWaitForSelectorHiddenTrue SnapshotNewParamsBodyObjectWaitForSelectorHidden = true
)

func (SnapshotNewParamsBodyObjectWaitForSelectorHidden) IsKnown

type SnapshotNewParamsBodyObjectWaitForSelectorVisible

type SnapshotNewParamsBodyObjectWaitForSelectorVisible bool
const (
	SnapshotNewParamsBodyObjectWaitForSelectorVisibleTrue SnapshotNewParamsBodyObjectWaitForSelectorVisible = true
)

func (SnapshotNewParamsBodyObjectWaitForSelectorVisible) IsKnown

type SnapshotNewParamsBodyUnion

type SnapshotNewParamsBodyUnion interface {
	// contains filtered or unexported methods
}

Satisfied by browser_rendering.SnapshotNewParamsBodyObject, browser_rendering.SnapshotNewParamsBodyObject, SnapshotNewParamsBody.

type SnapshotNewResponse

type SnapshotNewResponse struct {
	// HTML content.
	Content string `json:"content" api:"required"`
	// Base64 encoded image.
	Screenshot string                  `json:"screenshot" api:"required"`
	JSON       snapshotNewResponseJSON `json:"-"`
}

func (*SnapshotNewResponse) UnmarshalJSON

func (r *SnapshotNewResponse) UnmarshalJSON(data []byte) (err error)

type SnapshotNewResponseEnvelope

type SnapshotNewResponseEnvelope struct {
	Meta SnapshotNewResponseEnvelopeMeta `json:"meta" api:"required"`
	// Response status.
	Success bool                                `json:"success" api:"required"`
	Errors  []SnapshotNewResponseEnvelopeErrors `json:"errors"`
	Result  SnapshotNewResponse                 `json:"result"`
	JSON    snapshotNewResponseEnvelopeJSON     `json:"-"`
}

func (*SnapshotNewResponseEnvelope) UnmarshalJSON

func (r *SnapshotNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type SnapshotNewResponseEnvelopeErrors

type SnapshotNewResponseEnvelopeErrors struct {
	// Error code.
	Code float64 `json:"code" api:"required"`
	// Error message.
	Message string                                `json:"message" api:"required"`
	JSON    snapshotNewResponseEnvelopeErrorsJSON `json:"-"`
}

func (*SnapshotNewResponseEnvelopeErrors) UnmarshalJSON

func (r *SnapshotNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type SnapshotNewResponseEnvelopeMeta

type SnapshotNewResponseEnvelopeMeta struct {
	Status float64                             `json:"status"`
	Title  string                              `json:"title"`
	JSON   snapshotNewResponseEnvelopeMetaJSON `json:"-"`
}

func (*SnapshotNewResponseEnvelopeMeta) UnmarshalJSON

func (r *SnapshotNewResponseEnvelopeMeta) UnmarshalJSON(data []byte) (err error)

type SnapshotService

type SnapshotService struct {
	Options []option.RequestOption
}

SnapshotService contains methods and other services that help with interacting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSnapshotService method instead.

func NewSnapshotService

func NewSnapshotService(opts ...option.RequestOption) (r *SnapshotService)

NewSnapshotService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*SnapshotService) New

Returns the page's HTML content and screenshot. Control page loading with `gotoOptions` and `waitFor*` options. Customize screenshots with `viewport`, `fullPage`, `clip` and others.

type SortDirection

type SortDirection = shared.SortDirection

Direction to order DNS records in.

This is an alias to an internal type.

type Subscription

type Subscription = shared.Subscription

This is an alias to an internal type.

type SubscriptionFrequency

type SubscriptionFrequency = shared.SubscriptionFrequency

How often the subscription is renewed automatically.

This is an alias to an internal type.

type SubscriptionParam

type SubscriptionParam = shared.SubscriptionParam

This is an alias to an internal type.

type SubscriptionState

type SubscriptionState = shared.SubscriptionState

The state that the subscription is in.

This is an alias to an internal type.

type Token

type Token = shared.Token

This is an alias to an internal type.

type TokenCondition

type TokenCondition = shared.TokenCondition

This is an alias to an internal type.

type TokenConditionCIDRList

type TokenConditionCIDRList = shared.TokenConditionCIDRList

IPv4/IPv6 CIDR.

This is an alias to an internal type.

type TokenConditionCIDRListParam

type TokenConditionCIDRListParam = shared.TokenConditionCIDRListParam

IPv4/IPv6 CIDR.

This is an alias to an internal type.

type TokenConditionParam

type TokenConditionParam = shared.TokenConditionParam

This is an alias to an internal type.

type TokenConditionRequestIP

type TokenConditionRequestIP = shared.TokenConditionRequestIP

Client IP restrictions.

This is an alias to an internal type.

type TokenConditionRequestIPParam

type TokenConditionRequestIPParam = shared.TokenConditionRequestIPParam

Client IP restrictions.

This is an alias to an internal type.

type TokenParam

type TokenParam = shared.TokenParam

This is an alias to an internal type.

type TokenPolicy

type TokenPolicy = shared.TokenPolicy

This is an alias to an internal type.

type TokenPolicyEffect

type TokenPolicyEffect = shared.TokenPolicyEffect

Allow or deny operations against the resources.

This is an alias to an internal type.

type TokenPolicyParam

type TokenPolicyParam = shared.TokenPolicyParam

This is an alias to an internal type.

type TokenPolicyPermissionGroup

type TokenPolicyPermissionGroup = shared.TokenPolicyPermissionGroup

A named group of permissions that map to a group of operations against resources.

This is an alias to an internal type.

type TokenPolicyPermissionGroupParam

type TokenPolicyPermissionGroupParam = shared.TokenPolicyPermissionGroupParam

A named group of permissions that map to a group of operations against resources.

This is an alias to an internal type.

type TokenPolicyPermissionGroupsMeta

type TokenPolicyPermissionGroupsMeta = shared.TokenPolicyPermissionGroupsMeta

Attributes associated to the permission group.

This is an alias to an internal type.

type TokenPolicyPermissionGroupsMetaParam

type TokenPolicyPermissionGroupsMetaParam = shared.TokenPolicyPermissionGroupsMetaParam

Attributes associated to the permission group.

This is an alias to an internal type.

type TokenPolicyResourcesIAMResourcesTypeObjectNested

type TokenPolicyResourcesIAMResourcesTypeObjectNested = shared.TokenPolicyResourcesIAMResourcesTypeObjectNested

Map of nested resource permissions

This is an alias to an internal type.

type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam

type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam = shared.TokenPolicyResourcesIAMResourcesTypeObjectNestedParam

Map of nested resource permissions

This is an alias to an internal type.

type TokenPolicyResourcesIAMResourcesTypeObjectString

type TokenPolicyResourcesIAMResourcesTypeObjectString = shared.TokenPolicyResourcesIAMResourcesTypeObjectString

Map of simple string resource permissions

This is an alias to an internal type.

type TokenPolicyResourcesIAMResourcesTypeObjectStringParam

type TokenPolicyResourcesIAMResourcesTypeObjectStringParam = shared.TokenPolicyResourcesIAMResourcesTypeObjectStringParam

Map of simple string resource permissions

This is an alias to an internal type.

type TokenPolicyResourcesUnion

type TokenPolicyResourcesUnion = shared.TokenPolicyResourcesUnion

A list of resource names that the policy applies to.

This is an alias to an internal type.

type TokenPolicyResourcesUnionParam

type TokenPolicyResourcesUnionParam = shared.TokenPolicyResourcesUnionParam

A list of resource names that the policy applies to.

This is an alias to an internal type.

type TokenStatus

type TokenStatus = shared.TokenStatus

Status of the token.

This is an alias to an internal type.

type TokenValue

type TokenValue = shared.TokenValue

The token value.

This is an alias to an internal type.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL