import { DeleteInvitationBody } from '../../lib/api/auth-invitations-delete.js';
export { DeleteInvitationResponse } from '../../lib/api/auth-invitations-delete.js';
import { ResendInvitationBody } from '../../lib/api/auth-invitations-resend.js';
export { ResendInvitationResponse } from '../../lib/api/auth-invitations-resend.js';
import { CancelInvitationBody } from '../../lib/api/auth-invitations-cancel.js';
export { CancelInvitationResponse } from '../../lib/api/auth-invitations-cancel.js';
import { AcceptInvitationBody } from '../../lib/api/auth-invitations-accept.js';
export { AcceptInvitationResponse } from '../../lib/api/auth-invitations-accept.js';
import { GetInvitationParams, CreateInvitationBody, ListInvitationsQuery } from '../../lib/api/auth-invitations.js';
export { CreateInvitationResponse, GetInvitationResponse, ListInvitationsResponse } from '../../lib/api/auth-invitations.js';
import { GetMeBody } from '../../lib/api/auth-me.js';
import { ChangePasswordBody } from '../../lib/api/auth-password.js';
export { ChangePasswordResponse } from '../../lib/api/auth-password.js';
export { RotateKeyResponse } from '../../lib/api/auth-keys-rotate.js';
export { LogoutResponse } from '../../lib/api/auth-logout.js';
export { LoginResponse } from '../../lib/api/auth-login.js';
export { RegisterResponse } from '../../lib/api/auth-register.js';
import { CheckAccountExistsBody } from '../../lib/api/auth-exists.js';
export { CheckAccountExistsResponse } from '../../lib/api/auth-exists.js';
import { VerifyCodeBody } from '../../lib/api/auth-codes-verify.js';
export { VerifyCodeResponse } from '../../lib/api/auth-codes-verify.js';
import { SendVerificationCodeBody } from '../../lib/api/auth-codes.js';
export { SendVerificationCodeResponse } from '../../lib/api/auth-codes.js';
export { client } from '@spfn/core/client';
import '@spfn/core';
import '../../lib/contracts/invitation.js';
import '@sinclair/typebox';
import '../../lib/contracts/auth.js';

/**
 * Client-side login types (without key fields)
 */
type ClientLoginParams = {
    body: {
        email?: string;
        phone?: string;
        password: string;
    };
};
/**
 * Client-side register types (without key fields)
 */
type ClientRegisterParams = {
    body: {
        email?: string;
        phone?: string;
        password: string;
        verificationToken: string;
    };
};
/**
 * Login with email/password
 *
 * Interceptor automatically generates and injects publicKey fields
 */
declare const login: (params: ClientLoginParams) => Promise<{
    message?: string | undefined;
    success: true;
    data: {
        email?: string | undefined;
        phone?: string | undefined;
        userId: string;
        passwordChangeRequired: boolean;
    };
} | {
    success: false;
    error: {
        details?: any;
        message: string;
        code: string;
    };
}>;
/**
 * Register new account
 *
 * Interceptor automatically generates and injects publicKey fields
 */
declare const register: (params: ClientRegisterParams) => Promise<{
    success: false;
    error: {
        details?: any;
        message: string;
        code: string;
    };
} | {
    message?: string | undefined;
    success: true;
    data: {
        email?: string | undefined;
        phone?: string | undefined;
        userId: string;
    };
}>;
/**
 * Logout current session
 *
 * Interceptor automatically adds JWT authentication
 */
declare const logout: () => Promise<{
    success: false;
    error: {
        details?: any;
        message: string;
        code: string;
    };
} | {
    message?: string | undefined;
    success: true;
    data: {
        success: boolean;
    };
}>;
/**
 * Rotate encryption keys
 *
 * Interceptor automatically generates new key pair and adds JWT authentication
 */
declare const rotateKey: () => Promise<{
    success: false;
    error: {
        details?: any;
        message: string;
        code: string;
    };
} | {
    message?: string | undefined;
    success: true;
    data: {
        success: boolean;
        keyId: string;
    };
}>;
/**
 * Auth API collection
 */
declare const authApi: {
    readonly login: (params: ClientLoginParams) => Promise<{
        message?: string | undefined;
        success: true;
        data: {
            email?: string | undefined;
            phone?: string | undefined;
            userId: string;
            passwordChangeRequired: boolean;
        };
    } | {
        success: false;
        error: {
            details?: any;
            message: string;
            code: string;
        };
    }>;
    readonly register: (params: ClientRegisterParams) => Promise<{
        success: false;
        error: {
            details?: any;
            message: string;
            code: string;
        };
    } | {
        message?: string | undefined;
        success: true;
        data: {
            email?: string | undefined;
            phone?: string | undefined;
            userId: string;
        };
    }>;
    readonly logout: () => Promise<{
        success: false;
        error: {
            details?: any;
            message: string;
            code: string;
        };
    } | {
        message?: string | undefined;
        success: true;
        data: {
            success: boolean;
        };
    }>;
    readonly rotateKey: () => Promise<{
        success: false;
        error: {
            details?: any;
            message: string;
            code: string;
        };
    } | {
        message?: string | undefined;
        success: true;
        data: {
            success: boolean;
            keyId: string;
        };
    }>;
    readonly sendVerificationCode: (options: {
        body: SendVerificationCodeBody;
    }) => Promise<{
        success: false;
        error: {
            details?: any;
            message: string;
            code: string;
        };
    } | {
        message?: string | undefined;
        success: true;
        data: {
            success: boolean;
            expiresAt: string;
        };
    }>;
    readonly verifyCode: (options: {
        body: VerifyCodeBody;
    }) => Promise<{
        success: false;
        error: {
            details?: any;
            message: string;
            code: string;
        };
    } | {
        message?: string | undefined;
        success: true;
        data: {
            verificationToken?: string | undefined;
            valid: boolean;
        };
    }>;
    readonly checkAccountExists: (options: {
        body: CheckAccountExistsBody;
    }) => Promise<{
        success: false;
        error: {
            details?: any;
            message: string;
            code: string;
        };
    } | {
        message?: string | undefined;
        success: true;
        data: {
            exists: boolean;
            identifier: string;
            identifierType: "email" | "phone";
        };
    }>;
    readonly changePassword: (options: {
        body: ChangePasswordBody;
    }) => Promise<{
        success: false;
        error: {
            details?: any;
            message: string;
            code: string;
        };
    } | {
        message?: string | undefined;
        success: true;
        data: {
            success: boolean;
        };
    }>;
    readonly getMe: (options: {
        body: GetMeBody;
    }) => Promise<{
        success: false;
        error: {
            details?: any;
            message: string;
            code: string;
        };
    } | {
        message?: string | undefined;
        success: true;
        data: {
            email?: string | undefined;
            phone?: string | undefined;
            userId: string;
            role: {
                id: number;
                name: string;
                displayName: string;
                priority: number;
            };
            permissions: {
                category?: string | undefined;
                id: number;
                name: string;
                displayName: string;
            }[];
        };
    }>;
    readonly getInvitation: (options: {
        params: GetInvitationParams;
    }) => Promise<{
        success: false;
        error: {
            details?: any;
            message: string;
            code: string;
        };
    } | {
        message?: string | undefined;
        success: true;
        data: {
            metadata?: any;
            email: string;
            expiresAt: string;
            role: string;
            roleDisplayName: string;
            invitedBy: string;
        };
    }>;
    readonly createInvitation: (options: {
        body: CreateInvitationBody;
    }) => Promise<{
        success: false;
        error: {
            details?: any;
            message: string;
            code: string;
        };
    } | {
        message?: string | undefined;
        success: true;
        data: {
            email: string;
            expiresAt: string;
            id: number;
            token: string;
            roleId: number;
            invitationUrl: string;
        };
    }>;
    readonly listInvitations: (options: {
        query?: ListInvitationsQuery;
    }) => Promise<{
        success: false;
        error: {
            details?: any;
            message: string;
            code: string;
        };
    } | {
        message?: string | undefined;
        success: true;
        data: {
            page: number;
            limit: number;
            invitations: {
                acceptedAt?: string | undefined;
                cancelledAt?: string | undefined;
                email: string;
                expiresAt: string;
                role: {
                    id: number;
                    name: string;
                    displayName: string;
                };
                id: number;
                status: string;
                inviter: {
                    email: string;
                    id: number;
                };
                createdAt: string;
            }[];
            total: number;
            totalPages: number;
        };
    }>;
    readonly acceptInvitation: (options: {
        body: AcceptInvitationBody;
    }) => Promise<{
        success: false;
        error: {
            details?: any;
            message: string;
            code: string;
        };
    } | {
        message?: string | undefined;
        success: true;
        data: {
            email: string;
            userId: number;
            role: string;
        };
    }>;
    readonly cancelInvitation: (options: {
        body: CancelInvitationBody;
    }) => Promise<{
        success: false;
        error: {
            details?: any;
            message: string;
            code: string;
        };
    } | {
        message?: string | undefined;
        success: true;
        data: {
            success: boolean;
            cancelledAt: string;
        };
    }>;
    readonly resendInvitation: (options: {
        body: ResendInvitationBody;
    }) => Promise<{
        success: false;
        error: {
            details?: any;
            message: string;
            code: string;
        };
    } | {
        message?: string | undefined;
        success: true;
        data: {
            success: boolean;
            expiresAt: string;
        };
    }>;
    readonly deleteInvitation: (options: {
        body: DeleteInvitationBody;
    }) => Promise<{
        success: false;
        error: {
            details?: any;
            message: string;
            code: string;
        };
    } | {
        message?: string | undefined;
        success: true;
        data: {
            success: boolean;
        };
    }>;
};

export { AcceptInvitationBody, CancelInvitationBody, ChangePasswordBody, CheckAccountExistsBody, type ClientLoginParams, type ClientRegisterParams, CreateInvitationBody, DeleteInvitationBody, GetInvitationParams, ListInvitationsQuery, ResendInvitationBody, SendVerificationCodeBody, VerifyCodeBody, authApi, login, logout, register, rotateKey };
