Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
25 changes: 13 additions & 12 deletions regula/facesdk/webclient/gen/api/liveness20_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from typing_extensions import Annotated

from pydantic import Field, StrictStr
from typing import Optional
from typing_extensions import Annotated
from uuid import UUID
from regula.facesdk.webclient.gen.models.transaction_info import TransactionInfo
Expand All @@ -34,8 +35,8 @@ def __init__(self, api_client=None) -> None:
@validate_call
def delete_liveness_transaction(
self,
transaction_id: Annotated[UUID, Field(description="ID of the current liveness transaction.")],
tag: Annotated[StrictStr, Field(description="A unique tag associated with a liveness transaction session. Used to identify and delete the corresponding transaction.")],
transaction_id: Annotated[Optional[UUID], Field(description="ID of the current liveness transaction.")] = None,
tag: Annotated[Optional[StrictStr], Field(description="A unique tag associated with a liveness transaction session. Used to identify and delete the corresponding transaction.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand All @@ -53,9 +54,9 @@ def delete_liveness_transaction(

This endpoint deletes a liveness transaction based on either the specified `tag` or `transactionId`. At least one of the parameters must be provided for the operation to be valid.

:param transaction_id: ID of the current liveness transaction. (required)
:param transaction_id: ID of the current liveness transaction.
:type transaction_id: str
:param tag: A unique tag associated with a liveness transaction session. Used to identify and delete the corresponding transaction. (required)
:param tag: A unique tag associated with a liveness transaction session. Used to identify and delete the corresponding transaction.
:type tag: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
Expand Down Expand Up @@ -105,8 +106,8 @@ def delete_liveness_transaction(
@validate_call
def delete_liveness_transaction_with_http_info(
self,
transaction_id: Annotated[UUID, Field(description="ID of the current liveness transaction.")],
tag: Annotated[StrictStr, Field(description="A unique tag associated with a liveness transaction session. Used to identify and delete the corresponding transaction.")],
transaction_id: Annotated[Optional[UUID], Field(description="ID of the current liveness transaction.")] = None,
tag: Annotated[Optional[StrictStr], Field(description="A unique tag associated with a liveness transaction session. Used to identify and delete the corresponding transaction.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand All @@ -124,9 +125,9 @@ def delete_liveness_transaction_with_http_info(

This endpoint deletes a liveness transaction based on either the specified `tag` or `transactionId`. At least one of the parameters must be provided for the operation to be valid.

:param transaction_id: ID of the current liveness transaction. (required)
:param transaction_id: ID of the current liveness transaction.
:type transaction_id: str
:param tag: A unique tag associated with a liveness transaction session. Used to identify and delete the corresponding transaction. (required)
:param tag: A unique tag associated with a liveness transaction session. Used to identify and delete the corresponding transaction.
:type tag: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
Expand Down Expand Up @@ -176,8 +177,8 @@ def delete_liveness_transaction_with_http_info(
@validate_call
def delete_liveness_transaction_without_preload_content(
self,
transaction_id: Annotated[UUID, Field(description="ID of the current liveness transaction.")],
tag: Annotated[StrictStr, Field(description="A unique tag associated with a liveness transaction session. Used to identify and delete the corresponding transaction.")],
transaction_id: Annotated[Optional[UUID], Field(description="ID of the current liveness transaction.")] = None,
tag: Annotated[Optional[StrictStr], Field(description="A unique tag associated with a liveness transaction session. Used to identify and delete the corresponding transaction.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand All @@ -195,9 +196,9 @@ def delete_liveness_transaction_without_preload_content(

This endpoint deletes a liveness transaction based on either the specified `tag` or `transactionId`. At least one of the parameters must be provided for the operation to be valid.

:param transaction_id: ID of the current liveness transaction. (required)
:param transaction_id: ID of the current liveness transaction.
:type transaction_id: str
:param tag: A unique tag associated with a liveness transaction session. Used to identify and delete the corresponding transaction. (required)
:param tag: A unique tag associated with a liveness transaction session. Used to identify and delete the corresponding transaction.
:type tag: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
Expand Down
2 changes: 1 addition & 1 deletion regula/facesdk/webclient/gen/models/detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Detection(BaseModel):
attributes: SkipValidation[Optional[DetectionAttributes]] = Field(alias="attributes", default=None)
landmarks: SkipValidation[List[List[int]]] = Field(alias="landmarks", description="Absolute coordinates (X,Y) of five points of each detected face: left eye, right eye, nose, left point of lips, right point of lips.")
quality: SkipValidation[Optional[DetectionQuality]] = Field(alias="quality", default=None)
roi: SkipValidation[List[float]] = Field(alias="roi", description="The rectangular area of a detected face that is represented by a set of four elements: the X and Y coordinates of the top-left point, and the width and height dimensions of the rectangle.")
roi: SkipValidation[List[float]] = Field(alias="roi", description="The rectangular area of a detected face that is represented by a set of four elements [x, y, width, height]: the X and Y coordinates of the top-left point, and the width and height dimensions of the rectangle.")
__properties: ClassVar[List[str]] = ["crop", "attributes", "landmarks", "quality", "roi"]

model_config = ConfigDict(
Expand Down
2 changes: 1 addition & 1 deletion regula/facesdk/webclient/gen/models/detection_face.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class DetectionFace(BaseModel):
face_index: SkipValidation[Optional[float]] = Field(alias="faceIndex", default=None, description="The detected face index number.")
landmarks: SkipValidation[Optional[List[List[float]]]] = Field(alias="landmarks", default=None, description="Absolute coordinates (x,y) of five points of each detected face: left eye, right eye, nose, left point of lips, right point of lips.")
rotation_angle: SkipValidation[Optional[float]] = Field(alias="rotationAngle", default=None, description="Angle of rotation of the face from the vertical axis, degrees.")
roi: SkipValidation[Optional[List[float]]] = Field(alias="roi", default=None, description="The rectangular area of a detected face that is represented by a set of four elements: the X and Y coordinates of the top-left point, and the width and height dimensions of the rectangle.")
roi: SkipValidation[Optional[List[float]]] = Field(alias="roi", default=None, description="The rectangular area of a detected face that is represented by a set of four elements [x, y, width, height]: the X and Y coordinates of the top-left point, and the width and height dimensions of the rectangle.")
crop: SkipValidation[Optional[bytearray]] = Field(alias="crop", default=None, description="Base64-encoded aligned and cropped portrait.")
__properties: ClassVar[List[str]] = ["faceIndex", "landmarks", "rotationAngle", "roi", "crop"]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

class FaceSDKResultCode(int, Enum):
"""
The result code, see the [FaceSDKResultCode enum](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/enums/face-sdk-result-code/).
The result code.
"""

"""
Expand Down Expand Up @@ -59,6 +59,13 @@ class FaceSDKResultCode(int, Enum):
FACER_ABORTED_LIVENESS_TRANSACTION = 252
FACER_GENERAL_ERROR = 253
FACER_PASSIVE_LIVENESS_FAIL = 254
FACER_PRINTED_FACE_DETECTED = 255
FACER_BLOCKED_REQUEST = 256
FACER_CORRUPTED_REQUEST = 257
FACER_GENERAL_CHECK_FAIL_RTD = 258
FACER_BLINK_FAILED = 259
FACER_BAD_FACE_QUALITY_LIVENESS_TRANSACTION = 260
FACER_BAD_FRAME_SIZE = 261

@classmethod
def from_json(cls, json_str: str) -> Self:
Expand Down
2 changes: 1 addition & 1 deletion regula/facesdk/webclient/gen/models/faces_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class FacesResponse(BaseModel):
face_index: SkipValidation[Optional[float]] = Field(alias="faceIndex", default=None, description="The detected face index number.")
landmarks: SkipValidation[Optional[List[List[float]]]] = Field(alias="landmarks", default=None, description="Absolute coordinates (x,y) of five points of each detected face: left eye, right eye, nose, left point of lips, right point of lips.")
rotation_angle: SkipValidation[Optional[float]] = Field(alias="rotationAngle", default=None, description="Angle of rotation of the face from the vertical axis, degrees.")
roi: SkipValidation[Optional[List[float]]] = Field(alias="roi", default=None, description="The rectangular area of a detected face that is represented by a set of four elements: the X and Y coordinates of the top-left point, and the width and height dimensions of the rectangle.")
roi: SkipValidation[Optional[List[float]]] = Field(alias="roi", default=None, description="The rectangular area of a detected face that is represented by a set of four elements [x, y, width, height]: the X and Y coordinates of the top-left point, and the width and height dimensions of the rectangle.")
crop: SkipValidation[Optional[bytearray]] = Field(alias="crop", default=None, description="Base64-encoded aligned and cropped portrait.")
persons: SkipValidation[Optional[List[PersonWithImages]]] = Field(alias="persons", default=None, description="Detected Persons.")
__properties: ClassVar[List[str]] = ["faceIndex", "landmarks", "rotationAngle", "roi", "crop", "persons"]
Expand Down
2 changes: 1 addition & 1 deletion regula/facesdk/webclient/gen/models/match_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class MatchImage(BaseModel):
""" # noqa: E501
index: SkipValidation[Optional[int]] = Field(alias="index", default=None, description="The image index number. Can be given; if not given, the index numbers are set automatically starting from `0`. All index numbers must be whole and unique—not repeated.")
type: SkipValidation[Optional[ImageSource]] = Field(alias="type", default=None)
data: SkipValidation[bytearray] = Field(alias="data", description="Base64-encoded image.")
data: SkipValidation[Optional[bytearray]] = Field(alias="data", default=None, description="Base64-encoded image.")
detect_all: SkipValidation[Optional[bool]] = Field(alias="detectAll", default=None, description="Whether to detect all faces in the image. If set to `false`, only the most central face is detected.")
liveness_transaction_id: SkipValidation[Optional[str]] = Field(alias="livenessTransactionId", default=None, description="Identifier of the completed liveness transaction whose captured face is used as one of the comparison inputs. If this parameter is provided, it replaces one of the images in the matching request.")
__properties: ClassVar[List[str]] = ["index", "type", "data", "detectAll", "livenessTransactionId"]
Expand Down
2 changes: 1 addition & 1 deletion regula/facesdk/webclient/gen/models/search_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class SearchDetection(BaseModel):
landmarks: SkipValidation[Optional[List[List[int]]]] = Field(alias="landmarks", default=None, description="Absolute coordinates (x,y) of five points of each detected face: left eye, right eye, nose, left point of lips, right point of lips.")
landmarks_type: SkipValidation[Optional[int]] = Field(alias="landmarksType", default=None, description="Internal.")
msg: SkipValidation[Optional[str]] = Field(alias="msg", default=None, description="Internal.")
roi: SkipValidation[Optional[List[float]]] = Field(alias="roi", default=None, description="The rectangular area of a detected face that is represented by a set of four elements: the X and Y coordinates of the top-left point, and the width and height dimensions of the rectangle.")
roi: SkipValidation[Optional[List[float]]] = Field(alias="roi", default=None, description="The rectangular area of a detected face that is represented by a set of four elements [x, y, width, height]: the X and Y coordinates of the top-left point, and the width and height dimensions of the rectangle.")
version_sdk: SkipValidation[Optional[str]] = Field(alias="versionSDK", default=None)
__properties: ClassVar[List[str]] = ["code", "crop", "detectorType", "hash", "idx", "image", "landmarks", "landmarksType", "msg", "roi", "versionSDK"]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
# set to None if ttl (nullable) is None
# and model_fields_set contains the field
if self.ttl is None and "ttl" in self.model_fields_set:
_dict['ttl'] = None

return _dict

@classmethod
Expand Down
8 changes: 7 additions & 1 deletion regula/facesdk/webclient/gen/models/transaction_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from regula.facesdk.webclient.gen.models.enroll_result import EnrollResult
from regula.facesdk.webclient.gen.models.face_sdk_result_code import FaceSDKResultCode
from regula.facesdk.webclient.gen.models.liveness_type import LivenessType
from regula.facesdk.webclient.gen.models.verify_result import VerifyResult
from typing import Optional, Set
Expand All @@ -22,7 +23,7 @@ class TransactionInfo(BaseModel):
"""
TransactionInfo
""" # noqa: E501
code: SkipValidation[Optional[int]] = Field(alias="code", default=None, description="Result code, see the [FaceSDKResultCode enum](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/enums/face-sdk-result-code/).")
code: SkipValidation[Optional[FaceSDKResultCode]] = Field(alias="code", default=None)
status: SkipValidation[Optional[int]] = Field(alias="status", default=None, description="Whether the liveness detection is confirmed `0` or not `1`.")
tag: SkipValidation[Optional[str]] = Field(alias="tag", default=None, description="Session identificator, should be unique for each session.")
transaction_id: SkipValidation[Optional[str]] = Field(alias="transactionId", default=None, description="Transaction ID, there can be several transactions within one session.")
Expand Down Expand Up @@ -82,6 +83,11 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of verify_result
if self.verify_result:
_dict['verifyResult'] = self.verify_result.to_dict()
# set to None if status (nullable) is None
# and model_fields_set contains the field
if self.status is None and "status" in self.model_fields_set:
_dict['status'] = None

return _dict

@classmethod
Expand Down
Loading