@editframe/api 0.15.0-beta.17 → 0.15.0-beta.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@editframe/api",
3
- "version": "0.15.0-beta.17",
3
+ "version": "0.15.0-beta.5",
4
4
  "description": "API functions for EditFrame",
5
5
  "exports": {
6
6
  ".": {
@@ -21,18 +21,14 @@
21
21
  "default": "./dist/resources/renders.bundle.js"
22
22
  }
23
23
  },
24
- "./types.json": {
25
- "import": {
26
- "default": "./types.json"
27
- }
28
- }
24
+ "./types.json": "./dist/types.json"
29
25
  },
30
26
  "type": "module",
31
27
  "scripts": {
32
28
  "typecheck": "tsc --noEmit --emitDeclarationOnly false",
33
29
  "build": "vite build",
34
30
  "build:watch": "vite build --watch",
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
+ "typedoc": "typedoc --json ./dist/types.json --plugin typedoc-plugin-zod --excludeExternals ./src && jq -c . ./dist/types.json > ./dist/types.tmp.json && mv ./dist/types.tmp.json ./dist/types.json"
36
32
  },
37
33
  "author": "",
38
34
  "license": "UNLICENSED",
@@ -44,7 +40,7 @@
44
40
  "vite-plugin-dts": "^4.0.3"
45
41
  },
46
42
  "dependencies": {
47
- "@editframe/assets": "0.15.0-beta.17",
43
+ "@editframe/assets": "0.15.0-beta.5",
48
44
  "@vitejs/plugin-react": "^4.3.4",
49
45
  "vite-tsconfig-paths": "^4.3.2",
50
46
  "vite": "^5.4.11",
@@ -53,14 +53,14 @@ export interface CreateImageFileResult {
53
53
  /**
54
54
  * The md5 hash of the image file.
55
55
  */
56
- md5: string | null;
56
+ md5: string;
57
57
  }
58
58
 
59
59
  export interface LookupImageFileByMd5Result {
60
60
  complete: boolean | null;
61
61
  byte_size: number;
62
62
  id: string;
63
- md5: string | null;
63
+ md5: string;
64
64
  }
65
65
 
66
66
  export const createImageFile = async (
@@ -14,14 +14,14 @@ export const AudioStreamSchema = z.object({
14
14
  sample_fmt: z.string(),
15
15
  sample_rate: z.string(),
16
16
  channels: z.number(),
17
- channel_layout: z.string().optional(),
17
+ channel_layout: z.string(),
18
18
  bits_per_sample: z.number(),
19
19
  initial_padding: z.number().optional(),
20
20
  r_frame_rate: z.string(),
21
21
  avg_frame_rate: z.string(),
22
22
  time_base: z.string(),
23
- start_pts: z.number().optional(),
24
- start_time: z.coerce.number().optional(),
23
+ start_pts: z.number(),
24
+ start_time: z.coerce.number(),
25
25
  duration_ts: z.number(),
26
26
  duration: z.coerce.number(),
27
27
  bit_rate: z.string(),
@@ -48,7 +48,7 @@ export interface AudioStreamSchema {
48
48
  /** The number of channels */
49
49
  channels: number;
50
50
  /** The channel layout */
51
- channel_layout?: string;
51
+ channel_layout: string;
52
52
  /** The number of bits per sample */
53
53
  bits_per_sample: number;
54
54
  /** The initial padding */
@@ -60,9 +60,9 @@ export interface AudioStreamSchema {
60
60
  /** The time base */
61
61
  time_base: string;
62
62
  /** The start presentation timestamp */
63
- start_pts?: number;
63
+ start_pts: number;
64
64
  /** The start time */
65
- start_time?: number;
65
+ start_time: number;
66
66
  /** The duration timestamp */
67
67
  duration_ts: number;
68
68
  /** The duration */
@@ -7,7 +7,7 @@ export interface IsobmffProcessInfoResult {
7
7
  completed_at: string | null;
8
8
  failed_at: string | null;
9
9
  isobmff_file_id: string | null;
10
- unprocessed_file_id: string | null;
10
+ unprocessed_file_id: string;
11
11
  }
12
12
 
13
13
  export const getIsobmffProcessProgress = async (client: Client, id: string) => {
@@ -19,8 +19,6 @@ export const CreateRenderPayload = z.object({
19
19
  .max(10_000)
20
20
  .default(4_000)
21
21
  .optional(),
22
- html: z.string().optional(),
23
- metadata: z.record(z.string(), z.string()).optional(),
24
22
  duration_ms: z.number().int().optional(),
25
23
  strategy: z.enum(["v1"]).default("v1").optional(),
26
24
  });
@@ -31,9 +29,7 @@ export interface CreateRenderPayload {
31
29
  width?: number;
32
30
  height?: number;
33
31
  work_slice_ms?: number;
34
- html?: string;
35
32
  duration_ms?: number;
36
- metadata?: Record<string, string>;
37
33
  strategy?: "v1";
38
34
  }
39
35
 
@@ -43,14 +39,13 @@ assertTypesMatch<CreateRenderPayload, z.infer<typeof CreateRenderPayload>>(
43
39
 
44
40
  export interface CreateRenderResult {
45
41
  id: string;
46
- md5: string | null;
42
+ md5: string;
47
43
  status: "complete" | "created" | "failed" | "pending" | "rendering" | string;
48
- metadata: Record<string, string>;
49
44
  }
50
45
 
51
46
  export interface LookupRenderByMd5Result {
52
47
  id: string;
53
- md5: string | null;
48
+ md5: string;
54
49
  status: "complete" | "created" | "failed" | "pending" | "rendering" | string;
55
50
  }
56
51
 
@@ -63,7 +58,7 @@ export const createRender = async (
63
58
  // And if we set the default last, the type is not inferred correctly
64
59
  // Manually applying defaults here is a hack
65
60
  payload.strategy ??= "v1";
66
- payload.work_slice_ms ??= 4_000;
61
+ payload.work_slice_ms ??= 2_000;
67
62
  const response = await client.authenticatedFetch("/api/v1/renders", {
68
63
  method: "POST",
69
64
  body: JSON.stringify(payload),