/**
 * Generated by orval v8.3.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,
  LimitOffsetPageTypeVarCustomizedActivityEventRead,
  LimitOffsetPageTypeVarCustomizedActivityTaskCommentFeedItemRead,
  ListActivityApiV1ActivityGetParams,
  ListTaskCommentFeedApiV1ActivityTaskCommentsGetParams,
  StreamTaskCommentFeedApiV1ActivityTaskCommentsStreamGetParams,
} from ".././model";

import { customFetch } from "../../mutator";

type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];

/**
 * List activity events visible to the calling actor.
 * @summary List Activity
 */
export type listActivityApiV1ActivityGetResponse200 = {
  data: LimitOffsetPageTypeVarCustomizedActivityEventRead;
  status: 200;
};

export type listActivityApiV1ActivityGetResponse422 = {
  data: HTTPValidationError;
  status: 422;
};

export type listActivityApiV1ActivityGetResponseSuccess =
  listActivityApiV1ActivityGetResponse200 & {
    headers: Headers;
  };
export type listActivityApiV1ActivityGetResponseError =
  listActivityApiV1ActivityGetResponse422 & {
    headers: Headers;
  };

export type listActivityApiV1ActivityGetResponse =
  | listActivityApiV1ActivityGetResponseSuccess
  | listActivityApiV1ActivityGetResponseError;

export const getListActivityApiV1ActivityGetUrl = (
  params?: ListActivityApiV1ActivityGetParams,
) => {
  const normalizedParams = new URLSearchParams();

  Object.entries(params || {}).forEach(([key, value]) => {
    if (value !== undefined) {
      normalizedParams.append(key, value === null ? "null" : value.toString());
    }
  });

  const stringifiedParams = normalizedParams.toString();

  return stringifiedParams.length > 0
    ? `/api/v1/activity?${stringifiedParams}`
    : `/api/v1/activity`;
};

export const listActivityApiV1ActivityGet = async (
  params?: ListActivityApiV1ActivityGetParams,
  options?: RequestInit,
): Promise<listActivityApiV1ActivityGetResponse> => {
  return customFetch<listActivityApiV1ActivityGetResponse>(
    getListActivityApiV1ActivityGetUrl(params),
    {
      ...options,
      method: "GET",
    },
  );
};

export const getListActivityApiV1ActivityGetQueryKey = (
  params?: ListActivityApiV1ActivityGetParams,
) => {
  return [`/api/v1/activity`, ...(params ? [params] : [])] as const;
};

export const getListActivityApiV1ActivityGetQueryOptions = <
  TData = Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>,
  TError = HTTPValidationError,
>(
  params?: ListActivityApiV1ActivityGetParams,
  options?: {
    query?: Partial<
      UseQueryOptions<
        Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>,
        TError,
        TData
      >
    >;
    request?: SecondParameter<typeof customFetch>;
  },
) => {
  const { query: queryOptions, request: requestOptions } = options ?? {};

  const queryKey =
    queryOptions?.queryKey ?? getListActivityApiV1ActivityGetQueryKey(params);

  const queryFn: QueryFunction<
    Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>
  > = ({ signal }) =>
    listActivityApiV1ActivityGet(params, { signal, ...requestOptions });

  return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
    Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>,
    TError,
    TData
  > & { queryKey: DataTag<QueryKey, TData, TError> };
};

export type ListActivityApiV1ActivityGetQueryResult = NonNullable<
  Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>
>;
export type ListActivityApiV1ActivityGetQueryError = HTTPValidationError;

export function useListActivityApiV1ActivityGet<
  TData = Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>,
  TError = HTTPValidationError,
>(
  params: undefined | ListActivityApiV1ActivityGetParams,
  options: {
    query: Partial<
      UseQueryOptions<
        Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>,
        TError,
        TData
      >
    > &
      Pick<
        DefinedInitialDataOptions<
          Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>,
          TError,
          Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>
        >,
        "initialData"
      >;
    request?: SecondParameter<typeof customFetch>;
  },
  queryClient?: QueryClient,
): DefinedUseQueryResult<TData, TError> & {
  queryKey: DataTag<QueryKey, TData, TError>;
};
export function useListActivityApiV1ActivityGet<
  TData = Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>,
  TError = HTTPValidationError,
>(
  params?: ListActivityApiV1ActivityGetParams,
  options?: {
    query?: Partial<
      UseQueryOptions<
        Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>,
        TError,
        TData
      >
    > &
      Pick<
        UndefinedInitialDataOptions<
          Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>,
          TError,
          Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>
        >,
        "initialData"
      >;
    request?: SecondParameter<typeof customFetch>;
  },
  queryClient?: QueryClient,
): UseQueryResult<TData, TError> & {
  queryKey: DataTag<QueryKey, TData, TError>;
};
export function useListActivityApiV1ActivityGet<
  TData = Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>,
  TError = HTTPValidationError,
>(
  params?: ListActivityApiV1ActivityGetParams,
  options?: {
    query?: Partial<
      UseQueryOptions<
        Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>,
        TError,
        TData
      >
    >;
    request?: SecondParameter<typeof customFetch>;
  },
  queryClient?: QueryClient,
): UseQueryResult<TData, TError> & {
  queryKey: DataTag<QueryKey, TData, TError>;
};
/**
 * @summary List Activity
 */

export function useListActivityApiV1ActivityGet<
  TData = Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>,
  TError = HTTPValidationError,
>(
  params?: ListActivityApiV1ActivityGetParams,
  options?: {
    query?: Partial<
      UseQueryOptions<
        Awaited<ReturnType<typeof listActivityApiV1ActivityGet>>,
        TError,
        TData
      >
    >;
    request?: SecondParameter<typeof customFetch>;
  },
  queryClient?: QueryClient,
): UseQueryResult<TData, TError> & {
  queryKey: DataTag<QueryKey, TData, TError>;
} {
  const queryOptions = getListActivityApiV1ActivityGetQueryOptions(
    params,
    options,
  );

  const query = useQuery(queryOptions, queryClient) as UseQueryResult<
    TData,
    TError
  > & { queryKey: DataTag<QueryKey, TData, TError> };

  return { ...query, queryKey: queryOptions.queryKey };
}

/**
 * List task-comment feed items for accessible boards.
 * @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 };
}

/**
 * Stream task-comment events for accessible boards.
 * @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 };
}
