@aviaryhq/cloudglue-js 0.1.2 → 0.1.4

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.
@@ -1,10 +1,12 @@
1
1
  import { FilesApi, CollectionsApi, ChatApi, TranscribeApi, ExtractApi } from "../generated";
2
- import type { File, UpdateFileParams } from "./types";
2
+ import type { File, SegmentationConfig, UpdateFileParams } from "./types";
3
+ import { SegmentationsApi } from "../generated/Segmentations";
3
4
  export declare class CloudGlueError extends Error {
4
5
  readonly statusCode?: number | undefined;
5
6
  readonly data?: string | undefined;
6
7
  readonly headers?: Record<string, any> | undefined;
7
- constructor(message: string, statusCode?: number | undefined, data?: string | undefined, headers?: Record<string, any> | undefined);
8
+ readonly responseData?: any | undefined;
9
+ constructor(message: string, statusCode?: number | undefined, data?: string | undefined, headers?: Record<string, any> | undefined, responseData?: any | undefined);
8
10
  }
9
11
  /**
10
12
  * Configuration options for initializing the CloudGlue client
@@ -18,7 +20,7 @@ export interface CloudGlueConfig {
18
20
  timeout?: number;
19
21
  }
20
22
  interface ListFilesParams {
21
- status?: "pending" | "processing" | "ready" | "completed" | "failed" | "not_applicable";
23
+ status?: "pending" | "processing" | "completed" | "failed" | "not_applicable";
22
24
  limit?: number;
23
25
  offset?: number;
24
26
  order?: "created_at" | "filename";
@@ -53,11 +55,12 @@ interface CreateCollectionParams {
53
55
  enable_scene_text?: boolean;
54
56
  enable_visual_scene_description?: boolean;
55
57
  };
58
+ default_segmentation_config?: SegmentationConfig;
56
59
  }
57
60
  interface ListCollectionVideosParams {
58
61
  limit?: number;
59
62
  offset?: number;
60
- status?: "pending" | "processing" | "ready" | "completed" | "failed" | "not_applicable";
63
+ status?: "pending" | "processing" | "completed" | "failed" | "not_applicable";
61
64
  order?: "added_at" | "filename";
62
65
  sort?: "asc" | "desc";
63
66
  added_before?: string;
@@ -191,6 +194,169 @@ declare class EnhancedFilesApi {
191
194
  has_audio: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodNull]>>;
192
195
  }, import("zod").ZodTypeAny, "passthrough">>>;
193
196
  }, import("zod").ZodTypeAny, "passthrough">>;
197
+ listFileSegmentations(fileId: string, params?: {
198
+ limit?: number;
199
+ offset?: number;
200
+ }): Promise<{
201
+ object: "list";
202
+ data: Array<import("../generated/common").Segmentation>;
203
+ total: number;
204
+ limit: number;
205
+ offset: number;
206
+ }>;
207
+ createFileSegmentation(fileId: string, params: SegmentationConfig): Promise<import("zod").objectOutputType<{
208
+ segmentation_id: import("zod").ZodString;
209
+ status: import("zod").ZodEnum<["pending", "processing", "completed", "failed", "not_applicable"]>;
210
+ created_at: import("zod").ZodNumber;
211
+ file_id: import("zod").ZodString;
212
+ segmentation_config: import("zod").ZodObject<{
213
+ strategy: import("zod").ZodEnum<["uniform", "shot-detector"]>;
214
+ uniform_config: import("zod").ZodOptional<import("zod").ZodObject<{
215
+ window_seconds: import("zod").ZodNumber;
216
+ hop_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
217
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
218
+ window_seconds: import("zod").ZodNumber;
219
+ hop_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
220
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
221
+ window_seconds: import("zod").ZodNumber;
222
+ hop_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
223
+ }, import("zod").ZodTypeAny, "passthrough">>>;
224
+ shot_detector_config: import("zod").ZodOptional<import("zod").ZodObject<{
225
+ threshold: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
226
+ min_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
227
+ max_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
228
+ detector: import("zod").ZodEnum<["adaptive", "content"]>;
229
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
230
+ threshold: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
231
+ min_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
232
+ max_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
233
+ detector: import("zod").ZodEnum<["adaptive", "content"]>;
234
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
235
+ threshold: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
236
+ min_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
237
+ max_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
238
+ detector: import("zod").ZodEnum<["adaptive", "content"]>;
239
+ }, import("zod").ZodTypeAny, "passthrough">>>;
240
+ start_time_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
241
+ end_time_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
242
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
243
+ strategy: import("zod").ZodEnum<["uniform", "shot-detector"]>;
244
+ uniform_config: import("zod").ZodOptional<import("zod").ZodObject<{
245
+ window_seconds: import("zod").ZodNumber;
246
+ hop_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
247
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
248
+ window_seconds: import("zod").ZodNumber;
249
+ hop_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
250
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
251
+ window_seconds: import("zod").ZodNumber;
252
+ hop_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
253
+ }, import("zod").ZodTypeAny, "passthrough">>>;
254
+ shot_detector_config: import("zod").ZodOptional<import("zod").ZodObject<{
255
+ threshold: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
256
+ min_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
257
+ max_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
258
+ detector: import("zod").ZodEnum<["adaptive", "content"]>;
259
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
260
+ threshold: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
261
+ min_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
262
+ max_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
263
+ detector: import("zod").ZodEnum<["adaptive", "content"]>;
264
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
265
+ threshold: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
266
+ min_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
267
+ max_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
268
+ detector: import("zod").ZodEnum<["adaptive", "content"]>;
269
+ }, import("zod").ZodTypeAny, "passthrough">>>;
270
+ start_time_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
271
+ end_time_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
272
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
273
+ strategy: import("zod").ZodEnum<["uniform", "shot-detector"]>;
274
+ uniform_config: import("zod").ZodOptional<import("zod").ZodObject<{
275
+ window_seconds: import("zod").ZodNumber;
276
+ hop_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
277
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
278
+ window_seconds: import("zod").ZodNumber;
279
+ hop_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
280
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
281
+ window_seconds: import("zod").ZodNumber;
282
+ hop_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
283
+ }, import("zod").ZodTypeAny, "passthrough">>>;
284
+ shot_detector_config: import("zod").ZodOptional<import("zod").ZodObject<{
285
+ threshold: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
286
+ min_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
287
+ max_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
288
+ detector: import("zod").ZodEnum<["adaptive", "content"]>;
289
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
290
+ threshold: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
291
+ min_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
292
+ max_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
293
+ detector: import("zod").ZodEnum<["adaptive", "content"]>;
294
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
295
+ threshold: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
296
+ min_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
297
+ max_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
298
+ detector: import("zod").ZodEnum<["adaptive", "content"]>;
299
+ }, import("zod").ZodTypeAny, "passthrough">>>;
300
+ start_time_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
301
+ end_time_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
302
+ }, import("zod").ZodTypeAny, "passthrough">>;
303
+ total_segments: import("zod").ZodOptional<import("zod").ZodNumber>;
304
+ data: import("zod").ZodOptional<import("zod").ZodObject<{
305
+ object: import("zod").ZodLiteral<"list">;
306
+ segments: import("zod").ZodArray<import("zod").ZodObject<{
307
+ id: import("zod").ZodString;
308
+ start_time: import("zod").ZodNumber;
309
+ end_time: import("zod").ZodNumber;
310
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
311
+ id: import("zod").ZodString;
312
+ start_time: import("zod").ZodNumber;
313
+ end_time: import("zod").ZodNumber;
314
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
315
+ id: import("zod").ZodString;
316
+ start_time: import("zod").ZodNumber;
317
+ end_time: import("zod").ZodNumber;
318
+ }, import("zod").ZodTypeAny, "passthrough">>, "many">;
319
+ total: import("zod").ZodNumber;
320
+ limit: import("zod").ZodNumber;
321
+ offset: import("zod").ZodNumber;
322
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
323
+ object: import("zod").ZodLiteral<"list">;
324
+ segments: import("zod").ZodArray<import("zod").ZodObject<{
325
+ id: import("zod").ZodString;
326
+ start_time: import("zod").ZodNumber;
327
+ end_time: import("zod").ZodNumber;
328
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
329
+ id: import("zod").ZodString;
330
+ start_time: import("zod").ZodNumber;
331
+ end_time: import("zod").ZodNumber;
332
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
333
+ id: import("zod").ZodString;
334
+ start_time: import("zod").ZodNumber;
335
+ end_time: import("zod").ZodNumber;
336
+ }, import("zod").ZodTypeAny, "passthrough">>, "many">;
337
+ total: import("zod").ZodNumber;
338
+ limit: import("zod").ZodNumber;
339
+ offset: import("zod").ZodNumber;
340
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
341
+ object: import("zod").ZodLiteral<"list">;
342
+ segments: import("zod").ZodArray<import("zod").ZodObject<{
343
+ id: import("zod").ZodString;
344
+ start_time: import("zod").ZodNumber;
345
+ end_time: import("zod").ZodNumber;
346
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
347
+ id: import("zod").ZodString;
348
+ start_time: import("zod").ZodNumber;
349
+ end_time: import("zod").ZodNumber;
350
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
351
+ id: import("zod").ZodString;
352
+ start_time: import("zod").ZodNumber;
353
+ end_time: import("zod").ZodNumber;
354
+ }, import("zod").ZodTypeAny, "passthrough">>, "many">;
355
+ total: import("zod").ZodNumber;
356
+ limit: import("zod").ZodNumber;
357
+ offset: import("zod").ZodNumber;
358
+ }, import("zod").ZodTypeAny, "passthrough">>>;
359
+ }, import("zod").ZodTypeAny, "passthrough">>;
194
360
  /**
195
361
  * Waits for a file to finish processing by polling the getFile endpoint until the file
196
362
  * reaches a terminal state (completed, failed, or not_applicable) or until maxAttempts is reached.
@@ -252,6 +418,7 @@ declare class EnhancedCollectionsApi {
252
418
  enable_scene_text: boolean;
253
419
  enable_visual_scene_description: boolean;
254
420
  }> | undefined;
421
+ default_segmentation_config?: import("../generated/common").SegmentationConfig | undefined;
255
422
  created_at: number;
256
423
  file_count: number;
257
424
  }>;
@@ -277,6 +444,7 @@ declare class EnhancedCollectionsApi {
277
444
  enable_scene_text: boolean;
278
445
  enable_visual_scene_description: boolean;
279
446
  }> | undefined;
447
+ default_segmentation_config?: import("../generated/common").SegmentationConfig | undefined;
280
448
  created_at: number;
281
449
  file_count: number;
282
450
  }>;
@@ -298,6 +466,7 @@ declare class EnhancedCollectionsApi {
298
466
  enable_scene_text: boolean;
299
467
  enable_visual_scene_description: boolean;
300
468
  }> | undefined;
469
+ default_segmentation_config?: import("../generated/common").SegmentationConfig | undefined;
301
470
  created_at: number;
302
471
  file_count: number;
303
472
  }>;
@@ -305,15 +474,43 @@ declare class EnhancedCollectionsApi {
305
474
  id: import("zod").ZodString;
306
475
  object: import("zod").ZodLiteral<"collection">;
307
476
  }, import("zod").ZodTypeAny, "passthrough">>;
308
- addVideo(collectionId: string, fileId: string): Promise<{
477
+ addVideoByUrl({ collectionId, url, params }: {
478
+ collectionId: string;
479
+ url: string;
480
+ params: {
481
+ segmentation_config?: SegmentationConfig;
482
+ metadata?: Record<string, any>;
483
+ };
484
+ }): Promise<{
309
485
  collection_id: string;
310
486
  file_id: string;
311
487
  object: "collection_file";
312
488
  added_at: number;
313
489
  status: "pending" | "processing" | "completed" | "failed" | "not_applicable";
314
- extract_status?: ("pending" | "processing" | "completed" | "failed" | "not_applicable") | undefined;
315
- searchable_status?: ("pending" | "processing" | "completed" | "failed" | "not_applicable") | undefined;
316
490
  file?: File | undefined;
491
+ segmentation?: {
492
+ id: string;
493
+ status: "pending" | "processing" | "completed" | "failed" | "not_applicable";
494
+ file_id: string;
495
+ segmentation_config: import("../generated/common").SegmentationConfig;
496
+ } | undefined;
497
+ }>;
498
+ addVideo(collectionId: string, fileId: string, params?: {
499
+ segmentation_config?: SegmentationConfig;
500
+ metadata?: Record<string, any>;
501
+ }): Promise<{
502
+ collection_id: string;
503
+ file_id: string;
504
+ object: "collection_file";
505
+ added_at: number;
506
+ status: "pending" | "processing" | "completed" | "failed" | "not_applicable";
507
+ file?: File | undefined;
508
+ segmentation?: {
509
+ id: string;
510
+ status: "pending" | "processing" | "completed" | "failed" | "not_applicable";
511
+ file_id: string;
512
+ segmentation_config: import("../generated/common").SegmentationConfig;
513
+ } | undefined;
317
514
  }>;
318
515
  listVideos(collectionId: string, params?: ListCollectionVideosParams): Promise<{
319
516
  object: "list";
@@ -323,9 +520,13 @@ declare class EnhancedCollectionsApi {
323
520
  object: "collection_file";
324
521
  added_at: number;
325
522
  status: "pending" | "processing" | "completed" | "failed" | "not_applicable";
326
- extract_status?: ("pending" | "processing" | "completed" | "failed" | "not_applicable") | undefined;
327
- searchable_status?: ("pending" | "processing" | "completed" | "failed" | "not_applicable") | undefined;
328
523
  file?: File | undefined;
524
+ segmentation?: {
525
+ id: string;
526
+ status: "pending" | "processing" | "completed" | "failed" | "not_applicable";
527
+ file_id: string;
528
+ segmentation_config: import("../generated/common").SegmentationConfig;
529
+ } | undefined;
329
530
  }>;
330
531
  total: number;
331
532
  limit: number;
@@ -337,9 +538,13 @@ declare class EnhancedCollectionsApi {
337
538
  object: "collection_file";
338
539
  added_at: number;
339
540
  status: "pending" | "processing" | "completed" | "failed" | "not_applicable";
340
- extract_status?: ("pending" | "processing" | "completed" | "failed" | "not_applicable") | undefined;
341
- searchable_status?: ("pending" | "processing" | "completed" | "failed" | "not_applicable") | undefined;
342
541
  file?: File | undefined;
542
+ segmentation?: {
543
+ id: string;
544
+ status: "pending" | "processing" | "completed" | "failed" | "not_applicable";
545
+ file_id: string;
546
+ segmentation_config: import("../generated/common").SegmentationConfig;
547
+ } | undefined;
343
548
  }>;
344
549
  deleteVideo(collectionId: string, fileId: string): Promise<import("zod").objectOutputType<{
345
550
  collection_id: import("zod").ZodString;
@@ -410,15 +615,25 @@ declare class EnhancedCollectionsApi {
410
615
  end_time: import("zod").ZodOptional<import("zod").ZodNumber>;
411
616
  }, import("zod").ZodTypeAny, "passthrough">>, "many">>;
412
617
  }, import("zod").ZodTypeAny, "passthrough">>;
413
- addYouTubeVideo(collectionId: string, url: string, metadata?: Record<string, any>): Promise<{
618
+ /**
619
+ * @deprecated Use addVideoByUrl instead
620
+ */
621
+ addYouTubeVideo(collectionId: string, url: string, params?: {
622
+ metadata?: Record<string, any>;
623
+ segmentation_config?: SegmentationConfig;
624
+ }): Promise<{
414
625
  collection_id: string;
415
626
  file_id: string;
416
627
  object: "collection_file";
417
628
  added_at: number;
418
629
  status: "pending" | "processing" | "completed" | "failed" | "not_applicable";
419
- extract_status?: ("pending" | "processing" | "completed" | "failed" | "not_applicable") | undefined;
420
- searchable_status?: ("pending" | "processing" | "completed" | "failed" | "not_applicable") | undefined;
421
630
  file?: File | undefined;
631
+ segmentation?: {
632
+ id: string;
633
+ status: "pending" | "processing" | "completed" | "failed" | "not_applicable";
634
+ file_id: string;
635
+ segmentation_config: import("../generated/common").SegmentationConfig;
636
+ } | undefined;
422
637
  }>;
423
638
  listEntities(collectionId: string, params?: ListCollectionEntitiesParams): Promise<import("zod").objectOutputType<{
424
639
  object: import("zod").ZodLiteral<"list">;
@@ -990,9 +1205,13 @@ declare class EnhancedCollectionsApi {
990
1205
  object: "collection_file";
991
1206
  added_at: number;
992
1207
  status: "pending" | "processing" | "completed" | "failed" | "not_applicable";
993
- extract_status?: ("pending" | "processing" | "completed" | "failed" | "not_applicable") | undefined;
994
- searchable_status?: ("pending" | "processing" | "completed" | "failed" | "not_applicable") | undefined;
995
1208
  file?: File | undefined;
1209
+ segmentation?: {
1210
+ id: string;
1211
+ status: "pending" | "processing" | "completed" | "failed" | "not_applicable";
1212
+ file_id: string;
1213
+ segmentation_config: import("../generated/common").SegmentationConfig;
1214
+ } | undefined;
996
1215
  }>;
997
1216
  }
998
1217
  declare class EnhancedChatApi {
@@ -1054,13 +1273,14 @@ declare class EnhancedTranscribeApi {
1054
1273
  enable_speech?: boolean;
1055
1274
  enable_scene_text?: boolean;
1056
1275
  enable_visual_scene_description?: boolean;
1276
+ segmentation_config?: SegmentationConfig;
1057
1277
  }): Promise<{
1058
1278
  job_id: string;
1059
1279
  status: "pending" | "processing" | "completed" | "failed" | "not_applicable";
1060
1280
  url?: string | undefined;
1061
1281
  created_at?: number | undefined;
1062
1282
  transcribe_config?: Partial<{
1063
- "enable_summary ": boolean;
1283
+ enable_summary: boolean;
1064
1284
  enable_speech: boolean;
1065
1285
  enable_visual_scene_description: boolean;
1066
1286
  enable_scene_text: boolean;
@@ -1095,7 +1315,7 @@ declare class EnhancedTranscribeApi {
1095
1315
  url?: string | undefined;
1096
1316
  created_at?: number | undefined;
1097
1317
  transcribe_config?: Partial<{
1098
- "enable_summary ": boolean;
1318
+ enable_summary: boolean;
1099
1319
  enable_speech: boolean;
1100
1320
  enable_visual_scene_description: boolean;
1101
1321
  enable_scene_text: boolean;
@@ -1138,7 +1358,7 @@ declare class EnhancedTranscribeApi {
1138
1358
  url?: string | undefined;
1139
1359
  created_at?: number | undefined;
1140
1360
  transcribe_config?: Partial<{
1141
- "enable_summary ": boolean;
1361
+ enable_summary: boolean;
1142
1362
  enable_speech: boolean;
1143
1363
  enable_visual_scene_description: boolean;
1144
1364
  enable_scene_text: boolean;
@@ -1185,7 +1405,7 @@ declare class EnhancedTranscribeApi {
1185
1405
  url?: string | undefined;
1186
1406
  created_at?: number | undefined;
1187
1407
  transcribe_config?: Partial<{
1188
- "enable_summary ": boolean;
1408
+ enable_summary: boolean;
1189
1409
  enable_speech: boolean;
1190
1410
  enable_visual_scene_description: boolean;
1191
1411
  enable_scene_text: boolean;
@@ -1221,6 +1441,7 @@ declare class EnhancedExtractApi {
1221
1441
  schema?: Record<string, any>;
1222
1442
  enable_video_level_entities?: boolean;
1223
1443
  enable_segment_level_entities?: boolean;
1444
+ segmentation_config?: SegmentationConfig;
1224
1445
  }): Promise<{
1225
1446
  job_id: string;
1226
1447
  status: "pending" | "processing" | "completed" | "failed" | "not_applicable";
@@ -1328,6 +1549,169 @@ declare class EnhancedExtractApi {
1328
1549
  error?: string | undefined;
1329
1550
  }>;
1330
1551
  }
1552
+ declare class EnhancedSegmentationsApi {
1553
+ private readonly api;
1554
+ constructor(api: typeof SegmentationsApi);
1555
+ getSegmentation(segmentationId: string, params?: {
1556
+ limit?: number;
1557
+ offset?: number;
1558
+ }): Promise<import("zod").objectOutputType<{
1559
+ segmentation_id: import("zod").ZodString;
1560
+ status: import("zod").ZodEnum<["pending", "processing", "completed", "failed", "not_applicable"]>;
1561
+ created_at: import("zod").ZodNumber;
1562
+ file_id: import("zod").ZodString;
1563
+ segmentation_config: import("zod").ZodObject<{
1564
+ strategy: import("zod").ZodEnum<["uniform", "shot-detector"]>;
1565
+ uniform_config: import("zod").ZodOptional<import("zod").ZodObject<{
1566
+ window_seconds: import("zod").ZodNumber;
1567
+ hop_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
1568
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
1569
+ window_seconds: import("zod").ZodNumber;
1570
+ hop_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
1571
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
1572
+ window_seconds: import("zod").ZodNumber;
1573
+ hop_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
1574
+ }, import("zod").ZodTypeAny, "passthrough">>>;
1575
+ shot_detector_config: import("zod").ZodOptional<import("zod").ZodObject<{
1576
+ threshold: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
1577
+ min_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
1578
+ max_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
1579
+ detector: import("zod").ZodEnum<["adaptive", "content"]>;
1580
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
1581
+ threshold: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
1582
+ min_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
1583
+ max_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
1584
+ detector: import("zod").ZodEnum<["adaptive", "content"]>;
1585
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
1586
+ threshold: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
1587
+ min_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
1588
+ max_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
1589
+ detector: import("zod").ZodEnum<["adaptive", "content"]>;
1590
+ }, import("zod").ZodTypeAny, "passthrough">>>;
1591
+ start_time_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
1592
+ end_time_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
1593
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
1594
+ strategy: import("zod").ZodEnum<["uniform", "shot-detector"]>;
1595
+ uniform_config: import("zod").ZodOptional<import("zod").ZodObject<{
1596
+ window_seconds: import("zod").ZodNumber;
1597
+ hop_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
1598
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
1599
+ window_seconds: import("zod").ZodNumber;
1600
+ hop_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
1601
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
1602
+ window_seconds: import("zod").ZodNumber;
1603
+ hop_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
1604
+ }, import("zod").ZodTypeAny, "passthrough">>>;
1605
+ shot_detector_config: import("zod").ZodOptional<import("zod").ZodObject<{
1606
+ threshold: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
1607
+ min_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
1608
+ max_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
1609
+ detector: import("zod").ZodEnum<["adaptive", "content"]>;
1610
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
1611
+ threshold: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
1612
+ min_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
1613
+ max_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
1614
+ detector: import("zod").ZodEnum<["adaptive", "content"]>;
1615
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
1616
+ threshold: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
1617
+ min_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
1618
+ max_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
1619
+ detector: import("zod").ZodEnum<["adaptive", "content"]>;
1620
+ }, import("zod").ZodTypeAny, "passthrough">>>;
1621
+ start_time_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
1622
+ end_time_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
1623
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
1624
+ strategy: import("zod").ZodEnum<["uniform", "shot-detector"]>;
1625
+ uniform_config: import("zod").ZodOptional<import("zod").ZodObject<{
1626
+ window_seconds: import("zod").ZodNumber;
1627
+ hop_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
1628
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
1629
+ window_seconds: import("zod").ZodNumber;
1630
+ hop_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
1631
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
1632
+ window_seconds: import("zod").ZodNumber;
1633
+ hop_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
1634
+ }, import("zod").ZodTypeAny, "passthrough">>>;
1635
+ shot_detector_config: import("zod").ZodOptional<import("zod").ZodObject<{
1636
+ threshold: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
1637
+ min_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
1638
+ max_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
1639
+ detector: import("zod").ZodEnum<["adaptive", "content"]>;
1640
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
1641
+ threshold: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
1642
+ min_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
1643
+ max_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
1644
+ detector: import("zod").ZodEnum<["adaptive", "content"]>;
1645
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
1646
+ threshold: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
1647
+ min_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
1648
+ max_seconds: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
1649
+ detector: import("zod").ZodEnum<["adaptive", "content"]>;
1650
+ }, import("zod").ZodTypeAny, "passthrough">>>;
1651
+ start_time_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
1652
+ end_time_seconds: import("zod").ZodOptional<import("zod").ZodNumber>;
1653
+ }, import("zod").ZodTypeAny, "passthrough">>;
1654
+ total_segments: import("zod").ZodOptional<import("zod").ZodNumber>;
1655
+ data: import("zod").ZodOptional<import("zod").ZodObject<{
1656
+ object: import("zod").ZodLiteral<"list">;
1657
+ segments: import("zod").ZodArray<import("zod").ZodObject<{
1658
+ id: import("zod").ZodString;
1659
+ start_time: import("zod").ZodNumber;
1660
+ end_time: import("zod").ZodNumber;
1661
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
1662
+ id: import("zod").ZodString;
1663
+ start_time: import("zod").ZodNumber;
1664
+ end_time: import("zod").ZodNumber;
1665
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
1666
+ id: import("zod").ZodString;
1667
+ start_time: import("zod").ZodNumber;
1668
+ end_time: import("zod").ZodNumber;
1669
+ }, import("zod").ZodTypeAny, "passthrough">>, "many">;
1670
+ total: import("zod").ZodNumber;
1671
+ limit: import("zod").ZodNumber;
1672
+ offset: import("zod").ZodNumber;
1673
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
1674
+ object: import("zod").ZodLiteral<"list">;
1675
+ segments: import("zod").ZodArray<import("zod").ZodObject<{
1676
+ id: import("zod").ZodString;
1677
+ start_time: import("zod").ZodNumber;
1678
+ end_time: import("zod").ZodNumber;
1679
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
1680
+ id: import("zod").ZodString;
1681
+ start_time: import("zod").ZodNumber;
1682
+ end_time: import("zod").ZodNumber;
1683
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
1684
+ id: import("zod").ZodString;
1685
+ start_time: import("zod").ZodNumber;
1686
+ end_time: import("zod").ZodNumber;
1687
+ }, import("zod").ZodTypeAny, "passthrough">>, "many">;
1688
+ total: import("zod").ZodNumber;
1689
+ limit: import("zod").ZodNumber;
1690
+ offset: import("zod").ZodNumber;
1691
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
1692
+ object: import("zod").ZodLiteral<"list">;
1693
+ segments: import("zod").ZodArray<import("zod").ZodObject<{
1694
+ id: import("zod").ZodString;
1695
+ start_time: import("zod").ZodNumber;
1696
+ end_time: import("zod").ZodNumber;
1697
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
1698
+ id: import("zod").ZodString;
1699
+ start_time: import("zod").ZodNumber;
1700
+ end_time: import("zod").ZodNumber;
1701
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
1702
+ id: import("zod").ZodString;
1703
+ start_time: import("zod").ZodNumber;
1704
+ end_time: import("zod").ZodNumber;
1705
+ }, import("zod").ZodTypeAny, "passthrough">>, "many">;
1706
+ total: import("zod").ZodNumber;
1707
+ limit: import("zod").ZodNumber;
1708
+ offset: import("zod").ZodNumber;
1709
+ }, import("zod").ZodTypeAny, "passthrough">>>;
1710
+ }, import("zod").ZodTypeAny, "passthrough">>;
1711
+ deleteSegmentation(segmentationId: string): Promise<import("zod").objectOutputType<{
1712
+ id: import("zod").ZodString;
1713
+ }, import("zod").ZodTypeAny, "passthrough">>;
1714
+ }
1331
1715
  /**
1332
1716
  * Main CloudGlue client class that provides access to all API functionality
1333
1717
  * through enhanced, user-friendly interfaces
@@ -1361,6 +1745,11 @@ export declare class CloudGlue {
1361
1745
  * Provides methods for extracting specific information from video content
1362
1746
  */
1363
1747
  readonly extract: EnhancedExtractApi;
1748
+ /**
1749
+ * Segmentations API for segmenting videos into shots
1750
+ * Provides methods for segmenting videos into shots
1751
+ */
1752
+ readonly segmentations: EnhancedSegmentationsApi;
1364
1753
  constructor(config?: CloudGlueConfig);
1365
1754
  }
1366
1755
  export {};