@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.
@@ -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,20 @@ const CollectionList = zod_1.z
49
83
  })
50
84
  .strict()
51
85
  .passthrough();
86
+ const AddCollectionFile = zod_1.z
87
+ .union([
88
+ zod_1.z.object({ file_id: zod_1.z.string() }).strict().passthrough(),
89
+ zod_1.z.object({ url: zod_1.z.string() }).strict().passthrough(),
90
+ ])
91
+ .and(common_3.FileSegmentationConfig);
92
+ const AddYouTubeCollectionFile = zod_1.z
93
+ .object({
94
+ url: zod_1.z.string(),
95
+ metadata: zod_1.z.object({}).partial().strict().passthrough().optional(),
96
+ })
97
+ .strict()
98
+ .passthrough()
99
+ .and(common_3.FileSegmentationConfig);
52
100
  const CollectionFile = zod_1.z
53
101
  .object({
54
102
  collection_id: zod_1.z.string(),
@@ -62,13 +110,23 @@ const CollectionFile = zod_1.z
62
110
  "failed",
63
111
  "not_applicable",
64
112
  ]),
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"])
113
+ file: common_2.File.optional(),
114
+ segmentation: zod_1.z
115
+ .object({
116
+ id: zod_1.z.string().uuid(),
117
+ status: zod_1.z.enum([
118
+ "pending",
119
+ "processing",
120
+ "completed",
121
+ "failed",
122
+ "not_applicable",
123
+ ]),
124
+ file_id: zod_1.z.string().uuid(),
125
+ segmentation_config: common_1.SegmentationConfig,
126
+ })
127
+ .strict()
128
+ .passthrough()
70
129
  .optional(),
71
- file: common_1.File.optional(),
72
130
  })
73
131
  .strict()
74
132
  .passthrough();
@@ -82,36 +140,6 @@ const CollectionFileList = zod_1.z
82
140
  })
83
141
  .strict()
84
142
  .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
143
  const CollectionDelete = zod_1.z
116
144
  .object({ id: zod_1.z.string(), object: zod_1.z.literal("collection") })
117
145
  .strict()
@@ -186,13 +214,6 @@ const RichTranscript = zod_1.z
186
214
  })
187
215
  .strict()
188
216
  .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
217
  const CollectionEntitiesList = zod_1.z
197
218
  .object({
198
219
  object: zod_1.z.literal("list"),
@@ -278,15 +299,16 @@ const CollectionRichTranscriptsList = zod_1.z
278
299
  .passthrough();
279
300
  exports.schemas = {
280
301
  Collection,
302
+ NewCollection,
281
303
  CollectionList,
304
+ AddCollectionFile,
305
+ AddYouTubeCollectionFile,
282
306
  CollectionFile,
283
307
  CollectionFileList,
284
- NewCollection,
285
308
  CollectionDelete,
286
309
  CollectionFileDelete,
287
310
  FileEntities,
288
311
  RichTranscript,
289
- AddYouTubeCollectionFile,
290
312
  CollectionEntitiesList,
291
313
  CollectionRichTranscriptsList,
292
314
  };
@@ -436,7 +458,7 @@ const endpoints = (0, core_1.makeApi)([
436
458
  name: "body",
437
459
  description: `File association parameters`,
438
460
  type: "Body",
439
- schema: zod_1.z.object({ file_id: zod_1.z.string() }).strict().passthrough(),
461
+ schema: AddCollectionFile,
440
462
  },
441
463
  {
442
464
  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,