export declare const DATASET_ENTITY_TYPES: readonly ["Tokens", "TokenThemes", "FigmaComponents", "DesignComponents", "Assets", "Documentation", "Contexts", "Skills", "Files", "CodeComponents"];
export type DatasetEntityType = (typeof DATASET_ENTITY_TYPES)[number];
export type DatasetLogicalOperator = "And" | "Or";
export type DatasetPropertyOperator = "Is" | "IsNot" | "Contains" | "DoesNotContain" | "StartsWith" | "EndsWith" | "IsEmpty" | "IsNotEmpty" | "GreaterThan" | "GreaterThanOrEqual" | "LessThan" | "LessThanOrEqual" | "In" | "NotIn";
export type DatasetPrimitiveValue = string | number | boolean | null;
export type DatasetConditionValue = DatasetPrimitiveValue | readonly DatasetPrimitiveValue[];
export type DatasetEntityFieldMap = {
    Tokens: {
        id: string;
        name: string;
        description: string;
        path: string;
        tokenType: string;
        brandId: string;
        themeId: string | null;
        collectionId: string | null;
        sortOrder: number;
    };
    TokenThemes: {
        id: string;
        name: string;
        description: string;
        codeName: string;
        brandId: string;
        collectionName: string;
    };
    FigmaComponents: {
        id: string;
        name: string;
        description: string;
    };
    DesignComponents: {
        id: string;
        name: string;
        description: string;
    };
    Assets: {
        id: string;
        name: string;
        description: string;
    };
    Documentation: {
        id: string;
        name: string;
        description: string;
        path: string;
    };
    Contexts: {
        id: string;
        name: string;
        description: string;
        workspaceId: string;
        designSystemId: string | null;
    };
    Skills: {
        id: string;
        name: string;
        path: string;
        description: string;
        type: string;
    };
    Files: {
        id: string;
        name: string;
        path: string;
        description: string;
        type: string;
    };
    CodeComponents: {
        id: string;
        name: string;
        description: string;
        packageName: string;
        repositoryName: string;
        filePath: string;
    };
};
export type DatasetFilterProperty<TEntity extends DatasetEntityType> = keyof DatasetEntityFieldMap[TEntity] & string;
type DatasetFieldValue<TEntity extends DatasetEntityType, TProperty extends DatasetFilterProperty<TEntity>> = DatasetEntityFieldMap[TEntity][TProperty];
type DatasetStringPropertyOperator = "Is" | "IsNot" | "Contains" | "DoesNotContain" | "StartsWith" | "EndsWith" | "IsEmpty" | "IsNotEmpty" | "In" | "NotIn";
type DatasetNumberPropertyOperator = "Is" | "IsNot" | "IsEmpty" | "IsNotEmpty" | "GreaterThan" | "GreaterThanOrEqual" | "LessThan" | "LessThanOrEqual" | "In" | "NotIn";
type DatasetBooleanPropertyOperator = "Is" | "IsNot" | "IsEmpty" | "IsNotEmpty";
type DatasetArrayPropertyOperator = "Contains" | "DoesNotContain" | "IsEmpty" | "IsNotEmpty" | "In" | "NotIn";
export type DatasetPropertyOperatorForField<TEntity extends DatasetEntityType, TProperty extends DatasetFilterProperty<TEntity>> = DatasetFieldValue<TEntity, TProperty> extends readonly unknown[] ? DatasetArrayPropertyOperator : DatasetFieldValue<TEntity, TProperty> extends number ? DatasetNumberPropertyOperator : DatasetFieldValue<TEntity, TProperty> extends boolean ? DatasetBooleanPropertyOperator : DatasetStringPropertyOperator;
export type DatasetConditionValueForField<TEntity extends DatasetEntityType, TProperty extends DatasetFilterProperty<TEntity>> = DatasetFieldValue<TEntity, TProperty> extends readonly (infer TItem)[] ? TItem | readonly TItem[] : DatasetFieldValue<TEntity, TProperty> | readonly DatasetFieldValue<TEntity, TProperty>[];
export type DatasetIncludeAllCondition = {
    type: "IncludeAll";
};
export type DatasetIncludeIdsCondition = {
    type: "IncludeIds";
    ids: readonly string[];
};
export type DatasetExcludeIdsCondition = {
    type: "ExcludeIds";
    ids: readonly string[];
};
export type DatasetPropertyCondition<TEntity extends DatasetEntityType = DatasetEntityType, TProperty extends DatasetFilterProperty<TEntity> = DatasetFilterProperty<TEntity>> = {
    type: "Property";
    property: TProperty;
    operator: DatasetPropertyOperatorForField<TEntity, TProperty>;
    value?: DatasetConditionValueForField<TEntity, TProperty>;
};
export type DatasetCondition<TEntity extends DatasetEntityType = DatasetEntityType> = DatasetIncludeAllCondition | DatasetIncludeIdsCondition | DatasetExcludeIdsCondition | DatasetPropertyCondition<TEntity>;
export type DatasetFilterNode<TEntity extends DatasetEntityType = DatasetEntityType> = DatasetCondition<TEntity> | DatasetFilterGroup<TEntity>;
export type DatasetFilterGroup<TEntity extends DatasetEntityType = DatasetEntityType> = {
    type: "Group";
    operator: DatasetLogicalOperator;
    children: readonly DatasetFilterNode<TEntity>[];
};
export type DatasetEntity = {
    id: string;
    [property: string]: unknown;
};
export type DatasetFilterItem = {
    id: string;
};
export type DatasetFilterEntity<TItem extends DatasetFilterItem> = DatasetEntity & {
    name?: string;
    path?: string;
    item: TItem;
};
export type DatasetFilterResultSource = "current" | "inherited";
export type DatasetFilterResult<TItem extends DatasetFilterItem> = {
    item: TItem;
    source: DatasetFilterResultSource;
};
export type DatasetFilterResultByEntityType<TItem extends DatasetFilterItem = DatasetFilterItem> = Partial<Record<DatasetEntityType, Array<DatasetFilterResult<TItem>>>>;
export type DatasetIdInScopeResult = {
    status: "in_scope";
    reason: "includeAll" | "explicit_include" | "no_filter_configured";
} | {
    status: "not_in_scope";
    reason: "explicit_exclude" | "not_in_includes";
};
export type DatasetItemProjector<TItem extends DatasetFilterItem> = (item: TItem) => DatasetFilterEntity<TItem>;
export type DatasetSelections = Partial<Record<DatasetEntityType, DatasetFilterGroup>>;
export type SDKDatasetData = {
    designSystemId?: string | null;
    selections?: DatasetSelections;
};
export type DatasetResolveResult<TEntity extends DatasetFilterItem = DatasetEntity> = DatasetFilterResultByEntityType<TEntity>;
export type DatasetDataRepository<TEntity extends DatasetFilterItem = DatasetEntity> = {
    getAllForType: (entityType: DatasetEntityType, designSystemId: string | null) => readonly TEntity[];
};
type DatasetPropertyGetter<TEntity extends DatasetEntity> = (item: TEntity, property: string) => unknown;
/**
 * Canonical id for dataset filter matching. For `Documentation` items, prefer
 * `persistentId` when present — page entities expose both `id` (numeric,
 * version-specific) and `persistentId` (UUID, stable across versions), and
 * filters store the persistentId. Other entity types fall through to `id`,
 * which the SDK already normalizes to the persistent form on construction.
 */
export declare const getDatasetFilterEntityId: <TItem extends DatasetFilterItem>(item: TItem, entityType: DatasetEntityType) => string;
export declare class DatasetSelectionBuilder<TEntity extends DatasetEntityType> {
    and(children: readonly DatasetFilterNode<TEntity>[]): DatasetFilterGroup<TEntity>;
    or(children: readonly DatasetFilterNode<TEntity>[]): DatasetFilterGroup<TEntity>;
    includeAll(): DatasetIncludeAllCondition;
    includeIds(ids: readonly string[]): DatasetIncludeIdsCondition;
    excludeIds(ids: readonly string[]): DatasetExcludeIdsCondition;
    where<TProperty extends DatasetFilterProperty<TEntity>, TOperator extends DatasetPropertyOperatorForField<TEntity, TProperty>>(property: TProperty, operator: TOperator, value?: DatasetConditionValueForField<TEntity, TProperty>): DatasetPropertyCondition<TEntity, TProperty>;
}
export declare class SDKDataset {
    /** @deprecated not used anymore */
    readonly designSystemId: string | null;
    readonly Tokens?: DatasetFilterGroup;
    readonly TokenThemes?: DatasetFilterGroup;
    readonly FigmaComponents?: DatasetFilterGroup;
    readonly DesignComponents?: DatasetFilterGroup;
    readonly Assets?: DatasetFilterGroup;
    readonly Documentation?: DatasetFilterGroup;
    readonly Contexts?: DatasetFilterGroup;
    readonly Skills?: DatasetFilterGroup;
    readonly Files?: DatasetFilterGroup;
    readonly CodeComponents?: DatasetFilterGroup;
    private readonly refinedSourceDataset?;
    private readonly refinedBaseDataset?;
    constructor(data?: SDKDatasetData, refinedSourceDataset?: SDKDataset, refinedBaseDataset?: SDKDataset);
    static create(designSystemId?: string | null): SDKDataset;
    static and(children: readonly DatasetFilterNode[]): DatasetFilterGroup;
    static or(children: readonly DatasetFilterNode[]): DatasetFilterGroup;
    static includeAll(): DatasetIncludeAllCondition;
    static includeIds(ids: readonly string[]): DatasetIncludeIdsCondition;
    static excludeIds(ids: readonly string[]): DatasetExcludeIdsCondition;
    withSelection<TEntity extends DatasetEntityType>(entityType: TEntity, buildGroup: (builder: DatasetSelectionBuilder<TEntity>) => DatasetFilterGroup<TEntity>): SDKDataset;
    withoutSelection(entityType: DatasetEntityType): SDKDataset;
    canUnionWith(other: SDKDataset): boolean;
    union(other: SDKDataset): SDKDataset;
    refine(baseDataset: SDKDataset): SDKDataset;
    resolve<TEntity extends DatasetEntity>(repository: DatasetDataRepository<TEntity>, getPropertyValue?: DatasetPropertyGetter<TEntity>): DatasetResolveResult<TEntity>;
    filteredTokens<TToken extends DatasetFilterItem>(allTokens: readonly TToken[], inheritedDataset?: SDKDataset): DatasetFilterResult<TToken>[];
    filteredTokenThemes<TTokenTheme extends DatasetFilterItem>(allTokenThemes: readonly TTokenTheme[], inheritedDataset?: SDKDataset): DatasetFilterResult<TTokenTheme>[];
    filteredFigmaComponents<TFigmaComponent extends DatasetFilterItem>(allFigmaComponents: readonly TFigmaComponent[], inheritedDataset?: SDKDataset): DatasetFilterResult<TFigmaComponent>[];
    filteredDesignComponents<TDesignComponent extends DatasetFilterItem>(allDesignComponents: readonly TDesignComponent[], inheritedDataset?: SDKDataset): DatasetFilterResult<TDesignComponent>[];
    filteredAssets<TAsset extends DatasetFilterItem>(allAssets: readonly TAsset[], inheritedDataset?: SDKDataset): DatasetFilterResult<TAsset>[];
    filteredDocumentation<TDocumentation extends DatasetFilterItem>(allDocumentation: readonly TDocumentation[], inheritedDataset?: SDKDataset): DatasetFilterResult<TDocumentation>[];
    filteredContexts<TContext extends DatasetFilterItem>(allContexts: readonly TContext[], inheritedDataset?: SDKDataset): DatasetFilterResult<TContext>[];
    filteredSkills<TSkill extends DatasetFilterItem>(allSkills: readonly TSkill[], inheritedDataset?: SDKDataset): DatasetFilterResult<TSkill>[];
    filteredFiles<TFile extends DatasetFilterItem>(allFiles: readonly TFile[], inheritedDataset?: SDKDataset): DatasetFilterResult<TFile>[];
    filteredCodeComponents<TCodeComponent extends DatasetFilterItem>(allCodeComponents: readonly TCodeComponent[], inheritedDataset?: SDKDataset): DatasetFilterResult<TCodeComponent>[];
    filteredItems<TItem extends DatasetFilterItem>(entityType: DatasetEntityType, allItems: readonly TItem[], inheritedDataset?: SDKDataset, projectItem?: DatasetItemProjector<TItem>): Array<DatasetFilterResult<TItem>>;
    /**
     * Id-only membership check against the dataset's scope for one entity type.
     * Walks the filter tree for `IncludeAll`, `IncludeIds`, `ExcludeIds` and
     * returns a structured reason. Does not evaluate property predicates — for
     * those use `filteredItems`.
     *
     * Default for a missing filter group: workspace-scoped entities drop;
     * DS-scoped entities pass. See `DATASET_WORKSPACE_ENTITY_TYPES` for why.
     */
    isIdInScope(entityType: DatasetEntityType, id: string): DatasetIdInScopeResult;
    isEmpty(): boolean;
    private getSelections;
    toRemote(): SDKDatasetData;
    private getMatchingItemIds;
    private mapItemsToResults;
}
export {};
