@aviaryhq/cloudglue-js 0.5.8 → 0.5.10

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.
Files changed (34) hide show
  1. package/dist/generated/Collections.d.ts +116 -112
  2. package/dist/generated/Collections.js +59 -45
  3. package/dist/generated/Describe.d.ts +7722 -43
  4. package/dist/generated/Describe.js +4 -64
  5. package/dist/generated/Extract.d.ts +2 -0
  6. package/dist/generated/Extract.js +2 -0
  7. package/dist/generated/Files.d.ts +1631 -39
  8. package/dist/generated/Files.js +174 -0
  9. package/dist/generated/Response.d.ts +727 -0
  10. package/dist/generated/Response.js +318 -0
  11. package/dist/generated/Search.js +3 -3
  12. package/dist/generated/Segmentations.d.ts +6311 -933
  13. package/dist/generated/Segmentations.js +48 -0
  14. package/dist/generated/Segments.d.ts +6 -23
  15. package/dist/generated/Segments.js +19 -22
  16. package/dist/generated/common.d.ts +3848 -27
  17. package/dist/generated/common.js +102 -2
  18. package/dist/generated/index.d.ts +1 -0
  19. package/dist/generated/index.js +3 -1
  20. package/dist/src/api/collections.api.d.ts +45 -12
  21. package/dist/src/api/collections.api.js +16 -3
  22. package/dist/src/api/describe.api.d.ts +1546 -109
  23. package/dist/src/api/extract.api.d.ts +11 -14
  24. package/dist/src/api/files.api.d.ts +323 -3
  25. package/dist/src/api/files.api.js +27 -0
  26. package/dist/src/api/response.api.d.ts +269 -0
  27. package/dist/src/api/response.api.js +85 -0
  28. package/dist/src/api/segmentations.api.d.ts +896 -3
  29. package/dist/src/api/segmentations.api.js +13 -0
  30. package/dist/src/api/segments.api.d.ts +10 -28
  31. package/dist/src/client.d.ts +6 -0
  32. package/dist/src/client.js +6 -1
  33. package/dist/src/types.d.ts +42 -5
  34. package/package.json +1 -1
@@ -3,11 +3,12 @@ import { z } from 'zod';
3
3
  import { SegmentationConfig } from './common';
4
4
  import { SegmentationUniformConfig } from './common';
5
5
  import { SegmentationShotDetectorConfig } from './common';
6
+ import { NarrativeConfig } from './common';
6
7
  import { KeyframeConfig } from './common';
7
8
  import { ThumbnailsConfig } from './common';
8
9
  import { File } from './common';
9
- import { FileSegmentationConfig } from './common';
10
10
  import { DescribeOutput } from './common';
11
+ import { FileSegmentationConfig } from './common';
11
12
  type Collection = {
12
13
  id: string;
13
14
  object: 'collection';
@@ -19,6 +20,7 @@ type Collection = {
19
20
  schema: {};
20
21
  enable_video_level_entities: boolean;
21
22
  enable_segment_level_entities: boolean;
23
+ enable_transcript_mode: boolean;
22
24
  }> | undefined;
23
25
  transcribe_config?: Partial<{
24
26
  enable_summary: boolean;
@@ -67,6 +69,7 @@ type NewCollection = {
67
69
  schema: {};
68
70
  enable_video_level_entities: boolean;
69
71
  enable_segment_level_entities: boolean;
72
+ enable_transcript_mode: boolean;
70
73
  }> | undefined;
71
74
  transcribe_config?: Partial<{
72
75
  enable_summary: boolean;
@@ -91,9 +94,10 @@ type NewCollection = {
91
94
  }> | null | undefined;
92
95
  };
93
96
  type DefaultSegmentationConfig = {
94
- strategy: 'uniform' | 'shot-detector';
97
+ strategy: 'uniform' | 'shot-detector' | 'narrative';
95
98
  uniform_config?: SegmentationUniformConfig | undefined;
96
99
  shot_detector_config?: SegmentationShotDetectorConfig | undefined;
100
+ narrative_config?: NarrativeConfig | undefined;
97
101
  keyframe_config?: KeyframeConfig | undefined;
98
102
  start_time_seconds?: number | undefined;
99
103
  end_time_seconds?: number | undefined;
@@ -105,6 +109,13 @@ type CollectionList = {
105
109
  limit: number;
106
110
  offset: number;
107
111
  };
112
+ type CollectionFileList = {
113
+ object: 'list';
114
+ data: Array<CollectionFile>;
115
+ total: number;
116
+ limit: number;
117
+ offset: number;
118
+ };
108
119
  type CollectionFile = {
109
120
  collection_id: string;
110
121
  file_id: string;
@@ -119,20 +130,6 @@ type CollectionFile = {
119
130
  segmentation_config: SegmentationConfig;
120
131
  } | undefined;
121
132
  };
122
- type AddCollectionFile = ({
123
- file_id: string;
124
- } | {
125
- url: string;
126
- }) & FileSegmentationConfig & Partial<{
127
- thumbnails_config: ThumbnailsConfig;
128
- }>;
129
- type CollectionFileList = {
130
- object: 'list';
131
- data: Array<CollectionFile>;
132
- total: number;
133
- limit: number;
134
- offset: number;
135
- };
136
133
  type RichTranscript = {
137
134
  collection_id: string;
138
135
  file_id: string;
@@ -205,6 +202,13 @@ type MediaDescription = {
205
202
  end_time: number;
206
203
  }>> | undefined;
207
204
  } & DescribeOutput;
205
+ type AddCollectionFile = ({
206
+ file_id: string;
207
+ } | {
208
+ url: string;
209
+ }) & FileSegmentationConfig & Partial<{
210
+ thumbnails_config: ThumbnailsConfig;
211
+ }>;
208
212
  declare const Collection: z.ZodType<Collection>;
209
213
  declare const DefaultSegmentationConfig: z.ZodType<DefaultSegmentationConfig>;
210
214
  declare const NewCollection: z.ZodType<NewCollection>;
@@ -1218,54 +1222,6 @@ export declare const CollectionsApi: import("@zodios/core").ZodiosInstance<[{
1218
1222
  error: z.ZodString;
1219
1223
  }, z.ZodTypeAny, "passthrough">>;
1220
1224
  }];
1221
- }, {
1222
- method: "post";
1223
- path: "/collections/:collection_id/videos";
1224
- alias: "addVideo";
1225
- description: "Add a video to a collection";
1226
- requestFormat: "json";
1227
- parameters: [{
1228
- name: "body";
1229
- description: string;
1230
- type: "Body";
1231
- schema: z.ZodType<AddCollectionFile, z.ZodTypeDef, AddCollectionFile>;
1232
- }, {
1233
- name: "collection_id";
1234
- type: "Path";
1235
- schema: z.ZodString;
1236
- }];
1237
- response: z.ZodType<CollectionFile, z.ZodTypeDef, CollectionFile>;
1238
- errors: [{
1239
- status: 400;
1240
- description: string;
1241
- schema: z.ZodObject<{
1242
- error: z.ZodString;
1243
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1244
- error: z.ZodString;
1245
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1246
- error: z.ZodString;
1247
- }, z.ZodTypeAny, "passthrough">>;
1248
- }, {
1249
- status: 404;
1250
- description: string;
1251
- schema: z.ZodObject<{
1252
- error: z.ZodString;
1253
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1254
- error: z.ZodString;
1255
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1256
- error: z.ZodString;
1257
- }, z.ZodTypeAny, "passthrough">>;
1258
- }, {
1259
- status: 500;
1260
- description: string;
1261
- schema: z.ZodObject<{
1262
- error: z.ZodString;
1263
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1264
- error: z.ZodString;
1265
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1266
- error: z.ZodString;
1267
- }, z.ZodTypeAny, "passthrough">>;
1268
- }];
1269
1225
  }, {
1270
1226
  method: "get";
1271
1227
  path: "/collections/:collection_id/videos";
@@ -2590,6 +2546,54 @@ export declare const CollectionsApi: import("@zodios/core").ZodiosInstance<[{
2590
2546
  error: z.ZodString;
2591
2547
  }, z.ZodTypeAny, "passthrough">>;
2592
2548
  }];
2549
+ }, {
2550
+ method: "post";
2551
+ path: "/collections/:collection_id/media";
2552
+ alias: "addMedia";
2553
+ description: "Add a video or audio file to a collection. This is the recommended endpoint for adding media files to collections.\n\n**Media Type Handling:**\n\n- **Video files**: Processed with full visual analysis (scene description, text extraction, etc.)\n- **Audio files**: Visual features automatically disabled; only speech and audio analysis available\n\n**Audio File Restrictions:**\n\n- Audio files cannot be added to face-analysis collections\n- Shot-detector segmentation is not available for audio files";
2554
+ requestFormat: "json";
2555
+ parameters: [{
2556
+ name: "body";
2557
+ description: string;
2558
+ type: "Body";
2559
+ schema: z.ZodType<AddCollectionFile, z.ZodTypeDef, AddCollectionFile>;
2560
+ }, {
2561
+ name: "collection_id";
2562
+ type: "Path";
2563
+ schema: z.ZodString;
2564
+ }];
2565
+ response: z.ZodType<CollectionFile, z.ZodTypeDef, CollectionFile>;
2566
+ errors: [{
2567
+ status: 400;
2568
+ description: string;
2569
+ schema: z.ZodObject<{
2570
+ error: z.ZodString;
2571
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2572
+ error: z.ZodString;
2573
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2574
+ error: z.ZodString;
2575
+ }, z.ZodTypeAny, "passthrough">>;
2576
+ }, {
2577
+ status: 404;
2578
+ description: string;
2579
+ schema: z.ZodObject<{
2580
+ error: z.ZodString;
2581
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2582
+ error: z.ZodString;
2583
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2584
+ error: z.ZodString;
2585
+ }, z.ZodTypeAny, "passthrough">>;
2586
+ }, {
2587
+ status: 500;
2588
+ description: string;
2589
+ schema: z.ZodObject<{
2590
+ error: z.ZodString;
2591
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2592
+ error: z.ZodString;
2593
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2594
+ error: z.ZodString;
2595
+ }, z.ZodTypeAny, "passthrough">>;
2596
+ }];
2593
2597
  }]>;
2594
2598
  export declare function createApiClient(baseUrl: string, options?: ZodiosOptions): import("@zodios/core").ZodiosInstance<[{
2595
2599
  method: "post";
@@ -2824,54 +2828,6 @@ export declare function createApiClient(baseUrl: string, options?: ZodiosOptions
2824
2828
  error: z.ZodString;
2825
2829
  }, z.ZodTypeAny, "passthrough">>;
2826
2830
  }];
2827
- }, {
2828
- method: "post";
2829
- path: "/collections/:collection_id/videos";
2830
- alias: "addVideo";
2831
- description: "Add a video to a collection";
2832
- requestFormat: "json";
2833
- parameters: [{
2834
- name: "body";
2835
- description: string;
2836
- type: "Body";
2837
- schema: z.ZodType<AddCollectionFile, z.ZodTypeDef, AddCollectionFile>;
2838
- }, {
2839
- name: "collection_id";
2840
- type: "Path";
2841
- schema: z.ZodString;
2842
- }];
2843
- response: z.ZodType<CollectionFile, z.ZodTypeDef, CollectionFile>;
2844
- errors: [{
2845
- status: 400;
2846
- description: string;
2847
- schema: z.ZodObject<{
2848
- error: z.ZodString;
2849
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2850
- error: z.ZodString;
2851
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2852
- error: z.ZodString;
2853
- }, z.ZodTypeAny, "passthrough">>;
2854
- }, {
2855
- status: 404;
2856
- description: string;
2857
- schema: z.ZodObject<{
2858
- error: z.ZodString;
2859
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2860
- error: z.ZodString;
2861
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2862
- error: z.ZodString;
2863
- }, z.ZodTypeAny, "passthrough">>;
2864
- }, {
2865
- status: 500;
2866
- description: string;
2867
- schema: z.ZodObject<{
2868
- error: z.ZodString;
2869
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2870
- error: z.ZodString;
2871
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2872
- error: z.ZodString;
2873
- }, z.ZodTypeAny, "passthrough">>;
2874
- }];
2875
2831
  }, {
2876
2832
  method: "get";
2877
2833
  path: "/collections/:collection_id/videos";
@@ -4196,5 +4152,53 @@ export declare function createApiClient(baseUrl: string, options?: ZodiosOptions
4196
4152
  error: z.ZodString;
4197
4153
  }, z.ZodTypeAny, "passthrough">>;
4198
4154
  }];
4155
+ }, {
4156
+ method: "post";
4157
+ path: "/collections/:collection_id/media";
4158
+ alias: "addMedia";
4159
+ description: "Add a video or audio file to a collection. This is the recommended endpoint for adding media files to collections.\n\n**Media Type Handling:**\n\n- **Video files**: Processed with full visual analysis (scene description, text extraction, etc.)\n- **Audio files**: Visual features automatically disabled; only speech and audio analysis available\n\n**Audio File Restrictions:**\n\n- Audio files cannot be added to face-analysis collections\n- Shot-detector segmentation is not available for audio files";
4160
+ requestFormat: "json";
4161
+ parameters: [{
4162
+ name: "body";
4163
+ description: string;
4164
+ type: "Body";
4165
+ schema: z.ZodType<AddCollectionFile, z.ZodTypeDef, AddCollectionFile>;
4166
+ }, {
4167
+ name: "collection_id";
4168
+ type: "Path";
4169
+ schema: z.ZodString;
4170
+ }];
4171
+ response: z.ZodType<CollectionFile, z.ZodTypeDef, CollectionFile>;
4172
+ errors: [{
4173
+ status: 400;
4174
+ description: string;
4175
+ schema: z.ZodObject<{
4176
+ error: z.ZodString;
4177
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4178
+ error: z.ZodString;
4179
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4180
+ error: z.ZodString;
4181
+ }, z.ZodTypeAny, "passthrough">>;
4182
+ }, {
4183
+ status: 404;
4184
+ description: string;
4185
+ schema: z.ZodObject<{
4186
+ error: z.ZodString;
4187
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4188
+ error: z.ZodString;
4189
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4190
+ error: z.ZodString;
4191
+ }, z.ZodTypeAny, "passthrough">>;
4192
+ }, {
4193
+ status: 500;
4194
+ description: string;
4195
+ schema: z.ZodObject<{
4196
+ error: z.ZodString;
4197
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4198
+ error: z.ZodString;
4199
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4200
+ error: z.ZodString;
4201
+ }, z.ZodTypeAny, "passthrough">>;
4202
+ }];
4199
4203
  }]>;
4200
4204
  export {};
@@ -12,6 +12,7 @@ const common_5 = require("./common");
12
12
  const common_6 = require("./common");
13
13
  const common_7 = require("./common");
14
14
  const common_8 = require("./common");
15
+ const common_9 = require("./common");
15
16
  const Collection = zod_1.z
16
17
  .object({
17
18
  id: zod_1.z.string(),
@@ -30,6 +31,7 @@ const Collection = zod_1.z
30
31
  schema: zod_1.z.object({}).partial().strict().passthrough(),
31
32
  enable_video_level_entities: zod_1.z.boolean().default(false),
32
33
  enable_segment_level_entities: zod_1.z.boolean().default(true),
34
+ enable_transcript_mode: zod_1.z.boolean().default(false),
33
35
  })
34
36
  .partial()
35
37
  .strict()
@@ -60,7 +62,7 @@ const Collection = zod_1.z
60
62
  .passthrough()
61
63
  .optional(),
62
64
  default_segmentation_config: common_1.SegmentationConfig.optional(),
63
- default_thumbnails_config: common_5.ThumbnailsConfig.optional(),
65
+ default_thumbnails_config: common_6.ThumbnailsConfig.optional(),
64
66
  face_detection_config: zod_1.z
65
67
  .object({
66
68
  frame_extraction_config: zod_1.z
@@ -95,10 +97,11 @@ const Collection = zod_1.z
95
97
  .passthrough();
96
98
  const DefaultSegmentationConfig = zod_1.z
97
99
  .object({
98
- strategy: zod_1.z.enum(['uniform', 'shot-detector']),
100
+ strategy: zod_1.z.enum(['uniform', 'shot-detector', 'narrative']),
99
101
  uniform_config: common_2.SegmentationUniformConfig.optional(),
100
102
  shot_detector_config: common_3.SegmentationShotDetectorConfig.optional(),
101
- keyframe_config: common_4.KeyframeConfig.optional(),
103
+ narrative_config: common_4.NarrativeConfig.optional(),
104
+ keyframe_config: common_5.KeyframeConfig.optional(),
102
105
  start_time_seconds: zod_1.z.number().gte(0).optional(),
103
106
  end_time_seconds: zod_1.z.number().gte(0).optional(),
104
107
  })
@@ -132,6 +135,7 @@ const NewCollection = zod_1.z
132
135
  schema: zod_1.z.object({}).partial().strict().passthrough(),
133
136
  enable_video_level_entities: zod_1.z.boolean().default(false),
134
137
  enable_segment_level_entities: zod_1.z.boolean().default(true),
138
+ enable_transcript_mode: zod_1.z.boolean().default(false),
135
139
  })
136
140
  .partial()
137
141
  .strict()
@@ -150,7 +154,7 @@ const NewCollection = zod_1.z
150
154
  .passthrough()
151
155
  .optional(),
152
156
  default_segmentation_config: DefaultSegmentationConfig.optional(),
153
- default_thumbnails_config: common_5.ThumbnailsConfig.optional(),
157
+ default_thumbnails_config: common_6.ThumbnailsConfig.optional(),
154
158
  face_detection_config: zod_1.z
155
159
  .object({
156
160
  frame_extraction_config: zod_1.z
@@ -196,9 +200,9 @@ const AddCollectionFile = zod_1.z
196
200
  zod_1.z.object({ file_id: zod_1.z.string() }).strict().passthrough(),
197
201
  zod_1.z.object({ url: zod_1.z.string() }).strict().passthrough(),
198
202
  ])
199
- .and(common_7.FileSegmentationConfig)
203
+ .and(common_9.FileSegmentationConfig)
200
204
  .and(zod_1.z
201
- .object({ thumbnails_config: common_5.ThumbnailsConfig })
205
+ .object({ thumbnails_config: common_6.ThumbnailsConfig })
202
206
  .partial()
203
207
  .strict()
204
208
  .passthrough());
@@ -215,7 +219,7 @@ const CollectionFile = zod_1.z
215
219
  'failed',
216
220
  'not_applicable',
217
221
  ]),
218
- file: common_6.File.optional(),
222
+ file: common_7.File.optional(),
219
223
  segmentation: zod_1.z
220
224
  .object({
221
225
  id: zod_1.z.string().uuid(),
@@ -673,44 +677,6 @@ const endpoints = (0, core_1.makeApi)([
673
677
  },
674
678
  ],
675
679
  },
676
- {
677
- method: 'post',
678
- path: '/collections/:collection_id/videos',
679
- alias: 'addVideo',
680
- description: `Add a video to a collection`,
681
- requestFormat: 'json',
682
- parameters: [
683
- {
684
- name: 'body',
685
- description: `File association parameters`,
686
- type: 'Body',
687
- schema: AddCollectionFile,
688
- },
689
- {
690
- name: 'collection_id',
691
- type: 'Path',
692
- schema: zod_1.z.string(),
693
- },
694
- ],
695
- response: CollectionFile,
696
- errors: [
697
- {
698
- status: 400,
699
- description: `Invalid request`,
700
- schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
701
- },
702
- {
703
- status: 404,
704
- description: `Collection or file not found`,
705
- schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
706
- },
707
- {
708
- status: 500,
709
- description: `An unexpected error occurred on the server`,
710
- schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
711
- },
712
- ],
713
- },
714
680
  {
715
681
  method: 'get',
716
682
  path: '/collections/:collection_id/videos',
@@ -1304,6 +1270,54 @@ const endpoints = (0, core_1.makeApi)([
1304
1270
  },
1305
1271
  ],
1306
1272
  },
1273
+ {
1274
+ method: 'post',
1275
+ path: '/collections/:collection_id/media',
1276
+ alias: 'addMedia',
1277
+ description: `Add a video or audio file to a collection. This is the recommended endpoint for adding media files to collections.
1278
+
1279
+ **Media Type Handling:**
1280
+
1281
+ - **Video files**: Processed with full visual analysis (scene description, text extraction, etc.)
1282
+ - **Audio files**: Visual features automatically disabled; only speech and audio analysis available
1283
+
1284
+ **Audio File Restrictions:**
1285
+
1286
+ - Audio files cannot be added to face-analysis collections
1287
+ - Shot-detector segmentation is not available for audio files`,
1288
+ requestFormat: 'json',
1289
+ parameters: [
1290
+ {
1291
+ name: 'body',
1292
+ description: `File association parameters`,
1293
+ type: 'Body',
1294
+ schema: AddCollectionFile,
1295
+ },
1296
+ {
1297
+ name: 'collection_id',
1298
+ type: 'Path',
1299
+ schema: zod_1.z.string(),
1300
+ },
1301
+ ],
1302
+ response: CollectionFile,
1303
+ errors: [
1304
+ {
1305
+ status: 400,
1306
+ description: `Invalid request (e.g., audio files with shot-detector segmentation, audio in face-analysis collections)`,
1307
+ schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
1308
+ },
1309
+ {
1310
+ status: 404,
1311
+ description: `Collection or file not found`,
1312
+ schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
1313
+ },
1314
+ {
1315
+ status: 500,
1316
+ description: `An unexpected error occurred on the server`,
1317
+ schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
1318
+ },
1319
+ ],
1320
+ },
1307
1321
  ]);
1308
1322
  exports.CollectionsApi = new core_1.Zodios('https://api.cloudglue.dev/v1', endpoints);
1309
1323
  function createApiClient(baseUrl, options) {