@aviaryhq/cloudglue-js 0.0.9
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/LICENSE.md +44 -0
- package/README.md +105 -0
- package/dist/client.d.ts +156 -0
- package/dist/client.js +189 -0
- package/dist/generated/Chat.d.ts +416 -0
- package/dist/generated/Chat.js +182 -0
- package/dist/generated/Collections.d.ts +2940 -0
- package/dist/generated/Collections.js +666 -0
- package/dist/generated/Describe.d.ts +7027 -0
- package/dist/generated/Describe.js +159 -0
- package/dist/generated/Extract.d.ts +1168 -0
- package/dist/generated/Extract.js +128 -0
- package/dist/generated/Files.d.ts +735 -0
- package/dist/generated/Files.js +190 -0
- package/dist/generated/common.d.ts +99 -0
- package/dist/generated/common.js +37 -0
- package/dist/generated/index.d.ts +5 -0
- package/dist/generated/index.js +13 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +18 -0
- package/dist/src/client.d.ts +1550 -0
- package/dist/src/client.js +189 -0
- package/dist/src/index.d.ts +13 -0
- package/dist/src/index.js +18 -0
- package/dist/src/types.d.ts +70 -0
- package/dist/src/types.js +2 -0
- package/dist/types.d.ts +70 -0
- package/dist/types.js +2 -0
- package/package.json +46 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DescribeApi = exports.schemas = void 0;
|
|
4
|
+
exports.createApiClient = createApiClient;
|
|
5
|
+
const core_1 = require("@zodios/core");
|
|
6
|
+
const zod_1 = require("zod");
|
|
7
|
+
const Describe = zod_1.z
|
|
8
|
+
.object({
|
|
9
|
+
job_id: zod_1.z.string(),
|
|
10
|
+
status: zod_1.z.enum([
|
|
11
|
+
"pending",
|
|
12
|
+
"processing",
|
|
13
|
+
"ready",
|
|
14
|
+
"completed",
|
|
15
|
+
"failed",
|
|
16
|
+
"not_applicable",
|
|
17
|
+
]),
|
|
18
|
+
data: zod_1.z
|
|
19
|
+
.object({
|
|
20
|
+
url: zod_1.z.string(),
|
|
21
|
+
title: zod_1.z.string(),
|
|
22
|
+
summary: zod_1.z.string(),
|
|
23
|
+
segment_docs: zod_1.z.array(zod_1.z
|
|
24
|
+
.object({
|
|
25
|
+
segment_id: zod_1.z.union([zod_1.z.string(), zod_1.z.number()]),
|
|
26
|
+
start_time: zod_1.z.number(),
|
|
27
|
+
end_time: zod_1.z.number(),
|
|
28
|
+
title: zod_1.z.string(),
|
|
29
|
+
summary: zod_1.z.string(),
|
|
30
|
+
visual_description: zod_1.z.array(zod_1.z
|
|
31
|
+
.object({
|
|
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()),
|
|
58
|
+
})
|
|
59
|
+
.partial()
|
|
60
|
+
.strict()
|
|
61
|
+
.passthrough()),
|
|
62
|
+
})
|
|
63
|
+
.partial()
|
|
64
|
+
.strict()
|
|
65
|
+
.passthrough()
|
|
66
|
+
.optional(),
|
|
67
|
+
error: zod_1.z.string().optional(),
|
|
68
|
+
})
|
|
69
|
+
.strict()
|
|
70
|
+
.passthrough();
|
|
71
|
+
const NewDescribe = zod_1.z
|
|
72
|
+
.object({
|
|
73
|
+
url: zod_1.z.string(),
|
|
74
|
+
enable_speech: zod_1.z.boolean().optional().default(true),
|
|
75
|
+
enable_scene_text: zod_1.z.boolean().optional().default(true),
|
|
76
|
+
enable_visual_scene_description: zod_1.z.boolean().optional().default(true),
|
|
77
|
+
})
|
|
78
|
+
.strict()
|
|
79
|
+
.passthrough();
|
|
80
|
+
exports.schemas = {
|
|
81
|
+
Describe,
|
|
82
|
+
NewDescribe,
|
|
83
|
+
};
|
|
84
|
+
const endpoints = (0, core_1.makeApi)([
|
|
85
|
+
{
|
|
86
|
+
method: "post",
|
|
87
|
+
path: "/describe",
|
|
88
|
+
alias: "createDescribe",
|
|
89
|
+
description: `Creates a new describe job for comprehensive video description and transcription`,
|
|
90
|
+
requestFormat: "json",
|
|
91
|
+
parameters: [
|
|
92
|
+
{
|
|
93
|
+
name: "body",
|
|
94
|
+
description: `Generate rich, multimodal descriptions of video content`,
|
|
95
|
+
type: "Body",
|
|
96
|
+
schema: NewDescribe,
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
response: Describe,
|
|
100
|
+
errors: [
|
|
101
|
+
{
|
|
102
|
+
status: 400,
|
|
103
|
+
description: `Invalid request or describe config requires at least one option enabled`,
|
|
104
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
status: 404,
|
|
108
|
+
description: `Describe job not found`,
|
|
109
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
status: 429,
|
|
113
|
+
description: `Too many requests`,
|
|
114
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
status: 500,
|
|
118
|
+
description: `An unexpected error occurred on the server`,
|
|
119
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
status: 509,
|
|
123
|
+
description: `Monthly describe jobs limit reached`,
|
|
124
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
method: "get",
|
|
130
|
+
path: "/describe/:job_id",
|
|
131
|
+
alias: "getDescribe",
|
|
132
|
+
description: `Retrieve the current state of a describe job`,
|
|
133
|
+
requestFormat: "json",
|
|
134
|
+
parameters: [
|
|
135
|
+
{
|
|
136
|
+
name: "job_id",
|
|
137
|
+
type: "Path",
|
|
138
|
+
schema: zod_1.z.string(),
|
|
139
|
+
},
|
|
140
|
+
],
|
|
141
|
+
response: Describe,
|
|
142
|
+
errors: [
|
|
143
|
+
{
|
|
144
|
+
status: 404,
|
|
145
|
+
description: `Job not found`,
|
|
146
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
status: 500,
|
|
150
|
+
description: `An unexpected error occurred on the server`,
|
|
151
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
152
|
+
},
|
|
153
|
+
],
|
|
154
|
+
},
|
|
155
|
+
]);
|
|
156
|
+
exports.DescribeApi = new core_1.Zodios("https://api.cloudglue.dev/v1", endpoints);
|
|
157
|
+
function createApiClient(baseUrl, options) {
|
|
158
|
+
return new core_1.Zodios(baseUrl, endpoints, options);
|
|
159
|
+
}
|