/*!
 * Copyright (C) Microsoft Corporation. All rights reserved.
 */
import { PowerPlatformApiDiscovery } from './PowerPlatformApiDiscovery.js';
/** Create a ServiceEndpoint for an environment-scoped Power Platform API URL. */
export function createPowerPlatformApiEnvironmentEndpoint(environmentName, cluster) {
    const discovery = new PowerPlatformApiDiscovery(cluster);
    return {
        baseUrl: `https://${discovery.getEnvironmentEndpoint(environmentName)}`,
        resource: discovery.getTokenAudience(),
    };
}
/** Create a Dataverse endpoint for a specific instance URL. */
export function createDataverseEndpoint(instanceUrl) {
    const normalized = instanceUrl.replace(/\/$/, '');
    return {
        baseUrl: `${normalized}/api/data/v9.2`,
        resource: normalized,
    };
}
//# sourceMappingURL=ServiceEndpoints.js.map