@editframe/api 0.21.0-beta.0 → 0.23.6-beta.0
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/node.js
CHANGED
|
@@ -29,9 +29,8 @@ const createImageFileFromPath = async (client, path$1) => {
|
|
|
29
29
|
};
|
|
30
30
|
const createUnprocessedFileFromPath = async (client, path$1) => {
|
|
31
31
|
const byte_size = (await stat(path$1)).size;
|
|
32
|
-
const md5 = await md5FilePath(path$1);
|
|
33
32
|
return createUnprocessedFile(client, {
|
|
34
|
-
md5,
|
|
33
|
+
md5: await md5FilePath(path$1),
|
|
35
34
|
filename: basename(path$1),
|
|
36
35
|
byte_size
|
|
37
36
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ProgressIterator } from "../ProgressIterator.js";
|
|
2
2
|
const getIsobmffProcessProgress = async (client, id) => {
|
|
3
|
-
|
|
4
|
-
return new ProgressIterator(eventSource);
|
|
3
|
+
return new ProgressIterator(await client.authenticatedEventSource(`/api/v1/process_isobmff/${id}/progress`));
|
|
5
4
|
};
|
|
6
5
|
const getIsobmffProcessInfo = async (client, id) => {
|
|
7
6
|
const response = await client.authenticatedFetch(`/api/v1/process_isobmff/${id}`);
|
|
@@ -213,7 +213,7 @@ export declare const CreateRenderPayload: z.ZodObject<{
|
|
|
213
213
|
transparency?: boolean | undefined;
|
|
214
214
|
} | undefined;
|
|
215
215
|
}>;
|
|
216
|
-
export declare const CreateRenderPayloadWithOutput: z.ZodObject<
|
|
216
|
+
export declare const CreateRenderPayloadWithOutput: z.ZodObject<{
|
|
217
217
|
md5: z.ZodOptional<z.ZodString>;
|
|
218
218
|
fps: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
219
219
|
width: z.ZodOptional<z.ZodNumber>;
|
|
@@ -223,76 +223,7 @@ export declare const CreateRenderPayloadWithOutput: z.ZodObject<z.objectUtil.ext
|
|
|
223
223
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
224
224
|
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
225
225
|
strategy: z.ZodOptional<z.ZodDefault<z.ZodEnum<["v1"]>>>;
|
|
226
|
-
|
|
227
|
-
container: z.ZodLiteral<"mp4">;
|
|
228
|
-
video: z.ZodObject<{
|
|
229
|
-
codec: z.ZodLiteral<"h264">;
|
|
230
|
-
}, "strip", z.ZodTypeAny, {
|
|
231
|
-
codec: "h264";
|
|
232
|
-
}, {
|
|
233
|
-
codec: "h264";
|
|
234
|
-
}>;
|
|
235
|
-
audio: z.ZodObject<{
|
|
236
|
-
codec: z.ZodLiteral<"aac">;
|
|
237
|
-
}, "strip", z.ZodTypeAny, {
|
|
238
|
-
codec: "aac";
|
|
239
|
-
}, {
|
|
240
|
-
codec: "aac";
|
|
241
|
-
}>;
|
|
242
|
-
}, "strip", z.ZodTypeAny, {
|
|
243
|
-
audio: {
|
|
244
|
-
codec: "aac";
|
|
245
|
-
};
|
|
246
|
-
video: {
|
|
247
|
-
codec: "h264";
|
|
248
|
-
};
|
|
249
|
-
container: "mp4";
|
|
250
|
-
}, {
|
|
251
|
-
audio: {
|
|
252
|
-
codec: "aac";
|
|
253
|
-
};
|
|
254
|
-
video: {
|
|
255
|
-
codec: "h264";
|
|
256
|
-
};
|
|
257
|
-
container: "mp4";
|
|
258
|
-
}>, z.ZodObject<{
|
|
259
|
-
container: z.ZodLiteral<"jpeg">;
|
|
260
|
-
quality: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
261
|
-
}, "strip", z.ZodTypeAny, {
|
|
262
|
-
container: "jpeg";
|
|
263
|
-
quality?: number | undefined;
|
|
264
|
-
}, {
|
|
265
|
-
container: "jpeg";
|
|
266
|
-
quality?: number | undefined;
|
|
267
|
-
}>, z.ZodObject<{
|
|
268
|
-
container: z.ZodLiteral<"png">;
|
|
269
|
-
compression: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
270
|
-
transparency: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
271
|
-
}, "strip", z.ZodTypeAny, {
|
|
272
|
-
container: "png";
|
|
273
|
-
compression?: number | undefined;
|
|
274
|
-
transparency?: boolean | undefined;
|
|
275
|
-
}, {
|
|
276
|
-
container: "png";
|
|
277
|
-
compression?: number | undefined;
|
|
278
|
-
transparency?: boolean | undefined;
|
|
279
|
-
}>, z.ZodObject<{
|
|
280
|
-
container: z.ZodLiteral<"webp">;
|
|
281
|
-
quality: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
282
|
-
compression: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
283
|
-
transparency: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
284
|
-
}, "strip", z.ZodTypeAny, {
|
|
285
|
-
container: "webp";
|
|
286
|
-
quality?: number | undefined;
|
|
287
|
-
compression?: number | undefined;
|
|
288
|
-
transparency?: boolean | undefined;
|
|
289
|
-
}, {
|
|
290
|
-
container: "webp";
|
|
291
|
-
quality?: number | undefined;
|
|
292
|
-
compression?: number | undefined;
|
|
293
|
-
transparency?: boolean | undefined;
|
|
294
|
-
}>]>>>;
|
|
295
|
-
}, {
|
|
226
|
+
} & {
|
|
296
227
|
output: z.ZodDiscriminatedUnion<"container", [z.ZodObject<{
|
|
297
228
|
container: z.ZodLiteral<"mp4">;
|
|
298
229
|
video: z.ZodObject<{
|
|
@@ -362,7 +293,7 @@ export declare const CreateRenderPayloadWithOutput: z.ZodObject<z.objectUtil.ext
|
|
|
362
293
|
compression?: number | undefined;
|
|
363
294
|
transparency?: boolean | undefined;
|
|
364
295
|
}>]>;
|
|
365
|
-
}
|
|
296
|
+
}, "strip", z.ZodTypeAny, {
|
|
366
297
|
output: {
|
|
367
298
|
audio: {
|
|
368
299
|
codec: "aac";
|
|
@@ -50,12 +50,11 @@ const CreateRenderPayload = z.object({
|
|
|
50
50
|
CreateRenderPayload.extend({ output: RenderOutputConfiguration });
|
|
51
51
|
var OutputConfiguration = class OutputConfiguration {
|
|
52
52
|
static parse(input) {
|
|
53
|
-
|
|
53
|
+
return new OutputConfiguration(RenderOutputConfiguration.parse(input ?? {
|
|
54
54
|
container: "mp4",
|
|
55
55
|
video: { codec: "h264" },
|
|
56
56
|
audio: { codec: "aac" }
|
|
57
|
-
});
|
|
58
|
-
return new OutputConfiguration(output);
|
|
57
|
+
}));
|
|
59
58
|
}
|
|
60
59
|
constructor(output) {
|
|
61
60
|
this.output = output;
|
|
@@ -127,8 +126,7 @@ const lookupRenderByMd5 = async (client, md5) => {
|
|
|
127
126
|
throw new Error(`Failed to lookup render by md5 ${md5} ${response.status} ${response.statusText}`);
|
|
128
127
|
};
|
|
129
128
|
const getRenderProgress = async (client, id) => {
|
|
130
|
-
|
|
131
|
-
return new CompletionIterator(eventSource);
|
|
129
|
+
return new CompletionIterator(await client.authenticatedEventSource(`/api/v1/renders/${id}/progress`));
|
|
132
130
|
};
|
|
133
131
|
const downloadRender = async (client, id) => {
|
|
134
132
|
const response = await client.authenticatedFetch(`/api/v1/renders/${id}.mp4`);
|
|
@@ -17,8 +17,7 @@ const createTranscription = async (client, payload) => {
|
|
|
17
17
|
throw new Error(`Failed to create transcription ${response.status} ${response.statusText}`);
|
|
18
18
|
};
|
|
19
19
|
const getTranscriptionProgress = async (client, id) => {
|
|
20
|
-
|
|
21
|
-
return new CompletionIterator(eventSource);
|
|
20
|
+
return new CompletionIterator(await client.authenticatedEventSource(`/api/v1/transcriptions/${id}/progress`));
|
|
22
21
|
};
|
|
23
22
|
const getTranscriptionInfo = async (client, id) => {
|
|
24
23
|
const response = await client.authenticatedFetch(`/api/v1/transcriptions/${id}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@editframe/api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.6-beta.0",
|
|
4
4
|
"description": "API functions for EditFrame",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"vite-plugin-dts": "^4.5.4"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@editframe/assets": "0.
|
|
48
|
+
"@editframe/assets": "0.23.6-beta.0",
|
|
49
49
|
"@vitejs/plugin-react": "^4.3.4",
|
|
50
50
|
"debug": "^4.3.5",
|
|
51
51
|
"eventsource-parser": "^3.0.0",
|