shreyas-joshi's picture
feat: Implement validation for canonical fixture and add training suite
babc153
from __future__ import annotations
from typing import TypedDict
class User(TypedDict):
id: str
card_token: str
def validate_token(token: str) -> User | None:
if token.startswith("tok_"):
return {"id": token[-4:], "card_token": token}
return None