feat(agents): Add identity and soul template fields to board creation
This commit is contained in:
238
frontend/src/api/generated/activity/activity.ts
Normal file
238
frontend/src/api/generated/activity/activity.ts
Normal file
@@ -0,0 +1,238 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import type {
|
||||
DataTag,
|
||||
DefinedInitialDataOptions,
|
||||
DefinedUseQueryResult,
|
||||
QueryClient,
|
||||
QueryFunction,
|
||||
QueryKey,
|
||||
UndefinedInitialDataOptions,
|
||||
UseQueryOptions,
|
||||
UseQueryResult,
|
||||
} from "@tanstack/react-query";
|
||||
|
||||
import type {
|
||||
ActivityEventRead,
|
||||
HTTPValidationError,
|
||||
ListActivityApiV1ActivityGetParams,
|
||||
} from ".././model";
|
||||
|
||||
import { customFetch } from "../../mutator";
|
||||
|
||||
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||
|
||||
/**
|
||||
* @summary List Activity
|
||||
*/
|
||||
export type listActivityApiV1ActivityGetResponse200 = {
|
||||
data: ActivityEventRead[];
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type listActivityApiV1ActivityGetResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type listActivityApiV1ActivityGetResponseSuccess =
|
||||
listActivityApiV1ActivityGetResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type listActivityApiV1ActivityGetResponseError =
|
||||
listActivityApiV1ActivityGetResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type listActivityApiV1ActivityGetResponse =
|
||||
| listActivityApiV1ActivityGetResponseSuccess
|
||||
| listActivityApiV1ActivityGetResponseError;
|
||||
|
||||
export const getListActivityApiV1ActivityGetUrl = (
|
||||
params?: ListActivityApiV1ActivityGetParams,
|
||||
) => {
|
||||
const normalizedParams = new URLSearchParams();
|
||||
|
||||
Object.entries(params || {}).forEach(([key, value]) => {
|
||||
if (value !== undefined) {
|
||||
normalizedParams.append(key, value === null ? "null" : value.toString());
|
||||
}
|
||||
});
|
||||
|
||||
const stringifiedParams = normalizedParams.toString();
|
||||
|
||||
return stringifiedParams.length > 0
|
||||
? `/api/v1/activity?${stringifiedParams}`
|
||||
: `/api/v1/activity`;
|
||||
};
|
||||
|
||||
export const listActivityApiV1ActivityGet = async (
|
||||
params?: ListActivityApiV1ActivityGetParams,
|
||||
options?: RequestInit,
|
||||
): Promise<listActivityApiV1ActivityGetResponse> => {
|
||||
return customFetch<listActivityApiV1ActivityGetResponse>(
|
||||
getListActivityApiV1ActivityGetUrl(params),
|
||||
{
|
||||
...options,
|
||||
method: "GET",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getListActivityApiV1ActivityGetQueryKey = (
|
||||
params?: ListActivityApiV1ActivityGetParams,
|
||||
) => {
|
||||
return [`/api/v1/activity`, ...(params ? [params] : [])] as const;
|
||||
};
|
||||
|
||||
export const getListActivityApiV1ActivityGetQueryOptions = <
|
||||
TData = Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
params?: ListActivityApiV1ActivityGetParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey =
|
||||
queryOptions?.queryKey ?? getListActivityApiV1ActivityGetQueryKey(params);
|
||||
|
||||
const queryFn: QueryFunction<
|
||||
Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>
|
||||
> = ({ signal }) =>
|
||||
listActivityApiV1ActivityGet(params, { signal, ...requestOptions });
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
|
||||
Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type ListActivityApiV1ActivityGetQueryResult = NonNullable<
|
||||
Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>
|
||||
>;
|
||||
export type ListActivityApiV1ActivityGetQueryError = HTTPValidationError;
|
||||
|
||||
export function useListActivityApiV1ActivityGet<
|
||||
TData = Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
params: undefined | ListActivityApiV1ActivityGetParams,
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useListActivityApiV1ActivityGet<
|
||||
TData = Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
params?: ListActivityApiV1ActivityGetParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useListActivityApiV1ActivityGet<
|
||||
TData = Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
params?: ListActivityApiV1ActivityGetParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary List Activity
|
||||
*/
|
||||
|
||||
export function useListActivityApiV1ActivityGet<
|
||||
TData = Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
params?: ListActivityApiV1ActivityGetParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions = getListActivityApiV1ActivityGetQueryOptions(
|
||||
params,
|
||||
options,
|
||||
);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
return { ...query, queryKey: queryOptions.queryKey };
|
||||
}
|
||||
1315
frontend/src/api/generated/agents/agents.ts
Normal file
1315
frontend/src/api/generated/agents/agents.ts
Normal file
File diff suppressed because it is too large
Load Diff
121
frontend/src/api/generated/auth/auth.ts
Normal file
121
frontend/src/api/generated/auth/auth.ts
Normal file
@@ -0,0 +1,121 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import { useMutation } from "@tanstack/react-query";
|
||||
import type {
|
||||
MutationFunction,
|
||||
QueryClient,
|
||||
UseMutationOptions,
|
||||
UseMutationResult,
|
||||
} from "@tanstack/react-query";
|
||||
|
||||
import type { UserRead } from ".././model";
|
||||
|
||||
import { customFetch } from "../../mutator";
|
||||
|
||||
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||
|
||||
/**
|
||||
* @summary Bootstrap User
|
||||
*/
|
||||
export type bootstrapUserApiV1AuthBootstrapPostResponse200 = {
|
||||
data: UserRead;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type bootstrapUserApiV1AuthBootstrapPostResponseSuccess =
|
||||
bootstrapUserApiV1AuthBootstrapPostResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type bootstrapUserApiV1AuthBootstrapPostResponse =
|
||||
bootstrapUserApiV1AuthBootstrapPostResponseSuccess;
|
||||
|
||||
export const getBootstrapUserApiV1AuthBootstrapPostUrl = () => {
|
||||
return `/api/v1/auth/bootstrap`;
|
||||
};
|
||||
|
||||
export const bootstrapUserApiV1AuthBootstrapPost = async (
|
||||
options?: RequestInit,
|
||||
): Promise<bootstrapUserApiV1AuthBootstrapPostResponse> => {
|
||||
return customFetch<bootstrapUserApiV1AuthBootstrapPostResponse>(
|
||||
getBootstrapUserApiV1AuthBootstrapPostUrl(),
|
||||
{
|
||||
...options,
|
||||
method: "POST",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getBootstrapUserApiV1AuthBootstrapPostMutationOptions = <
|
||||
TError = unknown,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof bootstrapUserApiV1AuthBootstrapPost>>,
|
||||
TError,
|
||||
void,
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof bootstrapUserApiV1AuthBootstrapPost>>,
|
||||
TError,
|
||||
void,
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["bootstrapUserApiV1AuthBootstrapPost"];
|
||||
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 bootstrapUserApiV1AuthBootstrapPost>>,
|
||||
void
|
||||
> = () => {
|
||||
return bootstrapUserApiV1AuthBootstrapPost(requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type BootstrapUserApiV1AuthBootstrapPostMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof bootstrapUserApiV1AuthBootstrapPost>>
|
||||
>;
|
||||
|
||||
export type BootstrapUserApiV1AuthBootstrapPostMutationError = unknown;
|
||||
|
||||
/**
|
||||
* @summary Bootstrap User
|
||||
*/
|
||||
export const useBootstrapUserApiV1AuthBootstrapPost = <
|
||||
TError = unknown,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof bootstrapUserApiV1AuthBootstrapPost>>,
|
||||
TError,
|
||||
void,
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof bootstrapUserApiV1AuthBootstrapPost>>,
|
||||
TError,
|
||||
void,
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(
|
||||
getBootstrapUserApiV1AuthBootstrapPostMutationOptions(options),
|
||||
queryClient,
|
||||
);
|
||||
};
|
||||
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,
|
||||
);
|
||||
};
|
||||
515
frontend/src/api/generated/default/default.ts
Normal file
515
frontend/src/api/generated/default/default.ts
Normal file
@@ -0,0 +1,515 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import type {
|
||||
DataTag,
|
||||
DefinedInitialDataOptions,
|
||||
DefinedUseQueryResult,
|
||||
QueryClient,
|
||||
QueryFunction,
|
||||
QueryKey,
|
||||
UndefinedInitialDataOptions,
|
||||
UseQueryOptions,
|
||||
UseQueryResult,
|
||||
} from "@tanstack/react-query";
|
||||
|
||||
import type {
|
||||
HealthHealthGet200,
|
||||
HealthzHealthzGet200,
|
||||
ReadyzReadyzGet200,
|
||||
} from ".././model";
|
||||
|
||||
import { customFetch } from "../../mutator";
|
||||
|
||||
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||
|
||||
/**
|
||||
* @summary Health
|
||||
*/
|
||||
export type healthHealthGetResponse200 = {
|
||||
data: HealthHealthGet200;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type healthHealthGetResponseSuccess = healthHealthGetResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type healthHealthGetResponse = healthHealthGetResponseSuccess;
|
||||
|
||||
export const getHealthHealthGetUrl = () => {
|
||||
return `/health`;
|
||||
};
|
||||
|
||||
export const healthHealthGet = async (
|
||||
options?: RequestInit,
|
||||
): Promise<healthHealthGetResponse> => {
|
||||
return customFetch<healthHealthGetResponse>(getHealthHealthGetUrl(), {
|
||||
...options,
|
||||
method: "GET",
|
||||
});
|
||||
};
|
||||
|
||||
export const getHealthHealthGetQueryKey = () => {
|
||||
return [`/health`] as const;
|
||||
};
|
||||
|
||||
export const getHealthHealthGetQueryOptions = <
|
||||
TData = Awaited<ReturnType<typeof healthHealthGet>>,
|
||||
TError = unknown,
|
||||
>(options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof healthHealthGet>>, TError, TData>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getHealthHealthGetQueryKey();
|
||||
|
||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof healthHealthGet>>> = ({
|
||||
signal,
|
||||
}) => healthHealthGet({ signal, ...requestOptions });
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
|
||||
Awaited<ReturnType<typeof healthHealthGet>>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type HealthHealthGetQueryResult = NonNullable<
|
||||
Awaited<ReturnType<typeof healthHealthGet>>
|
||||
>;
|
||||
export type HealthHealthGetQueryError = unknown;
|
||||
|
||||
export function useHealthHealthGet<
|
||||
TData = Awaited<ReturnType<typeof healthHealthGet>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof healthHealthGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof healthHealthGet>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof healthHealthGet>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useHealthHealthGet<
|
||||
TData = Awaited<ReturnType<typeof healthHealthGet>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof healthHealthGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof healthHealthGet>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof healthHealthGet>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useHealthHealthGet<
|
||||
TData = Awaited<ReturnType<typeof healthHealthGet>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof healthHealthGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary Health
|
||||
*/
|
||||
|
||||
export function useHealthHealthGet<
|
||||
TData = Awaited<ReturnType<typeof healthHealthGet>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof healthHealthGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions = getHealthHealthGetQueryOptions(options);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
return { ...query, queryKey: queryOptions.queryKey };
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Healthz
|
||||
*/
|
||||
export type healthzHealthzGetResponse200 = {
|
||||
data: HealthzHealthzGet200;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type healthzHealthzGetResponseSuccess = healthzHealthzGetResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type healthzHealthzGetResponse = healthzHealthzGetResponseSuccess;
|
||||
|
||||
export const getHealthzHealthzGetUrl = () => {
|
||||
return `/healthz`;
|
||||
};
|
||||
|
||||
export const healthzHealthzGet = async (
|
||||
options?: RequestInit,
|
||||
): Promise<healthzHealthzGetResponse> => {
|
||||
return customFetch<healthzHealthzGetResponse>(getHealthzHealthzGetUrl(), {
|
||||
...options,
|
||||
method: "GET",
|
||||
});
|
||||
};
|
||||
|
||||
export const getHealthzHealthzGetQueryKey = () => {
|
||||
return [`/healthz`] as const;
|
||||
};
|
||||
|
||||
export const getHealthzHealthzGetQueryOptions = <
|
||||
TData = Awaited<ReturnType<typeof healthzHealthzGet>>,
|
||||
TError = unknown,
|
||||
>(options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof healthzHealthzGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getHealthzHealthzGetQueryKey();
|
||||
|
||||
const queryFn: QueryFunction<
|
||||
Awaited<ReturnType<typeof healthzHealthzGet>>
|
||||
> = ({ signal }) => healthzHealthzGet({ signal, ...requestOptions });
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
|
||||
Awaited<ReturnType<typeof healthzHealthzGet>>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type HealthzHealthzGetQueryResult = NonNullable<
|
||||
Awaited<ReturnType<typeof healthzHealthzGet>>
|
||||
>;
|
||||
export type HealthzHealthzGetQueryError = unknown;
|
||||
|
||||
export function useHealthzHealthzGet<
|
||||
TData = Awaited<ReturnType<typeof healthzHealthzGet>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof healthzHealthzGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof healthzHealthzGet>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof healthzHealthzGet>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useHealthzHealthzGet<
|
||||
TData = Awaited<ReturnType<typeof healthzHealthzGet>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof healthzHealthzGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof healthzHealthzGet>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof healthzHealthzGet>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useHealthzHealthzGet<
|
||||
TData = Awaited<ReturnType<typeof healthzHealthzGet>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof healthzHealthzGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary Healthz
|
||||
*/
|
||||
|
||||
export function useHealthzHealthzGet<
|
||||
TData = Awaited<ReturnType<typeof healthzHealthzGet>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof healthzHealthzGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions = getHealthzHealthzGetQueryOptions(options);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
return { ...query, queryKey: queryOptions.queryKey };
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Readyz
|
||||
*/
|
||||
export type readyzReadyzGetResponse200 = {
|
||||
data: ReadyzReadyzGet200;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type readyzReadyzGetResponseSuccess = readyzReadyzGetResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type readyzReadyzGetResponse = readyzReadyzGetResponseSuccess;
|
||||
|
||||
export const getReadyzReadyzGetUrl = () => {
|
||||
return `/readyz`;
|
||||
};
|
||||
|
||||
export const readyzReadyzGet = async (
|
||||
options?: RequestInit,
|
||||
): Promise<readyzReadyzGetResponse> => {
|
||||
return customFetch<readyzReadyzGetResponse>(getReadyzReadyzGetUrl(), {
|
||||
...options,
|
||||
method: "GET",
|
||||
});
|
||||
};
|
||||
|
||||
export const getReadyzReadyzGetQueryKey = () => {
|
||||
return [`/readyz`] as const;
|
||||
};
|
||||
|
||||
export const getReadyzReadyzGetQueryOptions = <
|
||||
TData = Awaited<ReturnType<typeof readyzReadyzGet>>,
|
||||
TError = unknown,
|
||||
>(options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof readyzReadyzGet>>, TError, TData>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getReadyzReadyzGetQueryKey();
|
||||
|
||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof readyzReadyzGet>>> = ({
|
||||
signal,
|
||||
}) => readyzReadyzGet({ signal, ...requestOptions });
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
|
||||
Awaited<ReturnType<typeof readyzReadyzGet>>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type ReadyzReadyzGetQueryResult = NonNullable<
|
||||
Awaited<ReturnType<typeof readyzReadyzGet>>
|
||||
>;
|
||||
export type ReadyzReadyzGetQueryError = unknown;
|
||||
|
||||
export function useReadyzReadyzGet<
|
||||
TData = Awaited<ReturnType<typeof readyzReadyzGet>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof readyzReadyzGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof readyzReadyzGet>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof readyzReadyzGet>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useReadyzReadyzGet<
|
||||
TData = Awaited<ReturnType<typeof readyzReadyzGet>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof readyzReadyzGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof readyzReadyzGet>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof readyzReadyzGet>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useReadyzReadyzGet<
|
||||
TData = Awaited<ReturnType<typeof readyzReadyzGet>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof readyzReadyzGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary Readyz
|
||||
*/
|
||||
|
||||
export function useReadyzReadyzGet<
|
||||
TData = Awaited<ReturnType<typeof readyzReadyzGet>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof readyzReadyzGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions = getReadyzReadyzGetQueryOptions(options);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
return { ...query, queryKey: queryOptions.queryKey };
|
||||
}
|
||||
1416
frontend/src/api/generated/gateway/gateway.ts
Normal file
1416
frontend/src/api/generated/gateway/gateway.ts
Normal file
File diff suppressed because it is too large
Load Diff
15
frontend/src/api/generated/model/activityEventRead.ts
Normal file
15
frontend/src/api/generated/model/activityEventRead.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface ActivityEventRead {
|
||||
id: string;
|
||||
event_type: string;
|
||||
message: string | null;
|
||||
agent_id: string | null;
|
||||
task_id: string | null;
|
||||
created_at: string;
|
||||
}
|
||||
14
frontend/src/api/generated/model/agentCreate.ts
Normal file
14
frontend/src/api/generated/model/agentCreate.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { AgentCreateHeartbeatConfig } from "./agentCreateHeartbeatConfig";
|
||||
|
||||
export interface AgentCreate {
|
||||
board_id?: string | null;
|
||||
name: string;
|
||||
status?: string;
|
||||
heartbeat_config?: AgentCreateHeartbeatConfig;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type AgentCreateHeartbeatConfig = { [key: string]: unknown } | null;
|
||||
10
frontend/src/api/generated/model/agentDeleteConfirm.ts
Normal file
10
frontend/src/api/generated/model/agentDeleteConfirm.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface AgentDeleteConfirm {
|
||||
token: string;
|
||||
}
|
||||
10
frontend/src/api/generated/model/agentHeartbeat.ts
Normal file
10
frontend/src/api/generated/model/agentHeartbeat.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface AgentHeartbeat {
|
||||
status?: string | null;
|
||||
}
|
||||
12
frontend/src/api/generated/model/agentHeartbeatCreate.ts
Normal file
12
frontend/src/api/generated/model/agentHeartbeatCreate.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface AgentHeartbeatCreate {
|
||||
status?: string | null;
|
||||
name: string;
|
||||
board_id?: string | null;
|
||||
}
|
||||
11
frontend/src/api/generated/model/agentProvisionConfirm.ts
Normal file
11
frontend/src/api/generated/model/agentProvisionConfirm.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface AgentProvisionConfirm {
|
||||
token: string;
|
||||
action?: string | null;
|
||||
}
|
||||
19
frontend/src/api/generated/model/agentRead.ts
Normal file
19
frontend/src/api/generated/model/agentRead.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { AgentReadHeartbeatConfig } from "./agentReadHeartbeatConfig";
|
||||
|
||||
export interface AgentRead {
|
||||
board_id?: string | null;
|
||||
name: string;
|
||||
status?: string;
|
||||
heartbeat_config?: AgentReadHeartbeatConfig;
|
||||
id: string;
|
||||
openclaw_session_id?: string | null;
|
||||
last_seen_at: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type AgentReadHeartbeatConfig = { [key: string]: unknown } | null;
|
||||
14
frontend/src/api/generated/model/agentUpdate.ts
Normal file
14
frontend/src/api/generated/model/agentUpdate.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { AgentUpdateHeartbeatConfig } from "./agentUpdateHeartbeatConfig";
|
||||
|
||||
export interface AgentUpdate {
|
||||
board_id?: string | null;
|
||||
name?: string | null;
|
||||
status?: string | null;
|
||||
heartbeat_config?: AgentUpdateHeartbeatConfig;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type AgentUpdateHeartbeatConfig = { [key: string]: unknown } | null;
|
||||
17
frontend/src/api/generated/model/boardCreate.ts
Normal file
17
frontend/src/api/generated/model/boardCreate.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface BoardCreate {
|
||||
name: string;
|
||||
slug: string;
|
||||
gateway_url?: string | null;
|
||||
gateway_main_session_key?: string | null;
|
||||
gateway_workspace_root?: string | null;
|
||||
identity_template?: string | null;
|
||||
soul_template?: string | null;
|
||||
gateway_token?: string | null;
|
||||
}
|
||||
19
frontend/src/api/generated/model/boardRead.ts
Normal file
19
frontend/src/api/generated/model/boardRead.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface BoardRead {
|
||||
name: string;
|
||||
slug: string;
|
||||
gateway_url?: string | null;
|
||||
gateway_main_session_key?: string | null;
|
||||
gateway_workspace_root?: string | null;
|
||||
identity_template?: string | null;
|
||||
soul_template?: string | null;
|
||||
id: string;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
17
frontend/src/api/generated/model/boardUpdate.ts
Normal file
17
frontend/src/api/generated/model/boardUpdate.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface BoardUpdate {
|
||||
name?: string | null;
|
||||
slug?: string | null;
|
||||
gateway_url?: string | null;
|
||||
gateway_token?: string | null;
|
||||
gateway_main_session_key?: string | null;
|
||||
gateway_workspace_root?: string | null;
|
||||
identity_template?: string | null;
|
||||
soul_template?: string | null;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ConfirmDeleteAgentApiV1AgentsAgentIdDeleteConfirmPost200 = {
|
||||
[key: string]: boolean;
|
||||
};
|
||||
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ConfirmProvisionAgentApiV1AgentsAgentIdProvisionConfirmPost200 = {
|
||||
[key: string]: boolean;
|
||||
};
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type DeleteAgentApiV1AgentsAgentIdDelete200 = { [key: string]: boolean };
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type DeleteBoardApiV1BoardsBoardIdDelete200 = { [key: string]: boolean };
|
||||
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type DeleteTaskApiV1BoardsBoardIdTasksTaskIdDelete200 = {
|
||||
[key: string]: boolean;
|
||||
};
|
||||
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type GatewayCommandsApiV1GatewayCommandsGet200 = {
|
||||
[key: string]: unknown;
|
||||
};
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type GatewayStatusApiV1GatewayStatusGet200 = { [key: string]: unknown };
|
||||
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type GatewayStatusApiV1GatewayStatusGetParams = {
|
||||
board_id?: string | null;
|
||||
};
|
||||
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type GetGatewaySessionApiV1GatewaySessionsSessionIdGet200 = {
|
||||
[key: string]: unknown;
|
||||
};
|
||||
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type GetGatewaySessionApiV1GatewaySessionsSessionIdGetParams = {
|
||||
board_id?: string | null;
|
||||
};
|
||||
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type GetSessionHistoryApiV1GatewaySessionsSessionIdHistoryGet200 = {
|
||||
[key: string]: unknown;
|
||||
};
|
||||
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type GetSessionHistoryApiV1GatewaySessionsSessionIdHistoryGetParams = {
|
||||
board_id?: string | null;
|
||||
};
|
||||
11
frontend/src/api/generated/model/hTTPValidationError.ts
Normal file
11
frontend/src/api/generated/model/hTTPValidationError.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { ValidationError } from "./validationError";
|
||||
|
||||
export interface HTTPValidationError {
|
||||
detail?: ValidationError[];
|
||||
}
|
||||
8
frontend/src/api/generated/model/healthHealthGet200.ts
Normal file
8
frontend/src/api/generated/model/healthHealthGet200.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type HealthHealthGet200 = { [key: string]: boolean };
|
||||
8
frontend/src/api/generated/model/healthzHealthzGet200.ts
Normal file
8
frontend/src/api/generated/model/healthzHealthzGet200.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type HealthzHealthzGet200 = { [key: string]: boolean };
|
||||
52
frontend/src/api/generated/model/index.ts
Normal file
52
frontend/src/api/generated/model/index.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export * from "./activityEventRead";
|
||||
export * from "./agentCreate";
|
||||
export * from "./agentCreateHeartbeatConfig";
|
||||
export * from "./agentDeleteConfirm";
|
||||
export * from "./agentHeartbeat";
|
||||
export * from "./agentHeartbeatCreate";
|
||||
export * from "./agentProvisionConfirm";
|
||||
export * from "./agentRead";
|
||||
export * from "./agentReadHeartbeatConfig";
|
||||
export * from "./agentUpdate";
|
||||
export * from "./agentUpdateHeartbeatConfig";
|
||||
export * from "./boardCreate";
|
||||
export * from "./boardRead";
|
||||
export * from "./boardUpdate";
|
||||
export * from "./confirmDeleteAgentApiV1AgentsAgentIdDeleteConfirmPost200";
|
||||
export * from "./confirmProvisionAgentApiV1AgentsAgentIdProvisionConfirmPost200";
|
||||
export * from "./deleteAgentApiV1AgentsAgentIdDelete200";
|
||||
export * from "./deleteBoardApiV1BoardsBoardIdDelete200";
|
||||
export * from "./deleteTaskApiV1BoardsBoardIdTasksTaskIdDelete200";
|
||||
export * from "./gatewayCommandsApiV1GatewayCommandsGet200";
|
||||
export * from "./gatewayStatusApiV1GatewayStatusGet200";
|
||||
export * from "./gatewayStatusApiV1GatewayStatusGetParams";
|
||||
export * from "./getGatewaySessionApiV1GatewaySessionsSessionIdGet200";
|
||||
export * from "./getGatewaySessionApiV1GatewaySessionsSessionIdGetParams";
|
||||
export * from "./getSessionHistoryApiV1GatewaySessionsSessionIdHistoryGet200";
|
||||
export * from "./getSessionHistoryApiV1GatewaySessionsSessionIdHistoryGetParams";
|
||||
export * from "./healthHealthGet200";
|
||||
export * from "./healthzHealthzGet200";
|
||||
export * from "./hTTPValidationError";
|
||||
export * from "./listActivityApiV1ActivityGetParams";
|
||||
export * from "./listSessionsApiV1GatewaySessionsGet200";
|
||||
export * from "./listSessionsApiV1GatewaySessionsGetParams";
|
||||
export * from "./listTasksApiV1BoardsBoardIdTasksGetParams";
|
||||
export * from "./readyzReadyzGet200";
|
||||
export * from "./sendSessionMessageApiV1GatewaySessionsSessionIdMessagePost200";
|
||||
export * from "./sendSessionMessageApiV1GatewaySessionsSessionIdMessagePostBody";
|
||||
export * from "./sendSessionMessageApiV1GatewaySessionsSessionIdMessagePostParams";
|
||||
export * from "./taskCommentCreate";
|
||||
export * from "./taskCommentRead";
|
||||
export * from "./taskCreate";
|
||||
export * from "./taskRead";
|
||||
export * from "./taskUpdate";
|
||||
export * from "./userRead";
|
||||
export * from "./userUpdate";
|
||||
export * from "./validationError";
|
||||
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ListActivityApiV1ActivityGetParams = {
|
||||
/**
|
||||
* @minimum 1
|
||||
* @maximum 200
|
||||
*/
|
||||
limit?: number;
|
||||
/**
|
||||
* @minimum 0
|
||||
*/
|
||||
offset?: number;
|
||||
};
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ListSessionsApiV1GatewaySessionsGet200 = { [key: string]: unknown };
|
||||
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ListSessionsApiV1GatewaySessionsGetParams = {
|
||||
board_id?: string | null;
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ListTasksApiV1BoardsBoardIdTasksGetParams = {
|
||||
status?: string | null;
|
||||
assigned_agent_id?: string | null;
|
||||
unassigned?: boolean | null;
|
||||
limit?: number | null;
|
||||
};
|
||||
8
frontend/src/api/generated/model/readyzReadyzGet200.ts
Normal file
8
frontend/src/api/generated/model/readyzReadyzGet200.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ReadyzReadyzGet200 = { [key: string]: boolean };
|
||||
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type SendSessionMessageApiV1GatewaySessionsSessionIdMessagePost200 = {
|
||||
[key: string]: boolean;
|
||||
};
|
||||
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type SendSessionMessageApiV1GatewaySessionsSessionIdMessagePostBody = {
|
||||
[key: string]: unknown;
|
||||
};
|
||||
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type SendSessionMessageApiV1GatewaySessionsSessionIdMessagePostParams = {
|
||||
board_id?: string | null;
|
||||
};
|
||||
10
frontend/src/api/generated/model/taskCommentCreate.ts
Normal file
10
frontend/src/api/generated/model/taskCommentCreate.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface TaskCommentCreate {
|
||||
message: string;
|
||||
}
|
||||
14
frontend/src/api/generated/model/taskCommentRead.ts
Normal file
14
frontend/src/api/generated/model/taskCommentRead.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface TaskCommentRead {
|
||||
id: string;
|
||||
message: string | null;
|
||||
agent_id: string | null;
|
||||
task_id: string | null;
|
||||
created_at: string;
|
||||
}
|
||||
16
frontend/src/api/generated/model/taskCreate.ts
Normal file
16
frontend/src/api/generated/model/taskCreate.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface TaskCreate {
|
||||
title: string;
|
||||
description?: string | null;
|
||||
status?: string;
|
||||
priority?: string;
|
||||
due_at?: string | null;
|
||||
assigned_agent_id?: string | null;
|
||||
created_by_user_id?: string | null;
|
||||
}
|
||||
21
frontend/src/api/generated/model/taskRead.ts
Normal file
21
frontend/src/api/generated/model/taskRead.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface TaskRead {
|
||||
title: string;
|
||||
description?: string | null;
|
||||
status?: string;
|
||||
priority?: string;
|
||||
due_at?: string | null;
|
||||
assigned_agent_id?: string | null;
|
||||
id: string;
|
||||
board_id: string | null;
|
||||
created_by_user_id: string | null;
|
||||
in_progress_at: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
16
frontend/src/api/generated/model/taskUpdate.ts
Normal file
16
frontend/src/api/generated/model/taskUpdate.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface TaskUpdate {
|
||||
title?: string | null;
|
||||
description?: string | null;
|
||||
status?: string | null;
|
||||
priority?: string | null;
|
||||
due_at?: string | null;
|
||||
assigned_agent_id?: string | null;
|
||||
comment?: string | null;
|
||||
}
|
||||
19
frontend/src/api/generated/model/userRead.ts
Normal file
19
frontend/src/api/generated/model/userRead.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface UserRead {
|
||||
clerk_user_id: string;
|
||||
email?: string | null;
|
||||
name?: string | null;
|
||||
preferred_name?: string | null;
|
||||
pronouns?: string | null;
|
||||
timezone?: string | null;
|
||||
notes?: string | null;
|
||||
context?: string | null;
|
||||
id: string;
|
||||
is_super_admin: boolean;
|
||||
}
|
||||
15
frontend/src/api/generated/model/userUpdate.ts
Normal file
15
frontend/src/api/generated/model/userUpdate.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface UserUpdate {
|
||||
name?: string | null;
|
||||
preferred_name?: string | null;
|
||||
pronouns?: string | null;
|
||||
timezone?: string | null;
|
||||
notes?: string | null;
|
||||
context?: string | null;
|
||||
}
|
||||
12
frontend/src/api/generated/model/validationError.ts
Normal file
12
frontend/src/api/generated/model/validationError.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface ValidationError {
|
||||
loc: (string | number)[];
|
||||
msg: string;
|
||||
type: string;
|
||||
}
|
||||
1091
frontend/src/api/generated/tasks/tasks.ts
Normal file
1091
frontend/src/api/generated/tasks/tasks.ts
Normal file
File diff suppressed because it is too large
Load Diff
314
frontend/src/api/generated/users/users.ts
Normal file
314
frontend/src/api/generated/users/users.ts
Normal file
@@ -0,0 +1,314 @@
|
||||
/**
|
||||
* 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 { HTTPValidationError, UserRead, UserUpdate } from ".././model";
|
||||
|
||||
import { customFetch } from "../../mutator";
|
||||
|
||||
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||
|
||||
/**
|
||||
* @summary Get Me
|
||||
*/
|
||||
export type getMeApiV1UsersMeGetResponse200 = {
|
||||
data: UserRead;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type getMeApiV1UsersMeGetResponseSuccess =
|
||||
getMeApiV1UsersMeGetResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type getMeApiV1UsersMeGetResponse = getMeApiV1UsersMeGetResponseSuccess;
|
||||
|
||||
export const getGetMeApiV1UsersMeGetUrl = () => {
|
||||
return `/api/v1/users/me`;
|
||||
};
|
||||
|
||||
export const getMeApiV1UsersMeGet = async (
|
||||
options?: RequestInit,
|
||||
): Promise<getMeApiV1UsersMeGetResponse> => {
|
||||
return customFetch<getMeApiV1UsersMeGetResponse>(
|
||||
getGetMeApiV1UsersMeGetUrl(),
|
||||
{
|
||||
...options,
|
||||
method: "GET",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getGetMeApiV1UsersMeGetQueryKey = () => {
|
||||
return [`/api/v1/users/me`] as const;
|
||||
};
|
||||
|
||||
export const getGetMeApiV1UsersMeGetQueryOptions = <
|
||||
TData = Awaited<ReturnType<typeof getMeApiV1UsersMeGet>>,
|
||||
TError = unknown,
|
||||
>(options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getMeApiV1UsersMeGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getGetMeApiV1UsersMeGetQueryKey();
|
||||
|
||||
const queryFn: QueryFunction<
|
||||
Awaited<ReturnType<typeof getMeApiV1UsersMeGet>>
|
||||
> = ({ signal }) => getMeApiV1UsersMeGet({ signal, ...requestOptions });
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getMeApiV1UsersMeGet>>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type GetMeApiV1UsersMeGetQueryResult = NonNullable<
|
||||
Awaited<ReturnType<typeof getMeApiV1UsersMeGet>>
|
||||
>;
|
||||
export type GetMeApiV1UsersMeGetQueryError = unknown;
|
||||
|
||||
export function useGetMeApiV1UsersMeGet<
|
||||
TData = Awaited<ReturnType<typeof getMeApiV1UsersMeGet>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getMeApiV1UsersMeGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getMeApiV1UsersMeGet>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getMeApiV1UsersMeGet>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetMeApiV1UsersMeGet<
|
||||
TData = Awaited<ReturnType<typeof getMeApiV1UsersMeGet>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getMeApiV1UsersMeGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getMeApiV1UsersMeGet>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getMeApiV1UsersMeGet>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetMeApiV1UsersMeGet<
|
||||
TData = Awaited<ReturnType<typeof getMeApiV1UsersMeGet>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getMeApiV1UsersMeGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary Get Me
|
||||
*/
|
||||
|
||||
export function useGetMeApiV1UsersMeGet<
|
||||
TData = Awaited<ReturnType<typeof getMeApiV1UsersMeGet>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getMeApiV1UsersMeGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions = getGetMeApiV1UsersMeGetQueryOptions(options);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
return { ...query, queryKey: queryOptions.queryKey };
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Update Me
|
||||
*/
|
||||
export type updateMeApiV1UsersMePatchResponse200 = {
|
||||
data: UserRead;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type updateMeApiV1UsersMePatchResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type updateMeApiV1UsersMePatchResponseSuccess =
|
||||
updateMeApiV1UsersMePatchResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type updateMeApiV1UsersMePatchResponseError =
|
||||
updateMeApiV1UsersMePatchResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type updateMeApiV1UsersMePatchResponse =
|
||||
| updateMeApiV1UsersMePatchResponseSuccess
|
||||
| updateMeApiV1UsersMePatchResponseError;
|
||||
|
||||
export const getUpdateMeApiV1UsersMePatchUrl = () => {
|
||||
return `/api/v1/users/me`;
|
||||
};
|
||||
|
||||
export const updateMeApiV1UsersMePatch = async (
|
||||
userUpdate: UserUpdate,
|
||||
options?: RequestInit,
|
||||
): Promise<updateMeApiV1UsersMePatchResponse> => {
|
||||
return customFetch<updateMeApiV1UsersMePatchResponse>(
|
||||
getUpdateMeApiV1UsersMePatchUrl(),
|
||||
{
|
||||
...options,
|
||||
method: "PATCH",
|
||||
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||
body: JSON.stringify(userUpdate),
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getUpdateMeApiV1UsersMePatchMutationOptions = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateMeApiV1UsersMePatch>>,
|
||||
TError,
|
||||
{ data: UserUpdate },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateMeApiV1UsersMePatch>>,
|
||||
TError,
|
||||
{ data: UserUpdate },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["updateMeApiV1UsersMePatch"];
|
||||
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 updateMeApiV1UsersMePatch>>,
|
||||
{ data: UserUpdate }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
return updateMeApiV1UsersMePatch(data, requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type UpdateMeApiV1UsersMePatchMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof updateMeApiV1UsersMePatch>>
|
||||
>;
|
||||
export type UpdateMeApiV1UsersMePatchMutationBody = UserUpdate;
|
||||
export type UpdateMeApiV1UsersMePatchMutationError = HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Update Me
|
||||
*/
|
||||
export const useUpdateMeApiV1UsersMePatch = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof updateMeApiV1UsersMePatch>>,
|
||||
TError,
|
||||
{ data: UserUpdate },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof updateMeApiV1UsersMePatch>>,
|
||||
TError,
|
||||
{ data: UserUpdate },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(
|
||||
getUpdateMeApiV1UsersMePatchMutationOptions(options),
|
||||
queryClient,
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user