/**
 * Domain utility functions for working with app identifiers and data normalization
 */
import type { Action, ImplementationMeta } from "../api/types";
import type { ConnectionEntry } from "../types/connections";
import type { ActionItem, AppItem, ConnectionItem } from "../types/domain";
/**
 * Checks if a string value looks like a direct connection ID rather than a named alias.
 * Returns true for numeric strings and UUIDs.
 */
export declare function isConnectionId(value: string): boolean;
/**
 * Resolves a connectionId from the connection-related parameters that can be passed
 * to SDK methods (connectionId, connection, authenticationId).
 *
 * Handles mutual exclusivity validation, string alias lookup via the connections map,
 * and numeric passthrough.
 */
export declare function resolveConnectionId({ connectionId, connection, authenticationId, resolveConnection, label, }: {
    connectionId?: string | number | null;
    connection?: string | number | null;
    authenticationId?: string | number | null;
    resolveConnection: (name: string) => Promise<ConnectionEntry | undefined>;
    label?: string;
}): Promise<string | number | undefined>;
/**
 * Splits a versioned key to extract the base key and version
 *
 * @param versionedKey - Versioned key in format "KeyName@version" (e.g., "SlackCLIAPI@1.21.1")
 * @returns Tuple of [baseKey, version] or [versionedKey, undefined] if no @ symbol
 *
 * @example
 * splitVersionedKey("SlackCLIAPI@1.21.1") // ["SlackCLIAPI", "1.21.1"]
 * splitVersionedKey("SomeAPI") // ["SomeAPI", undefined]
 */
export declare function splitVersionedKey(versionedKey: string): [string, string | undefined];
/**
 * Converts a lightweight ImplementationMeta to a slimmed AppItem
 *
 * @param implementationMeta - Raw ImplementationMeta from API
 * @returns Normalized AppItem with essential fields only
 */
export declare function normalizeImplementationMetaToAppItem(implementationMeta: ImplementationMeta): AppItem;
export declare function normalizeActionItem(action: Action): ActionItem;
/**
 * Prefer public IDs over numeric IDs in a connection item.
 * The API returns extra public_id, account_public_id, and customuser_public_id
 * fields alongside the stringified numeric IDs. This function swaps them in.
 */
export declare function transformConnectionItem(item: ConnectionItem): ConnectionItem;
/**
 * Groups app keys by their type based on format patterns
 *
 * @param appKeys Array of app key strings to categorize
 * @returns Object with arrays of keys grouped by type: selectedApi (CLI APIs), slug (everything else)
 *
 * @example
 * groupVersionedAppKeysByType([
 *   'FormatterCLIAPI@1.0.0',
 *   'slack',
 *   'AnotherAPI'
 * ])
 * // Returns: {
 * //   selectedApi: ['FormatterCLIAPI@1.0.0', 'AnotherAPI'],
 * //   slug: ['slack']
 * // }
 */
export declare function groupVersionedAppKeysByType(appKeys: string[]): {
    selectedApi: string[];
    slug: string[];
};
export declare function groupAppKeysByType(appKeys: string[]): {
    selectedApi: string[];
    slug: string[];
};
export declare function isSlug(slug: string): boolean;
export declare function isSnakeCasedSlug(slug: string): boolean;
export declare function dashifySnakeCasedSlug(slug: string): string;
export interface AppLocator {
    lookupAppKey: string;
    slug?: string;
    implementationName?: string;
    version?: string;
}
export interface ResolvedAppLocator extends AppLocator {
    implementationName: string;
}
export declare function isUuid(appKey: string): boolean;
export declare function toAppLocator(appKey: string): AppLocator;
export declare function isResolvedAppLocator(appLocator: AppLocator): appLocator is ResolvedAppLocator;
export declare function toImplementationId(appLocator: ResolvedAppLocator): string;
export declare function getAppKeyList(app: {
    key: string;
    slug: string;
}): string[];
//# sourceMappingURL=domain-utils.d.ts.map