Interface CapabilityAwareSource<T>

Runtime Source returned by Dataset.source() and connect().source().

A v2 profile, when attached, is the authoritative truth. Legacy sources without a profile continue to answer built-in checks from their existing ReadonlySet and return false for extension identifiers.

interface CapabilityAwareSource<T> {
    attachments: AttachmentApi;
    capabilities: Capabilities;
    capabilityProfile?: CapabilityProfile;
    descriptor: SourceDescriptor;
    adapter<K>(kind: K): undefined | AdapterFor<K>;
    applyEdits(envelope: EditEnvelope<T>): Promise<EditResult>;
    protocol<K>(kind: K): undefined | AdapterFor<K>;
    query(request?: Query<T>): Promise<Result<T>>;
    queryAggregate(request: Query<T> & {
        aggregation: AggregationSpec;
    }): Promise<Result<T>>;
    queryAll(request?: Query<T>): Promise<Result<T>>;
    queryExtent(request?: Query<T>): Promise<{
        count?: number;
        extent: null | HonuaExtent;
    }>;
    queryObjectIds(request?: Query<T>): Promise<readonly FeatureId[]>;
    queryRelated<R>(request: RelatedQuery): Promise<RelatedResult<R>>;
    stream(request?: Query<T>): AsyncGenerator<Result<T>, void, undefined>;
    supports<const C>(capability: C): this is CapabilityAwareSource<T> & SupportedSourceCapability<C>;
}

Type Parameters

  • T = Record<string, unknown>

Hierarchy (view full)

Properties

attachments: AttachmentApi

Attachment operations namespace; methods throw if attachments is missing.

capabilities: Capabilities
capabilityProfile?: CapabilityProfile
descriptor: SourceDescriptor

Methods