/// import { URL } from 'url'; export declare class SfdcUrl extends URL { /** * Salesforce URLs */ static readonly SANDBOX = "https://test.salesforce.com"; static readonly PRODUCTION = "https://login.salesforce.com"; private static readonly cache; private logger; constructor(input: string | URL, base?: string | URL); /** * Returns the appropiate jwt audience url for this url * Use SFDX_AUDIENCE_URL env var to override the audience url * * @param createdOrgInstance The Salesforce instance the org was created on. e.g. `cs42` * @return {Promise} The audience url */ getJwtAudienceUrl(createdOrgInstance?: string): Promise; /** * Tests whether this url contains a Salesforce owned domain * * @return {boolean} true if this is a salesforce domain */ isSalesforceDomain(): boolean; /** * Tests whether this url is an internal Salesforce domain * * @returns {boolean} true if this is a internal domain */ isInternalUrl(): boolean; /** * Tests whether this url runs on a local machine * * @returns {boolean} true if this is a local machine */ isLocalUrl(): boolean; toLightningDomain(): string; /** * Tests whether this url has the lightning domain extension * This method that performs the dns lookup of the host. If the lookup fails the internal polling (1 second), client will try again until timeout * If SFDX_DOMAIN_RETRY environment variable is set (number) it overrides the default timeout duration (240 seconds) * * @returns {Promise} The resolved ip address or never * @throws {@link SfdxError} If can't resolve DNS. */ checkLightningDomain(): Promise; /** * Method that performs the dns lookup of the host. If the lookup fails the internal polling (1 second), client will try again untill timeout * If SFDX_DOMAIN_RETRY environment variable is set (number) it overrides the default timeout duration (240 seconds) * * @returns the resolved ip address. * @throws {@link SfdxError} If can't resolve DNS. */ lookup(): Promise; /** * Tests whether this url is a sandbox url * * @param createdOrgInstance The Salesforce instance the org was created on. e.g. `cs42` * @returns {boolean} */ isSandboxUrl(createdOrgInstance?: string): boolean; /** * Tests whether this url is a sandbox url * otherwise tries to resolve dns cnames and then look if any is sandbox url * * @param createdOrgInstance The Salesforce instance the org was created on. e.g. `cs42` * @returns {Promise} true if this domain resolves to sanbox url */ private resolvesToSandbox; }