import { Duration } from '@salesforce/kit';
import { SaveResult } from '@jsforce/jsforce-node';
import { AuthInfo } from './authInfo';
import { Org } from './org';
import SettingsGenerator from './scratchOrgSettingsGenerator';
import { ScratchOrgInfo } from './scratchOrgTypes';
export interface JsForceError extends Error {
    errorCode: string;
    fields: string[];
}
/**
 *
 * @param hubOrg Org
 * @param id Record ID for the ScratchOrgInfoObject
 * @returns Promise<ScratchOrgInfo>
 */
export declare const queryScratchOrgInfo: (hubOrg: Org, id: string) => Promise<ScratchOrgInfo>;
/**
 * after we successfully signup an org we need to trade the auth token for access and refresh token.
 *
 * scratchOrgInfoComplete - The completed ScratchOrgInfo which should contain an access token.
 * hubOrg - the environment hub org
 * clientSecret - The OAuth client secret. May be null for JWT OAuth flow.
 * signupTargetLoginUrl - Login url override
 * retry - auth retry attempts
 *
 * @returns {Promise<AuthInfo>}
 */
export declare const authorizeScratchOrg: (options: {
    scratchOrgInfoComplete: ScratchOrgInfo;
    hubOrg: Org;
    clientSecret?: string;
    signupTargetLoginUrl?: string;
    retry?: number;
}) => Promise<AuthInfo>;
/**
 * This extracts orgPrefs/settings from the user input and performs a basic scratchOrgInfo request.
 *
 * @param hubOrg - the environment hub org
 * @param scratchOrgRequest - An object containing the fields of the ScratchOrgInfo
 * @param settings - An object containing org settings
 * @returns {Promise<SaveResult>}
 */
export declare const requestScratchOrgCreation: (hubOrg: Org, scratchOrgRequest: ScratchOrgInfo, settings: SettingsGenerator) => Promise<SaveResult>;
/**
 * This retrieves the ScratchOrgInfo, polling until the status is Active or Error
 *
 * @param hubOrg
 * @param scratchOrgInfoId - the id of the scratchOrgInfo that we are retrieving
 * @param timeout - A Duration object
 * @returns {Promise<ScratchOrgInfo>}
 */
export declare const pollForScratchOrgInfo: (hubOrg: Org, scratchOrgInfoId: string, timeout?: Duration) => Promise<ScratchOrgInfo>;
/**
 * Deploy settings to the newly created scratch org
 *
 * @param scratchOrg an instance of the Org class
 * @param orgSettings an instance of the SettingsGenerator class
 * @param apiVersion the api version (used when created the package.xml)
 */
export declare const deploySettings: (scratchOrg: Org, orgSettings: SettingsGenerator, apiVersion: string, timeout?: Duration) => Promise<void>;
/**
 * Makes sure the scratch org's instanceUrl is resolvable (that is, DNS is ready)
 *
 * @param scratchOrgAuthInfo an AuthInfo class from the scratch org
 * @returns AuthInfo
 */
export declare const resolveUrl: (scratchOrgAuthInfo: AuthInfo) => Promise<AuthInfo>;
export declare const updateRevisionCounterToZero: (scratchOrg: Org) => Promise<void>;
