/** * @module integrations/enterprise/platform-sync * * Pull the org's enterprise records from the SkyKoi platform over the * gateway-token proxy pattern (GET {appUrl}/api/koi/{koiId}/enterprise with * x-gateway-token) and merge them into the local 0600 cache. Identity resolves * from config first (cfg.gateway.mesh.platformUrl/koiId + cfg.gateway.auth * .token) with SKYKOI_APP_URL / SKYKOI_KOI_ID / SKYKOI_GATEWAY_TOKEN env * fallbacks — the same precedence the gateway heartbeat uses. */ import { type SKYKOIConfig } from "../../config/config.js"; export type PlatformIdentity = { platformUrl?: string; koiId?: string; gatewayToken?: string; }; /** Config wins; env vars are the boot-time fallback (mirrors gateway sync). */ export declare function resolvePlatformIdentity(cfg?: SKYKOIConfig): PlatformIdentity; export declare function platformIdentityAvailable(cfg?: SKYKOIConfig): boolean; export type SyncFromPlatformResult = { ok: true; counts: { connections: number; roster: number; grants: number; }; } | { ok: false; reason: string; }; export declare function syncFromPlatform(cfg?: SKYKOIConfig): Promise;