Skip to content
Merged
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
fe0ae37
Add following operations:
Jan 30, 2024
3c1a60f
Restructure and rename operations
Mar 14, 2024
a4fc202
Change PD to non-LRO
Mar 18, 2024
455df6b
Update example, doc, data decorator and unnecessary sharedRoute
Mar 18, 2024
445d32e
Use union to represent extensible enum
Mar 22, 2024
83e404a
Mark detect as internal for customization
Apr 11, 2024
eb293f7
Add liveness audit response schema
Apr 11, 2024
91f024a
Update documents (add and fix description format and add examples)
shaoli-msft Apr 11, 2024
2f75bfd
Move path to host template
Apr 12, 2024
652513e
Move suppression to config
Apr 12, 2024
bf514ce
Set liveness with verify session as internal
Apr 18, 2024
00d74b8
Remove 4xx examples for now with some document updates (#4)
shaoli-msft Apr 19, 2024
829533f
Add verify image response in create session
Apr 19, 2024
7f8ce9d
Rename API operation name (#5)
shaoli-msft Apr 22, 2024
f50a01f
Refine verify image header description
Apr 22, 2024
9643b2e
Add partial update for java
Apr 22, 2024
e0ae3c3
Use shared route for DPG LRO
Apr 24, 2024
9b2ef18
Use resource decorator instead of specify resource in LRO response
Apr 24, 2024
8cde1fe
Change name for patch to optional
Apr 24, 2024
8652eb7
Correct operation status name
Apr 24, 2024
a5427dc
Rename operation status model
Apr 25, 2024
9e9dc93
Correct operation result example
Apr 25, 2024
f365a6f
Add gated attribute
Apr 25, 2024
c2fb4c8
Fix validation
Apr 25, 2024
0635092
Force public model for internal detect
Apr 26, 2024
fa241f0
Correct update DPG model
Apr 26, 2024
87f6b4b
Disable detect from url convenientAPI for java
Apr 26, 2024
5f35f0b
Rename dpg write
Apr 26, 2024
593935a
Fix comment
Apr 26, 2024
594ac64
Rename id and remove customized uuid
Apr 26, 2024
75e6255
Correct access level of landmark and attribute
Apr 26, 2024
1e2d809
Correct more models' access
Apr 26, 2024
83d9cb2
Collect client customization into client.tsp
Apr 27, 2024
101ece9
Correct verify pd parameter type
Apr 28, 2024
0a13fa4
Correct type
Apr 29, 2024
61bee89
Reorder detect parameters
Apr 29, 2024
ce0343c
Rename session model
Apr 29, 2024
80b1e9e
Refine description for return reco model
Apr 29, 2024
9121d5e
Remove detection convenient API
Apr 29, 2024
1161f5c
Add link of error code and message (#6)
shaoli-msft Apr 29, 2024
cbdd819
Fix validation
Apr 29, 2024
f0b8bc1
Merge branch 'hachiang/face-typespec' of github.com:Han-msft/azure-re…
Apr 29, 2024
3af37c9
Remove unnecessary model
Apr 29, 2024
0d5d068
Rename model
Apr 30, 2024
d808a7f
Remove redundant line
Apr 30, 2024
482ba27
Merge branch 'main' into hachiang/face-typespec
Han-msft Apr 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion cSpell.json
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,7 @@
"WSUS"
]
},
{
{
"filename": "**/specification/monitor/resource-manager/Microsoft.Insights/**/actionGroups_API.json",
"words": [
"occurringlocation",
Expand All @@ -1250,6 +1250,14 @@
"tsgid",
"correlationid"
]
},
{
"filename": "**/specification/ai/data-plane/Face/**/*.json",
"words": [
"headwear",
"realface",
"spoofface"
]
}
],
"enableFiletypes": [
Expand Down
201 changes: 201 additions & 0 deletions specification/ai/Face/client.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
import "@azure-tools/typespec-client-generator-core";
import "@typespec/rest";
import "@typespec/http";
import "@typespec/versioning";
import "./main.tsp";

using Azure.ClientGenerator.Core;
using Face;

@TypeSpec.Versioning.useDependency(Azure.Core.Versions.v1_0_Preview_2)
@TypeSpec.Versioning.useDependency(Face.Versions.v1_1_preview_1)
namespace ClientCustomizations;

@@clientName(RecognitionModel, "FaceRecognitionModel");
@@clientName(DetectionModel, "FaceDetectionModel");
@@clientName(OperationStatus, "FaceOperationStatus");
@@clientName(TrainingResult, "FaceCollectionTrainingResult");
@@clientName(IdentificationResult, "FaceIdentificationResult");
@@clientName(IdentificationCandidate, "FaceIdentificationCandidate");
@@clientName(VerificationResult, "FaceVerificationResult");
@@clientName(FindSimilarResult, "FaceFindSimilarResult");
@@clientName(GroupingResult, "FaceGroupingResult");
@@clientName(OperationResult, "FaceOperationResult");
@@clientName(LivenessDecision, "FaceLivenessDecision");
@@clientName(ImageType, "FaceImageType");
@@clientName(CreateLivenessSessionParameters,
"CreateLivenessSessionContent",
"csharp"
);
@@clientName(CreateLivenessWithVerifySessionParameters,
"CreateLivenessWithVerifySessionContent",
"csharp"
);

@@access(FaceAttributeType, Access.public);
@@access(FaceDetectionResult, Access.public);
@@access(FaceLandmarks, Access.public);
@@access(LandmarkCoordinate, Access.public);
@@access(FaceAttributes, Access.public);
@@access(FacialHair, Access.public);
@@access(GlassesType, Access.public);
@@access(HeadPose, Access.public);
@@access(HairProperties, Access.public);
@@access(HairColor, Access.public);
@@access(HairColorType, Access.public);
@@access(OcclusionProperties, Access.public);
@@access(AccessoryItem, Access.public);
@@access(AccessoryType, Access.public);
@@access(BlurProperties, Access.public);
@@access(BlurLevel, Access.public);
@@access(ExposureProperties, Access.public);
@@access(ExposureLevel, Access.public);
@@access(NoiseProperties, Access.public);
@@access(NoiseLevel, Access.public);
@@access(MaskProperties, Access.public);
@@access(MaskType, Access.public);
@@access(QualityForRecognition, Access.public);
@@access(CreateLivenessWithVerifySessionResult, Access.public);

@client({
name: "FaceClient",
service: Face,
})
interface FaceClient {
@access(Access.internal)
@convenientAPI(false, "java")
@convenientAPI(false, "csharp")
detectFromUrl is FaceDetectionOperations.detectFromUrl;
#suppress "@azure-tools/typespec-azure-core/byos" "It's an RPC call to detect face from an image, it doesn't store anything. There's a BYOS version of this call, but it's not this one."
@access(Access.internal)
@convenientAPI(false, "java")
@convenientAPI(false, "csharp")
detect is FaceDetectionOperations.detect;

findSimilar is FaceRecognitionOperations.findSimilar;
findSimilarFromFaceList is FaceRecognitionOperations.findSimilarFromFaceList;
findSimilarFromLargeFaceList is FaceRecognitionOperations.findSimilarFromLargeFaceList;
identifyFromPersonGroup is FaceRecognitionOperations.identifyFromPersonGroup;
identifyFromLargePersonGroup is FaceRecognitionOperations.identifyFromLargePersonGroup;
identifyFromPersonDirectory is FaceRecognitionOperations.identifyFromPersonDirectory;
identifyFromDynamicPersonGroup is FaceRecognitionOperations.identifyFromDynamicPersonGroup;
verifyFaceToFace is FaceRecognitionOperations.verifyFaceToFace;
verifyFromPersonGroup is FaceRecognitionOperations.verifyFromPersonGroup;
verifyFromLargePersonGroup is FaceRecognitionOperations.verifyFromLargePersonGroup;
verifyFromPersonDirectory is FaceRecognitionOperations.verifyFromPersonDirectory;
group is FaceRecognitionOperations.group;
}

@client({
name: "FaceAdministrationClient",
service: Face,
})
interface FaceAdministrationClient {
createFaceList is FaceListOperations.createFaceList;
deleteFaceList is FaceListOperations.deleteFaceList;
getFaceList is FaceListOperations.getFaceList;
updateFaceList is FaceListOperations.updateFaceList;
getFaceLists is FaceListOperations.getFaceLists;
addFaceListFaceFromUrl is FaceListOperations.addFaceListFaceFromUrl;
#suppress "@azure-tools/typespec-azure-core/byos" "It's an RPC call to detect face from an image, it doesn't store anything. There's a BYOS version of this call, but it's not this one."
addFaceListFace is FaceListOperations.addFaceListFace;
deleteFaceListFace is FaceListOperations.deleteFaceListFace;

createLargeFaceList is FaceListOperations.createLargeFaceList;
deleteLargeFaceList is FaceListOperations.deleteLargeFaceList;
getLargeFaceList is FaceListOperations.getLargeFaceList;
updateLargeFaceList is FaceListOperations.updateLargeFaceList;
getLargeFaceLists is FaceListOperations.getLargeFaceLists;
getLargeFaceListTrainingStatus is FaceListOperations.getLargeFaceListTrainingStatus;
trainLargeFaceList is FaceListOperations.trainLargeFaceList;
addLargeFaceListFaceFromUrl is FaceListOperations.addLargeFaceListFaceFromUrl;
#suppress "@azure-tools/typespec-azure-core/byos" "It's an RPC call to detect face from an image, it doesn't store anything. There's a BYOS version of this call, but it's not this one."
addLargeFaceListFace is FaceListOperations.addLargeFaceListFace;
deleteLargeFaceListFace is FaceListOperations.deleteLargeFaceListFace;
getLargeFaceListFace is FaceListOperations.getLargeFaceListFace;
updateLargeFaceListFace is FaceListOperations.updateLargeFaceListFace;
getLargeFaceListFaces is FaceListOperations.getLargeFaceListFaces;

createPersonGroup is PersonGroupOperations.createPersonGroup;
deletePersonGroup is PersonGroupOperations.deletePersonGroup;
getPersonGroup is PersonGroupOperations.getPersonGroup;
updatePersonGroup is PersonGroupOperations.updatePersonGroup;
getPersonGroups is PersonGroupOperations.getPersonGroups;
getPersonGroupTrainingStatus is PersonGroupOperations.getPersonGroupTrainingStatus;
trainPersonGroup is PersonGroupOperations.trainPersonGroup;
createPersonGroupPerson is PersonGroupOperations.createPersonGroupPerson;
deletePersonGroupPerson is PersonGroupOperations.deletePersonGroupPerson;
getPersonGroupPerson is PersonGroupOperations.getPersonGroupPerson;
updatePersonGroupPerson is PersonGroupOperations.updatePersonGroupPerson;
getPersonGroupPersons is PersonGroupOperations.getPersonGroupPersons;
addPersonGroupPersonFaceFromUrl is PersonGroupOperations.addPersonGroupPersonFaceFromUrl;
#suppress "@azure-tools/typespec-azure-core/byos" "It's an RPC call to detect face from an image, it doesn't store anything. There's a BYOS version of this call, but it's not this one."
addPersonGroupPersonFace is PersonGroupOperations.addPersonGroupPersonFace;
deletePersonGroupPersonFace is PersonGroupOperations.deletePersonGroupPersonFace;
getPersonGroupPersonFace is PersonGroupOperations.getPersonGroupPersonFace;
updatePersonGroupPersonFace is PersonGroupOperations.updatePersonGroupPersonFace;

createLargePersonGroup is PersonGroupOperations.createLargePersonGroup;
deleteLargePersonGroup is PersonGroupOperations.deleteLargePersonGroup;
getLargePersonGroup is PersonGroupOperations.getLargePersonGroup;
updateLargePersonGroup is PersonGroupOperations.updateLargePersonGroup;
getLargePersonGroups is PersonGroupOperations.getLargePersonGroups;
getLargePersonGroupTrainingStatus is PersonGroupOperations.getLargePersonGroupTrainingStatus;
trainLargePersonGroup is PersonGroupOperations.trainLargePersonGroup;
createLargePersonGroupPerson is PersonGroupOperations.createLargePersonGroupPerson;
deleteLargePersonGroupPerson is PersonGroupOperations.deleteLargePersonGroupPerson;
getLargePersonGroupPerson is PersonGroupOperations.getLargePersonGroupPerson;
updateLargePersonGroupPerson is PersonGroupOperations.updateLargePersonGroupPerson;
getLargePersonGroupPersons is PersonGroupOperations.getLargePersonGroupPersons;
addLargePersonGroupPersonFaceFromUrl is PersonGroupOperations.addLargePersonGroupPersonFaceFromUrl;
#suppress "@azure-tools/typespec-azure-core/byos" "It's an RPC call to detect face from an image, it doesn't store anything. There's a BYOS version of this call, but it's not this one."
addLargePersonGroupPersonFace is PersonGroupOperations.addLargePersonGroupPersonFace;
deleteLargePersonGroupPersonFace is PersonGroupOperations.deleteLargePersonGroupPersonFace;
getLargePersonGroupPersonFace is PersonGroupOperations.getLargePersonGroupPersonFace;
updateLargePersonGroupPersonFace is PersonGroupOperations.updateLargePersonGroupPersonFace;

createPerson is PersonDirectoryOperations.createPerson;
deletePerson is PersonDirectoryOperations.deletePerson;
getPerson is PersonDirectoryOperations.getPerson;
updatePerson is PersonDirectoryOperations.updatePerson;
getPersons is PersonDirectoryOperations.getPersons;
getDynamicPersonGroupReferences is PersonDirectoryOperations.getDynamicPersonGroupReferences;
addPersonFaceFromUrl is PersonDirectoryOperations.addPersonFaceFromUrl;
#suppress "@azure-tools/typespec-azure-core/byos" "It's an RPC call to detect face from an image, it doesn't store anything. There's a BYOS version of this call, but it's not this one."
addPersonFace is PersonDirectoryOperations.addPersonFace;
deletePersonFace is PersonDirectoryOperations.deletePersonFace;
getPersonFace is PersonDirectoryOperations.getPersonFace;
updatePersonFace is PersonDirectoryOperations.updatePersonFace;
getPersonFaces is PersonDirectoryOperations.getPersonFaces;

createDynamicPersonGroupWithPerson is PersonDirectoryOperations.createDynamicPersonGroupWithPerson;
createDynamicPersonGroup is PersonDirectoryOperations.createDynamicPersonGroup;
deleteDynamicPersonGroup is PersonDirectoryOperations.deleteDynamicPersonGroup;
getDynamicPersonGroup is PersonDirectoryOperations.getDynamicPersonGroup;
updateDynamicPersonGroupWithPersonChanges is PersonDirectoryOperations.updateDynamicPersonGroupWithPersonChanges;
updateDynamicPersonGroup is PersonDirectoryOperations.updateDynamicPersonGroup;
getDynamicPersonGroups is PersonDirectoryOperations.getDynamicPersonGroups;
getDynamicPersonGroupPersons is PersonDirectoryOperations.getDynamicPersonGroupPersons;
}

@client({
name: "FaceSessionClient",
service: Face,
})
interface FaceSessionClient {
createLivenessSession is LivenessSessionOperations.createLivenessSession;
deleteLivenessSession is LivenessSessionOperations.deleteLivenessSession;
getLivenessSessionResult is LivenessSessionOperations.getLivenessSessionResult;
getLivenessSessions is LivenessSessionOperations.getLivenessSessions;
getLivenessSessionAuditEntries is LivenessSessionOperations.getLivenessSessionAuditEntries;

@access(Access.internal)
createLivenessWithVerifySession is LivenessSessionOperations.createLivenessWithVerifySession;
#suppress "@azure-tools/typespec-azure-core/byos" "It's an RPC call to detect face from an image, it doesn't store anything. There's a BYOS version of this call, but it's not this one."
@access(Access.internal)
createLivenessWithVerifySessionWithVerifyImage is LivenessSessionOperations.createLivenessWithVerifySessionWithVerifyImage;
deleteLivenessWithVerifySession is LivenessSessionOperations.deleteLivenessWithVerifySession;
getLivenessWithVerifySessionResult is LivenessSessionOperations.getLivenessWithVerifySessionResult;
getLivenessWithVerifySessions is LivenessSessionOperations.getLivenessWithVerifySessions;
getLivenessWithVerifySessionAuditEntries is LivenessSessionOperations.getLivenessWithVerifySessionAuditEntries;
}
Loading