diff --git a/.microfox/pr-usage.json b/.microfox/pr-usage.json index f2501b50a..0967ef424 100644 --- a/.microfox/pr-usage.json +++ b/.microfox/pr-usage.json @@ -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 - } -} \ No newline at end of file +{} diff --git a/packages-list.json b/packages-list.json index 12917a5bc..076562185 100644 --- a/packages-list.json +++ b/packages-list.json @@ -4,6 +4,7 @@ "packages/@ext_@slack#web-api" ], "stablePackages": [ + "packages/amazon-rekognition-face-detection", "packages/aws-ses", "packages/brave", "packages/coingecko-sdk", @@ -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", @@ -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" } \ No newline at end of file diff --git a/packages/riverside/README.md b/packages/riverside/README.md new file mode 100644 index 000000000..0641147b1 --- /dev/null +++ b/packages/riverside/README.md @@ -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) + diff --git a/packages/riverside/codegen-report.md b/packages/riverside/codegen-report.md new file mode 100644 index 000000000..8dbd45d64 --- /dev/null +++ b/packages/riverside/codegen-report.md @@ -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 \ No newline at end of file diff --git a/packages/riverside/doc-report.md b/packages/riverside/doc-report.md new file mode 100644 index 000000000..ce6830726 --- /dev/null +++ b/packages/riverside/doc-report.md @@ -0,0 +1,10 @@ +# Packagefox: Documentation Report + +| Step | Status | Details | Error | +|------|--------|---------|-------| +| 📝 generate | ✅ | Generated Docs: 5 | | +| ✅ validate | ✅ | Total Tokens: 7608
Constructor Docs: 579
Functions Docs: 2
Env Keys: 0 | | +| đź’ľ save | âś… | constructor: createRiversideSDK
functions: 2
envKeys: 0 | | + +--- +**Total Usage:** Tokens: 427301 | Cost: $1.7117 \ No newline at end of file diff --git a/packages/riverside/docSummary.md b/packages/riverside/docSummary.md new file mode 100644 index 000000000..ccdd96aa5 --- /dev/null +++ b/packages/riverside/docSummary.md @@ -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. diff --git a/packages/riverside/docs/RIVERSIDE_API_KEY.md b/packages/riverside/docs/RIVERSIDE_API_KEY.md new file mode 100644 index 000000000..2ca484caa --- /dev/null +++ b/packages/riverside/docs/RIVERSIDE_API_KEY.md @@ -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` - 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 - 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 - 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 - 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 - 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: \ No newline at end of file diff --git a/packages/riverside/docs/createRiversideSDK.md b/packages/riverside/docs/createRiversideSDK.md new file mode 100644 index 000000000..29c1cc3af --- /dev/null +++ b/packages/riverside/docs/createRiversideSDK.md @@ -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 +}); +``` \ No newline at end of file diff --git a/packages/riverside/docs/listProductions.md b/packages/riverside/docs/listProductions.md new file mode 100644 index 000000000..19eb1aa9f --- /dev/null +++ b/packages/riverside/docs/listProductions.md @@ -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>` - 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 - 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 - 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); +``` \ No newline at end of file diff --git a/packages/riverside/package-builder.json b/packages/riverside/package-builder.json new file mode 100644 index 000000000..7fe61ecdb --- /dev/null +++ b/packages/riverside/package-builder.json @@ -0,0 +1,81 @@ +{ + "sdkMetadata": { + "apiName": "Riverside", + "packageName": "@microfox/riverside", + "title": "Riverside SDK", + "description": "A TypeScript SDK for interacting with the Riverside API.", + "keywords": [ + "Riverside", + "SDK", + "Typescript", + "API", + "microfox" + ], + "authType": "apikey", + "authSdk": "", + "inputArgs": { + "query": "Create SDK for Riverside API", + "url": "https://docs.riverside.fm/", + "isBaseUrl": true + } + }, + "allLinks": [ + "https://docs.riverside.fm/", + "https://support.riverside.fm/hc/en-us/requests/new", + "https://riverside.fm/dashboard", + "https://docs.riverside.fm/quickstart", + "https://support.riverside.fm/", + "https://docs.riverside.fm/endpoints-reference/list-workspace", + "https://docs.riverside.fm/endpoints-reference/list-all-recordings", + "https://docs.riverside.fm/endpoints-reference/get-recording", + "https://docs.riverside.fm/endpoints-reference/download-file", + "https://docs.riverside.fm/endpoints-reference/download-transcription-file", + "https://docs.riverside.fm/endpoints-reference/delete-recording", + "https://docs.riverside.fm/object-reference/production", + "https://docs.riverside.fm/object-reference/studio", + "https://docs.riverside.fm/object-reference/project", + "https://docs.riverside.fm/object-reference/recording", + "https://docs.riverside.fm/object-reference/track", + "https://docs.riverside.fm/object-reference/file", + "https://x.com/riversidedotfm", + "https://www.linkedin.com/company/riversidefm", + "https://mintlify.com/preview-request?utm_campaign=poweredBy&utm_medium=referral&utm_source=docs.riverside.fm" + ], + "filteredLinks": [ + "https://docs.riverside.fm/", + "https://docs.riverside.fm/quickstart", + "https://docs.riverside.fm/endpoints-reference/list-workspace", + "https://docs.riverside.fm/endpoints-reference/list-all-recordings", + "https://docs.riverside.fm/endpoints-reference/get-recording", + "https://docs.riverside.fm/endpoints-reference/download-file", + "https://docs.riverside.fm/endpoints-reference/download-transcription-file", + "https://docs.riverside.fm/endpoints-reference/delete-recording", + "https://docs.riverside.fm/object-reference/production", + "https://docs.riverside.fm/object-reference/studio", + "https://docs.riverside.fm/object-reference/project", + "https://docs.riverside.fm/object-reference/recording", + "https://docs.riverside.fm/object-reference/track", + "https://docs.riverside.fm/object-reference/file" + ], + "linkAnalysis": { + "documentationLinks": [ + "https://docs.riverside.fm/", + "https://docs.riverside.fm/quickstart", + "https://docs.riverside.fm/endpoints-reference/list-workspace", + "https://docs.riverside.fm/endpoints-reference/list-all-recordings", + "https://docs.riverside.fm/endpoints-reference/get-recording", + "https://docs.riverside.fm/endpoints-reference/download-file", + "https://docs.riverside.fm/endpoints-reference/download-transcription-file", + "https://docs.riverside.fm/endpoints-reference/delete-recording", + "https://docs.riverside.fm/object-reference/production", + "https://docs.riverside.fm/object-reference/studio", + "https://docs.riverside.fm/object-reference/project", + "https://docs.riverside.fm/object-reference/recording", + "https://docs.riverside.fm/object-reference/track", + "https://docs.riverside.fm/object-reference/file" + ], + "reason": "These links provide comprehensive information about the Riverside API, including quickstart guides, endpoint references, and object references. These resources are crucial for understanding the API's functionalities, data structures, and how to interact with it programmatically. This information is essential for building a robust and comprehensive SDK.", + "setupInstructionsLink": "https://docs.riverside.fm/quickstart" + }, + "linksUpdatedAt": "2025-05-05T14:16:30.805Z" +} \ No newline at end of file diff --git a/packages/riverside/package-info.json b/packages/riverside/package-info.json new file mode 100644 index 000000000..25fe0bf2c --- /dev/null +++ b/packages/riverside/package-info.json @@ -0,0 +1,76 @@ +{ + "name": "@microfox/riverside", + "title": "Riverside SDK", + "description": "TypeScript SDK for interacting with the Riverside.fm API to manage productions.", + "path": "packages/riverside", + "dependencies": [ + "zod" + ], + "status": "stable", + "authEndpoint": "", + "oauth2Scopes": [], + "authType": "apikey", + "documentation": "https://www.npmjs.com/package/@microfox/riverside", + "icon": "https://raw.githubusercontent.com/microfox-ai/microfox/refs/heads/main/logos/riverside.svg", + "readme_map": { + "title": "Riverside SDK", + "description": "The full README for the Riverside SDK", + "path": "https://github.com/microfox-ai/microfox/blob/main/packages/riverside/README.md", + "functionalities": [ + "createRiversideSDK", + "listProductions", + "RIVERSIDE_API_KEY" + ], + "all_readmes": [ + { + "path": "https://github.com/microfox-ai/microfox/blob/main/packages/riverside/docs/createRiversideSDK.md", + "type": "constructor", + "extension": "md", + "functionality": "createRiversideSDK", + "description": "Initializes a new instance of the RiversideSDK." + }, + { + "path": "https://github.com/microfox-ai/microfox/blob/main/packages/riverside/docs/listProductions.md", + "type": "functionality", + "extension": "md", + "functionality": "listProductions", + "description": "Lists all productions associated with your Riverside.fm account." + }, + { + "path": "https://github.com/microfox-ai/microfox/blob/main/packages/riverside/docs/RIVERSIDE_API_KEY.md", + "type": "functionality", + "extension": "md", + "functionality": "RIVERSIDE_API_KEY", + "description": "Lists recordings based on provided criteria." + } + ] + }, + "constructors": [ + { + "name": "createRiversideSDK", + "description": "Create a new Riverside SDK client through which you can interact with the API", + "auth": "apikey", + "apiType": "api_key", + "requiredKeys": [], + "internalKeys": [], + "functionalities": [ + "listProductions", + "RIVERSIDE_API_KEY" + ] + } + ], + "keysInfo": [], + "keyInstructions": { + "link": "", + "setupInfo": "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:\n\n```typescript\nimport { createRiversideSDK } from '@microfox/riverside';\n\nconst riversideSDK = createRiversideSDK({\n apiKey: 'YOUR_API_KEY_HERE'\n});\n```\n\nMake sure to keep your API key secure and never expose it in client-side code.\n\nThe SDK uses the native `fetch` API available in Node.js 20+. Ensure you're using a compatible Node.js version.\n\nRate Limiting:\n- The SDK respects rate limits for each endpoint.\n- Implement retry mechanisms with exponential backoff in your application logic if needed.\n\nError Handling:\n- The SDK throws custom errors for various scenarios (network issues, API errors, etc.).\n- Always wrap SDK calls in try-catch blocks to handle potential errors.\n\nPagination:\n- For endpoints that support pagination, the SDK provides helper methods to iterate through pages.\n\nFile Downloads:\n- The SDK provides methods to download media files and transcriptions.\n- Handle the returned streams appropriately in your application.\n\nAPI Versioning:\n- The SDK uses different API versions (v1 and v2) for different endpoints as per the Riverside API.\n- This is handled internally by the SDK, but be aware of potential differences in response structures." + }, + "extraInfo": [ + "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:\n\n```typescript\nimport { createRiversideSDK } from '@microfox/riverside';\n\nconst riversideSDK = createRiversideSDK({\n apiKey: 'YOUR_API_KEY_HERE'\n});\n```\n\nMake sure to keep your API key secure and never expose it in client-side code.\n\nThe SDK uses the native `fetch` API available in Node.js 20+. Ensure you're using a compatible Node.js version.\n\nRate Limiting:\n- The SDK respects rate limits for each endpoint.\n- Implement retry mechanisms with exponential backoff in your application logic if needed.\n\nError Handling:\n- The SDK throws custom errors for various scenarios (network issues, API errors, etc.).\n- Always wrap SDK calls in try-catch blocks to handle potential errors.\n\nPagination:\n- For endpoints that support pagination, the SDK provides helper methods to iterate through pages.\n\nFile Downloads:\n- The SDK provides methods to download media files and transcriptions.\n- Handle the returned streams appropriately in your application.\n\nAPI Versioning:\n- The SDK uses different API versions (v1 and v2) for different endpoints as per the Riverside API.\n- This is handled internally by the SDK, but be aware of potential differences in response structures." + ], + "devDependencies": [ + "@microfox/tsconfig", + "@types/node", + "tsup", + "typescript" + ] +} \ No newline at end of file diff --git a/packages/riverside/package.json b/packages/riverside/package.json new file mode 100644 index 000000000..ed0d2f6b4 --- /dev/null +++ b/packages/riverside/package.json @@ -0,0 +1,56 @@ +{ + "name": "@microfox/riverside", + "version": "1.0.0", + "description": "A TypeScript SDK for interacting with the Riverside API.", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "files": [ + "dist/**/*", + "CHANGELOG.md" + ], + "scripts": { + "build": "tsup", + "build:watch": "tsup --watch", + "clean": "rm -rf dist", + "lint": "eslint \"./**/*.ts*\"", + "prettier-check": "prettier --check \"./**/*.ts*\"" + }, + "exports": { + "./package.json": "./package.json", + ".": { + "import": "./dist/index.mjs", + "require": "./dist/index.js" + } + }, + "dependencies": { + "zod": "^3.24.2" + }, + "devDependencies": { + "@microfox/tsconfig": "*", + "@types/node": "^18", + "tsup": "^8", + "typescript": "5.6.3" + }, + "publishConfig": { + "access": "public" + }, + "engines": { + "node": ">=20.0.0" + }, + "homepage": "https://github.com/microfox-ai/microfox", + "repository": { + "type": "git", + "url": "git+https://github.com/microfox-ai/microfox.git" + }, + "bugs": { + "url": "https://github.com/microfox-ai/microfox/issues" + }, + "keywords": [ + "Riverside", + "SDK", + "Typescript", + "API", + "microfox" + ] +} \ No newline at end of file diff --git a/packages/riverside/research-report.md b/packages/riverside/research-report.md new file mode 100644 index 000000000..6ef7f43a3 --- /dev/null +++ b/packages/riverside/research-report.md @@ -0,0 +1,12 @@ +# Packagefox: Research Report + +| Step | Status | Details | Token Usage | Total Tokens | +|------|--------|---------|-------------|--------------| +| 📝 generateMetadata | ✅ | API Name: Riverside
Package: @microfox/riverside
Auth Type: apikey
Auth SDK: N/A | 351 + 66 = 417 | 417 | +| đź”— extractLinks | âś… | Total Links: 20
Base URL: https://docs.riverside.fm/ | - | - | +| 🔍 analyzeLinks | ✅ | Useful Links: 14
Total Links: 20
Filtered Links: 14
Setup Instructions: Found | 526 + 318 = 844 | 844 | +| đź“„ extractContentFromUrls | âś… | Successfully Extracted: 14
Failed URLs: 0
Total Content Length: 16.17 KB
Average Content Length: 1.15 KB | - | - | +| 📊 summarizeContent | ✅ | Summary Length: 4.44 KB
Input Length: 17.24 KB
Compression Ratio: 387.98%
Saved at: /home/runner/work/microfox/microfox/packages/riverside/docSummary.md | 5012 + 1202 = 6214 | 6214 | + +--- +**Total Usage:** Tokens: 392016 | Cost: $1.5600 \ No newline at end of file diff --git a/packages/riverside/scrapedDocs/base-.json b/packages/riverside/scrapedDocs/base-.json new file mode 100644 index 000000000..d7b42e46c --- /dev/null +++ b/packages/riverside/scrapedDocs/base-.json @@ -0,0 +1,5 @@ +{ + "url": "https://docs.riverside.fm/", + "content": "Riverside Business API Documentation home page\nSearch...\nNavigation\nAPI Documentation\nIntroduction\nAPI Documentation\nIntroduction\n\nGetting started with the Riverside Business API.\n\n​\nWhat’s it for\n\nThe Riverside Business API helps save manual effort by programmatically allowing your team to get recording media out of your Riverside account, and delete what’s no longer needed.\n\nNote: Using with the Riverside Business API requires the help of your software development team.\n\n​\nAuthentication\n\nCurrently the Business API is for select Business accounts only. Speak to your customer success member for more information on how to generate your API key.\n\n​\nVersioning\n\nSubsequent versions will not break earlier versions. Any deprecation will be communicated well in advance.\n\n​\nHierarchy\n\nRiverside’s user dashboard is organized into a hierarchy that helps keep media resources organized for traversal:\n\nCopy\nProduction\n├─ Studio\n│ ├─ Project\n│ │ ├─ Recording\n│ │ │ ├─ Track\n│ │ │ │ ├─ File\n\n\n\nWhile the Riverside user dashboard also contains Edits, these are currently not supported in the Riverside API.\n\n​\nDocumentation\n\nOur API documentation is organized by endpoints and objects.\n\nAPI reference\n\nHow to call our endpoints, and what responses to expect.\n\nObjects reference\n\nAccess the assets of your Riverside account.\n\nList Workspace\nx\nlinkedin\nPowered by Mintlify", + "updatedAt": "2025-05-05T14:16:37.474Z" +} \ No newline at end of file diff --git a/packages/riverside/scrapedDocs/base-endpoints-reference-delete-recording.json b/packages/riverside/scrapedDocs/base-endpoints-reference-delete-recording.json new file mode 100644 index 000000000..2fa943d4f --- /dev/null +++ b/packages/riverside/scrapedDocs/base-endpoints-reference-delete-recording.json @@ -0,0 +1,5 @@ +{ + "url": "https://docs.riverside.fm/endpoints-reference/delete-recording", + "content": "Riverside Business API Documentation home page\nSearch...\nNavigation\nEndpoints Reference\nDelete Recording\nEndpoints Reference\nDelete Recording\n\nDeletes a recording by its ID.\n\nHTTP Method: DELETE\n\nURL: /api/v1/recordings/{recording_id}\n\nAuthentication: Requires API Key in the request header.\n\nPath Parameters:\n\nrecording_id ID of the recording to retrieve. To find this value, visit the recording page and click “Copy Recording ID” in the three dots menu.\n\nResponse: None (HTTP status codes only).\n\nStatus Codes:\n\n204 No Content Recording successfully deleted.\n401 Unauthorized Authentication failed.\n404 Not Found Recording not found.\n​\nSample Request\nCopy\nDELETE /api/v1/recordings/1 HTTP/1.1\nHost: platform.riverside.fm\nAuthorization: BEARER YOUR_API_KEY\n\n​\nSample Response\nCopy\nHTTP/1.1 204 No Content\n\nDownload Transcription File\nProduction Object\nx\nlinkedin\nPowered by Mintlify", + "updatedAt": "2025-05-05T14:17:10.618Z" +} \ No newline at end of file diff --git a/packages/riverside/scrapedDocs/base-endpoints-reference-download-file.json b/packages/riverside/scrapedDocs/base-endpoints-reference-download-file.json new file mode 100644 index 000000000..26066060e --- /dev/null +++ b/packages/riverside/scrapedDocs/base-endpoints-reference-download-file.json @@ -0,0 +1,5 @@ +{ + "url": "https://docs.riverside.fm/endpoints-reference/download-file", + "content": "Riverside Business API Documentation home page\nSearch...\nNavigation\nEndpoints Reference\nDownload File\nEndpoints Reference\nDownload File\n\nDownload the media file of a track.\n\nHTTP Method: GET\n\nURL: /api/v1/download/file/{file_id}\n\nAuthentication: Requires API Key in the request header.\n\nPath Parameters:\n\nfile_id ID of the file to retrieve. This will be provided when calling the Get Recording endpoint.\n\nResponse: The media file.\n\nRate limit: Once every 30 seconds per unique request\n\nStatus Codes:\n\n200 OK Recording retrieval successful.\n\n401 Unauthorized Authentication failed.\n\n404 Not Found Recording not found.\n\n​\nSample Request\nCopy\nGET /api/v1/download/file/{file_id} HTTP/1.1\nHost: platform.riverside.fm\nAuthorization: BEARER YOUR_API_KEY\n\n​\nSample Response\nCopy\nconnection: keep-alive \ncontent-disposition: attachment; filename=\"riverside_dev_admin_raw-audio_david_25009e's%20stud_0001.wav\" \ncontent-type: audio/x-wav \ndate: Thu,04 Jul 2024 13:08:17 GMT \nkeep-alive: timeout=5 \ntransfer-encoding: chunked \nx-powered-by: Express \nx-ratelimit-limit: 1 \nx-ratelimit-remaining: 0 \nx-ratelimit-reset: 180\n\nGet Recording\nDownload Transcription File\nx\nlinkedin\nPowered by Mintlify", + "updatedAt": "2025-05-05T14:16:59.129Z" +} \ No newline at end of file diff --git a/packages/riverside/scrapedDocs/base-endpoints-reference-download-transcription-file.json b/packages/riverside/scrapedDocs/base-endpoints-reference-download-transcription-file.json new file mode 100644 index 000000000..10b050adf --- /dev/null +++ b/packages/riverside/scrapedDocs/base-endpoints-reference-download-transcription-file.json @@ -0,0 +1,5 @@ +{ + "url": "https://docs.riverside.fm/endpoints-reference/download-transcription-file", + "content": "Riverside Business API Documentation home page\nSearch...\nNavigation\nEndpoints Reference\nDownload Transcription File\nEndpoints Reference\nDownload Transcription File\n\nDownload the transcription file of a track.\n\nHTTP Method: GET\n\nURL: `/api/v1/download/transcription/\n\nAuthentication: Requires API Key in the request header.\n\nPath Parameters:\n\nfile_id ID of the transcription file to retrieve. This will be provided when calling the Get Recording endpoint. This ID is the same for all transcription file types.\n\ntype the format of the transcription, currently either srt or txt. Both types deliver the full transcription with different formatting.\n\nResponse: The transcription file.\n\nRate limit: Once every 3 minutes per unique request\n\nStatus Codes:\n\n200 OK Recording retrieval successful.\n\n401 Unauthorized Authentication failed.\n\n404 Not Found Recording not found.\n\n​\nSample Request\nCopy\nGET /api/v1/download/transcription/{file_id}?type=srt HTTP/1.1\nHost: platform.riverside.fm\nAuthorization: BEARER YOUR_API_KEY\n\n​\nSample Response\nCopy\nconnection: keep-alive \ncontent-disposition: attachment; filename=customName.srt \ncontent-length: 19764 \ncontent-type: text/plain; charset=utf-8 \ndate: Thu,04 Jul 2024 13:22:58 GMT \netag: W/\"4d34-fU87B8Rd/+T7gvt4hV9lBOvAtaM\" \nkeep-alive: timeout=5 \nx-powered-by: Express \nx-ratelimit-limit: 1 \nx-ratelimit-remaining: 0 \nx-ratelimit-reset: 180\n\nDownload File\nDelete Recording\nx\nlinkedin\nPowered by Mintlify", + "updatedAt": "2025-05-05T14:17:04.766Z" +} \ No newline at end of file diff --git a/packages/riverside/scrapedDocs/base-endpoints-reference-get-recording.json b/packages/riverside/scrapedDocs/base-endpoints-reference-get-recording.json new file mode 100644 index 000000000..f351c9621 --- /dev/null +++ b/packages/riverside/scrapedDocs/base-endpoints-reference-get-recording.json @@ -0,0 +1,5 @@ +{ + "url": "https://docs.riverside.fm/endpoints-reference/get-recording", + "content": "Riverside Business API Documentation home page\nSearch...\nNavigation\nEndpoints Reference\nGet Recording\nEndpoints Reference\nGet Recording\n\nRetrieves a single recording by its ID. Each recording includes information about tracks.\n\nHTTP Method: GET\n\nURL: /api/v1/recordings/{recording_id}\n\nAuthentication: Requires API Key in the request header.\n\nPath Parameters:\n\nrecording_id ID of the recording to retrieve. To find this value, visit the recording page and click “Copy Recording ID” in the three dots menu.\n\nResponse: Information about the requested recording with associated tracks.\n\nRate limit: Once every 30 seconds for unique request (e.g. different recordings not limited)\n\nStatus Codes:\n\n200 OK Recording retrieval successful.\n\n401 Unauthorized Authentication failed.\n\n404 Not Found Recording not found.\n\n​\nSample Request\nCopy\nGET /api/v1/recordings/1 HTTP/1.1\nHost: platform.riverside.fm\nAuthorization: BEARER YOUR_API_KEY\n\n​\nSample Response\nCopy\n{\n \"id\": \"1\",\n \"name\": \"Recording 1\",\n \"project_id\": \"640479c9-1222-4161-1234-dee0d855e685\",\n \"project_name\": \"Project 1\",\n \"studio_id\": \"640479c9-1222-4161-1234-dee0d855e685\",\n \"studio_name\": \"Studio 1\", \n \"status\": \"ready\",\n \"created_date\": \"2024-04-28T12:00:00Z\",\n \"tracks\": [{\n \"id\": \"track123\",\n \"type\": \"participant\",\n \"status\": \"done\",\n \"files\": [{\n \"name\": \"my_file.mp3\",\n \"size\": 100000,\n \"type\": \"compressed_audio\",\n \"download_url\": \"https://platform.riverside.fm/api/v1/download/file/183123812\"\n }]\n }, {\n \"id\": \"track456\",\n \"type\": \"screenshare\",\n \"status\": \"done\",\n \"files\": [{\n \"name\": \"my_file.mp4\",\n \"size\": 100000,\n \"type\": \"raw_video\",\n \"download_url\": \"https://platform.riverside.fm/api/v1/download/file/3292356392\"\n }]\n }],\n \"transcription\": {\n \"status\": \"done\",\n \"files\": [\n {\n \"type\": \"srt\",\n \"download_url\": \"https://platform.riverside.fm/api/v1/download/transcription/3343434?type=srt\"\n },\n {\n \"type\": \"txt\",\n \"download_url\": \"https://platform.riverside.fm/api/v1/download/transcription/3343434?type=txt\"\n }\n ]\n } \n}\n\n\nList All Recordings\nDownload File\nx\nlinkedin\nPowered by Mintlify", + "updatedAt": "2025-05-05T14:16:53.412Z" +} \ No newline at end of file diff --git a/packages/riverside/scrapedDocs/base-endpoints-reference-list-all-recordings.json b/packages/riverside/scrapedDocs/base-endpoints-reference-list-all-recordings.json new file mode 100644 index 000000000..4575e075d --- /dev/null +++ b/packages/riverside/scrapedDocs/base-endpoints-reference-list-all-recordings.json @@ -0,0 +1,5 @@ +{ + "url": "https://docs.riverside.fm/endpoints-reference/list-all-recordings", + "content": "Riverside Business API Documentation home page\nSearch...\nNavigation\nEndpoints Reference\nList All Recordings\nEndpoints Reference\nList All Recordings\n\nRetrieves a list of recordings with optional filtering by either studio ID or Project Id. Each recording includes information about tracks.\n\nHTTP Method: GET\n\nURL: /api/v2/recordings\n\nAuthentication: Requires API Key in the request header.\n\nQuery Parameters:\n\nChoose one of the following parameters to filter by (Note that you can only filter by one parameter at a time):\n\nstudioId: ID of the studio to filter recordings\n\nprojectId: ID of the studio to filter recordings\n\nResponse: List of recordings objects\n\nRate limit: once every 30 seconds for unique request (e.g. different pages not limited)\n\nSorting: Lists objects in order of “newest created first”\n\nPagination: By default every response is capped at 20 recordings\n\nResponse:\n\npage page you are viewing\n\nnext_page_url\n\ntotal_items\n\ntotal_pages\n\nRequest:\n\npage page that you want to receive (optional, defaults to page 0)\n\nStatus Codes:\n\n200 OK Recordings retrieval successful.\n\n401 Unauthorized Authentication failed.\n\n​\nSample Request\nCopy\nGET /api/v2/recordings?studioId=1 HTTP/1.1\nHost: platform.riverside.fm\nAuthorization: BEARER YOUR_API_KEY\n\n​\nSample Request with pagination\nCopy\nGET /api/v2/recordings?studioId=1&page=4 HTTP/1.1\nHost: platform.riverside.fm\nAuthorization: BEARER YOUR_API_KEY\n\n​\nSample Response\nCopy\n{\n \"page\": 0,\n \"next_page_url\": \"/api/v2/recordings?studioId=1&page=1\",\n \"total_items\": 200,\n \"total_pages\": 2,\n \"data\": [{\n \"recording_id\": \"rec123\",\n \"name\": \"Recording 1\",\n \"project_id\": \"640479c9-1222-4161-1234-dee0d855e685\",\n \"project_name\": \"Project 1\",\n \"studio_id\": \"640479c9-1222-4161-1234-dee0d855e685\",\n \"studio_name\": \"Studio 1\", \n \"status\": \"ready\",\n \"created_date\": \"2024-04-28T12:00:00Z\",\n \"tracks\": [{\n \"id\": \"track123\",\n \"type\": \"participant\",\n \"status\": \"done\",\n \"files\": [{\n \"type\": \"compressed_audio\",\n \"download_url\": \"https://api.riverside.fm/downloads/audio123.mp3\"\n }]\n }, {\n \"id\": \"track456\",\n \"type\": \"screenshare\",\n \"status\": \"done\",\n \"files\": [{\n \"type\": \"raw_video\",\n \"download_url\": \"https://example.com/downloads/video456.mp4\"\n }]\n }]\n }, {\n \"recording_id\": \"rec456\",\n \"name\": \"Recording 2\",\n \"project_id\": \"640479c9-1222-4161-1234-dee0d855e685\",\n \"project_name\": \"Project 1\",\n \"studio_id\": \"640479c9-1222-4161-1234-dee0d855e685\",\n \"studio_name\": \"Studio 1\", \n \"status\": \"uploading\",\n \"created_date\": \"2024-04-27T10:30:00Z\",\n \"tracks\": [{\n \"id\": \"track789\",\n \"type\": \"media board\",\n \"status\": \"processing\",\n \"files\": []\n }]\n }, {\n .....\n }]\n}\n\nList Workspace\nGet Recording\nx\nlinkedin\nPowered by Mintlify", + "updatedAt": "2025-05-05T14:16:49.859Z" +} \ No newline at end of file diff --git a/packages/riverside/scrapedDocs/base-endpoints-reference-list-workspace.json b/packages/riverside/scrapedDocs/base-endpoints-reference-list-workspace.json new file mode 100644 index 000000000..49e3b424c --- /dev/null +++ b/packages/riverside/scrapedDocs/base-endpoints-reference-list-workspace.json @@ -0,0 +1,5 @@ +{ + "url": "https://docs.riverside.fm/endpoints-reference/list-workspace", + "content": "Riverside Business API Documentation home page\nSearch...\nNavigation\nEndpoints Reference\nList Workspace\nEndpoints Reference\nList Workspace\n\nRetrieves a list of productions with associated studios, projects, and recordings.\n\nHTTP Method: GET\n\nURL: /api/v2/productions\n\nAuthentication: Requires API Key in the request header.\n\nResponse: List of productions with associated studios, projects, and recordings.\n\nRate limit: once every 3 minutes\n\nSorting: Lists objects in order of “newest created first”\n\nPagination: None\n\nStatus Codes:\n\n200 OK Productions retrieval successful.\n401 Unauthorized Authentication failed.\n​\nSample Request\nCopy\nGET /api/v2/productions HTTP/1.1\nHost: platform.riverside.fm\nAuthorization: BEARER YOUR_API_KEY\n\n​\nSample Response\nCopy\n{\n \"productions\": [{\n \"id\": \"1\",\n \"name\": \"Production 1\",\n \"created_date\": \"2024-04-10\",\n \"num_recordings\": 6,\n \"studios\": [{\n \"id\": \"1\",\n \"name\": \"Studio 1\",\n \"created_date\": \"2024-04-11\",\n \"num_recordings\": 6,\n \"projects\":[{\n \"id\": \"1\",\n \"name\": \"Project 1\",\n \"created_date\": \"2024-05-11\",\n \"num_recordings\": 3,\n }]\n }]\n }]\n}\n\nIntroduction\nList All Recordings\nx\nlinkedin\nPowered by Mintlify", + "updatedAt": "2025-05-05T14:16:45.431Z" +} \ No newline at end of file diff --git a/packages/riverside/scrapedDocs/base-object-reference-file.json b/packages/riverside/scrapedDocs/base-object-reference-file.json new file mode 100644 index 000000000..0f43c4e22 --- /dev/null +++ b/packages/riverside/scrapedDocs/base-object-reference-file.json @@ -0,0 +1,5 @@ +{ + "url": "https://docs.riverside.fm/object-reference/file", + "content": "Riverside Business API Documentation home page\nSearch...\nNavigation\nObjects Reference\nFile Object\nObjects Reference\nFile Object\n\nA File reflects a specific downloadable piece of media in your account.\n\ntype the type of file, with the following possible values:\n\nTranscription: txt srt\n\nParticipants: raw_video aligned_video raw_audio compressed_audio cloud_recording\n\nScreenshare and media board raw_video aligned_video\n\nname the file name\n\nsize the file size in bytes\n\ndownload_url the media URL to download the file.\n\nTrack Object\nx\nlinkedin\nPowered by Mintlify", + "updatedAt": "2025-05-05T14:17:40.290Z" +} \ No newline at end of file diff --git a/packages/riverside/scrapedDocs/base-object-reference-production.json b/packages/riverside/scrapedDocs/base-object-reference-production.json new file mode 100644 index 000000000..6cad2ea9a --- /dev/null +++ b/packages/riverside/scrapedDocs/base-object-reference-production.json @@ -0,0 +1,5 @@ +{ + "url": "https://docs.riverside.fm/object-reference/production", + "content": "Riverside Business API Documentation home page\nSearch...\nNavigation\nObjects Reference\nProduction Object\nObjects Reference\nProduction Object\n\nProductions are the top-most unit of organization in a Riverside account, containing studios. Productions often correspond to a team or initiative.\n\nid Unique identifier for the production.\n\nname Name of the production.\n\ncreated_date Date when the production was created.\n\nstudios List of studios associated with the production.\n\nnum_recordings Count of recordings associated with the production.\n\nDelete Recording\nStudio Object\nx\nlinkedin\nPowered by Mintlify", + "updatedAt": "2025-05-05T14:17:15.257Z" +} \ No newline at end of file diff --git a/packages/riverside/scrapedDocs/base-object-reference-project.json b/packages/riverside/scrapedDocs/base-object-reference-project.json new file mode 100644 index 000000000..b21b3a25b --- /dev/null +++ b/packages/riverside/scrapedDocs/base-object-reference-project.json @@ -0,0 +1,5 @@ +{ + "url": "https://docs.riverside.fm/object-reference/project", + "content": "Riverside Business API Documentation home page\nSearch...\nNavigation\nObjects Reference\nProject Object\nObjects Reference\nProject Object\n\nA Project is a folder of related recordings and edits, meant to group the assets of a piece of content (i.e. an episode).\n\nProjects will be introduced to the Riverside dashboard interface in late summer, after advanced communication to all accounts. The release of Projects won’t affect other API endpoints.\n\nid Unique identifier for the project.\n\nname Name of the project.\n\ncreated_date Date when the project was created.\n\nnum_recordings Count of recordings associated with the project.\n\nStudio Object\nRecording Object\nx\nlinkedin\nPowered by Mintlify", + "updatedAt": "2025-05-05T14:17:26.344Z" +} \ No newline at end of file diff --git a/packages/riverside/scrapedDocs/base-object-reference-recording.json b/packages/riverside/scrapedDocs/base-object-reference-recording.json new file mode 100644 index 000000000..52f4cbdd5 --- /dev/null +++ b/packages/riverside/scrapedDocs/base-object-reference-recording.json @@ -0,0 +1,5 @@ +{ + "url": "https://docs.riverside.fm/object-reference/recording", + "content": "Riverside Business API Documentation home page\nSearch...\nNavigation\nObjects Reference\nRecording Object\nObjects Reference\nRecording Object\n\nRecordings can be recorded in the Riverside studio or uploaded to Riverside. They group together the separate tracks, transcription, and related files. Recordings often reflect a “take.”\n\nid Unique identifier for the recording.\n\nname Name of the recording.\n\ntracks List of tracks associated with the recording.\n\nstatus Status of the recording can be either uploading, processing or ready. Since recordings have multiple tracks, this status is based on the “least-baked” track contained in the recording.\n\ncreated_date Date when the recording was created.\n\ntranscription\n\nstatus either transcribing or done\nfiles list of transcription files that can be downloaded when done\nProject Object\nTrack Object\nx\nlinkedin\nPowered by Mintlify", + "updatedAt": "2025-05-05T14:17:30.440Z" +} \ No newline at end of file diff --git a/packages/riverside/scrapedDocs/base-object-reference-studio.json b/packages/riverside/scrapedDocs/base-object-reference-studio.json new file mode 100644 index 000000000..0ef1e2352 --- /dev/null +++ b/packages/riverside/scrapedDocs/base-object-reference-studio.json @@ -0,0 +1,5 @@ +{ + "url": "https://docs.riverside.fm/object-reference/studio", + "content": "Riverside Business API Documentation home page\nSearch...\nNavigation\nObjects Reference\nStudio Object\nObjects Reference\nStudio Object\n\nStudios are found under productions, and often reflect a series of content.\n\nid Unique identifier for the studio.\n\nname Name of the studio.\n\ncreated_date Date when the studio was created.\n\nprojects List of projects associated with the studio.\n\nnum_recordings Count of recordings associated with the studio.\n\nProduction Object\nProject Object\nx\nlinkedin\nPowered by Mintlify", + "updatedAt": "2025-05-05T14:17:20.060Z" +} \ No newline at end of file diff --git a/packages/riverside/scrapedDocs/base-object-reference-track.json b/packages/riverside/scrapedDocs/base-object-reference-track.json new file mode 100644 index 000000000..8ab00fb4e --- /dev/null +++ b/packages/riverside/scrapedDocs/base-object-reference-track.json @@ -0,0 +1,5 @@ +{ + "url": "https://docs.riverside.fm/object-reference/track", + "content": "Riverside Business API Documentation home page\nSearch...\nNavigation\nObjects Reference\nTrack Object\nObjects Reference\nTrack Object\n\nA Track reflects the local recording of one individual participant, or media generated in the studio such as screenshares or sounds and videos played live using the media board.\n\nid Unique identifier for the track.\n\ntype Type of track participant screenshare media board\n\nstatus Status of the track done processing uploading stopped\n\nfiles List of files available for this type of track.\n\nRecording Object\nFile Object\nx\nlinkedin\nPowered by Mintlify", + "updatedAt": "2025-05-05T14:17:35.280Z" +} \ No newline at end of file diff --git a/packages/riverside/scrapedDocs/base-quickstart.json b/packages/riverside/scrapedDocs/base-quickstart.json new file mode 100644 index 000000000..73443798c --- /dev/null +++ b/packages/riverside/scrapedDocs/base-quickstart.json @@ -0,0 +1,5 @@ +{ + "url": "https://docs.riverside.fm/quickstart", + "content": "Riverside Business API Documentation home page\nSearch...\nNavigation\nAPI Documentation\nIntroduction\nAPI Documentation\nIntroduction\n\nGetting started with the Riverside Business API.\n\n​\nWhat’s it for\n\nThe Riverside Business API helps save manual effort by programmatically allowing your team to get recording media out of your Riverside account, and delete what’s no longer needed.\n\nNote: Using with the Riverside Business API requires the help of your software development team.\n\n​\nAuthentication\n\nCurrently the Business API is for select Business accounts only. Speak to your customer success member for more information on how to generate your API key.\n\n​\nVersioning\n\nSubsequent versions will not break earlier versions. Any deprecation will be communicated well in advance.\n\n​\nHierarchy\n\nRiverside’s user dashboard is organized into a hierarchy that helps keep media resources organized for traversal:\n\nCopy\nProduction\n├─ Studio\n│ ├─ Project\n│ │ ├─ Recording\n│ │ │ ├─ Track\n│ │ │ │ ├─ File\n\n\n\nWhile the Riverside user dashboard also contains Edits, these are currently not supported in the Riverside API.\n\n​\nDocumentation\n\nOur API documentation is organized by endpoints and objects.\n\nAPI reference\n\nHow to call our endpoints, and what responses to expect.\n\nObjects reference\n\nAccess the assets of your Riverside account.\n\nList Workspace\nx\nlinkedin\nPowered by Mintlify", + "updatedAt": "2025-05-05T14:16:41.038Z" +} \ No newline at end of file diff --git a/packages/riverside/src/RiversideSdk.ts b/packages/riverside/src/RiversideSdk.ts new file mode 100644 index 000000000..ad2f7e238 --- /dev/null +++ b/packages/riverside/src/RiversideSdk.ts @@ -0,0 +1,118 @@ +import { z } from 'zod'; +import { + Production, + Studio, + Project, + Recording, + Track, + File, + Transcription, + ListRecordingsResponse, + RiversideSDKOptions, +} from './types'; +import { + productionSchema, + listRecordingsResponseSchema, + recordingSchema, +} from './schemas'; + +class RiversideSDK { + private apiKey: string; + private baseUrl: string = 'https://api.riverside.fm'; + + constructor(options: RiversideSDKOptions) { + this.apiKey = options.apiKey; + } + + private async request( + endpoint: string, + method: 'GET' | 'DELETE' = 'GET', + params: Record = {} + ): Promise { + const url = new URL(`${this.baseUrl}${endpoint}`); + Object.entries(params).forEach(([key, value]) => { + if (value !== undefined) { + url.searchParams.append(key, value); + } + }); + + const response = await fetch(url.toString(), { + method, + headers: { + 'Authorization': `Bearer ${this.apiKey}`, + 'Content-Type': 'application/json', + }, + }); + + if (!response.ok) { + throw new Error(`HTTP error! status: ${response.status}`); + } + + if (method === 'DELETE') { + return undefined as T; + } + + const data = await response.json(); + return data as T; + } + + async listProductions(): Promise { + const data = await this.request('/api/v2/productions'); + return z.array(productionSchema).parse(data); + } + + async listRecordings(options: { + studioId?: string; + projectId?: string; + page?: number; + } = {}): Promise { + const params: Record = {}; + if (options.studioId) params.studioId = options.studioId; + if (options.projectId) params.projectId = options.projectId; + if (options.page !== undefined) params.page = options.page.toString(); + + const data = await this.request('/api/v2/recordings', 'GET', params); + return listRecordingsResponseSchema.parse(data); + } + + async getRecording(recordingId: string): Promise { + const data = await this.request(`/api/v1/recordings/${recordingId}`); + return recordingSchema.parse(data); + } + + async downloadFile(fileId: string): Promise { + const response = await fetch(`${this.baseUrl}/api/v1/download/file/${fileId}`, { + headers: { + 'Authorization': `Bearer ${this.apiKey}`, + }, + }); + + if (!response.ok) { + throw new Error(`HTTP error! status: ${response.status}`); + } + + return response.body!; + } + + async downloadTranscription(fileId: string, type: 'srt' | 'txt'): Promise { + const response = await fetch(`${this.baseUrl}/api/v1/download/transcription/${fileId}?type=${type}`, { + headers: { + 'Authorization': `Bearer ${this.apiKey}`, + }, + }); + + if (!response.ok) { + throw new Error(`HTTP error! status: ${response.status}`); + } + + return response.body!; + } + + async deleteRecording(recordingId: string): Promise { + await this.request(`/api/v1/recordings/${recordingId}`, 'DELETE'); + } +} + +export function createRiversideSDK(options: RiversideSDKOptions): RiversideSDK { + return new RiversideSDK(options); +} diff --git a/packages/riverside/src/index.ts b/packages/riverside/src/index.ts new file mode 100644 index 000000000..ecc67226f --- /dev/null +++ b/packages/riverside/src/index.ts @@ -0,0 +1,2 @@ +export { createRiversideSDK } from './RiversideSdk'; +export * from './types'; diff --git a/packages/riverside/src/schemas/index.ts b/packages/riverside/src/schemas/index.ts new file mode 100644 index 000000000..d910a8171 --- /dev/null +++ b/packages/riverside/src/schemas/index.ts @@ -0,0 +1,65 @@ +import { z } from 'zod'; + +export const fileSchema = z.object({ + name: z.string().optional().describe("The name of the file"), + size: z.number().optional().describe("The size of the file in bytes"), + type: z.enum(["txt", "srt", "raw_video", "aligned_video", "raw_audio", "compressed_audio", "cloud_recording"]).describe("The type of the file"), + download_url: z.string().url().describe("The URL to download the file"), +}); + +export const trackSchema = z.object({ + id: z.string().describe("The unique identifier of the track"), + type: z.enum(["participant", "screenshare", "media board"]).describe("The type of the track"), + status: z.enum(["done", "processing", "uploading", "stopped"]).describe("The status of the track"), + files: z.array(fileSchema).describe("The files associated with the track"), +}); + +export const transcriptionSchema = z.object({ + status: z.enum(["transcribing", "done"]).describe("The status of the transcription"), + files: z.array(fileSchema).describe("The transcription files"), +}); + +export const recordingSchema = z.object({ + id: z.string().describe("The unique identifier of the recording (v1)"), + recording_id: z.string().describe("The unique identifier of the recording (v2)"), + name: z.string().describe("The name of the recording"), + project_id: z.string().describe("The ID of the project this recording belongs to"), + project_name: z.string().describe("The name of the project this recording belongs to"), + studio_id: z.string().describe("The ID of the studio this recording belongs to"), + studio_name: z.string().describe("The name of the studio this recording belongs to"), + status: z.enum(["uploading", "processing", "ready"]).describe("The status of the recording"), + created_date: z.string().describe("The creation date of the recording"), + tracks: z.array(trackSchema).describe("The tracks in the recording"), + transcription: transcriptionSchema.optional().describe("The transcription of the recording, if available"), +}); + +export const projectSchema = z.object({ + id: z.string().describe("The unique identifier of the project"), + name: z.string().describe("The name of the project"), + created_date: z.string().describe("The creation date of the project"), + num_recordings: z.number().describe("The number of recordings in the project"), +}); + +export const studioSchema = z.object({ + id: z.string().describe("The unique identifier of the studio"), + name: z.string().describe("The name of the studio"), + created_date: z.string().describe("The creation date of the studio"), + projects: z.array(projectSchema).describe("The projects in the studio"), + num_recordings: z.number().describe("The number of recordings in the studio"), +}); + +export const productionSchema = z.object({ + id: z.string().describe("The unique identifier of the production"), + name: z.string().describe("The name of the production"), + created_date: z.string().describe("The creation date of the production"), + studios: z.array(studioSchema).describe("The studios in the production"), + num_recordings: z.number().describe("The number of recordings in the production"), +}); + +export const listRecordingsResponseSchema = z.object({ + page: z.number().describe("The current page number"), + next_page_url: z.string().url().nullable().describe("The URL for the next page, or null if there is no next page"), + total_items: z.number().describe("The total number of items across all pages"), + total_pages: z.number().describe("The total number of pages"), + data: z.array(recordingSchema).describe("The recordings on the current page"), +}); diff --git a/packages/riverside/src/types/index.ts b/packages/riverside/src/types/index.ts new file mode 100644 index 000000000..253bbc6f1 --- /dev/null +++ b/packages/riverside/src/types/index.ts @@ -0,0 +1,67 @@ +export interface Production { + id: string; + name: string; + created_date: string; + studios: Studio[]; + num_recordings: number; +} + +export interface Studio { + id: string; + name: string; + created_date: string; + projects: Project[]; + num_recordings: number; +} + +export interface Project { + id: string; + name: string; + created_date: string; + num_recordings: number; +} + +export interface Recording { + id: string; + recording_id: string; + 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; +} + +export interface Track { + id: string; + type: "participant" | "screenshare" | "media board"; + status: "done" | "processing" | "uploading" | "stopped"; + files: File[]; +} + +export interface File { + name?: string; + size?: number; + type: "txt" | "srt" | "raw_video" | "aligned_video" | "raw_audio" | "compressed_audio" | "cloud_recording"; + download_url: string; +} + +export interface Transcription { + status: "transcribing" | "done"; + files: File[]; +} + +export interface ListRecordingsResponse { + page: number; + next_page_url: string | null; + total_items: number; + total_pages: number; + data: Recording[]; +} + +export interface RiversideSDKOptions { + apiKey: string; +} diff --git a/packages/riverside/tsconfig.json b/packages/riverside/tsconfig.json new file mode 100644 index 000000000..9b13fd070 --- /dev/null +++ b/packages/riverside/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "@microfox/tsconfig/ts-library.json", + "include": ["."], + "exclude": ["*/dist", "dist", "build", "node_modules"] +} \ No newline at end of file diff --git a/packages/riverside/tsup.config.ts b/packages/riverside/tsup.config.ts new file mode 100644 index 000000000..9480ab1bf --- /dev/null +++ b/packages/riverside/tsup.config.ts @@ -0,0 +1,10 @@ +import { defineConfig } from 'tsup'; + +export default defineConfig([ + { + entry: ['src/index.ts'], + format: ['cjs', 'esm'], + dts: true, + sourcemap: true, + }, +]); \ No newline at end of file diff --git a/packages/riverside/turbo.json b/packages/riverside/turbo.json new file mode 100644 index 000000000..48d0cfcd4 --- /dev/null +++ b/packages/riverside/turbo.json @@ -0,0 +1,12 @@ +{ + "extends": [ + "//" + ], + "tasks": { + "build": { + "outputs": [ + "**/dist/**" + ] + } + } +} \ No newline at end of file