import http from 'node:http';
import type { APIGatewayProxyEventV2 } from 'aws-lambda';
import { CreateAWSLambdaContextOptions } from '@trpc/server/adapters/aws-lambda';
import { NodeHTTPCreateContextFnOptions } from '@trpc/server/adapters/node-http';
import { CreateFastifyContextOptions } from '@trpc/server/adapters/fastify';
import { OpenApiMeta } from 'trpc-to-openapi';
import { ContactMethodType } from '@learncard/types';
import { type ResolvedTenant } from '@learncard/email-templates';
import { ProfileType } from '../types/profile';
import { VC } from '@learncard/types';
export type DidAuthVP = {
    iss: string;
    vp: {
        '@context': string[];
        type: string[];
        holder: string;
        verifiableCredential?: VC[];
    };
    nonce?: string;
};
export type Context = {
    user?: {
        did: string;
        isChallengeValid: boolean;
        scope?: string;
    };
    contactMethod?: ContactMethodType;
    domain: string;
    tenant: ResolvedTenant;
    _guardianApprovalToken?: string;
};
export type RequiredScope = {
    requiredScope?: string;
};
export type RouteMetadata = OpenApiMeta & RequiredScope;
export declare const t: import("@trpc/server").TRPCRootObject<Context, RouteMetadata, {
    transformer: {
        input: import("@trpc/server").DataTransformer;
        output: {
            serialize: (o: any) => any;
            deserialize: (o: any) => any;
        };
    };
}, {
    ctx: Context;
    meta: RouteMetadata;
    errorShape: import("@trpc/server").TRPCDefaultErrorShape;
    transformer: true;
}>;
export declare const createContext: (options: CreateAWSLambdaContextOptions<APIGatewayProxyEventV2> | CreateFastifyContextOptions | NodeHTTPCreateContextFnOptions<http.IncomingMessage, http.ServerResponse> | {
    req: {
        headers: Map<string, string>;
    };
}) => Promise<Context>;
export declare const openRoute: import("@trpc/server").TRPCProcedureBuilder<Context, RouteMetadata, {
    domain: string;
    contactMethod: {
        type: "email";
        value: string;
        id: string;
        isVerified: boolean;
        isPrimary: boolean;
        createdAt: string;
        verifiedAt?: string | undefined;
    } | {
        type: "phone";
        value: string;
        id: string;
        isVerified: boolean;
        isPrimary: boolean;
        createdAt: string;
        verifiedAt?: string | undefined;
    } | undefined;
    user: {
        did: string;
        isChallengeValid: boolean;
        scope?: string;
    } | undefined;
    tenant: ResolvedTenant;
    _guardianApprovalToken: string | undefined;
}, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
export declare const resolveProfileFromContextDid: (didFromContext: string | undefined, domain: string) => Promise<ProfileType | null>;
export declare const didRoute: import("@trpc/server").TRPCProcedureBuilder<Context, RouteMetadata, {
    domain: string;
    contactMethod: {
        type: "email";
        value: string;
        id: string;
        isVerified: boolean;
        isPrimary: boolean;
        createdAt: string;
        verifiedAt?: string | undefined;
    } | {
        type: "phone";
        value: string;
        id: string;
        isVerified: boolean;
        isPrimary: boolean;
        createdAt: string;
        verifiedAt?: string | undefined;
    } | undefined;
    user: {
        profile: {
            profileId: string;
            displayName: string;
            shortBio: string;
            bio: string;
            did: string;
            isPrivate?: boolean | undefined;
            profileVisibility?: "public" | "connections_only" | "private" | undefined;
            showEmail?: boolean | undefined;
            allowConnectionRequests?: "anyone" | "invite_only" | undefined;
            email?: string | undefined;
            image?: string | undefined;
            heroImage?: string | undefined;
            websiteLink?: string | undefined;
            isServiceProfile?: boolean | undefined;
            type?: string | undefined;
            notificationsWebhook?: string | undefined;
            display?: {
                backgroundColor?: string | undefined;
                backgroundImage?: string | undefined;
                fadeBackgroundImage?: boolean | undefined;
                repeatBackgroundImage?: boolean | undefined;
                fontColor?: string | undefined;
                accentColor?: string | undefined;
                accentFontColor?: string | undefined;
                idBackgroundImage?: string | undefined;
                fadeIdBackgroundImage?: boolean | undefined;
                idBackgroundColor?: string | undefined;
                repeatIdBackgroundImage?: boolean | undefined;
            } | undefined;
            highlightedCredentials?: string[] | undefined;
            role?: string | undefined;
            dob?: string | undefined;
            country?: string | undefined;
            approved?: boolean | undefined;
        } | null;
        did: string;
        isChallengeValid: boolean;
        scope?: string;
    };
    tenant: ResolvedTenant;
    _guardianApprovalToken: string | undefined;
}, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
export declare const didAndChallengeRoute: import("@trpc/server").TRPCProcedureBuilder<Context, RouteMetadata, {
    domain: string;
    contactMethod: {
        type: "email";
        value: string;
        id: string;
        isVerified: boolean;
        isPrimary: boolean;
        createdAt: string;
        verifiedAt?: string | undefined;
    } | {
        type: "phone";
        value: string;
        id: string;
        isVerified: boolean;
        isPrimary: boolean;
        createdAt: string;
        verifiedAt?: string | undefined;
    } | undefined;
    user: {
        profile: {
            profileId: string;
            displayName: string;
            shortBio: string;
            bio: string;
            did: string;
            isPrivate?: boolean | undefined;
            profileVisibility?: "public" | "connections_only" | "private" | undefined;
            showEmail?: boolean | undefined;
            allowConnectionRequests?: "anyone" | "invite_only" | undefined;
            email?: string | undefined;
            image?: string | undefined;
            heroImage?: string | undefined;
            websiteLink?: string | undefined;
            isServiceProfile?: boolean | undefined;
            type?: string | undefined;
            notificationsWebhook?: string | undefined;
            display?: {
                backgroundColor?: string | undefined;
                backgroundImage?: string | undefined;
                fadeBackgroundImage?: boolean | undefined;
                repeatBackgroundImage?: boolean | undefined;
                fontColor?: string | undefined;
                accentColor?: string | undefined;
                accentFontColor?: string | undefined;
                idBackgroundImage?: string | undefined;
                fadeIdBackgroundImage?: boolean | undefined;
                idBackgroundColor?: string | undefined;
                repeatIdBackgroundImage?: boolean | undefined;
            } | undefined;
            highlightedCredentials?: string[] | undefined;
            role?: string | undefined;
            dob?: string | undefined;
            country?: string | undefined;
            approved?: boolean | undefined;
        } | null;
        did: string;
        isChallengeValid: boolean;
        scope?: string;
    };
    tenant: ResolvedTenant;
    _guardianApprovalToken: string | undefined;
}, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
export declare const scopedRoute: import("@trpc/server").TRPCProcedureBuilder<Context, RouteMetadata, {
    domain: string;
    contactMethod: {
        type: "email";
        value: string;
        id: string;
        isVerified: boolean;
        isPrimary: boolean;
        createdAt: string;
        verifiedAt?: string | undefined;
    } | {
        type: "phone";
        value: string;
        id: string;
        isVerified: boolean;
        isPrimary: boolean;
        createdAt: string;
        verifiedAt?: string | undefined;
    } | undefined;
    user: {
        profile: {
            profileId: string;
            displayName: string;
            shortBio: string;
            bio: string;
            did: string;
            isPrivate?: boolean | undefined;
            profileVisibility?: "public" | "connections_only" | "private" | undefined;
            showEmail?: boolean | undefined;
            allowConnectionRequests?: "anyone" | "invite_only" | undefined;
            email?: string | undefined;
            image?: string | undefined;
            heroImage?: string | undefined;
            websiteLink?: string | undefined;
            isServiceProfile?: boolean | undefined;
            type?: string | undefined;
            notificationsWebhook?: string | undefined;
            display?: {
                backgroundColor?: string | undefined;
                backgroundImage?: string | undefined;
                fadeBackgroundImage?: boolean | undefined;
                repeatBackgroundImage?: boolean | undefined;
                fontColor?: string | undefined;
                accentColor?: string | undefined;
                accentFontColor?: string | undefined;
                idBackgroundImage?: string | undefined;
                fadeIdBackgroundImage?: boolean | undefined;
                idBackgroundColor?: string | undefined;
                repeatIdBackgroundImage?: boolean | undefined;
            } | undefined;
            highlightedCredentials?: string[] | undefined;
            role?: string | undefined;
            dob?: string | undefined;
            country?: string | undefined;
            approved?: boolean | undefined;
        } | null;
        did: string;
        isChallengeValid: boolean;
        scope?: string;
    };
    tenant: ResolvedTenant;
    _guardianApprovalToken: string | undefined;
}, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
export declare const openProfileRoute: import("@trpc/server").TRPCProcedureBuilder<Context, RouteMetadata, {
    domain: string;
    contactMethod: {
        type: "email";
        value: string;
        id: string;
        isVerified: boolean;
        isPrimary: boolean;
        createdAt: string;
        verifiedAt?: string | undefined;
    } | {
        type: "phone";
        value: string;
        id: string;
        isVerified: boolean;
        isPrimary: boolean;
        createdAt: string;
        verifiedAt?: string | undefined;
    } | undefined;
    user: {
        profile: {
            profileId: string;
            displayName: string;
            shortBio: string;
            bio: string;
            did: string;
            isPrivate?: boolean | undefined;
            profileVisibility?: "public" | "connections_only" | "private" | undefined;
            showEmail?: boolean | undefined;
            allowConnectionRequests?: "anyone" | "invite_only" | undefined;
            email?: string | undefined;
            image?: string | undefined;
            heroImage?: string | undefined;
            websiteLink?: string | undefined;
            isServiceProfile?: boolean | undefined;
            type?: string | undefined;
            notificationsWebhook?: string | undefined;
            display?: {
                backgroundColor?: string | undefined;
                backgroundImage?: string | undefined;
                fadeBackgroundImage?: boolean | undefined;
                repeatBackgroundImage?: boolean | undefined;
                fontColor?: string | undefined;
                accentColor?: string | undefined;
                accentFontColor?: string | undefined;
                idBackgroundImage?: string | undefined;
                fadeIdBackgroundImage?: boolean | undefined;
                idBackgroundColor?: string | undefined;
                repeatIdBackgroundImage?: boolean | undefined;
            } | undefined;
            highlightedCredentials?: string[] | undefined;
            role?: string | undefined;
            dob?: string | undefined;
            country?: string | undefined;
            approved?: boolean | undefined;
        };
        did: string;
        isChallengeValid: boolean;
        scope?: string;
    };
    tenant: ResolvedTenant;
    _guardianApprovalToken: string | undefined;
}, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
export declare const profileRoute: import("@trpc/server").TRPCProcedureBuilder<Context, RouteMetadata, {
    domain: string;
    contactMethod: {
        type: "email";
        value: string;
        id: string;
        isVerified: boolean;
        isPrimary: boolean;
        createdAt: string;
        verifiedAt?: string | undefined;
    } | {
        type: "phone";
        value: string;
        id: string;
        isVerified: boolean;
        isPrimary: boolean;
        createdAt: string;
        verifiedAt?: string | undefined;
    } | undefined;
    user: {
        profile: {
            profileId: string;
            displayName: string;
            shortBio: string;
            bio: string;
            did: string;
            isPrivate?: boolean | undefined;
            profileVisibility?: "public" | "connections_only" | "private" | undefined;
            showEmail?: boolean | undefined;
            allowConnectionRequests?: "anyone" | "invite_only" | undefined;
            email?: string | undefined;
            image?: string | undefined;
            heroImage?: string | undefined;
            websiteLink?: string | undefined;
            isServiceProfile?: boolean | undefined;
            type?: string | undefined;
            notificationsWebhook?: string | undefined;
            display?: {
                backgroundColor?: string | undefined;
                backgroundImage?: string | undefined;
                fadeBackgroundImage?: boolean | undefined;
                repeatBackgroundImage?: boolean | undefined;
                fontColor?: string | undefined;
                accentColor?: string | undefined;
                accentFontColor?: string | undefined;
                idBackgroundImage?: string | undefined;
                fadeIdBackgroundImage?: boolean | undefined;
                idBackgroundColor?: string | undefined;
                repeatIdBackgroundImage?: boolean | undefined;
            } | undefined;
            highlightedCredentials?: string[] | undefined;
            role?: string | undefined;
            dob?: string | undefined;
            country?: string | undefined;
            approved?: boolean | undefined;
        };
        did: string;
        isChallengeValid: boolean;
        scope?: string;
    };
    tenant: ResolvedTenant;
    _guardianApprovalToken: string | undefined;
}, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
export declare const openProfileManagerRoute: import("@trpc/server").TRPCProcedureBuilder<Context, RouteMetadata, {
    domain: string;
    contactMethod: {
        type: "email";
        value: string;
        id: string;
        isVerified: boolean;
        isPrimary: boolean;
        createdAt: string;
        verifiedAt?: string | undefined;
    } | {
        type: "phone";
        value: string;
        id: string;
        isVerified: boolean;
        isPrimary: boolean;
        createdAt: string;
        verifiedAt?: string | undefined;
    } | undefined;
    user: {
        manager: {
            id: string;
            created: string;
            displayName?: string | undefined;
            shortBio?: string | undefined;
            bio?: string | undefined;
            email?: string | undefined;
            image?: string | undefined;
            heroImage?: string | undefined;
            managerType?: string | undefined;
        } | null;
        did: string;
        isChallengeValid: boolean;
        scope?: string;
    };
    tenant: ResolvedTenant;
    _guardianApprovalToken: string | undefined;
}, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
export declare const profileManagerRoute: import("@trpc/server").TRPCProcedureBuilder<Context, RouteMetadata, {
    domain: string;
    contactMethod: {
        type: "email";
        value: string;
        id: string;
        isVerified: boolean;
        isPrimary: boolean;
        createdAt: string;
        verifiedAt?: string | undefined;
    } | {
        type: "phone";
        value: string;
        id: string;
        isVerified: boolean;
        isPrimary: boolean;
        createdAt: string;
        verifiedAt?: string | undefined;
    } | undefined;
    user: {
        manager: {
            id: string;
            created: string;
            displayName?: string | undefined;
            shortBio?: string | undefined;
            bio?: string | undefined;
            email?: string | undefined;
            image?: string | undefined;
            heroImage?: string | undefined;
            managerType?: string | undefined;
        };
        did: string;
        isChallengeValid: boolean;
        scope?: string;
    };
    tenant: ResolvedTenant;
    _guardianApprovalToken: string | undefined;
}, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
export declare const verifiedContactRoute: import("@trpc/server").TRPCProcedureBuilder<Context, RouteMetadata, {
    domain: string;
    contactMethod: {
        type: "email";
        value: string;
        id: string;
        isVerified: boolean;
        isPrimary: boolean;
        createdAt: string;
        verifiedAt?: string | undefined;
    } | {
        type: "phone";
        value: string;
        id: string;
        isVerified: boolean;
        isPrimary: boolean;
        createdAt: string;
        verifiedAt?: string | undefined;
    };
    user: {
        did: string;
        isChallengeValid: boolean;
        scope?: string;
    } | undefined;
    tenant: ResolvedTenant;
    _guardianApprovalToken: string | undefined;
}, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
export type GuardianApprovalToken = {
    iss: string;
    sub: string;
    iat: number;
    exp: number;
    scope: string;
};
export declare const guardianGatedRoute: import("@trpc/server").TRPCProcedureBuilder<Context, RouteMetadata, {
    domain: string;
    contactMethod: {
        type: "email";
        value: string;
        id: string;
        isVerified: boolean;
        isPrimary: boolean;
        createdAt: string;
        verifiedAt?: string | undefined;
    } | {
        type: "phone";
        value: string;
        id: string;
        isVerified: boolean;
        isPrimary: boolean;
        createdAt: string;
        verifiedAt?: string | undefined;
    } | undefined;
    user: {
        profile: {
            profileId: string;
            displayName: string;
            shortBio: string;
            bio: string;
            did: string;
            isPrivate?: boolean | undefined;
            profileVisibility?: "public" | "connections_only" | "private" | undefined;
            showEmail?: boolean | undefined;
            allowConnectionRequests?: "anyone" | "invite_only" | undefined;
            email?: string | undefined;
            image?: string | undefined;
            heroImage?: string | undefined;
            websiteLink?: string | undefined;
            isServiceProfile?: boolean | undefined;
            type?: string | undefined;
            notificationsWebhook?: string | undefined;
            display?: {
                backgroundColor?: string | undefined;
                backgroundImage?: string | undefined;
                fadeBackgroundImage?: boolean | undefined;
                repeatBackgroundImage?: boolean | undefined;
                fontColor?: string | undefined;
                accentColor?: string | undefined;
                accentFontColor?: string | undefined;
                idBackgroundImage?: string | undefined;
                fadeIdBackgroundImage?: boolean | undefined;
                idBackgroundColor?: string | undefined;
                repeatIdBackgroundImage?: boolean | undefined;
            } | undefined;
            highlightedCredentials?: string[] | undefined;
            role?: string | undefined;
            dob?: string | undefined;
            country?: string | undefined;
            approved?: boolean | undefined;
        };
        did: string;
        isChallengeValid: boolean;
        scope?: string;
    };
    tenant: ResolvedTenant;
    _guardianApprovalToken: string | undefined;
    isChildAccount: boolean;
    hasGuardianApproval: boolean;
}, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
//# sourceMappingURL=index.d.ts.map