feat(agents): Add identity and soul template fields to board creation
This commit is contained in:
767
frontend/src/api/generated/boards/boards.ts
Normal file
767
frontend/src/api/generated/boards/boards.ts
Normal file
@@ -0,0 +1,767 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import { useMutation, useQuery } from "@tanstack/react-query";
|
||||
import type {
|
||||
DataTag,
|
||||
DefinedInitialDataOptions,
|
||||
DefinedUseQueryResult,
|
||||
MutationFunction,
|
||||
QueryClient,
|
||||
QueryFunction,
|
||||
QueryKey,
|
||||
UndefinedInitialDataOptions,
|
||||
UseMutationOptions,
|
||||
UseMutationResult,
|
||||
UseQueryOptions,
|
||||
UseQueryResult,
|
||||
} from "@tanstack/react-query";
|
||||
|
||||
import type {
|
||||
BoardCreate,
|
||||
BoardRead,
|
||||
BoardUpdate,
|
||||
DeleteBoardApiV1BoardsBoardIdDelete200,
|
||||
HTTPValidationError,
|
||||
} from ".././model";
|
||||
|
||||
import { customFetch } from "../../mutator";
|
||||
|
||||
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||
|
||||
/**
|
||||
* @summary List Boards
|
||||
*/
|
||||
export type listBoardsApiV1BoardsGetResponse200 = {
|
||||
data: BoardRead[];
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type listBoardsApiV1BoardsGetResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type listBoardsApiV1BoardsGetResponseSuccess =
|
||||
listBoardsApiV1BoardsGetResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type listBoardsApiV1BoardsGetResponseError =
|
||||
listBoardsApiV1BoardsGetResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type listBoardsApiV1BoardsGetResponse =
|
||||
| listBoardsApiV1BoardsGetResponseSuccess
|
||||
| listBoardsApiV1BoardsGetResponseError;
|
||||
|
||||
export const getListBoardsApiV1BoardsGetUrl = () => {
|
||||
return `/api/v1/boards`;
|
||||
};
|
||||
|
||||
export const listBoardsApiV1BoardsGet = async (
|
||||
options?: RequestInit,
|
||||
): Promise<listBoardsApiV1BoardsGetResponse> => {
|
||||
return customFetch<listBoardsApiV1BoardsGetResponse>(
|
||||
getListBoardsApiV1BoardsGetUrl(),
|
||||
{
|
||||
...options,
|
||||
method: "GET",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getListBoardsApiV1BoardsGetQueryKey = () => {
|
||||
return [`/api/v1/boards`] as const;
|
||||
};
|
||||
|
||||
export const getListBoardsApiV1BoardsGetQueryOptions = <
|
||||
TData = Awaited<ReturnType<typeof listBoardsApiV1BoardsGet>>,
|
||||
TError = HTTPValidationError,
|
||||
>(options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof listBoardsApiV1BoardsGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey =
|
||||
queryOptions?.queryKey ?? getListBoardsApiV1BoardsGetQueryKey();
|
||||
|
||||
const queryFn: QueryFunction<
|
||||
Awaited<ReturnType<typeof listBoardsApiV1BoardsGet>>
|
||||
> = ({ signal }) => listBoardsApiV1BoardsGet({ signal, ...requestOptions });
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
|
||||
Awaited<ReturnType<typeof listBoardsApiV1BoardsGet>>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type ListBoardsApiV1BoardsGetQueryResult = NonNullable<
|
||||
Awaited<ReturnType<typeof listBoardsApiV1BoardsGet>>
|
||||
>;
|
||||
export type ListBoardsApiV1BoardsGetQueryError = HTTPValidationError;
|
||||
|
||||
export function useListBoardsApiV1BoardsGet<
|
||||
TData = Awaited<ReturnType<typeof listBoardsApiV1BoardsGet>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof listBoardsApiV1BoardsGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof listBoardsApiV1BoardsGet>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof listBoardsApiV1BoardsGet>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useListBoardsApiV1BoardsGet<
|
||||
TData = Awaited<ReturnType<typeof listBoardsApiV1BoardsGet>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof listBoardsApiV1BoardsGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof listBoardsApiV1BoardsGet>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof listBoardsApiV1BoardsGet>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useListBoardsApiV1BoardsGet<
|
||||
TData = Awaited<ReturnType<typeof listBoardsApiV1BoardsGet>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof listBoardsApiV1BoardsGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary List Boards
|
||||
*/
|
||||
|
||||
export function useListBoardsApiV1BoardsGet<
|
||||
TData = Awaited<ReturnType<typeof listBoardsApiV1BoardsGet>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof listBoardsApiV1BoardsGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions = getListBoardsApiV1BoardsGetQueryOptions(options);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
return { ...query, queryKey: queryOptions.queryKey };
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Create Board
|
||||
*/
|
||||
export type createBoardApiV1BoardsPostResponse200 = {
|
||||
data: BoardRead;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type createBoardApiV1BoardsPostResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type createBoardApiV1BoardsPostResponseSuccess =
|
||||
createBoardApiV1BoardsPostResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type createBoardApiV1BoardsPostResponseError =
|
||||
createBoardApiV1BoardsPostResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type createBoardApiV1BoardsPostResponse =
|
||||
| createBoardApiV1BoardsPostResponseSuccess
|
||||
| createBoardApiV1BoardsPostResponseError;
|
||||
|
||||
export const getCreateBoardApiV1BoardsPostUrl = () => {
|
||||
return `/api/v1/boards`;
|
||||
};
|
||||
|
||||
export const createBoardApiV1BoardsPost = async (
|
||||
boardCreate: BoardCreate,
|
||||
options?: RequestInit,
|
||||
): Promise<createBoardApiV1BoardsPostResponse> => {
|
||||
return customFetch<createBoardApiV1BoardsPostResponse>(
|
||||
getCreateBoardApiV1BoardsPostUrl(),
|
||||
{
|
||||
...options,
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||
body: JSON.stringify(boardCreate),
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getCreateBoardApiV1BoardsPostMutationOptions = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createBoardApiV1BoardsPost>>,
|
||||
TError,
|
||||
{ data: BoardCreate },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createBoardApiV1BoardsPost>>,
|
||||
TError,
|
||||
{ data: BoardCreate },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["createBoardApiV1BoardsPost"];
|
||||
const { mutation: mutationOptions, request: requestOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey }, request: undefined };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof createBoardApiV1BoardsPost>>,
|
||||
{ data: BoardCreate }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
return createBoardApiV1BoardsPost(data, requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type CreateBoardApiV1BoardsPostMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof createBoardApiV1BoardsPost>>
|
||||
>;
|
||||
export type CreateBoardApiV1BoardsPostMutationBody = BoardCreate;
|
||||
export type CreateBoardApiV1BoardsPostMutationError = HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Create Board
|
||||
*/
|
||||
export const useCreateBoardApiV1BoardsPost = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof createBoardApiV1BoardsPost>>,
|
||||
TError,
|
||||
{ data: BoardCreate },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof createBoardApiV1BoardsPost>>,
|
||||
TError,
|
||||
{ data: BoardCreate },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(
|
||||
getCreateBoardApiV1BoardsPostMutationOptions(options),
|
||||
queryClient,
|
||||
);
|
||||
};
|
||||
/**
|
||||
* @summary Get Board
|
||||
*/
|
||||
export type getBoardApiV1BoardsBoardIdGetResponse200 = {
|
||||
data: BoardRead;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type getBoardApiV1BoardsBoardIdGetResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type getBoardApiV1BoardsBoardIdGetResponseSuccess =
|
||||
getBoardApiV1BoardsBoardIdGetResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type getBoardApiV1BoardsBoardIdGetResponseError =
|
||||
getBoardApiV1BoardsBoardIdGetResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type getBoardApiV1BoardsBoardIdGetResponse =
|
||||
| getBoardApiV1BoardsBoardIdGetResponseSuccess
|
||||
| getBoardApiV1BoardsBoardIdGetResponseError;
|
||||
|
||||
export const getGetBoardApiV1BoardsBoardIdGetUrl = (boardId: string) => {
|
||||
return `/api/v1/boards/${boardId}`;
|
||||
};
|
||||
|
||||
export const getBoardApiV1BoardsBoardIdGet = async (
|
||||
boardId: string,
|
||||
options?: RequestInit,
|
||||
): Promise<getBoardApiV1BoardsBoardIdGetResponse> => {
|
||||
return customFetch<getBoardApiV1BoardsBoardIdGetResponse>(
|
||||
getGetBoardApiV1BoardsBoardIdGetUrl(boardId),
|
||||
{
|
||||
...options,
|
||||
method: "GET",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getGetBoardApiV1BoardsBoardIdGetQueryKey = (boardId: string) => {
|
||||
return [`/api/v1/boards/${boardId}`] as const;
|
||||
};
|
||||
|
||||
export const getGetBoardApiV1BoardsBoardIdGetQueryOptions = <
|
||||
TData = Awaited<ReturnType<typeof getBoardApiV1BoardsBoardIdGet>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
boardId: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getBoardApiV1BoardsBoardIdGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey =
|
||||
queryOptions?.queryKey ?? getGetBoardApiV1BoardsBoardIdGetQueryKey(boardId);
|
||||
|
||||
const queryFn: QueryFunction<
|
||||
Awaited<ReturnType<typeof getBoardApiV1BoardsBoardIdGet>>
|
||||
> = ({ signal }) =>
|
||||
getBoardApiV1BoardsBoardIdGet(boardId, { signal, ...requestOptions });
|
||||
|
||||
return {
|
||||
queryKey,
|
||||
queryFn,
|
||||
enabled: !!boardId,
|
||||
...queryOptions,
|
||||
} as UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getBoardApiV1BoardsBoardIdGet>>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type GetBoardApiV1BoardsBoardIdGetQueryResult = NonNullable<
|
||||
Awaited<ReturnType<typeof getBoardApiV1BoardsBoardIdGet>>
|
||||
>;
|
||||
export type GetBoardApiV1BoardsBoardIdGetQueryError = HTTPValidationError;
|
||||
|
||||
export function useGetBoardApiV1BoardsBoardIdGet<
|
||||
TData = Awaited<ReturnType<typeof getBoardApiV1BoardsBoardIdGet>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
boardId: string,
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getBoardApiV1BoardsBoardIdGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getBoardApiV1BoardsBoardIdGet>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getBoardApiV1BoardsBoardIdGet>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetBoardApiV1BoardsBoardIdGet<
|
||||
TData = Awaited<ReturnType<typeof getBoardApiV1BoardsBoardIdGet>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
boardId: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getBoardApiV1BoardsBoardIdGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getBoardApiV1BoardsBoardIdGet>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getBoardApiV1BoardsBoardIdGet>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetBoardApiV1BoardsBoardIdGet<
|
||||
TData = Awaited<ReturnType<typeof getBoardApiV1BoardsBoardIdGet>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
boardId: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getBoardApiV1BoardsBoardIdGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary Get Board
|
||||
*/
|
||||
|
||||
export function useGetBoardApiV1BoardsBoardIdGet<
|
||||
TData = Awaited<ReturnType<typeof getBoardApiV1BoardsBoardIdGet>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
boardId: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getBoardApiV1BoardsBoardIdGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions = getGetBoardApiV1BoardsBoardIdGetQueryOptions(
|
||||
boardId,
|
||||
options,
|
||||
);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
return { ...query, queryKey: queryOptions.queryKey };
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Update Board
|
||||
*/
|
||||
export type updateBoardApiV1BoardsBoardIdPatchResponse200 = {
|
||||
data: BoardRead;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type updateBoardApiV1BoardsBoardIdPatchResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type updateBoardApiV1BoardsBoardIdPatchResponseSuccess =
|
||||
updateBoardApiV1BoardsBoardIdPatchResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type updateBoardApiV1BoardsBoardIdPatchResponseError =
|
||||
updateBoardApiV1BoardsBoardIdPatchResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type updateBoardApiV1BoardsBoardIdPatchResponse =
|
||||
| updateBoardApiV1BoardsBoardIdPatchResponseSuccess
|
||||
| updateBoardApiV1BoardsBoardIdPatchResponseError;
|
||||
|
||||
export const getUpdateBoardApiV1BoardsBoardIdPatchUrl = (boardId: string) => {
|
||||
return `/api/v1/boards/${boardId}`;
|
||||
};
|
||||
|
||||
export const updateBoardApiV1BoardsBoardIdPatch = async (
|
||||
boardId: string,
|
||||
boardUpdate: BoardUpdate,
|
||||
options?: RequestInit,
|
||||
): Promise<updateBoardApiV1BoardsBoardIdPatchResponse> => {
|
||||
return customFetch<updateBoardApiV1BoardsBoardIdPatchResponse>(
|
||||
getUpdateBoardApiV1BoardsBoardIdPatchUrl(boardId),
|
||||
{
|
||||
...options,
|
||||
method: "PATCH",
|
||||
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||
body: JSON.stringify(boardUpdate),
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getUpdateBoardApiV1BoardsBoardIdPatchMutationOptions = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateBoardApiV1BoardsBoardIdPatch>>,
|
||||
TError,
|
||||
{ boardId: string; data: BoardUpdate },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateBoardApiV1BoardsBoardIdPatch>>,
|
||||
TError,
|
||||
{ boardId: string; data: BoardUpdate },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["updateBoardApiV1BoardsBoardIdPatch"];
|
||||
const { mutation: mutationOptions, request: requestOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey }, request: undefined };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof updateBoardApiV1BoardsBoardIdPatch>>,
|
||||
{ boardId: string; data: BoardUpdate }
|
||||
> = (props) => {
|
||||
const { boardId, data } = props ?? {};
|
||||
|
||||
return updateBoardApiV1BoardsBoardIdPatch(boardId, data, requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type UpdateBoardApiV1BoardsBoardIdPatchMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof updateBoardApiV1BoardsBoardIdPatch>>
|
||||
>;
|
||||
export type UpdateBoardApiV1BoardsBoardIdPatchMutationBody = BoardUpdate;
|
||||
export type UpdateBoardApiV1BoardsBoardIdPatchMutationError =
|
||||
HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Update Board
|
||||
*/
|
||||
export const useUpdateBoardApiV1BoardsBoardIdPatch = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateBoardApiV1BoardsBoardIdPatch>>,
|
||||
TError,
|
||||
{ boardId: string; data: BoardUpdate },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateBoardApiV1BoardsBoardIdPatch>>,
|
||||
TError,
|
||||
{ boardId: string; data: BoardUpdate },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(
|
||||
getUpdateBoardApiV1BoardsBoardIdPatchMutationOptions(options),
|
||||
queryClient,
|
||||
);
|
||||
};
|
||||
/**
|
||||
* @summary Delete Board
|
||||
*/
|
||||
export type deleteBoardApiV1BoardsBoardIdDeleteResponse200 = {
|
||||
data: DeleteBoardApiV1BoardsBoardIdDelete200;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type deleteBoardApiV1BoardsBoardIdDeleteResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type deleteBoardApiV1BoardsBoardIdDeleteResponseSuccess =
|
||||
deleteBoardApiV1BoardsBoardIdDeleteResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type deleteBoardApiV1BoardsBoardIdDeleteResponseError =
|
||||
deleteBoardApiV1BoardsBoardIdDeleteResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type deleteBoardApiV1BoardsBoardIdDeleteResponse =
|
||||
| deleteBoardApiV1BoardsBoardIdDeleteResponseSuccess
|
||||
| deleteBoardApiV1BoardsBoardIdDeleteResponseError;
|
||||
|
||||
export const getDeleteBoardApiV1BoardsBoardIdDeleteUrl = (boardId: string) => {
|
||||
return `/api/v1/boards/${boardId}`;
|
||||
};
|
||||
|
||||
export const deleteBoardApiV1BoardsBoardIdDelete = async (
|
||||
boardId: string,
|
||||
options?: RequestInit,
|
||||
): Promise<deleteBoardApiV1BoardsBoardIdDeleteResponse> => {
|
||||
return customFetch<deleteBoardApiV1BoardsBoardIdDeleteResponse>(
|
||||
getDeleteBoardApiV1BoardsBoardIdDeleteUrl(boardId),
|
||||
{
|
||||
...options,
|
||||
method: "DELETE",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getDeleteBoardApiV1BoardsBoardIdDeleteMutationOptions = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteBoardApiV1BoardsBoardIdDelete>>,
|
||||
TError,
|
||||
{ boardId: string },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteBoardApiV1BoardsBoardIdDelete>>,
|
||||
TError,
|
||||
{ boardId: string },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["deleteBoardApiV1BoardsBoardIdDelete"];
|
||||
const { mutation: mutationOptions, request: requestOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey }, request: undefined };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof deleteBoardApiV1BoardsBoardIdDelete>>,
|
||||
{ boardId: string }
|
||||
> = (props) => {
|
||||
const { boardId } = props ?? {};
|
||||
|
||||
return deleteBoardApiV1BoardsBoardIdDelete(boardId, requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type DeleteBoardApiV1BoardsBoardIdDeleteMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof deleteBoardApiV1BoardsBoardIdDelete>>
|
||||
>;
|
||||
|
||||
export type DeleteBoardApiV1BoardsBoardIdDeleteMutationError =
|
||||
HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Delete Board
|
||||
*/
|
||||
export const useDeleteBoardApiV1BoardsBoardIdDelete = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteBoardApiV1BoardsBoardIdDelete>>,
|
||||
TError,
|
||||
{ boardId: string },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof deleteBoardApiV1BoardsBoardIdDelete>>,
|
||||
TError,
|
||||
{ boardId: string },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(
|
||||
getDeleteBoardApiV1BoardsBoardIdDeleteMutationOptions(options),
|
||||
queryClient,
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user