UNPKG

salesforce-alm

Version:

This package contains tools, and APIs, for an improved salesforce.com developer experience.

94 lines (93 loc) 2.49 kB
export declare const ORG_SNAPSHOT_FIELDS: string[]; export declare const ORG_SNAPSHOT_COLUMNS: ({ key: string; label: string; format?: undefined; } | { key: string; label: string; format: (value: any) => string; })[]; export declare const PERM_QUERY = "SELECT Id FROM OrgSnapshot LIMIT 1"; /** * Org Snapshot Request. */ export interface OrgSnapshotRequest { SourceOrg: string; SnapshotName: string; Description: string; Content?: string; } /** * Org Snapshot Record. */ export interface OrgSnapshot extends OrgSnapshotRequest { Id: string; Status: string; LastClonedDate?: string; LastClonedById?: string; CreatedDate: string; LastModifiedDate: string; ExpirationDate?: string; Error?: string; } /** * Org Snapshot API */ export interface OrgSnapshotApi { create(request: OrgSnapshotRequest): Promise<OrgSnapshot>; delete(orgSnapshotIdOrName: string): Promise<OrgSnapshot>; get(orgSnapshotIdOrName: string): Promise<OrgSnapshot>; list(): Promise<OrgSnapshot[]>; mapDataToLabel(result: OrgSnapshot): ColumnData[]; } export interface ColumnData { name: string; value: string; } /** * Org Snapshot API Implementation. */ export declare class OrgSnapshotApiImpl implements OrgSnapshotApi { static create(org: any): Promise<OrgSnapshotApi>; private readonly devHubOrg; private force; private constructor(); /** * Create OrgSnapshot record and org export. * * @param {OrgSnapshotRequest} request * @returns {Promise<OrgSnapshot>} */ create(request: OrgSnapshotRequest): Promise<OrgSnapshot>; /** * Delete OrgSnapshot record and underlying export. * * @param {string} orgSnapshotIdOrName * @returns {Promise<OrgSnapshot>} */ delete(orgSnapshotIdOrName: string): Promise<OrgSnapshot>; /** * Get OrgSnapshot by given ID or name. * * @param {string} orgSnapshotIdOrName * @returns {Promise<OrgSnapshot>} */ get(orgSnapshotIdOrName: string): Promise<OrgSnapshot>; /** * Get OrgSnapshot records. * * @returns {Promise<OrgSnapshot[]>} */ list(): Promise<OrgSnapshot[]>; /** * Returns name-value pairs of column to data * * @param result * @returns {ColumnData[]} */ mapDataToLabel(result: OrgSnapshot): ColumnData[]; private getOrgSnapshotId; private checkOrgSnapshotPerm; private checkForNotSupported; }