feat: add organization-related models and update schemas for organization management
This commit is contained in:
@@ -53,6 +53,7 @@ import type {
|
||||
ListTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGetParams,
|
||||
ListTasksApiV1AgentBoardsBoardIdTasksGetParams,
|
||||
OkResponse,
|
||||
SoulUpdateRequest,
|
||||
TaskCommentCreate,
|
||||
TaskCommentRead,
|
||||
TaskCreate,
|
||||
@@ -3035,6 +3036,449 @@ export const useAgentHeartbeatApiV1AgentHeartbeatPost = <
|
||||
queryClient,
|
||||
);
|
||||
};
|
||||
/**
|
||||
* @summary Get Agent Soul
|
||||
*/
|
||||
export type getAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGetResponse200 =
|
||||
{
|
||||
data: string;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type getAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGetResponse422 =
|
||||
{
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type getAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGetResponseSuccess =
|
||||
getAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGetResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type getAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGetResponseError =
|
||||
getAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGetResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type getAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGetResponse =
|
||||
| getAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGetResponseSuccess
|
||||
| getAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGetResponseError;
|
||||
|
||||
export const getGetAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGetUrl = (
|
||||
boardId: string,
|
||||
agentId: string,
|
||||
) => {
|
||||
return `/api/v1/agent/boards/${boardId}/agents/${agentId}/soul`;
|
||||
};
|
||||
|
||||
export const getAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGet = async (
|
||||
boardId: string,
|
||||
agentId: string,
|
||||
options?: RequestInit,
|
||||
): Promise<getAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGetResponse> => {
|
||||
return customFetch<getAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGetResponse>(
|
||||
getGetAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGetUrl(
|
||||
boardId,
|
||||
agentId,
|
||||
),
|
||||
{
|
||||
...options,
|
||||
method: "GET",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getGetAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGetQueryKey =
|
||||
(boardId: string, agentId: string) => {
|
||||
return [`/api/v1/agent/boards/${boardId}/agents/${agentId}/soul`] as const;
|
||||
};
|
||||
|
||||
export const getGetAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGetQueryOptions =
|
||||
<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof getAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
boardId: string,
|
||||
agentId: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof getAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGet
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey =
|
||||
queryOptions?.queryKey ??
|
||||
getGetAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGetQueryKey(
|
||||
boardId,
|
||||
agentId,
|
||||
);
|
||||
|
||||
const queryFn: QueryFunction<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof getAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGet
|
||||
>
|
||||
>
|
||||
> = ({ signal }) =>
|
||||
getAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGet(
|
||||
boardId,
|
||||
agentId,
|
||||
{ signal, ...requestOptions },
|
||||
);
|
||||
|
||||
return {
|
||||
queryKey,
|
||||
queryFn,
|
||||
enabled: !!(boardId && agentId),
|
||||
...queryOptions,
|
||||
} as UseQueryOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof getAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGet
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type GetAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGetQueryResult =
|
||||
NonNullable<
|
||||
Awaited<
|
||||
ReturnType<typeof getAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGet>
|
||||
>
|
||||
>;
|
||||
export type GetAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGetQueryError =
|
||||
HTTPValidationError;
|
||||
|
||||
export function useGetAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof getAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
boardId: string,
|
||||
agentId: string,
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof getAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGet
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof getAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGet
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof getAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGet
|
||||
>
|
||||
>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof getAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
boardId: string,
|
||||
agentId: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof getAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGet
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof getAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGet
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof getAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGet
|
||||
>
|
||||
>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof getAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
boardId: string,
|
||||
agentId: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof getAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGet
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary Get Agent Soul
|
||||
*/
|
||||
|
||||
export function useGetAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof getAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
boardId: string,
|
||||
agentId: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof getAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGet
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions =
|
||||
getGetAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulGetQueryOptions(
|
||||
boardId,
|
||||
agentId,
|
||||
options,
|
||||
);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
return { ...query, queryKey: queryOptions.queryKey };
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Update Agent Soul
|
||||
*/
|
||||
export type updateAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulPutResponse200 =
|
||||
{
|
||||
data: OkResponse;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type updateAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulPutResponse422 =
|
||||
{
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type updateAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulPutResponseSuccess =
|
||||
updateAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulPutResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type updateAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulPutResponseError =
|
||||
updateAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulPutResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type updateAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulPutResponse =
|
||||
| updateAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulPutResponseSuccess
|
||||
| updateAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulPutResponseError;
|
||||
|
||||
export const getUpdateAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulPutUrl =
|
||||
(boardId: string, agentId: string) => {
|
||||
return `/api/v1/agent/boards/${boardId}/agents/${agentId}/soul`;
|
||||
};
|
||||
|
||||
export const updateAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulPut =
|
||||
async (
|
||||
boardId: string,
|
||||
agentId: string,
|
||||
soulUpdateRequest: SoulUpdateRequest,
|
||||
options?: RequestInit,
|
||||
): Promise<updateAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulPutResponse> => {
|
||||
return customFetch<updateAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulPutResponse>(
|
||||
getUpdateAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulPutUrl(
|
||||
boardId,
|
||||
agentId,
|
||||
),
|
||||
{
|
||||
...options,
|
||||
method: "PUT",
|
||||
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||
body: JSON.stringify(soulUpdateRequest),
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getUpdateAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulPutMutationOptions =
|
||||
<TError = HTTPValidationError, TContext = unknown>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof updateAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulPut
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
{ boardId: string; agentId: string; data: SoulUpdateRequest },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof updateAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulPut
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
{ boardId: string; agentId: string; data: SoulUpdateRequest },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = [
|
||||
"updateAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulPut",
|
||||
];
|
||||
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 updateAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulPut
|
||||
>
|
||||
>,
|
||||
{ boardId: string; agentId: string; data: SoulUpdateRequest }
|
||||
> = (props) => {
|
||||
const { boardId, agentId, data } = props ?? {};
|
||||
|
||||
return updateAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulPut(
|
||||
boardId,
|
||||
agentId,
|
||||
data,
|
||||
requestOptions,
|
||||
);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type UpdateAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulPutMutationResult =
|
||||
NonNullable<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof updateAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulPut
|
||||
>
|
||||
>
|
||||
>;
|
||||
export type UpdateAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulPutMutationBody =
|
||||
SoulUpdateRequest;
|
||||
export type UpdateAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulPutMutationError =
|
||||
HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Update Agent Soul
|
||||
*/
|
||||
export const useUpdateAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulPut = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof updateAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulPut
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
{ boardId: string; agentId: string; data: SoulUpdateRequest },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof updateAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulPut
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
{ boardId: string; agentId: string; data: SoulUpdateRequest },
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(
|
||||
getUpdateAgentSoulApiV1AgentBoardsBoardIdAgentsAgentIdSoulPutMutationOptions(
|
||||
options,
|
||||
),
|
||||
queryClient,
|
||||
);
|
||||
};
|
||||
/**
|
||||
* @summary Ask User Via Gateway Main
|
||||
*/
|
||||
|
||||
@@ -10,6 +10,7 @@ export interface BoardGroupRead {
|
||||
slug: string;
|
||||
description?: string | null;
|
||||
id: string;
|
||||
organization_id: string;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ export interface BoardRead {
|
||||
goal_confirmed?: boolean;
|
||||
goal_source?: string | null;
|
||||
id: string;
|
||||
organization_id: string;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ export interface GatewayRead {
|
||||
main_session_key: string;
|
||||
workspace_root: string;
|
||||
id: string;
|
||||
organization_id: string;
|
||||
token?: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
|
||||
@@ -131,6 +131,8 @@ export * from "./limitOffsetPageTypeVarCustomizedBoardGroupRead";
|
||||
export * from "./limitOffsetPageTypeVarCustomizedBoardMemoryRead";
|
||||
export * from "./limitOffsetPageTypeVarCustomizedBoardRead";
|
||||
export * from "./limitOffsetPageTypeVarCustomizedGatewayRead";
|
||||
export * from "./limitOffsetPageTypeVarCustomizedOrganizationInviteRead";
|
||||
export * from "./limitOffsetPageTypeVarCustomizedOrganizationMemberRead";
|
||||
export * from "./limitOffsetPageTypeVarCustomizedTaskCommentRead";
|
||||
export * from "./limitOffsetPageTypeVarCustomizedTaskRead";
|
||||
export * from "./listActivityApiV1ActivityGetParams";
|
||||
@@ -147,6 +149,8 @@ export * from "./listBoardsApiV1AgentBoardsGetParams";
|
||||
export * from "./listBoardsApiV1BoardsGetParams";
|
||||
export * from "./listGatewaysApiV1GatewaysGetParams";
|
||||
export * from "./listGatewaySessionsApiV1GatewaysSessionsGetParams";
|
||||
export * from "./listOrgInvitesApiV1OrganizationsMeInvitesGetParams";
|
||||
export * from "./listOrgMembersApiV1OrganizationsMeMembersGetParams";
|
||||
export * from "./listSessionsApiV1GatewaySessionsGet200";
|
||||
export * from "./listSessionsApiV1GatewaySessionsGetParams";
|
||||
export * from "./listTaskCommentFeedApiV1ActivityTaskCommentsGetParams";
|
||||
@@ -155,11 +159,29 @@ export * from "./listTaskCommentsApiV1BoardsBoardIdTasksTaskIdCommentsGetParams"
|
||||
export * from "./listTasksApiV1AgentBoardsBoardIdTasksGetParams";
|
||||
export * from "./listTasksApiV1BoardsBoardIdTasksGetParams";
|
||||
export * from "./okResponse";
|
||||
export * from "./organizationActiveUpdate";
|
||||
export * from "./organizationBoardAccessRead";
|
||||
export * from "./organizationBoardAccessSpec";
|
||||
export * from "./organizationCreate";
|
||||
export * from "./organizationInviteAccept";
|
||||
export * from "./organizationInviteCreate";
|
||||
export * from "./organizationInviteRead";
|
||||
export * from "./organizationListItem";
|
||||
export * from "./organizationMemberAccessUpdate";
|
||||
export * from "./organizationMemberRead";
|
||||
export * from "./organizationMemberUpdate";
|
||||
export * from "./organizationRead";
|
||||
export * from "./organizationUserRead";
|
||||
export * from "./readyzReadyzGet200";
|
||||
export * from "./searchApiV1SoulsDirectorySearchGetParams";
|
||||
export * from "./sendGatewaySessionMessageApiV1GatewaysSessionsSessionIdMessagePostParams";
|
||||
export * from "./sendSessionMessageApiV1GatewaySessionsSessionIdMessagePost200";
|
||||
export * from "./sendSessionMessageApiV1GatewaySessionsSessionIdMessagePostBody";
|
||||
export * from "./sendSessionMessageApiV1GatewaySessionsSessionIdMessagePostParams";
|
||||
export * from "./soulsDirectoryMarkdownResponse";
|
||||
export * from "./soulsDirectorySearchResponse";
|
||||
export * from "./soulsDirectorySoulRef";
|
||||
export * from "./soulUpdateRequest";
|
||||
export * from "./streamAgentsApiV1AgentsStreamGetParams";
|
||||
export * from "./streamApprovalsApiV1BoardsBoardIdApprovalsStreamGetParams";
|
||||
export * from "./streamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGetParams";
|
||||
|
||||
@@ -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 { OrganizationInviteRead } from "./organizationInviteRead";
|
||||
|
||||
export interface LimitOffsetPageTypeVarCustomizedOrganizationInviteRead {
|
||||
items: OrganizationInviteRead[];
|
||||
/** @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 { OrganizationMemberRead } from "./organizationMemberRead";
|
||||
|
||||
export interface LimitOffsetPageTypeVarCustomizedOrganizationMemberRead {
|
||||
items: OrganizationMemberRead[];
|
||||
/** @minimum 0 */
|
||||
total: number;
|
||||
/** @minimum 1 */
|
||||
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 ListOrgInvitesApiV1OrganizationsMeInvitesGetParams = {
|
||||
/**
|
||||
* @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 ListOrgMembersApiV1OrganizationsMeMembersGetParams = {
|
||||
/**
|
||||
* @minimum 1
|
||||
* @maximum 200
|
||||
*/
|
||||
limit?: number;
|
||||
/**
|
||||
* @minimum 0
|
||||
*/
|
||||
offset?: number;
|
||||
};
|
||||
10
frontend/src/api/generated/model/organizationActiveUpdate.ts
Normal file
10
frontend/src/api/generated/model/organizationActiveUpdate.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface OrganizationActiveUpdate {
|
||||
organization_id: string;
|
||||
}
|
||||
@@ -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 OrganizationBoardAccessRead {
|
||||
id: string;
|
||||
board_id: string;
|
||||
can_read: boolean;
|
||||
can_write: boolean;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
@@ -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 OrganizationBoardAccessSpec {
|
||||
board_id: string;
|
||||
can_read?: boolean;
|
||||
can_write?: boolean;
|
||||
}
|
||||
10
frontend/src/api/generated/model/organizationCreate.ts
Normal file
10
frontend/src/api/generated/model/organizationCreate.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface OrganizationCreate {
|
||||
name: string;
|
||||
}
|
||||
10
frontend/src/api/generated/model/organizationInviteAccept.ts
Normal file
10
frontend/src/api/generated/model/organizationInviteAccept.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface OrganizationInviteAccept {
|
||||
token: string;
|
||||
}
|
||||
15
frontend/src/api/generated/model/organizationInviteCreate.ts
Normal file
15
frontend/src/api/generated/model/organizationInviteCreate.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 { OrganizationBoardAccessSpec } from "./organizationBoardAccessSpec";
|
||||
|
||||
export interface OrganizationInviteCreate {
|
||||
invited_email: string;
|
||||
role?: string;
|
||||
all_boards_read?: boolean;
|
||||
all_boards_write?: boolean;
|
||||
board_access?: OrganizationBoardAccessSpec[];
|
||||
}
|
||||
21
frontend/src/api/generated/model/organizationInviteRead.ts
Normal file
21
frontend/src/api/generated/model/organizationInviteRead.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 OrganizationInviteRead {
|
||||
id: string;
|
||||
organization_id: string;
|
||||
invited_email: string;
|
||||
role: string;
|
||||
all_boards_read: boolean;
|
||||
all_boards_write: boolean;
|
||||
token: string;
|
||||
created_by_user_id?: string | null;
|
||||
accepted_by_user_id?: string | null;
|
||||
accepted_at?: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
13
frontend/src/api/generated/model/organizationListItem.ts
Normal file
13
frontend/src/api/generated/model/organizationListItem.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 OrganizationListItem {
|
||||
id: string;
|
||||
name: string;
|
||||
role: string;
|
||||
is_active: boolean;
|
||||
}
|
||||
@@ -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 { OrganizationBoardAccessSpec } from "./organizationBoardAccessSpec";
|
||||
|
||||
export interface OrganizationMemberAccessUpdate {
|
||||
all_boards_read?: boolean;
|
||||
all_boards_write?: boolean;
|
||||
board_access?: OrganizationBoardAccessSpec[];
|
||||
}
|
||||
21
frontend/src/api/generated/model/organizationMemberRead.ts
Normal file
21
frontend/src/api/generated/model/organizationMemberRead.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
|
||||
*/
|
||||
import type { OrganizationBoardAccessRead } from "./organizationBoardAccessRead";
|
||||
import type { OrganizationUserRead } from "./organizationUserRead";
|
||||
|
||||
export interface OrganizationMemberRead {
|
||||
id: string;
|
||||
organization_id: string;
|
||||
user_id: string;
|
||||
role: string;
|
||||
all_boards_read: boolean;
|
||||
all_boards_write: boolean;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
user?: OrganizationUserRead | null;
|
||||
board_access?: OrganizationBoardAccessRead[];
|
||||
}
|
||||
10
frontend/src/api/generated/model/organizationMemberUpdate.ts
Normal file
10
frontend/src/api/generated/model/organizationMemberUpdate.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface OrganizationMemberUpdate {
|
||||
role?: string | null;
|
||||
}
|
||||
13
frontend/src/api/generated/model/organizationRead.ts
Normal file
13
frontend/src/api/generated/model/organizationRead.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 OrganizationRead {
|
||||
id: string;
|
||||
name: string;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
13
frontend/src/api/generated/model/organizationUserRead.ts
Normal file
13
frontend/src/api/generated/model/organizationUserRead.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 OrganizationUserRead {
|
||||
id: string;
|
||||
email?: string | null;
|
||||
name?: string | null;
|
||||
preferred_name?: string | null;
|
||||
}
|
||||
@@ -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 SearchApiV1SoulsDirectorySearchGetParams = {
|
||||
/**
|
||||
* @minLength 0
|
||||
*/
|
||||
q?: string;
|
||||
/**
|
||||
* @minimum 1
|
||||
* @maximum 100
|
||||
*/
|
||||
limit?: number;
|
||||
};
|
||||
12
frontend/src/api/generated/model/soulUpdateRequest.ts
Normal file
12
frontend/src/api/generated/model/soulUpdateRequest.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 SoulUpdateRequest {
|
||||
content: string;
|
||||
source_url?: string | null;
|
||||
reason?: string | 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 interface SoulsDirectoryMarkdownResponse {
|
||||
handle: string;
|
||||
slug: string;
|
||||
content: string;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import type { SoulsDirectorySoulRef } from "./soulsDirectorySoulRef";
|
||||
|
||||
export interface SoulsDirectorySearchResponse {
|
||||
items: SoulsDirectorySoulRef[];
|
||||
}
|
||||
13
frontend/src/api/generated/model/soulsDirectorySoulRef.ts
Normal file
13
frontend/src/api/generated/model/soulsDirectorySoulRef.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 SoulsDirectorySoulRef {
|
||||
handle: string;
|
||||
slug: string;
|
||||
page_url: string;
|
||||
raw_md_url: string;
|
||||
}
|
||||
2329
frontend/src/api/generated/organizations/organizations.ts
Normal file
2329
frontend/src/api/generated/organizations/organizations.ts
Normal file
File diff suppressed because it is too large
Load Diff
727
frontend/src/api/generated/souls-directory/souls-directory.ts
Normal file
727
frontend/src/api/generated/souls-directory/souls-directory.ts
Normal file
@@ -0,0 +1,727 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import type {
|
||||
DataTag,
|
||||
DefinedInitialDataOptions,
|
||||
DefinedUseQueryResult,
|
||||
QueryClient,
|
||||
QueryFunction,
|
||||
QueryKey,
|
||||
UndefinedInitialDataOptions,
|
||||
UseQueryOptions,
|
||||
UseQueryResult,
|
||||
} from "@tanstack/react-query";
|
||||
|
||||
import type {
|
||||
HTTPValidationError,
|
||||
SearchApiV1SoulsDirectorySearchGetParams,
|
||||
SoulsDirectoryMarkdownResponse,
|
||||
SoulsDirectorySearchResponse,
|
||||
} from ".././model";
|
||||
|
||||
import { customFetch } from "../../mutator";
|
||||
|
||||
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||
|
||||
/**
|
||||
* @summary Search
|
||||
*/
|
||||
export type searchApiV1SoulsDirectorySearchGetResponse200 = {
|
||||
data: SoulsDirectorySearchResponse;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type searchApiV1SoulsDirectorySearchGetResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type searchApiV1SoulsDirectorySearchGetResponseSuccess =
|
||||
searchApiV1SoulsDirectorySearchGetResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type searchApiV1SoulsDirectorySearchGetResponseError =
|
||||
searchApiV1SoulsDirectorySearchGetResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type searchApiV1SoulsDirectorySearchGetResponse =
|
||||
| searchApiV1SoulsDirectorySearchGetResponseSuccess
|
||||
| searchApiV1SoulsDirectorySearchGetResponseError;
|
||||
|
||||
export const getSearchApiV1SoulsDirectorySearchGetUrl = (
|
||||
params?: SearchApiV1SoulsDirectorySearchGetParams,
|
||||
) => {
|
||||
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/souls-directory/search?${stringifiedParams}`
|
||||
: `/api/v1/souls-directory/search`;
|
||||
};
|
||||
|
||||
export const searchApiV1SoulsDirectorySearchGet = async (
|
||||
params?: SearchApiV1SoulsDirectorySearchGetParams,
|
||||
options?: RequestInit,
|
||||
): Promise<searchApiV1SoulsDirectorySearchGetResponse> => {
|
||||
return customFetch<searchApiV1SoulsDirectorySearchGetResponse>(
|
||||
getSearchApiV1SoulsDirectorySearchGetUrl(params),
|
||||
{
|
||||
...options,
|
||||
method: "GET",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getSearchApiV1SoulsDirectorySearchGetQueryKey = (
|
||||
params?: SearchApiV1SoulsDirectorySearchGetParams,
|
||||
) => {
|
||||
return [
|
||||
`/api/v1/souls-directory/search`,
|
||||
...(params ? [params] : []),
|
||||
] as const;
|
||||
};
|
||||
|
||||
export const getSearchApiV1SoulsDirectorySearchGetQueryOptions = <
|
||||
TData = Awaited<ReturnType<typeof searchApiV1SoulsDirectorySearchGet>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
params?: SearchApiV1SoulsDirectorySearchGetParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof searchApiV1SoulsDirectorySearchGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey =
|
||||
queryOptions?.queryKey ??
|
||||
getSearchApiV1SoulsDirectorySearchGetQueryKey(params);
|
||||
|
||||
const queryFn: QueryFunction<
|
||||
Awaited<ReturnType<typeof searchApiV1SoulsDirectorySearchGet>>
|
||||
> = ({ signal }) =>
|
||||
searchApiV1SoulsDirectorySearchGet(params, { signal, ...requestOptions });
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
|
||||
Awaited<ReturnType<typeof searchApiV1SoulsDirectorySearchGet>>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type SearchApiV1SoulsDirectorySearchGetQueryResult = NonNullable<
|
||||
Awaited<ReturnType<typeof searchApiV1SoulsDirectorySearchGet>>
|
||||
>;
|
||||
export type SearchApiV1SoulsDirectorySearchGetQueryError = HTTPValidationError;
|
||||
|
||||
export function useSearchApiV1SoulsDirectorySearchGet<
|
||||
TData = Awaited<ReturnType<typeof searchApiV1SoulsDirectorySearchGet>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
params: undefined | SearchApiV1SoulsDirectorySearchGetParams,
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof searchApiV1SoulsDirectorySearchGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof searchApiV1SoulsDirectorySearchGet>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof searchApiV1SoulsDirectorySearchGet>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useSearchApiV1SoulsDirectorySearchGet<
|
||||
TData = Awaited<ReturnType<typeof searchApiV1SoulsDirectorySearchGet>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
params?: SearchApiV1SoulsDirectorySearchGetParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof searchApiV1SoulsDirectorySearchGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof searchApiV1SoulsDirectorySearchGet>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof searchApiV1SoulsDirectorySearchGet>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useSearchApiV1SoulsDirectorySearchGet<
|
||||
TData = Awaited<ReturnType<typeof searchApiV1SoulsDirectorySearchGet>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
params?: SearchApiV1SoulsDirectorySearchGetParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof searchApiV1SoulsDirectorySearchGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary Search
|
||||
*/
|
||||
|
||||
export function useSearchApiV1SoulsDirectorySearchGet<
|
||||
TData = Awaited<ReturnType<typeof searchApiV1SoulsDirectorySearchGet>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
params?: SearchApiV1SoulsDirectorySearchGetParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof searchApiV1SoulsDirectorySearchGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions = getSearchApiV1SoulsDirectorySearchGetQueryOptions(
|
||||
params,
|
||||
options,
|
||||
);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
return { ...query, queryKey: queryOptions.queryKey };
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Get Markdown
|
||||
*/
|
||||
export type getMarkdownApiV1SoulsDirectoryHandleSlugGetResponse200 = {
|
||||
data: SoulsDirectoryMarkdownResponse;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type getMarkdownApiV1SoulsDirectoryHandleSlugGetResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type getMarkdownApiV1SoulsDirectoryHandleSlugGetResponseSuccess =
|
||||
getMarkdownApiV1SoulsDirectoryHandleSlugGetResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type getMarkdownApiV1SoulsDirectoryHandleSlugGetResponseError =
|
||||
getMarkdownApiV1SoulsDirectoryHandleSlugGetResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type getMarkdownApiV1SoulsDirectoryHandleSlugGetResponse =
|
||||
| getMarkdownApiV1SoulsDirectoryHandleSlugGetResponseSuccess
|
||||
| getMarkdownApiV1SoulsDirectoryHandleSlugGetResponseError;
|
||||
|
||||
export const getGetMarkdownApiV1SoulsDirectoryHandleSlugGetUrl = (
|
||||
handle: string,
|
||||
slug: string,
|
||||
) => {
|
||||
return `/api/v1/souls-directory/${handle}/${slug}`;
|
||||
};
|
||||
|
||||
export const getMarkdownApiV1SoulsDirectoryHandleSlugGet = async (
|
||||
handle: string,
|
||||
slug: string,
|
||||
options?: RequestInit,
|
||||
): Promise<getMarkdownApiV1SoulsDirectoryHandleSlugGetResponse> => {
|
||||
return customFetch<getMarkdownApiV1SoulsDirectoryHandleSlugGetResponse>(
|
||||
getGetMarkdownApiV1SoulsDirectoryHandleSlugGetUrl(handle, slug),
|
||||
{
|
||||
...options,
|
||||
method: "GET",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getGetMarkdownApiV1SoulsDirectoryHandleSlugGetQueryKey = (
|
||||
handle: string,
|
||||
slug: string,
|
||||
) => {
|
||||
return [`/api/v1/souls-directory/${handle}/${slug}`] as const;
|
||||
};
|
||||
|
||||
export const getGetMarkdownApiV1SoulsDirectoryHandleSlugGetQueryOptions = <
|
||||
TData = Awaited<
|
||||
ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
handle: string,
|
||||
slug: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey =
|
||||
queryOptions?.queryKey ??
|
||||
getGetMarkdownApiV1SoulsDirectoryHandleSlugGetQueryKey(handle, slug);
|
||||
|
||||
const queryFn: QueryFunction<
|
||||
Awaited<ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugGet>>
|
||||
> = ({ signal }) =>
|
||||
getMarkdownApiV1SoulsDirectoryHandleSlugGet(handle, slug, {
|
||||
signal,
|
||||
...requestOptions,
|
||||
});
|
||||
|
||||
return {
|
||||
queryKey,
|
||||
queryFn,
|
||||
enabled: !!(handle && slug),
|
||||
...queryOptions,
|
||||
} as UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugGet>>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type GetMarkdownApiV1SoulsDirectoryHandleSlugGetQueryResult =
|
||||
NonNullable<
|
||||
Awaited<ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugGet>>
|
||||
>;
|
||||
export type GetMarkdownApiV1SoulsDirectoryHandleSlugGetQueryError =
|
||||
HTTPValidationError;
|
||||
|
||||
export function useGetMarkdownApiV1SoulsDirectoryHandleSlugGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
handle: string,
|
||||
slug: string,
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugGet>
|
||||
>,
|
||||
TError,
|
||||
Awaited<
|
||||
ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugGet>
|
||||
>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetMarkdownApiV1SoulsDirectoryHandleSlugGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
handle: string,
|
||||
slug: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugGet>
|
||||
>,
|
||||
TError,
|
||||
Awaited<
|
||||
ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugGet>
|
||||
>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetMarkdownApiV1SoulsDirectoryHandleSlugGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
handle: string,
|
||||
slug: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary Get Markdown
|
||||
*/
|
||||
|
||||
export function useGetMarkdownApiV1SoulsDirectoryHandleSlugGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
handle: string,
|
||||
slug: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugGet>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions =
|
||||
getGetMarkdownApiV1SoulsDirectoryHandleSlugGetQueryOptions(
|
||||
handle,
|
||||
slug,
|
||||
options,
|
||||
);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
return { ...query, queryKey: queryOptions.queryKey };
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Get Markdown
|
||||
*/
|
||||
export type getMarkdownApiV1SoulsDirectoryHandleSlugMdGetResponse200 = {
|
||||
data: SoulsDirectoryMarkdownResponse;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type getMarkdownApiV1SoulsDirectoryHandleSlugMdGetResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type getMarkdownApiV1SoulsDirectoryHandleSlugMdGetResponseSuccess =
|
||||
getMarkdownApiV1SoulsDirectoryHandleSlugMdGetResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type getMarkdownApiV1SoulsDirectoryHandleSlugMdGetResponseError =
|
||||
getMarkdownApiV1SoulsDirectoryHandleSlugMdGetResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type getMarkdownApiV1SoulsDirectoryHandleSlugMdGetResponse =
|
||||
| getMarkdownApiV1SoulsDirectoryHandleSlugMdGetResponseSuccess
|
||||
| getMarkdownApiV1SoulsDirectoryHandleSlugMdGetResponseError;
|
||||
|
||||
export const getGetMarkdownApiV1SoulsDirectoryHandleSlugMdGetUrl = (
|
||||
handle: string,
|
||||
slug: string,
|
||||
) => {
|
||||
return `/api/v1/souls-directory/${handle}/${slug}.md`;
|
||||
};
|
||||
|
||||
export const getMarkdownApiV1SoulsDirectoryHandleSlugMdGet = async (
|
||||
handle: string,
|
||||
slug: string,
|
||||
options?: RequestInit,
|
||||
): Promise<getMarkdownApiV1SoulsDirectoryHandleSlugMdGetResponse> => {
|
||||
return customFetch<getMarkdownApiV1SoulsDirectoryHandleSlugMdGetResponse>(
|
||||
getGetMarkdownApiV1SoulsDirectoryHandleSlugMdGetUrl(handle, slug),
|
||||
{
|
||||
...options,
|
||||
method: "GET",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getGetMarkdownApiV1SoulsDirectoryHandleSlugMdGetQueryKey = (
|
||||
handle: string,
|
||||
slug: string,
|
||||
) => {
|
||||
return [`/api/v1/souls-directory/${handle}/${slug}.md`] as const;
|
||||
};
|
||||
|
||||
export const getGetMarkdownApiV1SoulsDirectoryHandleSlugMdGetQueryOptions = <
|
||||
TData = Awaited<
|
||||
ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugMdGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
handle: string,
|
||||
slug: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugMdGet>
|
||||
>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey =
|
||||
queryOptions?.queryKey ??
|
||||
getGetMarkdownApiV1SoulsDirectoryHandleSlugMdGetQueryKey(handle, slug);
|
||||
|
||||
const queryFn: QueryFunction<
|
||||
Awaited<ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugMdGet>>
|
||||
> = ({ signal }) =>
|
||||
getMarkdownApiV1SoulsDirectoryHandleSlugMdGet(handle, slug, {
|
||||
signal,
|
||||
...requestOptions,
|
||||
});
|
||||
|
||||
return {
|
||||
queryKey,
|
||||
queryFn,
|
||||
enabled: !!(handle && slug),
|
||||
...queryOptions,
|
||||
} as UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugMdGet>>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type GetMarkdownApiV1SoulsDirectoryHandleSlugMdGetQueryResult =
|
||||
NonNullable<
|
||||
Awaited<ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugMdGet>>
|
||||
>;
|
||||
export type GetMarkdownApiV1SoulsDirectoryHandleSlugMdGetQueryError =
|
||||
HTTPValidationError;
|
||||
|
||||
export function useGetMarkdownApiV1SoulsDirectoryHandleSlugMdGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugMdGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
handle: string,
|
||||
slug: string,
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugMdGet>
|
||||
>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugMdGet>
|
||||
>,
|
||||
TError,
|
||||
Awaited<
|
||||
ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugMdGet>
|
||||
>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetMarkdownApiV1SoulsDirectoryHandleSlugMdGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugMdGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
handle: string,
|
||||
slug: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugMdGet>
|
||||
>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugMdGet>
|
||||
>,
|
||||
TError,
|
||||
Awaited<
|
||||
ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugMdGet>
|
||||
>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetMarkdownApiV1SoulsDirectoryHandleSlugMdGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugMdGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
handle: string,
|
||||
slug: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugMdGet>
|
||||
>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary Get Markdown
|
||||
*/
|
||||
|
||||
export function useGetMarkdownApiV1SoulsDirectoryHandleSlugMdGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugMdGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
handle: string,
|
||||
slug: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof getMarkdownApiV1SoulsDirectoryHandleSlugMdGet>
|
||||
>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions =
|
||||
getGetMarkdownApiV1SoulsDirectoryHandleSlugMdGetQueryOptions(
|
||||
handle,
|
||||
slug,
|
||||
options,
|
||||
);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
return { ...query, queryKey: queryOptions.queryKey };
|
||||
}
|
||||
Reference in New Issue
Block a user