@accelerated-software-development/caddy-api-client - v0.4.3
    Preparing search index...

    Variable KnownCaddyHandlerSchemaConst

    KnownCaddyHandlerSchema: ZodDiscriminatedUnion<
        "handler",
        [
            ZodObject<
                {
                    flush_interval: ZodOptional<ZodUnion<[ZodNumber, ZodString]>>;
                    handler: ZodLiteral<"reverse_proxy">;
                    headers: ZodOptional<
                        ZodObject<
                            {
                                request: ZodOptional<
                                    ZodObject<
                                        {
                                            add: ZodOptional<(...)>;
                                            delete: ZodOptional<(...)>;
                                            set: ZodOptional<(...)>;
                                        },
                                        "strip",
                                        ZodTypeAny,
                                        {
                                            add?: (...)
                                            | (...);
                                            delete?: (...) | (...);
                                            set?: (...) | (...);
                                        },
                                        {
                                            add?: (...)
                                            | (...);
                                            delete?: (...) | (...);
                                            set?: (...) | (...);
                                        },
                                    >,
                                >;
                                response: ZodOptional<
                                    ZodObject<
                                        {
                                            add: ZodOptional<(...)>;
                                            delete: ZodOptional<(...)>;
                                            set: ZodOptional<(...)>;
                                        },
                                        "strip",
                                        ZodTypeAny,
                                        {
                                            add?: (...)
                                            | (...);
                                            delete?: (...) | (...);
                                            set?: (...) | (...);
                                        },
                                        {
                                            add?: (...)
                                            | (...);
                                            delete?: (...) | (...);
                                            set?: (...) | (...);
                                        },
                                    >,
                                >;
                            },
                            "strip",
                            ZodTypeAny,
                            {
                                request?: {
                                    add?: Record<(...), (...)>;
                                    delete?: (...)[];
                                    set?: Record<(...), (...)>;
                                };
                                response?: {
                                    add?: Record<(...), (...)>;
                                    delete?: (...)[];
                                    set?: Record<(...), (...)>;
                                };
                            },
                            {
                                request?: {
                                    add?: Record<(...), (...)>;
                                    delete?: (...)[];
                                    set?: Record<(...), (...)>;
                                };
                                response?: {
                                    add?: Record<(...), (...)>;
                                    delete?: (...)[];
                                    set?: Record<(...), (...)>;
                                };
                            },
                        >,
                    >;
                    health_checks: ZodOptional<
                        ZodObject<
                            {
                                active: ZodOptional<
                                    ZodObject<
                                        {
                                            expect_body: ZodOptional<(...)>;
                                            expect_status: ZodOptional<(...)>;
                                            fails: ZodOptional<(...)>;
                                            follow_redirects: ZodOptional<(...)>;
                                            headers: ZodOptional<(...)>;
                                            interval: ZodOptional<(...)>;
                                            max_size: ZodOptional<(...)>;
                                            passes: ZodOptional<(...)>;
                                            path: ZodOptional<(...)>;
                                            port: ZodOptional<(...)>;
                                            timeout: ZodOptional<(...)>;
                                            uri: ZodOptional<(...)>;
                                        },
                                        "strip",
                                        ZodTypeAny,
                                        {
                                            expect_body?: (...)
                                            | (...);
                                            expect_status?: (...) | (...);
                                            fails?: (...) | (...);
                                            follow_redirects?: (...) | (...) | (...);
                                            headers?: (...) | (...);
                                            interval?: (...) | (...) | (...);
                                            max_size?: (...) | (...);
                                            passes?: (...) | (...);
                                            path?: (...) | (...);
                                            port?: (...) | (...);
                                            timeout?: (...) | (...) | (...);
                                            uri?: (...) | (...);
                                        },
                                        {
                                            expect_body?: (...)
                                            | (...);
                                            expect_status?: (...) | (...);
                                            fails?: (...) | (...);
                                            follow_redirects?: (...) | (...) | (...);
                                            headers?: (...) | (...);
                                            interval?: (...) | (...) | (...);
                                            max_size?: (...) | (...);
                                            passes?: (...) | (...);
                                            path?: (...) | (...);
                                            port?: (...) | (...);
                                            timeout?: (...) | (...) | (...);
                                            uri?: (...) | (...);
                                        },
                                    >,
                                >;
                                passive: ZodOptional<
                                    ZodObject<
                                        {
                                            fail_duration: ZodOptional<(...)>;
                                            max_fails: ZodOptional<(...)>;
                                            unhealthy_latency: ZodOptional<(...)>;
                                            unhealthy_request_count: ZodOptional<(...)>;
                                            unhealthy_status: ZodOptional<(...)>;
                                        },
                                        "strip",
                                        ZodTypeAny,
                                        {
                                            fail_duration?: (...)
                                            | (...)
                                            | (...);
                                            max_fails?: (...) | (...);
                                            unhealthy_latency?: (...) | (...) | (...);
                                            unhealthy_request_count?: (...) | (...);
                                            unhealthy_status?: (...) | (...);
                                        },
                                        {
                                            fail_duration?: (...)
                                            | (...)
                                            | (...);
                                            max_fails?: (...) | (...);
                                            unhealthy_latency?: (...) | (...) | (...);
                                            unhealthy_request_count?: (...) | (...);
                                            unhealthy_status?: (...) | (...);
                                        },
                                    >,
                                >;
                            },
                            "strip",
                            ZodTypeAny,
                            {
                                active?: {
                                    expect_body?: string;
                                    expect_status?: number;
                                    fails?: number;
                                    follow_redirects?: boolean;
                                    headers?: Record<(...), (...)>;
                                    interval?: string | number;
                                    max_size?: number;
                                    passes?: number;
                                    path?: string;
                                    port?: number;
                                    timeout?: string | number;
                                    uri?: string;
                                };
                                passive?: {
                                    fail_duration?: string
                                    | number;
                                    max_fails?: number;
                                    unhealthy_latency?: string | number;
                                    unhealthy_request_count?: number;
                                    unhealthy_status?: (...)[];
                                };
                            },
                            {
                                active?: {
                                    expect_body?: string;
                                    expect_status?: number;
                                    fails?: number;
                                    follow_redirects?: boolean;
                                    headers?: Record<(...), (...)>;
                                    interval?: string | number;
                                    max_size?: number;
                                    passes?: number;
                                    path?: string;
                                    port?: number;
                                    timeout?: string | number;
                                    uri?: string;
                                };
                                passive?: {
                                    fail_duration?: string
                                    | number;
                                    max_fails?: number;
                                    unhealthy_latency?: string | number;
                                    unhealthy_request_count?: number;
                                    unhealthy_status?: (...)[];
                                };
                            },
                        >,
                    >;
                    load_balancing: ZodOptional<
                        ZodObject<
                            {
                                retries: ZodOptional<ZodNumber>;
                                selection_policy: ZodOptional<
                                    ZodObject<
                                        { policy: ZodEnum<(...)> },
                                        "passthrough",
                                        ZodTypeAny,
                                        objectOutputType<{ policy: ... }, ZodTypeAny, "passthrough">,
                                        objectInputType<{ policy: ... }, ZodTypeAny, "passthrough">,
                                    >,
                                >;
                                try_duration: ZodOptional<ZodUnion<[ZodNumber, ZodString]>>;
                                try_interval: ZodOptional<ZodUnion<[ZodNumber, ZodString]>>;
                            },
                            "strip",
                            ZodTypeAny,
                            {
                                retries?: number;
                                selection_policy?: objectOutputType<
                                    { policy: ZodEnum<(...)> },
                                    ZodTypeAny,
                                    "passthrough",
                                >;
                                try_duration?: string | number;
                                try_interval?: string | number;
                            },
                            {
                                retries?: number;
                                selection_policy?: objectInputType<
                                    { policy: ZodEnum<(...)> },
                                    ZodTypeAny,
                                    "passthrough",
                                >;
                                try_duration?: string | number;
                                try_interval?: string | number;
                            },
                        >,
                    >;
                    request_buffers: ZodOptional<ZodNumber>;
                    response_buffers: ZodOptional<ZodNumber>;
                    transport: ZodOptional<
                        ZodObject<
                            { protocol: ZodString },
                            "passthrough",
                            ZodTypeAny,
                            objectOutputType<{ protocol: ZodString }, ZodTypeAny, "passthrough">,
                            objectInputType<{ protocol: ZodString }, ZodTypeAny, "passthrough">,
                        >,
                    >;
                    upstreams: ZodOptional<
                        ZodArray<
                            ZodObject<
                                { dial: ZodString; max_requests: ZodOptional<ZodNumber> },
                                "strip",
                                ZodTypeAny,
                                { dial: string; max_requests?: number },
                                { dial: string; max_requests?: number },
                            >,
                            "many",
                        >,
                    >;
                },
                "strip",
                ZodTypeAny,
                {
                    flush_interval?: string
                    | number;
                    handler: "reverse_proxy";
                    headers?: {
                        request?: {
                            add?: Record<string, (...)[]>;
                            delete?: string[];
                            set?: Record<string, (...)[]>;
                        };
                        response?: {
                            add?: Record<string, (...)[]>;
                            delete?: string[];
                            set?: Record<string, (...)[]>;
                        };
                    };
                    health_checks?: {
                        active?: {
                            expect_body?: string;
                            expect_status?: number;
                            fails?: number;
                            follow_redirects?: boolean;
                            headers?: Record<string, (...)[]>;
                            interval?: string | number;
                            max_size?: number;
                            passes?: number;
                            path?: string;
                            port?: number;
                            timeout?: string | number;
                            uri?: string;
                        };
                        passive?: {
                            fail_duration?: string
                            | number;
                            max_fails?: number;
                            unhealthy_latency?: string | number;
                            unhealthy_request_count?: number;
                            unhealthy_status?: number[];
                        };
                    };
                    load_balancing?: {
                        retries?: number;
                        selection_policy?: objectOutputType<
                            {
                                policy: ZodEnum<
                                    [(...), (...), (...), (...), (...), (...), (...), (...)],
                                >;
                            },
                            ZodTypeAny,
                            "passthrough",
                        >;
                        try_duration?: string
                        | number;
                        try_interval?: string | number;
                    };
                    request_buffers?: number;
                    response_buffers?: number;
                    transport?: objectOutputType<
                        { protocol: ZodString },
                        ZodTypeAny,
                        "passthrough",
                    >;
                    upstreams?: { dial: string; max_requests?: number }[];
                },
                {
                    flush_interval?: string
                    | number;
                    handler: "reverse_proxy";
                    headers?: {
                        request?: {
                            add?: Record<string, (...)[]>;
                            delete?: string[];
                            set?: Record<string, (...)[]>;
                        };
                        response?: {
                            add?: Record<string, (...)[]>;
                            delete?: string[];
                            set?: Record<string, (...)[]>;
                        };
                    };
                    health_checks?: {
                        active?: {
                            expect_body?: string;
                            expect_status?: number;
                            fails?: number;
                            follow_redirects?: boolean;
                            headers?: Record<string, (...)[]>;
                            interval?: string | number;
                            max_size?: number;
                            passes?: number;
                            path?: string;
                            port?: number;
                            timeout?: string | number;
                            uri?: string;
                        };
                        passive?: {
                            fail_duration?: string
                            | number;
                            max_fails?: number;
                            unhealthy_latency?: string | number;
                            unhealthy_request_count?: number;
                            unhealthy_status?: number[];
                        };
                    };
                    load_balancing?: {
                        retries?: number;
                        selection_policy?: objectInputType<
                            {
                                policy: ZodEnum<
                                    [(...), (...), (...), (...), (...), (...), (...), (...)],
                                >;
                            },
                            ZodTypeAny,
                            "passthrough",
                        >;
                        try_duration?: string
                        | number;
                        try_interval?: string | number;
                    };
                    request_buffers?: number;
                    response_buffers?: number;
                    transport?: objectInputType<
                        { protocol: ZodString },
                        ZodTypeAny,
                        "passthrough",
                    >;
                    upstreams?: { dial: string; max_requests?: number }[];
                },
            >,
            ZodObject<
                {
                    handler: ZodLiteral<"headers">;
                    request: ZodOptional<
                        ZodObject<
                            {
                                add: ZodOptional<
                                    ZodRecord<ZodString, ZodArray<ZodString, "many">>,
                                >;
                                delete: ZodOptional<ZodArray<ZodString, "many">>;
                                set: ZodOptional<ZodRecord<ZodString, ZodArray<ZodString, "many">>>;
                            },
                            "strip",
                            ZodTypeAny,
                            {
                                add?: Record<string, string[]>;
                                delete?: string[];
                                set?: Record<string, string[]>;
                            },
                            {
                                add?: Record<string, string[]>;
                                delete?: string[];
                                set?: Record<string, string[]>;
                            },
                        >,
                    >;
                    response: ZodOptional<
                        ZodObject<
                            {
                                add: ZodOptional<
                                    ZodRecord<ZodString, ZodArray<ZodString, "many">>,
                                >;
                                deferred: ZodOptional<ZodBoolean>;
                                delete: ZodOptional<ZodArray<ZodString, "many">>;
                                set: ZodOptional<ZodRecord<ZodString, ZodArray<ZodString, "many">>>;
                            },
                            "strip",
                            ZodTypeAny,
                            {
                                add?: Record<string, string[]>;
                                deferred?: boolean;
                                delete?: string[];
                                set?: Record<string, string[]>;
                            },
                            {
                                add?: Record<string, string[]>;
                                deferred?: boolean;
                                delete?: string[];
                                set?: Record<string, string[]>;
                            },
                        >,
                    >;
                },
                "strip",
                ZodTypeAny,
                {
                    handler: "headers";
                    request?: {
                        add?: Record<string, string[]>;
                        delete?: string[];
                        set?: Record<string, string[]>;
                    };
                    response?: {
                        add?: Record<string, string[]>;
                        deferred?: boolean;
                        delete?: string[];
                        set?: Record<string, string[]>;
                    };
                },
                {
                    handler: "headers";
                    request?: {
                        add?: Record<string, string[]>;
                        delete?: string[];
                        set?: Record<string, string[]>;
                    };
                    response?: {
                        add?: Record<string, string[]>;
                        deferred?: boolean;
                        delete?: string[];
                        set?: Record<string, string[]>;
                    };
                },
            >,
            ZodObject<
                {
                    abort: ZodOptional<ZodBoolean>;
                    body: ZodOptional<ZodString>;
                    close: ZodOptional<ZodBoolean>;
                    handler: ZodLiteral<"static_response">;
                    headers: ZodOptional<ZodRecord<ZodString, ZodArray<ZodString, "many">>>;
                    status_code: ZodOptional<ZodUnion<[ZodNumber, ZodString]>>;
                },
                "strip",
                ZodTypeAny,
                {
                    abort?: boolean;
                    body?: string;
                    close?: boolean;
                    handler: "static_response";
                    headers?: Record<string, string[]>;
                    status_code?: string | number;
                },
                {
                    abort?: boolean;
                    body?: string;
                    close?: boolean;
                    handler: "static_response";
                    headers?: Record<string, string[]>;
                    status_code?: string | number;
                },
            >,
        ],
    > = ...

    Known handler schemas with specific validation - uses discriminated union for efficient parsing based on the handler field

    Includes:

    • 20 core Caddy handlers
    • Plugin handlers (caddy-security authenticator)

    Note: caddy-security's SecurityAuthorizationHandler uses handler: "authentication" which is Caddy's core AuthenticationHandler with the "authorizer" provider. It's not in this union since it shares the discriminator - use AuthenticationHandlerSchema.