@@ -9,12 +9,12 @@ import type {
9
9
TraktClientSettings ,
10
10
} from '~/models/trakt/trakt-client.model' ;
11
11
12
+ import type { TraktApi } from '~/services/trakt-client/api/trakt-api.endpoints' ;
12
13
import type { Primitive } from '~/utils/typescript.utils' ;
13
14
14
15
import { TraktApiHeaders } from '~/models/trakt/trakt-client.model' ;
15
16
16
17
import { type BaseBody , BaseClient , BaseHeaderContentType , parseBody , parseUrl } from '~/services/common/base-client' ;
17
- import { minimalTraktApi , type traktApi } from '~/services/trakt-client/api/trakt-api.endpoints' ;
18
18
import { isFilter , TraktApiFilterValidator } from '~/services/trakt-client/api/trakt-api.filters' ;
19
19
20
20
/**
@@ -100,32 +100,24 @@ export const parseResponse = <T>(response: Response): TraktApiResponse<T> => {
100
100
return _response ;
101
101
} ;
102
102
103
- /**
104
- * The extracted type signature of the TraktApi
105
- */
106
- type ITraktEndpoints = typeof traktApi ;
107
-
108
103
/** Needed to type Object assignment */
109
104
// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging -- To allow type extension
110
- export interface BaseTraktClient extends ITraktEndpoints { }
105
+ export interface BaseTraktClient extends TraktApi { }
111
106
112
107
/**
113
108
* Represents a Trakt API client with common functionality.
114
109
*
115
110
* @class BaseTraktClient
116
111
*/
117
112
// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging -- To allow type extension
118
- export class BaseTraktClient
119
- extends BaseClient < TraktApiQuery , TraktApiResponse , TraktClientSettings , TraktClientAuthentication >
120
- implements ITraktEndpoints
121
- {
113
+ export class BaseTraktClient extends BaseClient < TraktApiQuery , TraktApiResponse , TraktClientSettings , TraktClientAuthentication > implements TraktApi {
122
114
/**
123
115
* Creates an instance of BaseTraktClient.
124
116
* @param options - The options for the client.
125
117
* @param authentication - The authentication for the client.
126
118
* @param api - The API endpoints for the client.
127
119
*/
128
- constructor ( options : TraktClientOptions , authentication : TraktClientAuthentication = { } , api : ITraktApi = minimalTraktApi ) {
120
+ constructor ( options : TraktClientOptions , authentication : TraktClientAuthentication = { } , api : ITraktApi = { } ) {
129
121
super ( options , authentication , api ) ;
130
122
}
131
123
0 commit comments