MAESTRO: add captcha verification flow

This commit is contained in:
Mariusz Banach
2026-02-18 04:12:02 +01:00
parent 28658c4a87
commit 98f2f8a656
8 changed files with 352 additions and 6 deletions

View File

@@ -0,0 +1,31 @@
from __future__ import annotations
from pydantic import BaseModel, ConfigDict, Field
class CaptchaChallenge(BaseModel):
model_config = ConfigDict(populate_by_name=True)
challenge_token: str = Field(alias="challengeToken")
image_base64: str = Field(alias="imageBase64")
class CaptchaVerifyRequest(BaseModel):
model_config = ConfigDict(populate_by_name=True)
challenge_token: str = Field(alias="challengeToken")
answer: str
class CaptchaVerifyResponse(BaseModel):
model_config = ConfigDict(populate_by_name=True)
success: bool
bypass_token: str | None = Field(default=None, alias="bypassToken")
__all__ = [
"CaptchaChallenge",
"CaptchaVerifyRequest",
"CaptchaVerifyResponse",
]