| name | fireflies-sdk-patterns |
| description | Apply production-ready Fireflies.ai GraphQL client patterns for TypeScript and Python.
Use when implementing Fireflies.ai integrations, building typed clients,
or establishing team coding standards for the GraphQL API.
Trigger with phrases like "fireflies SDK patterns", "fireflies best practices",
"fireflies client", "fireflies GraphQL wrapper", "typed fireflies".
|
| allowed-tools | Read, Write, Edit |
| version | 1.11.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","fireflies","python","typescript"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Fireflies.ai Client Patterns
Overview
Production-ready patterns for the Fireflies.ai GraphQL API. Fireflies has no official SDK -- all interaction is via HTTP POST to https://api.fireflies.ai/graphql. These patterns provide typed wrappers, error handling, caching, and multi-tenant support.
Prerequisites
FIREFLIES_API_KEY environment variable set
- TypeScript 5+ or Python 3.10+
- Optional:
graphql-request for typed queries
Instructions
Step 1: Typed GraphQL Client (TypeScript)
const FIREFLIES_API = "https://api.fireflies.ai/graphql";
interface FirefliesError {
message: string;
code?: string;
extensions?: { status: number; helpUrls?: string[] };
}
interface FirefliesResponse<T> {
data?: T;
errors?: FirefliesError[];
}
export class FirefliesClient {
private apiKey: string;
private baseUrl: string;
constructor(apiKey?: string) {
this.apiKey = apiKey || process.env.FIREFLIES_API_KEY!;
this.baseUrl = ;
(!.) ();
}
query<T = >(: , ?: <, >): <T> {
res = (., {
: ,
: {
: ,
: ,
},
: .({ : gql, variables }),
});
: <T> = res.();
(json.?.) {
err = json.[];
error = () ;
error. = err.;
error. = err.?.;
error;
}
json.!;
}
() {
.<{ : }>();
}
() {
.<{ : [] }>(, { limit });
}
() {
.<{ : }>(, { id });
}
}