type TeamsCredential = string | (() => Promise | string); type TeamsFetch = typeof fetch; interface TeamsCredentials { /** * A pre-acquired bearer token. It must already be scoped for the API it is * used against: `https://api.botframework.com/.default` for the Bot Connector * calls in this module, or `https://graph.microsoft.com/.default` for the * Graph subpath. Supply `appId`/`appPassword` instead to have each subpath * request the correct scope automatically. */ accessToken?: TeamsCredential; appId?: TeamsCredential; appPassword?: TeamsCredential; tenantId?: TeamsCredential; } interface TeamsApiOptions { credentials: TeamsCredentials; fetch?: TeamsFetch; } interface TeamsTokenOptions extends TeamsApiOptions { scope?: string; tokenUrl?: string; } interface TeamsConnectorOptions extends TeamsApiOptions { body?: unknown; method?: string; path: string; serviceUrl: string; } interface TeamsApiResponse { body: T; ok: boolean; status: number; } declare class TeamsApiError extends Error { body?: unknown; status?: number; constructor(message: string, options?: { body?: unknown; status?: number; }); } declare function resolveTeamsCredential(credential: TeamsCredential | undefined): Promise; declare function resolveTeamsAccessToken(options: TeamsTokenOptions): Promise; declare function callTeamsConnectorApi(options: TeamsConnectorOptions): Promise>; declare function assertTeamsOk(response: Response): Promise; declare function readResponseBody(response: Response): Promise; export { TeamsApiError as T, type TeamsApiOptions as a, type TeamsApiResponse as b, type TeamsConnectorOptions as c, type TeamsCredential as d, type TeamsCredentials as e, type TeamsFetch as f, type TeamsTokenOptions as g, assertTeamsOk as h, callTeamsConnectorApi as i, resolveTeamsAccessToken as j, resolveTeamsCredential as k, readResponseBody as r };