@@ -2,6 +2,7 @@ import type { TmdbEpisodeShort } from '~/models/tmdb/tmdb-episode.model';
2
2
import type { TmdbPersonShort } from '~/models/tmdb/tmdb-person.model' ;
3
3
import type { TmdbSeasonShort } from '~/models/tmdb/tmdb-season.model' ;
4
4
import type { TmdbShowShort } from '~/models/tmdb/tmdb-show.model' ;
5
+ import type { RecursiveRecord } from '~/utils/typescript.utils' ;
5
6
6
7
export type TmdbCreditSeason = Omit < TmdbSeasonShort , 'vote_average' > & {
7
8
show_id : number ;
@@ -32,3 +33,142 @@ export type TmdbCredit = {
32
33
id : string ;
33
34
person : TmdbCreditPerson ;
34
35
} ;
36
+
37
+ export type TmdbMovieCreditCast = TmdbPersonShort & {
38
+ original_name : string ;
39
+ cast_id : number ;
40
+ character : string ;
41
+ credit_id : string ;
42
+ order : number ;
43
+ } ;
44
+
45
+ export type TmdbMovieCreditCrew = TmdbPersonShort & {
46
+ original_name : string ;
47
+ credit_id : string ;
48
+ department : string ;
49
+ job : string ;
50
+ } ;
51
+
52
+ export type TmdbMovieCredit = {
53
+ id : number ;
54
+ cast : TmdbMovieCreditCast [ ] ;
55
+ crew : TmdbMovieCreditCrew [ ] ;
56
+ } ;
57
+
58
+ type BasePersonCredit = {
59
+ adult : boolean ;
60
+ backdrop_path : string ;
61
+ genre_ids : number [ ] ;
62
+ id : number ;
63
+ original_language : string ;
64
+ overview : string ;
65
+ popularity : number ;
66
+ poster_path : string ;
67
+ vote_average : number ;
68
+ vote_count : number ;
69
+ credit_id : string ;
70
+ } ;
71
+
72
+ export type TmdbPersonCredit = BasePersonCredit & {
73
+ original_title : string ;
74
+ release_date : string ;
75
+ title : string ;
76
+ video : boolean ;
77
+ } ;
78
+
79
+ export type TmdbCombinedPerson = TmdbPersonCredit & {
80
+ media_type : string ;
81
+ } ;
82
+
83
+ export type TmdbCombinedCast < T extends RecursiveRecord > = {
84
+ character : string ;
85
+ order ?: number ;
86
+ } & T ;
87
+
88
+ export type TmdbCombinedCrew < T extends RecursiveRecord > = {
89
+ department : string ;
90
+ job : string ;
91
+ } & T ;
92
+
93
+ export type TmdbCombinedCredit = {
94
+ id : number ;
95
+ cast : TmdbCombinedCast < TmdbCombinedPerson > [ ] ;
96
+ crew : TmdbCombinedCrew < TmdbCombinedPerson > [ ] ;
97
+ } ;
98
+
99
+ export type TmdbPersonMovieCredits = {
100
+ id : number ;
101
+ cast : TmdbCombinedCast < TmdbPersonCredit > [ ] ;
102
+ crew : TmdbCombinedCrew < TmdbPersonCredit > [ ] ;
103
+ } ;
104
+
105
+ type TmdbPersonShowCredit = BasePersonCredit & {
106
+ origin_country : string [ ] ;
107
+ original_name : string ;
108
+ first_air_date : string ;
109
+ name : string ;
110
+ episode_count : number ;
111
+ } ;
112
+
113
+ export type TmdbPersonShowCredits = {
114
+ id : number ;
115
+ cast : TmdbCombinedCast < TmdbPersonShowCredit > [ ] ;
116
+ crew : TmdbCombinedCrew < TmdbPersonShowCredit > [ ] ;
117
+ } ;
118
+
119
+ export type TmdbShowAggregateCreditRole = {
120
+ credit_id : string ;
121
+ character : string ;
122
+ episode_count : number ;
123
+ } ;
124
+
125
+ export type TmdbAggregateCreditCast = TmdbPersonShort & {
126
+ roles : TmdbShowAggregateCreditRole [ ] ;
127
+ total_episode_count : number ;
128
+ order : number ;
129
+ } ;
130
+
131
+ export type TmdbAggregateCreditJob = {
132
+ credit_id : string ;
133
+ job : string ;
134
+ episode_count : number ;
135
+ } ;
136
+
137
+ export type TmdbAggregateCreditCrew = TmdbPersonShort & {
138
+ jobs : TmdbAggregateCreditJob [ ] ;
139
+ department : string ;
140
+ total_episode_count : number ;
141
+ } ;
142
+
143
+ export type TmdbAggregateCredits = {
144
+ id : number ;
145
+ cast : TmdbAggregateCreditCast [ ] ;
146
+ crew : TmdbAggregateCreditCrew [ ] ;
147
+ } ;
148
+
149
+ export type TmdbShowCreditCast = TmdbPersonShort & {
150
+ original_name : string ;
151
+ character : string ;
152
+ credit_id : string ;
153
+ order : number ;
154
+ } ;
155
+
156
+ export type TmdbShowCreditCrew = TmdbPersonShort & {
157
+ original_name : string ;
158
+ credit_id : string ;
159
+ department : string ;
160
+ job : string ;
161
+ } ;
162
+
163
+ export type TmdbShowCredits = {
164
+ id : number ;
165
+ cast : TmdbShowCreditCast [ ] ;
166
+ crew : TmdbShowCreditCrew [ ] ;
167
+ } ;
168
+
169
+ export type TmdbEpisodeCredits = {
170
+ id : number ;
171
+ cast : TmdbShowCreditCast [ ] ;
172
+ crew : TmdbShowCreditCrew [ ] ;
173
+ guest_stars : TmdbShowCreditCast [ ] ;
174
+ } ;
0 commit comments