@aviaryhq/cloudglue-js 0.5.7 → 0.5.9

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.
@@ -97,7 +97,7 @@ export declare const SegmentsApi: import("@zodios/core").ZodiosInstance<[{
97
97
  method: "post";
98
98
  path: "/segments";
99
99
  alias: "createSegments";
100
- description: "Create intelligent video segments based on shot detection or narrative analysis.\n\n**Note: YouTube URLs are supported for narrative-based segmentation only.** Shot-based segmentation requires direct video file access. Use Cloudglue Files, HTTP URLs, or files from data connectors for shot-based segmentation.\n\n**Narrative Segmentation Strategies:**\n\n- **comprehensive** (default for non-YouTube videos): Uses a VLM to deeply analyze logical segments of video. Only available for non-YouTube videos.\n- **balanced** (default for YouTube videos): Balanced analysis approach using multiple modalities. Supports YouTube URLs.\n\n**YouTube URLs**: Automatically use the &#x27;balanced&#x27; strategy. The strategy field is ignored for YouTube URLs, and other strategies will be rejected with an error.\n\n**Chapter Count Parameters:**\n\n- **number_of_chapters**: Target number of chapters. If only this is provided, min_chapters and max_chapters are calculated automatically.\n- **min_chapters**: Minimum number of chapters. If provided with number_of_chapters and max, validates min is less than or equal to number_of_chapters which is less than or equal to max.\n- **max_chapters**: Maximum number of chapters. If provided with number_of_chapters and min, validates min is less than or equal to number_of_chapters which is less than or equal to max.\n- If none are provided, chapter counts are calculated automatically based on video duration.";
100
+ description: "Create intelligent segments for video or audio files based on shot detection or narrative analysis.\n\n**Audio File Support:**\n\n- Audio files support **narrative** criteria only (shot detection is not available for audio).\n- Audio files automatically use the &#x27;balanced&#x27; strategy.\n\n**Note: YouTube URLs and audio files are supported for narrative-based segmentation only.** Shot-based segmentation requires direct video file access. Use Cloudglue Files, HTTP URLs, or files from data connectors for shot-based segmentation.\n\n**Narrative Segmentation Strategies:**\n\n- **comprehensive** (default for non-YouTube/non-audio files): Uses a VLM to deeply analyze logical segments of video. Only available for video files (not YouTube or audio).\n- **balanced** (default for YouTube videos and audio files): Balanced analysis approach using multiple modalities. Supports YouTube URLs and audio files.\n\n**YouTube URLs and Audio Files**: Automatically use the &#x27;balanced&#x27; strategy. The strategy field is ignored, and other strategies will be rejected with an error.\n\n**Chapter Count Parameters:**\n\n- **number_of_chapters**: Target number of chapters. If only this is provided, min_chapters and max_chapters are calculated automatically.\n- **min_chapters**: Minimum number of chapters. If provided with number_of_chapters and max, validates min is less than or equal to number_of_chapters which is less than or equal to max.\n- **max_chapters**: Maximum number of chapters. If provided with number_of_chapters and min, validates min is less than or equal to number_of_chapters which is less than or equal to max.\n- If none are provided, chapter counts are calculated automatically based on file duration.";
101
101
  requestFormat: "json";
102
102
  parameters: [{
103
103
  name: "body";
@@ -281,7 +281,7 @@ export declare function createApiClient(baseUrl: string, options?: ZodiosOptions
281
281
  method: "post";
282
282
  path: "/segments";
283
283
  alias: "createSegments";
284
- description: "Create intelligent video segments based on shot detection or narrative analysis.\n\n**Note: YouTube URLs are supported for narrative-based segmentation only.** Shot-based segmentation requires direct video file access. Use Cloudglue Files, HTTP URLs, or files from data connectors for shot-based segmentation.\n\n**Narrative Segmentation Strategies:**\n\n- **comprehensive** (default for non-YouTube videos): Uses a VLM to deeply analyze logical segments of video. Only available for non-YouTube videos.\n- **balanced** (default for YouTube videos): Balanced analysis approach using multiple modalities. Supports YouTube URLs.\n\n**YouTube URLs**: Automatically use the &#x27;balanced&#x27; strategy. The strategy field is ignored for YouTube URLs, and other strategies will be rejected with an error.\n\n**Chapter Count Parameters:**\n\n- **number_of_chapters**: Target number of chapters. If only this is provided, min_chapters and max_chapters are calculated automatically.\n- **min_chapters**: Minimum number of chapters. If provided with number_of_chapters and max, validates min is less than or equal to number_of_chapters which is less than or equal to max.\n- **max_chapters**: Maximum number of chapters. If provided with number_of_chapters and min, validates min is less than or equal to number_of_chapters which is less than or equal to max.\n- If none are provided, chapter counts are calculated automatically based on video duration.";
284
+ description: "Create intelligent segments for video or audio files based on shot detection or narrative analysis.\n\n**Audio File Support:**\n\n- Audio files support **narrative** criteria only (shot detection is not available for audio).\n- Audio files automatically use the &#x27;balanced&#x27; strategy.\n\n**Note: YouTube URLs and audio files are supported for narrative-based segmentation only.** Shot-based segmentation requires direct video file access. Use Cloudglue Files, HTTP URLs, or files from data connectors for shot-based segmentation.\n\n**Narrative Segmentation Strategies:**\n\n- **comprehensive** (default for non-YouTube/non-audio files): Uses a VLM to deeply analyze logical segments of video. Only available for video files (not YouTube or audio).\n- **balanced** (default for YouTube videos and audio files): Balanced analysis approach using multiple modalities. Supports YouTube URLs and audio files.\n\n**YouTube URLs and Audio Files**: Automatically use the &#x27;balanced&#x27; strategy. The strategy field is ignored, and other strategies will be rejected with an error.\n\n**Chapter Count Parameters:**\n\n- **number_of_chapters**: Target number of chapters. If only this is provided, min_chapters and max_chapters are calculated automatically.\n- **min_chapters**: Minimum number of chapters. If provided with number_of_chapters and max, validates min is less than or equal to number_of_chapters which is less than or equal to max.\n- **max_chapters**: Maximum number of chapters. If provided with number_of_chapters and min, validates min is less than or equal to number_of_chapters which is less than or equal to max.\n- If none are provided, chapter counts are calculated automatically based on file duration.";
285
285
  requestFormat: "json";
286
286
  parameters: [{
287
287
  name: "body";
@@ -98,23 +98,28 @@ const endpoints = (0, core_1.makeApi)([
98
98
  method: 'post',
99
99
  path: '/segments',
100
100
  alias: 'createSegments',
101
- description: `Create intelligent video segments based on shot detection or narrative analysis.
101
+ description: `Create intelligent segments for video or audio files based on shot detection or narrative analysis.
102
102
 
103
- **Note: YouTube URLs are supported for narrative-based segmentation only.** Shot-based segmentation requires direct video file access. Use Cloudglue Files, HTTP URLs, or files from data connectors for shot-based segmentation.
103
+ **Audio File Support:**
104
+
105
+ - Audio files support **narrative** criteria only (shot detection is not available for audio).
106
+ - Audio files automatically use the &#x27;balanced&#x27; strategy.
107
+
108
+ **Note: YouTube URLs and audio files are supported for narrative-based segmentation only.** Shot-based segmentation requires direct video file access. Use Cloudglue Files, HTTP URLs, or files from data connectors for shot-based segmentation.
104
109
 
105
110
  **Narrative Segmentation Strategies:**
106
111
 
107
- - **comprehensive** (default for non-YouTube videos): Uses a VLM to deeply analyze logical segments of video. Only available for non-YouTube videos.
108
- - **balanced** (default for YouTube videos): Balanced analysis approach using multiple modalities. Supports YouTube URLs.
112
+ - **comprehensive** (default for non-YouTube/non-audio files): Uses a VLM to deeply analyze logical segments of video. Only available for video files (not YouTube or audio).
113
+ - **balanced** (default for YouTube videos and audio files): Balanced analysis approach using multiple modalities. Supports YouTube URLs and audio files.
109
114
 
110
- **YouTube URLs**: Automatically use the &#x27;balanced&#x27; strategy. The strategy field is ignored for YouTube URLs, and other strategies will be rejected with an error.
115
+ **YouTube URLs and Audio Files**: Automatically use the &#x27;balanced&#x27; strategy. The strategy field is ignored, and other strategies will be rejected with an error.
111
116
 
112
117
  **Chapter Count Parameters:**
113
118
 
114
119
  - **number_of_chapters**: Target number of chapters. If only this is provided, min_chapters and max_chapters are calculated automatically.
115
120
  - **min_chapters**: Minimum number of chapters. If provided with number_of_chapters and max, validates min is less than or equal to number_of_chapters which is less than or equal to max.
116
121
  - **max_chapters**: Maximum number of chapters. If provided with number_of_chapters and min, validates min is less than or equal to number_of_chapters which is less than or equal to max.
117
- - If none are provided, chapter counts are calculated automatically based on video duration.`,
122
+ - If none are provided, chapter counts are calculated automatically based on file duration.`,
118
123
  requestFormat: 'json',
119
124
  parameters: [
120
125
  {
@@ -60,6 +60,17 @@ export type File = {
60
60
  filename?: string | undefined;
61
61
  uri: string;
62
62
  metadata?: ({} | null) | undefined;
63
+ media_type?: ('video' | 'audio') | undefined;
64
+ media_info?: Partial<{
65
+ duration_seconds: number | null;
66
+ width: number | null;
67
+ height: number | null;
68
+ sample_rate: number | null;
69
+ channels: number | null;
70
+ bitrate: number | null;
71
+ format: string | null;
72
+ has_audio: boolean | null;
73
+ }> | undefined;
63
74
  video_info?: Partial<{
64
75
  duration_seconds: number | null;
65
76
  height: number | null;
@@ -68,7 +79,7 @@ export type File = {
68
79
  has_audio: boolean | null;
69
80
  }> | undefined;
70
81
  thumbnail_url?: string | undefined;
71
- source?: ('video' | 'youtube' | 's3' | 'dropbox' | 'http' | 'upload' | 'google-drive' | 'zoom' | 'gong' | 'recall') | undefined;
82
+ source?: ('video' | 'youtube' | 's3' | 'dropbox' | 'http' | 'upload' | 'google-drive' | 'zoom' | 'gong' | 'recall' | 'gcs') | undefined;
72
83
  };
73
84
  export type SearchFilter = Partial<{
74
85
  metadata: Array<SearchFilterCriteria & Partial<{
@@ -1294,6 +1305,35 @@ export declare const File: z.ZodObject<{
1294
1305
  filename: z.ZodOptional<z.ZodString>;
1295
1306
  uri: z.ZodString;
1296
1307
  metadata: z.ZodOptional<z.ZodNullable<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>;
1308
+ media_type: z.ZodOptional<z.ZodEnum<["video", "audio"]>>;
1309
+ media_info: z.ZodOptional<z.ZodObject<{
1310
+ duration_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1311
+ width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1312
+ height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1313
+ sample_rate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1314
+ channels: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1315
+ bitrate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1316
+ format: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1317
+ has_audio: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1318
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1319
+ duration_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1320
+ width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1321
+ height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1322
+ sample_rate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1323
+ channels: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1324
+ bitrate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1325
+ format: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1326
+ has_audio: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1327
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1328
+ duration_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1329
+ width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1330
+ height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1331
+ sample_rate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1332
+ channels: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1333
+ bitrate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1334
+ format: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1335
+ has_audio: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1336
+ }, z.ZodTypeAny, "passthrough">>>;
1297
1337
  video_info: z.ZodOptional<z.ZodObject<{
1298
1338
  duration_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1299
1339
  height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -1314,7 +1354,7 @@ export declare const File: z.ZodObject<{
1314
1354
  has_audio: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1315
1355
  }, z.ZodTypeAny, "passthrough">>>;
1316
1356
  thumbnail_url: z.ZodOptional<z.ZodString>;
1317
- source: z.ZodOptional<z.ZodEnum<["video", "youtube", "s3", "dropbox", "http", "upload", "google-drive", "zoom", "gong", "recall"]>>;
1357
+ source: z.ZodOptional<z.ZodEnum<["video", "youtube", "s3", "dropbox", "http", "upload", "google-drive", "zoom", "gong", "recall", "gcs"]>>;
1318
1358
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1319
1359
  id: z.ZodString;
1320
1360
  status: z.ZodEnum<["pending", "processing", "completed", "failed", "not_applicable"]>;
@@ -1323,6 +1363,35 @@ export declare const File: z.ZodObject<{
1323
1363
  filename: z.ZodOptional<z.ZodString>;
1324
1364
  uri: z.ZodString;
1325
1365
  metadata: z.ZodOptional<z.ZodNullable<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>;
1366
+ media_type: z.ZodOptional<z.ZodEnum<["video", "audio"]>>;
1367
+ media_info: z.ZodOptional<z.ZodObject<{
1368
+ duration_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1369
+ width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1370
+ height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1371
+ sample_rate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1372
+ channels: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1373
+ bitrate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1374
+ format: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1375
+ has_audio: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1376
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1377
+ duration_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1378
+ width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1379
+ height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1380
+ sample_rate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1381
+ channels: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1382
+ bitrate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1383
+ format: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1384
+ has_audio: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1385
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1386
+ duration_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1387
+ width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1388
+ height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1389
+ sample_rate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1390
+ channels: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1391
+ bitrate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1392
+ format: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1393
+ has_audio: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1394
+ }, z.ZodTypeAny, "passthrough">>>;
1326
1395
  video_info: z.ZodOptional<z.ZodObject<{
1327
1396
  duration_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1328
1397
  height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -1343,7 +1412,7 @@ export declare const File: z.ZodObject<{
1343
1412
  has_audio: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1344
1413
  }, z.ZodTypeAny, "passthrough">>>;
1345
1414
  thumbnail_url: z.ZodOptional<z.ZodString>;
1346
- source: z.ZodOptional<z.ZodEnum<["video", "youtube", "s3", "dropbox", "http", "upload", "google-drive", "zoom", "gong", "recall"]>>;
1415
+ source: z.ZodOptional<z.ZodEnum<["video", "youtube", "s3", "dropbox", "http", "upload", "google-drive", "zoom", "gong", "recall", "gcs"]>>;
1347
1416
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1348
1417
  id: z.ZodString;
1349
1418
  status: z.ZodEnum<["pending", "processing", "completed", "failed", "not_applicable"]>;
@@ -1352,6 +1421,35 @@ export declare const File: z.ZodObject<{
1352
1421
  filename: z.ZodOptional<z.ZodString>;
1353
1422
  uri: z.ZodString;
1354
1423
  metadata: z.ZodOptional<z.ZodNullable<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>;
1424
+ media_type: z.ZodOptional<z.ZodEnum<["video", "audio"]>>;
1425
+ media_info: z.ZodOptional<z.ZodObject<{
1426
+ duration_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1427
+ width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1428
+ height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1429
+ sample_rate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1430
+ channels: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1431
+ bitrate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1432
+ format: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1433
+ has_audio: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1434
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1435
+ duration_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1436
+ width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1437
+ height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1438
+ sample_rate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1439
+ channels: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1440
+ bitrate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1441
+ format: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1442
+ has_audio: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1443
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1444
+ duration_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1445
+ width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1446
+ height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1447
+ sample_rate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1448
+ channels: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1449
+ bitrate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1450
+ format: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1451
+ has_audio: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1452
+ }, z.ZodTypeAny, "passthrough">>>;
1355
1453
  video_info: z.ZodOptional<z.ZodObject<{
1356
1454
  duration_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1357
1455
  height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -1372,7 +1470,7 @@ export declare const File: z.ZodObject<{
1372
1470
  has_audio: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1373
1471
  }, z.ZodTypeAny, "passthrough">>>;
1374
1472
  thumbnail_url: z.ZodOptional<z.ZodString>;
1375
- source: z.ZodOptional<z.ZodEnum<["video", "youtube", "s3", "dropbox", "http", "upload", "google-drive", "zoom", "gong", "recall"]>>;
1473
+ source: z.ZodOptional<z.ZodEnum<["video", "youtube", "s3", "dropbox", "http", "upload", "google-drive", "zoom", "gong", "recall", "gcs"]>>;
1376
1474
  }, z.ZodTypeAny, "passthrough">>;
1377
1475
  export declare const Shot: z.ZodObject<{
1378
1476
  index: z.ZodNumber;
@@ -99,6 +99,22 @@ exports.File = zod_1.z
99
99
  filename: zod_1.z.string().optional(),
100
100
  uri: zod_1.z.string(),
101
101
  metadata: zod_1.z.object({}).partial().strict().passthrough().nullish(),
102
+ media_type: zod_1.z.enum(['video', 'audio']).optional(),
103
+ media_info: zod_1.z
104
+ .object({
105
+ duration_seconds: zod_1.z.number().nullable(),
106
+ width: zod_1.z.number().int().nullable(),
107
+ height: zod_1.z.number().int().nullable(),
108
+ sample_rate: zod_1.z.number().int().nullable(),
109
+ channels: zod_1.z.number().int().nullable(),
110
+ bitrate: zod_1.z.number().int().nullable(),
111
+ format: zod_1.z.string().nullable(),
112
+ has_audio: zod_1.z.boolean().nullable(),
113
+ })
114
+ .partial()
115
+ .strict()
116
+ .passthrough()
117
+ .optional(),
102
118
  video_info: zod_1.z
103
119
  .object({
104
120
  duration_seconds: zod_1.z.number().nullable(),
@@ -124,6 +140,7 @@ exports.File = zod_1.z
124
140
  'zoom',
125
141
  'gong',
126
142
  'recall',
143
+ 'gcs',
127
144
  ])
128
145
  .optional(),
129
146
  })
@@ -1,5 +1,5 @@
1
1
  import { CollectionsApi } from '../../generated';
2
- import { Filter, SegmentationConfig } from '../types';
2
+ import { Filter, Modalities } from '../types';
3
3
  import { ThumbnailsConfig } from '../../generated/common';
4
4
  import { WaitForReadyOptions } from '../types';
5
5
  import { schemas as collectionsSchemas } from '../../generated/Collections';
@@ -19,6 +19,7 @@ type AddedFilterParams = {
19
19
  type ListCollectionEntitiesParams = AddedFilterParams & OrderParams & PaginationParams;
20
20
  type ListCollectionMediaDescriptionsParams = {
21
21
  response_format?: 'json' | 'markdown';
22
+ modalities?: Modalities[];
22
23
  } & AddedFilterParams & OrderParams & PaginationParams;
23
24
  type ListCollectionParams = {
24
25
  collection_type?: 'entities' | 'rich-transcripts' | 'media-descriptions' | 'face-analysis';
@@ -44,6 +45,7 @@ export declare class EnhancedCollectionsApi {
44
45
  schema: {};
45
46
  enable_video_level_entities: boolean;
46
47
  enable_segment_level_entities: boolean;
48
+ enable_transcript_mode: boolean;
47
49
  }> | undefined;
48
50
  transcribe_config?: Partial<{
49
51
  enable_summary: boolean;
@@ -91,6 +93,7 @@ export declare class EnhancedCollectionsApi {
91
93
  schema: {};
92
94
  enable_video_level_entities: boolean;
93
95
  enable_segment_level_entities: boolean;
96
+ enable_transcript_mode: boolean;
94
97
  }> | undefined;
95
98
  transcribe_config?: Partial<{
96
99
  enable_summary: boolean;
@@ -134,6 +137,7 @@ export declare class EnhancedCollectionsApi {
134
137
  schema: {};
135
138
  enable_video_level_entities: boolean;
136
139
  enable_segment_level_entities: boolean;
140
+ enable_transcript_mode: boolean;
137
141
  }> | undefined;
138
142
  transcribe_config?: Partial<{
139
143
  enable_summary: boolean;
@@ -184,6 +188,7 @@ export declare class EnhancedCollectionsApi {
184
188
  schema: {};
185
189
  enable_video_level_entities: boolean;
186
190
  enable_segment_level_entities: boolean;
191
+ enable_transcript_mode: boolean;
187
192
  }> | undefined;
188
193
  transcribe_config?: Partial<{
189
194
  enable_summary: boolean;
@@ -216,15 +221,14 @@ export declare class EnhancedCollectionsApi {
216
221
  created_at: number;
217
222
  file_count: number;
218
223
  }>;
224
+ /**
225
+ *
226
+ * @deprecated Use addMediaByUrl instead
227
+ */
219
228
  addVideoByUrl({ collectionId, url, params, }: {
220
229
  collectionId: string;
221
230
  url: string;
222
- params: {
223
- segmentation_config?: SegmentationConfig;
224
- segmentation_id?: string;
225
- metadata?: Record<string, any>;
226
- thumbnail_config?: ThumbnailsConfig;
227
- };
231
+ params: z.infer<typeof collectionsSchemas.AddCollectionFile>;
228
232
  }): Promise<{
229
233
  collection_id: string;
230
234
  file_id: string;
@@ -239,11 +243,10 @@ export declare class EnhancedCollectionsApi {
239
243
  segmentation_config: import("../../generated/common").SegmentationConfig;
240
244
  } | undefined;
241
245
  }>;
242
- addVideo(collectionId: string, fileId: string, params?: {
243
- segmentation_config?: SegmentationConfig;
244
- segmentation_id?: string;
245
- metadata?: Record<string, any>;
246
- thumbnail_config?: ThumbnailsConfig;
246
+ addMediaByUrl({ collectionId, url, params, }: {
247
+ collectionId: string;
248
+ url: string;
249
+ params: z.infer<typeof collectionsSchemas.AddCollectionFile>;
247
250
  }): Promise<{
248
251
  collection_id: string;
249
252
  file_id: string;
@@ -258,6 +261,37 @@ export declare class EnhancedCollectionsApi {
258
261
  segmentation_config: import("../../generated/common").SegmentationConfig;
259
262
  } | undefined;
260
263
  }>;
264
+ /**
265
+ * @deprecated Use addMedia instead
266
+ */
267
+ addVideo(collectionId: string, fileId: string, params: z.infer<typeof collectionsSchemas.AddCollectionFile>): Promise<{
268
+ collection_id: string;
269
+ file_id: string;
270
+ object: "collection_file";
271
+ added_at: number;
272
+ status: "pending" | "processing" | "completed" | "failed" | "not_applicable";
273
+ file?: import("../types").File | undefined;
274
+ segmentation?: {
275
+ id: string;
276
+ status: "pending" | "processing" | "completed" | "failed" | "not_applicable";
277
+ file_id: string;
278
+ segmentation_config: import("../../generated/common").SegmentationConfig;
279
+ } | undefined;
280
+ }>;
281
+ addMedia(collectionId: string, fileId: string, params: z.infer<typeof collectionsSchemas.AddCollectionFile>): Promise<{
282
+ collection_id: string;
283
+ file_id: string;
284
+ object: "collection_file";
285
+ added_at: number;
286
+ status: "pending" | "processing" | "completed" | "failed" | "not_applicable";
287
+ file?: import("../types").File | undefined;
288
+ segmentation?: {
289
+ id: string;
290
+ status: "pending" | "processing" | "completed" | "failed" | "not_applicable";
291
+ file_id: string;
292
+ segmentation_config: import("../../generated/common").SegmentationConfig;
293
+ } | undefined;
294
+ }>;
261
295
  listVideos(collectionId: string, params?: ListCollectionVideosParams): Promise<{
262
296
  object: "list";
263
297
  data: Array<{
@@ -327,6 +361,7 @@ export declare class EnhancedCollectionsApi {
327
361
  response_format?: 'markdown' | 'json';
328
362
  start_time_seconds?: number;
329
363
  end_time_seconds?: number;
364
+ modalities?: Modalities[];
330
365
  }): Promise<{
331
366
  collection_id: string;
332
367
  file_id: string;
@@ -27,11 +27,24 @@ class EnhancedCollectionsApi {
27
27
  params: { collection_id: collectionId },
28
28
  });
29
29
  }
30
+ /**
31
+ *
32
+ * @deprecated Use addMediaByUrl instead
33
+ */
30
34
  async addVideoByUrl({ collectionId, url, params, }) {
31
- return this.api.addVideo({ url, ...params }, { params: { collection_id: collectionId, ...params } });
35
+ return this.api.addMedia({ url, ...params }, { params: { collection_id: collectionId, ...params } });
36
+ }
37
+ async addMediaByUrl({ collectionId, url, params, }) {
38
+ return this.api.addMedia({ url, ...params }, { params: { collection_id: collectionId, ...params } });
39
+ }
40
+ /**
41
+ * @deprecated Use addMedia instead
42
+ */
43
+ async addVideo(collectionId, fileId, params) {
44
+ return this.api.addMedia({ file_id: fileId, ...params }, { params: { collection_id: collectionId, ...params } });
32
45
  }
33
- async addVideo(collectionId, fileId, params = {}) {
34
- return this.api.addVideo({ file_id: fileId, ...params }, { params: { collection_id: collectionId, ...params } });
46
+ async addMedia(collectionId, fileId, params) {
47
+ return this.api.addMedia({ file_id: fileId, ...params }, { params: { collection_id: collectionId, ...params } });
35
48
  }
36
49
  async listVideos(collectionId, params = {}) {
37
50
  const { filter, ...otherParams } = params;
@@ -1,5 +1,5 @@
1
1
  import { DescribeApi } from '../../generated';
2
- import { SegmentationConfig } from '../types';
2
+ import { Modalities, SegmentationConfig } from '../types';
3
3
  import { ThumbnailsConfig } from '../../generated/common';
4
4
  import { WaitForReadyOptions } from '../types';
5
5
  export declare class EnhancedDescribeApi {
@@ -44,6 +44,7 @@ export declare class EnhancedDescribeApi {
44
44
  response_format?: 'json' | 'markdown';
45
45
  start_time_seconds?: number;
46
46
  end_time_seconds?: number;
47
+ modalities?: Modalities[];
47
48
  }): Promise<{
48
49
  job_id: string;
49
50
  status: "pending" | "processing" | "completed" | "failed" | "not_applicable";
@@ -79,6 +80,7 @@ export declare class EnhancedDescribeApi {
79
80
  url?: string;
80
81
  response_format?: 'json' | 'markdown';
81
82
  include_data?: boolean;
83
+ modalities?: Modalities[];
82
84
  }): Promise<{
83
85
  object: "list";
84
86
  data: Array<{
@@ -1,18 +1,11 @@
1
1
  import { ExtractApi } from '../../generated';
2
- import { ThumbnailsConfig } from '../../generated/common';
3
- import { SegmentationConfig, WaitForReadyOptions } from '../types';
2
+ import { WaitForReadyOptions } from '../types';
3
+ import { schemas } from '../../generated/Extract';
4
+ import z from 'zod';
4
5
  export declare class EnhancedExtractApi {
5
6
  private readonly api;
6
7
  constructor(api: typeof ExtractApi);
7
- createExtract(url: string, options?: {
8
- prompt?: string;
9
- schema?: Record<string, any>;
10
- enable_video_level_entities?: boolean;
11
- enable_segment_level_entities?: boolean;
12
- segmentation_config?: SegmentationConfig;
13
- segmentation_id?: string;
14
- thumbnail_config?: ThumbnailsConfig;
15
- }): Promise<{
8
+ createExtract(url: string, options?: z.infer<typeof schemas.NewExtract>): Promise<{
16
9
  job_id: string;
17
10
  status: "pending" | "processing" | "completed" | "failed" | "not_applicable";
18
11
  url?: string | undefined;
@@ -22,6 +15,7 @@ export declare class EnhancedExtractApi {
22
15
  schema: {};
23
16
  enable_video_level_entities: boolean;
24
17
  enable_segment_level_entities: boolean;
18
+ enable_transcript_mode: boolean;
25
19
  }> | undefined;
26
20
  segmentation_id?: string | undefined;
27
21
  data?: Partial<{
@@ -50,6 +44,7 @@ export declare class EnhancedExtractApi {
50
44
  schema: {};
51
45
  enable_video_level_entities: boolean;
52
46
  enable_segment_level_entities: boolean;
47
+ enable_transcript_mode: boolean;
53
48
  }> | undefined;
54
49
  segmentation_id?: string | undefined;
55
50
  data?: Partial<{
@@ -85,6 +80,7 @@ export declare class EnhancedExtractApi {
85
80
  schema: {};
86
81
  enable_video_level_entities: boolean;
87
82
  enable_segment_level_entities: boolean;
83
+ enable_transcript_mode: boolean;
88
84
  }> | undefined;
89
85
  segmentation_id?: string | undefined;
90
86
  data?: Partial<{
@@ -104,9 +100,9 @@ export declare class EnhancedExtractApi {
104
100
  limit: number;
105
101
  offset: number;
106
102
  }>;
107
- deleteExtract(jobId: string): Promise<import("zod").objectOutputType<{
108
- id: import("zod").ZodString;
109
- }, import("zod").ZodTypeAny, "passthrough">>;
103
+ deleteExtract(jobId: string): Promise<z.objectOutputType<{
104
+ id: z.ZodString;
105
+ }, z.ZodTypeAny, "passthrough">>;
110
106
  /**
111
107
  * Waits for an extraction job to be ready by polling the getExtract endpoint until
112
108
  * the job reaches a terminal state (completed, failed, or not_applicable) or until maxAttempts is reached.
@@ -126,6 +122,7 @@ export declare class EnhancedExtractApi {
126
122
  schema: {};
127
123
  enable_video_level_entities: boolean;
128
124
  enable_segment_level_entities: boolean;
125
+ enable_transcript_mode: boolean;
129
126
  }> | undefined;
130
127
  segmentation_id?: string | undefined;
131
128
  data?: Partial<{