@regulaforensics/facesdk-webclient 4.1.3 → 4.1.5
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/cjs-es5/api/group-api.js +99 -50
- package/dist/cjs-es5/api/matching-api.js +116 -19
- package/dist/cjs-es5/api/person-api.js +141 -71
- package/dist/cjs-es5/api/search-api.js +15 -8
- package/dist/cjs-es5/ext/group-api.js +15 -15
- package/dist/cjs-es5/ext/matching-api.js +5 -5
- package/dist/cjs-es5/ext/person-api.js +21 -21
- package/dist/cjs-es5/ext/search-api.js +3 -3
- package/dist/cjs-es5/models/index.js +10 -2
- package/dist/cjs-es5/models/match-and-search-request-all-of-images.js +16 -0
- package/dist/cjs-es5/models/match-and-search-request-all-of.js +16 -0
- package/dist/cjs-es5/models/match-and-search-request.js +16 -0
- package/dist/cjs-es5/models/match-and-search-response-all-of-detections.js +16 -0
- package/dist/cjs-es5/models/match-and-search-response-all-of.js +16 -0
- package/dist/cjs-es5/models/match-and-search-response.js +16 -0
- package/dist/cjs-es5/models/person-with-images-all-of.js +16 -0
- package/dist/cjs-es5/models/person-with-images.js +16 -0
- package/dist/cjs-es5/models/search-parameters.js +16 -0
- package/dist/esm-es5/api/group-api.js +99 -50
- package/dist/esm-es5/api/matching-api.js +116 -19
- package/dist/esm-es5/api/person-api.js +141 -71
- package/dist/esm-es5/api/search-api.js +15 -8
- package/dist/esm-es5/ext/group-api.js +15 -15
- package/dist/esm-es5/ext/matching-api.js +5 -5
- package/dist/esm-es5/ext/person-api.js +21 -21
- package/dist/esm-es5/ext/search-api.js +3 -3
- package/dist/esm-es5/models/index.js +10 -2
- package/dist/esm-es5/models/match-and-search-request-all-of-images.js +14 -0
- package/dist/esm-es5/models/match-and-search-request-all-of.js +14 -0
- package/dist/esm-es5/models/match-and-search-request.js +14 -0
- package/dist/esm-es5/models/match-and-search-response-all-of-detections.js +14 -0
- package/dist/esm-es5/models/match-and-search-response-all-of.js +14 -0
- package/dist/esm-es5/models/match-and-search-response.js +14 -0
- package/dist/esm-es5/models/person-with-images-all-of.js +14 -0
- package/dist/esm-es5/models/person-with-images.js +14 -0
- package/dist/esm-es5/models/search-parameters.js +14 -0
- package/package.json +1 -1
- package/src/api/group-api.ts +105 -49
- package/src/api/matching-api.ts +115 -18
- package/src/api/person-api.ts +150 -70
- package/src/api/search-api.ts +15 -7
- package/src/ext/group-api.ts +14 -14
- package/src/ext/matching-api.ts +4 -4
- package/src/ext/person-api.ts +20 -20
- package/src/ext/search-api.ts +2 -2
- package/src/models/crop.ts +1 -1
- package/src/models/image.ts +12 -0
- package/src/models/index.ts +9 -1
- package/src/models/match-and-search-request-all-of-images.ts +38 -0
- package/src/models/match-and-search-request-all-of.ts +31 -0
- package/src/models/match-and-search-request.ts +26 -0
- package/src/models/match-and-search-response-all-of-detections.ts +45 -0
- package/src/models/match-and-search-response-all-of.ts +50 -0
- package/src/models/match-and-search-response.ts +28 -0
- package/src/models/person-with-images-all-of.ts +31 -0
- package/src/models/person-with-images.ts +26 -0
- package/src/models/recognize-image-all-of.ts +6 -0
- package/src/models/search-parameters.ts +42 -0
- package/src/models/search-request.ts +2 -2
package/src/api/matching-api.ts
CHANGED
|
@@ -25,6 +25,10 @@ import { DetectRequest } from '../models';
|
|
|
25
25
|
// @ts-ignore
|
|
26
26
|
import { DetectResponse } from '../models';
|
|
27
27
|
// @ts-ignore
|
|
28
|
+
import { MatchAndSearchRequest } from '../models';
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
import { MatchAndSearchResponse } from '../models';
|
|
31
|
+
// @ts-ignore
|
|
28
32
|
import { MatchRequest } from '../models';
|
|
29
33
|
// @ts-ignore
|
|
30
34
|
import { MatchResponse } from '../models';
|
|
@@ -38,10 +42,11 @@ export const MatchingApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
38
42
|
*
|
|
39
43
|
* @summary Detect facial coordinates
|
|
40
44
|
* @param {DetectRequest} detectRequest
|
|
45
|
+
* @param {string} [xRequestID]
|
|
41
46
|
* @param {*} [options] Override http request option.
|
|
42
47
|
* @throws {RequiredError}
|
|
43
48
|
*/
|
|
44
|
-
detect: async (detectRequest: DetectRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
49
|
+
detect: async (detectRequest: DetectRequest, xRequestID?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
45
50
|
// verify required parameter 'detectRequest' is not null or undefined
|
|
46
51
|
assertParamExists('detect', 'detectRequest', detectRequest)
|
|
47
52
|
const localVarPath = `/api/detect`;
|
|
@@ -56,6 +61,10 @@ export const MatchingApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
56
61
|
const localVarHeaderParameter = {} as any;
|
|
57
62
|
const localVarQueryParameter = {} as any;
|
|
58
63
|
|
|
64
|
+
if (xRequestID !== undefined && xRequestID !== null) {
|
|
65
|
+
localVarHeaderParameter['X-RequestID'] = String(xRequestID);
|
|
66
|
+
}
|
|
67
|
+
|
|
59
68
|
|
|
60
69
|
|
|
61
70
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
@@ -72,12 +81,13 @@ export const MatchingApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
72
81
|
},
|
|
73
82
|
/**
|
|
74
83
|
*
|
|
75
|
-
* @summary Compare provided face images in all combinations and return similarity score for each pair.
|
|
84
|
+
* @summary Compare provided face images in all combinations and return the similarity score for each pair.
|
|
76
85
|
* @param {MatchRequest} matchRequest
|
|
86
|
+
* @param {string} [xRequestID]
|
|
77
87
|
* @param {*} [options] Override http request option.
|
|
78
88
|
* @throws {RequiredError}
|
|
79
89
|
*/
|
|
80
|
-
match: async (matchRequest: MatchRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
90
|
+
match: async (matchRequest: MatchRequest, xRequestID?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
81
91
|
// verify required parameter 'matchRequest' is not null or undefined
|
|
82
92
|
assertParamExists('match', 'matchRequest', matchRequest)
|
|
83
93
|
const localVarPath = `/api/match`;
|
|
@@ -92,6 +102,10 @@ export const MatchingApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
92
102
|
const localVarHeaderParameter = {} as any;
|
|
93
103
|
const localVarQueryParameter = {} as any;
|
|
94
104
|
|
|
105
|
+
if (xRequestID !== undefined && xRequestID !== null) {
|
|
106
|
+
localVarHeaderParameter['X-RequestID'] = String(xRequestID);
|
|
107
|
+
}
|
|
108
|
+
|
|
95
109
|
|
|
96
110
|
|
|
97
111
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
@@ -101,6 +115,47 @@ export const MatchingApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
101
115
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
102
116
|
localVarRequestOptions.data = serializeDataIfNeeded(matchRequest, localVarRequestOptions, configuration)
|
|
103
117
|
|
|
118
|
+
return {
|
|
119
|
+
url: toPathString(localVarUrlObj),
|
|
120
|
+
options: localVarRequestOptions,
|
|
121
|
+
};
|
|
122
|
+
},
|
|
123
|
+
/**
|
|
124
|
+
*
|
|
125
|
+
* @summary Match and Search in one request
|
|
126
|
+
* @param {MatchAndSearchRequest} matchAndSearchRequest
|
|
127
|
+
* @param {string} [xRequestID]
|
|
128
|
+
* @param {*} [options] Override http request option.
|
|
129
|
+
* @throws {RequiredError}
|
|
130
|
+
*/
|
|
131
|
+
matchAndSearch: async (matchAndSearchRequest: MatchAndSearchRequest, xRequestID?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
132
|
+
// verify required parameter 'matchAndSearchRequest' is not null or undefined
|
|
133
|
+
assertParamExists('matchAndSearch', 'matchAndSearchRequest', matchAndSearchRequest)
|
|
134
|
+
const localVarPath = `/api/match_and_search`;
|
|
135
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
136
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
137
|
+
let baseOptions;
|
|
138
|
+
if (configuration) {
|
|
139
|
+
baseOptions = configuration.baseOptions;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
143
|
+
const localVarHeaderParameter = {} as any;
|
|
144
|
+
const localVarQueryParameter = {} as any;
|
|
145
|
+
|
|
146
|
+
if (xRequestID !== undefined && xRequestID !== null) {
|
|
147
|
+
localVarHeaderParameter['X-RequestID'] = String(xRequestID);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
153
|
+
|
|
154
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
155
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
156
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
157
|
+
localVarRequestOptions.data = serializeDataIfNeeded(matchAndSearchRequest, localVarRequestOptions, configuration)
|
|
158
|
+
|
|
104
159
|
return {
|
|
105
160
|
url: toPathString(localVarUrlObj),
|
|
106
161
|
options: localVarRequestOptions,
|
|
@@ -120,22 +175,36 @@ export const MatchingApiFp = function(configuration?: Configuration) {
|
|
|
120
175
|
*
|
|
121
176
|
* @summary Detect facial coordinates
|
|
122
177
|
* @param {DetectRequest} detectRequest
|
|
178
|
+
* @param {string} [xRequestID]
|
|
123
179
|
* @param {*} [options] Override http request option.
|
|
124
180
|
* @throws {RequiredError}
|
|
125
181
|
*/
|
|
126
|
-
async detect(detectRequest: DetectRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DetectResponse>> {
|
|
127
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.detect(detectRequest, options);
|
|
182
|
+
async detect(detectRequest: DetectRequest, xRequestID?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DetectResponse>> {
|
|
183
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.detect(detectRequest, xRequestID, options);
|
|
128
184
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
129
185
|
},
|
|
130
186
|
/**
|
|
131
187
|
*
|
|
132
|
-
* @summary Compare provided face images in all combinations and return similarity score for each pair.
|
|
188
|
+
* @summary Compare provided face images in all combinations and return the similarity score for each pair.
|
|
133
189
|
* @param {MatchRequest} matchRequest
|
|
190
|
+
* @param {string} [xRequestID]
|
|
191
|
+
* @param {*} [options] Override http request option.
|
|
192
|
+
* @throws {RequiredError}
|
|
193
|
+
*/
|
|
194
|
+
async match(matchRequest: MatchRequest, xRequestID?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MatchResponse>> {
|
|
195
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.match(matchRequest, xRequestID, options);
|
|
196
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
197
|
+
},
|
|
198
|
+
/**
|
|
199
|
+
*
|
|
200
|
+
* @summary Match and Search in one request
|
|
201
|
+
* @param {MatchAndSearchRequest} matchAndSearchRequest
|
|
202
|
+
* @param {string} [xRequestID]
|
|
134
203
|
* @param {*} [options] Override http request option.
|
|
135
204
|
* @throws {RequiredError}
|
|
136
205
|
*/
|
|
137
|
-
async
|
|
138
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
206
|
+
async matchAndSearch(matchAndSearchRequest: MatchAndSearchRequest, xRequestID?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MatchAndSearchResponse>> {
|
|
207
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.matchAndSearch(matchAndSearchRequest, xRequestID, options);
|
|
139
208
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
140
209
|
},
|
|
141
210
|
}
|
|
@@ -152,21 +221,34 @@ export const MatchingApiFactory = function (configuration?: Configuration, baseP
|
|
|
152
221
|
*
|
|
153
222
|
* @summary Detect facial coordinates
|
|
154
223
|
* @param {DetectRequest} detectRequest
|
|
224
|
+
* @param {string} [xRequestID]
|
|
155
225
|
* @param {*} [options] Override http request option.
|
|
156
226
|
* @throws {RequiredError}
|
|
157
227
|
*/
|
|
158
|
-
detect(detectRequest: DetectRequest, options?: any): AxiosPromise<DetectResponse> {
|
|
159
|
-
return localVarFp.detect(detectRequest, options).then((request) => request(axios, basePath));
|
|
228
|
+
detect(detectRequest: DetectRequest, xRequestID?: string, options?: any): AxiosPromise<DetectResponse> {
|
|
229
|
+
return localVarFp.detect(detectRequest, xRequestID, options).then((request) => request(axios, basePath));
|
|
160
230
|
},
|
|
161
231
|
/**
|
|
162
232
|
*
|
|
163
|
-
* @summary Compare provided face images in all combinations and return similarity score for each pair.
|
|
233
|
+
* @summary Compare provided face images in all combinations and return the similarity score for each pair.
|
|
164
234
|
* @param {MatchRequest} matchRequest
|
|
235
|
+
* @param {string} [xRequestID]
|
|
165
236
|
* @param {*} [options] Override http request option.
|
|
166
237
|
* @throws {RequiredError}
|
|
167
238
|
*/
|
|
168
|
-
match(matchRequest: MatchRequest, options?: any): AxiosPromise<MatchResponse> {
|
|
169
|
-
return localVarFp.match(matchRequest, options).then((request) => request(axios, basePath));
|
|
239
|
+
match(matchRequest: MatchRequest, xRequestID?: string, options?: any): AxiosPromise<MatchResponse> {
|
|
240
|
+
return localVarFp.match(matchRequest, xRequestID, options).then((request) => request(axios, basePath));
|
|
241
|
+
},
|
|
242
|
+
/**
|
|
243
|
+
*
|
|
244
|
+
* @summary Match and Search in one request
|
|
245
|
+
* @param {MatchAndSearchRequest} matchAndSearchRequest
|
|
246
|
+
* @param {string} [xRequestID]
|
|
247
|
+
* @param {*} [options] Override http request option.
|
|
248
|
+
* @throws {RequiredError}
|
|
249
|
+
*/
|
|
250
|
+
matchAndSearch(matchAndSearchRequest: MatchAndSearchRequest, xRequestID?: string, options?: any): AxiosPromise<MatchAndSearchResponse> {
|
|
251
|
+
return localVarFp.matchAndSearch(matchAndSearchRequest, xRequestID, options).then((request) => request(axios, basePath));
|
|
170
252
|
},
|
|
171
253
|
};
|
|
172
254
|
};
|
|
@@ -182,23 +264,38 @@ export class MatchingApi extends BaseAPI {
|
|
|
182
264
|
*
|
|
183
265
|
* @summary Detect facial coordinates
|
|
184
266
|
* @param {DetectRequest} detectRequest
|
|
267
|
+
* @param {string} [xRequestID]
|
|
185
268
|
* @param {*} [options] Override http request option.
|
|
186
269
|
* @throws {RequiredError}
|
|
187
270
|
* @memberof MatchingApi
|
|
188
271
|
*/
|
|
189
|
-
public detect(detectRequest: DetectRequest, options?: AxiosRequestConfig) {
|
|
190
|
-
return MatchingApiFp(this.configuration).detect(detectRequest, options).then((request) => request(this.axios, this.basePath));
|
|
272
|
+
public detect(detectRequest: DetectRequest, xRequestID?: string, options?: AxiosRequestConfig) {
|
|
273
|
+
return MatchingApiFp(this.configuration).detect(detectRequest, xRequestID, options).then((request) => request(this.axios, this.basePath));
|
|
191
274
|
}
|
|
192
275
|
|
|
193
276
|
/**
|
|
194
277
|
*
|
|
195
|
-
* @summary Compare provided face images in all combinations and return similarity score for each pair.
|
|
278
|
+
* @summary Compare provided face images in all combinations and return the similarity score for each pair.
|
|
196
279
|
* @param {MatchRequest} matchRequest
|
|
280
|
+
* @param {string} [xRequestID]
|
|
281
|
+
* @param {*} [options] Override http request option.
|
|
282
|
+
* @throws {RequiredError}
|
|
283
|
+
* @memberof MatchingApi
|
|
284
|
+
*/
|
|
285
|
+
public match(matchRequest: MatchRequest, xRequestID?: string, options?: AxiosRequestConfig) {
|
|
286
|
+
return MatchingApiFp(this.configuration).match(matchRequest, xRequestID, options).then((request) => request(this.axios, this.basePath));
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
*
|
|
291
|
+
* @summary Match and Search in one request
|
|
292
|
+
* @param {MatchAndSearchRequest} matchAndSearchRequest
|
|
293
|
+
* @param {string} [xRequestID]
|
|
197
294
|
* @param {*} [options] Override http request option.
|
|
198
295
|
* @throws {RequiredError}
|
|
199
296
|
* @memberof MatchingApi
|
|
200
297
|
*/
|
|
201
|
-
public
|
|
202
|
-
return MatchingApiFp(this.configuration).
|
|
298
|
+
public matchAndSearch(matchAndSearchRequest: MatchAndSearchRequest, xRequestID?: string, options?: AxiosRequestConfig) {
|
|
299
|
+
return MatchingApiFp(this.configuration).matchAndSearch(matchAndSearchRequest, xRequestID, options).then((request) => request(this.axios, this.basePath));
|
|
203
300
|
}
|
|
204
301
|
}
|