@aviaryhq/cloudglue-js 0.5.8 → 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;
@@ -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>>;
@@ -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>>;
@@ -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>>;
@@ -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(),
@@ -1,5 +1,5 @@
1
1
  import { CollectionsApi } from '../../generated';
2
- import { Filter, Modalities, 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';
@@ -45,6 +45,7 @@ export declare class EnhancedCollectionsApi {
45
45
  schema: {};
46
46
  enable_video_level_entities: boolean;
47
47
  enable_segment_level_entities: boolean;
48
+ enable_transcript_mode: boolean;
48
49
  }> | undefined;
49
50
  transcribe_config?: Partial<{
50
51
  enable_summary: boolean;
@@ -92,6 +93,7 @@ export declare class EnhancedCollectionsApi {
92
93
  schema: {};
93
94
  enable_video_level_entities: boolean;
94
95
  enable_segment_level_entities: boolean;
96
+ enable_transcript_mode: boolean;
95
97
  }> | undefined;
96
98
  transcribe_config?: Partial<{
97
99
  enable_summary: boolean;
@@ -135,6 +137,7 @@ export declare class EnhancedCollectionsApi {
135
137
  schema: {};
136
138
  enable_video_level_entities: boolean;
137
139
  enable_segment_level_entities: boolean;
140
+ enable_transcript_mode: boolean;
138
141
  }> | undefined;
139
142
  transcribe_config?: Partial<{
140
143
  enable_summary: boolean;
@@ -185,6 +188,7 @@ export declare class EnhancedCollectionsApi {
185
188
  schema: {};
186
189
  enable_video_level_entities: boolean;
187
190
  enable_segment_level_entities: boolean;
191
+ enable_transcript_mode: boolean;
188
192
  }> | undefined;
189
193
  transcribe_config?: Partial<{
190
194
  enable_summary: boolean;
@@ -217,15 +221,14 @@ export declare class EnhancedCollectionsApi {
217
221
  created_at: number;
218
222
  file_count: number;
219
223
  }>;
224
+ /**
225
+ *
226
+ * @deprecated Use addMediaByUrl instead
227
+ */
220
228
  addVideoByUrl({ collectionId, url, params, }: {
221
229
  collectionId: string;
222
230
  url: string;
223
- params: {
224
- segmentation_config?: SegmentationConfig;
225
- segmentation_id?: string;
226
- metadata?: Record<string, any>;
227
- thumbnail_config?: ThumbnailsConfig;
228
- };
231
+ params: z.infer<typeof collectionsSchemas.AddCollectionFile>;
229
232
  }): Promise<{
230
233
  collection_id: string;
231
234
  file_id: string;
@@ -240,11 +243,10 @@ export declare class EnhancedCollectionsApi {
240
243
  segmentation_config: import("../../generated/common").SegmentationConfig;
241
244
  } | undefined;
242
245
  }>;
243
- addVideo(collectionId: string, fileId: string, params?: {
244
- segmentation_config?: SegmentationConfig;
245
- segmentation_id?: string;
246
- metadata?: Record<string, any>;
247
- thumbnail_config?: ThumbnailsConfig;
246
+ addMediaByUrl({ collectionId, url, params, }: {
247
+ collectionId: string;
248
+ url: string;
249
+ params: z.infer<typeof collectionsSchemas.AddCollectionFile>;
248
250
  }): Promise<{
249
251
  collection_id: string;
250
252
  file_id: string;
@@ -259,6 +261,37 @@ export declare class EnhancedCollectionsApi {
259
261
  segmentation_config: import("../../generated/common").SegmentationConfig;
260
262
  } | undefined;
261
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
+ }>;
262
295
  listVideos(collectionId: string, params?: ListCollectionVideosParams): Promise<{
263
296
  object: "list";
264
297
  data: Array<{
@@ -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,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<{
@@ -27,6 +27,35 @@ export declare class EnhancedFilesApi {
27
27
  filename: import("zod").ZodOptional<import("zod").ZodString>;
28
28
  uri: import("zod").ZodString;
29
29
  metadata: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>>;
30
+ media_type: import("zod").ZodOptional<import("zod").ZodEnum<["video", "audio"]>>;
31
+ media_info: import("zod").ZodOptional<import("zod").ZodObject<{
32
+ duration_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
33
+ width: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
34
+ height: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
35
+ sample_rate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
36
+ channels: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
37
+ bitrate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
38
+ format: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
39
+ has_audio: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBoolean>>;
40
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
41
+ duration_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
42
+ width: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
43
+ height: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
44
+ sample_rate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
45
+ channels: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
46
+ bitrate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
47
+ format: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
48
+ has_audio: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBoolean>>;
49
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
50
+ duration_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
51
+ width: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
52
+ height: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
53
+ sample_rate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
54
+ channels: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
55
+ bitrate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
56
+ format: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
57
+ has_audio: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBoolean>>;
58
+ }, import("zod").ZodTypeAny, "passthrough">>>;
30
59
  video_info: import("zod").ZodOptional<import("zod").ZodObject<{
31
60
  duration_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
32
61
  height: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
@@ -61,6 +90,35 @@ export declare class EnhancedFilesApi {
61
90
  filename: import("zod").ZodOptional<import("zod").ZodString>;
62
91
  uri: import("zod").ZodString;
63
92
  metadata: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>>;
93
+ media_type: import("zod").ZodOptional<import("zod").ZodEnum<["video", "audio"]>>;
94
+ media_info: import("zod").ZodOptional<import("zod").ZodObject<{
95
+ duration_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
96
+ width: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
97
+ height: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
98
+ sample_rate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
99
+ channels: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
100
+ bitrate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
101
+ format: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
102
+ has_audio: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBoolean>>;
103
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
104
+ duration_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
105
+ width: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
106
+ height: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
107
+ sample_rate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
108
+ channels: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
109
+ bitrate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
110
+ format: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
111
+ has_audio: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBoolean>>;
112
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
113
+ duration_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
114
+ width: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
115
+ height: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
116
+ sample_rate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
117
+ channels: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
118
+ bitrate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
119
+ format: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
120
+ has_audio: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBoolean>>;
121
+ }, import("zod").ZodTypeAny, "passthrough">>>;
64
122
  video_info: import("zod").ZodOptional<import("zod").ZodObject<{
65
123
  duration_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
66
124
  height: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
@@ -699,6 +757,35 @@ export declare class EnhancedFilesApi {
699
757
  filename: import("zod").ZodOptional<import("zod").ZodString>;
700
758
  uri: import("zod").ZodString;
701
759
  metadata: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>>;
760
+ media_type: import("zod").ZodOptional<import("zod").ZodEnum<["video", "audio"]>>;
761
+ media_info: import("zod").ZodOptional<import("zod").ZodObject<{
762
+ duration_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
763
+ width: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
764
+ height: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
765
+ sample_rate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
766
+ channels: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
767
+ bitrate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
768
+ format: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
769
+ has_audio: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBoolean>>;
770
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
771
+ duration_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
772
+ width: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
773
+ height: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
774
+ sample_rate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
775
+ channels: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
776
+ bitrate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
777
+ format: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
778
+ has_audio: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBoolean>>;
779
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
780
+ duration_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
781
+ width: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
782
+ height: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
783
+ sample_rate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
784
+ channels: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
785
+ bitrate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
786
+ format: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
787
+ has_audio: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBoolean>>;
788
+ }, import("zod").ZodTypeAny, "passthrough">>>;
702
789
  video_info: import("zod").ZodOptional<import("zod").ZodObject<{
703
790
  duration_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
704
791
  height: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
@@ -48,7 +48,7 @@ class CloudGlue {
48
48
  headers: {
49
49
  Authorization: `Bearer ${this.apiKey}`,
50
50
  'x-sdk-client': 'cloudglue-js',
51
- 'x-sdk-version': '0.5.8',
51
+ 'x-sdk-version': '0.5.9',
52
52
  },
53
53
  baseURL: this.baseUrl,
54
54
  timeout: this.timeout,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aviaryhq/cloudglue-js",
3
- "version": "0.5.8",
3
+ "version": "0.5.9",
4
4
  "description": "Cloudglue API client for Node.js",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",