@aviaryhq/cloudglue-js 0.1.1 → 0.1.3

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.
@@ -5,6 +5,8 @@ exports.createApiClient = createApiClient;
5
5
  const core_1 = require("@zodios/core");
6
6
  const zod_1 = require("zod");
7
7
  const common_1 = require("./common");
8
+ const common_2 = require("./common");
9
+ const common_3 = require("./common");
8
10
  const Collection = zod_1.z
9
11
  .object({
10
12
  id: zod_1.z.string(),
@@ -34,11 +36,43 @@ const Collection = zod_1.z
34
36
  .strict()
35
37
  .passthrough()
36
38
  .optional(),
39
+ default_segmentation_config: common_1.SegmentationConfig.optional(),
37
40
  created_at: zod_1.z.number().int(),
38
41
  file_count: zod_1.z.number().int(),
39
42
  })
40
43
  .strict()
41
44
  .passthrough();
45
+ const NewCollection = zod_1.z
46
+ .object({
47
+ collection_type: zod_1.z.enum(["entities", "rich-transcripts"]),
48
+ name: zod_1.z.string(),
49
+ description: zod_1.z.union([zod_1.z.string(), zod_1.z.null()]).optional(),
50
+ extract_config: zod_1.z
51
+ .object({
52
+ prompt: zod_1.z.string(),
53
+ schema: zod_1.z.object({}).partial().strict().passthrough(),
54
+ enable_video_level_entities: zod_1.z.boolean().default(false),
55
+ enable_segment_level_entities: zod_1.z.boolean().default(true),
56
+ })
57
+ .partial()
58
+ .strict()
59
+ .passthrough()
60
+ .optional(),
61
+ transcribe_config: zod_1.z
62
+ .object({
63
+ enable_summary: zod_1.z.boolean().default(true),
64
+ enable_speech: zod_1.z.boolean().default(true),
65
+ enable_scene_text: zod_1.z.boolean().default(false),
66
+ enable_visual_scene_description: zod_1.z.boolean().default(false),
67
+ })
68
+ .partial()
69
+ .strict()
70
+ .passthrough()
71
+ .optional(),
72
+ default_segmentation_config: common_1.SegmentationConfig.optional(),
73
+ })
74
+ .strict()
75
+ .passthrough();
42
76
  const CollectionList = zod_1.z
43
77
  .object({
44
78
  object: zod_1.z.literal("list"),
@@ -49,6 +83,19 @@ const CollectionList = zod_1.z
49
83
  })
50
84
  .strict()
51
85
  .passthrough();
86
+ const AddCollectionFile = zod_1.z
87
+ .object({ file_id: zod_1.z.string() })
88
+ .strict()
89
+ .passthrough()
90
+ .and(common_3.FileSegmentationConfig);
91
+ const AddYouTubeCollectionFile = zod_1.z
92
+ .object({
93
+ url: zod_1.z.string(),
94
+ metadata: zod_1.z.object({}).partial().strict().passthrough().optional(),
95
+ })
96
+ .strict()
97
+ .passthrough()
98
+ .and(common_3.FileSegmentationConfig);
52
99
  const CollectionFile = zod_1.z
53
100
  .object({
54
101
  collection_id: zod_1.z.string(),
@@ -62,13 +109,23 @@ const CollectionFile = zod_1.z
62
109
  "failed",
63
110
  "not_applicable",
64
111
  ]),
65
- extract_status: zod_1.z
66
- .enum(["pending", "processing", "completed", "failed", "not_applicable"])
67
- .optional(),
68
- searchable_status: zod_1.z
69
- .enum(["pending", "processing", "completed", "failed", "not_applicable"])
112
+ file: common_2.File.optional(),
113
+ segmentation: zod_1.z
114
+ .object({
115
+ id: zod_1.z.string().uuid(),
116
+ status: zod_1.z.enum([
117
+ "pending",
118
+ "processing",
119
+ "completed",
120
+ "failed",
121
+ "not_applicable",
122
+ ]),
123
+ file_id: zod_1.z.string().uuid(),
124
+ segmentation_config: common_1.SegmentationConfig,
125
+ })
126
+ .strict()
127
+ .passthrough()
70
128
  .optional(),
71
- file: common_1.File.optional(),
72
129
  })
73
130
  .strict()
74
131
  .passthrough();
@@ -82,36 +139,6 @@ const CollectionFileList = zod_1.z
82
139
  })
83
140
  .strict()
84
141
  .passthrough();
85
- const NewCollection = zod_1.z
86
- .object({
87
- collection_type: zod_1.z.enum(["entities", "rich-transcripts"]),
88
- name: zod_1.z.string(),
89
- description: zod_1.z.union([zod_1.z.string(), zod_1.z.null()]).optional(),
90
- extract_config: zod_1.z
91
- .object({
92
- prompt: zod_1.z.string(),
93
- schema: zod_1.z.object({}).partial().strict().passthrough(),
94
- enable_video_level_entities: zod_1.z.boolean().default(false),
95
- enable_segment_level_entities: zod_1.z.boolean().default(true),
96
- })
97
- .partial()
98
- .strict()
99
- .passthrough()
100
- .optional(),
101
- transcribe_config: zod_1.z
102
- .object({
103
- enable_summary: zod_1.z.boolean().default(true),
104
- enable_speech: zod_1.z.boolean().default(true),
105
- enable_scene_text: zod_1.z.boolean().default(false),
106
- enable_visual_scene_description: zod_1.z.boolean().default(false),
107
- })
108
- .partial()
109
- .strict()
110
- .passthrough()
111
- .optional(),
112
- })
113
- .strict()
114
- .passthrough();
115
142
  const CollectionDelete = zod_1.z
116
143
  .object({ id: zod_1.z.string(), object: zod_1.z.literal("collection") })
117
144
  .strict()
@@ -186,13 +213,6 @@ const RichTranscript = zod_1.z
186
213
  })
187
214
  .strict()
188
215
  .passthrough();
189
- const AddYouTubeCollectionFile = zod_1.z
190
- .object({
191
- url: zod_1.z.string(),
192
- metadata: zod_1.z.object({}).partial().strict().passthrough().optional(),
193
- })
194
- .strict()
195
- .passthrough();
196
216
  const CollectionEntitiesList = zod_1.z
197
217
  .object({
198
218
  object: zod_1.z.literal("list"),
@@ -278,15 +298,16 @@ const CollectionRichTranscriptsList = zod_1.z
278
298
  .passthrough();
279
299
  exports.schemas = {
280
300
  Collection,
301
+ NewCollection,
281
302
  CollectionList,
303
+ AddCollectionFile,
304
+ AddYouTubeCollectionFile,
282
305
  CollectionFile,
283
306
  CollectionFileList,
284
- NewCollection,
285
307
  CollectionDelete,
286
308
  CollectionFileDelete,
287
309
  FileEntities,
288
310
  RichTranscript,
289
- AddYouTubeCollectionFile,
290
311
  CollectionEntitiesList,
291
312
  CollectionRichTranscriptsList,
292
313
  };
@@ -436,7 +457,7 @@ const endpoints = (0, core_1.makeApi)([
436
457
  name: "body",
437
458
  description: `File association parameters`,
438
459
  type: "Body",
439
- schema: zod_1.z.object({ file_id: zod_1.z.string() }).strict().passthrough(),
460
+ schema: AddCollectionFile,
440
461
  },
441
462
  {
442
463
  name: "collection_id",
@@ -1,5 +1,6 @@
1
1
  import { type ZodiosOptions } from "@zodios/core";
2
2
  import { z } from "zod";
3
+ import { FileSegmentationConfig } from "./common";
3
4
  type Extract = {
4
5
  job_id: string;
5
6
  status: "pending" | "processing" | "completed" | "failed" | "not_applicable";
@@ -21,6 +22,13 @@ type Extract = {
21
22
  }> | undefined;
22
23
  error?: string | undefined;
23
24
  };
25
+ type NewExtract = {
26
+ url: string;
27
+ prompt?: string | undefined;
28
+ schema?: {} | undefined;
29
+ enable_video_level_entities?: boolean | undefined;
30
+ enable_segment_level_entities?: boolean | undefined;
31
+ } & FileSegmentationConfig;
24
32
  type ExtractList = {
25
33
  object: "list";
26
34
  data: Array<Extract>;
@@ -30,28 +38,11 @@ type ExtractList = {
30
38
  };
31
39
  declare const Extract: z.ZodType<Extract>;
32
40
  declare const ExtractList: z.ZodType<ExtractList>;
41
+ declare const NewExtract: z.ZodType<NewExtract>;
33
42
  export declare const schemas: {
34
43
  Extract: z.ZodType<Extract, z.ZodTypeDef, Extract>;
35
44
  ExtractList: z.ZodType<ExtractList, z.ZodTypeDef, ExtractList>;
36
- NewExtract: z.ZodObject<{
37
- url: z.ZodString;
38
- prompt: z.ZodOptional<z.ZodString>;
39
- schema: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
40
- enable_video_level_entities: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
41
- enable_segment_level_entities: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
42
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
43
- url: z.ZodString;
44
- prompt: z.ZodOptional<z.ZodString>;
45
- schema: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
46
- enable_video_level_entities: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
47
- enable_segment_level_entities: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
48
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
49
- url: z.ZodString;
50
- prompt: z.ZodOptional<z.ZodString>;
51
- schema: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
52
- enable_video_level_entities: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
53
- enable_segment_level_entities: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
54
- }, z.ZodTypeAny, "passthrough">>;
45
+ NewExtract: z.ZodType<NewExtract, z.ZodTypeDef, NewExtract>;
55
46
  };
56
47
  export declare const ExtractApi: import("@zodios/core").ZodiosInstance<[{
57
48
  method: "post";
@@ -63,25 +54,7 @@ export declare const ExtractApi: import("@zodios/core").ZodiosInstance<[{
63
54
  name: "body";
64
55
  description: string;
65
56
  type: "Body";
66
- schema: z.ZodObject<{
67
- url: z.ZodString;
68
- prompt: z.ZodOptional<z.ZodString>;
69
- schema: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
70
- enable_video_level_entities: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
71
- enable_segment_level_entities: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
72
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
73
- url: z.ZodString;
74
- prompt: z.ZodOptional<z.ZodString>;
75
- schema: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
76
- enable_video_level_entities: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
77
- enable_segment_level_entities: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
78
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
79
- url: z.ZodString;
80
- prompt: z.ZodOptional<z.ZodString>;
81
- schema: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
82
- enable_video_level_entities: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
83
- enable_segment_level_entities: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
84
- }, z.ZodTypeAny, "passthrough">>;
57
+ schema: z.ZodType<NewExtract, z.ZodTypeDef, NewExtract>;
85
58
  }];
86
59
  response: z.ZodType<Extract, z.ZodTypeDef, Extract>;
87
60
  errors: [{
@@ -242,25 +215,7 @@ export declare function createApiClient(baseUrl: string, options?: ZodiosOptions
242
215
  name: "body";
243
216
  description: string;
244
217
  type: "Body";
245
- schema: z.ZodObject<{
246
- url: z.ZodString;
247
- prompt: z.ZodOptional<z.ZodString>;
248
- schema: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
249
- enable_video_level_entities: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
250
- enable_segment_level_entities: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
251
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
252
- url: z.ZodString;
253
- prompt: z.ZodOptional<z.ZodString>;
254
- schema: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
255
- enable_video_level_entities: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
256
- enable_segment_level_entities: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
257
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
258
- url: z.ZodString;
259
- prompt: z.ZodOptional<z.ZodString>;
260
- schema: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
261
- enable_video_level_entities: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
262
- enable_segment_level_entities: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
263
- }, z.ZodTypeAny, "passthrough">>;
218
+ schema: z.ZodType<NewExtract, z.ZodTypeDef, NewExtract>;
264
219
  }];
265
220
  response: z.ZodType<Extract, z.ZodTypeDef, Extract>;
266
221
  errors: [{
@@ -4,6 +4,7 @@ exports.ExtractApi = exports.schemas = void 0;
4
4
  exports.createApiClient = createApiClient;
5
5
  const core_1 = require("@zodios/core");
6
6
  const zod_1 = require("zod");
7
+ const common_1 = require("./common");
7
8
  const Extract = zod_1.z
8
9
  .object({
9
10
  job_id: zod_1.z.string(),
@@ -67,7 +68,8 @@ const NewExtract = zod_1.z
67
68
  enable_segment_level_entities: zod_1.z.boolean().optional().default(true),
68
69
  })
69
70
  .strict()
70
- .passthrough();
71
+ .passthrough()
72
+ .and(common_1.FileSegmentationConfig);
71
73
  exports.schemas = {
72
74
  Extract,
73
75
  ExtractList,