@altostra/core
Version:
Core library for shared types and logic
17 lines (16 loc) • 1.03 kB
TypeScript
import type { HttpUrl } from "../../../../../common/CustomTypes/HttpUrl";
import type { ApiEndpointType, ApiProxyEndpointType, ApiType } from "../../../../Resources/WebApi/Api";
import type { BlueprintHelper } from "../../../BlueprintHelper";
import type { ResourceHelper } from "../../../ResourceHelper";
import type { WebApiEndpointUtilsBase } from "../common";
export declare function getApiEndpointUtils(blueprint: BlueprintHelper, apiEndpoint: ResourceHelper<ApiEndpointType>): ApiEndpointUtils;
export interface ApiEndpointUtils extends WebApiEndpointUtilsBase<ApiType> {
/**
* Convert the current endpoint to a proxy endpoint.
*
* This renders the current `ResourceHelper` unusable, and returns a new `ResourceHelper`
* for the proxy-endpoint
*/
convertToProxyEndpoint(targetUrl: HttpUrl, connectionsHandling: ProxyConversionConnectionsHandling): ResourceHelper<ApiProxyEndpointType>;
}
export declare type ProxyConversionConnectionsHandling = 'disconnect-connections' | 'throw-if-connected';