tangled
alpha
login
or
join now
mokkenstorm.dev
/
openapi-ts
0
fork
atom
fork of hey-api/openapi-ts because I need some additional things
0
fork
atom
overview
issues
pulls
pipelines
chore(pinia-colada): bump snapshots
Dmitriy Brolnickij
6 months ago
e5faf78e
13cdd908
+121
-68
7 changed files
expand all
collapse all
unified
split
examples
openapi-ts-pinia-colada
src
client
@pinia
colada.gen.ts
packages
openapi-ts-tests
main
test
__snapshots__
2.0.x
plugins
@pinia
colada
asClass
@pinia
colada.gen.ts
fetch
@pinia
colada.gen.ts
3.0.x
plugins
@pinia
colada
asClass
@pinia
colada.gen.ts
fetch
@pinia
colada.gen.ts
3.1.x
plugins
@pinia
colada
asClass
@pinia
colada.gen.ts
fetch
@pinia
colada.gen.ts
+17
-16
examples/openapi-ts-pinia-colada/src/client/@pinia/colada.gen.ts
···
89
89
})
90
90
91
91
export type QueryKey<TOptions extends Options> = [
92
92
-
Pick<TOptions, 'body' | 'path'> & {
92
92
+
Pick<TOptions, 'path'> & {
93
93
_id: string
94
94
baseUrl?: _JSONValue
95
95
-
headers?: _JSONValue
96
95
query?: _JSONValue
97
96
tags?: _JSONValue
98
97
}
···
109
108
} as QueryKey<TOptions>[0]
110
109
if (tags) {
111
110
params.tags = tags as unknown as _JSONValue
112
112
-
}
113
113
-
if (options?.body) {
114
114
-
params.body = options.body
115
115
-
}
116
116
-
if (options?.headers) {
117
117
-
params.headers = options.headers as unknown as _JSONValue
118
111
}
119
112
if (options?.path) {
120
113
params.path = options.path
···
135
128
export const findPetsByStatusQuery = defineQueryOptions(
136
129
(options: Options<FindPetsByStatusData>) => ({
137
130
key: findPetsByStatusQueryKey(options),
138
138
-
query: async () => {
131
131
+
query: async (context) => {
139
132
const { data } = await findPetsByStatus({
140
133
...options,
134
134
+
...context,
141
135
throwOnError: true
142
136
})
143
137
return data
···
154
148
*/
155
149
export const findPetsByTagsQuery = defineQueryOptions((options: Options<FindPetsByTagsData>) => ({
156
150
key: findPetsByTagsQueryKey(options),
157
157
-
query: async () => {
151
151
+
query: async (context) => {
158
152
const { data } = await findPetsByTags({
159
153
...options,
154
154
+
...context,
160
155
throwOnError: true
161
156
})
162
157
return data
···
189
184
*/
190
185
export const getPetByIdQuery = defineQueryOptions((options: Options<GetPetByIdData>) => ({
191
186
key: getPetByIdQueryKey(options),
192
192
-
query: async () => {
187
187
+
query: async (context) => {
193
188
const { data } = await getPetById({
194
189
...options,
190
190
+
...context,
195
191
throwOnError: true
196
192
})
197
193
return data
···
241
237
*/
242
238
export const getInventoryQuery = defineQueryOptions((options?: Options<GetInventoryData>) => ({
243
239
key: getInventoryQueryKey(options),
244
244
-
query: async () => {
240
240
+
query: async (context) => {
245
241
const { data } = await getInventory({
246
242
...options,
243
243
+
...context,
247
244
throwOnError: true
248
245
})
249
246
return data
···
293
290
*/
294
291
export const getOrderByIdQuery = defineQueryOptions((options: Options<GetOrderByIdData>) => ({
295
292
key: getOrderByIdQueryKey(options),
296
296
-
query: async () => {
293
293
+
query: async (context) => {
297
294
const { data } = await getOrderById({
298
295
...options,
296
296
+
...context,
299
297
throwOnError: true
300
298
})
301
299
return data
···
349
347
*/
350
348
export const loginUserQuery = defineQueryOptions((options?: Options<LoginUserData>) => ({
351
349
key: loginUserQueryKey(options),
352
352
-
query: async () => {
350
350
+
query: async (context) => {
353
351
const { data } = await loginUser({
354
352
...options,
353
353
+
...context,
355
354
throwOnError: true
356
355
})
357
356
return data
···
367
366
*/
368
367
export const logoutUserQuery = defineQueryOptions((options?: Options<LogoutUserData>) => ({
369
368
key: logoutUserQueryKey(options),
370
370
-
query: async () => {
369
369
+
query: async (context) => {
371
370
const { data } = await logoutUser({
372
371
...options,
372
372
+
...context,
373
373
throwOnError: true
374
374
})
375
375
return data
···
402
402
*/
403
403
export const getUserByNameQuery = defineQueryOptions((options: Options<GetUserByNameData>) => ({
404
404
key: getUserByNameQueryKey(options),
405
405
-
query: async () => {
405
405
+
query: async (context) => {
406
406
const { data } = await getUserByName({
407
407
...options,
408
408
+
...context,
408
409
throwOnError: true
409
410
})
410
411
return data
+4
-2
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/@pinia/colada.gen.ts
···
36
36
37
37
export const getFooQuery = defineQueryOptions((options?: Options<GetFooData>) => ({
38
38
key: getFooQueryKey(options),
39
39
-
query: async () => {
39
39
+
query: async (context) => {
40
40
const { data } = await FooBazService.getFoo({
41
41
...options,
42
42
+
...context,
42
43
throwOnError: true
43
44
});
44
45
return data;
···
75
76
76
77
export const getFooBarQuery = defineQueryOptions((options?: Options<GetFooBarData>) => ({
77
78
key: getFooBarQueryKey(options),
78
78
-
query: async () => {
79
79
+
query: async (context) => {
79
80
const { data } = await BarBazService.getFooBar({
80
81
...options,
82
82
+
...context,
81
83
throwOnError: true
82
84
});
83
85
return data;
+24
-12
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/@pinia/colada.gen.ts
···
36
36
37
37
export const serviceWithEmptyTagQuery = defineQueryOptions((options?: Options<ServiceWithEmptyTagData>) => ({
38
38
key: serviceWithEmptyTagQueryKey(options),
39
39
-
query: async () => {
39
39
+
query: async (context) => {
40
40
const { data } = await serviceWithEmptyTag({
41
41
...options,
42
42
+
...context,
42
43
throwOnError: true
43
44
});
44
45
return data;
···
88
89
89
90
export const getCallWithoutParametersAndResponseQuery = defineQueryOptions((options?: Options<GetCallWithoutParametersAndResponseData>) => ({
90
91
key: getCallWithoutParametersAndResponseQueryKey(options),
91
91
-
query: async () => {
92
92
+
query: async (context) => {
92
93
const { data } = await getCallWithoutParametersAndResponse({
93
94
...options,
95
95
+
...context,
94
96
throwOnError: true
95
97
});
96
98
return data;
···
179
181
180
182
export const callWithDefaultParametersQuery = defineQueryOptions((options: Options<CallWithDefaultParametersData>) => ({
181
183
key: callWithDefaultParametersQueryKey(options),
182
182
-
query: async () => {
184
184
+
query: async (context) => {
183
185
const { data } = await callWithDefaultParameters({
184
186
...options,
187
187
+
...context,
185
188
throwOnError: true
186
189
});
187
190
return data;
···
231
234
232
235
export const duplicateName2Query = defineQueryOptions((options?: Options<DuplicateName2Data>) => ({
233
236
key: duplicateName2QueryKey(options),
234
234
-
query: async () => {
237
237
+
query: async (context) => {
235
238
const { data } = await duplicateName2({
236
239
...options,
240
240
+
...context,
237
241
throwOnError: true
238
242
});
239
243
return data;
···
270
274
271
275
export const callWithNoContentResponseQuery = defineQueryOptions((options?: Options<CallWithNoContentResponseData>) => ({
272
276
key: callWithNoContentResponseQueryKey(options),
273
273
-
query: async () => {
277
277
+
query: async (context) => {
274
278
const { data } = await callWithNoContentResponse({
275
279
...options,
280
280
+
...context,
276
281
throwOnError: true
277
282
});
278
283
return data;
···
283
288
284
289
export const callWithResponseAndNoContentResponseQuery = defineQueryOptions((options?: Options<CallWithResponseAndNoContentResponseData>) => ({
285
290
key: callWithResponseAndNoContentResponseQueryKey(options),
286
286
-
query: async () => {
291
291
+
query: async (context) => {
287
292
const { data } = await callWithResponseAndNoContentResponse({
288
293
...options,
294
294
+
...context,
289
295
throwOnError: true
290
296
});
291
297
return data;
···
296
302
297
303
export const dummyAQuery = defineQueryOptions((options?: Options<DummyAData>) => ({
298
304
key: dummyAQueryKey(options),
299
299
-
query: async () => {
305
305
+
query: async (context) => {
300
306
const { data } = await dummyA({
301
307
...options,
308
308
+
...context,
302
309
throwOnError: true
303
310
});
304
311
return data;
···
309
316
310
317
export const dummyBQuery = defineQueryOptions((options?: Options<DummyBData>) => ({
311
318
key: dummyBQueryKey(options),
312
312
-
query: async () => {
319
319
+
query: async (context) => {
313
320
const { data } = await dummyB({
314
321
...options,
322
322
+
...context,
315
323
throwOnError: true
316
324
});
317
325
return data;
···
322
330
323
331
export const callWithResponseQuery = defineQueryOptions((options?: Options<CallWithResponseData>) => ({
324
332
key: callWithResponseQueryKey(options),
325
325
-
query: async () => {
333
333
+
query: async (context) => {
326
334
const { data } = await callWithResponse({
327
335
...options,
336
336
+
...context,
328
337
throwOnError: true
329
338
});
330
339
return data;
···
361
370
362
371
export const collectionFormatQuery = defineQueryOptions((options: Options<CollectionFormatData>) => ({
363
372
key: collectionFormatQueryKey(options),
364
364
-
query: async () => {
373
373
+
query: async (context) => {
365
374
const { data } = await collectionFormat({
366
375
...options,
376
376
+
...context,
367
377
throwOnError: true
368
378
});
369
379
return data;
···
374
384
375
385
export const typesQuery = defineQueryOptions((options: Options<TypesData>) => ({
376
386
key: typesQueryKey(options),
377
377
-
query: async () => {
387
387
+
query: async (context) => {
378
388
const { data } = await types({
379
389
...options,
390
390
+
...context,
380
391
throwOnError: true
381
392
});
382
393
return data;
···
387
398
388
399
export const complexTypesQuery = defineQueryOptions((options: Options<ComplexTypesData>) => ({
389
400
key: complexTypesQueryKey(options),
390
390
-
query: async () => {
401
401
+
query: async (context) => {
391
402
const { data } = await complexTypes({
392
403
...options,
404
404
+
...context,
393
405
throwOnError: true
394
406
});
395
407
return data;
+4
-2
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/@pinia/colada.gen.ts
···
36
36
37
37
export const getFooQuery = defineQueryOptions((options?: Options<GetFooData>) => ({
38
38
key: getFooQueryKey(options),
39
39
-
query: async () => {
39
39
+
query: async (context) => {
40
40
const { data } = await FooBazService.getFoo({
41
41
...options,
42
42
+
...context,
42
43
throwOnError: true
43
44
});
44
45
return data;
···
75
76
76
77
export const getFooBarQuery = defineQueryOptions((options?: Options<GetFooBarData>) => ({
77
78
key: getFooBarQueryKey(options),
78
78
-
query: async () => {
79
79
+
query: async (context) => {
79
80
const { data } = await BarBazService.getFooBar({
80
81
...options,
82
82
+
...context,
81
83
throwOnError: true
82
84
});
83
85
return data;
+34
-17
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/@pinia/colada.gen.ts
···
36
36
37
37
export const exportQuery = defineQueryOptions((options?: Options<ExportData>) => ({
38
38
key: exportQueryKey(options),
39
39
-
query: async () => {
39
39
+
query: async (context) => {
40
40
const { data } = await export_({
41
41
...options,
42
42
+
...context,
42
43
throwOnError: true
43
44
});
44
45
return data;
···
88
89
89
90
export const apiVVersionODataControllerCountQuery = defineQueryOptions((options?: Options<ApiVVersionODataControllerCountData>) => ({
90
91
key: apiVVersionODataControllerCountQueryKey(options),
91
91
-
query: async () => {
92
92
+
query: async (context) => {
92
93
const { data } = await apiVVersionODataControllerCount({
93
94
...options,
95
95
+
...context,
94
96
throwOnError: true
95
97
});
96
98
return data;
···
101
103
102
104
export const getApiVbyApiVersionSimpleOperationQuery = defineQueryOptions((options: Options<GetApiVbyApiVersionSimpleOperationData>) => ({
103
105
key: getApiVbyApiVersionSimpleOperationQueryKey(options),
104
104
-
query: async () => {
106
106
+
query: async (context) => {
105
107
const { data } = await getApiVbyApiVersionSimpleOperation({
106
108
...options,
109
109
+
...context,
107
110
throwOnError: true
108
111
});
109
112
return data;
···
127
130
128
131
export const getCallWithoutParametersAndResponseQuery = defineQueryOptions((options?: Options<GetCallWithoutParametersAndResponseData>) => ({
129
132
key: getCallWithoutParametersAndResponseQueryKey(options),
130
130
-
query: async () => {
133
133
+
query: async (context) => {
131
134
const { data } = await getCallWithoutParametersAndResponse({
132
135
...options,
136
136
+
...context,
133
137
throwOnError: true
134
138
});
135
139
return data;
···
247
251
248
252
export const getCallWithOptionalParamQuery = defineQueryOptions((options: Options<GetCallWithOptionalParamData>) => ({
249
253
key: getCallWithOptionalParamQueryKey(options),
250
250
-
query: async () => {
254
254
+
query: async (context) => {
251
255
const { data } = await getCallWithOptionalParam({
252
256
...options,
257
257
+
...context,
253
258
throwOnError: true
254
259
});
255
260
return data;
···
299
304
300
305
export const callWithDefaultParametersQuery = defineQueryOptions((options?: Options<CallWithDefaultParametersData>) => ({
301
306
key: callWithDefaultParametersQueryKey(options),
302
302
-
query: async () => {
307
307
+
query: async (context) => {
303
308
const { data } = await callWithDefaultParameters({
304
309
...options,
310
310
+
...context,
305
311
throwOnError: true
306
312
});
307
313
return data;
···
351
357
352
358
export const duplicateName2Query = defineQueryOptions((options?: Options<DuplicateName2Data>) => ({
353
359
key: duplicateName2QueryKey(options),
354
354
-
query: async () => {
360
360
+
query: async (context) => {
355
361
const { data } = await duplicateName2({
356
362
...options,
363
363
+
...context,
357
364
throwOnError: true
358
365
});
359
366
return data;
···
390
397
391
398
export const callWithNoContentResponseQuery = defineQueryOptions((options?: Options<CallWithNoContentResponseData>) => ({
392
399
key: callWithNoContentResponseQueryKey(options),
393
393
-
query: async () => {
400
400
+
query: async (context) => {
394
401
const { data } = await callWithNoContentResponse({
395
402
...options,
403
403
+
...context,
396
404
throwOnError: true
397
405
});
398
406
return data;
···
403
411
404
412
export const callWithResponseAndNoContentResponseQuery = defineQueryOptions((options?: Options<CallWithResponseAndNoContentResponseData>) => ({
405
413
key: callWithResponseAndNoContentResponseQueryKey(options),
406
406
-
query: async () => {
414
414
+
query: async (context) => {
407
415
const { data } = await callWithResponseAndNoContentResponse({
408
416
...options,
417
417
+
...context,
409
418
throwOnError: true
410
419
});
411
420
return data;
···
416
425
417
426
export const dummyAQuery = defineQueryOptions((options?: Options<DummyAData>) => ({
418
427
key: dummyAQueryKey(options),
419
419
-
query: async () => {
428
428
+
query: async (context) => {
420
429
const { data } = await dummyA({
421
430
...options,
431
431
+
...context,
422
432
throwOnError: true
423
433
});
424
434
return data;
···
429
439
430
440
export const dummyBQuery = defineQueryOptions((options?: Options<DummyBData>) => ({
431
441
key: dummyBQueryKey(options),
432
432
-
query: async () => {
442
442
+
query: async (context) => {
433
443
const { data } = await dummyB({
434
444
...options,
445
445
+
...context,
435
446
throwOnError: true
436
447
});
437
448
return data;
···
442
453
443
454
export const callWithResponseQuery = defineQueryOptions((options?: Options<CallWithResponseData>) => ({
444
455
key: callWithResponseQueryKey(options),
445
445
-
query: async () => {
456
456
+
query: async (context) => {
446
457
const { data } = await callWithResponse({
447
458
...options,
459
459
+
...context,
448
460
throwOnError: true
449
461
});
450
462
return data;
···
481
493
482
494
export const collectionFormatQuery = defineQueryOptions((options: Options<CollectionFormatData>) => ({
483
495
key: collectionFormatQueryKey(options),
484
484
-
query: async () => {
496
496
+
query: async (context) => {
485
497
const { data } = await collectionFormat({
486
498
...options,
499
499
+
...context,
487
500
throwOnError: true
488
501
});
489
502
return data;
···
494
507
495
508
export const typesQuery = defineQueryOptions((options: Options<TypesData>) => ({
496
509
key: typesQueryKey(options),
497
497
-
query: async () => {
510
510
+
query: async (context) => {
498
511
const { data } = await types({
499
512
...options,
513
513
+
...context,
500
514
throwOnError: true
501
515
});
502
516
return data;
···
520
534
521
535
export const fileResponseQuery = defineQueryOptions((options: Options<FileResponseData>) => ({
522
536
key: fileResponseQueryKey(options),
523
523
-
query: async () => {
537
537
+
query: async (context) => {
524
538
const { data } = await fileResponse({
525
539
...options,
540
540
+
...context,
526
541
throwOnError: true
527
542
});
528
543
return data;
···
533
548
534
549
export const complexTypesQuery = defineQueryOptions((options: Options<ComplexTypesData>) => ({
535
550
key: complexTypesQueryKey(options),
536
536
-
query: async () => {
551
551
+
query: async (context) => {
537
552
const { data } = await complexTypes({
538
553
...options,
554
554
+
...context,
539
555
throwOnError: true
540
556
});
541
557
return data;
···
546
562
547
563
export const multipartResponseQuery = defineQueryOptions((options?: Options<MultipartResponseData>) => ({
548
564
key: multipartResponseQueryKey(options),
549
549
-
query: async () => {
565
565
+
query: async (context) => {
550
566
const { data } = await multipartResponse({
551
567
...options,
568
568
+
...context,
552
569
throwOnError: true
553
570
});
554
571
return data;
+4
-2
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/asClass/@pinia/colada.gen.ts
···
36
36
37
37
export const getFooQuery = defineQueryOptions((options?: Options<GetFooData>) => ({
38
38
key: getFooQueryKey(options),
39
39
-
query: async () => {
39
39
+
query: async (context) => {
40
40
const { data } = await FooBazService.getFoo({
41
41
...options,
42
42
+
...context,
42
43
throwOnError: true
43
44
});
44
45
return data;
···
75
76
76
77
export const getFooBarQuery = defineQueryOptions((options?: Options<GetFooBarData>) => ({
77
78
key: getFooBarQueryKey(options),
78
78
-
query: async () => {
79
79
+
query: async (context) => {
79
80
const { data } = await BarBazService.getFooBar({
80
81
...options,
82
82
+
...context,
81
83
throwOnError: true
82
84
});
83
85
return data;
+34
-17
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@pinia/colada/fetch/@pinia/colada.gen.ts
···
36
36
37
37
export const exportQuery = defineQueryOptions((options?: Options<ExportData>) => ({
38
38
key: exportQueryKey(options),
39
39
-
query: async () => {
39
39
+
query: async (context) => {
40
40
const { data } = await export_({
41
41
...options,
42
42
+
...context,
42
43
throwOnError: true
43
44
});
44
45
return data;
···
88
89
89
90
export const apiVVersionODataControllerCountQuery = defineQueryOptions((options?: Options<ApiVVersionODataControllerCountData>) => ({
90
91
key: apiVVersionODataControllerCountQueryKey(options),
91
91
-
query: async () => {
92
92
+
query: async (context) => {
92
93
const { data } = await apiVVersionODataControllerCount({
93
94
...options,
95
95
+
...context,
94
96
throwOnError: true
95
97
});
96
98
return data;
···
101
103
102
104
export const getApiVbyApiVersionSimpleOperationQuery = defineQueryOptions((options: Options<GetApiVbyApiVersionSimpleOperationData>) => ({
103
105
key: getApiVbyApiVersionSimpleOperationQueryKey(options),
104
104
-
query: async () => {
106
106
+
query: async (context) => {
105
107
const { data } = await getApiVbyApiVersionSimpleOperation({
106
108
...options,
109
109
+
...context,
107
110
throwOnError: true
108
111
});
109
112
return data;
···
127
130
128
131
export const getCallWithoutParametersAndResponseQuery = defineQueryOptions((options?: Options<GetCallWithoutParametersAndResponseData>) => ({
129
132
key: getCallWithoutParametersAndResponseQueryKey(options),
130
130
-
query: async () => {
133
133
+
query: async (context) => {
131
134
const { data } = await getCallWithoutParametersAndResponse({
132
135
...options,
136
136
+
...context,
133
137
throwOnError: true
134
138
});
135
139
return data;
···
247
251
248
252
export const getCallWithOptionalParamQuery = defineQueryOptions((options: Options<GetCallWithOptionalParamData>) => ({
249
253
key: getCallWithOptionalParamQueryKey(options),
250
250
-
query: async () => {
254
254
+
query: async (context) => {
251
255
const { data } = await getCallWithOptionalParam({
252
256
...options,
257
257
+
...context,
253
258
throwOnError: true
254
259
});
255
260
return data;
···
299
304
300
305
export const callWithDefaultParametersQuery = defineQueryOptions((options?: Options<CallWithDefaultParametersData>) => ({
301
306
key: callWithDefaultParametersQueryKey(options),
302
302
-
query: async () => {
307
307
+
query: async (context) => {
303
308
const { data } = await callWithDefaultParameters({
304
309
...options,
310
310
+
...context,
305
311
throwOnError: true
306
312
});
307
313
return data;
···
351
357
352
358
export const duplicateName2Query = defineQueryOptions((options?: Options<DuplicateName2Data>) => ({
353
359
key: duplicateName2QueryKey(options),
354
354
-
query: async () => {
360
360
+
query: async (context) => {
355
361
const { data } = await duplicateName2({
356
362
...options,
363
363
+
...context,
357
364
throwOnError: true
358
365
});
359
366
return data;
···
390
397
391
398
export const callWithNoContentResponseQuery = defineQueryOptions((options?: Options<CallWithNoContentResponseData>) => ({
392
399
key: callWithNoContentResponseQueryKey(options),
393
393
-
query: async () => {
400
400
+
query: async (context) => {
394
401
const { data } = await callWithNoContentResponse({
395
402
...options,
403
403
+
...context,
396
404
throwOnError: true
397
405
});
398
406
return data;
···
403
411
404
412
export const callWithResponseAndNoContentResponseQuery = defineQueryOptions((options?: Options<CallWithResponseAndNoContentResponseData>) => ({
405
413
key: callWithResponseAndNoContentResponseQueryKey(options),
406
406
-
query: async () => {
414
414
+
query: async (context) => {
407
415
const { data } = await callWithResponseAndNoContentResponse({
408
416
...options,
417
417
+
...context,
409
418
throwOnError: true
410
419
});
411
420
return data;
···
416
425
417
426
export const dummyAQuery = defineQueryOptions((options?: Options<DummyAData>) => ({
418
427
key: dummyAQueryKey(options),
419
419
-
query: async () => {
428
428
+
query: async (context) => {
420
429
const { data } = await dummyA({
421
430
...options,
431
431
+
...context,
422
432
throwOnError: true
423
433
});
424
434
return data;
···
429
439
430
440
export const dummyBQuery = defineQueryOptions((options?: Options<DummyBData>) => ({
431
441
key: dummyBQueryKey(options),
432
432
-
query: async () => {
442
442
+
query: async (context) => {
433
443
const { data } = await dummyB({
434
444
...options,
445
445
+
...context,
435
446
throwOnError: true
436
447
});
437
448
return data;
···
442
453
443
454
export const callWithResponseQuery = defineQueryOptions((options?: Options<CallWithResponseData>) => ({
444
455
key: callWithResponseQueryKey(options),
445
445
-
query: async () => {
456
456
+
query: async (context) => {
446
457
const { data } = await callWithResponse({
447
458
...options,
459
459
+
...context,
448
460
throwOnError: true
449
461
});
450
462
return data;
···
481
493
482
494
export const collectionFormatQuery = defineQueryOptions((options: Options<CollectionFormatData>) => ({
483
495
key: collectionFormatQueryKey(options),
484
484
-
query: async () => {
496
496
+
query: async (context) => {
485
497
const { data } = await collectionFormat({
486
498
...options,
499
499
+
...context,
487
500
throwOnError: true
488
501
});
489
502
return data;
···
494
507
495
508
export const typesQuery = defineQueryOptions((options: Options<TypesData>) => ({
496
509
key: typesQueryKey(options),
497
497
-
query: async () => {
510
510
+
query: async (context) => {
498
511
const { data } = await types({
499
512
...options,
513
513
+
...context,
500
514
throwOnError: true
501
515
});
502
516
return data;
···
520
534
521
535
export const fileResponseQuery = defineQueryOptions((options: Options<FileResponseData>) => ({
522
536
key: fileResponseQueryKey(options),
523
523
-
query: async () => {
537
537
+
query: async (context) => {
524
538
const { data } = await fileResponse({
525
539
...options,
540
540
+
...context,
526
541
throwOnError: true
527
542
});
528
543
return data;
···
533
548
534
549
export const complexTypesQuery = defineQueryOptions((options: Options<ComplexTypesData>) => ({
535
550
key: complexTypesQueryKey(options),
536
536
-
query: async () => {
551
551
+
query: async (context) => {
537
552
const { data } = await complexTypes({
538
553
...options,
554
554
+
...context,
539
555
throwOnError: true
540
556
});
541
557
return data;
···
546
562
547
563
export const multipartResponseQuery = defineQueryOptions((options?: Options<MultipartResponseData>) => ({
548
564
key: multipartResponseQueryKey(options),
549
549
-
query: async () => {
565
565
+
query: async (context) => {
550
566
const { data } = await multipartResponse({
551
567
...options,
568
568
+
...context,
552
569
throwOnError: true
553
570
});
554
571
return data;