@editframe/api 0.15.0-beta.1 → 0.15.0-beta.11

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.
Files changed (73) hide show
  1. package/dist/resources/image-file.d.ts +21 -9
  2. package/dist/resources/image-file.js +3 -3
  3. package/dist/resources/renders.bundle.js +3 -5
  4. package/dist/resources/renders.d.ts +6 -2
  5. package/dist/resources/renders.js +1 -0
  6. package/package.json +8 -3
  7. package/src/resources/image-file.ts +15 -3
  8. package/src/resources/renders.bundle.ts +3 -8
  9. package/src/resources/renders.ts +4 -2
  10. package/types.json +1 -0
  11. package/docs/packages/api/docs/.nojekyll +0 -1
  12. package/docs/packages/api/docs/assets/highlight.css +0 -71
  13. package/docs/packages/api/docs/assets/icons.js +0 -18
  14. package/docs/packages/api/docs/assets/icons.svg +0 -1
  15. package/docs/packages/api/docs/assets/main.js +0 -60
  16. package/docs/packages/api/docs/assets/navigation.js +0 -1
  17. package/docs/packages/api/docs/assets/search.js +0 -1
  18. package/docs/packages/api/docs/assets/style.css +0 -1493
  19. package/docs/packages/api/docs/classes/Client.html +0 -4
  20. package/docs/packages/api/docs/functions/createCaptionFile.html +0 -8
  21. package/docs/packages/api/docs/functions/createISOBMFFFile.html +0 -1
  22. package/docs/packages/api/docs/functions/createISOBMFFTrack.html +0 -1
  23. package/docs/packages/api/docs/functions/createImageFile.html +0 -1
  24. package/docs/packages/api/docs/functions/createRender.html +0 -1
  25. package/docs/packages/api/docs/functions/createTranscription.html +0 -1
  26. package/docs/packages/api/docs/functions/createURLToken.html +0 -1
  27. package/docs/packages/api/docs/functions/createUnprocessedFile.html +0 -1
  28. package/docs/packages/api/docs/functions/getISOBMFFFileTranscription.html +0 -1
  29. package/docs/packages/api/docs/functions/getIsobmffProcessInfo.html +0 -1
  30. package/docs/packages/api/docs/functions/getIsobmffProcessProgress.html +0 -1
  31. package/docs/packages/api/docs/functions/getTranscriptionInfo.html +0 -1
  32. package/docs/packages/api/docs/functions/getTranscriptionProgress.html +0 -1
  33. package/docs/packages/api/docs/functions/lookupCaptionFileByMd5.html +0 -1
  34. package/docs/packages/api/docs/functions/lookupISOBMFFFileByMd5.html +0 -1
  35. package/docs/packages/api/docs/functions/lookupImageFileByMd5.html +0 -1
  36. package/docs/packages/api/docs/functions/lookupRenderByMd5.html +0 -1
  37. package/docs/packages/api/docs/functions/lookupUnprocessedFileByMd5.html +0 -1
  38. package/docs/packages/api/docs/functions/processIsobmffFile.html +0 -1
  39. package/docs/packages/api/docs/functions/transcribeISOBMFFFile.html +0 -1
  40. package/docs/packages/api/docs/functions/uploadCaptionFile.html +0 -1
  41. package/docs/packages/api/docs/functions/uploadFragmentIndex.html +0 -1
  42. package/docs/packages/api/docs/functions/uploadISOBMFFTrack.html +0 -1
  43. package/docs/packages/api/docs/functions/uploadImageFile.html +0 -1
  44. package/docs/packages/api/docs/functions/uploadRender.html +0 -1
  45. package/docs/packages/api/docs/functions/uploadUnprocessedReadableStream.html +0 -1
  46. package/docs/packages/api/docs/index.html +0 -39
  47. package/docs/packages/api/docs/interfaces/CreateCaptionFileResult.html +0 -4
  48. package/docs/packages/api/docs/interfaces/CreateISOBMFFFileResult.html +0 -5
  49. package/docs/packages/api/docs/interfaces/CreateISOBMFFTrackResult.html +0 -6
  50. package/docs/packages/api/docs/interfaces/CreateImageFileResult.html +0 -5
  51. package/docs/packages/api/docs/interfaces/CreateRenderResult.html +0 -4
  52. package/docs/packages/api/docs/interfaces/CreateTranscriptionResult.html +0 -3
  53. package/docs/packages/api/docs/interfaces/CreateUnprocessedFileResult.html +0 -6
  54. package/docs/packages/api/docs/interfaces/GetISOBMFFFileTranscriptionResult.html +0 -4
  55. package/docs/packages/api/docs/interfaces/IsobmffProcessInfoResult.html +0 -7
  56. package/docs/packages/api/docs/interfaces/LookupCaptionFileByMd5Result.html +0 -4
  57. package/docs/packages/api/docs/interfaces/LookupISOBMFFFileByMd5Result.html +0 -5
  58. package/docs/packages/api/docs/interfaces/LookupImageFileByMd5Result.html +0 -5
  59. package/docs/packages/api/docs/interfaces/LookupRenderByMd5Result.html +0 -4
  60. package/docs/packages/api/docs/interfaces/LookupUnprocessedFileByMd5Result.html +0 -6
  61. package/docs/packages/api/docs/interfaces/ProcessIsobmffFileResult.html +0 -2
  62. package/docs/packages/api/docs/interfaces/TranscribeISOBMFFFileResult.html +0 -4
  63. package/docs/packages/api/docs/interfaces/TranscriptionInfoResult.html +0 -3
  64. package/docs/packages/api/docs/interfaces/URLTokenResult.html +0 -2
  65. package/docs/packages/api/docs/modules.html +0 -54
  66. package/docs/packages/api/docs/variables/CreateCaptionFilePayload.html +0 -1
  67. package/docs/packages/api/docs/variables/CreateISOBMFFFilePayload.html +0 -1
  68. package/docs/packages/api/docs/variables/CreateISOBMFFTrackPayload.html +0 -1
  69. package/docs/packages/api/docs/variables/CreateImageFilePayload.html +0 -1
  70. package/docs/packages/api/docs/variables/CreateRenderPayload.html +0 -1
  71. package/docs/packages/api/docs/variables/CreateTranscriptionPayload.html +0 -1
  72. package/docs/packages/api/docs/variables/CreateUnprocessedFilePayload.html +0 -1
  73. package/docs/packages/api/docs/variables/TranscribeISOBMFFFilePayload.html +0 -1
@@ -4,15 +4,15 @@ export declare const CreateImageFilePayload: z.ZodObject<{
4
4
  /**
5
5
  * The md5 hash of the image file.
6
6
  */
7
- md5: z.ZodString;
7
+ md5: z.ZodNullable<z.ZodString>;
8
8
  /**
9
9
  * The height of the image file in pixels.
10
10
  */
11
- height: z.ZodNumber;
11
+ height: z.ZodNullable<z.ZodNumber>;
12
12
  /**
13
13
  * The width of the image file in pixels.
14
14
  */
15
- width: z.ZodNumber;
15
+ width: z.ZodNullable<z.ZodNumber>;
16
16
  /**
17
17
  * The mime type of the image file.
18
18
  */
@@ -26,25 +26,37 @@ export declare const CreateImageFilePayload: z.ZodObject<{
26
26
  */
27
27
  byte_size: z.ZodNumber;
28
28
  }, "strip", z.ZodTypeAny, {
29
- width: number;
30
- height: number;
29
+ width: number | null;
30
+ height: number | null;
31
31
  filename: string;
32
- md5: string;
32
+ md5: string | null;
33
33
  mime_type: "image/jpeg" | "image/png" | "image/jpg" | "image/webp";
34
34
  byte_size: number;
35
35
  }, {
36
- width: number;
37
- height: number;
36
+ width: number | null;
37
+ height: number | null;
38
38
  filename: string;
39
- md5: string;
39
+ md5: string | null;
40
40
  mime_type: "image/jpeg" | "image/png" | "image/jpg" | "image/webp";
41
41
  byte_size: number;
42
42
  }>;
43
43
  export type CreateImageFilePayload = z.infer<typeof CreateImageFilePayload>;
44
44
  export interface CreateImageFileResult {
45
+ /**
46
+ * Whether the image file has been fully uploaded.
47
+ */
45
48
  complete: boolean | null;
49
+ /**
50
+ * The byte size of the image file.
51
+ */
46
52
  byte_size: number;
53
+ /**
54
+ * The id of the image file.
55
+ */
47
56
  id: string;
57
+ /**
58
+ * The md5 hash of the image file.
59
+ */
48
60
  md5: string;
49
61
  }
50
62
  export interface LookupImageFileByMd5Result {
@@ -7,15 +7,15 @@ const CreateImageFilePayload = z.object({
7
7
  /**
8
8
  * The md5 hash of the image file.
9
9
  */
10
- md5: z.string(),
10
+ md5: z.string().nullable(),
11
11
  /**
12
12
  * The height of the image file in pixels.
13
13
  */
14
- height: z.number().int(),
14
+ height: z.number().int().nullable(),
15
15
  /**
16
16
  * The width of the image file in pixels.
17
17
  */
18
- width: z.number().int(),
18
+ width: z.number().int().nullable(),
19
19
  /**
20
20
  * The mime type of the image file.
21
21
  */
@@ -1,15 +1,14 @@
1
1
  import path from "node:path";
2
2
  import { PassThrough } from "node:stream";
3
3
  import react from "@vitejs/plugin-react";
4
+ import * as tar from "tar";
4
5
  import { build } from "vite";
5
6
  import { viteSingleFile } from "vite-plugin-singlefile";
6
- import tsconfigPaths from "vite-tsconfig-paths";
7
- import * as tar from "tar";
7
+ import tsconfigPathsPlugin from "vite-tsconfig-paths";
8
8
  import { randomUUID } from "node:crypto";
9
9
  import { createReadableStreamFromReadable } from "../utils/createReadableStreamFromReadable.js";
10
10
  const bundleRender = async (options) => {
11
11
  const outDir = path.join(process.cwd(), "renders", randomUUID());
12
- console.log("outDir", outDir);
13
12
  await build({
14
13
  root: options.root,
15
14
  define: {
@@ -22,7 +21,7 @@ const bundleRender = async (options) => {
22
21
  }
23
22
  },
24
23
  plugins: [
25
- tsconfigPaths(),
24
+ tsconfigPathsPlugin(),
26
25
  react({
27
26
  include: "**/*.{jsx,js,tsx,ts}",
28
27
  jsxRuntime: "automatic"
@@ -37,7 +36,6 @@ const bundleRender = async (options) => {
37
36
  },
38
37
  ["."]
39
38
  );
40
- console.log("outDir", outDir);
41
39
  const passthrough = new PassThrough();
42
40
  tarStream.pipe(passthrough);
43
41
  const tarReadStream = createReadableStreamFromReadable(passthrough);
@@ -7,6 +7,7 @@ export declare const CreateRenderPayload: z.ZodObject<{
7
7
  width: z.ZodOptional<z.ZodNumber>;
8
8
  height: z.ZodOptional<z.ZodNumber>;
9
9
  work_slice_ms: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
10
+ html: z.ZodOptional<z.ZodString>;
10
11
  duration_ms: z.ZodOptional<z.ZodNumber>;
11
12
  strategy: z.ZodOptional<z.ZodDefault<z.ZodEnum<["v1"]>>>;
12
13
  }, "strip", z.ZodTypeAny, {
@@ -17,6 +18,7 @@ export declare const CreateRenderPayload: z.ZodObject<{
17
18
  duration_ms?: number | undefined;
18
19
  fps?: number | undefined;
19
20
  work_slice_ms?: number | undefined;
21
+ html?: string | undefined;
20
22
  }, {
21
23
  width?: number | undefined;
22
24
  height?: number | undefined;
@@ -25,6 +27,7 @@ export declare const CreateRenderPayload: z.ZodObject<{
25
27
  duration_ms?: number | undefined;
26
28
  fps?: number | undefined;
27
29
  work_slice_ms?: number | undefined;
30
+ html?: string | undefined;
28
31
  }>;
29
32
  export interface CreateRenderPayload {
30
33
  md5?: string;
@@ -32,17 +35,18 @@ export interface CreateRenderPayload {
32
35
  width?: number;
33
36
  height?: number;
34
37
  work_slice_ms?: number;
38
+ html?: string;
35
39
  duration_ms?: number;
36
40
  strategy?: "v1";
37
41
  }
38
42
  export interface CreateRenderResult {
39
43
  id: string;
40
- md5: string;
44
+ md5: string | null;
41
45
  status: "complete" | "created" | "failed" | "pending" | "rendering" | string;
42
46
  }
43
47
  export interface LookupRenderByMd5Result {
44
48
  id: string;
45
- md5: string;
49
+ md5: string | null;
46
50
  status: "complete" | "created" | "failed" | "pending" | "rendering" | string;
47
51
  }
48
52
  export declare const createRender: (client: Client, payload: CreateRenderPayload) => Promise<CreateRenderResult>;
@@ -8,6 +8,7 @@ const CreateRenderPayload = z.object({
8
8
  width: z.number().int().min(2).optional(),
9
9
  height: z.number().int().min(2).optional(),
10
10
  work_slice_ms: z.number().int().min(1e3).max(1e4).default(4e3).optional(),
11
+ html: z.string().optional(),
11
12
  duration_ms: z.number().int().optional(),
12
13
  strategy: z.enum(["v1"]).default("v1").optional()
13
14
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@editframe/api",
3
- "version": "0.15.0-beta.1",
3
+ "version": "0.15.0-beta.11",
4
4
  "description": "API functions for EditFrame",
5
5
  "exports": {
6
6
  ".": {
@@ -20,6 +20,11 @@
20
20
  "types": "./dist/resources/renders.bundle.d.ts",
21
21
  "default": "./dist/resources/renders.bundle.js"
22
22
  }
23
+ },
24
+ "./types.json": {
25
+ "import": {
26
+ "default": "./types.json"
27
+ }
23
28
  }
24
29
  },
25
30
  "type": "module",
@@ -27,7 +32,7 @@
27
32
  "typecheck": "tsc --noEmit --emitDeclarationOnly false",
28
33
  "build": "vite build",
29
34
  "build:watch": "vite build --watch",
30
- "typedoc": "typedoc --json ../../docs/api.json --plugin typedoc-plugin-zod --excludeExternals ./src"
35
+ "typedoc": "typedoc --json ./types.json --plugin typedoc-plugin-zod --excludeExternals ./src && jq -c . ./types.json > ./types.tmp.json && mv ./types.tmp.json ./types.json"
31
36
  },
32
37
  "author": "",
33
38
  "license": "UNLICENSED",
@@ -39,7 +44,7 @@
39
44
  "vite-plugin-dts": "^4.0.3"
40
45
  },
41
46
  "dependencies": {
42
- "@editframe/assets": "0.15.0-beta.1",
47
+ "@editframe/assets": "0.15.0-beta.11",
43
48
  "@vitejs/plugin-react": "^4.3.4",
44
49
  "vite-tsconfig-paths": "^4.3.2",
45
50
  "vite": "^5.4.11",
@@ -12,15 +12,15 @@ export const CreateImageFilePayload = z.object({
12
12
  /**
13
13
  * The md5 hash of the image file.
14
14
  */
15
- md5: z.string(),
15
+ md5: z.string().nullable(),
16
16
  /**
17
17
  * The height of the image file in pixels.
18
18
  */
19
- height: z.number().int(),
19
+ height: z.number().int().nullable(),
20
20
  /**
21
21
  * The width of the image file in pixels.
22
22
  */
23
- width: z.number().int(),
23
+ width: z.number().int().nullable(),
24
24
  /**
25
25
  * The mime type of the image file.
26
26
  */
@@ -38,9 +38,21 @@ export const CreateImageFilePayload = z.object({
38
38
  export type CreateImageFilePayload = z.infer<typeof CreateImageFilePayload>;
39
39
 
40
40
  export interface CreateImageFileResult {
41
+ /**
42
+ * Whether the image file has been fully uploaded.
43
+ */
41
44
  complete: boolean | null;
45
+ /**
46
+ * The byte size of the image file.
47
+ */
42
48
  byte_size: number;
49
+ /**
50
+ * The id of the image file.
51
+ */
43
52
  id: string;
53
+ /**
54
+ * The md5 hash of the image file.
55
+ */
44
56
  md5: string;
45
57
  }
46
58
 
@@ -2,11 +2,10 @@ import path from "node:path";
2
2
  import { PassThrough } from "node:stream";
3
3
 
4
4
  import react from "@vitejs/plugin-react";
5
+ import * as tar from "tar";
5
6
  import { build } from "vite";
6
7
  import { viteSingleFile } from "vite-plugin-singlefile";
7
- import tsconfigPaths from "vite-tsconfig-paths";
8
-
9
- import * as tar from "tar";
8
+ import tsconfigPathsPlugin from "vite-tsconfig-paths";
10
9
 
11
10
  import { randomUUID } from "node:crypto";
12
11
  import { createReadableStreamFromReadable } from "../utils/createReadableStreamFromReadable.ts";
@@ -19,8 +18,6 @@ interface BundlerOptions {
19
18
  export const bundleRender = async (options: BundlerOptions) => {
20
19
  const outDir = path.join(process.cwd(), "renders", randomUUID());
21
20
 
22
- console.log("outDir", outDir);
23
-
24
21
  await build({
25
22
  root: options.root,
26
23
  define: {
@@ -33,7 +30,7 @@ export const bundleRender = async (options: BundlerOptions) => {
33
30
  },
34
31
  },
35
32
  plugins: [
36
- tsconfigPaths(),
33
+ tsconfigPathsPlugin(),
37
34
  react({
38
35
  include: "**/*.{jsx,js,tsx,ts}",
39
36
  jsxRuntime: "automatic",
@@ -50,8 +47,6 @@ export const bundleRender = async (options: BundlerOptions) => {
50
47
  ["."],
51
48
  );
52
49
 
53
- console.log("outDir", outDir);
54
-
55
50
  const passthrough = new PassThrough();
56
51
  tarStream.pipe(passthrough);
57
52
  const tarReadStream = createReadableStreamFromReadable(passthrough);
@@ -19,6 +19,7 @@ export const CreateRenderPayload = z.object({
19
19
  .max(10_000)
20
20
  .default(4_000)
21
21
  .optional(),
22
+ html: z.string().optional(),
22
23
  duration_ms: z.number().int().optional(),
23
24
  strategy: z.enum(["v1"]).default("v1").optional(),
24
25
  });
@@ -29,6 +30,7 @@ export interface CreateRenderPayload {
29
30
  width?: number;
30
31
  height?: number;
31
32
  work_slice_ms?: number;
33
+ html?: string;
32
34
  duration_ms?: number;
33
35
  strategy?: "v1";
34
36
  }
@@ -39,13 +41,13 @@ assertTypesMatch<CreateRenderPayload, z.infer<typeof CreateRenderPayload>>(
39
41
 
40
42
  export interface CreateRenderResult {
41
43
  id: string;
42
- md5: string;
44
+ md5: string | null;
43
45
  status: "complete" | "created" | "failed" | "pending" | "rendering" | string;
44
46
  }
45
47
 
46
48
  export interface LookupRenderByMd5Result {
47
49
  id: string;
48
- md5: string;
50
+ md5: string | null;
49
51
  status: "complete" | "created" | "failed" | "pending" | "rendering" | string;
50
52
  }
51
53