3032 lines
86 KiB
TypeScript
3032 lines
86 KiB
TypeScript
/**
|
|
* 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 {
|
|
AgentCreate,
|
|
AgentHeartbeatCreate,
|
|
AgentNudge,
|
|
AgentRead,
|
|
ApprovalCreate,
|
|
ApprovalRead,
|
|
BoardMemoryCreate,
|
|
BoardMemoryRead,
|
|
BoardOnboardingAgentComplete,
|
|
BoardOnboardingAgentQuestion,
|
|
BoardOnboardingRead,
|
|
BoardRead,
|
|
HTTPValidationError,
|
|
LimitOffsetPageTypeVarCustomizedAgentRead,
|
|
LimitOffsetPageTypeVarCustomizedApprovalRead,
|
|
LimitOffsetPageTypeVarCustomizedBoardMemoryRead,
|
|
LimitOffsetPageTypeVarCustomizedBoardRead,
|
|
LimitOffsetPageTypeVarCustomizedTaskCommentRead,
|
|
LimitOffsetPageTypeVarCustomizedTaskRead,
|
|
ListAgentsApiV1AgentAgentsGetParams,
|
|
ListApprovalsApiV1AgentBoardsBoardIdApprovalsGetParams,
|
|
ListBoardMemoryApiV1AgentBoardsBoardIdMemoryGetParams,
|
|
ListBoardsApiV1AgentBoardsGetParams,
|
|
ListTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGetParams,
|
|
ListTasksApiV1AgentBoardsBoardIdTasksGetParams,
|
|
OkResponse,
|
|
TaskCommentCreate,
|
|
TaskCommentRead,
|
|
TaskCreate,
|
|
TaskRead,
|
|
TaskUpdate,
|
|
} from ".././model";
|
|
|
|
import { customFetch } from "../../mutator";
|
|
|
|
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
|
|
/**
|
|
* @summary List Agents
|
|
*/
|
|
export type listAgentsApiV1AgentAgentsGetResponse200 = {
|
|
data: LimitOffsetPageTypeVarCustomizedAgentRead;
|
|
status: 200;
|
|
};
|
|
|
|
export type listAgentsApiV1AgentAgentsGetResponse422 = {
|
|
data: HTTPValidationError;
|
|
status: 422;
|
|
};
|
|
|
|
export type listAgentsApiV1AgentAgentsGetResponseSuccess =
|
|
listAgentsApiV1AgentAgentsGetResponse200 & {
|
|
headers: Headers;
|
|
};
|
|
export type listAgentsApiV1AgentAgentsGetResponseError =
|
|
listAgentsApiV1AgentAgentsGetResponse422 & {
|
|
headers: Headers;
|
|
};
|
|
|
|
export type listAgentsApiV1AgentAgentsGetResponse =
|
|
| listAgentsApiV1AgentAgentsGetResponseSuccess
|
|
| listAgentsApiV1AgentAgentsGetResponseError;
|
|
|
|
export const getListAgentsApiV1AgentAgentsGetUrl = (
|
|
params?: ListAgentsApiV1AgentAgentsGetParams,
|
|
) => {
|
|
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/agent/agents?${stringifiedParams}`
|
|
: `/api/v1/agent/agents`;
|
|
};
|
|
|
|
export const listAgentsApiV1AgentAgentsGet = async (
|
|
params?: ListAgentsApiV1AgentAgentsGetParams,
|
|
options?: RequestInit,
|
|
): Promise<listAgentsApiV1AgentAgentsGetResponse> => {
|
|
return customFetch<listAgentsApiV1AgentAgentsGetResponse>(
|
|
getListAgentsApiV1AgentAgentsGetUrl(params),
|
|
{
|
|
...options,
|
|
method: "GET",
|
|
},
|
|
);
|
|
};
|
|
|
|
export const getListAgentsApiV1AgentAgentsGetQueryKey = (
|
|
params?: ListAgentsApiV1AgentAgentsGetParams,
|
|
) => {
|
|
return [`/api/v1/agent/agents`, ...(params ? [params] : [])] as const;
|
|
};
|
|
|
|
export const getListAgentsApiV1AgentAgentsGetQueryOptions = <
|
|
TData = Awaited<ReturnType<typeof listAgentsApiV1AgentAgentsGet>>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
params?: ListAgentsApiV1AgentAgentsGetParams,
|
|
options?: {
|
|
query?: Partial<
|
|
UseQueryOptions<
|
|
Awaited<ReturnType<typeof listAgentsApiV1AgentAgentsGet>>,
|
|
TError,
|
|
TData
|
|
>
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
) => {
|
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
|
|
const queryKey =
|
|
queryOptions?.queryKey ?? getListAgentsApiV1AgentAgentsGetQueryKey(params);
|
|
|
|
const queryFn: QueryFunction<
|
|
Awaited<ReturnType<typeof listAgentsApiV1AgentAgentsGet>>
|
|
> = ({ signal }) =>
|
|
listAgentsApiV1AgentAgentsGet(params, { signal, ...requestOptions });
|
|
|
|
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
|
|
Awaited<ReturnType<typeof listAgentsApiV1AgentAgentsGet>>,
|
|
TError,
|
|
TData
|
|
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
};
|
|
|
|
export type ListAgentsApiV1AgentAgentsGetQueryResult = NonNullable<
|
|
Awaited<ReturnType<typeof listAgentsApiV1AgentAgentsGet>>
|
|
>;
|
|
export type ListAgentsApiV1AgentAgentsGetQueryError = HTTPValidationError;
|
|
|
|
export function useListAgentsApiV1AgentAgentsGet<
|
|
TData = Awaited<ReturnType<typeof listAgentsApiV1AgentAgentsGet>>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
params: undefined | ListAgentsApiV1AgentAgentsGetParams,
|
|
options: {
|
|
query: Partial<
|
|
UseQueryOptions<
|
|
Awaited<ReturnType<typeof listAgentsApiV1AgentAgentsGet>>,
|
|
TError,
|
|
TData
|
|
>
|
|
> &
|
|
Pick<
|
|
DefinedInitialDataOptions<
|
|
Awaited<ReturnType<typeof listAgentsApiV1AgentAgentsGet>>,
|
|
TError,
|
|
Awaited<ReturnType<typeof listAgentsApiV1AgentAgentsGet>>
|
|
>,
|
|
"initialData"
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): DefinedUseQueryResult<TData, TError> & {
|
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
};
|
|
export function useListAgentsApiV1AgentAgentsGet<
|
|
TData = Awaited<ReturnType<typeof listAgentsApiV1AgentAgentsGet>>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
params?: ListAgentsApiV1AgentAgentsGetParams,
|
|
options?: {
|
|
query?: Partial<
|
|
UseQueryOptions<
|
|
Awaited<ReturnType<typeof listAgentsApiV1AgentAgentsGet>>,
|
|
TError,
|
|
TData
|
|
>
|
|
> &
|
|
Pick<
|
|
UndefinedInitialDataOptions<
|
|
Awaited<ReturnType<typeof listAgentsApiV1AgentAgentsGet>>,
|
|
TError,
|
|
Awaited<ReturnType<typeof listAgentsApiV1AgentAgentsGet>>
|
|
>,
|
|
"initialData"
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): UseQueryResult<TData, TError> & {
|
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
};
|
|
export function useListAgentsApiV1AgentAgentsGet<
|
|
TData = Awaited<ReturnType<typeof listAgentsApiV1AgentAgentsGet>>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
params?: ListAgentsApiV1AgentAgentsGetParams,
|
|
options?: {
|
|
query?: Partial<
|
|
UseQueryOptions<
|
|
Awaited<ReturnType<typeof listAgentsApiV1AgentAgentsGet>>,
|
|
TError,
|
|
TData
|
|
>
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): UseQueryResult<TData, TError> & {
|
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
};
|
|
/**
|
|
* @summary List Agents
|
|
*/
|
|
|
|
export function useListAgentsApiV1AgentAgentsGet<
|
|
TData = Awaited<ReturnType<typeof listAgentsApiV1AgentAgentsGet>>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
params?: ListAgentsApiV1AgentAgentsGetParams,
|
|
options?: {
|
|
query?: Partial<
|
|
UseQueryOptions<
|
|
Awaited<ReturnType<typeof listAgentsApiV1AgentAgentsGet>>,
|
|
TError,
|
|
TData
|
|
>
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): UseQueryResult<TData, TError> & {
|
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
} {
|
|
const queryOptions = getListAgentsApiV1AgentAgentsGetQueryOptions(
|
|
params,
|
|
options,
|
|
);
|
|
|
|
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
|
TData,
|
|
TError
|
|
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
|
|
return { ...query, queryKey: queryOptions.queryKey };
|
|
}
|
|
|
|
/**
|
|
* @summary Create Agent
|
|
*/
|
|
export type createAgentApiV1AgentAgentsPostResponse200 = {
|
|
data: AgentRead;
|
|
status: 200;
|
|
};
|
|
|
|
export type createAgentApiV1AgentAgentsPostResponse422 = {
|
|
data: HTTPValidationError;
|
|
status: 422;
|
|
};
|
|
|
|
export type createAgentApiV1AgentAgentsPostResponseSuccess =
|
|
createAgentApiV1AgentAgentsPostResponse200 & {
|
|
headers: Headers;
|
|
};
|
|
export type createAgentApiV1AgentAgentsPostResponseError =
|
|
createAgentApiV1AgentAgentsPostResponse422 & {
|
|
headers: Headers;
|
|
};
|
|
|
|
export type createAgentApiV1AgentAgentsPostResponse =
|
|
| createAgentApiV1AgentAgentsPostResponseSuccess
|
|
| createAgentApiV1AgentAgentsPostResponseError;
|
|
|
|
export const getCreateAgentApiV1AgentAgentsPostUrl = () => {
|
|
return `/api/v1/agent/agents`;
|
|
};
|
|
|
|
export const createAgentApiV1AgentAgentsPost = async (
|
|
agentCreate: AgentCreate,
|
|
options?: RequestInit,
|
|
): Promise<createAgentApiV1AgentAgentsPostResponse> => {
|
|
return customFetch<createAgentApiV1AgentAgentsPostResponse>(
|
|
getCreateAgentApiV1AgentAgentsPostUrl(),
|
|
{
|
|
...options,
|
|
method: "POST",
|
|
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
body: JSON.stringify(agentCreate),
|
|
},
|
|
);
|
|
};
|
|
|
|
export const getCreateAgentApiV1AgentAgentsPostMutationOptions = <
|
|
TError = HTTPValidationError,
|
|
TContext = unknown,
|
|
>(options?: {
|
|
mutation?: UseMutationOptions<
|
|
Awaited<ReturnType<typeof createAgentApiV1AgentAgentsPost>>,
|
|
TError,
|
|
{ data: AgentCreate },
|
|
TContext
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
}): UseMutationOptions<
|
|
Awaited<ReturnType<typeof createAgentApiV1AgentAgentsPost>>,
|
|
TError,
|
|
{ data: AgentCreate },
|
|
TContext
|
|
> => {
|
|
const mutationKey = ["createAgentApiV1AgentAgentsPost"];
|
|
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 createAgentApiV1AgentAgentsPost>>,
|
|
{ data: AgentCreate }
|
|
> = (props) => {
|
|
const { data } = props ?? {};
|
|
|
|
return createAgentApiV1AgentAgentsPost(data, requestOptions);
|
|
};
|
|
|
|
return { mutationFn, ...mutationOptions };
|
|
};
|
|
|
|
export type CreateAgentApiV1AgentAgentsPostMutationResult = NonNullable<
|
|
Awaited<ReturnType<typeof createAgentApiV1AgentAgentsPost>>
|
|
>;
|
|
export type CreateAgentApiV1AgentAgentsPostMutationBody = AgentCreate;
|
|
export type CreateAgentApiV1AgentAgentsPostMutationError = HTTPValidationError;
|
|
|
|
/**
|
|
* @summary Create Agent
|
|
*/
|
|
export const useCreateAgentApiV1AgentAgentsPost = <
|
|
TError = HTTPValidationError,
|
|
TContext = unknown,
|
|
>(
|
|
options?: {
|
|
mutation?: UseMutationOptions<
|
|
Awaited<ReturnType<typeof createAgentApiV1AgentAgentsPost>>,
|
|
TError,
|
|
{ data: AgentCreate },
|
|
TContext
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): UseMutationResult<
|
|
Awaited<ReturnType<typeof createAgentApiV1AgentAgentsPost>>,
|
|
TError,
|
|
{ data: AgentCreate },
|
|
TContext
|
|
> => {
|
|
return useMutation(
|
|
getCreateAgentApiV1AgentAgentsPostMutationOptions(options),
|
|
queryClient,
|
|
);
|
|
};
|
|
/**
|
|
* @summary List Boards
|
|
*/
|
|
export type listBoardsApiV1AgentBoardsGetResponse200 = {
|
|
data: LimitOffsetPageTypeVarCustomizedBoardRead;
|
|
status: 200;
|
|
};
|
|
|
|
export type listBoardsApiV1AgentBoardsGetResponse422 = {
|
|
data: HTTPValidationError;
|
|
status: 422;
|
|
};
|
|
|
|
export type listBoardsApiV1AgentBoardsGetResponseSuccess =
|
|
listBoardsApiV1AgentBoardsGetResponse200 & {
|
|
headers: Headers;
|
|
};
|
|
export type listBoardsApiV1AgentBoardsGetResponseError =
|
|
listBoardsApiV1AgentBoardsGetResponse422 & {
|
|
headers: Headers;
|
|
};
|
|
|
|
export type listBoardsApiV1AgentBoardsGetResponse =
|
|
| listBoardsApiV1AgentBoardsGetResponseSuccess
|
|
| listBoardsApiV1AgentBoardsGetResponseError;
|
|
|
|
export const getListBoardsApiV1AgentBoardsGetUrl = (
|
|
params?: ListBoardsApiV1AgentBoardsGetParams,
|
|
) => {
|
|
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/agent/boards?${stringifiedParams}`
|
|
: `/api/v1/agent/boards`;
|
|
};
|
|
|
|
export const listBoardsApiV1AgentBoardsGet = async (
|
|
params?: ListBoardsApiV1AgentBoardsGetParams,
|
|
options?: RequestInit,
|
|
): Promise<listBoardsApiV1AgentBoardsGetResponse> => {
|
|
return customFetch<listBoardsApiV1AgentBoardsGetResponse>(
|
|
getListBoardsApiV1AgentBoardsGetUrl(params),
|
|
{
|
|
...options,
|
|
method: "GET",
|
|
},
|
|
);
|
|
};
|
|
|
|
export const getListBoardsApiV1AgentBoardsGetQueryKey = (
|
|
params?: ListBoardsApiV1AgentBoardsGetParams,
|
|
) => {
|
|
return [`/api/v1/agent/boards`, ...(params ? [params] : [])] as const;
|
|
};
|
|
|
|
export const getListBoardsApiV1AgentBoardsGetQueryOptions = <
|
|
TData = Awaited<ReturnType<typeof listBoardsApiV1AgentBoardsGet>>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
params?: ListBoardsApiV1AgentBoardsGetParams,
|
|
options?: {
|
|
query?: Partial<
|
|
UseQueryOptions<
|
|
Awaited<ReturnType<typeof listBoardsApiV1AgentBoardsGet>>,
|
|
TError,
|
|
TData
|
|
>
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
) => {
|
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
|
|
const queryKey =
|
|
queryOptions?.queryKey ?? getListBoardsApiV1AgentBoardsGetQueryKey(params);
|
|
|
|
const queryFn: QueryFunction<
|
|
Awaited<ReturnType<typeof listBoardsApiV1AgentBoardsGet>>
|
|
> = ({ signal }) =>
|
|
listBoardsApiV1AgentBoardsGet(params, { signal, ...requestOptions });
|
|
|
|
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
|
|
Awaited<ReturnType<typeof listBoardsApiV1AgentBoardsGet>>,
|
|
TError,
|
|
TData
|
|
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
};
|
|
|
|
export type ListBoardsApiV1AgentBoardsGetQueryResult = NonNullable<
|
|
Awaited<ReturnType<typeof listBoardsApiV1AgentBoardsGet>>
|
|
>;
|
|
export type ListBoardsApiV1AgentBoardsGetQueryError = HTTPValidationError;
|
|
|
|
export function useListBoardsApiV1AgentBoardsGet<
|
|
TData = Awaited<ReturnType<typeof listBoardsApiV1AgentBoardsGet>>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
params: undefined | ListBoardsApiV1AgentBoardsGetParams,
|
|
options: {
|
|
query: Partial<
|
|
UseQueryOptions<
|
|
Awaited<ReturnType<typeof listBoardsApiV1AgentBoardsGet>>,
|
|
TError,
|
|
TData
|
|
>
|
|
> &
|
|
Pick<
|
|
DefinedInitialDataOptions<
|
|
Awaited<ReturnType<typeof listBoardsApiV1AgentBoardsGet>>,
|
|
TError,
|
|
Awaited<ReturnType<typeof listBoardsApiV1AgentBoardsGet>>
|
|
>,
|
|
"initialData"
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): DefinedUseQueryResult<TData, TError> & {
|
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
};
|
|
export function useListBoardsApiV1AgentBoardsGet<
|
|
TData = Awaited<ReturnType<typeof listBoardsApiV1AgentBoardsGet>>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
params?: ListBoardsApiV1AgentBoardsGetParams,
|
|
options?: {
|
|
query?: Partial<
|
|
UseQueryOptions<
|
|
Awaited<ReturnType<typeof listBoardsApiV1AgentBoardsGet>>,
|
|
TError,
|
|
TData
|
|
>
|
|
> &
|
|
Pick<
|
|
UndefinedInitialDataOptions<
|
|
Awaited<ReturnType<typeof listBoardsApiV1AgentBoardsGet>>,
|
|
TError,
|
|
Awaited<ReturnType<typeof listBoardsApiV1AgentBoardsGet>>
|
|
>,
|
|
"initialData"
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): UseQueryResult<TData, TError> & {
|
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
};
|
|
export function useListBoardsApiV1AgentBoardsGet<
|
|
TData = Awaited<ReturnType<typeof listBoardsApiV1AgentBoardsGet>>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
params?: ListBoardsApiV1AgentBoardsGetParams,
|
|
options?: {
|
|
query?: Partial<
|
|
UseQueryOptions<
|
|
Awaited<ReturnType<typeof listBoardsApiV1AgentBoardsGet>>,
|
|
TError,
|
|
TData
|
|
>
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): UseQueryResult<TData, TError> & {
|
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
};
|
|
/**
|
|
* @summary List Boards
|
|
*/
|
|
|
|
export function useListBoardsApiV1AgentBoardsGet<
|
|
TData = Awaited<ReturnType<typeof listBoardsApiV1AgentBoardsGet>>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
params?: ListBoardsApiV1AgentBoardsGetParams,
|
|
options?: {
|
|
query?: Partial<
|
|
UseQueryOptions<
|
|
Awaited<ReturnType<typeof listBoardsApiV1AgentBoardsGet>>,
|
|
TError,
|
|
TData
|
|
>
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): UseQueryResult<TData, TError> & {
|
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
} {
|
|
const queryOptions = getListBoardsApiV1AgentBoardsGetQueryOptions(
|
|
params,
|
|
options,
|
|
);
|
|
|
|
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
|
TData,
|
|
TError
|
|
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
|
|
return { ...query, queryKey: queryOptions.queryKey };
|
|
}
|
|
|
|
/**
|
|
* @summary Get Board
|
|
*/
|
|
export type getBoardApiV1AgentBoardsBoardIdGetResponse200 = {
|
|
data: BoardRead;
|
|
status: 200;
|
|
};
|
|
|
|
export type getBoardApiV1AgentBoardsBoardIdGetResponse422 = {
|
|
data: HTTPValidationError;
|
|
status: 422;
|
|
};
|
|
|
|
export type getBoardApiV1AgentBoardsBoardIdGetResponseSuccess =
|
|
getBoardApiV1AgentBoardsBoardIdGetResponse200 & {
|
|
headers: Headers;
|
|
};
|
|
export type getBoardApiV1AgentBoardsBoardIdGetResponseError =
|
|
getBoardApiV1AgentBoardsBoardIdGetResponse422 & {
|
|
headers: Headers;
|
|
};
|
|
|
|
export type getBoardApiV1AgentBoardsBoardIdGetResponse =
|
|
| getBoardApiV1AgentBoardsBoardIdGetResponseSuccess
|
|
| getBoardApiV1AgentBoardsBoardIdGetResponseError;
|
|
|
|
export const getGetBoardApiV1AgentBoardsBoardIdGetUrl = (boardId: string) => {
|
|
return `/api/v1/agent/boards/${boardId}`;
|
|
};
|
|
|
|
export const getBoardApiV1AgentBoardsBoardIdGet = async (
|
|
boardId: string,
|
|
options?: RequestInit,
|
|
): Promise<getBoardApiV1AgentBoardsBoardIdGetResponse> => {
|
|
return customFetch<getBoardApiV1AgentBoardsBoardIdGetResponse>(
|
|
getGetBoardApiV1AgentBoardsBoardIdGetUrl(boardId),
|
|
{
|
|
...options,
|
|
method: "GET",
|
|
},
|
|
);
|
|
};
|
|
|
|
export const getGetBoardApiV1AgentBoardsBoardIdGetQueryKey = (
|
|
boardId: string,
|
|
) => {
|
|
return [`/api/v1/agent/boards/${boardId}`] as const;
|
|
};
|
|
|
|
export const getGetBoardApiV1AgentBoardsBoardIdGetQueryOptions = <
|
|
TData = Awaited<ReturnType<typeof getBoardApiV1AgentBoardsBoardIdGet>>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
boardId: string,
|
|
options?: {
|
|
query?: Partial<
|
|
UseQueryOptions<
|
|
Awaited<ReturnType<typeof getBoardApiV1AgentBoardsBoardIdGet>>,
|
|
TError,
|
|
TData
|
|
>
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
) => {
|
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
|
|
const queryKey =
|
|
queryOptions?.queryKey ??
|
|
getGetBoardApiV1AgentBoardsBoardIdGetQueryKey(boardId);
|
|
|
|
const queryFn: QueryFunction<
|
|
Awaited<ReturnType<typeof getBoardApiV1AgentBoardsBoardIdGet>>
|
|
> = ({ signal }) =>
|
|
getBoardApiV1AgentBoardsBoardIdGet(boardId, { signal, ...requestOptions });
|
|
|
|
return {
|
|
queryKey,
|
|
queryFn,
|
|
enabled: !!boardId,
|
|
...queryOptions,
|
|
} as UseQueryOptions<
|
|
Awaited<ReturnType<typeof getBoardApiV1AgentBoardsBoardIdGet>>,
|
|
TError,
|
|
TData
|
|
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
};
|
|
|
|
export type GetBoardApiV1AgentBoardsBoardIdGetQueryResult = NonNullable<
|
|
Awaited<ReturnType<typeof getBoardApiV1AgentBoardsBoardIdGet>>
|
|
>;
|
|
export type GetBoardApiV1AgentBoardsBoardIdGetQueryError = HTTPValidationError;
|
|
|
|
export function useGetBoardApiV1AgentBoardsBoardIdGet<
|
|
TData = Awaited<ReturnType<typeof getBoardApiV1AgentBoardsBoardIdGet>>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
boardId: string,
|
|
options: {
|
|
query: Partial<
|
|
UseQueryOptions<
|
|
Awaited<ReturnType<typeof getBoardApiV1AgentBoardsBoardIdGet>>,
|
|
TError,
|
|
TData
|
|
>
|
|
> &
|
|
Pick<
|
|
DefinedInitialDataOptions<
|
|
Awaited<ReturnType<typeof getBoardApiV1AgentBoardsBoardIdGet>>,
|
|
TError,
|
|
Awaited<ReturnType<typeof getBoardApiV1AgentBoardsBoardIdGet>>
|
|
>,
|
|
"initialData"
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): DefinedUseQueryResult<TData, TError> & {
|
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
};
|
|
export function useGetBoardApiV1AgentBoardsBoardIdGet<
|
|
TData = Awaited<ReturnType<typeof getBoardApiV1AgentBoardsBoardIdGet>>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
boardId: string,
|
|
options?: {
|
|
query?: Partial<
|
|
UseQueryOptions<
|
|
Awaited<ReturnType<typeof getBoardApiV1AgentBoardsBoardIdGet>>,
|
|
TError,
|
|
TData
|
|
>
|
|
> &
|
|
Pick<
|
|
UndefinedInitialDataOptions<
|
|
Awaited<ReturnType<typeof getBoardApiV1AgentBoardsBoardIdGet>>,
|
|
TError,
|
|
Awaited<ReturnType<typeof getBoardApiV1AgentBoardsBoardIdGet>>
|
|
>,
|
|
"initialData"
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): UseQueryResult<TData, TError> & {
|
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
};
|
|
export function useGetBoardApiV1AgentBoardsBoardIdGet<
|
|
TData = Awaited<ReturnType<typeof getBoardApiV1AgentBoardsBoardIdGet>>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
boardId: string,
|
|
options?: {
|
|
query?: Partial<
|
|
UseQueryOptions<
|
|
Awaited<ReturnType<typeof getBoardApiV1AgentBoardsBoardIdGet>>,
|
|
TError,
|
|
TData
|
|
>
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): UseQueryResult<TData, TError> & {
|
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
};
|
|
/**
|
|
* @summary Get Board
|
|
*/
|
|
|
|
export function useGetBoardApiV1AgentBoardsBoardIdGet<
|
|
TData = Awaited<ReturnType<typeof getBoardApiV1AgentBoardsBoardIdGet>>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
boardId: string,
|
|
options?: {
|
|
query?: Partial<
|
|
UseQueryOptions<
|
|
Awaited<ReturnType<typeof getBoardApiV1AgentBoardsBoardIdGet>>,
|
|
TError,
|
|
TData
|
|
>
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): UseQueryResult<TData, TError> & {
|
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
} {
|
|
const queryOptions = getGetBoardApiV1AgentBoardsBoardIdGetQueryOptions(
|
|
boardId,
|
|
options,
|
|
);
|
|
|
|
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
|
TData,
|
|
TError
|
|
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
|
|
return { ...query, queryKey: queryOptions.queryKey };
|
|
}
|
|
|
|
/**
|
|
* @summary Nudge Agent
|
|
*/
|
|
export type nudgeAgentApiV1AgentBoardsBoardIdAgentsAgentIdNudgePostResponse200 =
|
|
{
|
|
data: OkResponse;
|
|
status: 200;
|
|
};
|
|
|
|
export type nudgeAgentApiV1AgentBoardsBoardIdAgentsAgentIdNudgePostResponse422 =
|
|
{
|
|
data: HTTPValidationError;
|
|
status: 422;
|
|
};
|
|
|
|
export type nudgeAgentApiV1AgentBoardsBoardIdAgentsAgentIdNudgePostResponseSuccess =
|
|
nudgeAgentApiV1AgentBoardsBoardIdAgentsAgentIdNudgePostResponse200 & {
|
|
headers: Headers;
|
|
};
|
|
export type nudgeAgentApiV1AgentBoardsBoardIdAgentsAgentIdNudgePostResponseError =
|
|
nudgeAgentApiV1AgentBoardsBoardIdAgentsAgentIdNudgePostResponse422 & {
|
|
headers: Headers;
|
|
};
|
|
|
|
export type nudgeAgentApiV1AgentBoardsBoardIdAgentsAgentIdNudgePostResponse =
|
|
| nudgeAgentApiV1AgentBoardsBoardIdAgentsAgentIdNudgePostResponseSuccess
|
|
| nudgeAgentApiV1AgentBoardsBoardIdAgentsAgentIdNudgePostResponseError;
|
|
|
|
export const getNudgeAgentApiV1AgentBoardsBoardIdAgentsAgentIdNudgePostUrl = (
|
|
boardId: string,
|
|
agentId: string,
|
|
) => {
|
|
return `/api/v1/agent/boards/${boardId}/agents/${agentId}/nudge`;
|
|
};
|
|
|
|
export const nudgeAgentApiV1AgentBoardsBoardIdAgentsAgentIdNudgePost = async (
|
|
boardId: string,
|
|
agentId: string,
|
|
agentNudge: AgentNudge,
|
|
options?: RequestInit,
|
|
): Promise<nudgeAgentApiV1AgentBoardsBoardIdAgentsAgentIdNudgePostResponse> => {
|
|
return customFetch<nudgeAgentApiV1AgentBoardsBoardIdAgentsAgentIdNudgePostResponse>(
|
|
getNudgeAgentApiV1AgentBoardsBoardIdAgentsAgentIdNudgePostUrl(
|
|
boardId,
|
|
agentId,
|
|
),
|
|
{
|
|
...options,
|
|
method: "POST",
|
|
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
body: JSON.stringify(agentNudge),
|
|
},
|
|
);
|
|
};
|
|
|
|
export const getNudgeAgentApiV1AgentBoardsBoardIdAgentsAgentIdNudgePostMutationOptions =
|
|
<TError = HTTPValidationError, TContext = unknown>(options?: {
|
|
mutation?: UseMutationOptions<
|
|
Awaited<
|
|
ReturnType<
|
|
typeof nudgeAgentApiV1AgentBoardsBoardIdAgentsAgentIdNudgePost
|
|
>
|
|
>,
|
|
TError,
|
|
{ boardId: string; agentId: string; data: AgentNudge },
|
|
TContext
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
}): UseMutationOptions<
|
|
Awaited<
|
|
ReturnType<typeof nudgeAgentApiV1AgentBoardsBoardIdAgentsAgentIdNudgePost>
|
|
>,
|
|
TError,
|
|
{ boardId: string; agentId: string; data: AgentNudge },
|
|
TContext
|
|
> => {
|
|
const mutationKey = [
|
|
"nudgeAgentApiV1AgentBoardsBoardIdAgentsAgentIdNudgePost",
|
|
];
|
|
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 nudgeAgentApiV1AgentBoardsBoardIdAgentsAgentIdNudgePost
|
|
>
|
|
>,
|
|
{ boardId: string; agentId: string; data: AgentNudge }
|
|
> = (props) => {
|
|
const { boardId, agentId, data } = props ?? {};
|
|
|
|
return nudgeAgentApiV1AgentBoardsBoardIdAgentsAgentIdNudgePost(
|
|
boardId,
|
|
agentId,
|
|
data,
|
|
requestOptions,
|
|
);
|
|
};
|
|
|
|
return { mutationFn, ...mutationOptions };
|
|
};
|
|
|
|
export type NudgeAgentApiV1AgentBoardsBoardIdAgentsAgentIdNudgePostMutationResult =
|
|
NonNullable<
|
|
Awaited<
|
|
ReturnType<typeof nudgeAgentApiV1AgentBoardsBoardIdAgentsAgentIdNudgePost>
|
|
>
|
|
>;
|
|
export type NudgeAgentApiV1AgentBoardsBoardIdAgentsAgentIdNudgePostMutationBody =
|
|
AgentNudge;
|
|
export type NudgeAgentApiV1AgentBoardsBoardIdAgentsAgentIdNudgePostMutationError =
|
|
HTTPValidationError;
|
|
|
|
/**
|
|
* @summary Nudge Agent
|
|
*/
|
|
export const useNudgeAgentApiV1AgentBoardsBoardIdAgentsAgentIdNudgePost = <
|
|
TError = HTTPValidationError,
|
|
TContext = unknown,
|
|
>(
|
|
options?: {
|
|
mutation?: UseMutationOptions<
|
|
Awaited<
|
|
ReturnType<
|
|
typeof nudgeAgentApiV1AgentBoardsBoardIdAgentsAgentIdNudgePost
|
|
>
|
|
>,
|
|
TError,
|
|
{ boardId: string; agentId: string; data: AgentNudge },
|
|
TContext
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): UseMutationResult<
|
|
Awaited<
|
|
ReturnType<typeof nudgeAgentApiV1AgentBoardsBoardIdAgentsAgentIdNudgePost>
|
|
>,
|
|
TError,
|
|
{ boardId: string; agentId: string; data: AgentNudge },
|
|
TContext
|
|
> => {
|
|
return useMutation(
|
|
getNudgeAgentApiV1AgentBoardsBoardIdAgentsAgentIdNudgePostMutationOptions(
|
|
options,
|
|
),
|
|
queryClient,
|
|
);
|
|
};
|
|
/**
|
|
* @summary List Approvals
|
|
*/
|
|
export type listApprovalsApiV1AgentBoardsBoardIdApprovalsGetResponse200 = {
|
|
data: LimitOffsetPageTypeVarCustomizedApprovalRead;
|
|
status: 200;
|
|
};
|
|
|
|
export type listApprovalsApiV1AgentBoardsBoardIdApprovalsGetResponse422 = {
|
|
data: HTTPValidationError;
|
|
status: 422;
|
|
};
|
|
|
|
export type listApprovalsApiV1AgentBoardsBoardIdApprovalsGetResponseSuccess =
|
|
listApprovalsApiV1AgentBoardsBoardIdApprovalsGetResponse200 & {
|
|
headers: Headers;
|
|
};
|
|
export type listApprovalsApiV1AgentBoardsBoardIdApprovalsGetResponseError =
|
|
listApprovalsApiV1AgentBoardsBoardIdApprovalsGetResponse422 & {
|
|
headers: Headers;
|
|
};
|
|
|
|
export type listApprovalsApiV1AgentBoardsBoardIdApprovalsGetResponse =
|
|
| listApprovalsApiV1AgentBoardsBoardIdApprovalsGetResponseSuccess
|
|
| listApprovalsApiV1AgentBoardsBoardIdApprovalsGetResponseError;
|
|
|
|
export const getListApprovalsApiV1AgentBoardsBoardIdApprovalsGetUrl = (
|
|
boardId: string,
|
|
params?: ListApprovalsApiV1AgentBoardsBoardIdApprovalsGetParams,
|
|
) => {
|
|
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/agent/boards/${boardId}/approvals?${stringifiedParams}`
|
|
: `/api/v1/agent/boards/${boardId}/approvals`;
|
|
};
|
|
|
|
export const listApprovalsApiV1AgentBoardsBoardIdApprovalsGet = async (
|
|
boardId: string,
|
|
params?: ListApprovalsApiV1AgentBoardsBoardIdApprovalsGetParams,
|
|
options?: RequestInit,
|
|
): Promise<listApprovalsApiV1AgentBoardsBoardIdApprovalsGetResponse> => {
|
|
return customFetch<listApprovalsApiV1AgentBoardsBoardIdApprovalsGetResponse>(
|
|
getListApprovalsApiV1AgentBoardsBoardIdApprovalsGetUrl(boardId, params),
|
|
{
|
|
...options,
|
|
method: "GET",
|
|
},
|
|
);
|
|
};
|
|
|
|
export const getListApprovalsApiV1AgentBoardsBoardIdApprovalsGetQueryKey = (
|
|
boardId: string,
|
|
params?: ListApprovalsApiV1AgentBoardsBoardIdApprovalsGetParams,
|
|
) => {
|
|
return [
|
|
`/api/v1/agent/boards/${boardId}/approvals`,
|
|
...(params ? [params] : []),
|
|
] as const;
|
|
};
|
|
|
|
export const getListApprovalsApiV1AgentBoardsBoardIdApprovalsGetQueryOptions = <
|
|
TData = Awaited<
|
|
ReturnType<typeof listApprovalsApiV1AgentBoardsBoardIdApprovalsGet>
|
|
>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
boardId: string,
|
|
params?: ListApprovalsApiV1AgentBoardsBoardIdApprovalsGetParams,
|
|
options?: {
|
|
query?: Partial<
|
|
UseQueryOptions<
|
|
Awaited<
|
|
ReturnType<typeof listApprovalsApiV1AgentBoardsBoardIdApprovalsGet>
|
|
>,
|
|
TError,
|
|
TData
|
|
>
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
) => {
|
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
|
|
const queryKey =
|
|
queryOptions?.queryKey ??
|
|
getListApprovalsApiV1AgentBoardsBoardIdApprovalsGetQueryKey(
|
|
boardId,
|
|
params,
|
|
);
|
|
|
|
const queryFn: QueryFunction<
|
|
Awaited<ReturnType<typeof listApprovalsApiV1AgentBoardsBoardIdApprovalsGet>>
|
|
> = ({ signal }) =>
|
|
listApprovalsApiV1AgentBoardsBoardIdApprovalsGet(boardId, params, {
|
|
signal,
|
|
...requestOptions,
|
|
});
|
|
|
|
return {
|
|
queryKey,
|
|
queryFn,
|
|
enabled: !!boardId,
|
|
...queryOptions,
|
|
} as UseQueryOptions<
|
|
Awaited<
|
|
ReturnType<typeof listApprovalsApiV1AgentBoardsBoardIdApprovalsGet>
|
|
>,
|
|
TError,
|
|
TData
|
|
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
};
|
|
|
|
export type ListApprovalsApiV1AgentBoardsBoardIdApprovalsGetQueryResult =
|
|
NonNullable<
|
|
Awaited<ReturnType<typeof listApprovalsApiV1AgentBoardsBoardIdApprovalsGet>>
|
|
>;
|
|
export type ListApprovalsApiV1AgentBoardsBoardIdApprovalsGetQueryError =
|
|
HTTPValidationError;
|
|
|
|
export function useListApprovalsApiV1AgentBoardsBoardIdApprovalsGet<
|
|
TData = Awaited<
|
|
ReturnType<typeof listApprovalsApiV1AgentBoardsBoardIdApprovalsGet>
|
|
>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
boardId: string,
|
|
params: undefined | ListApprovalsApiV1AgentBoardsBoardIdApprovalsGetParams,
|
|
options: {
|
|
query: Partial<
|
|
UseQueryOptions<
|
|
Awaited<
|
|
ReturnType<typeof listApprovalsApiV1AgentBoardsBoardIdApprovalsGet>
|
|
>,
|
|
TError,
|
|
TData
|
|
>
|
|
> &
|
|
Pick<
|
|
DefinedInitialDataOptions<
|
|
Awaited<
|
|
ReturnType<typeof listApprovalsApiV1AgentBoardsBoardIdApprovalsGet>
|
|
>,
|
|
TError,
|
|
Awaited<
|
|
ReturnType<typeof listApprovalsApiV1AgentBoardsBoardIdApprovalsGet>
|
|
>
|
|
>,
|
|
"initialData"
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): DefinedUseQueryResult<TData, TError> & {
|
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
};
|
|
export function useListApprovalsApiV1AgentBoardsBoardIdApprovalsGet<
|
|
TData = Awaited<
|
|
ReturnType<typeof listApprovalsApiV1AgentBoardsBoardIdApprovalsGet>
|
|
>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
boardId: string,
|
|
params?: ListApprovalsApiV1AgentBoardsBoardIdApprovalsGetParams,
|
|
options?: {
|
|
query?: Partial<
|
|
UseQueryOptions<
|
|
Awaited<
|
|
ReturnType<typeof listApprovalsApiV1AgentBoardsBoardIdApprovalsGet>
|
|
>,
|
|
TError,
|
|
TData
|
|
>
|
|
> &
|
|
Pick<
|
|
UndefinedInitialDataOptions<
|
|
Awaited<
|
|
ReturnType<typeof listApprovalsApiV1AgentBoardsBoardIdApprovalsGet>
|
|
>,
|
|
TError,
|
|
Awaited<
|
|
ReturnType<typeof listApprovalsApiV1AgentBoardsBoardIdApprovalsGet>
|
|
>
|
|
>,
|
|
"initialData"
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): UseQueryResult<TData, TError> & {
|
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
};
|
|
export function useListApprovalsApiV1AgentBoardsBoardIdApprovalsGet<
|
|
TData = Awaited<
|
|
ReturnType<typeof listApprovalsApiV1AgentBoardsBoardIdApprovalsGet>
|
|
>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
boardId: string,
|
|
params?: ListApprovalsApiV1AgentBoardsBoardIdApprovalsGetParams,
|
|
options?: {
|
|
query?: Partial<
|
|
UseQueryOptions<
|
|
Awaited<
|
|
ReturnType<typeof listApprovalsApiV1AgentBoardsBoardIdApprovalsGet>
|
|
>,
|
|
TError,
|
|
TData
|
|
>
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): UseQueryResult<TData, TError> & {
|
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
};
|
|
/**
|
|
* @summary List Approvals
|
|
*/
|
|
|
|
export function useListApprovalsApiV1AgentBoardsBoardIdApprovalsGet<
|
|
TData = Awaited<
|
|
ReturnType<typeof listApprovalsApiV1AgentBoardsBoardIdApprovalsGet>
|
|
>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
boardId: string,
|
|
params?: ListApprovalsApiV1AgentBoardsBoardIdApprovalsGetParams,
|
|
options?: {
|
|
query?: Partial<
|
|
UseQueryOptions<
|
|
Awaited<
|
|
ReturnType<typeof listApprovalsApiV1AgentBoardsBoardIdApprovalsGet>
|
|
>,
|
|
TError,
|
|
TData
|
|
>
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): UseQueryResult<TData, TError> & {
|
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
} {
|
|
const queryOptions =
|
|
getListApprovalsApiV1AgentBoardsBoardIdApprovalsGetQueryOptions(
|
|
boardId,
|
|
params,
|
|
options,
|
|
);
|
|
|
|
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
|
TData,
|
|
TError
|
|
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
|
|
return { ...query, queryKey: queryOptions.queryKey };
|
|
}
|
|
|
|
/**
|
|
* @summary Create Approval
|
|
*/
|
|
export type createApprovalApiV1AgentBoardsBoardIdApprovalsPostResponse200 = {
|
|
data: ApprovalRead;
|
|
status: 200;
|
|
};
|
|
|
|
export type createApprovalApiV1AgentBoardsBoardIdApprovalsPostResponse422 = {
|
|
data: HTTPValidationError;
|
|
status: 422;
|
|
};
|
|
|
|
export type createApprovalApiV1AgentBoardsBoardIdApprovalsPostResponseSuccess =
|
|
createApprovalApiV1AgentBoardsBoardIdApprovalsPostResponse200 & {
|
|
headers: Headers;
|
|
};
|
|
export type createApprovalApiV1AgentBoardsBoardIdApprovalsPostResponseError =
|
|
createApprovalApiV1AgentBoardsBoardIdApprovalsPostResponse422 & {
|
|
headers: Headers;
|
|
};
|
|
|
|
export type createApprovalApiV1AgentBoardsBoardIdApprovalsPostResponse =
|
|
| createApprovalApiV1AgentBoardsBoardIdApprovalsPostResponseSuccess
|
|
| createApprovalApiV1AgentBoardsBoardIdApprovalsPostResponseError;
|
|
|
|
export const getCreateApprovalApiV1AgentBoardsBoardIdApprovalsPostUrl = (
|
|
boardId: string,
|
|
) => {
|
|
return `/api/v1/agent/boards/${boardId}/approvals`;
|
|
};
|
|
|
|
export const createApprovalApiV1AgentBoardsBoardIdApprovalsPost = async (
|
|
boardId: string,
|
|
approvalCreate: ApprovalCreate,
|
|
options?: RequestInit,
|
|
): Promise<createApprovalApiV1AgentBoardsBoardIdApprovalsPostResponse> => {
|
|
return customFetch<createApprovalApiV1AgentBoardsBoardIdApprovalsPostResponse>(
|
|
getCreateApprovalApiV1AgentBoardsBoardIdApprovalsPostUrl(boardId),
|
|
{
|
|
...options,
|
|
method: "POST",
|
|
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
body: JSON.stringify(approvalCreate),
|
|
},
|
|
);
|
|
};
|
|
|
|
export const getCreateApprovalApiV1AgentBoardsBoardIdApprovalsPostMutationOptions =
|
|
<TError = HTTPValidationError, TContext = unknown>(options?: {
|
|
mutation?: UseMutationOptions<
|
|
Awaited<
|
|
ReturnType<typeof createApprovalApiV1AgentBoardsBoardIdApprovalsPost>
|
|
>,
|
|
TError,
|
|
{ boardId: string; data: ApprovalCreate },
|
|
TContext
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
}): UseMutationOptions<
|
|
Awaited<
|
|
ReturnType<typeof createApprovalApiV1AgentBoardsBoardIdApprovalsPost>
|
|
>,
|
|
TError,
|
|
{ boardId: string; data: ApprovalCreate },
|
|
TContext
|
|
> => {
|
|
const mutationKey = ["createApprovalApiV1AgentBoardsBoardIdApprovalsPost"];
|
|
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 createApprovalApiV1AgentBoardsBoardIdApprovalsPost>
|
|
>,
|
|
{ boardId: string; data: ApprovalCreate }
|
|
> = (props) => {
|
|
const { boardId, data } = props ?? {};
|
|
|
|
return createApprovalApiV1AgentBoardsBoardIdApprovalsPost(
|
|
boardId,
|
|
data,
|
|
requestOptions,
|
|
);
|
|
};
|
|
|
|
return { mutationFn, ...mutationOptions };
|
|
};
|
|
|
|
export type CreateApprovalApiV1AgentBoardsBoardIdApprovalsPostMutationResult =
|
|
NonNullable<
|
|
Awaited<
|
|
ReturnType<typeof createApprovalApiV1AgentBoardsBoardIdApprovalsPost>
|
|
>
|
|
>;
|
|
export type CreateApprovalApiV1AgentBoardsBoardIdApprovalsPostMutationBody =
|
|
ApprovalCreate;
|
|
export type CreateApprovalApiV1AgentBoardsBoardIdApprovalsPostMutationError =
|
|
HTTPValidationError;
|
|
|
|
/**
|
|
* @summary Create Approval
|
|
*/
|
|
export const useCreateApprovalApiV1AgentBoardsBoardIdApprovalsPost = <
|
|
TError = HTTPValidationError,
|
|
TContext = unknown,
|
|
>(
|
|
options?: {
|
|
mutation?: UseMutationOptions<
|
|
Awaited<
|
|
ReturnType<typeof createApprovalApiV1AgentBoardsBoardIdApprovalsPost>
|
|
>,
|
|
TError,
|
|
{ boardId: string; data: ApprovalCreate },
|
|
TContext
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): UseMutationResult<
|
|
Awaited<
|
|
ReturnType<typeof createApprovalApiV1AgentBoardsBoardIdApprovalsPost>
|
|
>,
|
|
TError,
|
|
{ boardId: string; data: ApprovalCreate },
|
|
TContext
|
|
> => {
|
|
return useMutation(
|
|
getCreateApprovalApiV1AgentBoardsBoardIdApprovalsPostMutationOptions(
|
|
options,
|
|
),
|
|
queryClient,
|
|
);
|
|
};
|
|
/**
|
|
* @summary List Board Memory
|
|
*/
|
|
export type listBoardMemoryApiV1AgentBoardsBoardIdMemoryGetResponse200 = {
|
|
data: LimitOffsetPageTypeVarCustomizedBoardMemoryRead;
|
|
status: 200;
|
|
};
|
|
|
|
export type listBoardMemoryApiV1AgentBoardsBoardIdMemoryGetResponse422 = {
|
|
data: HTTPValidationError;
|
|
status: 422;
|
|
};
|
|
|
|
export type listBoardMemoryApiV1AgentBoardsBoardIdMemoryGetResponseSuccess =
|
|
listBoardMemoryApiV1AgentBoardsBoardIdMemoryGetResponse200 & {
|
|
headers: Headers;
|
|
};
|
|
export type listBoardMemoryApiV1AgentBoardsBoardIdMemoryGetResponseError =
|
|
listBoardMemoryApiV1AgentBoardsBoardIdMemoryGetResponse422 & {
|
|
headers: Headers;
|
|
};
|
|
|
|
export type listBoardMemoryApiV1AgentBoardsBoardIdMemoryGetResponse =
|
|
| listBoardMemoryApiV1AgentBoardsBoardIdMemoryGetResponseSuccess
|
|
| listBoardMemoryApiV1AgentBoardsBoardIdMemoryGetResponseError;
|
|
|
|
export const getListBoardMemoryApiV1AgentBoardsBoardIdMemoryGetUrl = (
|
|
boardId: string,
|
|
params?: ListBoardMemoryApiV1AgentBoardsBoardIdMemoryGetParams,
|
|
) => {
|
|
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/agent/boards/${boardId}/memory?${stringifiedParams}`
|
|
: `/api/v1/agent/boards/${boardId}/memory`;
|
|
};
|
|
|
|
export const listBoardMemoryApiV1AgentBoardsBoardIdMemoryGet = async (
|
|
boardId: string,
|
|
params?: ListBoardMemoryApiV1AgentBoardsBoardIdMemoryGetParams,
|
|
options?: RequestInit,
|
|
): Promise<listBoardMemoryApiV1AgentBoardsBoardIdMemoryGetResponse> => {
|
|
return customFetch<listBoardMemoryApiV1AgentBoardsBoardIdMemoryGetResponse>(
|
|
getListBoardMemoryApiV1AgentBoardsBoardIdMemoryGetUrl(boardId, params),
|
|
{
|
|
...options,
|
|
method: "GET",
|
|
},
|
|
);
|
|
};
|
|
|
|
export const getListBoardMemoryApiV1AgentBoardsBoardIdMemoryGetQueryKey = (
|
|
boardId: string,
|
|
params?: ListBoardMemoryApiV1AgentBoardsBoardIdMemoryGetParams,
|
|
) => {
|
|
return [
|
|
`/api/v1/agent/boards/${boardId}/memory`,
|
|
...(params ? [params] : []),
|
|
] as const;
|
|
};
|
|
|
|
export const getListBoardMemoryApiV1AgentBoardsBoardIdMemoryGetQueryOptions = <
|
|
TData = Awaited<
|
|
ReturnType<typeof listBoardMemoryApiV1AgentBoardsBoardIdMemoryGet>
|
|
>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
boardId: string,
|
|
params?: ListBoardMemoryApiV1AgentBoardsBoardIdMemoryGetParams,
|
|
options?: {
|
|
query?: Partial<
|
|
UseQueryOptions<
|
|
Awaited<
|
|
ReturnType<typeof listBoardMemoryApiV1AgentBoardsBoardIdMemoryGet>
|
|
>,
|
|
TError,
|
|
TData
|
|
>
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
) => {
|
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
|
|
const queryKey =
|
|
queryOptions?.queryKey ??
|
|
getListBoardMemoryApiV1AgentBoardsBoardIdMemoryGetQueryKey(boardId, params);
|
|
|
|
const queryFn: QueryFunction<
|
|
Awaited<ReturnType<typeof listBoardMemoryApiV1AgentBoardsBoardIdMemoryGet>>
|
|
> = ({ signal }) =>
|
|
listBoardMemoryApiV1AgentBoardsBoardIdMemoryGet(boardId, params, {
|
|
signal,
|
|
...requestOptions,
|
|
});
|
|
|
|
return {
|
|
queryKey,
|
|
queryFn,
|
|
enabled: !!boardId,
|
|
...queryOptions,
|
|
} as UseQueryOptions<
|
|
Awaited<ReturnType<typeof listBoardMemoryApiV1AgentBoardsBoardIdMemoryGet>>,
|
|
TError,
|
|
TData
|
|
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
};
|
|
|
|
export type ListBoardMemoryApiV1AgentBoardsBoardIdMemoryGetQueryResult =
|
|
NonNullable<
|
|
Awaited<ReturnType<typeof listBoardMemoryApiV1AgentBoardsBoardIdMemoryGet>>
|
|
>;
|
|
export type ListBoardMemoryApiV1AgentBoardsBoardIdMemoryGetQueryError =
|
|
HTTPValidationError;
|
|
|
|
export function useListBoardMemoryApiV1AgentBoardsBoardIdMemoryGet<
|
|
TData = Awaited<
|
|
ReturnType<typeof listBoardMemoryApiV1AgentBoardsBoardIdMemoryGet>
|
|
>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
boardId: string,
|
|
params: undefined | ListBoardMemoryApiV1AgentBoardsBoardIdMemoryGetParams,
|
|
options: {
|
|
query: Partial<
|
|
UseQueryOptions<
|
|
Awaited<
|
|
ReturnType<typeof listBoardMemoryApiV1AgentBoardsBoardIdMemoryGet>
|
|
>,
|
|
TError,
|
|
TData
|
|
>
|
|
> &
|
|
Pick<
|
|
DefinedInitialDataOptions<
|
|
Awaited<
|
|
ReturnType<typeof listBoardMemoryApiV1AgentBoardsBoardIdMemoryGet>
|
|
>,
|
|
TError,
|
|
Awaited<
|
|
ReturnType<typeof listBoardMemoryApiV1AgentBoardsBoardIdMemoryGet>
|
|
>
|
|
>,
|
|
"initialData"
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): DefinedUseQueryResult<TData, TError> & {
|
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
};
|
|
export function useListBoardMemoryApiV1AgentBoardsBoardIdMemoryGet<
|
|
TData = Awaited<
|
|
ReturnType<typeof listBoardMemoryApiV1AgentBoardsBoardIdMemoryGet>
|
|
>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
boardId: string,
|
|
params?: ListBoardMemoryApiV1AgentBoardsBoardIdMemoryGetParams,
|
|
options?: {
|
|
query?: Partial<
|
|
UseQueryOptions<
|
|
Awaited<
|
|
ReturnType<typeof listBoardMemoryApiV1AgentBoardsBoardIdMemoryGet>
|
|
>,
|
|
TError,
|
|
TData
|
|
>
|
|
> &
|
|
Pick<
|
|
UndefinedInitialDataOptions<
|
|
Awaited<
|
|
ReturnType<typeof listBoardMemoryApiV1AgentBoardsBoardIdMemoryGet>
|
|
>,
|
|
TError,
|
|
Awaited<
|
|
ReturnType<typeof listBoardMemoryApiV1AgentBoardsBoardIdMemoryGet>
|
|
>
|
|
>,
|
|
"initialData"
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): UseQueryResult<TData, TError> & {
|
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
};
|
|
export function useListBoardMemoryApiV1AgentBoardsBoardIdMemoryGet<
|
|
TData = Awaited<
|
|
ReturnType<typeof listBoardMemoryApiV1AgentBoardsBoardIdMemoryGet>
|
|
>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
boardId: string,
|
|
params?: ListBoardMemoryApiV1AgentBoardsBoardIdMemoryGetParams,
|
|
options?: {
|
|
query?: Partial<
|
|
UseQueryOptions<
|
|
Awaited<
|
|
ReturnType<typeof listBoardMemoryApiV1AgentBoardsBoardIdMemoryGet>
|
|
>,
|
|
TError,
|
|
TData
|
|
>
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): UseQueryResult<TData, TError> & {
|
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
};
|
|
/**
|
|
* @summary List Board Memory
|
|
*/
|
|
|
|
export function useListBoardMemoryApiV1AgentBoardsBoardIdMemoryGet<
|
|
TData = Awaited<
|
|
ReturnType<typeof listBoardMemoryApiV1AgentBoardsBoardIdMemoryGet>
|
|
>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
boardId: string,
|
|
params?: ListBoardMemoryApiV1AgentBoardsBoardIdMemoryGetParams,
|
|
options?: {
|
|
query?: Partial<
|
|
UseQueryOptions<
|
|
Awaited<
|
|
ReturnType<typeof listBoardMemoryApiV1AgentBoardsBoardIdMemoryGet>
|
|
>,
|
|
TError,
|
|
TData
|
|
>
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): UseQueryResult<TData, TError> & {
|
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
} {
|
|
const queryOptions =
|
|
getListBoardMemoryApiV1AgentBoardsBoardIdMemoryGetQueryOptions(
|
|
boardId,
|
|
params,
|
|
options,
|
|
);
|
|
|
|
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
|
TData,
|
|
TError
|
|
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
|
|
return { ...query, queryKey: queryOptions.queryKey };
|
|
}
|
|
|
|
/**
|
|
* @summary Create Board Memory
|
|
*/
|
|
export type createBoardMemoryApiV1AgentBoardsBoardIdMemoryPostResponse200 = {
|
|
data: BoardMemoryRead;
|
|
status: 200;
|
|
};
|
|
|
|
export type createBoardMemoryApiV1AgentBoardsBoardIdMemoryPostResponse422 = {
|
|
data: HTTPValidationError;
|
|
status: 422;
|
|
};
|
|
|
|
export type createBoardMemoryApiV1AgentBoardsBoardIdMemoryPostResponseSuccess =
|
|
createBoardMemoryApiV1AgentBoardsBoardIdMemoryPostResponse200 & {
|
|
headers: Headers;
|
|
};
|
|
export type createBoardMemoryApiV1AgentBoardsBoardIdMemoryPostResponseError =
|
|
createBoardMemoryApiV1AgentBoardsBoardIdMemoryPostResponse422 & {
|
|
headers: Headers;
|
|
};
|
|
|
|
export type createBoardMemoryApiV1AgentBoardsBoardIdMemoryPostResponse =
|
|
| createBoardMemoryApiV1AgentBoardsBoardIdMemoryPostResponseSuccess
|
|
| createBoardMemoryApiV1AgentBoardsBoardIdMemoryPostResponseError;
|
|
|
|
export const getCreateBoardMemoryApiV1AgentBoardsBoardIdMemoryPostUrl = (
|
|
boardId: string,
|
|
) => {
|
|
return `/api/v1/agent/boards/${boardId}/memory`;
|
|
};
|
|
|
|
export const createBoardMemoryApiV1AgentBoardsBoardIdMemoryPost = async (
|
|
boardId: string,
|
|
boardMemoryCreate: BoardMemoryCreate,
|
|
options?: RequestInit,
|
|
): Promise<createBoardMemoryApiV1AgentBoardsBoardIdMemoryPostResponse> => {
|
|
return customFetch<createBoardMemoryApiV1AgentBoardsBoardIdMemoryPostResponse>(
|
|
getCreateBoardMemoryApiV1AgentBoardsBoardIdMemoryPostUrl(boardId),
|
|
{
|
|
...options,
|
|
method: "POST",
|
|
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
body: JSON.stringify(boardMemoryCreate),
|
|
},
|
|
);
|
|
};
|
|
|
|
export const getCreateBoardMemoryApiV1AgentBoardsBoardIdMemoryPostMutationOptions =
|
|
<TError = HTTPValidationError, TContext = unknown>(options?: {
|
|
mutation?: UseMutationOptions<
|
|
Awaited<
|
|
ReturnType<typeof createBoardMemoryApiV1AgentBoardsBoardIdMemoryPost>
|
|
>,
|
|
TError,
|
|
{ boardId: string; data: BoardMemoryCreate },
|
|
TContext
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
}): UseMutationOptions<
|
|
Awaited<
|
|
ReturnType<typeof createBoardMemoryApiV1AgentBoardsBoardIdMemoryPost>
|
|
>,
|
|
TError,
|
|
{ boardId: string; data: BoardMemoryCreate },
|
|
TContext
|
|
> => {
|
|
const mutationKey = ["createBoardMemoryApiV1AgentBoardsBoardIdMemoryPost"];
|
|
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 createBoardMemoryApiV1AgentBoardsBoardIdMemoryPost>
|
|
>,
|
|
{ boardId: string; data: BoardMemoryCreate }
|
|
> = (props) => {
|
|
const { boardId, data } = props ?? {};
|
|
|
|
return createBoardMemoryApiV1AgentBoardsBoardIdMemoryPost(
|
|
boardId,
|
|
data,
|
|
requestOptions,
|
|
);
|
|
};
|
|
|
|
return { mutationFn, ...mutationOptions };
|
|
};
|
|
|
|
export type CreateBoardMemoryApiV1AgentBoardsBoardIdMemoryPostMutationResult =
|
|
NonNullable<
|
|
Awaited<
|
|
ReturnType<typeof createBoardMemoryApiV1AgentBoardsBoardIdMemoryPost>
|
|
>
|
|
>;
|
|
export type CreateBoardMemoryApiV1AgentBoardsBoardIdMemoryPostMutationBody =
|
|
BoardMemoryCreate;
|
|
export type CreateBoardMemoryApiV1AgentBoardsBoardIdMemoryPostMutationError =
|
|
HTTPValidationError;
|
|
|
|
/**
|
|
* @summary Create Board Memory
|
|
*/
|
|
export const useCreateBoardMemoryApiV1AgentBoardsBoardIdMemoryPost = <
|
|
TError = HTTPValidationError,
|
|
TContext = unknown,
|
|
>(
|
|
options?: {
|
|
mutation?: UseMutationOptions<
|
|
Awaited<
|
|
ReturnType<typeof createBoardMemoryApiV1AgentBoardsBoardIdMemoryPost>
|
|
>,
|
|
TError,
|
|
{ boardId: string; data: BoardMemoryCreate },
|
|
TContext
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): UseMutationResult<
|
|
Awaited<
|
|
ReturnType<typeof createBoardMemoryApiV1AgentBoardsBoardIdMemoryPost>
|
|
>,
|
|
TError,
|
|
{ boardId: string; data: BoardMemoryCreate },
|
|
TContext
|
|
> => {
|
|
return useMutation(
|
|
getCreateBoardMemoryApiV1AgentBoardsBoardIdMemoryPostMutationOptions(
|
|
options,
|
|
),
|
|
queryClient,
|
|
);
|
|
};
|
|
/**
|
|
* @summary Update Onboarding
|
|
*/
|
|
export type updateOnboardingApiV1AgentBoardsBoardIdOnboardingPostResponse200 = {
|
|
data: BoardOnboardingRead;
|
|
status: 200;
|
|
};
|
|
|
|
export type updateOnboardingApiV1AgentBoardsBoardIdOnboardingPostResponse422 = {
|
|
data: HTTPValidationError;
|
|
status: 422;
|
|
};
|
|
|
|
export type updateOnboardingApiV1AgentBoardsBoardIdOnboardingPostResponseSuccess =
|
|
updateOnboardingApiV1AgentBoardsBoardIdOnboardingPostResponse200 & {
|
|
headers: Headers;
|
|
};
|
|
export type updateOnboardingApiV1AgentBoardsBoardIdOnboardingPostResponseError =
|
|
updateOnboardingApiV1AgentBoardsBoardIdOnboardingPostResponse422 & {
|
|
headers: Headers;
|
|
};
|
|
|
|
export type updateOnboardingApiV1AgentBoardsBoardIdOnboardingPostResponse =
|
|
| updateOnboardingApiV1AgentBoardsBoardIdOnboardingPostResponseSuccess
|
|
| updateOnboardingApiV1AgentBoardsBoardIdOnboardingPostResponseError;
|
|
|
|
export const getUpdateOnboardingApiV1AgentBoardsBoardIdOnboardingPostUrl = (
|
|
boardId: string,
|
|
) => {
|
|
return `/api/v1/agent/boards/${boardId}/onboarding`;
|
|
};
|
|
|
|
export const updateOnboardingApiV1AgentBoardsBoardIdOnboardingPost = async (
|
|
boardId: string,
|
|
boardOnboardingAgentCompleteBoardOnboardingAgentQuestion:
|
|
| BoardOnboardingAgentComplete
|
|
| BoardOnboardingAgentQuestion,
|
|
options?: RequestInit,
|
|
): Promise<updateOnboardingApiV1AgentBoardsBoardIdOnboardingPostResponse> => {
|
|
return customFetch<updateOnboardingApiV1AgentBoardsBoardIdOnboardingPostResponse>(
|
|
getUpdateOnboardingApiV1AgentBoardsBoardIdOnboardingPostUrl(boardId),
|
|
{
|
|
...options,
|
|
method: "POST",
|
|
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
body: JSON.stringify(
|
|
boardOnboardingAgentCompleteBoardOnboardingAgentQuestion,
|
|
),
|
|
},
|
|
);
|
|
};
|
|
|
|
export const getUpdateOnboardingApiV1AgentBoardsBoardIdOnboardingPostMutationOptions =
|
|
<TError = HTTPValidationError, TContext = unknown>(options?: {
|
|
mutation?: UseMutationOptions<
|
|
Awaited<
|
|
ReturnType<typeof updateOnboardingApiV1AgentBoardsBoardIdOnboardingPost>
|
|
>,
|
|
TError,
|
|
{
|
|
boardId: string;
|
|
data: BoardOnboardingAgentComplete | BoardOnboardingAgentQuestion;
|
|
},
|
|
TContext
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
}): UseMutationOptions<
|
|
Awaited<
|
|
ReturnType<typeof updateOnboardingApiV1AgentBoardsBoardIdOnboardingPost>
|
|
>,
|
|
TError,
|
|
{
|
|
boardId: string;
|
|
data: BoardOnboardingAgentComplete | BoardOnboardingAgentQuestion;
|
|
},
|
|
TContext
|
|
> => {
|
|
const mutationKey = [
|
|
"updateOnboardingApiV1AgentBoardsBoardIdOnboardingPost",
|
|
];
|
|
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 updateOnboardingApiV1AgentBoardsBoardIdOnboardingPost>
|
|
>,
|
|
{
|
|
boardId: string;
|
|
data: BoardOnboardingAgentComplete | BoardOnboardingAgentQuestion;
|
|
}
|
|
> = (props) => {
|
|
const { boardId, data } = props ?? {};
|
|
|
|
return updateOnboardingApiV1AgentBoardsBoardIdOnboardingPost(
|
|
boardId,
|
|
data,
|
|
requestOptions,
|
|
);
|
|
};
|
|
|
|
return { mutationFn, ...mutationOptions };
|
|
};
|
|
|
|
export type UpdateOnboardingApiV1AgentBoardsBoardIdOnboardingPostMutationResult =
|
|
NonNullable<
|
|
Awaited<
|
|
ReturnType<typeof updateOnboardingApiV1AgentBoardsBoardIdOnboardingPost>
|
|
>
|
|
>;
|
|
export type UpdateOnboardingApiV1AgentBoardsBoardIdOnboardingPostMutationBody =
|
|
| BoardOnboardingAgentComplete
|
|
| BoardOnboardingAgentQuestion;
|
|
export type UpdateOnboardingApiV1AgentBoardsBoardIdOnboardingPostMutationError =
|
|
HTTPValidationError;
|
|
|
|
/**
|
|
* @summary Update Onboarding
|
|
*/
|
|
export const useUpdateOnboardingApiV1AgentBoardsBoardIdOnboardingPost = <
|
|
TError = HTTPValidationError,
|
|
TContext = unknown,
|
|
>(
|
|
options?: {
|
|
mutation?: UseMutationOptions<
|
|
Awaited<
|
|
ReturnType<typeof updateOnboardingApiV1AgentBoardsBoardIdOnboardingPost>
|
|
>,
|
|
TError,
|
|
{
|
|
boardId: string;
|
|
data: BoardOnboardingAgentComplete | BoardOnboardingAgentQuestion;
|
|
},
|
|
TContext
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): UseMutationResult<
|
|
Awaited<
|
|
ReturnType<typeof updateOnboardingApiV1AgentBoardsBoardIdOnboardingPost>
|
|
>,
|
|
TError,
|
|
{
|
|
boardId: string;
|
|
data: BoardOnboardingAgentComplete | BoardOnboardingAgentQuestion;
|
|
},
|
|
TContext
|
|
> => {
|
|
return useMutation(
|
|
getUpdateOnboardingApiV1AgentBoardsBoardIdOnboardingPostMutationOptions(
|
|
options,
|
|
),
|
|
queryClient,
|
|
);
|
|
};
|
|
/**
|
|
* @summary List Tasks
|
|
*/
|
|
export type listTasksApiV1AgentBoardsBoardIdTasksGetResponse200 = {
|
|
data: LimitOffsetPageTypeVarCustomizedTaskRead;
|
|
status: 200;
|
|
};
|
|
|
|
export type listTasksApiV1AgentBoardsBoardIdTasksGetResponse422 = {
|
|
data: HTTPValidationError;
|
|
status: 422;
|
|
};
|
|
|
|
export type listTasksApiV1AgentBoardsBoardIdTasksGetResponseSuccess =
|
|
listTasksApiV1AgentBoardsBoardIdTasksGetResponse200 & {
|
|
headers: Headers;
|
|
};
|
|
export type listTasksApiV1AgentBoardsBoardIdTasksGetResponseError =
|
|
listTasksApiV1AgentBoardsBoardIdTasksGetResponse422 & {
|
|
headers: Headers;
|
|
};
|
|
|
|
export type listTasksApiV1AgentBoardsBoardIdTasksGetResponse =
|
|
| listTasksApiV1AgentBoardsBoardIdTasksGetResponseSuccess
|
|
| listTasksApiV1AgentBoardsBoardIdTasksGetResponseError;
|
|
|
|
export const getListTasksApiV1AgentBoardsBoardIdTasksGetUrl = (
|
|
boardId: string,
|
|
params?: ListTasksApiV1AgentBoardsBoardIdTasksGetParams,
|
|
) => {
|
|
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/agent/boards/${boardId}/tasks?${stringifiedParams}`
|
|
: `/api/v1/agent/boards/${boardId}/tasks`;
|
|
};
|
|
|
|
export const listTasksApiV1AgentBoardsBoardIdTasksGet = async (
|
|
boardId: string,
|
|
params?: ListTasksApiV1AgentBoardsBoardIdTasksGetParams,
|
|
options?: RequestInit,
|
|
): Promise<listTasksApiV1AgentBoardsBoardIdTasksGetResponse> => {
|
|
return customFetch<listTasksApiV1AgentBoardsBoardIdTasksGetResponse>(
|
|
getListTasksApiV1AgentBoardsBoardIdTasksGetUrl(boardId, params),
|
|
{
|
|
...options,
|
|
method: "GET",
|
|
},
|
|
);
|
|
};
|
|
|
|
export const getListTasksApiV1AgentBoardsBoardIdTasksGetQueryKey = (
|
|
boardId: string,
|
|
params?: ListTasksApiV1AgentBoardsBoardIdTasksGetParams,
|
|
) => {
|
|
return [
|
|
`/api/v1/agent/boards/${boardId}/tasks`,
|
|
...(params ? [params] : []),
|
|
] as const;
|
|
};
|
|
|
|
export const getListTasksApiV1AgentBoardsBoardIdTasksGetQueryOptions = <
|
|
TData = Awaited<ReturnType<typeof listTasksApiV1AgentBoardsBoardIdTasksGet>>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
boardId: string,
|
|
params?: ListTasksApiV1AgentBoardsBoardIdTasksGetParams,
|
|
options?: {
|
|
query?: Partial<
|
|
UseQueryOptions<
|
|
Awaited<ReturnType<typeof listTasksApiV1AgentBoardsBoardIdTasksGet>>,
|
|
TError,
|
|
TData
|
|
>
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
) => {
|
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
|
|
const queryKey =
|
|
queryOptions?.queryKey ??
|
|
getListTasksApiV1AgentBoardsBoardIdTasksGetQueryKey(boardId, params);
|
|
|
|
const queryFn: QueryFunction<
|
|
Awaited<ReturnType<typeof listTasksApiV1AgentBoardsBoardIdTasksGet>>
|
|
> = ({ signal }) =>
|
|
listTasksApiV1AgentBoardsBoardIdTasksGet(boardId, params, {
|
|
signal,
|
|
...requestOptions,
|
|
});
|
|
|
|
return {
|
|
queryKey,
|
|
queryFn,
|
|
enabled: !!boardId,
|
|
...queryOptions,
|
|
} as UseQueryOptions<
|
|
Awaited<ReturnType<typeof listTasksApiV1AgentBoardsBoardIdTasksGet>>,
|
|
TError,
|
|
TData
|
|
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
};
|
|
|
|
export type ListTasksApiV1AgentBoardsBoardIdTasksGetQueryResult = NonNullable<
|
|
Awaited<ReturnType<typeof listTasksApiV1AgentBoardsBoardIdTasksGet>>
|
|
>;
|
|
export type ListTasksApiV1AgentBoardsBoardIdTasksGetQueryError =
|
|
HTTPValidationError;
|
|
|
|
export function useListTasksApiV1AgentBoardsBoardIdTasksGet<
|
|
TData = Awaited<ReturnType<typeof listTasksApiV1AgentBoardsBoardIdTasksGet>>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
boardId: string,
|
|
params: undefined | ListTasksApiV1AgentBoardsBoardIdTasksGetParams,
|
|
options: {
|
|
query: Partial<
|
|
UseQueryOptions<
|
|
Awaited<ReturnType<typeof listTasksApiV1AgentBoardsBoardIdTasksGet>>,
|
|
TError,
|
|
TData
|
|
>
|
|
> &
|
|
Pick<
|
|
DefinedInitialDataOptions<
|
|
Awaited<ReturnType<typeof listTasksApiV1AgentBoardsBoardIdTasksGet>>,
|
|
TError,
|
|
Awaited<ReturnType<typeof listTasksApiV1AgentBoardsBoardIdTasksGet>>
|
|
>,
|
|
"initialData"
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): DefinedUseQueryResult<TData, TError> & {
|
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
};
|
|
export function useListTasksApiV1AgentBoardsBoardIdTasksGet<
|
|
TData = Awaited<ReturnType<typeof listTasksApiV1AgentBoardsBoardIdTasksGet>>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
boardId: string,
|
|
params?: ListTasksApiV1AgentBoardsBoardIdTasksGetParams,
|
|
options?: {
|
|
query?: Partial<
|
|
UseQueryOptions<
|
|
Awaited<ReturnType<typeof listTasksApiV1AgentBoardsBoardIdTasksGet>>,
|
|
TError,
|
|
TData
|
|
>
|
|
> &
|
|
Pick<
|
|
UndefinedInitialDataOptions<
|
|
Awaited<ReturnType<typeof listTasksApiV1AgentBoardsBoardIdTasksGet>>,
|
|
TError,
|
|
Awaited<ReturnType<typeof listTasksApiV1AgentBoardsBoardIdTasksGet>>
|
|
>,
|
|
"initialData"
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): UseQueryResult<TData, TError> & {
|
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
};
|
|
export function useListTasksApiV1AgentBoardsBoardIdTasksGet<
|
|
TData = Awaited<ReturnType<typeof listTasksApiV1AgentBoardsBoardIdTasksGet>>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
boardId: string,
|
|
params?: ListTasksApiV1AgentBoardsBoardIdTasksGetParams,
|
|
options?: {
|
|
query?: Partial<
|
|
UseQueryOptions<
|
|
Awaited<ReturnType<typeof listTasksApiV1AgentBoardsBoardIdTasksGet>>,
|
|
TError,
|
|
TData
|
|
>
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): UseQueryResult<TData, TError> & {
|
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
};
|
|
/**
|
|
* @summary List Tasks
|
|
*/
|
|
|
|
export function useListTasksApiV1AgentBoardsBoardIdTasksGet<
|
|
TData = Awaited<ReturnType<typeof listTasksApiV1AgentBoardsBoardIdTasksGet>>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
boardId: string,
|
|
params?: ListTasksApiV1AgentBoardsBoardIdTasksGetParams,
|
|
options?: {
|
|
query?: Partial<
|
|
UseQueryOptions<
|
|
Awaited<ReturnType<typeof listTasksApiV1AgentBoardsBoardIdTasksGet>>,
|
|
TError,
|
|
TData
|
|
>
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): UseQueryResult<TData, TError> & {
|
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
} {
|
|
const queryOptions = getListTasksApiV1AgentBoardsBoardIdTasksGetQueryOptions(
|
|
boardId,
|
|
params,
|
|
options,
|
|
);
|
|
|
|
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
|
TData,
|
|
TError
|
|
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
|
|
return { ...query, queryKey: queryOptions.queryKey };
|
|
}
|
|
|
|
/**
|
|
* @summary Create Task
|
|
*/
|
|
export type createTaskApiV1AgentBoardsBoardIdTasksPostResponse200 = {
|
|
data: TaskRead;
|
|
status: 200;
|
|
};
|
|
|
|
export type createTaskApiV1AgentBoardsBoardIdTasksPostResponse422 = {
|
|
data: HTTPValidationError;
|
|
status: 422;
|
|
};
|
|
|
|
export type createTaskApiV1AgentBoardsBoardIdTasksPostResponseSuccess =
|
|
createTaskApiV1AgentBoardsBoardIdTasksPostResponse200 & {
|
|
headers: Headers;
|
|
};
|
|
export type createTaskApiV1AgentBoardsBoardIdTasksPostResponseError =
|
|
createTaskApiV1AgentBoardsBoardIdTasksPostResponse422 & {
|
|
headers: Headers;
|
|
};
|
|
|
|
export type createTaskApiV1AgentBoardsBoardIdTasksPostResponse =
|
|
| createTaskApiV1AgentBoardsBoardIdTasksPostResponseSuccess
|
|
| createTaskApiV1AgentBoardsBoardIdTasksPostResponseError;
|
|
|
|
export const getCreateTaskApiV1AgentBoardsBoardIdTasksPostUrl = (
|
|
boardId: string,
|
|
) => {
|
|
return `/api/v1/agent/boards/${boardId}/tasks`;
|
|
};
|
|
|
|
export const createTaskApiV1AgentBoardsBoardIdTasksPost = async (
|
|
boardId: string,
|
|
taskCreate: TaskCreate,
|
|
options?: RequestInit,
|
|
): Promise<createTaskApiV1AgentBoardsBoardIdTasksPostResponse> => {
|
|
return customFetch<createTaskApiV1AgentBoardsBoardIdTasksPostResponse>(
|
|
getCreateTaskApiV1AgentBoardsBoardIdTasksPostUrl(boardId),
|
|
{
|
|
...options,
|
|
method: "POST",
|
|
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
body: JSON.stringify(taskCreate),
|
|
},
|
|
);
|
|
};
|
|
|
|
export const getCreateTaskApiV1AgentBoardsBoardIdTasksPostMutationOptions = <
|
|
TError = HTTPValidationError,
|
|
TContext = unknown,
|
|
>(options?: {
|
|
mutation?: UseMutationOptions<
|
|
Awaited<ReturnType<typeof createTaskApiV1AgentBoardsBoardIdTasksPost>>,
|
|
TError,
|
|
{ boardId: string; data: TaskCreate },
|
|
TContext
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
}): UseMutationOptions<
|
|
Awaited<ReturnType<typeof createTaskApiV1AgentBoardsBoardIdTasksPost>>,
|
|
TError,
|
|
{ boardId: string; data: TaskCreate },
|
|
TContext
|
|
> => {
|
|
const mutationKey = ["createTaskApiV1AgentBoardsBoardIdTasksPost"];
|
|
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 createTaskApiV1AgentBoardsBoardIdTasksPost>>,
|
|
{ boardId: string; data: TaskCreate }
|
|
> = (props) => {
|
|
const { boardId, data } = props ?? {};
|
|
|
|
return createTaskApiV1AgentBoardsBoardIdTasksPost(
|
|
boardId,
|
|
data,
|
|
requestOptions,
|
|
);
|
|
};
|
|
|
|
return { mutationFn, ...mutationOptions };
|
|
};
|
|
|
|
export type CreateTaskApiV1AgentBoardsBoardIdTasksPostMutationResult =
|
|
NonNullable<
|
|
Awaited<ReturnType<typeof createTaskApiV1AgentBoardsBoardIdTasksPost>>
|
|
>;
|
|
export type CreateTaskApiV1AgentBoardsBoardIdTasksPostMutationBody = TaskCreate;
|
|
export type CreateTaskApiV1AgentBoardsBoardIdTasksPostMutationError =
|
|
HTTPValidationError;
|
|
|
|
/**
|
|
* @summary Create Task
|
|
*/
|
|
export const useCreateTaskApiV1AgentBoardsBoardIdTasksPost = <
|
|
TError = HTTPValidationError,
|
|
TContext = unknown,
|
|
>(
|
|
options?: {
|
|
mutation?: UseMutationOptions<
|
|
Awaited<ReturnType<typeof createTaskApiV1AgentBoardsBoardIdTasksPost>>,
|
|
TError,
|
|
{ boardId: string; data: TaskCreate },
|
|
TContext
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): UseMutationResult<
|
|
Awaited<ReturnType<typeof createTaskApiV1AgentBoardsBoardIdTasksPost>>,
|
|
TError,
|
|
{ boardId: string; data: TaskCreate },
|
|
TContext
|
|
> => {
|
|
return useMutation(
|
|
getCreateTaskApiV1AgentBoardsBoardIdTasksPostMutationOptions(options),
|
|
queryClient,
|
|
);
|
|
};
|
|
/**
|
|
* @summary Update Task
|
|
*/
|
|
export type updateTaskApiV1AgentBoardsBoardIdTasksTaskIdPatchResponse200 = {
|
|
data: TaskRead;
|
|
status: 200;
|
|
};
|
|
|
|
export type updateTaskApiV1AgentBoardsBoardIdTasksTaskIdPatchResponse422 = {
|
|
data: HTTPValidationError;
|
|
status: 422;
|
|
};
|
|
|
|
export type updateTaskApiV1AgentBoardsBoardIdTasksTaskIdPatchResponseSuccess =
|
|
updateTaskApiV1AgentBoardsBoardIdTasksTaskIdPatchResponse200 & {
|
|
headers: Headers;
|
|
};
|
|
export type updateTaskApiV1AgentBoardsBoardIdTasksTaskIdPatchResponseError =
|
|
updateTaskApiV1AgentBoardsBoardIdTasksTaskIdPatchResponse422 & {
|
|
headers: Headers;
|
|
};
|
|
|
|
export type updateTaskApiV1AgentBoardsBoardIdTasksTaskIdPatchResponse =
|
|
| updateTaskApiV1AgentBoardsBoardIdTasksTaskIdPatchResponseSuccess
|
|
| updateTaskApiV1AgentBoardsBoardIdTasksTaskIdPatchResponseError;
|
|
|
|
export const getUpdateTaskApiV1AgentBoardsBoardIdTasksTaskIdPatchUrl = (
|
|
boardId: string,
|
|
taskId: string,
|
|
) => {
|
|
return `/api/v1/agent/boards/${boardId}/tasks/${taskId}`;
|
|
};
|
|
|
|
export const updateTaskApiV1AgentBoardsBoardIdTasksTaskIdPatch = async (
|
|
boardId: string,
|
|
taskId: string,
|
|
taskUpdate: TaskUpdate,
|
|
options?: RequestInit,
|
|
): Promise<updateTaskApiV1AgentBoardsBoardIdTasksTaskIdPatchResponse> => {
|
|
return customFetch<updateTaskApiV1AgentBoardsBoardIdTasksTaskIdPatchResponse>(
|
|
getUpdateTaskApiV1AgentBoardsBoardIdTasksTaskIdPatchUrl(boardId, taskId),
|
|
{
|
|
...options,
|
|
method: "PATCH",
|
|
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
body: JSON.stringify(taskUpdate),
|
|
},
|
|
);
|
|
};
|
|
|
|
export const getUpdateTaskApiV1AgentBoardsBoardIdTasksTaskIdPatchMutationOptions =
|
|
<TError = HTTPValidationError, TContext = unknown>(options?: {
|
|
mutation?: UseMutationOptions<
|
|
Awaited<
|
|
ReturnType<typeof updateTaskApiV1AgentBoardsBoardIdTasksTaskIdPatch>
|
|
>,
|
|
TError,
|
|
{ boardId: string; taskId: string; data: TaskUpdate },
|
|
TContext
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
}): UseMutationOptions<
|
|
Awaited<
|
|
ReturnType<typeof updateTaskApiV1AgentBoardsBoardIdTasksTaskIdPatch>
|
|
>,
|
|
TError,
|
|
{ boardId: string; taskId: string; data: TaskUpdate },
|
|
TContext
|
|
> => {
|
|
const mutationKey = ["updateTaskApiV1AgentBoardsBoardIdTasksTaskIdPatch"];
|
|
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 updateTaskApiV1AgentBoardsBoardIdTasksTaskIdPatch>
|
|
>,
|
|
{ boardId: string; taskId: string; data: TaskUpdate }
|
|
> = (props) => {
|
|
const { boardId, taskId, data } = props ?? {};
|
|
|
|
return updateTaskApiV1AgentBoardsBoardIdTasksTaskIdPatch(
|
|
boardId,
|
|
taskId,
|
|
data,
|
|
requestOptions,
|
|
);
|
|
};
|
|
|
|
return { mutationFn, ...mutationOptions };
|
|
};
|
|
|
|
export type UpdateTaskApiV1AgentBoardsBoardIdTasksTaskIdPatchMutationResult =
|
|
NonNullable<
|
|
Awaited<
|
|
ReturnType<typeof updateTaskApiV1AgentBoardsBoardIdTasksTaskIdPatch>
|
|
>
|
|
>;
|
|
export type UpdateTaskApiV1AgentBoardsBoardIdTasksTaskIdPatchMutationBody =
|
|
TaskUpdate;
|
|
export type UpdateTaskApiV1AgentBoardsBoardIdTasksTaskIdPatchMutationError =
|
|
HTTPValidationError;
|
|
|
|
/**
|
|
* @summary Update Task
|
|
*/
|
|
export const useUpdateTaskApiV1AgentBoardsBoardIdTasksTaskIdPatch = <
|
|
TError = HTTPValidationError,
|
|
TContext = unknown,
|
|
>(
|
|
options?: {
|
|
mutation?: UseMutationOptions<
|
|
Awaited<
|
|
ReturnType<typeof updateTaskApiV1AgentBoardsBoardIdTasksTaskIdPatch>
|
|
>,
|
|
TError,
|
|
{ boardId: string; taskId: string; data: TaskUpdate },
|
|
TContext
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): UseMutationResult<
|
|
Awaited<ReturnType<typeof updateTaskApiV1AgentBoardsBoardIdTasksTaskIdPatch>>,
|
|
TError,
|
|
{ boardId: string; taskId: string; data: TaskUpdate },
|
|
TContext
|
|
> => {
|
|
return useMutation(
|
|
getUpdateTaskApiV1AgentBoardsBoardIdTasksTaskIdPatchMutationOptions(
|
|
options,
|
|
),
|
|
queryClient,
|
|
);
|
|
};
|
|
/**
|
|
* @summary List Task Comments
|
|
*/
|
|
export type listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGetResponse200 =
|
|
{
|
|
data: LimitOffsetPageTypeVarCustomizedTaskCommentRead;
|
|
status: 200;
|
|
};
|
|
|
|
export type listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGetResponse422 =
|
|
{
|
|
data: HTTPValidationError;
|
|
status: 422;
|
|
};
|
|
|
|
export type listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGetResponseSuccess =
|
|
listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGetResponse200 & {
|
|
headers: Headers;
|
|
};
|
|
export type listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGetResponseError =
|
|
listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGetResponse422 & {
|
|
headers: Headers;
|
|
};
|
|
|
|
export type listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGetResponse =
|
|
|
|
| listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGetResponseSuccess
|
|
| listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGetResponseError;
|
|
|
|
export const getListTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGetUrl =
|
|
(
|
|
boardId: string,
|
|
taskId: string,
|
|
params?: ListTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGetParams,
|
|
) => {
|
|
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/agent/boards/${boardId}/tasks/${taskId}/comments?${stringifiedParams}`
|
|
: `/api/v1/agent/boards/${boardId}/tasks/${taskId}/comments`;
|
|
};
|
|
|
|
export const listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGet =
|
|
async (
|
|
boardId: string,
|
|
taskId: string,
|
|
params?: ListTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGetParams,
|
|
options?: RequestInit,
|
|
): Promise<listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGetResponse> => {
|
|
return customFetch<listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGetResponse>(
|
|
getListTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGetUrl(
|
|
boardId,
|
|
taskId,
|
|
params,
|
|
),
|
|
{
|
|
...options,
|
|
method: "GET",
|
|
},
|
|
);
|
|
};
|
|
|
|
export const getListTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGetQueryKey =
|
|
(
|
|
boardId: string,
|
|
taskId: string,
|
|
params?: ListTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGetParams,
|
|
) => {
|
|
return [
|
|
`/api/v1/agent/boards/${boardId}/tasks/${taskId}/comments`,
|
|
...(params ? [params] : []),
|
|
] as const;
|
|
};
|
|
|
|
export const getListTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGetQueryOptions =
|
|
<
|
|
TData = Awaited<
|
|
ReturnType<
|
|
typeof listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGet
|
|
>
|
|
>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
boardId: string,
|
|
taskId: string,
|
|
params?: ListTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGetParams,
|
|
options?: {
|
|
query?: Partial<
|
|
UseQueryOptions<
|
|
Awaited<
|
|
ReturnType<
|
|
typeof listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGet
|
|
>
|
|
>,
|
|
TError,
|
|
TData
|
|
>
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
) => {
|
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
|
|
const queryKey =
|
|
queryOptions?.queryKey ??
|
|
getListTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGetQueryKey(
|
|
boardId,
|
|
taskId,
|
|
params,
|
|
);
|
|
|
|
const queryFn: QueryFunction<
|
|
Awaited<
|
|
ReturnType<
|
|
typeof listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGet
|
|
>
|
|
>
|
|
> = ({ signal }) =>
|
|
listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGet(
|
|
boardId,
|
|
taskId,
|
|
params,
|
|
{ signal, ...requestOptions },
|
|
);
|
|
|
|
return {
|
|
queryKey,
|
|
queryFn,
|
|
enabled: !!(boardId && taskId),
|
|
...queryOptions,
|
|
} as UseQueryOptions<
|
|
Awaited<
|
|
ReturnType<
|
|
typeof listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGet
|
|
>
|
|
>,
|
|
TError,
|
|
TData
|
|
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
};
|
|
|
|
export type ListTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGetQueryResult =
|
|
NonNullable<
|
|
Awaited<
|
|
ReturnType<
|
|
typeof listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGet
|
|
>
|
|
>
|
|
>;
|
|
export type ListTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGetQueryError =
|
|
HTTPValidationError;
|
|
|
|
export function useListTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGet<
|
|
TData = Awaited<
|
|
ReturnType<
|
|
typeof listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGet
|
|
>
|
|
>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
boardId: string,
|
|
taskId: string,
|
|
params:
|
|
| undefined
|
|
| ListTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGetParams,
|
|
options: {
|
|
query: Partial<
|
|
UseQueryOptions<
|
|
Awaited<
|
|
ReturnType<
|
|
typeof listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGet
|
|
>
|
|
>,
|
|
TError,
|
|
TData
|
|
>
|
|
> &
|
|
Pick<
|
|
DefinedInitialDataOptions<
|
|
Awaited<
|
|
ReturnType<
|
|
typeof listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGet
|
|
>
|
|
>,
|
|
TError,
|
|
Awaited<
|
|
ReturnType<
|
|
typeof listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGet
|
|
>
|
|
>
|
|
>,
|
|
"initialData"
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): DefinedUseQueryResult<TData, TError> & {
|
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
};
|
|
export function useListTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGet<
|
|
TData = Awaited<
|
|
ReturnType<
|
|
typeof listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGet
|
|
>
|
|
>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
boardId: string,
|
|
taskId: string,
|
|
params?: ListTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGetParams,
|
|
options?: {
|
|
query?: Partial<
|
|
UseQueryOptions<
|
|
Awaited<
|
|
ReturnType<
|
|
typeof listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGet
|
|
>
|
|
>,
|
|
TError,
|
|
TData
|
|
>
|
|
> &
|
|
Pick<
|
|
UndefinedInitialDataOptions<
|
|
Awaited<
|
|
ReturnType<
|
|
typeof listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGet
|
|
>
|
|
>,
|
|
TError,
|
|
Awaited<
|
|
ReturnType<
|
|
typeof listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGet
|
|
>
|
|
>
|
|
>,
|
|
"initialData"
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): UseQueryResult<TData, TError> & {
|
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
};
|
|
export function useListTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGet<
|
|
TData = Awaited<
|
|
ReturnType<
|
|
typeof listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGet
|
|
>
|
|
>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
boardId: string,
|
|
taskId: string,
|
|
params?: ListTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGetParams,
|
|
options?: {
|
|
query?: Partial<
|
|
UseQueryOptions<
|
|
Awaited<
|
|
ReturnType<
|
|
typeof listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGet
|
|
>
|
|
>,
|
|
TError,
|
|
TData
|
|
>
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): UseQueryResult<TData, TError> & {
|
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
};
|
|
/**
|
|
* @summary List Task Comments
|
|
*/
|
|
|
|
export function useListTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGet<
|
|
TData = Awaited<
|
|
ReturnType<
|
|
typeof listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGet
|
|
>
|
|
>,
|
|
TError = HTTPValidationError,
|
|
>(
|
|
boardId: string,
|
|
taskId: string,
|
|
params?: ListTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGetParams,
|
|
options?: {
|
|
query?: Partial<
|
|
UseQueryOptions<
|
|
Awaited<
|
|
ReturnType<
|
|
typeof listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGet
|
|
>
|
|
>,
|
|
TError,
|
|
TData
|
|
>
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): UseQueryResult<TData, TError> & {
|
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
} {
|
|
const queryOptions =
|
|
getListTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGetQueryOptions(
|
|
boardId,
|
|
taskId,
|
|
params,
|
|
options,
|
|
);
|
|
|
|
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
|
TData,
|
|
TError
|
|
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
|
|
|
return { ...query, queryKey: queryOptions.queryKey };
|
|
}
|
|
|
|
/**
|
|
* @summary Create Task Comment
|
|
*/
|
|
export type createTaskCommentApiV1AgentBoardsBoardIdTasksTaskIdCommentsPostResponse200 =
|
|
{
|
|
data: TaskCommentRead;
|
|
status: 200;
|
|
};
|
|
|
|
export type createTaskCommentApiV1AgentBoardsBoardIdTasksTaskIdCommentsPostResponse422 =
|
|
{
|
|
data: HTTPValidationError;
|
|
status: 422;
|
|
};
|
|
|
|
export type createTaskCommentApiV1AgentBoardsBoardIdTasksTaskIdCommentsPostResponseSuccess =
|
|
createTaskCommentApiV1AgentBoardsBoardIdTasksTaskIdCommentsPostResponse200 & {
|
|
headers: Headers;
|
|
};
|
|
export type createTaskCommentApiV1AgentBoardsBoardIdTasksTaskIdCommentsPostResponseError =
|
|
createTaskCommentApiV1AgentBoardsBoardIdTasksTaskIdCommentsPostResponse422 & {
|
|
headers: Headers;
|
|
};
|
|
|
|
export type createTaskCommentApiV1AgentBoardsBoardIdTasksTaskIdCommentsPostResponse =
|
|
|
|
| createTaskCommentApiV1AgentBoardsBoardIdTasksTaskIdCommentsPostResponseSuccess
|
|
| createTaskCommentApiV1AgentBoardsBoardIdTasksTaskIdCommentsPostResponseError;
|
|
|
|
export const getCreateTaskCommentApiV1AgentBoardsBoardIdTasksTaskIdCommentsPostUrl =
|
|
(boardId: string, taskId: string) => {
|
|
return `/api/v1/agent/boards/${boardId}/tasks/${taskId}/comments`;
|
|
};
|
|
|
|
export const createTaskCommentApiV1AgentBoardsBoardIdTasksTaskIdCommentsPost =
|
|
async (
|
|
boardId: string,
|
|
taskId: string,
|
|
taskCommentCreate: TaskCommentCreate,
|
|
options?: RequestInit,
|
|
): Promise<createTaskCommentApiV1AgentBoardsBoardIdTasksTaskIdCommentsPostResponse> => {
|
|
return customFetch<createTaskCommentApiV1AgentBoardsBoardIdTasksTaskIdCommentsPostResponse>(
|
|
getCreateTaskCommentApiV1AgentBoardsBoardIdTasksTaskIdCommentsPostUrl(
|
|
boardId,
|
|
taskId,
|
|
),
|
|
{
|
|
...options,
|
|
method: "POST",
|
|
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
body: JSON.stringify(taskCommentCreate),
|
|
},
|
|
);
|
|
};
|
|
|
|
export const getCreateTaskCommentApiV1AgentBoardsBoardIdTasksTaskIdCommentsPostMutationOptions =
|
|
<TError = HTTPValidationError, TContext = unknown>(options?: {
|
|
mutation?: UseMutationOptions<
|
|
Awaited<
|
|
ReturnType<
|
|
typeof createTaskCommentApiV1AgentBoardsBoardIdTasksTaskIdCommentsPost
|
|
>
|
|
>,
|
|
TError,
|
|
{ boardId: string; taskId: string; data: TaskCommentCreate },
|
|
TContext
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
}): UseMutationOptions<
|
|
Awaited<
|
|
ReturnType<
|
|
typeof createTaskCommentApiV1AgentBoardsBoardIdTasksTaskIdCommentsPost
|
|
>
|
|
>,
|
|
TError,
|
|
{ boardId: string; taskId: string; data: TaskCommentCreate },
|
|
TContext
|
|
> => {
|
|
const mutationKey = [
|
|
"createTaskCommentApiV1AgentBoardsBoardIdTasksTaskIdCommentsPost",
|
|
];
|
|
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 createTaskCommentApiV1AgentBoardsBoardIdTasksTaskIdCommentsPost
|
|
>
|
|
>,
|
|
{ boardId: string; taskId: string; data: TaskCommentCreate }
|
|
> = (props) => {
|
|
const { boardId, taskId, data } = props ?? {};
|
|
|
|
return createTaskCommentApiV1AgentBoardsBoardIdTasksTaskIdCommentsPost(
|
|
boardId,
|
|
taskId,
|
|
data,
|
|
requestOptions,
|
|
);
|
|
};
|
|
|
|
return { mutationFn, ...mutationOptions };
|
|
};
|
|
|
|
export type CreateTaskCommentApiV1AgentBoardsBoardIdTasksTaskIdCommentsPostMutationResult =
|
|
NonNullable<
|
|
Awaited<
|
|
ReturnType<
|
|
typeof createTaskCommentApiV1AgentBoardsBoardIdTasksTaskIdCommentsPost
|
|
>
|
|
>
|
|
>;
|
|
export type CreateTaskCommentApiV1AgentBoardsBoardIdTasksTaskIdCommentsPostMutationBody =
|
|
TaskCommentCreate;
|
|
export type CreateTaskCommentApiV1AgentBoardsBoardIdTasksTaskIdCommentsPostMutationError =
|
|
HTTPValidationError;
|
|
|
|
/**
|
|
* @summary Create Task Comment
|
|
*/
|
|
export const useCreateTaskCommentApiV1AgentBoardsBoardIdTasksTaskIdCommentsPost =
|
|
<TError = HTTPValidationError, TContext = unknown>(
|
|
options?: {
|
|
mutation?: UseMutationOptions<
|
|
Awaited<
|
|
ReturnType<
|
|
typeof createTaskCommentApiV1AgentBoardsBoardIdTasksTaskIdCommentsPost
|
|
>
|
|
>,
|
|
TError,
|
|
{ boardId: string; taskId: string; data: TaskCommentCreate },
|
|
TContext
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): UseMutationResult<
|
|
Awaited<
|
|
ReturnType<
|
|
typeof createTaskCommentApiV1AgentBoardsBoardIdTasksTaskIdCommentsPost
|
|
>
|
|
>,
|
|
TError,
|
|
{ boardId: string; taskId: string; data: TaskCommentCreate },
|
|
TContext
|
|
> => {
|
|
return useMutation(
|
|
getCreateTaskCommentApiV1AgentBoardsBoardIdTasksTaskIdCommentsPostMutationOptions(
|
|
options,
|
|
),
|
|
queryClient,
|
|
);
|
|
};
|
|
/**
|
|
* @summary Agent Heartbeat
|
|
*/
|
|
export type agentHeartbeatApiV1AgentHeartbeatPostResponse200 = {
|
|
data: AgentRead;
|
|
status: 200;
|
|
};
|
|
|
|
export type agentHeartbeatApiV1AgentHeartbeatPostResponse422 = {
|
|
data: HTTPValidationError;
|
|
status: 422;
|
|
};
|
|
|
|
export type agentHeartbeatApiV1AgentHeartbeatPostResponseSuccess =
|
|
agentHeartbeatApiV1AgentHeartbeatPostResponse200 & {
|
|
headers: Headers;
|
|
};
|
|
export type agentHeartbeatApiV1AgentHeartbeatPostResponseError =
|
|
agentHeartbeatApiV1AgentHeartbeatPostResponse422 & {
|
|
headers: Headers;
|
|
};
|
|
|
|
export type agentHeartbeatApiV1AgentHeartbeatPostResponse =
|
|
| agentHeartbeatApiV1AgentHeartbeatPostResponseSuccess
|
|
| agentHeartbeatApiV1AgentHeartbeatPostResponseError;
|
|
|
|
export const getAgentHeartbeatApiV1AgentHeartbeatPostUrl = () => {
|
|
return `/api/v1/agent/heartbeat`;
|
|
};
|
|
|
|
export const agentHeartbeatApiV1AgentHeartbeatPost = async (
|
|
agentHeartbeatCreate: AgentHeartbeatCreate,
|
|
options?: RequestInit,
|
|
): Promise<agentHeartbeatApiV1AgentHeartbeatPostResponse> => {
|
|
return customFetch<agentHeartbeatApiV1AgentHeartbeatPostResponse>(
|
|
getAgentHeartbeatApiV1AgentHeartbeatPostUrl(),
|
|
{
|
|
...options,
|
|
method: "POST",
|
|
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
body: JSON.stringify(agentHeartbeatCreate),
|
|
},
|
|
);
|
|
};
|
|
|
|
export const getAgentHeartbeatApiV1AgentHeartbeatPostMutationOptions = <
|
|
TError = HTTPValidationError,
|
|
TContext = unknown,
|
|
>(options?: {
|
|
mutation?: UseMutationOptions<
|
|
Awaited<ReturnType<typeof agentHeartbeatApiV1AgentHeartbeatPost>>,
|
|
TError,
|
|
{ data: AgentHeartbeatCreate },
|
|
TContext
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
}): UseMutationOptions<
|
|
Awaited<ReturnType<typeof agentHeartbeatApiV1AgentHeartbeatPost>>,
|
|
TError,
|
|
{ data: AgentHeartbeatCreate },
|
|
TContext
|
|
> => {
|
|
const mutationKey = ["agentHeartbeatApiV1AgentHeartbeatPost"];
|
|
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 agentHeartbeatApiV1AgentHeartbeatPost>>,
|
|
{ data: AgentHeartbeatCreate }
|
|
> = (props) => {
|
|
const { data } = props ?? {};
|
|
|
|
return agentHeartbeatApiV1AgentHeartbeatPost(data, requestOptions);
|
|
};
|
|
|
|
return { mutationFn, ...mutationOptions };
|
|
};
|
|
|
|
export type AgentHeartbeatApiV1AgentHeartbeatPostMutationResult = NonNullable<
|
|
Awaited<ReturnType<typeof agentHeartbeatApiV1AgentHeartbeatPost>>
|
|
>;
|
|
export type AgentHeartbeatApiV1AgentHeartbeatPostMutationBody =
|
|
AgentHeartbeatCreate;
|
|
export type AgentHeartbeatApiV1AgentHeartbeatPostMutationError =
|
|
HTTPValidationError;
|
|
|
|
/**
|
|
* @summary Agent Heartbeat
|
|
*/
|
|
export const useAgentHeartbeatApiV1AgentHeartbeatPost = <
|
|
TError = HTTPValidationError,
|
|
TContext = unknown,
|
|
>(
|
|
options?: {
|
|
mutation?: UseMutationOptions<
|
|
Awaited<ReturnType<typeof agentHeartbeatApiV1AgentHeartbeatPost>>,
|
|
TError,
|
|
{ data: AgentHeartbeatCreate },
|
|
TContext
|
|
>;
|
|
request?: SecondParameter<typeof customFetch>;
|
|
},
|
|
queryClient?: QueryClient,
|
|
): UseMutationResult<
|
|
Awaited<ReturnType<typeof agentHeartbeatApiV1AgentHeartbeatPost>>,
|
|
TError,
|
|
{ data: AgentHeartbeatCreate },
|
|
TContext
|
|
> => {
|
|
return useMutation(
|
|
getAgentHeartbeatApiV1AgentHeartbeatPostMutationOptions(options),
|
|
queryClient,
|
|
);
|
|
};
|