@microsoft/teamsfx 1.0.2-rc.0 → 1.0.3-alpha.462bc5ef7.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.
- package/dist/index.esm2017.js +7 -6
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm2017.mjs +43 -24
- package/dist/index.esm2017.mjs.map +1 -1
- package/dist/index.esm5.js +7 -6
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +57 -30
- package/dist/index.node.cjs.js.map +1 -1
- package/package.json +4 -4
- package/types/teamsfx.d.ts +38 -18
package/dist/index.esm2017.mjs
CHANGED
|
@@ -295,6 +295,7 @@ function getUserInfoFromSsoToken(ssoToken) {
|
|
|
295
295
|
const userInfo = {
|
|
296
296
|
displayName: tokenObject.name,
|
|
297
297
|
objectId: tokenObject.oid,
|
|
298
|
+
tenantId: tokenObject.tid,
|
|
298
299
|
preferredUserName: "",
|
|
299
300
|
};
|
|
300
301
|
if (tokenObject.ver === "2.0") {
|
|
@@ -2171,7 +2172,7 @@ class ConversationReferenceStore {
|
|
|
2171
2172
|
*
|
|
2172
2173
|
* @param target - the notification target.
|
|
2173
2174
|
* @param text - the plain text message.
|
|
2174
|
-
* @returns
|
|
2175
|
+
* @returns the response of sending message.
|
|
2175
2176
|
*/
|
|
2176
2177
|
function sendMessage(target, text) {
|
|
2177
2178
|
return target.sendMessage(text);
|
|
@@ -2181,7 +2182,7 @@ function sendMessage(target, text) {
|
|
|
2181
2182
|
*
|
|
2182
2183
|
* @param target - the notification target.
|
|
2183
2184
|
* @param card - the adaptive card raw JSON.
|
|
2184
|
-
* @returns
|
|
2185
|
+
* @returns the response of sending adaptive card message.
|
|
2185
2186
|
*/
|
|
2186
2187
|
function sendAdaptiveCard(target, card) {
|
|
2187
2188
|
return target.sendAdaptiveCard(card);
|
|
@@ -2214,31 +2215,37 @@ class Channel {
|
|
|
2214
2215
|
* Send a plain text message.
|
|
2215
2216
|
*
|
|
2216
2217
|
* @param text - the plain text message.
|
|
2217
|
-
* @returns
|
|
2218
|
+
* @returns the response of sending message.
|
|
2218
2219
|
*/
|
|
2219
|
-
sendMessage(text) {
|
|
2220
|
-
|
|
2220
|
+
async sendMessage(text) {
|
|
2221
|
+
const response = {};
|
|
2222
|
+
await this.parent.adapter.continueConversation(this.parent.conversationReference, async (context) => {
|
|
2221
2223
|
const conversation = await this.newConversation(context);
|
|
2222
2224
|
await this.parent.adapter.continueConversation(conversation, async (ctx) => {
|
|
2223
|
-
await ctx.sendActivity(text);
|
|
2225
|
+
const res = await ctx.sendActivity(text);
|
|
2226
|
+
response.id = res === null || res === void 0 ? void 0 : res.id;
|
|
2224
2227
|
});
|
|
2225
2228
|
});
|
|
2229
|
+
return response;
|
|
2226
2230
|
}
|
|
2227
2231
|
/**
|
|
2228
2232
|
* Send an adaptive card message.
|
|
2229
2233
|
*
|
|
2230
2234
|
* @param card - the adaptive card raw JSON.
|
|
2231
|
-
* @returns
|
|
2235
|
+
* @returns the response of sending adaptive card message.
|
|
2232
2236
|
*/
|
|
2233
2237
|
async sendAdaptiveCard(card) {
|
|
2234
|
-
|
|
2238
|
+
const response = {};
|
|
2239
|
+
await this.parent.adapter.continueConversation(this.parent.conversationReference, async (context) => {
|
|
2235
2240
|
const conversation = await this.newConversation(context);
|
|
2236
2241
|
await this.parent.adapter.continueConversation(conversation, async (ctx) => {
|
|
2237
|
-
await ctx.sendActivity({
|
|
2242
|
+
const res = await ctx.sendActivity({
|
|
2238
2243
|
attachments: [CardFactory.adaptiveCard(card)],
|
|
2239
2244
|
});
|
|
2245
|
+
response.id = res === null || res === void 0 ? void 0 : res.id;
|
|
2240
2246
|
});
|
|
2241
2247
|
});
|
|
2248
|
+
return response;
|
|
2242
2249
|
}
|
|
2243
2250
|
/**
|
|
2244
2251
|
* @internal
|
|
@@ -2278,31 +2285,37 @@ class Member {
|
|
|
2278
2285
|
* Send a plain text message.
|
|
2279
2286
|
*
|
|
2280
2287
|
* @param text - the plain text message.
|
|
2281
|
-
* @returns
|
|
2288
|
+
* @returns the response of sending message.
|
|
2282
2289
|
*/
|
|
2283
|
-
sendMessage(text) {
|
|
2284
|
-
|
|
2290
|
+
async sendMessage(text) {
|
|
2291
|
+
const response = {};
|
|
2292
|
+
await this.parent.adapter.continueConversation(this.parent.conversationReference, async (context) => {
|
|
2285
2293
|
const conversation = await this.newConversation(context);
|
|
2286
2294
|
await this.parent.adapter.continueConversation(conversation, async (ctx) => {
|
|
2287
|
-
await ctx.sendActivity(text);
|
|
2295
|
+
const res = await ctx.sendActivity(text);
|
|
2296
|
+
response.id = res === null || res === void 0 ? void 0 : res.id;
|
|
2288
2297
|
});
|
|
2289
2298
|
});
|
|
2299
|
+
return response;
|
|
2290
2300
|
}
|
|
2291
2301
|
/**
|
|
2292
2302
|
* Send an adaptive card message.
|
|
2293
2303
|
*
|
|
2294
2304
|
* @param card - the adaptive card raw JSON.
|
|
2295
|
-
* @returns
|
|
2305
|
+
* @returns the response of sending adaptive card message.
|
|
2296
2306
|
*/
|
|
2297
2307
|
async sendAdaptiveCard(card) {
|
|
2298
|
-
|
|
2308
|
+
const response = {};
|
|
2309
|
+
await this.parent.adapter.continueConversation(this.parent.conversationReference, async (context) => {
|
|
2299
2310
|
const conversation = await this.newConversation(context);
|
|
2300
2311
|
await this.parent.adapter.continueConversation(conversation, async (ctx) => {
|
|
2301
|
-
await ctx.sendActivity({
|
|
2312
|
+
const res = await ctx.sendActivity({
|
|
2302
2313
|
attachments: [CardFactory.adaptiveCard(card)],
|
|
2303
2314
|
});
|
|
2315
|
+
response.id = res === null || res === void 0 ? void 0 : res.id;
|
|
2304
2316
|
});
|
|
2305
2317
|
});
|
|
2318
|
+
return response;
|
|
2306
2319
|
}
|
|
2307
2320
|
/**
|
|
2308
2321
|
* @internal
|
|
@@ -2350,25 +2363,31 @@ class TeamsBotInstallation {
|
|
|
2350
2363
|
* Send a plain text message.
|
|
2351
2364
|
*
|
|
2352
2365
|
* @param text - the plain text message.
|
|
2353
|
-
* @returns
|
|
2366
|
+
* @returns the response of sending message.
|
|
2354
2367
|
*/
|
|
2355
|
-
sendMessage(text) {
|
|
2356
|
-
|
|
2357
|
-
|
|
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;
|
|
2358
2373
|
});
|
|
2374
|
+
return response;
|
|
2359
2375
|
}
|
|
2360
2376
|
/**
|
|
2361
2377
|
* Send an adaptive card message.
|
|
2362
2378
|
*
|
|
2363
2379
|
* @param card - the adaptive card raw JSON.
|
|
2364
|
-
* @returns
|
|
2380
|
+
* @returns the response of sending adaptive card message.
|
|
2365
2381
|
*/
|
|
2366
|
-
sendAdaptiveCard(card) {
|
|
2367
|
-
|
|
2368
|
-
|
|
2382
|
+
async sendAdaptiveCard(card) {
|
|
2383
|
+
const response = {};
|
|
2384
|
+
await this.adapter.continueConversation(this.conversationReference, async (context) => {
|
|
2385
|
+
const res = await context.sendActivity({
|
|
2369
2386
|
attachments: [CardFactory.adaptiveCard(card)],
|
|
2370
2387
|
});
|
|
2388
|
+
response.id = res === null || res === void 0 ? void 0 : res.id;
|
|
2371
2389
|
});
|
|
2390
|
+
return response;
|
|
2372
2391
|
}
|
|
2373
2392
|
/**
|
|
2374
2393
|
* Get channels from this bot installation.
|