@editframe/api 0.12.0-beta.16 → 0.12.0-beta.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ProgressIterator.d.ts +1 -1
- package/dist/ProgressIterator.js +14 -2
- package/dist/StreamEventSource.d.ts +2 -3
- package/dist/StreamEventSource.js +0 -2
- package/dist/client.d.ts +1 -1
- package/dist/index.d.ts +13 -10
- package/dist/node.d.ts +5 -5
- package/dist/resources/caption-file.d.ts +30 -2
- package/dist/resources/caption-file.js +9 -0
- package/dist/resources/image-file.d.ts +22 -3
- package/dist/resources/image-file.js +18 -0
- package/dist/resources/isobmff-file.d.ts +23 -3
- package/dist/resources/isobmff-track.d.ts +267 -3
- package/dist/resources/isobmff-track.js +20 -18
- package/dist/resources/process-isobmff.d.ts +2 -2
- package/dist/resources/renders.d.ts +3 -2
- package/dist/resources/transcriptions.d.ts +4 -3
- package/dist/resources/unprocessed-file.d.ts +5 -5
- package/dist/resources/url-token.d.ts +1 -1
- package/dist/uploadChunks.d.ts +4 -1
- package/docs/packages/api/docs/.nojekyll +1 -0
- package/docs/packages/api/docs/assets/highlight.css +71 -0
- package/docs/packages/api/docs/assets/icons.js +18 -0
- package/docs/packages/api/docs/assets/icons.svg +1 -0
- package/docs/packages/api/docs/assets/main.js +60 -0
- package/docs/packages/api/docs/assets/navigation.js +1 -0
- package/docs/packages/api/docs/assets/search.js +1 -0
- package/docs/packages/api/docs/assets/style.css +1493 -0
- package/docs/packages/api/docs/classes/Client.html +4 -0
- package/docs/packages/api/docs/functions/createCaptionFile.html +8 -0
- package/docs/packages/api/docs/functions/createISOBMFFFile.html +1 -0
- package/docs/packages/api/docs/functions/createISOBMFFTrack.html +1 -0
- package/docs/packages/api/docs/functions/createImageFile.html +1 -0
- package/docs/packages/api/docs/functions/createRender.html +1 -0
- package/docs/packages/api/docs/functions/createTranscription.html +1 -0
- package/docs/packages/api/docs/functions/createURLToken.html +1 -0
- package/docs/packages/api/docs/functions/createUnprocessedFile.html +1 -0
- package/docs/packages/api/docs/functions/getISOBMFFFileTranscription.html +1 -0
- package/docs/packages/api/docs/functions/getIsobmffProcessInfo.html +1 -0
- package/docs/packages/api/docs/functions/getIsobmffProcessProgress.html +1 -0
- package/docs/packages/api/docs/functions/getTranscriptionInfo.html +1 -0
- package/docs/packages/api/docs/functions/getTranscriptionProgress.html +1 -0
- package/docs/packages/api/docs/functions/lookupCaptionFileByMd5.html +1 -0
- package/docs/packages/api/docs/functions/lookupISOBMFFFileByMd5.html +1 -0
- package/docs/packages/api/docs/functions/lookupImageFileByMd5.html +1 -0
- package/docs/packages/api/docs/functions/lookupRenderByMd5.html +1 -0
- package/docs/packages/api/docs/functions/lookupUnprocessedFileByMd5.html +1 -0
- package/docs/packages/api/docs/functions/processIsobmffFile.html +1 -0
- package/docs/packages/api/docs/functions/transcribeISOBMFFFile.html +1 -0
- package/docs/packages/api/docs/functions/uploadCaptionFile.html +1 -0
- package/docs/packages/api/docs/functions/uploadFragmentIndex.html +1 -0
- package/docs/packages/api/docs/functions/uploadISOBMFFTrack.html +1 -0
- package/docs/packages/api/docs/functions/uploadImageFile.html +1 -0
- package/docs/packages/api/docs/functions/uploadRender.html +1 -0
- package/docs/packages/api/docs/functions/uploadUnprocessedReadableStream.html +1 -0
- package/docs/packages/api/docs/index.html +39 -0
- package/docs/packages/api/docs/interfaces/CreateCaptionFileResult.html +4 -0
- package/docs/packages/api/docs/interfaces/CreateISOBMFFFileResult.html +5 -0
- package/docs/packages/api/docs/interfaces/CreateISOBMFFTrackResult.html +6 -0
- package/docs/packages/api/docs/interfaces/CreateImageFileResult.html +5 -0
- package/docs/packages/api/docs/interfaces/CreateRenderResult.html +4 -0
- package/docs/packages/api/docs/interfaces/CreateTranscriptionResult.html +3 -0
- package/docs/packages/api/docs/interfaces/CreateUnprocessedFileResult.html +6 -0
- package/docs/packages/api/docs/interfaces/GetISOBMFFFileTranscriptionResult.html +4 -0
- package/docs/packages/api/docs/interfaces/IsobmffProcessInfoResult.html +7 -0
- package/docs/packages/api/docs/interfaces/LookupCaptionFileByMd5Result.html +4 -0
- package/docs/packages/api/docs/interfaces/LookupISOBMFFFileByMd5Result.html +5 -0
- package/docs/packages/api/docs/interfaces/LookupImageFileByMd5Result.html +5 -0
- package/docs/packages/api/docs/interfaces/LookupRenderByMd5Result.html +4 -0
- package/docs/packages/api/docs/interfaces/LookupUnprocessedFileByMd5Result.html +6 -0
- package/docs/packages/api/docs/interfaces/ProcessIsobmffFileResult.html +2 -0
- package/docs/packages/api/docs/interfaces/TranscribeISOBMFFFileResult.html +4 -0
- package/docs/packages/api/docs/interfaces/TranscriptionInfoResult.html +3 -0
- package/docs/packages/api/docs/interfaces/URLTokenResult.html +2 -0
- package/docs/packages/api/docs/modules.html +54 -0
- package/docs/packages/api/docs/variables/CreateCaptionFilePayload.html +1 -0
- package/docs/packages/api/docs/variables/CreateISOBMFFFilePayload.html +1 -0
- package/docs/packages/api/docs/variables/CreateISOBMFFTrackPayload.html +1 -0
- package/docs/packages/api/docs/variables/CreateImageFilePayload.html +1 -0
- package/docs/packages/api/docs/variables/CreateRenderPayload.html +1 -0
- package/docs/packages/api/docs/variables/CreateTranscriptionPayload.html +1 -0
- package/docs/packages/api/docs/variables/CreateUnprocessedFilePayload.html +1 -0
- package/docs/packages/api/docs/variables/TranscribeISOBMFFFilePayload.html +1 -0
- package/package.json +6 -4
- package/src/resources/caption-file.test.ts +3 -3
- package/src/resources/caption-file.ts +31 -2
- package/src/resources/image-file.test.ts +3 -3
- package/src/resources/image-file.ts +23 -3
- package/src/resources/isobmff-file.test.ts +3 -3
- package/src/resources/isobmff-file.ts +27 -3
- package/src/resources/isobmff-track.test.ts +4 -4
- package/src/resources/isobmff-track.ts +33 -21
- package/src/resources/process-isobmff.test.ts +3 -3
- package/src/resources/process-isobmff.ts +2 -2
- package/src/resources/renders.test.ts +3 -3
- package/src/resources/renders.ts +3 -2
- package/src/resources/transcriptions.test.ts +2 -2
- package/src/resources/transcriptions.ts +7 -3
- package/src/resources/unprocessed-file.test.ts +3 -3
- package/src/resources/unprocessed-file.ts +8 -4
- package/src/resources/url-token.test.ts +3 -3
- package/src/resources/url-token.ts +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import debug from "debug";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
|
-
import { CompletionIterator } from "../ProgressIterator.
|
|
5
|
-
import type { Client } from "../client.
|
|
4
|
+
import { CompletionIterator } from "../ProgressIterator.js";
|
|
5
|
+
import type { Client } from "../client.js";
|
|
6
6
|
|
|
7
7
|
const log = debug("ef:api:transcriptions");
|
|
8
8
|
|
|
@@ -11,6 +11,10 @@ export const CreateTranscriptionPayload = z.object({
|
|
|
11
11
|
track_id: z.number().int(),
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
+
export type CreateTranscriptionPayload = z.infer<
|
|
15
|
+
typeof CreateTranscriptionPayload
|
|
16
|
+
>;
|
|
17
|
+
|
|
14
18
|
export interface CreateTranscriptionResult {
|
|
15
19
|
id: string;
|
|
16
20
|
status: "complete" | "created" | "failed" | "pending" | "transcribing";
|
|
@@ -23,7 +27,7 @@ export interface TranscriptionInfoResult {
|
|
|
23
27
|
|
|
24
28
|
export const createTranscription = async (
|
|
25
29
|
client: Client,
|
|
26
|
-
payload:
|
|
30
|
+
payload: CreateTranscriptionPayload,
|
|
27
31
|
) => {
|
|
28
32
|
log("Creating transcription", payload);
|
|
29
33
|
const response = await client.authenticatedFetch("/api/v1/transcriptions", {
|
|
@@ -3,13 +3,13 @@ import { setupServer } from "msw/node";
|
|
|
3
3
|
import { afterAll, afterEach, beforeAll, describe, expect, test } from "vitest";
|
|
4
4
|
import { ZodError } from "zod";
|
|
5
5
|
|
|
6
|
-
import { Client } from "../client.
|
|
7
|
-
import { webReadableFromBuffers } from "../readableFromBuffers.
|
|
6
|
+
import { Client } from "../client.js";
|
|
7
|
+
import { webReadableFromBuffers } from "../readableFromBuffers.js";
|
|
8
8
|
import {
|
|
9
9
|
createUnprocessedFile,
|
|
10
10
|
lookupUnprocessedFileByMd5,
|
|
11
11
|
uploadUnprocessedReadableStream,
|
|
12
|
-
} from "./unprocessed-file.
|
|
12
|
+
} from "./unprocessed-file.js";
|
|
13
13
|
|
|
14
14
|
const server = setupServer();
|
|
15
15
|
const client = new Client("ef_TEST_TOKEN", "http://localhost");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import debug from "debug";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
|
-
import type { Client } from "../client.
|
|
5
|
-
import { uploadChunks } from "../uploadChunks.
|
|
4
|
+
import type { Client } from "../client.js";
|
|
5
|
+
import { uploadChunks } from "../uploadChunks.js";
|
|
6
6
|
|
|
7
7
|
const log = debug("ef:api:unprocessed-file");
|
|
8
8
|
|
|
@@ -16,7 +16,11 @@ export const CreateUnprocessedFilePayload = z.object({
|
|
|
16
16
|
|
|
17
17
|
export const UpdateUnprocessedFilePayload = z.object({});
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
export type CreateUnprocessedFilePayload = z.infer<
|
|
20
|
+
typeof CreateUnprocessedFilePayload
|
|
21
|
+
>;
|
|
22
|
+
|
|
23
|
+
export interface UnprocessedFile {
|
|
20
24
|
byte_size: number;
|
|
21
25
|
next_byte: number;
|
|
22
26
|
complete: boolean;
|
|
@@ -41,7 +45,7 @@ export interface ProcessIsobmffFileResult {
|
|
|
41
45
|
|
|
42
46
|
export const createUnprocessedFile = async (
|
|
43
47
|
client: Client,
|
|
44
|
-
payload:
|
|
48
|
+
payload: CreateUnprocessedFilePayload,
|
|
45
49
|
) => {
|
|
46
50
|
log("Creating an unprocessed file", payload);
|
|
47
51
|
CreateUnprocessedFilePayload.parse(payload);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { afterAll, afterEach, beforeAll, describe, expect, test } from "vitest";
|
|
2
1
|
import { http, HttpResponse } from "msw";
|
|
3
2
|
import { setupServer } from "msw/node";
|
|
3
|
+
import { afterAll, afterEach, beforeAll, describe, expect, test } from "vitest";
|
|
4
4
|
|
|
5
|
-
import { Client } from "../client.
|
|
6
|
-
import { createURLToken } from "./url-token.
|
|
5
|
+
import { Client } from "../client.js";
|
|
6
|
+
import { createURLToken } from "./url-token.js";
|
|
7
7
|
|
|
8
8
|
const server = setupServer();
|
|
9
9
|
const client = new Client("ef_TEST_TOKEN", "http://localhost");
|