/** * Unified key parser for cruise admin routes. * * The same admin endpoint (e.g. `GET /v1/admin/cruises/:key`) accepts both * local TypeIDs (`cru_abc123…`) and external adapter-scoped keys * (`:`, e.g. `voyant-connect:cnx_xx/extId`). The parser * normalises the URL parameter into a discriminated union so route handlers * can dispatch to the local DB or to an adapter. * * Phase 2 only handles `kind: 'local'`; external keys return 501. Phase 3 * wires the adapter contract. */ export type ParsedKey = { kind: "local"; id: string; } | { kind: "external"; provider: string; ref: string; } | { kind: "invalid"; raw: string; }; export type EncodableSourceRef = { externalId: string; connectionId?: string; [key: string]: unknown; }; export declare function parseUnifiedKey(raw: string): ParsedKey; /** * True when `id` is a catalog sourced entity id: a TypeID prefix followed by an * encoded SourceRef (`_sr_`). Distinguishes sourced ids from * owned TypeIDs so content routes dispatch sourced ids without the owned-key * opt-in. See `cruiseAdapterToSourceAdapter`'s `buildEntityId`. */ export declare function isEncodedSourceEntityId(id: string): boolean; export declare function makeExternalSourceKey(provider: string, sourceRef: EncodableSourceRef): string; export declare function encodeSourceRef(sourceRef: EncodableSourceRef): string; export declare function decodeSourceRef(encoded: string): EncodableSourceRef | null; export declare function sourceRefFromExternalKeyRef(ref: string): EncodableSourceRef;