@contractspec/integration.providers-impls 1.57.0 → 1.59.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/analytics.d.ts +1 -8
- package/dist/analytics.d.ts.map +1 -1
- package/dist/analytics.js +3 -3
- package/dist/calendar.d.ts +1 -8
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +3 -3
- package/dist/database.d.ts +1 -8
- package/dist/database.d.ts.map +1 -1
- package/dist/database.js +3 -3
- package/dist/email.d.ts +1 -8
- package/dist/email.d.ts.map +1 -1
- package/dist/email.js +3 -3
- package/dist/embedding.d.ts +1 -8
- package/dist/embedding.d.ts.map +1 -1
- package/dist/embedding.js +3 -3
- package/dist/impls/elevenlabs-voice.d.ts +14 -18
- package/dist/impls/elevenlabs-voice.d.ts.map +1 -1
- package/dist/impls/elevenlabs-voice.js +98 -88
- package/dist/impls/fal-voice.d.ts +22 -26
- package/dist/impls/fal-voice.d.ts.map +1 -1
- package/dist/impls/fal-voice.js +103 -78
- package/dist/impls/fathom-meeting-recorder.d.ts +35 -39
- package/dist/impls/fathom-meeting-recorder.d.ts.map +1 -1
- package/dist/impls/fathom-meeting-recorder.js +285 -142
- package/dist/impls/fathom-meeting-recorder.mapper.d.ts +4 -8
- package/dist/impls/fathom-meeting-recorder.mapper.d.ts.map +1 -1
- package/dist/impls/fathom-meeting-recorder.mapper.js +102 -38
- package/dist/impls/fathom-meeting-recorder.types.d.ts +16 -20
- package/dist/impls/fathom-meeting-recorder.types.d.ts.map +1 -1
- package/dist/impls/fathom-meeting-recorder.types.js +1 -0
- package/dist/impls/fathom-meeting-recorder.utils.d.ts +10 -14
- package/dist/impls/fathom-meeting-recorder.utils.d.ts.map +1 -1
- package/dist/impls/fathom-meeting-recorder.utils.js +58 -41
- package/dist/impls/fathom-meeting-recorder.webhooks.d.ts +3 -7
- package/dist/impls/fathom-meeting-recorder.webhooks.d.ts.map +1 -1
- package/dist/impls/fathom-meeting-recorder.webhooks.js +25 -20
- package/dist/impls/fireflies-meeting-recorder.d.ts +21 -25
- package/dist/impls/fireflies-meeting-recorder.d.ts.map +1 -1
- package/dist/impls/fireflies-meeting-recorder.js +272 -149
- package/dist/impls/fireflies-meeting-recorder.queries.d.ts +3 -6
- package/dist/impls/fireflies-meeting-recorder.queries.d.ts.map +1 -1
- package/dist/impls/fireflies-meeting-recorder.queries.js +10 -8
- package/dist/impls/fireflies-meeting-recorder.types.d.ts +26 -29
- package/dist/impls/fireflies-meeting-recorder.types.d.ts.map +1 -1
- package/dist/impls/fireflies-meeting-recorder.types.js +1 -0
- package/dist/impls/fireflies-meeting-recorder.utils.d.ts +4 -7
- package/dist/impls/fireflies-meeting-recorder.utils.d.ts.map +1 -1
- package/dist/impls/fireflies-meeting-recorder.utils.js +34 -27
- package/dist/impls/gcs-storage.d.ts +18 -22
- package/dist/impls/gcs-storage.d.ts.map +1 -1
- package/dist/impls/gcs-storage.js +92 -84
- package/dist/impls/gmail-inbound.d.ts +20 -24
- package/dist/impls/gmail-inbound.d.ts.map +1 -1
- package/dist/impls/gmail-inbound.js +212 -185
- package/dist/impls/gmail-outbound.d.ts +12 -16
- package/dist/impls/gmail-outbound.d.ts.map +1 -1
- package/dist/impls/gmail-outbound.js +126 -92
- package/dist/impls/google-calendar.d.ts +17 -21
- package/dist/impls/google-calendar.d.ts.map +1 -1
- package/dist/impls/google-calendar.js +182 -145
- package/dist/impls/gradium-voice.d.ts +20 -22
- package/dist/impls/gradium-voice.d.ts.map +1 -1
- package/dist/impls/gradium-voice.js +85 -74
- package/dist/impls/granola-meeting-recorder.d.ts +31 -24
- package/dist/impls/granola-meeting-recorder.d.ts.map +1 -1
- package/dist/impls/granola-meeting-recorder.js +511 -143
- package/dist/impls/granola-meeting-recorder.mcp.d.ts +25 -0
- package/dist/impls/granola-meeting-recorder.mcp.d.ts.map +1 -0
- package/dist/impls/granola-meeting-recorder.mcp.js +279 -0
- package/dist/impls/granola-meeting-recorder.types.d.ts +60 -49
- package/dist/impls/granola-meeting-recorder.types.d.ts.map +1 -1
- package/dist/impls/granola-meeting-recorder.types.js +1 -0
- package/dist/impls/index.d.ts +28 -28
- package/dist/impls/index.d.ts.map +1 -0
- package/dist/impls/index.js +4659 -29
- package/dist/impls/jira.d.ts +18 -22
- package/dist/impls/jira.d.ts.map +1 -1
- package/dist/impls/jira.js +112 -101
- package/dist/impls/linear.d.ts +17 -21
- package/dist/impls/linear.d.ts.map +1 -1
- package/dist/impls/linear.js +78 -69
- package/dist/impls/mistral-embedding.d.ts +17 -21
- package/dist/impls/mistral-embedding.d.ts.map +1 -1
- package/dist/impls/mistral-embedding.js +41 -39
- package/dist/impls/mistral-llm.d.ts +25 -29
- package/dist/impls/mistral-llm.d.ts.map +1 -1
- package/dist/impls/mistral-llm.js +266 -244
- package/dist/impls/notion.d.ts +20 -24
- package/dist/impls/notion.d.ts.map +1 -1
- package/dist/impls/notion.js +145 -110
- package/dist/impls/posthog-reader.d.ts +18 -22
- package/dist/impls/posthog-reader.d.ts.map +1 -1
- package/dist/impls/posthog-reader.js +148 -129
- package/dist/impls/posthog-utils.d.ts +4 -7
- package/dist/impls/posthog-utils.d.ts.map +1 -1
- package/dist/impls/posthog-utils.js +31 -22
- package/dist/impls/posthog.d.ts +33 -37
- package/dist/impls/posthog.d.ts.map +1 -1
- package/dist/impls/posthog.js +320 -119
- package/dist/impls/postmark-email.d.ts +13 -17
- package/dist/impls/postmark-email.d.ts.map +1 -1
- package/dist/impls/postmark-email.js +55 -50
- package/dist/impls/powens-client.d.ts +111 -114
- package/dist/impls/powens-client.d.ts.map +1 -1
- package/dist/impls/powens-client.js +194 -170
- package/dist/impls/powens-openbanking.d.ts +22 -26
- package/dist/impls/powens-openbanking.d.ts.map +1 -1
- package/dist/impls/powens-openbanking.js +425 -217
- package/dist/impls/provider-factory.d.ts +29 -33
- package/dist/impls/provider-factory.d.ts.map +1 -1
- package/dist/impls/provider-factory.js +4072 -275
- package/dist/impls/qdrant-vector.d.ts +18 -22
- package/dist/impls/qdrant-vector.d.ts.map +1 -1
- package/dist/impls/qdrant-vector.js +76 -69
- package/dist/impls/stripe-payments.d.ts +22 -26
- package/dist/impls/stripe-payments.d.ts.map +1 -1
- package/dist/impls/stripe-payments.js +219 -193
- package/dist/impls/supabase-psql.d.ts +21 -25
- package/dist/impls/supabase-psql.d.ts.map +1 -1
- package/dist/impls/supabase-psql.js +138 -98
- package/dist/impls/supabase-vector.d.ts +29 -33
- package/dist/impls/supabase-vector.d.ts.map +1 -1
- package/dist/impls/supabase-vector.js +278 -103
- package/dist/impls/tldv-meeting-recorder.d.ts +18 -22
- package/dist/impls/tldv-meeting-recorder.d.ts.map +1 -1
- package/dist/impls/tldv-meeting-recorder.js +142 -127
- package/dist/impls/twilio-sms.d.ts +14 -17
- package/dist/impls/twilio-sms.d.ts.map +1 -1
- package/dist/impls/twilio-sms.js +62 -55
- package/dist/index.d.ts +15 -64
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4700 -107
- package/dist/llm.d.ts +1 -8
- package/dist/llm.d.ts.map +1 -1
- package/dist/llm.js +3 -3
- package/dist/meeting-recorder.d.ts +1 -8
- package/dist/meeting-recorder.d.ts.map +1 -1
- package/dist/meeting-recorder.js +3 -3
- package/dist/node/analytics.js +2 -0
- package/dist/node/calendar.js +2 -0
- package/dist/node/database.js +2 -0
- package/dist/node/email.js +2 -0
- package/dist/node/embedding.js +2 -0
- package/dist/node/impls/elevenlabs-voice.js +102 -0
- package/dist/node/impls/fal-voice.js +112 -0
- package/dist/node/impls/fathom-meeting-recorder.js +287 -0
- package/dist/node/impls/fathom-meeting-recorder.mapper.js +105 -0
- package/dist/node/impls/fathom-meeting-recorder.types.js +0 -0
- package/dist/node/impls/fathom-meeting-recorder.utils.js +72 -0
- package/dist/node/impls/fathom-meeting-recorder.webhooks.js +29 -0
- package/dist/node/impls/fireflies-meeting-recorder.js +274 -0
- package/dist/node/impls/fireflies-meeting-recorder.queries.js +85 -0
- package/dist/node/impls/fireflies-meeting-recorder.types.js +0 -0
- package/dist/node/impls/fireflies-meeting-recorder.utils.js +42 -0
- package/dist/node/impls/gcs-storage.js +97 -0
- package/dist/node/impls/gmail-inbound.js +227 -0
- package/dist/node/impls/gmail-outbound.js +139 -0
- package/dist/node/impls/google-calendar.js +191 -0
- package/dist/node/impls/gradium-voice.js +90 -0
- package/dist/node/impls/granola-meeting-recorder.js +512 -0
- package/dist/node/impls/granola-meeting-recorder.mcp.js +278 -0
- package/dist/node/impls/granola-meeting-recorder.types.js +0 -0
- package/dist/node/impls/index.js +4658 -0
- package/dist/node/impls/jira.js +124 -0
- package/dist/node/impls/linear.js +83 -0
- package/dist/node/impls/mistral-embedding.js +43 -0
- package/dist/node/impls/mistral-llm.js +269 -0
- package/dist/node/impls/notion.js +160 -0
- package/dist/node/impls/posthog-reader.js +159 -0
- package/dist/node/impls/posthog-utils.js +38 -0
- package/dist/node/impls/posthog.js +322 -0
- package/dist/node/impls/postmark-email.js +60 -0
- package/dist/node/impls/powens-client.js +195 -0
- package/dist/node/impls/powens-openbanking.js +426 -0
- package/dist/node/impls/provider-factory.js +4080 -0
- package/dist/node/impls/qdrant-vector.js +78 -0
- package/dist/node/impls/stripe-payments.js +228 -0
- package/dist/node/impls/supabase-psql.js +150 -0
- package/dist/node/impls/supabase-vector.js +323 -0
- package/dist/node/impls/tldv-meeting-recorder.js +145 -0
- package/dist/node/impls/twilio-sms.js +65 -0
- package/dist/node/index.js +4699 -0
- package/dist/node/llm.js +2 -0
- package/dist/node/meeting-recorder.js +2 -0
- package/dist/node/openbanking.js +2 -0
- package/dist/node/payments.js +2 -0
- package/dist/node/project-management.js +2 -0
- package/dist/node/runtime.js +0 -0
- package/dist/node/secrets/provider.js +11 -0
- package/dist/node/sms.js +2 -0
- package/dist/node/storage.js +2 -0
- package/dist/node/vector-store.js +2 -0
- package/dist/node/voice.js +2 -0
- package/dist/openbanking.d.ts +1 -8
- package/dist/openbanking.d.ts.map +1 -1
- package/dist/openbanking.js +3 -3
- package/dist/payments.d.ts +1 -8
- package/dist/payments.d.ts.map +1 -1
- package/dist/payments.js +3 -3
- package/dist/project-management.d.ts +1 -8
- package/dist/project-management.d.ts.map +1 -1
- package/dist/project-management.js +3 -3
- package/dist/runtime.d.ts +2 -2
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +1 -0
- package/dist/secrets/provider.d.ts +3 -2
- package/dist/secrets/provider.d.ts.map +1 -0
- package/dist/secrets/provider.js +12 -3
- package/dist/sms.d.ts +1 -8
- package/dist/sms.d.ts.map +1 -1
- package/dist/sms.js +3 -3
- package/dist/storage.d.ts +1 -8
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +3 -3
- package/dist/vector-store.d.ts +1 -8
- package/dist/vector-store.d.ts.map +1 -1
- package/dist/vector-store.js +3 -3
- package/dist/voice.d.ts +1 -8
- package/dist/voice.d.ts.map +1 -1
- package/dist/voice.js +3 -3
- package/package.json +405 -114
- package/dist/_virtual/_rolldown/runtime.js +0 -36
- package/dist/impls/elevenlabs-voice.js.map +0 -1
- package/dist/impls/fal-voice.js.map +0 -1
- package/dist/impls/fathom-meeting-recorder.js.map +0 -1
- package/dist/impls/fathom-meeting-recorder.mapper.js.map +0 -1
- package/dist/impls/fathom-meeting-recorder.utils.js.map +0 -1
- package/dist/impls/fathom-meeting-recorder.webhooks.js.map +0 -1
- package/dist/impls/fireflies-meeting-recorder.js.map +0 -1
- package/dist/impls/fireflies-meeting-recorder.queries.js.map +0 -1
- package/dist/impls/fireflies-meeting-recorder.utils.js.map +0 -1
- package/dist/impls/gcs-storage.js.map +0 -1
- package/dist/impls/gmail-inbound.js.map +0 -1
- package/dist/impls/gmail-outbound.js.map +0 -1
- package/dist/impls/google-calendar.js.map +0 -1
- package/dist/impls/gradium-voice.js.map +0 -1
- package/dist/impls/granola-meeting-recorder.js.map +0 -1
- package/dist/impls/jira.js.map +0 -1
- package/dist/impls/linear.js.map +0 -1
- package/dist/impls/mistral-embedding.js.map +0 -1
- package/dist/impls/mistral-llm.js.map +0 -1
- package/dist/impls/notion.js.map +0 -1
- package/dist/impls/posthog-reader.js.map +0 -1
- package/dist/impls/posthog-utils.js.map +0 -1
- package/dist/impls/posthog.js.map +0 -1
- package/dist/impls/postmark-email.js.map +0 -1
- package/dist/impls/powens-client.js.map +0 -1
- package/dist/impls/powens-openbanking.js.map +0 -1
- package/dist/impls/provider-factory.js.map +0 -1
- package/dist/impls/qdrant-vector.js.map +0 -1
- package/dist/impls/stripe-payments.js.map +0 -1
- package/dist/impls/supabase-psql.js.map +0 -1
- package/dist/impls/supabase-vector.js.map +0 -1
- package/dist/impls/tldv-meeting-recorder.js.map +0 -1
- package/dist/impls/twilio-sms.js.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -1,42 +1,106 @@
|
|
|
1
|
-
|
|
1
|
+
// @bun
|
|
2
|
+
// src/impls/fathom-meeting-recorder.utils.ts
|
|
3
|
+
function extractItems(page) {
|
|
4
|
+
if (Array.isArray(page.items))
|
|
5
|
+
return page.items;
|
|
6
|
+
if (Array.isArray(page.data)) {
|
|
7
|
+
return page.data;
|
|
8
|
+
}
|
|
9
|
+
return [];
|
|
10
|
+
}
|
|
11
|
+
function extractNextCursor(page) {
|
|
12
|
+
return page.nextCursor ?? page.next_cursor ?? undefined;
|
|
13
|
+
}
|
|
14
|
+
function mapInvitee(invitee) {
|
|
15
|
+
const email = invitee.email;
|
|
16
|
+
const name = invitee.name;
|
|
17
|
+
if (!email && !name)
|
|
18
|
+
return;
|
|
19
|
+
return {
|
|
20
|
+
email,
|
|
21
|
+
name,
|
|
22
|
+
role: "attendee",
|
|
23
|
+
isExternal: invitee.is_external
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function matchRecordingId(meeting, targetId) {
|
|
27
|
+
return meeting.recordingId === targetId;
|
|
28
|
+
}
|
|
29
|
+
function durationSeconds(start, end) {
|
|
30
|
+
if (!start || !end)
|
|
31
|
+
return;
|
|
32
|
+
const startDate = start instanceof Date ? start : new Date(start);
|
|
33
|
+
const endDate = end instanceof Date ? end : new Date(end);
|
|
34
|
+
if (Number.isNaN(startDate.valueOf()) || Number.isNaN(endDate.valueOf())) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
return Math.max(0, (endDate.valueOf() - startDate.valueOf()) / 1000);
|
|
38
|
+
}
|
|
39
|
+
function mapTranscriptSegment(segment, index) {
|
|
40
|
+
return {
|
|
41
|
+
index,
|
|
42
|
+
speakerName: segment.speaker?.display_name ?? undefined,
|
|
43
|
+
speakerEmail: segment.speaker?.matched_calendar_invitee_email ?? undefined,
|
|
44
|
+
text: segment.text,
|
|
45
|
+
startTimeMs: parseTimestamp(segment.timestamp)
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function parseTimestamp(value) {
|
|
49
|
+
const parts = value.split(":").map((part) => Number(part));
|
|
50
|
+
if (parts.length !== 3 || parts.some((part) => Number.isNaN(part))) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const [hours = 0, minutes = 0, seconds = 0] = parts;
|
|
54
|
+
return (hours * 3600 + minutes * 60 + seconds) * 1000;
|
|
55
|
+
}
|
|
56
|
+
async function safeReadError(response) {
|
|
57
|
+
try {
|
|
58
|
+
const data = await response.json();
|
|
59
|
+
return data?.message ?? response.statusText;
|
|
60
|
+
} catch {
|
|
61
|
+
return response.statusText;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
2
64
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
65
|
+
// src/impls/fathom-meeting-recorder.mapper.ts
|
|
66
|
+
var mapFathomMeetingInvites = (invitees) => {
|
|
67
|
+
return invitees.map((invitee) => ({
|
|
68
|
+
...invitee,
|
|
69
|
+
name: invitee.name ?? undefined,
|
|
70
|
+
email: invitee.email ?? undefined
|
|
71
|
+
}));
|
|
10
72
|
};
|
|
11
73
|
function mapFathomMeeting(meeting, params) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
74
|
+
const connectionId = params.connectionId ?? "unknown";
|
|
75
|
+
return {
|
|
76
|
+
id: meeting.recordingId.toString(),
|
|
77
|
+
tenantId: params.tenantId,
|
|
78
|
+
connectionId,
|
|
79
|
+
externalId: meeting.recordingId.toString(),
|
|
80
|
+
title: meeting.title ?? meeting.meetingTitle,
|
|
81
|
+
organizer: meeting.recordedBy ? {
|
|
82
|
+
name: meeting.recordedBy.name ?? undefined,
|
|
83
|
+
email: meeting.recordedBy.email ?? undefined,
|
|
84
|
+
role: "organizer"
|
|
85
|
+
} : undefined,
|
|
86
|
+
invitees: meeting.calendarInvitees.length ? mapFathomMeetingInvites(meeting.calendarInvitees) : undefined,
|
|
87
|
+
participants: meeting.calendarInvitees.length ? mapFathomMeetingInvites(meeting.calendarInvitees) : undefined,
|
|
88
|
+
scheduledStartAt: meeting.scheduledStartTime?.toISOString(),
|
|
89
|
+
scheduledEndAt: meeting.scheduledEndTime?.toISOString(),
|
|
90
|
+
recordingStartAt: meeting.recordingStartTime?.toISOString(),
|
|
91
|
+
recordingEndAt: meeting.recordingEndTime?.toISOString(),
|
|
92
|
+
durationSeconds: durationSeconds(meeting.recordingStartTime, meeting.recordingEndTime),
|
|
93
|
+
meetingUrl: meeting.url ?? undefined,
|
|
94
|
+
shareUrl: meeting.shareUrl ?? undefined,
|
|
95
|
+
transcriptAvailable: Array.isArray(meeting.transcript),
|
|
96
|
+
sourcePlatform: "fathom",
|
|
97
|
+
language: meeting.transcriptLanguage,
|
|
98
|
+
metadata: {
|
|
99
|
+
calendarInviteesDomainsType: meeting.calendarInviteesDomainsType
|
|
100
|
+
}
|
|
101
|
+
};
|
|
38
102
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
103
|
+
export {
|
|
104
|
+
mapFathomMeetingInvites,
|
|
105
|
+
mapFathomMeeting
|
|
106
|
+
};
|
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
import { Invitee, Meeting } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
nextCursor?: string | null;
|
|
9
|
-
next_cursor?: string | null;
|
|
1
|
+
import type { Invitee, Meeting } from 'fathom-typescript/sdk/models/shared';
|
|
2
|
+
export type FathomMeeting = Meeting;
|
|
3
|
+
export type FathomMeetingInvitee = Invitee;
|
|
4
|
+
export interface FathomMeetingListPage {
|
|
5
|
+
items?: FathomMeeting[];
|
|
6
|
+
nextCursor?: string | null;
|
|
7
|
+
next_cursor?: string | null;
|
|
10
8
|
}
|
|
11
|
-
interface FathomTranscriptResponse {
|
|
12
|
-
|
|
9
|
+
export interface FathomTranscriptResponse {
|
|
10
|
+
transcript?: FathomTranscriptSegment[];
|
|
13
11
|
}
|
|
14
|
-
interface FathomTranscriptSegment {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
export interface FathomTranscriptSegment {
|
|
13
|
+
speaker?: {
|
|
14
|
+
display_name?: string;
|
|
15
|
+
matched_calendar_invitee_email?: string;
|
|
16
|
+
};
|
|
17
|
+
text: string;
|
|
18
|
+
timestamp: string;
|
|
21
19
|
}
|
|
22
|
-
//#endregion
|
|
23
|
-
export { FathomMeeting, FathomMeetingInvitee, FathomMeetingListPage, FathomTranscriptResponse, FathomTranscriptSegment };
|
|
24
20
|
//# sourceMappingURL=fathom-meeting-recorder.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fathom-meeting-recorder.types.d.ts","
|
|
1
|
+
{"version":3,"file":"fathom-meeting-recorder.types.d.ts","sourceRoot":"","sources":["../../src/impls/fathom-meeting-recorder.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,qCAAqC,CAAC;AAE5E,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC;AACpC,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC;AAE3C,MAAM,WAAW,qBAAqB;IACpC,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,wBAAwB;IACvC,UAAU,CAAC,EAAE,uBAAuB,EAAE,CAAC;CACxC;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,8BAA8B,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7E,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// @bun
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FathomMeeting, FathomMeetingListPage, FathomTranscriptSegment } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
declare function
|
|
6
|
-
declare function
|
|
7
|
-
declare function
|
|
8
|
-
declare function
|
|
9
|
-
declare function
|
|
10
|
-
declare function
|
|
11
|
-
declare function parseTimestamp(value: string): number | undefined;
|
|
12
|
-
declare function safeReadError(response: Response): Promise<string>;
|
|
13
|
-
//#endregion
|
|
14
|
-
export { durationSeconds, extractItems, extractNextCursor, mapInvitee, mapTranscriptSegment, matchRecordingId, parseTimestamp, safeReadError };
|
|
1
|
+
import type { MeetingParticipant, MeetingTranscriptSegment } from '../meeting-recorder';
|
|
2
|
+
import type { FathomMeeting, FathomMeetingListPage, FathomTranscriptSegment } from './fathom-meeting-recorder.types';
|
|
3
|
+
export declare function extractItems(page: FathomMeetingListPage): FathomMeeting[];
|
|
4
|
+
export declare function extractNextCursor(page: FathomMeetingListPage): string | null | undefined;
|
|
5
|
+
export declare function mapInvitee(invitee: Record<string, unknown>): MeetingParticipant | undefined;
|
|
6
|
+
export declare function matchRecordingId(meeting: FathomMeeting, targetId: number): boolean;
|
|
7
|
+
export declare function durationSeconds(start?: Date | string | null, end?: Date | string | null): number | undefined;
|
|
8
|
+
export declare function mapTranscriptSegment(segment: FathomTranscriptSegment, index: number): MeetingTranscriptSegment;
|
|
9
|
+
export declare function parseTimestamp(value: string): number | undefined;
|
|
10
|
+
export declare function safeReadError(response: Response): Promise<string>;
|
|
15
11
|
//# sourceMappingURL=fathom-meeting-recorder.utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fathom-meeting-recorder.utils.d.ts","
|
|
1
|
+
{"version":3,"file":"fathom-meeting-recorder.utils.d.ts","sourceRoot":"","sources":["../../src/impls/fathom-meeting-recorder.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,wBAAwB,EACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACV,aAAa,EACb,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,iCAAiC,CAAC;AAEzC,wBAAgB,YAAY,CAAC,IAAI,EAAE,qBAAqB,GAAG,aAAa,EAAE,CAMzE;AAED,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,qBAAqB,GAC1B,MAAM,GAAG,IAAI,GAAG,SAAS,CAE3B;AAED,wBAAgB,UAAU,CACxB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,kBAAkB,GAAG,SAAS,CAUhC;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,MAAM,GACf,OAAO,CAET;AAED,wBAAgB,eAAe,CAC7B,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,EAC5B,GAAG,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,GACzB,MAAM,GAAG,SAAS,CAQpB;AAED,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,uBAAuB,EAChC,KAAK,EAAE,MAAM,GACZ,wBAAwB,CAQ1B;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAOhE;AAED,wBAAsB,aAAa,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAOvE"}
|
|
@@ -1,56 +1,73 @@
|
|
|
1
|
-
|
|
1
|
+
// @bun
|
|
2
|
+
// src/impls/fathom-meeting-recorder.utils.ts
|
|
2
3
|
function extractItems(page) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
if (Array.isArray(page.items))
|
|
5
|
+
return page.items;
|
|
6
|
+
if (Array.isArray(page.data)) {
|
|
7
|
+
return page.data;
|
|
8
|
+
}
|
|
9
|
+
return [];
|
|
6
10
|
}
|
|
7
11
|
function extractNextCursor(page) {
|
|
8
|
-
|
|
12
|
+
return page.nextCursor ?? page.next_cursor ?? undefined;
|
|
9
13
|
}
|
|
10
14
|
function mapInvitee(invitee) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
const email = invitee.email;
|
|
16
|
+
const name = invitee.name;
|
|
17
|
+
if (!email && !name)
|
|
18
|
+
return;
|
|
19
|
+
return {
|
|
20
|
+
email,
|
|
21
|
+
name,
|
|
22
|
+
role: "attendee",
|
|
23
|
+
isExternal: invitee.is_external
|
|
24
|
+
};
|
|
20
25
|
}
|
|
21
26
|
function matchRecordingId(meeting, targetId) {
|
|
22
|
-
|
|
27
|
+
return meeting.recordingId === targetId;
|
|
23
28
|
}
|
|
24
29
|
function durationSeconds(start, end) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
if (!start || !end)
|
|
31
|
+
return;
|
|
32
|
+
const startDate = start instanceof Date ? start : new Date(start);
|
|
33
|
+
const endDate = end instanceof Date ? end : new Date(end);
|
|
34
|
+
if (Number.isNaN(startDate.valueOf()) || Number.isNaN(endDate.valueOf())) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
return Math.max(0, (endDate.valueOf() - startDate.valueOf()) / 1000);
|
|
30
38
|
}
|
|
31
39
|
function mapTranscriptSegment(segment, index) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
return {
|
|
41
|
+
index,
|
|
42
|
+
speakerName: segment.speaker?.display_name ?? undefined,
|
|
43
|
+
speakerEmail: segment.speaker?.matched_calendar_invitee_email ?? undefined,
|
|
44
|
+
text: segment.text,
|
|
45
|
+
startTimeMs: parseTimestamp(segment.timestamp)
|
|
46
|
+
};
|
|
39
47
|
}
|
|
40
48
|
function parseTimestamp(value) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
49
|
+
const parts = value.split(":").map((part) => Number(part));
|
|
50
|
+
if (parts.length !== 3 || parts.some((part) => Number.isNaN(part))) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const [hours = 0, minutes = 0, seconds = 0] = parts;
|
|
54
|
+
return (hours * 3600 + minutes * 60 + seconds) * 1000;
|
|
45
55
|
}
|
|
46
56
|
async function safeReadError(response) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
+
try {
|
|
58
|
+
const data = await response.json();
|
|
59
|
+
return data?.message ?? response.statusText;
|
|
60
|
+
} catch {
|
|
61
|
+
return response.statusText;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export {
|
|
65
|
+
safeReadError,
|
|
66
|
+
parseTimestamp,
|
|
67
|
+
matchRecordingId,
|
|
68
|
+
mapTranscriptSegment,
|
|
69
|
+
mapInvitee,
|
|
70
|
+
extractNextCursor,
|
|
71
|
+
extractItems,
|
|
72
|
+
durationSeconds
|
|
73
|
+
};
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import { TriggeredFor } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
declare function normalizeWebhookHeaders(headers: Record<string, string | string[] | undefined>): Record<string, string>;
|
|
5
|
-
declare function normalizeTriggeredFor(values?: string[]): TriggeredFor[] | undefined;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { normalizeTriggeredFor, normalizeWebhookHeaders };
|
|
1
|
+
import { TriggeredFor } from 'fathom-typescript/sdk/models/operations';
|
|
2
|
+
export declare function normalizeWebhookHeaders(headers: Record<string, string | string[] | undefined>): Record<string, string>;
|
|
3
|
+
export declare function normalizeTriggeredFor(values?: string[]): TriggeredFor[] | undefined;
|
|
8
4
|
//# sourceMappingURL=fathom-meeting-recorder.webhooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fathom-meeting-recorder.webhooks.d.ts","
|
|
1
|
+
{"version":3,"file":"fathom-meeting-recorder.webhooks.d.ts","sourceRoot":"","sources":["../../src/impls/fathom-meeting-recorder.webhooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAEvE,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,GACrD,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAaxB;AAED,wBAAgB,qBAAqB,CACnC,MAAM,CAAC,EAAE,MAAM,EAAE,GAChB,YAAY,EAAE,GAAG,SAAS,CAS5B"}
|
|
@@ -1,25 +1,30 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/impls/fathom-meeting-recorder.webhooks.ts
|
|
1
3
|
import { TriggeredFor } from "fathom-typescript/sdk/models/operations";
|
|
2
|
-
|
|
3
|
-
//#region src/impls/fathom-meeting-recorder.webhooks.ts
|
|
4
4
|
function normalizeWebhookHeaders(headers) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
const normalized = {};
|
|
6
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
7
|
+
if (value == null)
|
|
8
|
+
continue;
|
|
9
|
+
const normalizedKey = key.toLowerCase();
|
|
10
|
+
if (Array.isArray(value)) {
|
|
11
|
+
if (value.length === 0)
|
|
12
|
+
continue;
|
|
13
|
+
normalized[normalizedKey] = value.join(", ");
|
|
14
|
+
} else {
|
|
15
|
+
normalized[normalizedKey] = value;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return normalized;
|
|
15
19
|
}
|
|
16
20
|
function normalizeTriggeredFor(values) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
if (!values)
|
|
22
|
+
return;
|
|
23
|
+
const allowed = new Set(Object.values(TriggeredFor));
|
|
24
|
+
const normalized = values.map((value) => value.trim()).filter((value) => allowed.has(value));
|
|
25
|
+
return normalized.length ? normalized : undefined;
|
|
21
26
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
27
|
+
export {
|
|
28
|
+
normalizeWebhookHeaders,
|
|
29
|
+
normalizeTriggeredFor
|
|
30
|
+
};
|
|
@@ -1,28 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
pageSize?: number;
|
|
8
|
-
webhookSecret?: string;
|
|
1
|
+
import type { MeetingRecord, MeetingRecorderGetMeetingParams, MeetingRecorderGetTranscriptParams, MeetingRecorderListMeetingsParams, MeetingRecorderListMeetingsResult, MeetingRecorderProvider, MeetingRecorderWebhookEvent, MeetingRecorderWebhookRequest, MeetingTranscriptRecord } from '../meeting-recorder';
|
|
2
|
+
export interface FirefliesMeetingRecorderProviderOptions {
|
|
3
|
+
apiKey: string;
|
|
4
|
+
baseUrl?: string;
|
|
5
|
+
pageSize?: number;
|
|
6
|
+
webhookSecret?: string;
|
|
9
7
|
}
|
|
10
|
-
declare class FirefliesMeetingRecorderProvider implements
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
8
|
+
export declare class FirefliesMeetingRecorderProvider implements MeetingRecorderProvider {
|
|
9
|
+
private readonly apiKey;
|
|
10
|
+
private readonly baseUrl;
|
|
11
|
+
private readonly defaultPageSize?;
|
|
12
|
+
private readonly webhookSecret?;
|
|
13
|
+
constructor(options: FirefliesMeetingRecorderProviderOptions);
|
|
14
|
+
listMeetings(params: MeetingRecorderListMeetingsParams): Promise<MeetingRecorderListMeetingsResult>;
|
|
15
|
+
getMeeting(params: MeetingRecorderGetMeetingParams): Promise<MeetingRecord>;
|
|
16
|
+
getTranscript(params: MeetingRecorderGetTranscriptParams): Promise<MeetingTranscriptRecord>;
|
|
17
|
+
parseWebhook(request: MeetingRecorderWebhookRequest): Promise<MeetingRecorderWebhookEvent>;
|
|
18
|
+
verifyWebhook(request: MeetingRecorderWebhookRequest): Promise<boolean>;
|
|
19
|
+
private mapTranscriptToMeeting;
|
|
20
|
+
private mapAttendee;
|
|
21
|
+
private mapSentence;
|
|
22
|
+
private query;
|
|
25
23
|
}
|
|
26
|
-
//#endregion
|
|
27
|
-
export { FirefliesMeetingRecorderProvider, FirefliesMeetingRecorderProviderOptions };
|
|
28
24
|
//# sourceMappingURL=fireflies-meeting-recorder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fireflies-meeting-recorder.d.ts","
|
|
1
|
+
{"version":3,"file":"fireflies-meeting-recorder.d.ts","sourceRoot":"","sources":["../../src/impls/fireflies-meeting-recorder.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,aAAa,EACb,+BAA+B,EAC/B,kCAAkC,EAClC,iCAAiC,EACjC,iCAAiC,EACjC,uBAAuB,EACvB,2BAA2B,EAC3B,6BAA6B,EAC7B,uBAAuB,EAExB,MAAM,qBAAqB,CAAC;AAoB7B,MAAM,WAAW,uCAAuC;IACtD,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAID,qBAAa,gCAAiC,YAAW,uBAAuB;IAC9E,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAS;IAC1C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAS;gBAE5B,OAAO,EAAE,uCAAuC;IAOtD,YAAY,CAChB,MAAM,EAAE,iCAAiC,GACxC,OAAO,CAAC,iCAAiC,CAAC;IA0BvC,UAAU,CACd,MAAM,EAAE,+BAA+B,GACtC,OAAO,CAAC,aAAa,CAAC;IAUnB,aAAa,CACjB,MAAM,EAAE,kCAAkC,GACzC,OAAO,CAAC,uBAAuB,CAAC;IA4B7B,YAAY,CAChB,OAAO,EAAE,6BAA6B,GACrC,OAAO,CAAC,2BAA2B,CAAC;IAuBjC,aAAa,CACjB,OAAO,EAAE,6BAA6B,GACrC,OAAO,CAAC,OAAO,CAAC;IAWnB,OAAO,CAAC,sBAAsB;IAqC9B,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,WAAW;YAWL,KAAK;CAyBpB"}
|