@omnia/fx
Version:
Provide Omnia Fx typings and tooling for clientside Omnia development.
22 lines (21 loc) • 1.02 kB
TypeScript
import { GuidValue, ServiceLocatorUrlType } from "../../models";
export interface IServiceLocationProvider {
/**
* Give the possibility to override a url for a service
* Manipulate the service url or return default (resolvedLocation)
* */
getUrl: (serviceId: GuidValue, resolvedLocation: string, useHttpsSchema: boolean, type: ServiceLocatorUrlType) => string;
}
export declare class ServiceLocator {
private static externalServiceProvider;
/**
* Set a new service provider
* Null resets to default
*/
static overrideServiceProvider: (provider: IServiceLocationProvider) => void;
static getUrl: (serviceId: GuidValue, useHttpsSchema?: boolean, type?: ServiceLocatorUrlType, allowExternalServiceProvider?: boolean) => string;
static hasValidServiceUrl: (url: string) => boolean;
static replaceTokenWithDns: (content: string) => string;
static replaceDnsWithToken: (content: string) => string;
static generateToken: (serviceId: GuidValue) => string;
}