@microsoft/teams.api
Version:
<p> <a href="https://www.npmjs.com/package/@microsoft/teams.api" target="_blank"> <img src="https://img.shields.io/npm/v/@microsoft/teams.api/latest" /> </a> <a href="https://www.npmjs.com/package/@microsoft/teams.api?activeTab=code" t
49 lines (46 loc) • 2.13 kB
TypeScript
import { Client, ClientOptions } from '@microsoft/teams.common';
import { CloudEnvironment } from '../../auth/cloud-environment.js';
import { TokenResponse } from '../../models/token/token-response.js';
import { TokenStatus } from '../../models/token/token-status.js';
import { ApiClientSettings } from '../api-client-settings.js';
import { UserTokenClient, GetUserTokenParams, GetUserAADTokenParams, GetUserTokenStatusParams, SignOutUserParams, ExchangeUserTokenParams } from './token.js';
export { USER_TOKEN_ENDPOINTS } from './token.js';
import '../../models/channel-id.js';
import '../../auth/credentials.js';
import '../../models/agentic-identity.js';
import '../../models/token-exchange/token-exchange-request.js';
declare class UserClient {
get http(): Client;
set http(v: Client);
/**
* @deprecated Use the flattened methods on `UserClient` instead
* (e.g. `users.getToken(...)`). This grouped accessor will be removed
* in a future release.
*/
get token(): UserTokenClient;
protected _http: Client;
protected _token: UserTokenClient;
protected _apiClientSettings: Partial<ApiClientSettings>;
constructor(options?: Client | ClientOptions, apiClientSettings?: Partial<ApiClientSettings>, cloud?: CloudEnvironment);
/**
* Get a user token for the given connection.
*/
getToken(params: GetUserTokenParams): Promise<TokenResponse>;
/**
* Get AAD tokens for the given connection and resource urls.
*/
getAadTokens(params: GetUserAADTokenParams): Promise<Record<string, TokenResponse>>;
/**
* Get the token status for a user.
*/
getTokenStatus(params: GetUserTokenStatusParams): Promise<TokenStatus[]>;
/**
* Sign a user out of the given connection.
*/
signOut(params: SignOutUserParams): Promise<void>;
/**
* Exchange a user token for the given connection.
*/
exchangeToken(params: ExchangeUserTokenParams): Promise<TokenResponse>;
}
export { ExchangeUserTokenParams, GetUserAADTokenParams, GetUserTokenParams, GetUserTokenStatusParams, SignOutUserParams, UserClient, UserTokenClient };