import { AuthenticatedSessionContext, Ctx, SessionContextBase } from "next/types"; import { Await, EnsurePromise } from "next/types/utils"; import type { input as zInput, output as zOutput, ZodTypeAny } from "zod"; interface ResultWithContext { __blitz: true; value: Result; ctx: Context; } export interface AuthenticatedMiddlewareCtx extends Omit { session: AuthenticatedSessionContext; } declare type PipeFn = (i: Await, c: PrevCtx) => Next extends ResultWithContext ? never : Next | ResultWithContext; declare function pipe(ab: (i: A, c: Ctx) => Z): (input: A, ctx: Ctx) => EnsurePromise; declare function pipe(ab: PipeFn, bc: PipeFn): (input: A, ctx: CA) => EnsurePromise; declare function pipe(ab: PipeFn, bc: PipeFn, cd: PipeFn): (input: A, ctx: CA) => EnsurePromise; declare function pipe(ab: PipeFn, bc: PipeFn, cd: PipeFn, de: PipeFn): (input: A, ctx: CA) => EnsurePromise; declare function pipe(ab: PipeFn, bc: PipeFn, cd: PipeFn, de: PipeFn, ef: PipeFn): (input: A, ctx: CA) => EnsurePromise; declare function pipe(ab: PipeFn, bc: PipeFn, cd: PipeFn, de: PipeFn, ef: PipeFn, fg: PipeFn): (input: A, ctx: CA) => EnsurePromise; declare function pipe(ab: PipeFn, bc: PipeFn, cd: PipeFn, de: PipeFn, ef: PipeFn, fg: PipeFn, gh: PipeFn): (input: A, ctx: CA) => EnsurePromise; declare function pipe(ab: PipeFn, bc: PipeFn, cd: PipeFn, de: PipeFn, ef: PipeFn, fg: PipeFn, gh: PipeFn, hi: PipeFn): (input: A, ctx: CA) => EnsurePromise; declare function pipe(ab: PipeFn, bc: PipeFn, cd: PipeFn, de: PipeFn, ef: PipeFn, fg: PipeFn, gh: PipeFn, hi: PipeFn, ij: PipeFn): (input: A, ctx: CA) => EnsurePromise; declare function pipe(ab: PipeFn, bc: PipeFn, cd: PipeFn, de: PipeFn, ef: PipeFn, fg: PipeFn, gh: PipeFn, hi: PipeFn, ij: PipeFn, jk: PipeFn): (input: A, ctx: CA) => EnsurePromise; declare function pipe(ab: PipeFn, bc: PipeFn, cd: PipeFn, de: PipeFn, ef: PipeFn, fg: PipeFn, gh: PipeFn, hi: PipeFn, ij: PipeFn, jk: PipeFn, kl: PipeFn): (input: A, ctx: CA) => EnsurePromise; declare function pipe(ab: PipeFn, bc: PipeFn, cd: PipeFn, de: PipeFn, ef: PipeFn, fg: PipeFn, gh: PipeFn, hi: PipeFn, ij: PipeFn, jk: PipeFn, kl: PipeFn, lm: PipeFn): (input: A, ctx: CA) => EnsurePromise; interface ResolverAuthorize { (...args: Parameters): (input: T, ctx: C) => ResultWithContext; } export declare type ParserType = "sync" | "async"; declare function zod, OutputType = zOutput>(schema: Schema, parserType: "sync"): (input: InputType) => OutputType; declare function zod, OutputType = zOutput>(schema: Schema, parserType: "async"): (input: InputType) => Promise; declare function zod, OutputType = zOutput>(schema: Schema): (input: InputType) => Promise; export declare const resolver: { pipe: typeof pipe; zod: typeof zod; authorize: ResolverAuthorize; }; export {};