@firefliesai/fireflies-node-sdk
Version:
Node.js SDK for Fireflies.ai API
134 lines (133 loc) • 4.71 kB
TypeScript
import { BatchProcessResult } from './helper.js';
import { FirefliesConfig, AIAppOutput, AIAppsQueryParams, UserData, TranscriptData, TranscriptsQueryParams, BiteData, BitesQueryParams, UserRole, SetUserRoleResponse, DeleteTranscriptResponse, AudioUploadInput, AudioUploadResponse, CreateBiteInput, CreateBiteResponse, AddToLiveMeetingInput, AddToLiveMeetingResponse } from './types';
export interface AIFilter {
task: string;
pricing: string;
metric: string;
question: string;
date_and_time: string;
text_cleanup: string;
sentiment: string;
}
export interface MeetingInfo {
fred_joined: boolean;
silent_meeting: boolean;
summary_status: string;
}
export interface Sentence {
index: number;
speaker_name: string;
speaker_id: string;
meeting_info: MeetingInfo;
text: string;
raw_text: string;
start_time: number;
end_time: number;
ai_filters: AIFilter;
}
export interface Speaker {
id: string;
name: string;
}
export interface MeetingAttendee {
displayName: string;
email: string;
phoneNumber?: string;
name: string;
location?: string;
}
export interface Summary {
keywords: string[];
action_items: string[];
outline: string[];
shorthand_bullet: string;
overview: string;
bullet_gist: string;
gist: string;
short_summary: string;
short_overview: string;
meeting_type: string;
topics_discussed: string[];
transcript_chapters: string[];
}
export interface BiteCaption {
end_time: number;
index: number;
speaker_id: string;
speaker_name: string;
start_time: number;
text: string;
}
export interface BiteSource {
src: string;
type: string;
}
export interface BiteCreatedFrom {
description: string;
duration: number;
id: string;
name: string;
type: string;
}
export interface BiteUser {
first_name: string;
last_name: string;
picture: string;
name: string;
id: string;
}
export declare class FirefliesSDK {
private client;
private static DEFAULT_BASE_URL;
constructor(config: FirefliesConfig);
private executeGraphQL;
getAIAppsOutputs(params: AIAppsQueryParams | undefined, filter: string[]): Promise<AIAppOutput[]>;
getUser(userId: string, filter?: string[]): Promise<UserData>;
getUsers(filter?: string[]): Promise<UserData>;
getCurrentUser(filter?: string[]): Promise<UserData>;
getTranscript(transcriptId: string, filter?: string[]): Promise<TranscriptData>;
getTranscripts(params?: TranscriptsQueryParams, filter?: string[]): Promise<TranscriptData[]>;
getBite(biteId: string, filter?: string[]): Promise<BiteData>;
getBites(params?: BitesQueryParams, filter?: string[]): Promise<BiteData[]>;
setUserRole(userId: string, role: UserRole): Promise<SetUserRoleResponse>;
deleteTranscript(transcriptId: string): Promise<DeleteTranscriptResponse>;
uploadAudio(input: AudioUploadInput): Promise<AudioUploadResponse>;
createBite(input: CreateBiteInput): Promise<CreateBiteResponse>;
addToLiveMeeting(input: AddToLiveMeetingInput): Promise<AddToLiveMeetingResponse>;
/**
* Get meetings/transcripts for multiple users by providing a list of API keys.
* This implementation includes batch processing, rate limiting, and deduplication of meetings.
* @param apiKeys - Array of API keys for different users
* @param filter - Fields to include in the response
* @param outputType - Type of output ('console' or 'json')
* @returns Promise<{ [key: string]: BatchProcessResult }>
*/
static getMeetingsForMultipleUsers(apiKeys: string[], filter?: string[], outputType?: 'console' | 'json'): Promise<{
[key: string]: BatchProcessResult;
}>;
/**
* Find questions asked by external participants in meetings
* @param companyEmailDomain - Your company email domain (e.g. '@company.com')
* @returns Promise<{ externalParticipants: string[], questions: string[] }>
*/
findExternalParticipantQuestions(companyEmailDomain: string): Promise<{
externalParticipants: string[];
questions: string[];
}>;
/**
* Get video URLs from meetings/transcripts
* @returns Promise<Array<{ id: string, title: string, video_url: string | null }>>
*/
getMeetingVideos(): Promise<Array<{
id: string;
title: string;
video_url: string | null;
}>>;
/**
* Get summary of a specific transcript/meeting
* @param transcriptId - ID of the transcript to get summary for
* @returns Promise<Summary>
*/
getTranscriptSummary(transcriptId: string): Promise<Summary>;
}
export * from './types';