@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
|
@@ -4,57 +4,81 @@ exports.DescribeApi = exports.schemas = void 0;
|
|
|
4
4
|
exports.createApiClient = createApiClient;
|
|
5
5
|
const core_1 = require("@zodios/core");
|
|
6
6
|
const zod_1 = require("zod");
|
|
7
|
+
const common_1 = require("./common");
|
|
8
|
+
const common_2 = require("./common");
|
|
9
|
+
const NewDescribe = zod_1.z
|
|
10
|
+
.object({
|
|
11
|
+
url: zod_1.z.string(),
|
|
12
|
+
enable_summary: zod_1.z.boolean().optional().default(true),
|
|
13
|
+
enable_speech: zod_1.z.boolean().optional().default(true),
|
|
14
|
+
enable_visual_scene_description: zod_1.z.boolean().optional().default(true),
|
|
15
|
+
enable_scene_text: zod_1.z.boolean().optional().default(true),
|
|
16
|
+
thumbnails_config: common_1.ThumbnailsConfig.optional(),
|
|
17
|
+
})
|
|
18
|
+
.strict()
|
|
19
|
+
.passthrough()
|
|
20
|
+
.and(common_2.FileSegmentationConfig);
|
|
7
21
|
const Describe = zod_1.z
|
|
8
22
|
.object({
|
|
9
23
|
job_id: zod_1.z.string(),
|
|
10
24
|
status: zod_1.z.enum([
|
|
11
25
|
"pending",
|
|
12
26
|
"processing",
|
|
13
|
-
"ready",
|
|
14
27
|
"completed",
|
|
15
28
|
"failed",
|
|
16
29
|
"not_applicable",
|
|
17
30
|
]),
|
|
31
|
+
url: zod_1.z.string().optional(),
|
|
32
|
+
created_at: zod_1.z.number().int().optional(),
|
|
33
|
+
describe_config: zod_1.z
|
|
34
|
+
.object({
|
|
35
|
+
enable_summary: zod_1.z.boolean(),
|
|
36
|
+
enable_speech: zod_1.z.boolean(),
|
|
37
|
+
enable_visual_scene_description: zod_1.z.boolean(),
|
|
38
|
+
enable_scene_text: zod_1.z.boolean(),
|
|
39
|
+
})
|
|
40
|
+
.partial()
|
|
41
|
+
.strict()
|
|
42
|
+
.passthrough()
|
|
43
|
+
.optional(),
|
|
18
44
|
data: zod_1.z
|
|
19
45
|
.object({
|
|
20
|
-
|
|
46
|
+
content: zod_1.z.string(),
|
|
21
47
|
title: zod_1.z.string(),
|
|
22
48
|
summary: zod_1.z.string(),
|
|
23
|
-
|
|
49
|
+
speech: zod_1.z.array(zod_1.z
|
|
24
50
|
.object({
|
|
25
|
-
|
|
51
|
+
text: zod_1.z.string(),
|
|
26
52
|
start_time: zod_1.z.number(),
|
|
27
53
|
end_time: zod_1.z.number(),
|
|
54
|
+
})
|
|
55
|
+
.partial()
|
|
56
|
+
.strict()
|
|
57
|
+
.passthrough()),
|
|
58
|
+
visual_scene_description: zod_1.z.array(zod_1.z
|
|
59
|
+
.object({
|
|
60
|
+
text: zod_1.z.string(),
|
|
61
|
+
start_time: zod_1.z.number(),
|
|
62
|
+
end_time: zod_1.z.number(),
|
|
63
|
+
})
|
|
64
|
+
.partial()
|
|
65
|
+
.strict()
|
|
66
|
+
.passthrough()),
|
|
67
|
+
scene_text: zod_1.z.array(zod_1.z
|
|
68
|
+
.object({
|
|
69
|
+
text: zod_1.z.string(),
|
|
70
|
+
start_time: zod_1.z.number(),
|
|
71
|
+
end_time: zod_1.z.number(),
|
|
72
|
+
})
|
|
73
|
+
.partial()
|
|
74
|
+
.strict()
|
|
75
|
+
.passthrough()),
|
|
76
|
+
segment_summary: zod_1.z.array(zod_1.z
|
|
77
|
+
.object({
|
|
28
78
|
title: zod_1.z.string(),
|
|
29
79
|
summary: zod_1.z.string(),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
text: zod_1.z.string(),
|
|
33
|
-
start_time: zod_1.z.number(),
|
|
34
|
-
end_time: zod_1.z.number(),
|
|
35
|
-
})
|
|
36
|
-
.partial()
|
|
37
|
-
.strict()
|
|
38
|
-
.passthrough()),
|
|
39
|
-
scene_text: zod_1.z.array(zod_1.z
|
|
40
|
-
.object({
|
|
41
|
-
text: zod_1.z.string(),
|
|
42
|
-
start_time: zod_1.z.number(),
|
|
43
|
-
end_time: zod_1.z.number(),
|
|
44
|
-
})
|
|
45
|
-
.partial()
|
|
46
|
-
.strict()
|
|
47
|
-
.passthrough()),
|
|
48
|
-
speech: zod_1.z.array(zod_1.z
|
|
49
|
-
.object({
|
|
50
|
-
speaker: zod_1.z.string(),
|
|
51
|
-
text: zod_1.z.string(),
|
|
52
|
-
start_time: zod_1.z.number(),
|
|
53
|
-
end_time: zod_1.z.number(),
|
|
54
|
-
})
|
|
55
|
-
.partial()
|
|
56
|
-
.strict()
|
|
57
|
-
.passthrough()),
|
|
80
|
+
start_time: zod_1.z.number(),
|
|
81
|
+
end_time: zod_1.z.number(),
|
|
58
82
|
})
|
|
59
83
|
.partial()
|
|
60
84
|
.strict()
|
|
@@ -68,30 +92,31 @@ const Describe = zod_1.z
|
|
|
68
92
|
})
|
|
69
93
|
.strict()
|
|
70
94
|
.passthrough();
|
|
71
|
-
const
|
|
95
|
+
const DescribeList = zod_1.z
|
|
72
96
|
.object({
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
97
|
+
object: zod_1.z.literal("list"),
|
|
98
|
+
data: zod_1.z.array(Describe),
|
|
99
|
+
total: zod_1.z.number().int(),
|
|
100
|
+
limit: zod_1.z.number().int(),
|
|
77
101
|
})
|
|
78
102
|
.strict()
|
|
79
103
|
.passthrough();
|
|
80
104
|
exports.schemas = {
|
|
81
|
-
Describe,
|
|
82
105
|
NewDescribe,
|
|
106
|
+
Describe,
|
|
107
|
+
DescribeList,
|
|
83
108
|
};
|
|
84
109
|
const endpoints = (0, core_1.makeApi)([
|
|
85
110
|
{
|
|
86
111
|
method: "post",
|
|
87
112
|
path: "/describe",
|
|
88
113
|
alias: "createDescribe",
|
|
89
|
-
description: `Creates a new
|
|
114
|
+
description: `Creates a new media description job for video content`,
|
|
90
115
|
requestFormat: "json",
|
|
91
116
|
parameters: [
|
|
92
117
|
{
|
|
93
118
|
name: "body",
|
|
94
|
-
description: `
|
|
119
|
+
description: `Media description job parameters`,
|
|
95
120
|
type: "Body",
|
|
96
121
|
schema: NewDescribe,
|
|
97
122
|
},
|
|
@@ -100,27 +125,87 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
100
125
|
errors: [
|
|
101
126
|
{
|
|
102
127
|
status: 400,
|
|
103
|
-
description: `Invalid request or
|
|
128
|
+
description: `Invalid request or missing required url/file_id`,
|
|
104
129
|
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
105
130
|
},
|
|
106
131
|
{
|
|
107
132
|
status: 404,
|
|
108
|
-
description: `
|
|
133
|
+
description: `File not found`,
|
|
109
134
|
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
110
135
|
},
|
|
111
136
|
{
|
|
112
137
|
status: 429,
|
|
113
|
-
description: `
|
|
138
|
+
description: `Chat completion limits reached (monthly or daily)`,
|
|
114
139
|
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
115
140
|
},
|
|
116
141
|
{
|
|
117
|
-
status:
|
|
118
|
-
description: `
|
|
142
|
+
status: 509,
|
|
143
|
+
description: `Monthly description jobs limit reached`,
|
|
119
144
|
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
120
145
|
},
|
|
146
|
+
],
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
method: "get",
|
|
150
|
+
path: "/describe",
|
|
151
|
+
alias: "listDescribes",
|
|
152
|
+
description: `List all media description jobs with optional filtering`,
|
|
153
|
+
requestFormat: "json",
|
|
154
|
+
parameters: [
|
|
121
155
|
{
|
|
122
|
-
|
|
123
|
-
|
|
156
|
+
name: "limit",
|
|
157
|
+
type: "Query",
|
|
158
|
+
schema: zod_1.z.number().int().lte(100).optional().default(20),
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
name: "offset",
|
|
162
|
+
type: "Query",
|
|
163
|
+
schema: zod_1.z.number().int().optional().default(0),
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: "status",
|
|
167
|
+
type: "Query",
|
|
168
|
+
schema: zod_1.z
|
|
169
|
+
.enum([
|
|
170
|
+
"pending",
|
|
171
|
+
"processing",
|
|
172
|
+
"completed",
|
|
173
|
+
"failed",
|
|
174
|
+
"not_applicable",
|
|
175
|
+
])
|
|
176
|
+
.optional(),
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
name: "created_before",
|
|
180
|
+
type: "Query",
|
|
181
|
+
schema: zod_1.z.string().optional(),
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
name: "created_after",
|
|
185
|
+
type: "Query",
|
|
186
|
+
schema: zod_1.z.string().optional(),
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
name: "url",
|
|
190
|
+
type: "Query",
|
|
191
|
+
schema: zod_1.z.string().optional(),
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
name: "response_format",
|
|
195
|
+
type: "Query",
|
|
196
|
+
schema: zod_1.z.enum(["json", "markdown"]).optional().default("json"),
|
|
197
|
+
},
|
|
198
|
+
],
|
|
199
|
+
response: DescribeList,
|
|
200
|
+
errors: [
|
|
201
|
+
{
|
|
202
|
+
status: 400,
|
|
203
|
+
description: `Invalid request parameters`,
|
|
204
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
status: 500,
|
|
208
|
+
description: `An unexpected error occurred on the server`,
|
|
124
209
|
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
125
210
|
},
|
|
126
211
|
],
|
|
@@ -129,7 +214,7 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
129
214
|
method: "get",
|
|
130
215
|
path: "/describe/:job_id",
|
|
131
216
|
alias: "getDescribe",
|
|
132
|
-
description: `Retrieve the current state of a
|
|
217
|
+
description: `Retrieve the current state of a media description job`,
|
|
133
218
|
requestFormat: "json",
|
|
134
219
|
parameters: [
|
|
135
220
|
{
|
|
@@ -137,6 +222,11 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
137
222
|
type: "Path",
|
|
138
223
|
schema: zod_1.z.string(),
|
|
139
224
|
},
|
|
225
|
+
{
|
|
226
|
+
name: "response_format",
|
|
227
|
+
type: "Query",
|
|
228
|
+
schema: zod_1.z.enum(["json", "markdown"]).optional().default("json"),
|
|
229
|
+
},
|
|
140
230
|
],
|
|
141
231
|
response: Describe,
|
|
142
232
|
errors: [
|
|
@@ -3,6 +3,7 @@ export { FilesApi } from "./Files";
|
|
|
3
3
|
export { CollectionsApi } from "./Collections";
|
|
4
4
|
export { ChatApi } from "./Chat";
|
|
5
5
|
export { TranscribeApi } from "./Transcribe";
|
|
6
|
+
export { DescribeApi } from "./Describe";
|
|
6
7
|
export { WebhooksApi } from "./Webhooks";
|
|
7
8
|
export { SearchApi } from "./Search";
|
|
8
9
|
export { SegmentationsApi } from "./Segmentations";
|
package/dist/generated/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SegmentationsApi = exports.SearchApi = exports.WebhooksApi = exports.TranscribeApi = exports.ChatApi = exports.CollectionsApi = exports.FilesApi = exports.ExtractApi = void 0;
|
|
3
|
+
exports.SegmentationsApi = exports.SearchApi = exports.WebhooksApi = exports.DescribeApi = exports.TranscribeApi = exports.ChatApi = exports.CollectionsApi = exports.FilesApi = exports.ExtractApi = void 0;
|
|
4
4
|
var Extract_1 = require("./Extract");
|
|
5
5
|
Object.defineProperty(exports, "ExtractApi", { enumerable: true, get: function () { return Extract_1.ExtractApi; } });
|
|
6
6
|
var Files_1 = require("./Files");
|
|
@@ -11,6 +11,8 @@ var Chat_1 = require("./Chat");
|
|
|
11
11
|
Object.defineProperty(exports, "ChatApi", { enumerable: true, get: function () { return Chat_1.ChatApi; } });
|
|
12
12
|
var Transcribe_1 = require("./Transcribe");
|
|
13
13
|
Object.defineProperty(exports, "TranscribeApi", { enumerable: true, get: function () { return Transcribe_1.TranscribeApi; } });
|
|
14
|
+
var Describe_1 = require("./Describe");
|
|
15
|
+
Object.defineProperty(exports, "DescribeApi", { enumerable: true, get: function () { return Describe_1.DescribeApi; } });
|
|
14
16
|
var Webhooks_1 = require("./Webhooks");
|
|
15
17
|
Object.defineProperty(exports, "WebhooksApi", { enumerable: true, get: function () { return Webhooks_1.WebhooksApi; } });
|
|
16
18
|
var Search_1 = require("./Search");
|