from typing import Literal, NotRequired, TypedDict from pydantic import SecretStr from resonance_engine.dsp.enums import DSPId class TokenResult(TypedDict): access_token: SecretStr refresh_token: NotRequired[SecretStr] scope: NotRequired[str] class SpotifyClientCredentials(TypedDict): dsp_id: Literal[DSPId.spotify] client_id: str client_secret: SecretStr client_secret_name: str class DeezerClientCredentials(TypedDict): dsp_id: Literal[DSPId.deezer] class AmazonClientCredentials(TypedDict): dsp_id: Literal[DSPId.amazon] client_id: str client_secret: SecretStr client_secret_name: str profile_id: str class AppleClientCredentials(TypedDict): dsp_id: Literal[DSPId.apple] team_id: str key_id: str private_key_name: str private_key: SecretStr DSPClientCredentials = ( SpotifyClientCredentials | DeezerClientCredentials | AmazonClientCredentials | AppleClientCredentials )