import { Context, Effect, Layer, Scope } from "effect";
declare const OAuthTestServerAddressError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
    readonly _tag: "OAuthTestServerAddressError";
} & Readonly<A>;
export declare class OAuthTestServerAddressError extends OAuthTestServerAddressError_base<{
    readonly address: unknown;
}> {
}
declare const OAuthTestServerFlowError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
    readonly _tag: "OAuthTestServerFlowError";
} & Readonly<A>;
export declare class OAuthTestServerFlowError extends OAuthTestServerFlowError_base<{
    readonly message: string;
    readonly cause?: unknown;
}> {
}
export interface OAuthAuthorizationCompletion {
    readonly callbackUrl: string;
    readonly code: string;
    readonly state: string;
}
export interface OAuthTokenSet {
    readonly accessToken: string;
    readonly refreshToken?: string;
    readonly tokenType: string;
    readonly expiresIn?: number;
    readonly scope?: string;
}
export interface OAuthTestServerRequest {
    readonly method: string;
    readonly url: string;
    readonly path: string;
    readonly headers: Readonly<Record<string, string>>;
    readonly body: string;
    readonly query: Readonly<Record<string, string>>;
}
export interface OAuthTestServerOptions {
    readonly users?: Readonly<Record<string, string>>;
    readonly defaultUsername?: string;
    readonly defaultPassword?: string;
    readonly defaultClientId?: string;
    readonly defaultClientSecret?: string;
    readonly clients?: Readonly<Record<string, string | null>>;
    readonly scopes?: readonly string[];
    readonly supportRefresh?: boolean;
}
export interface OAuthTestServerShape {
    readonly issuerUrl: string;
    readonly authorizationEndpoint: string;
    readonly tokenEndpoint: string;
    readonly registrationEndpoint: string;
    readonly protectedResourceMetadataUrl: string;
    readonly resourceUrl: string;
    readonly mcpResourceUrl: string;
    readonly completeAuthorizationCodeFlow: (input: {
        readonly authorizationUrl: string;
        readonly username?: string;
        readonly password?: string;
    }) => Effect.Effect<OAuthAuthorizationCompletion, OAuthTestServerFlowError>;
    readonly completeAuthorizationCodeTokenFlow: (input?: {
        readonly username?: string;
        readonly password?: string;
        readonly clientId?: string;
        readonly clientSecret?: string;
        readonly redirectUrl?: string;
        readonly scopes?: readonly string[];
        readonly resource?: string;
    }) => Effect.Effect<OAuthTokenSet, OAuthTestServerFlowError>;
    readonly requests: Effect.Effect<readonly OAuthTestServerRequest[]>;
    readonly clearRequests: Effect.Effect<void>;
    readonly issuedAccessTokens: Effect.Effect<readonly string[]>;
    readonly acceptsAccessToken: (token: string) => Effect.Effect<boolean>;
    readonly acceptsAuthorizationHeader: (authorization: string | null | undefined) => Effect.Effect<boolean>;
}
export declare const serveOAuthTestServer: (options?: OAuthTestServerOptions) => Effect.Effect<OAuthTestServerShape, OAuthTestServerAddressError, Scope.Scope>;
declare const OAuthTestServer_base: Context.ServiceClass<OAuthTestServer, "@executor-js/sdk/testing/OAuthTestServer", OAuthTestServerShape>;
export declare class OAuthTestServer extends OAuthTestServer_base {
    static readonly layer: (options?: OAuthTestServerOptions) => Layer.Layer<OAuthTestServer, OAuthTestServerAddressError, never>;
}
export {};
//# sourceMappingURL=oauth-test-server.d.ts.map