diff --git a/packages/kubekit-codegen/test/fixtures/generated.ts b/packages/kubekit-codegen/test/fixtures/generated.ts deleted file mode 100644 index 8439edac..00000000 --- a/packages/kubekit-codegen/test/fixtures/generated.ts +++ /dev/null @@ -1,246 +0,0 @@ -import { createApi } from '@reduxjs/toolkit/query/react'; -import { fetchBaseQuery } from '@reduxjs/toolkit/query'; -export const api = createApi({ - baseQuery: fetchBaseQuery({ baseUrl: '/api/v3' }), - tagTypes: [], - endpoints: (build) => ({ - getHealthcheck: build.query({ - query: () => ({ url: `/healthcheck` }), - }), - updatePet: build.mutation({ - query: (queryArg) => ({ url: `/pet`, method: 'PUT', body: queryArg.pet }), - }), - addPet: build.mutation({ - query: (queryArg) => ({ url: `/pet`, method: 'POST', body: queryArg.pet }), - }), - findPetsByStatus: build.query({ - query: (queryArg) => ({ url: `/pet/findByStatus`, params: { status: queryArg.status } }), - }), - findPetsByTags: build.query({ - query: (queryArg) => ({ url: `/pet/findByTags`, params: { tags: queryArg.tags } }), - }), - getPetById: build.query({ - query: (queryArg) => ({ url: `/pet/${queryArg.petId}` }), - }), - updatePetWithForm: build.mutation({ - query: (queryArg) => ({ - url: `/pet/${queryArg.petId}`, - method: 'POST', - params: { name: queryArg.name, status: queryArg.status }, - }), - }), - deletePet: build.mutation({ - query: (queryArg) => ({ url: `/pet/${queryArg.petId}`, method: 'DELETE', headers: { api_key: queryArg.apiKey } }), - }), - uploadFile: build.mutation({ - query: (queryArg) => ({ - url: `/pet/${queryArg.petId}/uploadImage`, - method: 'POST', - body: queryArg.body, - params: { additionalMetadata: queryArg.additionalMetadata }, - }), - }), - getInventory: build.query({ - query: () => ({ url: `/store/inventory` }), - }), - placeOrder: build.mutation({ - query: (queryArg) => ({ url: `/store/order`, method: 'POST', body: queryArg.order }), - }), - getOrderById: build.query({ - query: (queryArg) => ({ url: `/store/order/${queryArg.orderId}` }), - }), - deleteOrder: build.mutation({ - query: (queryArg) => ({ url: `/store/order/${queryArg.orderId}`, method: 'DELETE' }), - }), - createUser: build.mutation({ - query: (queryArg) => ({ url: `/user`, method: 'POST', body: queryArg.user }), - }), - createUsersWithListInput: build.mutation({ - query: (queryArg) => ({ url: `/user/createWithList`, method: 'POST', body: queryArg.body }), - }), - loginUser: build.query({ - query: (queryArg) => ({ - url: `/user/login`, - params: { username: queryArg.username, password: queryArg.password }, - }), - }), - logoutUser: build.query({ - query: () => ({ url: `/user/logout` }), - }), - getUserByName: build.query({ - query: (queryArg) => ({ url: `/user/${queryArg.username}` }), - }), - updateUser: build.mutation({ - query: (queryArg) => ({ url: `/user/${queryArg.username}`, method: 'PUT', body: queryArg.user }), - }), - deleteUser: build.mutation({ - query: (queryArg) => ({ url: `/user/${queryArg.username}`, method: 'DELETE' }), - }), - }), -}); -export type GetHealthcheckApiResponse = /** status 200 OK */ { - message: string; -}; -export type GetHealthcheckApiArg = {}; -export type UpdatePetApiResponse = /** status 200 Successful operation */ Pet; -export type UpdatePetApiArg = { - /** Update an existent pet in the store */ - pet: Pet; -}; -export type AddPetApiResponse = /** status 200 Successful operation */ Pet; -export type AddPetApiArg = { - /** Create a new pet in the store */ - pet: Pet; -}; -export type FindPetsByStatusApiResponse = /** status 200 successful operation */ Pet[]; -export type FindPetsByStatusApiArg = { - /** Status values that need to be considered for filter */ - status?: 'available' | 'pending' | 'sold'; -}; -export type FindPetsByTagsApiResponse = /** status 200 successful operation */ Pet[]; -export type FindPetsByTagsApiArg = { - /** Tags to filter by */ - tags?: string[]; -}; -export type GetPetByIdApiResponse = /** status 200 successful operation */ Pet; -export type GetPetByIdApiArg = { - /** ID of pet to return */ - petId: number; -}; -export type UpdatePetWithFormApiResponse = unknown; -export type UpdatePetWithFormApiArg = { - /** ID of pet that needs to be updated */ - petId: number; - /** Name of pet that needs to be updated */ - name?: string; - /** Status of pet that needs to be updated */ - status?: string; -}; -export type DeletePetApiResponse = unknown; -export type DeletePetApiArg = { - apiKey?: string; - /** Pet id to delete */ - petId: number; -}; -export type UploadFileApiResponse = /** status 200 successful operation */ ApiResponse; -export type UploadFileApiArg = { - /** ID of pet to update */ - petId: number; - /** Additional Metadata */ - additionalMetadata?: string; - body: string; -}; -export type GetInventoryApiResponse = /** status 200 successful operation */ { - [key: string]: number; -}; -export type GetInventoryApiArg = {}; -export type PlaceOrderApiResponse = /** status 200 successful operation */ Order; -export type PlaceOrderApiArg = { - order: Order; -}; -export type GetOrderByIdApiResponse = /** status 200 successful operation */ Order; -export type GetOrderByIdApiArg = { - /** ID of order that needs to be fetched */ - orderId: number; -}; -export type DeleteOrderApiResponse = unknown; -export type DeleteOrderApiArg = { - /** ID of the order that needs to be deleted */ - orderId: number; -}; -export type CreateUserApiResponse = unknown; -export type CreateUserApiArg = { - /** Created user object */ - user: User; -}; -export type CreateUsersWithListInputApiResponse = /** status 200 Successful operation */ User; -export type CreateUsersWithListInputApiArg = { - body: User[]; -}; -export type LoginUserApiResponse = /** status 200 successful operation */ string; -export type LoginUserApiArg = { - /** The user name for login */ - username?: string; - /** The password for login in clear text */ - password?: string; -}; -export type LogoutUserApiResponse = unknown; -export type LogoutUserApiArg = {}; -export type GetUserByNameApiResponse = /** status 200 successful operation */ User; -export type GetUserByNameApiArg = { - /** The name that needs to be fetched. Use user1 for testing. */ - username: string; -}; -export type UpdateUserApiResponse = unknown; -export type UpdateUserApiArg = { - /** name that need to be deleted */ - username: string; - /** Update an existent user in the store */ - user: User; -}; -export type DeleteUserApiResponse = unknown; -export type DeleteUserApiArg = { - /** The name that needs to be deleted */ - username: string; -}; -export type Category = { - id?: number; - name?: string; -}; -export type Tag = { - id?: number; - name?: string; -}; -export type Pet = { - id?: number; - name: string; - category?: Category; - photoUrls: string[]; - tags?: Tag[]; - status?: 'available' | 'pending' | 'sold'; -}; -export type ApiResponse = { - code?: number; - type?: string; - message?: string; -}; -export type Order = { - id?: number; - petId?: number; - quantity?: number; - shipDate?: string; - status?: 'placed' | 'approved' | 'delivered'; - complete?: boolean; -}; -export type User = { - id?: number; - username?: string; - firstName?: string; - lastName?: string; - email?: string; - password?: string; - phone?: string; - userStatus?: number; -}; -export const { - useGetHealthcheckQuery, - useUpdatePetMutation, - useAddPetMutation, - useFindPetsByStatusQuery, - useFindPetsByTagsQuery, - useGetPetByIdQuery, - useUpdatePetWithFormMutation, - useDeletePetMutation, - useUploadFileMutation, - useGetInventoryQuery, - usePlaceOrderMutation, - useGetOrderByIdQuery, - useDeleteOrderMutation, - useCreateUserMutation, - useCreateUsersWithListInputMutation, - useLoginUserQuery, - useLogoutUserQuery, - useGetUserByNameQuery, - useUpdateUserMutation, - useDeleteUserMutation, -} = api;