import DescopeClient from "@descope/node-sdk"; import { AuthInfo } from "../schemas/auth.js"; import { DescopeMcpProviderOptions } from "../schemas/options.js"; /** * Creates an authenticated Descope client that includes the user's token in requests */ export declare function createAuthenticatedDescopeClient(config: DescopeMcpProviderOptions, userToken: string): ReturnType; /** * Extracts user ID from the auth info token */ export declare function extractUserIdFromAuthInfo(authInfo: AuthInfo): string; /** * Gets an outbound token for external API access using the authenticated user's context * * @param appId - The outbound application ID configured in Descope * @param authInfo - Authentication info from the authenticated tool * @param config - Descope configuration * @param scopes - Optional scopes to request for the outbound token * @returns The outbound token or null if exchange fails * * @example * ```typescript * const token = await getOutboundToken( * 'external-api-app', * authInfo, * { projectId: 'my-project' }, * ['read', 'write'] * ); * if (token) { * // Use token to call external API * const response = await fetch('https://api.example.com/data', { * headers: { Authorization: `Bearer ${token}` } * }); * } * ``` */ export declare function getOutboundToken(appId: string, authInfo: AuthInfo, config: DescopeMcpProviderOptions, scopes?: string[]): Promise; /** * Factory function to create a getOutboundToken function bound to a specific configuration */ export declare function createOutboundTokenFactory(config: DescopeMcpProviderOptions): (appId: string, authInfo: AuthInfo, scopes?: string[]) => Promise; //# sourceMappingURL=outboundToken.d.ts.map