@microsoft/agents-hosting-extensions-teams 1.6.0-beta.9.gce9d8facd2 → 1.7.0-beta.1.g8bcd4f11a7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */
|
|
1
2
|
import { Activity, ChannelAccount } from '@microsoft/agents-activity';
|
|
2
3
|
import { TeamsChannelAccount } from '../activity-extensions/teamsChannelAccount';
|
|
3
4
|
import { MeetingInfo } from '../meeting/meetingInfo';
|
|
@@ -12,7 +13,7 @@ import { ConnectorClient } from '@microsoft/agents-hosting';
|
|
|
12
13
|
*/
|
|
13
14
|
export declare class TeamsConnectorClient {
|
|
14
15
|
private client;
|
|
15
|
-
private
|
|
16
|
+
private _httpClient;
|
|
16
17
|
constructor(client: ConnectorClient);
|
|
17
18
|
/**
|
|
18
19
|
* Retrieves a member from a conversation or team.
|
|
@@ -143,4 +144,5 @@ export declare class TeamsConnectorClient {
|
|
|
143
144
|
* @returns A CancelOperationResponse object containing the response.
|
|
144
145
|
*/
|
|
145
146
|
cancelOperation(operationId: string): Promise<CancelOperationResponse>;
|
|
147
|
+
private executeRequest;
|
|
146
148
|
}
|
|
@@ -1,8 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TeamsConnectorClient = void 0;
|
|
4
|
+
/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */
|
|
4
5
|
const agents_activity_1 = require("@microsoft/agents-activity");
|
|
5
6
|
const errorHelper_1 = require("../errorHelper");
|
|
7
|
+
const agents_hosting_1 = require("@microsoft/agents-hosting");
|
|
8
|
+
const agents_telemetry_1 = require("@microsoft/agents-telemetry");
|
|
9
|
+
const logger = (0, agents_telemetry_1.debug)('agents:connector-client');
|
|
10
|
+
function formatHttpErrorMessage(error) {
|
|
11
|
+
var _a;
|
|
12
|
+
const responseData = (_a = error.response) === null || _a === void 0 ? void 0 : _a.data;
|
|
13
|
+
if (responseData === undefined) {
|
|
14
|
+
return error.message;
|
|
15
|
+
}
|
|
16
|
+
try {
|
|
17
|
+
const serializedResponseData = JSON.stringify(responseData);
|
|
18
|
+
return serializedResponseData === undefined ? error.message : `${error.message}: ${serializedResponseData}`;
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
return error.message;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
6
24
|
/**
|
|
7
25
|
* A client for interacting with Microsoft Teams APIs.
|
|
8
26
|
* Extends the ConnectorClient class to provide Teams-specific functionalities.
|
|
@@ -10,7 +28,7 @@ const errorHelper_1 = require("../errorHelper");
|
|
|
10
28
|
class TeamsConnectorClient {
|
|
11
29
|
constructor(client) {
|
|
12
30
|
this.client = client;
|
|
13
|
-
this.
|
|
31
|
+
this._httpClient = client.httpClient;
|
|
14
32
|
}
|
|
15
33
|
/**
|
|
16
34
|
* Retrieves a member from a conversation or team.
|
|
@@ -77,7 +95,7 @@ class TeamsConnectorClient {
|
|
|
77
95
|
'Content-Type': 'application/json'
|
|
78
96
|
}
|
|
79
97
|
};
|
|
80
|
-
const response = await this.
|
|
98
|
+
const response = await this.executeRequest(config);
|
|
81
99
|
return response.data;
|
|
82
100
|
}
|
|
83
101
|
/**
|
|
@@ -112,11 +130,11 @@ class TeamsConnectorClient {
|
|
|
112
130
|
method: 'get',
|
|
113
131
|
url: `v3/conversations/${conversationId}/pagedMembers`,
|
|
114
132
|
params: {
|
|
115
|
-
pageSize,
|
|
133
|
+
pageSize: String(pageSize),
|
|
116
134
|
continuationToken
|
|
117
135
|
}
|
|
118
136
|
};
|
|
119
|
-
const response = await this.
|
|
137
|
+
const response = await this.executeRequest(config);
|
|
120
138
|
return response.data;
|
|
121
139
|
}
|
|
122
140
|
/**
|
|
@@ -129,7 +147,7 @@ class TeamsConnectorClient {
|
|
|
129
147
|
method: 'get',
|
|
130
148
|
url: `v3/teams/${teamId}/conversations`
|
|
131
149
|
};
|
|
132
|
-
const response = await this.
|
|
150
|
+
const response = await this.executeRequest(config);
|
|
133
151
|
const convList = response.data;
|
|
134
152
|
return convList.conversations || [];
|
|
135
153
|
}
|
|
@@ -143,7 +161,7 @@ class TeamsConnectorClient {
|
|
|
143
161
|
method: 'get',
|
|
144
162
|
url: `v3/teams/${teamId}`
|
|
145
163
|
};
|
|
146
|
-
const response = await this.
|
|
164
|
+
const response = await this.executeRequest(config);
|
|
147
165
|
return response.data;
|
|
148
166
|
}
|
|
149
167
|
/**
|
|
@@ -159,7 +177,7 @@ class TeamsConnectorClient {
|
|
|
159
177
|
url: `v1/meetings/${meetingId}/participants/${participantId}`,
|
|
160
178
|
params: { tenantId }
|
|
161
179
|
};
|
|
162
|
-
const response = await this.
|
|
180
|
+
const response = await this.executeRequest(config);
|
|
163
181
|
return response.data;
|
|
164
182
|
}
|
|
165
183
|
/**
|
|
@@ -172,7 +190,7 @@ class TeamsConnectorClient {
|
|
|
172
190
|
method: 'get',
|
|
173
191
|
url: `v1/meetings/${meetingId}`
|
|
174
192
|
};
|
|
175
|
-
const response = await this.
|
|
193
|
+
const response = await this.executeRequest(config);
|
|
176
194
|
return response.data;
|
|
177
195
|
}
|
|
178
196
|
/**
|
|
@@ -187,7 +205,7 @@ class TeamsConnectorClient {
|
|
|
187
205
|
url: `v1/meetings/${meetingId}/notification`,
|
|
188
206
|
data: notification
|
|
189
207
|
};
|
|
190
|
-
const response = await this.
|
|
208
|
+
const response = await this.executeRequest(config);
|
|
191
209
|
return response.data;
|
|
192
210
|
}
|
|
193
211
|
/**
|
|
@@ -208,7 +226,7 @@ class TeamsConnectorClient {
|
|
|
208
226
|
url: 'v3/batch/conversation/users',
|
|
209
227
|
data: content
|
|
210
228
|
};
|
|
211
|
-
const response = await this.
|
|
229
|
+
const response = await this.executeRequest(config);
|
|
212
230
|
return response.data;
|
|
213
231
|
}
|
|
214
232
|
/**
|
|
@@ -227,7 +245,7 @@ class TeamsConnectorClient {
|
|
|
227
245
|
url: 'v3/batch/conversation/tenant',
|
|
228
246
|
data: content
|
|
229
247
|
};
|
|
230
|
-
const response = await this.
|
|
248
|
+
const response = await this.executeRequest(config);
|
|
231
249
|
return response.data;
|
|
232
250
|
}
|
|
233
251
|
/**
|
|
@@ -248,7 +266,7 @@ class TeamsConnectorClient {
|
|
|
248
266
|
url: 'v3/batch/conversation/team',
|
|
249
267
|
data: content
|
|
250
268
|
};
|
|
251
|
-
const response = await this.
|
|
269
|
+
const response = await this.executeRequest(config);
|
|
252
270
|
return response.data;
|
|
253
271
|
}
|
|
254
272
|
/**
|
|
@@ -269,7 +287,7 @@ class TeamsConnectorClient {
|
|
|
269
287
|
url: 'v3/batch/conversation/channels',
|
|
270
288
|
data: content
|
|
271
289
|
};
|
|
272
|
-
const response = await this.
|
|
290
|
+
const response = await this.executeRequest(config);
|
|
273
291
|
return response.data;
|
|
274
292
|
}
|
|
275
293
|
/**
|
|
@@ -282,7 +300,7 @@ class TeamsConnectorClient {
|
|
|
282
300
|
method: 'get',
|
|
283
301
|
url: `v3/batch/conversation/${operationId}`
|
|
284
302
|
};
|
|
285
|
-
const response = await this.
|
|
303
|
+
const response = await this.executeRequest(config);
|
|
286
304
|
return response.data;
|
|
287
305
|
}
|
|
288
306
|
/**
|
|
@@ -295,7 +313,7 @@ class TeamsConnectorClient {
|
|
|
295
313
|
method: 'get',
|
|
296
314
|
url: `v3/batch/conversation/failedentries/${operationId}`
|
|
297
315
|
};
|
|
298
|
-
const response = await this.
|
|
316
|
+
const response = await this.executeRequest(config);
|
|
299
317
|
return response.data;
|
|
300
318
|
}
|
|
301
319
|
/**
|
|
@@ -308,9 +326,56 @@ class TeamsConnectorClient {
|
|
|
308
326
|
method: 'delete',
|
|
309
327
|
url: `v3/batch/conversation/${operationId}`
|
|
310
328
|
};
|
|
311
|
-
const response = await this.
|
|
329
|
+
const response = await this.executeRequest(config);
|
|
312
330
|
return response.data;
|
|
313
331
|
}
|
|
332
|
+
async executeRequest(config) {
|
|
333
|
+
var _a, _b, _c;
|
|
334
|
+
const { method, url, data, headers, params } = config;
|
|
335
|
+
const { Authorization, authorization, ...headersToLog } = { ...this._httpClient.defaultHeaders, ...headers };
|
|
336
|
+
logger.debug('Request: ', {
|
|
337
|
+
host: this._httpClient.baseURL,
|
|
338
|
+
url,
|
|
339
|
+
data,
|
|
340
|
+
method,
|
|
341
|
+
params,
|
|
342
|
+
headers: headersToLog
|
|
343
|
+
});
|
|
344
|
+
try {
|
|
345
|
+
const response = await this._httpClient.request(config);
|
|
346
|
+
logger.debug('Response: ', {
|
|
347
|
+
status: response.status,
|
|
348
|
+
statusText: response.statusText,
|
|
349
|
+
host: this._httpClient.baseURL,
|
|
350
|
+
url: (_a = response.config) === null || _a === void 0 ? void 0 : _a.url,
|
|
351
|
+
data: (_b = response.config) === null || _b === void 0 ? void 0 : _b.data,
|
|
352
|
+
method: (_c = response.config) === null || _c === void 0 ? void 0 : _c.method,
|
|
353
|
+
});
|
|
354
|
+
return response;
|
|
355
|
+
}
|
|
356
|
+
catch (error) {
|
|
357
|
+
if (error instanceof agents_hosting_1.HttpError) {
|
|
358
|
+
const message = formatHttpErrorMessage(error);
|
|
359
|
+
logger.debug('Response error: ', {
|
|
360
|
+
host: this._httpClient.baseURL,
|
|
361
|
+
url: error.config.url,
|
|
362
|
+
method: error.config.method,
|
|
363
|
+
data: error.config.data,
|
|
364
|
+
message,
|
|
365
|
+
stack: error.stack,
|
|
366
|
+
});
|
|
367
|
+
Object.assign(error, {
|
|
368
|
+
host: this._httpClient.baseURL,
|
|
369
|
+
url: error.config.url,
|
|
370
|
+
method: error.config.method,
|
|
371
|
+
data: error.config.data,
|
|
372
|
+
message,
|
|
373
|
+
});
|
|
374
|
+
throw error;
|
|
375
|
+
}
|
|
376
|
+
throw error;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
314
379
|
}
|
|
315
380
|
exports.TeamsConnectorClient = TeamsConnectorClient;
|
|
316
381
|
//# sourceMappingURL=teamsConnectorClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"teamsConnectorClient.js","sourceRoot":"","sources":["../../../src/client/teamsConnectorClient.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"teamsConnectorClient.js","sourceRoot":"","sources":["../../../src/client/teamsConnectorClient.ts"],"names":[],"mappings":";;;AAAA,oGAAoG;AACpG,gEAAsF;AACtF,gDAAuC;AAQvC,8DAAmH;AACnH,kEAAmD;AAEnD,MAAM,MAAM,GAAG,IAAA,wBAAK,EAAC,yBAAyB,CAAC,CAAA;AAE/C,SAAS,sBAAsB,CAAE,KAAgB;;IAC/C,MAAM,YAAY,GAAG,MAAA,KAAK,CAAC,QAAQ,0CAAE,IAAI,CAAA;IACzC,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;QAC/B,OAAO,KAAK,CAAC,OAAO,CAAA;IACtB,CAAC;IAED,IAAI,CAAC;QACH,MAAM,sBAAsB,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAA;QAC3D,OAAO,sBAAsB,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,OAAO,KAAK,sBAAsB,EAAE,CAAA;IAC7G,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC,OAAO,CAAA;IACtB,CAAC;AACH,CAAC;AAKD;;;GAGG;AACH,MAAa,oBAAoB;IAE/B,YAAqB,MAAuB;QAAvB,WAAM,GAAN,MAAM,CAAiB;QAC1C,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,UAAU,CAAA;IACtC,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,KAAK,CAAC,SAAS,CAAE,QAAkB,EAAE,MAAc;;QACxD,MAAM,gBAAgB,GAAG,QAAQ,CAAC,WAA+B,CAAA;QACjE,MAAM,MAAM,GAAG,MAAA,gBAAg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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@microsoft/agents-hosting-extensions-teams",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.7.0-beta.1.g8bcd4f11a7",
|
|
5
5
|
"homepage": "https://github.com/microsoft/Agents-for-js",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"main": "dist/src/index.js",
|
|
20
20
|
"types": "dist/src/index.d.ts",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@microsoft/agents-hosting": "1.
|
|
23
|
-
"@microsoft/agents-activity": "1.
|
|
24
|
-
"
|
|
22
|
+
"@microsoft/agents-hosting": "1.7.0-beta.1.g8bcd4f11a7",
|
|
23
|
+
"@microsoft/agents-activity": "1.7.0-beta.1.g8bcd4f11a7",
|
|
24
|
+
"@microsoft/agents-telemetry": "1.7.0-beta.1.g8bcd4f11a7",
|
|
25
25
|
"zod": "3.25.75"
|
|
26
26
|
},
|
|
27
27
|
"license": "MIT",
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */
|
|
2
|
-
import { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios'
|
|
3
2
|
import { Activity, ChannelAccount, ExceptionHelper } from '@microsoft/agents-activity'
|
|
4
3
|
import { Errors } from '../errorHelper'
|
|
5
4
|
import { TeamsChannelAccount } from '../activity-extensions/teamsChannelAccount'
|
|
@@ -9,7 +8,24 @@ import { MeetingNotificationResponse } from '../meeting/meetingNotificationRespo
|
|
|
9
8
|
import { ChannelInfo } from '../activity-extensions/channelInfo'
|
|
10
9
|
import { TeamsChannelData } from '../activity-extensions'
|
|
11
10
|
import { BatchFailedEntriesResponse, BatchOperationStateResponse, CancelOperationResponse, TeamDetails, TeamsBatchOperationResponse, TeamsMember, TeamsPagedMembersResult } from './teamsConnectorClient.types'
|
|
12
|
-
import { ConnectorClient } from '@microsoft/agents-hosting'
|
|
11
|
+
import { ConnectorClient, HttpClient, HttpError, HttpRequestConfig, HttpResponse } from '@microsoft/agents-hosting'
|
|
12
|
+
import { debug } from '@microsoft/agents-telemetry'
|
|
13
|
+
|
|
14
|
+
const logger = debug('agents:connector-client')
|
|
15
|
+
|
|
16
|
+
function formatHttpErrorMessage (error: HttpError): string {
|
|
17
|
+
const responseData = error.response?.data
|
|
18
|
+
if (responseData === undefined) {
|
|
19
|
+
return error.message
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
try {
|
|
23
|
+
const serializedResponseData = JSON.stringify(responseData)
|
|
24
|
+
return serializedResponseData === undefined ? error.message : `${error.message}: ${serializedResponseData}`
|
|
25
|
+
} catch {
|
|
26
|
+
return error.message
|
|
27
|
+
}
|
|
28
|
+
}
|
|
13
29
|
|
|
14
30
|
interface ConversationList {
|
|
15
31
|
conversations?: ChannelInfo[]
|
|
@@ -19,9 +35,9 @@ interface ConversationList {
|
|
|
19
35
|
* Extends the ConnectorClient class to provide Teams-specific functionalities.
|
|
20
36
|
*/
|
|
21
37
|
export class TeamsConnectorClient {
|
|
22
|
-
private
|
|
38
|
+
private _httpClient: HttpClient
|
|
23
39
|
constructor (private client: ConnectorClient) {
|
|
24
|
-
this.
|
|
40
|
+
this._httpClient = client.httpClient
|
|
25
41
|
}
|
|
26
42
|
|
|
27
43
|
/**
|
|
@@ -83,14 +99,14 @@ export class TeamsConnectorClient {
|
|
|
83
99
|
* @returns A ChannelAccount representing the conversation member.
|
|
84
100
|
*/
|
|
85
101
|
public async getConversationMember (conversationId: string, userId: string): Promise<ChannelAccount> {
|
|
86
|
-
const config:
|
|
102
|
+
const config: HttpRequestConfig = {
|
|
87
103
|
method: 'get',
|
|
88
104
|
url: `/v3/conversations/${conversationId}/members/${userId}`,
|
|
89
105
|
headers: {
|
|
90
106
|
'Content-Type': 'application/json'
|
|
91
107
|
}
|
|
92
108
|
}
|
|
93
|
-
const response:
|
|
109
|
+
const response: HttpResponse<ChannelAccount> = await this.executeRequest<ChannelAccount>(config)
|
|
94
110
|
return response.data
|
|
95
111
|
}
|
|
96
112
|
|
|
@@ -126,15 +142,15 @@ export class TeamsConnectorClient {
|
|
|
126
142
|
* @returns A TeamsPagedMembersResult containing the paged members.
|
|
127
143
|
*/
|
|
128
144
|
public async getConversationPagedMember (conversationId: string, pageSize: number, continuationToken: string): Promise<TeamsPagedMembersResult> {
|
|
129
|
-
const config:
|
|
145
|
+
const config: HttpRequestConfig = {
|
|
130
146
|
method: 'get',
|
|
131
147
|
url: `v3/conversations/${conversationId}/pagedMembers`,
|
|
132
148
|
params: {
|
|
133
|
-
pageSize,
|
|
149
|
+
pageSize: String(pageSize),
|
|
134
150
|
continuationToken
|
|
135
151
|
}
|
|
136
152
|
}
|
|
137
|
-
const response = await this.
|
|
153
|
+
const response = await this.executeRequest<TeamsPagedMembersResult>(config)
|
|
138
154
|
return response.data
|
|
139
155
|
}
|
|
140
156
|
|
|
@@ -144,11 +160,11 @@ export class TeamsConnectorClient {
|
|
|
144
160
|
* @returns An array of ChannelInfo objects representing the channels.
|
|
145
161
|
*/
|
|
146
162
|
public async fetchChannelList (teamId: string): Promise<ChannelInfo[]> {
|
|
147
|
-
const config:
|
|
163
|
+
const config: HttpRequestConfig = {
|
|
148
164
|
method: 'get',
|
|
149
165
|
url: `v3/teams/${teamId}/conversations`
|
|
150
166
|
}
|
|
151
|
-
const response = await this.
|
|
167
|
+
const response = await this.executeRequest<ConversationList>(config)
|
|
152
168
|
const convList: ConversationList = response.data
|
|
153
169
|
return convList.conversations || []
|
|
154
170
|
}
|
|
@@ -159,11 +175,11 @@ export class TeamsConnectorClient {
|
|
|
159
175
|
* @returns A TeamDetails object containing the team details.
|
|
160
176
|
*/
|
|
161
177
|
public async fetchTeamDetails (teamId: string): Promise<TeamDetails> {
|
|
162
|
-
const config:
|
|
178
|
+
const config: HttpRequestConfig = {
|
|
163
179
|
method: 'get',
|
|
164
180
|
url: `v3/teams/${teamId}`
|
|
165
181
|
}
|
|
166
|
-
const response = await this.
|
|
182
|
+
const response = await this.executeRequest<TeamDetails>(config)
|
|
167
183
|
return response.data
|
|
168
184
|
}
|
|
169
185
|
|
|
@@ -175,12 +191,12 @@ export class TeamsConnectorClient {
|
|
|
175
191
|
* @returns A string containing participant information.
|
|
176
192
|
*/
|
|
177
193
|
public async fetchMeetingParticipant (meetingId: string, participantId: string, tenantId: string): Promise<string> {
|
|
178
|
-
const config:
|
|
194
|
+
const config: HttpRequestConfig = {
|
|
179
195
|
method: 'get',
|
|
180
196
|
url: `v1/meetings/${meetingId}/participants/${participantId}`,
|
|
181
197
|
params: { tenantId }
|
|
182
198
|
}
|
|
183
|
-
const response = await this.
|
|
199
|
+
const response = await this.executeRequest<string>(config)
|
|
184
200
|
return response.data
|
|
185
201
|
}
|
|
186
202
|
|
|
@@ -190,11 +206,11 @@ export class TeamsConnectorClient {
|
|
|
190
206
|
* @returns A MeetingInfo object containing the meeting information.
|
|
191
207
|
*/
|
|
192
208
|
public async fetchMeetingInfo (meetingId: string): Promise<MeetingInfo> {
|
|
193
|
-
const config:
|
|
209
|
+
const config: HttpRequestConfig = {
|
|
194
210
|
method: 'get',
|
|
195
211
|
url: `v1/meetings/${meetingId}`
|
|
196
212
|
}
|
|
197
|
-
const response = await this.
|
|
213
|
+
const response = await this.executeRequest<MeetingInfo>(config)
|
|
198
214
|
return response.data
|
|
199
215
|
}
|
|
200
216
|
|
|
@@ -205,12 +221,12 @@ export class TeamsConnectorClient {
|
|
|
205
221
|
* @returns A MeetingNotificationResponse object containing the response.
|
|
206
222
|
*/
|
|
207
223
|
public async sendMeetingNotification (meetingId: string, notification: MeetingNotification): Promise<MeetingNotificationResponse> {
|
|
208
|
-
const config:
|
|
224
|
+
const config: HttpRequestConfig = {
|
|
209
225
|
method: 'post',
|
|
210
226
|
url: `v1/meetings/${meetingId}/notification`,
|
|
211
227
|
data: notification
|
|
212
228
|
}
|
|
213
|
-
const response = await this.
|
|
229
|
+
const response = await this.executeRequest<MeetingNotificationResponse>(config)
|
|
214
230
|
return response.data
|
|
215
231
|
}
|
|
216
232
|
|
|
@@ -227,12 +243,12 @@ export class TeamsConnectorClient {
|
|
|
227
243
|
members,
|
|
228
244
|
tenantId
|
|
229
245
|
}
|
|
230
|
-
const config:
|
|
246
|
+
const config: HttpRequestConfig = {
|
|
231
247
|
method: 'post',
|
|
232
248
|
url: 'v3/batch/conversation/users',
|
|
233
249
|
data: content
|
|
234
250
|
}
|
|
235
|
-
const response = await this.
|
|
251
|
+
const response = await this.executeRequest<TeamsBatchOperationResponse>(config)
|
|
236
252
|
return response.data
|
|
237
253
|
}
|
|
238
254
|
|
|
@@ -247,12 +263,12 @@ export class TeamsConnectorClient {
|
|
|
247
263
|
activity,
|
|
248
264
|
tenantId
|
|
249
265
|
}
|
|
250
|
-
const config:
|
|
266
|
+
const config: HttpRequestConfig = {
|
|
251
267
|
method: 'post',
|
|
252
268
|
url: 'v3/batch/conversation/tenant',
|
|
253
269
|
data: content
|
|
254
270
|
}
|
|
255
|
-
const response = await this.
|
|
271
|
+
const response = await this.executeRequest<TeamsBatchOperationResponse>(config)
|
|
256
272
|
return response.data
|
|
257
273
|
}
|
|
258
274
|
|
|
@@ -269,12 +285,12 @@ export class TeamsConnectorClient {
|
|
|
269
285
|
tenantId,
|
|
270
286
|
teamId
|
|
271
287
|
}
|
|
272
|
-
const config:
|
|
288
|
+
const config: HttpRequestConfig = {
|
|
273
289
|
method: 'post',
|
|
274
290
|
url: 'v3/batch/conversation/team',
|
|
275
291
|
data: content
|
|
276
292
|
}
|
|
277
|
-
const response = await this.
|
|
293
|
+
const response = await this.executeRequest<TeamsBatchOperationResponse>(config)
|
|
278
294
|
return response.data
|
|
279
295
|
}
|
|
280
296
|
|
|
@@ -291,12 +307,12 @@ export class TeamsConnectorClient {
|
|
|
291
307
|
tenantId,
|
|
292
308
|
members
|
|
293
309
|
}
|
|
294
|
-
const config:
|
|
310
|
+
const config: HttpRequestConfig = {
|
|
295
311
|
method: 'post',
|
|
296
312
|
url: 'v3/batch/conversation/channels',
|
|
297
313
|
data: content
|
|
298
314
|
}
|
|
299
|
-
const response = await this.
|
|
315
|
+
const response = await this.executeRequest<TeamsBatchOperationResponse>(config)
|
|
300
316
|
return response.data
|
|
301
317
|
}
|
|
302
318
|
|
|
@@ -306,11 +322,11 @@ export class TeamsConnectorClient {
|
|
|
306
322
|
* @returns A BatchOperationStateResponse object containing the operation state.
|
|
307
323
|
*/
|
|
308
324
|
public async getOperationState (operationId: string): Promise<BatchOperationStateResponse> {
|
|
309
|
-
const config:
|
|
325
|
+
const config: HttpRequestConfig = {
|
|
310
326
|
method: 'get',
|
|
311
327
|
url: `v3/batch/conversation/${operationId}`
|
|
312
328
|
}
|
|
313
|
-
const response = await this.
|
|
329
|
+
const response = await this.executeRequest<BatchOperationStateResponse>(config)
|
|
314
330
|
return response.data
|
|
315
331
|
}
|
|
316
332
|
|
|
@@ -320,11 +336,11 @@ export class TeamsConnectorClient {
|
|
|
320
336
|
* @returns A BatchFailedEntriesResponse object containing the failed entries.
|
|
321
337
|
*/
|
|
322
338
|
public async getFailedEntries (operationId: string): Promise<BatchFailedEntriesResponse> {
|
|
323
|
-
const config:
|
|
339
|
+
const config: HttpRequestConfig = {
|
|
324
340
|
method: 'get',
|
|
325
341
|
url: `v3/batch/conversation/failedentries/${operationId}`
|
|
326
342
|
}
|
|
327
|
-
const response = await this.
|
|
343
|
+
const response = await this.executeRequest<BatchFailedEntriesResponse>(config)
|
|
328
344
|
return response.data
|
|
329
345
|
}
|
|
330
346
|
|
|
@@ -334,12 +350,61 @@ export class TeamsConnectorClient {
|
|
|
334
350
|
* @returns A CancelOperationResponse object containing the response.
|
|
335
351
|
*/
|
|
336
352
|
public async cancelOperation (operationId: string): Promise<CancelOperationResponse> {
|
|
337
|
-
const config:
|
|
353
|
+
const config: HttpRequestConfig = {
|
|
338
354
|
method: 'delete',
|
|
339
355
|
url: `v3/batch/conversation/${operationId}`
|
|
340
356
|
}
|
|
341
357
|
|
|
342
|
-
const response = await this.
|
|
358
|
+
const response = await this.executeRequest<CancelOperationResponse>(config)
|
|
343
359
|
return response.data
|
|
344
360
|
}
|
|
361
|
+
|
|
362
|
+
private async executeRequest<T = unknown> (config: HttpRequestConfig): Promise<HttpResponse<T>> {
|
|
363
|
+
const { method, url, data, headers, params } = config
|
|
364
|
+
const { Authorization, authorization, ...headersToLog } = { ...this._httpClient.defaultHeaders, ...headers } as Record<string, string>
|
|
365
|
+
logger.debug('Request: ', {
|
|
366
|
+
host: this._httpClient.baseURL,
|
|
367
|
+
url,
|
|
368
|
+
data,
|
|
369
|
+
method,
|
|
370
|
+
params,
|
|
371
|
+
headers: headersToLog
|
|
372
|
+
})
|
|
373
|
+
|
|
374
|
+
try {
|
|
375
|
+
const response = await this._httpClient.request<T>(config)
|
|
376
|
+
logger.debug('Response: ', {
|
|
377
|
+
status: response.status,
|
|
378
|
+
statusText: response.statusText,
|
|
379
|
+
host: this._httpClient.baseURL,
|
|
380
|
+
url: response.config?.url,
|
|
381
|
+
data: response.config?.data,
|
|
382
|
+
method: response.config?.method,
|
|
383
|
+
})
|
|
384
|
+
return response
|
|
385
|
+
} catch (error) {
|
|
386
|
+
if (error instanceof HttpError) {
|
|
387
|
+
const message = formatHttpErrorMessage(error)
|
|
388
|
+
logger.debug('Response error: ', {
|
|
389
|
+
host: this._httpClient.baseURL,
|
|
390
|
+
url: error.config.url,
|
|
391
|
+
method: error.config.method,
|
|
392
|
+
data: error.config.data,
|
|
393
|
+
message,
|
|
394
|
+
stack: error.stack,
|
|
395
|
+
})
|
|
396
|
+
|
|
397
|
+
Object.assign(error, {
|
|
398
|
+
host: this._httpClient.baseURL,
|
|
399
|
+
url: error.config.url,
|
|
400
|
+
method: error.config.method,
|
|
401
|
+
data: error.config.data,
|
|
402
|
+
message,
|
|
403
|
+
})
|
|
404
|
+
|
|
405
|
+
throw error
|
|
406
|
+
}
|
|
407
|
+
throw error
|
|
408
|
+
}
|
|
409
|
+
}
|
|
345
410
|
}
|