generated from stijnvanhulle/template
-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/1436-paramsCasing
# Conflicts: # packages/plugin-react-query/src/plugin.ts # packages/plugin-solid-query/src/plugin.ts # packages/plugin-svelte-query/src/plugin.ts # packages/plugin-swr/src/plugin.ts # packages/plugin-vue-query/src/plugin.ts
- Loading branch information
Showing
247 changed files
with
4,129 additions
and
4,647 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,60 @@ | ||
export type { AddPetMutationKey } from './useAddPetHook.ts' | ||
export type { CreateUserMutationKey } from './useCreateUserHook.ts' | ||
export type { CreateUsersWithListInputMutationKey } from './useCreateUsersWithListInputHook.ts' | ||
export type { DeleteOrderMutationKey } from './useDeleteOrderHook.ts' | ||
export type { DeletePetMutationKey } from './useDeletePetHook.ts' | ||
export type { DeleteUserMutationKey } from './useDeleteUserHook.ts' | ||
export type { FindPetsByStatusQueryKey } from './useFindPetsByStatusHook.ts' | ||
export type { FindPetsByStatusSuspenseQueryKey } from './useFindPetsByStatusSuspenseHook.ts' | ||
export type { FindPetsByTagsQueryKey } from './useFindPetsByTagsHook.ts' | ||
export type { FindPetsByTagsInfiniteQueryKey } from './useFindPetsByTagsInfiniteHook.ts' | ||
export type { FindPetsByTagsSuspenseQueryKey } from './useFindPetsByTagsSuspenseHook.ts' | ||
export type { GetInventoryQueryKey } from './useGetInventoryHook.ts' | ||
export type { GetInventorySuspenseQueryKey } from './useGetInventorySuspenseHook.ts' | ||
export type { GetOrderByIdQueryKey } from './useGetOrderByIdHook.ts' | ||
export type { GetOrderByIdSuspenseQueryKey } from './useGetOrderByIdSuspenseHook.ts' | ||
export type { GetPetByIdQueryKey } from './useGetPetByIdHook.ts' | ||
export type { GetPetByIdSuspenseQueryKey } from './useGetPetByIdSuspenseHook.ts' | ||
export type { GetUserByNameQueryKey } from './useGetUserByNameHook.ts' | ||
export type { GetUserByNameSuspenseQueryKey } from './useGetUserByNameSuspenseHook.ts' | ||
export type { LoginUserQueryKey } from './useLoginUserHook.ts' | ||
export type { LoginUserSuspenseQueryKey } from './useLoginUserSuspenseHook.ts' | ||
export type { LogoutUserQueryKey } from './useLogoutUserHook.ts' | ||
export type { LogoutUserSuspenseQueryKey } from './useLogoutUserSuspenseHook.ts' | ||
export type { PlaceOrderMutationKey } from './usePlaceOrderHook.ts' | ||
export type { PlaceOrderPatchMutationKey } from './usePlaceOrderPatchHook.ts' | ||
export type { UpdatePetMutationKey } from './useUpdatePetHook.ts' | ||
export type { UpdatePetWithFormQueryKey } from './useUpdatePetWithFormHook.ts' | ||
export type { UpdatePetWithFormSuspenseQueryKey } from './useUpdatePetWithFormSuspenseHook.ts' | ||
export type { UpdateUserMutationKey } from './useUpdateUserHook.ts' | ||
export type { UploadFileMutationKey } from './useUploadFileHook.ts' | ||
export { addPetMutationKey, useAddPetHook } from './useAddPetHook.ts' | ||
export { createUserMutationKey, useCreateUserHook } from './useCreateUserHook.ts' | ||
export { createUsersWithListInputMutationKey, useCreateUsersWithListInputHook } from './useCreateUsersWithListInputHook.ts' | ||
export { deleteOrderMutationKey, useDeleteOrderHook } from './useDeleteOrderHook.ts' | ||
export { deletePetMutationKey, useDeletePetHook } from './useDeletePetHook.ts' | ||
export { deleteUserMutationKey, useDeleteUserHook } from './useDeleteUserHook.ts' | ||
export { findPetsByStatusQueryKey, findPetsByStatusQueryOptionsHook, useFindPetsByStatusHook } from './useFindPetsByStatusHook.ts' | ||
export { | ||
findPetsByStatusSuspenseQueryKey, | ||
findPetsByStatusSuspenseQueryOptionsHook, | ||
useFindPetsByStatusSuspenseHook, | ||
} from './useFindPetsByStatusSuspenseHook.ts' | ||
export { findPetsByTagsQueryKey, findPetsByTagsQueryOptionsHook, useFindPetsByTagsHook } from './useFindPetsByTagsHook.ts' | ||
export { findPetsByTagsInfiniteQueryKey, findPetsByTagsInfiniteQueryOptionsHook, useFindPetsByTagsInfiniteHook } from './useFindPetsByTagsInfiniteHook.ts' | ||
export { findPetsByTagsSuspenseQueryKey, findPetsByTagsSuspenseQueryOptionsHook, useFindPetsByTagsSuspenseHook } from './useFindPetsByTagsSuspenseHook.ts' | ||
export { getInventoryQueryKey, getInventoryQueryOptionsHook } from './useGetInventoryHook.ts' | ||
export { getInventorySuspenseQueryKey, getInventorySuspenseQueryOptionsHook, useGetInventorySuspenseHook } from './useGetInventorySuspenseHook.ts' | ||
export { getOrderByIdQueryKey, getOrderByIdQueryOptionsHook, useGetOrderByIdHook } from './useGetOrderByIdHook.ts' | ||
export { getOrderByIdSuspenseQueryKey, getOrderByIdSuspenseQueryOptionsHook, useGetOrderByIdSuspenseHook } from './useGetOrderByIdSuspenseHook.ts' | ||
export { getPetByIdQueryKey, getPetByIdQueryOptionsHook, useGetPetByIdHook } from './useGetPetByIdHook.ts' | ||
export { getPetByIdSuspenseQueryKey, getPetByIdSuspenseQueryOptionsHook, useGetPetByIdSuspenseHook } from './useGetPetByIdSuspenseHook.ts' | ||
export { getUserByNameQueryKey, getUserByNameQueryOptionsHook, useGetUserByNameHook } from './useGetUserByNameHook.ts' | ||
export { getUserByNameSuspenseQueryKey, getUserByNameSuspenseQueryOptionsHook, useGetUserByNameSuspenseHook } from './useGetUserByNameSuspenseHook.ts' | ||
export { loginUserQueryKey, loginUserQueryOptionsHook, useLoginUserHook } from './useLoginUserHook.ts' | ||
export { loginUserSuspenseQueryKey, loginUserSuspenseQueryOptionsHook, useLoginUserSuspenseHook } from './useLoginUserSuspenseHook.ts' | ||
export { logoutUserQueryKey, logoutUserQueryOptionsHook, useLogoutUserHook } from './useLogoutUserHook.ts' | ||
export { logoutUserSuspenseQueryKey, logoutUserSuspenseQueryOptionsHook, useLogoutUserSuspenseHook } from './useLogoutUserSuspenseHook.ts' | ||
export { placeOrderMutationKey, usePlaceOrderHook } from './usePlaceOrderHook.ts' | ||
export { placeOrderPatchMutationKey, usePlaceOrderPatchHook } from './usePlaceOrderPatchHook.ts' | ||
export { updatePetMutationKey, useUpdatePetHook } from './useUpdatePetHook.ts' | ||
export { updatePetWithFormQueryKey, updatePetWithFormQueryOptionsHook, useUpdatePetWithFormHook } from './useUpdatePetWithFormHook.ts' | ||
export { | ||
updatePetWithFormSuspenseQueryKey, | ||
updatePetWithFormSuspenseQueryOptionsHook, | ||
useUpdatePetWithFormSuspenseHook, | ||
} from './useUpdatePetWithFormSuspenseHook.ts' | ||
export { updateUserMutationKey, useUpdateUserHook } from './useUpdateUserHook.ts' | ||
export { uploadFileMutationKey, useUploadFileHook } from './useUploadFileHook.ts' | ||
export type { AddPetMutationKey } from "./pet/useAddPetHook"; | ||
export type { DeletePetMutationKey } from "./pet/useDeletePetHook"; | ||
export type { FindPetsByStatusQueryKey } from "./pet/useFindPetsByStatusHook"; | ||
export type { FindPetsByStatusSuspenseQueryKey } from "./pet/useFindPetsByStatusSuspenseHook"; | ||
export type { FindPetsByTagsQueryKey } from "./pet/useFindPetsByTagsHook"; | ||
export type { FindPetsByTagsInfiniteQueryKey } from "./pet/useFindPetsByTagsInfiniteHook"; | ||
export type { FindPetsByTagsSuspenseQueryKey } from "./pet/useFindPetsByTagsSuspenseHook"; | ||
export type { GetPetByIdQueryKey } from "./pet/useGetPetByIdHook"; | ||
export type { GetPetByIdSuspenseQueryKey } from "./pet/useGetPetByIdSuspenseHook"; | ||
export type { UpdatePetMutationKey } from "./pet/useUpdatePetHook"; | ||
export type { UpdatePetWithFormQueryKey } from "./pet/useUpdatePetWithFormHook"; | ||
export type { UpdatePetWithFormSuspenseQueryKey } from "./pet/useUpdatePetWithFormSuspenseHook"; | ||
export type { UploadFileMutationKey } from "./pet/useUploadFileHook"; | ||
export type { DeleteOrderMutationKey } from "./store/useDeleteOrderHook"; | ||
export type { GetInventoryQueryKey } from "./store/useGetInventoryHook"; | ||
export type { GetInventorySuspenseQueryKey } from "./store/useGetInventorySuspenseHook"; | ||
export type { GetOrderByIdQueryKey } from "./store/useGetOrderByIdHook"; | ||
export type { GetOrderByIdSuspenseQueryKey } from "./store/useGetOrderByIdSuspenseHook"; | ||
export type { PlaceOrderMutationKey } from "./store/usePlaceOrderHook"; | ||
export type { PlaceOrderPatchMutationKey } from "./store/usePlaceOrderPatchHook"; | ||
export type { CreateUserMutationKey } from "./user/useCreateUserHook"; | ||
export type { CreateUsersWithListInputMutationKey } from "./user/useCreateUsersWithListInputHook"; | ||
export type { DeleteUserMutationKey } from "./user/useDeleteUserHook"; | ||
export type { GetUserByNameQueryKey } from "./user/useGetUserByNameHook"; | ||
export type { GetUserByNameSuspenseQueryKey } from "./user/useGetUserByNameSuspenseHook"; | ||
export type { LoginUserQueryKey } from "./user/useLoginUserHook"; | ||
export type { LoginUserSuspenseQueryKey } from "./user/useLoginUserSuspenseHook"; | ||
export type { LogoutUserQueryKey } from "./user/useLogoutUserHook"; | ||
export type { LogoutUserSuspenseQueryKey } from "./user/useLogoutUserSuspenseHook"; | ||
export type { UpdateUserMutationKey } from "./user/useUpdateUserHook"; | ||
export { addPetMutationKey, useAddPetHook } from "./pet/useAddPetHook"; | ||
export { deletePetMutationKey, useDeletePetHook } from "./pet/useDeletePetHook"; | ||
export { findPetsByStatusQueryKey, findPetsByStatusQueryOptionsHook, useFindPetsByStatusHook } from "./pet/useFindPetsByStatusHook"; | ||
export { findPetsByStatusSuspenseQueryKey, findPetsByStatusSuspenseQueryOptionsHook, useFindPetsByStatusSuspenseHook } from "./pet/useFindPetsByStatusSuspenseHook"; | ||
export { findPetsByTagsQueryKey, findPetsByTagsQueryOptionsHook, useFindPetsByTagsHook } from "./pet/useFindPetsByTagsHook"; | ||
export { findPetsByTagsInfiniteQueryKey, findPetsByTagsInfiniteQueryOptionsHook, useFindPetsByTagsInfiniteHook } from "./pet/useFindPetsByTagsInfiniteHook"; | ||
export { findPetsByTagsSuspenseQueryKey, findPetsByTagsSuspenseQueryOptionsHook, useFindPetsByTagsSuspenseHook } from "./pet/useFindPetsByTagsSuspenseHook"; | ||
export { getPetByIdQueryKey, getPetByIdQueryOptionsHook, useGetPetByIdHook } from "./pet/useGetPetByIdHook"; | ||
export { getPetByIdSuspenseQueryKey, getPetByIdSuspenseQueryOptionsHook, useGetPetByIdSuspenseHook } from "./pet/useGetPetByIdSuspenseHook"; | ||
export { updatePetMutationKey, useUpdatePetHook } from "./pet/useUpdatePetHook"; | ||
export { updatePetWithFormQueryKey, updatePetWithFormQueryOptionsHook, useUpdatePetWithFormHook } from "./pet/useUpdatePetWithFormHook"; | ||
export { updatePetWithFormSuspenseQueryKey, updatePetWithFormSuspenseQueryOptionsHook, useUpdatePetWithFormSuspenseHook } from "./pet/useUpdatePetWithFormSuspenseHook"; | ||
export { uploadFileMutationKey, useUploadFileHook } from "./pet/useUploadFileHook"; | ||
export { deleteOrderMutationKey, useDeleteOrderHook } from "./store/useDeleteOrderHook"; | ||
export { getInventoryQueryKey, getInventoryQueryOptionsHook } from "./store/useGetInventoryHook"; | ||
export { getInventorySuspenseQueryKey, getInventorySuspenseQueryOptionsHook, useGetInventorySuspenseHook } from "./store/useGetInventorySuspenseHook"; | ||
export { getOrderByIdQueryKey, getOrderByIdQueryOptionsHook, useGetOrderByIdHook } from "./store/useGetOrderByIdHook"; | ||
export { getOrderByIdSuspenseQueryKey, getOrderByIdSuspenseQueryOptionsHook, useGetOrderByIdSuspenseHook } from "./store/useGetOrderByIdSuspenseHook"; | ||
export { placeOrderMutationKey, usePlaceOrderHook } from "./store/usePlaceOrderHook"; | ||
export { placeOrderPatchMutationKey, usePlaceOrderPatchHook } from "./store/usePlaceOrderPatchHook"; | ||
export { createUserMutationKey, useCreateUserHook } from "./user/useCreateUserHook"; | ||
export { createUsersWithListInputMutationKey, useCreateUsersWithListInputHook } from "./user/useCreateUsersWithListInputHook"; | ||
export { deleteUserMutationKey, useDeleteUserHook } from "./user/useDeleteUserHook"; | ||
export { getUserByNameQueryKey, getUserByNameQueryOptionsHook, useGetUserByNameHook } from "./user/useGetUserByNameHook"; | ||
export { getUserByNameSuspenseQueryKey, getUserByNameSuspenseQueryOptionsHook, useGetUserByNameSuspenseHook } from "./user/useGetUserByNameSuspenseHook"; | ||
export { loginUserQueryKey, loginUserQueryOptionsHook, useLoginUserHook } from "./user/useLoginUserHook"; | ||
export { loginUserSuspenseQueryKey, loginUserSuspenseQueryOptionsHook, useLoginUserSuspenseHook } from "./user/useLoginUserSuspenseHook"; | ||
export { logoutUserQueryKey, logoutUserQueryOptionsHook, useLogoutUserHook } from "./user/useLogoutUserHook"; | ||
export { logoutUserSuspenseQueryKey, logoutUserSuspenseQueryOptionsHook, useLogoutUserSuspenseHook } from "./user/useLogoutUserSuspenseHook"; | ||
export { updateUserMutationKey, useUpdateUserHook } from "./user/useUpdateUserHook"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
export type { AddPetMutationKey } from "./useAddPetHook"; | ||
export type { DeletePetMutationKey } from "./useDeletePetHook"; | ||
export type { FindPetsByStatusQueryKey } from "./useFindPetsByStatusHook"; | ||
export type { FindPetsByStatusSuspenseQueryKey } from "./useFindPetsByStatusSuspenseHook"; | ||
export type { FindPetsByTagsQueryKey } from "./useFindPetsByTagsHook"; | ||
export type { FindPetsByTagsInfiniteQueryKey } from "./useFindPetsByTagsInfiniteHook"; | ||
export type { FindPetsByTagsSuspenseQueryKey } from "./useFindPetsByTagsSuspenseHook"; | ||
export type { GetPetByIdQueryKey } from "./useGetPetByIdHook"; | ||
export type { GetPetByIdSuspenseQueryKey } from "./useGetPetByIdSuspenseHook"; | ||
export type { UpdatePetMutationKey } from "./useUpdatePetHook"; | ||
export type { UpdatePetWithFormQueryKey } from "./useUpdatePetWithFormHook"; | ||
export type { UpdatePetWithFormSuspenseQueryKey } from "./useUpdatePetWithFormSuspenseHook"; | ||
export type { UploadFileMutationKey } from "./useUploadFileHook"; | ||
export { addPetMutationKey, useAddPetHook } from "./useAddPetHook"; | ||
export { deletePetMutationKey, useDeletePetHook } from "./useDeletePetHook"; | ||
export { findPetsByStatusQueryKey, findPetsByStatusQueryOptionsHook, useFindPetsByStatusHook } from "./useFindPetsByStatusHook"; | ||
export { findPetsByStatusSuspenseQueryKey, findPetsByStatusSuspenseQueryOptionsHook, useFindPetsByStatusSuspenseHook } from "./useFindPetsByStatusSuspenseHook"; | ||
export { findPetsByTagsQueryKey, findPetsByTagsQueryOptionsHook, useFindPetsByTagsHook } from "./useFindPetsByTagsHook"; | ||
export { findPetsByTagsInfiniteQueryKey, findPetsByTagsInfiniteQueryOptionsHook, useFindPetsByTagsInfiniteHook } from "./useFindPetsByTagsInfiniteHook"; | ||
export { findPetsByTagsSuspenseQueryKey, findPetsByTagsSuspenseQueryOptionsHook, useFindPetsByTagsSuspenseHook } from "./useFindPetsByTagsSuspenseHook"; | ||
export { getPetByIdQueryKey, getPetByIdQueryOptionsHook, useGetPetByIdHook } from "./useGetPetByIdHook"; | ||
export { getPetByIdSuspenseQueryKey, getPetByIdSuspenseQueryOptionsHook, useGetPetByIdSuspenseHook } from "./useGetPetByIdSuspenseHook"; | ||
export { updatePetMutationKey, useUpdatePetHook } from "./useUpdatePetHook"; | ||
export { updatePetWithFormQueryKey, updatePetWithFormQueryOptionsHook, useUpdatePetWithFormHook } from "./useUpdatePetWithFormHook"; | ||
export { updatePetWithFormSuspenseQueryKey, updatePetWithFormSuspenseQueryOptionsHook, useUpdatePetWithFormSuspenseHook } from "./useUpdatePetWithFormSuspenseHook"; | ||
export { uploadFileMutationKey, useUploadFileHook } from "./useUploadFileHook"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import client from "@kubb/plugin-client/client"; | ||
import type { AddPetMutationRequest, AddPetMutationResponse, AddPet405 } from "../../models/AddPet"; | ||
import type { RequestConfig } from "@kubb/plugin-client/client"; | ||
import type { UseMutationOptions } from "@tanstack/react-query"; | ||
import { useMutation } from "@tanstack/react-query"; | ||
|
||
export const addPetMutationKey = () => [{ "url": "/pet" }] as const; | ||
|
||
export type AddPetMutationKey = ReturnType<typeof addPetMutationKey>; | ||
|
||
/** | ||
* @description Add a new pet to the store | ||
* @summary Add a new pet to the store | ||
* {@link /pet} | ||
*/ | ||
async function addPetHook(data: AddPetMutationRequest, config: Partial<RequestConfig<AddPetMutationRequest>> = {}) { | ||
const res = await client<AddPetMutationResponse, AddPet405, AddPetMutationRequest>({ method: "POST", url: `/pet`, data, ...config }); | ||
return res.data; | ||
} | ||
|
||
/** | ||
* @description Add a new pet to the store | ||
* @summary Add a new pet to the store | ||
* {@link /pet} | ||
*/ | ||
export function useAddPetHook(options: { | ||
mutation?: UseMutationOptions<AddPetMutationResponse, AddPet405, { | ||
data: AddPetMutationRequest; | ||
}>; | ||
client?: Partial<RequestConfig<AddPetMutationRequest>>; | ||
} = {}) { | ||
const { mutation: mutationOptions, client: config = {} } = options ?? {}; | ||
const mutationKey = mutationOptions?.mutationKey ?? addPetMutationKey(); | ||
return useMutation<AddPetMutationResponse, AddPet405, { | ||
data: AddPetMutationRequest; | ||
}>({ | ||
mutationFn: async ({ data }) => { | ||
return addPetHook(data, config); | ||
}, | ||
mutationKey, | ||
...mutationOptions | ||
}); | ||
} |
Oops, something went wrong.