@editframe/api 0.10.0-beta.5 → 0.10.0-beta.7
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/resources/isobmff-track.d.ts +2 -0
- package/dist/resources/isobmff-track.js +1 -1
- package/dist/resources/unprocessed-file.d.ts +8 -8
- package/dist/resources/unprocessed-file.js +5 -4
- package/package.json +2 -2
- package/src/resources/isobmff-track.ts +3 -1
- package/src/resources/unprocessed-file.ts +6 -5
|
@@ -265,6 +265,8 @@ export interface CreateISOBMFFTrackResult {
|
|
|
265
265
|
byte_size: number;
|
|
266
266
|
track_id: number;
|
|
267
267
|
file_id: string;
|
|
268
|
+
asset_id: string;
|
|
269
|
+
complete: boolean;
|
|
268
270
|
}
|
|
269
271
|
export declare const createISOBMFFTrack: (client: Client, payload: z.infer<typeof CreateISOBMFFTrackPayload>) => Promise<CreateISOBMFFTrackResult>;
|
|
270
272
|
export declare const uploadISOBMFFTrack: (client: Client, fileId: string, trackId: number, fileStream: Readable, trackSize: number) => Promise<void>;
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { Readable } from 'node:stream';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { Client } from '../client.ts';
|
|
4
|
-
declare const FileProcessors: z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodLiteral<"isobmff">, z.ZodLiteral<"image">, z.ZodLiteral<"captions"
|
|
4
|
+
declare const FileProcessors: z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodLiteral<"isobmff">, z.ZodLiteral<"image">, z.ZodLiteral<"captions">, z.ZodString]>, "many">, string[], string[]>;
|
|
5
5
|
export declare const CreateUnprocessedFilePayload: z.ZodObject<{
|
|
6
6
|
md5: z.ZodString;
|
|
7
7
|
filename: z.ZodString;
|
|
8
|
-
processes: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodLiteral<"isobmff">, z.ZodLiteral<"image">, z.ZodLiteral<"captions"
|
|
8
|
+
processes: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodLiteral<"isobmff">, z.ZodLiteral<"image">, z.ZodLiteral<"captions">, z.ZodString]>, "many">, string[], string[]>>;
|
|
9
9
|
byte_size: z.ZodNumber;
|
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
|
11
11
|
md5: string;
|
|
12
12
|
filename: string;
|
|
13
13
|
byte_size: number;
|
|
14
|
-
processes?:
|
|
14
|
+
processes?: string[] | undefined;
|
|
15
15
|
}, {
|
|
16
16
|
md5: string;
|
|
17
17
|
filename: string;
|
|
18
18
|
byte_size: number;
|
|
19
|
-
processes?:
|
|
19
|
+
processes?: string[] | undefined;
|
|
20
20
|
}>;
|
|
21
21
|
export declare const UpdateUnprocessedFilePayload: z.ZodObject<{
|
|
22
|
-
processes: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodLiteral<"isobmff">, z.ZodLiteral<"image">, z.ZodLiteral<"captions"
|
|
22
|
+
processes: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodLiteral<"isobmff">, z.ZodLiteral<"image">, z.ZodLiteral<"captions">, z.ZodString]>, "many">, string[], string[]>>;
|
|
23
23
|
}, "strip", z.ZodTypeAny, {
|
|
24
|
-
processes?:
|
|
24
|
+
processes?: string[] | undefined;
|
|
25
25
|
}, {
|
|
26
|
-
processes?:
|
|
26
|
+
processes?: string[] | undefined;
|
|
27
27
|
}>;
|
|
28
28
|
export interface CreateUnprocessedFileResult {
|
|
29
29
|
byte_size: number;
|
|
@@ -31,7 +31,7 @@ export interface CreateUnprocessedFileResult {
|
|
|
31
31
|
complete: boolean;
|
|
32
32
|
id: string;
|
|
33
33
|
md5: string;
|
|
34
|
-
processes: z.infer<typeof FileProcessors
|
|
34
|
+
processes: z.infer<typeof FileProcessors> & string[];
|
|
35
35
|
asset_id: string;
|
|
36
36
|
}
|
|
37
37
|
export interface UpdateUnprocessedFileResult {
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { Readable } from "node:stream";
|
|
2
|
-
import { basename } from "node:path";
|
|
3
1
|
import { createReadStream } from "node:fs";
|
|
4
2
|
import { stat } from "node:fs/promises";
|
|
5
|
-
import {
|
|
3
|
+
import { basename } from "node:path";
|
|
4
|
+
import { Readable } from "node:stream";
|
|
6
5
|
import debug from "debug";
|
|
6
|
+
import { z } from "zod";
|
|
7
7
|
import { md5Buffer, md5FilePath } from "@editframe/assets";
|
|
8
8
|
import { uploadChunks } from "../uploadChunks.js";
|
|
9
9
|
const log = debug("ef:api:unprocessed-file");
|
|
10
10
|
const FileProcessor = z.union([
|
|
11
11
|
z.literal("isobmff"),
|
|
12
12
|
z.literal("image"),
|
|
13
|
-
z.literal("captions")
|
|
13
|
+
z.literal("captions"),
|
|
14
|
+
z.string()
|
|
14
15
|
]);
|
|
15
16
|
const FileProcessors = z.array(FileProcessor).refine(
|
|
16
17
|
(value) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@editframe/api",
|
|
3
|
-
"version": "0.10.0-beta.
|
|
3
|
+
"version": "0.10.0-beta.7",
|
|
4
4
|
"description": "API functions for EditFrame",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"vite-tsconfig-paths": "^4.3.2"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@editframe/assets": "0.10.0-beta.
|
|
31
|
+
"@editframe/assets": "0.10.0-beta.7",
|
|
32
32
|
"debug": "^4.3.5",
|
|
33
33
|
"jsonwebtoken": "^9.0.2",
|
|
34
34
|
"node-fetch": "^3.3.2",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Readable } from "node:stream";
|
|
2
2
|
|
|
3
|
-
import { z } from "zod";
|
|
4
3
|
import debug from "debug";
|
|
4
|
+
import { z } from "zod";
|
|
5
5
|
|
|
6
6
|
import { AudioStreamSchema, VideoStreamSchema } from "@editframe/assets";
|
|
7
7
|
|
|
@@ -38,6 +38,8 @@ export interface CreateISOBMFFTrackResult {
|
|
|
38
38
|
byte_size: number;
|
|
39
39
|
track_id: number;
|
|
40
40
|
file_id: string;
|
|
41
|
+
asset_id: string;
|
|
42
|
+
complete: boolean;
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
export const createISOBMFFTrack = async (
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Readable } from "node:stream";
|
|
2
|
-
import { basename } from "node:path";
|
|
3
1
|
import { createReadStream } from "node:fs";
|
|
4
2
|
import { stat } from "node:fs/promises";
|
|
3
|
+
import { basename } from "node:path";
|
|
4
|
+
import { Readable } from "node:stream";
|
|
5
5
|
|
|
6
|
-
import { z } from "zod";
|
|
7
6
|
import debug from "debug";
|
|
7
|
+
import { z } from "zod";
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import { md5Buffer, md5FilePath } from "@editframe/assets";
|
|
10
10
|
|
|
11
11
|
import type { Client } from "../client.ts";
|
|
12
12
|
import { uploadChunks } from "../uploadChunks.ts";
|
|
@@ -17,6 +17,7 @@ const FileProcessor = z.union([
|
|
|
17
17
|
z.literal("isobmff"),
|
|
18
18
|
z.literal("image"),
|
|
19
19
|
z.literal("captions"),
|
|
20
|
+
z.string(),
|
|
20
21
|
]);
|
|
21
22
|
|
|
22
23
|
const FileProcessors = z.array(FileProcessor).refine(
|
|
@@ -47,7 +48,7 @@ export interface CreateUnprocessedFileResult {
|
|
|
47
48
|
complete: boolean;
|
|
48
49
|
id: string;
|
|
49
50
|
md5: string;
|
|
50
|
-
processes: z.infer<typeof FileProcessors
|
|
51
|
+
processes: z.infer<typeof FileProcessors> & string[];
|
|
51
52
|
asset_id: string;
|
|
52
53
|
}
|
|
53
54
|
|