@@ -117,7 +117,7 @@ class SDK<Endpoints extends DeepAsyncFnRecord<Endpoints>> {
117
117
return getNextGetSDKQueryKey ( [ ] ) ;
118
118
} ) ( ) ;
119
119
120
- useEndpoint ( ) : TypedUseSDK < Endpoints > {
120
+ private useEndpointProxy = ( ( ) = > {
121
121
const getNextUseEndpoint = ( p : { path : string [ ] } ) : any => {
122
122
return new Proxy ( ( ) => { } , {
123
123
apply : ( __ , ___ , args ) => {
@@ -157,9 +157,13 @@ class SDK<Endpoints extends DeepAsyncFnRecord<Endpoints>> {
157
157
} ;
158
158
159
159
return getNextUseEndpoint ( { path : [ ] } ) ;
160
+ } ) ( ) ;
161
+
162
+ useEndpoint ( ) : TypedUseSDK < Endpoints > {
163
+ return this . useEndpointProxy ;
160
164
}
161
165
162
- useInfiniteEndpoint ( ) : TypedUseInfiniteSDK < Endpoints > {
166
+ private useInfiniteEndpointProxy = ( ( ) = > {
163
167
const getNextUseInfiniteEndpoint = ( p : { path : string [ ] } ) : any => {
164
168
return new Proxy ( ( ) => { } , {
165
169
apply : ( __ , ___ , args ) => {
@@ -200,8 +204,13 @@ class SDK<Endpoints extends DeepAsyncFnRecord<Endpoints>> {
200
204
} ;
201
205
202
206
return getNextUseInfiniteEndpoint ( { path : [ ] } ) ;
207
+ } ) ( ) ;
208
+
209
+ useInfiniteEndpoint ( ) : TypedUseInfiniteSDK < Endpoints > {
210
+ return this . useInfiniteEndpointProxy ;
203
211
}
204
- useMutationEndpoint ( ) : TypedUseSDKMutation < Endpoints > {
212
+
213
+ private useMutationEndpointProxy = ( ( ) => {
205
214
const getNextUseMutation = ( p : { path : string [ ] } ) : any => {
206
215
return new Proxy ( ( ) => { } , {
207
216
apply : ( __ , ___ , args ) => {
@@ -239,6 +248,10 @@ class SDK<Endpoints extends DeepAsyncFnRecord<Endpoints>> {
239
248
} ;
240
249
241
250
return getNextUseMutation ( { path : [ ] } ) ;
251
+ } ) ( ) ;
252
+
253
+ useMutationEndpoint ( ) : TypedUseSDKMutation < Endpoints > {
254
+ return this . useMutationEndpointProxy ;
242
255
}
243
256
}
244
257
0 commit comments