import { SyncAuth } from './client.ts'; import { type EsriConfigLike, type EsriIdentityManagerLike } from './arcgis-wire.ts'; import type { SyncAuthOptions } from './types.ts'; export { SyncAuth } from './client.ts'; export * from './types.ts'; export type { EsriConfigLike, EsriIdentityManagerLike } from './arcgis-wire.ts'; export interface ConnectArcgisOptions { /** * Bring your own SDK modules — only needed when neither the CDN global * (`$arcgis.import`) nor a bundler-resolvable `@arcgis/core` is available. */ esriConfig?: EsriConfigLike; esriId?: EsriIdentityManagerLike; /** Re-open the popup automatically when a request is rejected as unauthenticated. Default true. */ reauthenticate?: boolean; } /** * Create a Sync Server client pre-wired into the ArcGIS Maps SDK for JavaScript: * sign-in/out is mirrored into `IdentityManager`, and every request the SDK makes * to Sync Server carries the token (one re-authentication on 401/403/499). * * ```ts * import { createSyncAuth } from '@imaps/sync-server-auth/arcgis'; * const auth = createSyncAuth({ server: 'https://sync.example.com' }); * ``` * * Uses `$arcgis.import` when the SDK comes from the CDN, otherwise imports * `@arcgis/core` through your bundler. Wiring completes asynchronously; the * returned client is usable immediately. */ export declare function createSyncAuth(options: Omit & { arcgis?: ConnectArcgisOptions; }): SyncAuth; /** * Wire an existing client into the ArcGIS SDK. Idempotent per client; resolves to * a function that removes the interceptor and IdentityManager mirroring. */ export declare function connectArcgis(auth: SyncAuth, options?: ConnectArcgisOptions): Promise<() => void>; //# sourceMappingURL=arcgis.d.ts.map