fork of hey-api/openapi-ts because I need some additional things
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: regenerate pinia-colada example code

+73 -40
+73 -40
examples/openapi-ts-pinia-colada/src/client/@pinia/colada.gen.ts
··· 37 37 DeletePetData, 38 38 DeleteUserData, 39 39 FindPetsByStatusData, 40 + FindPetsByStatusResponse, 40 41 FindPetsByTagsData, 42 + FindPetsByTagsResponse, 41 43 GetInventoryData, 44 + GetInventoryResponse, 42 45 GetOrderByIdData, 46 + GetOrderByIdResponse, 43 47 GetPetByIdData, 48 + GetPetByIdResponse, 44 49 GetUserByNameData, 50 + GetUserByNameResponse, 45 51 LoginUserData, 52 + LoginUserResponse, 46 53 LogoutUserData, 47 54 PlaceOrderData, 48 55 PlaceOrderResponse, ··· 136 143 * 137 144 * Multiple status values can be provided with comma separated strings. 138 145 */ 139 - export const findPetsByStatusQuery = defineQueryOptions( 140 - (options: Options<FindPetsByStatusData>) => ({ 141 - key: createQueryKey('findPetsByStatus', options), 142 - query: async (context) => { 143 - const { data } = await findPetsByStatus({ 144 - ...options, 145 - ...context, 146 - throwOnError: true, 147 - }); 148 - return data; 149 - }, 150 - }), 151 - ); 146 + export const findPetsByStatusQuery = defineQueryOptions< 147 + Options<FindPetsByStatusData>, 148 + FindPetsByStatusResponse, 149 + Error 150 + >((options: Options<FindPetsByStatusData>) => ({ 151 + key: createQueryKey('findPetsByStatus', options), 152 + query: async (context) => { 153 + const { data } = await findPetsByStatus({ 154 + ...options, 155 + ...context, 156 + throwOnError: true, 157 + }); 158 + return data; 159 + }, 160 + })); 152 161 153 162 /** 154 163 * Finds Pets by tags. 155 164 * 156 165 * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. 157 166 */ 158 - export const findPetsByTagsQuery = defineQueryOptions((options: Options<FindPetsByTagsData>) => ({ 167 + export const findPetsByTagsQuery = defineQueryOptions< 168 + Options<FindPetsByTagsData>, 169 + FindPetsByTagsResponse, 170 + Error 171 + >((options: Options<FindPetsByTagsData>) => ({ 159 172 key: createQueryKey('findPetsByTags', options), 160 173 query: async (context) => { 161 174 const { data } = await findPetsByTags({ ··· 190 203 * 191 204 * Returns a single pet. 192 205 */ 193 - export const getPetByIdQuery = defineQueryOptions((options: Options<GetPetByIdData>) => ({ 206 + export const getPetByIdQuery = defineQueryOptions< 207 + Options<GetPetByIdData>, 208 + GetPetByIdResponse, 209 + Error 210 + >((options: Options<GetPetByIdData>) => ({ 194 211 key: createQueryKey('getPetById', options), 195 212 query: async (context) => { 196 213 const { data } = await getPetById({ ··· 243 260 * 244 261 * Returns a map of status codes to quantities. 245 262 */ 246 - export const getInventoryQuery = defineQueryOptions((options?: Options<GetInventoryData>) => ({ 263 + export const getInventoryQuery = defineQueryOptions< 264 + Options<GetInventoryData>, 265 + GetInventoryResponse, 266 + Error 267 + >((options?: Options<GetInventoryData>) => ({ 247 268 key: createQueryKey('getInventory', options), 248 269 query: async (context) => { 249 270 const { data } = await getInventory({ ··· 296 317 * 297 318 * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. 298 319 */ 299 - export const getOrderByIdQuery = defineQueryOptions((options: Options<GetOrderByIdData>) => ({ 320 + export const getOrderByIdQuery = defineQueryOptions< 321 + Options<GetOrderByIdData>, 322 + GetOrderByIdResponse, 323 + Error 324 + >((options: Options<GetOrderByIdData>) => ({ 300 325 key: createQueryKey('getOrderById', options), 301 326 query: async (context) => { 302 327 const { data } = await getOrderById({ ··· 353 378 * 354 379 * Log into the system. 355 380 */ 356 - export const loginUserQuery = defineQueryOptions((options?: Options<LoginUserData>) => ({ 357 - key: createQueryKey('loginUser', options), 358 - query: async (context) => { 359 - const { data } = await loginUser({ 360 - ...options, 361 - ...context, 362 - throwOnError: true, 363 - }); 364 - return data; 365 - }, 366 - })); 381 + export const loginUserQuery = defineQueryOptions<Options<LoginUserData>, LoginUserResponse, Error>( 382 + (options?: Options<LoginUserData>) => ({ 383 + key: createQueryKey('loginUser', options), 384 + query: async (context) => { 385 + const { data } = await loginUser({ 386 + ...options, 387 + ...context, 388 + throwOnError: true, 389 + }); 390 + return data; 391 + }, 392 + }), 393 + ); 367 394 368 395 /** 369 396 * Logs out current logged in user session. 370 397 * 371 398 * Log user out of the system. 372 399 */ 373 - export const logoutUserQuery = defineQueryOptions((options?: Options<LogoutUserData>) => ({ 374 - key: createQueryKey('logoutUser', options), 375 - query: async (context) => { 376 - const { data } = await logoutUser({ 377 - ...options, 378 - ...context, 379 - throwOnError: true, 380 - }); 381 - return data; 382 - }, 383 - })); 400 + export const logoutUserQuery = defineQueryOptions<Options<LogoutUserData>, unknown, Error>( 401 + (options?: Options<LogoutUserData>) => ({ 402 + key: createQueryKey('logoutUser', options), 403 + query: async (context) => { 404 + const { data } = await logoutUser({ 405 + ...options, 406 + ...context, 407 + throwOnError: true, 408 + }); 409 + return data; 410 + }, 411 + }), 412 + ); 384 413 385 414 /** 386 415 * Delete user resource. ··· 405 434 * 406 435 * Get user detail based on username. 407 436 */ 408 - export const getUserByNameQuery = defineQueryOptions((options: Options<GetUserByNameData>) => ({ 437 + export const getUserByNameQuery = defineQueryOptions< 438 + Options<GetUserByNameData>, 439 + GetUserByNameResponse, 440 + Error 441 + >((options: Options<GetUserByNameData>) => ({ 409 442 key: createQueryKey('getUserByName', options), 410 443 query: async (context) => { 411 444 const { data } = await getUserByName({