/*!
 * Copyright (C) Microsoft Corporation. All rights reserved.
 */
import type { Connection } from '../services/types/ApiTypes.js';
import type { CreateConnectionContext } from '../Types/ActionTypes.js';
export type CreateConnectionResult = Connection;
/**
 * Creates and authenticates a new SSO connection for a first-party connector.
 *
 * Full 4-step flow:
 *  1. GET connector definition → validate SSO eligibility (no required user params)
 *  2. PUT new connection with $expand=ConsentLink → receives firstPartyLoginUri in response
 *  3. POST firstPartyLoginUri with OBO access token → authenticate the connection
 *  4. POST testConnection → verify the connection is working
 *
 * The OBO token is acquired for the apihub audience (consentServerResource),
 * which equals apiHubRuntimeAudience per PowerApps-Client region configs.
 *
 * If steps 3–4 fail, the newly-created connection is deleted before rethrowing,
 * so no orphaned connections are left in the environment.
 *
 * @param context - Shared action context (auth, region, logger, etc.).
 * @returns       The authenticated and tested {@link Connection}.
 */
export declare function createConnectionAsync(context: CreateConnectionContext): Promise<Connection>;
//# sourceMappingURL=CreateConnection.d.ts.map