import type { IArcGISContext } from "../types/IArcGISContext";
import { Collection } from "./Collection";
import { HubEntityType } from "../core/types/HubEntityType";
import { IHubCatalog, ICatalogScope, EntityType, ICatalogDisplayConfig, IQuery, IHubCollection, IFilter } from "./types/IHubCatalog";
import { IHubSearchOptions } from "./types/IHubSearchOptions";
import { IHubSearchResponse } from "./types/IHubSearchResponse";
import { ISearchResponseHash } from "./types/IHubSearchResponseHash";
import { IHubSearchResult } from "./types/IHubSearchResult";
import { IContainsResponse, IContainsOptions } from "./types/types";
/**
 * Catalog Class
 *
 * Abstracts working with Catalogs and fetching collections with
 * the correct scope applied.
 *
 * For more information, check out the [Catalog & Collection Guide](/hub.js/guides/concepts/catalog-collection/)
 */
export declare class Catalog implements IHubCatalog {
    private _context;
    private _catalog;
    private _containsCache;
    private constructor();
    /**
     * Fetch a catalog
     * At this point, it returns the `.catalog` property from the entity
     * @param identifier url, guid, cuid
     * @param context
     * @param options is possible, pass the hubEntityType to improve fetching performance
     * @returns
     */
    static init(identifier: string, context?: IArcGISContext, options?: {
        hubEntityType: HubEntityType;
        prop: string;
    }): Promise<Catalog>;
    /**
     * Create a Catalog instance from a Catalog Definition Json object
     * @param json
     * @param context
     * @returns
     */
    static fromJson(json: IHubCatalog, context?: IArcGISContext): Catalog;
    /**
     * Return the JSON object backing the instance
     * @returns
     */
    toJson(): IHubCatalog;
    /**
     * Return the schema version
     */
    get schemaVersion(): number;
    /**
     * Title getter
     */
    get title(): string;
    /**
     * Title setter
     */
    set title(v: string);
    /**
     * Return the existing scopes hash
     */
    get scopes(): ICatalogScope;
    /**
     * Return an array of the entity types available in this Catalog
     */
    get availableScopes(): EntityType[];
    /**
     * Return the display configuration for the gallery
     */
    get displayConfig(): ICatalogDisplayConfig;
    /**
     * Get the scope's query for a particular entity type
     * @param type
     * @returns
     */
    getScope(type: EntityType): IQuery | undefined;
    /**
     * Set the scope for a specific entity type
     * @param type
     * @param query
     */
    setScope(type: EntityType, query: IQuery): void;
    /**
     * Get the collections array. Returns simple objects not Collection instances
     */
    get collections(): IHubCollection[];
    /**
     * Get the names of the collections
     */
    get collectionNames(): string[];
    /**
     * Get a Collection instance by name
     * @param name
     * @returns
     */
    getCollection(name: string): Collection;
    /**
     * Add a collection
     * @param {IHubCollection} collection
     */
    addCollection(collection: IHubCollection): void;
    /**
     * Get the Collection json by name
     * @param name
     * @returns
     */
    getCollectionJson(name: string): IHubCollection;
    /**
     * Get a Collection instance, based on a specific entity type and filters
     * This extends from the base scope for the entity type
     * @param type
     * @param filters
     * @returns
     */
    getCustomCollection(type: EntityType, filters: IFilter[]): Collection;
    /**
     * Create a custom collection based on a specific entity type and filters
     * Returned collection extends from the base scope for the entity type
     * @param type
     * @param filters
     * @returns
     */
    getCustomCollectionJson(type: EntityType, filters: IFilter[]): IHubCollection;
    /**
     * Search for Items
     * Will throw if the Catalog does not have a scope defined for items
     * @param query - string or IQuery
     * @param options
     * @returns
     */
    searchItems(query: string | IQuery, options?: IHubSearchOptions): Promise<IHubSearchResponse<IHubSearchResult>>;
    contains(identifier: string, options: IContainsOptions): Promise<IContainsResponse>;
    /**
     * Search for Groups
     * Will throw if the Catalog does not have a scope defined for groups
     * @param query  - string or IQuery
     * @param options
     * @returns
     */
    searchGroups(query: string | IQuery, options?: IHubSearchOptions): Promise<IHubSearchResponse<IHubSearchResult>>;
    /**
     * Search for Users
     * Will throw if the Catalog does not have a scope defined for users
     * @param query  - string or IQuery
     * @param options
     * @returns
     */
    searchUsers(query: string | IQuery, options?: IHubSearchOptions): Promise<IHubSearchResponse<IHubSearchResult>>;
    /**
     * Execute a term search against all the collections in the Catalog
     * or an IQuery against all collections that match the targetEntity.
     * Note: This will not search scopes which do not have corresponding collections.
     * If you want that behavior, use `searchCatalogs` function instead.
     * @param query  - string or IQuery
     * @param options
     * @returns
     */
    searchCollections(query: string | IQuery, options?: IHubSearchOptions): Promise<ISearchResponseHash>;
    /**
     * Execute a term search against all the scopes in the Catalog
     * @param query - term or IQuery
     * @param options
     * @returns
     */
    searchScopes(query: string | IQuery, options?: IHubSearchOptions, limitTo?: EntityType[]): Promise<ISearchResponseHash>;
    /**
     * Execute a term search or IQuery search against the Catalog.
     * @param query - term or IQuery
     * @param options
     * @returns
     */
    private search;
    /**
     * Construct an empty result. Returned when a search is performed against an entity type that
     * does not have a scope defined.
     * @returns
     */
    private getEmptyResult;
    private getDefaultSearchOptions;
}
