@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
|
@@ -7,7 +7,7 @@ const zod_1 = require("zod");
|
|
|
7
7
|
const common_1 = require("./common");
|
|
8
8
|
const ShotConfig = zod_1.z
|
|
9
9
|
.object({
|
|
10
|
-
detector: zod_1.z.enum([
|
|
10
|
+
detector: zod_1.z.enum(['content', 'adaptive']).default('adaptive'),
|
|
11
11
|
max_duration_seconds: zod_1.z.number().int().gte(1).lte(3600).default(300),
|
|
12
12
|
min_duration_seconds: zod_1.z.number().int().gte(1).lte(3600).default(1),
|
|
13
13
|
})
|
|
@@ -17,7 +17,7 @@ const ShotConfig = zod_1.z
|
|
|
17
17
|
const NarrativeConfig = zod_1.z
|
|
18
18
|
.object({
|
|
19
19
|
prompt: zod_1.z.string(),
|
|
20
|
-
strategy: zod_1.z.enum([
|
|
20
|
+
strategy: zod_1.z.enum(['comprehensive', 'balanced']).default('balanced'),
|
|
21
21
|
number_of_chapters: zod_1.z.number().int().gte(1),
|
|
22
22
|
min_chapters: zod_1.z.number().int().gte(1),
|
|
23
23
|
max_chapters: zod_1.z.number().int().gte(1),
|
|
@@ -28,7 +28,7 @@ const NarrativeConfig = zod_1.z
|
|
|
28
28
|
const NewSegments = zod_1.z
|
|
29
29
|
.object({
|
|
30
30
|
url: zod_1.z.string(),
|
|
31
|
-
criteria: zod_1.z.enum([
|
|
31
|
+
criteria: zod_1.z.enum(['shot', 'narrative']),
|
|
32
32
|
shot_config: ShotConfig.optional(),
|
|
33
33
|
narrative_config: NarrativeConfig.optional(),
|
|
34
34
|
})
|
|
@@ -48,9 +48,9 @@ const Segments = zod_1.z
|
|
|
48
48
|
.object({
|
|
49
49
|
job_id: zod_1.z.string().uuid(),
|
|
50
50
|
file_id: zod_1.z.string().uuid(),
|
|
51
|
-
object: zod_1.z.literal(
|
|
52
|
-
status: zod_1.z.enum([
|
|
53
|
-
criteria: zod_1.z.enum([
|
|
51
|
+
object: zod_1.z.literal('segments'),
|
|
52
|
+
status: zod_1.z.enum(['pending', 'processing', 'completed', 'failed']),
|
|
53
|
+
criteria: zod_1.z.enum(['shot', 'narrative']),
|
|
54
54
|
created_at: zod_1.z.number().int(),
|
|
55
55
|
shot_config: ShotConfig.optional(),
|
|
56
56
|
narrative_config: NarrativeConfig.optional(),
|
|
@@ -65,9 +65,9 @@ const SegmentsListItem = zod_1.z
|
|
|
65
65
|
.object({
|
|
66
66
|
job_id: zod_1.z.string().uuid(),
|
|
67
67
|
file_id: zod_1.z.string().uuid(),
|
|
68
|
-
object: zod_1.z.literal(
|
|
69
|
-
status: zod_1.z.enum([
|
|
70
|
-
criteria: zod_1.z.enum([
|
|
68
|
+
object: zod_1.z.literal('segments'),
|
|
69
|
+
status: zod_1.z.enum(['pending', 'processing', 'completed', 'failed']),
|
|
70
|
+
criteria: zod_1.z.enum(['shot', 'narrative']),
|
|
71
71
|
created_at: zod_1.z.number().int(),
|
|
72
72
|
shot_config: ShotConfig.optional(),
|
|
73
73
|
narrative_config: NarrativeConfig.optional(),
|
|
@@ -76,7 +76,7 @@ const SegmentsListItem = zod_1.z
|
|
|
76
76
|
.passthrough();
|
|
77
77
|
const SegmentsList = zod_1.z
|
|
78
78
|
.object({
|
|
79
|
-
object: zod_1.z.literal(
|
|
79
|
+
object: zod_1.z.literal('list'),
|
|
80
80
|
data: zod_1.z.array(SegmentsListItem),
|
|
81
81
|
total: zod_1.z.number().int(),
|
|
82
82
|
limit: zod_1.z.number().int(),
|
|
@@ -95,9 +95,9 @@ exports.schemas = {
|
|
|
95
95
|
};
|
|
96
96
|
const endpoints = (0, core_1.makeApi)([
|
|
97
97
|
{
|
|
98
|
-
method:
|
|
99
|
-
path:
|
|
100
|
-
alias:
|
|
98
|
+
method: 'post',
|
|
99
|
+
path: '/segments',
|
|
100
|
+
alias: 'createSegments',
|
|
101
101
|
description: `Create intelligent video segments based on shot detection or narrative analysis.
|
|
102
102
|
|
|
103
103
|
**Note: YouTube URLs are supported for narrative-based segmentation only.** Shot-based segmentation requires direct video file access. Use Cloudglue Files, HTTP URLs, or files from data connectors for shot-based segmentation.
|
|
@@ -115,12 +115,12 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
115
115
|
- **min_chapters**: Minimum number of chapters. If provided with number_of_chapters and max, validates min is less than or equal to number_of_chapters which is less than or equal to max.
|
|
116
116
|
- **max_chapters**: Maximum number of chapters. If provided with number_of_chapters and min, validates min is less than or equal to number_of_chapters which is less than or equal to max.
|
|
117
117
|
- If none are provided, chapter counts are calculated automatically based on video duration.`,
|
|
118
|
-
requestFormat:
|
|
118
|
+
requestFormat: 'json',
|
|
119
119
|
parameters: [
|
|
120
120
|
{
|
|
121
|
-
name:
|
|
121
|
+
name: 'body',
|
|
122
122
|
description: `Segmentation job parameters`,
|
|
123
|
-
type:
|
|
123
|
+
type: 'Body',
|
|
124
124
|
schema: NewSegments,
|
|
125
125
|
},
|
|
126
126
|
],
|
|
@@ -149,47 +149,47 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
149
149
|
],
|
|
150
150
|
},
|
|
151
151
|
{
|
|
152
|
-
method:
|
|
153
|
-
path:
|
|
154
|
-
alias:
|
|
152
|
+
method: 'get',
|
|
153
|
+
path: '/segments',
|
|
154
|
+
alias: 'listSegments',
|
|
155
155
|
description: `List all segmentation jobs with optional filtering`,
|
|
156
|
-
requestFormat:
|
|
156
|
+
requestFormat: 'json',
|
|
157
157
|
parameters: [
|
|
158
158
|
{
|
|
159
|
-
name:
|
|
160
|
-
type:
|
|
159
|
+
name: 'limit',
|
|
160
|
+
type: 'Query',
|
|
161
161
|
schema: zod_1.z.number().int().lte(100).optional().default(50),
|
|
162
162
|
},
|
|
163
163
|
{
|
|
164
|
-
name:
|
|
165
|
-
type:
|
|
164
|
+
name: 'offset',
|
|
165
|
+
type: 'Query',
|
|
166
166
|
schema: zod_1.z.number().int().optional().default(0),
|
|
167
167
|
},
|
|
168
168
|
{
|
|
169
|
-
name:
|
|
170
|
-
type:
|
|
169
|
+
name: 'status',
|
|
170
|
+
type: 'Query',
|
|
171
171
|
schema: zod_1.z
|
|
172
|
-
.enum([
|
|
172
|
+
.enum(['pending', 'processing', 'completed', 'failed'])
|
|
173
173
|
.optional(),
|
|
174
174
|
},
|
|
175
175
|
{
|
|
176
|
-
name:
|
|
177
|
-
type:
|
|
178
|
-
schema: zod_1.z.enum([
|
|
176
|
+
name: 'criteria',
|
|
177
|
+
type: 'Query',
|
|
178
|
+
schema: zod_1.z.enum(['shot', 'narrative']).optional(),
|
|
179
179
|
},
|
|
180
180
|
{
|
|
181
|
-
name:
|
|
182
|
-
type:
|
|
181
|
+
name: 'created_before',
|
|
182
|
+
type: 'Query',
|
|
183
183
|
schema: zod_1.z.string().optional(),
|
|
184
184
|
},
|
|
185
185
|
{
|
|
186
|
-
name:
|
|
187
|
-
type:
|
|
186
|
+
name: 'created_after',
|
|
187
|
+
type: 'Query',
|
|
188
188
|
schema: zod_1.z.string().optional(),
|
|
189
189
|
},
|
|
190
190
|
{
|
|
191
|
-
name:
|
|
192
|
-
type:
|
|
191
|
+
name: 'url',
|
|
192
|
+
type: 'Query',
|
|
193
193
|
schema: zod_1.z.string().optional(),
|
|
194
194
|
},
|
|
195
195
|
],
|
|
@@ -208,15 +208,15 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
208
208
|
],
|
|
209
209
|
},
|
|
210
210
|
{
|
|
211
|
-
method:
|
|
212
|
-
path:
|
|
213
|
-
alias:
|
|
211
|
+
method: 'get',
|
|
212
|
+
path: '/segments/:job_id',
|
|
213
|
+
alias: 'getSegments',
|
|
214
214
|
description: `Retrieve the current state of a segmentation job`,
|
|
215
|
-
requestFormat:
|
|
215
|
+
requestFormat: 'json',
|
|
216
216
|
parameters: [
|
|
217
217
|
{
|
|
218
|
-
name:
|
|
219
|
-
type:
|
|
218
|
+
name: 'job_id',
|
|
219
|
+
type: 'Path',
|
|
220
220
|
schema: zod_1.z.string().uuid(),
|
|
221
221
|
},
|
|
222
222
|
],
|
|
@@ -235,15 +235,15 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
235
235
|
],
|
|
236
236
|
},
|
|
237
237
|
{
|
|
238
|
-
method:
|
|
239
|
-
path:
|
|
240
|
-
alias:
|
|
238
|
+
method: 'delete',
|
|
239
|
+
path: '/segments/:job_id',
|
|
240
|
+
alias: 'deleteSegments',
|
|
241
241
|
description: `Delete a specific segments job`,
|
|
242
|
-
requestFormat:
|
|
242
|
+
requestFormat: 'json',
|
|
243
243
|
parameters: [
|
|
244
244
|
{
|
|
245
|
-
name:
|
|
246
|
-
type:
|
|
245
|
+
name: 'job_id',
|
|
246
|
+
type: 'Path',
|
|
247
247
|
schema: zod_1.z.string().uuid(),
|
|
248
248
|
},
|
|
249
249
|
],
|
|
@@ -262,7 +262,7 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
262
262
|
],
|
|
263
263
|
},
|
|
264
264
|
]);
|
|
265
|
-
exports.SegmentsApi = new core_1.Zodios(
|
|
265
|
+
exports.SegmentsApi = new core_1.Zodios('https://api.cloudglue.dev/v1', endpoints);
|
|
266
266
|
function createApiClient(baseUrl, options) {
|
|
267
267
|
return new core_1.Zodios(baseUrl, endpoints, options);
|
|
268
268
|
}
|