@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.
@@ -57,13 +57,13 @@ export interface CreateImageFileResult {
57
57
  /**
58
58
  * The md5 hash of the image file.
59
59
  */
60
- md5: string | null;
60
+ md5: string;
61
61
  }
62
62
  export interface LookupImageFileByMd5Result {
63
63
  complete: boolean | null;
64
64
  byte_size: number;
65
65
  id: string;
66
- md5: string | null;
66
+ md5: string;
67
67
  }
68
68
  export declare const createImageFile: (client: Client, payload: CreateImageFilePayload) => Promise<CreateImageFileResult>;
69
69
  export declare const uploadImageFile: (client: Client, uploadDetails: {
@@ -10,14 +10,14 @@ export declare const AudioStreamSchema: z.ZodObject<{
10
10
  sample_fmt: z.ZodString;
11
11
  sample_rate: z.ZodString;
12
12
  channels: z.ZodNumber;
13
- channel_layout: z.ZodOptional<z.ZodString>;
13
+ channel_layout: z.ZodString;
14
14
  bits_per_sample: z.ZodNumber;
15
15
  initial_padding: z.ZodOptional<z.ZodNumber>;
16
16
  r_frame_rate: z.ZodString;
17
17
  avg_frame_rate: z.ZodString;
18
18
  time_base: z.ZodString;
19
- start_pts: z.ZodOptional<z.ZodNumber>;
20
- start_time: z.ZodOptional<z.ZodNumber>;
19
+ start_pts: z.ZodNumber;
20
+ start_time: z.ZodNumber;
21
21
  duration_ts: z.ZodNumber;
22
22
  duration: z.ZodNumber;
23
23
  bit_rate: z.ZodString;
@@ -32,18 +32,18 @@ export declare const AudioStreamSchema: z.ZodObject<{
32
32
  sample_fmt: string;
33
33
  sample_rate: string;
34
34
  channels: number;
35
+ channel_layout: string;
35
36
  bits_per_sample: number;
36
37
  r_frame_rate: string;
37
38
  avg_frame_rate: string;
38
39
  time_base: string;
40
+ start_pts: number;
41
+ start_time: number;
39
42
  duration_ts: number;
40
43
  duration: number;
41
44
  bit_rate: string;
42
45
  disposition: Record<string, unknown>;
43
- channel_layout?: string | undefined;
44
46
  initial_padding?: number | undefined;
45
- start_pts?: number | undefined;
46
- start_time?: number | undefined;
47
47
  }, {
48
48
  index: number;
49
49
  codec_name: string;
@@ -54,18 +54,18 @@ export declare const AudioStreamSchema: z.ZodObject<{
54
54
  sample_fmt: string;
55
55
  sample_rate: string;
56
56
  channels: number;
57
+ channel_layout: string;
57
58
  bits_per_sample: number;
58
59
  r_frame_rate: string;
59
60
  avg_frame_rate: string;
60
61
  time_base: string;
62
+ start_pts: number;
63
+ start_time: number;
61
64
  duration_ts: number;
62
65
  duration: number;
63
66
  bit_rate: string;
64
67
  disposition: Record<string, unknown>;
65
- channel_layout?: string | undefined;
66
68
  initial_padding?: number | undefined;
67
- start_pts?: number | undefined;
68
- start_time?: number | undefined;
69
69
  }>;
70
70
  export interface AudioStreamSchema {
71
71
  /** The index of the stream in the file */
@@ -87,7 +87,7 @@ export interface AudioStreamSchema {
87
87
  /** The number of channels */
88
88
  channels: number;
89
89
  /** The channel layout */
90
- channel_layout?: string;
90
+ channel_layout: string;
91
91
  /** The number of bits per sample */
92
92
  bits_per_sample: number;
93
93
  /** The initial padding */
@@ -99,9 +99,9 @@ export interface AudioStreamSchema {
99
99
  /** The time base */
100
100
  time_base: string;
101
101
  /** The start presentation timestamp */
102
- start_pts?: number;
102
+ start_pts: number;
103
103
  /** The start time */
104
- start_time?: number;
104
+ start_time: number;
105
105
  /** The duration timestamp */
106
106
  duration_ts: number;
107
107
  /** The duration */
@@ -226,14 +226,14 @@ export declare const AudioTrackPayload: z.ZodObject<{
226
226
  sample_fmt: z.ZodString;
227
227
  sample_rate: z.ZodString;
228
228
  channels: z.ZodNumber;
229
- channel_layout: z.ZodOptional<z.ZodString>;
229
+ channel_layout: z.ZodString;
230
230
  bits_per_sample: z.ZodNumber;
231
231
  initial_padding: z.ZodOptional<z.ZodNumber>;
232
232
  r_frame_rate: z.ZodString;
233
233
  avg_frame_rate: z.ZodString;
234
234
  time_base: z.ZodString;
235
- start_pts: z.ZodOptional<z.ZodNumber>;
236
- start_time: z.ZodOptional<z.ZodNumber>;
235
+ start_pts: z.ZodNumber;
236
+ start_time: z.ZodNumber;
237
237
  duration_ts: z.ZodNumber;
238
238
  duration: z.ZodNumber;
239
239
  bit_rate: z.ZodString;
@@ -248,18 +248,18 @@ export declare const AudioTrackPayload: z.ZodObject<{
248
248
  sample_fmt: string;
249
249
  sample_rate: string;
250
250
  channels: number;
251
+ channel_layout: string;
251
252
  bits_per_sample: number;
252
253
  r_frame_rate: string;
253
254
  avg_frame_rate: string;
254
255
  time_base: string;
256
+ start_pts: number;
257
+ start_time: number;
255
258
  duration_ts: number;
256
259
  duration: number;
257
260
  bit_rate: string;
258
261
  disposition: Record<string, unknown>;
259
- channel_layout?: string | undefined;
260
262
  initial_padding?: number | undefined;
261
- start_pts?: number | undefined;
262
- start_time?: number | undefined;
263
263
  }, {
264
264
  index: number;
265
265
  codec_name: string;
@@ -270,18 +270,18 @@ export declare const AudioTrackPayload: z.ZodObject<{
270
270
  sample_fmt: string;
271
271
  sample_rate: string;
272
272
  channels: number;
273
+ channel_layout: string;
273
274
  bits_per_sample: number;
274
275
  r_frame_rate: string;
275
276
  avg_frame_rate: string;
276
277
  time_base: string;
278
+ start_pts: number;
279
+ start_time: number;
277
280
  duration_ts: number;
278
281
  duration: number;
279
282
  bit_rate: string;
280
283
  disposition: Record<string, unknown>;
281
- channel_layout?: string | undefined;
282
284
  initial_padding?: number | undefined;
283
- start_pts?: number | undefined;
284
- start_time?: number | undefined;
285
285
  }>;
286
286
  duration_ms: z.ZodNumber;
287
287
  codec_name: z.ZodString;
@@ -302,18 +302,18 @@ export declare const AudioTrackPayload: z.ZodObject<{
302
302
  sample_fmt: string;
303
303
  sample_rate: string;
304
304
  channels: number;
305
+ channel_layout: string;
305
306
  bits_per_sample: number;
306
307
  r_frame_rate: string;
307
308
  avg_frame_rate: string;
308
309
  time_base: string;
310
+ start_pts: number;
311
+ start_time: number;
309
312
  duration_ts: number;
310
313
  duration: number;
311
314
  bit_rate: string;
312
315
  disposition: Record<string, unknown>;
313
- channel_layout?: string | undefined;
314
316
  initial_padding?: number | undefined;
315
- start_pts?: number | undefined;
316
- start_time?: number | undefined;
317
317
  };
318
318
  duration_ms: number;
319
319
  }, {
@@ -332,18 +332,18 @@ export declare const AudioTrackPayload: z.ZodObject<{
332
332
  sample_fmt: string;
333
333
  sample_rate: string;
334
334
  channels: number;
335
+ channel_layout: string;
335
336
  bits_per_sample: number;
336
337
  r_frame_rate: string;
337
338
  avg_frame_rate: string;
338
339
  time_base: string;
340
+ start_pts: number;
341
+ start_time: number;
339
342
  duration_ts: number;
340
343
  duration: number;
341
344
  bit_rate: string;
342
345
  disposition: Record<string, unknown>;
343
- channel_layout?: string | undefined;
344
346
  initial_padding?: number | undefined;
345
- start_pts?: number | undefined;
346
- start_time?: number | undefined;
347
347
  };
348
348
  duration_ms: number;
349
349
  }>;
@@ -504,14 +504,14 @@ export declare const CreateISOBMFFTrackPayload: z.ZodDiscriminatedUnion<"type",
504
504
  sample_fmt: z.ZodString;
505
505
  sample_rate: z.ZodString;
506
506
  channels: z.ZodNumber;
507
- channel_layout: z.ZodOptional<z.ZodString>;
507
+ channel_layout: z.ZodString;
508
508
  bits_per_sample: z.ZodNumber;
509
509
  initial_padding: z.ZodOptional<z.ZodNumber>;
510
510
  r_frame_rate: z.ZodString;
511
511
  avg_frame_rate: z.ZodString;
512
512
  time_base: z.ZodString;
513
- start_pts: z.ZodOptional<z.ZodNumber>;
514
- start_time: z.ZodOptional<z.ZodNumber>;
513
+ start_pts: z.ZodNumber;
514
+ start_time: z.ZodNumber;
515
515
  duration_ts: z.ZodNumber;
516
516
  duration: z.ZodNumber;
517
517
  bit_rate: z.ZodString;
@@ -526,18 +526,18 @@ export declare const CreateISOBMFFTrackPayload: z.ZodDiscriminatedUnion<"type",
526
526
  sample_fmt: string;
527
527
  sample_rate: string;
528
528
  channels: number;
529
+ channel_layout: string;
529
530
  bits_per_sample: number;
530
531
  r_frame_rate: string;
531
532
  avg_frame_rate: string;
532
533
  time_base: string;
534
+ start_pts: number;
535
+ start_time: number;
533
536
  duration_ts: number;
534
537
  duration: number;
535
538
  bit_rate: string;
536
539
  disposition: Record<string, unknown>;
537
- channel_layout?: string | undefined;
538
540
  initial_padding?: number | undefined;
539
- start_pts?: number | undefined;
540
- start_time?: number | undefined;
541
541
  }, {
542
542
  index: number;
543
543
  codec_name: string;
@@ -548,18 +548,18 @@ export declare const CreateISOBMFFTrackPayload: z.ZodDiscriminatedUnion<"type",
548
548
  sample_fmt: string;
549
549
  sample_rate: string;
550
550
  channels: number;
551
+ channel_layout: string;
551
552
  bits_per_sample: number;
552
553
  r_frame_rate: string;
553
554
  avg_frame_rate: string;
554
555
  time_base: string;
556
+ start_pts: number;
557
+ start_time: number;
555
558
  duration_ts: number;
556
559
  duration: number;
557
560
  bit_rate: string;
558
561
  disposition: Record<string, unknown>;
559
- channel_layout?: string | undefined;
560
562
  initial_padding?: number | undefined;
561
- start_pts?: number | undefined;
562
- start_time?: number | undefined;
563
563
  }>;
564
564
  duration_ms: z.ZodNumber;
565
565
  codec_name: z.ZodString;
@@ -580,18 +580,18 @@ export declare const CreateISOBMFFTrackPayload: z.ZodDiscriminatedUnion<"type",
580
580
  sample_fmt: string;
581
581
  sample_rate: string;
582
582
  channels: number;
583
+ channel_layout: string;
583
584
  bits_per_sample: number;
584
585
  r_frame_rate: string;
585
586
  avg_frame_rate: string;
586
587
  time_base: string;
588
+ start_pts: number;
589
+ start_time: number;
587
590
  duration_ts: number;
588
591
  duration: number;
589
592
  bit_rate: string;
590
593
  disposition: Record<string, unknown>;
591
- channel_layout?: string | undefined;
592
594
  initial_padding?: number | undefined;
593
- start_pts?: number | undefined;
594
- start_time?: number | undefined;
595
595
  };
596
596
  duration_ms: number;
597
597
  }, {
@@ -610,18 +610,18 @@ export declare const CreateISOBMFFTrackPayload: z.ZodDiscriminatedUnion<"type",
610
610
  sample_fmt: string;
611
611
  sample_rate: string;
612
612
  channels: number;
613
+ channel_layout: string;
613
614
  bits_per_sample: number;
614
615
  r_frame_rate: string;
615
616
  avg_frame_rate: string;
616
617
  time_base: string;
618
+ start_pts: number;
619
+ start_time: number;
617
620
  duration_ts: number;
618
621
  duration: number;
619
622
  bit_rate: string;
620
623
  disposition: Record<string, unknown>;
621
- channel_layout?: string | undefined;
622
624
  initial_padding?: number | undefined;
623
- start_pts?: number | undefined;
624
- start_time?: number | undefined;
625
625
  };
626
626
  duration_ms: number;
627
627
  }>, z.ZodObject<{
@@ -11,14 +11,14 @@ const AudioStreamSchema = z.object({
11
11
  sample_fmt: z.string(),
12
12
  sample_rate: z.string(),
13
13
  channels: z.number(),
14
- channel_layout: z.string().optional(),
14
+ channel_layout: z.string(),
15
15
  bits_per_sample: z.number(),
16
16
  initial_padding: z.number().optional(),
17
17
  r_frame_rate: z.string(),
18
18
  avg_frame_rate: z.string(),
19
19
  time_base: z.string(),
20
- start_pts: z.number().optional(),
21
- start_time: z.coerce.number().optional(),
20
+ start_pts: z.number(),
21
+ start_time: z.coerce.number(),
22
22
  duration_ts: z.number(),
23
23
  duration: z.coerce.number(),
24
24
  bit_rate: z.string(),
@@ -6,7 +6,7 @@ export interface IsobmffProcessInfoResult {
6
6
  completed_at: string | null;
7
7
  failed_at: string | null;
8
8
  isobmff_file_id: string | null;
9
- unprocessed_file_id: string | null;
9
+ unprocessed_file_id: string;
10
10
  }
11
11
  export declare const getIsobmffProcessProgress: (client: Client, id: string) => Promise<ProgressIterator>;
12
12
  export declare const getIsobmffProcessInfo: (client: Client, id: string) => Promise<IsobmffProcessInfoResult>;
@@ -7,8 +7,6 @@ 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>;
11
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
12
10
  duration_ms: z.ZodOptional<z.ZodNumber>;
13
11
  strategy: z.ZodOptional<z.ZodDefault<z.ZodEnum<["v1"]>>>;
14
12
  }, "strip", z.ZodTypeAny, {
@@ -19,8 +17,6 @@ export declare const CreateRenderPayload: z.ZodObject<{
19
17
  duration_ms?: number | undefined;
20
18
  fps?: number | undefined;
21
19
  work_slice_ms?: number | undefined;
22
- html?: string | undefined;
23
- metadata?: Record<string, string> | undefined;
24
20
  }, {
25
21
  width?: number | undefined;
26
22
  height?: number | undefined;
@@ -29,8 +25,6 @@ export declare const CreateRenderPayload: z.ZodObject<{
29
25
  duration_ms?: number | undefined;
30
26
  fps?: number | undefined;
31
27
  work_slice_ms?: number | undefined;
32
- html?: string | undefined;
33
- metadata?: Record<string, string> | undefined;
34
28
  }>;
35
29
  export interface CreateRenderPayload {
36
30
  md5?: string;
@@ -38,20 +32,17 @@ export interface CreateRenderPayload {
38
32
  width?: number;
39
33
  height?: number;
40
34
  work_slice_ms?: number;
41
- html?: string;
42
35
  duration_ms?: number;
43
- metadata?: Record<string, string>;
44
36
  strategy?: "v1";
45
37
  }
46
38
  export interface CreateRenderResult {
47
39
  id: string;
48
- md5: string | null;
40
+ md5: string;
49
41
  status: "complete" | "created" | "failed" | "pending" | "rendering" | string;
50
- metadata: Record<string, string>;
51
42
  }
52
43
  export interface LookupRenderByMd5Result {
53
44
  id: string;
54
- md5: string | null;
45
+ md5: string;
55
46
  status: "complete" | "created" | "failed" | "pending" | "rendering" | string;
56
47
  }
57
48
  export declare const createRender: (client: Client, payload: CreateRenderPayload) => Promise<CreateRenderResult>;
@@ -8,15 +8,13 @@ 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(),
12
- metadata: z.record(z.string(), z.string()).optional(),
13
11
  duration_ms: z.number().int().optional(),
14
12
  strategy: z.enum(["v1"]).default("v1").optional()
15
13
  });
16
14
  const createRender = async (client, payload) => {
17
15
  log("Creating render", payload);
18
16
  payload.strategy ??= "v1";
19
- payload.work_slice_ms ??= 4e3;
17
+ payload.work_slice_ms ??= 2e3;
20
18
  const response = await client.authenticatedFetch("/api/v1/renders", {
21
19
  method: "POST",
22
20
  body: JSON.stringify(payload)