@microsoft/teamsfx 1.0.3-alpha.d3b2c316c.0 → 1.0.3-alpha.dad1471c2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/teamsfx",
3
- "version": "1.0.3-alpha.d3b2c316c.0",
3
+ "version": "1.0.3-alpha.dad1471c2.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,7 +49,7 @@
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-alpha.d3b2c316c.0",
52
+ "@microsoft/adaptivecards-tools": "1.0.2-alpha.dad1471c2.0",
53
53
  "@microsoft/microsoft-graph-client": "^3.0.1",
54
54
  "axios": "^0.27.2",
55
55
  "botbuilder": ">=4.15.0 <5.0.0",
@@ -128,7 +128,7 @@
128
128
  "webpack": "^5.62.1",
129
129
  "yargs": "^17.2.1"
130
130
  },
131
- "gitHead": "daf6f8f12dd96e0eb84dc1c0edeb8437ae79814a",
131
+ "gitHead": "c3303b3dce2175d1cf9e5e936def19565ccfe479",
132
132
  "publishConfig": {
133
133
  "access": "public"
134
134
  },
@@ -307,16 +307,16 @@ export declare class Channel implements NotificationTarget {
307
307
  * Send a plain text message.
308
308
  *
309
309
  * @param text - the plain text message.
310
- * @returns A `Promise` representing the asynchronous operation.
310
+ * @returns the response of sending message.
311
311
  */
312
- sendMessage(text: string): Promise<void>;
312
+ sendMessage(text: string): Promise<MessageResponse>;
313
313
  /**
314
314
  * Send an adaptive card message.
315
315
  *
316
316
  * @param card - the adaptive card raw JSON.
317
- * @returns A `Promise` representing the asynchronous operation.
317
+ * @returns the response of sending adaptive card message.
318
318
  */
319
- sendAdaptiveCard(card: unknown): Promise<void>;
319
+ sendAdaptiveCard(card: unknown): Promise<MessageResponse>;
320
320
  /**
321
321
  * @internal
322
322
  */
@@ -812,16 +812,16 @@ export declare class Member implements NotificationTarget {
812
812
  * Send a plain text message.
813
813
  *
814
814
  * @param text - the plain text message.
815
- * @returns A `Promise` representing the asynchronous operation.
815
+ * @returns the response of sending message.
816
816
  */
817
- sendMessage(text: string): Promise<void>;
817
+ sendMessage(text: string): Promise<MessageResponse>;
818
818
  /**
819
819
  * Send an adaptive card message.
820
820
  *
821
821
  * @param card - the adaptive card raw JSON.
822
- * @returns A `Promise` representing the asynchronous operation.
822
+ * @returns the response of sending adaptive card message.
823
823
  */
824
- sendAdaptiveCard(card: unknown): Promise<void>;
824
+ sendAdaptiveCard(card: unknown): Promise<MessageResponse>;
825
825
  /**
826
826
  * @internal
827
827
  */
@@ -941,6 +941,16 @@ export declare class MessageBuilder {
941
941
  static attachContent(attachement: Attachment): Partial<Activity_2>;
942
942
  }
943
943
 
944
+ /**
945
+ * The response of a message action, e.g., `sendMessage`, `sendAdaptiveCard`.
946
+ */
947
+ declare interface MessageResponse {
948
+ /**
949
+ * Id of the message.
950
+ */
951
+ id?: string;
952
+ }
953
+
944
954
  /**
945
955
  * Microsoft Graph auth provider for Teams Framework
946
956
  */
@@ -1031,14 +1041,18 @@ export declare interface NotificationTarget {
1031
1041
  * Send a plain text message.
1032
1042
  *
1033
1043
  * @param text - the plain text message.
1044
+ *
1045
+ * @returns the response of sending message.
1034
1046
  */
1035
- sendMessage(text: string): Promise<void>;
1047
+ sendMessage(text: string): Promise<MessageResponse>;
1036
1048
  /**
1037
1049
  * Send an adaptive card message.
1038
1050
  *
1039
1051
  * @param card - the adaptive card raw JSON.
1052
+ *
1053
+ * @returns the response of sending adaptive card message.
1040
1054
  */
1041
- sendAdaptiveCard(card: unknown): Promise<void>;
1055
+ sendAdaptiveCard(card: unknown): Promise<MessageResponse>;
1042
1056
  }
1043
1057
 
1044
1058
  /**
@@ -1088,7 +1102,21 @@ export declare interface NotificationTargetStorage {
1088
1102
  * - "Group" means to a group chat.
1089
1103
  * - "Person" means to a personal chat.
1090
1104
  */
1091
- export declare type NotificationTargetType = "Channel" | "Group" | "Person";
1105
+ export declare enum NotificationTargetType {
1106
+ /**
1107
+ * The notification will be sent to a team channel.
1108
+ * (By default, notification to a team will be sent to its "General" channel.)
1109
+ */
1110
+ Channel = "Channel",
1111
+ /**
1112
+ * The notification will be sent to a group chat.
1113
+ */
1114
+ Group = "Group",
1115
+ /**
1116
+ * The notification will be sent to a personal chat.
1117
+ */
1118
+ Person = "Person"
1119
+ }
1092
1120
 
1093
1121
  /**
1094
1122
  * Represent on-behalf-of flow to get user identity, and it is designed to be used in server side.
@@ -1174,18 +1202,18 @@ export declare class OnBehalfOfUserCredential implements TokenCredential {
1174
1202
  *
1175
1203
  * @param target - the notification target.
1176
1204
  * @param card - the adaptive card raw JSON.
1177
- * @returns A `Promise` representing the asynchronous operation.
1205
+ * @returns the response of sending adaptive card message.
1178
1206
  */
1179
- export declare function sendAdaptiveCard(target: NotificationTarget, card: unknown): Promise<void>;
1207
+ export declare function sendAdaptiveCard(target: NotificationTarget, card: unknown): Promise<MessageResponse>;
1180
1208
 
1181
1209
  /**
1182
1210
  * Send a plain text message to a notification target.
1183
1211
  *
1184
1212
  * @param target - the notification target.
1185
1213
  * @param text - the plain text message.
1186
- * @returns A `Promise` representing the asynchronous operation.
1214
+ * @returns the response of sending message.
1187
1215
  */
1188
- export declare function sendMessage(target: NotificationTarget, text: string): Promise<void>;
1216
+ export declare function sendMessage(target: NotificationTarget, text: string): Promise<MessageResponse>;
1189
1217
 
1190
1218
  /**
1191
1219
  * Set custom log function. Use the function if it's set. Priority is lower than setLogger.
@@ -1268,16 +1296,16 @@ export declare class TeamsBotInstallation implements NotificationTarget {
1268
1296
  * Send a plain text message.
1269
1297
  *
1270
1298
  * @param text - the plain text message.
1271
- * @returns A `Promise` representing the asynchronous operation.
1299
+ * @returns the response of sending message.
1272
1300
  */
1273
- sendMessage(text: string): Promise<void>;
1301
+ sendMessage(text: string): Promise<MessageResponse>;
1274
1302
  /**
1275
1303
  * Send an adaptive card message.
1276
1304
  *
1277
1305
  * @param card - the adaptive card raw JSON.
1278
- * @returns A `Promise` representing the asynchronous operation.
1306
+ * @returns the response of sending adaptive card message.
1279
1307
  */
1280
- sendAdaptiveCard(card: unknown): Promise<void>;
1308
+ sendAdaptiveCard(card: unknown): Promise<MessageResponse>;
1281
1309
  /**
1282
1310
  * Get channels from this bot installation.
1283
1311
  *