/*!
 * Copyright (C) Microsoft Corporation. All rights reserved.
 */
import type { AppMetadata, ConnectionReference, Environment, ParameterHint } from '../types/AppMetadata.js';
import type { ConnectionInstance } from '../types/ConnectionTypes.js';
import type { UserConsent } from '../types/ConsentTypes.js';
/** Abstracts RP connection operations. */
export interface IConnectionService {
    /** Save user consents for an app to RP. */
    saveUserConsents(appName: string, consents: UserConsent[]): Promise<void>;
    /** Attempt SSO consent for a connection (silent auth). */
    getConnectionConsent(connection: ConnectionInstance, options?: {
        disableManualLogin?: boolean;
    }): Promise<void>;
    /** Check if SSO auth is valid for a connection. */
    isSsoAuthValid(connection: ConnectionInstance): boolean;
    /** Get a connection by ID, optionally bypassing cache. */
    getConnectionById(connectionId: string, bypassCache?: boolean): Promise<ConnectionInstance | null>;
    /** Test a connection via wrapper API. */
    testConnection(connection: ConnectionInstance): Promise<void>;
    /** Get a connection by name and API ID. */
    getConnection(connectionName: string, apiId: string): Promise<ConnectionInstance>;
    /** Create or update a composite connection (for flows). */
    createCompositeConnection(apiId: string, environment: Environment, dependencyTable: Record<string, string>, parameterHints: Record<string, ParameterHint>, connectionName?: string): Promise<string | ConnectionInstance>;
    /** Save a connection usage (bind a connection to an app reference). */
    saveConnectionUsage(apiShortName: string, connectionName: string, environmentName: string, reference: string, resourceId: string, appActions: string[]): Promise<void>;
    /** Run disambiguation rules to auto-map connections. */
    runDisambiguationRules(missingConnections: Record<string, ConnectionReference>, appMetadata: AppMetadata, appName?: string): Promise<Record<string, ConnectionReference>>;
}
//# sourceMappingURL=IConnectionService.d.ts.map