import * as S from "@distilled.cloud/core/schema"; import * as API from "@distilled.cloud/core/api"; import { type CloudflareOpError, type CloudflareOpContext } from "../protocol.ts"; import { ResultInfo } from "../pagination.ts"; export type { CloudflareOpError, CloudflareOpContext }; declare const Forbidden_base: S.Class, import("effect/Cause").YieldableError>; export declare class Forbidden extends /*@__PURE__*/ Forbidden_base { } declare const NotEntitled_base: S.Class, import("effect/Cause").YieldableError>; export declare class NotEntitled extends /*@__PURE__*/ NotEntitled_base { } declare const PolicyNotFound_base: S.Class, import("effect/Cause").YieldableError>; export declare class PolicyNotFound extends /*@__PURE__*/ PolicyNotFound_base { } declare const PolicyQuotaExceeded_base: S.Class, import("effect/Cause").YieldableError>; export declare class PolicyQuotaExceeded extends /*@__PURE__*/ PolicyQuotaExceeded_base { } export type PoliciesCreateRequestAction = "allow" | "log" | "add_reporting_directives"; export declare const PoliciesCreateRequestAction: any; export interface CreatePolicyRequest { /** Identifier */ zoneId: string; /** The action to take if the expression matches */ action: PoliciesCreateRequestAction | (string & {}); /** A description for the policy */ description: string; /** Whether the policy is enabled */ enabled: boolean; /** The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax */ expression: string; /** The policy which will be applied */ value: string; } export declare const CreatePolicyRequest: S.Schema; export type PoliciesCreateResponseAction = "allow" | "log" | "add_reporting_directives"; export declare const PoliciesCreateResponseAction: any; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreatePolicyResponse { /** Identifier */ id: string; /** The action to take if the expression matches */ action: PoliciesCreateResponseAction; /** A description for the policy */ description: string; /** Whether the policy is enabled */ enabled: boolean; /** The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax */ expression: string; /** The policy which will be applied */ value: string; } export declare const CreatePolicyResponse: S.Schema; export interface DeletePolicyRequest { /** Identifier */ zoneId: string; /** Identifier */ policyId: string; } export declare const DeletePolicyRequest: S.Schema; export interface DeletePolicyResponse { } export declare const DeletePolicyResponse: S.Schema; export interface GetConnectionRequest { /** Identifier */ zoneId: string; /** Identifier */ connectionId: string; } export declare const GetConnectionRequest: S.Schema; export type ConnectionsGetResponseMaliciousDomainCategoriesList = Array; export declare const ConnectionsGetResponseMaliciousDomainCategoriesList: S.Schema; export type ConnectionsGetResponseMaliciousUrlCategoriesList = Array; export declare const ConnectionsGetResponseMaliciousUrlCategoriesList: S.Schema; export type ConnectionsGetResponsePageUrlsList = Array; export declare const ConnectionsGetResponsePageUrlsList: S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetConnectionResponse { /** Identifier */ id: string; addedAt: string; firstSeenAt: string; host: string; lastSeenAt: string; url: string; urlContainsCdnCgiPath: boolean; domainReportedMalicious?: boolean | null; firstPageUrl?: string | null; maliciousDomainCategories?: ConnectionsGetResponseMaliciousDomainCategoriesList | null; maliciousUrlCategories?: ConnectionsGetResponseMaliciousUrlCategoriesList | null; pageUrls?: ConnectionsGetResponsePageUrlsList | null; urlReportedMalicious?: boolean | null; } export declare const GetConnectionResponse: S.Schema; export interface GetCookyRequest { /** Identifier */ zoneId: string; /** Identifier */ cookieId: string; } export declare const GetCookyRequest: S.Schema; export type CookiesGetResponseType = "first_party" | "unknown"; export declare const CookiesGetResponseType: any; export type CookiesGetResponsePageUrlsList = Array; export declare const CookiesGetResponsePageUrlsList: S.Schema; export type CookiesGetResponseSameSiteAttribute = "lax" | "strict" | "none"; export declare const CookiesGetResponseSameSiteAttribute: any; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetCookyResponse { /** Identifier */ id: string; firstSeenAt: string; host: string; lastSeenAt: string; name: string; type: CookiesGetResponseType; domainAttribute?: string | null; expiresAttribute?: string | null; httpOnlyAttribute?: boolean | null; maxAgeAttribute?: number | null; pageUrls?: CookiesGetResponsePageUrlsList | null; pathAttribute?: string | null; sameSiteAttribute?: CookiesGetResponseSameSiteAttribute | null; secureAttribute?: boolean | null; } export declare const GetCookyResponse: S.Schema; export interface GetPageShieldRequest { /** Identifier */ zoneId: string; } export declare const GetPageShieldRequest: S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetPageShieldResponse { /** When true, indicates that Page Shield is enabled. */ enabled: boolean; /** The timestamp of when Page Shield was last updated. */ updatedAt: string; /** When true, CSP reports will be sent to https://csp-reporting.cloudflare.com/cdn-cgi/script_monitor/report */ useCloudflareReportingEndpoint: boolean; /** When true, the paths associated with connections URLs will also be analyzed. */ useConnectionUrlPath: boolean; } export declare const GetPageShieldResponse: S.Schema; export interface GetPolicyRequest { /** Identifier */ zoneId: string; /** Identifier */ policyId: string; } export declare const GetPolicyRequest: S.Schema; export type PoliciesGetResponseAction = "allow" | "log" | "add_reporting_directives"; export declare const PoliciesGetResponseAction: any; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetPolicyResponse { /** Identifier */ id: string; /** The action to take if the expression matches */ action: PoliciesGetResponseAction; /** A description for the policy */ description: string; /** Whether the policy is enabled */ enabled: boolean; /** The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax */ expression: string; /** The policy which will be applied */ value: string; } export declare const GetPolicyResponse: S.Schema; export interface GetScriptRequest { /** Identifier */ zoneId: string; /** Identifier */ scriptId: string; } export declare const GetScriptRequest: S.Schema; export type ScriptsGetResponseMaliciousDomainCategoriesList = Array; export declare const ScriptsGetResponseMaliciousDomainCategoriesList: S.Schema; export type ScriptsGetResponseMaliciousUrlCategoriesList = Array; export declare const ScriptsGetResponseMaliciousUrlCategoriesList: S.Schema; export type ScriptsGetResponsePageUrlsList = Array; export declare const ScriptsGetResponsePageUrlsList: S.Schema; export interface ScriptsGetResponseVersionsItem { /** The cryptomining score of the JavaScript content. */ cryptominingScore?: number | null; /** The dataflow score of the JavaScript content. This field has been deprecated in favour of js_integrity_score. */ dataflowScore?: number | null; /** The timestamp of when the script was last fetched. */ fetchedAt?: string | null; /** The computed hash of the analyzed script. */ hash?: string | null; /** The integrity score of the JavaScript content. */ jsIntegrityScore?: number | null; /** The magecart score of the JavaScript content. */ magecartScore?: number | null; /** The malware score of the JavaScript content. */ malwareScore?: number | null; /** The obfuscation score of the JavaScript content. This field has been deprecated in favour of js_integrity_score. */ obfuscationScore?: number | null; } export declare const ScriptsGetResponseVersionsItem: S.Schema; export type ScriptsGetResponseVersionsList = Array; export declare const ScriptsGetResponseVersionsList: S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetScriptResponse { /** Identifier */ id: string; addedAt: string; firstSeenAt: string; host: string; lastSeenAt: string; url: string; urlContainsCdnCgiPath: boolean; /** The cryptomining score of the JavaScript content. */ cryptominingScore?: number | null; /** The dataflow score of the JavaScript content. This field has been deprecated in favour of js_integrity_score. */ dataflowScore?: number | null; domainReportedMalicious?: boolean | null; /** The timestamp of when the script was last fetched. */ fetchedAt?: string | null; firstPageUrl?: string | null; /** The computed hash of the analyzed script. */ hash?: string | null; /** The integrity score of the JavaScript content. */ jsIntegrityScore?: number | null; /** The magecart score of the JavaScript content. */ magecartScore?: number | null; maliciousDomainCategories?: ScriptsGetResponseMaliciousDomainCategoriesList | null; maliciousUrlCategories?: ScriptsGetResponseMaliciousUrlCategoriesList | null; /** The malware score of the JavaScript content. */ malwareScore?: number | null; /** The obfuscation score of the JavaScript content. This field has been deprecated in favour of js_integrity_score. */ obfuscationScore?: number | null; pageUrls?: ScriptsGetResponsePageUrlsList | null; urlReportedMalicious?: boolean | null; versions?: ScriptsGetResponseVersionsList | null; } export declare const GetScriptResponse: S.Schema; export type ConnectionsListRequestDirection = "asc" | "desc"; export declare const ConnectionsListRequestDirection: any; export type ConnectionsListRequestExport = "csv"; export declare const ConnectionsListRequestExport: any; export type ConnectionsListRequestOrderBy = "first_seen_at" | "last_seen_at"; export declare const ConnectionsListRequestOrderBy: any; export interface ListConnectionsRequest { /** Identifier */ zoneId: string; /** The direction used to sort returned connections. */ direction?: ConnectionsListRequestDirection | (string & {}); /** When true, excludes connections seen in a `/cdn-cgi` path from the returned connections. The default value is true. */ excludeCdnCgi?: boolean; /** Excludes connections whose URL contains one of the URL-encoded URLs separated by commas. */ excludeUrls?: string; /** Export the list of connections as a file, limited to 50000 entries. */ export?: ConnectionsListRequestExport | (string & {}); /** Includes connections that match one or more URL-encoded hostnames separated by commas. */ hosts?: string; /** The field used to sort returned connections. */ orderBy?: ConnectionsListRequestOrderBy | (string & {}); /** The current page number of the paginated results. */ page?: string; /** Includes connections that match one or more page URLs (separated by commas) where they were last seen */ pageUrl?: string; /** The number of results per page. */ perPage?: number; /** When true, malicious connections appear first in the returned connections. */ prioritizeMalicious?: boolean; /** Filters the returned connections using a comma-separated list of connection statuses. Accepted values: `active`, `infrequent`, and `inactive`. The default value is `active`. */ status?: string; /** Includes connections whose URL contain one or more URL-encoded URLs separated by commas. */ urls?: string; } export declare const ListConnectionsRequest: S.Schema; export type ConnectionsListResultItemMaliciousDomainCategoriesList = Array; export declare const ConnectionsListResultItemMaliciousDomainCategoriesList: S.Schema; export type ConnectionsListResultItemMaliciousUrlCategoriesList = Array; export declare const ConnectionsListResultItemMaliciousUrlCategoriesList: S.Schema; export type ConnectionsListResultItemPageUrlsList = Array; export declare const ConnectionsListResultItemPageUrlsList: S.Schema; export interface ConnectionsListResultItem { /** Identifier */ id: string; addedAt: string; firstSeenAt: string; host: string; lastSeenAt: string; url: string; urlContainsCdnCgiPath: boolean; domainReportedMalicious?: boolean | null; firstPageUrl?: string | null; maliciousDomainCategories?: ConnectionsListResultItemMaliciousDomainCategoriesList | null; maliciousUrlCategories?: ConnectionsListResultItemMaliciousUrlCategoriesList | null; pageUrls?: ConnectionsListResultItemPageUrlsList | null; urlReportedMalicious?: boolean | null; } export declare const ConnectionsListResultItem: S.Schema; export type ConnectionsListResultList = Array; export declare const ConnectionsListResultList: S.Schema; export interface ListConnectionsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: ConnectionsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export declare const ListConnectionsResponse: S.Schema; export type CookiesListRequestDirection = "asc" | "desc"; export declare const CookiesListRequestDirection: any; export type CookiesListRequestExport = "csv"; export declare const CookiesListRequestExport: any; export type CookiesListRequestOrderBy = "first_seen_at" | "last_seen_at"; export declare const CookiesListRequestOrderBy: any; export type CookiesListRequestSameSite = "lax" | "strict" | "none"; export declare const CookiesListRequestSameSite: any; export type CookiesListRequestType = "first_party" | "unknown"; export declare const CookiesListRequestType: any; export interface ListCookiesRequest { /** Identifier */ zoneId: string; /** The direction used to sort returned cookies.' */ direction?: CookiesListRequestDirection | (string & {}); /** Filters the returned cookies that match the specified domain attribute */ domain?: string; /** Export the list of cookies as a file, limited to 50000 entries. */ export?: CookiesListRequestExport | (string & {}); /** Includes cookies that match one or more URL-encoded hostnames separated by commas. */ hosts?: string; /** Filters the returned cookies that are set with HttpOnly */ httpOnly?: boolean; /** Filters the returned cookies that match the specified name. */ name?: string; /** The field used to sort returned cookies. */ orderBy?: CookiesListRequestOrderBy | (string & {}); /** The current page number of the paginated results. */ page?: string; /** Includes connections that match one or more page URLs (separated by commas) where they were last seen */ pageUrl?: string; /** Filters the returned cookies that match the specified path attribute */ path?: string; /** The number of results per page. */ perPage?: number; /** Filters the returned cookies that match the specified same_site attribute */ sameSite?: CookiesListRequestSameSite | (string & {}); /** Filters the returned cookies that are set with Secure */ secure?: boolean; /** Filters the returned cookies that match the specified type attribute */ type?: CookiesListRequestType | (string & {}); } export declare const ListCookiesRequest: S.Schema; export type CookiesListResultItemType = "first_party" | "unknown"; export declare const CookiesListResultItemType: any; export type CookiesListResultItemPageUrlsList = Array; export declare const CookiesListResultItemPageUrlsList: S.Schema; export type CookiesListResultItemSameSiteAttribute = "lax" | "strict" | "none"; export declare const CookiesListResultItemSameSiteAttribute: any; export interface CookiesListResultItem { /** Identifier */ id: string; firstSeenAt: string; host: string; lastSeenAt: string; name: string; type: CookiesListResultItemType; domainAttribute?: string | null; expiresAttribute?: string | null; httpOnlyAttribute?: boolean | null; maxAgeAttribute?: number | null; pageUrls?: CookiesListResultItemPageUrlsList | null; pathAttribute?: string | null; sameSiteAttribute?: CookiesListResultItemSameSiteAttribute | null; secureAttribute?: boolean | null; } export declare const CookiesListResultItem: S.Schema; export type CookiesListResultList = Array; export declare const CookiesListResultList: S.Schema; export interface ListCookiesResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: CookiesListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export declare const ListCookiesResponse: S.Schema; export interface ListPoliciesRequest { /** Identifier */ zoneId: string; } export declare const ListPoliciesRequest: S.Schema; export type PoliciesListResultItemAction = "allow" | "log" | "add_reporting_directives"; export declare const PoliciesListResultItemAction: any; export interface PoliciesListResultItem { /** Identifier */ id: string; /** The action to take if the expression matches */ action: PoliciesListResultItemAction; /** A description for the policy */ description: string; /** Whether the policy is enabled */ enabled: boolean; /** The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax */ expression: string; /** The policy which will be applied */ value: string; } export declare const PoliciesListResultItem: S.Schema; export type PoliciesListResultList = Array; export declare const PoliciesListResultList: S.Schema; export interface ListPoliciesResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: PoliciesListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export declare const ListPoliciesResponse: S.Schema; export type ScriptsListRequestDirection = "asc" | "desc"; export declare const ScriptsListRequestDirection: any; export type ScriptsListRequestExport = "csv"; export declare const ScriptsListRequestExport: any; export type ScriptsListRequestOrderBy = "first_seen_at" | "last_seen_at"; export declare const ScriptsListRequestOrderBy: any; export interface ListScriptsRequest { /** Identifier */ zoneId: string; /** The direction used to sort returned scripts. */ direction?: ScriptsListRequestDirection | (string & {}); /** When true, excludes scripts seen in a `/cdn-cgi` path from the returned scripts. The default value is true. */ excludeCdnCgi?: boolean; /** When true, excludes duplicate scripts. We consider a script duplicate of another if their javascript */ excludeDuplicates?: boolean; /** Excludes scripts whose URL contains one of the URL-encoded URLs separated by commas. */ excludeUrls?: string; /** Export the list of scripts as a file, limited to 50000 entries. */ export?: ScriptsListRequestExport | (string & {}); /** Includes scripts that match one or more URL-encoded hostnames separated by commas. */ hosts?: string; /** The field used to sort returned scripts. */ orderBy?: ScriptsListRequestOrderBy | (string & {}); /** The current page number of the paginated results. */ page?: string; /** Includes scripts that match one or more page URLs (separated by commas) where they were last seen */ pageUrl?: string; /** The number of results per page. */ perPage?: number; /** When true, malicious scripts appear first in the returned scripts. */ prioritizeMalicious?: boolean; /** Filters the returned scripts using a comma-separated list of scripts statuses. Accepted values: `active`, `infrequent`, and `inactive`. The default value is `active`. */ status?: string; /** Includes scripts whose URL contain one or more URL-encoded URLs separated by commas. */ urls?: string; } export declare const ListScriptsRequest: S.Schema; export type ScriptsListResultItemMaliciousDomainCategoriesList = Array; export declare const ScriptsListResultItemMaliciousDomainCategoriesList: S.Schema; export type ScriptsListResultItemMaliciousUrlCategoriesList = Array; export declare const ScriptsListResultItemMaliciousUrlCategoriesList: S.Schema; export type ScriptsListResultItemPageUrlsList = Array; export declare const ScriptsListResultItemPageUrlsList: S.Schema; export interface ScriptsListResultItem { /** Identifier */ id: string; addedAt: string; firstSeenAt: string; host: string; lastSeenAt: string; url: string; urlContainsCdnCgiPath: boolean; /** The cryptomining score of the JavaScript content. */ cryptominingScore?: number | null; /** The dataflow score of the JavaScript content. This field has been deprecated in favour of js_integrity_score. */ dataflowScore?: number | null; domainReportedMalicious?: boolean | null; /** The timestamp of when the script was last fetched. */ fetchedAt?: string | null; firstPageUrl?: string | null; /** The computed hash of the analyzed script. */ hash?: string | null; /** The integrity score of the JavaScript content. */ jsIntegrityScore?: number | null; /** The magecart score of the JavaScript content. */ magecartScore?: number | null; maliciousDomainCategories?: ScriptsListResultItemMaliciousDomainCategoriesList | null; maliciousUrlCategories?: ScriptsListResultItemMaliciousUrlCategoriesList | null; /** The malware score of the JavaScript content. */ malwareScore?: number | null; /** The obfuscation score of the JavaScript content. This field has been deprecated in favour of js_integrity_score. */ obfuscationScore?: number | null; pageUrls?: ScriptsListResultItemPageUrlsList | null; urlReportedMalicious?: boolean | null; } export declare const ScriptsListResultItem: S.Schema; export type ScriptsListResultList = Array; export declare const ScriptsListResultList: S.Schema; export interface ListScriptsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: ScriptsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export declare const ListScriptsResponse: S.Schema; export interface PutPageShieldRequest { /** Identifier */ zoneId: string; /** When true, indicates that Page Shield is enabled. */ enabled?: boolean; /** When true, CSP reports will be sent to https://csp-reporting.cloudflare.com/cdn-cgi/script_monitor/report */ useCloudflareReportingEndpoint?: boolean; /** When true, the paths associated with connections URLs will also be analyzed. */ useConnectionUrlPath?: boolean; } export declare const PutPageShieldRequest: S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PutPageShieldResponse { /** When true, indicates that Page Shield is enabled. */ enabled: boolean; /** The timestamp of when Page Shield was last updated. */ updatedAt: string; /** When true, CSP reports will be sent to https://csp-reporting.cloudflare.com/cdn-cgi/script_monitor/report */ useCloudflareReportingEndpoint: boolean; /** When true, the paths associated with connections URLs will also be analyzed. */ useConnectionUrlPath: boolean; } export declare const PutPageShieldResponse: S.Schema; export type PoliciesUpdateRequestAction = "allow" | "log" | "add_reporting_directives"; export declare const PoliciesUpdateRequestAction: any; export interface UpdatePolicyRequest { /** Identifier */ zoneId: string; /** Identifier */ policyId: string; /** The action to take if the expression matches */ action?: PoliciesUpdateRequestAction | (string & {}); /** A description for the policy */ description?: string; /** Whether the policy is enabled */ enabled?: boolean; /** The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax */ expression?: string; /** The policy which will be applied */ value?: string; } export declare const UpdatePolicyRequest: S.Schema; export type PoliciesUpdateResponseAction = "allow" | "log" | "add_reporting_directives"; export declare const PoliciesUpdateResponseAction: any; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface UpdatePolicyResponse { /** Identifier */ id: string; /** The action to take if the expression matches */ action: PoliciesUpdateResponseAction; /** A description for the policy */ description: string; /** Whether the policy is enabled */ enabled: boolean; /** The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax */ expression: string; /** The policy which will be applied */ value: string; } export declare const UpdatePolicyResponse: S.Schema; export type CreatePolicyError = PolicyQuotaExceeded | Forbidden | CloudflareOpError; /** Create a Page Shield policy. */ export declare const createPolicy: API.OperationMethod; export type DeletePolicyError = PolicyNotFound | Forbidden | CloudflareOpError; /** Delete a Page Shield policy by ID. */ export declare const deletePolicy: API.OperationMethod; export type GetConnectionError = CloudflareOpError; /** Fetches a connection detected by Page Shield by connection ID. */ export declare const getConnection: API.OperationMethod; export type GetCookyError = CloudflareOpError; /** Fetches a cookie collected by Page Shield by cookie ID. */ export declare const getCooky: API.OperationMethod; export type GetPageShieldError = Forbidden | CloudflareOpError; /** Fetches the Page Shield settings. */ export declare const getPageShield: API.OperationMethod; export type GetPolicyError = PolicyNotFound | Forbidden | CloudflareOpError; /** Fetches a Page Shield policy by ID. */ export declare const getPolicy: API.OperationMethod; export type GetScriptError = CloudflareOpError; /** Fetches a script detected by Page Shield by script ID. */ export declare const getScript: API.OperationMethod; export type ListConnectionsError = CloudflareOpError; /** Lists all connections detected by Page Shield. */ export declare const listConnections: API.PaginatedOperationMethod; export type ListCookiesError = CloudflareOpError; /** Lists all cookies collected by Page Shield. */ export declare const listCookies: API.PaginatedOperationMethod; export type ListPoliciesError = Forbidden | CloudflareOpError; /** Lists all Page Shield policies. */ export declare const listPolicies: API.PaginatedOperationMethod; export type ListScriptsError = CloudflareOpError; /** Lists all scripts detected by Page Shield. */ export declare const listScripts: API.PaginatedOperationMethod; export type PutPageShieldError = NotEntitled | Forbidden | CloudflareOpError; /** Updates Page Shield settings. */ export declare const putPageShield: API.OperationMethod; export type UpdatePolicyError = PolicyNotFound | Forbidden | CloudflareOpError; /** Update a Page Shield policy by ID. */ export declare const updatePolicy: API.OperationMethod; //# sourceMappingURL=page_shield.d.ts.map