1
- import type { TraktCollection , TraktCollectionAdded , TraktCollectionRemoved , TraktCollectionRequest } from '~/models/trakt/trakt-collection.model' ;
1
+ import type {
2
+ TraktCollection ,
3
+ TraktCollectionAdded ,
4
+ TraktCollectionGetQuery ,
5
+ TraktCollectionRemoved ,
6
+ TraktCollectionRequest ,
7
+ } from '~/models/trakt/trakt-collection.model' ;
2
8
import type {
3
9
TraktFavoriteAdded ,
4
10
TraktFavoriteItem ,
@@ -18,7 +24,13 @@ import type { TraktListReordered } from '~/models/trakt/trakt-list.model';
18
24
import type { TraktRating , TraktRatingAdded , TraktRatingRemoved , TraktRatingRequest } from '~/models/trakt/trakt-rating.model' ;
19
25
import type { TraktSyncActivities , TraktSyncProgress , TraktSyncRequest , TraktSyncUpdateRequest } from '~/models/trakt/trakt-sync.model' ;
20
26
import type { TraktWatched } from '~/models/trakt/trakt-watched.model' ;
21
- import type { TraktWatchlist , TraktWatchlistAdded , TraktWatchlistList , TraktWatchlistRemoved } from '~/models/trakt/trakt-watchlist.model' ;
27
+ import type {
28
+ TraktWatchlist ,
29
+ TraktWatchlistAdded ,
30
+ TraktWatchlistGetQuery ,
31
+ TraktWatchlistList ,
32
+ TraktWatchlistRemoved ,
33
+ } from '~/models/trakt/trakt-watchlist.model' ;
22
34
23
35
import { TraktApiExtended , type TraktApiParamsExtended , type TraktApiParamsPagination , TraktClientEndpoint } from '~/models/trakt/trakt-client.model' ;
24
36
import { HttpMethod } from '~/utils/http.utils' ;
@@ -181,13 +193,10 @@ export const sync = {
181
193
*
182
194
* @extended true - {@link TraktApiExtended.Full}, {@link TraktApiExtended.Metadata}
183
195
* @auth required
196
+ *
197
+ * @see [get-collection]{@link https://trakt.docs.apiary.io/#reference/sync/get-collection/get-collection}
184
198
*/
185
- get : new TraktClientEndpoint <
186
- {
187
- type : 'movies' | 'shows' ;
188
- } & TraktApiParamsExtended < typeof TraktApiExtended . Full | typeof TraktApiExtended . Metadata > ,
189
- TraktCollection [ ]
190
- > ( {
199
+ get : new TraktClientEndpoint < TraktCollectionGetQuery , TraktCollection [ ] > ( {
191
200
method : HttpMethod . GET ,
192
201
url : '/sync/collection/:type' ,
193
202
opts : {
@@ -493,16 +502,7 @@ export const sync = {
493
502
*
494
503
* @see [get-watchlist]{@link https://trakt.docs.apiary.io/#reference/sync/get-watchlist/get-watchlist}
495
504
*/
496
- get : new TraktClientEndpoint <
497
- {
498
- /** Filter for a specific item type */
499
- type ?: 'movies' | 'shows' | 'seasons' | 'episodes' ;
500
- /** How to sort (only if type is also sent) */
501
- sort ?: 'rank' | 'added' | 'released' | 'title' ;
502
- } & TraktApiParamsExtended < typeof TraktApiExtended . Full > &
503
- TraktApiParamsPagination ,
504
- TraktWatchlist [ ]
505
- > ( {
505
+ get : new TraktClientEndpoint < TraktWatchlistGetQuery , TraktWatchlist [ ] > ( {
506
506
method : HttpMethod . GET ,
507
507
url : '/sync/watchlist/:type/:sort' ,
508
508
opts : {
0 commit comments