/
/
/
1"""
2TypedDict models for the official TIDAL API (openapi.tidal.com/v2).
3
4DO NOT EDIT BY HAND. This file is generated from the vendored OpenAPI spec.
5Regenerate with: python scripts/tidal_openapi/generate_models.py
6"""
7# ruff: noqa
8
9from typing import Literal, NotRequired, TypedDict
10
11
12class Copyright(TypedDict):
13 text: str
14
15
16class ExternalLinkMeta(TypedDict):
17 type: Literal[
18 "TIDAL_SHARING",
19 "TIDAL_USER_SHARING",
20 "TIDAL_AUTOPLAY_ANDROID",
21 "TIDAL_AUTOPLAY_IOS",
22 "TIDAL_AUTOPLAY_WEB",
23 "TWITTER",
24 "FACEBOOK",
25 "INSTAGRAM",
26 "TIKTOK",
27 "SNAPCHAT",
28 "OFFICIAL_HOMEPAGE",
29 "CASHAPP_CONTRIBUTIONS",
30 "ARTIST_CLAIM_PROVIDER_REDIRECT",
31 "STRIPE_AUTHORIZATION_REDIRECT",
32 "SQUARE_AUTHORIZATION_REDIRECT",
33 ]
34
35
36class ExternalLink(TypedDict):
37 href: str
38 meta: ExternalLinkMeta
39
40
41class PlaylistsAttributes(TypedDict):
42 accessType: Literal["PUBLIC", "UNLISTED", "PRIVATE"]
43 bounded: bool
44 createdAt: str
45 description: NotRequired[str]
46 duration: NotRequired[str]
47 externalLinks: list[ExternalLink]
48 lastModifiedAt: str
49 name: str
50 numberOfFollowers: int
51 numberOfItems: NotRequired[int]
52 playlistType: Literal["EDITORIAL", "USER", "MIX", "ARTIST"]
53
54
55class TracksAttributes(TypedDict):
56 accessType: NotRequired[Literal["PUBLIC", "UNLISTED", "PRIVATE"]]
57 ai: NotRequired[bool]
58 availability: NotRequired[list[Literal["STREAM", "DJ", "STEM"]]]
59 bpm: NotRequired[float]
60 copyright: NotRequired[Copyright]
61 createdAt: NotRequired[str]
62 duration: str
63 explicit: bool
64 externalLinks: NotRequired[list[ExternalLink]]
65 isrc: str
66 key: Literal[
67 "UNKNOWN",
68 "C",
69 "CSharp",
70 "D",
71 "Eb",
72 "E",
73 "F",
74 "FSharp",
75 "G",
76 "Ab",
77 "A",
78 "Bb",
79 "B",
80 ]
81 keyScale: Literal[
82 "UNKNOWN",
83 "MAJOR",
84 "MINOR",
85 "AEOLIAN",
86 "BLUES",
87 "DORIAN",
88 "HARMONIC_MINOR",
89 "LOCRIAN",
90 "LYDIAN",
91 "MIXOLYDIAN",
92 "PENTATONIC_MAJOR",
93 "PHRYGIAN",
94 "MELODIC_MINOR",
95 "PENTATONIC_MINOR",
96 ]
97 mediaTags: list[str]
98 popularity: float
99 spotlighted: NotRequired[bool]
100 title: str
101 toneTags: NotRequired[list[str]]
102 version: NotRequired[str]
103
104
105class AlbumsAttributes(TypedDict):
106 accessType: NotRequired[Literal["PUBLIC", "UNLISTED", "PRIVATE"]]
107 ai: NotRequired[bool]
108 albumType: Literal["ALBUM", "EP", "SINGLE"]
109 availability: NotRequired[list[Literal["STREAM", "DJ", "STEM"]]]
110 barcodeId: str
111 copyright: NotRequired[Copyright]
112 createdAt: NotRequired[str]
113 duration: str
114 explicit: bool
115 externalLinks: NotRequired[list[ExternalLink]]
116 mediaTags: list[str]
117 numberOfItems: int
118 numberOfVolumes: int
119 popularity: float
120 releaseDate: NotRequired[str]
121 title: str
122 type: NotRequired[Literal["ALBUM", "EP", "SINGLE"]]
123 version: NotRequired[str]
124
125
126class ArtistsAttributes(TypedDict):
127 contributionsEnabled: NotRequired[bool]
128 contributionsSalesPitch: NotRequired[str]
129 externalLinks: NotRequired[list[ExternalLink]]
130 handle: NotRequired[str]
131 name: str
132 ownerType: NotRequired[Literal["LABEL", "USER", "MIXED"]]
133 popularity: float
134 spotlighted: NotRequired[bool]
135