import { URL } from 'node:url'; import { AsyncOptionalCreatable, Duration } from '@salesforce/kit'; /** * A class used to resolve MyDomains. After a ScratchOrg is created its host name my not be propagated to the * Salesforce DNS service. This service is not exclusive to Salesforce My Domain URL and could be used for any hostname. * * ``` * (async () => { * const options: MyDomainResolver.Options = { * url: new URL('http://mydomain.salesforce.com'), * timeout: Duration.minutes(5), * frequency: Duration.seconds(10) * }; * const resolver: MyDomainResolver = await MyDomainResolver.create(options); * const ipAddress: AnyJson = await resolver.resolve(); * console.log(`Successfully resolved host: ${options.url} to address: ${ipAddress}`); * })(); * ``` */ export declare class MyDomainResolver extends AsyncOptionalCreatable { static DEFAULT_DOMAIN: URL; private logger; private options; /** * Constructor * **Do not directly construct instances of this class -- use {@link MyDomainResolver.create} instead.** * * @param options The options for the class instance */ constructor(options?: MyDomainResolver.Options); getTimeout(): Duration; getFrequency(): Duration; /** * Method that performs the dns lookup of the host. If the lookup fails the internal polling client will try again * given the optional interval. Returns the resolved ip address. * * If SFDX_DISABLE_DNS_CHECK environment variable is set to true, it will immediately return the host without * executing the dns loookup. */ resolve(): Promise; getCnames(): Promise; /** * Used to initialize asynchronous components. */ protected init(): Promise; } export declare namespace MyDomainResolver { /** * Options for the MyDomain DNS resolver. */ type Options = { /** * The host to resolve. */ url: URL; /** * The retry interval. */ timeout?: Duration; /** * The retry timeout. */ frequency?: Duration; }; }