salesforce-alm
Version:
This package contains tools, and APIs, for an improved salesforce.com developer experience.
50 lines (49 loc) • 2.31 kB
TypeScript
/// <reference types="node" />
import { EventEmitter } from 'events';
import { Org, Logger } from '@salesforce/core';
import { Duration } from '@salesforce/kit';
import { SandboxOrgApi, SandboxRequest, SandboxProcessObject } from './sandboxOrgApi';
export declare class SandboxOrg extends EventEmitter {
private prodOrg;
private wait;
private logger;
private userSuppliedClientId?;
api: SandboxOrgApi;
constructor(prodOrg: Org, wait: Duration, logger: Logger, userSuppliedClientId?: string);
static getInstance(prodOrg: Org, wait: Duration, logger: Logger, clientId?: string): SandboxOrg;
/**
*
* @param sandboxReq - the sandbox creation request object
* @param sandboxName
*/
cloneSandbox(sandboxReq: SandboxRequest, sandboxName: string): Promise<SandboxProcessObject>;
/**
*
* @param masterProdOrg - the production org that is authed... the sandbox is created from this org
* @param sandboxReq - the sandbox creation request object
* @param maxPollingRetries - calculated based on wait and polling interval
* @param logapi
*/
createSandbox(sandboxReq: SandboxRequest): Promise<SandboxProcessObject>;
authWithRetriesByName(sandboxProcessName: string): Promise<SandboxProcessObject>;
private authWithRetries;
protected getMaxPollingRetries(): number;
private getAuthInfoFields;
private writeAuthFile;
private validateSandboxCompleteAndGetAuthenticationInfo;
/**
*
* @param sandboxProcessObj - 0GR000xxx, latest non deleted sandbox process id we got from the sandbox creation
* @param retries : number - calculated based on wait and polling interval
* @param shouldPoll : boolean - used to determine if the initial call to the recursive function is intended to poll
*/
protected pollStatusAndAuth(sandboxProcessObj: SandboxProcessObject, retries: number, shouldPoll: boolean): Promise<SandboxProcessObject>;
/**
*
* @param masterProdOrg - the production org that is authed... the sandbox is created from this org
* @param sandboxReq - the sandbox creation request object
* @param maxPollingRetries - calculated based on wait and polling interval
* @param logapi
*/
deleteSandbox(sandboxOrgId: string): Promise<void>;
}