@aviaryhq/cloudglue-js 0.4.11 → 0.4.13
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.
- package/dist/generated/Chat.d.ts +8 -8
- package/dist/generated/Chat.js +30 -30
- package/dist/generated/Collections.d.ts +25 -23
- package/dist/generated/Collections.js +266 -264
- package/dist/generated/Describe.d.ts +7 -7
- package/dist/generated/Describe.js +58 -58
- package/dist/generated/Extract.d.ts +6 -6
- package/dist/generated/Extract.js +52 -52
- package/dist/generated/Face_Detection.d.ts +6 -6
- package/dist/generated/Face_Detection.js +25 -25
- package/dist/generated/Face_Match.d.ts +6 -6
- package/dist/generated/Face_Match.js +26 -26
- package/dist/generated/Files.d.ts +1009 -10
- package/dist/generated/Files.js +247 -115
- package/dist/generated/Frames.d.ts +2 -2
- package/dist/generated/Frames.js +17 -17
- package/dist/generated/Search.d.ts +212 -19
- package/dist/generated/Search.js +143 -30
- package/dist/generated/Segmentations.d.ts +208 -2
- package/dist/generated/Segmentations.js +34 -29
- package/dist/generated/Segments.d.ts +13 -13
- package/dist/generated/Segments.js +49 -49
- package/dist/generated/Tags.d.ts +660 -0
- package/dist/generated/Tags.js +160 -0
- package/dist/generated/Transcribe.d.ts +7 -7
- package/dist/generated/Transcribe.js +46 -46
- package/dist/generated/Webhooks.d.ts +5 -5
- package/dist/generated/Webhooks.js +61 -61
- package/dist/generated/common.d.ts +391 -11
- package/dist/generated/common.js +63 -28
- package/dist/generated/index.d.ts +14 -13
- package/dist/generated/index.js +3 -1
- package/dist/src/api/chat-completion.api.d.ts +38 -0
- package/dist/src/api/chat-completion.api.js +15 -0
- package/dist/src/api/collections.api.d.ts +666 -0
- package/dist/src/api/collections.api.js +134 -0
- package/dist/src/api/describe.api.d.ts +153 -0
- package/dist/src/api/describe.api.js +57 -0
- package/dist/src/api/extract.api.d.ts +144 -0
- package/dist/src/api/extract.api.js +55 -0
- package/dist/src/api/face-detection.api.d.ts +77 -0
- package/dist/src/api/face-detection.api.js +41 -0
- package/dist/src/api/face-match.api.d.ts +94 -0
- package/dist/src/api/face-match.api.js +41 -0
- package/dist/src/api/files.api.d.ts +705 -0
- package/dist/src/api/files.api.js +146 -0
- package/dist/src/api/frame-extraction.api.d.ts +264 -0
- package/dist/src/api/frame-extraction.api.js +37 -0
- package/dist/src/api/search.api.d.ts +316 -0
- package/dist/src/api/search.api.js +22 -0
- package/dist/src/api/segmentations.api.d.ts +395 -0
- package/dist/src/api/segmentations.api.js +36 -0
- package/dist/src/api/segments.api.d.ts +141 -0
- package/dist/src/api/segments.api.js +40 -0
- package/dist/src/api/tags.api.d.ts +71 -0
- package/dist/src/api/tags.api.js +31 -0
- package/dist/src/api/transcribe.api.d.ts +150 -0
- package/dist/src/api/transcribe.api.js +65 -0
- package/dist/src/api/webhooks.api.d.ts +69 -0
- package/dist/src/api/webhooks.api.js +28 -0
- package/dist/src/client.d.ts +20 -2967
- package/dist/src/client.js +55 -643
- package/dist/src/error.d.ts +7 -0
- package/dist/src/error.js +14 -0
- package/dist/src/types.d.ts +20 -8
- package/package.json +2 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { type ZodiosOptions } from
|
|
2
|
-
import { z } from
|
|
1
|
+
import { type ZodiosOptions } from '@zodios/core';
|
|
2
|
+
import { z } from 'zod';
|
|
3
3
|
type SearchResponse = {
|
|
4
4
|
id: string;
|
|
5
|
-
object:
|
|
5
|
+
object: 'search';
|
|
6
6
|
query?: string | undefined;
|
|
7
|
-
scope:
|
|
8
|
-
group_by_key?:
|
|
7
|
+
scope: 'file' | 'segment' | 'face';
|
|
8
|
+
group_by_key?: 'file' | undefined;
|
|
9
9
|
group_count?: number | undefined;
|
|
10
10
|
search_modalities?: SearchModalities | undefined;
|
|
11
11
|
results: Array<FileSearchResult | SegmentSearchResult | FaceSearchResult | SegmentGroupResult | FaceGroupResult>;
|
|
12
12
|
total: number;
|
|
13
13
|
limit: number;
|
|
14
14
|
};
|
|
15
|
-
type SearchModalities = Array<
|
|
15
|
+
type SearchModalities = Array<'general_content' | 'speech_lexical' | 'ocr_lexical' | 'tag_semantic' | 'tag_lexical'>;
|
|
16
16
|
type FileSearchResult = {
|
|
17
|
-
type:
|
|
17
|
+
type: 'file';
|
|
18
18
|
file_id: string;
|
|
19
19
|
collection_id: string;
|
|
20
20
|
id: string;
|
|
@@ -23,9 +23,15 @@ type FileSearchResult = {
|
|
|
23
23
|
summary?: (string | null) | undefined;
|
|
24
24
|
generated_title?: (string | null) | undefined;
|
|
25
25
|
thumbnail_url?: string | undefined;
|
|
26
|
+
tag?: SearchTagResponse | undefined;
|
|
26
27
|
};
|
|
28
|
+
type SearchTagResponse = Partial<{
|
|
29
|
+
id: string;
|
|
30
|
+
value: string;
|
|
31
|
+
label: string;
|
|
32
|
+
}>;
|
|
27
33
|
type SegmentSearchResult = {
|
|
28
|
-
type:
|
|
34
|
+
type: 'segment';
|
|
29
35
|
file_id: string;
|
|
30
36
|
collection_id: string;
|
|
31
37
|
segment_id: string;
|
|
@@ -52,9 +58,15 @@ type SegmentSearchResult = {
|
|
|
52
58
|
end_time: number;
|
|
53
59
|
}>> | undefined;
|
|
54
60
|
thumbnail_url?: string | undefined;
|
|
61
|
+
tag?: SearchTagResponse | undefined;
|
|
62
|
+
metadata?: {} | undefined;
|
|
63
|
+
keyframes?: Array<Partial<{
|
|
64
|
+
time_in_seconds: number;
|
|
65
|
+
thumbnail_url: string;
|
|
66
|
+
}>> | undefined;
|
|
55
67
|
};
|
|
56
68
|
type FaceSearchResult = {
|
|
57
|
-
type:
|
|
69
|
+
type: 'face';
|
|
58
70
|
file_id: string;
|
|
59
71
|
collection_id: string;
|
|
60
72
|
face_id: string;
|
|
@@ -70,37 +82,58 @@ type FaceSearchResult = {
|
|
|
70
82
|
thumbnail_url?: string | undefined;
|
|
71
83
|
};
|
|
72
84
|
type SegmentGroupResult = {
|
|
73
|
-
type:
|
|
85
|
+
type: 'segment_group';
|
|
74
86
|
matched_items: Array<SegmentSearchResult>;
|
|
75
87
|
file_id: string;
|
|
76
88
|
item_count: number;
|
|
77
89
|
best_score: number;
|
|
78
90
|
};
|
|
79
91
|
type FaceGroupResult = {
|
|
80
|
-
type:
|
|
92
|
+
type: 'face_group';
|
|
81
93
|
matched_items: Array<FaceSearchResult>;
|
|
82
94
|
file_id: string;
|
|
83
95
|
item_count: number;
|
|
84
96
|
best_score: number;
|
|
85
97
|
};
|
|
86
98
|
type SearchFilter = Partial<{
|
|
87
|
-
metadata: Array<SearchFilterCriteria
|
|
99
|
+
metadata: Array<SearchFilterCriteria & Partial<{
|
|
100
|
+
scope: 'file' | 'segment';
|
|
101
|
+
}>>;
|
|
88
102
|
video_info: Array<SearchFilterCriteria & Partial<{
|
|
89
|
-
path:
|
|
103
|
+
path: 'duration_seconds' | 'has_audio';
|
|
90
104
|
}>>;
|
|
91
105
|
file: Array<SearchFilterCriteria & Partial<{
|
|
92
|
-
path:
|
|
106
|
+
path: 'bytes' | 'filename' | 'uri' | 'created_at' | 'id';
|
|
93
107
|
}>>;
|
|
94
108
|
}>;
|
|
95
109
|
type SearchFilterCriteria = {
|
|
96
110
|
path: string;
|
|
97
|
-
operator:
|
|
111
|
+
operator: 'NotEqual' | 'Equal' | 'LessThan' | 'GreaterThan' | 'ContainsAny' | 'ContainsAll' | 'In' | 'Like';
|
|
98
112
|
valueText?: string | undefined;
|
|
99
113
|
valueTextArray?: Array<string> | undefined;
|
|
100
114
|
};
|
|
115
|
+
type SearchResponseList = {
|
|
116
|
+
object: 'list';
|
|
117
|
+
data: Array<{
|
|
118
|
+
id: string;
|
|
119
|
+
object: 'search';
|
|
120
|
+
query?: string | undefined;
|
|
121
|
+
scope: 'file' | 'segment' | 'face';
|
|
122
|
+
group_by_key?: 'file' | undefined;
|
|
123
|
+
group_count?: number | undefined;
|
|
124
|
+
search_modalities?: SearchModalities | undefined;
|
|
125
|
+
total: number;
|
|
126
|
+
limit: number;
|
|
127
|
+
}>;
|
|
128
|
+
total: number;
|
|
129
|
+
limit: number;
|
|
130
|
+
offset: number;
|
|
131
|
+
};
|
|
101
132
|
declare const SearchFilterCriteria: z.ZodType<SearchFilterCriteria>;
|
|
102
133
|
declare const SearchFilter: z.ZodType<SearchFilter>;
|
|
103
|
-
declare const SearchModalities: z.ZodArray<z.ZodEnum<["general_content", "speech_lexical", "ocr_lexical"]>, "many">;
|
|
134
|
+
declare const SearchModalities: z.ZodArray<z.ZodEnum<["general_content", "speech_lexical", "ocr_lexical", "tag_semantic", "tag_lexical"]>, "many">;
|
|
135
|
+
declare const SearchResponseList: z.ZodType<SearchResponseList>;
|
|
136
|
+
declare const SearchTagResponse: z.ZodType<SearchTagResponse>;
|
|
104
137
|
declare const FileSearchResult: z.ZodType<FileSearchResult>;
|
|
105
138
|
declare const SegmentSearchResult: z.ZodType<SegmentSearchResult>;
|
|
106
139
|
declare const FaceSearchResult: z.ZodType<FaceSearchResult>;
|
|
@@ -110,7 +143,9 @@ declare const SearchResponse: z.ZodType<SearchResponse>;
|
|
|
110
143
|
export declare const schemas: {
|
|
111
144
|
SearchFilterCriteria: z.ZodType<SearchFilterCriteria, z.ZodTypeDef, SearchFilterCriteria>;
|
|
112
145
|
SearchFilter: z.ZodType<Partial<{
|
|
113
|
-
metadata: Array<SearchFilterCriteria
|
|
146
|
+
metadata: Array<SearchFilterCriteria & Partial<{
|
|
147
|
+
scope: "file" | "segment";
|
|
148
|
+
}>>;
|
|
114
149
|
video_info: Array<SearchFilterCriteria & Partial<{
|
|
115
150
|
path: "duration_seconds" | "has_audio";
|
|
116
151
|
}>>;
|
|
@@ -118,7 +153,9 @@ export declare const schemas: {
|
|
|
118
153
|
path: "bytes" | "filename" | "uri" | "created_at" | "id";
|
|
119
154
|
}>>;
|
|
120
155
|
}>, z.ZodTypeDef, Partial<{
|
|
121
|
-
metadata: Array<SearchFilterCriteria
|
|
156
|
+
metadata: Array<SearchFilterCriteria & Partial<{
|
|
157
|
+
scope: "file" | "segment";
|
|
158
|
+
}>>;
|
|
122
159
|
video_info: Array<SearchFilterCriteria & Partial<{
|
|
123
160
|
path: "duration_seconds" | "has_audio";
|
|
124
161
|
}>>;
|
|
@@ -126,7 +163,7 @@ export declare const schemas: {
|
|
|
126
163
|
path: "bytes" | "filename" | "uri" | "created_at" | "id";
|
|
127
164
|
}>>;
|
|
128
165
|
}>>;
|
|
129
|
-
SearchModalities: z.ZodArray<z.ZodEnum<["general_content", "speech_lexical", "ocr_lexical"]>, "many">;
|
|
166
|
+
SearchModalities: z.ZodArray<z.ZodEnum<["general_content", "speech_lexical", "ocr_lexical", "tag_semantic", "tag_lexical"]>, "many">;
|
|
130
167
|
SearchRequest: z.ZodType<Partial<{
|
|
131
168
|
scope: "file" | "segment" | "face";
|
|
132
169
|
collections: Array<string>;
|
|
@@ -141,6 +178,7 @@ export declare const schemas: {
|
|
|
141
178
|
group_by_key: "file";
|
|
142
179
|
sort_by: "score" | "item_count";
|
|
143
180
|
search_modalities: SearchModalities;
|
|
181
|
+
label_filters: Array<string>;
|
|
144
182
|
}>, z.ZodTypeDef, Partial<{
|
|
145
183
|
scope: "file" | "segment" | "face";
|
|
146
184
|
collections: Array<string>;
|
|
@@ -155,6 +193,17 @@ export declare const schemas: {
|
|
|
155
193
|
group_by_key: "file";
|
|
156
194
|
sort_by: "score" | "item_count";
|
|
157
195
|
search_modalities: SearchModalities;
|
|
196
|
+
label_filters: Array<string>;
|
|
197
|
+
}>>;
|
|
198
|
+
SearchResponseList: z.ZodType<SearchResponseList, z.ZodTypeDef, SearchResponseList>;
|
|
199
|
+
SearchTagResponse: z.ZodType<Partial<{
|
|
200
|
+
id: string;
|
|
201
|
+
value: string;
|
|
202
|
+
label: string;
|
|
203
|
+
}>, z.ZodTypeDef, Partial<{
|
|
204
|
+
id: string;
|
|
205
|
+
value: string;
|
|
206
|
+
label: string;
|
|
158
207
|
}>>;
|
|
159
208
|
FileSearchResult: z.ZodType<FileSearchResult, z.ZodTypeDef, FileSearchResult>;
|
|
160
209
|
SegmentSearchResult: z.ZodType<SegmentSearchResult, z.ZodTypeDef, SegmentSearchResult>;
|
|
@@ -187,6 +236,7 @@ export declare const SearchApi: import("@zodios/core").ZodiosInstance<[{
|
|
|
187
236
|
group_by_key: "file";
|
|
188
237
|
sort_by: "score" | "item_count";
|
|
189
238
|
search_modalities: SearchModalities;
|
|
239
|
+
label_filters: Array<string>;
|
|
190
240
|
}>, z.ZodTypeDef, Partial<{
|
|
191
241
|
scope: "file" | "segment" | "face";
|
|
192
242
|
collections: Array<string>;
|
|
@@ -201,6 +251,7 @@ export declare const SearchApi: import("@zodios/core").ZodiosInstance<[{
|
|
|
201
251
|
group_by_key: "file";
|
|
202
252
|
sort_by: "score" | "item_count";
|
|
203
253
|
search_modalities: SearchModalities;
|
|
254
|
+
label_filters: Array<string>;
|
|
204
255
|
}>>;
|
|
205
256
|
}];
|
|
206
257
|
response: z.ZodType<SearchResponse, z.ZodTypeDef, SearchResponse>;
|
|
@@ -235,6 +286,76 @@ export declare const SearchApi: import("@zodios/core").ZodiosInstance<[{
|
|
|
235
286
|
error: z.ZodString;
|
|
236
287
|
}, z.ZodTypeAny, "passthrough">>;
|
|
237
288
|
}];
|
|
289
|
+
}, {
|
|
290
|
+
method: "get";
|
|
291
|
+
path: "/search";
|
|
292
|
+
alias: "getSearch";
|
|
293
|
+
description: "Get a list of search responses. Order by `created_at` in descending order by default.";
|
|
294
|
+
requestFormat: "json";
|
|
295
|
+
parameters: [{
|
|
296
|
+
name: "limit";
|
|
297
|
+
type: "Query";
|
|
298
|
+
schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
299
|
+
}, {
|
|
300
|
+
name: "offset";
|
|
301
|
+
type: "Query";
|
|
302
|
+
schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
303
|
+
}];
|
|
304
|
+
response: z.ZodType<SearchResponseList, z.ZodTypeDef, SearchResponseList>;
|
|
305
|
+
errors: [{
|
|
306
|
+
status: 404;
|
|
307
|
+
description: string;
|
|
308
|
+
schema: z.ZodObject<{
|
|
309
|
+
error: z.ZodString;
|
|
310
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
311
|
+
error: z.ZodString;
|
|
312
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
313
|
+
error: z.ZodString;
|
|
314
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
315
|
+
}, {
|
|
316
|
+
status: 500;
|
|
317
|
+
description: string;
|
|
318
|
+
schema: z.ZodObject<{
|
|
319
|
+
error: z.ZodString;
|
|
320
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
321
|
+
error: z.ZodString;
|
|
322
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
323
|
+
error: z.ZodString;
|
|
324
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
325
|
+
}];
|
|
326
|
+
}, {
|
|
327
|
+
method: "get";
|
|
328
|
+
path: "/search/:search_id";
|
|
329
|
+
alias: "getSearchById";
|
|
330
|
+
description: "Get a search response by search_id. ";
|
|
331
|
+
requestFormat: "json";
|
|
332
|
+
parameters: [{
|
|
333
|
+
name: "search_id";
|
|
334
|
+
type: "Path";
|
|
335
|
+
schema: z.ZodString;
|
|
336
|
+
}];
|
|
337
|
+
response: z.ZodType<SearchResponse, z.ZodTypeDef, SearchResponse>;
|
|
338
|
+
errors: [{
|
|
339
|
+
status: 404;
|
|
340
|
+
description: string;
|
|
341
|
+
schema: z.ZodObject<{
|
|
342
|
+
error: z.ZodString;
|
|
343
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
344
|
+
error: z.ZodString;
|
|
345
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
346
|
+
error: z.ZodString;
|
|
347
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
348
|
+
}, {
|
|
349
|
+
status: 500;
|
|
350
|
+
description: string;
|
|
351
|
+
schema: z.ZodObject<{
|
|
352
|
+
error: z.ZodString;
|
|
353
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
354
|
+
error: z.ZodString;
|
|
355
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
356
|
+
error: z.ZodString;
|
|
357
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
358
|
+
}];
|
|
238
359
|
}]>;
|
|
239
360
|
export declare function createApiClient(baseUrl: string, options?: ZodiosOptions): import("@zodios/core").ZodiosInstance<[{
|
|
240
361
|
method: "post";
|
|
@@ -260,6 +381,7 @@ export declare function createApiClient(baseUrl: string, options?: ZodiosOptions
|
|
|
260
381
|
group_by_key: "file";
|
|
261
382
|
sort_by: "score" | "item_count";
|
|
262
383
|
search_modalities: SearchModalities;
|
|
384
|
+
label_filters: Array<string>;
|
|
263
385
|
}>, z.ZodTypeDef, Partial<{
|
|
264
386
|
scope: "file" | "segment" | "face";
|
|
265
387
|
collections: Array<string>;
|
|
@@ -274,6 +396,7 @@ export declare function createApiClient(baseUrl: string, options?: ZodiosOptions
|
|
|
274
396
|
group_by_key: "file";
|
|
275
397
|
sort_by: "score" | "item_count";
|
|
276
398
|
search_modalities: SearchModalities;
|
|
399
|
+
label_filters: Array<string>;
|
|
277
400
|
}>>;
|
|
278
401
|
}];
|
|
279
402
|
response: z.ZodType<SearchResponse, z.ZodTypeDef, SearchResponse>;
|
|
@@ -308,5 +431,75 @@ export declare function createApiClient(baseUrl: string, options?: ZodiosOptions
|
|
|
308
431
|
error: z.ZodString;
|
|
309
432
|
}, z.ZodTypeAny, "passthrough">>;
|
|
310
433
|
}];
|
|
434
|
+
}, {
|
|
435
|
+
method: "get";
|
|
436
|
+
path: "/search";
|
|
437
|
+
alias: "getSearch";
|
|
438
|
+
description: "Get a list of search responses. Order by `created_at` in descending order by default.";
|
|
439
|
+
requestFormat: "json";
|
|
440
|
+
parameters: [{
|
|
441
|
+
name: "limit";
|
|
442
|
+
type: "Query";
|
|
443
|
+
schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
444
|
+
}, {
|
|
445
|
+
name: "offset";
|
|
446
|
+
type: "Query";
|
|
447
|
+
schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
448
|
+
}];
|
|
449
|
+
response: z.ZodType<SearchResponseList, z.ZodTypeDef, SearchResponseList>;
|
|
450
|
+
errors: [{
|
|
451
|
+
status: 404;
|
|
452
|
+
description: string;
|
|
453
|
+
schema: z.ZodObject<{
|
|
454
|
+
error: z.ZodString;
|
|
455
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
456
|
+
error: z.ZodString;
|
|
457
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
458
|
+
error: z.ZodString;
|
|
459
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
460
|
+
}, {
|
|
461
|
+
status: 500;
|
|
462
|
+
description: string;
|
|
463
|
+
schema: z.ZodObject<{
|
|
464
|
+
error: z.ZodString;
|
|
465
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
466
|
+
error: z.ZodString;
|
|
467
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
468
|
+
error: z.ZodString;
|
|
469
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
470
|
+
}];
|
|
471
|
+
}, {
|
|
472
|
+
method: "get";
|
|
473
|
+
path: "/search/:search_id";
|
|
474
|
+
alias: "getSearchById";
|
|
475
|
+
description: "Get a search response by search_id. ";
|
|
476
|
+
requestFormat: "json";
|
|
477
|
+
parameters: [{
|
|
478
|
+
name: "search_id";
|
|
479
|
+
type: "Path";
|
|
480
|
+
schema: z.ZodString;
|
|
481
|
+
}];
|
|
482
|
+
response: z.ZodType<SearchResponse, z.ZodTypeDef, SearchResponse>;
|
|
483
|
+
errors: [{
|
|
484
|
+
status: 404;
|
|
485
|
+
description: string;
|
|
486
|
+
schema: z.ZodObject<{
|
|
487
|
+
error: z.ZodString;
|
|
488
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
489
|
+
error: z.ZodString;
|
|
490
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
491
|
+
error: z.ZodString;
|
|
492
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
493
|
+
}, {
|
|
494
|
+
status: 500;
|
|
495
|
+
description: string;
|
|
496
|
+
schema: z.ZodObject<{
|
|
497
|
+
error: z.ZodString;
|
|
498
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
499
|
+
error: z.ZodString;
|
|
500
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
501
|
+
error: z.ZodString;
|
|
502
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
503
|
+
}];
|
|
311
504
|
}]>;
|
|
312
505
|
export {};
|
package/dist/generated/Search.js
CHANGED
|
@@ -8,14 +8,14 @@ const SearchFilterCriteria = zod_1.z
|
|
|
8
8
|
.object({
|
|
9
9
|
path: zod_1.z.string(),
|
|
10
10
|
operator: zod_1.z.enum([
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
'NotEqual',
|
|
12
|
+
'Equal',
|
|
13
|
+
'LessThan',
|
|
14
|
+
'GreaterThan',
|
|
15
|
+
'ContainsAny',
|
|
16
|
+
'ContainsAll',
|
|
17
|
+
'In',
|
|
18
|
+
'Like',
|
|
19
19
|
]),
|
|
20
20
|
valueText: zod_1.z.string().optional(),
|
|
21
21
|
valueTextArray: zod_1.z.array(zod_1.z.string()).optional(),
|
|
@@ -24,15 +24,19 @@ const SearchFilterCriteria = zod_1.z
|
|
|
24
24
|
.passthrough();
|
|
25
25
|
const SearchFilter = zod_1.z
|
|
26
26
|
.object({
|
|
27
|
-
metadata: zod_1.z.array(SearchFilterCriteria
|
|
27
|
+
metadata: zod_1.z.array(SearchFilterCriteria.and(zod_1.z
|
|
28
|
+
.object({ scope: zod_1.z.enum(['file', 'segment']).default('file') })
|
|
29
|
+
.partial()
|
|
30
|
+
.strict()
|
|
31
|
+
.passthrough())),
|
|
28
32
|
video_info: zod_1.z.array(SearchFilterCriteria.and(zod_1.z
|
|
29
|
-
.object({ path: zod_1.z.enum([
|
|
33
|
+
.object({ path: zod_1.z.enum(['duration_seconds', 'has_audio']) })
|
|
30
34
|
.partial()
|
|
31
35
|
.strict()
|
|
32
36
|
.passthrough())),
|
|
33
37
|
file: zod_1.z.array(SearchFilterCriteria.and(zod_1.z
|
|
34
38
|
.object({
|
|
35
|
-
path: zod_1.z.enum([
|
|
39
|
+
path: zod_1.z.enum(['bytes', 'filename', 'uri', 'created_at', 'id']),
|
|
36
40
|
})
|
|
37
41
|
.partial()
|
|
38
42
|
.strict()
|
|
@@ -41,10 +45,16 @@ const SearchFilter = zod_1.z
|
|
|
41
45
|
.partial()
|
|
42
46
|
.strict()
|
|
43
47
|
.passthrough();
|
|
44
|
-
const SearchModalities = zod_1.z.array(zod_1.z.enum([
|
|
48
|
+
const SearchModalities = zod_1.z.array(zod_1.z.enum([
|
|
49
|
+
'general_content',
|
|
50
|
+
'speech_lexical',
|
|
51
|
+
'ocr_lexical',
|
|
52
|
+
'tag_semantic',
|
|
53
|
+
'tag_lexical',
|
|
54
|
+
]));
|
|
45
55
|
const SearchRequest = zod_1.z
|
|
46
56
|
.object({
|
|
47
|
-
scope: zod_1.z.enum([
|
|
57
|
+
scope: zod_1.z.enum(['file', 'segment', 'face']),
|
|
48
58
|
collections: zod_1.z.array(zod_1.z.string().uuid()).min(1),
|
|
49
59
|
query: zod_1.z.string().min(1),
|
|
50
60
|
source_image: zod_1.z
|
|
@@ -55,16 +65,45 @@ const SearchRequest = zod_1.z
|
|
|
55
65
|
limit: zod_1.z.number().int().gte(1).default(10),
|
|
56
66
|
filter: SearchFilter,
|
|
57
67
|
threshold: zod_1.z.number(),
|
|
58
|
-
group_by_key: zod_1.z.literal(
|
|
59
|
-
sort_by: zod_1.z.enum([
|
|
68
|
+
group_by_key: zod_1.z.literal('file'),
|
|
69
|
+
sort_by: zod_1.z.enum(['score', 'item_count']).default('score'),
|
|
60
70
|
search_modalities: SearchModalities,
|
|
71
|
+
label_filters: zod_1.z.array(zod_1.z.string()),
|
|
61
72
|
})
|
|
62
73
|
.partial()
|
|
63
74
|
.strict()
|
|
64
75
|
.passthrough();
|
|
76
|
+
const SearchResponseList = zod_1.z
|
|
77
|
+
.object({
|
|
78
|
+
object: zod_1.z.literal('list'),
|
|
79
|
+
data: zod_1.z.array(zod_1.z
|
|
80
|
+
.object({
|
|
81
|
+
id: zod_1.z.string().uuid(),
|
|
82
|
+
object: zod_1.z.literal('search'),
|
|
83
|
+
query: zod_1.z.string().optional(),
|
|
84
|
+
scope: zod_1.z.enum(['file', 'segment', 'face']),
|
|
85
|
+
group_by_key: zod_1.z.literal('file').optional(),
|
|
86
|
+
group_count: zod_1.z.number().int().optional(),
|
|
87
|
+
search_modalities: SearchModalities.optional(),
|
|
88
|
+
total: zod_1.z.number().int(),
|
|
89
|
+
limit: zod_1.z.number().int(),
|
|
90
|
+
})
|
|
91
|
+
.strict()
|
|
92
|
+
.passthrough()),
|
|
93
|
+
total: zod_1.z.number().int(),
|
|
94
|
+
limit: zod_1.z.number().int(),
|
|
95
|
+
offset: zod_1.z.number().int(),
|
|
96
|
+
})
|
|
97
|
+
.strict()
|
|
98
|
+
.passthrough();
|
|
99
|
+
const SearchTagResponse = zod_1.z
|
|
100
|
+
.object({ id: zod_1.z.string().uuid(), value: zod_1.z.string(), label: zod_1.z.string() })
|
|
101
|
+
.partial()
|
|
102
|
+
.strict()
|
|
103
|
+
.passthrough();
|
|
65
104
|
const FileSearchResult = zod_1.z
|
|
66
105
|
.object({
|
|
67
|
-
type: zod_1.z.literal(
|
|
106
|
+
type: zod_1.z.literal('file'),
|
|
68
107
|
file_id: zod_1.z.string().uuid(),
|
|
69
108
|
collection_id: zod_1.z.string().uuid(),
|
|
70
109
|
id: zod_1.z.string().uuid(),
|
|
@@ -73,12 +112,13 @@ const FileSearchResult = zod_1.z
|
|
|
73
112
|
summary: zod_1.z.string().nullish(),
|
|
74
113
|
generated_title: zod_1.z.string().nullish(),
|
|
75
114
|
thumbnail_url: zod_1.z.string().url().optional(),
|
|
115
|
+
tag: SearchTagResponse.optional(),
|
|
76
116
|
})
|
|
77
117
|
.strict()
|
|
78
118
|
.passthrough();
|
|
79
119
|
const SegmentSearchResult = zod_1.z
|
|
80
120
|
.object({
|
|
81
|
-
type: zod_1.z.literal(
|
|
121
|
+
type: zod_1.z.literal('segment'),
|
|
82
122
|
file_id: zod_1.z.string().uuid(),
|
|
83
123
|
collection_id: zod_1.z.string().uuid(),
|
|
84
124
|
segment_id: zod_1.z.string().uuid(),
|
|
@@ -123,12 +163,24 @@ const SegmentSearchResult = zod_1.z
|
|
|
123
163
|
.passthrough())
|
|
124
164
|
.optional(),
|
|
125
165
|
thumbnail_url: zod_1.z.string().url().optional(),
|
|
166
|
+
tag: SearchTagResponse.optional(),
|
|
167
|
+
metadata: zod_1.z.object({}).partial().strict().passthrough().optional(),
|
|
168
|
+
keyframes: zod_1.z
|
|
169
|
+
.array(zod_1.z
|
|
170
|
+
.object({
|
|
171
|
+
time_in_seconds: zod_1.z.number(),
|
|
172
|
+
thumbnail_url: zod_1.z.string().url(),
|
|
173
|
+
})
|
|
174
|
+
.partial()
|
|
175
|
+
.strict()
|
|
176
|
+
.passthrough())
|
|
177
|
+
.optional(),
|
|
126
178
|
})
|
|
127
179
|
.strict()
|
|
128
180
|
.passthrough();
|
|
129
181
|
const FaceSearchResult = zod_1.z
|
|
130
182
|
.object({
|
|
131
|
-
type: zod_1.z.literal(
|
|
183
|
+
type: zod_1.z.literal('face'),
|
|
132
184
|
file_id: zod_1.z.string().uuid(),
|
|
133
185
|
collection_id: zod_1.z.string().uuid(),
|
|
134
186
|
face_id: zod_1.z.string().uuid(),
|
|
@@ -151,7 +203,7 @@ const FaceSearchResult = zod_1.z
|
|
|
151
203
|
.passthrough();
|
|
152
204
|
const SegmentGroupResult = zod_1.z
|
|
153
205
|
.object({
|
|
154
|
-
type: zod_1.z.literal(
|
|
206
|
+
type: zod_1.z.literal('segment_group'),
|
|
155
207
|
matched_items: zod_1.z.array(SegmentSearchResult),
|
|
156
208
|
file_id: zod_1.z.string().uuid(),
|
|
157
209
|
item_count: zod_1.z.number().int(),
|
|
@@ -161,7 +213,7 @@ const SegmentGroupResult = zod_1.z
|
|
|
161
213
|
.passthrough();
|
|
162
214
|
const FaceGroupResult = zod_1.z
|
|
163
215
|
.object({
|
|
164
|
-
type: zod_1.z.literal(
|
|
216
|
+
type: zod_1.z.literal('face_group'),
|
|
165
217
|
matched_items: zod_1.z.array(FaceSearchResult),
|
|
166
218
|
file_id: zod_1.z.string().uuid(),
|
|
167
219
|
item_count: zod_1.z.number().int(),
|
|
@@ -172,10 +224,10 @@ const FaceGroupResult = zod_1.z
|
|
|
172
224
|
const SearchResponse = zod_1.z
|
|
173
225
|
.object({
|
|
174
226
|
id: zod_1.z.string().uuid(),
|
|
175
|
-
object: zod_1.z.literal(
|
|
227
|
+
object: zod_1.z.literal('search'),
|
|
176
228
|
query: zod_1.z.string().optional(),
|
|
177
|
-
scope: zod_1.z.enum([
|
|
178
|
-
group_by_key: zod_1.z.literal(
|
|
229
|
+
scope: zod_1.z.enum(['file', 'segment', 'face']),
|
|
230
|
+
group_by_key: zod_1.z.literal('file').optional(),
|
|
179
231
|
group_count: zod_1.z.number().int().optional(),
|
|
180
232
|
search_modalities: SearchModalities.optional(),
|
|
181
233
|
results: zod_1.z.array(zod_1.z.union([
|
|
@@ -195,6 +247,8 @@ exports.schemas = {
|
|
|
195
247
|
SearchFilter,
|
|
196
248
|
SearchModalities,
|
|
197
249
|
SearchRequest,
|
|
250
|
+
SearchResponseList,
|
|
251
|
+
SearchTagResponse,
|
|
198
252
|
FileSearchResult,
|
|
199
253
|
SegmentSearchResult,
|
|
200
254
|
FaceSearchResult,
|
|
@@ -204,16 +258,16 @@ exports.schemas = {
|
|
|
204
258
|
};
|
|
205
259
|
const endpoints = (0, core_1.makeApi)([
|
|
206
260
|
{
|
|
207
|
-
method:
|
|
208
|
-
path:
|
|
209
|
-
alias:
|
|
261
|
+
method: 'post',
|
|
262
|
+
path: '/search',
|
|
263
|
+
alias: 'searchContent',
|
|
210
264
|
description: `Search for videos or video segments in collections to find relevant videos or moments/clips in a video`,
|
|
211
|
-
requestFormat:
|
|
265
|
+
requestFormat: 'json',
|
|
212
266
|
parameters: [
|
|
213
267
|
{
|
|
214
|
-
name:
|
|
268
|
+
name: 'body',
|
|
215
269
|
description: `Search parameters`,
|
|
216
|
-
type:
|
|
270
|
+
type: 'Body',
|
|
217
271
|
schema: SearchRequest,
|
|
218
272
|
},
|
|
219
273
|
],
|
|
@@ -236,8 +290,67 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
236
290
|
},
|
|
237
291
|
],
|
|
238
292
|
},
|
|
293
|
+
{
|
|
294
|
+
method: 'get',
|
|
295
|
+
path: '/search',
|
|
296
|
+
alias: 'getSearch',
|
|
297
|
+
description: `Get a list of search responses. Order by `created_at` in descending order by default.`,
|
|
298
|
+
requestFormat: 'json',
|
|
299
|
+
parameters: [
|
|
300
|
+
{
|
|
301
|
+
name: 'limit',
|
|
302
|
+
type: 'Query',
|
|
303
|
+
schema: zod_1.z.number().int().gte(1).lte(100).optional().default(50),
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
name: 'offset',
|
|
307
|
+
type: 'Query',
|
|
308
|
+
schema: zod_1.z.number().int().gte(0).optional().default(0),
|
|
309
|
+
},
|
|
310
|
+
],
|
|
311
|
+
response: SearchResponseList,
|
|
312
|
+
errors: [
|
|
313
|
+
{
|
|
314
|
+
status: 404,
|
|
315
|
+
description: `Search not found`,
|
|
316
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
status: 500,
|
|
320
|
+
description: `An unexpected error occurred on the server`,
|
|
321
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
322
|
+
},
|
|
323
|
+
],
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
method: 'get',
|
|
327
|
+
path: '/search/:search_id',
|
|
328
|
+
alias: 'getSearchById',
|
|
329
|
+
description: `Get a search response by search_id. `,
|
|
330
|
+
requestFormat: 'json',
|
|
331
|
+
parameters: [
|
|
332
|
+
{
|
|
333
|
+
name: 'search_id',
|
|
334
|
+
type: 'Path',
|
|
335
|
+
schema: zod_1.z.string().uuid(),
|
|
336
|
+
},
|
|
337
|
+
],
|
|
338
|
+
response: SearchResponse,
|
|
339
|
+
errors: [
|
|
340
|
+
{
|
|
341
|
+
status: 404,
|
|
342
|
+
description: `Search response not found`,
|
|
343
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
status: 500,
|
|
347
|
+
description: `An unexpected error occurred on the server`,
|
|
348
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
349
|
+
},
|
|
350
|
+
],
|
|
351
|
+
},
|
|
239
352
|
]);
|
|
240
|
-
exports.SearchApi = new core_1.Zodios(
|
|
353
|
+
exports.SearchApi = new core_1.Zodios('https://api.cloudglue.dev/v1', endpoints);
|
|
241
354
|
function createApiClient(baseUrl, options) {
|
|
242
355
|
return new core_1.Zodios(baseUrl, endpoints, options);
|
|
243
356
|
}
|