@microsoft/teamsfx 1.0.3-alpha.140cc095c.0 → 1.0.3-alpha.230f266cb.0

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.
@@ -2172,7 +2172,7 @@ class ConversationReferenceStore {
2172
2172
  *
2173
2173
  * @param target - the notification target.
2174
2174
  * @param text - the plain text message.
2175
- * @returns A `Promise` representing the asynchronous operation.
2175
+ * @returns the response of sending message.
2176
2176
  */
2177
2177
  function sendMessage(target, text) {
2178
2178
  return target.sendMessage(text);
@@ -2182,7 +2182,7 @@ function sendMessage(target, text) {
2182
2182
  *
2183
2183
  * @param target - the notification target.
2184
2184
  * @param card - the adaptive card raw JSON.
2185
- * @returns A `Promise` representing the asynchronous operation.
2185
+ * @returns the response of sending adaptive card message.
2186
2186
  */
2187
2187
  function sendAdaptiveCard(target, card) {
2188
2188
  return target.sendAdaptiveCard(card);
@@ -2215,31 +2215,37 @@ class Channel {
2215
2215
  * Send a plain text message.
2216
2216
  *
2217
2217
  * @param text - the plain text message.
2218
- * @returns A `Promise` representing the asynchronous operation.
2218
+ * @returns the response of sending message.
2219
2219
  */
2220
- sendMessage(text) {
2221
- return this.parent.adapter.continueConversation(this.parent.conversationReference, async (context) => {
2220
+ async sendMessage(text) {
2221
+ const response = {};
2222
+ await this.parent.adapter.continueConversation(this.parent.conversationReference, async (context) => {
2222
2223
  const conversation = await this.newConversation(context);
2223
2224
  await this.parent.adapter.continueConversation(conversation, async (ctx) => {
2224
- await ctx.sendActivity(text);
2225
+ const res = await ctx.sendActivity(text);
2226
+ response.id = res === null || res === void 0 ? void 0 : res.id;
2225
2227
  });
2226
2228
  });
2229
+ return response;
2227
2230
  }
2228
2231
  /**
2229
2232
  * Send an adaptive card message.
2230
2233
  *
2231
2234
  * @param card - the adaptive card raw JSON.
2232
- * @returns A `Promise` representing the asynchronous operation.
2235
+ * @returns the response of sending adaptive card message.
2233
2236
  */
2234
2237
  async sendAdaptiveCard(card) {
2235
- return this.parent.adapter.continueConversation(this.parent.conversationReference, async (context) => {
2238
+ const response = {};
2239
+ await this.parent.adapter.continueConversation(this.parent.conversationReference, async (context) => {
2236
2240
  const conversation = await this.newConversation(context);
2237
2241
  await this.parent.adapter.continueConversation(conversation, async (ctx) => {
2238
- await ctx.sendActivity({
2242
+ const res = await ctx.sendActivity({
2239
2243
  attachments: [CardFactory.adaptiveCard(card)],
2240
2244
  });
2245
+ response.id = res === null || res === void 0 ? void 0 : res.id;
2241
2246
  });
2242
2247
  });
2248
+ return response;
2243
2249
  }
2244
2250
  /**
2245
2251
  * @internal
@@ -2279,31 +2285,37 @@ class Member {
2279
2285
  * Send a plain text message.
2280
2286
  *
2281
2287
  * @param text - the plain text message.
2282
- * @returns A `Promise` representing the asynchronous operation.
2288
+ * @returns the response of sending message.
2283
2289
  */
2284
- sendMessage(text) {
2285
- return this.parent.adapter.continueConversation(this.parent.conversationReference, async (context) => {
2290
+ async sendMessage(text) {
2291
+ const response = {};
2292
+ await this.parent.adapter.continueConversation(this.parent.conversationReference, async (context) => {
2286
2293
  const conversation = await this.newConversation(context);
2287
2294
  await this.parent.adapter.continueConversation(conversation, async (ctx) => {
2288
- await ctx.sendActivity(text);
2295
+ const res = await ctx.sendActivity(text);
2296
+ response.id = res === null || res === void 0 ? void 0 : res.id;
2289
2297
  });
2290
2298
  });
2299
+ return response;
2291
2300
  }
2292
2301
  /**
2293
2302
  * Send an adaptive card message.
2294
2303
  *
2295
2304
  * @param card - the adaptive card raw JSON.
2296
- * @returns A `Promise` representing the asynchronous operation.
2305
+ * @returns the response of sending adaptive card message.
2297
2306
  */
2298
2307
  async sendAdaptiveCard(card) {
2299
- return this.parent.adapter.continueConversation(this.parent.conversationReference, async (context) => {
2308
+ const response = {};
2309
+ await this.parent.adapter.continueConversation(this.parent.conversationReference, async (context) => {
2300
2310
  const conversation = await this.newConversation(context);
2301
2311
  await this.parent.adapter.continueConversation(conversation, async (ctx) => {
2302
- await ctx.sendActivity({
2312
+ const res = await ctx.sendActivity({
2303
2313
  attachments: [CardFactory.adaptiveCard(card)],
2304
2314
  });
2315
+ response.id = res === null || res === void 0 ? void 0 : res.id;
2305
2316
  });
2306
2317
  });
2318
+ return response;
2307
2319
  }
2308
2320
  /**
2309
2321
  * @internal
@@ -2351,25 +2363,31 @@ class TeamsBotInstallation {
2351
2363
  * Send a plain text message.
2352
2364
  *
2353
2365
  * @param text - the plain text message.
2354
- * @returns A `Promise` representing the asynchronous operation.
2366
+ * @returns the response of sending message.
2355
2367
  */
2356
- sendMessage(text) {
2357
- return this.adapter.continueConversation(this.conversationReference, async (context) => {
2358
- await context.sendActivity(text);
2368
+ async sendMessage(text) {
2369
+ const response = {};
2370
+ await this.adapter.continueConversation(this.conversationReference, async (context) => {
2371
+ const res = await context.sendActivity(text);
2372
+ response.id = res === null || res === void 0 ? void 0 : res.id;
2359
2373
  });
2374
+ return response;
2360
2375
  }
2361
2376
  /**
2362
2377
  * Send an adaptive card message.
2363
2378
  *
2364
2379
  * @param card - the adaptive card raw JSON.
2365
- * @returns A `Promise` representing the asynchronous operation.
2380
+ * @returns the response of sending adaptive card message.
2366
2381
  */
2367
- sendAdaptiveCard(card) {
2368
- return this.adapter.continueConversation(this.conversationReference, async (context) => {
2369
- await context.sendActivity({
2382
+ async sendAdaptiveCard(card) {
2383
+ const response = {};
2384
+ await this.adapter.continueConversation(this.conversationReference, async (context) => {
2385
+ const res = await context.sendActivity({
2370
2386
  attachments: [CardFactory.adaptiveCard(card)],
2371
2387
  });
2388
+ response.id = res === null || res === void 0 ? void 0 : res.id;
2372
2389
  });
2390
+ return response;
2373
2391
  }
2374
2392
  /**
2375
2393
  * Get channels from this bot installation.