@particle-academy/microsoft-teams-js 0.0.0 → 0.2.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/dist/index.cjs ADDED
@@ -0,0 +1,219 @@
1
+ 'use strict';
2
+
3
+ var fancyConnectorCore = require('@particle-academy/fancy-connector-core');
4
+
5
+ // src/faker.ts
6
+ function fakeMeetingCreate({ config, fake }) {
7
+ return {
8
+ "id": fake.id("MSo"),
9
+ "creationDateTime": "2026-09-16T09:00:00.0000000Z",
10
+ "subject": config.subject !== void 0 && config.subject !== null && config.subject !== "" ? String(config.subject) : "Weekly sync",
11
+ "startDateTime": config.startDateTime !== void 0 && config.startDateTime !== null && config.startDateTime !== "" ? String(config.startDateTime) : "2026-09-22T14:00:00Z",
12
+ "endDateTime": config.endDateTime !== void 0 && config.endDateTime !== null && config.endDateTime !== "" ? String(config.endDateTime) : "2026-09-22T14:30:00Z",
13
+ "joinWebUrl": "https://teams.microsoft.com/l/meetup-join/19%3ameeting_abc123%40thread.v2/0",
14
+ "participants": {
15
+ "organizer": {
16
+ "identity": {
17
+ "user": {
18
+ "id": fake.id("u"),
19
+ "displayName": "Ada Lovelace"
20
+ }
21
+ }
22
+ }
23
+ },
24
+ "joinMeetingIdSettings": {
25
+ "joinMeetingId": Array.from({ length: 9 }, () => fake.int(0, 9)).join(""),
26
+ "isPasscodeRequired": config.passcodeRequired !== void 0 && config.passcodeRequired !== null && config.passcodeRequired !== "" ? Boolean(config.passcodeRequired) : false,
27
+ "passcode": Array.from({ length: 6 }, () => fake.int(0, 9)).join("")
28
+ }
29
+ };
30
+ }
31
+ function fakeMeetingGet({ config, fake }) {
32
+ return {
33
+ "id": config.meetingId !== void 0 && config.meetingId !== null && config.meetingId !== "" ? String(config.meetingId) : fake.id("MSo"),
34
+ "subject": "Weekly sync",
35
+ "startDateTime": "2026-09-22T14:00:00Z",
36
+ "endDateTime": "2026-09-22T14:30:00Z",
37
+ "joinWebUrl": "https://teams.microsoft.com/l/meetup-join/19%3ameeting_abc123%40thread.v2/0",
38
+ "participants": {
39
+ "organizer": {
40
+ "identity": {
41
+ "user": {
42
+ "id": config.userId !== void 0 && config.userId !== null && config.userId !== "" ? String(config.userId) : fake.id("u"),
43
+ "displayName": "Ada Lovelace"
44
+ }
45
+ }
46
+ }
47
+ }
48
+ };
49
+ }
50
+ function fakeTranscriptList({ config, fake }) {
51
+ return {
52
+ "value": [
53
+ {
54
+ "id": fake.id("transcript"),
55
+ "meetingId": config.meetingId !== void 0 && config.meetingId !== null && config.meetingId !== "" ? String(config.meetingId) : fake.id("MSo"),
56
+ "callId": `${fake.hex(8)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(12)}`,
57
+ "createdDateTime": "2026-09-16T09:30:05.0000000Z",
58
+ "endDateTime": "2026-09-16T09:30:10.0000000Z",
59
+ "contentCorrelationId": `${fake.hex(8)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(12)}`,
60
+ "transcriptContentUrl": "https://graph.microsoft.com/v1.0/users/u/onlineMeetings/m/transcripts/t/content",
61
+ "meetingOrganizer": {
62
+ "user": {
63
+ "id": fake.id("u"),
64
+ "displayName": "Ada Lovelace"
65
+ }
66
+ }
67
+ }
68
+ ]
69
+ };
70
+ }
71
+ var microsoftTeamsFaker = (operation, request) => {
72
+ switch (operation) {
73
+ case "meeting_create":
74
+ return fakeMeetingCreate(request);
75
+ case "meeting_get":
76
+ return fakeMeetingGet(request);
77
+ case "transcript_list":
78
+ return fakeTranscriptList(request);
79
+ default:
80
+ throw new Error(
81
+ `microsoft_teams: no fake response is defined for "${operation}". Add a fixture under provider/fixtures/ and regenerate \u2014 a connector without a faker cannot be developed against, tested, or demonstrated.`
82
+ );
83
+ }
84
+ };
85
+
86
+ // src/service.ts
87
+ var CONNECTOR_API_VERSION = 1;
88
+ var MICROSOFT_TEAMS_BASE_URLS = {
89
+ "live": "https://graph.microsoft.com",
90
+ "sandbox": "https://graph.microsoft.com"
91
+ };
92
+ var MICROSOFT_TEAMS_REQUIRES = [
93
+ "accessToken"
94
+ ];
95
+ function microsoftTeamsAuthorize(credentials, request, _mode) {
96
+ request.headers.Authorization = `Bearer ${credentials.accessToken ?? ""}`;
97
+ }
98
+ var MICROSOFT_TEAMS = {
99
+ service: "microsoft_teams",
100
+ title: "Microsoft Teams",
101
+ sandbox: "separate-account",
102
+ baseUrls: { ...MICROSOFT_TEAMS_BASE_URLS },
103
+ requires: [...MICROSOFT_TEAMS_REQUIRES],
104
+ authorize: microsoftTeamsAuthorize,
105
+ faker: microsoftTeamsFaker
106
+ };
107
+ var MEETING_CREATE_OPERATION = "meeting_create";
108
+ async function microsoftTeamsMeetingCreate(options) {
109
+ const config = options.config ?? {};
110
+ if (config.userId === void 0 || config.userId === null || config.userId === "") {
111
+ throw new Error(`meeting_create: "userId" is required (User ID).`);
112
+ }
113
+ if (config.startDateTime === void 0 || config.startDateTime === null || config.startDateTime === "") {
114
+ throw new Error(`meeting_create: "startDateTime" is required (Start).`);
115
+ }
116
+ if (config.endDateTime === void 0 || config.endDateTime === null || config.endDateTime === "") {
117
+ throw new Error(`meeting_create: "endDateTime" is required (End).`);
118
+ }
119
+ return fancyConnectorCore.callConnector(MICROSOFT_TEAMS, {
120
+ operation: MEETING_CREATE_OPERATION,
121
+ config,
122
+ input: options.input,
123
+ ...options.credentials === void 0 ? {} : { credentials: options.credentials },
124
+ ...options.mode === void 0 ? {} : { mode: options.mode },
125
+ ...options.connectionId === void 0 ? {} : { connectionId: options.connectionId },
126
+ ...options.attempts === void 0 ? {} : { attempts: options.attempts },
127
+ ...options.transport === void 0 ? {} : { transport: options.transport },
128
+ request: {
129
+ method: "POST",
130
+ path: `/v1.0/users/${encodeURIComponent(String(config.userId))}/onlineMeetings`,
131
+ json: nestFields({
132
+ ...config.subject !== void 0 && config.subject !== null && config.subject !== "" ? { "subject": String(config.subject) } : {},
133
+ "startDateTime": String(config.startDateTime),
134
+ "endDateTime": String(config.endDateTime),
135
+ ...config.passcodeRequired !== void 0 && config.passcodeRequired !== null && config.passcodeRequired !== "" ? { "joinMeetingIdSettings.isPasscodeRequired": Boolean(config.passcodeRequired) } : {}
136
+ })
137
+ }
138
+ });
139
+ }
140
+ function nestFields(flat) {
141
+ const out = {};
142
+ for (const [path, value] of Object.entries(flat)) {
143
+ const parts = path.split(".");
144
+ let node = out;
145
+ while (parts.length > 1) {
146
+ const key = parts.shift();
147
+ const wantsArray = /^\d+$/.test(parts[0] ?? "");
148
+ if (typeof node[key] !== "object" || node[key] === null) node[key] = wantsArray ? [] : {};
149
+ node = node[key];
150
+ }
151
+ node[parts[0]] = value;
152
+ }
153
+ return out;
154
+ }
155
+ var MEETING_GET_OPERATION = "meeting_get";
156
+ async function microsoftTeamsMeetingGet(options) {
157
+ const config = options.config ?? {};
158
+ if (config.userId === void 0 || config.userId === null || config.userId === "") {
159
+ throw new Error(`meeting_get: "userId" is required (User ID).`);
160
+ }
161
+ if (config.meetingId === void 0 || config.meetingId === null || config.meetingId === "") {
162
+ throw new Error(`meeting_get: "meetingId" is required (Meeting ID).`);
163
+ }
164
+ return fancyConnectorCore.callConnector(MICROSOFT_TEAMS, {
165
+ operation: MEETING_GET_OPERATION,
166
+ config,
167
+ input: options.input,
168
+ ...options.credentials === void 0 ? {} : { credentials: options.credentials },
169
+ ...options.mode === void 0 ? {} : { mode: options.mode },
170
+ ...options.connectionId === void 0 ? {} : { connectionId: options.connectionId },
171
+ ...options.attempts === void 0 ? {} : { attempts: options.attempts },
172
+ ...options.transport === void 0 ? {} : { transport: options.transport },
173
+ request: {
174
+ method: "GET",
175
+ path: `/v1.0/users/${encodeURIComponent(String(config.userId))}/onlineMeetings/${encodeURIComponent(String(config.meetingId))}`,
176
+ query: {}
177
+ }
178
+ });
179
+ }
180
+ var TRANSCRIPT_LIST_OPERATION = "transcript_list";
181
+ async function microsoftTeamsTranscriptList(options) {
182
+ const config = options.config ?? {};
183
+ if (config.userId === void 0 || config.userId === null || config.userId === "") {
184
+ throw new Error(`transcript_list: "userId" is required (User ID).`);
185
+ }
186
+ if (config.meetingId === void 0 || config.meetingId === null || config.meetingId === "") {
187
+ throw new Error(`transcript_list: "meetingId" is required (Meeting ID).`);
188
+ }
189
+ return fancyConnectorCore.callConnector(MICROSOFT_TEAMS, {
190
+ operation: TRANSCRIPT_LIST_OPERATION,
191
+ config,
192
+ input: options.input,
193
+ ...options.credentials === void 0 ? {} : { credentials: options.credentials },
194
+ ...options.mode === void 0 ? {} : { mode: options.mode },
195
+ ...options.connectionId === void 0 ? {} : { connectionId: options.connectionId },
196
+ ...options.attempts === void 0 ? {} : { attempts: options.attempts },
197
+ ...options.transport === void 0 ? {} : { transport: options.transport },
198
+ request: {
199
+ method: "GET",
200
+ path: `/v1.0/users/${encodeURIComponent(String(config.userId))}/onlineMeetings/${encodeURIComponent(String(config.meetingId))}/transcripts`,
201
+ query: {}
202
+ }
203
+ });
204
+ }
205
+
206
+ exports.CONNECTOR_API_VERSION = CONNECTOR_API_VERSION;
207
+ exports.MEETING_CREATE_OPERATION = MEETING_CREATE_OPERATION;
208
+ exports.MEETING_GET_OPERATION = MEETING_GET_OPERATION;
209
+ exports.MICROSOFT_TEAMS = MICROSOFT_TEAMS;
210
+ exports.MICROSOFT_TEAMS_BASE_URLS = MICROSOFT_TEAMS_BASE_URLS;
211
+ exports.MICROSOFT_TEAMS_REQUIRES = MICROSOFT_TEAMS_REQUIRES;
212
+ exports.TRANSCRIPT_LIST_OPERATION = TRANSCRIPT_LIST_OPERATION;
213
+ exports.microsoftTeamsAuthorize = microsoftTeamsAuthorize;
214
+ exports.microsoftTeamsFaker = microsoftTeamsFaker;
215
+ exports.microsoftTeamsMeetingCreate = microsoftTeamsMeetingCreate;
216
+ exports.microsoftTeamsMeetingGet = microsoftTeamsMeetingGet;
217
+ exports.microsoftTeamsTranscriptList = microsoftTeamsTranscriptList;
218
+ //# sourceMappingURL=index.cjs.map
219
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/faker.ts","../src/service.ts","../src/actions/meeting-create.ts","../src/actions/meeting-get.ts","../src/actions/transcript-list.ts"],"names":["callConnector"],"mappings":";;;;;AA0BA,SAAS,iBAAA,CAAkB,EAAE,MAAA,EAAQ,IAAA,EAAK,EAAyB;AACjE,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,IAAA,CAAK,EAAA,CAAG,KAAK,CAAA;AAAA,IACnB,kBAAA,EAAoB,8BAAA;AAAA,IACpB,SAAA,EAAY,MAAA,CAAO,OAAA,KAAY,MAAA,IAAa,MAAA,CAAO,OAAA,KAAY,IAAA,IAAQ,MAAA,CAAO,OAAA,KAAY,EAAA,GAAK,MAAA,CAAO,MAAA,CAAO,OAAO,CAAA,GAAI,aAAA;AAAA,IACxH,eAAA,EAAkB,MAAA,CAAO,aAAA,KAAkB,MAAA,IAAa,MAAA,CAAO,aAAA,KAAkB,IAAA,IAAQ,MAAA,CAAO,aAAA,KAAkB,EAAA,GAAK,MAAA,CAAO,MAAA,CAAO,aAAa,CAAA,GAAI,sBAAA;AAAA,IACtJ,aAAA,EAAgB,MAAA,CAAO,WAAA,KAAgB,MAAA,IAAa,MAAA,CAAO,WAAA,KAAgB,IAAA,IAAQ,MAAA,CAAO,WAAA,KAAgB,EAAA,GAAK,MAAA,CAAO,MAAA,CAAO,WAAW,CAAA,GAAI,sBAAA;AAAA,IAC5I,YAAA,EAAc,6EAAA;AAAA,IACd,cAAA,EAAgB;AAAA,MACd,WAAA,EAAa;AAAA,QACX,UAAA,EAAY;AAAA,UACV,MAAA,EAAQ;AAAA,YACN,IAAA,EAAM,IAAA,CAAK,EAAA,CAAG,GAAG,CAAA;AAAA,YACjB,aAAA,EAAe;AAAA;AACjB;AACF;AACF,KACF;AAAA,IACA,uBAAA,EAAyB;AAAA,MACvB,eAAA,EAAiB,KAAA,CAAM,IAAA,CAAK,EAAE,QAAQ,CAAA,EAAE,EAAG,MAAM,IAAA,CAAK,I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,QAAQ,SAAA,KAAc,MAAA,GAAY,EAAC,GAAI,EAAE,SAAA,EAAW,OAAA,CAAQ,SAAA,EAAU;AAAA,IAC1E,OAAA,EAAS;AAAA,MACP,MAAA,EAAQ,KAAA;AAAA,MACR,IAAA,EAAM,CAAA,YAAA,EAAe,kBAAA,CAAmB,MAAA,CAAO,OAAO,MAAM,CAAC,CAAC,CAAA,gBAAA,EAAmB,kBAAA,CAAmB,MAAA,CAAO,MAAA,CAAO,SAAS,CAAC,CAAC,CAAA,YAAA,CAAA;AAAA,MAC7H,OAAO;AAAC;AACV,GACD,CAAA;AACH","file":"index.cjs","sourcesContent":["/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/fixtures/ by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/fixtures/ (or weaver's template/) and regenerate:\n *\n * npm run provider -- microsoft_teams\n */\n\n/**\n * The Microsoft Teams faker.\n *\n * Shapes, not behaviour: the goal is that a downstream node sees the field\n * NAMES Microsoft Teams actually publishes, so an author can wire {{\n * $json.data.id }} against a fake and have it keep working against the real\n * thing.\n *\n * Deterministic — same inputs, same output. A faker returning a fresh uuid\n * every call cannot be asserted on, so its fixtures degrade to \"it did not\n * throw\", which is the assertion that catches nothing.\n */\n\nimport type { ConnectorFaker, FakeRequest } from \"@particle-academy/fancy-connector-core\";\n\nfunction fakeMeetingCreate({ config, fake }: FakeRequest): unknown {\n return {\n \"id\": fake.id(\"MSo\"),\n \"creationDateTime\": \"2026-09-16T09:00:00.0000000Z\",\n \"subject\": (config.subject !== undefined && config.subject !== null && config.subject !== \"\" ? String(config.subject) : \"Weekly sync\"),\n \"startDateTime\": (config.startDateTime !== undefined && config.startDateTime !== null && config.startDateTime !== \"\" ? String(config.startDateTime) : \"2026-09-22T14:00:00Z\"),\n \"endDateTime\": (config.endDateTime !== undefined && config.endDateTime !== null && config.endDateTime !== \"\" ? String(config.endDateTime) : \"2026-09-22T14:30:00Z\"),\n \"joinWebUrl\": \"https://teams.microsoft.com/l/meetup-join/19%3ameeting_abc123%40thread.v2/0\",\n \"participants\": {\n \"organizer\": {\n \"identity\": {\n \"user\": {\n \"id\": fake.id(\"u\"),\n \"displayName\": \"Ada Lovelace\",\n },\n },\n },\n },\n \"joinMeetingIdSettings\": {\n \"joinMeetingId\": Array.from({ length: 9 }, () => fake.int(0, 9)).join(\"\"),\n \"isPasscodeRequired\": (config.passcodeRequired !== undefined && config.passcodeRequired !== null && config.passcodeRequired !== \"\" ? Boolean(config.passcodeRequired) : false),\n \"passcode\": Array.from({ length: 6 }, () => fake.int(0, 9)).join(\"\"),\n },\n };\n}\n\nfunction fakeMeetingGet({ config, fake }: FakeRequest): unknown {\n return {\n \"id\": (config.meetingId !== undefined && config.meetingId !== null && config.meetingId !== \"\" ? String(config.meetingId) : fake.id(\"MSo\")),\n \"subject\": \"Weekly sync\",\n \"startDateTime\": \"2026-09-22T14:00:00Z\",\n \"endDateTime\": \"2026-09-22T14:30:00Z\",\n \"joinWebUrl\": \"https://teams.microsoft.com/l/meetup-join/19%3ameeting_abc123%40thread.v2/0\",\n \"participants\": {\n \"organizer\": {\n \"identity\": {\n \"user\": {\n \"id\": (config.userId !== undefined && config.userId !== null && config.userId !== \"\" ? String(config.userId) : fake.id(\"u\")),\n \"displayName\": \"Ada Lovelace\",\n },\n },\n },\n },\n };\n}\n\nfunction fakeTranscriptList({ config, fake }: FakeRequest): unknown {\n return {\n \"value\": [\n {\n \"id\": fake.id(\"transcript\"),\n \"meetingId\": (config.meetingId !== undefined && config.meetingId !== null && config.meetingId !== \"\" ? String(config.meetingId) : fake.id(\"MSo\")),\n \"callId\": `${fake.hex(8)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(12)}`,\n \"createdDateTime\": \"2026-09-16T09:30:05.0000000Z\",\n \"endDateTime\": \"2026-09-16T09:30:10.0000000Z\",\n \"contentCorrelationId\": `${fake.hex(8)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(12)}`,\n \"transcriptContentUrl\": \"https://graph.microsoft.com/v1.0/users/u/onlineMeetings/m/transcripts/t/content\",\n \"meetingOrganizer\": {\n \"user\": {\n \"id\": fake.id(\"u\"),\n \"displayName\": \"Ada Lovelace\",\n },\n },\n },\n ],\n };\n}\n\nexport const microsoftTeamsFaker: ConnectorFaker = (operation, request) => {\n switch (operation) {\n case \"meeting_create\":\n return fakeMeetingCreate(request);\n\n case \"meeting_get\":\n return fakeMeetingGet(request);\n\n case \"transcript_list\":\n return fakeTranscriptList(request);\n\n default:\n // A faker asked for an operation it has no shape for must SAY so. Making\n // something up would produce a green run whose output silently has none\n // of the fields the author is about to reference.\n throw new Error(\n `microsoft_teams: no fake response is defined for \"${operation}\". ` +\n \"Add a fixture under provider/fixtures/ and regenerate — a connector without a faker \" +\n \"cannot be developed against, tested, or demonstrated.\",\n );\n }\n};\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- microsoft_teams\n */\n\n/**\n * Microsoft Teams, as one service descriptor shared by every Microsoft Teams\n * operation.\n *\n * @particle-academy/fancy-connector-core carries what is true of ALL\n * connectors. This carries what is true of Microsoft Teams: its base URL, its\n * auth scheme, its idempotency header, and its faker.\n *\n * ## The sandbox trap, written down where it is used\n *\n * Microsoft's test estate is a Microsoft 365 Developer Program sandbox: a\n * separate E5 tenant with its own users and its own OAuth consent, on the SAME\n * host -- the same fact microsoft-outlook already verified for Graph\n * generally. Eligibility is limited (Visual Studio Professional/Enterprise,\n * ISV Success / MAICPP partners, or Premier/Unified Support) and the tenant\n * expires after 90 days of no development activity. Without one, every call\n * reaches a real tenant.\n */\n\nimport type { ConnectorMode, PreparedRequest, ServiceDescriptor } from \"@particle-academy/fancy-connector-core\";\n\nimport { microsoftTeamsFaker } from \"./faker.js\";\n\n/**\n * The connector API version this package was GENERATED against.\n *\n * A literal, never imported. An imported constant lets an upgrade rewrite the\n * very claim it exists to detect, after which the copy agrees with itself\n * forever.\n */\nexport const CONNECTOR_API_VERSION = 1;\n\nexport const MICROSOFT_TEAMS_BASE_URLS = {\n \"live\": \"https://graph.microsoft.com\",\n \"sandbox\": \"https://graph.microsoft.com\"\n} as const;\n\n/** Credential keys a remote call cannot proceed without. */\nexport const MICROSOFT_TEAMS_REQUIRES = [\n \"accessToken\"\n] as const;\n\n/**\n * Apply Microsoft Teams's auth scheme to an outgoing request.\n *\n *\n *\n * The mode is passed in because for some providers auth and estate are the\n * same decision expressed in the URL; here it is unused, and saying so is\n * cheaper than wondering later whether it was forgotten.\n */\nexport function microsoftTeamsAuthorize(\n credentials: Record<string, string | undefined>,\n request: PreparedRequest,\n _mode: ConnectorMode,\n): void {\n request.headers.Authorization = `Bearer ${credentials.accessToken ?? \"\"}`;\n}\n\n/** The Microsoft Teams service, for the TypeScript runtime. */\nexport const MICROSOFT_TEAMS: ServiceDescriptor = {\n service: \"microsoft_teams\",\n title: \"Microsoft Teams\",\n sandbox: \"separate-account\",\n baseUrls: { ...MICROSOFT_TEAMS_BASE_URLS },\n requires: [...MICROSOFT_TEAMS_REQUIRES],\n authorize: microsoftTeamsAuthorize,\n faker: microsoftTeamsFaker,\n};\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/meeting-create.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/meeting-create.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- microsoft_teams\n */\n\n/**\n * Create a Teams meeting on behalf of a user and get its join link.\n *\n * POST /v1.0/users/{userId}/onlineMeetings —\n * https://learn.microsoft.com/en-us/graph/api/application-post-onlinemeetings\n *\n * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,\n * no fake/real branch. This describes the request; callConnector resolves the\n * connection, picks the estate, and either calls Microsoft Teams or calls the\n * faker.\n *\n * sideEffects: unsafe-to-replay.\n */\n\nimport {\n callConnector,\n type ConnectorResult,\n type RequestedMode,\n type Transport,\n} from \"@particle-academy/fancy-connector-core\";\nimport { MICROSOFT_TEAMS } from \"../service.js\";\n\nexport const MEETING_CREATE_OPERATION = \"meeting_create\";\n\nexport type MeetingCreateOptions = {\n /** The node's resolved config. Keys: userId, subject, startDateTime, endDateTime, passcodeRequired. */\n config: Record<string, unknown>;\n credentials?: Record<string, string | undefined>;\n mode?: RequestedMode;\n connectionId?: string | null;\n input?: unknown;\n attempts?: number;\n /** Override the transport. The only way to exercise this without a network. */\n transport?: Transport;\n};\n\nexport async function microsoftTeamsMeetingCreate(options: MeetingCreateOptions): Promise<ConnectorResult> {\n const config = options.config ?? {};\n\n if (config.userId === undefined || config.userId === null || config.userId === \"\") {\n throw new Error(`meeting_create: \"userId\" is required (User ID).`);\n }\n\n if (config.startDateTime === undefined || config.startDateTime === null || config.startDateTime === \"\") {\n throw new Error(`meeting_create: \"startDateTime\" is required (Start).`);\n }\n\n if (config.endDateTime === undefined || config.endDateTime === null || config.endDateTime === \"\") {\n throw new Error(`meeting_create: \"endDateTime\" is required (End).`);\n }\n\n return callConnector(MICROSOFT_TEAMS, {\n operation: MEETING_CREATE_OPERATION,\n config,\n input: options.input,\n ...(options.credentials === undefined ? {} : { credentials: options.credentials }),\n ...(options.mode === undefined ? {} : { mode: options.mode }),\n ...(options.connectionId === undefined ? {} : { connectionId: options.connectionId }),\n ...(options.attempts === undefined ? {} : { attempts: options.attempts }),\n ...(options.transport === undefined ? {} : { transport: options.transport }),\n request: {\n method: \"POST\",\n path: `/v1.0/users/${encodeURIComponent(String(config.userId))}/onlineMeetings`,\n json: nestFields({\n ...(config.subject !== undefined && config.subject !== null && config.subject !== \"\" ? { \"subject\": String(config.subject) } : {}),\n \"startDateTime\": String(config.startDateTime),\n \"endDateTime\": String(config.endDateTime),\n ...(config.passcodeRequired !== undefined && config.passcodeRequired !== null && config.passcodeRequired !== \"\" ? { \"joinMeetingIdSettings.isPasscodeRequired\": Boolean(config.passcodeRequired) } : {}),\n }),\n },\n });\n}\n\n/**\n * `{\"properties.email\": x}` -> `{properties: {email: x}}`.\n *\n * A dotted `as` means NESTING, and only a JSON body can nest. The validator\n * refuses that spelling anywhere else, because in a form body it already means\n * something different — a literal dotted key.\n */\nfunction nestFields(flat: Record<string, unknown>): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n\n for (const [path, value] of Object.entries(flat)) {\n const parts = path.split(\".\");\n let node = out;\n\n while (parts.length > 1) {\n const key = parts.shift() as string;\n // A NUMERIC segment is an array index: `dateRanges.0.startDate` has to\n // become `[{startDate}]`, not `{\"0\": {startDate}}`. PHP produced the\n // array by accident (its integer-keyed arrays serialise as JSON lists)\n // and the other two produced an object, which the provider rejects as\n // the wrong type. The parity suite is what caught the disagreement.\n const wantsArray = /^\\d+$/.test(parts[0] ?? \"\");\n\n if (typeof node[key] !== \"object\" || node[key] === null) node[key] = wantsArray ? [] : {};\n node = node[key] as Record<string, unknown>;\n }\n\n node[parts[0] as string] = value;\n }\n\n return out;\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/meeting-get.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/meeting-get.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- microsoft_teams\n */\n\n/**\n * Read a Teams meeting's current details.\n *\n * GET /v1.0/users/{userId}/onlineMeetings/{meetingId} —\n * https://learn.microsoft.com/en-us/graph/api/onlinemeeting-get\n *\n * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,\n * no fake/real branch. This describes the request; callConnector resolves the\n * connection, picks the estate, and either calls Microsoft Teams or calls the\n * faker.\n */\n\nimport {\n callConnector,\n type ConnectorResult,\n type RequestedMode,\n type Transport,\n} from \"@particle-academy/fancy-connector-core\";\nimport { MICROSOFT_TEAMS } from \"../service.js\";\n\nexport const MEETING_GET_OPERATION = \"meeting_get\";\n\nexport type MeetingGetOptions = {\n /** The node's resolved config. Keys: userId, meetingId. */\n config: Record<string, unknown>;\n credentials?: Record<string, string | undefined>;\n mode?: RequestedMode;\n connectionId?: string | null;\n input?: unknown;\n attempts?: number;\n /** Override the transport. The only way to exercise this without a network. */\n transport?: Transport;\n};\n\nexport async function microsoftTeamsMeetingGet(options: MeetingGetOptions): Promise<ConnectorResult> {\n const config = options.config ?? {};\n\n if (config.userId === undefined || config.userId === null || config.userId === \"\") {\n throw new Error(`meeting_get: \"userId\" is required (User ID).`);\n }\n\n if (config.meetingId === undefined || config.meetingId === null || config.meetingId === \"\") {\n throw new Error(`meeting_get: \"meetingId\" is required (Meeting ID).`);\n }\n\n return callConnector(MICROSOFT_TEAMS, {\n operation: MEETING_GET_OPERATION,\n config,\n input: options.input,\n ...(options.credentials === undefined ? {} : { credentials: options.credentials }),\n ...(options.mode === undefined ? {} : { mode: options.mode }),\n ...(options.connectionId === undefined ? {} : { connectionId: options.connectionId }),\n ...(options.attempts === undefined ? {} : { attempts: options.attempts }),\n ...(options.transport === undefined ? {} : { transport: options.transport }),\n request: {\n method: \"GET\",\n path: `/v1.0/users/${encodeURIComponent(String(config.userId))}/onlineMeetings/${encodeURIComponent(String(config.meetingId))}`,\n query: {},\n },\n });\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/transcript-list.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/transcript-list.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- microsoft_teams\n */\n\n/**\n * List a finished meeting's transcripts and their download URLs.\n *\n * GET /v1.0/users/{userId}/onlineMeetings/{meetingId}/transcripts —\n * https://learn.microsoft.com/en-us/graph/api/onlinemeeting-list-transcripts\n *\n * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,\n * no fake/real branch. This describes the request; callConnector resolves the\n * connection, picks the estate, and either calls Microsoft Teams or calls the\n * faker.\n */\n\nimport {\n callConnector,\n type ConnectorResult,\n type RequestedMode,\n type Transport,\n} from \"@particle-academy/fancy-connector-core\";\nimport { MICROSOFT_TEAMS } from \"../service.js\";\n\nexport const TRANSCRIPT_LIST_OPERATION = \"transcript_list\";\n\nexport type TranscriptListOptions = {\n /** The node's resolved config. Keys: userId, meetingId. */\n config: Record<string, unknown>;\n credentials?: Record<string, string | undefined>;\n mode?: RequestedMode;\n connectionId?: string | null;\n input?: unknown;\n attempts?: number;\n /** Override the transport. The only way to exercise this without a network. */\n transport?: Transport;\n};\n\nexport async function microsoftTeamsTranscriptList(options: TranscriptListOptions): Promise<ConnectorResult> {\n const config = options.config ?? {};\n\n if (config.userId === undefined || config.userId === null || config.userId === \"\") {\n throw new Error(`transcript_list: \"userId\" is required (User ID).`);\n }\n\n if (config.meetingId === undefined || config.meetingId === null || config.meetingId === \"\") {\n throw new Error(`transcript_list: \"meetingId\" is required (Meeting ID).`);\n }\n\n return callConnector(MICROSOFT_TEAMS, {\n operation: TRANSCRIPT_LIST_OPERATION,\n config,\n input: options.input,\n ...(options.credentials === undefined ? {} : { credentials: options.credentials }),\n ...(options.mode === undefined ? {} : { mode: options.mode }),\n ...(options.connectionId === undefined ? {} : { connectionId: options.connectionId }),\n ...(options.attempts === undefined ? {} : { attempts: options.attempts }),\n ...(options.transport === undefined ? {} : { transport: options.transport }),\n request: {\n method: \"GET\",\n path: `/v1.0/users/${encodeURIComponent(String(config.userId))}/onlineMeetings/${encodeURIComponent(String(config.meetingId))}/transcripts`,\n query: {},\n },\n });\n}\n"]}
@@ -0,0 +1,194 @@
1
+ import { ServiceDescriptor, PreparedRequest, ConnectorMode, ConnectorFaker, RequestedMode, Transport, ConnectorResult } from '@particle-academy/fancy-connector-core';
2
+
3
+ /**
4
+ * GENERATED FILE — do not edit.
5
+ *
6
+ * Emitted from provider/manifest.json by weaver's generator.
7
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
8
+ * being rejected, because it works until it silently does not. Fix
9
+ * provider/manifest.json (or weaver's template/) and regenerate:
10
+ *
11
+ * npm run provider -- microsoft_teams
12
+ */
13
+ /**
14
+ * Microsoft Teams, as one service descriptor shared by every Microsoft Teams
15
+ * operation.
16
+ *
17
+ * @particle-academy/fancy-connector-core carries what is true of ALL
18
+ * connectors. This carries what is true of Microsoft Teams: its base URL, its
19
+ * auth scheme, its idempotency header, and its faker.
20
+ *
21
+ * ## The sandbox trap, written down where it is used
22
+ *
23
+ * Microsoft's test estate is a Microsoft 365 Developer Program sandbox: a
24
+ * separate E5 tenant with its own users and its own OAuth consent, on the SAME
25
+ * host -- the same fact microsoft-outlook already verified for Graph
26
+ * generally. Eligibility is limited (Visual Studio Professional/Enterprise,
27
+ * ISV Success / MAICPP partners, or Premier/Unified Support) and the tenant
28
+ * expires after 90 days of no development activity. Without one, every call
29
+ * reaches a real tenant.
30
+ */
31
+
32
+ /**
33
+ * The connector API version this package was GENERATED against.
34
+ *
35
+ * A literal, never imported. An imported constant lets an upgrade rewrite the
36
+ * very claim it exists to detect, after which the copy agrees with itself
37
+ * forever.
38
+ */
39
+ declare const CONNECTOR_API_VERSION = 1;
40
+ declare const MICROSOFT_TEAMS_BASE_URLS: {
41
+ readonly live: "https://graph.microsoft.com";
42
+ readonly sandbox: "https://graph.microsoft.com";
43
+ };
44
+ /** Credential keys a remote call cannot proceed without. */
45
+ declare const MICROSOFT_TEAMS_REQUIRES: readonly ["accessToken"];
46
+ /**
47
+ * Apply Microsoft Teams's auth scheme to an outgoing request.
48
+ *
49
+ *
50
+ *
51
+ * The mode is passed in because for some providers auth and estate are the
52
+ * same decision expressed in the URL; here it is unused, and saying so is
53
+ * cheaper than wondering later whether it was forgotten.
54
+ */
55
+ declare function microsoftTeamsAuthorize(credentials: Record<string, string | undefined>, request: PreparedRequest, _mode: ConnectorMode): void;
56
+ /** The Microsoft Teams service, for the TypeScript runtime. */
57
+ declare const MICROSOFT_TEAMS: ServiceDescriptor;
58
+
59
+ /**
60
+ * GENERATED FILE — do not edit.
61
+ *
62
+ * Emitted from provider/fixtures/ by weaver's generator.
63
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
64
+ * being rejected, because it works until it silently does not. Fix
65
+ * provider/fixtures/ (or weaver's template/) and regenerate:
66
+ *
67
+ * npm run provider -- microsoft_teams
68
+ */
69
+ /**
70
+ * The Microsoft Teams faker.
71
+ *
72
+ * Shapes, not behaviour: the goal is that a downstream node sees the field
73
+ * NAMES Microsoft Teams actually publishes, so an author can wire {{
74
+ * $json.data.id }} against a fake and have it keep working against the real
75
+ * thing.
76
+ *
77
+ * Deterministic — same inputs, same output. A faker returning a fresh uuid
78
+ * every call cannot be asserted on, so its fixtures degrade to "it did not
79
+ * throw", which is the assertion that catches nothing.
80
+ */
81
+
82
+ declare const microsoftTeamsFaker: ConnectorFaker;
83
+
84
+ /**
85
+ * GENERATED FILE — do not edit.
86
+ *
87
+ * Emitted from provider/actions/meeting-create.json by weaver's generator.
88
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
89
+ * being rejected, because it works until it silently does not. Fix
90
+ * provider/actions/meeting-create.json (or weaver's template/) and regenerate:
91
+ *
92
+ * npm run provider -- microsoft_teams
93
+ */
94
+ /**
95
+ * Create a Teams meeting on behalf of a user and get its join link.
96
+ *
97
+ * POST /v1.0/users/{userId}/onlineMeetings —
98
+ * https://learn.microsoft.com/en-us/graph/api/application-post-onlinemeetings
99
+ *
100
+ * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,
101
+ * no fake/real branch. This describes the request; callConnector resolves the
102
+ * connection, picks the estate, and either calls Microsoft Teams or calls the
103
+ * faker.
104
+ *
105
+ * sideEffects: unsafe-to-replay.
106
+ */
107
+
108
+ declare const MEETING_CREATE_OPERATION = "meeting_create";
109
+ type MeetingCreateOptions = {
110
+ /** The node's resolved config. Keys: userId, subject, startDateTime, endDateTime, passcodeRequired. */
111
+ config: Record<string, unknown>;
112
+ credentials?: Record<string, string | undefined>;
113
+ mode?: RequestedMode;
114
+ connectionId?: string | null;
115
+ input?: unknown;
116
+ attempts?: number;
117
+ /** Override the transport. The only way to exercise this without a network. */
118
+ transport?: Transport;
119
+ };
120
+ declare function microsoftTeamsMeetingCreate(options: MeetingCreateOptions): Promise<ConnectorResult>;
121
+
122
+ /**
123
+ * GENERATED FILE — do not edit.
124
+ *
125
+ * Emitted from provider/actions/meeting-get.json by weaver's generator.
126
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
127
+ * being rejected, because it works until it silently does not. Fix
128
+ * provider/actions/meeting-get.json (or weaver's template/) and regenerate:
129
+ *
130
+ * npm run provider -- microsoft_teams
131
+ */
132
+ /**
133
+ * Read a Teams meeting's current details.
134
+ *
135
+ * GET /v1.0/users/{userId}/onlineMeetings/{meetingId} —
136
+ * https://learn.microsoft.com/en-us/graph/api/onlinemeeting-get
137
+ *
138
+ * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,
139
+ * no fake/real branch. This describes the request; callConnector resolves the
140
+ * connection, picks the estate, and either calls Microsoft Teams or calls the
141
+ * faker.
142
+ */
143
+
144
+ declare const MEETING_GET_OPERATION = "meeting_get";
145
+ type MeetingGetOptions = {
146
+ /** The node's resolved config. Keys: userId, meetingId. */
147
+ config: Record<string, unknown>;
148
+ credentials?: Record<string, string | undefined>;
149
+ mode?: RequestedMode;
150
+ connectionId?: string | null;
151
+ input?: unknown;
152
+ attempts?: number;
153
+ /** Override the transport. The only way to exercise this without a network. */
154
+ transport?: Transport;
155
+ };
156
+ declare function microsoftTeamsMeetingGet(options: MeetingGetOptions): Promise<ConnectorResult>;
157
+
158
+ /**
159
+ * GENERATED FILE — do not edit.
160
+ *
161
+ * Emitted from provider/actions/transcript-list.json by weaver's generator.
162
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
163
+ * being rejected, because it works until it silently does not. Fix
164
+ * provider/actions/transcript-list.json (or weaver's template/) and regenerate:
165
+ *
166
+ * npm run provider -- microsoft_teams
167
+ */
168
+ /**
169
+ * List a finished meeting's transcripts and their download URLs.
170
+ *
171
+ * GET /v1.0/users/{userId}/onlineMeetings/{meetingId}/transcripts —
172
+ * https://learn.microsoft.com/en-us/graph/api/onlinemeeting-list-transcripts
173
+ *
174
+ * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,
175
+ * no fake/real branch. This describes the request; callConnector resolves the
176
+ * connection, picks the estate, and either calls Microsoft Teams or calls the
177
+ * faker.
178
+ */
179
+
180
+ declare const TRANSCRIPT_LIST_OPERATION = "transcript_list";
181
+ type TranscriptListOptions = {
182
+ /** The node's resolved config. Keys: userId, meetingId. */
183
+ config: Record<string, unknown>;
184
+ credentials?: Record<string, string | undefined>;
185
+ mode?: RequestedMode;
186
+ connectionId?: string | null;
187
+ input?: unknown;
188
+ attempts?: number;
189
+ /** Override the transport. The only way to exercise this without a network. */
190
+ transport?: Transport;
191
+ };
192
+ declare function microsoftTeamsTranscriptList(options: TranscriptListOptions): Promise<ConnectorResult>;
193
+
194
+ export { CONNECTOR_API_VERSION, MEETING_CREATE_OPERATION, MEETING_GET_OPERATION, MICROSOFT_TEAMS, MICROSOFT_TEAMS_BASE_URLS, MICROSOFT_TEAMS_REQUIRES, type MeetingCreateOptions, type MeetingGetOptions, TRANSCRIPT_LIST_OPERATION, type TranscriptListOptions, microsoftTeamsAuthorize, microsoftTeamsFaker, microsoftTeamsMeetingCreate, microsoftTeamsMeetingGet, microsoftTeamsTranscriptList };
@@ -0,0 +1,194 @@
1
+ import { ServiceDescriptor, PreparedRequest, ConnectorMode, ConnectorFaker, RequestedMode, Transport, ConnectorResult } from '@particle-academy/fancy-connector-core';
2
+
3
+ /**
4
+ * GENERATED FILE — do not edit.
5
+ *
6
+ * Emitted from provider/manifest.json by weaver's generator.
7
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
8
+ * being rejected, because it works until it silently does not. Fix
9
+ * provider/manifest.json (or weaver's template/) and regenerate:
10
+ *
11
+ * npm run provider -- microsoft_teams
12
+ */
13
+ /**
14
+ * Microsoft Teams, as one service descriptor shared by every Microsoft Teams
15
+ * operation.
16
+ *
17
+ * @particle-academy/fancy-connector-core carries what is true of ALL
18
+ * connectors. This carries what is true of Microsoft Teams: its base URL, its
19
+ * auth scheme, its idempotency header, and its faker.
20
+ *
21
+ * ## The sandbox trap, written down where it is used
22
+ *
23
+ * Microsoft's test estate is a Microsoft 365 Developer Program sandbox: a
24
+ * separate E5 tenant with its own users and its own OAuth consent, on the SAME
25
+ * host -- the same fact microsoft-outlook already verified for Graph
26
+ * generally. Eligibility is limited (Visual Studio Professional/Enterprise,
27
+ * ISV Success / MAICPP partners, or Premier/Unified Support) and the tenant
28
+ * expires after 90 days of no development activity. Without one, every call
29
+ * reaches a real tenant.
30
+ */
31
+
32
+ /**
33
+ * The connector API version this package was GENERATED against.
34
+ *
35
+ * A literal, never imported. An imported constant lets an upgrade rewrite the
36
+ * very claim it exists to detect, after which the copy agrees with itself
37
+ * forever.
38
+ */
39
+ declare const CONNECTOR_API_VERSION = 1;
40
+ declare const MICROSOFT_TEAMS_BASE_URLS: {
41
+ readonly live: "https://graph.microsoft.com";
42
+ readonly sandbox: "https://graph.microsoft.com";
43
+ };
44
+ /** Credential keys a remote call cannot proceed without. */
45
+ declare const MICROSOFT_TEAMS_REQUIRES: readonly ["accessToken"];
46
+ /**
47
+ * Apply Microsoft Teams's auth scheme to an outgoing request.
48
+ *
49
+ *
50
+ *
51
+ * The mode is passed in because for some providers auth and estate are the
52
+ * same decision expressed in the URL; here it is unused, and saying so is
53
+ * cheaper than wondering later whether it was forgotten.
54
+ */
55
+ declare function microsoftTeamsAuthorize(credentials: Record<string, string | undefined>, request: PreparedRequest, _mode: ConnectorMode): void;
56
+ /** The Microsoft Teams service, for the TypeScript runtime. */
57
+ declare const MICROSOFT_TEAMS: ServiceDescriptor;
58
+
59
+ /**
60
+ * GENERATED FILE — do not edit.
61
+ *
62
+ * Emitted from provider/fixtures/ by weaver's generator.
63
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
64
+ * being rejected, because it works until it silently does not. Fix
65
+ * provider/fixtures/ (or weaver's template/) and regenerate:
66
+ *
67
+ * npm run provider -- microsoft_teams
68
+ */
69
+ /**
70
+ * The Microsoft Teams faker.
71
+ *
72
+ * Shapes, not behaviour: the goal is that a downstream node sees the field
73
+ * NAMES Microsoft Teams actually publishes, so an author can wire {{
74
+ * $json.data.id }} against a fake and have it keep working against the real
75
+ * thing.
76
+ *
77
+ * Deterministic — same inputs, same output. A faker returning a fresh uuid
78
+ * every call cannot be asserted on, so its fixtures degrade to "it did not
79
+ * throw", which is the assertion that catches nothing.
80
+ */
81
+
82
+ declare const microsoftTeamsFaker: ConnectorFaker;
83
+
84
+ /**
85
+ * GENERATED FILE — do not edit.
86
+ *
87
+ * Emitted from provider/actions/meeting-create.json by weaver's generator.
88
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
89
+ * being rejected, because it works until it silently does not. Fix
90
+ * provider/actions/meeting-create.json (or weaver's template/) and regenerate:
91
+ *
92
+ * npm run provider -- microsoft_teams
93
+ */
94
+ /**
95
+ * Create a Teams meeting on behalf of a user and get its join link.
96
+ *
97
+ * POST /v1.0/users/{userId}/onlineMeetings —
98
+ * https://learn.microsoft.com/en-us/graph/api/application-post-onlinemeetings
99
+ *
100
+ * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,
101
+ * no fake/real branch. This describes the request; callConnector resolves the
102
+ * connection, picks the estate, and either calls Microsoft Teams or calls the
103
+ * faker.
104
+ *
105
+ * sideEffects: unsafe-to-replay.
106
+ */
107
+
108
+ declare const MEETING_CREATE_OPERATION = "meeting_create";
109
+ type MeetingCreateOptions = {
110
+ /** The node's resolved config. Keys: userId, subject, startDateTime, endDateTime, passcodeRequired. */
111
+ config: Record<string, unknown>;
112
+ credentials?: Record<string, string | undefined>;
113
+ mode?: RequestedMode;
114
+ connectionId?: string | null;
115
+ input?: unknown;
116
+ attempts?: number;
117
+ /** Override the transport. The only way to exercise this without a network. */
118
+ transport?: Transport;
119
+ };
120
+ declare function microsoftTeamsMeetingCreate(options: MeetingCreateOptions): Promise<ConnectorResult>;
121
+
122
+ /**
123
+ * GENERATED FILE — do not edit.
124
+ *
125
+ * Emitted from provider/actions/meeting-get.json by weaver's generator.
126
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
127
+ * being rejected, because it works until it silently does not. Fix
128
+ * provider/actions/meeting-get.json (or weaver's template/) and regenerate:
129
+ *
130
+ * npm run provider -- microsoft_teams
131
+ */
132
+ /**
133
+ * Read a Teams meeting's current details.
134
+ *
135
+ * GET /v1.0/users/{userId}/onlineMeetings/{meetingId} —
136
+ * https://learn.microsoft.com/en-us/graph/api/onlinemeeting-get
137
+ *
138
+ * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,
139
+ * no fake/real branch. This describes the request; callConnector resolves the
140
+ * connection, picks the estate, and either calls Microsoft Teams or calls the
141
+ * faker.
142
+ */
143
+
144
+ declare const MEETING_GET_OPERATION = "meeting_get";
145
+ type MeetingGetOptions = {
146
+ /** The node's resolved config. Keys: userId, meetingId. */
147
+ config: Record<string, unknown>;
148
+ credentials?: Record<string, string | undefined>;
149
+ mode?: RequestedMode;
150
+ connectionId?: string | null;
151
+ input?: unknown;
152
+ attempts?: number;
153
+ /** Override the transport. The only way to exercise this without a network. */
154
+ transport?: Transport;
155
+ };
156
+ declare function microsoftTeamsMeetingGet(options: MeetingGetOptions): Promise<ConnectorResult>;
157
+
158
+ /**
159
+ * GENERATED FILE — do not edit.
160
+ *
161
+ * Emitted from provider/actions/transcript-list.json by weaver's generator.
162
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
163
+ * being rejected, because it works until it silently does not. Fix
164
+ * provider/actions/transcript-list.json (or weaver's template/) and regenerate:
165
+ *
166
+ * npm run provider -- microsoft_teams
167
+ */
168
+ /**
169
+ * List a finished meeting's transcripts and their download URLs.
170
+ *
171
+ * GET /v1.0/users/{userId}/onlineMeetings/{meetingId}/transcripts —
172
+ * https://learn.microsoft.com/en-us/graph/api/onlinemeeting-list-transcripts
173
+ *
174
+ * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,
175
+ * no fake/real branch. This describes the request; callConnector resolves the
176
+ * connection, picks the estate, and either calls Microsoft Teams or calls the
177
+ * faker.
178
+ */
179
+
180
+ declare const TRANSCRIPT_LIST_OPERATION = "transcript_list";
181
+ type TranscriptListOptions = {
182
+ /** The node's resolved config. Keys: userId, meetingId. */
183
+ config: Record<string, unknown>;
184
+ credentials?: Record<string, string | undefined>;
185
+ mode?: RequestedMode;
186
+ connectionId?: string | null;
187
+ input?: unknown;
188
+ attempts?: number;
189
+ /** Override the transport. The only way to exercise this without a network. */
190
+ transport?: Transport;
191
+ };
192
+ declare function microsoftTeamsTranscriptList(options: TranscriptListOptions): Promise<ConnectorResult>;
193
+
194
+ export { CONNECTOR_API_VERSION, MEETING_CREATE_OPERATION, MEETING_GET_OPERATION, MICROSOFT_TEAMS, MICROSOFT_TEAMS_BASE_URLS, MICROSOFT_TEAMS_REQUIRES, type MeetingCreateOptions, type MeetingGetOptions, TRANSCRIPT_LIST_OPERATION, type TranscriptListOptions, microsoftTeamsAuthorize, microsoftTeamsFaker, microsoftTeamsMeetingCreate, microsoftTeamsMeetingGet, microsoftTeamsTranscriptList };