@microsoft/teamsfx 1.1.2-alpha.fe09f4739.0 → 1.1.2-rc-hotfix.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 +5 -76
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm2017.mjs +104 -382
- package/dist/index.esm2017.mjs.map +1 -1
- package/dist/index.esm5.js +5 -76
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +106 -390
- package/dist/index.node.cjs.js.map +1 -1
- package/package.json +3 -4
- package/types/teamsfx.d.ts +1 -202
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/teamsfx",
|
|
3
|
-
"version": "1.1.2-
|
|
3
|
+
"version": "1.1.2-rc-hotfix.0",
|
|
4
4
|
"description": "Microsoft Teams Framework for Node.js and browser.",
|
|
5
5
|
"main": "dist/index.node.cjs.js",
|
|
6
6
|
"browser": "dist/index.esm2017.js",
|
|
@@ -49,9 +49,8 @@
|
|
|
49
49
|
"@azure/identity": "^2.0.1",
|
|
50
50
|
"@azure/msal-browser": "^2.21.0",
|
|
51
51
|
"@azure/msal-node": "~1.1.0",
|
|
52
|
-
"@microsoft/adaptivecards-tools": "1.0.2-
|
|
52
|
+
"@microsoft/adaptivecards-tools": "^1.0.2-rc-hotfix.0",
|
|
53
53
|
"@microsoft/microsoft-graph-client": "^3.0.1",
|
|
54
|
-
"adaptivecards": "^2.10.0",
|
|
55
54
|
"axios": "^0.27.2",
|
|
56
55
|
"botbuilder": ">=4.15.0 <5.0.0",
|
|
57
56
|
"botbuilder-dialogs": ">=4.15.0 <5.0.0",
|
|
@@ -129,7 +128,7 @@
|
|
|
129
128
|
"webpack": "^5.62.1",
|
|
130
129
|
"yargs": "^17.2.1"
|
|
131
130
|
},
|
|
132
|
-
"gitHead": "
|
|
131
|
+
"gitHead": "6047402fa3c03d3f33757a49a648a02f77512c3f",
|
|
133
132
|
"publishConfig": {
|
|
134
133
|
"access": "public"
|
|
135
134
|
},
|
package/types/teamsfx.d.ts
CHANGED
|
@@ -19,13 +19,9 @@ import { DialogContext } from 'botbuilder-dialogs';
|
|
|
19
19
|
import { DialogTurnResult } from 'botbuilder-dialogs';
|
|
20
20
|
import { GetTokenOptions } from '@azure/identity';
|
|
21
21
|
import { HeroCard } from 'botbuilder';
|
|
22
|
-
import { IAdaptiveCard } from 'adaptivecards';
|
|
23
|
-
import { InvokeResponse } from 'botbuilder-core';
|
|
24
|
-
import { InvokeResponse as InvokeResponse_2 } from 'botbuilder';
|
|
25
22
|
import { O365ConnectorCard } from 'botbuilder';
|
|
26
23
|
import { ReceiptCard } from 'botbuilder';
|
|
27
24
|
import { SecureContextOptions } from 'tls';
|
|
28
|
-
import { StatusCodes } from 'botbuilder';
|
|
29
25
|
import { TeamsChannelAccount } from 'botbuilder';
|
|
30
26
|
import { ThumbnailCard } from 'botbuilder';
|
|
31
27
|
import { TokenCredential } from '@azure/identity';
|
|
@@ -35,24 +31,6 @@ import { TurnContext as TurnContext_2 } from 'botbuilder';
|
|
|
35
31
|
import { WebRequest } from 'botbuilder';
|
|
36
32
|
import { WebResponse } from 'botbuilder';
|
|
37
33
|
|
|
38
|
-
/**
|
|
39
|
-
* Options used to control how the response card will be sent to users.
|
|
40
|
-
*/
|
|
41
|
-
export declare enum AdaptiveCardResponse {
|
|
42
|
-
/**
|
|
43
|
-
* The response card will be replaced the current one for the interactor who trigger the action.
|
|
44
|
-
*/
|
|
45
|
-
ReplaceForInteractor = 0,
|
|
46
|
-
/**
|
|
47
|
-
* The response card will be replaced the current one for all users in the chat.
|
|
48
|
-
*/
|
|
49
|
-
ReplaceForAll = 1,
|
|
50
|
-
/**
|
|
51
|
-
* The response card will be sent as a new message for all users in the chat.
|
|
52
|
-
*/
|
|
53
|
-
NewForAll = 2
|
|
54
|
-
}
|
|
55
|
-
|
|
56
34
|
/**
|
|
57
35
|
* Define available location for API Key location
|
|
58
36
|
*/
|
|
@@ -271,41 +249,6 @@ export declare class BearerTokenAuthProvider implements AuthProvider {
|
|
|
271
249
|
AddAuthenticationInfo(config: AxiosRequestConfig): Promise<AxiosRequestConfig>;
|
|
272
250
|
}
|
|
273
251
|
|
|
274
|
-
/**
|
|
275
|
-
* A card action bot to respond to adaptive card universal actions.
|
|
276
|
-
*/
|
|
277
|
-
export declare class CardActionBot {
|
|
278
|
-
private readonly adapter;
|
|
279
|
-
private middleware;
|
|
280
|
-
/**
|
|
281
|
-
* Creates a new instance of the `CardActionBot`.
|
|
282
|
-
*
|
|
283
|
-
* @param adapter The bound `BotFrameworkAdapter`.
|
|
284
|
-
* @param options - initialize options
|
|
285
|
-
*/
|
|
286
|
-
constructor(adapter: BotFrameworkAdapter, options?: CardActionOptions);
|
|
287
|
-
/**
|
|
288
|
-
* Registers a card action handler to the bot.
|
|
289
|
-
* @param actionHandler A card action handler to be registered.
|
|
290
|
-
*/
|
|
291
|
-
registerHandler(actionHandler: TeamsFxAdaptiveCardActionHandler): void;
|
|
292
|
-
/**
|
|
293
|
-
* Registers card action handlers to the bot.
|
|
294
|
-
* @param actionHandlers A set of card action handlers to be registered.
|
|
295
|
-
*/
|
|
296
|
-
registerHandlers(actionHandlers: TeamsFxAdaptiveCardActionHandler[]): void;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* Options to initialize {@link CardActionBot}.
|
|
301
|
-
*/
|
|
302
|
-
export declare interface CardActionOptions {
|
|
303
|
-
/**
|
|
304
|
-
* The action handlers to registered with the action bot. Each command should implement the interface {@link TeamsFxAdaptiveCardActionHandler} so that it can be correctly handled by this bot.
|
|
305
|
-
*/
|
|
306
|
-
actions?: TeamsFxAdaptiveCardActionHandler[];
|
|
307
|
-
}
|
|
308
|
-
|
|
309
252
|
/**
|
|
310
253
|
* Provider that handles Certificate authentication
|
|
311
254
|
*/
|
|
@@ -498,10 +441,6 @@ export declare class ConversationBot {
|
|
|
498
441
|
* The entrypoint of notification.
|
|
499
442
|
*/
|
|
500
443
|
readonly notification?: NotificationBot;
|
|
501
|
-
/**
|
|
502
|
-
* The action handler used for adaptive card universal actions.
|
|
503
|
-
*/
|
|
504
|
-
readonly cardAction?: CardActionBot;
|
|
505
444
|
/**
|
|
506
445
|
* Creates new instance of the `ConversationBot`.
|
|
507
446
|
*
|
|
@@ -576,15 +515,6 @@ export declare interface ConversationOptions {
|
|
|
576
515
|
*/
|
|
577
516
|
enabled?: boolean;
|
|
578
517
|
};
|
|
579
|
-
/**
|
|
580
|
-
* The adaptive card action handler part.
|
|
581
|
-
*/
|
|
582
|
-
cardAction?: CardActionOptions & {
|
|
583
|
-
/**
|
|
584
|
-
* Whether to enable adaptive card actions or not.
|
|
585
|
-
*/
|
|
586
|
-
enabled?: boolean;
|
|
587
|
-
};
|
|
588
518
|
}
|
|
589
519
|
|
|
590
520
|
/**
|
|
@@ -800,96 +730,6 @@ export declare enum IdentityType {
|
|
|
800
730
|
App = "Application"
|
|
801
731
|
}
|
|
802
732
|
|
|
803
|
-
/**
|
|
804
|
-
* Status code for an `application/vnd.microsoft.error` invoke response.
|
|
805
|
-
*/
|
|
806
|
-
export declare enum InvokeResponseErrorCode {
|
|
807
|
-
/**
|
|
808
|
-
* Invalid request.
|
|
809
|
-
*/
|
|
810
|
-
BadRequest = 400,
|
|
811
|
-
/**
|
|
812
|
-
* Internal server error.
|
|
813
|
-
*/
|
|
814
|
-
InternalServerError = 500
|
|
815
|
-
}
|
|
816
|
-
|
|
817
|
-
/**
|
|
818
|
-
* Provides methods for formatting various invoke responses a bot can send to respond to an invoke request.
|
|
819
|
-
*
|
|
820
|
-
* @remarks
|
|
821
|
-
* All of these functions return an {@link InvokeResponse} object, which can be
|
|
822
|
-
* passed as input to generate a new `invokeResponse` activity.
|
|
823
|
-
*
|
|
824
|
-
* This example sends an invoke response that contains an adaptive card.
|
|
825
|
-
*
|
|
826
|
-
* ```typescript
|
|
827
|
-
*
|
|
828
|
-
* const myCard: IAdaptiveCard = {
|
|
829
|
-
* type: "AdaptiveCard",
|
|
830
|
-
* body: [
|
|
831
|
-
* {
|
|
832
|
-
* "type": "TextBlock",
|
|
833
|
-
* "text": "This is a sample card"
|
|
834
|
-
* }],
|
|
835
|
-
* $schema: "http://adaptivecards.io/schemas/adaptive-card.json",
|
|
836
|
-
* version: "1.4"
|
|
837
|
-
* };
|
|
838
|
-
*
|
|
839
|
-
* const invokeResponse = InvokeResponseFactory.adaptiveCard(myCard);
|
|
840
|
-
* await context.sendActivity({
|
|
841
|
-
* type: ActivityTypes.InvokeResponse,
|
|
842
|
-
* value: invokeResponse,
|
|
843
|
-
* });
|
|
844
|
-
* ```
|
|
845
|
-
*/
|
|
846
|
-
export declare class InvokeResponseFactory {
|
|
847
|
-
/**
|
|
848
|
-
* Create an invoke response from a text message.
|
|
849
|
-
* The type of the invoke response is `application/vnd.microsoft.activity.message`
|
|
850
|
-
* indicates the request was successfully processed.
|
|
851
|
-
*
|
|
852
|
-
* @param message A text message included in a invoke response.
|
|
853
|
-
*
|
|
854
|
-
* @returns {InvokeResponse} An InvokeResponse object.
|
|
855
|
-
*/
|
|
856
|
-
static textMessage(message: string): InvokeResponse_2;
|
|
857
|
-
/**
|
|
858
|
-
* Create an invoke response from an adaptive card.
|
|
859
|
-
*
|
|
860
|
-
* The type of the invoke response is `application/vnd.microsoft.card.adaptive` indicates
|
|
861
|
-
* the request was successfully processed, and the response includes an adaptive card
|
|
862
|
-
* that the client should display in place of the current one.
|
|
863
|
-
*
|
|
864
|
-
* @param card The adaptive card JSON payload.
|
|
865
|
-
*
|
|
866
|
-
* @returns {InvokeResponse} An InvokeResponse object.
|
|
867
|
-
*/
|
|
868
|
-
static adaptiveCard(card: IAdaptiveCard): InvokeResponse_2;
|
|
869
|
-
/**
|
|
870
|
-
* Create an invoke response with error code and message.
|
|
871
|
-
*
|
|
872
|
-
* The type of the invoke response is `application/vnd.microsoft.error` indicates
|
|
873
|
-
* the request was failed to processed.
|
|
874
|
-
*
|
|
875
|
-
* @param errorCode The status code indicates error, available values:
|
|
876
|
-
* - 400 (BadRequest): indicate the incoming request was invalid.
|
|
877
|
-
* - 500 (InternalServerError): indicate an unexpected error occurred.
|
|
878
|
-
* @param errorMessage The error message.
|
|
879
|
-
*
|
|
880
|
-
* @returns {InvokeResponse} An InvokeResponse object.
|
|
881
|
-
*/
|
|
882
|
-
static errorResponse(errorCode: InvokeResponseErrorCode, errorMessage: string): InvokeResponse_2;
|
|
883
|
-
/**
|
|
884
|
-
* Create an invoke response with status code and response value.
|
|
885
|
-
* @param statusCode The status code.
|
|
886
|
-
* @param body The value of the response body.
|
|
887
|
-
*
|
|
888
|
-
* @returns {InvokeResponse} An InvokeResponse object.
|
|
889
|
-
*/
|
|
890
|
-
static createInvokeResponse(statusCode: StatusCodes, body?: unknown): InvokeResponse_2;
|
|
891
|
-
}
|
|
892
|
-
|
|
893
733
|
/**
|
|
894
734
|
* Log function for customized logging.
|
|
895
735
|
*/
|
|
@@ -1671,7 +1511,7 @@ export declare class TeamsFx implements TeamsFxConfiguration {
|
|
|
1671
1511
|
*
|
|
1672
1512
|
* @throws {@link ErrorCode|IdentityTypeNotSupported} when setting app identity in browser.
|
|
1673
1513
|
*/
|
|
1674
|
-
constructor(identityType?: IdentityType, customConfig?: Record<string, string>
|
|
1514
|
+
constructor(identityType?: IdentityType, customConfig?: Record<string, string>);
|
|
1675
1515
|
/**
|
|
1676
1516
|
* Identity type set by user.
|
|
1677
1517
|
*
|
|
@@ -1743,47 +1583,6 @@ export declare class TeamsFx implements TeamsFxConfiguration {
|
|
|
1743
1583
|
private loadFromEnv;
|
|
1744
1584
|
}
|
|
1745
1585
|
|
|
1746
|
-
/**
|
|
1747
|
-
* Interface for adaptive card action handler that can process card action invoke and return a response.
|
|
1748
|
-
*/
|
|
1749
|
-
export declare interface TeamsFxAdaptiveCardActionHandler {
|
|
1750
|
-
/**
|
|
1751
|
-
* The verb defined in adaptive card action that can trigger this handler.
|
|
1752
|
-
* The verb string here is case-insensitive.
|
|
1753
|
-
*/
|
|
1754
|
-
triggerVerb: string;
|
|
1755
|
-
/**
|
|
1756
|
-
* Specify the behavior for how the card response will be sent in Teams conversation.
|
|
1757
|
-
* The default value is `AdaptiveCardResponse.ReplaceForInteractor`, which means the card
|
|
1758
|
-
* response will replace the current one only for the interactor.
|
|
1759
|
-
*/
|
|
1760
|
-
adaptiveCardResponse?: AdaptiveCardResponse;
|
|
1761
|
-
/**
|
|
1762
|
-
* The handler function that will be invoked when the action is fired.
|
|
1763
|
-
* @param context The turn context.
|
|
1764
|
-
* @param actionData The contextual data that associated with the action.
|
|
1765
|
-
*
|
|
1766
|
-
* @returns A `Promise` representing a invoke response for the adaptive card invoke action.
|
|
1767
|
-
* You can use the `InvokeResponseFactory` utility class to create an invoke response from
|
|
1768
|
-
* - A text message:
|
|
1769
|
-
* ```typescript
|
|
1770
|
-
* return InvokeResponseFactory.textMessage("Action is processed successfully!");
|
|
1771
|
-
* ```
|
|
1772
|
-
* - An adaptive card:
|
|
1773
|
-
* ```typescript
|
|
1774
|
-
* const responseCard = AdaptiveCards.declare(helloWorldCard).render(actionData);
|
|
1775
|
-
return InvokeResponseFactory.adaptiveCard(responseCard);
|
|
1776
|
-
* ```
|
|
1777
|
-
* - An error response:
|
|
1778
|
-
* ```typescript
|
|
1779
|
-
* return InvokeResponseFactory.errorResponse(InvokeResponseErrorCode.BadRequest, "Invalid request");
|
|
1780
|
-
* ```
|
|
1781
|
-
*
|
|
1782
|
-
* @remark For more details about the invoke response format, refer to https://docs.microsoft.com/en-us/adaptive-cards/authoring-cards/universal-action-model#response-format.
|
|
1783
|
-
*/
|
|
1784
|
-
handleActionInvoked(context: TurnContext, actionData: any): Promise<InvokeResponse>;
|
|
1785
|
-
}
|
|
1786
|
-
|
|
1787
1586
|
/**
|
|
1788
1587
|
* Interface for a command handler that can process command to a TeamsFx bot and return a response.
|
|
1789
1588
|
*/
|