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 SnippetInUse_base: S.Class, import("effect/Cause").YieldableError>; export declare class SnippetInUse extends /*@__PURE__*/ SnippetInUse_base { } declare const SnippetNotFound_base: S.Class, import("effect/Cause").YieldableError>; export declare class SnippetNotFound extends /*@__PURE__*/ SnippetNotFound_base { } declare const SnippetRulesNotFound_base: S.Class, import("effect/Cause").YieldableError>; export declare class SnippetRulesNotFound extends /*@__PURE__*/ SnippetRulesNotFound_base { } export interface DeleteRuleRequest { /** Use this field to specify the unique ID of the zone. */ zoneId: string; } export declare const DeleteRuleRequest: S.Schema; export type DeleteRuleResponse = unknown; export declare const DeleteRuleResponse: S.Schema; export interface DeleteSnippetRequest { /** Use this field to specify the unique ID of the zone. */ zoneId: string; /** Identify the snippet. */ snippetName: string; } export declare const DeleteSnippetRequest: S.Schema; export type DeleteSnippetResponse = unknown; export declare const DeleteSnippetResponse: S.Schema; export interface GetContentRequest { /** Use this field to specify the unique ID of the zone. */ zoneId: string; /** Identify the snippet. */ snippetName: string; } export declare const GetContentRequest: S.Schema; export interface GetContentResponse { } export declare const GetContentResponse: S.Schema; export interface GetRuleRequest { /** Use this field to specify the unique ID of the zone. */ zoneId: string; } export declare const GetRuleRequest: S.Schema; export type GetRuleResponse = unknown; export declare const GetRuleResponse: S.Schema; export interface GetSnippetRequest { /** Use this field to specify the unique ID of the zone. */ zoneId: string; /** Identify the snippet. */ snippetName: string; } export declare const GetSnippetRequest: S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetSnippetResponse { /** Indicates when the snippet was created. */ createdOn: string; /** Identify the snippet. */ snippetName: string; /** Indicates when the snippet was last modified. */ modifiedOn?: string | null; } export declare const GetSnippetResponse: S.Schema; export interface ListSnippetsRequest { /** Use this field to specify the unique ID of the zone. */ zoneId: string; /** Specifies the current page number. */ page?: number; /** Specifies how many results to return per page. */ perPage?: number; } export declare const ListSnippetsRequest: S.Schema; export interface ListResultItem { /** Indicates when the snippet was created. */ createdOn: string; /** Identify the snippet. */ snippetName: string; /** Indicates when the snippet was last modified. */ modifiedOn?: string | null; } export declare const ListResultItem: S.Schema; export type ListResultList = Array; export declare const ListResultList: S.Schema; export interface ListSnippetsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: ListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export declare const ListSnippetsResponse: S.Schema; export interface RulesUpdateRequestRulesItem { /** Define the expression that determines which traffic matches the rule. */ expression: string; /** Identify the snippet. */ snippetName: string; /** Provide an informative description of the rule. */ description?: string; /** Indicate whether to execute the rule. */ enabled?: boolean; } export declare const RulesUpdateRequestRulesItem: S.Schema; export type RulesUpdateRequestRulesList = Array; export declare const RulesUpdateRequestRulesList: S.Schema; export interface PutRuleRequest { /** Use this field to specify the unique ID of the zone. */ zoneId: string; /** Lists snippet rules. */ rules: RulesUpdateRequestRulesList; } export declare const PutRuleRequest: S.Schema; export type PutRuleResponse = unknown; export declare const PutRuleResponse: S.Schema; export interface PutSnippetRequest { /** Use this field to specify the unique ID of the zone. */ zoneId: string; /** Identify the snippet. */ snippetName: string; /** Snippet metadata ({ mainModule }), JSON-encoded as the multipart `metadata` part. */ metadata: unknown; /** Snippet module file(s), appended under their own filenames. */ files?: File | Blob | (File | Blob)[]; } export declare const PutSnippetRequest: S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PutSnippetResponse { /** Indicates when the snippet was created. */ createdOn: string; /** Identify the snippet. */ snippetName: string; /** Indicates when the snippet was last modified. */ modifiedOn?: string | null; } export declare const PutSnippetResponse: S.Schema; export interface RulesListRequest { /** Use this field to specify the unique ID of the zone. */ zoneId: string; } export declare const RulesListRequest: S.Schema; export type RulesListResponse = unknown; export declare const RulesListResponse: S.Schema; export type DeleteRuleError = SnippetRulesNotFound | Forbidden | CloudflareOpError; /** Deletes all snippet rules belonging to the zone. */ export declare const deleteRule: API.OperationMethod; export type DeleteSnippetError = SnippetNotFound | SnippetInUse | CloudflareOpError; /** Deletes a snippet belonging to the zone. */ export declare const deleteSnippet: API.OperationMethod; export type GetContentError = CloudflareOpError; /** Fetches the content of a snippet belonging to the zone. */ export declare const getContent: API.OperationMethod; export type GetRuleError = SnippetRulesNotFound | Forbidden | CloudflareOpError; /** Fetches all snippet rules belonging to the zone. */ export declare const getRule: API.OperationMethod; export type GetSnippetError = SnippetNotFound | CloudflareOpError; /** Fetches a snippet belonging to the zone. */ export declare const getSnippet: API.OperationMethod; export type ListSnippetsError = Forbidden | CloudflareOpError; /** Fetches all snippets belonging to the zone. */ export declare const listSnippets: API.PaginatedOperationMethod; export type PutRuleError = CloudflareOpError; /** Updates all snippet rules belonging to the zone. */ export declare const putRule: API.OperationMethod; export type PutSnippetError = CloudflareOpError; /** Creates or updates a snippet belonging to the zone. */ export declare const putSnippet: API.OperationMethod; export type RulesListError = CloudflareOpError; /** Fetches all snippet rules belonging to the zone. */ export declare const rulesList: API.OperationMethod; export declare const listRules: API.OperationMethod; export type ListRulesRequest = GetRuleRequest; export type ListRulesResponse = GetRuleResponse; export type ListRulesError = GetRuleError; //# sourceMappingURL=snippets.d.ts.map