import { FirebaseApp } from 'firebase/app'; import { FirebaseStorage } from 'firebase/storage'; import { CueBlobStorage } from 'js-databases'; import { CueAuth } from './auth'; import { CueSignUp } from './signup'; import { CueStorage } from './storage'; import { CueApi } from './api'; import { CueGis } from './gis'; import { CueProjects } from './project'; import { CueProfile } from './profile'; import { CuePrivileges } from './privileges'; import { CueCache } from './cache'; import { CueCurrency } from './currency'; import { CueProjectView, CueProjectViewOptions } from './project-view'; import { CueProjectEntities } from './entities'; import { CueProjectDocuments } from './documents'; import { CueEndpoints, CueSdkConfig } from './models'; /** * Main entry point for the QAECY SDK (browser-safe). * For Node.js use with file-sync capabilities, use `CueNode` from `js-cue-sdk/node`. * * @example * const cue = new Cue({ apiKey: '...', appId: '...', measurementId: '...' }); * await cue.auth.signIn('google'); * const results = await cue.api.search({ term: 'my query', projectId: 'project-id' }); */ export declare class Cue { readonly auth: CueAuth; readonly signup: CueSignUp; readonly api: CueApi; readonly projects: CueProjects; readonly profile: CueProfile; readonly privileges: CuePrivileges; readonly cache: CueCache; readonly storage: CueStorage; readonly currency: CueCurrency; protected readonly _app: FirebaseApp; protected readonly _endpoints: CueEndpoints; protected readonly _isEmulator: boolean; protected _storageRaw: FirebaseStorage; protected _storageProcessed: FirebaseStorage; private _gis; private readonly _projectDocuments; private readonly _verbose; /** * Reactive GIS service. Lazily constructed on first access. * * @example * ```ts * cue.gis.setProjectId('my-project'); * cue.gis.onAvailableCategories(cats => ...); * cue.gis.setBbox([west, south, east, north]); * cue.gis.setSelectedCategories(new Set(['cadastre', 'building'])); * ``` */ get gis(): CueGis; constructor(config?: CueSdkConfig); /** * Create a `Cue` instance from an already-initialized Firebase app. * * Use this when the host application (e.g. cue-portal via `CueFirebase`) has * already called `initializeApp()`. Reusing the same `FirebaseApp` means the * SDK shares the same auth state and Firestore instance — no second login is * needed and `getToken()` returns the portal user's token directly. * * Emulator connections are skipped because the host app already set them up. * * @example * // In an Angular service after CueFirebase is ready: * const cue = Cue.fromApp(CueFirebase.getInstance().app!, { * environment: 'emulator', * }); */ static fromApp(app: FirebaseApp, config?: Omit): Cue; protected _buildApi(projects: CueProjects, blob: CueBlobStorage): CueApi; /** Convenience: get the current user's Firebase ID token */ getToken(forceRefresh?: boolean): Promise; /** * Create a `CueProjectView` for the given project, wiring the SDK's query * cache automatically. * * The view auto-fetches the document overview and entity graph on construction * and exposes reactive signals for all project knowledge-graph state. * * @example * ```ts * const view = cue.createProjectView('my-project', { language: 'en' }); * view.requestEntityData(['uuid1']); * const info = view.entityInfoMap.get()['uuid1']; * ``` */ createProjectView(projectId: string, opts: CueProjectViewOptions): CueProjectView; /** * Creates a `CueProjectEntities` instance for the given project, bound to the * correct API. * * @example * ```ts * const entities = cue.createProjectEntities('my-project'); * entities.requestEntityData(['uuid1']); * const info = entities.entityInfoMap.get()['uuid1']; * * // Promise-based (no signal polling needed): * const graph = await entities.buildSummaryGraph('graph'); * ``` */ createProjectEntities(projectId: string, opts?: { rdfBase?: string; graphType?: string; verbose?: boolean; }): CueProjectEntities; /** * Creates a `CueProjectDocuments` instance for the given project, bound to the * correct API. * * @example * ```ts * const docs = cue.createProjectDocuments('my-project'); * await docs.fetchOverview(); * const data = await docs.fetchDocumentData(['uuid1', 'uuid2']); * ``` */ createProjectDocuments(projectId: string, opts?: { language?: string; rdfBase?: string; graphType?: string; verbose?: boolean; }): CueProjectDocuments; }