@editframe/api 0.15.0-beta.5 → 0.15.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/renders.d.ts +4 -0
- package/dist/resources/renders.js +2 -1
- package/package.json +3 -3
- package/src/resources/renders.ts +3 -1
- package/types.json +1 -0
- package/dist/types.json +0 -1
|
@@ -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,6 +35,7 @@ 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
|
}
|
|
@@ -8,13 +8,14 @@ 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
|
});
|
|
14
15
|
const createRender = async (client, payload) => {
|
|
15
16
|
log("Creating render", payload);
|
|
16
17
|
payload.strategy ??= "v1";
|
|
17
|
-
payload.work_slice_ms ??=
|
|
18
|
+
payload.work_slice_ms ??= 4e3;
|
|
18
19
|
const response = await client.authenticatedFetch("/api/v1/renders", {
|
|
19
20
|
method: "POST",
|
|
20
21
|
body: JSON.stringify(payload)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@editframe/api",
|
|
3
|
-
"version": "0.15.0-beta.
|
|
3
|
+
"version": "0.15.0-beta.7",
|
|
4
4
|
"description": "API functions for EditFrame",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"typecheck": "tsc --noEmit --emitDeclarationOnly false",
|
|
29
29
|
"build": "vite build",
|
|
30
30
|
"build:watch": "vite build --watch",
|
|
31
|
-
"typedoc": "typedoc --json ./
|
|
31
|
+
"typedoc": "typedoc --json ./types.json --plugin typedoc-plugin-zod --excludeExternals ./src && jq -c . ./types.json > ./types.tmp.json && mv ./types.tmp.json ./types.json"
|
|
32
32
|
},
|
|
33
33
|
"author": "",
|
|
34
34
|
"license": "UNLICENSED",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"vite-plugin-dts": "^4.0.3"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@editframe/assets": "0.15.0-beta.
|
|
43
|
+
"@editframe/assets": "0.15.0-beta.7",
|
|
44
44
|
"@vitejs/plugin-react": "^4.3.4",
|
|
45
45
|
"vite-tsconfig-paths": "^4.3.2",
|
|
46
46
|
"vite": "^5.4.11",
|
package/src/resources/renders.ts
CHANGED
|
@@ -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
|
}
|
|
@@ -58,7 +60,7 @@ export const createRender = async (
|
|
|
58
60
|
// And if we set the default last, the type is not inferred correctly
|
|
59
61
|
// Manually applying defaults here is a hack
|
|
60
62
|
payload.strategy ??= "v1";
|
|
61
|
-
payload.work_slice_ms ??=
|
|
63
|
+
payload.work_slice_ms ??= 4_000;
|
|
62
64
|
const response = await client.authenticatedFetch("/api/v1/renders", {
|
|
63
65
|
method: "POST",
|
|
64
66
|
body: JSON.stringify(payload),
|