@microsoft/teamsfx 2.2.1-rc.1 → 2.2.2-alpha.d8776a676.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": "2.2.1-rc.1",
3
+ "version": "2.2.2-alpha.d8776a676.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.14.6",
52
- "@microsoft/adaptivecards-tools": "^1.3.1-rc.0",
52
+ "@microsoft/adaptivecards-tools": "1.3.2-alpha.d8776a676.0",
53
53
  "@microsoft/microsoft-graph-client": "^3.0.1",
54
54
  "axios": "^0.27.2",
55
55
  "botbuilder": ">=4.18.0 <5.0.0",
@@ -70,7 +70,7 @@
70
70
  "@istanbuljs/nyc-config-typescript": "^1.0.1",
71
71
  "@microsoft/api-documenter": "^7.14.1",
72
72
  "@microsoft/api-extractor": "^7.19.4",
73
- "@microsoft/eslint-plugin-teamsfx": "^0.0.2-rc.0",
73
+ "@microsoft/eslint-plugin-teamsfx": "0.0.3-alpha.d8776a676.0",
74
74
  "@microsoft/teams-js": "^2.7.1",
75
75
  "@rollup/plugin-json": "^4.1.0",
76
76
  "@types/chai": "^4.2.22",
@@ -130,7 +130,7 @@
130
130
  "webpack": "^5.62.1",
131
131
  "yargs": "^17.2.1"
132
132
  },
133
- "gitHead": "2c9ab5d8d5d3489d268b42e1c9712b0f714cf5d5",
133
+ "gitHead": "3d0f8370706f4d607a3a0f7ab88da3181e13aa88",
134
134
  "publishConfig": {
135
135
  "access": "public"
136
136
  },
@@ -1141,6 +1141,50 @@ export declare class BotSsoExecutionDialog extends ComponentDialog {
1141
1141
  };
1142
1142
  }
1143
1143
 
1144
+ /**
1145
+ * A store to persist notification target references.
1146
+ */
1147
+ export declare interface ConversationReferenceStore {
1148
+ /**
1149
+ * Add a conversation reference to the store. If overwrite, update existing one, otherwise add when not exist.
1150
+ *
1151
+ * @param key the key of the conversation reference.
1152
+ * @param reference the conversation reference to add.
1153
+ * @param options the options to add the conversation reference.
1154
+ *
1155
+ * @returns true if added or updated, false if not changed.
1156
+ */
1157
+ add(key: string, reference: Partial<ConversationReference>, options: ConversationReferenceStoreAddOptions): Promise<boolean>;
1158
+ /**
1159
+ * Remove a conversation reference from the store.
1160
+ *
1161
+ * @param key the key of the conversation reference.
1162
+ * @param reference the conversation reference to remove.
1163
+ *
1164
+ * @returns true if exist and removed, false if not changed.
1165
+ */
1166
+ remove(key: string, reference: Partial<ConversationReference>): Promise<boolean>;
1167
+ /**
1168
+ * List stored conversation reference by page.
1169
+ *
1170
+ * @param pageSize the page size.
1171
+ * @param continuationToken the continuation token to get next page.
1172
+ *
1173
+ * @returns a paged list of conversation references.
1174
+ */
1175
+ list(pageSize?: number, continuationToken?: string): Promise<PagedData<Partial<ConversationReference>>>;
1176
+ }
1177
+
1178
+ /**
1179
+ * Options to add a conversation reference to the store.
1180
+ */
1181
+ export declare interface ConversationReferenceStoreAddOptions {
1182
+ /**
1183
+ * Whether to overwrite the existing conversation reference.
1184
+ */
1185
+ overwrite?: boolean;
1186
+ }
1187
+
1144
1188
  /**
1145
1189
  * Initializes new Axios instance with specific auth provider
1146
1190
  *
@@ -1989,6 +2033,25 @@ export declare class BotSsoExecutionDialog extends ComponentDialog {
1989
2033
  * @param options - The initialize options
1990
2034
  */
1991
2035
  constructor(adapter: CloudAdapter, options?: NotificationOptions_3);
2036
+ /**
2037
+ * Create a {@link TeamsBotInstallation} instance with conversation reference.
2038
+ *
2039
+ * @param conversationReference - The bound `ConversationReference`.
2040
+ * @returns - The {@link TeamsBotInstallation} instance or null.
2041
+ */
2042
+ buildTeamsBotInstallation(conversationReference: Partial<ConversationReference>): TeamsBotInstallation_2 | null;
2043
+ /**
2044
+ * Gets a pagined list of targets where the bot is installed.
2045
+ *
2046
+ * @remarks
2047
+ * The result is retrieving from the persisted storage.
2048
+ *
2049
+ * @param pageSize - Suggested number of entries on a page.
2050
+ * @param continuationToken - A continuation token.
2051
+ *
2052
+ * @returns An array of {@link TeamsBotInstallation} with paged data and continuation token.
2053
+ */
2054
+ getPagedInstallations(pageSize?: number, continuationToken?: string): Promise<PagedData<TeamsBotInstallation_2>>;
1992
2055
  /**
1993
2056
  * Get all targets where the bot is installed.
1994
2057
  *
@@ -1996,6 +2059,8 @@ export declare class BotSsoExecutionDialog extends ComponentDialog {
1996
2059
  * The result is retrieving from the persisted storage.
1997
2060
  *
1998
2061
  * @returns An array of {@link TeamsBotInstallation}.
2062
+ *
2063
+ * @deprecated Use getPagedInstallations instead.
1999
2064
  */
2000
2065
  installations(): Promise<TeamsBotInstallation_2[]>;
2001
2066
  /**
@@ -2075,15 +2140,29 @@ export declare class BotSsoExecutionDialog extends ComponentDialog {
2075
2140
  */
2076
2141
  botAppId?: string;
2077
2142
  /**
2078
- * An optional storage to persist bot notification connections.
2143
+ * An optional store to persist bot notification target references.
2144
+ *
2145
+ * @remarks
2146
+ * If `store` is not provided, a default conversation reference store will be used,
2147
+ * which stores notification target references into:
2148
+ * - `.notification.localstore.json` if running locally
2149
+ * - `${process.env.TEMP}/.notification.localstore.json` if `process.env.RUNNING_ON_AZURE` is set to "1"
2150
+ *
2151
+ * It's recommended to use your own store for production environment.
2152
+ */
2153
+ store?: ConversationReferenceStore;
2154
+ /**
2155
+ * An optional storage to persist bot notification target references.
2079
2156
  *
2080
2157
  * @remarks
2081
2158
  * If `storage` is not provided, a default local file storage will be used,
2082
- * which stores notification connections into:
2159
+ * which stores notification target references into:
2083
2160
  * - `.notification.localstore.json` if running locally
2084
2161
  * - `${process.env.TEMP}/.notification.localstore.json` if `process.env.RUNNING_ON_AZURE` is set to "1"
2085
2162
  *
2086
2163
  * It's recommended to use your own shared storage for production environment.
2164
+ *
2165
+ * @deprecated Use `store` to customize the way to persist bot notification target references instead.
2087
2166
  */
2088
2167
  storage?: NotificationTargetStorage;
2089
2168
  }
@@ -2120,6 +2199,9 @@ export declare class BotSsoExecutionDialog extends ComponentDialog {
2120
2199
 
2121
2200
  /**
2122
2201
  * Interface for a storage provider that stores and retrieves notification target references.
2202
+ *
2203
+ * @deprecated Use ConversationReferenceStore to customize the way
2204
+ * to persist bot notification connections instead.
2123
2205
  */
2124
2206
  export declare interface NotificationTargetStorage {
2125
2207
  /**
@@ -2308,6 +2390,23 @@ export declare class BotSsoExecutionDialog extends ComponentDialog {
2308
2390
  private generateAuthServerError;
2309
2391
  }
2310
2392
 
2393
+ /**
2394
+ * Represents a page of data.
2395
+ */
2396
+ export declare interface PagedData<T> {
2397
+ /**
2398
+ * Page of data.
2399
+ */
2400
+ data: T[];
2401
+ /**
2402
+ * The Continuation Token to pass to get the next page of results.
2403
+ *
2404
+ * @remarks
2405
+ * Undefined or empty token means the page reaches the end.
2406
+ */
2407
+ continuationToken?: string;
2408
+ }
2409
+
2311
2410
  /**
2312
2411
  * The search scope when calling {@link NotificationBot.findMember} and {@link NotificationBot.findAllMembers}.
2313
2412
  * The search scope is a flagged enum and it can be combined with `|`.
@@ -2588,10 +2687,20 @@ export declare class BotSsoExecutionDialog extends ComponentDialog {
2588
2687
  * @returns An array of channels if bot is installed into a team, otherwise returns an empty array.
2589
2688
  */
2590
2689
  channels(): Promise<Channel_2[]>;
2690
+ /**
2691
+ * Gets a pagined list of members from this bot installation.
2692
+ *
2693
+ * @param pageSize - Suggested number of entries on a page.
2694
+ * @param continuationToken - A continuation token.
2695
+ * @returns An array of members from where the bot is installed.
2696
+ */
2697
+ getPagedMembers(pageSize?: number, continuationToken?: string): Promise<PagedData<Member_2>>;
2591
2698
  /**
2592
2699
  * Get members from this bot installation.
2593
2700
  *
2594
2701
  * @returns An array of members from where the bot is installed.
2702
+ *
2703
+ * @deprecated Use `getPagedMembers` instead.
2595
2704
  */
2596
2705
  members(): Promise<Member_2[]>;
2597
2706
  /**