@aviaryhq/cloudglue-js 0.3.0 → 0.3.2

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.
@@ -26,6 +26,26 @@ const SegmentationList = zod_1.z
26
26
  })
27
27
  .strict()
28
28
  .passthrough();
29
+ const FrameExtractionList = zod_1.z
30
+ .object({
31
+ object: zod_1.z.literal("list"),
32
+ data: zod_1.z.array(zod_1.z
33
+ .object({
34
+ frame_extraction_id: zod_1.z.string().uuid(),
35
+ status: zod_1.z.enum(["pending", "processing", "completed", "failed"]),
36
+ created_at: zod_1.z.number().gte(0),
37
+ file_id: zod_1.z.string().uuid(),
38
+ frame_extraction_config: common_2.FrameExtractionConfig,
39
+ frame_count: zod_1.z.number().gte(0).optional(),
40
+ })
41
+ .strict()
42
+ .passthrough()),
43
+ total: zod_1.z.number().int(),
44
+ limit: zod_1.z.number().int(),
45
+ offset: zod_1.z.number().int(),
46
+ })
47
+ .strict()
48
+ .passthrough();
29
49
  const FileUpload = zod_1.z
30
50
  .object({
31
51
  file: zod_1.z.instanceof(File),
@@ -47,13 +67,16 @@ const FileUpdate = zod_1.z
47
67
  .strict()
48
68
  .passthrough();
49
69
  const createFileSegmentation_Body = common_2.SegmentationConfig;
70
+ const createFileFrameExtraction_Body = common_2.FrameExtractionConfig;
50
71
  exports.schemas = {
51
72
  FileList,
52
73
  SegmentationList,
74
+ FrameExtractionList,
53
75
  FileUpload,
54
76
  FileDelete,
55
77
  FileUpdate,
56
78
  createFileSegmentation_Body,
79
+ createFileFrameExtraction_Body,
57
80
  };
58
81
  const endpoints = (0, core_1.makeApi)([
59
82
  {
@@ -366,6 +389,81 @@ const endpoints = (0, core_1.makeApi)([
366
389
  },
367
390
  ],
368
391
  },
392
+ {
393
+ method: "post",
394
+ path: "/files/:file_id/frames",
395
+ alias: "createFileFrameExtraction",
396
+ description: `Create a new frame extraction for a file using the specified frame extraction configuration. This is an async operation that returns immediately with a 'pending' status. Results are cached, so identical requests will return the same frame extraction.`,
397
+ requestFormat: "json",
398
+ parameters: [
399
+ {
400
+ name: "body",
401
+ description: `Frame extraction configuration`,
402
+ type: "Body",
403
+ schema: createFileFrameExtraction_Body,
404
+ },
405
+ {
406
+ name: "file_id",
407
+ type: "Path",
408
+ schema: zod_1.z.string().uuid(),
409
+ },
410
+ ],
411
+ response: common_2.FrameExtraction,
412
+ errors: [
413
+ {
414
+ status: 400,
415
+ description: `Invalid request or file duration is less than specified time range`,
416
+ schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
417
+ },
418
+ {
419
+ status: 404,
420
+ description: `File not found`,
421
+ schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
422
+ },
423
+ {
424
+ status: 500,
425
+ description: `An unexpected error occurred on the server`,
426
+ schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
427
+ },
428
+ ],
429
+ },
430
+ {
431
+ method: "get",
432
+ path: "/files/:file_id/frames",
433
+ alias: "listFileFrameExtractions",
434
+ description: `List all frame extractions for a specific file`,
435
+ requestFormat: "json",
436
+ parameters: [
437
+ {
438
+ name: "file_id",
439
+ type: "Path",
440
+ schema: zod_1.z.string().uuid(),
441
+ },
442
+ {
443
+ name: "limit",
444
+ type: "Query",
445
+ schema: zod_1.z.number().int().gte(1).lte(100).optional().default(50),
446
+ },
447
+ {
448
+ name: "offset",
449
+ type: "Query",
450
+ schema: zod_1.z.number().int().gte(0).optional().default(0),
451
+ },
452
+ ],
453
+ response: FrameExtractionList,
454
+ errors: [
455
+ {
456
+ status: 404,
457
+ description: `File not found`,
458
+ schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
459
+ },
460
+ {
461
+ status: 500,
462
+ description: `An unexpected error occurred on the server`,
463
+ schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
464
+ },
465
+ ],
466
+ },
369
467
  ]);
370
468
  exports.FilesApi = new core_1.Zodios("https://api.cloudglue.dev/v1", endpoints);
371
469
  function createApiClient(baseUrl, options) {