Add global live feed for task comments
This commit is contained in:
@@ -20,7 +20,10 @@ import type {
|
||||
import type {
|
||||
HTTPValidationError,
|
||||
LimitOffsetPageTypeVarCustomizedActivityEventRead,
|
||||
LimitOffsetPageTypeVarCustomizedActivityTaskCommentFeedItemRead,
|
||||
ListActivityApiV1ActivityGetParams,
|
||||
ListTaskCommentFeedApiV1ActivityTaskCommentsGetParams,
|
||||
StreamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetParams,
|
||||
} from ".././model";
|
||||
|
||||
import { customFetch } from "../../mutator";
|
||||
@@ -236,3 +239,533 @@ export function useListActivityApiV1ActivityGet<
|
||||
|
||||
return { ...query, queryKey: queryOptions.queryKey };
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary List Task Comment Feed
|
||||
*/
|
||||
export type listTaskCommentFeedApiV1ActivityTaskCommentsGetResponse200 = {
|
||||
data: LimitOffsetPageTypeVarCustomizedActivityTaskCommentFeedItemRead;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type listTaskCommentFeedApiV1ActivityTaskCommentsGetResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type listTaskCommentFeedApiV1ActivityTaskCommentsGetResponseSuccess =
|
||||
listTaskCommentFeedApiV1ActivityTaskCommentsGetResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type listTaskCommentFeedApiV1ActivityTaskCommentsGetResponseError =
|
||||
listTaskCommentFeedApiV1ActivityTaskCommentsGetResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type listTaskCommentFeedApiV1ActivityTaskCommentsGetResponse =
|
||||
| listTaskCommentFeedApiV1ActivityTaskCommentsGetResponseSuccess
|
||||
| listTaskCommentFeedApiV1ActivityTaskCommentsGetResponseError;
|
||||
|
||||
export const getListTaskCommentFeedApiV1ActivityTaskCommentsGetUrl = (
|
||||
params?: ListTaskCommentFeedApiV1ActivityTaskCommentsGetParams,
|
||||
) => {
|
||||
const normalizedParams = new URLSearchParams();
|
||||
|
||||
Object.entries(params || {}).forEach(([key, value]) => {
|
||||
if (value !== undefined) {
|
||||
normalizedParams.append(key, value === null ? "null" : value.toString());
|
||||
}
|
||||
});
|
||||
|
||||
const stringifiedParams = normalizedParams.toString();
|
||||
|
||||
return stringifiedParams.length > 0
|
||||
? `/api/v1/activity/task-comments?${stringifiedParams}`
|
||||
: `/api/v1/activity/task-comments`;
|
||||
};
|
||||
|
||||
export const listTaskCommentFeedApiV1ActivityTaskCommentsGet = async (
|
||||
params?: ListTaskCommentFeedApiV1ActivityTaskCommentsGetParams,
|
||||
options?: RequestInit,
|
||||
): Promise<listTaskCommentFeedApiV1ActivityTaskCommentsGetResponse> => {
|
||||
return customFetch<listTaskCommentFeedApiV1ActivityTaskCommentsGetResponse>(
|
||||
getListTaskCommentFeedApiV1ActivityTaskCommentsGetUrl(params),
|
||||
{
|
||||
...options,
|
||||
method: "GET",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getListTaskCommentFeedApiV1ActivityTaskCommentsGetQueryKey = (
|
||||
params?: ListTaskCommentFeedApiV1ActivityTaskCommentsGetParams,
|
||||
) => {
|
||||
return [
|
||||
`/api/v1/activity/task-comments`,
|
||||
...(params ? [params] : []),
|
||||
] as const;
|
||||
};
|
||||
|
||||
export const getListTaskCommentFeedApiV1ActivityTaskCommentsGetQueryOptions = <
|
||||
TData = Awaited<
|
||||
ReturnType<typeof listTaskCommentFeedApiV1ActivityTaskCommentsGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
params?: ListTaskCommentFeedApiV1ActivityTaskCommentsGetParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof listTaskCommentFeedApiV1ActivityTaskCommentsGet>
|
||||
>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey =
|
||||
queryOptions?.queryKey ??
|
||||
getListTaskCommentFeedApiV1ActivityTaskCommentsGetQueryKey(params);
|
||||
|
||||
const queryFn: QueryFunction<
|
||||
Awaited<ReturnType<typeof listTaskCommentFeedApiV1ActivityTaskCommentsGet>>
|
||||
> = ({ signal }) =>
|
||||
listTaskCommentFeedApiV1ActivityTaskCommentsGet(params, {
|
||||
signal,
|
||||
...requestOptions,
|
||||
});
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
|
||||
Awaited<ReturnType<typeof listTaskCommentFeedApiV1ActivityTaskCommentsGet>>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type ListTaskCommentFeedApiV1ActivityTaskCommentsGetQueryResult =
|
||||
NonNullable<
|
||||
Awaited<ReturnType<typeof listTaskCommentFeedApiV1ActivityTaskCommentsGet>>
|
||||
>;
|
||||
export type ListTaskCommentFeedApiV1ActivityTaskCommentsGetQueryError =
|
||||
HTTPValidationError;
|
||||
|
||||
export function useListTaskCommentFeedApiV1ActivityTaskCommentsGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof listTaskCommentFeedApiV1ActivityTaskCommentsGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
params: undefined | ListTaskCommentFeedApiV1ActivityTaskCommentsGetParams,
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof listTaskCommentFeedApiV1ActivityTaskCommentsGet>
|
||||
>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof listTaskCommentFeedApiV1ActivityTaskCommentsGet>
|
||||
>,
|
||||
TError,
|
||||
Awaited<
|
||||
ReturnType<typeof listTaskCommentFeedApiV1ActivityTaskCommentsGet>
|
||||
>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useListTaskCommentFeedApiV1ActivityTaskCommentsGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof listTaskCommentFeedApiV1ActivityTaskCommentsGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
params?: ListTaskCommentFeedApiV1ActivityTaskCommentsGetParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof listTaskCommentFeedApiV1ActivityTaskCommentsGet>
|
||||
>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof listTaskCommentFeedApiV1ActivityTaskCommentsGet>
|
||||
>,
|
||||
TError,
|
||||
Awaited<
|
||||
ReturnType<typeof listTaskCommentFeedApiV1ActivityTaskCommentsGet>
|
||||
>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useListTaskCommentFeedApiV1ActivityTaskCommentsGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof listTaskCommentFeedApiV1ActivityTaskCommentsGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
params?: ListTaskCommentFeedApiV1ActivityTaskCommentsGetParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof listTaskCommentFeedApiV1ActivityTaskCommentsGet>
|
||||
>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary List Task Comment Feed
|
||||
*/
|
||||
|
||||
export function useListTaskCommentFeedApiV1ActivityTaskCommentsGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof listTaskCommentFeedApiV1ActivityTaskCommentsGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
params?: ListTaskCommentFeedApiV1ActivityTaskCommentsGetParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<
|
||||
ReturnType<typeof listTaskCommentFeedApiV1ActivityTaskCommentsGet>
|
||||
>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions =
|
||||
getListTaskCommentFeedApiV1ActivityTaskCommentsGetQueryOptions(
|
||||
params,
|
||||
options,
|
||||
);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
return { ...query, queryKey: queryOptions.queryKey };
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Stream Task Comment Feed
|
||||
*/
|
||||
export type streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetResponse200 =
|
||||
{
|
||||
data: unknown;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetResponse422 =
|
||||
{
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetResponseSuccess =
|
||||
streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetResponseError =
|
||||
streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetResponse =
|
||||
| streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetResponseSuccess
|
||||
| streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetResponseError;
|
||||
|
||||
export const getStreamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetUrl = (
|
||||
params?: StreamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetParams,
|
||||
) => {
|
||||
const normalizedParams = new URLSearchParams();
|
||||
|
||||
Object.entries(params || {}).forEach(([key, value]) => {
|
||||
if (value !== undefined) {
|
||||
normalizedParams.append(key, value === null ? "null" : value.toString());
|
||||
}
|
||||
});
|
||||
|
||||
const stringifiedParams = normalizedParams.toString();
|
||||
|
||||
return stringifiedParams.length > 0
|
||||
? `/api/v1/activity/task-comments/stream?${stringifiedParams}`
|
||||
: `/api/v1/activity/task-comments/stream`;
|
||||
};
|
||||
|
||||
export const streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGet = async (
|
||||
params?: StreamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetParams,
|
||||
options?: RequestInit,
|
||||
): Promise<streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetResponse> => {
|
||||
return customFetch<streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetResponse>(
|
||||
getStreamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetUrl(params),
|
||||
{
|
||||
...options,
|
||||
method: "GET",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getStreamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetQueryKey =
|
||||
(params?: StreamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetParams) => {
|
||||
return [
|
||||
`/api/v1/activity/task-comments/stream`,
|
||||
...(params ? [params] : []),
|
||||
] as const;
|
||||
};
|
||||
|
||||
export const getStreamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetQueryOptions =
|
||||
<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
params?: StreamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGet
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey =
|
||||
queryOptions?.queryKey ??
|
||||
getStreamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetQueryKey(
|
||||
params,
|
||||
);
|
||||
|
||||
const queryFn: QueryFunction<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGet
|
||||
>
|
||||
>
|
||||
> = ({ signal }) =>
|
||||
streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGet(params, {
|
||||
signal,
|
||||
...requestOptions,
|
||||
});
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGet
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type StreamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetQueryResult =
|
||||
NonNullable<
|
||||
Awaited<
|
||||
ReturnType<typeof streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGet>
|
||||
>
|
||||
>;
|
||||
export type StreamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetQueryError =
|
||||
HTTPValidationError;
|
||||
|
||||
export function useStreamTaskCommentFeedApiV1ActivityTaskCommentsStreamGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
params:
|
||||
| undefined
|
||||
| StreamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetParams,
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGet
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGet
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGet
|
||||
>
|
||||
>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useStreamTaskCommentFeedApiV1ActivityTaskCommentsStreamGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
params?: StreamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGet
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGet
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGet
|
||||
>
|
||||
>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useStreamTaskCommentFeedApiV1ActivityTaskCommentsStreamGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
params?: StreamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGet
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary Stream Task Comment Feed
|
||||
*/
|
||||
|
||||
export function useStreamTaskCommentFeedApiV1ActivityTaskCommentsStreamGet<
|
||||
TData = Awaited<
|
||||
ReturnType<typeof streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGet>
|
||||
>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
params?: StreamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetParams,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGet
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions =
|
||||
getStreamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetQueryOptions(
|
||||
params,
|
||||
options,
|
||||
);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
return { ...query, queryKey: queryOptions.queryKey };
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ import type {
|
||||
GatewaySessionMessageRequest,
|
||||
GatewaySessionResponse,
|
||||
GatewaySessionsResponse,
|
||||
GatewayTemplatesSyncResult,
|
||||
GatewayUpdate,
|
||||
GatewaysStatusApiV1GatewaysStatusGetParams,
|
||||
GatewaysStatusResponse,
|
||||
@@ -39,6 +40,7 @@ import type {
|
||||
ListGatewaysApiV1GatewaysGetParams,
|
||||
OkResponse,
|
||||
SendGatewaySessionMessageApiV1GatewaysSessionsSessionIdMessagePostParams,
|
||||
SyncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPostParams,
|
||||
} from ".././model";
|
||||
|
||||
import { customFetch } from "../../mutator";
|
||||
@@ -2229,3 +2231,192 @@ export const useUpdateGatewayApiV1GatewaysGatewayIdPatch = <
|
||||
queryClient,
|
||||
);
|
||||
};
|
||||
/**
|
||||
* @summary Sync Gateway Templates
|
||||
*/
|
||||
export type syncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPostResponse200 =
|
||||
{
|
||||
data: GatewayTemplatesSyncResult;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type syncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPostResponse422 =
|
||||
{
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type syncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPostResponseSuccess =
|
||||
syncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPostResponse200 & {
|
||||
headers: Headers;
|
||||
};
|
||||
export type syncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPostResponseError =
|
||||
syncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPostResponse422 & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export type syncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPostResponse =
|
||||
|
||||
| syncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPostResponseSuccess
|
||||
| syncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPostResponseError;
|
||||
|
||||
export const getSyncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPostUrl =
|
||||
(
|
||||
gatewayId: string,
|
||||
params?: SyncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPostParams,
|
||||
) => {
|
||||
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/gateways/${gatewayId}/templates/sync?${stringifiedParams}`
|
||||
: `/api/v1/gateways/${gatewayId}/templates/sync`;
|
||||
};
|
||||
|
||||
export const syncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPost =
|
||||
async (
|
||||
gatewayId: string,
|
||||
params?: SyncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPostParams,
|
||||
options?: RequestInit,
|
||||
): Promise<syncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPostResponse> => {
|
||||
return customFetch<syncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPostResponse>(
|
||||
getSyncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPostUrl(
|
||||
gatewayId,
|
||||
params,
|
||||
),
|
||||
{
|
||||
...options,
|
||||
method: "POST",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getSyncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPostMutationOptions =
|
||||
<TError = HTTPValidationError, TContext = unknown>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof syncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPost
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
{
|
||||
gatewayId: string;
|
||||
params?: SyncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPostParams;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof syncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPost
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
{
|
||||
gatewayId: string;
|
||||
params?: SyncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPostParams;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = [
|
||||
"syncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPost",
|
||||
];
|
||||
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 syncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPost
|
||||
>
|
||||
>,
|
||||
{
|
||||
gatewayId: string;
|
||||
params?: SyncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPostParams;
|
||||
}
|
||||
> = (props) => {
|
||||
const { gatewayId, params } = props ?? {};
|
||||
|
||||
return syncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPost(
|
||||
gatewayId,
|
||||
params,
|
||||
requestOptions,
|
||||
);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type SyncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPostMutationResult =
|
||||
NonNullable<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof syncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPost
|
||||
>
|
||||
>
|
||||
>;
|
||||
|
||||
export type SyncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPostMutationError =
|
||||
HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Sync Gateway Templates
|
||||
*/
|
||||
export const useSyncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPost = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof syncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPost
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
{
|
||||
gatewayId: string;
|
||||
params?: SyncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPostParams;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customFetch>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<
|
||||
ReturnType<
|
||||
typeof syncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPost
|
||||
>
|
||||
>,
|
||||
TError,
|
||||
{
|
||||
gatewayId: string;
|
||||
params?: SyncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPostParams;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
return useMutation(
|
||||
getSyncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPostMutationOptions(
|
||||
options,
|
||||
),
|
||||
queryClient,
|
||||
);
|
||||
};
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export interface ActivityTaskCommentFeedItemRead {
|
||||
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;
|
||||
}
|
||||
@@ -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 GatewayTemplatesSyncError {
|
||||
agent_id?: string | null;
|
||||
agent_name?: string | null;
|
||||
board_id?: string | null;
|
||||
message: string;
|
||||
}
|
||||
@@ -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 { 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;
|
||||
}
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
export * from "./activityEventRead";
|
||||
export * from "./activityTaskCommentFeedItemRead";
|
||||
export * from "./agentCreate";
|
||||
export * from "./agentCreateHeartbeatConfig";
|
||||
export * from "./agentCreateIdentityProfile";
|
||||
@@ -86,6 +87,8 @@ export * from "./gatewaysStatusApiV1GatewaysStatusGetParams";
|
||||
export * from "./gatewaysStatusResponse";
|
||||
export * from "./gatewayStatusApiV1GatewayStatusGet200";
|
||||
export * from "./gatewayStatusApiV1GatewayStatusGetParams";
|
||||
export * from "./gatewayTemplatesSyncError";
|
||||
export * from "./gatewayTemplatesSyncResult";
|
||||
export * from "./gatewayUpdate";
|
||||
export * from "./getGatewaySessionApiV1GatewaySessionsSessionIdGet200";
|
||||
export * from "./getGatewaySessionApiV1GatewaySessionsSessionIdGetParams";
|
||||
@@ -97,6 +100,7 @@ export * from "./healthHealthGet200";
|
||||
export * from "./healthzHealthzGet200";
|
||||
export * from "./hTTPValidationError";
|
||||
export * from "./limitOffsetPageTypeVarCustomizedActivityEventRead";
|
||||
export * from "./limitOffsetPageTypeVarCustomizedActivityTaskCommentFeedItemRead";
|
||||
export * from "./limitOffsetPageTypeVarCustomizedAgentRead";
|
||||
export * from "./limitOffsetPageTypeVarCustomizedApprovalRead";
|
||||
export * from "./limitOffsetPageTypeVarCustomizedBoardMemoryRead";
|
||||
@@ -117,6 +121,7 @@ export * from "./listGatewaysApiV1GatewaysGetParams";
|
||||
export * from "./listGatewaySessionsApiV1GatewaysSessionsGetParams";
|
||||
export * from "./listSessionsApiV1GatewaySessionsGet200";
|
||||
export * from "./listSessionsApiV1GatewaySessionsGetParams";
|
||||
export * from "./listTaskCommentFeedApiV1ActivityTaskCommentsGetParams";
|
||||
export * from "./listTaskCommentsApiV1AgentBoardsBoardIdTasksTaskIdCommentsGetParams";
|
||||
export * from "./listTaskCommentsApiV1BoardsBoardIdTasksTaskIdCommentsGetParams";
|
||||
export * from "./listTasksApiV1AgentBoardsBoardIdTasksGetParams";
|
||||
@@ -130,7 +135,9 @@ export * from "./sendSessionMessageApiV1GatewaySessionsSessionIdMessagePostParam
|
||||
export * from "./streamAgentsApiV1AgentsStreamGetParams";
|
||||
export * from "./streamApprovalsApiV1BoardsBoardIdApprovalsStreamGetParams";
|
||||
export * from "./streamBoardMemoryApiV1BoardsBoardIdMemoryStreamGetParams";
|
||||
export * from "./streamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetParams";
|
||||
export * from "./streamTasksApiV1BoardsBoardIdTasksStreamGetParams";
|
||||
export * from "./syncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPostParams";
|
||||
export * from "./taskCardRead";
|
||||
export * from "./taskCardReadStatus";
|
||||
export * from "./taskCommentCreate";
|
||||
|
||||
@@ -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 { ActivityTaskCommentFeedItemRead } from "./activityTaskCommentFeedItemRead";
|
||||
|
||||
export interface LimitOffsetPageTypeVarCustomizedActivityTaskCommentFeedItemRead {
|
||||
items: ActivityTaskCommentFeedItemRead[];
|
||||
/** @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 ListTaskCommentFeedApiV1ActivityTaskCommentsGetParams = {
|
||||
board_id?: string | null;
|
||||
/**
|
||||
* @minimum 1
|
||||
* @maximum 200
|
||||
*/
|
||||
limit?: number;
|
||||
/**
|
||||
* @minimum 0
|
||||
*/
|
||||
offset?: number;
|
||||
};
|
||||
@@ -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 StreamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetParams = {
|
||||
board_id?: string | null;
|
||||
since?: string | null;
|
||||
};
|
||||
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Generated by orval v8.2.0 🍺
|
||||
* Do not edit manually.
|
||||
* Mission Control API
|
||||
* OpenAPI spec version: 0.1.0
|
||||
*/
|
||||
|
||||
export type SyncGatewayTemplatesApiV1GatewaysGatewayIdTemplatesSyncPostParams =
|
||||
{
|
||||
include_main?: boolean;
|
||||
reset_sessions?: boolean;
|
||||
rotate_tokens?: boolean;
|
||||
force_bootstrap?: boolean;
|
||||
board_id?: string | null;
|
||||
};
|
||||
Reference in New Issue
Block a user