@memberjunction/ai-bridge-server 5.44.0 → 5.45.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/calendar-clients.d.ts +149 -0
- package/dist/calendar-clients.d.ts.map +1 -0
- package/dist/calendar-clients.js +190 -0
- package/dist/calendar-clients.js.map +1 -0
- package/dist/calendar-source.d.ts +241 -26
- package/dist/calendar-source.d.ts.map +1 -1
- package/dist/calendar-source.js +290 -32
- package/dist/calendar-source.js.map +1 -1
- package/dist/identity-provisioner.d.ts +141 -13
- package/dist/identity-provisioner.d.ts.map +1 -1
- package/dist/identity-provisioner.js +137 -16
- package/dist/identity-provisioner.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +11 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-source.d.ts","sourceRoot":"","sources":["../src/calendar-source.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACnC,mFAAmF;IACnF,KAAK,EAAE,MAAM,CAAC;IAEd,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,kGAAkG;IAClG,cAAc,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,aAAa,CAAC;CAC1E;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACpC,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAC;IAEd,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,WAAW,wBAAwB;IACrC;;;OAGG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB,+FAA+F;IAC/F,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,4FAA4F;IAC5F,SAAS,EAAE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MAAM,GAClB,sBAAsB,CAAC,gBAAgB,CAAC,GAAG,SAAS,CAatD;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,mBAAmB,GAAG,MAAM,GAAG,SAAS,CAKnF;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,mBAAmB,GAAG,wBAAwB,GAAG,IAAI,CA8BhG;AAgBD;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,oBAAqB,YAAW,eAAe;IACxD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAsB;IAEhD;;;OAGG;gBACS,QAAQ,CAAC,EAAE,mBAAmB;IAI1C,kBAAkB;IACL,mBAAmB,CAC5B,aAAa,EAAE,MAAM,EACrB,WAAW,CAAC,EAAE,MAAM,GACrB,OAAO,CAAC,kBAAkB,CAAC;CA8BjC"}
|
package/dist/calendar-source.js
CHANGED
|
@@ -11,53 +11,311 @@ export class CalendarSourceNotBoundError extends Error {
|
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
* **
|
|
14
|
+
* **Pure** parse of a Graph {@link GraphDateTimeTimeZone} to a UTC {@link Date}. Treats a missing or
|
|
15
|
+
* `UTC`/`Z` time zone as UTC (the common case for Graph delta queries, which can be requested in UTC);
|
|
16
|
+
* for a non-UTC named zone it parses the wall-clock string and appends `Z` (best-effort — production
|
|
17
|
+
* SHOULD request UTC via the `Prefer: outlook.timezone="UTC"` header). Returns `null` on absent/invalid.
|
|
18
|
+
*/
|
|
19
|
+
export function parseGraphDateTime(value) {
|
|
20
|
+
const raw = value?.dateTime?.trim();
|
|
21
|
+
if (!raw) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
const zone = (value?.timeZone ?? '').trim().toLowerCase();
|
|
25
|
+
const hasZoneSuffix = /[zZ]$|[+-]\d{2}:?\d{2}$/.test(raw);
|
|
26
|
+
const iso = hasZoneSuffix || zone === 'utc' || zone === '' ? ensureUtcSuffix(raw) : `${raw}Z`;
|
|
27
|
+
const parsed = new Date(iso);
|
|
28
|
+
return Number.isNaN(parsed.getTime()) ? null : parsed;
|
|
29
|
+
}
|
|
30
|
+
/** Appends `Z` to a bare wall-clock string that lacks any zone suffix, leaving zoned strings untouched. */
|
|
31
|
+
function ensureUtcSuffix(raw) {
|
|
32
|
+
return /[zZ]$|[+-]\d{2}:?\d{2}$/.test(raw) ? raw : `${raw}Z`;
|
|
33
|
+
}
|
|
34
|
+
/** Maps a Graph attendee `status.response` to the normalized {@link CalendarInviteAttendee.ResponseStatus}. */
|
|
35
|
+
export function mapGraphResponseStatus(response) {
|
|
36
|
+
switch ((response ?? '').trim().toLowerCase()) {
|
|
37
|
+
case 'accepted':
|
|
38
|
+
case 'organizer':
|
|
39
|
+
return 'Accepted';
|
|
40
|
+
case 'declined':
|
|
41
|
+
return 'Declined';
|
|
42
|
+
case 'tentativelyaccepted':
|
|
43
|
+
return 'Tentative';
|
|
44
|
+
case 'notresponded':
|
|
45
|
+
case 'none':
|
|
46
|
+
return 'NeedsAction';
|
|
47
|
+
default:
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* **Pure** extraction of an online-meeting join URL from a Graph event. Prefers the structured
|
|
53
|
+
* `onlineMeeting.joinUrl`, then the legacy flat `onlineMeetingUrl`, then the first Teams `meetup-join`
|
|
54
|
+
* URL found in the event body (HTML or text). Returns `undefined` when no join URL is present.
|
|
55
|
+
*/
|
|
56
|
+
export function extractGraphJoinUrl(event) {
|
|
57
|
+
const structured = event.onlineMeeting?.joinUrl?.trim() || event.onlineMeetingUrl?.trim();
|
|
58
|
+
if (structured) {
|
|
59
|
+
return structured;
|
|
60
|
+
}
|
|
61
|
+
return extractJoinUrlFromText(event.body?.content);
|
|
62
|
+
}
|
|
63
|
+
/** Best-effort first online-meeting join URL embedded in a free-text/HTML body. Never throws. */
|
|
64
|
+
function extractJoinUrlFromText(content) {
|
|
65
|
+
if (!content) {
|
|
66
|
+
return undefined;
|
|
67
|
+
}
|
|
68
|
+
const match = content.match(/https?:\/\/[^\s"'<>]*(?:teams\.microsoft\.com\/l\/meetup-join|meet\.google\.com|zoom\.us\/j)[^\s"'<>]*/i);
|
|
69
|
+
return match ? match[0] : undefined;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* **Pure** normalization of one Graph calendar event to a {@link NormalizedCalendarInvite}. Skips
|
|
73
|
+
* (returns `null`) an event with no id or no resolvable start time, so the caller can drop it cleanly.
|
|
74
|
+
*/
|
|
75
|
+
export function normalizeGraphEvent(event) {
|
|
76
|
+
const start = parseGraphDateTime(event.start);
|
|
77
|
+
if (!event.id || !start) {
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
const attendees = (event.attendees ?? [])
|
|
81
|
+
.map(toNormalizedAttendee)
|
|
82
|
+
.filter((a) => a !== null);
|
|
83
|
+
const organizerEmail = event.organizer?.emailAddress?.address?.trim();
|
|
84
|
+
const end = parseGraphDateTime(event.end);
|
|
85
|
+
return {
|
|
86
|
+
ExternalEventID: event.id,
|
|
87
|
+
...(event.subject ? { Subject: event.subject } : {}),
|
|
88
|
+
...(extractGraphJoinUrl(event) ? { JoinUrl: extractGraphJoinUrl(event) } : {}),
|
|
89
|
+
StartTime: start,
|
|
90
|
+
...(end ? { EndTime: end } : {}),
|
|
91
|
+
Attendees: attendees,
|
|
92
|
+
...(organizerEmail
|
|
93
|
+
? {
|
|
94
|
+
Organizer: {
|
|
95
|
+
Email: organizerEmail,
|
|
96
|
+
...(event.organizer?.emailAddress?.name
|
|
97
|
+
? { DisplayName: event.organizer.emailAddress.name }
|
|
98
|
+
: {}),
|
|
99
|
+
},
|
|
100
|
+
}
|
|
101
|
+
: {}),
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
/** Maps one Graph attendee to a normalized attendee, or `null` when it carries no email address. */
|
|
105
|
+
function toNormalizedAttendee(attendee) {
|
|
106
|
+
const email = attendee.emailAddress?.address?.trim();
|
|
107
|
+
if (!email) {
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
110
|
+
const responseStatus = mapGraphResponseStatus(attendee.status?.response);
|
|
111
|
+
return {
|
|
112
|
+
Email: email,
|
|
113
|
+
...(attendee.emailAddress?.name ? { DisplayName: attendee.emailAddress.name } : {}),
|
|
114
|
+
...(responseStatus ? { ResponseStatus: responseStatus } : {}),
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* **Production binding** for Microsoft Graph calendars over an injected {@link IGraphCalendarLike}
|
|
119
|
+
* surface, so it builds + unit-tests with no Graph SDK install and no network.
|
|
15
120
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* `start.dateTime`+`start.timeZone` → UTC `StartTime`) and carry the Graph `@odata.deltaLink` as the
|
|
22
|
-
* cursor.
|
|
121
|
+
* Pages a Graph delta poll: starting from `sinceCursor` (a prior `@odata.deltaLink`), it follows
|
|
122
|
+
* `@odata.nextLink` page-to-page, normalizing every event via {@link normalizeGraphEvent}, until the
|
|
123
|
+
* surface returns a `@odata.deltaLink` — which becomes the {@link CalendarPollResult.NextCursor} for the
|
|
124
|
+
* next poll. Credentials are resolved upstream (the host binds {@link IGraphCalendarLike} with a Graph
|
|
125
|
+
* client authenticated from the provider `Configuration` via MJ's credential system — never inline).
|
|
23
126
|
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
127
|
+
* When no surface is supplied it preserves the original not-bound behavior, throwing
|
|
128
|
+
* {@link CalendarSourceNotBoundError} so a misconfigured deployment fails loudly.
|
|
26
129
|
*
|
|
27
|
-
* @remarks **TODO (production):** bind `@microsoft/microsoft-graph-client` (an
|
|
28
|
-
* loaded only when a Graph-backed identity is configured),
|
|
29
|
-
*
|
|
130
|
+
* @remarks **TODO (production):** bind `@microsoft/microsoft-graph-client` (an optionalDependency,
|
|
131
|
+
* loaded only when a Graph-backed identity is configured), request UTC via
|
|
132
|
+
* `Prefer: outlook.timezone="UTC"`, and inject it as {@link IGraphCalendarLike}.
|
|
30
133
|
*/
|
|
31
134
|
export class GraphCalendarSource {
|
|
135
|
+
/**
|
|
136
|
+
* @param graph The injected Graph calendar surface. Omit to preserve the not-bound seam behavior
|
|
137
|
+
* (every poll throws {@link CalendarSourceNotBoundError}).
|
|
138
|
+
*/
|
|
139
|
+
constructor(graph) {
|
|
140
|
+
this.graph = graph;
|
|
141
|
+
}
|
|
32
142
|
/** @inheritdoc */
|
|
33
|
-
async ListUpcomingInvites(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
143
|
+
async ListUpcomingInvites(identityValue, sinceCursor) {
|
|
144
|
+
if (!this.graph) {
|
|
145
|
+
throw new CalendarSourceNotBoundError('Microsoft Graph');
|
|
146
|
+
}
|
|
147
|
+
const invites = [];
|
|
148
|
+
let cursor = sinceCursor;
|
|
149
|
+
let nextCursor;
|
|
150
|
+
// Follow @odata.nextLink within the poll; stop once a @odata.deltaLink (the next poll's cursor)
|
|
151
|
+
// is returned. A defensive page cap guards a misbehaving surface from an unbounded loop.
|
|
152
|
+
for (let page = 0; page < MAX_GRAPH_PAGES; page++) {
|
|
153
|
+
const result = await this.graph.listEvents(identityValue, cursor);
|
|
154
|
+
for (const event of result.value ?? []) {
|
|
155
|
+
const invite = normalizeGraphEvent(event);
|
|
156
|
+
if (invite) {
|
|
157
|
+
invites.push(invite);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
if (result.deltaLink) {
|
|
161
|
+
nextCursor = result.deltaLink;
|
|
162
|
+
break;
|
|
163
|
+
}
|
|
164
|
+
if (!result.nextLink) {
|
|
165
|
+
break; // no further pages and no delta link — leave the stored cursor unchanged.
|
|
166
|
+
}
|
|
167
|
+
cursor = result.nextLink;
|
|
168
|
+
}
|
|
169
|
+
return { Invites: invites, ...(nextCursor ? { NextCursor: nextCursor } : {}) };
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
/** Defensive cap on Graph delta pages followed in a single poll (guards a misbehaving surface). */
|
|
173
|
+
const MAX_GRAPH_PAGES = 1000;
|
|
174
|
+
/**
|
|
175
|
+
* **Pure** parse of a Google {@link GoogleEventDateTime} to a UTC {@link Date}. Uses the RFC3339
|
|
176
|
+
* `dateTime` (which carries its own offset) when present, else an all-day `date` as UTC midnight.
|
|
177
|
+
* Returns `null` on absent/invalid.
|
|
178
|
+
*/
|
|
179
|
+
export function parseGoogleDateTime(value) {
|
|
180
|
+
const timed = value?.dateTime?.trim();
|
|
181
|
+
if (timed) {
|
|
182
|
+
const parsed = new Date(timed);
|
|
183
|
+
return Number.isNaN(parsed.getTime()) ? null : parsed;
|
|
184
|
+
}
|
|
185
|
+
const allDay = value?.date?.trim();
|
|
186
|
+
if (allDay) {
|
|
187
|
+
const parsed = new Date(`${allDay}T00:00:00Z`);
|
|
188
|
+
return Number.isNaN(parsed.getTime()) ? null : parsed;
|
|
189
|
+
}
|
|
190
|
+
return null;
|
|
191
|
+
}
|
|
192
|
+
/** Maps a Google `responseStatus` to the normalized {@link CalendarInviteAttendee.ResponseStatus}. */
|
|
193
|
+
export function mapGoogleResponseStatus(response) {
|
|
194
|
+
switch ((response ?? '').trim().toLowerCase()) {
|
|
195
|
+
case 'accepted':
|
|
196
|
+
return 'Accepted';
|
|
197
|
+
case 'declined':
|
|
198
|
+
return 'Declined';
|
|
199
|
+
case 'tentative':
|
|
200
|
+
return 'Tentative';
|
|
201
|
+
case 'needsaction':
|
|
202
|
+
return 'NeedsAction';
|
|
203
|
+
default:
|
|
204
|
+
return undefined;
|
|
37
205
|
}
|
|
38
206
|
}
|
|
39
207
|
/**
|
|
40
|
-
* **
|
|
208
|
+
* **Pure** extraction of the Meet/online-meeting join URL from a Google event. Prefers the first
|
|
209
|
+
* `video` entry-point in `conferenceData`, then the legacy `hangoutLink`. Returns `undefined` when no
|
|
210
|
+
* video conferencing is attached.
|
|
211
|
+
*/
|
|
212
|
+
export function extractGoogleJoinUrl(event) {
|
|
213
|
+
const video = (event.conferenceData?.entryPoints ?? []).find((e) => (e.entryPointType ?? '').trim().toLowerCase() === 'video' && !!e.uri?.trim());
|
|
214
|
+
return video?.uri?.trim() || event.hangoutLink?.trim() || undefined;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* **Pure** normalization of one Google calendar event to a {@link NormalizedCalendarInvite}. Skips
|
|
218
|
+
* (returns `null`) a cancelled event or one with no id or no resolvable start time.
|
|
219
|
+
*/
|
|
220
|
+
export function normalizeGoogleEvent(event) {
|
|
221
|
+
if ((event.status ?? '').trim().toLowerCase() === 'cancelled') {
|
|
222
|
+
return null;
|
|
223
|
+
}
|
|
224
|
+
const start = parseGoogleDateTime(event.start);
|
|
225
|
+
if (!event.id || !start) {
|
|
226
|
+
return null;
|
|
227
|
+
}
|
|
228
|
+
const attendees = (event.attendees ?? [])
|
|
229
|
+
.map(toNormalizedGoogleAttendee)
|
|
230
|
+
.filter((a) => a !== null);
|
|
231
|
+
const organizerEmail = event.organizer?.email?.trim();
|
|
232
|
+
const joinUrl = extractGoogleJoinUrl(event);
|
|
233
|
+
const end = parseGoogleDateTime(event.end);
|
|
234
|
+
return {
|
|
235
|
+
ExternalEventID: event.id,
|
|
236
|
+
...(event.summary ? { Subject: event.summary } : {}),
|
|
237
|
+
...(joinUrl ? { JoinUrl: joinUrl } : {}),
|
|
238
|
+
StartTime: start,
|
|
239
|
+
...(end ? { EndTime: end } : {}),
|
|
240
|
+
Attendees: attendees,
|
|
241
|
+
...(organizerEmail
|
|
242
|
+
? {
|
|
243
|
+
Organizer: {
|
|
244
|
+
Email: organizerEmail,
|
|
245
|
+
...(event.organizer?.displayName ? { DisplayName: event.organizer.displayName } : {}),
|
|
246
|
+
},
|
|
247
|
+
}
|
|
248
|
+
: {}),
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
/** Maps one Google attendee to a normalized attendee, or `null` when it carries no email address. */
|
|
252
|
+
function toNormalizedGoogleAttendee(attendee) {
|
|
253
|
+
const email = attendee.email?.trim();
|
|
254
|
+
if (!email) {
|
|
255
|
+
return null;
|
|
256
|
+
}
|
|
257
|
+
const responseStatus = mapGoogleResponseStatus(attendee.responseStatus);
|
|
258
|
+
return {
|
|
259
|
+
Email: email,
|
|
260
|
+
...(attendee.displayName ? { DisplayName: attendee.displayName } : {}),
|
|
261
|
+
...(responseStatus ? { ResponseStatus: responseStatus } : {}),
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* **Production binding** for Google Calendar over an injected {@link IGoogleCalendarLike} surface, so
|
|
266
|
+
* it builds + unit-tests with no `googleapis` install and no network.
|
|
41
267
|
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* `start.dateTime` → UTC `StartTime`) and carries the Google `nextSyncToken` as the cursor.
|
|
268
|
+
* Pages an incremental sync: starting from `sinceCursor` (a prior `nextSyncToken`), it follows
|
|
269
|
+
* `nextPageToken` page-to-page, normalizing every event via {@link normalizeGoogleEvent}, until the
|
|
270
|
+
* surface returns a `nextSyncToken` — which becomes the {@link CalendarPollResult.NextCursor}.
|
|
271
|
+
* Credentials are resolved upstream (the host binds {@link IGoogleCalendarLike} with a Calendar client
|
|
272
|
+
* authenticated from the provider `Configuration` via MJ's credential system — never inline).
|
|
48
273
|
*
|
|
49
|
-
*
|
|
274
|
+
* When no surface is supplied it preserves the original not-bound behavior, throwing
|
|
275
|
+
* {@link CalendarSourceNotBoundError}.
|
|
50
276
|
*
|
|
51
|
-
* @remarks **TODO (production):** bind `googleapis` (an
|
|
52
|
-
* Google-backed identity is configured)
|
|
53
|
-
* normalization. Keep this class as the seam.
|
|
277
|
+
* @remarks **TODO (production):** bind `googleapis` (an optionalDependency, loaded only when a
|
|
278
|
+
* Google-backed identity is configured) and inject it as {@link IGoogleCalendarLike}.
|
|
54
279
|
*/
|
|
55
280
|
export class GoogleCalendarSource {
|
|
281
|
+
/**
|
|
282
|
+
* @param calendar The injected Google calendar surface. Omit to preserve the not-bound seam
|
|
283
|
+
* behavior (every poll throws {@link CalendarSourceNotBoundError}).
|
|
284
|
+
*/
|
|
285
|
+
constructor(calendar) {
|
|
286
|
+
this.calendar = calendar;
|
|
287
|
+
}
|
|
56
288
|
/** @inheritdoc */
|
|
57
|
-
async ListUpcomingInvites(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
289
|
+
async ListUpcomingInvites(identityValue, sinceCursor) {
|
|
290
|
+
if (!this.calendar) {
|
|
291
|
+
throw new CalendarSourceNotBoundError('Google Calendar');
|
|
292
|
+
}
|
|
293
|
+
const invites = [];
|
|
294
|
+
let pageToken;
|
|
295
|
+
let nextCursor;
|
|
296
|
+
for (let page = 0; page < MAX_GOOGLE_PAGES; page++) {
|
|
297
|
+
// syncToken and pageToken are mutually exclusive: use the sync token only on the first
|
|
298
|
+
// request of a poll, then switch to page tokens for in-poll continuation.
|
|
299
|
+
const args = pageToken !== undefined
|
|
300
|
+
? { calendarId: identityValue, pageToken }
|
|
301
|
+
: { calendarId: identityValue, ...(sinceCursor ? { syncToken: sinceCursor } : {}) };
|
|
302
|
+
const result = await this.calendar.listEvents(args);
|
|
303
|
+
for (const event of result.items ?? []) {
|
|
304
|
+
const invite = normalizeGoogleEvent(event);
|
|
305
|
+
if (invite) {
|
|
306
|
+
invites.push(invite);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
if (result.nextPageToken) {
|
|
310
|
+
pageToken = result.nextPageToken;
|
|
311
|
+
continue;
|
|
312
|
+
}
|
|
313
|
+
nextCursor = result.nextSyncToken; // final page carries the sync token for the next poll.
|
|
314
|
+
break;
|
|
315
|
+
}
|
|
316
|
+
return { Invites: invites, ...(nextCursor ? { NextCursor: nextCursor } : {}) };
|
|
61
317
|
}
|
|
62
318
|
}
|
|
319
|
+
/** Defensive cap on Google page-token follows in a single poll (guards a misbehaving surface). */
|
|
320
|
+
const MAX_GOOGLE_PAGES = 1000;
|
|
63
321
|
//# sourceMappingURL=calendar-source.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-source.js","sourceRoot":"","sources":["../src/calendar-source.ts"],"names":[],"mappings":"AA0GA;;;;GAIG;AACH,MAAM,OAAO,2BAA4B,SAAQ,KAAK;IAClD,YAAY,aAAqB;QAC7B,KAAK,CACD,wBAAwB,aAAa,kBAAkB;YACnD,iBAAiB,aAAa,qDAAqD,CAC1F,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,6BAA6B,CAAC;IAC9C,CAAC;CACJ;AAED
|
|
1
|
+
{"version":3,"file":"calendar-source.js","sourceRoot":"","sources":["../src/calendar-source.ts"],"names":[],"mappings":"AA0GA;;;;GAIG;AACH,MAAM,OAAO,2BAA4B,SAAQ,KAAK;IAClD,YAAY,aAAqB;QAC7B,KAAK,CACD,wBAAwB,aAAa,kBAAkB;YACnD,iBAAiB,aAAa,qDAAqD,CAC1F,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,6BAA6B,CAAC;IAC9C,CAAC;CACJ;AAgGD;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAA6B;IAC5D,MAAM,GAAG,GAAG,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACpC,IAAI,CAAC,GAAG,EAAE,CAAC;QACP,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,MAAM,IAAI,GAAG,CAAC,KAAK,EAAE,QAAQ,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC1D,MAAM,aAAa,GAAG,yBAAyB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC1D,MAAM,GAAG,GAAG,aAAa,IAAI,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC;IAC9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A8B,CAAC;QACnC,KAAK,IAAI,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,gBAAgB,EAAE,IAAI,EAAE,EAAE,CAAC;YACjD,uFAAuF;YACvF,0EAA0E;YAC1E,MAAM,IAAI,GACN,SAAS,KAAK,SAAS;gBACnB,CAAC,CAAC,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE;gBAC1C,CAAC,CAAC,EAAE,UAAU,EAAE,aAAa,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;YAC5F,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YACpD,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,KAAK,IAAI,EAAE,EAAE,CAAC;gBACrC,MAAM,MAAM,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC;gBAC3C,IAAI,MAAM,EAAE,CAAC;oBACT,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBACzB,CAAC;YACL,CAAC;YACD,IAAI,MAAM,CAAC,aAAa,EAAE,CAAC;gBACvB,SAAS,GAAG,MAAM,CAAC,aAAa,CAAC;gBACjC,SAAS;YACb,CAAC;YACD,UAAU,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC,uDAAuD;YAC1F,MAAM;QACV,CAAC;QACD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IACnF,CAAC;CACJ;AAED,kGAAkG;AAClG,MAAM,gBAAgB,GAAG,IAAI,CAAC"}
|
|
@@ -72,26 +72,154 @@ export interface IAgentIdentityProvisioner {
|
|
|
72
72
|
export declare class IdentityProvisionerNotBoundError extends Error {
|
|
73
73
|
constructor(target: string);
|
|
74
74
|
}
|
|
75
|
+
/** The Microsoft Graph `POST /users` create-mailbox payload (the subset we construct). */
|
|
76
|
+
export interface GraphCreateMailboxPayload {
|
|
77
|
+
/** The mailbox UPN/address to create (`user.userPrincipalName` + `mailNickname`). */
|
|
78
|
+
UserPrincipalName: string;
|
|
79
|
+
/** The mailbox local part (`mailNickname`) derived from the address. */
|
|
80
|
+
MailNickname: string;
|
|
81
|
+
/** The display name shown in the directory + on calendar invites. */
|
|
82
|
+
DisplayName: string;
|
|
83
|
+
/** The Azure tenant id the mailbox is created in, when supplied via request `Configuration.TenantId`. */
|
|
84
|
+
TenantId?: string;
|
|
85
|
+
/** The directory OU/usage-location hint, when supplied via request `Configuration.UsageLocation`. */
|
|
86
|
+
UsageLocation?: string;
|
|
87
|
+
}
|
|
88
|
+
/** The Google Workspace Admin `directory.users.insert` create-mailbox payload (the subset we construct). */
|
|
89
|
+
export interface GoogleWorkspaceCreateMailboxPayload {
|
|
90
|
+
/** The primary email to create (`primaryEmail`). */
|
|
91
|
+
PrimaryEmail: string;
|
|
92
|
+
/** The display name (`name.fullName`). */
|
|
93
|
+
DisplayName: string;
|
|
94
|
+
/** The Workspace customer/domain the mailbox belongs to, from `Configuration.Domain`. */
|
|
95
|
+
Domain?: string;
|
|
96
|
+
/** The org unit path, when supplied via `Configuration.OrgUnitPath`. */
|
|
97
|
+
OrgUnitPath?: string;
|
|
98
|
+
}
|
|
99
|
+
/** The telephony-carrier number-order payload (the subset we construct). */
|
|
100
|
+
export interface CarrierNumberOrderPayload {
|
|
101
|
+
/** The desired E.164 number when the caller pre-selected one (`RequestedValue`); else carrier allocates. */
|
|
102
|
+
RequestedNumber?: string;
|
|
103
|
+
/** The region/area hint for allocation (`Configuration.Region`, e.g. `US`, `US-415`). */
|
|
104
|
+
Region?: string;
|
|
105
|
+
/** The label the carrier records against the number (the agent display name). */
|
|
106
|
+
Label: string;
|
|
107
|
+
}
|
|
108
|
+
/** What {@link IGraphAdminLike.CreateMailbox} resolves to — the created mailbox address + directory id. */
|
|
109
|
+
export interface GraphCreateMailboxResult {
|
|
110
|
+
/** The provisioned mailbox address (the identity value). */
|
|
111
|
+
UserPrincipalName: string;
|
|
112
|
+
/** The Graph directory object id of the created user. */
|
|
113
|
+
ObjectId: string;
|
|
114
|
+
}
|
|
115
|
+
/** What {@link IGoogleWorkspaceAdminLike.CreateMailbox} resolves to — the created address + directory id. */
|
|
116
|
+
export interface GoogleWorkspaceCreateMailboxResult {
|
|
117
|
+
/** The provisioned primary email (the identity value). */
|
|
118
|
+
PrimaryEmail: string;
|
|
119
|
+
/** The Workspace directory user id of the created user. */
|
|
120
|
+
UserId: string;
|
|
121
|
+
}
|
|
122
|
+
/** What {@link ITelephonyCarrierLike.OrderNumber} resolves to — the allocated number + carrier order id. */
|
|
123
|
+
export interface CarrierNumberOrderResult {
|
|
124
|
+
/** The provisioned E.164 phone number (the identity value). */
|
|
125
|
+
PhoneNumber: string;
|
|
126
|
+
/** The carrier's order/reference id for the allocation. */
|
|
127
|
+
OrderId: string;
|
|
128
|
+
}
|
|
75
129
|
/**
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
130
|
+
* The minimal Microsoft Graph admin surface for mailbox provisioning. A production wiring implements
|
|
131
|
+
* this over `@microsoft/microsoft-graph-client` (`Client.api('/users').post(...)`) with an admin
|
|
132
|
+
* credential resolved from the provider `Configuration`. NO Graph SDK types leak through.
|
|
133
|
+
*/
|
|
134
|
+
export interface IGraphAdminLike {
|
|
135
|
+
/** Creates a tenant mailbox/calendar user; resolves the created address + directory object id. */
|
|
136
|
+
CreateMailbox(payload: GraphCreateMailboxPayload): Promise<GraphCreateMailboxResult>;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* The minimal Google Workspace Admin surface for mailbox provisioning. A production wiring implements
|
|
140
|
+
* this over `googleapis` (`admin.users.insert(...)`) with an admin credential resolved from the
|
|
141
|
+
* provider `Configuration`. NO googleapis types leak through.
|
|
142
|
+
*/
|
|
143
|
+
export interface IGoogleWorkspaceAdminLike {
|
|
144
|
+
/** Creates a Workspace mailbox/calendar user; resolves the created address + directory user id. */
|
|
145
|
+
CreateMailbox(payload: GoogleWorkspaceCreateMailboxPayload): Promise<GoogleWorkspaceCreateMailboxResult>;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* The minimal telephony-carrier surface for DID provisioning. A production wiring implements this over
|
|
149
|
+
* the carrier's number-ordering API (e.g. Twilio `incomingPhoneNumbers.create`) with a credential
|
|
150
|
+
* resolved from the provider `Configuration`. NO carrier SDK types leak through.
|
|
151
|
+
*/
|
|
152
|
+
export interface ITelephonyCarrierLike {
|
|
153
|
+
/** Orders/allocates an inbound DID; resolves the allocated E.164 number + the carrier order id. */
|
|
154
|
+
OrderNumber(payload: CarrierNumberOrderPayload): Promise<CarrierNumberOrderResult>;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* **Pure** mapping of a provisioning request to the Graph create-mailbox payload. Derives the
|
|
158
|
+
* `MailNickname` from the local part of the requested address. Throws when no `RequestedValue` is
|
|
159
|
+
* supplied — a Graph mailbox must be created at a known address (Graph does not allocate one).
|
|
160
|
+
*/
|
|
161
|
+
export declare function buildGraphMailboxPayload(request: AgentIdentityProvisionRequest): GraphCreateMailboxPayload;
|
|
162
|
+
/**
|
|
163
|
+
* **Pure** mapping of a provisioning request to the Google Workspace create-mailbox payload. Throws
|
|
164
|
+
* when no `RequestedValue` is supplied — a Workspace user is created at a known primary email.
|
|
165
|
+
*/
|
|
166
|
+
export declare function buildGoogleWorkspaceMailboxPayload(request: AgentIdentityProvisionRequest): GoogleWorkspaceCreateMailboxPayload;
|
|
167
|
+
/**
|
|
168
|
+
* **Pure** mapping of a provisioning request to the carrier number-order payload. A DID is allocatable
|
|
169
|
+
* by the carrier, so `RequestedValue` is optional (when omitted, the carrier picks from its pool).
|
|
170
|
+
*/
|
|
171
|
+
export declare function buildCarrierNumberOrderPayload(request: AgentIdentityProvisionRequest): CarrierNumberOrderPayload;
|
|
172
|
+
/** The injected admin surfaces a {@link StubAgentIdentityProvisioner} binds. All optional. */
|
|
173
|
+
export interface AgentIdentityProvisionerOptions {
|
|
174
|
+
/** The Microsoft Graph admin surface — bound when Graph (`Email`) provisioning is configured. */
|
|
175
|
+
Graph?: IGraphAdminLike;
|
|
176
|
+
/** The Google Workspace Admin surface — bound when Workspace (`Email`) provisioning is configured. */
|
|
177
|
+
GoogleWorkspace?: IGoogleWorkspaceAdminLike;
|
|
178
|
+
/** The telephony-carrier surface — bound when carrier (`PhoneNumber`) provisioning is configured. */
|
|
179
|
+
Carrier?: ITelephonyCarrierLike;
|
|
180
|
+
/**
|
|
181
|
+
* Which mailbox directory to use for `IdentityType='Email'` when both Graph and Workspace are bound.
|
|
182
|
+
* Defaults to `'Graph'`. A host with only one mailbox surface bound need not set this.
|
|
183
|
+
*/
|
|
184
|
+
EmailDirectory?: 'Graph' | 'GoogleWorkspace';
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* **Provisioner over injected admin surfaces.** Implements {@link IAgentIdentityProvisioner} for the
|
|
188
|
+
* §1e identity types — Graph mailbox/`Email`, Google Workspace `Email`, and the telephony carrier
|
|
189
|
+
* `PhoneNumber` path — each over an injected admin surface so the package builds + unit-tests with no
|
|
190
|
+
* admin-SDK install and no network. Pure request→payload mapping lives in the `build*Payload` helpers;
|
|
191
|
+
* this class only routes by `IdentityType`, calls the surface, and shapes the
|
|
192
|
+
* {@link AgentIdentityProvisionResult} the existing {@link ApplyProvisionResultToIdentity} consumes.
|
|
83
193
|
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
194
|
+
* When the surface required for a request's `IdentityType` is **not** bound, it preserves the original
|
|
195
|
+
* seam behavior — throwing {@link IdentityProvisionerNotBoundError} so a misconfigured deployment fails
|
|
196
|
+
* loudly rather than silently never provisioning. Constructing it with no options reproduces the prior
|
|
197
|
+
* "throws for every type" stub exactly.
|
|
87
198
|
*
|
|
88
|
-
* @remarks **TODO (production):**
|
|
89
|
-
*
|
|
90
|
-
*
|
|
199
|
+
* @remarks **TODO (production):** bind `@microsoft/microsoft-graph-client` / `googleapis` / the carrier
|
|
200
|
+
* SDK (all optionalDependencies), resolve the admin credential from the provider `Configuration` via
|
|
201
|
+
* MJ's credential system, and inject them as the {@link AgentIdentityProvisionerOptions} surfaces.
|
|
91
202
|
*/
|
|
92
203
|
export declare class StubAgentIdentityProvisioner implements IAgentIdentityProvisioner {
|
|
204
|
+
private readonly graph?;
|
|
205
|
+
private readonly googleWorkspace?;
|
|
206
|
+
private readonly carrier?;
|
|
207
|
+
private readonly emailDirectory;
|
|
208
|
+
/**
|
|
209
|
+
* @param options The injected admin surfaces. Omit any (or all) to preserve the not-bound seam
|
|
210
|
+
* behavior for that identity type.
|
|
211
|
+
*/
|
|
212
|
+
constructor(options?: AgentIdentityProvisionerOptions);
|
|
93
213
|
/** @inheritdoc */
|
|
94
214
|
Provision(request: AgentIdentityProvisionRequest): Promise<AgentIdentityProvisionResult>;
|
|
215
|
+
/** Routes `Email` provisioning to whichever mailbox directory is configured/bound. */
|
|
216
|
+
private provisionMailbox;
|
|
217
|
+
/** Provisions a Graph mailbox over the injected Graph admin surface. */
|
|
218
|
+
private provisionGraphMailbox;
|
|
219
|
+
/** Provisions a Google Workspace mailbox over the injected Workspace admin surface. */
|
|
220
|
+
private provisionGoogleWorkspaceMailbox;
|
|
221
|
+
/** Provisions a DID over the injected telephony-carrier surface. */
|
|
222
|
+
private provisionPhoneNumber;
|
|
95
223
|
/** Maps an identity type to the admin surface label used in the not-bound error. */
|
|
96
224
|
private targetLabel;
|
|
97
225
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity-provisioner.d.ts","sourceRoot":"","sources":["../src/identity-provisioner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,+B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