@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
57 lines (55 loc) • 1.46 kB
JavaScript
import * as http from '@microsoft/teams.common/http';
import { BotClient } from './bot';
export * from './bot';
import { ConversationClient } from './conversation';
export * from './conversation';
import { MeetingClient } from './meeting';
export * from './meeting';
import { TeamClient } from './team';
export * from './team';
import { UserClient } from './user';
export * from './user';
class Client {
serviceUrl;
bots;
users;
conversations;
teams;
meetings;
get http() {
return this._http;
}
set http(v) {
this.bots.http = v;
this.conversations.http = v;
this.users.http = v;
this.teams.http = v;
this.meetings.http = v;
this._http = v;
}
_http;
constructor(serviceUrl, options) {
this.serviceUrl = serviceUrl;
if (!options) {
this._http = new http.Client();
} else if ("request" in options) {
this._http = options;
} else {
this._http = new http.Client({
...options,
headers: {
...options?.headers,
"Content-Type": "application/json"
}
});
}
this.bots = new BotClient(this.http);
this.users = new UserClient(this.http);
this.conversations = new ConversationClient(serviceUrl, this.http);
this.teams = new TeamClient(serviceUrl, this.http);
this.meetings = new MeetingClient(serviceUrl, this.http);
}
}
export { Client };
//# sourceMappingURL=index.mjs.map
//# sourceMappingURL=index.mjs.map