@aviaryhq/cloudglue-js 0.5.9 → 0.6.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 +3 -1
- package/dist/generated/Collections.js +13 -11
- package/dist/generated/Describe.d.ts +7722 -43
- package/dist/generated/Describe.js +4 -64
- package/dist/generated/Files.d.ts +1097 -27
- package/dist/generated/Files.js +174 -0
- package/dist/generated/Response.d.ts +727 -0
- package/dist/generated/Response.js +318 -0
- package/dist/generated/Search.js +3 -3
- package/dist/generated/Segmentations.d.ts +6311 -933
- package/dist/generated/Segmentations.js +48 -0
- package/dist/generated/Segments.d.ts +4 -21
- package/dist/generated/Segments.js +8 -16
- package/dist/generated/common.d.ts +3745 -22
- package/dist/generated/common.js +86 -2
- package/dist/generated/index.d.ts +1 -0
- package/dist/generated/index.js +3 -1
- package/dist/src/api/describe.api.d.ts +1546 -109
- package/dist/src/api/files.api.d.ts +236 -3
- package/dist/src/api/files.api.js +27 -0
- package/dist/src/api/response.api.d.ts +269 -0
- package/dist/src/api/response.api.js +85 -0
- package/dist/src/api/segmentations.api.d.ts +896 -3
- package/dist/src/api/segmentations.api.js +13 -0
- package/dist/src/api/segments.api.d.ts +10 -28
- package/dist/src/client.d.ts +6 -0
- package/dist/src/client.js +6 -1
- package/dist/src/types.d.ts +42 -5
- package/package.json +1 -1
package/dist/generated/Files.js
CHANGED
|
@@ -16,6 +16,84 @@ const FileList = zod_1.z
|
|
|
16
16
|
})
|
|
17
17
|
.strict()
|
|
18
18
|
.passthrough();
|
|
19
|
+
const SegmentDescribeOutputEntry = zod_1.z
|
|
20
|
+
.object({ text: zod_1.z.string(), start_time: zod_1.z.number(), end_time: zod_1.z.number() })
|
|
21
|
+
.strict()
|
|
22
|
+
.passthrough();
|
|
23
|
+
const SegmentDescribeSpeechEntry = zod_1.z
|
|
24
|
+
.object({
|
|
25
|
+
text: zod_1.z.string(),
|
|
26
|
+
start_time: zod_1.z.number(),
|
|
27
|
+
end_time: zod_1.z.number(),
|
|
28
|
+
speaker: zod_1.z.string().optional(),
|
|
29
|
+
})
|
|
30
|
+
.strict()
|
|
31
|
+
.passthrough();
|
|
32
|
+
const SegmentDescribeJsonData = zod_1.z
|
|
33
|
+
.object({
|
|
34
|
+
visual_scene_description: zod_1.z.array(SegmentDescribeOutputEntry),
|
|
35
|
+
speech: zod_1.z.array(SegmentDescribeSpeechEntry),
|
|
36
|
+
scene_text: zod_1.z.array(SegmentDescribeOutputEntry),
|
|
37
|
+
audio_description: zod_1.z.array(SegmentDescribeOutputEntry),
|
|
38
|
+
title: zod_1.z.string(),
|
|
39
|
+
summary: zod_1.z.string(),
|
|
40
|
+
start_time: zod_1.z.number(),
|
|
41
|
+
end_time: zod_1.z.number(),
|
|
42
|
+
segment_id: zod_1.z.string().uuid(),
|
|
43
|
+
})
|
|
44
|
+
.partial()
|
|
45
|
+
.strict()
|
|
46
|
+
.passthrough();
|
|
47
|
+
const DescribeConfig = zod_1.z
|
|
48
|
+
.object({
|
|
49
|
+
enable_summary: zod_1.z.boolean().default(true),
|
|
50
|
+
enable_speech: zod_1.z.boolean().default(true),
|
|
51
|
+
enable_visual_scene_description: zod_1.z.boolean().default(true),
|
|
52
|
+
enable_scene_text: zod_1.z.boolean().default(true),
|
|
53
|
+
enable_audio_description: zod_1.z.boolean().default(false),
|
|
54
|
+
})
|
|
55
|
+
.partial()
|
|
56
|
+
.strict()
|
|
57
|
+
.passthrough();
|
|
58
|
+
const SegmentDescribeMarkdownData = zod_1.z
|
|
59
|
+
.object({ content: zod_1.z.string() })
|
|
60
|
+
.strict()
|
|
61
|
+
.passthrough();
|
|
62
|
+
const SegmentDescribe = zod_1.z
|
|
63
|
+
.object({
|
|
64
|
+
job_id: zod_1.z.string().uuid(),
|
|
65
|
+
segment_id: zod_1.z.string().uuid(),
|
|
66
|
+
status: zod_1.z.enum([
|
|
67
|
+
'pending',
|
|
68
|
+
'processing',
|
|
69
|
+
'completed',
|
|
70
|
+
'failed',
|
|
71
|
+
'not_applicable',
|
|
72
|
+
]),
|
|
73
|
+
describe_config: DescribeConfig,
|
|
74
|
+
created_at: zod_1.z.number().int(),
|
|
75
|
+
completed_at: zod_1.z.number().int().optional(),
|
|
76
|
+
start_time: zod_1.z.number(),
|
|
77
|
+
end_time: zod_1.z.number(),
|
|
78
|
+
file_id: zod_1.z.string().uuid(),
|
|
79
|
+
segmentation_id: zod_1.z.string().uuid().optional(),
|
|
80
|
+
data: zod_1.z
|
|
81
|
+
.union([SegmentDescribeJsonData, SegmentDescribeMarkdownData])
|
|
82
|
+
.optional(),
|
|
83
|
+
object: zod_1.z.literal('segment_describe'),
|
|
84
|
+
})
|
|
85
|
+
.strict()
|
|
86
|
+
.passthrough();
|
|
87
|
+
const SegmentDescribeListResponse = zod_1.z
|
|
88
|
+
.object({
|
|
89
|
+
object: zod_1.z.literal('list'),
|
|
90
|
+
data: zod_1.z.array(SegmentDescribe),
|
|
91
|
+
total: zod_1.z.number().int(),
|
|
92
|
+
limit: zod_1.z.number().int(),
|
|
93
|
+
offset: zod_1.z.number().int(),
|
|
94
|
+
})
|
|
95
|
+
.strict()
|
|
96
|
+
.passthrough();
|
|
19
97
|
const SegmentationListItem = zod_1.z
|
|
20
98
|
.object({
|
|
21
99
|
segmentation_id: zod_1.z.string().uuid(),
|
|
@@ -110,6 +188,13 @@ const createFileSegmentation_Body = common_2.SegmentationConfig;
|
|
|
110
188
|
const createFileFrameExtraction_Body = common_2.FrameExtractionConfig;
|
|
111
189
|
exports.schemas = {
|
|
112
190
|
FileList,
|
|
191
|
+
SegmentDescribeOutputEntry,
|
|
192
|
+
SegmentDescribeSpeechEntry,
|
|
193
|
+
SegmentDescribeJsonData,
|
|
194
|
+
DescribeConfig,
|
|
195
|
+
SegmentDescribeMarkdownData,
|
|
196
|
+
SegmentDescribe,
|
|
197
|
+
SegmentDescribeListResponse,
|
|
113
198
|
SegmentationListItem,
|
|
114
199
|
SegmentationList,
|
|
115
200
|
FrameExtractionList,
|
|
@@ -586,6 +671,95 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
586
671
|
],
|
|
587
672
|
response: common_2.ListVideoTagsResponse,
|
|
588
673
|
},
|
|
674
|
+
{
|
|
675
|
+
method: 'get',
|
|
676
|
+
path: '/files/:file_id/segments/:segment_id/describes',
|
|
677
|
+
alias: 'listFileSegmentDescribes',
|
|
678
|
+
description: `List all describe outputs for a specific file segment`,
|
|
679
|
+
requestFormat: 'json',
|
|
680
|
+
parameters: [
|
|
681
|
+
{
|
|
682
|
+
name: 'file_id',
|
|
683
|
+
type: 'Path',
|
|
684
|
+
schema: zod_1.z.string().uuid(),
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
name: 'segment_id',
|
|
688
|
+
type: 'Path',
|
|
689
|
+
schema: zod_1.z.string().uuid(),
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
name: 'status',
|
|
693
|
+
type: 'Query',
|
|
694
|
+
schema: zod_1.z.string().optional().default('completed'),
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
name: 'response_format',
|
|
698
|
+
type: 'Query',
|
|
699
|
+
schema: zod_1.z.enum(['json', 'markdown']).optional().default('json'),
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
name: 'include_data',
|
|
703
|
+
type: 'Query',
|
|
704
|
+
schema: zod_1.z.boolean().optional().default(false),
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
name: 'limit',
|
|
708
|
+
type: 'Query',
|
|
709
|
+
schema: zod_1.z.number().int().gte(1).lte(100).optional().default(50),
|
|
710
|
+
},
|
|
711
|
+
{
|
|
712
|
+
name: 'offset',
|
|
713
|
+
type: 'Query',
|
|
714
|
+
schema: zod_1.z.number().int().gte(0).optional().default(0),
|
|
715
|
+
},
|
|
716
|
+
],
|
|
717
|
+
response: SegmentDescribeListResponse,
|
|
718
|
+
errors: [
|
|
719
|
+
{
|
|
720
|
+
status: 404,
|
|
721
|
+
description: `File or segment not found`,
|
|
722
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
723
|
+
},
|
|
724
|
+
],
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
method: 'get',
|
|
728
|
+
path: '/files/:file_id/segments/:segment_id/describes/:job_id',
|
|
729
|
+
alias: 'getFileSegmentDescribe',
|
|
730
|
+
description: `Get a specific describe output for a file segment by job ID`,
|
|
731
|
+
requestFormat: 'json',
|
|
732
|
+
parameters: [
|
|
733
|
+
{
|
|
734
|
+
name: 'file_id',
|
|
735
|
+
type: 'Path',
|
|
736
|
+
schema: zod_1.z.string().uuid(),
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
name: 'segment_id',
|
|
740
|
+
type: 'Path',
|
|
741
|
+
schema: zod_1.z.string().uuid(),
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
name: 'job_id',
|
|
745
|
+
type: 'Path',
|
|
746
|
+
schema: zod_1.z.string().uuid(),
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
name: 'response_format',
|
|
750
|
+
type: 'Query',
|
|
751
|
+
schema: zod_1.z.enum(['json', 'markdown']).optional().default('json'),
|
|
752
|
+
},
|
|
753
|
+
],
|
|
754
|
+
response: SegmentDescribe,
|
|
755
|
+
errors: [
|
|
756
|
+
{
|
|
757
|
+
status: 404,
|
|
758
|
+
description: `CloudglueFile, segment, or describe job not found`,
|
|
759
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
760
|
+
},
|
|
761
|
+
],
|
|
762
|
+
},
|
|
589
763
|
{
|
|
590
764
|
method: 'post',
|
|
591
765
|
path: '/files/:file_id/frames',
|