@aviaryhq/cloudglue-js 0.4.12 → 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/Files.d.ts +392 -0
- package/dist/generated/Files.js +35 -0
- package/dist/generated/Search.d.ts +36 -6
- package/dist/generated/Search.js +22 -2
- package/dist/generated/Tags.d.ts +660 -0
- package/dist/generated/Tags.js +160 -0
- package/dist/generated/common.d.ts +140 -0
- package/dist/generated/common.js +26 -1
- package/dist/generated/index.d.ts +1 -0
- package/dist/generated/index.js +3 -1
- package/dist/src/api/files.api.d.ts +34 -0
- package/dist/src/api/files.api.js +10 -0
- package/dist/src/api/search.api.d.ts +37 -3
- package/dist/src/api/tags.api.d.ts +71 -0
- package/dist/src/api/tags.api.js +31 -0
- package/dist/src/client.d.ts +6 -0
- package/dist/src/client.js +6 -1
- package/dist/src/types.d.ts +5 -0
- package/package.json +1 -1
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TagsApi = exports.schemas = void 0;
|
|
4
|
+
exports.createApiClient = createApiClient;
|
|
5
|
+
const core_1 = require("@zodios/core");
|
|
6
|
+
const zod_1 = require("zod");
|
|
7
|
+
const common_1 = require("./common");
|
|
8
|
+
const common_2 = require("./common");
|
|
9
|
+
const CreateVideoTagRequest = zod_1.z
|
|
10
|
+
.object({
|
|
11
|
+
label: zod_1.z.string(),
|
|
12
|
+
value: zod_1.z.string(),
|
|
13
|
+
file_id: zod_1.z.string().uuid(),
|
|
14
|
+
segment_id: zod_1.z.string().uuid().optional(),
|
|
15
|
+
})
|
|
16
|
+
.strict()
|
|
17
|
+
.passthrough();
|
|
18
|
+
const UpdateVideoTagRequest = zod_1.z
|
|
19
|
+
.object({ label: zod_1.z.string(), value: zod_1.z.string() })
|
|
20
|
+
.partial()
|
|
21
|
+
.strict()
|
|
22
|
+
.passthrough();
|
|
23
|
+
exports.schemas = {
|
|
24
|
+
CreateVideoTagRequest,
|
|
25
|
+
UpdateVideoTagRequest,
|
|
26
|
+
};
|
|
27
|
+
const endpoints = (0, core_1.makeApi)([
|
|
28
|
+
{
|
|
29
|
+
method: 'post',
|
|
30
|
+
path: '/tags',
|
|
31
|
+
alias: 'createTag',
|
|
32
|
+
description: `Create a new tag`,
|
|
33
|
+
requestFormat: 'json',
|
|
34
|
+
parameters: [
|
|
35
|
+
{
|
|
36
|
+
name: 'body',
|
|
37
|
+
description: `Tag creation parameters`,
|
|
38
|
+
type: 'Body',
|
|
39
|
+
schema: CreateVideoTagRequest,
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
response: common_1.VideoTag,
|
|
43
|
+
errors: [
|
|
44
|
+
{
|
|
45
|
+
status: 400,
|
|
46
|
+
description: `Invalid request or missing required label/value`,
|
|
47
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
status: 404,
|
|
51
|
+
description: `File not found`,
|
|
52
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
status: 429,
|
|
56
|
+
description: `Resource limits exceeded (total tags per file or segment)`,
|
|
57
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
status: 500,
|
|
61
|
+
description: `An unexpected error occurred on the server`,
|
|
62
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
method: 'get',
|
|
68
|
+
path: '/tags',
|
|
69
|
+
alias: 'listTags',
|
|
70
|
+
description: `List all tags`,
|
|
71
|
+
requestFormat: 'json',
|
|
72
|
+
parameters: [
|
|
73
|
+
{
|
|
74
|
+
name: 'type',
|
|
75
|
+
type: 'Query',
|
|
76
|
+
schema: zod_1.z.enum(['file', 'segment']).optional(),
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: 'limit',
|
|
80
|
+
type: 'Query',
|
|
81
|
+
schema: zod_1.z.number().int().lte(100).optional().default(50),
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: 'offset',
|
|
85
|
+
type: 'Query',
|
|
86
|
+
schema: zod_1.z.number().int().optional().default(0),
|
|
87
|
+
},
|
|
88
|
+
],
|
|
89
|
+
response: common_2.ListVideoTagsResponse,
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
method: 'get',
|
|
93
|
+
path: '/tags/:tag_id',
|
|
94
|
+
alias: 'getTag',
|
|
95
|
+
description: `Get a tag`,
|
|
96
|
+
requestFormat: 'json',
|
|
97
|
+
parameters: [
|
|
98
|
+
{
|
|
99
|
+
name: 'tag_id',
|
|
100
|
+
type: 'Path',
|
|
101
|
+
schema: zod_1.z.string(),
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
response: common_1.VideoTag,
|
|
105
|
+
errors: [
|
|
106
|
+
{
|
|
107
|
+
status: 404,
|
|
108
|
+
description: `Tag not found`,
|
|
109
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
method: 'delete',
|
|
115
|
+
path: '/tags/:tag_id',
|
|
116
|
+
alias: 'deleteTag',
|
|
117
|
+
description: `Delete a tag`,
|
|
118
|
+
requestFormat: 'json',
|
|
119
|
+
parameters: [
|
|
120
|
+
{
|
|
121
|
+
name: 'tag_id',
|
|
122
|
+
type: 'Path',
|
|
123
|
+
schema: zod_1.z.string(),
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
response: zod_1.z.object({ id: zod_1.z.string() }).strict().passthrough(),
|
|
127
|
+
errors: [
|
|
128
|
+
{
|
|
129
|
+
status: 404,
|
|
130
|
+
description: `Tag not found`,
|
|
131
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
method: 'put',
|
|
137
|
+
path: '/tags/:tag_id',
|
|
138
|
+
alias: 'updateTag',
|
|
139
|
+
description: `Update a tag`,
|
|
140
|
+
requestFormat: 'json',
|
|
141
|
+
parameters: [
|
|
142
|
+
{
|
|
143
|
+
name: 'body',
|
|
144
|
+
description: `Tag update parameters. At least one of label or value is required.`,
|
|
145
|
+
type: 'Body',
|
|
146
|
+
schema: UpdateVideoTagRequest,
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
name: 'tag_id',
|
|
150
|
+
type: 'Path',
|
|
151
|
+
schema: zod_1.z.string(),
|
|
152
|
+
},
|
|
153
|
+
],
|
|
154
|
+
response: common_1.VideoTag,
|
|
155
|
+
},
|
|
156
|
+
]);
|
|
157
|
+
exports.TagsApi = new core_1.Zodios('https://api.cloudglue.dev/v1', endpoints);
|
|
158
|
+
function createApiClient(baseUrl, options) {
|
|
159
|
+
return new core_1.Zodios(baseUrl, endpoints, options);
|
|
160
|
+
}
|
|
@@ -153,6 +153,146 @@ export type FaceBoundingBox = {
|
|
|
153
153
|
top: number;
|
|
154
154
|
left: number;
|
|
155
155
|
};
|
|
156
|
+
export type ListVideoTagsResponse = PaginationResponse & Partial<{
|
|
157
|
+
data: Array<VideoTag>;
|
|
158
|
+
}>;
|
|
159
|
+
export type PaginationResponse = {
|
|
160
|
+
object: 'list';
|
|
161
|
+
total: number;
|
|
162
|
+
limit: number;
|
|
163
|
+
offset: number;
|
|
164
|
+
};
|
|
165
|
+
export type VideoTag = {
|
|
166
|
+
id: string;
|
|
167
|
+
label: string;
|
|
168
|
+
value: string;
|
|
169
|
+
type: 'file' | 'segment';
|
|
170
|
+
file_id: string;
|
|
171
|
+
segment_id?: string | undefined;
|
|
172
|
+
};
|
|
173
|
+
export declare const VideoTag: z.ZodObject<{
|
|
174
|
+
id: z.ZodString;
|
|
175
|
+
label: z.ZodString;
|
|
176
|
+
value: z.ZodString;
|
|
177
|
+
type: z.ZodEnum<["file", "segment"]>;
|
|
178
|
+
file_id: z.ZodString;
|
|
179
|
+
segment_id: z.ZodOptional<z.ZodString>;
|
|
180
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
181
|
+
id: z.ZodString;
|
|
182
|
+
label: z.ZodString;
|
|
183
|
+
value: z.ZodString;
|
|
184
|
+
type: z.ZodEnum<["file", "segment"]>;
|
|
185
|
+
file_id: z.ZodString;
|
|
186
|
+
segment_id: z.ZodOptional<z.ZodString>;
|
|
187
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
188
|
+
id: z.ZodString;
|
|
189
|
+
label: z.ZodString;
|
|
190
|
+
value: z.ZodString;
|
|
191
|
+
type: z.ZodEnum<["file", "segment"]>;
|
|
192
|
+
file_id: z.ZodString;
|
|
193
|
+
segment_id: z.ZodOptional<z.ZodString>;
|
|
194
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
195
|
+
export declare const PaginationResponse: z.ZodObject<{
|
|
196
|
+
object: z.ZodLiteral<"list">;
|
|
197
|
+
total: z.ZodNumber;
|
|
198
|
+
limit: z.ZodNumber;
|
|
199
|
+
offset: z.ZodNumber;
|
|
200
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
201
|
+
object: z.ZodLiteral<"list">;
|
|
202
|
+
total: z.ZodNumber;
|
|
203
|
+
limit: z.ZodNumber;
|
|
204
|
+
offset: z.ZodNumber;
|
|
205
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
206
|
+
object: z.ZodLiteral<"list">;
|
|
207
|
+
total: z.ZodNumber;
|
|
208
|
+
limit: z.ZodNumber;
|
|
209
|
+
offset: z.ZodNumber;
|
|
210
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
211
|
+
export declare const ListVideoTagsResponse: z.ZodIntersection<z.ZodObject<{
|
|
212
|
+
object: z.ZodLiteral<"list">;
|
|
213
|
+
total: z.ZodNumber;
|
|
214
|
+
limit: z.ZodNumber;
|
|
215
|
+
offset: z.ZodNumber;
|
|
216
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
217
|
+
object: z.ZodLiteral<"list">;
|
|
218
|
+
total: z.ZodNumber;
|
|
219
|
+
limit: z.ZodNumber;
|
|
220
|
+
offset: z.ZodNumber;
|
|
221
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
222
|
+
object: z.ZodLiteral<"list">;
|
|
223
|
+
total: z.ZodNumber;
|
|
224
|
+
limit: z.ZodNumber;
|
|
225
|
+
offset: z.ZodNumber;
|
|
226
|
+
}, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
|
|
227
|
+
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
228
|
+
id: z.ZodString;
|
|
229
|
+
label: z.ZodString;
|
|
230
|
+
value: z.ZodString;
|
|
231
|
+
type: z.ZodEnum<["file", "segment"]>;
|
|
232
|
+
file_id: z.ZodString;
|
|
233
|
+
segment_id: z.ZodOptional<z.ZodString>;
|
|
234
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
235
|
+
id: z.ZodString;
|
|
236
|
+
label: z.ZodString;
|
|
237
|
+
value: z.ZodString;
|
|
238
|
+
type: z.ZodEnum<["file", "segment"]>;
|
|
239
|
+
file_id: z.ZodString;
|
|
240
|
+
segment_id: z.ZodOptional<z.ZodString>;
|
|
241
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
242
|
+
id: z.ZodString;
|
|
243
|
+
label: z.ZodString;
|
|
244
|
+
value: z.ZodString;
|
|
245
|
+
type: z.ZodEnum<["file", "segment"]>;
|
|
246
|
+
file_id: z.ZodString;
|
|
247
|
+
segment_id: z.ZodOptional<z.ZodString>;
|
|
248
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
249
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
250
|
+
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
251
|
+
id: z.ZodString;
|
|
252
|
+
label: z.ZodString;
|
|
253
|
+
value: z.ZodString;
|
|
254
|
+
type: z.ZodEnum<["file", "segment"]>;
|
|
255
|
+
file_id: z.ZodString;
|
|
256
|
+
segment_id: z.ZodOptional<z.ZodString>;
|
|
257
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
258
|
+
id: z.ZodString;
|
|
259
|
+
label: z.ZodString;
|
|
260
|
+
value: z.ZodString;
|
|
261
|
+
type: z.ZodEnum<["file", "segment"]>;
|
|
262
|
+
file_id: z.ZodString;
|
|
263
|
+
segment_id: z.ZodOptional<z.ZodString>;
|
|
264
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
265
|
+
id: z.ZodString;
|
|
266
|
+
label: z.ZodString;
|
|
267
|
+
value: z.ZodString;
|
|
268
|
+
type: z.ZodEnum<["file", "segment"]>;
|
|
269
|
+
file_id: z.ZodString;
|
|
270
|
+
segment_id: z.ZodOptional<z.ZodString>;
|
|
271
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
272
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
273
|
+
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
274
|
+
id: z.ZodString;
|
|
275
|
+
label: z.ZodString;
|
|
276
|
+
value: z.ZodString;
|
|
277
|
+
type: z.ZodEnum<["file", "segment"]>;
|
|
278
|
+
file_id: z.ZodString;
|
|
279
|
+
segment_id: z.ZodOptional<z.ZodString>;
|
|
280
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
281
|
+
id: z.ZodString;
|
|
282
|
+
label: z.ZodString;
|
|
283
|
+
value: z.ZodString;
|
|
284
|
+
type: z.ZodEnum<["file", "segment"]>;
|
|
285
|
+
file_id: z.ZodString;
|
|
286
|
+
segment_id: z.ZodOptional<z.ZodString>;
|
|
287
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
288
|
+
id: z.ZodString;
|
|
289
|
+
label: z.ZodString;
|
|
290
|
+
value: z.ZodString;
|
|
291
|
+
type: z.ZodEnum<["file", "segment"]>;
|
|
292
|
+
file_id: z.ZodString;
|
|
293
|
+
segment_id: z.ZodOptional<z.ZodString>;
|
|
294
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
295
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
156
296
|
export declare const ThumbnailsConfig: z.ZodObject<{
|
|
157
297
|
enable_segment_thumbnails: z.ZodBoolean;
|
|
158
298
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
package/dist/generated/common.js
CHANGED
|
@@ -1,7 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FaceBoundingBox = exports.FrameExtraction = exports.FrameExtractionConfig = exports.FrameExtractionThumbnailsConfig = exports.FrameExtractionUniformConfig = exports.DescribeOutput = exports.SpeechOutputPart = exports.DescribeOutputPart = exports.ThumbnailList = exports.Thumbnail = exports.ThumbnailType = exports.Segmentation = exports.Shot = exports.File = exports.FileSegmentationConfig = exports.SegmentationConfig = exports.KeyframeConfig = exports.SegmentationManualConfig = exports.SegmentationShotDetectorConfig = exports.SegmentationUniformConfig = exports.ThumbnailsConfig = void 0;
|
|
3
|
+
exports.FaceBoundingBox = exports.FrameExtraction = exports.FrameExtractionConfig = exports.FrameExtractionThumbnailsConfig = exports.FrameExtractionUniformConfig = exports.DescribeOutput = exports.SpeechOutputPart = exports.DescribeOutputPart = exports.ThumbnailList = exports.Thumbnail = exports.ThumbnailType = exports.Segmentation = exports.Shot = exports.File = exports.FileSegmentationConfig = exports.SegmentationConfig = exports.KeyframeConfig = exports.SegmentationManualConfig = exports.SegmentationShotDetectorConfig = exports.SegmentationUniformConfig = exports.ThumbnailsConfig = exports.ListVideoTagsResponse = exports.PaginationResponse = exports.VideoTag = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
exports.VideoTag = zod_1.z
|
|
6
|
+
.object({
|
|
7
|
+
id: zod_1.z.string().uuid(),
|
|
8
|
+
label: zod_1.z.string(),
|
|
9
|
+
value: zod_1.z.string(),
|
|
10
|
+
type: zod_1.z.enum(['file', 'segment']),
|
|
11
|
+
file_id: zod_1.z.string().uuid(),
|
|
12
|
+
segment_id: zod_1.z.string().uuid().optional(),
|
|
13
|
+
})
|
|
14
|
+
.strict()
|
|
15
|
+
.passthrough();
|
|
16
|
+
exports.PaginationResponse = zod_1.z
|
|
17
|
+
.object({
|
|
18
|
+
object: zod_1.z.literal('list'),
|
|
19
|
+
total: zod_1.z.number().int(),
|
|
20
|
+
limit: zod_1.z.number().int(),
|
|
21
|
+
offset: zod_1.z.number().int(),
|
|
22
|
+
})
|
|
23
|
+
.strict()
|
|
24
|
+
.passthrough();
|
|
25
|
+
exports.ListVideoTagsResponse = exports.PaginationResponse.and(zod_1.z
|
|
26
|
+
.object({ data: zod_1.z.array(exports.VideoTag) })
|
|
27
|
+
.partial()
|
|
28
|
+
.strict()
|
|
29
|
+
.passthrough());
|
|
5
30
|
exports.ThumbnailsConfig = zod_1.z
|
|
6
31
|
.object({ enable_segment_thumbnails: zod_1.z.boolean() })
|
|
7
32
|
.strict()
|
package/dist/generated/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Face_DetectionApi = exports.Face_MatchApi = exports.SegmentsApi = exports.FramesApi = exports.SegmentationsApi = exports.SearchApi = exports.WebhooksApi = exports.DescribeApi = exports.TranscribeApi = exports.ChatApi = exports.CollectionsApi = exports.FilesApi = exports.ExtractApi = void 0;
|
|
3
|
+
exports.Face_DetectionApi = exports.Face_MatchApi = exports.SegmentsApi = exports.FramesApi = exports.SegmentationsApi = exports.SearchApi = exports.WebhooksApi = exports.DescribeApi = exports.TranscribeApi = exports.ChatApi = exports.CollectionsApi = exports.FilesApi = exports.ExtractApi = exports.TagsApi = void 0;
|
|
4
|
+
var Tags_1 = require("./Tags");
|
|
5
|
+
Object.defineProperty(exports, "TagsApi", { enumerable: true, get: function () { return Tags_1.TagsApi; } });
|
|
4
6
|
var Extract_1 = require("./Extract");
|
|
5
7
|
Object.defineProperty(exports, "ExtractApi", { enumerable: true, get: function () { return Extract_1.ExtractApi; } });
|
|
6
8
|
var Files_1 = require("./Files");
|
|
@@ -628,6 +628,40 @@ export declare class EnhancedFilesApi {
|
|
|
628
628
|
metadata: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
629
629
|
segmentation_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
630
630
|
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
631
|
+
getFileTags(fileId: string): Promise<{
|
|
632
|
+
object: "list";
|
|
633
|
+
total: number;
|
|
634
|
+
limit: number;
|
|
635
|
+
offset: number;
|
|
636
|
+
} & {
|
|
637
|
+
[k: string]: unknown;
|
|
638
|
+
} & {
|
|
639
|
+
data?: import("zod").objectOutputType<{
|
|
640
|
+
id: import("zod").ZodString;
|
|
641
|
+
label: import("zod").ZodString;
|
|
642
|
+
value: import("zod").ZodString;
|
|
643
|
+
type: import("zod").ZodEnum<["file", "segment"]>;
|
|
644
|
+
file_id: import("zod").ZodString;
|
|
645
|
+
segment_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
646
|
+
}, import("zod").ZodTypeAny, "passthrough">[] | undefined;
|
|
647
|
+
}>;
|
|
648
|
+
getFileSegmentTags(fileId: string, segmentId: string): Promise<{
|
|
649
|
+
object: "list";
|
|
650
|
+
total: number;
|
|
651
|
+
limit: number;
|
|
652
|
+
offset: number;
|
|
653
|
+
} & {
|
|
654
|
+
[k: string]: unknown;
|
|
655
|
+
} & {
|
|
656
|
+
data?: import("zod").objectOutputType<{
|
|
657
|
+
id: import("zod").ZodString;
|
|
658
|
+
label: import("zod").ZodString;
|
|
659
|
+
value: import("zod").ZodString;
|
|
660
|
+
type: import("zod").ZodEnum<["file", "segment"]>;
|
|
661
|
+
file_id: import("zod").ZodString;
|
|
662
|
+
segment_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
663
|
+
}, import("zod").ZodTypeAny, "passthrough">[] | undefined;
|
|
664
|
+
}>;
|
|
631
665
|
/**
|
|
632
666
|
* Waits for a file to finish processing by polling the getFile endpoint until the file
|
|
633
667
|
* reaches a terminal state (completed, failed, or not_applicable) or until maxAttempts is reached.
|
|
@@ -105,6 +105,16 @@ class EnhancedFilesApi {
|
|
|
105
105
|
params: { file_id: fileId, segment_id: segmentId },
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
|
+
async getFileTags(fileId) {
|
|
109
|
+
return this.api.listFileTags({
|
|
110
|
+
params: { file_id: fileId },
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
async getFileSegmentTags(fileId, segmentId) {
|
|
114
|
+
return this.api.listFileSegmentTags({
|
|
115
|
+
params: { file_id: fileId, segment_id: segmentId },
|
|
116
|
+
});
|
|
117
|
+
}
|
|
108
118
|
/**
|
|
109
119
|
* Waits for a file to finish processing by polling the getFile endpoint until the file
|
|
110
120
|
* reaches a terminal state (completed, failed, or not_applicable) or until maxAttempts is reached.
|
|
@@ -10,7 +10,7 @@ export declare class EnhancedSearchApi {
|
|
|
10
10
|
scope: "file" | "segment" | "face";
|
|
11
11
|
group_by_key?: "file" | undefined;
|
|
12
12
|
group_count?: number | undefined;
|
|
13
|
-
search_modalities?: ("general_content" | "speech_lexical" | "ocr_lexical")[] | undefined;
|
|
13
|
+
search_modalities?: ("general_content" | "speech_lexical" | "ocr_lexical" | "tag_semantic" | "tag_lexical")[] | undefined;
|
|
14
14
|
results: Array<{
|
|
15
15
|
type: "file";
|
|
16
16
|
file_id: string;
|
|
@@ -21,6 +21,11 @@ export declare class EnhancedSearchApi {
|
|
|
21
21
|
summary?: (string | null) | undefined;
|
|
22
22
|
generated_title?: (string | null) | undefined;
|
|
23
23
|
thumbnail_url?: string | undefined;
|
|
24
|
+
tag?: Partial<{
|
|
25
|
+
id: string;
|
|
26
|
+
value: string;
|
|
27
|
+
label: string;
|
|
28
|
+
}> | undefined;
|
|
24
29
|
} | {
|
|
25
30
|
type: "segment";
|
|
26
31
|
file_id: string;
|
|
@@ -49,6 +54,12 @@ export declare class EnhancedSearchApi {
|
|
|
49
54
|
end_time: number;
|
|
50
55
|
}>> | undefined;
|
|
51
56
|
thumbnail_url?: string | undefined;
|
|
57
|
+
tag?: Partial<{
|
|
58
|
+
id: string;
|
|
59
|
+
value: string;
|
|
60
|
+
label: string;
|
|
61
|
+
}> | undefined;
|
|
62
|
+
metadata?: {} | undefined;
|
|
52
63
|
keyframes?: Array<Partial<{
|
|
53
64
|
time_in_seconds: number;
|
|
54
65
|
thumbnail_url: string;
|
|
@@ -98,6 +109,12 @@ export declare class EnhancedSearchApi {
|
|
|
98
109
|
end_time: number;
|
|
99
110
|
}>> | undefined;
|
|
100
111
|
thumbnail_url?: string | undefined;
|
|
112
|
+
tag?: Partial<{
|
|
113
|
+
id: string;
|
|
114
|
+
value: string;
|
|
115
|
+
label: string;
|
|
116
|
+
}> | undefined;
|
|
117
|
+
metadata?: {} | undefined;
|
|
101
118
|
keyframes?: Array<Partial<{
|
|
102
119
|
time_in_seconds: number;
|
|
103
120
|
thumbnail_url: string;
|
|
@@ -143,7 +160,7 @@ export declare class EnhancedSearchApi {
|
|
|
143
160
|
scope: "file" | "segment" | "face";
|
|
144
161
|
group_by_key?: "file" | undefined;
|
|
145
162
|
group_count?: number | undefined;
|
|
146
|
-
search_modalities?: ("general_content" | "speech_lexical" | "ocr_lexical")[] | undefined;
|
|
163
|
+
search_modalities?: ("general_content" | "speech_lexical" | "ocr_lexical" | "tag_semantic" | "tag_lexical")[] | undefined;
|
|
147
164
|
total: number;
|
|
148
165
|
limit: number;
|
|
149
166
|
}>;
|
|
@@ -158,7 +175,7 @@ export declare class EnhancedSearchApi {
|
|
|
158
175
|
scope: "file" | "segment" | "face";
|
|
159
176
|
group_by_key?: "file" | undefined;
|
|
160
177
|
group_count?: number | undefined;
|
|
161
|
-
search_modalities?: ("general_content" | "speech_lexical" | "ocr_lexical")[] | undefined;
|
|
178
|
+
search_modalities?: ("general_content" | "speech_lexical" | "ocr_lexical" | "tag_semantic" | "tag_lexical")[] | undefined;
|
|
162
179
|
results: Array<{
|
|
163
180
|
type: "file";
|
|
164
181
|
file_id: string;
|
|
@@ -169,6 +186,11 @@ export declare class EnhancedSearchApi {
|
|
|
169
186
|
summary?: (string | null) | undefined;
|
|
170
187
|
generated_title?: (string | null) | undefined;
|
|
171
188
|
thumbnail_url?: string | undefined;
|
|
189
|
+
tag?: Partial<{
|
|
190
|
+
id: string;
|
|
191
|
+
value: string;
|
|
192
|
+
label: string;
|
|
193
|
+
}> | undefined;
|
|
172
194
|
} | {
|
|
173
195
|
type: "segment";
|
|
174
196
|
file_id: string;
|
|
@@ -197,6 +219,12 @@ export declare class EnhancedSearchApi {
|
|
|
197
219
|
end_time: number;
|
|
198
220
|
}>> | undefined;
|
|
199
221
|
thumbnail_url?: string | undefined;
|
|
222
|
+
tag?: Partial<{
|
|
223
|
+
id: string;
|
|
224
|
+
value: string;
|
|
225
|
+
label: string;
|
|
226
|
+
}> | undefined;
|
|
227
|
+
metadata?: {} | undefined;
|
|
200
228
|
keyframes?: Array<Partial<{
|
|
201
229
|
time_in_seconds: number;
|
|
202
230
|
thumbnail_url: string;
|
|
@@ -246,6 +274,12 @@ export declare class EnhancedSearchApi {
|
|
|
246
274
|
end_time: number;
|
|
247
275
|
}>> | undefined;
|
|
248
276
|
thumbnail_url?: string | undefined;
|
|
277
|
+
tag?: Partial<{
|
|
278
|
+
id: string;
|
|
279
|
+
value: string;
|
|
280
|
+
label: string;
|
|
281
|
+
}> | undefined;
|
|
282
|
+
metadata?: {} | undefined;
|
|
249
283
|
keyframes?: Array<Partial<{
|
|
250
284
|
time_in_seconds: number;
|
|
251
285
|
thumbnail_url: string;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { TagsApi } from '../../generated';
|
|
2
|
+
export declare class EnhancedTagsApi {
|
|
3
|
+
private readonly api;
|
|
4
|
+
constructor(api: typeof TagsApi);
|
|
5
|
+
listTags(data: {
|
|
6
|
+
type?: 'file' | 'segment';
|
|
7
|
+
limit?: number;
|
|
8
|
+
offset?: number;
|
|
9
|
+
}): Promise<{
|
|
10
|
+
object: "list";
|
|
11
|
+
total: number;
|
|
12
|
+
limit: number;
|
|
13
|
+
offset: number;
|
|
14
|
+
} & {
|
|
15
|
+
[k: string]: unknown;
|
|
16
|
+
} & {
|
|
17
|
+
data?: import("zod").objectOutputType<{
|
|
18
|
+
id: import("zod").ZodString;
|
|
19
|
+
label: import("zod").ZodString;
|
|
20
|
+
value: import("zod").ZodString;
|
|
21
|
+
type: import("zod").ZodEnum<["file", "segment"]>;
|
|
22
|
+
file_id: import("zod").ZodString;
|
|
23
|
+
segment_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
24
|
+
}, import("zod").ZodTypeAny, "passthrough">[] | undefined;
|
|
25
|
+
}>;
|
|
26
|
+
createTagForFile(fileId: string, data: {
|
|
27
|
+
label: string;
|
|
28
|
+
value: string;
|
|
29
|
+
}): Promise<import("zod").objectOutputType<{
|
|
30
|
+
id: import("zod").ZodString;
|
|
31
|
+
label: import("zod").ZodString;
|
|
32
|
+
value: import("zod").ZodString;
|
|
33
|
+
type: import("zod").ZodEnum<["file", "segment"]>;
|
|
34
|
+
file_id: import("zod").ZodString;
|
|
35
|
+
segment_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
36
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
37
|
+
createTagForFileSegment(segmentId: string, fileId: string, data: {
|
|
38
|
+
label: string;
|
|
39
|
+
value: string;
|
|
40
|
+
}): Promise<import("zod").objectOutputType<{
|
|
41
|
+
id: import("zod").ZodString;
|
|
42
|
+
label: import("zod").ZodString;
|
|
43
|
+
value: import("zod").ZodString;
|
|
44
|
+
type: import("zod").ZodEnum<["file", "segment"]>;
|
|
45
|
+
file_id: import("zod").ZodString;
|
|
46
|
+
segment_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
47
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
48
|
+
updateTag(tagId: string, data: {
|
|
49
|
+
label: string;
|
|
50
|
+
value: string;
|
|
51
|
+
type: 'file' | 'segment';
|
|
52
|
+
}): Promise<import("zod").objectOutputType<{
|
|
53
|
+
id: import("zod").ZodString;
|
|
54
|
+
label: import("zod").ZodString;
|
|
55
|
+
value: import("zod").ZodString;
|
|
56
|
+
type: import("zod").ZodEnum<["file", "segment"]>;
|
|
57
|
+
file_id: import("zod").ZodString;
|
|
58
|
+
segment_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
59
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
60
|
+
deleteTag(tagId: string): Promise<import("zod").objectOutputType<{
|
|
61
|
+
id: import("zod").ZodString;
|
|
62
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
63
|
+
getTag(tagId: string): Promise<import("zod").objectOutputType<{
|
|
64
|
+
id: import("zod").ZodString;
|
|
65
|
+
label: import("zod").ZodString;
|
|
66
|
+
value: import("zod").ZodString;
|
|
67
|
+
type: import("zod").ZodEnum<["file", "segment"]>;
|
|
68
|
+
file_id: import("zod").ZodString;
|
|
69
|
+
segment_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
70
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
71
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EnhancedTagsApi = void 0;
|
|
4
|
+
class EnhancedTagsApi {
|
|
5
|
+
constructor(api) {
|
|
6
|
+
this.api = api;
|
|
7
|
+
}
|
|
8
|
+
async listTags(data) {
|
|
9
|
+
return this.api.listTags({ queries: data });
|
|
10
|
+
}
|
|
11
|
+
async createTagForFile(fileId, data) {
|
|
12
|
+
return this.api.createTag({ file_id: fileId, ...data });
|
|
13
|
+
}
|
|
14
|
+
async createTagForFileSegment(segmentId, fileId, data) {
|
|
15
|
+
return this.api.createTag({
|
|
16
|
+
file_id: fileId,
|
|
17
|
+
segment_id: segmentId,
|
|
18
|
+
...data,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
async updateTag(tagId, data) {
|
|
22
|
+
return this.api.updateTag(data, { params: { tag_id: tagId } });
|
|
23
|
+
}
|
|
24
|
+
async deleteTag(tagId) {
|
|
25
|
+
return this.api.deleteTag(undefined, { params: { tag_id: tagId } });
|
|
26
|
+
}
|
|
27
|
+
async getTag(tagId) {
|
|
28
|
+
return this.api.getTag({ params: { tag_id: tagId } });
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.EnhancedTagsApi = EnhancedTagsApi;
|
package/dist/src/client.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CloudGlueConfig } from './types';
|
|
2
2
|
import { EnhancedWebhooksApi } from './api/webhooks.api';
|
|
3
|
+
import { EnhancedTagsApi } from './api/tags.api';
|
|
3
4
|
import { EnhancedFilesApi } from './api/files.api';
|
|
4
5
|
import { EnhancedDescribeApi } from './api/describe.api';
|
|
5
6
|
import { EnhancedExtractApi } from './api/extract.api';
|
|
@@ -81,5 +82,10 @@ export declare class CloudGlue {
|
|
|
81
82
|
* Provides methods for creating and managing webhooks
|
|
82
83
|
*/
|
|
83
84
|
readonly webhooks: EnhancedWebhooksApi;
|
|
85
|
+
/**
|
|
86
|
+
* Tags API for managing tags
|
|
87
|
+
* Provides methods for creating and managing tags
|
|
88
|
+
*/
|
|
89
|
+
readonly tags: EnhancedTagsApi;
|
|
84
90
|
constructor(config?: CloudGlueConfig);
|
|
85
91
|
}
|