import { Schema } from "effect";
export { type OAuthGrant, type OAuthAuthentication, type OAuthClient, type CreateOAuthClientInput, type ConnectResult, type OAuthStartInput, type OAuthCompleteInput, type OAuthProbeInput, type OAuthProbeResult, type OAuthService, OAuthStartError, OAuthCompleteError, OAuthProbeError, OAuthSessionNotFoundError, } from "./oauth-client";
/** The canonical credential-provider key OAuth-minted connections persist
 *  their access token under (the default writable store). */
export declare const OAUTH2_PROVIDER_KEY: "oauth2";
/** How long a pending authorization stays redeemable. */
export declare const OAUTH2_SESSION_TTL_MS: number;
declare const OAuthCallbackStateSchema: Schema.Struct<{
    readonly state: Schema.String;
    readonly orgSlug: Schema.String;
}>;
export type OAuthCallbackState = typeof OAuthCallbackStateSchema.Type;
/** Encode URL selected callback routing data into OAuth `state`.
 *
 * The persisted OAuth session still uses the raw random state. Only the value
 * sent to the authorization server is wrapped, so providers can keep a static
 * redirect_uri while echoing enough state for the callback edge to pick the
 * correct organization before completing the flow.
 */
export declare const encodeOAuthCallbackState: (input: {
    readonly state: string;
    readonly orgSlug?: string | null;
}) => string;
/** Decode a callback state value minted by `encodeOAuthCallbackState`.
 *
 * Returns null for raw or foreign state values, which lets non-org hosts use
 * the raw OAuth state unchanged.
 */
export declare const decodeOAuthCallbackState: (value: string | null | undefined) => OAuthCallbackState | null;
//# sourceMappingURL=oauth.d.ts.map