@microsoft/teamsfx 1.2.1-alpha.cecbda807.0 → 1.2.1-rc.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.2.1-alpha.cecbda807.0",
3
+ "version": "1.2.1-rc.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.4-alpha.cecbda807.0",
52
+ "@microsoft/adaptivecards-tools": "^1.1.0-rc.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",
@@ -129,7 +129,7 @@
129
129
  "webpack": "^5.62.1",
130
130
  "yargs": "^17.2.1"
131
131
  },
132
- "gitHead": "1f26d824db654b005c7a4e86242a028b45be8c72",
132
+ "gitHead": "e74291d967f60910cb52278dfdd38d26d2414b57",
133
133
  "publishConfig": {
134
134
  "access": "public"
135
135
  },
@@ -538,16 +538,20 @@ export declare class Channel implements NotificationTarget {
538
538
  * Send a plain text message.
539
539
  *
540
540
  * @param text - the plain text message.
541
+ * @param onError - an optional error handler that can catch exceptions during message sending.
542
+ * If not defined, error will be handled by `BotAdapter.onTurnError`.
541
543
  * @returns the response of sending message.
542
544
  */
543
- sendMessage(text: string): Promise<MessageResponse>;
545
+ sendMessage(text: string, onError?: (context: TurnContext, error: Error) => Promise<void>): Promise<MessageResponse>;
544
546
  /**
545
547
  * Send an adaptive card message.
546
548
  *
547
549
  * @param card - the adaptive card raw JSON.
550
+ * @param onError - an optional error handler that can catch exceptions during adaptive card sending.
551
+ * If not defined, error will be handled by `BotAdapter.onTurnError`.
548
552
  * @returns the response of sending adaptive card message.
549
553
  */
550
- sendAdaptiveCard(card: unknown): Promise<MessageResponse>;
554
+ sendAdaptiveCard(card: unknown, onError?: (context: TurnContext, error: Error) => Promise<void>): Promise<MessageResponse>;
551
555
  /**
552
556
  * @internal
553
557
  */
@@ -1215,16 +1219,20 @@ export declare class Member implements NotificationTarget {
1215
1219
  * Send a plain text message.
1216
1220
  *
1217
1221
  * @param text - the plain text message.
1222
+ * @param onError - an optional error handler that can catch exceptions during message sending.
1223
+ * If not defined, error will be handled by `BotAdapter.onTurnError`.
1218
1224
  * @returns the response of sending message.
1219
1225
  */
1220
- sendMessage(text: string): Promise<MessageResponse>;
1226
+ sendMessage(text: string, onError?: (context: TurnContext, error: Error) => Promise<void>): Promise<MessageResponse>;
1221
1227
  /**
1222
1228
  * Send an adaptive card message.
1223
1229
  *
1224
1230
  * @param card - the adaptive card raw JSON.
1231
+ * @param onError - an optional error handler that can catch exceptions during adaptive card sending.
1232
+ * If not defined, error will be handled by `BotAdapter.onTurnError`.
1225
1233
  * @returns the response of sending adaptive card message.
1226
1234
  */
1227
- sendAdaptiveCard(card: unknown): Promise<MessageResponse>;
1235
+ sendAdaptiveCard(card: unknown, onError?: (context: TurnContext, error: Error) => Promise<void>): Promise<MessageResponse>;
1228
1236
  /**
1229
1237
  * @internal
1230
1238
  */
@@ -1495,18 +1503,22 @@ export declare interface NotificationTarget {
1495
1503
  * Send a plain text message.
1496
1504
  *
1497
1505
  * @param text - the plain text message.
1506
+ * @param onError - an optional error handler that can catch exceptions during message sending.
1507
+ * If not defined, error will be handled by `BotAdapter.onTurnError`.
1498
1508
  *
1499
1509
  * @returns the response of sending message.
1500
1510
  */
1501
- sendMessage(text: string): Promise<MessageResponse>;
1511
+ sendMessage(text: string, onError?: (context: TurnContext, error: Error) => Promise<void>): Promise<MessageResponse>;
1502
1512
  /**
1503
1513
  * Send an adaptive card message.
1504
1514
  *
1505
1515
  * @param card - the adaptive card raw JSON.
1516
+ * @param onError - an optional error handler that can catch exceptions during adaptive card sending.
1517
+ * If not defined, error will be handled by `BotAdapter.onTurnError`.
1506
1518
  *
1507
1519
  * @returns the response of sending adaptive card message.
1508
1520
  */
1509
- sendAdaptiveCard(card: unknown): Promise<MessageResponse>;
1521
+ sendAdaptiveCard(card: unknown, onError?: (context: TurnContext, error: Error) => Promise<void>): Promise<MessageResponse>;
1510
1522
  }
1511
1523
 
1512
1524
  /**
@@ -1680,18 +1692,22 @@ export declare enum SearchScope {
1680
1692
  *
1681
1693
  * @param target - the notification target.
1682
1694
  * @param card - the adaptive card raw JSON.
1695
+ * @param onError - an optional error handler that can catch exceptions during adaptive card sending.
1696
+ * If not defined, error will be handled by `BotAdapter.onTurnError`.
1683
1697
  * @returns the response of sending adaptive card message.
1684
1698
  */
1685
- export declare function sendAdaptiveCard(target: NotificationTarget, card: unknown): Promise<MessageResponse>;
1699
+ export declare function sendAdaptiveCard(target: NotificationTarget, card: unknown, onError?: (context: TurnContext, error: Error) => Promise<void>): Promise<MessageResponse>;
1686
1700
 
1687
1701
  /**
1688
1702
  * Send a plain text message to a notification target.
1689
1703
  *
1690
1704
  * @param target - the notification target.
1691
1705
  * @param text - the plain text message.
1706
+ * @param onError - an optional error handler that can catch exceptions during message sending.
1707
+ * If not defined, error will be handled by `BotAdapter.onTurnError`.
1692
1708
  * @returns the response of sending message.
1693
1709
  */
1694
- export declare function sendMessage(target: NotificationTarget, text: string): Promise<MessageResponse>;
1710
+ export declare function sendMessage(target: NotificationTarget, text: string, onError?: (context: TurnContext, error: Error) => Promise<void>): Promise<MessageResponse>;
1695
1711
 
1696
1712
  /**
1697
1713
  * Set custom log function. Use the function if it's set. Priority is lower than setLogger.
@@ -1774,16 +1790,20 @@ export declare class TeamsBotInstallation implements NotificationTarget {
1774
1790
  * Send a plain text message.
1775
1791
  *
1776
1792
  * @param text - the plain text message.
1793
+ * @param onError - an optional error handler that can catch exceptions during message sending.
1794
+ * If not defined, error will be handled by `BotAdapter.onTurnError`.
1777
1795
  * @returns the response of sending message.
1778
1796
  */
1779
- sendMessage(text: string): Promise<MessageResponse>;
1797
+ sendMessage(text: string, onError?: (context: TurnContext, error: Error) => Promise<void>): Promise<MessageResponse>;
1780
1798
  /**
1781
1799
  * Send an adaptive card message.
1782
1800
  *
1783
1801
  * @param card - the adaptive card raw JSON.
1802
+ * @param onError - an optional error handler that can catch exceptions during adaptive card sending.
1803
+ * If not defined, error will be handled by `BotAdapter.onTurnError`.
1784
1804
  * @returns the response of sending adaptive card message.
1785
1805
  */
1786
- sendAdaptiveCard(card: unknown): Promise<MessageResponse>;
1806
+ sendAdaptiveCard(card: unknown, onError?: (context: TurnContext, error: Error) => Promise<void>): Promise<MessageResponse>;
1787
1807
  /**
1788
1808
  * Get channels from this bot installation.
1789
1809
  *