import type { EntityRevisionId } from "../../../types/entity.js"; import type { Subgraph, SubgraphRootType } from "../../../types/subgraph.js"; import type { Entity, EntityId, TemporalBound, TemporalInterval } from "@blockprotocol/type-system"; /** * Returns all {@link Entity}s within the vertices of the given {@link Subgraph}, optionally filtering to only get their * latest revisions. * * @param subgraph * @param latest - whether or not to only return the latest revisions of each entity */ export declare const getEntities: (subgraph: Subgraph, latest: boolean) => EntityImpl[]; /** * Gets an {@link Entity} by its {@link EntityId} from within the vertices of the subgraph. If * `targetRevisionInformation` is not passed, then the latest version of the {@link Entity} will be returned. * * Returns `undefined` if the entity couldn't be found. * * @param subgraph * @param {EntityId} entityId - The {@link EntityId} of the entity to get. * @param {EntityRevisionId|Timestamp|Date} [targetRevisionInformation] - Optional information needed to uniquely * identify a revision of an entity either by an explicit {@link EntityRevisionId}, `Date`, or by a given * {@link Timestamp} where the entity whose lifespan overlaps the given timestamp will be returned. * @throws if the vertex isn't an {@link EntityVertex} */ export declare const getEntityRevision: (subgraph: Subgraph, entityId: EntityId, targetRevisionInformation?: EntityRevisionId | Date) => Entity | undefined; /** * Returns all {@link Entity} revisions within the vertices of the subgraph that match a given {@link EntityId}. * * When querying a subgraph with support for temporal versioning, it optionally constrains the search to a given * {@link TimeInterval}. * * @param {Subgraph }subgraph * @param {EntityId} entityId * @param {TemporalInterval} [interval] */ export declare const getEntityRevisionsByEntityId: (subgraph: Subgraph, entityId: EntityId, interval?: TemporalInterval) => Entity[];