@frogbotai/piece-microsoft-teams 0.25.0 → 0.26.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/README.md +4 -0
- package/dist/adapter.d.ts +20 -0
- package/dist/adapter.d.ts.map +1 -0
- package/dist/adapter.js +72 -0
- package/dist/adapter.js.map +1 -0
- package/dist/client.d.ts +2 -2
- package/dist/index.d.ts +117 -32
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/options.d.ts +2 -2
- package/dist/questions/card.d.ts +51 -0
- package/dist/questions/card.d.ts.map +1 -0
- package/dist/questions/card.js +198 -0
- package/dist/questions/card.js.map +1 -0
- package/dist/questions/index.d.ts +4 -0
- package/dist/questions/index.d.ts.map +1 -0
- package/dist/questions/index.js +14 -0
- package/dist/questions/index.js.map +1 -0
- package/dist/questions/notify.d.ts +7 -0
- package/dist/questions/notify.d.ts.map +1 -0
- package/dist/questions/notify.js +25 -0
- package/dist/questions/notify.js.map +1 -0
- package/dist/questions/parse.d.ts +4 -0
- package/dist/questions/parse.d.ts.map +1 -0
- package/dist/questions/parse.js +62 -0
- package/dist/questions/parse.js.map +1 -0
- package/dist/questions/rejected.d.ts +4 -0
- package/dist/questions/rejected.d.ts.map +1 -0
- package/dist/questions/rejected.js +21 -0
- package/dist/questions/rejected.js.map +1 -0
- package/dist/questions/render.d.ts +4 -0
- package/dist/questions/render.d.ts.map +1 -0
- package/dist/questions/render.js +24 -0
- package/dist/questions/render.js.map +1 -0
- package/dist/questions/settled.d.ts +4 -0
- package/dist/questions/settled.d.ts.map +1 -0
- package/dist/questions/settled.js +15 -0
- package/dist/questions/settled.js.map +1 -0
- package/dist/questions/teamsThread.d.ts +27 -0
- package/dist/questions/teamsThread.d.ts.map +1 -0
- package/dist/questions/teamsThread.js +37 -0
- package/dist/questions/teamsThread.js.map +1 -0
- package/dist/webhook.d.ts +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -40,6 +40,10 @@ Bot Framework Activities are authenticated by the official Teams adapter. FrogBo
|
|
|
40
40
|
|
|
41
41
|
The separate Graph OAuth app registration uses the scopes below for user actions. It may be the same Entra application only when its bot credential, redirect URI, delegated permissions, and operational ownership are intentionally managed together; the two credentials remain separate in FrogBot configuration.
|
|
42
42
|
|
|
43
|
+
## Agent questions
|
|
44
|
+
|
|
45
|
+
When an agent with the `question` tool runs in Teams, each question call appears as one Adaptive Card with the choices, an optional text box, and **Submit** and **Dismiss** buttons. The card is replaced in place with the answer and who gave it, and the agent continues in the same conversation. The person who submits is matched to a FrogBot user by the email from the conversation's member list and must pass the agent's `access` check; others get a private notice. No Microsoft Graph permission is required. See the Microsoft Teams page in the FrogBot docs for the manifest, limits, and troubleshooting.
|
|
46
|
+
|
|
43
47
|
## Actions
|
|
44
48
|
|
|
45
49
|
| Upstream action slug | Previous wrapper export | Native action | Notes |
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TeamsAdapter } from '@chat-adapter/teams';
|
|
2
|
+
import { type AdaptiveCard } from './questions/card.js';
|
|
3
|
+
type MessageContext = Parameters<TeamsAdapter['handleMessageActivity']>[0];
|
|
4
|
+
export declare class FrogBotTeamsAdapter extends TeamsAdapter {
|
|
5
|
+
sendAdaptiveCard({ card, threadId, }: {
|
|
6
|
+
card: AdaptiveCard;
|
|
7
|
+
threadId: string;
|
|
8
|
+
}): Promise<string>;
|
|
9
|
+
updateAdaptiveCard({ card, messageId, threadId, }: {
|
|
10
|
+
card: AdaptiveCard;
|
|
11
|
+
messageId: string;
|
|
12
|
+
threadId: string;
|
|
13
|
+
}): Promise<void>;
|
|
14
|
+
logQuestionWarning(message: string, context: Record<string, unknown>): void;
|
|
15
|
+
protected handleMessageActivity(ctx: MessageContext): Promise<void>;
|
|
16
|
+
private responder;
|
|
17
|
+
private rosterProfile;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,KAAK,YAAY,EAAwC,MAAM,qBAAqB,CAAC;AAE9F,KAAK,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAS3E,qBAAa,mBAAoB,SAAQ,YAAY;IAC7C,gBAAgB,CAAC,EACrB,IAAI,EACJ,QAAQ,GACT,EAAE;QACD,IAAI,EAAE,YAAY,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;KAClB,GAAG,OAAO,CAAC,MAAM,CAAC;IAUb,kBAAkB,CAAC,EACvB,IAAI,EACJ,SAAS,EACT,QAAQ,GACT,EAAE;QACD,IAAI,EAAE,YAAY,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;KAClB,GAAG,OAAO,CAAC,IAAI,CAAC;IAQjB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;cAIlD,qBAAqB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;YAiBpE,SAAS;YAgBT,aAAa;CAoB5B"}
|
package/dist/adapter.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { TeamsAdapter } from '@chat-adapter/teams';
|
|
2
|
+
import { cardActivity, QUESTION_ACTION_PREFIX } from './questions/card.js';
|
|
3
|
+
export class FrogBotTeamsAdapter extends TeamsAdapter {
|
|
4
|
+
async sendAdaptiveCard({ card, threadId, }) {
|
|
5
|
+
const { conversationId } = this.decodeThreadId(threadId);
|
|
6
|
+
const sent = await this.app.send(conversationId, cardActivity(card));
|
|
7
|
+
if (!sent.id)
|
|
8
|
+
throw new Error('Microsoft Teams did not return an id for the question card.');
|
|
9
|
+
return sent.id;
|
|
10
|
+
}
|
|
11
|
+
async updateAdaptiveCard({ card, messageId, threadId, }) {
|
|
12
|
+
const { conversationId } = this.decodeThreadId(threadId);
|
|
13
|
+
await this.app.api.conversations
|
|
14
|
+
.activities(conversationId)
|
|
15
|
+
.update(messageId, cardActivity(card));
|
|
16
|
+
}
|
|
17
|
+
logQuestionWarning(message, context) {
|
|
18
|
+
this.logger.warn(message, context);
|
|
19
|
+
}
|
|
20
|
+
async handleMessageActivity(ctx) {
|
|
21
|
+
const action = questionAction(ctx.activity.value);
|
|
22
|
+
if (!action || !this.chat)
|
|
23
|
+
return super.handleMessageActivity(ctx);
|
|
24
|
+
const activity = ctx.activity;
|
|
25
|
+
const threadId = this.parseMessage(activity).threadId;
|
|
26
|
+
const user = await this.responder(ctx);
|
|
27
|
+
const messageId = activity.replyToId || activity.id;
|
|
28
|
+
this.chat.processAction({ ...action, user, messageId, threadId, adapter: this, raw: activity }, this.bridgeAdapter.getWebhookOptions(activity.id));
|
|
29
|
+
}
|
|
30
|
+
async responder(ctx) {
|
|
31
|
+
const { from } = ctx.activity;
|
|
32
|
+
const profile = (await this.rosterProfile(ctx)) ?? (await this.getUser(from.id));
|
|
33
|
+
const name = from.name || profile?.fullName || from.id;
|
|
34
|
+
return {
|
|
35
|
+
userId: from.id,
|
|
36
|
+
userName: name,
|
|
37
|
+
fullName: name,
|
|
38
|
+
...(profile?.email ? { email: profile.email } : {}),
|
|
39
|
+
isBot: false,
|
|
40
|
+
isMe: false,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
async rosterProfile(ctx) {
|
|
44
|
+
const { conversation, from } = ctx.activity;
|
|
45
|
+
try {
|
|
46
|
+
const member = await ctx.api.conversations.getMemberById(conversation.id, from.id);
|
|
47
|
+
const email = member.email ?? member.userPrincipalName;
|
|
48
|
+
return {
|
|
49
|
+
...(email ? { email } : {}),
|
|
50
|
+
...(member.name ? { fullName: member.name } : {}),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
this.logger.warn('Teams roster lookup for a question responder failed', {
|
|
55
|
+
userId: from.id,
|
|
56
|
+
error,
|
|
57
|
+
});
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function questionAction(value) {
|
|
63
|
+
if (!value || typeof value !== 'object')
|
|
64
|
+
return null;
|
|
65
|
+
const { actionId, value: toolCallId } = value;
|
|
66
|
+
if (typeof actionId !== 'string' || !actionId.startsWith(QUESTION_ACTION_PREFIX))
|
|
67
|
+
return null;
|
|
68
|
+
if (typeof toolCallId !== 'string' || !toolCallId)
|
|
69
|
+
return null;
|
|
70
|
+
return { actionId, value: toolCallId };
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAqB,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAW9F,MAAM,OAAO,mBAAoB,SAAQ,YAAY;IACnD,KAAK,CAAC,gBAAgB,CAAC,EACrB,IAAI,EACJ,QAAQ,GAIT;QACC,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;QAEzD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;QAErE,IAAI,CAAC,IAAI,CAAC,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;QAE7F,OAAO,IAAI,CAAC,EAAE,CAAC;IACjB,CAAC;IAED,KAAK,CAAC,kBAAkB,CAA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AAM,CAAC,IAAI,CAAC,qDAAqD,EAAE;gBACtE,MAAM,EAAE,IAAI,CAAC,EAAE;gBACf,KAAK;aACN,CAAC,CAAC;YAEH,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;CACF;AAED,SAAS,cAAc,CAAC,KAAc;IACpC,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAErD,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,KAAgC,CAAC;IAEzE,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,sBAAsB,CAAC;QAAE,OAAO,IAAI,CAAC;IAE9F,IAAI,OAAO,UAAU,KAAK,QAAQ,IAAI,CAAC,UAAU;QAAE,OAAO,IAAI,CAAC;IAE/D,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;AACzC,CAAC"}
|
package/dist/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { FrogBotRequest } from 'frogbot';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { type GraphPage } from './schemas.js';
|
|
4
4
|
type RequestOptions = {
|
|
@@ -23,6 +23,6 @@ export declare function createMicrosoftTeamsClient({ auth }: {
|
|
|
23
23
|
body: unknown;
|
|
24
24
|
}>;
|
|
25
25
|
};
|
|
26
|
-
export declare function signal(req:
|
|
26
|
+
export declare function signal(req: FrogBotRequest): AbortSignal | undefined;
|
|
27
27
|
export {};
|
|
28
28
|
//# sourceMappingURL=client.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { FrogBotTeamsAdapter } from './adapter.js';
|
|
2
3
|
import { createMicrosoftTeamsClient } from './client.js';
|
|
3
4
|
import { microsoftTeamsEnvironment, microsoftTeamsScopes } from './config.js';
|
|
4
5
|
export declare const microsoftTeamsActions: string[];
|
|
@@ -86,7 +87,7 @@ export declare function defineMicrosoftTeams(environment?: z.input<typeof micros
|
|
|
86
87
|
body: unknown;
|
|
87
88
|
}>;
|
|
88
89
|
};
|
|
89
|
-
req: import("frogbot").
|
|
90
|
+
req: import("frogbot").FrogBotRequest;
|
|
90
91
|
}): Promise<{
|
|
91
92
|
id: string;
|
|
92
93
|
label: string;
|
|
@@ -95,7 +96,7 @@ export declare function defineMicrosoftTeams(environment?: z.input<typeof micros
|
|
|
95
96
|
};
|
|
96
97
|
readonly webhook: {
|
|
97
98
|
parse({ req }: {
|
|
98
|
-
req: import("frogbot").
|
|
99
|
+
req: import("frogbot").FrogBotRequest;
|
|
99
100
|
}): {
|
|
100
101
|
event: string;
|
|
101
102
|
};
|
|
@@ -115,7 +116,7 @@ export declare function defineMicrosoftTeams(environment?: z.input<typeof micros
|
|
|
115
116
|
botTenantId?: string | undefined;
|
|
116
117
|
botApiUrl?: string | undefined;
|
|
117
118
|
};
|
|
118
|
-
}):
|
|
119
|
+
}): FrogBotTeamsAdapter;
|
|
119
120
|
identity({ author, req }: {
|
|
120
121
|
author: import("chat").Author;
|
|
121
122
|
client: {
|
|
@@ -160,11 +161,53 @@ export declare function defineMicrosoftTeams(environment?: z.input<typeof micros
|
|
|
160
161
|
body: unknown;
|
|
161
162
|
}>;
|
|
162
163
|
};
|
|
163
|
-
req: import("frogbot").
|
|
164
|
+
req: import("frogbot").FrogBotRequest;
|
|
164
165
|
}): Promise<{
|
|
165
166
|
collection: string;
|
|
166
167
|
id: string | number;
|
|
167
168
|
} | null>;
|
|
169
|
+
questions: import("frogbot/pieces").PieceChannelQuestions<{
|
|
170
|
+
baseUrl: string;
|
|
171
|
+
request: <T>(path: string, schema: z.ZodType<T>, options?: {
|
|
172
|
+
method?: string;
|
|
173
|
+
body?: unknown;
|
|
174
|
+
headers?: Record<string, string>;
|
|
175
|
+
query?: Record<string, string | number>;
|
|
176
|
+
signal?: AbortSignal;
|
|
177
|
+
}) => Promise<T>;
|
|
178
|
+
text(path: string, options?: {
|
|
179
|
+
method?: string;
|
|
180
|
+
body?: unknown;
|
|
181
|
+
headers?: Record<string, string>;
|
|
182
|
+
query?: Record<string, string | number>;
|
|
183
|
+
signal?: AbortSignal;
|
|
184
|
+
}): Promise<string>;
|
|
185
|
+
list: <T>(path: string, schema: z.ZodType<T>, options?: {
|
|
186
|
+
method?: string;
|
|
187
|
+
body?: unknown;
|
|
188
|
+
headers?: Record<string, string>;
|
|
189
|
+
query?: Record<string, string | number>;
|
|
190
|
+
signal?: AbortSignal;
|
|
191
|
+
}) => Promise<T[]>;
|
|
192
|
+
page: <T>(path: string, schema: z.ZodType<T>, options?: {
|
|
193
|
+
method?: string;
|
|
194
|
+
body?: unknown;
|
|
195
|
+
headers?: Record<string, string>;
|
|
196
|
+
query?: Record<string, string | number>;
|
|
197
|
+
signal?: AbortSignal;
|
|
198
|
+
}) => Promise<import("./schemas.js").GraphPage<T>>;
|
|
199
|
+
meetingId: (type: string, value: string, abortSignal?: AbortSignal) => Promise<string>;
|
|
200
|
+
custom(path: string, schema: z.ZodType, options?: {
|
|
201
|
+
method?: string;
|
|
202
|
+
body?: unknown;
|
|
203
|
+
headers?: Record<string, string>;
|
|
204
|
+
query?: Record<string, string | number>;
|
|
205
|
+
signal?: AbortSignal;
|
|
206
|
+
}): Promise<{
|
|
207
|
+
status: number;
|
|
208
|
+
body: unknown;
|
|
209
|
+
}>;
|
|
210
|
+
}>;
|
|
168
211
|
};
|
|
169
212
|
readonly actions: ({
|
|
170
213
|
slug: string;
|
|
@@ -235,7 +278,7 @@ export declare function defineMicrosoftTeams(environment?: z.input<typeof micros
|
|
|
235
278
|
}>;
|
|
236
279
|
};
|
|
237
280
|
options: object;
|
|
238
|
-
req: import("frogbot").
|
|
281
|
+
req: import("frogbot").FrogBotRequest;
|
|
239
282
|
}): Promise<{
|
|
240
283
|
[x: string]: unknown;
|
|
241
284
|
id: string;
|
|
@@ -322,7 +365,7 @@ export declare function defineMicrosoftTeams(environment?: z.input<typeof micros
|
|
|
322
365
|
}>;
|
|
323
366
|
};
|
|
324
367
|
options: object;
|
|
325
|
-
req: import("frogbot").
|
|
368
|
+
req: import("frogbot").FrogBotRequest;
|
|
326
369
|
}): Promise<{
|
|
327
370
|
[x: string]: unknown;
|
|
328
371
|
id: string;
|
|
@@ -409,7 +452,7 @@ export declare function defineMicrosoftTeams(environment?: z.input<typeof micros
|
|
|
409
452
|
}>;
|
|
410
453
|
};
|
|
411
454
|
options: object;
|
|
412
|
-
req: import("frogbot").
|
|
455
|
+
req: import("frogbot").FrogBotRequest;
|
|
413
456
|
}): Promise<{
|
|
414
457
|
[x: string]: unknown;
|
|
415
458
|
id: string;
|
|
@@ -519,7 +562,7 @@ export declare function defineMicrosoftTeams(environment?: z.input<typeof micros
|
|
|
519
562
|
}>;
|
|
520
563
|
};
|
|
521
564
|
options: object;
|
|
522
|
-
req: import("frogbot").
|
|
565
|
+
req: import("frogbot").FrogBotRequest;
|
|
523
566
|
}): Promise<{
|
|
524
567
|
chat: {
|
|
525
568
|
[x: string]: unknown;
|
|
@@ -618,7 +661,7 @@ export declare function defineMicrosoftTeams(environment?: z.input<typeof micros
|
|
|
618
661
|
}>;
|
|
619
662
|
};
|
|
620
663
|
options: object;
|
|
621
|
-
req: import("frogbot").
|
|
664
|
+
req: import("frogbot").FrogBotRequest;
|
|
622
665
|
}): Promise<{
|
|
623
666
|
[x: string]: unknown;
|
|
624
667
|
id: string;
|
|
@@ -695,7 +738,7 @@ export declare function defineMicrosoftTeams(environment?: z.input<typeof micros
|
|
|
695
738
|
}>;
|
|
696
739
|
};
|
|
697
740
|
options: object;
|
|
698
|
-
req: import("frogbot").
|
|
741
|
+
req: import("frogbot").FrogBotRequest;
|
|
699
742
|
}): Promise<{
|
|
700
743
|
success: boolean;
|
|
701
744
|
messageId: string;
|
|
@@ -775,7 +818,7 @@ export declare function defineMicrosoftTeams(environment?: z.input<typeof micros
|
|
|
775
818
|
}>;
|
|
776
819
|
};
|
|
777
820
|
options: object;
|
|
778
|
-
req: import("frogbot").
|
|
821
|
+
req: import("frogbot").FrogBotRequest;
|
|
779
822
|
}): Promise<{
|
|
780
823
|
[x: string]: unknown;
|
|
781
824
|
id: string;
|
|
@@ -858,7 +901,7 @@ export declare function defineMicrosoftTeams(environment?: z.input<typeof micros
|
|
|
858
901
|
}>;
|
|
859
902
|
};
|
|
860
903
|
options: object;
|
|
861
|
-
req: import("frogbot").
|
|
904
|
+
req: import("frogbot").FrogBotRequest;
|
|
862
905
|
}): Promise<{
|
|
863
906
|
found: boolean;
|
|
864
907
|
result: {
|
|
@@ -944,7 +987,7 @@ export declare function defineMicrosoftTeams(environment?: z.input<typeof micros
|
|
|
944
987
|
}>;
|
|
945
988
|
};
|
|
946
989
|
options: object;
|
|
947
|
-
req: import("frogbot").
|
|
990
|
+
req: import("frogbot").FrogBotRequest;
|
|
948
991
|
}): Promise<{
|
|
949
992
|
found: boolean;
|
|
950
993
|
result: {
|
|
@@ -1028,7 +1071,7 @@ export declare function defineMicrosoftTeams(environment?: z.input<typeof micros
|
|
|
1028
1071
|
}>;
|
|
1029
1072
|
};
|
|
1030
1073
|
options: object;
|
|
1031
|
-
req: import("frogbot").
|
|
1074
|
+
req: import("frogbot").FrogBotRequest;
|
|
1032
1075
|
}): Promise<import("./schemas.js").GraphPage<{
|
|
1033
1076
|
[x: string]: unknown;
|
|
1034
1077
|
id: string;
|
|
@@ -1110,7 +1153,7 @@ export declare function defineMicrosoftTeams(environment?: z.input<typeof micros
|
|
|
1110
1153
|
}>;
|
|
1111
1154
|
};
|
|
1112
1155
|
options: object;
|
|
1113
|
-
req: import("frogbot").
|
|
1156
|
+
req: import("frogbot").FrogBotRequest;
|
|
1114
1157
|
}): Promise<{
|
|
1115
1158
|
[x: string]: unknown;
|
|
1116
1159
|
id: string;
|
|
@@ -1190,7 +1233,7 @@ export declare function defineMicrosoftTeams(environment?: z.input<typeof micros
|
|
|
1190
1233
|
}>;
|
|
1191
1234
|
};
|
|
1192
1235
|
options: object;
|
|
1193
|
-
req: import("frogbot").
|
|
1236
|
+
req: import("frogbot").FrogBotRequest;
|
|
1194
1237
|
}): Promise<{
|
|
1195
1238
|
status: number;
|
|
1196
1239
|
body: unknown;
|
|
@@ -1656,7 +1699,7 @@ export declare const createMicrosoftTeams: import("frogbot").PieceFactory<{
|
|
|
1656
1699
|
body: unknown;
|
|
1657
1700
|
}>;
|
|
1658
1701
|
};
|
|
1659
|
-
req: import("frogbot").
|
|
1702
|
+
req: import("frogbot").FrogBotRequest;
|
|
1660
1703
|
}): Promise<{
|
|
1661
1704
|
id: string;
|
|
1662
1705
|
label: string;
|
|
@@ -1665,7 +1708,7 @@ export declare const createMicrosoftTeams: import("frogbot").PieceFactory<{
|
|
|
1665
1708
|
};
|
|
1666
1709
|
readonly webhook: {
|
|
1667
1710
|
parse({ req }: {
|
|
1668
|
-
req: import("frogbot").
|
|
1711
|
+
req: import("frogbot").FrogBotRequest;
|
|
1669
1712
|
}): {
|
|
1670
1713
|
event: string;
|
|
1671
1714
|
};
|
|
@@ -1685,7 +1728,7 @@ export declare const createMicrosoftTeams: import("frogbot").PieceFactory<{
|
|
|
1685
1728
|
botTenantId?: string | undefined;
|
|
1686
1729
|
botApiUrl?: string | undefined;
|
|
1687
1730
|
};
|
|
1688
|
-
}):
|
|
1731
|
+
}): FrogBotTeamsAdapter;
|
|
1689
1732
|
identity({ author, req }: {
|
|
1690
1733
|
author: import("chat").Author;
|
|
1691
1734
|
client: {
|
|
@@ -1730,11 +1773,53 @@ export declare const createMicrosoftTeams: import("frogbot").PieceFactory<{
|
|
|
1730
1773
|
body: unknown;
|
|
1731
1774
|
}>;
|
|
1732
1775
|
};
|
|
1733
|
-
req: import("frogbot").
|
|
1776
|
+
req: import("frogbot").FrogBotRequest;
|
|
1734
1777
|
}): Promise<{
|
|
1735
1778
|
collection: string;
|
|
1736
1779
|
id: string | number;
|
|
1737
1780
|
} | null>;
|
|
1781
|
+
questions: import("frogbot/pieces").PieceChannelQuestions<{
|
|
1782
|
+
baseUrl: string;
|
|
1783
|
+
request: <T>(path: string, schema: z.ZodType<T>, options?: {
|
|
1784
|
+
method?: string;
|
|
1785
|
+
body?: unknown;
|
|
1786
|
+
headers?: Record<string, string>;
|
|
1787
|
+
query?: Record<string, string | number>;
|
|
1788
|
+
signal?: AbortSignal;
|
|
1789
|
+
}) => Promise<T>;
|
|
1790
|
+
text(path: string, options?: {
|
|
1791
|
+
method?: string;
|
|
1792
|
+
body?: unknown;
|
|
1793
|
+
headers?: Record<string, string>;
|
|
1794
|
+
query?: Record<string, string | number>;
|
|
1795
|
+
signal?: AbortSignal;
|
|
1796
|
+
}): Promise<string>;
|
|
1797
|
+
list: <T>(path: string, schema: z.ZodType<T>, options?: {
|
|
1798
|
+
method?: string;
|
|
1799
|
+
body?: unknown;
|
|
1800
|
+
headers?: Record<string, string>;
|
|
1801
|
+
query?: Record<string, string | number>;
|
|
1802
|
+
signal?: AbortSignal;
|
|
1803
|
+
}) => Promise<T[]>;
|
|
1804
|
+
page: <T>(path: string, schema: z.ZodType<T>, options?: {
|
|
1805
|
+
method?: string;
|
|
1806
|
+
body?: unknown;
|
|
1807
|
+
headers?: Record<string, string>;
|
|
1808
|
+
query?: Record<string, string | number>;
|
|
1809
|
+
signal?: AbortSignal;
|
|
1810
|
+
}) => Promise<import("./schemas.js").GraphPage<T>>;
|
|
1811
|
+
meetingId: (type: string, value: string, abortSignal?: AbortSignal) => Promise<string>;
|
|
1812
|
+
custom(path: string, schema: z.ZodType, options?: {
|
|
1813
|
+
method?: string;
|
|
1814
|
+
body?: unknown;
|
|
1815
|
+
headers?: Record<string, string>;
|
|
1816
|
+
query?: Record<string, string | number>;
|
|
1817
|
+
signal?: AbortSignal;
|
|
1818
|
+
}): Promise<{
|
|
1819
|
+
status: number;
|
|
1820
|
+
body: unknown;
|
|
1821
|
+
}>;
|
|
1822
|
+
}>;
|
|
1738
1823
|
};
|
|
1739
1824
|
readonly actions: ({
|
|
1740
1825
|
slug: string;
|
|
@@ -1805,7 +1890,7 @@ export declare const createMicrosoftTeams: import("frogbot").PieceFactory<{
|
|
|
1805
1890
|
}>;
|
|
1806
1891
|
};
|
|
1807
1892
|
options: object;
|
|
1808
|
-
req: import("frogbot").
|
|
1893
|
+
req: import("frogbot").FrogBotRequest;
|
|
1809
1894
|
}): Promise<{
|
|
1810
1895
|
[x: string]: unknown;
|
|
1811
1896
|
id: string;
|
|
@@ -1892,7 +1977,7 @@ export declare const createMicrosoftTeams: import("frogbot").PieceFactory<{
|
|
|
1892
1977
|
}>;
|
|
1893
1978
|
};
|
|
1894
1979
|
options: object;
|
|
1895
|
-
req: import("frogbot").
|
|
1980
|
+
req: import("frogbot").FrogBotRequest;
|
|
1896
1981
|
}): Promise<{
|
|
1897
1982
|
[x: string]: unknown;
|
|
1898
1983
|
id: string;
|
|
@@ -1979,7 +2064,7 @@ export declare const createMicrosoftTeams: import("frogbot").PieceFactory<{
|
|
|
1979
2064
|
}>;
|
|
1980
2065
|
};
|
|
1981
2066
|
options: object;
|
|
1982
|
-
req: import("frogbot").
|
|
2067
|
+
req: import("frogbot").FrogBotRequest;
|
|
1983
2068
|
}): Promise<{
|
|
1984
2069
|
[x: string]: unknown;
|
|
1985
2070
|
id: string;
|
|
@@ -2089,7 +2174,7 @@ export declare const createMicrosoftTeams: import("frogbot").PieceFactory<{
|
|
|
2089
2174
|
}>;
|
|
2090
2175
|
};
|
|
2091
2176
|
options: object;
|
|
2092
|
-
req: import("frogbot").
|
|
2177
|
+
req: import("frogbot").FrogBotRequest;
|
|
2093
2178
|
}): Promise<{
|
|
2094
2179
|
chat: {
|
|
2095
2180
|
[x: string]: unknown;
|
|
@@ -2188,7 +2273,7 @@ export declare const createMicrosoftTeams: import("frogbot").PieceFactory<{
|
|
|
2188
2273
|
}>;
|
|
2189
2274
|
};
|
|
2190
2275
|
options: object;
|
|
2191
|
-
req: import("frogbot").
|
|
2276
|
+
req: import("frogbot").FrogBotRequest;
|
|
2192
2277
|
}): Promise<{
|
|
2193
2278
|
[x: string]: unknown;
|
|
2194
2279
|
id: string;
|
|
@@ -2265,7 +2350,7 @@ export declare const createMicrosoftTeams: import("frogbot").PieceFactory<{
|
|
|
2265
2350
|
}>;
|
|
2266
2351
|
};
|
|
2267
2352
|
options: object;
|
|
2268
|
-
req: import("frogbot").
|
|
2353
|
+
req: import("frogbot").FrogBotRequest;
|
|
2269
2354
|
}): Promise<{
|
|
2270
2355
|
success: boolean;
|
|
2271
2356
|
messageId: string;
|
|
@@ -2345,7 +2430,7 @@ export declare const createMicrosoftTeams: import("frogbot").PieceFactory<{
|
|
|
2345
2430
|
}>;
|
|
2346
2431
|
};
|
|
2347
2432
|
options: object;
|
|
2348
|
-
req: import("frogbot").
|
|
2433
|
+
req: import("frogbot").FrogBotRequest;
|
|
2349
2434
|
}): Promise<{
|
|
2350
2435
|
[x: string]: unknown;
|
|
2351
2436
|
id: string;
|
|
@@ -2428,7 +2513,7 @@ export declare const createMicrosoftTeams: import("frogbot").PieceFactory<{
|
|
|
2428
2513
|
}>;
|
|
2429
2514
|
};
|
|
2430
2515
|
options: object;
|
|
2431
|
-
req: import("frogbot").
|
|
2516
|
+
req: import("frogbot").FrogBotRequest;
|
|
2432
2517
|
}): Promise<{
|
|
2433
2518
|
found: boolean;
|
|
2434
2519
|
result: {
|
|
@@ -2514,7 +2599,7 @@ export declare const createMicrosoftTeams: import("frogbot").PieceFactory<{
|
|
|
2514
2599
|
}>;
|
|
2515
2600
|
};
|
|
2516
2601
|
options: object;
|
|
2517
|
-
req: import("frogbot").
|
|
2602
|
+
req: import("frogbot").FrogBotRequest;
|
|
2518
2603
|
}): Promise<{
|
|
2519
2604
|
found: boolean;
|
|
2520
2605
|
result: {
|
|
@@ -2598,7 +2683,7 @@ export declare const createMicrosoftTeams: import("frogbot").PieceFactory<{
|
|
|
2598
2683
|
}>;
|
|
2599
2684
|
};
|
|
2600
2685
|
options: object;
|
|
2601
|
-
req: import("frogbot").
|
|
2686
|
+
req: import("frogbot").FrogBotRequest;
|
|
2602
2687
|
}): Promise<import("./schemas.js").GraphPage<{
|
|
2603
2688
|
[x: string]: unknown;
|
|
2604
2689
|
id: string;
|
|
@@ -2680,7 +2765,7 @@ export declare const createMicrosoftTeams: import("frogbot").PieceFactory<{
|
|
|
2680
2765
|
}>;
|
|
2681
2766
|
};
|
|
2682
2767
|
options: object;
|
|
2683
|
-
req: import("frogbot").
|
|
2768
|
+
req: import("frogbot").FrogBotRequest;
|
|
2684
2769
|
}): Promise<{
|
|
2685
2770
|
[x: string]: unknown;
|
|
2686
2771
|
id: string;
|
|
@@ -2760,7 +2845,7 @@ export declare const createMicrosoftTeams: import("frogbot").PieceFactory<{
|
|
|
2760
2845
|
}>;
|
|
2761
2846
|
};
|
|
2762
2847
|
options: object;
|
|
2763
|
-
req: import("frogbot").
|
|
2848
|
+
req: import("frogbot").FrogBotRequest;
|
|
2764
2849
|
}): Promise<{
|
|
2765
2850
|
status: number;
|
|
2766
2851
|
body: unknown;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAGL,yBAAyB,EAEzB,oBAAoB,EACrB,MAAM,aAAa,CAAC;AAMrB,eAAO,MAAM,qBAAqB,UAejC,CAAC;AACF,eAAO,MAAM,sBAAsB,UAYlC,CAAC;AACF,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAEhC,wBAAgB,oBAAoB,CAAC,WAAW,CAAC,EAAE,CAAC,C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G,OACpE;;;;;;;;yCA8BU,EAAG,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+CAlDL,EAAI,OAAM;;;;;;;;;;;;;;4CAMxB,EAAA,OACD;;;;;;;4CAYiE,EAAG,OACpE;;;;;;;;yCA8BU,EAAG,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6CAlDD,OAAM;;;;;;;;;;;;;;0CAMxB,OACD;;;;;;;0CAYoE,OACpE;;;;;;;;uCA8Ba,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+CAlDL,EAAI,OAAM;;;;;;;;;;;;;;4CAMxB,EAAA,OACD;;;;;;;4CAYiE,EAAG,OACpE;;;;;;;;yCA8BU,EAAG,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyBmC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { createTeamsAdapter } from '@chat-adapter/teams';
|
|
2
1
|
import { definePiece } from 'frogbot/pieces';
|
|
3
2
|
import { z } from 'zod';
|
|
4
3
|
import { microsoftTeamsActionDefinitions } from './actions.js';
|
|
4
|
+
import { FrogBotTeamsAdapter } from './adapter.js';
|
|
5
5
|
import { createMicrosoftTeamsClient } from './client.js';
|
|
6
6
|
import { microsoftTeamsAuth, microsoftTeamsClouds, microsoftTeamsEnvironment, microsoftTeamsOptions, microsoftTeamsScopes, } from './config.js';
|
|
7
|
+
import { teamsQuestions } from './questions/index.js';
|
|
7
8
|
import { user } from './schemas.js';
|
|
8
9
|
import { microsoftTeamsTriggerDefinitions } from './triggers.js';
|
|
9
10
|
import { microsoftTeamsWebhook } from './webhook.js';
|
|
@@ -71,7 +72,7 @@ export function defineMicrosoftTeams(environment) {
|
|
|
71
72
|
if (options.botAppType === 'SingleTenant' && !options.botTenantId) {
|
|
72
73
|
throw new Error('Single-tenant Microsoft Teams bots require a botTenantId option.');
|
|
73
74
|
}
|
|
74
|
-
return
|
|
75
|
+
return new FrogBotTeamsAdapter({
|
|
75
76
|
appId: auth.appId,
|
|
76
77
|
appPassword: auth.appPassword,
|
|
77
78
|
appType: options.botAppType,
|
|
@@ -96,6 +97,7 @@ export function defineMicrosoftTeams(environment) {
|
|
|
96
97
|
const match = result.docs[0];
|
|
97
98
|
return match ? { ...match, collection: payloadConfig.admin.user } : null;
|
|
98
99
|
},
|
|
100
|
+
questions: teamsQuestions,
|
|
99
101
|
};
|
|
100
102
|
return definePiece({
|
|
101
103
|
slug: 'microsoft-teams',
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAA4C,MAAM,gBAAgB,CAAC;AACvF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,+BAA+B,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,gCAAgC,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAErD,MAAM,CAAC,MAAM,qBAA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EAAE,qBAAqB;QAC9B,OAAO;QACP,OAAO,EAAE,+BAA+B;QACxC,QAAQ,EAAE,gCAAgC;KAC3C,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,oBAAoB,EAAE,CAAC"}
|
package/dist/options.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { FrogBotRequest } from 'frogbot';
|
|
2
2
|
import type { MicrosoftTeamsClient } from './client.js';
|
|
3
3
|
type Args = {
|
|
4
4
|
client: MicrosoftTeamsClient;
|
|
5
5
|
input: Record<string, unknown>;
|
|
6
|
-
req:
|
|
6
|
+
req: FrogBotRequest;
|
|
7
7
|
};
|
|
8
8
|
export declare function teams({ client, req }: Args): Promise<{
|
|
9
9
|
label: string;
|