/*!
 * Copyright (C) Microsoft Corporation. All rights reserved.
 */
/**
 * RuntimeMetadataOperations provides functionality for retrieving metadata
 * about connections and APIs.
 * @private
 */
export class RuntimeMetadataOperations {
    _clientProvider;
    // Static identifiers for services and actions
    // Used to identify specific services and actions within the PowerApps environment
    constructor(_clientProvider) {
        this._clientProvider = _clientProvider;
    }
    async getConnections(context) {
        const client = await this._clientProvider.getMetadataClientAsync();
        const response = await client.getAppConnectionConfigsAsync(context);
        return {
            success: response.success,
            data: response.data ? [response.data] : [],
            error: response.error,
        };
    }
    async getConnectionApis(_connectionId, context) {
        const client = await this._clientProvider.getMetadataClientAsync();
        const response = await client.getAppDataSourceConfigsAsync(context);
        return {
            success: response.success,
            data: response.data ? [response.data] : [],
            error: response.error,
        };
    }
}
//# sourceMappingURL=runtimeMetadataOperations.js.map