@@ -5,14 +5,16 @@ import { queryOptions, type MutationOptions, type DefaultError } from '@tanstack
5
5
import type { ServiceWithEmptyTagData , PatchApiVbyApiVersionNoTagData , FooWowData , DeleteCallWithoutParametersAndResponseData , GetCallWithoutParametersAndResponseData , PatchCallWithoutParametersAndResponseData , PostCallWithoutParametersAndResponseData , PutCallWithoutParametersAndResponseData , CallWithDescriptionsData , CallWithParametersData , CallWithWeirdParameterNamesData , CallWithDefaultParametersData , CallWithDefaultOptionalParametersData , CallToTestOrderOfParamsData , DuplicateNameData , DuplicateName2Data , DuplicateName3Data , DuplicateName4Data , CallWithNoContentResponseData , CallWithResponseAndNoContentResponseData , DummyAData , DummyBData , CallWithResponseData , CallWithDuplicateResponsesData , CallWithDuplicateResponsesError , CallWithDuplicateResponsesResponse , CallWithResponsesData , CallWithResponsesError , CallWithResponsesResponse , CollectionFormatData , TypesData , ComplexTypesData , CallWithResultFromHeaderData , TestErrorCodeData , NonAsciiæøåÆøÅöôêÊ字符串Data , NonAsciiæøåÆøÅöôêÊ字符串Response , PostApiVbyApiVersionBodyData , PostApiVbyApiVersionBodyError , PostApiVbyApiVersionBodyResponse } from '../types.gen' ;
6
6
import { client as _heyApiClient } from '../client.gen' ;
7
7
8
- type QueryKey < TOptions extends Options > = [
8
+ export type QueryKey < TOptions extends Options > = [
9
9
Pick < TOptions , 'baseUrl' | 'body' | 'headers' | 'path' | 'query' > & {
10
10
_id : string ;
11
11
_infinite ?: boolean ;
12
12
}
13
13
] ;
14
14
15
- const createQueryKey = < TOptions extends Options > ( id : string , options ?: TOptions , infinite ?: boolean ) : QueryKey < TOptions > [ 0 ] => {
15
+ const createQueryKey = < TOptions extends Options > ( id : string , options ?: TOptions , infinite ?: boolean ) : [
16
+ QueryKey < TOptions > [ 0 ]
17
+ ] => {
16
18
const params : QueryKey < TOptions > [ 0 ] = { _id : id , baseUrl : ( options ?. client ?? _heyApiClient ) . getConfig ( ) . baseUrl } as QueryKey < TOptions > [ 0 ] ;
17
19
if ( infinite ) {
18
20
params . _infinite = infinite ;
@@ -29,12 +31,12 @@ const createQueryKey = <TOptions extends Options>(id: string, options?: TOptions
29
31
if ( options ?. query ) {
30
32
params . query = options . query ;
31
33
}
32
- return params ;
34
+ return [
35
+ params
36
+ ] ;
33
37
} ;
34
38
35
- export const serviceWithEmptyTagQueryKey = ( options ?: Options < ServiceWithEmptyTagData > ) => [
36
- createQueryKey ( 'serviceWithEmptyTag' , options )
37
- ] ;
39
+ export const serviceWithEmptyTagQueryKey = ( options ?: Options < ServiceWithEmptyTagData > ) => createQueryKey ( 'serviceWithEmptyTag' , options ) ;
38
40
39
41
export const serviceWithEmptyTagOptions = ( options ?: Options < ServiceWithEmptyTagData > ) => {
40
42
return queryOptions ( {
@@ -93,9 +95,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial
93
95
return mutationOptions ;
94
96
} ;
95
97
96
- export const getCallWithoutParametersAndResponseQueryKey = ( options ?: Options < GetCallWithoutParametersAndResponseData > ) => [
97
- createQueryKey ( 'getCallWithoutParametersAndResponse' , options )
98
- ] ;
98
+ export const getCallWithoutParametersAndResponseQueryKey = ( options ?: Options < GetCallWithoutParametersAndResponseData > ) => createQueryKey ( 'getCallWithoutParametersAndResponse' , options ) ;
99
99
100
100
export const getCallWithoutParametersAndResponseOptions = ( options ?: Options < GetCallWithoutParametersAndResponseData > ) => {
101
101
return queryOptions ( {
@@ -126,9 +126,7 @@ export const patchCallWithoutParametersAndResponseMutation = (options?: Partial<
126
126
return mutationOptions ;
127
127
} ;
128
128
129
- export const postCallWithoutParametersAndResponseQueryKey = ( options ?: Options < PostCallWithoutParametersAndResponseData > ) => [
130
- createQueryKey ( 'postCallWithoutParametersAndResponse' , options )
131
- ] ;
129
+ export const postCallWithoutParametersAndResponseQueryKey = ( options ?: Options < PostCallWithoutParametersAndResponseData > ) => createQueryKey ( 'postCallWithoutParametersAndResponse' , options ) ;
132
130
133
131
export const postCallWithoutParametersAndResponseOptions = ( options ?: Options < PostCallWithoutParametersAndResponseData > ) => {
134
132
return queryOptions ( {
@@ -173,9 +171,7 @@ export const putCallWithoutParametersAndResponseMutation = (options?: Partial<Op
173
171
return mutationOptions ;
174
172
} ;
175
173
176
- export const callWithDescriptionsQueryKey = ( options ?: Options < CallWithDescriptionsData > ) => [
177
- createQueryKey ( 'callWithDescriptions' , options )
178
- ] ;
174
+ export const callWithDescriptionsQueryKey = ( options ?: Options < CallWithDescriptionsData > ) => createQueryKey ( 'callWithDescriptions' , options ) ;
179
175
180
176
export const callWithDescriptionsOptions = ( options ?: Options < CallWithDescriptionsData > ) => {
181
177
return queryOptions ( {
@@ -206,9 +202,7 @@ export const callWithDescriptionsMutation = (options?: Partial<Options<CallWithD
206
202
return mutationOptions ;
207
203
} ;
208
204
209
- export const callWithParametersQueryKey = ( options : Options < CallWithParametersData > ) => [
210
- createQueryKey ( 'callWithParameters' , options )
211
- ] ;
205
+ export const callWithParametersQueryKey = ( options : Options < CallWithParametersData > ) => createQueryKey ( 'callWithParameters' , options ) ;
212
206
213
207
export const callWithParametersOptions = ( options : Options < CallWithParametersData > ) => {
214
208
return queryOptions ( {
@@ -239,9 +233,7 @@ export const callWithParametersMutation = (options?: Partial<Options<CallWithPar
239
233
return mutationOptions ;
240
234
} ;
241
235
242
- export const callWithWeirdParameterNamesQueryKey = ( options : Options < CallWithWeirdParameterNamesData > ) => [
243
- createQueryKey ( 'callWithWeirdParameterNames' , options )
244
- ] ;
236
+ export const callWithWeirdParameterNamesQueryKey = ( options : Options < CallWithWeirdParameterNamesData > ) => createQueryKey ( 'callWithWeirdParameterNames' , options ) ;
245
237
246
238
export const callWithWeirdParameterNamesOptions = ( options : Options < CallWithWeirdParameterNamesData > ) => {
247
239
return queryOptions ( {
@@ -272,9 +264,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial<Options<Ca
272
264
return mutationOptions ;
273
265
} ;
274
266
275
- export const callWithDefaultParametersQueryKey = ( options : Options < CallWithDefaultParametersData > ) => [
276
- createQueryKey ( 'callWithDefaultParameters' , options )
277
- ] ;
267
+ export const callWithDefaultParametersQueryKey = ( options : Options < CallWithDefaultParametersData > ) => createQueryKey ( 'callWithDefaultParameters' , options ) ;
278
268
279
269
export const callWithDefaultParametersOptions = ( options : Options < CallWithDefaultParametersData > ) => {
280
270
return queryOptions ( {
@@ -291,9 +281,7 @@ export const callWithDefaultParametersOptions = (options: Options<CallWithDefaul
291
281
} ) ;
292
282
} ;
293
283
294
- export const callWithDefaultOptionalParametersQueryKey = ( options ?: Options < CallWithDefaultOptionalParametersData > ) => [
295
- createQueryKey ( 'callWithDefaultOptionalParameters' , options )
296
- ] ;
284
+ export const callWithDefaultOptionalParametersQueryKey = ( options ?: Options < CallWithDefaultOptionalParametersData > ) => createQueryKey ( 'callWithDefaultOptionalParameters' , options ) ;
297
285
298
286
export const callWithDefaultOptionalParametersOptions = ( options ?: Options < CallWithDefaultOptionalParametersData > ) => {
299
287
return queryOptions ( {
@@ -352,9 +340,7 @@ export const duplicateNameMutation = (options?: Partial<Options<DuplicateNameDat
352
340
return mutationOptions ;
353
341
} ;
354
342
355
- export const duplicateName2QueryKey = ( options ?: Options < DuplicateName2Data > ) => [
356
- createQueryKey ( 'duplicateName2' , options )
357
- ] ;
343
+ export const duplicateName2QueryKey = ( options ?: Options < DuplicateName2Data > ) => createQueryKey ( 'duplicateName2' , options ) ;
358
344
359
345
export const duplicateName2Options = ( options ?: Options < DuplicateName2Data > ) => {
360
346
return queryOptions ( {
@@ -371,9 +357,7 @@ export const duplicateName2Options = (options?: Options<DuplicateName2Data>) =>
371
357
} ) ;
372
358
} ;
373
359
374
- export const duplicateName3QueryKey = ( options ?: Options < DuplicateName3Data > ) => [
375
- createQueryKey ( 'duplicateName3' , options )
376
- ] ;
360
+ export const duplicateName3QueryKey = ( options ?: Options < DuplicateName3Data > ) => createQueryKey ( 'duplicateName3' , options ) ;
377
361
378
362
export const duplicateName3Options = ( options ?: Options < DuplicateName3Data > ) => {
379
363
return queryOptions ( {
@@ -418,9 +402,7 @@ export const duplicateName4Mutation = (options?: Partial<Options<DuplicateName4D
418
402
return mutationOptions ;
419
403
} ;
420
404
421
- export const callWithNoContentResponseQueryKey = ( options ?: Options < CallWithNoContentResponseData > ) => [
422
- createQueryKey ( 'callWithNoContentResponse' , options )
423
- ] ;
405
+ export const callWithNoContentResponseQueryKey = ( options ?: Options < CallWithNoContentResponseData > ) => createQueryKey ( 'callWithNoContentResponse' , options ) ;
424
406
425
407
export const callWithNoContentResponseOptions = ( options ?: Options < CallWithNoContentResponseData > ) => {
426
408
return queryOptions ( {
@@ -437,9 +419,7 @@ export const callWithNoContentResponseOptions = (options?: Options<CallWithNoCon
437
419
} ) ;
438
420
} ;
439
421
440
- export const callWithResponseAndNoContentResponseQueryKey = ( options ?: Options < CallWithResponseAndNoContentResponseData > ) => [
441
- createQueryKey ( 'callWithResponseAndNoContentResponse' , options )
442
- ] ;
422
+ export const callWithResponseAndNoContentResponseQueryKey = ( options ?: Options < CallWithResponseAndNoContentResponseData > ) => createQueryKey ( 'callWithResponseAndNoContentResponse' , options ) ;
443
423
444
424
export const callWithResponseAndNoContentResponseOptions = ( options ?: Options < CallWithResponseAndNoContentResponseData > ) => {
445
425
return queryOptions ( {
@@ -456,9 +436,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options<Ca
456
436
} ) ;
457
437
} ;
458
438
459
- export const dummyAQueryKey = ( options ?: Options < DummyAData > ) => [
460
- createQueryKey ( 'dummyA' , options )
461
- ] ;
439
+ export const dummyAQueryKey = ( options ?: Options < DummyAData > ) => createQueryKey ( 'dummyA' , options ) ;
462
440
463
441
export const dummyAOptions = ( options ?: Options < DummyAData > ) => {
464
442
return queryOptions ( {
@@ -475,9 +453,7 @@ export const dummyAOptions = (options?: Options<DummyAData>) => {
475
453
} ) ;
476
454
} ;
477
455
478
- export const dummyBQueryKey = ( options ?: Options < DummyBData > ) => [
479
- createQueryKey ( 'dummyB' , options )
480
- ] ;
456
+ export const dummyBQueryKey = ( options ?: Options < DummyBData > ) => createQueryKey ( 'dummyB' , options ) ;
481
457
482
458
export const dummyBOptions = ( options ?: Options < DummyBData > ) => {
483
459
return queryOptions ( {
@@ -494,9 +470,7 @@ export const dummyBOptions = (options?: Options<DummyBData>) => {
494
470
} ) ;
495
471
} ;
496
472
497
- export const callWithResponseQueryKey = ( options ?: Options < CallWithResponseData > ) => [
498
- createQueryKey ( 'callWithResponse' , options )
499
- ] ;
473
+ export const callWithResponseQueryKey = ( options ?: Options < CallWithResponseData > ) => createQueryKey ( 'callWithResponse' , options ) ;
500
474
501
475
export const callWithResponseOptions = ( options ?: Options < CallWithResponseData > ) => {
502
476
return queryOptions ( {
@@ -513,9 +487,7 @@ export const callWithResponseOptions = (options?: Options<CallWithResponseData>)
513
487
} ) ;
514
488
} ;
515
489
516
- export const callWithDuplicateResponsesQueryKey = ( options ?: Options < CallWithDuplicateResponsesData > ) => [
517
- createQueryKey ( 'callWithDuplicateResponses' , options )
518
- ] ;
490
+ export const callWithDuplicateResponsesQueryKey = ( options ?: Options < CallWithDuplicateResponsesData > ) => createQueryKey ( 'callWithDuplicateResponses' , options ) ;
519
491
520
492
export const callWithDuplicateResponsesOptions = ( options ?: Options < CallWithDuplicateResponsesData > ) => {
521
493
return queryOptions ( {
@@ -560,9 +532,7 @@ export const callWithResponsesMutation = (options?: Partial<Options<CallWithResp
560
532
return mutationOptions ;
561
533
} ;
562
534
563
- export const collectionFormatQueryKey = ( options : Options < CollectionFormatData > ) => [
564
- createQueryKey ( 'collectionFormat' , options )
565
- ] ;
535
+ export const collectionFormatQueryKey = ( options : Options < CollectionFormatData > ) => createQueryKey ( 'collectionFormat' , options ) ;
566
536
567
537
export const collectionFormatOptions = ( options : Options < CollectionFormatData > ) => {
568
538
return queryOptions ( {
@@ -579,9 +549,7 @@ export const collectionFormatOptions = (options: Options<CollectionFormatData>)
579
549
} ) ;
580
550
} ;
581
551
582
- export const typesQueryKey = ( options : Options < TypesData > ) => [
583
- createQueryKey ( 'types' , options )
584
- ] ;
552
+ export const typesQueryKey = ( options : Options < TypesData > ) => createQueryKey ( 'types' , options ) ;
585
553
586
554
export const typesOptions = ( options : Options < TypesData > ) => {
587
555
return queryOptions ( {
@@ -598,9 +566,7 @@ export const typesOptions = (options: Options<TypesData>) => {
598
566
} ) ;
599
567
} ;
600
568
601
- export const complexTypesQueryKey = ( options : Options < ComplexTypesData > ) => [
602
- createQueryKey ( 'complexTypes' , options )
603
- ] ;
569
+ export const complexTypesQueryKey = ( options : Options < ComplexTypesData > ) => createQueryKey ( 'complexTypes' , options ) ;
604
570
605
571
export const complexTypesOptions = ( options : Options < ComplexTypesData > ) => {
606
572
return queryOptions ( {
@@ -617,9 +583,7 @@ export const complexTypesOptions = (options: Options<ComplexTypesData>) => {
617
583
} ) ;
618
584
} ;
619
585
620
- export const callWithResultFromHeaderQueryKey = ( options ?: Options < CallWithResultFromHeaderData > ) => [
621
- createQueryKey ( 'callWithResultFromHeader' , options )
622
- ] ;
586
+ export const callWithResultFromHeaderQueryKey = ( options ?: Options < CallWithResultFromHeaderData > ) => createQueryKey ( 'callWithResultFromHeader' , options ) ;
623
587
624
588
export const callWithResultFromHeaderOptions = ( options ?: Options < CallWithResultFromHeaderData > ) => {
625
589
return queryOptions ( {
@@ -650,9 +614,7 @@ export const callWithResultFromHeaderMutation = (options?: Partial<Options<CallW
650
614
return mutationOptions ;
651
615
} ;
652
616
653
- export const testErrorCodeQueryKey = ( options : Options < TestErrorCodeData > ) => [
654
- createQueryKey ( 'testErrorCode' , options )
655
- ] ;
617
+ export const testErrorCodeQueryKey = ( options : Options < TestErrorCodeData > ) => createQueryKey ( 'testErrorCode' , options ) ;
656
618
657
619
export const testErrorCodeOptions = ( options : Options < TestErrorCodeData > ) => {
658
620
return queryOptions ( {
@@ -683,9 +645,7 @@ export const testErrorCodeMutation = (options?: Partial<Options<TestErrorCodeDat
683
645
return mutationOptions ;
684
646
} ;
685
647
686
- export const nonAsciiæøåÆøÅöôêÊ字符串QueryKey = ( options : Options < NonAsciiæøåÆøÅöôêÊ字符串Data > ) => [
687
- createQueryKey ( 'nonAsciiæøåÆøÅöôêÊ字符串' , options )
688
- ] ;
648
+ export const nonAsciiæøåÆøÅöôêÊ字符串QueryKey = ( options : Options < NonAsciiæøåÆøÅöôêÊ字符串Data > ) => createQueryKey ( 'nonAsciiæøåÆøÅöôêÊ字符串' , options ) ;
689
649
690
650
export const nonAsciiæøåÆøÅöôêÊ字符串Options = ( options : Options < NonAsciiæøåÆøÅöôêÊ字符串Data > ) => {
691
651
return queryOptions ( {
@@ -716,9 +676,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial<
716
676
return mutationOptions ;
717
677
} ;
718
678
719
- export const postApiVbyApiVersionBodyQueryKey = ( options : Options < PostApiVbyApiVersionBodyData > ) => [
720
- createQueryKey ( 'postApiVbyApiVersionBody' , options )
721
- ] ;
679
+ export const postApiVbyApiVersionBodyQueryKey = ( options : Options < PostApiVbyApiVersionBodyData > ) => createQueryKey ( 'postApiVbyApiVersionBody' , options ) ;
722
680
723
681
export const postApiVbyApiVersionBodyOptions = ( options : Options < PostApiVbyApiVersionBodyData > ) => {
724
682
return queryOptions ( {
0 commit comments