@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
package/dist/generated/Chat.d.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { type ZodiosOptions } from
|
|
2
|
-
import { z } from
|
|
3
|
-
import { DescribeOutput } from
|
|
1
|
+
import { type ZodiosOptions } from '@zodios/core';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { DescribeOutput } from './common';
|
|
4
4
|
type ChatCompletionRequest = {
|
|
5
|
-
model:
|
|
5
|
+
model: 'nimbus-001';
|
|
6
6
|
messages: Array<ChatMessage>;
|
|
7
7
|
collections: Array<string>;
|
|
8
8
|
filter?: Partial<{
|
|
9
9
|
metadata: Array<{
|
|
10
10
|
path: string;
|
|
11
|
-
operator:
|
|
11
|
+
operator: 'NotEqual' | 'Equal' | 'LessThan' | 'GreaterThan' | 'In' | 'ContainsAny' | 'ContainsAll';
|
|
12
12
|
valueText?: string | undefined;
|
|
13
13
|
valueTextArray?: Array<string> | undefined;
|
|
14
14
|
}>;
|
|
15
15
|
video_info: Array<{
|
|
16
16
|
path: string;
|
|
17
|
-
operator:
|
|
17
|
+
operator: 'NotEqual' | 'Equal' | 'LessThan' | 'GreaterThan' | 'In' | 'ContainsAny' | 'ContainsAll';
|
|
18
18
|
valueText?: string | undefined;
|
|
19
19
|
valueTextArray?: Array<string> | undefined;
|
|
20
20
|
}>;
|
|
21
21
|
file: Array<{
|
|
22
22
|
path: string;
|
|
23
|
-
operator:
|
|
23
|
+
operator: 'NotEqual' | 'Equal' | 'LessThan' | 'GreaterThan' | 'In' | 'ContainsAny' | 'ContainsAll';
|
|
24
24
|
valueText?: string | undefined;
|
|
25
25
|
valueTextArray?: Array<string> | undefined;
|
|
26
26
|
}>;
|
|
@@ -28,7 +28,7 @@ type ChatCompletionRequest = {
|
|
|
28
28
|
temperature?: number | undefined;
|
|
29
29
|
};
|
|
30
30
|
type ChatMessage = {
|
|
31
|
-
role:
|
|
31
|
+
role: 'system' | 'user' | 'assistant';
|
|
32
32
|
content: string;
|
|
33
33
|
name?: string | undefined;
|
|
34
34
|
};
|
package/dist/generated/Chat.js
CHANGED
|
@@ -7,7 +7,7 @@ const zod_1 = require("zod");
|
|
|
7
7
|
const common_1 = require("./common");
|
|
8
8
|
const ChatMessage = zod_1.z
|
|
9
9
|
.object({
|
|
10
|
-
role: zod_1.z.enum([
|
|
10
|
+
role: zod_1.z.enum(['system', 'user', 'assistant']),
|
|
11
11
|
content: zod_1.z.string(),
|
|
12
12
|
name: zod_1.z.string().optional(),
|
|
13
13
|
})
|
|
@@ -15,7 +15,7 @@ const ChatMessage = zod_1.z
|
|
|
15
15
|
.passthrough();
|
|
16
16
|
const ChatCompletionRequest = zod_1.z
|
|
17
17
|
.object({
|
|
18
|
-
model: zod_1.z.literal(
|
|
18
|
+
model: zod_1.z.literal('nimbus-001'),
|
|
19
19
|
messages: zod_1.z.array(ChatMessage),
|
|
20
20
|
collections: zod_1.z.array(zod_1.z.string()).min(1).max(1),
|
|
21
21
|
filter: zod_1.z
|
|
@@ -24,13 +24,13 @@ const ChatCompletionRequest = zod_1.z
|
|
|
24
24
|
.object({
|
|
25
25
|
path: zod_1.z.string(),
|
|
26
26
|
operator: zod_1.z.enum([
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
'NotEqual',
|
|
28
|
+
'Equal',
|
|
29
|
+
'LessThan',
|
|
30
|
+
'GreaterThan',
|
|
31
|
+
'In',
|
|
32
|
+
'ContainsAny',
|
|
33
|
+
'ContainsAll',
|
|
34
34
|
]),
|
|
35
35
|
valueText: zod_1.z.string().optional(),
|
|
36
36
|
valueTextArray: zod_1.z.array(zod_1.z.string()).optional(),
|
|
@@ -41,13 +41,13 @@ const ChatCompletionRequest = zod_1.z
|
|
|
41
41
|
.object({
|
|
42
42
|
path: zod_1.z.string(),
|
|
43
43
|
operator: zod_1.z.enum([
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
'NotEqual',
|
|
45
|
+
'Equal',
|
|
46
|
+
'LessThan',
|
|
47
|
+
'GreaterThan',
|
|
48
|
+
'In',
|
|
49
|
+
'ContainsAny',
|
|
50
|
+
'ContainsAll',
|
|
51
51
|
]),
|
|
52
52
|
valueText: zod_1.z.string().optional(),
|
|
53
53
|
valueTextArray: zod_1.z.array(zod_1.z.string()).optional(),
|
|
@@ -58,13 +58,13 @@ const ChatCompletionRequest = zod_1.z
|
|
|
58
58
|
.object({
|
|
59
59
|
path: zod_1.z.string(),
|
|
60
60
|
operator: zod_1.z.enum([
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
61
|
+
'NotEqual',
|
|
62
|
+
'Equal',
|
|
63
|
+
'LessThan',
|
|
64
|
+
'GreaterThan',
|
|
65
|
+
'In',
|
|
66
|
+
'ContainsAny',
|
|
67
|
+
'ContainsAll',
|
|
68
68
|
]),
|
|
69
69
|
valueText: zod_1.z.string().optional(),
|
|
70
70
|
valueTextArray: zod_1.z.array(zod_1.z.string()).optional(),
|
|
@@ -133,16 +133,16 @@ exports.schemas = {
|
|
|
133
133
|
};
|
|
134
134
|
const endpoints = (0, core_1.makeApi)([
|
|
135
135
|
{
|
|
136
|
-
method:
|
|
137
|
-
path:
|
|
138
|
-
alias:
|
|
136
|
+
method: 'post',
|
|
137
|
+
path: '/chat/completions',
|
|
138
|
+
alias: 'createCompletion',
|
|
139
139
|
description: `Generate a model response to a conversation that can include references to video content`,
|
|
140
|
-
requestFormat:
|
|
140
|
+
requestFormat: 'json',
|
|
141
141
|
parameters: [
|
|
142
142
|
{
|
|
143
|
-
name:
|
|
143
|
+
name: 'body',
|
|
144
144
|
description: `Chat completion parameters`,
|
|
145
|
-
type:
|
|
145
|
+
type: 'Body',
|
|
146
146
|
schema: ChatCompletionRequest,
|
|
147
147
|
},
|
|
148
148
|
],
|
|
@@ -171,7 +171,7 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
171
171
|
],
|
|
172
172
|
},
|
|
173
173
|
]);
|
|
174
|
-
exports.ChatApi = new core_1.Zodios(
|
|
174
|
+
exports.ChatApi = new core_1.Zodios('https://api.cloudglue.dev/v1', endpoints);
|
|
175
175
|
function createApiClient(baseUrl, options) {
|
|
176
176
|
return new core_1.Zodios(baseUrl, endpoints, options);
|
|
177
177
|
}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { type ZodiosOptions } from
|
|
2
|
-
import { z } from
|
|
3
|
-
import { SegmentationConfig } from
|
|
4
|
-
import { SegmentationUniformConfig } from
|
|
5
|
-
import { SegmentationShotDetectorConfig } from
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import { type ZodiosOptions } from '@zodios/core';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { SegmentationConfig } from './common';
|
|
4
|
+
import { SegmentationUniformConfig } from './common';
|
|
5
|
+
import { SegmentationShotDetectorConfig } from './common';
|
|
6
|
+
import { KeyframeConfig } from './common';
|
|
7
|
+
import { ThumbnailsConfig } from './common';
|
|
8
|
+
import { File } from './common';
|
|
9
|
+
import { FileSegmentationConfig } from './common';
|
|
10
|
+
import { DescribeOutput } from './common';
|
|
10
11
|
type Collection = {
|
|
11
12
|
id: string;
|
|
12
|
-
object:
|
|
13
|
+
object: 'collection';
|
|
13
14
|
name: string;
|
|
14
15
|
description?: (string | null) | undefined;
|
|
15
|
-
collection_type:
|
|
16
|
+
collection_type: 'media-descriptions' | 'entities' | 'rich-transcripts' | 'face-analysis';
|
|
16
17
|
extract_config?: Partial<{
|
|
17
18
|
prompt: string;
|
|
18
19
|
schema: {};
|
|
@@ -37,7 +38,7 @@ type Collection = {
|
|
|
37
38
|
default_thumbnails_config?: ThumbnailsConfig | undefined;
|
|
38
39
|
face_detection_config?: Partial<{
|
|
39
40
|
frame_extraction_config: {
|
|
40
|
-
strategy:
|
|
41
|
+
strategy: 'uniform';
|
|
41
42
|
uniform_config?: Partial<{
|
|
42
43
|
frames_per_second: number;
|
|
43
44
|
max_width: number;
|
|
@@ -51,7 +52,7 @@ type Collection = {
|
|
|
51
52
|
file_count: number;
|
|
52
53
|
};
|
|
53
54
|
type NewCollection = {
|
|
54
|
-
collection_type:
|
|
55
|
+
collection_type: 'media-descriptions' | 'entities' | 'rich-transcripts' | 'face-analysis';
|
|
55
56
|
name: string;
|
|
56
57
|
description?: (string | null) | undefined;
|
|
57
58
|
describe_config?: Partial<{
|
|
@@ -78,7 +79,7 @@ type NewCollection = {
|
|
|
78
79
|
default_thumbnails_config?: ThumbnailsConfig | undefined;
|
|
79
80
|
face_detection_config?: Partial<{
|
|
80
81
|
frame_extraction_config: {
|
|
81
|
-
strategy:
|
|
82
|
+
strategy: 'uniform';
|
|
82
83
|
uniform_config?: Partial<{
|
|
83
84
|
frames_per_second: number;
|
|
84
85
|
max_width: number;
|
|
@@ -90,14 +91,15 @@ type NewCollection = {
|
|
|
90
91
|
}> | null | undefined;
|
|
91
92
|
};
|
|
92
93
|
type DefaultSegmentationConfig = {
|
|
93
|
-
strategy:
|
|
94
|
+
strategy: 'uniform' | 'shot-detector';
|
|
94
95
|
uniform_config?: SegmentationUniformConfig | undefined;
|
|
95
96
|
shot_detector_config?: SegmentationShotDetectorConfig | undefined;
|
|
97
|
+
keyframe_config?: KeyframeConfig | undefined;
|
|
96
98
|
start_time_seconds?: number | undefined;
|
|
97
99
|
end_time_seconds?: number | undefined;
|
|
98
100
|
};
|
|
99
101
|
type CollectionList = {
|
|
100
|
-
object:
|
|
102
|
+
object: 'list';
|
|
101
103
|
data: Array<Collection>;
|
|
102
104
|
total: number;
|
|
103
105
|
limit: number;
|
|
@@ -106,13 +108,13 @@ type CollectionList = {
|
|
|
106
108
|
type CollectionFile = {
|
|
107
109
|
collection_id: string;
|
|
108
110
|
file_id: string;
|
|
109
|
-
object:
|
|
111
|
+
object: 'collection_file';
|
|
110
112
|
added_at: number;
|
|
111
|
-
status:
|
|
113
|
+
status: 'pending' | 'processing' | 'completed' | 'failed' | 'not_applicable';
|
|
112
114
|
file?: File | undefined;
|
|
113
115
|
segmentation?: {
|
|
114
116
|
id: string;
|
|
115
|
-
status:
|
|
117
|
+
status: 'pending' | 'processing' | 'completed' | 'failed' | 'not_applicable';
|
|
116
118
|
file_id: string;
|
|
117
119
|
segmentation_config: SegmentationConfig;
|
|
118
120
|
} | undefined;
|
|
@@ -125,7 +127,7 @@ type AddCollectionFile = ({
|
|
|
125
127
|
thumbnails_config: ThumbnailsConfig;
|
|
126
128
|
}>;
|
|
127
129
|
type CollectionFileList = {
|
|
128
|
-
object:
|
|
130
|
+
object: 'list';
|
|
129
131
|
data: Array<CollectionFile>;
|
|
130
132
|
total: number;
|
|
131
133
|
limit: number;
|
|
@@ -146,7 +148,7 @@ type RichTranscript = {
|
|
|
146
148
|
}>> | undefined;
|
|
147
149
|
} & DescribeOutput;
|
|
148
150
|
type CollectionRichTranscriptsList = {
|
|
149
|
-
object:
|
|
151
|
+
object: 'list';
|
|
150
152
|
data: Array<{
|
|
151
153
|
file_id: string;
|
|
152
154
|
duration_seconds?: number | undefined;
|
|
@@ -167,11 +169,11 @@ type CollectionRichTranscriptsList = {
|
|
|
167
169
|
offset: number;
|
|
168
170
|
};
|
|
169
171
|
type CollectionMediaDescriptionsList = {
|
|
170
|
-
object:
|
|
172
|
+
object: 'list';
|
|
171
173
|
data: Array<{
|
|
172
174
|
file_id: string;
|
|
173
175
|
added_at: number;
|
|
174
|
-
object:
|
|
176
|
+
object: 'collection_file';
|
|
175
177
|
duration_seconds?: number | undefined;
|
|
176
178
|
data: Partial<{
|
|
177
179
|
content: string;
|