import { type Entity, Utils } from '@graphprotocol/hypergraph';
import type * as ParseResult from 'effect/ParseResult';
import * as Schema from 'effect/Schema';
import type { InvalidRelationEntity, RelationsListWithNodes } from '../utils/convert-relations.js';
import type { RelationTypeIdInfo } from '../utils/get-relation-type-ids.js';
import type { SpaceSelectionInput } from './types.js';
export type FindManyPublicParams<S extends Schema.Schema.AnyNoContext, IncludeSpaceIds extends boolean | undefined = boolean | undefined> = SpaceSelectionInput & {
    filter?: Entity.EntityFilter<Schema.Schema.Type<S>> | undefined;
    include?: Entity.EntityInclude<S> | undefined;
    first?: number | undefined;
    offset?: number | undefined;
    orderBy?: {
        property: keyof Schema.Schema.Type<S>;
        direction: 'asc' | 'desc';
    } | undefined;
    includeSpaceIds?: IncludeSpaceIds;
    logInvalidResults?: boolean | undefined;
};
type ValuesList = {
    propertyId: string;
    string: string;
    boolean: boolean;
    number: number;
    time: string;
    point: string;
}[];
type RawEntity = Record<string, string | boolean | number | unknown[] | Date | string[]>;
export type InvalidEntity = {
    raw: RawEntity;
    error: ParseResult.ParseError;
};
export type EntityQueryResult = {
    entities: ({
        id: string;
        name: string;
        spaceIds: readonly (string | null)[] | null;
        valuesList: ValuesList;
    } & {
        [K: `relations_${string}`]: RelationsListWithNodes | undefined;
    })[];
};
export type FindManyParseResult<S extends Schema.Schema.AnyNoContext, IncludeSpaceIds extends boolean | undefined> = {
    data: Entity.WithSpaceIds<Entity.Entity<S>, IncludeSpaceIds>[];
    invalidEntities: InvalidEntity[];
    invalidRelationEntities: InvalidRelationEntity[];
};
export declare const parseResult: <S extends Schema.Schema.AnyNoContext, IncludeSpaceIds extends boolean | undefined>(queryData: EntityQueryResult, type: S, relationInfoLevel1: RelationTypeIdInfo[], options?: {
    includeSpaceIds?: IncludeSpaceIds;
}) => FindManyParseResult<S, IncludeSpaceIds>;
export declare const findManyPublic: <S extends Schema.Schema.AnyNoContext, IncludeSpaceIds extends boolean | undefined = false>(type: S, params?: FindManyPublicParams<S, IncludeSpaceIds>) => Promise<{
    data: Entity.WithSpaceIds<Entity.Entity<S>, IncludeSpaceIds>[];
    invalidEntities: Entity.InvalidEntity[];
    invalidRelationEntities: Utils.InvalidRelationEntity[];
}>;
export {};
//# sourceMappingURL=find-many-public.d.ts.map