@microsoft/teamsfx 1.0.2-rc.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.
- 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.node.cjs.js
CHANGED
|
@@ -325,6 +325,7 @@ function getUserInfoFromSsoToken(ssoToken) {
|
|
|
325
325
|
const userInfo = {
|
|
326
326
|
displayName: tokenObject.name,
|
|
327
327
|
objectId: tokenObject.oid,
|
|
328
|
+
tenantId: tokenObject.tid,
|
|
328
329
|
preferredUserName: "",
|
|
329
330
|
};
|
|
330
331
|
if (tokenObject.ver === "2.0") {
|
|
@@ -2255,7 +2256,7 @@ class ConversationReferenceStore {
|
|
|
2255
2256
|
*
|
|
2256
2257
|
* @param target - the notification target.
|
|
2257
2258
|
* @param text - the plain text message.
|
|
2258
|
-
* @returns
|
|
2259
|
+
* @returns the response of sending message.
|
|
2259
2260
|
*/
|
|
2260
2261
|
function sendMessage(target, text) {
|
|
2261
2262
|
return target.sendMessage(text);
|
|
@@ -2265,7 +2266,7 @@ function sendMessage(target, text) {
|
|
|
2265
2266
|
*
|
|
2266
2267
|
* @param target - the notification target.
|
|
2267
2268
|
* @param card - the adaptive card raw JSON.
|
|
2268
|
-
* @returns
|
|
2269
|
+
* @returns the response of sending adaptive card message.
|
|
2269
2270
|
*/
|
|
2270
2271
|
function sendAdaptiveCard(target, card) {
|
|
2271
2272
|
return target.sendAdaptiveCard(card);
|
|
@@ -2298,32 +2299,40 @@ class Channel {
|
|
|
2298
2299
|
* Send a plain text message.
|
|
2299
2300
|
*
|
|
2300
2301
|
* @param text - the plain text message.
|
|
2301
|
-
* @returns
|
|
2302
|
+
* @returns the response of sending message.
|
|
2302
2303
|
*/
|
|
2303
2304
|
sendMessage(text) {
|
|
2304
|
-
return
|
|
2305
|
-
const
|
|
2306
|
-
yield this.parent.adapter.continueConversation(
|
|
2307
|
-
yield
|
|
2305
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2306
|
+
const response = {};
|
|
2307
|
+
yield this.parent.adapter.continueConversation(this.parent.conversationReference, (context) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2308
|
+
const conversation = yield this.newConversation(context);
|
|
2309
|
+
yield this.parent.adapter.continueConversation(conversation, (ctx) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2310
|
+
const res = yield ctx.sendActivity(text);
|
|
2311
|
+
response.id = res === null || res === void 0 ? void 0 : res.id;
|
|
2312
|
+
}));
|
|
2308
2313
|
}));
|
|
2309
|
-
|
|
2314
|
+
return response;
|
|
2315
|
+
});
|
|
2310
2316
|
}
|
|
2311
2317
|
/**
|
|
2312
2318
|
* Send an adaptive card message.
|
|
2313
2319
|
*
|
|
2314
2320
|
* @param card - the adaptive card raw JSON.
|
|
2315
|
-
* @returns
|
|
2321
|
+
* @returns the response of sending adaptive card message.
|
|
2316
2322
|
*/
|
|
2317
2323
|
sendAdaptiveCard(card) {
|
|
2318
2324
|
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2319
|
-
|
|
2325
|
+
const response = {};
|
|
2326
|
+
yield this.parent.adapter.continueConversation(this.parent.conversationReference, (context) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2320
2327
|
const conversation = yield this.newConversation(context);
|
|
2321
2328
|
yield this.parent.adapter.continueConversation(conversation, (ctx) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2322
|
-
yield ctx.sendActivity({
|
|
2329
|
+
const res = yield ctx.sendActivity({
|
|
2323
2330
|
attachments: [botbuilder.CardFactory.adaptiveCard(card)],
|
|
2324
2331
|
});
|
|
2332
|
+
response.id = res === null || res === void 0 ? void 0 : res.id;
|
|
2325
2333
|
}));
|
|
2326
2334
|
}));
|
|
2335
|
+
return response;
|
|
2327
2336
|
});
|
|
2328
2337
|
}
|
|
2329
2338
|
/**
|
|
@@ -2366,32 +2375,40 @@ class Member {
|
|
|
2366
2375
|
* Send a plain text message.
|
|
2367
2376
|
*
|
|
2368
2377
|
* @param text - the plain text message.
|
|
2369
|
-
* @returns
|
|
2378
|
+
* @returns the response of sending message.
|
|
2370
2379
|
*/
|
|
2371
2380
|
sendMessage(text) {
|
|
2372
|
-
return
|
|
2373
|
-
const
|
|
2374
|
-
yield this.parent.adapter.continueConversation(
|
|
2375
|
-
yield
|
|
2381
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2382
|
+
const response = {};
|
|
2383
|
+
yield this.parent.adapter.continueConversation(this.parent.conversationReference, (context) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2384
|
+
const conversation = yield this.newConversation(context);
|
|
2385
|
+
yield this.parent.adapter.continueConversation(conversation, (ctx) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2386
|
+
const res = yield ctx.sendActivity(text);
|
|
2387
|
+
response.id = res === null || res === void 0 ? void 0 : res.id;
|
|
2388
|
+
}));
|
|
2376
2389
|
}));
|
|
2377
|
-
|
|
2390
|
+
return response;
|
|
2391
|
+
});
|
|
2378
2392
|
}
|
|
2379
2393
|
/**
|
|
2380
2394
|
* Send an adaptive card message.
|
|
2381
2395
|
*
|
|
2382
2396
|
* @param card - the adaptive card raw JSON.
|
|
2383
|
-
* @returns
|
|
2397
|
+
* @returns the response of sending adaptive card message.
|
|
2384
2398
|
*/
|
|
2385
2399
|
sendAdaptiveCard(card) {
|
|
2386
2400
|
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2387
|
-
|
|
2401
|
+
const response = {};
|
|
2402
|
+
yield this.parent.adapter.continueConversation(this.parent.conversationReference, (context) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2388
2403
|
const conversation = yield this.newConversation(context);
|
|
2389
2404
|
yield this.parent.adapter.continueConversation(conversation, (ctx) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2390
|
-
yield ctx.sendActivity({
|
|
2405
|
+
const res = yield ctx.sendActivity({
|
|
2391
2406
|
attachments: [botbuilder.CardFactory.adaptiveCard(card)],
|
|
2392
2407
|
});
|
|
2408
|
+
response.id = res === null || res === void 0 ? void 0 : res.id;
|
|
2393
2409
|
}));
|
|
2394
2410
|
}));
|
|
2411
|
+
return response;
|
|
2395
2412
|
});
|
|
2396
2413
|
}
|
|
2397
2414
|
/**
|
|
@@ -2442,25 +2459,35 @@ class TeamsBotInstallation {
|
|
|
2442
2459
|
* Send a plain text message.
|
|
2443
2460
|
*
|
|
2444
2461
|
* @param text - the plain text message.
|
|
2445
|
-
* @returns
|
|
2462
|
+
* @returns the response of sending message.
|
|
2446
2463
|
*/
|
|
2447
2464
|
sendMessage(text) {
|
|
2448
|
-
return
|
|
2449
|
-
|
|
2450
|
-
|
|
2465
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2466
|
+
const response = {};
|
|
2467
|
+
yield this.adapter.continueConversation(this.conversationReference, (context) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2468
|
+
const res = yield context.sendActivity(text);
|
|
2469
|
+
response.id = res === null || res === void 0 ? void 0 : res.id;
|
|
2470
|
+
}));
|
|
2471
|
+
return response;
|
|
2472
|
+
});
|
|
2451
2473
|
}
|
|
2452
2474
|
/**
|
|
2453
2475
|
* Send an adaptive card message.
|
|
2454
2476
|
*
|
|
2455
2477
|
* @param card - the adaptive card raw JSON.
|
|
2456
|
-
* @returns
|
|
2478
|
+
* @returns the response of sending adaptive card message.
|
|
2457
2479
|
*/
|
|
2458
2480
|
sendAdaptiveCard(card) {
|
|
2459
|
-
return
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2481
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2482
|
+
const response = {};
|
|
2483
|
+
yield this.adapter.continueConversation(this.conversationReference, (context) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2484
|
+
const res = yield context.sendActivity({
|
|
2485
|
+
attachments: [botbuilder.CardFactory.adaptiveCard(card)],
|
|
2486
|
+
});
|
|
2487
|
+
response.id = res === null || res === void 0 ? void 0 : res.id;
|
|
2488
|
+
}));
|
|
2489
|
+
return response;
|
|
2490
|
+
});
|
|
2464
2491
|
}
|
|
2465
2492
|
/**
|
|
2466
2493
|
* Get channels from this bot installation.
|