import type { SyncAuth } from './client.ts'; export interface EsriIdentityManagerLike { registerToken(props: { server: string; token: string; expires?: number; userId?: string; }): void; findCredential(url: string, userId?: string): unknown; destroyCredentials(): void; } export interface EsriConfigLike { request: { interceptors: Array<{ urls?: string | RegExp | Array; before?(params: { url: string; requestOptions?: { query?: Record; } & Record; }): unknown; error?(error: unknown): unknown; }>; }; } /** Shape of the global the ArcGIS CDN loader (js.arcgis.com) installs. npm builds create `$arcgis` but never add `import`. */ export interface ArcgisGlobalLike { import?: (modules: string[]) => Promise; } /** Mirror sessions into IdentityManager and attach the token via a request interceptor. Idempotent per client. */ export declare function wireArcgis(auth: SyncAuth, esriConfig: EsriConfigLike, esriId: EsriIdentityManagerLike, reauthenticate?: boolean): () => void; export declare const ARCGIS_MODULES: readonly ["@arcgis/core/config.js", "@arcgis/core/identity/IdentityManager.js"]; /** * Wire automatically when the ArcGIS Maps SDK is loaded from the CDN (which * exposes `$arcgis.import`). Resolves quietly if the SDK never shows up. * Returns a cancel function. */ export declare function autoWireArcgis(auth: SyncAuth): () => void; //# sourceMappingURL=arcgis-wire.d.ts.map