@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
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { type ZodiosOptions } from
|
|
2
|
-
import { z } from
|
|
3
|
-
import { DescribeOutput } from
|
|
4
|
-
import { ThumbnailsConfig } from
|
|
5
|
-
import { FileSegmentationConfig } from
|
|
1
|
+
import { type ZodiosOptions } from '@zodios/core';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { DescribeOutput } from './common';
|
|
4
|
+
import { ThumbnailsConfig } from './common';
|
|
5
|
+
import { FileSegmentationConfig } from './common';
|
|
6
6
|
type Describe = {
|
|
7
7
|
job_id: string;
|
|
8
|
-
status:
|
|
8
|
+
status: 'pending' | 'processing' | 'completed' | 'failed' | 'not_applicable';
|
|
9
9
|
url?: string | undefined;
|
|
10
10
|
duration_seconds?: number | undefined;
|
|
11
11
|
created_at?: number | undefined;
|
|
@@ -39,7 +39,7 @@ type NewDescribe = {
|
|
|
39
39
|
thumbnails_config?: ThumbnailsConfig | undefined;
|
|
40
40
|
} & FileSegmentationConfig;
|
|
41
41
|
type DescribeList = {
|
|
42
|
-
object:
|
|
42
|
+
object: 'list';
|
|
43
43
|
data: Array<Describe>;
|
|
44
44
|
total: number;
|
|
45
45
|
limit: number;
|
|
@@ -24,11 +24,11 @@ const Describe = zod_1.z
|
|
|
24
24
|
.object({
|
|
25
25
|
job_id: zod_1.z.string(),
|
|
26
26
|
status: zod_1.z.enum([
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
'pending',
|
|
28
|
+
'processing',
|
|
29
|
+
'completed',
|
|
30
|
+
'failed',
|
|
31
|
+
'not_applicable',
|
|
32
32
|
]),
|
|
33
33
|
url: zod_1.z.string().optional(),
|
|
34
34
|
duration_seconds: zod_1.z.number().optional(),
|
|
@@ -72,7 +72,7 @@ const Describe = zod_1.z
|
|
|
72
72
|
.passthrough();
|
|
73
73
|
const DescribeList = zod_1.z
|
|
74
74
|
.object({
|
|
75
|
-
object: zod_1.z.literal(
|
|
75
|
+
object: zod_1.z.literal('list'),
|
|
76
76
|
data: zod_1.z.array(Describe),
|
|
77
77
|
total: zod_1.z.number().int(),
|
|
78
78
|
limit: zod_1.z.number().int(),
|
|
@@ -86,16 +86,16 @@ exports.schemas = {
|
|
|
86
86
|
};
|
|
87
87
|
const endpoints = (0, core_1.makeApi)([
|
|
88
88
|
{
|
|
89
|
-
method:
|
|
90
|
-
path:
|
|
91
|
-
alias:
|
|
89
|
+
method: 'post',
|
|
90
|
+
path: '/describe',
|
|
91
|
+
alias: 'createDescribe',
|
|
92
92
|
description: `Get a comprehensive multimodal description of a video`,
|
|
93
|
-
requestFormat:
|
|
93
|
+
requestFormat: 'json',
|
|
94
94
|
parameters: [
|
|
95
95
|
{
|
|
96
|
-
name:
|
|
96
|
+
name: 'body',
|
|
97
97
|
description: `Media description job parameters`,
|
|
98
|
-
type:
|
|
98
|
+
type: 'Body',
|
|
99
99
|
schema: NewDescribe,
|
|
100
100
|
},
|
|
101
101
|
],
|
|
@@ -124,58 +124,58 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
124
124
|
],
|
|
125
125
|
},
|
|
126
126
|
{
|
|
127
|
-
method:
|
|
128
|
-
path:
|
|
129
|
-
alias:
|
|
127
|
+
method: 'get',
|
|
128
|
+
path: '/describe',
|
|
129
|
+
alias: 'listDescribes',
|
|
130
130
|
description: `List all media description jobs with optional filtering`,
|
|
131
|
-
requestFormat:
|
|
131
|
+
requestFormat: 'json',
|
|
132
132
|
parameters: [
|
|
133
133
|
{
|
|
134
|
-
name:
|
|
135
|
-
type:
|
|
134
|
+
name: 'limit',
|
|
135
|
+
type: 'Query',
|
|
136
136
|
schema: zod_1.z.number().int().lte(100).optional().default(20),
|
|
137
137
|
},
|
|
138
138
|
{
|
|
139
|
-
name:
|
|
140
|
-
type:
|
|
139
|
+
name: 'offset',
|
|
140
|
+
type: 'Query',
|
|
141
141
|
schema: zod_1.z.number().int().optional().default(0),
|
|
142
142
|
},
|
|
143
143
|
{
|
|
144
|
-
name:
|
|
145
|
-
type:
|
|
144
|
+
name: 'status',
|
|
145
|
+
type: 'Query',
|
|
146
146
|
schema: zod_1.z
|
|
147
147
|
.enum([
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
148
|
+
'pending',
|
|
149
|
+
'processing',
|
|
150
|
+
'completed',
|
|
151
|
+
'failed',
|
|
152
|
+
'not_applicable',
|
|
153
153
|
])
|
|
154
154
|
.optional(),
|
|
155
155
|
},
|
|
156
156
|
{
|
|
157
|
-
name:
|
|
158
|
-
type:
|
|
157
|
+
name: 'created_before',
|
|
158
|
+
type: 'Query',
|
|
159
159
|
schema: zod_1.z.string().optional(),
|
|
160
160
|
},
|
|
161
161
|
{
|
|
162
|
-
name:
|
|
163
|
-
type:
|
|
162
|
+
name: 'created_after',
|
|
163
|
+
type: 'Query',
|
|
164
164
|
schema: zod_1.z.string().optional(),
|
|
165
165
|
},
|
|
166
166
|
{
|
|
167
|
-
name:
|
|
168
|
-
type:
|
|
167
|
+
name: 'url',
|
|
168
|
+
type: 'Query',
|
|
169
169
|
schema: zod_1.z.string().optional(),
|
|
170
170
|
},
|
|
171
171
|
{
|
|
172
|
-
name:
|
|
173
|
-
type:
|
|
174
|
-
schema: zod_1.z.enum([
|
|
172
|
+
name: 'response_format',
|
|
173
|
+
type: 'Query',
|
|
174
|
+
schema: zod_1.z.enum(['json', 'markdown']).optional().default('json'),
|
|
175
175
|
},
|
|
176
176
|
{
|
|
177
|
-
name:
|
|
178
|
-
type:
|
|
177
|
+
name: 'include_data',
|
|
178
|
+
type: 'Query',
|
|
179
179
|
schema: zod_1.z.boolean().optional().default(true),
|
|
180
180
|
},
|
|
181
181
|
],
|
|
@@ -194,30 +194,30 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
194
194
|
],
|
|
195
195
|
},
|
|
196
196
|
{
|
|
197
|
-
method:
|
|
198
|
-
path:
|
|
199
|
-
alias:
|
|
197
|
+
method: 'get',
|
|
198
|
+
path: '/describe/:job_id',
|
|
199
|
+
alias: 'getDescribe',
|
|
200
200
|
description: `Retrieve the current state of a media description job`,
|
|
201
|
-
requestFormat:
|
|
201
|
+
requestFormat: 'json',
|
|
202
202
|
parameters: [
|
|
203
203
|
{
|
|
204
|
-
name:
|
|
205
|
-
type:
|
|
204
|
+
name: 'job_id',
|
|
205
|
+
type: 'Path',
|
|
206
206
|
schema: zod_1.z.string(),
|
|
207
207
|
},
|
|
208
208
|
{
|
|
209
|
-
name:
|
|
210
|
-
type:
|
|
211
|
-
schema: zod_1.z.enum([
|
|
209
|
+
name: 'response_format',
|
|
210
|
+
type: 'Query',
|
|
211
|
+
schema: zod_1.z.enum(['json', 'markdown']).optional().default('json'),
|
|
212
212
|
},
|
|
213
213
|
{
|
|
214
|
-
name:
|
|
215
|
-
type:
|
|
214
|
+
name: 'start_time_seconds',
|
|
215
|
+
type: 'Query',
|
|
216
216
|
schema: zod_1.z.number().optional(),
|
|
217
217
|
},
|
|
218
218
|
{
|
|
219
|
-
name:
|
|
220
|
-
type:
|
|
219
|
+
name: 'end_time_seconds',
|
|
220
|
+
type: 'Query',
|
|
221
221
|
schema: zod_1.z.number().optional(),
|
|
222
222
|
},
|
|
223
223
|
],
|
|
@@ -236,15 +236,15 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
236
236
|
],
|
|
237
237
|
},
|
|
238
238
|
{
|
|
239
|
-
method:
|
|
240
|
-
path:
|
|
241
|
-
alias:
|
|
239
|
+
method: 'delete',
|
|
240
|
+
path: '/describe/:job_id',
|
|
241
|
+
alias: 'deleteDescribe',
|
|
242
242
|
description: `Delete a media description job`,
|
|
243
|
-
requestFormat:
|
|
243
|
+
requestFormat: 'json',
|
|
244
244
|
parameters: [
|
|
245
245
|
{
|
|
246
|
-
name:
|
|
247
|
-
type:
|
|
246
|
+
name: 'job_id',
|
|
247
|
+
type: 'Path',
|
|
248
248
|
schema: zod_1.z.string(),
|
|
249
249
|
},
|
|
250
250
|
],
|
|
@@ -263,7 +263,7 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
263
263
|
],
|
|
264
264
|
},
|
|
265
265
|
]);
|
|
266
|
-
exports.DescribeApi = new core_1.Zodios(
|
|
266
|
+
exports.DescribeApi = new core_1.Zodios('https://api.cloudglue.dev/v1', endpoints);
|
|
267
267
|
function createApiClient(baseUrl, options) {
|
|
268
268
|
return new core_1.Zodios(baseUrl, endpoints, options);
|
|
269
269
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type ZodiosOptions } from
|
|
2
|
-
import { z } from
|
|
3
|
-
import { ThumbnailsConfig } from
|
|
4
|
-
import { FileSegmentationConfig } from
|
|
1
|
+
import { type ZodiosOptions } from '@zodios/core';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { ThumbnailsConfig } from './common';
|
|
4
|
+
import { FileSegmentationConfig } from './common';
|
|
5
5
|
type Extract = {
|
|
6
6
|
job_id: string;
|
|
7
|
-
status:
|
|
7
|
+
status: 'pending' | 'processing' | 'completed' | 'failed' | 'not_applicable';
|
|
8
8
|
url?: string | undefined;
|
|
9
9
|
created_at?: number | undefined;
|
|
10
10
|
extract_config?: Partial<{
|
|
@@ -36,7 +36,7 @@ type NewExtract = {
|
|
|
36
36
|
thumbnails_config?: ThumbnailsConfig | undefined;
|
|
37
37
|
} & FileSegmentationConfig;
|
|
38
38
|
type ExtractList = {
|
|
39
|
-
object:
|
|
39
|
+
object: 'list';
|
|
40
40
|
data: Array<Extract>;
|
|
41
41
|
total: number;
|
|
42
42
|
limit: number;
|
|
@@ -10,11 +10,11 @@ const Extract = zod_1.z
|
|
|
10
10
|
.object({
|
|
11
11
|
job_id: zod_1.z.string(),
|
|
12
12
|
status: zod_1.z.enum([
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
'pending',
|
|
14
|
+
'processing',
|
|
15
|
+
'completed',
|
|
16
|
+
'failed',
|
|
17
|
+
'not_applicable',
|
|
18
18
|
]),
|
|
19
19
|
url: zod_1.z.string().optional(),
|
|
20
20
|
created_at: zod_1.z.number().int().optional(),
|
|
@@ -56,7 +56,7 @@ const Extract = zod_1.z
|
|
|
56
56
|
.passthrough();
|
|
57
57
|
const ExtractList = zod_1.z
|
|
58
58
|
.object({
|
|
59
|
-
object: zod_1.z.literal(
|
|
59
|
+
object: zod_1.z.literal('list'),
|
|
60
60
|
data: zod_1.z.array(Extract),
|
|
61
61
|
total: zod_1.z.number().int(),
|
|
62
62
|
limit: zod_1.z.number().int(),
|
|
@@ -83,16 +83,16 @@ exports.schemas = {
|
|
|
83
83
|
};
|
|
84
84
|
const endpoints = (0, core_1.makeApi)([
|
|
85
85
|
{
|
|
86
|
-
method:
|
|
87
|
-
path:
|
|
88
|
-
alias:
|
|
86
|
+
method: 'post',
|
|
87
|
+
path: '/extract',
|
|
88
|
+
alias: 'createExtract',
|
|
89
89
|
description: `Extract structured data from a video`,
|
|
90
|
-
requestFormat:
|
|
90
|
+
requestFormat: 'json',
|
|
91
91
|
parameters: [
|
|
92
92
|
{
|
|
93
|
-
name:
|
|
93
|
+
name: 'body',
|
|
94
94
|
description: `Extract job parameters`,
|
|
95
|
-
type:
|
|
95
|
+
type: 'Body',
|
|
96
96
|
schema: NewExtract,
|
|
97
97
|
},
|
|
98
98
|
],
|
|
@@ -121,53 +121,53 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
121
121
|
],
|
|
122
122
|
},
|
|
123
123
|
{
|
|
124
|
-
method:
|
|
125
|
-
path:
|
|
126
|
-
alias:
|
|
124
|
+
method: 'get',
|
|
125
|
+
path: '/extract',
|
|
126
|
+
alias: 'listExtracts',
|
|
127
127
|
description: `List all extract jobs with optional filtering`,
|
|
128
|
-
requestFormat:
|
|
128
|
+
requestFormat: 'json',
|
|
129
129
|
parameters: [
|
|
130
130
|
{
|
|
131
|
-
name:
|
|
132
|
-
type:
|
|
131
|
+
name: 'limit',
|
|
132
|
+
type: 'Query',
|
|
133
133
|
schema: zod_1.z.number().int().lte(100).optional().default(50),
|
|
134
134
|
},
|
|
135
135
|
{
|
|
136
|
-
name:
|
|
137
|
-
type:
|
|
136
|
+
name: 'offset',
|
|
137
|
+
type: 'Query',
|
|
138
138
|
schema: zod_1.z.number().int().optional().default(0),
|
|
139
139
|
},
|
|
140
140
|
{
|
|
141
|
-
name:
|
|
142
|
-
type:
|
|
141
|
+
name: 'status',
|
|
142
|
+
type: 'Query',
|
|
143
143
|
schema: zod_1.z
|
|
144
144
|
.enum([
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
145
|
+
'pending',
|
|
146
|
+
'processing',
|
|
147
|
+
'completed',
|
|
148
|
+
'failed',
|
|
149
|
+
'not_applicable',
|
|
150
150
|
])
|
|
151
151
|
.optional(),
|
|
152
152
|
},
|
|
153
153
|
{
|
|
154
|
-
name:
|
|
155
|
-
type:
|
|
154
|
+
name: 'created_before',
|
|
155
|
+
type: 'Query',
|
|
156
156
|
schema: zod_1.z.string().optional(),
|
|
157
157
|
},
|
|
158
158
|
{
|
|
159
|
-
name:
|
|
160
|
-
type:
|
|
159
|
+
name: 'created_after',
|
|
160
|
+
type: 'Query',
|
|
161
161
|
schema: zod_1.z.string().optional(),
|
|
162
162
|
},
|
|
163
163
|
{
|
|
164
|
-
name:
|
|
165
|
-
type:
|
|
164
|
+
name: 'url',
|
|
165
|
+
type: 'Query',
|
|
166
166
|
schema: zod_1.z.string().optional(),
|
|
167
167
|
},
|
|
168
168
|
{
|
|
169
|
-
name:
|
|
170
|
-
type:
|
|
169
|
+
name: 'include_data',
|
|
170
|
+
type: 'Query',
|
|
171
171
|
schema: zod_1.z.boolean().optional().default(true),
|
|
172
172
|
},
|
|
173
173
|
],
|
|
@@ -196,25 +196,25 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
196
196
|
],
|
|
197
197
|
},
|
|
198
198
|
{
|
|
199
|
-
method:
|
|
200
|
-
path:
|
|
201
|
-
alias:
|
|
199
|
+
method: 'get',
|
|
200
|
+
path: '/extract/:job_id',
|
|
201
|
+
alias: 'getExtract',
|
|
202
202
|
description: `Retrieve the current state of an extraction job. Results are paginated with a default limit of 50 segment entities per request (maximum 100). Use limit and offset parameters to paginate through all segment entities.`,
|
|
203
|
-
requestFormat:
|
|
203
|
+
requestFormat: 'json',
|
|
204
204
|
parameters: [
|
|
205
205
|
{
|
|
206
|
-
name:
|
|
207
|
-
type:
|
|
206
|
+
name: 'job_id',
|
|
207
|
+
type: 'Path',
|
|
208
208
|
schema: zod_1.z.string(),
|
|
209
209
|
},
|
|
210
210
|
{
|
|
211
|
-
name:
|
|
212
|
-
type:
|
|
211
|
+
name: 'limit',
|
|
212
|
+
type: 'Query',
|
|
213
213
|
schema: zod_1.z.number().int().gte(1).lte(100).optional().default(50),
|
|
214
214
|
},
|
|
215
215
|
{
|
|
216
|
-
name:
|
|
217
|
-
type:
|
|
216
|
+
name: 'offset',
|
|
217
|
+
type: 'Query',
|
|
218
218
|
schema: zod_1.z.number().int().gte(0).optional().default(0),
|
|
219
219
|
},
|
|
220
220
|
],
|
|
@@ -233,15 +233,15 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
233
233
|
],
|
|
234
234
|
},
|
|
235
235
|
{
|
|
236
|
-
method:
|
|
237
|
-
path:
|
|
238
|
-
alias:
|
|
236
|
+
method: 'delete',
|
|
237
|
+
path: '/extract/:job_id',
|
|
238
|
+
alias: 'deleteExtract',
|
|
239
239
|
description: `Delete an extraction job`,
|
|
240
|
-
requestFormat:
|
|
240
|
+
requestFormat: 'json',
|
|
241
241
|
parameters: [
|
|
242
242
|
{
|
|
243
|
-
name:
|
|
244
|
-
type:
|
|
243
|
+
name: 'job_id',
|
|
244
|
+
type: 'Path',
|
|
245
245
|
schema: zod_1.z.string(),
|
|
246
246
|
},
|
|
247
247
|
],
|
|
@@ -260,7 +260,7 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
260
260
|
],
|
|
261
261
|
},
|
|
262
262
|
]);
|
|
263
|
-
exports.ExtractApi = new core_1.Zodios(
|
|
263
|
+
exports.ExtractApi = new core_1.Zodios('https://api.cloudglue.dev/v1', endpoints);
|
|
264
264
|
function createApiClient(baseUrl, options) {
|
|
265
265
|
return new core_1.Zodios(baseUrl, endpoints, options);
|
|
266
266
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { type ZodiosOptions } from
|
|
2
|
-
import { z } from
|
|
3
|
-
import { FaceBoundingBox } from
|
|
4
|
-
import { FrameExtractionConfig } from
|
|
1
|
+
import { type ZodiosOptions } from '@zodios/core';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { FaceBoundingBox } from './common';
|
|
4
|
+
import { FrameExtractionConfig } from './common';
|
|
5
5
|
type FaceDetection = {
|
|
6
6
|
face_detection_id: string;
|
|
7
7
|
frame_extraction_id?: string | undefined;
|
|
8
8
|
file_id?: string | undefined;
|
|
9
|
-
status:
|
|
9
|
+
status: 'pending' | 'processing' | 'completed' | 'failed';
|
|
10
10
|
created_at: number;
|
|
11
11
|
data?: Partial<{
|
|
12
|
-
object:
|
|
12
|
+
object: 'list';
|
|
13
13
|
total: number;
|
|
14
14
|
limit: number;
|
|
15
15
|
offset: number;
|
|
@@ -29,11 +29,11 @@ const FaceDetection = zod_1.z
|
|
|
29
29
|
face_detection_id: zod_1.z.string().uuid(),
|
|
30
30
|
frame_extraction_id: zod_1.z.string().uuid().optional(),
|
|
31
31
|
file_id: zod_1.z.string().uuid().optional(),
|
|
32
|
-
status: zod_1.z.enum([
|
|
32
|
+
status: zod_1.z.enum(['pending', 'processing', 'completed', 'failed']),
|
|
33
33
|
created_at: zod_1.z.number(),
|
|
34
34
|
data: zod_1.z
|
|
35
35
|
.object({
|
|
36
|
-
object: zod_1.z.literal(
|
|
36
|
+
object: zod_1.z.literal('list'),
|
|
37
37
|
total: zod_1.z.number().int(),
|
|
38
38
|
limit: zod_1.z.number().int().gte(1).lte(100),
|
|
39
39
|
offset: zod_1.z.number().int().gte(0),
|
|
@@ -53,16 +53,16 @@ exports.schemas = {
|
|
|
53
53
|
};
|
|
54
54
|
const endpoints = (0, core_1.makeApi)([
|
|
55
55
|
{
|
|
56
|
-
method:
|
|
57
|
-
path:
|
|
58
|
-
alias:
|
|
56
|
+
method: 'post',
|
|
57
|
+
path: '/face-detect',
|
|
58
|
+
alias: 'createFaceDetection',
|
|
59
59
|
description: `Analyze video to detect all faces`,
|
|
60
|
-
requestFormat:
|
|
60
|
+
requestFormat: 'json',
|
|
61
61
|
parameters: [
|
|
62
62
|
{
|
|
63
|
-
name:
|
|
63
|
+
name: 'body',
|
|
64
64
|
description: `Face detection request parameters`,
|
|
65
|
-
type:
|
|
65
|
+
type: 'Body',
|
|
66
66
|
schema: FaceDetectionRequest,
|
|
67
67
|
},
|
|
68
68
|
],
|
|
@@ -91,25 +91,25 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
91
91
|
],
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
|
-
method:
|
|
95
|
-
path:
|
|
96
|
-
alias:
|
|
94
|
+
method: 'get',
|
|
95
|
+
path: '/face-detect/:face_detection_id',
|
|
96
|
+
alias: 'getFaceDetection',
|
|
97
97
|
description: `Retrieve face detection results including all detected faces`,
|
|
98
|
-
requestFormat:
|
|
98
|
+
requestFormat: 'json',
|
|
99
99
|
parameters: [
|
|
100
100
|
{
|
|
101
|
-
name:
|
|
102
|
-
type:
|
|
101
|
+
name: 'face_detection_id',
|
|
102
|
+
type: 'Path',
|
|
103
103
|
schema: zod_1.z.string().uuid(),
|
|
104
104
|
},
|
|
105
105
|
{
|
|
106
|
-
name:
|
|
107
|
-
type:
|
|
106
|
+
name: 'limit',
|
|
107
|
+
type: 'Query',
|
|
108
108
|
schema: zod_1.z.number().int().gte(1).lte(100).optional().default(50),
|
|
109
109
|
},
|
|
110
110
|
{
|
|
111
|
-
name:
|
|
112
|
-
type:
|
|
111
|
+
name: 'offset',
|
|
112
|
+
type: 'Query',
|
|
113
113
|
schema: zod_1.z.number().int().gte(0).optional().default(0),
|
|
114
114
|
},
|
|
115
115
|
],
|
|
@@ -128,15 +128,15 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
128
128
|
],
|
|
129
129
|
},
|
|
130
130
|
{
|
|
131
|
-
method:
|
|
132
|
-
path:
|
|
133
|
-
alias:
|
|
131
|
+
method: 'delete',
|
|
132
|
+
path: '/face-detect/:face_detection_id',
|
|
133
|
+
alias: 'deleteFaceDetection',
|
|
134
134
|
description: `Delete a specific face detection analysis`,
|
|
135
|
-
requestFormat:
|
|
135
|
+
requestFormat: 'json',
|
|
136
136
|
parameters: [
|
|
137
137
|
{
|
|
138
|
-
name:
|
|
139
|
-
type:
|
|
138
|
+
name: 'face_detection_id',
|
|
139
|
+
type: 'Path',
|
|
140
140
|
schema: zod_1.z.string().uuid(),
|
|
141
141
|
},
|
|
142
142
|
],
|
|
@@ -155,7 +155,7 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
155
155
|
],
|
|
156
156
|
},
|
|
157
157
|
]);
|
|
158
|
-
exports.Face_DetectionApi = new core_1.Zodios(
|
|
158
|
+
exports.Face_DetectionApi = new core_1.Zodios('https://api.cloudglue.dev/v1', endpoints);
|
|
159
159
|
function createApiClient(baseUrl, options) {
|
|
160
160
|
return new core_1.Zodios(baseUrl, endpoints, options);
|
|
161
161
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { type ZodiosOptions } from
|
|
2
|
-
import { z } from
|
|
3
|
-
import { FaceBoundingBox } from
|
|
4
|
-
import { FrameExtractionConfig } from
|
|
1
|
+
import { type ZodiosOptions } from '@zodios/core';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { FaceBoundingBox } from './common';
|
|
4
|
+
import { FrameExtractionConfig } from './common';
|
|
5
5
|
type FaceMatch = {
|
|
6
6
|
face_match_id: string;
|
|
7
7
|
face_detection_id?: string | undefined;
|
|
8
8
|
frame_extraction_id?: string | undefined;
|
|
9
9
|
file_id?: string | undefined;
|
|
10
|
-
status:
|
|
10
|
+
status: 'pending' | 'processing' | 'completed' | 'failed';
|
|
11
11
|
created_at: number;
|
|
12
12
|
source_face_bounding_box?: (FaceBoundingBox | null) | undefined;
|
|
13
13
|
data?: Partial<{
|
|
14
|
-
object:
|
|
14
|
+
object: 'list';
|
|
15
15
|
total: number;
|
|
16
16
|
limit: number;
|
|
17
17
|
offset: number;
|