@azure-rest/ai-vision-face 1.0.0-alpha.20250417.1 → 1.0.0-alpha.20250421.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/README.md +14 -17
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -377,12 +377,13 @@ const client = FaceClient(endpoint, credential);
|
|
|
377
377
|
|
|
378
378
|
console.log("Create a new liveness session.");
|
|
379
379
|
const createLivenessSessionResponse = await client
|
|
380
|
-
.path("/detectLiveness
|
|
380
|
+
.path("/detectLiveness/singleModal/sessions")
|
|
381
381
|
.post({
|
|
382
382
|
body: {
|
|
383
383
|
livenessOperationMode: "Passive",
|
|
384
384
|
deviceCorrelationId: randomUUID(),
|
|
385
|
-
|
|
385
|
+
sendResultsToClient: false,
|
|
386
|
+
authTokenTimeToLiveInSeconds: 60,
|
|
386
387
|
},
|
|
387
388
|
});
|
|
388
389
|
|
|
@@ -395,7 +396,7 @@ const { sessionId } = createLivenessSessionResponse.body;
|
|
|
395
396
|
|
|
396
397
|
console.log("Get liveness detection results.");
|
|
397
398
|
const getLivenessSessionResponse = await client
|
|
398
|
-
.path("/detectLiveness
|
|
399
|
+
.path("/detectLiveness/singleModal/sessions/{sessionId}", sessionId)
|
|
399
400
|
.get();
|
|
400
401
|
|
|
401
402
|
if (isUnexpected(getLivenessSessionResponse)) {
|
|
@@ -418,26 +419,22 @@ const client = FaceClient(endpoint, credential);
|
|
|
418
419
|
|
|
419
420
|
console.log("Create a new liveness with verify session with verify image.");
|
|
420
421
|
const createLivenessSessionResponse = await client
|
|
421
|
-
.path("/detectLivenessWithVerify
|
|
422
|
+
.path("/detectLivenessWithVerify/singleModal/sessions")
|
|
422
423
|
.post({
|
|
423
424
|
contentType: "multipart/form-data",
|
|
424
425
|
body: [
|
|
425
426
|
{
|
|
426
|
-
name: "
|
|
427
|
+
name: "VerifyImage",
|
|
427
428
|
body: readFileSync("path/to/verify/image"),
|
|
428
|
-
filename: "verifyImage.jpg",
|
|
429
429
|
},
|
|
430
430
|
{
|
|
431
|
-
name: "
|
|
432
|
-
body:
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
{
|
|
439
|
-
name: "enableSessionImage",
|
|
440
|
-
body: true,
|
|
431
|
+
name: "Parameters",
|
|
432
|
+
body: {
|
|
433
|
+
livenessOperationMode: "Passive",
|
|
434
|
+
sendResultsToClient: false,
|
|
435
|
+
authTokenTimeToLiveInSeconds: 60,
|
|
436
|
+
deviceCorrelationId: randomUUID(),
|
|
437
|
+
},
|
|
441
438
|
},
|
|
442
439
|
],
|
|
443
440
|
});
|
|
@@ -451,7 +448,7 @@ const { sessionId } = createLivenessSessionResponse.body;
|
|
|
451
448
|
|
|
452
449
|
console.log("Get the liveness detection and verification result.");
|
|
453
450
|
const getLivenessSessionResultResponse = await client
|
|
454
|
-
.path("/detectLivenessWithVerify
|
|
451
|
+
.path("/detectLivenessWithVerify/singleModal/sessions/{sessionId}", sessionId)
|
|
455
452
|
.get();
|
|
456
453
|
|
|
457
454
|
if (isUnexpected(getLivenessSessionResultResponse)) {
|