/**
 * Generated by orval v8.3.0 🍺
 * Do not edit manually.
 * Mission Control API
 * OpenAPI spec version: 0.1.0
 */
import { useMutation, useQuery } from "@tanstack/react-query";
import type {
  DataTag,
  DefinedInitialDataOptions,
  DefinedUseQueryResult,
  MutationFunction,
  QueryClient,
  QueryFunction,
  QueryKey,
  UndefinedInitialDataOptions,
  UseMutationOptions,
  UseMutationResult,
  UseQueryOptions,
  UseQueryResult,
} from "@tanstack/react-query";

import type {
  BoardGroupMemoryCreate,
  BoardGroupMemoryRead,
  HTTPValidationError,
  LimitOffsetPageTypeVarCustomizedBoardGroupMemoryRead,
  ListBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGetParams,
  ListBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGetParams,
  StreamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGetParams,
  StreamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGetParams,
} from ".././model";

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

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

/**
 * List board-group memory entries for a specific group.
 * @summary List Board Group Memory
 */
export type listBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGetResponse200 = {
  data: LimitOffsetPageTypeVarCustomizedBoardGroupMemoryRead;
  status: 200;
};

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

export type listBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGetResponseSuccess =
  listBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGetResponse200 & {
    headers: Headers;
  };
export type listBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGetResponseError =
  listBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGetResponse422 & {
    headers: Headers;
  };

export type listBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGetResponse =
  | listBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGetResponseSuccess
  | listBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGetResponseError;

export const getListBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGetUrl = (
  groupId: string,
  params?: ListBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGetParams,
) => {
  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/board-groups/${groupId}/memory?${stringifiedParams}`
    : `/api/v1/board-groups/${groupId}/memory`;
};

export const listBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGet = async (
  groupId: string,
  params?: ListBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGetParams,
  options?: RequestInit,
): Promise<listBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGetResponse> => {
  return customFetch<listBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGetResponse>(
    getListBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGetUrl(groupId, params),
    {
      ...options,
      method: "GET",
    },
  );
};

export const getListBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGetQueryKey = (
  groupId: string,
  params?: ListBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGetParams,
) => {
  return [
    `/api/v1/board-groups/${groupId}/memory`,
    ...(params ? [params] : []),
  ] as const;
};

export const getListBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGetQueryOptions =
  <
    TData = Awaited<
      ReturnType<typeof listBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGet>
    >,
    TError = HTTPValidationError,
  >(
    groupId: string,
    params?: ListBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGetParams,
    options?: {
      query?: Partial<
        UseQueryOptions<
          Awaited<
            ReturnType<
              typeof listBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGet
            >
          >,
          TError,
          TData
        >
      >;
      request?: SecondParameter<typeof customFetch>;
    },
  ) => {
    const { query: queryOptions, request: requestOptions } = options ?? {};

    const queryKey =
      queryOptions?.queryKey ??
      getListBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGetQueryKey(
        groupId,
        params,
      );

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

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

export type ListBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGetQueryResult =
  NonNullable<
    Awaited<
      ReturnType<typeof listBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGet>
    >
  >;
export type ListBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGetQueryError =
  HTTPValidationError;

export function useListBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGet<
  TData = Awaited<
    ReturnType<typeof listBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGet>
  >,
  TError = HTTPValidationError,
>(
  groupId: string,
  params:
    | undefined
    | ListBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGetParams,
  options: {
    query: Partial<
      UseQueryOptions<
        Awaited<
          ReturnType<
            typeof listBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGet
          >
        >,
        TError,
        TData
      >
    > &
      Pick<
        DefinedInitialDataOptions<
          Awaited<
            ReturnType<
              typeof listBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGet
            >
          >,
          TError,
          Awaited<
            ReturnType<
              typeof listBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGet
            >
          >
        >,
        "initialData"
      >;
    request?: SecondParameter<typeof customFetch>;
  },
  queryClient?: QueryClient,
): DefinedUseQueryResult<TData, TError> & {
  queryKey: DataTag<QueryKey, TData, TError>;
};
export function useListBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGet<
  TData = Awaited<
    ReturnType<typeof listBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGet>
  >,
  TError = HTTPValidationError,
>(
  groupId: string,
  params?: ListBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGetParams,
  options?: {
    query?: Partial<
      UseQueryOptions<
        Awaited<
          ReturnType<
            typeof listBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGet
          >
        >,
        TError,
        TData
      >
    > &
      Pick<
        UndefinedInitialDataOptions<
          Awaited<
            ReturnType<
              typeof listBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGet
            >
          >,
          TError,
          Awaited<
            ReturnType<
              typeof listBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGet
            >
          >
        >,
        "initialData"
      >;
    request?: SecondParameter<typeof customFetch>;
  },
  queryClient?: QueryClient,
): UseQueryResult<TData, TError> & {
  queryKey: DataTag<QueryKey, TData, TError>;
};
export function useListBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGet<
  TData = Awaited<
    ReturnType<typeof listBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGet>
  >,
  TError = HTTPValidationError,
>(
  groupId: string,
  params?: ListBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGetParams,
  options?: {
    query?: Partial<
      UseQueryOptions<
        Awaited<
          ReturnType<
            typeof listBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGet
          >
        >,
        TError,
        TData
      >
    >;
    request?: SecondParameter<typeof customFetch>;
  },
  queryClient?: QueryClient,
): UseQueryResult<TData, TError> & {
  queryKey: DataTag<QueryKey, TData, TError>;
};
/**
 * @summary List Board Group Memory
 */

export function useListBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGet<
  TData = Awaited<
    ReturnType<typeof listBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGet>
  >,
  TError = HTTPValidationError,
>(
  groupId: string,
  params?: ListBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGetParams,
  options?: {
    query?: Partial<
      UseQueryOptions<
        Awaited<
          ReturnType<
            typeof listBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGet
          >
        >,
        TError,
        TData
      >
    >;
    request?: SecondParameter<typeof customFetch>;
  },
  queryClient?: QueryClient,
): UseQueryResult<TData, TError> & {
  queryKey: DataTag<QueryKey, TData, TError>;
} {
  const queryOptions =
    getListBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryGetQueryOptions(
      groupId,
      params,
      options,
    );

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

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

/**
 * Create a board-group memory entry and notify chat recipients.
 * @summary Create Board Group Memory
 */
export type createBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryPostResponse200 =
  {
    data: BoardGroupMemoryRead;
    status: 200;
  };

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

export type createBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryPostResponseSuccess =
  createBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryPostResponse200 & {
    headers: Headers;
  };
export type createBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryPostResponseError =
  createBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryPostResponse422 & {
    headers: Headers;
  };

export type createBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryPostResponse =
  | createBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryPostResponseSuccess
  | createBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryPostResponseError;

export const getCreateBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryPostUrl = (
  groupId: string,
) => {
  return `/api/v1/board-groups/${groupId}/memory`;
};

export const createBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryPost = async (
  groupId: string,
  boardGroupMemoryCreate: BoardGroupMemoryCreate,
  options?: RequestInit,
): Promise<createBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryPostResponse> => {
  return customFetch<createBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryPostResponse>(
    getCreateBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryPostUrl(groupId),
    {
      ...options,
      method: "POST",
      headers: { "Content-Type": "application/json", ...options?.headers },
      body: JSON.stringify(boardGroupMemoryCreate),
    },
  );
};

export const getCreateBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryPostMutationOptions =
  <TError = HTTPValidationError, TContext = unknown>(options?: {
    mutation?: UseMutationOptions<
      Awaited<
        ReturnType<
          typeof createBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryPost
        >
      >,
      TError,
      { groupId: string; data: BoardGroupMemoryCreate },
      TContext
    >;
    request?: SecondParameter<typeof customFetch>;
  }): UseMutationOptions<
    Awaited<
      ReturnType<typeof createBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryPost>
    >,
    TError,
    { groupId: string; data: BoardGroupMemoryCreate },
    TContext
  > => {
    const mutationKey = [
      "createBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryPost",
    ];
    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 createBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryPost
        >
      >,
      { groupId: string; data: BoardGroupMemoryCreate }
    > = (props) => {
      const { groupId, data } = props ?? {};

      return createBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryPost(
        groupId,
        data,
        requestOptions,
      );
    };

    return { mutationFn, ...mutationOptions };
  };

export type CreateBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryPostMutationResult =
  NonNullable<
    Awaited<
      ReturnType<typeof createBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryPost>
    >
  >;
export type CreateBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryPostMutationBody =
  BoardGroupMemoryCreate;
export type CreateBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryPostMutationError =
  HTTPValidationError;

/**
 * @summary Create Board Group Memory
 */
export const useCreateBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryPost = <
  TError = HTTPValidationError,
  TContext = unknown,
>(
  options?: {
    mutation?: UseMutationOptions<
      Awaited<
        ReturnType<
          typeof createBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryPost
        >
      >,
      TError,
      { groupId: string; data: BoardGroupMemoryCreate },
      TContext
    >;
    request?: SecondParameter<typeof customFetch>;
  },
  queryClient?: QueryClient,
): UseMutationResult<
  Awaited<
    ReturnType<typeof createBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryPost>
  >,
  TError,
  { groupId: string; data: BoardGroupMemoryCreate },
  TContext
> => {
  return useMutation(
    getCreateBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryPostMutationOptions(
      options,
    ),
    queryClient,
  );
};
/**
 * Stream memory entries for a board group via server-sent events.
 * @summary Stream Board Group Memory
 */
export type streamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGetResponse200 =
  {
    data: unknown;
    status: 200;
  };

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

export type streamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGetResponseSuccess =
  streamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGetResponse200 & {
    headers: Headers;
  };
export type streamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGetResponseError =
  streamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGetResponse422 & {
    headers: Headers;
  };

export type streamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGetResponse =

    | streamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGetResponseSuccess
    | streamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGetResponseError;

export const getStreamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGetUrl =
  (
    groupId: string,
    params?: StreamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGetParams,
  ) => {
    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/board-groups/${groupId}/memory/stream?${stringifiedParams}`
      : `/api/v1/board-groups/${groupId}/memory/stream`;
  };

export const streamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGet =
  async (
    groupId: string,
    params?: StreamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGetParams,
    options?: RequestInit,
  ): Promise<streamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGetResponse> => {
    return customFetch<streamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGetResponse>(
      getStreamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGetUrl(
        groupId,
        params,
      ),
      {
        ...options,
        method: "GET",
      },
    );
  };

export const getStreamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGetQueryKey =
  (
    groupId: string,
    params?: StreamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGetParams,
  ) => {
    return [
      `/api/v1/board-groups/${groupId}/memory/stream`,
      ...(params ? [params] : []),
    ] as const;
  };

export const getStreamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGetQueryOptions =
  <
    TData = Awaited<
      ReturnType<
        typeof streamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGet
      >
    >,
    TError = HTTPValidationError,
  >(
    groupId: string,
    params?: StreamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGetParams,
    options?: {
      query?: Partial<
        UseQueryOptions<
          Awaited<
            ReturnType<
              typeof streamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGet
            >
          >,
          TError,
          TData
        >
      >;
      request?: SecondParameter<typeof customFetch>;
    },
  ) => {
    const { query: queryOptions, request: requestOptions } = options ?? {};

    const queryKey =
      queryOptions?.queryKey ??
      getStreamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGetQueryKey(
        groupId,
        params,
      );

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

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

export type StreamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGetQueryResult =
  NonNullable<
    Awaited<
      ReturnType<
        typeof streamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGet
      >
    >
  >;
export type StreamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGetQueryError =
  HTTPValidationError;

export function useStreamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGet<
  TData = Awaited<
    ReturnType<
      typeof streamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGet
    >
  >,
  TError = HTTPValidationError,
>(
  groupId: string,
  params:
    | undefined
    | StreamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGetParams,
  options: {
    query: Partial<
      UseQueryOptions<
        Awaited<
          ReturnType<
            typeof streamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGet
          >
        >,
        TError,
        TData
      >
    > &
      Pick<
        DefinedInitialDataOptions<
          Awaited<
            ReturnType<
              typeof streamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGet
            >
          >,
          TError,
          Awaited<
            ReturnType<
              typeof streamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGet
            >
          >
        >,
        "initialData"
      >;
    request?: SecondParameter<typeof customFetch>;
  },
  queryClient?: QueryClient,
): DefinedUseQueryResult<TData, TError> & {
  queryKey: DataTag<QueryKey, TData, TError>;
};
export function useStreamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGet<
  TData = Awaited<
    ReturnType<
      typeof streamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGet
    >
  >,
  TError = HTTPValidationError,
>(
  groupId: string,
  params?: StreamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGetParams,
  options?: {
    query?: Partial<
      UseQueryOptions<
        Awaited<
          ReturnType<
            typeof streamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGet
          >
        >,
        TError,
        TData
      >
    > &
      Pick<
        UndefinedInitialDataOptions<
          Awaited<
            ReturnType<
              typeof streamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGet
            >
          >,
          TError,
          Awaited<
            ReturnType<
              typeof streamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGet
            >
          >
        >,
        "initialData"
      >;
    request?: SecondParameter<typeof customFetch>;
  },
  queryClient?: QueryClient,
): UseQueryResult<TData, TError> & {
  queryKey: DataTag<QueryKey, TData, TError>;
};
export function useStreamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGet<
  TData = Awaited<
    ReturnType<
      typeof streamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGet
    >
  >,
  TError = HTTPValidationError,
>(
  groupId: string,
  params?: StreamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGetParams,
  options?: {
    query?: Partial<
      UseQueryOptions<
        Awaited<
          ReturnType<
            typeof streamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGet
          >
        >,
        TError,
        TData
      >
    >;
    request?: SecondParameter<typeof customFetch>;
  },
  queryClient?: QueryClient,
): UseQueryResult<TData, TError> & {
  queryKey: DataTag<QueryKey, TData, TError>;
};
/**
 * @summary Stream Board Group Memory
 */

export function useStreamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGet<
  TData = Awaited<
    ReturnType<
      typeof streamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGet
    >
  >,
  TError = HTTPValidationError,
>(
  groupId: string,
  params?: StreamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGetParams,
  options?: {
    query?: Partial<
      UseQueryOptions<
        Awaited<
          ReturnType<
            typeof streamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGet
          >
        >,
        TError,
        TData
      >
    >;
    request?: SecondParameter<typeof customFetch>;
  },
  queryClient?: QueryClient,
): UseQueryResult<TData, TError> & {
  queryKey: DataTag<QueryKey, TData, TError>;
} {
  const queryOptions =
    getStreamBoardGroupMemoryApiV1BoardGroupsGroupIdMemoryStreamGetQueryOptions(
      groupId,
      params,
      options,
    );

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

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

/**
 * List shared memory for the board's linked group.

Use this for cross-board context and coordination signals.
 * @summary List Board Group Memory For Board
 */
export type listBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGetResponse200 =
  {
    data: LimitOffsetPageTypeVarCustomizedBoardGroupMemoryRead;
    status: 200;
  };

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

export type listBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGetResponseSuccess =
  listBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGetResponse200 & {
    headers: Headers;
  };
export type listBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGetResponseError =
  listBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGetResponse422 & {
    headers: Headers;
  };

export type listBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGetResponse =

    | listBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGetResponseSuccess
    | listBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGetResponseError;

export const getListBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGetUrl =
  (
    boardId: string,
    params?: ListBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGetParams,
  ) => {
    const normalizedParams = new URLSearchParams();

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

    const stringifiedParams = normalizedParams.toString();

    return stringifiedParams.length > 0
      ? `/api/v1/boards/${boardId}/group-memory?${stringifiedParams}`
      : `/api/v1/boards/${boardId}/group-memory`;
  };

export const listBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGet =
  async (
    boardId: string,
    params?: ListBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGetParams,
    options?: RequestInit,
  ): Promise<listBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGetResponse> => {
    return customFetch<listBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGetResponse>(
      getListBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGetUrl(
        boardId,
        params,
      ),
      {
        ...options,
        method: "GET",
      },
    );
  };

export const getListBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGetQueryKey =
  (
    boardId: string,
    params?: ListBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGetParams,
  ) => {
    return [
      `/api/v1/boards/${boardId}/group-memory`,
      ...(params ? [params] : []),
    ] as const;
  };

export const getListBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGetQueryOptions =
  <
    TData = Awaited<
      ReturnType<
        typeof listBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGet
      >
    >,
    TError = HTTPValidationError,
  >(
    boardId: string,
    params?: ListBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGetParams,
    options?: {
      query?: Partial<
        UseQueryOptions<
          Awaited<
            ReturnType<
              typeof listBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGet
            >
          >,
          TError,
          TData
        >
      >;
      request?: SecondParameter<typeof customFetch>;
    },
  ) => {
    const { query: queryOptions, request: requestOptions } = options ?? {};

    const queryKey =
      queryOptions?.queryKey ??
      getListBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGetQueryKey(
        boardId,
        params,
      );

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

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

export type ListBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGetQueryResult =
  NonNullable<
    Awaited<
      ReturnType<
        typeof listBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGet
      >
    >
  >;
export type ListBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGetQueryError =
  HTTPValidationError;

export function useListBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGet<
  TData = Awaited<
    ReturnType<
      typeof listBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGet
    >
  >,
  TError = HTTPValidationError,
>(
  boardId: string,
  params:
    | undefined
    | ListBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGetParams,
  options: {
    query: Partial<
      UseQueryOptions<
        Awaited<
          ReturnType<
            typeof listBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGet
          >
        >,
        TError,
        TData
      >
    > &
      Pick<
        DefinedInitialDataOptions<
          Awaited<
            ReturnType<
              typeof listBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGet
            >
          >,
          TError,
          Awaited<
            ReturnType<
              typeof listBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGet
            >
          >
        >,
        "initialData"
      >;
    request?: SecondParameter<typeof customFetch>;
  },
  queryClient?: QueryClient,
): DefinedUseQueryResult<TData, TError> & {
  queryKey: DataTag<QueryKey, TData, TError>;
};
export function useListBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGet<
  TData = Awaited<
    ReturnType<
      typeof listBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGet
    >
  >,
  TError = HTTPValidationError,
>(
  boardId: string,
  params?: ListBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGetParams,
  options?: {
    query?: Partial<
      UseQueryOptions<
        Awaited<
          ReturnType<
            typeof listBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGet
          >
        >,
        TError,
        TData
      >
    > &
      Pick<
        UndefinedInitialDataOptions<
          Awaited<
            ReturnType<
              typeof listBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGet
            >
          >,
          TError,
          Awaited<
            ReturnType<
              typeof listBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGet
            >
          >
        >,
        "initialData"
      >;
    request?: SecondParameter<typeof customFetch>;
  },
  queryClient?: QueryClient,
): UseQueryResult<TData, TError> & {
  queryKey: DataTag<QueryKey, TData, TError>;
};
export function useListBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGet<
  TData = Awaited<
    ReturnType<
      typeof listBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGet
    >
  >,
  TError = HTTPValidationError,
>(
  boardId: string,
  params?: ListBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGetParams,
  options?: {
    query?: Partial<
      UseQueryOptions<
        Awaited<
          ReturnType<
            typeof listBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGet
          >
        >,
        TError,
        TData
      >
    >;
    request?: SecondParameter<typeof customFetch>;
  },
  queryClient?: QueryClient,
): UseQueryResult<TData, TError> & {
  queryKey: DataTag<QueryKey, TData, TError>;
};
/**
 * @summary List Board Group Memory For Board
 */

export function useListBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGet<
  TData = Awaited<
    ReturnType<
      typeof listBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGet
    >
  >,
  TError = HTTPValidationError,
>(
  boardId: string,
  params?: ListBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGetParams,
  options?: {
    query?: Partial<
      UseQueryOptions<
        Awaited<
          ReturnType<
            typeof listBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGet
          >
        >,
        TError,
        TData
      >
    >;
    request?: SecondParameter<typeof customFetch>;
  },
  queryClient?: QueryClient,
): UseQueryResult<TData, TError> & {
  queryKey: DataTag<QueryKey, TData, TError>;
} {
  const queryOptions =
    getListBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryGetQueryOptions(
      boardId,
      params,
      options,
    );

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

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

/**
 * Create shared group memory from a board context.

When tags/mentions indicate chat or broadcast intent, eligible agents in the
linked group are notified.
 * @summary Create Board Group Memory For Board
 */
export type createBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryPostResponse200 =
  {
    data: BoardGroupMemoryRead;
    status: 200;
  };

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

export type createBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryPostResponseSuccess =
  createBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryPostResponse200 & {
    headers: Headers;
  };
export type createBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryPostResponseError =
  createBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryPostResponse422 & {
    headers: Headers;
  };

export type createBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryPostResponse =

    | createBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryPostResponseSuccess
    | createBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryPostResponseError;

export const getCreateBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryPostUrl =
  (boardId: string) => {
    return `/api/v1/boards/${boardId}/group-memory`;
  };

export const createBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryPost =
  async (
    boardId: string,
    boardGroupMemoryCreate: BoardGroupMemoryCreate,
    options?: RequestInit,
  ): Promise<createBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryPostResponse> => {
    return customFetch<createBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryPostResponse>(
      getCreateBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryPostUrl(
        boardId,
      ),
      {
        ...options,
        method: "POST",
        headers: { "Content-Type": "application/json", ...options?.headers },
        body: JSON.stringify(boardGroupMemoryCreate),
      },
    );
  };

export const getCreateBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryPostMutationOptions =
  <TError = HTTPValidationError, TContext = unknown>(options?: {
    mutation?: UseMutationOptions<
      Awaited<
        ReturnType<
          typeof createBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryPost
        >
      >,
      TError,
      { boardId: string; data: BoardGroupMemoryCreate },
      TContext
    >;
    request?: SecondParameter<typeof customFetch>;
  }): UseMutationOptions<
    Awaited<
      ReturnType<
        typeof createBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryPost
      >
    >,
    TError,
    { boardId: string; data: BoardGroupMemoryCreate },
    TContext
  > => {
    const mutationKey = [
      "createBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryPost",
    ];
    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 createBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryPost
        >
      >,
      { boardId: string; data: BoardGroupMemoryCreate }
    > = (props) => {
      const { boardId, data } = props ?? {};

      return createBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryPost(
        boardId,
        data,
        requestOptions,
      );
    };

    return { mutationFn, ...mutationOptions };
  };

export type CreateBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryPostMutationResult =
  NonNullable<
    Awaited<
      ReturnType<
        typeof createBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryPost
      >
    >
  >;
export type CreateBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryPostMutationBody =
  BoardGroupMemoryCreate;
export type CreateBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryPostMutationError =
  HTTPValidationError;

/**
 * @summary Create Board Group Memory For Board
 */
export const useCreateBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryPost =
  <TError = HTTPValidationError, TContext = unknown>(
    options?: {
      mutation?: UseMutationOptions<
        Awaited<
          ReturnType<
            typeof createBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryPost
          >
        >,
        TError,
        { boardId: string; data: BoardGroupMemoryCreate },
        TContext
      >;
      request?: SecondParameter<typeof customFetch>;
    },
    queryClient?: QueryClient,
  ): UseMutationResult<
    Awaited<
      ReturnType<
        typeof createBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryPost
      >
    >,
    TError,
    { boardId: string; data: BoardGroupMemoryCreate },
    TContext
  > => {
    return useMutation(
      getCreateBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryPostMutationOptions(
        options,
      ),
      queryClient,
    );
  };
/**
 * Stream linked-group memory via SSE for near-real-time coordination.
 * @summary Stream Board Group Memory For Board
 */
export type streamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGetResponse200 =
  {
    data: unknown;
    status: 200;
  };

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

export type streamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGetResponseSuccess =
  streamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGetResponse200 & {
    headers: Headers;
  };
export type streamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGetResponseError =
  streamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGetResponse422 & {
    headers: Headers;
  };

export type streamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGetResponse =

    | streamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGetResponseSuccess
    | streamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGetResponseError;

export const getStreamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGetUrl =
  (
    boardId: string,
    params?: StreamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGetParams,
  ) => {
    const normalizedParams = new URLSearchParams();

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

    const stringifiedParams = normalizedParams.toString();

    return stringifiedParams.length > 0
      ? `/api/v1/boards/${boardId}/group-memory/stream?${stringifiedParams}`
      : `/api/v1/boards/${boardId}/group-memory/stream`;
  };

export const streamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGet =
  async (
    boardId: string,
    params?: StreamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGetParams,
    options?: RequestInit,
  ): Promise<streamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGetResponse> => {
    return customFetch<streamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGetResponse>(
      getStreamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGetUrl(
        boardId,
        params,
      ),
      {
        ...options,
        method: "GET",
      },
    );
  };

export const getStreamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGetQueryKey =
  (
    boardId: string,
    params?: StreamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGetParams,
  ) => {
    return [
      `/api/v1/boards/${boardId}/group-memory/stream`,
      ...(params ? [params] : []),
    ] as const;
  };

export const getStreamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGetQueryOptions =
  <
    TData = Awaited<
      ReturnType<
        typeof streamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGet
      >
    >,
    TError = HTTPValidationError,
  >(
    boardId: string,
    params?: StreamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGetParams,
    options?: {
      query?: Partial<
        UseQueryOptions<
          Awaited<
            ReturnType<
              typeof streamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGet
            >
          >,
          TError,
          TData
        >
      >;
      request?: SecondParameter<typeof customFetch>;
    },
  ) => {
    const { query: queryOptions, request: requestOptions } = options ?? {};

    const queryKey =
      queryOptions?.queryKey ??
      getStreamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGetQueryKey(
        boardId,
        params,
      );

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

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

export type StreamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGetQueryResult =
  NonNullable<
    Awaited<
      ReturnType<
        typeof streamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGet
      >
    >
  >;
export type StreamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGetQueryError =
  HTTPValidationError;

export function useStreamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGet<
  TData = Awaited<
    ReturnType<
      typeof streamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGet
    >
  >,
  TError = HTTPValidationError,
>(
  boardId: string,
  params:
    | undefined
    | StreamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGetParams,
  options: {
    query: Partial<
      UseQueryOptions<
        Awaited<
          ReturnType<
            typeof streamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGet
          >
        >,
        TError,
        TData
      >
    > &
      Pick<
        DefinedInitialDataOptions<
          Awaited<
            ReturnType<
              typeof streamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGet
            >
          >,
          TError,
          Awaited<
            ReturnType<
              typeof streamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGet
            >
          >
        >,
        "initialData"
      >;
    request?: SecondParameter<typeof customFetch>;
  },
  queryClient?: QueryClient,
): DefinedUseQueryResult<TData, TError> & {
  queryKey: DataTag<QueryKey, TData, TError>;
};
export function useStreamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGet<
  TData = Awaited<
    ReturnType<
      typeof streamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGet
    >
  >,
  TError = HTTPValidationError,
>(
  boardId: string,
  params?: StreamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGetParams,
  options?: {
    query?: Partial<
      UseQueryOptions<
        Awaited<
          ReturnType<
            typeof streamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGet
          >
        >,
        TError,
        TData
      >
    > &
      Pick<
        UndefinedInitialDataOptions<
          Awaited<
            ReturnType<
              typeof streamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGet
            >
          >,
          TError,
          Awaited<
            ReturnType<
              typeof streamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGet
            >
          >
        >,
        "initialData"
      >;
    request?: SecondParameter<typeof customFetch>;
  },
  queryClient?: QueryClient,
): UseQueryResult<TData, TError> & {
  queryKey: DataTag<QueryKey, TData, TError>;
};
export function useStreamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGet<
  TData = Awaited<
    ReturnType<
      typeof streamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGet
    >
  >,
  TError = HTTPValidationError,
>(
  boardId: string,
  params?: StreamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGetParams,
  options?: {
    query?: Partial<
      UseQueryOptions<
        Awaited<
          ReturnType<
            typeof streamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGet
          >
        >,
        TError,
        TData
      >
    >;
    request?: SecondParameter<typeof customFetch>;
  },
  queryClient?: QueryClient,
): UseQueryResult<TData, TError> & {
  queryKey: DataTag<QueryKey, TData, TError>;
};
/**
 * @summary Stream Board Group Memory For Board
 */

export function useStreamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGet<
  TData = Awaited<
    ReturnType<
      typeof streamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGet
    >
  >,
  TError = HTTPValidationError,
>(
  boardId: string,
  params?: StreamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGetParams,
  options?: {
    query?: Partial<
      UseQueryOptions<
        Awaited<
          ReturnType<
            typeof streamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGet
          >
        >,
        TError,
        TData
      >
    >;
    request?: SecondParameter<typeof customFetch>;
  },
  queryClient?: QueryClient,
): UseQueryResult<TData, TError> & {
  queryKey: DataTag<QueryKey, TData, TError>;
} {
  const queryOptions =
    getStreamBoardGroupMemoryForBoardApiV1BoardsBoardIdGroupMemoryStreamGetQueryOptions(
      boardId,
      params,
      options,
    );

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

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