import { InfiniteData, UseInfiniteQueryResult, UseQueryResult } from '@tanstack/react-query';
import { DataWithCursor, Activity, SortOrder, ActivitySummary, ActivitySummaryParams } from '@multiplayer-app/ai-agent-types';

export declare const activityKeys: {
    readonly all: readonly ["mp-agents", "activities"];
    readonly lists: () => readonly ["mp-agents", "activities", "list"];
    readonly list: (filters: Record<string, unknown>) => readonly ["mp-agents", "activities", "list", Record<string, unknown>];
    readonly infinites: () => readonly ["mp-agents", "activities", "infinite"];
    readonly infinite: (filters: Record<string, unknown>) => readonly ["mp-agents", "activities", "infinite", Record<string, unknown>];
    readonly sourceTypes: (filters: Record<string, unknown>) => readonly ["mp-agents", "activities", "sourceTypes", Record<string, unknown>];
    readonly detail: (id: string | undefined) => readonly ["mp-agents", "activities", "detail", string | undefined];
    readonly summary: (params?: ActivitySummaryParams) => readonly ["mp-agents", "activities", "summary", ActivitySummaryParams | undefined];
};
export interface UseActivitiesParams {
    groupId?: string;
    parentId?: string;
    /** When set, only activities with this `sourceType` are returned */
    sourceType?: string;
    sortField?: string;
    sortOrder?: SortOrder;
    pageSize?: number;
    enabled?: boolean;
    /** ISO date string or Date */
    from?: string | Date;
    /** ISO date string or Date */
    to?: string | Date;
    /** Tenant filter, e.g. { account: accountId } or { all: true } for super admin */
    tenant?: Record<string, string> | {
        all?: boolean;
    };
    /** User ID filter; use '__all__' for all users in scope */
    ownerId?: string;
}
export type UseActivitiesInfiniteListResult = UseInfiniteQueryResult<InfiniteData<DataWithCursor<Activity>, unknown>, Error>;
export interface UseActivitiesListParams extends UseActivitiesParams {
    /** 1-based page number */
    page: number;
}
export type UseActivitiesListResult = UseQueryResult<DataWithCursor<Activity>, Error> & {
    page: number;
    pageSize: number;
    totalPages: number;
    total: number;
    hasNextPage: boolean;
    hasPreviousPage: boolean;
};
/** Flatten all pages from an infinite activities query into a single array. */
export declare const flattenInfiniteActivities: (data: InfiniteData<DataWithCursor<Activity>, unknown> | undefined) => Activity[];
export declare const useActivitiesInfiniteList: (params?: UseActivitiesParams) => UseActivitiesInfiniteListResult;
export declare const useActivitiesList: (params: UseActivitiesListParams) => UseActivitiesListResult;
export declare const useActivity: (activityId: string | undefined) => UseQueryResult<Activity | null, Error>;
export interface UseActivitySummaryParams extends ActivitySummaryParams {
    /** When false, query is disabled */
    enabled?: boolean;
}
export type UseActivitySummaryResult = UseQueryResult<ActivitySummary[], Error>;
export declare const useActivitySummary: (params?: UseActivitySummaryParams) => UseActivitySummaryResult;
export interface UseActivitySourceTypesParams {
    groupId?: string;
    parentId?: string;
    /** ISO date string or Date */
    from?: string | Date;
    /** ISO date string or Date */
    to?: string | Date;
    tenant?: Record<string, string> | {
        all?: boolean;
    };
    ownerId?: string;
    enabled?: boolean;
}
export type UseActivitySourceTypesResult = UseQueryResult<string[], Error>;
export declare const useActivitySourceTypes: (params?: UseActivitySourceTypesParams) => UseActivitySourceTypesResult;
//# sourceMappingURL=useActivities.d.ts.map