@editframe/vite-plugin 0.24.1-beta.0 → 0.25.0-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/api/src/resources/caption-file.d.ts +73 -0
- package/dist/api/src/resources/image-file.d.ts +111 -0
- package/dist/api/src/resources/isobmff-file.d.ts +68 -0
- package/dist/api/src/resources/isobmff-track.d.ts +761 -0
- package/dist/api/src/resources/process-isobmff.d.ts +12 -0
- package/dist/api/src/resources/renders.d.ts +422 -0
- package/dist/api/src/resources/transcriptions.d.ts +25 -0
- package/dist/api/src/resources/unprocessed-file.d.ts +41 -0
- package/dist/api/src/resources/url-token.d.ts +5 -0
- package/dist/api/src/utils/assertTypesMatch.d.ts +3 -0
- package/dist/assets/src/tasks/cacheImage.d.ts +1 -0
- package/dist/assets/src/tasks/findOrCreateCaptions.d.ts +2 -0
- package/dist/assets/src/tasks/generateTrack.d.ts +3 -0
- package/dist/assets/src/tasks/generateTrackFragmentIndex.d.ts +3 -0
- package/dist/forbidRelativePaths.js +4 -0
- package/dist/forbidRelativePaths.js.map +1 -0
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -0
- package/dist/sendTaskResult.js +5 -0
- package/dist/sendTaskResult.js.map +1 -0
- package/package.json +13 -17
- package/tsdown.config.ts +10 -0
- package/dist/forbidRelativePaths.d.ts +0 -2
- package/dist/index.d.ts +0 -9
- package/dist/index.vitest.d.ts +0 -9
- package/dist/sendTaskResult.d.ts +0 -3
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { Client } from "../client.js";
|
|
3
|
+
export declare const CreateCaptionFilePayload: z.ZodObject<{
|
|
4
|
+
/**
|
|
5
|
+
* The md5 hash of the caption file
|
|
6
|
+
*/
|
|
7
|
+
md5: z.ZodString;
|
|
8
|
+
/**
|
|
9
|
+
* The filename of the caption file
|
|
10
|
+
*/
|
|
11
|
+
filename: z.ZodString;
|
|
12
|
+
/**
|
|
13
|
+
* The size of the caption file in bytes
|
|
14
|
+
*/
|
|
15
|
+
byte_size: z.ZodNumber;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
md5: string;
|
|
18
|
+
filename: string;
|
|
19
|
+
byte_size: number;
|
|
20
|
+
}, {
|
|
21
|
+
md5: string;
|
|
22
|
+
filename: string;
|
|
23
|
+
byte_size: number;
|
|
24
|
+
}>;
|
|
25
|
+
export type CreateCaptionFilePayload = z.infer<typeof CreateCaptionFilePayload>;
|
|
26
|
+
export interface CreateCaptionFileResult {
|
|
27
|
+
/**
|
|
28
|
+
* Whether the caption file is complete
|
|
29
|
+
*/
|
|
30
|
+
complete: boolean | null;
|
|
31
|
+
/**
|
|
32
|
+
* The id of the caption file
|
|
33
|
+
*/
|
|
34
|
+
id: string;
|
|
35
|
+
/**
|
|
36
|
+
* The md5 hash of the caption file
|
|
37
|
+
*/
|
|
38
|
+
md5: string;
|
|
39
|
+
}
|
|
40
|
+
export interface LookupCaptionFileByMd5Result {
|
|
41
|
+
/**
|
|
42
|
+
* Whether the caption file is complete
|
|
43
|
+
*/
|
|
44
|
+
complete: boolean | null;
|
|
45
|
+
/**
|
|
46
|
+
* The id of the caption file
|
|
47
|
+
*/
|
|
48
|
+
id: string;
|
|
49
|
+
/**
|
|
50
|
+
* The md5 hash of the caption file
|
|
51
|
+
*/
|
|
52
|
+
md5: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Create a caption file
|
|
56
|
+
* @param client - The authenticated client to use for the request
|
|
57
|
+
* @param payload - The payload to send to the server
|
|
58
|
+
* @returns The result of the request
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const result = await createCaptionFile(client, {
|
|
62
|
+
* id: "123",
|
|
63
|
+
* filename: "caption.srt",
|
|
64
|
+
* });
|
|
65
|
+
* console.log(result);
|
|
66
|
+
* ```
|
|
67
|
+
* @category CaptionFile
|
|
68
|
+
* @resource
|
|
69
|
+
* @beta
|
|
70
|
+
*/
|
|
71
|
+
export declare const createCaptionFile: (client: Client, payload: CreateCaptionFilePayload) => Promise<CreateCaptionFileResult>;
|
|
72
|
+
export declare const uploadCaptionFile: (client: Client, fileId: string, fileStream: ReadableStream, fileSize: number) => Promise<any>;
|
|
73
|
+
export declare const lookupCaptionFileByMd5: (client: Client, md5: string) => Promise<LookupCaptionFileByMd5Result | null>;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { Client } from "../client.js";
|
|
3
|
+
export declare const ImageFileMimeTypes: z.ZodEnum<["image/jpeg", "image/png", "image/jpg", "image/webp", "image/svg+xml"]>;
|
|
4
|
+
export declare const CreateImageFilePayload: z.ZodEffects<z.ZodObject<{
|
|
5
|
+
/**
|
|
6
|
+
* The md5 hash of the image file.
|
|
7
|
+
*/
|
|
8
|
+
md5: z.ZodOptional<z.ZodString>;
|
|
9
|
+
/**
|
|
10
|
+
* The height of the image file in pixels.
|
|
11
|
+
*/
|
|
12
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
/**
|
|
14
|
+
* The width of the image file in pixels.
|
|
15
|
+
*/
|
|
16
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
/**
|
|
18
|
+
* The mime type of the image file. Optional if the filename has a known file extension.
|
|
19
|
+
*/
|
|
20
|
+
mime_type: z.ZodOptional<z.ZodEnum<["image/jpeg", "image/png", "image/jpg", "image/webp", "image/svg+xml"]>>;
|
|
21
|
+
/**
|
|
22
|
+
* The filename of the image file.
|
|
23
|
+
*/
|
|
24
|
+
filename: z.ZodString;
|
|
25
|
+
/**
|
|
26
|
+
* The byte size of the image file.
|
|
27
|
+
*/
|
|
28
|
+
byte_size: z.ZodNumber;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
filename: string;
|
|
31
|
+
byte_size: number;
|
|
32
|
+
md5?: string | undefined;
|
|
33
|
+
height?: number | undefined;
|
|
34
|
+
width?: number | undefined;
|
|
35
|
+
mime_type?: "image/jpeg" | "image/png" | "image/jpg" | "image/webp" | "image/svg+xml" | undefined;
|
|
36
|
+
}, {
|
|
37
|
+
filename: string;
|
|
38
|
+
byte_size: number;
|
|
39
|
+
md5?: string | undefined;
|
|
40
|
+
height?: number | undefined;
|
|
41
|
+
width?: number | undefined;
|
|
42
|
+
mime_type?: "image/jpeg" | "image/png" | "image/jpg" | "image/webp" | "image/svg+xml" | undefined;
|
|
43
|
+
}>, {
|
|
44
|
+
filename: string;
|
|
45
|
+
byte_size: number;
|
|
46
|
+
md5?: string | undefined;
|
|
47
|
+
height?: number | undefined;
|
|
48
|
+
width?: number | undefined;
|
|
49
|
+
mime_type?: "image/jpeg" | "image/png" | "image/jpg" | "image/webp" | "image/svg+xml" | undefined;
|
|
50
|
+
}, {
|
|
51
|
+
filename: string;
|
|
52
|
+
byte_size: number;
|
|
53
|
+
md5?: string | undefined;
|
|
54
|
+
height?: number | undefined;
|
|
55
|
+
width?: number | undefined;
|
|
56
|
+
mime_type?: "image/jpeg" | "image/png" | "image/jpg" | "image/webp" | "image/svg+xml" | undefined;
|
|
57
|
+
}>;
|
|
58
|
+
export type CreateImageFilePayload = z.infer<typeof CreateImageFilePayload>;
|
|
59
|
+
export interface CreateImageFileResult {
|
|
60
|
+
/**
|
|
61
|
+
* Whether the image file has been fully uploaded.
|
|
62
|
+
*/
|
|
63
|
+
complete: boolean | null;
|
|
64
|
+
/**
|
|
65
|
+
* The byte size of the image file.
|
|
66
|
+
*/
|
|
67
|
+
byte_size: number;
|
|
68
|
+
/**
|
|
69
|
+
* The id of the image file.
|
|
70
|
+
*/
|
|
71
|
+
id: string;
|
|
72
|
+
/**
|
|
73
|
+
* The md5 hash of the image file.
|
|
74
|
+
*/
|
|
75
|
+
md5: string | null;
|
|
76
|
+
}
|
|
77
|
+
export interface LookupImageFileByMd5Result {
|
|
78
|
+
/**
|
|
79
|
+
* Whether the image file has been fully uploaded.
|
|
80
|
+
*/
|
|
81
|
+
complete: boolean | null;
|
|
82
|
+
/**
|
|
83
|
+
* The byte size of the image file.
|
|
84
|
+
*/
|
|
85
|
+
byte_size: number;
|
|
86
|
+
/**
|
|
87
|
+
* The id of the image file.
|
|
88
|
+
*/
|
|
89
|
+
id: string;
|
|
90
|
+
/**
|
|
91
|
+
* md5 hash of the image file.
|
|
92
|
+
*/
|
|
93
|
+
md5: string | null;
|
|
94
|
+
/**
|
|
95
|
+
* The height of the image file in pixels.
|
|
96
|
+
*/
|
|
97
|
+
height: number | null;
|
|
98
|
+
/**
|
|
99
|
+
* The width of the image file in pixels.
|
|
100
|
+
*/
|
|
101
|
+
width: number | null;
|
|
102
|
+
}
|
|
103
|
+
export interface GetImageFileMetadataResult extends LookupImageFileByMd5Result {
|
|
104
|
+
}
|
|
105
|
+
export declare const createImageFile: (client: Client, payload: CreateImageFilePayload) => Promise<CreateImageFileResult>;
|
|
106
|
+
export declare const uploadImageFile: (client: Client, uploadDetails: {
|
|
107
|
+
id: string;
|
|
108
|
+
byte_size: number;
|
|
109
|
+
}, fileStream: ReadableStream, chunkSizeBytes?: number) => import("../uploadChunks.js").IteratorWithPromise<import("../uploadChunks.js").UploadChunkEvent>;
|
|
110
|
+
export declare const getImageFileMetadata: (client: Client, id: string) => Promise<GetImageFileMetadataResult | null>;
|
|
111
|
+
export declare const lookupImageFileByMd5: (client: Client, md5: string) => Promise<LookupImageFileByMd5Result | null>;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { Client } from "../client.js";
|
|
3
|
+
export declare const CreateISOBMFFFilePayload: z.ZodObject<{
|
|
4
|
+
md5: z.ZodString;
|
|
5
|
+
filename: z.ZodString;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
md5: string;
|
|
8
|
+
filename: string;
|
|
9
|
+
}, {
|
|
10
|
+
md5: string;
|
|
11
|
+
filename: string;
|
|
12
|
+
}>;
|
|
13
|
+
export type CreateISOBMFFFilePayload = z.infer<typeof CreateISOBMFFFilePayload>;
|
|
14
|
+
export interface CreateISOBMFFFileResult {
|
|
15
|
+
/**
|
|
16
|
+
* Whether the fragment index is complete. The fragment index is used internally by editframe to efficiently seek within files.
|
|
17
|
+
*/
|
|
18
|
+
fragment_index_complete: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The filename of the isobmff file
|
|
21
|
+
*/
|
|
22
|
+
filename: string;
|
|
23
|
+
/**
|
|
24
|
+
* The id of the isobmff file
|
|
25
|
+
*/
|
|
26
|
+
id: string;
|
|
27
|
+
/**
|
|
28
|
+
* The md5 hash of the isobmff file
|
|
29
|
+
*/
|
|
30
|
+
md5: string;
|
|
31
|
+
}
|
|
32
|
+
export interface LookupISOBMFFFileByMd5Result {
|
|
33
|
+
/**
|
|
34
|
+
* Whether the fragment index is complete
|
|
35
|
+
*/
|
|
36
|
+
fragment_index_complete: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* The filename of the isobmff file
|
|
39
|
+
*/
|
|
40
|
+
filename: string;
|
|
41
|
+
id: string;
|
|
42
|
+
md5: string;
|
|
43
|
+
}
|
|
44
|
+
export interface GetISOBMFFFileTranscriptionResult {
|
|
45
|
+
id: string;
|
|
46
|
+
work_slice_ms: number;
|
|
47
|
+
isobmff_track: {
|
|
48
|
+
duration_ms: number;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export declare const createISOBMFFFile: (client: Client, payload: CreateISOBMFFFilePayload) => Promise<CreateISOBMFFFileResult>;
|
|
52
|
+
export declare const uploadFragmentIndex: (client: Client, fileId: string, fileStream: ReadableStream, fileSize: number) => Promise<any>;
|
|
53
|
+
export declare const lookupISOBMFFFileByMd5: (client: Client, md5: string) => Promise<LookupISOBMFFFileByMd5Result | null>;
|
|
54
|
+
export declare const getISOBMFFFileTranscription: (client: Client, id: string) => Promise<GetISOBMFFFileTranscriptionResult | null>;
|
|
55
|
+
export declare const TranscribeISOBMFFFilePayload: z.ZodObject<{
|
|
56
|
+
trackId: z.ZodOptional<z.ZodString>;
|
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
|
58
|
+
trackId?: string | undefined;
|
|
59
|
+
}, {
|
|
60
|
+
trackId?: string | undefined;
|
|
61
|
+
}>;
|
|
62
|
+
export type TranscribeISOBMFFFilePayload = z.infer<typeof TranscribeISOBMFFFilePayload>;
|
|
63
|
+
export interface TranscribeISOBMFFFileResult {
|
|
64
|
+
id: string;
|
|
65
|
+
file_id: string;
|
|
66
|
+
track_id: number;
|
|
67
|
+
}
|
|
68
|
+
export declare const transcribeISOBMFFFile: (client: Client, id: string, payload?: TranscribeISOBMFFFilePayload) => Promise<TranscribeISOBMFFFileResult>;
|