/**
 * Cloudflare TURNSTILE API
 *
 * Generated from Cloudflare TypeScript SDK.
 * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service turnstile
 */
import * as Schema from "effect/Schema";
import type * as HttpClient from "effect/unstable/http/HttpClient";
import * as API from "../client/api.ts";
import type { Credentials } from "../credentials.ts";
import { type DefaultErrors } from "../errors.ts";
export interface RotateSecretWidgetRequest {
    sitekey: string;
    /** Path param: Identifier */
    accountId: string;
    /** Body param: If `invalidate_immediately` is set to `false`, the previous secret will remain valid for two hours. Otherwise, the secret is immediately invalidated, and requests using it will be rejected */
    invalidateImmediately?: boolean;
}
export declare const RotateSecretWidgetRequest: Schema.Schema<RotateSecretWidgetRequest>;
export interface RotateSecretWidgetResponse {
    /** If bot_fight_mode is set to `true`, Cloudflare issues computationally expensive challenges in response to malicious bots (ENT only). */
    botFightMode: boolean;
    /** If Turnstile is embedded on a Cloudflare site and the widget should grant challenge clearance, this setting can determine the clearance level to be set */
    clearanceLevel: "no_clearance" | "jschallenge" | "managed" | "interactive";
    /** When the widget was created. */
    createdOn: string;
    domains: string[];
    /** Return the Ephemeral ID in /siteverify (ENT only). */
    ephemeralId: boolean;
    /** Widget Mode */
    mode: "non-interactive" | "invisible" | "managed";
    /** When the widget was modified. */
    modifiedOn: string;
    /** Human readable widget name. Not unique. Cloudflare suggests that you set this to a meaningful string to make it easier to identify your widget, and where it is used. */
    name: string;
    /** Do not show any Cloudflare branding on the widget (ENT only). */
    offlabel: boolean;
    /** Region where this widget can be used. This cannot be changed after creation. */
    region: "world" | "china";
    /** Secret key for this widget. */
    secret: string;
    /** Widget item identifier tag. */
    sitekey: string;
}
export declare const RotateSecretWidgetResponse: Schema.Schema<RotateSecretWidgetResponse>;
export type RotateSecretWidgetError = DefaultErrors;
export declare const rotateSecretWidget: API.OperationMethod<RotateSecretWidgetRequest, RotateSecretWidgetResponse, RotateSecretWidgetError, Credentials | HttpClient.HttpClient>;
export interface GetWidgetRequest {
    sitekey: string;
    /** Identifier */
    accountId: string;
}
export declare const GetWidgetRequest: Schema.Schema<GetWidgetRequest>;
export interface GetWidgetResponse {
    /** If bot_fight_mode is set to `true`, Cloudflare issues computationally expensive challenges in response to malicious bots (ENT only). */
    botFightMode: boolean;
    /** If Turnstile is embedded on a Cloudflare site and the widget should grant challenge clearance, this setting can determine the clearance level to be set */
    clearanceLevel: "no_clearance" | "jschallenge" | "managed" | "interactive";
    /** When the widget was created. */
    createdOn: string;
    domains: string[];
    /** Return the Ephemeral ID in /siteverify (ENT only). */
    ephemeralId: boolean;
    /** Widget Mode */
    mode: "non-interactive" | "invisible" | "managed";
    /** When the widget was modified. */
    modifiedOn: string;
    /** Human readable widget name. Not unique. Cloudflare suggests that you set this to a meaningful string to make it easier to identify your widget, and where it is used. */
    name: string;
    /** Do not show any Cloudflare branding on the widget (ENT only). */
    offlabel: boolean;
    /** Region where this widget can be used. This cannot be changed after creation. */
    region: "world" | "china";
    /** Secret key for this widget. */
    secret: string;
    /** Widget item identifier tag. */
    sitekey: string;
}
export declare const GetWidgetResponse: Schema.Schema<GetWidgetResponse>;
export type GetWidgetError = DefaultErrors;
export declare const getWidget: API.OperationMethod<GetWidgetRequest, GetWidgetResponse, GetWidgetError, Credentials | HttpClient.HttpClient>;
export interface ListWidgetsRequest {
    /** Path param: Identifier */
    accountId: string;
    page?: number;
    perPage?: number;
    /** Query param: Direction to order widgets. */
    direction?: "asc" | "desc";
    /** Query param: Field to order widgets by. */
    order?: "id" | "sitekey" | "name" | "created_on" | "modified_on";
}
export declare const ListWidgetsRequest: Schema.Schema<ListWidgetsRequest>;
export interface ListWidgetsResponse {
    result: {
        botFightMode: boolean;
        clearanceLevel: "no_clearance" | "jschallenge" | "managed" | "interactive";
        createdOn: string;
        domains: string[];
        ephemeralId: boolean;
        mode: "non-interactive" | "invisible" | "managed";
        modifiedOn: string;
        name: string;
        offlabel: boolean;
        region: "world" | "china";
        sitekey: string;
    }[];
    resultInfo?: {
        count?: number | null;
        page?: number | null;
        perPage?: number | null;
        totalCount?: number | null;
    } | null;
}
export declare const ListWidgetsResponse: Schema.Schema<ListWidgetsResponse>;
export type ListWidgetsError = DefaultErrors;
export declare const listWidgets: API.PaginatedOperationMethod<ListWidgetsRequest, ListWidgetsResponse, ListWidgetsError, Credentials | HttpClient.HttpClient>;
export interface CreateWidgetRequest {
    /** Path param: Identifier */
    accountId: string;
    /** Query param: Direction to order widgets. */
    direction?: "asc" | "desc";
    /** Query param: Field to order widgets by. */
    order?: "id" | "sitekey" | "name" | "created_on" | "modified_on";
    /** Query param: Page number of paginated results. */
    page?: number;
    /** Query param: Number of items per page. */
    perPage?: number;
    /** Body param: */
    domains: string[];
    /** Body param: Widget Mode */
    mode: "non-interactive" | "invisible" | "managed";
    /** Body param: Human readable widget name. Not unique. Cloudflare suggests that you set this to a meaningful string to make it easier to identify your widget, and where it is used. */
    name: string;
    /** Body param: If bot_fight_mode is set to `true`, Cloudflare issues computationally expensive challenges in response to malicious bots (ENT only). */
    botFightMode?: boolean;
    /** Body param: If Turnstile is embedded on a Cloudflare site and the widget should grant challenge clearance, this setting can determine the clearance level to be set */
    clearanceLevel?: "no_clearance" | "jschallenge" | "managed" | "interactive";
    /** Body param: Return the Ephemeral ID in /siteverify (ENT only). */
    ephemeralId?: boolean;
    /** Body param: Do not show any Cloudflare branding on the widget (ENT only). */
    offlabel?: boolean;
    /** Body param: Region where this widget can be used. This cannot be changed after creation. */
    region?: "world" | "china";
}
export declare const CreateWidgetRequest: Schema.Schema<CreateWidgetRequest>;
export interface CreateWidgetResponse {
    /** If bot_fight_mode is set to `true`, Cloudflare issues computationally expensive challenges in response to malicious bots (ENT only). */
    botFightMode: boolean;
    /** If Turnstile is embedded on a Cloudflare site and the widget should grant challenge clearance, this setting can determine the clearance level to be set */
    clearanceLevel: "no_clearance" | "jschallenge" | "managed" | "interactive";
    /** When the widget was created. */
    createdOn: string;
    domains: string[];
    /** Return the Ephemeral ID in /siteverify (ENT only). */
    ephemeralId: boolean;
    /** Widget Mode */
    mode: "non-interactive" | "invisible" | "managed";
    /** When the widget was modified. */
    modifiedOn: string;
    /** Human readable widget name. Not unique. Cloudflare suggests that you set this to a meaningful string to make it easier to identify your widget, and where it is used. */
    name: string;
    /** Do not show any Cloudflare branding on the widget (ENT only). */
    offlabel: boolean;
    /** Region where this widget can be used. This cannot be changed after creation. */
    region: "world" | "china";
    /** Secret key for this widget. */
    secret: string;
    /** Widget item identifier tag. */
    sitekey: string;
}
export declare const CreateWidgetResponse: Schema.Schema<CreateWidgetResponse>;
export type CreateWidgetError = DefaultErrors;
export declare const createWidget: API.OperationMethod<CreateWidgetRequest, CreateWidgetResponse, CreateWidgetError, Credentials | HttpClient.HttpClient>;
export interface UpdateWidgetRequest {
    sitekey: string;
    /** Path param: Identifier */
    accountId: string;
    /** Body param: */
    domains: string[];
    /** Body param: Widget Mode */
    mode: "non-interactive" | "invisible" | "managed";
    /** Body param: Human readable widget name. Not unique. Cloudflare suggests that you set this to a meaningful string to make it easier to identify your widget, and where it is used. */
    name: string;
    /** Body param: If bot_fight_mode is set to `true`, Cloudflare issues computationally expensive challenges in response to malicious bots (ENT only). */
    botFightMode?: boolean;
    /** Body param: If Turnstile is embedded on a Cloudflare site and the widget should grant challenge clearance, this setting can determine the clearance level to be set */
    clearanceLevel?: "no_clearance" | "jschallenge" | "managed" | "interactive";
    /** Body param: Return the Ephemeral ID in /siteverify (ENT only). */
    ephemeralId?: boolean;
    /** Body param: Do not show any Cloudflare branding on the widget (ENT only). */
    offlabel?: boolean;
    /** Body param: Region where this widget can be used. This cannot be changed after creation. */
    region?: "world" | "china";
}
export declare const UpdateWidgetRequest: Schema.Schema<UpdateWidgetRequest>;
export interface UpdateWidgetResponse {
    /** If bot_fight_mode is set to `true`, Cloudflare issues computationally expensive challenges in response to malicious bots (ENT only). */
    botFightMode: boolean;
    /** If Turnstile is embedded on a Cloudflare site and the widget should grant challenge clearance, this setting can determine the clearance level to be set */
    clearanceLevel: "no_clearance" | "jschallenge" | "managed" | "interactive";
    /** When the widget was created. */
    createdOn: string;
    domains: string[];
    /** Return the Ephemeral ID in /siteverify (ENT only). */
    ephemeralId: boolean;
    /** Widget Mode */
    mode: "non-interactive" | "invisible" | "managed";
    /** When the widget was modified. */
    modifiedOn: string;
    /** Human readable widget name. Not unique. Cloudflare suggests that you set this to a meaningful string to make it easier to identify your widget, and where it is used. */
    name: string;
    /** Do not show any Cloudflare branding on the widget (ENT only). */
    offlabel: boolean;
    /** Region where this widget can be used. This cannot be changed after creation. */
    region: "world" | "china";
    /** Secret key for this widget. */
    secret: string;
    /** Widget item identifier tag. */
    sitekey: string;
}
export declare const UpdateWidgetResponse: Schema.Schema<UpdateWidgetResponse>;
export type UpdateWidgetError = DefaultErrors;
export declare const updateWidget: API.OperationMethod<UpdateWidgetRequest, UpdateWidgetResponse, UpdateWidgetError, Credentials | HttpClient.HttpClient>;
export interface DeleteWidgetRequest {
    sitekey: string;
    /** Identifier */
    accountId: string;
}
export declare const DeleteWidgetRequest: Schema.Schema<DeleteWidgetRequest>;
export interface DeleteWidgetResponse {
    /** If bot_fight_mode is set to `true`, Cloudflare issues computationally expensive challenges in response to malicious bots (ENT only). */
    botFightMode: boolean;
    /** If Turnstile is embedded on a Cloudflare site and the widget should grant challenge clearance, this setting can determine the clearance level to be set */
    clearanceLevel: "no_clearance" | "jschallenge" | "managed" | "interactive";
    /** When the widget was created. */
    createdOn: string;
    domains: string[];
    /** Return the Ephemeral ID in /siteverify (ENT only). */
    ephemeralId: boolean;
    /** Widget Mode */
    mode: "non-interactive" | "invisible" | "managed";
    /** When the widget was modified. */
    modifiedOn: string;
    /** Human readable widget name. Not unique. Cloudflare suggests that you set this to a meaningful string to make it easier to identify your widget, and where it is used. */
    name: string;
    /** Do not show any Cloudflare branding on the widget (ENT only). */
    offlabel: boolean;
    /** Region where this widget can be used. This cannot be changed after creation. */
    region: "world" | "china";
    /** Secret key for this widget. */
    secret: string;
    /** Widget item identifier tag. */
    sitekey: string;
}
export declare const DeleteWidgetResponse: Schema.Schema<DeleteWidgetResponse>;
export type DeleteWidgetError = DefaultErrors;
export declare const deleteWidget: API.OperationMethod<DeleteWidgetRequest, DeleteWidgetResponse, DeleteWidgetError, Credentials | HttpClient.HttpClient>;
//# sourceMappingURL=turnstile.d.ts.map