Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 1 addition & 18 deletions .microfox/pr-usage.json
Original file line number Diff line number Diff line change
@@ -1,18 +1 @@
{
"gemini-1.5-pro": {
"usage": {
"promptTokens": 211932,
"completionTokens": 28135,
"totalTokens": 0
},
"cost": 0.8111800000000001
},
"claude-3-5-sonnet-20240620": {
"usage": {
"promptTokens": 163073,
"completionTokens": 28798,
"totalTokens": 0
},
"cost": 0.921189
}
}
{}
9 changes: 4 additions & 5 deletions packages-list.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"packages/@ext_@slack#web-api"
],
"stablePackages": [
"packages/amazon-rekognition-face-detection",
"packages/aws-ses",
"packages/brave",
"packages/coingecko-sdk",
Expand All @@ -17,6 +18,7 @@
"packages/linkedin-member-data-portability",
"packages/linkedin-share",
"packages/reddit",
"packages/riverside",
"packages/slack-web-tiny",
"packages/whatsapp-business",
"packages/youtube",
Expand All @@ -40,12 +42,9 @@
"packages/linkedin-oauth",
"packages/reddit-oauth"
],
"unknownPackages": [
"packages/google-sdk"
],
"internalPackages": [
"packages/rest-sdk"
],
"total": 33,
"generatedAt": "2025-05-05T17:10:43.491Z"
"total": 34,
"generatedAt": "2025-05-07T15:52:28.945Z"
}
22 changes: 22 additions & 0 deletions packages/riverside/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Riverside SDK

A TypeScript SDK for interacting with the Riverside API.

## Installation

```bash
npm install @microfox/riverside
```

## Environment Variables

This package does not require any environment variables.

## API Reference

For detailed documentation on the constructor and all available functions, please refer to the following files:

- [**createRiversideSDK** (Constructor)](./docs/createRiversideSDK.md): Initializes the client.
- [listProductions](./docs/listProductions.md)
- [RIVERSIDE_API_KEY](./docs/RIVERSIDE_API_KEY.md)

51 changes: 51 additions & 0 deletions packages/riverside/codegen-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Packagefox: Code Generation Report

## Generated Files
| File | Size (bytes) |
|------|-------------|
| src/RiversideSdk.ts | 3207 |
| src/types/index.ts | 1350 |
| src/schemas/index.ts | 3571 |
| src/index.ts | 77 |

## Setup Information
- **Auth Type**: apikey


- **Setup Info**: To use the Riverside SDK, you need to obtain an API key by contacting your Riverside customer success member. Once you have the API key, you can initialize the SDK like this:

```typescript
import { createRiversideSDK } from '@microfox/riverside';

const riversideSDK = createRiversideSDK({
apiKey: 'YOUR_API_KEY_HERE'
});
```

Make sure to keep your API key secure and never expose it in client-side code.

The SDK uses the native `fetch` API available in Node.js 20+. Ensure you're using a compatible Node.js version.

Rate Limiting:
- The SDK respects rate limits for each endpoint.
- Implement retry mechanisms with exponential backoff in your application logic if needed.

Error Handling:
- The SDK throws custom errors for various scenarios (network issues, API errors, etc.).
- Always wrap SDK calls in try-catch blocks to handle potential errors.

Pagination:
- For endpoints that support pagination, the SDK provides helper methods to iterate through pages.

File Downloads:
- The SDK provides methods to download media files and transcriptions.
- Handle the returned streams appropriately in your application.

API Versioning:
- The SDK uses different API versions (v1 and v2) for different endpoints as per the Riverside API.
- This is handled internally by the SDK, but be aware of potential differences in response structures.



---
**Total Usage:** Total Bytes: 8205 | Tokens: 419693 | Cost: $1.6824
10 changes: 10 additions & 0 deletions packages/riverside/doc-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Packagefox: Documentation Report

| Step | Status | Details | Error |
|------|--------|---------|-------|
| 📝 generate | ✅ | Generated Docs: 5 | |
| ✅ validate | ✅ | Total Tokens: 7608<br>Constructor Docs: 579<br>Functions Docs: 2<br>Env Keys: 0 | |
| 💾 save | ✅ | constructor: createRiversideSDK<br>functions: 2<br>envKeys: 0 | |

---
**Total Usage:** Tokens: 427301 | Cost: $1.7117
100 changes: 100 additions & 0 deletions packages/riverside/docSummary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
## Riverside API TypeScript SDK Summary

This summary provides the necessary information to generate a TypeScript SDK for the Riverside.fm Business API. It details endpoints, data structures, authentication, and other crucial aspects for implementation.

**Authentication:**

* API Key (Bearer token): Obtained by contacting your Riverside customer success member. This key should be included in the `Authorization` header for all requests as `BEARER YOUR_API_KEY`.

**Data Structures (TypeScript Interfaces):**

```typescript
interface Production {
id: string;
name: string;
created_date: string;
studios: Studio[];
num_recordings: number;
}

interface Studio {
id: string;
name: string;
created_date: string;
projects: Project[];
num_recordings: number;
}

interface Project {
id: string;
name: string;
created_date: string;
num_recordings: number;
}

interface Recording {
id: string; // v1
recording_id: string; // v2
name: string;
project_id: string;
project_name: string;
studio_id: string;
studio_name: string;
status: "uploading" | "processing" | "ready";
created_date: string;
tracks: Track[];
transcription?: Transcription;
}

interface Track {
id: string;
type: "participant" | "screenshare" | "media board";
status: "done" | "processing" | "uploading" | "stopped";
files: File[];
}

interface File {
name?: string; // Present in v1 download file response
size?: number; // Present in v1 download file response
type: "txt" | "srt" | "raw_video" | "aligned_video" | "raw_audio" | "compressed_audio" | "cloud_recording";
download_url: string;
}

interface Transcription {
status: "transcribing" | "done";
files: File[];
}

interface ListRecordingsResponse {
page: number;
next_page_url: string | null;
total_items: number;
total_pages: number;
data: Recording[];
}

```

**Endpoints:**

| Endpoint | Method | Description | Authentication | Request Parameters | Request Body | Response | Rate Limit | Edge Cases |
|---|---|---|---|---|---|---|---|---|
| `/api/v2/productions` | `GET` | Lists all productions with associated studios, projects, and recordings. | API Key | None | None | `Production[]` | 3 minutes | None |
| `/api/v2/recordings` | `GET` | Lists recordings, optionally filtered by `studioId` or `projectId`. Supports pagination. | API Key | `studioId` (string, optional), `projectId` (string, optional), `page` (number, optional, defaults to 0) | None | `ListRecordingsResponse` | 30 seconds per unique request | Only one filter parameter allowed at a time. Handle pagination using `next_page_url`. |
| `/api/v1/recordings/{recording_id}` | `GET` | Retrieves a single recording by ID. | API Key | `recording_id` (string, path parameter) | None | `Recording` | 30 seconds per unique recording | Handle 404 Not Found. |
| `/api/v1/download/file/{file_id}` | `GET` | Downloads a media file. | API Key | `file_id` (string, path parameter) | None | File stream (binary data) | 30 seconds per unique file | Handle different content types in the response. |
| `/api/v1/download/transcription/{file_id}` | `GET` | Downloads a transcription file. | API Key | `file_id` (string, path parameter), `type` (string, query parameter - "srt" or "txt") | None | File stream (text data) | 3 minutes per unique request | Ensure correct handling of `type` parameter. |
| `/api/v1/recordings/{recording_id}` | `DELETE` | Deletes a recording. | API Key | `recording_id` (string, path parameter) | None | 204 No Content | None specified | Handle 404 Not Found. |


**SDK Considerations:**

* **TypeScript:** Use the provided interfaces for type safety.
* **Error Handling:** Implement robust error handling for all API calls, including checking HTTP status codes and potential network issues.
* **Rate Limiting:** Respect the rate limits for each endpoint to avoid request failures. Implement retry mechanisms with exponential backoff.
* **Pagination:** For `/api/v2/recordings`, handle pagination using the `next_page_url` field.
* **File Downloads:** Implement appropriate methods for downloading and handling binary file data for media files and text data for transcriptions.
* **API Versioning:** Be mindful of the different API versions (v1 and v2) used for different endpoints. Clearly document these differences in the SDK.


This comprehensive summary should provide a solid foundation for building a robust and type-safe TypeScript SDK for the Riverside.fm Business API. Remember to consult the original documentation for any updates or clarifications.
58 changes: 58 additions & 0 deletions packages/riverside/docs/RIVERSIDE_API_KEY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
## Function: `listRecordings`

Lists recordings based on provided criteria.

**Purpose:**
Retrieves a list of recordings, optionally filtered by studioId or projectId, and paginated.

**Parameters:**

- `options`: object (optional) - An object containing filter and pagination options.
- `studioId`: string (optional) - The ID of the studio to filter recordings by.
- `projectId`: string (optional) - The ID of the project to filter recordings by.
- `page`: number (optional) - The page number to retrieve.

**Return Value:**

- `Promise<ListRecordingsResponse>` - A promise that resolves to a `ListRecordingsResponse` object.
- `ListRecordingsResponse`: object
- `page`: number - The current page number.
- `next_page_url`: string | null - The URL for the next page, or null if there is no next page.
- `total_items`: number - The total number of items across all pages.
- `total_pages`: number - The total number of pages.
- `data`: array<Recording> - An array of `Recording` objects.
- `Recording`: object
- `id`: string - The unique identifier of the recording (v1).
- `recording_id`: string - The unique identifier of the recording (v2).
- `name`: string - The name of the recording.
- `project_id`: string - The ID of the project this recording belongs to.
- `project_name`: string - The name of the project this recording belongs to.
- `studio_id`: string - The ID of the studio this recording belongs to.
- `studio_name`: string - The name of the studio this recording belongs to.
- `status`: "uploading" | "processing" | "ready" - The status of the recording.
- `created_date`: string - The creation date of the recording.
- `tracks`: array<Track> - The tracks in the recording.
- `Track`: object
- `id`: string - The unique identifier of the track.
- `type`: "participant" | "screenshare" | "media board" - The type of the track.
- `status`: "done" | "processing" | "uploading" | "stopped" - The status of the track.
- `files`: array<File> - The files associated with the track.
- `File`: object
- `name`: string (optional) - The name of the file.
- `size`: number (optional) - The size of the file in bytes.
- `type`: "txt" | "srt" | "raw_video" | "aligned_video" | "raw_audio" | "compressed_audio" | "cloud_recording" - The type of the file.
- `download_url`: string - The URL to download the file.
- `transcription`: Transcription (optional) - The transcription of the recording, if available.
- `Transcription`: object
- `status`: "transcribing" | "done" - The status of the transcription.
- `files`: array<File> - The transcription files.

**Examples:**

```typescript
// Example 1: Listing all recordings
const recordings = await riversideSDK.listRecordings();
console.log(recordings);

// Example 2: Listing recordings for a specific studio
const studioRecordings = await riversideSDK.listRecordings({ studioId:
24 changes: 24 additions & 0 deletions packages/riverside/docs/createRiversideSDK.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## Constructor: `createRiversideSDK`

Initializes a new instance of the RiversideSDK.

**Purpose:**
Creates a new instance of the RiversideSDK, which allows you to interact with the Riverside.fm API.

**Parameters:**

- `options`: object - An object containing the SDK options.
- `apiKey`: string (required) - Your Riverside.fm API key.

**Return Value:**

- `RiversideSDK` - An instance of the RiversideSDK.

**Examples:**

```typescript
// Example: Creating a new RiversideSDK instance
const riversideSDK = createRiversideSDK({
apiKey: process.env.RIVERSIDE_API_KEY
});
```
38 changes: 38 additions & 0 deletions packages/riverside/docs/listProductions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## Function: `listProductions`

Lists all productions associated with your Riverside.fm account.

**Purpose:**
Retrieves a list of all productions accessible with your API key.

**Parameters:**
None

**Return Value:**

- `Promise<array<Production>>` - A promise that resolves to an array of `Production` objects.
- `Production`: object
- `id`: string - The unique identifier of the production.
- `name`: string - The name of the production.
- `created_date`: string - The creation date of the production.
- `studios`: array<Studio> - An array of studios associated with the production.
- `Studio`: object
- `id`: string - The unique identifier of the studio.
- `name`: string - The name of the studio.
- `created_date`: string - The creation date of the studio.
- `projects`: array<Project> - An array of projects associated with the studio.
- `Project`: object
- `id`: string - The unique identifier of the project.
- `name`: string - The name of the project.
- `created_date`: string - The creation date of the project.
- `num_recordings`: number - The number of recordings in the project.
- `num_recordings`: number - The number of recordings in the studio.
- `num_recordings`: number - The number of recordings in the production.

**Examples:**

```typescript
// Example: Listing all productions
const productions = await riversideSDK.listProductions();
console.log(productions);
```
Loading