@aviaryhq/cloudglue-js 0.1.9 → 0.2.0
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/Collections.d.ts +6967 -1192
- package/dist/generated/Collections.js +256 -1
- package/dist/generated/Describe.d.ts +178 -6841
- package/dist/generated/Describe.js +138 -48
- package/dist/generated/index.d.ts +1 -0
- package/dist/generated/index.js +3 -1
- package/dist/src/client.d.ts +1078 -231
- package/dist/src/client.js +64 -2
- package/dist/src/types.d.ts +18 -0
- package/package.json +1 -1
|
@@ -41,6 +41,17 @@ const Collection = zod_1.z
|
|
|
41
41
|
.strict()
|
|
42
42
|
.passthrough()
|
|
43
43
|
.optional(),
|
|
44
|
+
describe_config: zod_1.z
|
|
45
|
+
.object({
|
|
46
|
+
enable_summary: zod_1.z.boolean().default(true),
|
|
47
|
+
enable_speech: zod_1.z.boolean().default(true),
|
|
48
|
+
enable_scene_text: zod_1.z.boolean().default(true),
|
|
49
|
+
enable_visual_scene_description: zod_1.z.boolean().default(true),
|
|
50
|
+
})
|
|
51
|
+
.partial()
|
|
52
|
+
.strict()
|
|
53
|
+
.passthrough()
|
|
54
|
+
.optional(),
|
|
44
55
|
default_segmentation_config: common_1.SegmentationConfig.optional(),
|
|
45
56
|
default_thumbnails_config: common_2.ThumbnailsConfig.optional(),
|
|
46
57
|
created_at: zod_1.z.number().int(),
|
|
@@ -50,7 +61,11 @@ const Collection = zod_1.z
|
|
|
50
61
|
.passthrough();
|
|
51
62
|
const NewCollection = zod_1.z
|
|
52
63
|
.object({
|
|
53
|
-
collection_type: zod_1.z.enum([
|
|
64
|
+
collection_type: zod_1.z.enum([
|
|
65
|
+
"entities",
|
|
66
|
+
"rich-transcripts",
|
|
67
|
+
"media-descriptions",
|
|
68
|
+
]),
|
|
54
69
|
name: zod_1.z.string(),
|
|
55
70
|
description: zod_1.z.union([zod_1.z.string(), zod_1.z.null()]).optional(),
|
|
56
71
|
extract_config: zod_1.z
|
|
@@ -75,6 +90,17 @@ const NewCollection = zod_1.z
|
|
|
75
90
|
.strict()
|
|
76
91
|
.passthrough()
|
|
77
92
|
.optional(),
|
|
93
|
+
describe_config: zod_1.z
|
|
94
|
+
.object({
|
|
95
|
+
enable_summary: zod_1.z.boolean().default(true),
|
|
96
|
+
enable_speech: zod_1.z.boolean().default(true),
|
|
97
|
+
enable_scene_text: zod_1.z.boolean().default(true),
|
|
98
|
+
enable_visual_scene_description: zod_1.z.boolean().default(true),
|
|
99
|
+
})
|
|
100
|
+
.partial()
|
|
101
|
+
.strict()
|
|
102
|
+
.passthrough()
|
|
103
|
+
.optional(),
|
|
78
104
|
default_segmentation_config: common_1.SegmentationConfig.optional(),
|
|
79
105
|
default_thumbnails_config: common_2.ThumbnailsConfig.optional(),
|
|
80
106
|
})
|
|
@@ -331,6 +357,124 @@ const CollectionRichTranscriptsList = zod_1.z
|
|
|
331
357
|
})
|
|
332
358
|
.strict()
|
|
333
359
|
.passthrough();
|
|
360
|
+
const CollectionMediaDescriptionsList = zod_1.z
|
|
361
|
+
.object({
|
|
362
|
+
object: zod_1.z.literal("list"),
|
|
363
|
+
data: zod_1.z.array(zod_1.z
|
|
364
|
+
.object({
|
|
365
|
+
file_id: zod_1.z.string(),
|
|
366
|
+
added_at: zod_1.z.number().int(),
|
|
367
|
+
object: zod_1.z.literal("collection_file"),
|
|
368
|
+
data: zod_1.z
|
|
369
|
+
.object({
|
|
370
|
+
content: zod_1.z.string(),
|
|
371
|
+
title: zod_1.z.string(),
|
|
372
|
+
summary: zod_1.z.string(),
|
|
373
|
+
speech: zod_1.z.array(zod_1.z
|
|
374
|
+
.object({
|
|
375
|
+
text: zod_1.z.string(),
|
|
376
|
+
start_time: zod_1.z.number(),
|
|
377
|
+
end_time: zod_1.z.number(),
|
|
378
|
+
})
|
|
379
|
+
.partial()
|
|
380
|
+
.strict()
|
|
381
|
+
.passthrough()),
|
|
382
|
+
visual_scene_description: zod_1.z.array(zod_1.z
|
|
383
|
+
.object({
|
|
384
|
+
text: zod_1.z.string(),
|
|
385
|
+
start_time: zod_1.z.number(),
|
|
386
|
+
end_time: zod_1.z.number(),
|
|
387
|
+
})
|
|
388
|
+
.partial()
|
|
389
|
+
.strict()
|
|
390
|
+
.passthrough()),
|
|
391
|
+
scene_text: zod_1.z.array(zod_1.z
|
|
392
|
+
.object({
|
|
393
|
+
text: zod_1.z.string(),
|
|
394
|
+
start_time: zod_1.z.number(),
|
|
395
|
+
end_time: zod_1.z.number(),
|
|
396
|
+
})
|
|
397
|
+
.partial()
|
|
398
|
+
.strict()
|
|
399
|
+
.passthrough()),
|
|
400
|
+
segment_summary: zod_1.z.array(zod_1.z
|
|
401
|
+
.object({
|
|
402
|
+
title: zod_1.z.string(),
|
|
403
|
+
summary: zod_1.z.string(),
|
|
404
|
+
start_time: zod_1.z.number(),
|
|
405
|
+
end_time: zod_1.z.number(),
|
|
406
|
+
})
|
|
407
|
+
.partial()
|
|
408
|
+
.strict()
|
|
409
|
+
.passthrough()),
|
|
410
|
+
})
|
|
411
|
+
.partial()
|
|
412
|
+
.strict()
|
|
413
|
+
.passthrough(),
|
|
414
|
+
})
|
|
415
|
+
.strict()
|
|
416
|
+
.passthrough()),
|
|
417
|
+
total: zod_1.z.number().int(),
|
|
418
|
+
limit: zod_1.z.number().int(),
|
|
419
|
+
offset: zod_1.z.number().int(),
|
|
420
|
+
})
|
|
421
|
+
.strict()
|
|
422
|
+
.passthrough();
|
|
423
|
+
const MediaDescription = zod_1.z
|
|
424
|
+
.object({
|
|
425
|
+
collection_id: zod_1.z.string(),
|
|
426
|
+
file_id: zod_1.z.string(),
|
|
427
|
+
content: zod_1.z.string().optional(),
|
|
428
|
+
title: zod_1.z.string().optional(),
|
|
429
|
+
summary: zod_1.z.string().optional(),
|
|
430
|
+
speech: zod_1.z
|
|
431
|
+
.array(zod_1.z
|
|
432
|
+
.object({
|
|
433
|
+
text: zod_1.z.string(),
|
|
434
|
+
start_time: zod_1.z.number(),
|
|
435
|
+
end_time: zod_1.z.number(),
|
|
436
|
+
})
|
|
437
|
+
.partial()
|
|
438
|
+
.strict()
|
|
439
|
+
.passthrough())
|
|
440
|
+
.optional(),
|
|
441
|
+
visual_scene_description: zod_1.z
|
|
442
|
+
.array(zod_1.z
|
|
443
|
+
.object({
|
|
444
|
+
text: zod_1.z.string(),
|
|
445
|
+
start_time: zod_1.z.number(),
|
|
446
|
+
end_time: zod_1.z.number(),
|
|
447
|
+
})
|
|
448
|
+
.partial()
|
|
449
|
+
.strict()
|
|
450
|
+
.passthrough())
|
|
451
|
+
.optional(),
|
|
452
|
+
scene_text: zod_1.z
|
|
453
|
+
.array(zod_1.z
|
|
454
|
+
.object({
|
|
455
|
+
text: zod_1.z.string(),
|
|
456
|
+
start_time: zod_1.z.number(),
|
|
457
|
+
end_time: zod_1.z.number(),
|
|
458
|
+
})
|
|
459
|
+
.partial()
|
|
460
|
+
.strict()
|
|
461
|
+
.passthrough())
|
|
462
|
+
.optional(),
|
|
463
|
+
segment_summary: zod_1.z
|
|
464
|
+
.array(zod_1.z
|
|
465
|
+
.object({
|
|
466
|
+
title: zod_1.z.string(),
|
|
467
|
+
summary: zod_1.z.string(),
|
|
468
|
+
start_time: zod_1.z.number(),
|
|
469
|
+
end_time: zod_1.z.number(),
|
|
470
|
+
})
|
|
471
|
+
.partial()
|
|
472
|
+
.strict()
|
|
473
|
+
.passthrough())
|
|
474
|
+
.optional(),
|
|
475
|
+
})
|
|
476
|
+
.strict()
|
|
477
|
+
.passthrough();
|
|
334
478
|
exports.schemas = {
|
|
335
479
|
Collection,
|
|
336
480
|
NewCollection,
|
|
@@ -345,6 +489,8 @@ exports.schemas = {
|
|
|
345
489
|
RichTranscript,
|
|
346
490
|
CollectionEntitiesList,
|
|
347
491
|
CollectionRichTranscriptsList,
|
|
492
|
+
CollectionMediaDescriptionsList,
|
|
493
|
+
MediaDescription,
|
|
348
494
|
};
|
|
349
495
|
const endpoints = (0, core_1.makeApi)([
|
|
350
496
|
{
|
|
@@ -901,6 +1047,115 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
901
1047
|
},
|
|
902
1048
|
],
|
|
903
1049
|
},
|
|
1050
|
+
{
|
|
1051
|
+
method: "get",
|
|
1052
|
+
path: "/collections/:collection_id/media-descriptions",
|
|
1053
|
+
alias: "listCollectionMediaDescriptions",
|
|
1054
|
+
description: `List all media description data for files in a collection. This API is only available when a collection is created with collection_type 'media-descriptions'`,
|
|
1055
|
+
requestFormat: "json",
|
|
1056
|
+
parameters: [
|
|
1057
|
+
{
|
|
1058
|
+
name: "collection_id",
|
|
1059
|
+
type: "Path",
|
|
1060
|
+
schema: zod_1.z.string(),
|
|
1061
|
+
},
|
|
1062
|
+
{
|
|
1063
|
+
name: "limit",
|
|
1064
|
+
type: "Query",
|
|
1065
|
+
schema: zod_1.z.number().int().lte(100).optional().default(20),
|
|
1066
|
+
},
|
|
1067
|
+
{
|
|
1068
|
+
name: "offset",
|
|
1069
|
+
type: "Query",
|
|
1070
|
+
schema: zod_1.z.number().int().optional().default(0),
|
|
1071
|
+
},
|
|
1072
|
+
{
|
|
1073
|
+
name: "order",
|
|
1074
|
+
type: "Query",
|
|
1075
|
+
schema: zod_1.z.enum(["added_at", "filename"]).optional().default("added_at"),
|
|
1076
|
+
},
|
|
1077
|
+
{
|
|
1078
|
+
name: "sort",
|
|
1079
|
+
type: "Query",
|
|
1080
|
+
schema: zod_1.z.enum(["asc", "desc"]).optional().default("desc"),
|
|
1081
|
+
},
|
|
1082
|
+
{
|
|
1083
|
+
name: "added_before",
|
|
1084
|
+
type: "Query",
|
|
1085
|
+
schema: zod_1.z.string().optional(),
|
|
1086
|
+
},
|
|
1087
|
+
{
|
|
1088
|
+
name: "added_after",
|
|
1089
|
+
type: "Query",
|
|
1090
|
+
schema: zod_1.z.string().optional(),
|
|
1091
|
+
},
|
|
1092
|
+
{
|
|
1093
|
+
name: "response_format",
|
|
1094
|
+
type: "Query",
|
|
1095
|
+
schema: zod_1.z.enum(["json", "markdown"]).optional().default("json"),
|
|
1096
|
+
},
|
|
1097
|
+
],
|
|
1098
|
+
response: CollectionMediaDescriptionsList,
|
|
1099
|
+
errors: [
|
|
1100
|
+
{
|
|
1101
|
+
status: 400,
|
|
1102
|
+
description: `Collection type is not 'media-descriptions'`,
|
|
1103
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
1104
|
+
},
|
|
1105
|
+
{
|
|
1106
|
+
status: 404,
|
|
1107
|
+
description: `Collection not found`,
|
|
1108
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
1109
|
+
},
|
|
1110
|
+
{
|
|
1111
|
+
status: 500,
|
|
1112
|
+
description: `An unexpected error occurred on the server`,
|
|
1113
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
1114
|
+
},
|
|
1115
|
+
],
|
|
1116
|
+
},
|
|
1117
|
+
{
|
|
1118
|
+
method: "get",
|
|
1119
|
+
path: "/collections/:collection_id/videos/:file_id/media-descriptions",
|
|
1120
|
+
alias: "getMediaDescriptions",
|
|
1121
|
+
description: `Retrieve media description data for a specific file in a collection. This API is only available when the collection is created with collection_type 'media-descriptions'`,
|
|
1122
|
+
requestFormat: "json",
|
|
1123
|
+
parameters: [
|
|
1124
|
+
{
|
|
1125
|
+
name: "collection_id",
|
|
1126
|
+
type: "Path",
|
|
1127
|
+
schema: zod_1.z.string(),
|
|
1128
|
+
},
|
|
1129
|
+
{
|
|
1130
|
+
name: "file_id",
|
|
1131
|
+
type: "Path",
|
|
1132
|
+
schema: zod_1.z.string(),
|
|
1133
|
+
},
|
|
1134
|
+
{
|
|
1135
|
+
name: "response_format",
|
|
1136
|
+
type: "Query",
|
|
1137
|
+
schema: zod_1.z.enum(["json", "markdown"]).optional().default("json"),
|
|
1138
|
+
},
|
|
1139
|
+
],
|
|
1140
|
+
response: MediaDescription,
|
|
1141
|
+
errors: [
|
|
1142
|
+
{
|
|
1143
|
+
status: 400,
|
|
1144
|
+
description: `Collection type is not 'media-descriptions'`,
|
|
1145
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
1146
|
+
},
|
|
1147
|
+
{
|
|
1148
|
+
status: 404,
|
|
1149
|
+
description: `Collection or file not found`,
|
|
1150
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
1151
|
+
},
|
|
1152
|
+
{
|
|
1153
|
+
status: 500,
|
|
1154
|
+
description: `An unexpected error occurred on the server`,
|
|
1155
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
1156
|
+
},
|
|
1157
|
+
],
|
|
1158
|
+
},
|
|
904
1159
|
]);
|
|
905
1160
|
exports.CollectionsApi = new core_1.Zodios("https://api.cloudglue.dev/v1", endpoints);
|
|
906
1161
|
function createApiClient(baseUrl, options) {
|