npm package: @firefliesai/api-sdk
Description: TypeScript SDK for Fireflies.ai API
Author: Fireflies.ai
Latest version: 1.0.0

# Fireflies.ai SDK

A TypeScript SDK for the Fireflies.ai Public API with full type safety.

## Installation

```bash
npm install @firefliesai/api-sdk
```

## Quick Start

```typescript
import { createFirefliesSDK } from '@firefliesai/api-sdk';

const sdk = createFirefliesSDK({
  apiKey: 'your-api-key-here'
});

// Get all transcripts
const transcripts = await sdk.getTranscripts();

// Get a specific transcript
const transcript = await sdk.getTranscript({ id: 'transcript-id' });

// Get user info
const user = await sdk.getUser();
```

## Typed Variables

The SDK now uses proper TypeScript types for all operations:

```typescript
import { 
  createFirefliesSDK, 
  type TranscriptsQueryVariables,
  type CreateBiteMutationVariables 
} from '@firefliesai/api-sdk';

const sdk = createFirefliesSDK({
  apiKey: 'your-api-key-here'
});

// Query with typed variables
const transcriptsVariables: TranscriptsQueryVariables = {
  limit: 10,
  mine: true,
  keyword: 'meeting'
};
const transcripts = await sdk.getTranscripts(transcriptsVariables);

// Mutation with typed variables
const biteVariables: CreateBiteMutationVariables = {
  transcript_Id: 'transcript-id',
  name: 'My Bite',
  start_time: 0,
  end_time: 60
};
const bite = await sdk.createBite(biteVariables);
```

## Available Methods

### Query Methods
- `getTranscripts(variables?: TranscriptsQueryVariables)` - Get all transcripts
- `getTranscript(variables: TranscriptQueryVariables)` - Get a specific transcript
- `getUser(variables?: UserQueryVariables)` - Get user information
- `getApps(variables?: AppsQueryVariables)` - Get apps and outputs
- `getBites(variables?: BitesQueryVariables)` - Get bites
- `getBite(variables: BiteQueryVariables)` - Get a specific bite
- `getAnalytics(variables?: AnalyticsQueryVariables)` - Get analytics data

### Mutation Methods
- `createBite(variables: CreateBiteMutationVariables)` - Create a new bite
- `deleteTranscript(variables: DeleteTranscriptMutationVariables)` - Delete a transcript
- `uploadAudio(variables?: UploadAudioMutationVariables)` - Upload audio file
- `addToLiveMeeting(variables: AddToLiveMeetingMutationVariables)` - Add bot to live meeting
- `setUserRole(variables: SetUserRoleMutationVariables)` - Set user role
- `updateMeetingTitle(variables: UpdateMeetingTitleMutationVariables)` - Update meeting title

## Type Safety

All methods are fully typed with:
- Input variables validation
- Return type definitions
- IntelliSense support
- Compile-time error checking

## Advanced Usage

```typescript
// Access the raw GraphQL client
const client = sdk.getClient();

// Access all generated SDK methods
const generatedSdk = sdk.getSdk();

// Use the standalone client function
import { createClient } from '@firefliesai/api-sdk';
const client = createClient({ apiKey: 'your-key' });
```

## Error Handling

```typescript
try {
  const transcript = await sdk.getTranscript({ id: 'invalid-id' });
} catch (error) {
  console.error('GraphQL Error:', error);
}
```

## License

MIT

## Support

For API support, please contact Fireflies.ai support or refer to the [API documentation](https://docs.fireflies.ai). 

## Changelog

v 1.0.0: Initial release