@microsoft/teams.apps 2.0.0-preview.1 → 2.0.0-preview.10
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/README.md +1 -1
- package/dist/app.d.ts +59 -53
- package/dist/app.embed.d.ts +4 -3
- package/dist/app.embed.js +12 -2
- package/dist/app.events.d.ts +7 -7
- package/dist/app.events.js +1 -1
- package/dist/app.js +48 -16
- package/dist/app.oauth.d.ts +4 -2
- package/dist/app.oauth.js +1 -1
- package/dist/app.plugins.d.ts +3 -3
- package/dist/app.plugins.js +14 -2
- package/dist/app.process.d.ts +2 -2
- package/dist/app.process.js +28 -21
- package/dist/app.routing.d.ts +9 -5
- package/dist/app.routing.js +1 -1
- package/dist/contexts/activity-signin.d.ts +1 -1
- package/dist/contexts/activity.d.ts +14 -7
- package/dist/contexts/activity.js +5 -4
- package/dist/contexts/client.d.ts +10 -6
- package/dist/contexts/function.d.ts +15 -0
- package/dist/events/index.d.ts +1 -0
- package/dist/events/index.js +14 -1
- package/dist/middleware/auth/jwt-validator.d.ts +60 -0
- package/dist/middleware/auth/jwt-validator.js +213 -0
- package/dist/middleware/index.d.ts +3 -2
- package/dist/middleware/index.js +7 -5
- package/dist/middleware/jwt-validation-middleware.d.ts +11 -0
- package/dist/middleware/jwt-validation-middleware.js +46 -0
- package/dist/middleware/strip-mentions-text.d.ts +1 -1
- package/dist/middleware/strip-mentions-text.js +1 -1
- package/dist/middleware/with-remote-function-jwt-validation.d.ts +16 -0
- package/dist/middleware/with-remote-function-jwt-validation.js +47 -0
- package/dist/plugins/http/plugin.d.ts +10 -4
- package/dist/plugins/http/plugin.js +39 -21
- package/dist/plugins/http/stream.d.ts +5 -3
- package/dist/plugins/http/stream.js +59 -39
- package/dist/router.d.ts +9 -9
- package/dist/router.js +1 -1
- package/dist/routes/activity.d.ts +2 -2
- package/dist/routes/conversation-update.d.ts +2 -2
- package/dist/routes/event.d.ts +2 -2
- package/dist/routes/index.d.ts +7 -6
- package/dist/routes/index.js +4 -4
- package/dist/routes/install.d.ts +2 -2
- package/dist/routes/invoke/index.d.ts +2 -2
- package/dist/routes/message-delete.d.ts +2 -2
- package/dist/routes/message-update.d.ts +2 -2
- package/dist/types/app-events.d.ts +25 -0
- package/dist/types/app-events.js +3 -0
- package/dist/types/app-routing.d.ts +11 -0
- package/dist/types/app-routing.js +3 -0
- package/dist/types/index.d.ts +6 -4
- package/dist/types/index.js +7 -5
- package/dist/types/plugin/decorators/event.d.ts +1 -1
- package/dist/types/plugin/plugin.d.ts +11 -6
- package/dist/types/plugin/sender.d.ts +1 -1
- package/dist/types/plugin/sender.js +2 -1
- package/dist/types/route-handler.d.ts +1 -1
- package/dist/types/union-to-intersection.d.ts +1 -0
- package/dist/types/union-to-intersection.js +3 -0
- package/dist/utils/asserts.d.ts +1 -0
- package/dist/utils/asserts.js +12 -0
- package/dist/utils/function-context.d.ts +5 -0
- package/dist/utils/function-context.js +54 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +4 -2
- package/dist/utils/promises/retry.d.ts +8 -3
- package/dist/utils/promises/retry.js +14 -6
- package/package.json +5 -5
- package/dist/middleware/entra-token-validator.d.ts +0 -75
- package/dist/middleware/entra-token-validator.js +0 -169
- package/dist/middleware/with-client-auth.d.ts +0 -13
- package/dist/middleware/with-client-auth.js +0 -40
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<p>
|
|
4
4
|
<a href="https://www.npmjs.com/package/@microsoft/teams.apps" target="_blank">
|
|
5
|
-
<img src="https://img.shields.io/npm/v/@microsoft/teams.apps" />
|
|
5
|
+
<img src="https://img.shields.io/npm/v/@microsoft/teams.apps/preview" />
|
|
6
6
|
</a>
|
|
7
7
|
<a href="https://www.npmjs.com/package/@microsoft/teams.apps?activeTab=code" target="_blank">
|
|
8
8
|
<img src="https://img.shields.io/bundlephobia/min/@microsoft/teams.apps" />
|
package/dist/app.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActivityLike, ConversationReference, Credentials, IToken, StripMentionsTextOptions } from '@microsoft/teams.api';
|
|
1
|
+
import { ActivityLike, ChannelID, ConversationReference, Credentials, IToken, StripMentionsTextOptions } from '@microsoft/teams.api';
|
|
2
2
|
import { EventEmitter } from '@microsoft/teams.common/events';
|
|
3
3
|
import * as http from '@microsoft/teams.common/http';
|
|
4
4
|
import { ILogger } from '@microsoft/teams.common/logging';
|
|
@@ -11,17 +11,17 @@ import { getPlugin, inject, plugin } from './app.plugins';
|
|
|
11
11
|
import { $process } from './app.process';
|
|
12
12
|
import { message, on, use } from './app.routing';
|
|
13
13
|
import { Container } from './container';
|
|
14
|
-
import { IEvents } from './events';
|
|
15
14
|
import * as manifest from './manifest';
|
|
16
15
|
import * as middleware from './middleware';
|
|
17
16
|
import { OAuthSettings } from './oauth';
|
|
18
17
|
import { HttpPlugin } from './plugins';
|
|
19
18
|
import { Router } from './router';
|
|
20
|
-
import { IPlugin } from './types';
|
|
19
|
+
import { AppEvents, IPlugin } from './types';
|
|
20
|
+
import { PluginAdditionalContext } from './types/app-routing';
|
|
21
21
|
/**
|
|
22
22
|
* App initialization options
|
|
23
23
|
*/
|
|
24
|
-
export type AppOptions = Partial<Credentials> & {
|
|
24
|
+
export type AppOptions<TPlugin extends IPlugin> = Partial<Credentials> & {
|
|
25
25
|
/**
|
|
26
26
|
* http client or client options used to make api requests
|
|
27
27
|
*/
|
|
@@ -37,7 +37,7 @@ export type AppOptions = Partial<Credentials> & {
|
|
|
37
37
|
/**
|
|
38
38
|
* plugins to extend the apps functionality
|
|
39
39
|
*/
|
|
40
|
-
readonly plugins?: Array<
|
|
40
|
+
readonly plugins?: Array<TPlugin>;
|
|
41
41
|
/**
|
|
42
42
|
* OAuth Settings
|
|
43
43
|
*/
|
|
@@ -50,6 +50,10 @@ export type AppOptions = Partial<Credentials> & {
|
|
|
50
50
|
* Activity Options
|
|
51
51
|
*/
|
|
52
52
|
readonly activity?: AppActivityOptions;
|
|
53
|
+
/**
|
|
54
|
+
* Skip authentication for HTTP requests
|
|
55
|
+
*/
|
|
56
|
+
readonly skipAuth?: boolean;
|
|
53
57
|
};
|
|
54
58
|
export type AppActivityOptions = {
|
|
55
59
|
readonly mentions?: {
|
|
@@ -73,8 +77,8 @@ export type AppTokens = {
|
|
|
73
77
|
/**
|
|
74
78
|
* The orchestrator for receiving/sending activities
|
|
75
79
|
*/
|
|
76
|
-
export declare class App {
|
|
77
|
-
readonly options: AppOptions
|
|
80
|
+
export declare class App<TPlugin extends IPlugin = IPlugin> {
|
|
81
|
+
readonly options: AppOptions<TPlugin>;
|
|
78
82
|
readonly api: ApiClient;
|
|
79
83
|
readonly graph: GraphClient;
|
|
80
84
|
readonly log: ILogger;
|
|
@@ -82,7 +86,7 @@ export declare class App {
|
|
|
82
86
|
readonly client: http.Client;
|
|
83
87
|
readonly storage: IStorage;
|
|
84
88
|
readonly credentials?: Credentials;
|
|
85
|
-
readonly entraTokenValidator?: middleware.
|
|
89
|
+
readonly entraTokenValidator?: middleware.JwtValidator;
|
|
86
90
|
/**
|
|
87
91
|
* the apps id
|
|
88
92
|
*/
|
|
@@ -105,14 +109,14 @@ export declare class App {
|
|
|
105
109
|
get tokens(): AppTokens;
|
|
106
110
|
protected _tokens: AppTokens;
|
|
107
111
|
protected container: Container;
|
|
108
|
-
protected plugins: Array<
|
|
109
|
-
protected router: Router
|
|
112
|
+
protected plugins: Array<TPlugin>;
|
|
113
|
+
protected router: Router<PluginAdditionalContext<TPlugin>>;
|
|
110
114
|
protected tenantTokens: LocalStorage<string>;
|
|
111
|
-
protected events: EventEmitter<
|
|
115
|
+
protected events: EventEmitter<AppEvents<TPlugin>>;
|
|
112
116
|
protected startedAt?: Date;
|
|
113
117
|
protected port?: number;
|
|
114
118
|
private readonly _userAgent;
|
|
115
|
-
constructor(options?: AppOptions);
|
|
119
|
+
constructor(options?: AppOptions<TPlugin>);
|
|
116
120
|
/**
|
|
117
121
|
* start the app
|
|
118
122
|
* @param port port to listen on
|
|
@@ -149,7 +153,7 @@ export declare class App {
|
|
|
149
153
|
timestamp?: Date | undefined;
|
|
150
154
|
locale?: string | undefined;
|
|
151
155
|
localTimestamp?: Date | undefined;
|
|
152
|
-
channelId?:
|
|
156
|
+
channelId?: ChannelID | undefined;
|
|
153
157
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
154
158
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
155
159
|
relatesTo?: ConversationReference | undefined;
|
|
@@ -177,7 +181,7 @@ export declare class App {
|
|
|
177
181
|
timestamp?: Date | undefined;
|
|
178
182
|
locale?: string | undefined;
|
|
179
183
|
localTimestamp?: Date | undefined;
|
|
180
|
-
channelId?:
|
|
184
|
+
channelId?: ChannelID | undefined;
|
|
181
185
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
182
186
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
183
187
|
relatesTo?: ConversationReference | undefined;
|
|
@@ -199,7 +203,7 @@ export declare class App {
|
|
|
199
203
|
timestamp?: Date | undefined;
|
|
200
204
|
locale?: string | undefined;
|
|
201
205
|
localTimestamp?: Date | undefined;
|
|
202
|
-
channelId?:
|
|
206
|
+
channelId?: ChannelID | undefined;
|
|
203
207
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
204
208
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
205
209
|
relatesTo?: ConversationReference | undefined;
|
|
@@ -220,7 +224,7 @@ export declare class App {
|
|
|
220
224
|
timestamp?: Date | undefined;
|
|
221
225
|
locale?: string | undefined;
|
|
222
226
|
localTimestamp?: Date | undefined;
|
|
223
|
-
channelId?:
|
|
227
|
+
channelId?: ChannelID | undefined;
|
|
224
228
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
225
229
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
226
230
|
relatesTo?: ConversationReference | undefined;
|
|
@@ -241,7 +245,7 @@ export declare class App {
|
|
|
241
245
|
timestamp?: Date | undefined;
|
|
242
246
|
locale?: string | undefined;
|
|
243
247
|
localTimestamp?: Date | undefined;
|
|
244
|
-
channelId?:
|
|
248
|
+
channelId?: ChannelID | undefined;
|
|
245
249
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
246
250
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
247
251
|
relatesTo?: ConversationReference | undefined;
|
|
@@ -269,7 +273,7 @@ export declare class App {
|
|
|
269
273
|
timestamp?: Date | undefined;
|
|
270
274
|
locale?: string | undefined;
|
|
271
275
|
localTimestamp?: Date | undefined;
|
|
272
|
-
channelId?:
|
|
276
|
+
channelId?: ChannelID | undefined;
|
|
273
277
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
274
278
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
275
279
|
relatesTo?: ConversationReference | undefined;
|
|
@@ -297,7 +301,7 @@ export declare class App {
|
|
|
297
301
|
timestamp?: Date | undefined;
|
|
298
302
|
locale?: string | undefined;
|
|
299
303
|
localTimestamp?: Date | undefined;
|
|
300
|
-
channelId?:
|
|
304
|
+
channelId?: ChannelID | undefined;
|
|
301
305
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
302
306
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
303
307
|
relatesTo?: ConversationReference | undefined;
|
|
@@ -327,7 +331,7 @@ export declare class App {
|
|
|
327
331
|
timestamp?: Date | undefined;
|
|
328
332
|
locale?: string | undefined;
|
|
329
333
|
localTimestamp?: Date | undefined;
|
|
330
|
-
channelId?:
|
|
334
|
+
channelId?: ChannelID | undefined;
|
|
331
335
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
332
336
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
333
337
|
relatesTo?: ConversationReference | undefined;
|
|
@@ -357,7 +361,7 @@ export declare class App {
|
|
|
357
361
|
timestamp?: Date | undefined;
|
|
358
362
|
locale?: string | undefined;
|
|
359
363
|
localTimestamp?: Date | undefined;
|
|
360
|
-
channelId?:
|
|
364
|
+
channelId?: ChannelID | undefined;
|
|
361
365
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
362
366
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
363
367
|
relatesTo?: ConversationReference | undefined;
|
|
@@ -380,7 +384,7 @@ export declare class App {
|
|
|
380
384
|
timestamp?: Date | undefined;
|
|
381
385
|
locale?: string | undefined;
|
|
382
386
|
localTimestamp?: Date | undefined;
|
|
383
|
-
channelId?:
|
|
387
|
+
channelId?: ChannelID | undefined;
|
|
384
388
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
385
389
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
386
390
|
recipient?: import("@microsoft/teams.api").Account | undefined;
|
|
@@ -402,7 +406,7 @@ export declare class App {
|
|
|
402
406
|
timestamp?: Date | undefined;
|
|
403
407
|
locale?: string | undefined;
|
|
404
408
|
localTimestamp?: Date | undefined;
|
|
405
|
-
channelId?:
|
|
409
|
+
channelId?: ChannelID | undefined;
|
|
406
410
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
407
411
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
408
412
|
recipient?: import("@microsoft/teams.api").Account | undefined;
|
|
@@ -424,7 +428,7 @@ export declare class App {
|
|
|
424
428
|
timestamp?: Date | undefined;
|
|
425
429
|
locale?: string | undefined;
|
|
426
430
|
localTimestamp?: Date | undefined;
|
|
427
|
-
channelId?:
|
|
431
|
+
channelId?: ChannelID | undefined;
|
|
428
432
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
429
433
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
430
434
|
recipient?: import("@microsoft/teams.api").Account | undefined;
|
|
@@ -446,7 +450,7 @@ export declare class App {
|
|
|
446
450
|
timestamp?: Date | undefined;
|
|
447
451
|
locale?: string | undefined;
|
|
448
452
|
localTimestamp?: Date | undefined;
|
|
449
|
-
channelId?:
|
|
453
|
+
channelId?: ChannelID | undefined;
|
|
450
454
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
451
455
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
452
456
|
recipient?: import("@microsoft/teams.api").Account | undefined;
|
|
@@ -468,7 +472,7 @@ export declare class App {
|
|
|
468
472
|
timestamp?: Date | undefined;
|
|
469
473
|
locale?: string | undefined;
|
|
470
474
|
localTimestamp?: Date | undefined;
|
|
471
|
-
channelId?:
|
|
475
|
+
channelId?: ChannelID | undefined;
|
|
472
476
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
473
477
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
474
478
|
recipient?: import("@microsoft/teams.api").Account | undefined;
|
|
@@ -490,7 +494,7 @@ export declare class App {
|
|
|
490
494
|
timestamp?: Date | undefined;
|
|
491
495
|
locale?: string | undefined;
|
|
492
496
|
localTimestamp?: Date | undefined;
|
|
493
|
-
channelId?:
|
|
497
|
+
channelId?: ChannelID | undefined;
|
|
494
498
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
495
499
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
496
500
|
recipient?: import("@microsoft/teams.api").Account | undefined;
|
|
@@ -512,7 +516,7 @@ export declare class App {
|
|
|
512
516
|
timestamp?: Date | undefined;
|
|
513
517
|
locale?: string | undefined;
|
|
514
518
|
localTimestamp?: Date | undefined;
|
|
515
|
-
channelId?:
|
|
519
|
+
channelId?: ChannelID | undefined;
|
|
516
520
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
517
521
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
518
522
|
recipient?: import("@microsoft/teams.api").Account | undefined;
|
|
@@ -534,7 +538,7 @@ export declare class App {
|
|
|
534
538
|
timestamp?: Date | undefined;
|
|
535
539
|
locale?: string | undefined;
|
|
536
540
|
localTimestamp?: Date | undefined;
|
|
537
|
-
channelId?:
|
|
541
|
+
channelId?: ChannelID | undefined;
|
|
538
542
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
539
543
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
540
544
|
recipient?: import("@microsoft/teams.api").Account | undefined;
|
|
@@ -556,7 +560,7 @@ export declare class App {
|
|
|
556
560
|
timestamp?: Date | undefined;
|
|
557
561
|
locale?: string | undefined;
|
|
558
562
|
localTimestamp?: Date | undefined;
|
|
559
|
-
channelId?:
|
|
563
|
+
channelId?: ChannelID | undefined;
|
|
560
564
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
561
565
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
562
566
|
recipient?: import("@microsoft/teams.api").Account | undefined;
|
|
@@ -578,7 +582,7 @@ export declare class App {
|
|
|
578
582
|
timestamp?: Date | undefined;
|
|
579
583
|
locale?: string | undefined;
|
|
580
584
|
localTimestamp?: Date | undefined;
|
|
581
|
-
channelId?:
|
|
585
|
+
channelId?: ChannelID | undefined;
|
|
582
586
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
583
587
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
584
588
|
recipient?: import("@microsoft/teams.api").Account | undefined;
|
|
@@ -600,7 +604,7 @@ export declare class App {
|
|
|
600
604
|
timestamp?: Date | undefined;
|
|
601
605
|
locale?: string | undefined;
|
|
602
606
|
localTimestamp?: Date | undefined;
|
|
603
|
-
channelId?:
|
|
607
|
+
channelId?: ChannelID | undefined;
|
|
604
608
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
605
609
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
606
610
|
recipient?: import("@microsoft/teams.api").Account | undefined;
|
|
@@ -622,7 +626,7 @@ export declare class App {
|
|
|
622
626
|
timestamp?: Date | undefined;
|
|
623
627
|
locale?: string | undefined;
|
|
624
628
|
localTimestamp?: Date | undefined;
|
|
625
|
-
channelId?:
|
|
629
|
+
channelId?: ChannelID | undefined;
|
|
626
630
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
627
631
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
628
632
|
recipient?: import("@microsoft/teams.api").Account | undefined;
|
|
@@ -644,7 +648,7 @@ export declare class App {
|
|
|
644
648
|
timestamp?: Date | undefined;
|
|
645
649
|
locale?: string | undefined;
|
|
646
650
|
localTimestamp?: Date | undefined;
|
|
647
|
-
channelId?:
|
|
651
|
+
channelId?: ChannelID | undefined;
|
|
648
652
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
649
653
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
650
654
|
recipient?: import("@microsoft/teams.api").Account | undefined;
|
|
@@ -666,7 +670,7 @@ export declare class App {
|
|
|
666
670
|
timestamp?: Date | undefined;
|
|
667
671
|
locale?: string | undefined;
|
|
668
672
|
localTimestamp?: Date | undefined;
|
|
669
|
-
channelId?:
|
|
673
|
+
channelId?: ChannelID | undefined;
|
|
670
674
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
671
675
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
672
676
|
recipient?: import("@microsoft/teams.api").Account | undefined;
|
|
@@ -688,7 +692,7 @@ export declare class App {
|
|
|
688
692
|
timestamp?: Date | undefined;
|
|
689
693
|
locale?: string | undefined;
|
|
690
694
|
localTimestamp?: Date | undefined;
|
|
691
|
-
channelId?:
|
|
695
|
+
channelId?: ChannelID | undefined;
|
|
692
696
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
693
697
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
694
698
|
recipient?: import("@microsoft/teams.api").Account | undefined;
|
|
@@ -710,7 +714,7 @@ export declare class App {
|
|
|
710
714
|
timestamp?: Date | undefined;
|
|
711
715
|
locale?: string | undefined;
|
|
712
716
|
localTimestamp?: Date | undefined;
|
|
713
|
-
channelId?:
|
|
717
|
+
channelId?: ChannelID | undefined;
|
|
714
718
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
715
719
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
716
720
|
recipient?: import("@microsoft/teams.api").Account | undefined;
|
|
@@ -732,7 +736,7 @@ export declare class App {
|
|
|
732
736
|
timestamp?: Date | undefined;
|
|
733
737
|
locale?: string | undefined;
|
|
734
738
|
localTimestamp?: Date | undefined;
|
|
735
|
-
channelId?:
|
|
739
|
+
channelId?: ChannelID | undefined;
|
|
736
740
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
737
741
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
738
742
|
recipient?: import("@microsoft/teams.api").Account | undefined;
|
|
@@ -760,7 +764,7 @@ export declare class App {
|
|
|
760
764
|
timestamp?: Date | undefined;
|
|
761
765
|
locale?: string | undefined;
|
|
762
766
|
localTimestamp?: Date | undefined;
|
|
763
|
-
channelId?:
|
|
767
|
+
channelId?: ChannelID | undefined;
|
|
764
768
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
765
769
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
766
770
|
recipient?: import("@microsoft/teams.api").Account | undefined;
|
|
@@ -784,7 +788,7 @@ export declare class App {
|
|
|
784
788
|
timestamp?: Date | undefined;
|
|
785
789
|
locale?: string | undefined;
|
|
786
790
|
localTimestamp?: Date | undefined;
|
|
787
|
-
channelId?:
|
|
791
|
+
channelId?: ChannelID | undefined;
|
|
788
792
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
789
793
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
790
794
|
recipient?: import("@microsoft/teams.api").Account | undefined;
|
|
@@ -805,7 +809,7 @@ export declare class App {
|
|
|
805
809
|
timestamp?: Date | undefined;
|
|
806
810
|
locale?: string | undefined;
|
|
807
811
|
localTimestamp?: Date | undefined;
|
|
808
|
-
channelId?:
|
|
812
|
+
channelId?: ChannelID | undefined;
|
|
809
813
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
810
814
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
811
815
|
relatesTo?: ConversationReference | undefined;
|
|
@@ -827,7 +831,7 @@ export declare class App {
|
|
|
827
831
|
timestamp?: Date | undefined;
|
|
828
832
|
locale?: string | undefined;
|
|
829
833
|
localTimestamp?: Date | undefined;
|
|
830
|
-
channelId?:
|
|
834
|
+
channelId?: ChannelID | undefined;
|
|
831
835
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
832
836
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
833
837
|
relatesTo?: ConversationReference | undefined;
|
|
@@ -849,7 +853,7 @@ export declare class App {
|
|
|
849
853
|
timestamp?: Date | undefined;
|
|
850
854
|
locale?: string | undefined;
|
|
851
855
|
localTimestamp?: Date | undefined;
|
|
852
|
-
channelId?:
|
|
856
|
+
channelId?: ChannelID | undefined;
|
|
853
857
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
854
858
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
855
859
|
relatesTo?: ConversationReference | undefined;
|
|
@@ -874,7 +878,7 @@ export declare class App {
|
|
|
874
878
|
timestamp?: Date | undefined;
|
|
875
879
|
locale?: string | undefined;
|
|
876
880
|
localTimestamp?: Date | undefined;
|
|
877
|
-
channelId?:
|
|
881
|
+
channelId?: ChannelID | undefined;
|
|
878
882
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
879
883
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
880
884
|
recipient?: import("@microsoft/teams.api").Account | undefined;
|
|
@@ -894,7 +898,7 @@ export declare class App {
|
|
|
894
898
|
timestamp?: Date | undefined;
|
|
895
899
|
locale?: string | undefined;
|
|
896
900
|
localTimestamp?: Date | undefined;
|
|
897
|
-
channelId?:
|
|
901
|
+
channelId?: ChannelID | undefined;
|
|
898
902
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
899
903
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
900
904
|
relatesTo?: ConversationReference | undefined;
|
|
@@ -914,7 +918,7 @@ export declare class App {
|
|
|
914
918
|
timestamp?: Date | undefined;
|
|
915
919
|
locale?: string | undefined;
|
|
916
920
|
localTimestamp?: Date | undefined;
|
|
917
|
-
channelId?:
|
|
921
|
+
channelId?: ChannelID | undefined;
|
|
918
922
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
919
923
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
920
924
|
relatesTo?: ConversationReference | undefined;
|
|
@@ -935,13 +939,13 @@ export declare class App {
|
|
|
935
939
|
topicName?: string | undefined;
|
|
936
940
|
historyDisclosed?: boolean | undefined;
|
|
937
941
|
channelData?: (import("@microsoft/teams.api").ChannelData & {
|
|
938
|
-
eventType: "channelCreated" | "channelDeleted" | "channelRenamed" | "channelRestored" | "teamArchived" | "teamDeleted" | "teamHardDeleted" | "teamRenamed" | "teamRestored" | "teamUnarchived";
|
|
942
|
+
eventType: "channelCreated" | "channelDeleted" | "channelRenamed" | "channelRestored" | "channelShared" | "channelUnshared" | "channelMemberAdded" | "channelMemberRemoved" | "teamArchived" | "teamDeleted" | "teamHardDeleted" | "teamRenamed" | "teamRestored" | "teamUnarchived";
|
|
939
943
|
}) | undefined;
|
|
940
944
|
serviceUrl?: string | undefined;
|
|
941
945
|
timestamp?: Date | undefined;
|
|
942
946
|
locale?: string | undefined;
|
|
943
947
|
localTimestamp?: Date | undefined;
|
|
944
|
-
channelId?:
|
|
948
|
+
channelId?: ChannelID | undefined;
|
|
945
949
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
946
950
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
947
951
|
relatesTo?: ConversationReference | undefined;
|
|
@@ -962,7 +966,7 @@ export declare class App {
|
|
|
962
966
|
timestamp?: Date | undefined;
|
|
963
967
|
locale?: string | undefined;
|
|
964
968
|
localTimestamp?: Date | undefined;
|
|
965
|
-
channelId?:
|
|
969
|
+
channelId?: ChannelID | undefined;
|
|
966
970
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
967
971
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
968
972
|
relatesTo?: ConversationReference | undefined;
|
|
@@ -984,7 +988,7 @@ export declare class App {
|
|
|
984
988
|
timestamp?: Date | undefined;
|
|
985
989
|
locale?: string | undefined;
|
|
986
990
|
localTimestamp?: Date | undefined;
|
|
987
|
-
channelId?:
|
|
991
|
+
channelId?: ChannelID | undefined;
|
|
988
992
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
989
993
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
990
994
|
relatesTo?: ConversationReference | undefined;
|
|
@@ -1006,7 +1010,7 @@ export declare class App {
|
|
|
1006
1010
|
timestamp?: Date | undefined;
|
|
1007
1011
|
locale?: string | undefined;
|
|
1008
1012
|
localTimestamp?: Date | undefined;
|
|
1009
|
-
channelId?:
|
|
1013
|
+
channelId?: ChannelID | undefined;
|
|
1010
1014
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
1011
1015
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
1012
1016
|
relatesTo?: ConversationReference | undefined;
|
|
@@ -1027,7 +1031,7 @@ export declare class App {
|
|
|
1027
1031
|
timestamp?: Date | undefined;
|
|
1028
1032
|
locale?: string | undefined;
|
|
1029
1033
|
localTimestamp?: Date | undefined;
|
|
1030
|
-
channelId?:
|
|
1034
|
+
channelId?: ChannelID | undefined;
|
|
1031
1035
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
1032
1036
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
1033
1037
|
relatesTo?: ConversationReference | undefined;
|
|
@@ -1048,7 +1052,7 @@ export declare class App {
|
|
|
1048
1052
|
timestamp?: Date | undefined;
|
|
1049
1053
|
locale?: string | undefined;
|
|
1050
1054
|
localTimestamp?: Date | undefined;
|
|
1051
|
-
channelId?:
|
|
1055
|
+
channelId?: ChannelID | undefined;
|
|
1052
1056
|
from?: import("@microsoft/teams.api").Account | undefined;
|
|
1053
1057
|
conversation?: import("@microsoft/teams.api").ConversationAccount | undefined;
|
|
1054
1058
|
relatesTo?: ConversationReference | undefined;
|
|
@@ -1134,4 +1138,6 @@ export declare class App {
|
|
|
1134
1138
|
protected refreshTokens(force?: boolean): Promise<[void, void]>;
|
|
1135
1139
|
protected refreshBotToken(force?: boolean): Promise<void>;
|
|
1136
1140
|
protected refreshGraphToken(force?: boolean): Promise<void>;
|
|
1141
|
+
protected getUserToken(channelId: ChannelID, userId: string): Promise<string>;
|
|
1142
|
+
protected getOrRefreshTenantToken(tenantId: string): Promise<string | undefined>;
|
|
1137
1143
|
}
|
package/dist/app.embed.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { App } from './app';
|
|
2
2
|
import { IFunctionContext } from './contexts';
|
|
3
3
|
import * as manifest from './manifest';
|
|
4
|
+
import { IPlugin } from './types';
|
|
4
5
|
/**
|
|
5
6
|
* add/update a function that can be called remotely
|
|
6
7
|
* @param name The unique function name
|
|
7
8
|
* @param cb The callback to handle the function
|
|
8
9
|
*/
|
|
9
|
-
export declare function func<TData>(this: App
|
|
10
|
+
export declare function func<TPlugin extends IPlugin, TData>(this: App<TPlugin>, name: string, cb: (context: IFunctionContext<TData>) => any | Promise<any>): App<TPlugin>;
|
|
10
11
|
/**
|
|
11
12
|
* add/update a static tab.
|
|
12
13
|
* the tab will be hosted at
|
|
@@ -15,10 +16,10 @@ export declare function func<TData>(this: App, name: string, cb: (context: IFunc
|
|
|
15
16
|
* @param name A unique identifier for the entity which the tab displays.
|
|
16
17
|
* @param path The path to the web `dist` folder.
|
|
17
18
|
*/
|
|
18
|
-
export declare function tab(this: App
|
|
19
|
+
export declare function tab<TPlugin extends IPlugin>(this: App<TPlugin>, name: string, path: string, options?: Partial<Omit<manifest.StaticTab, 'contentUrl' | 'entityId'>>): App<TPlugin>;
|
|
19
20
|
/**
|
|
20
21
|
* add a configurable tab
|
|
21
22
|
* @remark scopes defaults to `team`
|
|
22
23
|
* @param url The url to use when configuring the tab.
|
|
23
24
|
*/
|
|
24
|
-
export declare function configTab(this: App
|
|
25
|
+
export declare function configTab<TPlugin extends IPlugin>(this: App<TPlugin>, url: string, options?: Partial<Omit<manifest.ConfigurableTab, 'configurationUrl'>>): App<TPlugin>;
|
package/dist/app.embed.js
CHANGED
|
@@ -8,6 +8,7 @@ exports.tab = tab;
|
|
|
8
8
|
exports.configTab = configTab;
|
|
9
9
|
const path_1 = __importDefault(require("path"));
|
|
10
10
|
const middleware_1 = require("./middleware");
|
|
11
|
+
const utils_1 = require("./utils");
|
|
11
12
|
/**
|
|
12
13
|
* add/update a function that can be called remotely
|
|
13
14
|
* @param name The unique function name
|
|
@@ -15,7 +16,7 @@ const middleware_1 = require("./middleware");
|
|
|
15
16
|
*/
|
|
16
17
|
function func(name, cb) {
|
|
17
18
|
const log = this.log.child('functions').child(name);
|
|
18
|
-
this.http.post(`/api/functions/${name}`, (0, middleware_1.
|
|
19
|
+
this.http.post(`/api/functions/${name}`, (0, middleware_1.withRemoteFunctionJwtValidation)({
|
|
19
20
|
logger: log,
|
|
20
21
|
entraTokenValidator: this.entraTokenValidator,
|
|
21
22
|
...this.credentials,
|
|
@@ -23,12 +24,21 @@ function func(name, cb) {
|
|
|
23
24
|
if (!req.context) {
|
|
24
25
|
throw new Error('expected client context');
|
|
25
26
|
}
|
|
27
|
+
const getCurrentConversationId = utils_1.functionContext.getConversationIdResolver(this, log.child('getCurrentConversationId'), req.context);
|
|
28
|
+
const send = async (activity) => {
|
|
29
|
+
const conversationId = await getCurrentConversationId();
|
|
30
|
+
return !conversationId
|
|
31
|
+
? null
|
|
32
|
+
: await this.send(conversationId, activity);
|
|
33
|
+
};
|
|
26
34
|
const data = await cb({
|
|
27
35
|
...req.context,
|
|
28
36
|
log,
|
|
29
37
|
api: this.api,
|
|
30
38
|
appGraph: this.graph,
|
|
31
39
|
data: req.body,
|
|
40
|
+
getCurrentConversationId,
|
|
41
|
+
send,
|
|
32
42
|
});
|
|
33
43
|
res.send(data);
|
|
34
44
|
});
|
|
@@ -81,4 +91,4 @@ function configTab(url, options) {
|
|
|
81
91
|
});
|
|
82
92
|
return this;
|
|
83
93
|
}
|
|
84
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
94
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLmVtYmVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2FwcC5lbWJlZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQWdCQSxvQkErQ0M7QUFVRCxrQkE4QkM7QUFPRCw4QkFnQkM7QUE5SEQsZ0RBQXlCO0FBT3pCLDZDQUF5RjtBQUV6RixtQ0FBMEM7QUFFMUM7Ozs7R0FJRztBQUNILFNBQWdCLElBQUksQ0FFbEIsSUFBWSxFQUNaLEVBQTREO0lBRTVELE1BQU0sR0FBRyxHQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDLFdBQVcsQ0FBQyxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUNwRCxJQUFJLENBQUMsSUFBSSxDQUFDLElBQUksQ0FDWixrQkFBa0IsSUFBSSxFQUFFLEVBQ3hCLElBQUEsNENBQStCLEVBQUM7UUFDOUIsTUFBTSxFQUFFLEdBQUc7UUFDWCxtQkFBbUIsRUFBRSxJQUFJLENBQUMsbUJBQW1CO1FBQzdDLEdBQUcsSUFBSSxDQUFDLFdBQVc7S0FDcEIsQ0FBQyxFQUNGLEtBQUssRUFBRSxHQUE2QixFQUFFLEdBQUcsRUFBRSxFQUFFO1FBQzNDLElBQUksQ0FBQyxHQUFHLENBQUMsT0FBTyxFQUFFLENBQUM7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DQUFDO0FBQ2QsQ0FBQztBQUVEOzs7O0dBSUc7QUFDSCxTQUFnQixTQUFTLENBRXZCLEdBQVcsRUFDWCxPQUFxRTtJQUVyRSxJQUFJLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxnQkFBZ0IsRUFBRSxDQUFDO1FBQ3JDLElBQUksQ0FBQyxTQUFTLENBQUMsZ0JBQWdCLEdBQUcsRUFBRSxDQUFDO0lBQ3ZDLENBQUM7SUFFRCxJQUFJLENBQUMsU0FBUyxDQUFDLGdCQUFnQixDQUFDLElBQUksQ0FBQztRQUNuQyxnQkFBZ0IsRUFBRSxHQUFHO1FBQ3JCLE1BQU0sRUFBRSxDQUFDLE1BQU0sQ0FBQztRQUNoQixHQUFHLE9BQU87S0FDWCxDQUFDLENBQUM7SUFFSCxPQUFPLElBQUksQ0FBQztBQUNkLENBQUMifQ==
|
package/dist/app.events.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { EventHandler } from '@microsoft/teams.common';
|
|
2
2
|
import { App } from './app';
|
|
3
|
-
import { IActivityEvent, IActivityResponseEvent, IActivitySentEvent, IErrorEvent
|
|
4
|
-
import { ISender } from './types';
|
|
3
|
+
import { IActivityEvent, IActivityResponseEvent, IActivitySentEvent, IErrorEvent } from './events';
|
|
4
|
+
import { AppEvents, IPlugin, ISender } from './types';
|
|
5
5
|
/**
|
|
6
6
|
* subscribe to an event
|
|
7
7
|
* @param name the event to subscribe to
|
|
8
8
|
* @param cb the callback to invoke
|
|
9
9
|
*/
|
|
10
|
-
export declare function event<Name extends keyof
|
|
11
|
-
export declare function onError(this: App
|
|
12
|
-
export declare function onActivity(this: App
|
|
13
|
-
export declare function onActivitySent(this: App
|
|
14
|
-
export declare function onActivityResponse(this: App
|
|
10
|
+
export declare function event<TPlugin extends IPlugin, Name extends keyof AppEvents<TPlugin>>(this: App<TPlugin>, name: Name, cb: EventHandler<AppEvents<TPlugin>[Name]>): App<TPlugin>;
|
|
11
|
+
export declare function onError<TPlugin extends IPlugin>(this: App<TPlugin>, event: IErrorEvent): Promise<void>;
|
|
12
|
+
export declare function onActivity<TPlugin extends IPlugin>(this: App<TPlugin>, sender: ISender, event: IActivityEvent): Promise<void>;
|
|
13
|
+
export declare function onActivitySent<TPlugin extends IPlugin>(this: App<TPlugin>, sender: ISender, event: IActivitySentEvent): Promise<void>;
|
|
14
|
+
export declare function onActivityResponse<TPlugin extends IPlugin>(this: App<TPlugin>, sender: ISender, event: IActivityResponseEvent): Promise<void>;
|
package/dist/app.events.js
CHANGED
|
@@ -48,4 +48,4 @@ async function onActivityResponse(sender, event) {
|
|
|
48
48
|
}
|
|
49
49
|
this.events.emit('activity.response', { ...event, sender });
|
|
50
50
|
}
|
|
51
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
51
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLmV2ZW50cy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9hcHAuZXZlbnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBZ0JBLHNCQU1DO0FBRUQsMEJBV0M7QUFFRCxnQ0FPQztBQUVELHdDQWVDO0FBRUQsZ0RBZUM7QUFuRUQ7Ozs7R0FJRztBQUNILFNBQWdCLEtBQUssQ0FHQyxJQUFVLEVBQUUsRUFBMEM7SUFDMUUsSUFBSSxDQUFDLE1BQU0sQ0FBQyxFQUFFLENBQUMsSUFBSSxFQUFFLEVBQUUsQ0FBQyxDQUFDO0lBQ3pCLE9BQU8sSUFBSSxDQUFDO0FBQ2QsQ0FBQztBQUVNLEtBQUssVUFBVSxPQUFPLENBRTNCLEtBQWtCO0lBRWxCLEtBQUssTUFBTSxNQUFNLElBQUksSUFBSSxDQUFDLE9BQU8sRUFBRSxDQUFDO1FBQ2xDLElBQUksTUFBTSxDQUFDLE9BQU8sRUFBRSxDQUFDO1lBQ25CLE1BQU0sT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