fireflies-api 0.5.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.
Files changed (47) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +64 -0
  3. package/dist/action-items-CC9yUxHY.d.cts +380 -0
  4. package/dist/action-items-CC9yUxHY.d.ts +380 -0
  5. package/dist/cli/index.cjs +3909 -0
  6. package/dist/cli/index.cjs.map +1 -0
  7. package/dist/cli/index.d.cts +2 -0
  8. package/dist/cli/index.d.ts +2 -0
  9. package/dist/cli/index.js +3906 -0
  10. package/dist/cli/index.js.map +1 -0
  11. package/dist/index.cjs +3389 -0
  12. package/dist/index.cjs.map +1 -0
  13. package/dist/index.d.cts +966 -0
  14. package/dist/index.d.ts +966 -0
  15. package/dist/index.js +3344 -0
  16. package/dist/index.js.map +1 -0
  17. package/dist/middleware/express.cjs +2491 -0
  18. package/dist/middleware/express.cjs.map +1 -0
  19. package/dist/middleware/express.d.cts +36 -0
  20. package/dist/middleware/express.d.ts +36 -0
  21. package/dist/middleware/express.js +2489 -0
  22. package/dist/middleware/express.js.map +1 -0
  23. package/dist/middleware/fastify.cjs +2501 -0
  24. package/dist/middleware/fastify.cjs.map +1 -0
  25. package/dist/middleware/fastify.d.cts +66 -0
  26. package/dist/middleware/fastify.d.ts +66 -0
  27. package/dist/middleware/fastify.js +2498 -0
  28. package/dist/middleware/fastify.js.map +1 -0
  29. package/dist/middleware/hono.cjs +2493 -0
  30. package/dist/middleware/hono.cjs.map +1 -0
  31. package/dist/middleware/hono.d.cts +37 -0
  32. package/dist/middleware/hono.d.ts +37 -0
  33. package/dist/middleware/hono.js +2490 -0
  34. package/dist/middleware/hono.js.map +1 -0
  35. package/dist/schemas/index.cjs +307 -0
  36. package/dist/schemas/index.cjs.map +1 -0
  37. package/dist/schemas/index.d.cts +926 -0
  38. package/dist/schemas/index.d.ts +926 -0
  39. package/dist/schemas/index.js +268 -0
  40. package/dist/schemas/index.js.map +1 -0
  41. package/dist/speaker-analytics-Dr46LKyP.d.ts +275 -0
  42. package/dist/speaker-analytics-l45LXqO1.d.cts +275 -0
  43. package/dist/types-BX-3JcRI.d.cts +41 -0
  44. package/dist/types-C_XxdRd1.d.cts +1546 -0
  45. package/dist/types-CaHcwnKw.d.ts +41 -0
  46. package/dist/types-DIPZmUl3.d.ts +1546 -0
  47. package/package.json +126 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Björn Schotte
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,64 @@
1
+ # fireflies-api
2
+
3
+ TypeScript SDK for [Fireflies.ai](https://fireflies.ai) with realtime transcription streaming.
4
+
5
+ ## Features
6
+
7
+ - Full GraphQL API coverage
8
+ - **Live transcription streaming** via Socket.IO (key differentiator)
9
+ - Auto-pagination for large datasets
10
+ - TypeScript-first with full type coverage
11
+ - Works with Node.js 18+ and Bun
12
+
13
+ ## Quick Start
14
+
15
+ ```bash
16
+ npm install fireflies-api
17
+ ```
18
+
19
+ ```typescript
20
+ import { FirefliesClient } from 'fireflies-api';
21
+
22
+ const client = new FirefliesClient({
23
+ apiKey: process.env.FIREFLIES_API_KEY!,
24
+ });
25
+
26
+ // List recent transcripts
27
+ const transcripts = await client.transcripts.list({ limit: 10 });
28
+
29
+ for (const t of transcripts) {
30
+ console.log(`${t.title} - ${t.date}`);
31
+ }
32
+ ```
33
+
34
+ ## Realtime Transcription
35
+
36
+ Stream live transcription from an active meeting:
37
+
38
+ ```typescript
39
+ for await (const chunk of client.realtime.stream('meeting-id')) {
40
+ console.log(`${chunk.speaker_name}: ${chunk.text}`);
41
+ }
42
+ ```
43
+
44
+ ## Documentation
45
+
46
+ - [Getting Started](docs/getting-started.md) - Installation and configuration
47
+ - [Transcripts](docs/transcripts.md) - Query and manage transcripts
48
+ - [Realtime Streaming](docs/realtime.md) - Live transcription
49
+ - [Users & Teams](docs/users-and-teams.md) - User management
50
+ - [Bites](docs/bites.md) - Clips and soundbites
51
+ - [Meetings](docs/meetings.md) - Active meetings and bot management
52
+ - [Audio Upload](docs/audio-upload.md) - Upload audio for transcription
53
+ - [AI Apps](docs/ai-apps.md) - AI application outputs
54
+ - [Pagination](docs/pagination.md) - Auto-pagination patterns
55
+ - [Error Handling](docs/error-handling.md) - Error types and recovery
56
+ - [Migration Guide](docs/migration.md) - Migrating from official SDK
57
+
58
+ ## API Reference
59
+
60
+ For Fireflies API field details, see [docs.fireflies.ai](https://docs.fireflies.ai).
61
+
62
+ ## License
63
+
64
+ MIT
@@ -0,0 +1,380 @@
1
+ /**
2
+ * A meeting transcript from Fireflies.
3
+ */
4
+ interface Transcript {
5
+ /** Unique identifier for the transcript */
6
+ id: string;
7
+ /** Title of the meeting */
8
+ title: string;
9
+ /** Email of the meeting organizer */
10
+ organizer_email: string;
11
+ /**
12
+ * Email of the meeting host
13
+ * @deprecated Use organizer_email instead
14
+ */
15
+ host_email?: string;
16
+ /** User who owns this transcript */
17
+ user?: User;
18
+ /** List of speakers identified in the transcript */
19
+ speakers: Speaker[];
20
+ /** URL to view the transcript in Fireflies app */
21
+ transcript_url: string;
22
+ /** List of participant email addresses */
23
+ participants: string[];
24
+ /** Detailed attendee information from calendar invite */
25
+ meeting_attendees: MeetingAttendee[];
26
+ /** Attendance tracking with join/leave times (v2.10.0+) */
27
+ meeting_attendance: MeetingAttendance[];
28
+ /** Fireflies user IDs with access */
29
+ fireflies_users: string[];
30
+ /** Workspace user IDs with access (v2.20.0+) */
31
+ workspace_users: string[];
32
+ /** Duration of the meeting in minutes */
33
+ duration: number;
34
+ /** ISO 8601 date string of the meeting */
35
+ dateString: string;
36
+ /** Unix timestamp in milliseconds */
37
+ date: number;
38
+ /**
39
+ * URL to download audio (expires after 24h).
40
+ * Requires Pro plan or higher.
41
+ */
42
+ audio_url?: string;
43
+ /**
44
+ * URL to download video (expires after 24h).
45
+ * Requires Business plan or higher.
46
+ */
47
+ video_url?: string;
48
+ /** Transcribed sentences with speaker attribution */
49
+ sentences: Sentence[];
50
+ /** Calendar event ID */
51
+ calendar_id?: string;
52
+ /** AI-generated meeting summary */
53
+ summary?: Summary;
54
+ /** Meeting metadata and processing status */
55
+ meeting_info?: MeetingInfo;
56
+ /** Alternative calendar ID field */
57
+ cal_id?: string;
58
+ /** Type of calendar (google, outlook, etc.) */
59
+ calendar_type?: string;
60
+ /** AI Apps output preview */
61
+ apps_preview?: AppsPreview;
62
+ /** Link to the original meeting */
63
+ meeting_link?: string;
64
+ /**
65
+ * Meeting analytics and metrics.
66
+ * Requires Pro plan or higher.
67
+ */
68
+ analytics?: MeetingAnalytics;
69
+ /** Channels this transcript is shared to (v2.11.0+) */
70
+ channels: Channel[];
71
+ }
72
+ /**
73
+ * A Fireflies user.
74
+ */
75
+ interface User {
76
+ /** Unique user ID */
77
+ user_id: string;
78
+ /** User's email address */
79
+ email: string;
80
+ /** User's display name */
81
+ name?: string;
82
+ /** Number of transcripts */
83
+ num_transcripts?: number;
84
+ /** Whether user is admin */
85
+ is_admin?: boolean;
86
+ }
87
+ /**
88
+ * A speaker identified in the transcript.
89
+ */
90
+ interface Speaker {
91
+ /** Unique speaker ID within this transcript */
92
+ id: string;
93
+ /** Speaker's name (may be auto-detected or manually assigned) */
94
+ name: string;
95
+ }
96
+ /**
97
+ * A single sentence in the transcript.
98
+ */
99
+ interface Sentence {
100
+ /** Zero-based index of the sentence */
101
+ index: number;
102
+ /** Processed text with formatting */
103
+ text: string;
104
+ /** Original unprocessed text */
105
+ raw_text: string;
106
+ /** Start time as decimal seconds string */
107
+ start_time: string;
108
+ /** End time as decimal seconds string */
109
+ end_time: string;
110
+ /** ID of the speaker */
111
+ speaker_id: string;
112
+ /** Name of the speaker */
113
+ speaker_name: string;
114
+ /** AI-detected filters and tags */
115
+ ai_filters?: AIFilter;
116
+ }
117
+ /**
118
+ * AI-generated meeting summary sections.
119
+ */
120
+ interface Summary {
121
+ /** Action items extracted from the meeting */
122
+ action_items?: string;
123
+ /** Key topics and keywords */
124
+ keywords?: string;
125
+ /** Structured outline of the meeting */
126
+ outline?: string;
127
+ /** High-level overview */
128
+ overview?: string;
129
+ /** Shorthand bullet point summary */
130
+ shorthand_bullet?: string;
131
+ /** Detailed meeting notes */
132
+ notes?: string;
133
+ /** Very brief summary (1-2 sentences) */
134
+ gist?: string;
135
+ /** Brief bullet point summary */
136
+ bullet_gist?: string;
137
+ /** Short summary paragraph */
138
+ short_summary?: string;
139
+ /** Short overview paragraph */
140
+ short_overview?: string;
141
+ /** Detected meeting type (standup, interview, etc.) */
142
+ meeting_type?: string;
143
+ /** List of topics discussed */
144
+ topics_discussed?: string[];
145
+ /** Chapter markers for the transcript */
146
+ transcript_chapters?: string[];
147
+ /** Custom summary sections */
148
+ extended_sections?: SummarySection[];
149
+ }
150
+ /**
151
+ * Custom summary section from AI Apps.
152
+ */
153
+ interface SummarySection {
154
+ /** Section title */
155
+ title: string;
156
+ /** Section content */
157
+ content: string;
158
+ }
159
+ /**
160
+ * Attendee information from calendar invite.
161
+ */
162
+ interface MeetingAttendee {
163
+ /** Display name */
164
+ displayName: string;
165
+ /** Email address */
166
+ email: string;
167
+ /** Phone number if provided */
168
+ phoneNumber?: string;
169
+ /** Full name */
170
+ name: string;
171
+ /** Location if provided */
172
+ location?: string;
173
+ }
174
+ /**
175
+ * Attendance tracking with join/leave times.
176
+ * Available in API v2.10.0+.
177
+ */
178
+ interface MeetingAttendance {
179
+ /** Attendee name */
180
+ name: string;
181
+ /** ISO 8601 timestamp when they joined */
182
+ join_time: string;
183
+ /** ISO 8601 timestamp when they left (null if still in meeting) */
184
+ leave_time?: string;
185
+ }
186
+ /**
187
+ * Meeting metadata and processing status.
188
+ */
189
+ interface MeetingInfo {
190
+ /** Whether the Fireflies bot (Fred) joined the meeting */
191
+ fred_joined: boolean;
192
+ /** Whether this was a silent recording (no bot audio) */
193
+ silent_meeting: boolean;
194
+ /** Status of AI summary processing */
195
+ summary_status: SummaryStatus;
196
+ }
197
+ /**
198
+ * Summary processing status.
199
+ */
200
+ type SummaryStatus = 'processing' | 'processed' | 'failed' | 'skipped';
201
+ /**
202
+ * AI-detected content filters for a sentence.
203
+ */
204
+ interface AIFilter {
205
+ /** Task or action item */
206
+ task?: string;
207
+ /** Pricing discussion */
208
+ pricing?: string;
209
+ /** Metric or KPI mentioned */
210
+ metric?: string;
211
+ /** Question asked */
212
+ question?: string;
213
+ /** Date and time mention */
214
+ date_and_time?: string;
215
+ /** Cleaned up text */
216
+ text_cleanup?: string;
217
+ /** Sentiment analysis (positive, negative, neutral) */
218
+ sentiment?: string;
219
+ }
220
+ /**
221
+ * Channel for sharing transcripts (v2.11.0+).
222
+ */
223
+ interface Channel {
224
+ /** Unique channel ID */
225
+ id: string;
226
+ /** Channel title */
227
+ title: string;
228
+ /** Whether the channel is private */
229
+ is_private?: boolean;
230
+ /** ISO 8601 creation timestamp */
231
+ created_at?: string;
232
+ /** ISO 8601 last update timestamp */
233
+ updated_at?: string;
234
+ /** User ID of channel creator */
235
+ created_by?: string;
236
+ /** Channel members */
237
+ members?: ChannelMember[];
238
+ }
239
+ /**
240
+ * A member of a channel.
241
+ */
242
+ interface ChannelMember {
243
+ /** User ID */
244
+ user_id: string;
245
+ /** Email address */
246
+ email: string;
247
+ /** Display name */
248
+ name: string;
249
+ }
250
+ /**
251
+ * AI Apps output preview.
252
+ */
253
+ interface AppsPreview {
254
+ /** Array of AI app outputs */
255
+ outputs: AIAppOutput[];
256
+ }
257
+ /**
258
+ * Output from an AI App.
259
+ */
260
+ interface AIAppOutput {
261
+ /** Transcript identifier */
262
+ transcript_id?: string;
263
+ /** User identifier */
264
+ user_id?: string;
265
+ /** App identifier */
266
+ app_id?: string;
267
+ /** Timestamp when generated (Unix timestamp) */
268
+ created_at?: number;
269
+ /** App title */
270
+ title?: string;
271
+ /** The prompt used */
272
+ prompt?: string;
273
+ /** The AI response */
274
+ response?: string;
275
+ }
276
+ /**
277
+ * Meeting analytics and metrics.
278
+ * Requires Pro plan or higher.
279
+ */
280
+ interface MeetingAnalytics {
281
+ /** Sentiment breakdown */
282
+ sentiments?: Sentiments;
283
+ }
284
+ /**
285
+ * Sentiment percentages for a meeting.
286
+ */
287
+ interface Sentiments {
288
+ /** Percentage of negative sentiment (0-100) */
289
+ negative_pct?: number;
290
+ /** Percentage of neutral sentiment (0-100) */
291
+ neutral_pct?: number;
292
+ /** Percentage of positive sentiment (0-100) */
293
+ positive_pct?: number;
294
+ }
295
+
296
+ /**
297
+ * A single action item extracted from the transcript.
298
+ */
299
+ interface ActionItem {
300
+ /** The action item text */
301
+ text: string;
302
+ /** Detected assignee name (if found in text) */
303
+ assignee?: string;
304
+ /** Detected due date (if found in text) */
305
+ dueDate?: string;
306
+ /** Original line number in action_items string (1-indexed) */
307
+ lineNumber: number;
308
+ /** Related sentence from transcript (if AIFilter.task matched) */
309
+ sourceSentence?: {
310
+ speakerName: string;
311
+ text: string;
312
+ startTime: number;
313
+ };
314
+ }
315
+ /**
316
+ * Result of action item extraction.
317
+ */
318
+ interface ActionItemsResult {
319
+ /** Extracted action items */
320
+ items: ActionItem[];
321
+ /** Total count of action items */
322
+ totalItems: number;
323
+ /** Items with detected assignees */
324
+ assignedItems: number;
325
+ /** Items with detected due dates */
326
+ datedItems: number;
327
+ /** Unique assignees found */
328
+ assignees: string[];
329
+ }
330
+ /**
331
+ * Options for action item extraction.
332
+ */
333
+ interface ActionItemOptions {
334
+ /**
335
+ * Attempt to detect assignees from text patterns (default: true).
336
+ * Looks for patterns like "@Alice", "Alice:", "assigned to Alice".
337
+ */
338
+ detectAssignees?: boolean;
339
+ /**
340
+ * Attempt to detect due dates from text patterns (default: true).
341
+ * Looks for patterns like "by Friday", "due 2024-01-15", "EOD".
342
+ */
343
+ detectDueDates?: boolean;
344
+ /**
345
+ * Match action items with AIFilter.task in sentences (default: false).
346
+ * When enabled, correlates summary items with source sentences.
347
+ */
348
+ includeSourceSentences?: boolean;
349
+ /**
350
+ * Known participant names for better assignee matching (default: []).
351
+ * Improves accuracy by limiting to actual meeting participants.
352
+ */
353
+ participantNames?: string[];
354
+ }
355
+ /**
356
+ * Extract structured action items from a transcript.
357
+ *
358
+ * Parses the action_items field from the transcript summary into
359
+ * structured data with optional assignee and due date detection.
360
+ *
361
+ * **Note:** These action items are generated by Fireflies' AI processing
362
+ * during transcription. For custom action item extraction or different
363
+ * interpretation logic, consider running your own LLM calls on the
364
+ * transcript sentences directly.
365
+ *
366
+ * @param transcript - The transcript to extract action items from
367
+ * @param options - Extraction options
368
+ * @returns Structured action items with metadata
369
+ *
370
+ * @example
371
+ * ```typescript
372
+ * const result = extractActionItems(transcript);
373
+ * for (const item of result.items) {
374
+ * console.log(`${item.text} -> ${item.assignee ?? 'unassigned'}`);
375
+ * }
376
+ * ```
377
+ */
378
+ declare function extractActionItems(transcript: Transcript, options?: ActionItemOptions): ActionItemsResult;
379
+
380
+ export { type ActionItemsResult as A, type Channel as C, type MeetingAnalytics as M, type Speaker as S, type Transcript as T, type User as U, type ActionItemOptions as a, type ActionItem as b, type AIAppOutput as c, type AIFilter as d, type AppsPreview as e, type ChannelMember as f, type MeetingAttendance as g, type MeetingAttendee as h, type MeetingInfo as i, type Sentence as j, type Sentiments as k, type Summary as l, type SummarySection as m, type SummaryStatus as n, extractActionItems as o };