feat: add board group models and update related interfaces
This commit is contained in:
@@ -11,11 +11,26 @@ const eslintConfig = defineConfig([
|
||||
".next/**",
|
||||
"out/**",
|
||||
"build/**",
|
||||
"coverage/**",
|
||||
"next-env.d.ts",
|
||||
"tailwind.config.*",
|
||||
"postcss.config.*",
|
||||
"orval.config.*",
|
||||
]),
|
||||
{
|
||||
rules: {
|
||||
// We intentionally prefix unused destructured props with "_" to avoid
|
||||
// passing them to DOM elements (e.g. react-markdown's `node` prop).
|
||||
"@typescript-eslint/no-unused-vars": [
|
||||
"warn",
|
||||
{
|
||||
argsIgnorePattern: "^_",
|
||||
varsIgnorePattern: "^_",
|
||||
caughtErrorsIgnorePattern: "^_",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
export default eslintConfig;
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import type { NextConfig } from "next";
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
allowedDevOrigins: [
|
||||
"192.168.1.101",
|
||||
],
|
||||
allowedDevOrigins: ["192.168.1.101"],
|
||||
images: {
|
||||
remotePatterns: [
|
||||
{
|
||||
|
||||
@@ -3,8 +3,7 @@ import { defineConfig } from "orval";
|
||||
export default defineConfig({
|
||||
api: {
|
||||
input: {
|
||||
target:
|
||||
process.env.ORVAL_INPUT ?? "http://127.0.0.1:8000/openapi.json",
|
||||
target: process.env.ORVAL_INPUT ?? "http://127.0.0.1:8000/openapi.json",
|
||||
},
|
||||
output: {
|
||||
mode: "tags-split",
|
||||
|
||||
@@ -3,4 +3,4 @@ module.exports = {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -362,133 +362,6 @@ export const useCreateAgentApiV1AgentsPost = <
|
||||
queryClient,
|
||||
);
|
||||
};
|
||||
/**
|
||||
* @summary Heartbeat Or Create Agent
|
||||
*/
|
||||
export type heartbeatOrCreateAgentApiV1AgentsHeartbeatPostResponse200 = {
|
||||
data: AgentRead;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type heartbeatOrCreateAgentApiV1AgentsHeartbeatPostResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type heartbeatOrCreateAgentApiV1AgentsHeartbeatPostResponseSuccess =
|
||||
heartbeatOrCreateAgentApiV1AgentsHeartbeatPostResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type heartbeatOrCreateAgentApiV1AgentsHeartbeatPostResponseError =
|
||||
heartbeatOrCreateAgentApiV1AgentsHeartbeatPostResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type heartbeatOrCreateAgentApiV1AgentsHeartbeatPostResponse =
|
||||
| heartbeatOrCreateAgentApiV1AgentsHeartbeatPostResponseSuccess
|
||||
| heartbeatOrCreateAgentApiV1AgentsHeartbeatPostResponseError;
|
||||
|
||||
export const getHeartbeatOrCreateAgentApiV1AgentsHeartbeatPostUrl = () => {
|
||||
return `/api/v1/agents/heartbeat`;
|
||||
};
|
||||
|
||||
export const heartbeatOrCreateAgentApiV1AgentsHeartbeatPost = async (
|
||||
agentHeartbeatCreate: AgentHeartbeatCreate,
|
||||
options?: RequestInit,
|
||||
): Promise<heartbeatOrCreateAgentApiV1AgentsHeartbeatPostResponse> => {
|
||||
return customFetch<heartbeatOrCreateAgentApiV1AgentsHeartbeatPostResponse>(
|
||||
getHeartbeatOrCreateAgentApiV1AgentsHeartbeatPostUrl(),
|
||||
{
|
||||
...options,
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||
body: JSON.stringify(agentHeartbeatCreate),
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getHeartbeatOrCreateAgentApiV1AgentsHeartbeatPostMutationOptions =
|
||||
<TError = HTTPValidationError, TContext = unknown>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof heartbeatOrCreateAgentApiV1AgentsHeartbeatPost>
|
||||
>,
|
||||
TError,
|
||||
{ data: AgentHeartbeatCreate },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof heartbeatOrCreateAgentApiV1AgentsHeartbeatPost>>,
|
||||
TError,
|
||||
{ data: AgentHeartbeatCreate },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["heartbeatOrCreateAgentApiV1AgentsHeartbeatPost"];
|
||||
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 heartbeatOrCreateAgentApiV1AgentsHeartbeatPost>
|
||||
>,
|
||||
{ data: AgentHeartbeatCreate }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
return heartbeatOrCreateAgentApiV1AgentsHeartbeatPost(
|
||||
data,
|
||||
requestOptions,
|
||||
);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type HeartbeatOrCreateAgentApiV1AgentsHeartbeatPostMutationResult =
|
||||
NonNullable<
|
||||
Awaited<ReturnType<typeof heartbeatOrCreateAgentApiV1AgentsHeartbeatPost>>
|
||||
>;
|
||||
export type HeartbeatOrCreateAgentApiV1AgentsHeartbeatPostMutationBody =
|
||||
AgentHeartbeatCreate;
|
||||
export type HeartbeatOrCreateAgentApiV1AgentsHeartbeatPostMutationError =
|
||||
HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Heartbeat Or Create Agent
|
||||
*/
|
||||
export const useHeartbeatOrCreateAgentApiV1AgentsHeartbeatPost = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof heartbeatOrCreateAgentApiV1AgentsHeartbeatPost>
|
||||
>,
|
||||
TError,
|
||||
{ data: AgentHeartbeatCreate },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof heartbeatOrCreateAgentApiV1AgentsHeartbeatPost>>,
|
||||
TError,
|
||||
{ data: AgentHeartbeatCreate },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(
|
||||
getHeartbeatOrCreateAgentApiV1AgentsHeartbeatPostMutationOptions(options),
|
||||
queryClient,
|
||||
);
|
||||
};
|
||||
/**
|
||||
* @summary Stream Agents
|
||||
*/
|
||||
@@ -700,122 +573,6 @@ export function useStreamAgentsApiV1AgentsStreamGet<
|
||||
return { ...query, queryKey: queryOptions.queryKey };
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Delete Agent
|
||||
*/
|
||||
export type deleteAgentApiV1AgentsAgentIdDeleteResponse200 = {
|
||||
data: OkResponse;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type deleteAgentApiV1AgentsAgentIdDeleteResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type deleteAgentApiV1AgentsAgentIdDeleteResponseSuccess =
|
||||
deleteAgentApiV1AgentsAgentIdDeleteResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type deleteAgentApiV1AgentsAgentIdDeleteResponseError =
|
||||
deleteAgentApiV1AgentsAgentIdDeleteResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type deleteAgentApiV1AgentsAgentIdDeleteResponse =
|
||||
| deleteAgentApiV1AgentsAgentIdDeleteResponseSuccess
|
||||
| deleteAgentApiV1AgentsAgentIdDeleteResponseError;
|
||||
|
||||
export const getDeleteAgentApiV1AgentsAgentIdDeleteUrl = (agentId: string) => {
|
||||
return `/api/v1/agents/${agentId}`;
|
||||
};
|
||||
|
||||
export const deleteAgentApiV1AgentsAgentIdDelete = async (
|
||||
agentId: string,
|
||||
options?: RequestInit,
|
||||
): Promise<deleteAgentApiV1AgentsAgentIdDeleteResponse> => {
|
||||
return customFetch<deleteAgentApiV1AgentsAgentIdDeleteResponse>(
|
||||
getDeleteAgentApiV1AgentsAgentIdDeleteUrl(agentId),
|
||||
{
|
||||
...options,
|
||||
method: "DELETE",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getDeleteAgentApiV1AgentsAgentIdDeleteMutationOptions = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteAgentApiV1AgentsAgentIdDelete>>,
|
||||
TError,
|
||||
{ agentId: string },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteAgentApiV1AgentsAgentIdDelete>>,
|
||||
TError,
|
||||
{ agentId: string },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["deleteAgentApiV1AgentsAgentIdDelete"];
|
||||
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 deleteAgentApiV1AgentsAgentIdDelete>>,
|
||||
{ agentId: string }
|
||||
> = (props) => {
|
||||
const { agentId } = props ?? {};
|
||||
|
||||
return deleteAgentApiV1AgentsAgentIdDelete(agentId, requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type DeleteAgentApiV1AgentsAgentIdDeleteMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof deleteAgentApiV1AgentsAgentIdDelete>>
|
||||
>;
|
||||
|
||||
export type DeleteAgentApiV1AgentsAgentIdDeleteMutationError =
|
||||
HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Delete Agent
|
||||
*/
|
||||
export const useDeleteAgentApiV1AgentsAgentIdDelete = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteAgentApiV1AgentsAgentIdDelete>>,
|
||||
TError,
|
||||
{ agentId: string },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof deleteAgentApiV1AgentsAgentIdDelete>>,
|
||||
TError,
|
||||
{ agentId: string },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(
|
||||
getDeleteAgentApiV1AgentsAgentIdDeleteMutationOptions(options),
|
||||
queryClient,
|
||||
);
|
||||
};
|
||||
/**
|
||||
* @summary Get Agent
|
||||
*/
|
||||
@@ -1175,6 +932,122 @@ export const useUpdateAgentApiV1AgentsAgentIdPatch = <
|
||||
queryClient,
|
||||
);
|
||||
};
|
||||
/**
|
||||
* @summary Delete Agent
|
||||
*/
|
||||
export type deleteAgentApiV1AgentsAgentIdDeleteResponse200 = {
|
||||
data: OkResponse;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type deleteAgentApiV1AgentsAgentIdDeleteResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type deleteAgentApiV1AgentsAgentIdDeleteResponseSuccess =
|
||||
deleteAgentApiV1AgentsAgentIdDeleteResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type deleteAgentApiV1AgentsAgentIdDeleteResponseError =
|
||||
deleteAgentApiV1AgentsAgentIdDeleteResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type deleteAgentApiV1AgentsAgentIdDeleteResponse =
|
||||
| deleteAgentApiV1AgentsAgentIdDeleteResponseSuccess
|
||||
| deleteAgentApiV1AgentsAgentIdDeleteResponseError;
|
||||
|
||||
export const getDeleteAgentApiV1AgentsAgentIdDeleteUrl = (agentId: string) => {
|
||||
return `/api/v1/agents/${agentId}`;
|
||||
};
|
||||
|
||||
export const deleteAgentApiV1AgentsAgentIdDelete = async (
|
||||
agentId: string,
|
||||
options?: RequestInit,
|
||||
): Promise<deleteAgentApiV1AgentsAgentIdDeleteResponse> => {
|
||||
return customFetch<deleteAgentApiV1AgentsAgentIdDeleteResponse>(
|
||||
getDeleteAgentApiV1AgentsAgentIdDeleteUrl(agentId),
|
||||
{
|
||||
...options,
|
||||
method: "DELETE",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getDeleteAgentApiV1AgentsAgentIdDeleteMutationOptions = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteAgentApiV1AgentsAgentIdDelete>>,
|
||||
TError,
|
||||
{ agentId: string },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteAgentApiV1AgentsAgentIdDelete>>,
|
||||
TError,
|
||||
{ agentId: string },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["deleteAgentApiV1AgentsAgentIdDelete"];
|
||||
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 deleteAgentApiV1AgentsAgentIdDelete>>,
|
||||
{ agentId: string }
|
||||
> = (props) => {
|
||||
const { agentId } = props ?? {};
|
||||
|
||||
return deleteAgentApiV1AgentsAgentIdDelete(agentId, requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type DeleteAgentApiV1AgentsAgentIdDeleteMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof deleteAgentApiV1AgentsAgentIdDelete>>
|
||||
>;
|
||||
|
||||
export type DeleteAgentApiV1AgentsAgentIdDeleteMutationError =
|
||||
HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Delete Agent
|
||||
*/
|
||||
export const useDeleteAgentApiV1AgentsAgentIdDelete = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteAgentApiV1AgentsAgentIdDelete>>,
|
||||
TError,
|
||||
{ agentId: string },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof deleteAgentApiV1AgentsAgentIdDelete>>,
|
||||
TError,
|
||||
{ agentId: string },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(
|
||||
getDeleteAgentApiV1AgentsAgentIdDeleteMutationOptions(options),
|
||||
queryClient,
|
||||
);
|
||||
};
|
||||
/**
|
||||
* @summary Heartbeat Agent
|
||||
*/
|
||||
@@ -1302,3 +1175,130 @@ export const useHeartbeatAgentApiV1AgentsAgentIdHeartbeatPost = <
|
||||
queryClient,
|
||||
);
|
||||
};
|
||||
/**
|
||||
* @summary Heartbeat Or Create Agent
|
||||
*/
|
||||
export type heartbeatOrCreateAgentApiV1AgentsHeartbeatPostResponse200 = {
|
||||
data: AgentRead;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type heartbeatOrCreateAgentApiV1AgentsHeartbeatPostResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type heartbeatOrCreateAgentApiV1AgentsHeartbeatPostResponseSuccess =
|
||||
heartbeatOrCreateAgentApiV1AgentsHeartbeatPostResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type heartbeatOrCreateAgentApiV1AgentsHeartbeatPostResponseError =
|
||||
heartbeatOrCreateAgentApiV1AgentsHeartbeatPostResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type heartbeatOrCreateAgentApiV1AgentsHeartbeatPostResponse =
|
||||
| heartbeatOrCreateAgentApiV1AgentsHeartbeatPostResponseSuccess
|
||||
| heartbeatOrCreateAgentApiV1AgentsHeartbeatPostResponseError;
|
||||
|
||||
export const getHeartbeatOrCreateAgentApiV1AgentsHeartbeatPostUrl = () => {
|
||||
return `/api/v1/agents/heartbeat`;
|
||||
};
|
||||
|
||||
export const heartbeatOrCreateAgentApiV1AgentsHeartbeatPost = async (
|
||||
agentHeartbeatCreate: AgentHeartbeatCreate,
|
||||
options?: RequestInit,
|
||||
): Promise<heartbeatOrCreateAgentApiV1AgentsHeartbeatPostResponse> => {
|
||||
return customFetch<heartbeatOrCreateAgentApiV1AgentsHeartbeatPostResponse>(
|
||||
getHeartbeatOrCreateAgentApiV1AgentsHeartbeatPostUrl(),
|
||||
{
|
||||
...options,
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||
body: JSON.stringify(agentHeartbeatCreate),
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getHeartbeatOrCreateAgentApiV1AgentsHeartbeatPostMutationOptions =
|
||||
<TError = HTTPValidationError, TContext = unknown>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof heartbeatOrCreateAgentApiV1AgentsHeartbeatPost>
|
||||
>,
|
||||
TError,
|
||||
{ data: AgentHeartbeatCreate },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof heartbeatOrCreateAgentApiV1AgentsHeartbeatPost>>,
|
||||
TError,
|
||||
{ data: AgentHeartbeatCreate },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["heartbeatOrCreateAgentApiV1AgentsHeartbeatPost"];
|
||||
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 heartbeatOrCreateAgentApiV1AgentsHeartbeatPost>
|
||||
>,
|
||||
{ data: AgentHeartbeatCreate }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
return heartbeatOrCreateAgentApiV1AgentsHeartbeatPost(
|
||||
data,
|
||||
requestOptions,
|
||||
);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type HeartbeatOrCreateAgentApiV1AgentsHeartbeatPostMutationResult =
|
||||
NonNullable<
|
||||
Awaited<ReturnType<typeof heartbeatOrCreateAgentApiV1AgentsHeartbeatPost>>
|
||||
>;
|
||||
export type HeartbeatOrCreateAgentApiV1AgentsHeartbeatPostMutationBody =
|
||||
AgentHeartbeatCreate;
|
||||
export type HeartbeatOrCreateAgentApiV1AgentsHeartbeatPostMutationError =
|
||||
HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Heartbeat Or Create Agent
|
||||
*/
|
||||
export const useHeartbeatOrCreateAgentApiV1AgentsHeartbeatPost = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof heartbeatOrCreateAgentApiV1AgentsHeartbeatPost>
|
||||
>,
|
||||
TError,
|
||||
{ data: AgentHeartbeatCreate },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof heartbeatOrCreateAgentApiV1AgentsHeartbeatPost>>,
|
||||
TError,
|
||||
{ data: AgentHeartbeatCreate },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(
|
||||
getHeartbeatOrCreateAgentApiV1AgentsHeartbeatPostMutationOptions(options),
|
||||
queryClient,
|
||||
);
|
||||
};
|
||||
|
||||
1596
frontend/src/api/generated/board-group-memory/board-group-memory.ts
Normal file
1596
frontend/src/api/generated/board-group-memory/board-group-memory.ts
Normal file
File diff suppressed because it is too large
Load Diff
1286
frontend/src/api/generated/board-groups/board-groups.ts
Normal file
1286
frontend/src/api/generated/board-groups/board-groups.ts
Normal file
File diff suppressed because it is too large
Load Diff
@@ -273,6 +273,296 @@ export function useGetOnboardingApiV1BoardsBoardIdOnboardingGet<
|
||||
return { ...query, queryKey: queryOptions.queryKey };
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Start Onboarding
|
||||
*/
|
||||
export type startOnboardingApiV1BoardsBoardIdOnboardingStartPostResponse200 = {
|
||||
data: BoardOnboardingRead;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type startOnboardingApiV1BoardsBoardIdOnboardingStartPostResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type startOnboardingApiV1BoardsBoardIdOnboardingStartPostResponseSuccess =
|
||||
startOnboardingApiV1BoardsBoardIdOnboardingStartPostResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type startOnboardingApiV1BoardsBoardIdOnboardingStartPostResponseError =
|
||||
startOnboardingApiV1BoardsBoardIdOnboardingStartPostResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type startOnboardingApiV1BoardsBoardIdOnboardingStartPostResponse =
|
||||
| startOnboardingApiV1BoardsBoardIdOnboardingStartPostResponseSuccess
|
||||
| startOnboardingApiV1BoardsBoardIdOnboardingStartPostResponseError;
|
||||
|
||||
export const getStartOnboardingApiV1BoardsBoardIdOnboardingStartPostUrl = (
|
||||
boardId: string,
|
||||
) => {
|
||||
return `/api/v1/boards/${boardId}/onboarding/start`;
|
||||
};
|
||||
|
||||
export const startOnboardingApiV1BoardsBoardIdOnboardingStartPost = async (
|
||||
boardId: string,
|
||||
boardOnboardingStart: BoardOnboardingStart,
|
||||
options?: RequestInit,
|
||||
): Promise<startOnboardingApiV1BoardsBoardIdOnboardingStartPostResponse> => {
|
||||
return customFetch<startOnboardingApiV1BoardsBoardIdOnboardingStartPostResponse>(
|
||||
getStartOnboardingApiV1BoardsBoardIdOnboardingStartPostUrl(boardId),
|
||||
{
|
||||
...options,
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||
body: JSON.stringify(boardOnboardingStart),
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getStartOnboardingApiV1BoardsBoardIdOnboardingStartPostMutationOptions =
|
||||
<TError = HTTPValidationError, TContext = unknown>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof startOnboardingApiV1BoardsBoardIdOnboardingStartPost>
|
||||
>,
|
||||
TError,
|
||||
{ boardId: string; data: BoardOnboardingStart },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof startOnboardingApiV1BoardsBoardIdOnboardingStartPost>
|
||||
>,
|
||||
TError,
|
||||
{ boardId: string; data: BoardOnboardingStart },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = [
|
||||
"startOnboardingApiV1BoardsBoardIdOnboardingStartPost",
|
||||
];
|
||||
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 startOnboardingApiV1BoardsBoardIdOnboardingStartPost>
|
||||
>,
|
||||
{ boardId: string; data: BoardOnboardingStart }
|
||||
> = (props) => {
|
||||
const { boardId, data } = props ?? {};
|
||||
|
||||
return startOnboardingApiV1BoardsBoardIdOnboardingStartPost(
|
||||
boardId,
|
||||
data,
|
||||
requestOptions,
|
||||
);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type StartOnboardingApiV1BoardsBoardIdOnboardingStartPostMutationResult =
|
||||
NonNullable<
|
||||
Awaited<
|
||||
ReturnType<typeof startOnboardingApiV1BoardsBoardIdOnboardingStartPost>
|
||||
>
|
||||
>;
|
||||
export type StartOnboardingApiV1BoardsBoardIdOnboardingStartPostMutationBody =
|
||||
BoardOnboardingStart;
|
||||
export type StartOnboardingApiV1BoardsBoardIdOnboardingStartPostMutationError =
|
||||
HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Start Onboarding
|
||||
*/
|
||||
export const useStartOnboardingApiV1BoardsBoardIdOnboardingStartPost = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof startOnboardingApiV1BoardsBoardIdOnboardingStartPost>
|
||||
>,
|
||||
TError,
|
||||
{ boardId: string; data: BoardOnboardingStart },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<
|
||||
ReturnType<typeof startOnboardingApiV1BoardsBoardIdOnboardingStartPost>
|
||||
>,
|
||||
TError,
|
||||
{ boardId: string; data: BoardOnboardingStart },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(
|
||||
getStartOnboardingApiV1BoardsBoardIdOnboardingStartPostMutationOptions(
|
||||
options,
|
||||
),
|
||||
queryClient,
|
||||
);
|
||||
};
|
||||
/**
|
||||
* @summary Answer Onboarding
|
||||
*/
|
||||
export type answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostResponse200 =
|
||||
{
|
||||
data: BoardOnboardingRead;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostResponse422 =
|
||||
{
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostResponseSuccess =
|
||||
answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostResponseError =
|
||||
answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostResponse =
|
||||
| answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostResponseSuccess
|
||||
| answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostResponseError;
|
||||
|
||||
export const getAnswerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostUrl = (
|
||||
boardId: string,
|
||||
) => {
|
||||
return `/api/v1/boards/${boardId}/onboarding/answer`;
|
||||
};
|
||||
|
||||
export const answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPost = async (
|
||||
boardId: string,
|
||||
boardOnboardingAnswer: BoardOnboardingAnswer,
|
||||
options?: RequestInit,
|
||||
): Promise<answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostResponse> => {
|
||||
return customFetch<answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostResponse>(
|
||||
getAnswerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostUrl(boardId),
|
||||
{
|
||||
...options,
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||
body: JSON.stringify(boardOnboardingAnswer),
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getAnswerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostMutationOptions =
|
||||
<TError = HTTPValidationError, TContext = unknown>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPost
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
{ boardId: string; data: BoardOnboardingAnswer },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPost>
|
||||
>,
|
||||
TError,
|
||||
{ boardId: string; data: BoardOnboardingAnswer },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = [
|
||||
"answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPost",
|
||||
];
|
||||
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 answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPost
|
||||
>
|
||||
>,
|
||||
{ boardId: string; data: BoardOnboardingAnswer }
|
||||
> = (props) => {
|
||||
const { boardId, data } = props ?? {};
|
||||
|
||||
return answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPost(
|
||||
boardId,
|
||||
data,
|
||||
requestOptions,
|
||||
);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type AnswerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostMutationResult =
|
||||
NonNullable<
|
||||
Awaited<
|
||||
ReturnType<typeof answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPost>
|
||||
>
|
||||
>;
|
||||
export type AnswerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostMutationBody =
|
||||
BoardOnboardingAnswer;
|
||||
export type AnswerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostMutationError =
|
||||
HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Answer Onboarding
|
||||
*/
|
||||
export const useAnswerOnboardingApiV1BoardsBoardIdOnboardingAnswerPost = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPost
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
{ boardId: string; data: BoardOnboardingAnswer },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<
|
||||
ReturnType<typeof answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPost>
|
||||
>,
|
||||
TError,
|
||||
{ boardId: string; data: BoardOnboardingAnswer },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(
|
||||
getAnswerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostMutationOptions(
|
||||
options,
|
||||
),
|
||||
queryClient,
|
||||
);
|
||||
};
|
||||
/**
|
||||
* @summary Agent Onboarding Update
|
||||
*/
|
||||
@@ -447,155 +737,6 @@ export const useAgentOnboardingUpdateApiV1BoardsBoardIdOnboardingAgentPost = <
|
||||
queryClient,
|
||||
);
|
||||
};
|
||||
/**
|
||||
* @summary Answer Onboarding
|
||||
*/
|
||||
export type answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostResponse200 =
|
||||
{
|
||||
data: BoardOnboardingRead;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostResponse422 =
|
||||
{
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostResponseSuccess =
|
||||
answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostResponseError =
|
||||
answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostResponse =
|
||||
| answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostResponseSuccess
|
||||
| answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostResponseError;
|
||||
|
||||
export const getAnswerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostUrl = (
|
||||
boardId: string,
|
||||
) => {
|
||||
return `/api/v1/boards/${boardId}/onboarding/answer`;
|
||||
};
|
||||
|
||||
export const answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPost = async (
|
||||
boardId: string,
|
||||
boardOnboardingAnswer: BoardOnboardingAnswer,
|
||||
options?: RequestInit,
|
||||
): Promise<answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostResponse> => {
|
||||
return customFetch<answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostResponse>(
|
||||
getAnswerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostUrl(boardId),
|
||||
{
|
||||
...options,
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||
body: JSON.stringify(boardOnboardingAnswer),
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getAnswerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostMutationOptions =
|
||||
<TError = HTTPValidationError, TContext = unknown>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPost
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
{ boardId: string; data: BoardOnboardingAnswer },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPost>
|
||||
>,
|
||||
TError,
|
||||
{ boardId: string; data: BoardOnboardingAnswer },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = [
|
||||
"answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPost",
|
||||
];
|
||||
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 answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPost
|
||||
>
|
||||
>,
|
||||
{ boardId: string; data: BoardOnboardingAnswer }
|
||||
> = (props) => {
|
||||
const { boardId, data } = props ?? {};
|
||||
|
||||
return answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPost(
|
||||
boardId,
|
||||
data,
|
||||
requestOptions,
|
||||
);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type AnswerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostMutationResult =
|
||||
NonNullable<
|
||||
Awaited<
|
||||
ReturnType<typeof answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPost>
|
||||
>
|
||||
>;
|
||||
export type AnswerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostMutationBody =
|
||||
BoardOnboardingAnswer;
|
||||
export type AnswerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostMutationError =
|
||||
HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Answer Onboarding
|
||||
*/
|
||||
export const useAnswerOnboardingApiV1BoardsBoardIdOnboardingAnswerPost = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPost
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
{ boardId: string; data: BoardOnboardingAnswer },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<
|
||||
ReturnType<typeof answerOnboardingApiV1BoardsBoardIdOnboardingAnswerPost>
|
||||
>,
|
||||
TError,
|
||||
{ boardId: string; data: BoardOnboardingAnswer },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(
|
||||
getAnswerOnboardingApiV1BoardsBoardIdOnboardingAnswerPostMutationOptions(
|
||||
options,
|
||||
),
|
||||
queryClient,
|
||||
);
|
||||
};
|
||||
/**
|
||||
* @summary Confirm Onboarding
|
||||
*/
|
||||
@@ -749,144 +890,3 @@ export const useConfirmOnboardingApiV1BoardsBoardIdOnboardingConfirmPost = <
|
||||
queryClient,
|
||||
);
|
||||
};
|
||||
/**
|
||||
* @summary Start Onboarding
|
||||
*/
|
||||
export type startOnboardingApiV1BoardsBoardIdOnboardingStartPostResponse200 = {
|
||||
data: BoardOnboardingRead;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type startOnboardingApiV1BoardsBoardIdOnboardingStartPostResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type startOnboardingApiV1BoardsBoardIdOnboardingStartPostResponseSuccess =
|
||||
startOnboardingApiV1BoardsBoardIdOnboardingStartPostResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type startOnboardingApiV1BoardsBoardIdOnboardingStartPostResponseError =
|
||||
startOnboardingApiV1BoardsBoardIdOnboardingStartPostResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type startOnboardingApiV1BoardsBoardIdOnboardingStartPostResponse =
|
||||
| startOnboardingApiV1BoardsBoardIdOnboardingStartPostResponseSuccess
|
||||
| startOnboardingApiV1BoardsBoardIdOnboardingStartPostResponseError;
|
||||
|
||||
export const getStartOnboardingApiV1BoardsBoardIdOnboardingStartPostUrl = (
|
||||
boardId: string,
|
||||
) => {
|
||||
return `/api/v1/boards/${boardId}/onboarding/start`;
|
||||
};
|
||||
|
||||
export const startOnboardingApiV1BoardsBoardIdOnboardingStartPost = async (
|
||||
boardId: string,
|
||||
boardOnboardingStart: BoardOnboardingStart,
|
||||
options?: RequestInit,
|
||||
): Promise<startOnboardingApiV1BoardsBoardIdOnboardingStartPostResponse> => {
|
||||
return customFetch<startOnboardingApiV1BoardsBoardIdOnboardingStartPostResponse>(
|
||||
getStartOnboardingApiV1BoardsBoardIdOnboardingStartPostUrl(boardId),
|
||||
{
|
||||
...options,
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||
body: JSON.stringify(boardOnboardingStart),
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getStartOnboardingApiV1BoardsBoardIdOnboardingStartPostMutationOptions =
|
||||
<TError = HTTPValidationError, TContext = unknown>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof startOnboardingApiV1BoardsBoardIdOnboardingStartPost>
|
||||
>,
|
||||
TError,
|
||||
{ boardId: string; data: BoardOnboardingStart },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof startOnboardingApiV1BoardsBoardIdOnboardingStartPost>
|
||||
>,
|
||||
TError,
|
||||
{ boardId: string; data: BoardOnboardingStart },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = [
|
||||
"startOnboardingApiV1BoardsBoardIdOnboardingStartPost",
|
||||
];
|
||||
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 startOnboardingApiV1BoardsBoardIdOnboardingStartPost>
|
||||
>,
|
||||
{ boardId: string; data: BoardOnboardingStart }
|
||||
> = (props) => {
|
||||
const { boardId, data } = props ?? {};
|
||||
|
||||
return startOnboardingApiV1BoardsBoardIdOnboardingStartPost(
|
||||
boardId,
|
||||
data,
|
||||
requestOptions,
|
||||
);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type StartOnboardingApiV1BoardsBoardIdOnboardingStartPostMutationResult =
|
||||
NonNullable<
|
||||
Awaited<
|
||||
ReturnType<typeof startOnboardingApiV1BoardsBoardIdOnboardingStartPost>
|
||||
>
|
||||
>;
|
||||
export type StartOnboardingApiV1BoardsBoardIdOnboardingStartPostMutationBody =
|
||||
BoardOnboardingStart;
|
||||
export type StartOnboardingApiV1BoardsBoardIdOnboardingStartPostMutationError =
|
||||
HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Start Onboarding
|
||||
*/
|
||||
export const useStartOnboardingApiV1BoardsBoardIdOnboardingStartPost = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof startOnboardingApiV1BoardsBoardIdOnboardingStartPost>
|
||||
>,
|
||||
TError,
|
||||
{ boardId: string; data: BoardOnboardingStart },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<
|
||||
ReturnType<typeof startOnboardingApiV1BoardsBoardIdOnboardingStartPost>
|
||||
>,
|
||||
TError,
|
||||
{ boardId: string; data: BoardOnboardingStart },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(
|
||||
getStartOnboardingApiV1BoardsBoardIdOnboardingStartPostMutationOptions(
|
||||
options,
|
||||
),
|
||||
queryClient,
|
||||
);
|
||||
};
|
||||
|
||||
@@ -22,9 +22,11 @@ import type {
|
||||
|
||||
import type {
|
||||
BoardCreate,
|
||||
BoardGroupSnapshot,
|
||||
BoardRead,
|
||||
BoardSnapshot,
|
||||
BoardUpdate,
|
||||
GetBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGetParams,
|
||||
HTTPValidationError,
|
||||
LimitOffsetPageTypeVarCustomizedBoardRead,
|
||||
ListBoardsApiV1BoardsGetParams,
|
||||
@@ -359,122 +361,6 @@ export const useCreateBoardApiV1BoardsPost = <
|
||||
queryClient,
|
||||
);
|
||||
};
|
||||
/**
|
||||
* @summary Delete Board
|
||||
*/
|
||||
export type deleteBoardApiV1BoardsBoardIdDeleteResponse200 = {
|
||||
data: OkResponse;
|
||||
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,
|
||||
);
|
||||
};
|
||||
/**
|
||||
* @summary Get Board
|
||||
*/
|
||||
@@ -793,6 +679,122 @@ export const useUpdateBoardApiV1BoardsBoardIdPatch = <
|
||||
queryClient,
|
||||
);
|
||||
};
|
||||
/**
|
||||
* @summary Delete Board
|
||||
*/
|
||||
export type deleteBoardApiV1BoardsBoardIdDeleteResponse200 = {
|
||||
data: OkResponse;
|
||||
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,
|
||||
);
|
||||
};
|
||||
/**
|
||||
* @summary Get Board Snapshot
|
||||
*/
|
||||
@@ -1030,3 +1032,305 @@ export function useGetBoardSnapshotApiV1BoardsBoardIdSnapshotGet<
|
||||
|
||||
return { ...query, queryKey: queryOptions.queryKey };
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Get Board Group Snapshot
|
||||
*/
|
||||
export type getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGetResponse200 =
|
||||
{
|
||||
data: BoardGroupSnapshot;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGetResponse422 =
|
||||
{
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGetResponseSuccess =
|
||||
getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGetResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGetResponseError =
|
||||
getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGetResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGetResponse =
|
||||
| getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGetResponseSuccess
|
||||
| getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGetResponseError;
|
||||
|
||||
export const getGetBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGetUrl = (
|
||||
boardId: string,
|
||||
params?: GetBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGetParams,
|
||||
) => {
|
||||
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/boards/${boardId}/group-snapshot?${stringifiedParams}`
|
||||
: `/api/v1/boards/${boardId}/group-snapshot`;
|
||||
};
|
||||
|
||||
export const getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGet = async (
|
||||
boardId: string,
|
||||
params?: GetBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGetParams,
|
||||
options?: RequestInit,
|
||||
): Promise<getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGetResponse> => {
|
||||
return customFetch<getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGetResponse>(
|
||||
getGetBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGetUrl(
|
||||
boardId,
|
||||
params,
|
||||
),
|
||||
{
|
||||
...options,
|
||||
method: "GET",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getGetBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGetQueryKey =
|
||||
(
|
||||
boardId: string,
|
||||
params?: GetBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGetParams,
|
||||
) => {
|
||||
return [
|
||||
`/api/v1/boards/${boardId}/group-snapshot`,
|
||||
...(params ? [params] : []),
|
||||
] as const;
|
||||
};
|
||||
|
||||
export const getGetBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGetQueryOptions =
|
||||
<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
boardId: string,
|
||||
params?: GetBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGetParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGet
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey =
|
||||
queryOptions?.queryKey ??
|
||||
getGetBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGetQueryKey(
|
||||
boardId,
|
||||
params,
|
||||
);
|
||||
|
||||
const queryFn: QueryFunction<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGet
|
||||
>
|
||||
>
|
||||
> = ({ signal }) =>
|
||||
getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGet(boardId, params, {
|
||||
signal,
|
||||
...requestOptions,
|
||||
});
|
||||
|
||||
return {
|
||||
queryKey,
|
||||
queryFn,
|
||||
enabled: !!boardId,
|
||||
...queryOptions,
|
||||
} as UseQueryOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGet
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type GetBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGetQueryResult =
|
||||
NonNullable<
|
||||
Awaited<
|
||||
ReturnType<typeof getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGet>
|
||||
>
|
||||
>;
|
||||
export type GetBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGetQueryError =
|
||||
HTTPValidationError;
|
||||
|
||||
export function useGetBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
boardId: string,
|
||||
params:
|
||||
| undefined
|
||||
| GetBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGetParams,
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGet
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGet
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGet
|
||||
>
|
||||
>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
boardId: string,
|
||||
params?: GetBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGetParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGet
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGet
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGet
|
||||
>
|
||||
>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
boardId: string,
|
||||
params?: GetBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGetParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGet
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary Get Board Group Snapshot
|
||||
*/
|
||||
|
||||
export function useGetBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
boardId: string,
|
||||
params?: GetBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGetParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGet
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions =
|
||||
getGetBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGetQueryOptions(
|
||||
boardId,
|
||||
params,
|
||||
options,
|
||||
);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
return { ...query, queryKey: queryOptions.queryKey };
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -6,10 +6,10 @@
|
||||
*/
|
||||
|
||||
export interface ActivityEventRead {
|
||||
agent_id: string | null;
|
||||
created_at: string;
|
||||
event_type: string;
|
||||
id: string;
|
||||
event_type: string;
|
||||
message: string | null;
|
||||
agent_id: string | null;
|
||||
task_id: string | null;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
*/
|
||||
|
||||
export interface ActivityTaskCommentFeedItemRead {
|
||||
id: string;
|
||||
created_at: string;
|
||||
message: string | null;
|
||||
agent_id: string | null;
|
||||
agent_name?: string | null;
|
||||
agent_role?: string | null;
|
||||
board_id: string;
|
||||
board_name: string;
|
||||
created_at: string;
|
||||
id: string;
|
||||
message: string | null;
|
||||
task_id: string;
|
||||
task_title: string;
|
||||
board_id: string;
|
||||
board_name: string;
|
||||
}
|
||||
|
||||
@@ -9,11 +9,11 @@ import type { AgentCreateIdentityProfile } from "./agentCreateIdentityProfile";
|
||||
|
||||
export interface AgentCreate {
|
||||
board_id?: string | null;
|
||||
/** @minLength 1 */
|
||||
name: string;
|
||||
status?: string;
|
||||
heartbeat_config?: AgentCreateHeartbeatConfig;
|
||||
identity_profile?: AgentCreateIdentityProfile;
|
||||
identity_template?: string | null;
|
||||
/** @minLength 1 */
|
||||
name: string;
|
||||
soul_template?: string | null;
|
||||
status?: string;
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
*/
|
||||
|
||||
export interface AgentHeartbeatCreate {
|
||||
board_id?: string | null;
|
||||
status?: string | null;
|
||||
/** @minLength 1 */
|
||||
name: string;
|
||||
status?: string | null;
|
||||
board_id?: string | null;
|
||||
}
|
||||
|
||||
@@ -9,18 +9,18 @@ import type { AgentReadIdentityProfile } from "./agentReadIdentityProfile";
|
||||
|
||||
export interface AgentRead {
|
||||
board_id?: string | null;
|
||||
created_at: string;
|
||||
heartbeat_config?: AgentReadHeartbeatConfig;
|
||||
id: string;
|
||||
identity_profile?: AgentReadIdentityProfile;
|
||||
identity_template?: string | null;
|
||||
is_board_lead?: boolean;
|
||||
is_gateway_main?: boolean;
|
||||
last_seen_at: string | null;
|
||||
/** @minLength 1 */
|
||||
name: string;
|
||||
openclaw_session_id?: string | null;
|
||||
soul_template?: string | null;
|
||||
status?: string;
|
||||
heartbeat_config?: AgentReadHeartbeatConfig;
|
||||
identity_profile?: AgentReadIdentityProfile;
|
||||
identity_template?: string | null;
|
||||
soul_template?: string | null;
|
||||
id: string;
|
||||
is_board_lead?: boolean;
|
||||
is_gateway_main?: boolean;
|
||||
openclaw_session_id?: string | null;
|
||||
last_seen_at: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
@@ -9,11 +9,11 @@ import type { AgentUpdateIdentityProfile } from "./agentUpdateIdentityProfile";
|
||||
|
||||
export interface AgentUpdate {
|
||||
board_id?: string | null;
|
||||
is_gateway_main?: boolean | null;
|
||||
name?: string | null;
|
||||
status?: string | null;
|
||||
heartbeat_config?: AgentUpdateHeartbeatConfig;
|
||||
identity_profile?: AgentUpdateIdentityProfile;
|
||||
identity_template?: string | null;
|
||||
is_gateway_main?: boolean | null;
|
||||
name?: string | null;
|
||||
soul_template?: string | null;
|
||||
status?: string | null;
|
||||
}
|
||||
|
||||
@@ -10,10 +10,10 @@ import type { ApprovalCreateStatus } from "./approvalCreateStatus";
|
||||
|
||||
export interface ApprovalCreate {
|
||||
action_type: string;
|
||||
agent_id?: string | null;
|
||||
confidence: number;
|
||||
task_id?: string | null;
|
||||
payload?: ApprovalCreatePayload;
|
||||
confidence: number;
|
||||
rubric_scores?: ApprovalCreateRubricScores;
|
||||
status?: ApprovalCreateStatus;
|
||||
task_id?: string | null;
|
||||
agent_id?: string | null;
|
||||
}
|
||||
|
||||
@@ -10,14 +10,14 @@ import type { ApprovalReadStatus } from "./approvalReadStatus";
|
||||
|
||||
export interface ApprovalRead {
|
||||
action_type: string;
|
||||
agent_id?: string | null;
|
||||
board_id: string;
|
||||
confidence: number;
|
||||
created_at: string;
|
||||
id: string;
|
||||
task_id?: string | null;
|
||||
payload?: ApprovalReadPayload;
|
||||
resolved_at?: string | null;
|
||||
confidence: number;
|
||||
rubric_scores?: ApprovalReadRubricScores;
|
||||
status?: ApprovalReadStatus;
|
||||
task_id?: string | null;
|
||||
id: string;
|
||||
board_id: string;
|
||||
agent_id?: string | null;
|
||||
created_at: string;
|
||||
resolved_at?: string | null;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
*/
|
||||
|
||||
export interface BlockedTaskDetail {
|
||||
blocked_by_task_ids?: string[];
|
||||
message: string;
|
||||
blocked_by_task_ids?: string[];
|
||||
}
|
||||
|
||||
@@ -7,13 +7,14 @@
|
||||
import type { BoardCreateSuccessMetrics } from "./boardCreateSuccessMetrics";
|
||||
|
||||
export interface BoardCreate {
|
||||
board_type?: string;
|
||||
gateway_id: string;
|
||||
goal_confirmed?: boolean;
|
||||
goal_source?: string | null;
|
||||
name: string;
|
||||
objective?: string | null;
|
||||
slug: string;
|
||||
gateway_id: string;
|
||||
board_group_id?: string | null;
|
||||
board_type?: string;
|
||||
objective?: string | null;
|
||||
success_metrics?: BoardCreateSuccessMetrics;
|
||||
target_date?: string | null;
|
||||
goal_confirmed?: boolean;
|
||||
goal_source?: string | null;
|
||||
}
|
||||
|
||||
15
frontend/src/api/generated/model/boardGroupBoardSnapshot.ts
Normal file
15
frontend/src/api/generated/model/boardGroupBoardSnapshot.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
|
||||
*/
|
||||
import type { BoardGroupBoardSnapshotTaskCounts } from "./boardGroupBoardSnapshotTaskCounts";
|
||||
import type { BoardGroupTaskSummary } from "./boardGroupTaskSummary";
|
||||
import type { BoardRead } from "./boardRead";
|
||||
|
||||
export interface BoardGroupBoardSnapshot {
|
||||
board: BoardRead;
|
||||
task_counts?: BoardGroupBoardSnapshotTaskCounts;
|
||||
tasks?: BoardGroupTaskSummary[];
|
||||
}
|
||||
@@ -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 BoardGroupBoardSnapshotTaskCounts = { [key: string]: number };
|
||||
12
frontend/src/api/generated/model/boardGroupCreate.ts
Normal file
12
frontend/src/api/generated/model/boardGroupCreate.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 BoardGroupCreate {
|
||||
name: string;
|
||||
slug: string;
|
||||
description?: string | null;
|
||||
}
|
||||
12
frontend/src/api/generated/model/boardGroupHeartbeatApply.ts
Normal file
12
frontend/src/api/generated/model/boardGroupHeartbeatApply.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 BoardGroupHeartbeatApply {
|
||||
every: string;
|
||||
target?: string | null;
|
||||
include_board_leads?: boolean;
|
||||
}
|
||||
@@ -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 { BoardGroupHeartbeatApplyResultRequested } from "./boardGroupHeartbeatApplyResultRequested";
|
||||
|
||||
export interface BoardGroupHeartbeatApplyResult {
|
||||
board_group_id: string;
|
||||
requested: BoardGroupHeartbeatApplyResultRequested;
|
||||
updated_agent_ids: string[];
|
||||
failed_agent_ids: string[];
|
||||
}
|
||||
@@ -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 BoardGroupHeartbeatApplyResultRequested = {
|
||||
[key: string]: unknown;
|
||||
};
|
||||
13
frontend/src/api/generated/model/boardGroupMemoryCreate.ts
Normal file
13
frontend/src/api/generated/model/boardGroupMemoryCreate.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface BoardGroupMemoryCreate {
|
||||
/** @minLength 1 */
|
||||
content: string;
|
||||
tags?: string[] | null;
|
||||
source?: string | null;
|
||||
}
|
||||
16
frontend/src/api/generated/model/boardGroupMemoryRead.ts
Normal file
16
frontend/src/api/generated/model/boardGroupMemoryRead.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 BoardGroupMemoryRead {
|
||||
id: string;
|
||||
board_group_id: string;
|
||||
content: string;
|
||||
tags?: string[] | null;
|
||||
source?: string | null;
|
||||
is_chat?: boolean;
|
||||
created_at: string;
|
||||
}
|
||||
15
frontend/src/api/generated/model/boardGroupRead.ts
Normal file
15
frontend/src/api/generated/model/boardGroupRead.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 BoardGroupRead {
|
||||
name: string;
|
||||
slug: string;
|
||||
description?: string | null;
|
||||
id: string;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
13
frontend/src/api/generated/model/boardGroupSnapshot.ts
Normal file
13
frontend/src/api/generated/model/boardGroupSnapshot.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { BoardGroupBoardSnapshot } from "./boardGroupBoardSnapshot";
|
||||
import type { BoardGroupRead } from "./boardGroupRead";
|
||||
|
||||
export interface BoardGroupSnapshot {
|
||||
group?: BoardGroupRead | null;
|
||||
boards?: BoardGroupBoardSnapshot[];
|
||||
}
|
||||
21
frontend/src/api/generated/model/boardGroupTaskSummary.ts
Normal file
21
frontend/src/api/generated/model/boardGroupTaskSummary.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 BoardGroupTaskSummary {
|
||||
id: string;
|
||||
board_id: string;
|
||||
board_name: string;
|
||||
title: string;
|
||||
status: string;
|
||||
priority: string;
|
||||
assigned_agent_id?: string | null;
|
||||
assignee?: string | null;
|
||||
due_at?: string | null;
|
||||
in_progress_at?: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
12
frontend/src/api/generated/model/boardGroupUpdate.ts
Normal file
12
frontend/src/api/generated/model/boardGroupUpdate.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 BoardGroupUpdate {
|
||||
name?: string | null;
|
||||
slug?: string | null;
|
||||
description?: string | null;
|
||||
}
|
||||
@@ -8,6 +8,6 @@
|
||||
export interface BoardMemoryCreate {
|
||||
/** @minLength 1 */
|
||||
content: string;
|
||||
source?: string | null;
|
||||
tags?: string[] | null;
|
||||
source?: string | null;
|
||||
}
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
*/
|
||||
|
||||
export interface BoardMemoryRead {
|
||||
id: string;
|
||||
board_id: string;
|
||||
content: string;
|
||||
created_at: string;
|
||||
id: string;
|
||||
is_chat?: boolean;
|
||||
source?: string | null;
|
||||
tags?: string[] | null;
|
||||
source?: string | null;
|
||||
is_chat?: boolean;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
@@ -10,10 +10,10 @@ import type { BoardOnboardingUserProfile } from "./boardOnboardingUserProfile";
|
||||
|
||||
export interface BoardOnboardingAgentComplete {
|
||||
board_type: string;
|
||||
lead_agent?: BoardOnboardingLeadAgentDraft | null;
|
||||
objective?: string | null;
|
||||
status: "complete";
|
||||
success_metrics?: BoardOnboardingAgentCompleteSuccessMetrics;
|
||||
target_date?: string | null;
|
||||
status: "complete";
|
||||
user_profile?: BoardOnboardingUserProfile | null;
|
||||
lead_agent?: BoardOnboardingLeadAgentDraft | null;
|
||||
}
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
import type { BoardOnboardingQuestionOption } from "./boardOnboardingQuestionOption";
|
||||
|
||||
export interface BoardOnboardingAgentQuestion {
|
||||
/** @minItems 1 */
|
||||
options: BoardOnboardingQuestionOption[];
|
||||
/** @minLength 1 */
|
||||
question: string;
|
||||
/** @minItems 1 */
|
||||
options: BoardOnboardingQuestionOption[];
|
||||
}
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
import type { BoardOnboardingLeadAgentDraftIdentityProfile } from "./boardOnboardingLeadAgentDraftIdentityProfile";
|
||||
|
||||
export interface BoardOnboardingLeadAgentDraft {
|
||||
autonomy_level?: "ask_first" | "balanced" | "autonomous" | null;
|
||||
custom_instructions?: string | null;
|
||||
identity_profile?: BoardOnboardingLeadAgentDraftIdentityProfile;
|
||||
name?: string | null;
|
||||
identity_profile?: BoardOnboardingLeadAgentDraftIdentityProfile;
|
||||
autonomy_level?: "ask_first" | "balanced" | "autonomous" | null;
|
||||
verbosity?: "concise" | "balanced" | "detailed" | null;
|
||||
output_format?: "bullets" | "mixed" | "narrative" | null;
|
||||
update_cadence?: "asap" | "hourly" | "daily" | "weekly" | null;
|
||||
verbosity?: "concise" | "balanced" | "detailed" | null;
|
||||
custom_instructions?: string | null;
|
||||
}
|
||||
|
||||
@@ -8,12 +8,12 @@ import type { BoardOnboardingAgentComplete } from "./boardOnboardingAgentComplet
|
||||
import type { BoardOnboardingReadMessages } from "./boardOnboardingReadMessages";
|
||||
|
||||
export interface BoardOnboardingRead {
|
||||
board_id: string;
|
||||
created_at: string;
|
||||
draft_goal?: BoardOnboardingAgentComplete | null;
|
||||
id: string;
|
||||
messages?: BoardOnboardingReadMessages;
|
||||
board_id: string;
|
||||
session_key: string;
|
||||
status: string;
|
||||
messages?: BoardOnboardingReadMessages;
|
||||
draft_goal?: BoardOnboardingAgentComplete | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
*/
|
||||
|
||||
export interface BoardOnboardingUserProfile {
|
||||
context?: string | null;
|
||||
notes?: string | null;
|
||||
preferred_name?: string | null;
|
||||
pronouns?: string | null;
|
||||
timezone?: string | null;
|
||||
notes?: string | null;
|
||||
context?: string | null;
|
||||
}
|
||||
|
||||
@@ -7,16 +7,17 @@
|
||||
import type { BoardReadSuccessMetrics } from "./boardReadSuccessMetrics";
|
||||
|
||||
export interface BoardRead {
|
||||
board_type?: string;
|
||||
created_at: string;
|
||||
name: string;
|
||||
slug: string;
|
||||
gateway_id?: string | null;
|
||||
board_group_id?: string | null;
|
||||
board_type?: string;
|
||||
objective?: string | null;
|
||||
success_metrics?: BoardReadSuccessMetrics;
|
||||
target_date?: string | null;
|
||||
goal_confirmed?: boolean;
|
||||
goal_source?: string | null;
|
||||
id: string;
|
||||
name: string;
|
||||
objective?: string | null;
|
||||
slug: string;
|
||||
success_metrics?: BoardReadSuccessMetrics;
|
||||
target_date?: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
@@ -11,10 +11,10 @@ import type { BoardRead } from "./boardRead";
|
||||
import type { TaskCardRead } from "./taskCardRead";
|
||||
|
||||
export interface BoardSnapshot {
|
||||
board: BoardRead;
|
||||
tasks: TaskCardRead[];
|
||||
agents: AgentRead[];
|
||||
approvals: ApprovalRead[];
|
||||
board: BoardRead;
|
||||
chat_messages: BoardMemoryRead[];
|
||||
pending_approvals_count?: number;
|
||||
tasks: TaskCardRead[];
|
||||
}
|
||||
|
||||
@@ -7,13 +7,14 @@
|
||||
import type { BoardUpdateSuccessMetrics } from "./boardUpdateSuccessMetrics";
|
||||
|
||||
export interface BoardUpdate {
|
||||
board_type?: string | null;
|
||||
gateway_id?: string | null;
|
||||
goal_confirmed?: boolean | null;
|
||||
goal_source?: string | null;
|
||||
name?: string | null;
|
||||
objective?: string | null;
|
||||
slug?: string | null;
|
||||
gateway_id?: string | null;
|
||||
board_group_id?: string | null;
|
||||
board_type?: string | null;
|
||||
objective?: string | null;
|
||||
success_metrics?: BoardUpdateSuccessMetrics;
|
||||
target_date?: string | null;
|
||||
goal_confirmed?: boolean | null;
|
||||
goal_source?: string | null;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
export interface DashboardKpis {
|
||||
active_agents: number;
|
||||
tasks_in_progress: number;
|
||||
error_rate_pct: number;
|
||||
median_cycle_time_hours_7d: number | null;
|
||||
tasks_in_progress: number;
|
||||
}
|
||||
|
||||
@@ -10,11 +10,11 @@ import type { DashboardSeriesSet } from "./dashboardSeriesSet";
|
||||
import type { DashboardWipSeriesSet } from "./dashboardWipSeriesSet";
|
||||
|
||||
export interface DashboardMetrics {
|
||||
cycle_time: DashboardSeriesSet;
|
||||
error_rate: DashboardSeriesSet;
|
||||
range: DashboardMetricsRange;
|
||||
generated_at: string;
|
||||
kpis: DashboardKpis;
|
||||
range: DashboardMetricsRange;
|
||||
throughput: DashboardSeriesSet;
|
||||
cycle_time: DashboardSeriesSet;
|
||||
error_rate: DashboardSeriesSet;
|
||||
wip: DashboardWipSeriesSet;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import type { DashboardRangeSeriesRange } from "./dashboardRangeSeriesRange";
|
||||
import type { DashboardSeriesPoint } from "./dashboardSeriesPoint";
|
||||
|
||||
export interface DashboardRangeSeries {
|
||||
range: DashboardRangeSeriesRange;
|
||||
bucket: DashboardRangeSeriesBucket;
|
||||
points: DashboardSeriesPoint[];
|
||||
range: DashboardRangeSeriesRange;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,6 @@
|
||||
import type { DashboardRangeSeries } from "./dashboardRangeSeries";
|
||||
|
||||
export interface DashboardSeriesSet {
|
||||
comparison: DashboardRangeSeries;
|
||||
primary: DashboardRangeSeries;
|
||||
comparison: DashboardRangeSeries;
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
*/
|
||||
|
||||
export interface DashboardWipPoint {
|
||||
in_progress: number;
|
||||
inbox: number;
|
||||
period: string;
|
||||
inbox: number;
|
||||
in_progress: number;
|
||||
review: number;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import type { DashboardWipRangeSeriesBucket } from "./dashboardWipRangeSeriesBuc
|
||||
import type { DashboardWipRangeSeriesRange } from "./dashboardWipRangeSeriesRange";
|
||||
|
||||
export interface DashboardWipRangeSeries {
|
||||
range: DashboardWipRangeSeriesRange;
|
||||
bucket: DashboardWipRangeSeriesBucket;
|
||||
points: DashboardWipPoint[];
|
||||
range: DashboardWipRangeSeriesRange;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,6 @@
|
||||
import type { DashboardWipRangeSeries } from "./dashboardWipRangeSeries";
|
||||
|
||||
export interface DashboardWipSeriesSet {
|
||||
comparison: DashboardWipRangeSeries;
|
||||
primary: DashboardWipRangeSeries;
|
||||
comparison: DashboardWipRangeSeries;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
export interface GatewayCommandsResponse {
|
||||
events: string[];
|
||||
methods: string[];
|
||||
protocol_version: number;
|
||||
methods: string[];
|
||||
events: string[];
|
||||
}
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
*/
|
||||
|
||||
export interface GatewayCreate {
|
||||
main_session_key: string;
|
||||
name: string;
|
||||
token?: string | null;
|
||||
url: string;
|
||||
main_session_key: string;
|
||||
workspace_root: string;
|
||||
token?: string | null;
|
||||
}
|
||||
|
||||
@@ -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 GatewayLeadBroadcastBoardResult {
|
||||
board_id: string;
|
||||
lead_agent_id?: string | null;
|
||||
lead_agent_name?: string | null;
|
||||
ok?: boolean;
|
||||
error?: string | null;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { GatewayLeadBroadcastRequestKind } from "./gatewayLeadBroadcastRequestKind";
|
||||
|
||||
export interface GatewayLeadBroadcastRequest {
|
||||
kind?: GatewayLeadBroadcastRequestKind;
|
||||
correlation_id?: string | null;
|
||||
/** @minLength 1 */
|
||||
content: string;
|
||||
board_ids?: string[] | null;
|
||||
reply_tags?: string[];
|
||||
reply_source?: string | null;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type GatewayLeadBroadcastRequestKind =
|
||||
(typeof GatewayLeadBroadcastRequestKind)[keyof typeof GatewayLeadBroadcastRequestKind];
|
||||
|
||||
export const GatewayLeadBroadcastRequestKind = {
|
||||
question: "question",
|
||||
handoff: "handoff",
|
||||
} as const;
|
||||
@@ -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 { GatewayLeadBroadcastBoardResult } from "./gatewayLeadBroadcastBoardResult";
|
||||
|
||||
export interface GatewayLeadBroadcastResponse {
|
||||
ok?: boolean;
|
||||
sent?: number;
|
||||
failed?: number;
|
||||
results?: GatewayLeadBroadcastBoardResult[];
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { GatewayLeadMessageRequestKind } from "./gatewayLeadMessageRequestKind";
|
||||
|
||||
export interface GatewayLeadMessageRequest {
|
||||
kind?: GatewayLeadMessageRequestKind;
|
||||
correlation_id?: string | null;
|
||||
/** @minLength 1 */
|
||||
content: string;
|
||||
reply_tags?: string[];
|
||||
reply_source?: string | null;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type GatewayLeadMessageRequestKind =
|
||||
(typeof GatewayLeadMessageRequestKind)[keyof typeof GatewayLeadMessageRequestKind];
|
||||
|
||||
export const GatewayLeadMessageRequestKind = {
|
||||
question: "question",
|
||||
handoff: "handoff",
|
||||
} as const;
|
||||
@@ -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 GatewayLeadMessageResponse {
|
||||
ok?: boolean;
|
||||
board_id: string;
|
||||
lead_agent_id?: string | null;
|
||||
lead_agent_name?: string | null;
|
||||
lead_created?: boolean;
|
||||
}
|
||||
@@ -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 GatewayMainAskUserRequest {
|
||||
correlation_id?: string | null;
|
||||
/** @minLength 1 */
|
||||
content: string;
|
||||
preferred_channel?: string | null;
|
||||
reply_tags?: string[];
|
||||
reply_source?: 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 interface GatewayMainAskUserResponse {
|
||||
ok?: boolean;
|
||||
board_id: string;
|
||||
main_agent_id?: string | null;
|
||||
main_agent_name?: string | null;
|
||||
}
|
||||
@@ -6,12 +6,12 @@
|
||||
*/
|
||||
|
||||
export interface GatewayRead {
|
||||
created_at: string;
|
||||
id: string;
|
||||
main_session_key: string;
|
||||
name: string;
|
||||
token?: string | null;
|
||||
updated_at: string;
|
||||
url: string;
|
||||
main_session_key: string;
|
||||
workspace_root: string;
|
||||
id: string;
|
||||
token?: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
export interface GatewaySessionsResponse {
|
||||
main_session?: unknown | null;
|
||||
main_session_key?: string | null;
|
||||
sessions: unknown[];
|
||||
main_session_key?: string | null;
|
||||
main_session?: unknown | null;
|
||||
}
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
import type { GatewayTemplatesSyncError } from "./gatewayTemplatesSyncError";
|
||||
|
||||
export interface GatewayTemplatesSyncResult {
|
||||
agents_skipped: number;
|
||||
agents_updated: number;
|
||||
errors?: GatewayTemplatesSyncError[];
|
||||
gateway_id: string;
|
||||
include_main: boolean;
|
||||
main_updated: boolean;
|
||||
reset_sessions: boolean;
|
||||
agents_updated: number;
|
||||
agents_skipped: number;
|
||||
main_updated: boolean;
|
||||
errors?: GatewayTemplatesSyncError[];
|
||||
}
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
*/
|
||||
|
||||
export interface GatewayUpdate {
|
||||
main_session_key?: string | null;
|
||||
name?: string | null;
|
||||
token?: string | null;
|
||||
url?: string | null;
|
||||
token?: string | null;
|
||||
main_session_key?: string | null;
|
||||
workspace_root?: string | null;
|
||||
}
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
|
||||
export interface GatewaysStatusResponse {
|
||||
connected: boolean;
|
||||
error?: string | null;
|
||||
gateway_url: string;
|
||||
sessions_count?: number | null;
|
||||
sessions?: unknown[] | null;
|
||||
main_session_key?: string | null;
|
||||
main_session?: unknown | null;
|
||||
main_session_error?: string | null;
|
||||
main_session_key?: string | null;
|
||||
sessions?: unknown[] | null;
|
||||
sessions_count?: number | null;
|
||||
error?: string | null;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type GetBoardGroupSnapshotApiV1BoardGroupsGroupIdSnapshotGetParams = {
|
||||
include_done?: boolean;
|
||||
per_board_task_limit?: number;
|
||||
};
|
||||
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type GetBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGetParams = {
|
||||
include_self?: boolean;
|
||||
include_done?: boolean;
|
||||
/**
|
||||
* @minimum 0
|
||||
* @maximum 100
|
||||
*/
|
||||
per_board_task_limit?: number;
|
||||
};
|
||||
@@ -34,6 +34,18 @@ export * from "./blockedTaskDetail";
|
||||
export * from "./blockedTaskError";
|
||||
export * from "./boardCreate";
|
||||
export * from "./boardCreateSuccessMetrics";
|
||||
export * from "./boardGroupBoardSnapshot";
|
||||
export * from "./boardGroupBoardSnapshotTaskCounts";
|
||||
export * from "./boardGroupCreate";
|
||||
export * from "./boardGroupHeartbeatApply";
|
||||
export * from "./boardGroupHeartbeatApplyResult";
|
||||
export * from "./boardGroupHeartbeatApplyResultRequested";
|
||||
export * from "./boardGroupMemoryCreate";
|
||||
export * from "./boardGroupMemoryRead";
|
||||
export * from "./boardGroupRead";
|
||||
export * from "./boardGroupSnapshot";
|
||||
export * from "./boardGroupTaskSummary";
|
||||
export * from "./boardGroupUpdate";
|
||||
export * from "./boardMemoryCreate";
|
||||
export * from "./boardMemoryRead";
|
||||
export * from "./boardOnboardingAgentComplete";
|
||||
@@ -78,6 +90,15 @@ export * from "./deleteTaskApiV1BoardsBoardIdTasksTaskIdDelete200";
|
||||
export * from "./gatewayCommandsApiV1GatewayCommandsGet200";
|
||||
export * from "./gatewayCommandsResponse";
|
||||
export * from "./gatewayCreate";
|
||||
export * from "./gatewayLeadBroadcastBoardResult";
|
||||
export * from "./gatewayLeadBroadcastRequest";
|
||||
export * from "./gatewayLeadBroadcastRequestKind";
|
||||
export * from "./gatewayLeadBroadcastResponse";
|
||||
export * from "./gatewayLeadMessageRequest";
|
||||
export * from "./gatewayLeadMessageRequestKind";
|
||||
export * from "./gatewayLeadMessageResponse";
|
||||
export * from "./gatewayMainAskUserRequest";
|
||||
export * from "./gatewayMainAskUserResponse";
|
||||
export * from "./gatewayRead";
|
||||
export * from "./gatewaySessionHistoryResponse";
|
||||
export * from "./gatewaySessionMessageRequest";
|
||||
@@ -90,6 +111,8 @@ export * from "./gatewayStatusApiV1GatewayStatusGetParams";
|
||||
export * from "./gatewayTemplatesSyncError";
|
||||
export * from "./gatewayTemplatesSyncResult";
|
||||
export * from "./gatewayUpdate";
|
||||
export * from "./getBoardGroupSnapshotApiV1BoardGroupsGroupIdSnapshotGetParams";
|
||||
export * from "./getBoardGroupSnapshotApiV1BoardsBoardIdGroupSnapshotGetParams";
|
||||
export * from "./getGatewaySessionApiV1GatewaySessionsSessionIdGet200";
|
||||
export * from "./getGatewaySessionApiV1GatewaySessionsSessionIdGetParams";
|
||||
export * from "./getGatewaySessionApiV1GatewaysSessionsSessionIdGetParams";
|
||||
@@ -103,6 +126,8 @@ export * from "./limitOffsetPageTypeVarCustomizedActivityEventRead";
|
||||
export * from "./limitOffsetPageTypeVarCustomizedActivityTaskCommentFeedItemRead";
|
||||
export * from "./limitOffsetPageTypeVarCustomizedAgentRead";
|
||||
export * from "./limitOffsetPageTypeVarCustomizedApprovalRead";
|
||||
export * from "./limitOffsetPageTypeVarCustomizedBoardGroupMemoryRead";
|
||||
export * from "./limitOffsetPageTypeVarCustomizedBoardGroupRead";
|
||||
export * from "./limitOffsetPageTypeVarCustomizedBoardMemoryRead";
|
||||
export * from "./limitOffsetPageTypeVarCustomizedBoardRead";
|
||||
export * from "./limitOffsetPageTypeVarCustomizedGatewayRead";
|
||||
@@ -113,6 +138,9 @@ export * from "./listAgentsApiV1AgentAgentsGetParams";
|
||||
export * from "./listAgentsApiV1AgentsGetParams";
|
||||
export * from "./listApprovalsApiV1AgentBoardsBoardIdApprovalsGetParams";
|
||||
export * from "./listApprovalsApiV1BoardsBoardIdApprovalsGetParams";
|
||||
export * from "./listBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGetParams";
|
||||
export * from "./listBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGetParams";
|
||||
export * from "./listBoardGroupsApiV1BoardGroupsGetParams";
|
||||
export * from "./listBoardMemoryApiV1AgentBoardsBoardIdMemoryGetParams";
|
||||
export * from "./listBoardMemoryApiV1BoardsBoardIdMemoryGetParams";
|
||||
export * from "./listBoardsApiV1AgentBoardsGetParams";
|
||||
@@ -134,6 +162,8 @@ export * from "./sendSessionMessageApiV1GatewaySessionsSessionIdMessagePostBody"
|
||||
export * from "./sendSessionMessageApiV1GatewaySessionsSessionIdMessagePostParams";
|
||||
export * from "./streamAgentsApiV1AgentsStreamGetParams";
|
||||
export * from "./streamApprovalsApiV1BoardsBoardIdApprovalsStreamGetParams";
|
||||
export * from "./streamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGetParams";
|
||||
export * from "./streamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGetParams";
|
||||
export * from "./streamBoardMemoryApiV1BoardsBoardIdMemoryStreamGetParams";
|
||||
export * from "./streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetParams";
|
||||
export * from "./streamTasksApiV1BoardsBoardIdTasksStreamGetParams";
|
||||
|
||||
@@ -8,10 +8,10 @@ import type { ActivityEventRead } from "./activityEventRead";
|
||||
|
||||
export interface LimitOffsetPageTypeVarCustomizedActivityEventRead {
|
||||
items: ActivityEventRead[];
|
||||
/** @minimum 0 */
|
||||
total: number;
|
||||
/** @minimum 1 */
|
||||
limit: number;
|
||||
/** @minimum 0 */
|
||||
offset: number;
|
||||
/** @minimum 0 */
|
||||
total: number;
|
||||
}
|
||||
|
||||
@@ -8,10 +8,10 @@ import type { ActivityTaskCommentFeedItemRead } from "./activityTaskCommentFeedI
|
||||
|
||||
export interface LimitOffsetPageTypeVarCustomizedActivityTaskCommentFeedItemRead {
|
||||
items: ActivityTaskCommentFeedItemRead[];
|
||||
/** @minimum 0 */
|
||||
total: number;
|
||||
/** @minimum 1 */
|
||||
limit: number;
|
||||
/** @minimum 0 */
|
||||
offset: number;
|
||||
/** @minimum 0 */
|
||||
total: number;
|
||||
}
|
||||
|
||||
@@ -8,10 +8,10 @@ import type { AgentRead } from "./agentRead";
|
||||
|
||||
export interface LimitOffsetPageTypeVarCustomizedAgentRead {
|
||||
items: AgentRead[];
|
||||
/** @minimum 0 */
|
||||
total: number;
|
||||
/** @minimum 1 */
|
||||
limit: number;
|
||||
/** @minimum 0 */
|
||||
offset: number;
|
||||
/** @minimum 0 */
|
||||
total: number;
|
||||
}
|
||||
|
||||
@@ -8,10 +8,10 @@ import type { ApprovalRead } from "./approvalRead";
|
||||
|
||||
export interface LimitOffsetPageTypeVarCustomizedApprovalRead {
|
||||
items: ApprovalRead[];
|
||||
/** @minimum 0 */
|
||||
total: number;
|
||||
/** @minimum 1 */
|
||||
limit: number;
|
||||
/** @minimum 0 */
|
||||
offset: number;
|
||||
/** @minimum 0 */
|
||||
total: number;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { BoardGroupMemoryRead } from "./boardGroupMemoryRead";
|
||||
|
||||
export interface LimitOffsetPageTypeVarCustomizedBoardGroupMemoryRead {
|
||||
items: BoardGroupMemoryRead[];
|
||||
/** @minimum 0 */
|
||||
total: number;
|
||||
/** @minimum 1 */
|
||||
limit: number;
|
||||
/** @minimum 0 */
|
||||
offset: number;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { BoardGroupRead } from "./boardGroupRead";
|
||||
|
||||
export interface LimitOffsetPageTypeVarCustomizedBoardGroupRead {
|
||||
items: BoardGroupRead[];
|
||||
/** @minimum 0 */
|
||||
total: number;
|
||||
/** @minimum 1 */
|
||||
limit: number;
|
||||
/** @minimum 0 */
|
||||
offset: number;
|
||||
}
|
||||
@@ -8,10 +8,10 @@ import type { BoardMemoryRead } from "./boardMemoryRead";
|
||||
|
||||
export interface LimitOffsetPageTypeVarCustomizedBoardMemoryRead {
|
||||
items: BoardMemoryRead[];
|
||||
/** @minimum 0 */
|
||||
total: number;
|
||||
/** @minimum 1 */
|
||||
limit: number;
|
||||
/** @minimum 0 */
|
||||
offset: number;
|
||||
/** @minimum 0 */
|
||||
total: number;
|
||||
}
|
||||
|
||||
@@ -8,10 +8,10 @@ import type { BoardRead } from "./boardRead";
|
||||
|
||||
export interface LimitOffsetPageTypeVarCustomizedBoardRead {
|
||||
items: BoardRead[];
|
||||
/** @minimum 0 */
|
||||
total: number;
|
||||
/** @minimum 1 */
|
||||
limit: number;
|
||||
/** @minimum 0 */
|
||||
offset: number;
|
||||
/** @minimum 0 */
|
||||
total: number;
|
||||
}
|
||||
|
||||
@@ -8,10 +8,10 @@ import type { GatewayRead } from "./gatewayRead";
|
||||
|
||||
export interface LimitOffsetPageTypeVarCustomizedGatewayRead {
|
||||
items: GatewayRead[];
|
||||
/** @minimum 0 */
|
||||
total: number;
|
||||
/** @minimum 1 */
|
||||
limit: number;
|
||||
/** @minimum 0 */
|
||||
offset: number;
|
||||
/** @minimum 0 */
|
||||
total: number;
|
||||
}
|
||||
|
||||
@@ -8,10 +8,10 @@ import type { TaskCommentRead } from "./taskCommentRead";
|
||||
|
||||
export interface LimitOffsetPageTypeVarCustomizedTaskCommentRead {
|
||||
items: TaskCommentRead[];
|
||||
/** @minimum 0 */
|
||||
total: number;
|
||||
/** @minimum 1 */
|
||||
limit: number;
|
||||
/** @minimum 0 */
|
||||
offset: number;
|
||||
/** @minimum 0 */
|
||||
total: number;
|
||||
}
|
||||
|
||||
@@ -8,10 +8,10 @@ import type { TaskRead } from "./taskRead";
|
||||
|
||||
export interface LimitOffsetPageTypeVarCustomizedTaskRead {
|
||||
items: TaskRead[];
|
||||
/** @minimum 0 */
|
||||
total: number;
|
||||
/** @minimum 1 */
|
||||
limit: number;
|
||||
/** @minimum 0 */
|
||||
offset: number;
|
||||
/** @minimum 0 */
|
||||
total: number;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ListBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGetParams = {
|
||||
is_chat?: boolean | null;
|
||||
/**
|
||||
* @minimum 1
|
||||
* @maximum 200
|
||||
*/
|
||||
limit?: number;
|
||||
/**
|
||||
* @minimum 0
|
||||
*/
|
||||
offset?: number;
|
||||
};
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type ListBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGetParams =
|
||||
{
|
||||
is_chat?: boolean | null;
|
||||
/**
|
||||
* @minimum 1
|
||||
* @maximum 200
|
||||
*/
|
||||
limit?: number;
|
||||
/**
|
||||
* @minimum 0
|
||||
*/
|
||||
offset?: number;
|
||||
};
|
||||
@@ -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 ListBoardGroupsApiV1BoardGroupsGetParams = {
|
||||
/**
|
||||
* @minimum 1
|
||||
* @maximum 200
|
||||
*/
|
||||
limit?: number;
|
||||
/**
|
||||
* @minimum 0
|
||||
*/
|
||||
offset?: number;
|
||||
};
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
export type ListBoardsApiV1BoardsGetParams = {
|
||||
gateway_id?: string | null;
|
||||
board_group_id?: string | null;
|
||||
/**
|
||||
* @minimum 1
|
||||
* @maximum 200
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type StreamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGetParams =
|
||||
{
|
||||
since?: string | null;
|
||||
is_chat?: boolean | null;
|
||||
};
|
||||
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type StreamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGetParams =
|
||||
{
|
||||
since?: string | null;
|
||||
is_chat?: boolean | null;
|
||||
};
|
||||
@@ -7,22 +7,22 @@
|
||||
import type { TaskCardReadStatus } from "./taskCardReadStatus";
|
||||
|
||||
export interface TaskCardRead {
|
||||
title: string;
|
||||
description?: string | null;
|
||||
status?: TaskCardReadStatus;
|
||||
priority?: string;
|
||||
due_at?: string | null;
|
||||
assigned_agent_id?: string | null;
|
||||
depends_on_task_ids?: string[];
|
||||
id: string;
|
||||
board_id: string | null;
|
||||
created_by_user_id: string | null;
|
||||
in_progress_at: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
blocked_by_task_ids?: string[];
|
||||
is_blocked?: boolean;
|
||||
assignee?: string | null;
|
||||
approvals_count?: number;
|
||||
approvals_pending_count?: number;
|
||||
assigned_agent_id?: string | null;
|
||||
assignee?: string | null;
|
||||
blocked_by_task_ids?: string[];
|
||||
board_id: string | null;
|
||||
created_at: string;
|
||||
created_by_user_id: string | null;
|
||||
depends_on_task_ids?: string[];
|
||||
description?: string | null;
|
||||
due_at?: string | null;
|
||||
id: string;
|
||||
in_progress_at: string | null;
|
||||
is_blocked?: boolean;
|
||||
priority?: string;
|
||||
status?: TaskCardReadStatus;
|
||||
title: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
*/
|
||||
|
||||
export interface TaskCommentRead {
|
||||
agent_id: string | null;
|
||||
created_at: string;
|
||||
id: string;
|
||||
message: string | null;
|
||||
agent_id: string | null;
|
||||
task_id: string | null;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
import type { TaskCreateStatus } from "./taskCreateStatus";
|
||||
|
||||
export interface TaskCreate {
|
||||
assigned_agent_id?: string | null;
|
||||
created_by_user_id?: string | null;
|
||||
depends_on_task_ids?: string[];
|
||||
description?: string | null;
|
||||
due_at?: string | null;
|
||||
priority?: string;
|
||||
status?: TaskCreateStatus;
|
||||
title: string;
|
||||
description?: string | null;
|
||||
status?: TaskCreateStatus;
|
||||
priority?: string;
|
||||
due_at?: string | null;
|
||||
assigned_agent_id?: string | null;
|
||||
depends_on_task_ids?: string[];
|
||||
created_by_user_id?: string | null;
|
||||
}
|
||||
|
||||
@@ -7,19 +7,19 @@
|
||||
import type { TaskReadStatus } from "./taskReadStatus";
|
||||
|
||||
export interface TaskRead {
|
||||
assigned_agent_id?: string | null;
|
||||
blocked_by_task_ids?: string[];
|
||||
board_id: string | null;
|
||||
created_at: string;
|
||||
created_by_user_id: string | null;
|
||||
depends_on_task_ids?: string[];
|
||||
description?: string | null;
|
||||
due_at?: string | null;
|
||||
id: string;
|
||||
in_progress_at: string | null;
|
||||
is_blocked?: boolean;
|
||||
priority?: string;
|
||||
status?: TaskReadStatus;
|
||||
title: string;
|
||||
description?: string | null;
|
||||
status?: TaskReadStatus;
|
||||
priority?: string;
|
||||
due_at?: string | null;
|
||||
assigned_agent_id?: string | null;
|
||||
depends_on_task_ids?: string[];
|
||||
id: string;
|
||||
board_id: string | null;
|
||||
created_by_user_id: string | null;
|
||||
in_progress_at: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
blocked_by_task_ids?: string[];
|
||||
is_blocked?: boolean;
|
||||
}
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
*/
|
||||
|
||||
export interface TaskUpdate {
|
||||
assigned_agent_id?: string | null;
|
||||
comment?: string | null;
|
||||
depends_on_task_ids?: string[] | null;
|
||||
description?: string | null;
|
||||
due_at?: string | null;
|
||||
priority?: string | null;
|
||||
status?: "inbox" | "in_progress" | "review" | "done" | null;
|
||||
title?: string | null;
|
||||
description?: string | null;
|
||||
status?: "inbox" | "in_progress" | "review" | "done" | null;
|
||||
priority?: string | null;
|
||||
due_at?: string | null;
|
||||
assigned_agent_id?: string | null;
|
||||
depends_on_task_ids?: string[] | null;
|
||||
comment?: string | null;
|
||||
}
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
|
||||
export interface UserRead {
|
||||
clerk_user_id: string;
|
||||
context?: string | null;
|
||||
email?: string | null;
|
||||
id: string;
|
||||
is_super_admin: boolean;
|
||||
name?: string | null;
|
||||
notes?: string | null;
|
||||
preferred_name?: string | null;
|
||||
pronouns?: string | null;
|
||||
timezone?: string | null;
|
||||
notes?: string | null;
|
||||
context?: string | null;
|
||||
id: string;
|
||||
is_super_admin: boolean;
|
||||
}
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
*/
|
||||
|
||||
export interface UserUpdate {
|
||||
context?: string | null;
|
||||
name?: string | null;
|
||||
notes?: string | null;
|
||||
preferred_name?: string | null;
|
||||
pronouns?: string | null;
|
||||
timezone?: string | null;
|
||||
notes?: string | null;
|
||||
context?: string | null;
|
||||
}
|
||||
|
||||
@@ -40,6 +40,258 @@ import { customFetch } from "../../mutator";
|
||||
|
||||
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||
|
||||
/**
|
||||
* @summary Stream Tasks
|
||||
*/
|
||||
export type streamTasksApiV1BoardsBoardIdTasksStreamGetResponse200 = {
|
||||
data: unknown;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type streamTasksApiV1BoardsBoardIdTasksStreamGetResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type streamTasksApiV1BoardsBoardIdTasksStreamGetResponseSuccess =
|
||||
streamTasksApiV1BoardsBoardIdTasksStreamGetResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type streamTasksApiV1BoardsBoardIdTasksStreamGetResponseError =
|
||||
streamTasksApiV1BoardsBoardIdTasksStreamGetResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type streamTasksApiV1BoardsBoardIdTasksStreamGetResponse =
|
||||
| streamTasksApiV1BoardsBoardIdTasksStreamGetResponseSuccess
|
||||
| streamTasksApiV1BoardsBoardIdTasksStreamGetResponseError;
|
||||
|
||||
export const getStreamTasksApiV1BoardsBoardIdTasksStreamGetUrl = (
|
||||
boardId: string,
|
||||
params?: StreamTasksApiV1BoardsBoardIdTasksStreamGetParams,
|
||||
) => {
|
||||
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/boards/${boardId}/tasks/stream?${stringifiedParams}`
|
||||
: `/api/v1/boards/${boardId}/tasks/stream`;
|
||||
};
|
||||
|
||||
export const streamTasksApiV1BoardsBoardIdTasksStreamGet = async (
|
||||
boardId: string,
|
||||
params?: StreamTasksApiV1BoardsBoardIdTasksStreamGetParams,
|
||||
options?: RequestInit,
|
||||
): Promise<streamTasksApiV1BoardsBoardIdTasksStreamGetResponse> => {
|
||||
return customFetch<streamTasksApiV1BoardsBoardIdTasksStreamGetResponse>(
|
||||
getStreamTasksApiV1BoardsBoardIdTasksStreamGetUrl(boardId, params),
|
||||
{
|
||||
...options,
|
||||
method: "GET",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getStreamTasksApiV1BoardsBoardIdTasksStreamGetQueryKey = (
|
||||
boardId: string,
|
||||
params?: StreamTasksApiV1BoardsBoardIdTasksStreamGetParams,
|
||||
) => {
|
||||
return [
|
||||
`/api/v1/boards/${boardId}/tasks/stream`,
|
||||
...(params ? [params] : []),
|
||||
] as const;
|
||||
};
|
||||
|
||||
export const getStreamTasksApiV1BoardsBoardIdTasksStreamGetQueryOptions = <
|
||||
TData = Awaited<
|
||||
ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
boardId: string,
|
||||
params?: StreamTasksApiV1BoardsBoardIdTasksStreamGetParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey =
|
||||
queryOptions?.queryKey ??
|
||||
getStreamTasksApiV1BoardsBoardIdTasksStreamGetQueryKey(boardId, params);
|
||||
|
||||
const queryFn: QueryFunction<
|
||||
Awaited<ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>>
|
||||
> = ({ signal }) =>
|
||||
streamTasksApiV1BoardsBoardIdTasksStreamGet(boardId, params, {
|
||||
signal,
|
||||
...requestOptions,
|
||||
});
|
||||
|
||||
return {
|
||||
queryKey,
|
||||
queryFn,
|
||||
enabled: !!boardId,
|
||||
...queryOptions,
|
||||
} as UseQueryOptions<
|
||||
Awaited<ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type StreamTasksApiV1BoardsBoardIdTasksStreamGetQueryResult =
|
||||
NonNullable<
|
||||
Awaited<ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>>
|
||||
>;
|
||||
export type StreamTasksApiV1BoardsBoardIdTasksStreamGetQueryError =
|
||||
HTTPValidationError;
|
||||
|
||||
export function useStreamTasksApiV1BoardsBoardIdTasksStreamGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
boardId: string,
|
||||
params: undefined | StreamTasksApiV1BoardsBoardIdTasksStreamGetParams,
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>
|
||||
>,
|
||||
TError,
|
||||
Awaited<
|
||||
ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>
|
||||
>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useStreamTasksApiV1BoardsBoardIdTasksStreamGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
boardId: string,
|
||||
params?: StreamTasksApiV1BoardsBoardIdTasksStreamGetParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>
|
||||
>,
|
||||
TError,
|
||||
Awaited<
|
||||
ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>
|
||||
>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useStreamTasksApiV1BoardsBoardIdTasksStreamGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
boardId: string,
|
||||
params?: StreamTasksApiV1BoardsBoardIdTasksStreamGetParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary Stream Tasks
|
||||
*/
|
||||
|
||||
export function useStreamTasksApiV1BoardsBoardIdTasksStreamGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
boardId: string,
|
||||
params?: StreamTasksApiV1BoardsBoardIdTasksStreamGetParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions =
|
||||
getStreamTasksApiV1BoardsBoardIdTasksStreamGetQueryOptions(
|
||||
boardId,
|
||||
params,
|
||||
options,
|
||||
);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
return { ...query, queryKey: queryOptions.queryKey };
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary List Tasks
|
||||
*/
|
||||
@@ -400,383 +652,6 @@ export const useCreateTaskApiV1BoardsBoardIdTasksPost = <
|
||||
queryClient,
|
||||
);
|
||||
};
|
||||
/**
|
||||
* @summary Stream Tasks
|
||||
*/
|
||||
export type streamTasksApiV1BoardsBoardIdTasksStreamGetResponse200 = {
|
||||
data: unknown;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type streamTasksApiV1BoardsBoardIdTasksStreamGetResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type streamTasksApiV1BoardsBoardIdTasksStreamGetResponseSuccess =
|
||||
streamTasksApiV1BoardsBoardIdTasksStreamGetResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type streamTasksApiV1BoardsBoardIdTasksStreamGetResponseError =
|
||||
streamTasksApiV1BoardsBoardIdTasksStreamGetResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type streamTasksApiV1BoardsBoardIdTasksStreamGetResponse =
|
||||
| streamTasksApiV1BoardsBoardIdTasksStreamGetResponseSuccess
|
||||
| streamTasksApiV1BoardsBoardIdTasksStreamGetResponseError;
|
||||
|
||||
export const getStreamTasksApiV1BoardsBoardIdTasksStreamGetUrl = (
|
||||
boardId: string,
|
||||
params?: StreamTasksApiV1BoardsBoardIdTasksStreamGetParams,
|
||||
) => {
|
||||
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/boards/${boardId}/tasks/stream?${stringifiedParams}`
|
||||
: `/api/v1/boards/${boardId}/tasks/stream`;
|
||||
};
|
||||
|
||||
export const streamTasksApiV1BoardsBoardIdTasksStreamGet = async (
|
||||
boardId: string,
|
||||
params?: StreamTasksApiV1BoardsBoardIdTasksStreamGetParams,
|
||||
options?: RequestInit,
|
||||
): Promise<streamTasksApiV1BoardsBoardIdTasksStreamGetResponse> => {
|
||||
return customFetch<streamTasksApiV1BoardsBoardIdTasksStreamGetResponse>(
|
||||
getStreamTasksApiV1BoardsBoardIdTasksStreamGetUrl(boardId, params),
|
||||
{
|
||||
...options,
|
||||
method: "GET",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getStreamTasksApiV1BoardsBoardIdTasksStreamGetQueryKey = (
|
||||
boardId: string,
|
||||
params?: StreamTasksApiV1BoardsBoardIdTasksStreamGetParams,
|
||||
) => {
|
||||
return [
|
||||
`/api/v1/boards/${boardId}/tasks/stream`,
|
||||
...(params ? [params] : []),
|
||||
] as const;
|
||||
};
|
||||
|
||||
export const getStreamTasksApiV1BoardsBoardIdTasksStreamGetQueryOptions = <
|
||||
TData = Awaited<
|
||||
ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
boardId: string,
|
||||
params?: StreamTasksApiV1BoardsBoardIdTasksStreamGetParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey =
|
||||
queryOptions?.queryKey ??
|
||||
getStreamTasksApiV1BoardsBoardIdTasksStreamGetQueryKey(boardId, params);
|
||||
|
||||
const queryFn: QueryFunction<
|
||||
Awaited<ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>>
|
||||
> = ({ signal }) =>
|
||||
streamTasksApiV1BoardsBoardIdTasksStreamGet(boardId, params, {
|
||||
signal,
|
||||
...requestOptions,
|
||||
});
|
||||
|
||||
return {
|
||||
queryKey,
|
||||
queryFn,
|
||||
enabled: !!boardId,
|
||||
...queryOptions,
|
||||
} as UseQueryOptions<
|
||||
Awaited<ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type StreamTasksApiV1BoardsBoardIdTasksStreamGetQueryResult =
|
||||
NonNullable<
|
||||
Awaited<ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>>
|
||||
>;
|
||||
export type StreamTasksApiV1BoardsBoardIdTasksStreamGetQueryError =
|
||||
HTTPValidationError;
|
||||
|
||||
export function useStreamTasksApiV1BoardsBoardIdTasksStreamGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
boardId: string,
|
||||
params: undefined | StreamTasksApiV1BoardsBoardIdTasksStreamGetParams,
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>
|
||||
>,
|
||||
TError,
|
||||
Awaited<
|
||||
ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>
|
||||
>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useStreamTasksApiV1BoardsBoardIdTasksStreamGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
boardId: string,
|
||||
params?: StreamTasksApiV1BoardsBoardIdTasksStreamGetParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>
|
||||
>,
|
||||
TError,
|
||||
Awaited<
|
||||
ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>
|
||||
>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useStreamTasksApiV1BoardsBoardIdTasksStreamGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
boardId: string,
|
||||
params?: StreamTasksApiV1BoardsBoardIdTasksStreamGetParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary Stream Tasks
|
||||
*/
|
||||
|
||||
export function useStreamTasksApiV1BoardsBoardIdTasksStreamGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
boardId: string,
|
||||
params?: StreamTasksApiV1BoardsBoardIdTasksStreamGetParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof streamTasksApiV1BoardsBoardIdTasksStreamGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions =
|
||||
getStreamTasksApiV1BoardsBoardIdTasksStreamGetQueryOptions(
|
||||
boardId,
|
||||
params,
|
||||
options,
|
||||
);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
return { ...query, queryKey: queryOptions.queryKey };
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Delete Task
|
||||
*/
|
||||
export type deleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteResponse200 = {
|
||||
data: OkResponse;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type deleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type deleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteResponseSuccess =
|
||||
deleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type deleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteResponseError =
|
||||
deleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type deleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteResponse =
|
||||
| deleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteResponseSuccess
|
||||
| deleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteResponseError;
|
||||
|
||||
export const getDeleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteUrl = (
|
||||
boardId: string,
|
||||
taskId: string,
|
||||
) => {
|
||||
return `/api/v1/boards/${boardId}/tasks/${taskId}`;
|
||||
};
|
||||
|
||||
export const deleteTaskApiV1BoardsBoardIdTasksTaskIdDelete = async (
|
||||
boardId: string,
|
||||
taskId: string,
|
||||
options?: RequestInit,
|
||||
): Promise<deleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteResponse> => {
|
||||
return customFetch<deleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteResponse>(
|
||||
getDeleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteUrl(boardId, taskId),
|
||||
{
|
||||
...options,
|
||||
method: "DELETE",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getDeleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteMutationOptions = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteTaskApiV1BoardsBoardIdTasksTaskIdDelete>>,
|
||||
TError,
|
||||
{ boardId: string; taskId: string },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteTaskApiV1BoardsBoardIdTasksTaskIdDelete>>,
|
||||
TError,
|
||||
{ boardId: string; taskId: string },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["deleteTaskApiV1BoardsBoardIdTasksTaskIdDelete"];
|
||||
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 deleteTaskApiV1BoardsBoardIdTasksTaskIdDelete>>,
|
||||
{ boardId: string; taskId: string }
|
||||
> = (props) => {
|
||||
const { boardId, taskId } = props ?? {};
|
||||
|
||||
return deleteTaskApiV1BoardsBoardIdTasksTaskIdDelete(
|
||||
boardId,
|
||||
taskId,
|
||||
requestOptions,
|
||||
);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type DeleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteMutationResult =
|
||||
NonNullable<
|
||||
Awaited<ReturnType<typeof deleteTaskApiV1BoardsBoardIdTasksTaskIdDelete>>
|
||||
>;
|
||||
|
||||
export type DeleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteMutationError =
|
||||
HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Delete Task
|
||||
*/
|
||||
export const useDeleteTaskApiV1BoardsBoardIdTasksTaskIdDelete = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteTaskApiV1BoardsBoardIdTasksTaskIdDelete>>,
|
||||
TError,
|
||||
{ boardId: string; taskId: string },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof deleteTaskApiV1BoardsBoardIdTasksTaskIdDelete>>,
|
||||
TError,
|
||||
{ boardId: string; taskId: string },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(
|
||||
getDeleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteMutationOptions(options),
|
||||
queryClient,
|
||||
);
|
||||
};
|
||||
/**
|
||||
* @summary Update Task
|
||||
*/
|
||||
@@ -915,6 +790,131 @@ export const useUpdateTaskApiV1BoardsBoardIdTasksTaskIdPatch = <
|
||||
queryClient,
|
||||
);
|
||||
};
|
||||
/**
|
||||
* @summary Delete Task
|
||||
*/
|
||||
export type deleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteResponse200 = {
|
||||
data: OkResponse;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type deleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type deleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteResponseSuccess =
|
||||
deleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type deleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteResponseError =
|
||||
deleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type deleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteResponse =
|
||||
| deleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteResponseSuccess
|
||||
| deleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteResponseError;
|
||||
|
||||
export const getDeleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteUrl = (
|
||||
boardId: string,
|
||||
taskId: string,
|
||||
) => {
|
||||
return `/api/v1/boards/${boardId}/tasks/${taskId}`;
|
||||
};
|
||||
|
||||
export const deleteTaskApiV1BoardsBoardIdTasksTaskIdDelete = async (
|
||||
boardId: string,
|
||||
taskId: string,
|
||||
options?: RequestInit,
|
||||
): Promise<deleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteResponse> => {
|
||||
return customFetch<deleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteResponse>(
|
||||
getDeleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteUrl(boardId, taskId),
|
||||
{
|
||||
...options,
|
||||
method: "DELETE",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getDeleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteMutationOptions = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteTaskApiV1BoardsBoardIdTasksTaskIdDelete>>,
|
||||
TError,
|
||||
{ boardId: string; taskId: string },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteTaskApiV1BoardsBoardIdTasksTaskIdDelete>>,
|
||||
TError,
|
||||
{ boardId: string; taskId: string },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["deleteTaskApiV1BoardsBoardIdTasksTaskIdDelete"];
|
||||
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 deleteTaskApiV1BoardsBoardIdTasksTaskIdDelete>>,
|
||||
{ boardId: string; taskId: string }
|
||||
> = (props) => {
|
||||
const { boardId, taskId } = props ?? {};
|
||||
|
||||
return deleteTaskApiV1BoardsBoardIdTasksTaskIdDelete(
|
||||
boardId,
|
||||
taskId,
|
||||
requestOptions,
|
||||
);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type DeleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteMutationResult =
|
||||
NonNullable<
|
||||
Awaited<ReturnType<typeof deleteTaskApiV1BoardsBoardIdTasksTaskIdDelete>>
|
||||
>;
|
||||
|
||||
export type DeleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteMutationError =
|
||||
HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Delete Task
|
||||
*/
|
||||
export const useDeleteTaskApiV1BoardsBoardIdTasksTaskIdDelete = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteTaskApiV1BoardsBoardIdTasksTaskIdDelete>>,
|
||||
TError,
|
||||
{ boardId: string; taskId: string },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof deleteTaskApiV1BoardsBoardIdTasksTaskIdDelete>>,
|
||||
TError,
|
||||
{ boardId: string; taskId: string },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(
|
||||
getDeleteTaskApiV1BoardsBoardIdTasksTaskIdDeleteMutationOptions(options),
|
||||
queryClient,
|
||||
);
|
||||
};
|
||||
/**
|
||||
* @summary List Task Comments
|
||||
*/
|
||||
|
||||
@@ -35,7 +35,7 @@ const resolveClerkToken = async (): Promise<string | null> => {
|
||||
|
||||
export const customFetch = async <T>(
|
||||
url: string,
|
||||
options: RequestInit
|
||||
options: RequestInit,
|
||||
): Promise<T> => {
|
||||
const rawBaseUrl = process.env.NEXT_PUBLIC_API_URL;
|
||||
if (!rawBaseUrl) {
|
||||
@@ -79,7 +79,11 @@ export const customFetch = async <T>(
|
||||
message = detail;
|
||||
} else if (Array.isArray(detail) && detail.length) {
|
||||
const first = detail[0] as { msg?: unknown };
|
||||
if (first && typeof first === "object" && typeof first.msg === "string") {
|
||||
if (
|
||||
first &&
|
||||
typeof first === "object" &&
|
||||
typeof first.msg === "string"
|
||||
) {
|
||||
message = first.msg;
|
||||
}
|
||||
}
|
||||
@@ -110,5 +114,9 @@ export const customFetch = async <T>(
|
||||
} as T;
|
||||
}
|
||||
const text = await response.text().catch(() => "");
|
||||
return { data: text, status: response.status, headers: response.headers } as T;
|
||||
return {
|
||||
data: text,
|
||||
status: response.status,
|
||||
headers: response.headers,
|
||||
} as T;
|
||||
};
|
||||
|
||||
@@ -69,7 +69,7 @@ const getBoardOptions = (boards: BoardRead[]): SearchableSelectOption[] =>
|
||||
}));
|
||||
|
||||
const normalizeIdentityProfile = (
|
||||
profile: IdentityProfile
|
||||
profile: IdentityProfile,
|
||||
): IdentityProfile | null => {
|
||||
const normalized: IdentityProfile = {
|
||||
role: profile.role.trim(),
|
||||
@@ -81,11 +81,12 @@ const normalizeIdentityProfile = (
|
||||
};
|
||||
|
||||
const withIdentityDefaults = (
|
||||
profile: Partial<IdentityProfile> | null | undefined
|
||||
profile: Partial<IdentityProfile> | null | undefined,
|
||||
): IdentityProfile => ({
|
||||
role: profile?.role ?? DEFAULT_IDENTITY_PROFILE.role,
|
||||
communication_style:
|
||||
profile?.communication_style ?? DEFAULT_IDENTITY_PROFILE.communication_style,
|
||||
profile?.communication_style ??
|
||||
DEFAULT_IDENTITY_PROFILE.communication_style,
|
||||
emoji: profile?.emoji ?? DEFAULT_IDENTITY_PROFILE.emoji,
|
||||
});
|
||||
|
||||
@@ -150,8 +151,10 @@ export default function EditAgentPage() {
|
||||
},
|
||||
});
|
||||
|
||||
const boards =
|
||||
boardsQuery.data?.status === 200 ? boardsQuery.data.data.items ?? [] : [];
|
||||
const boards = useMemo<BoardRead[]>(() => {
|
||||
if (boardsQuery.data?.status !== 200) return [];
|
||||
return boardsQuery.data.data.items ?? [];
|
||||
}, [boardsQuery.data]);
|
||||
const loadedAgent: AgentRead | null =
|
||||
agentQuery.data?.status === 200 ? agentQuery.data.data : null;
|
||||
|
||||
@@ -226,7 +229,7 @@ export default function EditAgentPage() {
|
||||
!loadedAgent.board_id
|
||||
) {
|
||||
setError(
|
||||
"Select a board once so we can resolve the gateway main session key."
|
||||
"Select a board once so we can resolve the gateway main session key.",
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -238,10 +241,9 @@ export default function EditAgentPage() {
|
||||
every: resolvedHeartbeatEvery.trim() || "10m",
|
||||
target: resolvedHeartbeatTarget,
|
||||
} as unknown as Record<string, unknown>,
|
||||
identity_profile: normalizeIdentityProfile(resolvedIdentityProfile) as unknown as Record<
|
||||
string,
|
||||
unknown
|
||||
> | null,
|
||||
identity_profile: normalizeIdentityProfile(
|
||||
resolvedIdentityProfile,
|
||||
) as unknown as Record<string, unknown> | null,
|
||||
soul_template: resolvedSoulTemplate.trim() || null,
|
||||
};
|
||||
if (!resolvedIsGatewayMain) {
|
||||
@@ -278,7 +280,9 @@ export default function EditAgentPage() {
|
||||
<div className="border-b border-slate-200 bg-white px-8 py-6">
|
||||
<div>
|
||||
<h1 className="font-heading text-2xl font-semibold text-slate-900 tracking-tight">
|
||||
{resolvedName.trim() ? resolvedName : loadedAgent?.name ?? "Edit agent"}
|
||||
{resolvedName.trim()
|
||||
? resolvedName
|
||||
: (loadedAgent?.name ?? "Edit agent")}
|
||||
</h1>
|
||||
<p className="mt-1 text-sm text-slate-500">
|
||||
Status is controlled by agent heartbeat.
|
||||
@@ -356,7 +360,11 @@ export default function EditAgentPage() {
|
||||
value={resolvedBoardId}
|
||||
onValueChange={(value) => setBoardId(value)}
|
||||
options={getBoardOptions(boards)}
|
||||
placeholder={resolvedIsGatewayMain ? "No board (main agent)" : "Select board"}
|
||||
placeholder={
|
||||
resolvedIsGatewayMain
|
||||
? "No board (main agent)"
|
||||
: "Select board"
|
||||
}
|
||||
searchPlaceholder="Search boards..."
|
||||
emptyMessage="No matching boards."
|
||||
triggerClassName="w-full h-11 rounded-xl border border-slate-300 bg-white px-3 py-2 text-sm font-medium text-slate-900 shadow-sm focus:border-blue-500 focus:ring-2 focus:ring-blue-200"
|
||||
@@ -410,7 +418,9 @@ export default function EditAgentPage() {
|
||||
type="checkbox"
|
||||
className="mt-1 h-4 w-4 rounded border-slate-300 text-blue-600 focus:ring-blue-200"
|
||||
checked={resolvedIsGatewayMain}
|
||||
onChange={(event) => setIsGatewayMain(event.target.checked)}
|
||||
onChange={(event) =>
|
||||
setIsGatewayMain(event.target.checked)
|
||||
}
|
||||
disabled={isLoading}
|
||||
/>
|
||||
<span>
|
||||
@@ -471,7 +481,9 @@ export default function EditAgentPage() {
|
||||
</label>
|
||||
<Input
|
||||
value={resolvedHeartbeatEvery}
|
||||
onChange={(event) => setHeartbeatEvery(event.target.value)}
|
||||
onChange={(event) =>
|
||||
setHeartbeatEvery(event.target.value)
|
||||
}
|
||||
placeholder="e.g. 10m"
|
||||
disabled={isLoading}
|
||||
/>
|
||||
|
||||
@@ -22,7 +22,11 @@ import {
|
||||
type listBoardsApiV1BoardsGetResponse,
|
||||
useListBoardsApiV1BoardsGet,
|
||||
} from "@/api/generated/boards/boards";
|
||||
import type { ActivityEventRead, AgentRead, BoardRead } from "@/api/generated/model";
|
||||
import type {
|
||||
ActivityEventRead,
|
||||
AgentRead,
|
||||
BoardRead,
|
||||
} from "@/api/generated/model";
|
||||
import { StatusPill } from "@/components/atoms/StatusPill";
|
||||
import { DashboardSidebar } from "@/components/organisms/DashboardSidebar";
|
||||
import { DashboardShell } from "@/components/templates/DashboardShell";
|
||||
@@ -119,12 +123,14 @@ export default function AgentDetailPage() {
|
||||
|
||||
const agent: AgentRead | null =
|
||||
agentQuery.data?.status === 200 ? agentQuery.data.data : null;
|
||||
const events: ActivityEventRead[] =
|
||||
activityQuery.data?.status === 200
|
||||
? activityQuery.data.data.items ?? []
|
||||
: [];
|
||||
const boards: BoardRead[] =
|
||||
boardsQuery.data?.status === 200 ? boardsQuery.data.data.items ?? [] : [];
|
||||
const events = useMemo<ActivityEventRead[]>(() => {
|
||||
if (activityQuery.data?.status !== 200) return [];
|
||||
return activityQuery.data.data.items ?? [];
|
||||
}, [activityQuery.data]);
|
||||
const boards = useMemo<BoardRead[]>(() => {
|
||||
if (boardsQuery.data?.status !== 200) return [];
|
||||
return boardsQuery.data.data.items ?? [];
|
||||
}, [boardsQuery.data]);
|
||||
|
||||
const agentEvents = useMemo(() => {
|
||||
if (!agent) return [];
|
||||
@@ -133,7 +139,7 @@ export default function AgentDetailPage() {
|
||||
const linkedBoard =
|
||||
!agent?.board_id || agent?.is_gateway_main
|
||||
? null
|
||||
: boards.find((board) => board.id === agent.board_id) ?? null;
|
||||
: (boards.find((board) => board.id === agent.board_id) ?? null);
|
||||
|
||||
const deleteMutation = useDeleteAgentApiV1AgentsAgentIdDelete<ApiError>({
|
||||
mutation: {
|
||||
@@ -194,8 +200,7 @@ export default function AgentDetailPage() {
|
||||
</p>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<Button variant="outline" onClick={() => router.push("/agents")}
|
||||
>
|
||||
<Button variant="outline" onClick={() => router.push("/agents")}>
|
||||
Back to agents
|
||||
</Button>
|
||||
{agent ? (
|
||||
@@ -259,7 +264,9 @@ export default function AgentDetailPage() {
|
||||
Board
|
||||
</p>
|
||||
{agent.is_gateway_main ? (
|
||||
<p className="mt-1 text-sm text-strong">Gateway main (no board)</p>
|
||||
<p className="mt-1 text-sm text-strong">
|
||||
Gateway main (no board)
|
||||
</p>
|
||||
) : linkedBoard ? (
|
||||
<Link
|
||||
href={`/boards/${linkedBoard.id}`}
|
||||
@@ -315,7 +322,9 @@ export default function AgentDetailPage() {
|
||||
</div>
|
||||
<div className="flex items-center justify-between">
|
||||
<span>Session binding</span>
|
||||
<span>{agent.openclaw_session_id ? "Bound" : "Unbound"}</span>
|
||||
<span>
|
||||
{agent.openclaw_session_id ? "Bound" : "Unbound"}
|
||||
</span>
|
||||
</div>
|
||||
<div className="flex items-center justify-between">
|
||||
<span>Status</span>
|
||||
|
||||
@@ -65,7 +65,7 @@ const getBoardOptions = (boards: BoardRead[]): SearchableSelectOption[] =>
|
||||
}));
|
||||
|
||||
const normalizeIdentityProfile = (
|
||||
profile: IdentityProfile
|
||||
profile: IdentityProfile,
|
||||
): IdentityProfile | null => {
|
||||
const normalized: IdentityProfile = {
|
||||
role: profile.role.trim(),
|
||||
@@ -114,7 +114,7 @@ export default function NewAgentPage() {
|
||||
});
|
||||
|
||||
const boards =
|
||||
boardsQuery.data?.status === 200 ? boardsQuery.data.data.items ?? [] : [];
|
||||
boardsQuery.data?.status === 200 ? (boardsQuery.data.data.items ?? []) : [];
|
||||
const displayBoardId = boardId || boards[0]?.id || "";
|
||||
const isLoading = boardsQuery.isLoading || createAgentMutation.isPending;
|
||||
const errorMessage = error ?? boardsQuery.error?.message ?? null;
|
||||
@@ -141,10 +141,9 @@ export default function NewAgentPage() {
|
||||
every: heartbeatEvery.trim() || "10m",
|
||||
target: heartbeatTarget,
|
||||
},
|
||||
identity_profile: normalizeIdentityProfile(identityProfile) as unknown as Record<
|
||||
string,
|
||||
unknown
|
||||
> | null,
|
||||
identity_profile: normalizeIdentityProfile(
|
||||
identityProfile,
|
||||
) as unknown as Record<string, unknown> | null,
|
||||
soul_template: soulTemplate.trim() || null,
|
||||
},
|
||||
});
|
||||
@@ -155,7 +154,9 @@ export default function NewAgentPage() {
|
||||
<SignedOut>
|
||||
<div className="col-span-2 flex min-h-[calc(100vh-64px)] items-center justify-center bg-slate-50 p-10 text-center">
|
||||
<div className="rounded-xl border border-slate-200 bg-white px-8 py-6 shadow-sm">
|
||||
<p className="text-sm text-slate-600">Sign in to create an agent.</p>
|
||||
<p className="text-sm text-slate-600">
|
||||
Sign in to create an agent.
|
||||
</p>
|
||||
<SignInButton
|
||||
mode="modal"
|
||||
forceRedirectUrl="/agents/new"
|
||||
@@ -318,7 +319,9 @@ export default function NewAgentPage() {
|
||||
</label>
|
||||
<Input
|
||||
value={heartbeatEvery}
|
||||
onChange={(event) => setHeartbeatEvery(event.target.value)}
|
||||
onChange={(event) =>
|
||||
setHeartbeatEvery(event.target.value)
|
||||
}
|
||||
placeholder="e.g. 10m"
|
||||
disabled={isLoading}
|
||||
/>
|
||||
|
||||
@@ -42,7 +42,7 @@ import {
|
||||
getListBoardsApiV1BoardsGetQueryKey,
|
||||
useListBoardsApiV1BoardsGet,
|
||||
} from "@/api/generated/boards/boards";
|
||||
import type { AgentRead, BoardRead } from "@/api/generated/model";
|
||||
import type { AgentRead } from "@/api/generated/model";
|
||||
|
||||
const parseTimestamp = (value?: string | null) => {
|
||||
if (!value) return null;
|
||||
@@ -121,13 +121,17 @@ export default function AgentsPage() {
|
||||
|
||||
const boards = useMemo(
|
||||
() =>
|
||||
boardsQuery.data?.status === 200 ? boardsQuery.data.data.items ?? [] : [],
|
||||
[boardsQuery.data]
|
||||
boardsQuery.data?.status === 200
|
||||
? (boardsQuery.data.data.items ?? [])
|
||||
: [],
|
||||
[boardsQuery.data],
|
||||
);
|
||||
const agents = useMemo(
|
||||
() =>
|
||||
agentsQuery.data?.status === 200 ? agentsQuery.data.data.items ?? [] : [],
|
||||
[agentsQuery.data]
|
||||
agentsQuery.data?.status === 200
|
||||
? (agentsQuery.data.data.items ?? [])
|
||||
: [],
|
||||
[agentsQuery.data],
|
||||
);
|
||||
|
||||
const deleteMutation = useDeleteAgentApiV1AgentsAgentIdDelete<
|
||||
@@ -139,20 +143,25 @@ export default function AgentsPage() {
|
||||
onMutate: async ({ agentId }) => {
|
||||
await queryClient.cancelQueries({ queryKey: agentsKey });
|
||||
const previous =
|
||||
queryClient.getQueryData<listAgentsApiV1AgentsGetResponse>(agentsKey);
|
||||
queryClient.getQueryData<listAgentsApiV1AgentsGetResponse>(
|
||||
agentsKey,
|
||||
);
|
||||
if (previous && previous.status === 200) {
|
||||
const nextItems = previous.data.items.filter(
|
||||
(agent) => agent.id !== agentId
|
||||
(agent) => agent.id !== agentId,
|
||||
);
|
||||
const removedCount = previous.data.items.length - nextItems.length;
|
||||
queryClient.setQueryData<listAgentsApiV1AgentsGetResponse>(agentsKey, {
|
||||
...previous,
|
||||
data: {
|
||||
...previous.data,
|
||||
items: nextItems,
|
||||
total: Math.max(0, previous.data.total - removedCount),
|
||||
queryClient.setQueryData<listAgentsApiV1AgentsGetResponse>(
|
||||
agentsKey,
|
||||
{
|
||||
...previous,
|
||||
data: {
|
||||
...previous.data,
|
||||
items: nextItems,
|
||||
total: Math.max(0, previous.data.total - removedCount),
|
||||
},
|
||||
},
|
||||
});
|
||||
);
|
||||
}
|
||||
return { previous };
|
||||
},
|
||||
@@ -170,103 +179,99 @@ export default function AgentsPage() {
|
||||
},
|
||||
},
|
||||
},
|
||||
queryClient
|
||||
queryClient,
|
||||
);
|
||||
|
||||
const sortedAgents = useMemo(() => [...agents], [agents]);
|
||||
|
||||
|
||||
const handleDelete = () => {
|
||||
if (!deleteTarget) return;
|
||||
deleteMutation.mutate({ agentId: deleteTarget.id });
|
||||
};
|
||||
|
||||
const columns = useMemo<ColumnDef<AgentRead>[]>(
|
||||
() => {
|
||||
const resolveBoardName = (agent: AgentRead) =>
|
||||
boards.find((board) => board.id === agent.board_id)?.name ?? "—";
|
||||
const columns = useMemo<ColumnDef<AgentRead>[]>(() => {
|
||||
const resolveBoardName = (agent: AgentRead) =>
|
||||
boards.find((board) => board.id === agent.board_id)?.name ?? "—";
|
||||
|
||||
return [
|
||||
{
|
||||
accessorKey: "name",
|
||||
header: "Agent",
|
||||
cell: ({ row }) => (
|
||||
<Link href={`/agents/${row.original.id}`} className="group block">
|
||||
<p className="text-sm font-medium text-slate-900 group-hover:text-blue-600">
|
||||
{row.original.name}
|
||||
</p>
|
||||
<p className="text-xs text-slate-500">ID {row.original.id}</p>
|
||||
return [
|
||||
{
|
||||
accessorKey: "name",
|
||||
header: "Agent",
|
||||
cell: ({ row }) => (
|
||||
<Link href={`/agents/${row.original.id}`} className="group block">
|
||||
<p className="text-sm font-medium text-slate-900 group-hover:text-blue-600">
|
||||
{row.original.name}
|
||||
</p>
|
||||
<p className="text-xs text-slate-500">ID {row.original.id}</p>
|
||||
</Link>
|
||||
),
|
||||
},
|
||||
{
|
||||
accessorKey: "status",
|
||||
header: "Status",
|
||||
cell: ({ row }) => (
|
||||
<StatusPill status={row.original.status ?? "unknown"} />
|
||||
),
|
||||
},
|
||||
{
|
||||
accessorKey: "openclaw_session_id",
|
||||
header: "Session",
|
||||
cell: ({ row }) => (
|
||||
<span className="text-sm text-slate-700">
|
||||
{truncate(row.original.openclaw_session_id)}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
accessorKey: "board_id",
|
||||
header: "Board",
|
||||
cell: ({ row }) => (
|
||||
<span className="text-sm text-slate-700">
|
||||
{resolveBoardName(row.original)}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
accessorKey: "last_seen_at",
|
||||
header: "Last seen",
|
||||
cell: ({ row }) => (
|
||||
<span className="text-sm text-slate-700">
|
||||
{formatRelative(row.original.last_seen_at)}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
accessorKey: "updated_at",
|
||||
header: "Updated",
|
||||
cell: ({ row }) => (
|
||||
<span className="text-sm text-slate-700">
|
||||
{formatTimestamp(row.original.updated_at)}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
id: "actions",
|
||||
header: "",
|
||||
cell: ({ row }) => (
|
||||
<div className="flex justify-end gap-2">
|
||||
<Link
|
||||
href={`/agents/${row.original.id}/edit`}
|
||||
className={buttonVariants({ variant: "ghost", size: "sm" })}
|
||||
>
|
||||
Edit
|
||||
</Link>
|
||||
),
|
||||
},
|
||||
{
|
||||
accessorKey: "status",
|
||||
header: "Status",
|
||||
cell: ({ row }) => (
|
||||
<StatusPill status={row.original.status ?? "unknown"} />
|
||||
),
|
||||
},
|
||||
{
|
||||
accessorKey: "openclaw_session_id",
|
||||
header: "Session",
|
||||
cell: ({ row }) => (
|
||||
<span className="text-sm text-slate-700">
|
||||
{truncate(row.original.openclaw_session_id)}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
accessorKey: "board_id",
|
||||
header: "Board",
|
||||
cell: ({ row }) => (
|
||||
<span className="text-sm text-slate-700">
|
||||
{resolveBoardName(row.original)}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
accessorKey: "last_seen_at",
|
||||
header: "Last seen",
|
||||
cell: ({ row }) => (
|
||||
<span className="text-sm text-slate-700">
|
||||
{formatRelative(row.original.last_seen_at)}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
accessorKey: "updated_at",
|
||||
header: "Updated",
|
||||
cell: ({ row }) => (
|
||||
<span className="text-sm text-slate-700">
|
||||
{formatTimestamp(row.original.updated_at)}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
id: "actions",
|
||||
header: "",
|
||||
cell: ({ row }) => (
|
||||
<div className="flex justify-end gap-2">
|
||||
<Link
|
||||
href={`/agents/${row.original.id}/edit`}
|
||||
className={buttonVariants({ variant: "ghost", size: "sm" })}
|
||||
>
|
||||
Edit
|
||||
</Link>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
onClick={() => setDeleteTarget(row.original)}
|
||||
>
|
||||
Delete
|
||||
</Button>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
];
|
||||
},
|
||||
[boards]
|
||||
);
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
onClick={() => setDeleteTarget(row.original)}
|
||||
>
|
||||
Delete
|
||||
</Button>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
];
|
||||
}, [boards]);
|
||||
|
||||
// eslint-disable-next-line react-hooks/incompatible-library
|
||||
const table = useReactTable({
|
||||
@@ -330,7 +335,7 @@ export default function AgentsPage() {
|
||||
? null
|
||||
: flexRender(
|
||||
header.column.columnDef.header,
|
||||
header.getContext()
|
||||
header.getContext(),
|
||||
)}
|
||||
</th>
|
||||
))}
|
||||
@@ -341,7 +346,9 @@ export default function AgentsPage() {
|
||||
{agentsQuery.isLoading ? (
|
||||
<tr>
|
||||
<td colSpan={columns.length} className="px-6 py-8">
|
||||
<span className="text-sm text-slate-500">Loading…</span>
|
||||
<span className="text-sm text-slate-500">
|
||||
Loading…
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
) : table.getRowModel().rows.length ? (
|
||||
@@ -351,7 +358,7 @@ export default function AgentsPage() {
|
||||
<td key={cell.id} className="px-6 py-4">
|
||||
{flexRender(
|
||||
cell.column.columnDef.cell,
|
||||
cell.getContext()
|
||||
cell.getContext(),
|
||||
)}
|
||||
</td>
|
||||
))}
|
||||
@@ -386,7 +393,10 @@ export default function AgentsPage() {
|
||||
</p>
|
||||
<Link
|
||||
href="/agents/new"
|
||||
className={buttonVariants({ size: "md", variant: "primary" })}
|
||||
className={buttonVariants({
|
||||
size: "md",
|
||||
variant: "primary",
|
||||
})}
|
||||
>
|
||||
Create your first agent
|
||||
</Link>
|
||||
@@ -420,7 +430,8 @@ export default function AgentsPage() {
|
||||
<DialogHeader>
|
||||
<DialogTitle>Delete agent</DialogTitle>
|
||||
<DialogDescription>
|
||||
This will remove {deleteTarget?.name}. This action cannot be undone.
|
||||
This will remove {deleteTarget?.name}. This action cannot be
|
||||
undone.
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
{deleteMutation.error ? (
|
||||
|
||||
483
frontend/src/app/board-groups/[groupId]/edit/page.tsx
Normal file
483
frontend/src/app/board-groups/[groupId]/edit/page.tsx
Normal file
@@ -0,0 +1,483 @@
|
||||
"use client";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
import { useEffect, useMemo, useRef, useState } from "react";
|
||||
import { useParams, useRouter, useSearchParams } from "next/navigation";
|
||||
|
||||
import { SignInButton, SignedIn, SignedOut, useAuth } from "@/auth/clerk";
|
||||
|
||||
import { ApiError } from "@/api/mutator";
|
||||
import {
|
||||
type listBoardsApiV1BoardsGetResponse,
|
||||
updateBoardApiV1BoardsBoardIdPatch,
|
||||
useListBoardsApiV1BoardsGet,
|
||||
} from "@/api/generated/boards/boards";
|
||||
import {
|
||||
type getBoardGroupApiV1BoardGroupsGroupIdGetResponse,
|
||||
useGetBoardGroupApiV1BoardGroupsGroupIdGet,
|
||||
useUpdateBoardGroupApiV1BoardGroupsGroupIdPatch,
|
||||
} from "@/api/generated/board-groups/board-groups";
|
||||
import type {
|
||||
BoardGroupRead,
|
||||
BoardGroupUpdate,
|
||||
BoardRead,
|
||||
} from "@/api/generated/model";
|
||||
import { DashboardSidebar } from "@/components/organisms/DashboardSidebar";
|
||||
import { DashboardShell } from "@/components/templates/DashboardShell";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Textarea } from "@/components/ui/textarea";
|
||||
|
||||
const slugify = (value: string) =>
|
||||
value
|
||||
.toLowerCase()
|
||||
.trim()
|
||||
.replace(/[^a-z0-9]+/g, "-")
|
||||
.replace(/(^-|-$)/g, "") || "group";
|
||||
|
||||
export default function EditBoardGroupPage() {
|
||||
const { isSignedIn } = useAuth();
|
||||
const router = useRouter();
|
||||
const searchParams = useSearchParams();
|
||||
const params = useParams();
|
||||
const groupIdParam = params?.groupId;
|
||||
const groupId = Array.isArray(groupIdParam) ? groupIdParam[0] : groupIdParam;
|
||||
|
||||
const [name, setName] = useState<string | undefined>(undefined);
|
||||
const [description, setDescription] = useState<string | undefined>(undefined);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
|
||||
const [boardSearch, setBoardSearch] = useState("");
|
||||
const [selectedBoardIds, setSelectedBoardIds] = useState<Set<string>>(
|
||||
() => new Set(),
|
||||
);
|
||||
const [isAssignmentsSaving, setIsAssignmentsSaving] = useState(false);
|
||||
const [assignmentsError, setAssignmentsError] = useState<string | null>(null);
|
||||
const [assignmentsResult, setAssignmentsResult] = useState<{
|
||||
updated: number;
|
||||
failed: number;
|
||||
} | null>(null);
|
||||
|
||||
const assignFailedParam = searchParams.get("assign_failed");
|
||||
const assignFailedCount = assignFailedParam
|
||||
? Number.parseInt(assignFailedParam, 10)
|
||||
: null;
|
||||
|
||||
const groupQuery = useGetBoardGroupApiV1BoardGroupsGroupIdGet<
|
||||
getBoardGroupApiV1BoardGroupsGroupIdGetResponse,
|
||||
ApiError
|
||||
>(groupId ?? "", {
|
||||
query: {
|
||||
enabled: Boolean(isSignedIn && groupId),
|
||||
refetchOnMount: "always",
|
||||
retry: false,
|
||||
},
|
||||
});
|
||||
|
||||
const loadedGroup: BoardGroupRead | null =
|
||||
groupQuery.data?.status === 200 ? groupQuery.data.data : null;
|
||||
const baseGroup = loadedGroup;
|
||||
|
||||
const resolvedName = name ?? baseGroup?.name ?? "";
|
||||
const resolvedDescription = description ?? baseGroup?.description ?? "";
|
||||
|
||||
const allBoardsQuery = useListBoardsApiV1BoardsGet<
|
||||
listBoardsApiV1BoardsGetResponse,
|
||||
ApiError
|
||||
>(
|
||||
{ limit: 200 },
|
||||
{
|
||||
query: {
|
||||
enabled: Boolean(isSignedIn),
|
||||
refetchOnMount: "always",
|
||||
retry: false,
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
const groupBoardsQuery = useListBoardsApiV1BoardsGet<
|
||||
listBoardsApiV1BoardsGetResponse,
|
||||
ApiError
|
||||
>(
|
||||
{ limit: 200, board_group_id: groupId ?? null },
|
||||
{
|
||||
query: {
|
||||
enabled: Boolean(isSignedIn && groupId),
|
||||
refetchOnMount: "always",
|
||||
retry: false,
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
const allBoards = useMemo<BoardRead[]>(() => {
|
||||
if (allBoardsQuery.data?.status !== 200) return [];
|
||||
return allBoardsQuery.data.data.items ?? [];
|
||||
}, [allBoardsQuery.data]);
|
||||
|
||||
const groupBoards = useMemo<BoardRead[]>(() => {
|
||||
if (groupBoardsQuery.data?.status !== 200) return [];
|
||||
return groupBoardsQuery.data.data.items ?? [];
|
||||
}, [groupBoardsQuery.data]);
|
||||
|
||||
const boards = useMemo<BoardRead[]>(() => {
|
||||
const byId = new Map<string, BoardRead>();
|
||||
for (const board of allBoards) {
|
||||
byId.set(board.id, board);
|
||||
}
|
||||
for (const board of groupBoards) {
|
||||
byId.set(board.id, board);
|
||||
}
|
||||
const merged = Array.from(byId.values());
|
||||
merged.sort((a, b) => a.name.localeCompare(b.name));
|
||||
return merged;
|
||||
}, [allBoards, groupBoards]);
|
||||
|
||||
const initializedSelectionRef = useRef(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (!groupId) return;
|
||||
if (initializedSelectionRef.current) return;
|
||||
if (groupBoardsQuery.data?.status !== 200) return;
|
||||
initializedSelectionRef.current = true;
|
||||
setSelectedBoardIds(new Set(groupBoards.map((board) => board.id)));
|
||||
}, [groupBoards, groupBoardsQuery.data, groupId]);
|
||||
|
||||
const updateMutation =
|
||||
useUpdateBoardGroupApiV1BoardGroupsGroupIdPatch<ApiError>({
|
||||
mutation: {
|
||||
retry: false,
|
||||
},
|
||||
});
|
||||
|
||||
const isGroupSaving = groupQuery.isLoading || updateMutation.isPending;
|
||||
const boardsLoading = allBoardsQuery.isLoading || groupBoardsQuery.isLoading;
|
||||
const boardsError = groupBoardsQuery.error ?? allBoardsQuery.error ?? null;
|
||||
const isBoardsBusy = boardsLoading || isAssignmentsSaving;
|
||||
const isLoading = isGroupSaving || isBoardsBusy;
|
||||
const errorMessage = error ?? groupQuery.error?.message ?? null;
|
||||
const isFormReady = Boolean(resolvedName.trim());
|
||||
|
||||
const handleSaveAssignments = async (): Promise<{
|
||||
updated: number;
|
||||
failed: number;
|
||||
} | null> => {
|
||||
if (!isSignedIn || !groupId) return null;
|
||||
if (groupBoardsQuery.data?.status !== 200) {
|
||||
setAssignmentsError("Group boards are not loaded yet.");
|
||||
return null;
|
||||
}
|
||||
|
||||
setAssignmentsError(null);
|
||||
setAssignmentsResult(null);
|
||||
|
||||
const desired = selectedBoardIds;
|
||||
const current = new Set(groupBoards.map((board) => board.id));
|
||||
const toAdd = Array.from(desired).filter((id) => !current.has(id));
|
||||
const toRemove = Array.from(current).filter((id) => !desired.has(id));
|
||||
|
||||
const failures: string[] = [];
|
||||
let updated = 0;
|
||||
|
||||
for (const boardId of toAdd) {
|
||||
try {
|
||||
const result = await updateBoardApiV1BoardsBoardIdPatch(boardId, {
|
||||
board_group_id: groupId,
|
||||
});
|
||||
if (result.status === 200) {
|
||||
updated += 1;
|
||||
} else {
|
||||
failures.push(boardId);
|
||||
}
|
||||
} catch {
|
||||
failures.push(boardId);
|
||||
}
|
||||
}
|
||||
|
||||
for (const boardId of toRemove) {
|
||||
try {
|
||||
const result = await updateBoardApiV1BoardsBoardIdPatch(boardId, {
|
||||
board_group_id: null,
|
||||
});
|
||||
if (result.status === 200) {
|
||||
updated += 1;
|
||||
} else {
|
||||
failures.push(boardId);
|
||||
}
|
||||
} catch {
|
||||
failures.push(boardId);
|
||||
}
|
||||
}
|
||||
|
||||
setAssignmentsResult({ updated, failed: failures.length });
|
||||
if (failures.length > 0) {
|
||||
setAssignmentsError(
|
||||
`Failed to update ${failures.length} board assignment${
|
||||
failures.length === 1 ? "" : "s"
|
||||
}.`,
|
||||
);
|
||||
}
|
||||
|
||||
void groupBoardsQuery.refetch();
|
||||
void allBoardsQuery.refetch();
|
||||
|
||||
return { updated, failed: failures.length };
|
||||
};
|
||||
|
||||
const handleSubmit = async (event: React.FormEvent<HTMLFormElement>) => {
|
||||
event.preventDefault();
|
||||
if (!isSignedIn || !groupId) return;
|
||||
const trimmedName = resolvedName.trim();
|
||||
if (!trimmedName) {
|
||||
setError("Group name is required.");
|
||||
return;
|
||||
}
|
||||
|
||||
setError(null);
|
||||
setAssignmentsError(null);
|
||||
setAssignmentsResult(null);
|
||||
|
||||
const payload: BoardGroupUpdate = {
|
||||
name: trimmedName,
|
||||
slug: slugify(trimmedName),
|
||||
description: resolvedDescription.trim() || null,
|
||||
};
|
||||
|
||||
setIsAssignmentsSaving(true);
|
||||
try {
|
||||
const result = await updateMutation.mutateAsync({
|
||||
groupId,
|
||||
data: payload,
|
||||
});
|
||||
if (result.status !== 200) {
|
||||
setError("Something went wrong.");
|
||||
return;
|
||||
}
|
||||
|
||||
const assignments = await handleSaveAssignments();
|
||||
if (!assignments || assignments.failed > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
router.push(`/board-groups/${result.data.id}`);
|
||||
} catch (err) {
|
||||
const message =
|
||||
err instanceof ApiError
|
||||
? err.message
|
||||
: err instanceof Error
|
||||
? err.message
|
||||
: null;
|
||||
setError(message || "Something went wrong.");
|
||||
} finally {
|
||||
setIsAssignmentsSaving(false);
|
||||
}
|
||||
};
|
||||
|
||||
const title = useMemo(
|
||||
() => baseGroup?.name ?? "Edit group",
|
||||
[baseGroup?.name],
|
||||
);
|
||||
|
||||
return (
|
||||
<DashboardShell>
|
||||
<SignedOut>
|
||||
<div className="col-span-2 flex min-h-[calc(100vh-64px)] items-center justify-center bg-slate-50 p-10 text-center">
|
||||
<div className="rounded-xl border border-slate-200 bg-white px-8 py-6 shadow-sm">
|
||||
<p className="text-sm text-slate-600">
|
||||
Sign in to edit board groups.
|
||||
</p>
|
||||
<SignInButton
|
||||
mode="modal"
|
||||
forceRedirectUrl={`/board-groups/${groupId ?? ""}/edit`}
|
||||
>
|
||||
<Button className="mt-4">Sign in</Button>
|
||||
</SignInButton>
|
||||
</div>
|
||||
</div>
|
||||
</SignedOut>
|
||||
<SignedIn>
|
||||
<DashboardSidebar />
|
||||
<main className="flex-1 overflow-y-auto bg-slate-50">
|
||||
<div className="border-b border-slate-200 bg-white px-8 py-6">
|
||||
<div>
|
||||
<h1 className="font-heading text-2xl font-semibold text-slate-900 tracking-tight">
|
||||
{title}
|
||||
</h1>
|
||||
<p className="mt-1 text-sm text-slate-500">
|
||||
Update the shared context that connects boards in this group.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="p-8">
|
||||
<form
|
||||
onSubmit={handleSubmit}
|
||||
className="space-y-6 rounded-xl border border-slate-200 bg-white p-6 shadow-sm"
|
||||
>
|
||||
{assignFailedCount && Number.isFinite(assignFailedCount) ? (
|
||||
<div className="rounded-xl border border-amber-200 bg-amber-50 p-4 text-sm text-amber-900 shadow-sm">
|
||||
Group was created, but {assignFailedCount} board assignment
|
||||
{assignFailedCount === 1 ? "" : "s"} failed. You can retry
|
||||
below.
|
||||
</div>
|
||||
) : null}
|
||||
<div className="grid gap-6 md:grid-cols-2">
|
||||
<div className="space-y-2">
|
||||
<label className="text-sm font-medium text-slate-900">
|
||||
Group name <span className="text-red-500">*</span>
|
||||
</label>
|
||||
<Input
|
||||
value={resolvedName}
|
||||
onChange={(event) => setName(event.target.value)}
|
||||
placeholder="Group name"
|
||||
disabled={isLoading || !baseGroup}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="space-y-2">
|
||||
<label className="text-sm font-medium text-slate-900">
|
||||
Description
|
||||
</label>
|
||||
<Textarea
|
||||
value={resolvedDescription}
|
||||
onChange={(event) => setDescription(event.target.value)}
|
||||
placeholder="What ties these boards together?"
|
||||
className="min-h-[120px]"
|
||||
disabled={isLoading || !baseGroup}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="space-y-2 border-t border-slate-100 pt-6">
|
||||
<div className="flex flex-wrap items-center justify-between gap-2">
|
||||
<div>
|
||||
<p className="text-sm font-medium text-slate-900">Boards</p>
|
||||
<p className="mt-1 text-xs text-slate-500">
|
||||
Assign boards to this group to share context across
|
||||
related work.
|
||||
</p>
|
||||
</div>
|
||||
<span className="text-xs text-slate-500">
|
||||
{selectedBoardIds.size} selected
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<Input
|
||||
value={boardSearch}
|
||||
onChange={(event) => setBoardSearch(event.target.value)}
|
||||
placeholder="Search boards..."
|
||||
disabled={isLoading || !baseGroup}
|
||||
/>
|
||||
|
||||
<div className="max-h-64 overflow-auto rounded-xl border border-slate-200 bg-slate-50/40">
|
||||
{boardsLoading && boards.length === 0 ? (
|
||||
<div className="px-4 py-6 text-sm text-slate-500">
|
||||
Loading boards…
|
||||
</div>
|
||||
) : boardsError ? (
|
||||
<div className="px-4 py-6 text-sm text-rose-700">
|
||||
{boardsError.message}
|
||||
</div>
|
||||
) : boards.length === 0 ? (
|
||||
<div className="px-4 py-6 text-sm text-slate-500">
|
||||
No boards found.
|
||||
</div>
|
||||
) : (
|
||||
<ul className="divide-y divide-slate-200">
|
||||
{boards
|
||||
.filter((board) => {
|
||||
const q = boardSearch.trim().toLowerCase();
|
||||
if (!q) return true;
|
||||
return (
|
||||
board.name.toLowerCase().includes(q) ||
|
||||
board.slug.toLowerCase().includes(q)
|
||||
);
|
||||
})
|
||||
.map((board) => {
|
||||
const checked = selectedBoardIds.has(board.id);
|
||||
const isInThisGroup =
|
||||
board.board_group_id === groupId;
|
||||
const isAlreadyGrouped =
|
||||
Boolean(board.board_group_id) && !isInThisGroup;
|
||||
return (
|
||||
<li key={board.id} className="px-4 py-3">
|
||||
<label className="flex cursor-pointer items-start gap-3">
|
||||
<input
|
||||
type="checkbox"
|
||||
className="mt-1 h-4 w-4 rounded border-slate-300 text-blue-600"
|
||||
checked={checked}
|
||||
onChange={() => {
|
||||
setSelectedBoardIds((prev) => {
|
||||
const next = new Set(prev);
|
||||
if (next.has(board.id)) {
|
||||
next.delete(board.id);
|
||||
} else {
|
||||
next.add(board.id);
|
||||
}
|
||||
return next;
|
||||
});
|
||||
}}
|
||||
disabled={isLoading || !baseGroup}
|
||||
/>
|
||||
<div className="min-w-0">
|
||||
<p className="truncate text-sm font-medium text-slate-900">
|
||||
{board.name}
|
||||
</p>
|
||||
<div className="mt-1 flex flex-wrap items-center gap-2 text-xs text-slate-500">
|
||||
<span className="font-mono text-[11px] text-slate-400">
|
||||
{board.id}
|
||||
</span>
|
||||
{isAlreadyGrouped ? (
|
||||
<span className="rounded-full border border-amber-200 bg-amber-50 px-2 py-0.5 text-amber-900">
|
||||
in another group
|
||||
</span>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</ul>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{assignmentsError ? (
|
||||
<p className="text-sm text-rose-700">{assignmentsError}</p>
|
||||
) : null}
|
||||
{assignmentsResult ? (
|
||||
<p className="text-sm text-slate-700">
|
||||
Updated {assignmentsResult.updated} board
|
||||
{assignmentsResult.updated === 1 ? "" : "s"}, failed{" "}
|
||||
{assignmentsResult.failed}.
|
||||
</p>
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
{errorMessage ? (
|
||||
<p className="text-sm text-red-500">{errorMessage}</p>
|
||||
) : null}
|
||||
|
||||
<div className="flex justify-end gap-3">
|
||||
<Button
|
||||
type="button"
|
||||
variant="ghost"
|
||||
onClick={() => router.push(`/board-groups/${groupId ?? ""}`)}
|
||||
disabled={isLoading}
|
||||
>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button
|
||||
type="submit"
|
||||
disabled={isLoading || !baseGroup || !isFormReady}
|
||||
>
|
||||
{isLoading ? "Saving…" : "Save changes"}
|
||||
</Button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</main>
|
||||
</SignedIn>
|
||||
</DashboardShell>
|
||||
);
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user