mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 04:38:33 +00:00
docs(cli): sync SRT upload docs from EF (#2364)
This commit is contained in:
@@ -204,7 +204,7 @@ export class HyperframesCloudClient {
|
||||
/**
|
||||
* Upload Asset
|
||||
*
|
||||
* Uploads a file (image, video, audio, or PDF) and returns an asset_id for use in other endpoints. Max 32 MB. Supported types: png, jpeg, mp4, webm, mp3, wav, pdf.
|
||||
* Uploads a file (image, video, audio, PDF, or SRT subtitle) and returns an asset_id for use in other endpoints. Max 32 MB. Supported types: png, jpeg, mp4, webm, mp3, wav, pdf, srt.
|
||||
*/
|
||||
async uploadAsset(args: {
|
||||
file: Blob | Buffer | Uint8Array;
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
import { readFileSync } from "node:fs";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
const generatedClientSource = readFileSync(new URL("./_gen/client.ts", import.meta.url), "utf8");
|
||||
|
||||
describe("generated cloud client source contract", () => {
|
||||
it("documents SRT subtitles on the uploadAsset endpoint", () => {
|
||||
const uploadAssetDocs = generatedClientSource.match(
|
||||
/\/\*\*\s*\*\s*Upload Asset[\s\S]*?\*\/\s+async uploadAsset/,
|
||||
)?.[0];
|
||||
|
||||
expect(uploadAssetDocs).toContain("SRT subtitle");
|
||||
expect(uploadAssetDocs).toMatch(/Supported types:[^\n]*\bsrt\b/);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user