UNPKG

salesforce-alm

Version:

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

33 lines (32 loc) 996 B
import * as Config from '@oclif/config'; import { Optional } from '@salesforce/ts-types'; declare type HookOpts<T> = { Command: Config.Command.Class; argv: string[]; commandId: string; result: Optional<T>; }; export declare type OrgCreateResult = { accessToken: string; clientId: string; created: string; createdOrgInstance: string; devHubUsername: string; expirationDate: string; instanceUrl: string; loginUrl: string; orgId: string; username: string; }; declare type PostOrgCreateOpts = HookOpts<OrgCreateResult>; /** * Extends OCLIF's Hooks interface to add types for hooks that run on sfdx org commands */ export interface OrgHooks extends Config.Hooks { postorgcreate: PostOrgCreateOpts; } export declare type OrgHook<T> = (this: Config.Hook.Context, options: T extends keyof Config.Hooks ? OrgHooks[T] : T) => any; export declare namespace OrgHook { type PostOrgCreate = Config.Hook<OrgHooks['postorgcreate']>; } export {};