@aviaryhq/cloudglue-js 0.4.13 → 0.5.1
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/Face_Detection.d.ts +45 -0
- package/dist/generated/Face_Detection.js +39 -0
- package/dist/generated/Face_Match.d.ts +47 -0
- package/dist/generated/Face_Match.js +41 -0
- package/dist/src/api/face-detection.api.d.ts +13 -0
- package/dist/src/api/face-detection.api.js +3 -0
- package/dist/src/api/face-match.api.d.ts +15 -0
- package/dist/src/api/face-match.api.js +3 -0
- package/dist/src/client.js +1 -1
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import { type ZodiosOptions } from '@zodios/core';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { FaceBoundingBox } from './common';
|
|
4
4
|
import { FrameExtractionConfig } from './common';
|
|
5
|
+
import { PaginationResponse } from './common';
|
|
5
6
|
type FaceDetection = {
|
|
6
7
|
face_detection_id: string;
|
|
7
8
|
frame_extraction_id?: string | undefined;
|
|
@@ -28,13 +29,25 @@ type DetectedFace = {
|
|
|
28
29
|
timestamp: number;
|
|
29
30
|
thumbnail_url?: string | undefined;
|
|
30
31
|
};
|
|
32
|
+
type FaceDetectionListResponse = PaginationResponse & Partial<{
|
|
33
|
+
data: Array<{
|
|
34
|
+
job_id: string;
|
|
35
|
+
frame_extraction_id?: string | undefined;
|
|
36
|
+
file_id?: string | undefined;
|
|
37
|
+
status: 'pending' | 'processing' | 'completed' | 'failed';
|
|
38
|
+
created_at: number;
|
|
39
|
+
total_faces?: number | undefined;
|
|
40
|
+
}>;
|
|
41
|
+
}>;
|
|
31
42
|
declare const FaceDetectionRequest: z.ZodType<FaceDetectionRequest>;
|
|
32
43
|
declare const DetectedFace: z.ZodType<DetectedFace>;
|
|
33
44
|
declare const FaceDetection: z.ZodType<FaceDetection>;
|
|
45
|
+
declare const FaceDetectionListResponse: z.ZodType<FaceDetectionListResponse>;
|
|
34
46
|
export declare const schemas: {
|
|
35
47
|
FaceDetectionRequest: z.ZodType<FaceDetectionRequest, z.ZodTypeDef, FaceDetectionRequest>;
|
|
36
48
|
DetectedFace: z.ZodType<DetectedFace, z.ZodTypeDef, DetectedFace>;
|
|
37
49
|
FaceDetection: z.ZodType<FaceDetection, z.ZodTypeDef, FaceDetection>;
|
|
50
|
+
FaceDetectionListResponse: z.ZodType<FaceDetectionListResponse, z.ZodTypeDef, FaceDetectionListResponse>;
|
|
38
51
|
};
|
|
39
52
|
export declare const Face_DetectionApi: import("@zodios/core").ZodiosInstance<[{
|
|
40
53
|
method: "post";
|
|
@@ -90,6 +103,22 @@ export declare const Face_DetectionApi: import("@zodios/core").ZodiosInstance<[{
|
|
|
90
103
|
error: z.ZodString;
|
|
91
104
|
}, z.ZodTypeAny, "passthrough">>;
|
|
92
105
|
}];
|
|
106
|
+
}, {
|
|
107
|
+
method: "get";
|
|
108
|
+
path: "/face-detect";
|
|
109
|
+
alias: "listFaceDetection";
|
|
110
|
+
description: "List all face detection jobs";
|
|
111
|
+
requestFormat: "json";
|
|
112
|
+
parameters: [{
|
|
113
|
+
name: "limit";
|
|
114
|
+
type: "Query";
|
|
115
|
+
schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
116
|
+
}, {
|
|
117
|
+
name: "offset";
|
|
118
|
+
type: "Query";
|
|
119
|
+
schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
120
|
+
}];
|
|
121
|
+
response: z.ZodType<FaceDetectionListResponse, z.ZodTypeDef, FaceDetectionListResponse>;
|
|
93
122
|
}, {
|
|
94
123
|
method: "get";
|
|
95
124
|
path: "/face-detect/:face_detection_id";
|
|
@@ -225,6 +254,22 @@ export declare function createApiClient(baseUrl: string, options?: ZodiosOptions
|
|
|
225
254
|
error: z.ZodString;
|
|
226
255
|
}, z.ZodTypeAny, "passthrough">>;
|
|
227
256
|
}];
|
|
257
|
+
}, {
|
|
258
|
+
method: "get";
|
|
259
|
+
path: "/face-detect";
|
|
260
|
+
alias: "listFaceDetection";
|
|
261
|
+
description: "List all face detection jobs";
|
|
262
|
+
requestFormat: "json";
|
|
263
|
+
parameters: [{
|
|
264
|
+
name: "limit";
|
|
265
|
+
type: "Query";
|
|
266
|
+
schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
267
|
+
}, {
|
|
268
|
+
name: "offset";
|
|
269
|
+
type: "Query";
|
|
270
|
+
schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
271
|
+
}];
|
|
272
|
+
response: z.ZodType<FaceDetectionListResponse, z.ZodTypeDef, FaceDetectionListResponse>;
|
|
228
273
|
}, {
|
|
229
274
|
method: "get";
|
|
230
275
|
path: "/face-detect/:face_detection_id";
|
|
@@ -6,6 +6,7 @@ const core_1 = require("@zodios/core");
|
|
|
6
6
|
const zod_1 = require("zod");
|
|
7
7
|
const common_1 = require("./common");
|
|
8
8
|
const common_2 = require("./common");
|
|
9
|
+
const common_3 = require("./common");
|
|
9
10
|
const FaceDetectionRequest = zod_1.z
|
|
10
11
|
.object({
|
|
11
12
|
url: zod_1.z.string(),
|
|
@@ -46,10 +47,28 @@ const FaceDetection = zod_1.z
|
|
|
46
47
|
})
|
|
47
48
|
.strict()
|
|
48
49
|
.passthrough();
|
|
50
|
+
const FaceDetectionListResponse = common_3.PaginationResponse.and(zod_1.z
|
|
51
|
+
.object({
|
|
52
|
+
data: zod_1.z.array(zod_1.z
|
|
53
|
+
.object({
|
|
54
|
+
job_id: zod_1.z.string().uuid(),
|
|
55
|
+
frame_extraction_id: zod_1.z.string().uuid().optional(),
|
|
56
|
+
file_id: zod_1.z.string().uuid().optional(),
|
|
57
|
+
status: zod_1.z.enum(['pending', 'processing', 'completed', 'failed']),
|
|
58
|
+
created_at: zod_1.z.number(),
|
|
59
|
+
total_faces: zod_1.z.number().int().optional(),
|
|
60
|
+
})
|
|
61
|
+
.strict()
|
|
62
|
+
.passthrough()),
|
|
63
|
+
})
|
|
64
|
+
.partial()
|
|
65
|
+
.strict()
|
|
66
|
+
.passthrough());
|
|
49
67
|
exports.schemas = {
|
|
50
68
|
FaceDetectionRequest,
|
|
51
69
|
DetectedFace,
|
|
52
70
|
FaceDetection,
|
|
71
|
+
FaceDetectionListResponse,
|
|
53
72
|
};
|
|
54
73
|
const endpoints = (0, core_1.makeApi)([
|
|
55
74
|
{
|
|
@@ -90,6 +109,26 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
90
109
|
},
|
|
91
110
|
],
|
|
92
111
|
},
|
|
112
|
+
{
|
|
113
|
+
method: 'get',
|
|
114
|
+
path: '/face-detect',
|
|
115
|
+
alias: 'listFaceDetection',
|
|
116
|
+
description: `List all face detection jobs`,
|
|
117
|
+
requestFormat: 'json',
|
|
118
|
+
parameters: [
|
|
119
|
+
{
|
|
120
|
+
name: 'limit',
|
|
121
|
+
type: 'Query',
|
|
122
|
+
schema: zod_1.z.number().int().gte(1).lte(100).optional().default(50),
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: 'offset',
|
|
126
|
+
type: 'Query',
|
|
127
|
+
schema: zod_1.z.number().int().gte(0).optional().default(0),
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
response: FaceDetectionListResponse,
|
|
131
|
+
},
|
|
93
132
|
{
|
|
94
133
|
method: 'get',
|
|
95
134
|
path: '/face-detect/:face_detection_id',
|
|
@@ -2,6 +2,7 @@ import { type ZodiosOptions } from '@zodios/core';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { FaceBoundingBox } from './common';
|
|
4
4
|
import { FrameExtractionConfig } from './common';
|
|
5
|
+
import { PaginationResponse } from './common';
|
|
5
6
|
type FaceMatch = {
|
|
6
7
|
face_match_id: string;
|
|
7
8
|
face_detection_id?: string | undefined;
|
|
@@ -38,10 +39,23 @@ type SourceImage = Partial<{
|
|
|
38
39
|
url: string;
|
|
39
40
|
base64_image: string;
|
|
40
41
|
}>;
|
|
42
|
+
type FaceMatchListResponse = PaginationResponse & Partial<{
|
|
43
|
+
data: Array<{
|
|
44
|
+
job_id: string;
|
|
45
|
+
face_detection_id?: string | undefined;
|
|
46
|
+
frame_extraction_id?: string | undefined;
|
|
47
|
+
file_id?: string | undefined;
|
|
48
|
+
status: 'pending' | 'processing' | 'completed' | 'failed';
|
|
49
|
+
created_at: number;
|
|
50
|
+
source_face_bounding_box?: (FaceBoundingBox | null) | undefined;
|
|
51
|
+
match_count?: number | undefined;
|
|
52
|
+
}>;
|
|
53
|
+
}>;
|
|
41
54
|
declare const SourceImage: z.ZodType<SourceImage>;
|
|
42
55
|
declare const FaceMatchRequest: z.ZodType<FaceMatchRequest>;
|
|
43
56
|
declare const FaceMatchResult: z.ZodType<FaceMatchResult>;
|
|
44
57
|
declare const FaceMatch: z.ZodType<FaceMatch>;
|
|
58
|
+
declare const FaceMatchListResponse: z.ZodType<FaceMatchListResponse>;
|
|
45
59
|
export declare const schemas: {
|
|
46
60
|
SourceImage: z.ZodType<Partial<{
|
|
47
61
|
url: string;
|
|
@@ -53,6 +67,7 @@ export declare const schemas: {
|
|
|
53
67
|
FaceMatchRequest: z.ZodType<FaceMatchRequest, z.ZodTypeDef, FaceMatchRequest>;
|
|
54
68
|
FaceMatchResult: z.ZodType<FaceMatchResult, z.ZodTypeDef, FaceMatchResult>;
|
|
55
69
|
FaceMatch: z.ZodType<FaceMatch, z.ZodTypeDef, FaceMatch>;
|
|
70
|
+
FaceMatchListResponse: z.ZodType<FaceMatchListResponse, z.ZodTypeDef, FaceMatchListResponse>;
|
|
56
71
|
};
|
|
57
72
|
export declare const Face_MatchApi: import("@zodios/core").ZodiosInstance<[{
|
|
58
73
|
method: "post";
|
|
@@ -108,6 +123,22 @@ export declare const Face_MatchApi: import("@zodios/core").ZodiosInstance<[{
|
|
|
108
123
|
error: z.ZodString;
|
|
109
124
|
}, z.ZodTypeAny, "passthrough">>;
|
|
110
125
|
}];
|
|
126
|
+
}, {
|
|
127
|
+
method: "get";
|
|
128
|
+
path: "/face-match";
|
|
129
|
+
alias: "listFaceMatch";
|
|
130
|
+
description: "List all face match jobs";
|
|
131
|
+
requestFormat: "json";
|
|
132
|
+
parameters: [{
|
|
133
|
+
name: "limit";
|
|
134
|
+
type: "Query";
|
|
135
|
+
schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
136
|
+
}, {
|
|
137
|
+
name: "offset";
|
|
138
|
+
type: "Query";
|
|
139
|
+
schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
140
|
+
}];
|
|
141
|
+
response: z.ZodType<FaceMatchListResponse, z.ZodTypeDef, FaceMatchListResponse>;
|
|
111
142
|
}, {
|
|
112
143
|
method: "get";
|
|
113
144
|
path: "/face-match/:face_match_id";
|
|
@@ -246,6 +277,22 @@ export declare function createApiClient(baseUrl: string, options?: ZodiosOptions
|
|
|
246
277
|
error: z.ZodString;
|
|
247
278
|
}, z.ZodTypeAny, "passthrough">>;
|
|
248
279
|
}];
|
|
280
|
+
}, {
|
|
281
|
+
method: "get";
|
|
282
|
+
path: "/face-match";
|
|
283
|
+
alias: "listFaceMatch";
|
|
284
|
+
description: "List all face match jobs";
|
|
285
|
+
requestFormat: "json";
|
|
286
|
+
parameters: [{
|
|
287
|
+
name: "limit";
|
|
288
|
+
type: "Query";
|
|
289
|
+
schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
290
|
+
}, {
|
|
291
|
+
name: "offset";
|
|
292
|
+
type: "Query";
|
|
293
|
+
schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
294
|
+
}];
|
|
295
|
+
response: z.ZodType<FaceMatchListResponse, z.ZodTypeDef, FaceMatchListResponse>;
|
|
249
296
|
}, {
|
|
250
297
|
method: "get";
|
|
251
298
|
path: "/face-match/:face_match_id";
|
|
@@ -6,6 +6,7 @@ const core_1 = require("@zodios/core");
|
|
|
6
6
|
const zod_1 = require("zod");
|
|
7
7
|
const common_1 = require("./common");
|
|
8
8
|
const common_2 = require("./common");
|
|
9
|
+
const common_3 = require("./common");
|
|
9
10
|
const SourceImage = zod_1.z
|
|
10
11
|
.object({ url: zod_1.z.string(), base64_image: zod_1.z.string() })
|
|
11
12
|
.partial()
|
|
@@ -57,11 +58,31 @@ const FaceMatch = zod_1.z
|
|
|
57
58
|
})
|
|
58
59
|
.strict()
|
|
59
60
|
.passthrough();
|
|
61
|
+
const FaceMatchListResponse = common_3.PaginationResponse.and(zod_1.z
|
|
62
|
+
.object({
|
|
63
|
+
data: zod_1.z.array(zod_1.z
|
|
64
|
+
.object({
|
|
65
|
+
job_id: zod_1.z.string().uuid(),
|
|
66
|
+
face_detection_id: zod_1.z.string().uuid().optional(),
|
|
67
|
+
frame_extraction_id: zod_1.z.string().uuid().optional(),
|
|
68
|
+
file_id: zod_1.z.string().uuid().optional(),
|
|
69
|
+
status: zod_1.z.enum(['pending', 'processing', 'completed', 'failed']),
|
|
70
|
+
created_at: zod_1.z.number(),
|
|
71
|
+
source_face_bounding_box: common_1.FaceBoundingBox.nullish(),
|
|
72
|
+
match_count: zod_1.z.number().int().optional(),
|
|
73
|
+
})
|
|
74
|
+
.strict()
|
|
75
|
+
.passthrough()),
|
|
76
|
+
})
|
|
77
|
+
.partial()
|
|
78
|
+
.strict()
|
|
79
|
+
.passthrough());
|
|
60
80
|
exports.schemas = {
|
|
61
81
|
SourceImage,
|
|
62
82
|
FaceMatchRequest,
|
|
63
83
|
FaceMatchResult,
|
|
64
84
|
FaceMatch,
|
|
85
|
+
FaceMatchListResponse,
|
|
65
86
|
};
|
|
66
87
|
const endpoints = (0, core_1.makeApi)([
|
|
67
88
|
{
|
|
@@ -102,6 +123,26 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
102
123
|
},
|
|
103
124
|
],
|
|
104
125
|
},
|
|
126
|
+
{
|
|
127
|
+
method: 'get',
|
|
128
|
+
path: '/face-match',
|
|
129
|
+
alias: 'listFaceMatch',
|
|
130
|
+
description: `List all face match jobs`,
|
|
131
|
+
requestFormat: 'json',
|
|
132
|
+
parameters: [
|
|
133
|
+
{
|
|
134
|
+
name: 'limit',
|
|
135
|
+
type: 'Query',
|
|
136
|
+
schema: zod_1.z.number().int().gte(1).lte(100).optional().default(50),
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
name: 'offset',
|
|
140
|
+
type: 'Query',
|
|
141
|
+
schema: zod_1.z.number().int().gte(0).optional().default(0),
|
|
142
|
+
},
|
|
143
|
+
],
|
|
144
|
+
response: FaceMatchListResponse,
|
|
145
|
+
},
|
|
105
146
|
{
|
|
106
147
|
method: 'get',
|
|
107
148
|
path: '/face-match/:face_match_id',
|
|
@@ -54,6 +54,19 @@ export declare class EnhancedFaceDetectionApi {
|
|
|
54
54
|
deleteFaceDetection(faceDetectionId: string): Promise<import("zod").objectOutputType<{
|
|
55
55
|
id: import("zod").ZodString;
|
|
56
56
|
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
57
|
+
listFaceDetections(params?: {
|
|
58
|
+
limit?: number;
|
|
59
|
+
offset?: number;
|
|
60
|
+
}): Promise<import("../../generated/common").PaginationResponse & Partial<{
|
|
61
|
+
data: Array<{
|
|
62
|
+
job_id: string;
|
|
63
|
+
frame_extraction_id?: string | undefined;
|
|
64
|
+
file_id?: string | undefined;
|
|
65
|
+
status: "pending" | "processing" | "completed" | "failed";
|
|
66
|
+
created_at: number;
|
|
67
|
+
total_faces?: number | undefined;
|
|
68
|
+
}>;
|
|
69
|
+
}>>;
|
|
57
70
|
waitForReady(faceDetectionId: string, options?: WaitForReadyOptions): Promise<{
|
|
58
71
|
face_detection_id: string;
|
|
59
72
|
frame_extraction_id?: string | undefined;
|
|
@@ -21,6 +21,9 @@ class EnhancedFaceDetectionApi {
|
|
|
21
21
|
params: { face_detection_id: faceDetectionId },
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
+
async listFaceDetections(params = {}) {
|
|
25
|
+
return this.api.listFaceDetection({ queries: params });
|
|
26
|
+
}
|
|
24
27
|
async waitForReady(faceDetectionId, options = {}) {
|
|
25
28
|
const { pollingInterval = 5000, maxAttempts = 36 } = options;
|
|
26
29
|
let attempts = 0;
|
|
@@ -68,6 +68,21 @@ export declare class EnhancedFaceMatchApi {
|
|
|
68
68
|
face_match_id: import("zod").ZodString;
|
|
69
69
|
object: import("zod").ZodLiteral<"face_match">;
|
|
70
70
|
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
71
|
+
listFaceMatches(params?: {
|
|
72
|
+
limit?: number;
|
|
73
|
+
offset?: number;
|
|
74
|
+
}): Promise<import("../../generated/common").PaginationResponse & Partial<{
|
|
75
|
+
data: Array<{
|
|
76
|
+
job_id: string;
|
|
77
|
+
face_detection_id?: string | undefined;
|
|
78
|
+
frame_extraction_id?: string | undefined;
|
|
79
|
+
file_id?: string | undefined;
|
|
80
|
+
status: "pending" | "processing" | "completed" | "failed";
|
|
81
|
+
created_at: number;
|
|
82
|
+
source_face_bounding_box?: (import("../../generated/common").FaceBoundingBox | null) | undefined;
|
|
83
|
+
match_count?: number | undefined;
|
|
84
|
+
}>;
|
|
85
|
+
}>>;
|
|
71
86
|
waitForReady(faceMatchId: string, options?: WaitForReadyOptions): Promise<{
|
|
72
87
|
face_match_id: string;
|
|
73
88
|
face_detection_id?: string | undefined;
|
|
@@ -21,6 +21,9 @@ class EnhancedFaceMatchApi {
|
|
|
21
21
|
params: { face_match_id: faceMatchId },
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
+
async listFaceMatches(params = {}) {
|
|
25
|
+
return this.api.listFaceMatch({ queries: params });
|
|
26
|
+
}
|
|
24
27
|
async waitForReady(faceMatchId, options = {}) {
|
|
25
28
|
const { pollingInterval = 5000, maxAttempts = 36 } = options;
|
|
26
29
|
let attempts = 0;
|
package/dist/src/client.js
CHANGED