UNPKG

1.83 kBTypeScriptView Raw
1import { Duration } from '@salesforce/kit';
2import { Org } from './org';
3import { AuthInfo, AuthFields } from './authInfo';
4import { ScratchOrgInfo } from './scratchOrgInfoApi';
5export declare const DEFAULT_STREAM_TIMEOUT_MINUTES = 6;
6export interface ScratchOrgCreateResult {
7 username?: string;
8 scratchOrgInfo?: ScratchOrgInfo;
9 authInfo?: AuthInfo;
10 authFields?: AuthFields;
11 warnings: string[];
12}
13/**
14 * interface ScratchOrgCreateOptions
15 *
16 * @param hubOrg the environment hub org
17 * @param connectedAppConsumerKey The connected app consumer key.
18 * @param durationDays duration of the scratch org (in days) (default:1, min:1, max:30)
19 * @param nonamespace create the scratch org with no namespace
20 * @param noancestors do not include second-generation package ancestors in the scratch org
21 * @param wait the streaming client socket timeout (in minutes) must be an instance of the Duration utility class (default:6, min:2)
22 * @param retry number of scratch org auth retries after scratch org is successfully signed up (default:0, min:0, max:10)
23 * @param apiversion target server instance API version
24 * @param definitionjson org definition in JSON format
25 * @param definitionfile path to an org definition file
26 * @param orgConfig overrides definitionjson
27 * @param clientSecret OAuth client secret of personal connected app
28 */
29export interface ScratchOrgCreateOptions {
30 hubOrg: Org;
31 connectedAppConsumerKey?: string;
32 durationDays?: number;
33 nonamespace?: boolean;
34 noancestors?: boolean;
35 wait?: Duration;
36 retry?: number;
37 apiversion?: string;
38 definitionjson?: string;
39 definitionfile?: string;
40 orgConfig?: Record<string, unknown>;
41 clientSecret?: string;
42}
43export declare const scratchOrgCreate: (options: ScratchOrgCreateOptions) => Promise<ScratchOrgCreateResult>;