@salesforce/core

  • Version 8.32.3
  • Published
  • 1.33 MB
  • 19 dependencies
  • BSD-3-Clause license

Install

npm i @salesforce/core
yarn add @salesforce/core
pnpm add @salesforce/core

Overview

Core libraries to interact with SFDX projects, orgs, and APIs.

Index

Variables

Functions

Classes

Enums

Type Aliases

Namespaces

Variables

variable accessTokenRegex

const accessTokenRegex: RegExp;

    variable envVars

    const envVars: EnvVars;

      variable fs

      let fs: VirtualFs;

        variable jwtTokenRegex

        const jwtTokenRegex: RegExp;

          variable ORG_CONFIG_ALLOWED_PROPERTIES

          const ORG_CONFIG_ALLOWED_PROPERTIES: (
          | {
          key: OrgConfigProperties;
          description: string;
          input?: undefined;
          hidden?: undefined;
          encrypted?: undefined;
          }
          | {
          key: OrgConfigProperties;
          description: string;
          input: { validator: (value: AnyJson) => boolean; failedMessage: string };
          hidden?: undefined;
          encrypted?: undefined;
          }
          | {
          key: OrgConfigProperties;
          description: string;
          hidden: boolean;
          input: { validator: (value: AnyJson) => boolean; failedMessage: string };
          encrypted?: undefined;
          }
          | {
          key: OrgConfigProperties;
          description: string;
          encrypted: boolean;
          input: { validator: (value: AnyJson) => boolean; failedMessage: string };
          hidden?: undefined;
          }
          )[];

            variable ProjectJsonSchema

            const ProjectJsonSchema: z.ZodObject<
            {
            name: z.ZodOptional<z.ZodString>;
            packageDirectories: z.ZodArray<
            z.ZodUnion<
            readonly [
            z.ZodObject<
            {
            default: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
            path: z.ZodString;
            },
            z.core.$strict
            >,
            z.ZodObject<
            {
            default: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
            path: z.ZodString;
            ancestorId: z.ZodOptional<z.ZodString>;
            ancestorVersion: z.ZodOptional<z.ZodString>;
            apexTestAccess: z.ZodOptional<
            z.ZodObject<
            {
            permissionSets: z.ZodUnion<
            readonly [
            z.ZodArray<z.ZodString>,
            z.ZodString
            ]
            >;
            permissionSetLicenses: z.ZodUnion<
            readonly [
            z.ZodArray<z.ZodString>,
            z.ZodString
            ]
            >;
            },
            z.core.$strip
            >
            >;
            definitionFile: z.ZodOptional<z.ZodString>;
            dependencies: z.ZodOptional<
            z.ZodArray<
            z.ZodObject<
            {
            package: z.ZodString;
            versionNumber: z.ZodOptional<z.ZodString>;
            branch: z.ZodOptional<z.ZodString>;
            },
            z.core.$catchall<z.ZodUnknown>
            >
            >
            >;
            includeProfileUserLicenses: z.ZodOptional<
            z.ZodDefault<z.ZodBoolean>
            >;
            package: z.ZodString;
            packageMetadataAccess: z.ZodOptional<
            z.ZodObject<
            {
            permissionSets: z.ZodUnion<
            readonly [
            z.ZodString,
            z.ZodArray<z.ZodString>
            ]
            >;
            permissionSetLicenses: z.ZodUnion<
            readonly [
            z.ZodString,
            z.ZodArray<z.ZodString>
            ]
            >;
            },
            z.core.$strip
            >
            >;
            postInstallScript: z.ZodOptional<z.ZodString>;
            postInstallUrl: z.ZodOptional<z.ZodString>;
            releaseNotesUrl: z.ZodOptional<z.ZodString>;
            scopeProfiles: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
            uninstallScript: z.ZodOptional<z.ZodString>;
            calculateTransitiveDependencies: z.ZodOptional<
            z.ZodDefault<z.ZodBoolean>
            >;
            versionDescription: z.ZodOptional<z.ZodString>;
            versionName: z.ZodOptional<z.ZodString>;
            versionNumber: z.ZodString;
            unpackagedMetadata: z.ZodOptional<
            z.ZodObject<{ path: z.ZodString }, z.core.$strip>
            >;
            seedMetadata: z.ZodOptional<
            z.ZodObject<{ path: z.ZodString }, z.core.$strip>
            >;
            functions: z.ZodOptional<z.ZodArray<z.ZodString>>;
            },
            z.core.$strict
            >
            ]
            >
            >;
            namespace: z.ZodOptional<z.ZodString>;
            sourceApiVersion: z.ZodOptional<z.ZodDefault<z.ZodString>>;
            defaultLwcLanguage: z.ZodOptional<
            z.ZodEnum<{ javascript: 'javascript'; typescript: 'typescript' }>
            >;
            sfdcLoginUrl: z.ZodOptional<z.ZodString>;
            signupTargetLoginUrl: z.ZodOptional<z.ZodString>;
            oauthLocalPort: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
            plugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            packageAliases: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            packageBundles: z.ZodOptional<
            z.ZodArray<
            z.ZodObject<
            {
            name: z.ZodString;
            versionName: z.ZodString;
            versionNumber: z.ZodString;
            versionDescription: z.ZodOptional<z.ZodString>;
            },
            z.core.$strip
            >
            >
            >;
            packageBundleAliases: z.ZodOptional<
            z.ZodRecord<
            z.ZodString,
            z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>
            >
            >;
            registryPresets: z.ZodOptional<z.ZodArray<z.ZodString>>;
            sourceBehaviorOptions: z.ZodOptional<z.ZodArray<z.ZodString>>;
            registryCustomizations: z.ZodOptional<
            z.ZodObject<
            {
            types: z.ZodType<
            {
            [typeId: string]: {
            id: string;
            name: string;
            directoryName: string;
            suffix?: string;
            strictDirectoryName?: boolean;
            ignoreParsedFullName?: boolean;
            folderContentType?: string;
            folderType?: string;
            xmlElementName?: string;
            uniqueIdElement?: string;
            isAddressable?: boolean;
            unaddressableWithoutParent?: boolean;
            supportsWildcardAndName?: boolean;
            supportsPartialDelete?: boolean;
            aliasFor?: string;
            children?: {
            types: { [typeId: string]: any };
            suffixes: Record<string, string>;
            directories?: Record<string, string>;
            };
            strategies?: {
            adapter:
            | 'mixedContent'
            | 'matchingContentFile'
            | 'decomposed'
            | 'bundle'
            | 'default';
            transformer?:
            | 'decomposed'
            | 'staticResource'
            | 'standard';
            decomposition?: 'topLevel' | 'folderPerType';
            };
            };
            },
            unknown,
            z.core.$ZodTypeInternals<
            {
            [typeId: string]: {
            id: string;
            name: string;
            directoryName: string;
            suffix?: string;
            strictDirectoryName?: boolean;
            ignoreParsedFullName?: boolean;
            folderContentType?: string;
            folderType?: string;
            xmlElementName?: string;
            uniqueIdElement?: string;
            isAddressable?: boolean;
            unaddressableWithoutParent?: boolean;
            supportsWildcardAndName?: boolean;
            supportsPartialDelete?: boolean;
            aliasFor?: string;
            children?: {
            types: { [typeId: string]: any };
            suffixes: Record<string, string>;
            directories?: Record<string, string>;
            };
            strategies?: {
            adapter:
            | 'mixedContent'
            | 'matchingContentFile'
            | 'decomposed'
            | 'bundle'
            | 'default';
            transformer?:
            | 'decomposed'
            | 'staticResource'
            | 'standard';
            decomposition?: 'topLevel' | 'folderPerType';
            };
            };
            },
            unknown
            >
            >;
            suffixes: z.ZodRecord<z.ZodString, z.ZodString>;
            strictDirectoryNames: z.ZodRecord<z.ZodString, z.ZodString>;
            childTypes: z.ZodRecord<z.ZodString, z.ZodString>;
            },
            z.core.$strip
            >
            >;
            replacements: z.ZodOptional<
            z.ZodArray<
            z.ZodUnion<
            readonly [
            z.ZodObject<
            {
            replaceWhenEnv: z.ZodOptional<
            z.ZodArray<
            z.ZodObject<
            { env: z.ZodString; value: z.ZodString },
            z.core.$strict
            >
            >
            >;
            filename: z.ZodString;
            stringToReplace: z.ZodString;
            replaceWithFile: z.ZodString;
            },
            z.core.$strict
            >,
            z.ZodObject<
            {
            replaceWhenEnv: z.ZodOptional<
            z.ZodArray<
            z.ZodObject<
            { env: z.ZodString; value: z.ZodString },
            z.core.$strict
            >
            >
            >;
            filename: z.ZodString;
            stringToReplace: z.ZodString;
            replaceWithEnv: z.ZodString;
            allowUnsetEnvVariable: z.ZodOptional<z.ZodBoolean>;
            },
            z.core.$strict
            >,
            z.ZodObject<
            {
            replaceWhenEnv: z.ZodOptional<
            z.ZodArray<
            z.ZodObject<
            { env: z.ZodString; value: z.ZodString },
            z.core.$strict
            >
            >
            >;
            filename: z.ZodString;
            regexToReplace: z.ZodString;
            replaceWithFile: z.ZodString;
            },
            z.core.$strict
            >,
            z.ZodObject<
            {
            replaceWhenEnv: z.ZodOptional<
            z.ZodArray<
            z.ZodObject<
            { env: z.ZodString; value: z.ZodString },
            z.core.$strict
            >
            >
            >;
            filename: z.ZodString;
            regexToReplace: z.ZodString;
            replaceWithEnv: z.ZodString;
            allowUnsetEnvVariable: z.ZodOptional<z.ZodBoolean>;
            },
            z.core.$strict
            >,
            z.ZodObject<
            {
            replaceWhenEnv: z.ZodOptional<
            z.ZodArray<
            z.ZodObject<
            { env: z.ZodString; value: z.ZodString },
            z.core.$strict
            >
            >
            >;
            glob: z.ZodString;
            stringToReplace: z.ZodString;
            replaceWithFile: z.ZodString;
            },
            z.core.$strict
            >,
            z.ZodObject<
            {
            replaceWhenEnv: z.ZodOptional<
            z.ZodArray<
            z.ZodObject<
            { env: z.ZodString; value: z.ZodString },
            z.core.$strict
            >
            >
            >;
            glob: z.ZodString;
            stringToReplace: z.ZodString;
            replaceWithEnv: z.ZodString;
            allowUnsetEnvVariable: z.ZodOptional<z.ZodBoolean>;
            },
            z.core.$strict
            >,
            z.ZodObject<
            {
            replaceWhenEnv: z.ZodOptional<
            z.ZodArray<
            z.ZodObject<
            { env: z.ZodString; value: z.ZodString },
            z.core.$strict
            >
            >
            >;
            glob: z.ZodString;
            regexToReplace: z.ZodString;
            replaceWithFile: z.ZodString;
            },
            z.core.$strict
            >,
            z.ZodObject<
            {
            replaceWhenEnv: z.ZodOptional<
            z.ZodArray<
            z.ZodObject<
            { env: z.ZodString; value: z.ZodString },
            z.core.$strict
            >
            >
            >;
            glob: z.ZodString;
            regexToReplace: z.ZodString;
            replaceWithEnv: z.ZodString;
            allowUnsetEnvVariable: z.ZodOptional<z.ZodBoolean>;
            },
            z.core.$strict
            >
            ]
            >
            >
            >;
            pushPackageDirectoriesSequentially: z.ZodOptional<z.ZodBoolean>;
            },
            z.core.$strict
            >;
            • The properties and shape of the SFDX project

            variable REQUIRED_FIELDS

            const REQUIRED_FIELDS: {
            id: string;
            username: string;
            lastName: string;
            alias: string;
            timeZoneSidKey: string;
            localeSidKey: string;
            emailEncodingKey: string;
            profileId: string;
            languageLocaleKey: string;
            email: string;
            };
            • A Map of Required Salesforce User fields.

            variable ScratchOrgDefSchema

            const ScratchOrgDefSchema: z.ZodObject<
            {
            orgName: z.ZodOptional<z.ZodString>;
            edition: z.ZodOptional<z.ZodString>;
            country: z.ZodOptional<z.ZodString>;
            username: z.ZodOptional<z.ZodString>;
            adminEmail: z.ZodOptional<z.ZodString>;
            description: z.ZodOptional<z.ZodString>;
            hasSampleData: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
            language: z.ZodOptional<z.ZodString>;
            features: z.ZodOptional<
            z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<z.ZodString[]>, z.ZodString]>>
            >;
            template: z.ZodOptional<z.ZodString>;
            settings: z.ZodOptional<
            z.ZodObject<
            {
            accountingSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            accountInsightsSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            accountIntelligenceSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            accountPlanSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            accountSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            actionsSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            activitiesSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            addressSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            agentforceForDevelopersSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            agentPlatformSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            aIReplyRecommendationsSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            analyticsSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            apexSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            appAnalyticsSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            appExperienceSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            associationEngineSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            automatedContactsSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            botSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            branchManagementSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            businessHoursSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            campaignSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            caseSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            chatterAnswersSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            chatterEmailsMDSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            chatterSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            codeBuilderSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            collectionsDashboardSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            communitiesSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            companySettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            connectedAppSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            contentSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            contractSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            conversationalIntelligenceSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            conversationChannelDefinition: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            currencySettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            customAddressFieldSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            dataDotComSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            dataImportManagementSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            deploymentSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            devHubSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            documentGenerationSetting: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            dynamicFormsSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            eACSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            einsteinAgentSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            einsteinAISettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            einsteinGptSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            emailAdministrationSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            emailAuthorizationSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            emailIntegrationSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            emailTemplateSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            employeeUserSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            encryptionKeySettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            enhancedNotesSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            entitlementSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            eventSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            experienceBundleSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            externalClientAppSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            externalServicesSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            fieldServiceSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            filesConnectSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            fileUploadAndDownloadSecuritySettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            flowSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            forecastingObjectListSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            forecastingSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            highVelocitySalesSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            ideasSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            identityProviderSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            iframeWhiteListUrlSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            incidentMgmtSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            industriesEinsteinFeatureSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            industriesLoyaltySettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            industriesSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            interestTaggingSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            inventorySettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            invLatePymntRiskCalcSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            invocableActionSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            ioTSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            knowledgeSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            languageSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            leadConfigSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            leadConvertSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            lightningExperienceSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            liveAgentSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            liveMessageSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            macroSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            mailMergeSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            mapAndLocationSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            meetingsSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            mfgServiceConsoleSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            mobileSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            myDomainSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            nameSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            notificationsSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            oauthOidcSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            objectHierarchyRelationship: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            objectLinkingSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            omniChannelSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            opportunityInsightsSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            opportunityScoreSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            opportunitySettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            orderManagementSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            orderSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            orgPreferenceSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            orgSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            pardotEinsteinSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            pardotSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            partyDataModelSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            pathAssistantSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            paymentsSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            picklistSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            platformEncryptionSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            platformEventSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            predictionBuilderSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            privacySettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            processFlowMigration: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            productSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            quoteSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            realTimeEventSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            recordPageSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            retailExecutionSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            salesAgreementSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            sandboxSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            schemaSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            searchSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            securitySettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            serviceCloudVoiceSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            serviceSetupAssistantSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            sharingSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            siteSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            socialCustomerServiceSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            socialProfileSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            sourceTrackingSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            subscriptionManagementSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            surveySettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            territory2Settings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            trailheadSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            trialOrgSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            userEngagementSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            userInterfaceSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            userManagementSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            voiceSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            warrantyLifeCycleMgmtSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            workDotComSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            workforceEngagementSettings: z.ZodOptional<
            z.ZodRecord<z.ZodString, z.ZodUnknown>
            >;
            },
            z.core.$catchall<z.ZodUnknown>
            >
            >;
            release: z.ZodOptional<
            z.ZodEnum<{ preview: 'preview'; previous: 'previous' }>
            >;
            },
            z.core.$catchall<z.ZodUnknown>
            >;
            • Scratch Org Definition Configuration The scratch org definition file contains the configuration values that determine the shape of the scratch org.

            variable scratchOrgLifecycleEventName

            const scratchOrgLifecycleEventName: string;

              variable scratchOrgLifecycleStages

              const scratchOrgLifecycleStages: readonly [
              'prepare request',
              'send request',
              'wait for org',
              'available',
              'authenticate',
              'deploy settings',
              'done'
              ];

                variable SF_ALLOWED_PROPERTIES

                const SF_ALLOWED_PROPERTIES: {
                key: SfConfigProperties;
                description: string;
                input: { validator: (value: AnyJson) => boolean; failedMessage: string };
                }[];

                  variable SFDX_ALLOWED_PROPERTIES

                  const SFDX_ALLOWED_PROPERTIES: (
                  | {
                  key: SfdxPropertyKeys;
                  description: string;
                  newKey: OrgConfigProperties;
                  deprecated: boolean;
                  input: { validator: (value: AnyJson) => boolean; failedMessage: string };
                  encrypted?: undefined;
                  hidden?: undefined;
                  }
                  | {
                  key: SfdxPropertyKeys;
                  newKey: OrgConfigProperties;
                  deprecated: boolean;
                  description: string;
                  input?: undefined;
                  encrypted?: undefined;
                  hidden?: undefined;
                  }
                  | {
                  key: SfdxPropertyKeys;
                  newKey: OrgConfigProperties;
                  deprecated: boolean;
                  description: string;
                  encrypted: boolean;
                  input: { validator: (value: AnyJson) => boolean; failedMessage: string };
                  hidden?: undefined;
                  }
                  | {
                  key: SfdxPropertyKeys;
                  newKey: SfConfigProperties;
                  deprecated: boolean;
                  description: string;
                  input: { validator: (value: AnyJson) => boolean; failedMessage: string };
                  encrypted?: undefined;
                  hidden?: undefined;
                  }
                  | {
                  key: SfdxPropertyKeys;
                  description: string;
                  hidden: boolean;
                  newKey: string;
                  deprecated: boolean;
                  input: { validator: (value: AnyJson) => boolean; failedMessage: string };
                  encrypted?: undefined;
                  }
                  )[];

                    variable SFDX_HTTP_HEADERS

                    const SFDX_HTTP_HEADERS: {
                    'user-agent'?: string | undefined;
                    'content-type': string;
                    };

                      variable sfdxAuthUrlRegex

                      const sfdxAuthUrlRegex: RegExp;

                        variable SUPPORTED_ENV_VARS

                        const SUPPORTED_ENV_VARS: EnvType;

                          Functions

                          function generateApiName

                          generateApiName: (name: string) => string;
                          • Generate an API name from a string. Matches what the UI does.

                            Parameter name

                            name to be converted into a valid api name

                            Returns

                            a valid api name

                          function getJwtAudienceUrl

                          getJwtAudienceUrl: (
                          options: OAuth2Config & { createdOrgInstance?: string }
                          ) => Promise<string>;

                            function isNamedPackagingDirectory

                            isNamedPackagingDirectory: (packageDir: NamedPackageDir) => packageDir is any;
                            • differentiate between the Base PackageDir (path, maybe default) and the Packaging version (package and maybe a LOT of other fields) by whether is has the package property

                            function isPackagingDirectory

                            isPackagingDirectory: (
                            packageDir: z.infer<
                            z.ZodUnion<
                            readonly [
                            z.ZodObject<
                            {
                            default: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
                            path: z.ZodString;
                            },
                            z.core.$strict
                            >,
                            z.ZodObject<
                            {
                            default: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
                            path: z.ZodString;
                            ancestorId: z.ZodOptional<z.ZodString>;
                            ancestorVersion: z.ZodOptional<z.ZodString>;
                            apexTestAccess: z.ZodOptional<
                            z.ZodObject<
                            {
                            permissionSets: z.ZodUnion<
                            readonly [
                            z.ZodArray<z.ZodString>,
                            z.ZodString
                            ]
                            >;
                            permissionSetLicenses: z.ZodUnion<
                            readonly [
                            z.ZodArray<z.ZodString>,
                            z.ZodString
                            ]
                            >;
                            },
                            z.core.$strip
                            >
                            >;
                            definitionFile: z.ZodOptional<z.ZodString>;
                            dependencies: z.ZodOptional<
                            z.ZodArray<
                            z.ZodObject<
                            {
                            package: z.ZodString;
                            versionNumber: z.ZodOptional<z.ZodString>;
                            branch: z.ZodOptional<z.ZodString>;
                            },
                            z.core.$catchall<z.ZodUnknown>
                            >
                            >
                            >;
                            includeProfileUserLicenses: z.ZodOptional<
                            z.ZodDefault<z.ZodBoolean>
                            >;
                            package: z.ZodString;
                            packageMetadataAccess: z.ZodOptional<
                            z.ZodObject<
                            {
                            permissionSets: z.ZodUnion<
                            readonly [
                            z.ZodString,
                            z.ZodArray<z.ZodString>
                            ]
                            >;
                            permissionSetLicenses: z.ZodUnion<
                            readonly [
                            z.ZodString,
                            z.ZodArray<z.ZodString>
                            ]
                            >;
                            },
                            z.core.$strip
                            >
                            >;
                            postInstallScript: z.ZodOptional<z.ZodString>;
                            postInstallUrl: z.ZodOptional<z.ZodString>;
                            releaseNotesUrl: z.ZodOptional<z.ZodString>;
                            scopeProfiles: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
                            uninstallScript: z.ZodOptional<z.ZodString>;
                            calculateTransitiveDependencies: z.ZodOptional<
                            z.ZodDefault<z.ZodBoolean>
                            >;
                            versionDescription: z.ZodOptional<z.ZodString>;
                            versionName: z.ZodOptional<z.ZodString>;
                            versionNumber: z.ZodString;
                            unpackagedMetadata: z.ZodOptional<
                            z.ZodObject<{ path: z.ZodString }, z.core.$strip>
                            >;
                            seedMetadata: z.ZodOptional<
                            z.ZodObject<{ path: z.ZodString }, z.core.$strip>
                            >;
                            functions: z.ZodOptional<z.ZodArray<z.ZodString>>;
                            },
                            z.core.$strict
                            >
                            ]
                            >
                            >
                            ) => packageDir is z.infer<
                            z.ZodObject<
                            {
                            default: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
                            path: z.ZodString;
                            ancestorId: z.ZodOptional<z.ZodString>;
                            ancestorVersion: z.ZodOptional<z.ZodString>;
                            apexTestAccess: z.ZodOptional<
                            z.ZodObject<
                            {
                            permissionSets: z.ZodUnion<
                            readonly [z.ZodArray<z.ZodString>, z.ZodString]
                            >;
                            permissionSetLicenses: z.ZodUnion<
                            readonly [z.ZodArray<z.ZodString>, z.ZodString]
                            >;
                            },
                            z.core.$strip
                            >
                            >;
                            definitionFile: z.ZodOptional<z.ZodString>;
                            dependencies: z.ZodOptional<
                            z.ZodArray<
                            z.ZodObject<
                            {
                            package: z.ZodString;
                            versionNumber: z.ZodOptional<z.ZodString>;
                            branch: z.ZodOptional<z.ZodString>;
                            },
                            z.core.$catchall<z.ZodUnknown>
                            >
                            >
                            >;
                            includeProfileUserLicenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
                            package: z.ZodString;
                            packageMetadataAccess: z.ZodOptional<
                            z.ZodObject<
                            {
                            permissionSets: z.ZodUnion<
                            readonly [z.ZodString, z.ZodArray<z.ZodString>]
                            >;
                            permissionSetLicenses: z.ZodUnion<
                            readonly [z.ZodString, z.ZodArray<z.ZodString>]
                            >;
                            },
                            z.core.$strip
                            >
                            >;
                            postInstallScript: z.ZodOptional<z.ZodString>;
                            postInstallUrl: z.ZodOptional<z.ZodString>;
                            releaseNotesUrl: z.ZodOptional<z.ZodString>;
                            scopeProfiles: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
                            uninstallScript: z.ZodOptional<z.ZodString>;
                            calculateTransitiveDependencies: z.ZodOptional<
                            z.ZodDefault<z.ZodBoolean>
                            >;
                            versionDescription: z.ZodOptional<z.ZodString>;
                            versionName: z.ZodOptional<z.ZodString>;
                            versionNumber: z.ZodString;
                            unpackagedMetadata: z.ZodOptional<
                            z.ZodObject<{ path: z.ZodString }, z.core.$strip>
                            >;
                            seedMetadata: z.ZodOptional<
                            z.ZodObject<{ path: z.ZodString }, z.core.$strip>
                            >;
                            functions: z.ZodOptional<z.ZodArray<z.ZodString>>;
                            },
                            z.core.$strip
                            >
                            >;
                            • differentiate between the Base PackageDir (path, maybe default) and the Packaging version (package and maybe a LOT of other fields) by whether is has the package property

                            function lockInit

                            lockInit: (filePath: string) => Promise<LockInitResponse>;
                            • This method exists as a separate function so it can be used by ConfigFile OR outside of ConfigFile.

                              Parameter filePath

                              where to save the file

                              Returns

                              2 functions: - writeAndUnlock: a function that takes the data to write and writes it to the file, then unlocks the file whether write succeeded or not - unlock: a function that unlocks the file (in case you don't end up calling writeAndUnlock)

                            function matchesAccessToken

                            matchesAccessToken: (value: string) => boolean;
                            • Tests whether a given string is an opaque access token, a JWT token, or neither.

                              Parameter value

                            function matchesJwtAccessToken

                            matchesJwtAccessToken: (value: string) => boolean;
                            • Tests whether a given string is a JWT-formatted access token.

                              Parameter value

                            function matchesOpaqueAccessToken

                            matchesOpaqueAccessToken: (value: string) => boolean;
                            • Tests whether a given string is an opaque access token.

                              Parameter value

                            function scratchOrgCreate

                            scratchOrgCreate: (
                            options: ScratchOrgCreateOptions
                            ) => Promise<ScratchOrgCreateResult>;

                              function scratchOrgResume

                              scratchOrgResume: (
                              jobId: string,
                              timeout?: Duration
                              ) => Promise<ScratchOrgCreateResult>;

                                function trimTo15

                                trimTo15: {
                                (id: string): string;
                                (id?: undefined): undefined;
                                (id: string): string;
                                };
                                • Converts an 18 character Salesforce ID to 15 characters.

                                  Parameter id

                                  The id to convert.

                                function validateApiVersion

                                validateApiVersion: (value: string) => boolean;
                                • Tests whether an API version matches the format i.0.

                                  Parameter value

                                  The API version as a string.

                                function validateEmail

                                validateEmail: (value: string) => boolean;
                                • Tests whether an email matches the format me@my.org

                                  Parameter value

                                  The email as a string.

                                function validatePathDoesNotContainInvalidChars

                                validatePathDoesNotContainInvalidChars: (value: string) => boolean;
                                • Tests whether a path is in the correct format; the value doesn't include the characters "[", "]", "?", "<", ">", "?", "|"

                                  Parameter value

                                  The path as a string.

                                function validateSalesforceId

                                validateSalesforceId: (value: string) => boolean;
                                • Tests whether a Salesforce ID is in the correct format, a 15- or 18-character length string with only letters and numbers

                                  Parameter value

                                  The ID as a string.

                                Classes

                                class AuthInfo

                                class AuthInfo extends AsyncOptionalCreatable<AuthInfo.Options> {}
                                • Handles persistence and fetching of user authentication information using JWT, OAuth, or refresh tokens. Sets up the refresh flows that jsForce will use to keep tokens active. An AuthInfo can also be created with an access token, but AuthInfos created with access tokens can't be persisted to disk.

                                  **See** [Authorization](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth.htm)

                                  **See** [Salesforce DX Usernames and Orgs](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_cli_usernames_orgs.htm)

                                  // Creating a new authentication file.
                                  const authInfo = await AuthInfo.create({
                                  username: myAdminUsername,
                                  oauth2Options: {
                                  loginUrl, authCode, clientId, clientSecret
                                  }
                                  );
                                  authInfo.save();
                                  // Creating an authorization info with an access token.
                                  const authInfo = await AuthInfo.create({
                                  username: accessToken
                                  });
                                  // Using an existing authentication file.
                                  const authInfo = await AuthInfo.create({
                                  username: myAdminUsername
                                  });
                                  // Using the AuthInfo
                                  const connection = await Connection.create({ authInfo });

                                constructor

                                constructor(options?: AuthInfo.Options);
                                • Constructor **Do not directly construct instances of this class -- use AuthInfo.create instead.**

                                  Parameter options

                                  The options for the class instance

                                method getAuthorizationUrl

                                static getAuthorizationUrl: (
                                options: JwtOAuth2Config & { scope?: string },
                                oauth2?: OAuth2
                                ) => string;
                                • Get the authorization URL.

                                  Parameter options

                                  The options to generate the URL.

                                method getClientId

                                getClientId: () => string;

                                  method getConnectionOptions

                                  getConnectionOptions: (clientApp?: string) => ConnectionOptions;
                                  • Get the auth fields (decrypted) needed to make a connection.

                                    Parameter clientApp

                                    Name of the CA/ECA associated with the user.

                                  method getDefaultInstanceUrl

                                  static getDefaultInstanceUrl: () => string;
                                  • Returns the default instance url

                                    Returns

                                    {string}

                                  method getDevHubAuthInfos

                                  static getDevHubAuthInfos: () => Promise<OrgAuthorization[]>;
                                  • Find all dev hubs available in the local environment.

                                  method getFields

                                  getFields: (decrypt?: boolean) => Readonly<AuthFields>;
                                  • Get the authorization fields.

                                    Parameter decrypt

                                    Decrypt the fields.

                                    Returns a ReadOnly object of the fields. If you need to modify the fields, use AuthInfo.update()

                                  method getOrgFrontDoorUrl

                                  getOrgFrontDoorUrl: () => string;
                                  • Get the org front door (used for web based oauth flows)

                                    Deprecated

                                    Will be removed in the next major version. Use the Org.getFrontDoorUrl() method instead.

                                  method getRedirectUri

                                  getRedirectUri: () => string;

                                    method getSfdxAuthUrl

                                    getSfdxAuthUrl: () => string;
                                    • Get the SFDX Auth URL.

                                      **See** [SFDX Authorization](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_auth.htm#cli_reference_force_auth)

                                    method getUsername

                                    getUsername: () => string;
                                    • Get the username.

                                    method handleAliasAndDefaultSettings

                                    handleAliasAndDefaultSettings: (sideEffects: AuthSideEffects) => Promise<void>;
                                    • Convenience function to handle typical side effects encountered when dealing with an AuthInfo. Given the values supplied in parameter sideEffects, this function will set auth alias, default auth and default dev hub.

                                      Parameter sideEffects

                                      instance of AuthSideEffects

                                    method hasAuthentications

                                    static hasAuthentications: () => Promise<boolean>;
                                    • Returns true if one or more authentications are persisted.

                                    method identifyPossibleScratchOrgs

                                    static identifyPossibleScratchOrgs: (
                                    fields: AuthFields,
                                    orgAuthInfo: AuthInfo
                                    ) => Promise<void>;
                                    • Given a set of decrypted fields and an authInfo, determine if the org belongs to an available dev hub, or if the org is a sandbox of another CLI authed production org.

                                      Parameter fields

                                      Parameter orgAuthInfo

                                    method init

                                    init: () => Promise<void>;
                                    • Initializes an instance of the AuthInfo class.

                                    method isAccessTokenFlow

                                    isAccessTokenFlow: () => boolean;
                                    • Returns true if this is using an access token flow.

                                    method isJwt

                                    isJwt: () => boolean;
                                    • Returns true if this is using the JWT flow.

                                    method isOauth

                                    isOauth: () => boolean;
                                    • Returns true if this is using the oauth flow.

                                    method isRefreshTokenFlow

                                    isRefreshTokenFlow: () => boolean;
                                    • Returns true if this is using the refresh token flow.

                                    method isUsingAccessToken

                                    isUsingAccessToken: () => boolean;
                                    • Returns true if this org is using access token auth.

                                    method listAllAuthorizations

                                    static listAllAuthorizations: (
                                    orgAuthFilter?: (orgAuth: OrgAuthorization) => boolean
                                    ) => Promise<OrgAuthorization[]>;
                                    • Get a list of all authorizations based on auth files stored in the global directory. One can supply a filter (see

                                      Parameter orgAuthFilter

                                      ) and calling this function without a filter will return all authorizations.

                                      Parameter orgAuthFilter

                                      A predicate function that returns true for those org authorizations that are to be retained.

                                      Returns

                                      {Promise<OrgAuthorization[]>}

                                    method parseSfdxAuthUrl

                                    static parseSfdxAuthUrl: (
                                    sfdxAuthUrl: string
                                    ) => Pick<AuthFields, 'clientId' | 'clientSecret' | 'refreshToken' | 'loginUrl'>;
                                    • Parse a sfdx auth url, usually obtained by authInfo.getSfdxAuthUrl.

                                      Parameter sfdxAuthUrl

                                      Example 1

                                      await AuthInfo.create(AuthInfo.parseSfdxAuthUrl(sfdxAuthUrl));

                                    method save

                                    save: (authData?: AuthFields) => Promise<AuthInfo>;
                                    • Updates the cache and persists the authentication fields (encrypted).

                                      Parameter authData

                                      New data to save.

                                    method setAlias

                                    setAlias: (alias: string) => Promise<void>;
                                    • Sets the provided alias to the username

                                      Parameter alias

                                      alias to set

                                    method setAsDefault

                                    setAsDefault: (options?: { org?: boolean; devHub?: boolean }) => Promise<void>;
                                    • Set the target-env (default) or the target-dev-hub to the alias if it exists otherwise to the username. Method will try to set the local config first but will default to global config if that fails.

                                      Parameter options

                                    method update

                                    update: (authData?: AuthFields) => AuthInfo;
                                    • Update the authorization fields, encrypting sensitive fields, but do not persist. For convenience this object is returned.

                                      Parameter authData

                                      Authorization fields to update.

                                    class AuthRemover

                                    class AuthRemover extends AsyncOptionalCreatable<AuthRemoverOptions> {}
                                    • Handles the removing of authorizations, which includes deleting the auth file in the global .sfdx folder, deleting any configs that are associated with the username/alias, and deleting any aliases associated with the username

                                      const remover = await AuthRemover.create();
                                      await remover.removeAuth('example@mycompany.com');

                                      const remover = await AuthRemover.create();
                                      await remover.removeAllAuths();

                                      const remover = await AuthRemover.create();
                                      const auth = await remover.findAuth(
                                      example@mycompany.com
                                      );
                                      await remover.removeAuth(auth.username);

                                      Pass a projectPath to resolve local config from a specific project instead of process.cwd(), and skipCache to re-read config from disk when the process-cached aggregator can't be trusted:

                                      const remover = await AuthRemover.create({ projectPath: '/path/to/project', skipCache: true });
                                      await remover.removeAuth('example@mycompany.com');

                                    constructor

                                    constructor(options?: AuthRemoverOptions);

                                      method findAllAuths

                                      findAllAuths: () => Record<string, AuthFields & JsonMap>;
                                      • Finds all org authorizations in the global info file (.sf/sf.json)

                                        Returns

                                        {Record<string, AuthFields>}

                                      method findAuth

                                      findAuth: (usernameOrAlias?: string) => Promise<AuthFields>;
                                      • Finds authorization files for username/alias in the global .sfdx folder **Throws** *SfError{ name: 'TargetOrgNotSetError' }* if no target-org **Throws** *SfError{ name: 'NamedOrgNotFoundError' }* if specified user is not found

                                        Parameter usernameOrAlias

                                        username or alias of the auth you want to find, defaults to the configured target-org

                                        Returns

                                        {Promise}

                                      method init

                                      protected init: () => Promise<void>;

                                        method removeAllAuths

                                        removeAllAuths: () => Promise<void>;
                                        • Removes all authentication files and any configs or aliases associated with them

                                        method removeAuth

                                        removeAuth: (usernameOrAlias: string) => Promise<void>;
                                        • Removes the authentication and any configs or aliases associated with it

                                          Parameter usernameOrAlias

                                          the username or alias that you want to remove

                                        class CometClient

                                        abstract class CometClient extends EventEmitter {}
                                        • Comet client interface. The is to allow for mocking the inner streaming Cometd implementation. The Faye implementation is used by default but it could be used to adapt another Cometd impl.

                                        method addExtension

                                        abstract addExtension: (extension: StreamingExtension) => void;
                                        • Add a custom extension to the underlying client.

                                          Parameter extension

                                          The json function for the extension.

                                        method disable

                                        abstract disable: (label: string) => void;
                                        • Disable polling features.

                                          Parameter label

                                          Polling feature label.

                                        method disconnect

                                        abstract disconnect: () => void;
                                        • Method to call to disconnect the client from the server.

                                        method handshake

                                        abstract handshake: (callback: () => void) => void;
                                        • handshake with the streaming channel

                                          Parameter callback

                                          Callback for the handshake when it successfully completes. The handshake should throw errors when errors are encountered.

                                        method setHeader

                                        abstract setHeader: (name: string, value: string) => void;
                                        • Sets an http header name/value.

                                          Parameter name

                                          The header name.

                                          Parameter value

                                          The header value.

                                        method subscribe

                                        abstract subscribe: (
                                        channel: string,
                                        callback: (message: JsonMap) => void
                                        ) => CometSubscription;
                                        • Subscribes to Comet topics. Subscribe should perform a handshake if one hasn't been performed yet.

                                          Parameter channel

                                          The topic to subscribe to.

                                          Parameter callback

                                          The callback to execute once a message has been received.

                                        class Config

                                        class Config extends ConfigFile<ConfigFile.Options, ConfigProperties> {}
                                        • The files where sfdx config values are stored for projects and the global space.

                                          *Note:* It is not recommended to instantiate this object directly when resolving config values. Instead use ConfigAggregator

                                          const localConfig = await Config.create();
                                          localConfig.set('target-org', 'username@company.org');
                                          await localConfig.write();

                                          https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_cli_config_values.htm

                                        constructor

                                        constructor(options?: ConfigFile.Options);

                                          method addAllowedProperties

                                          static addAllowedProperties: (metas: ConfigPropertyMeta[]) => void;
                                          • Add an array of allowed config properties.

                                            Parameter metas

                                            Array of objects to set as the allowed config properties.

                                          method clear

                                          static clear: () => Promise<void>;
                                          • Clear all the configured properties both local and global.

                                          method getAllowedProperties

                                          static getAllowedProperties: () => ConfigPropertyMeta[];
                                          • Returns an array of objects representing the allowed config properties.

                                          method getFileName

                                          static getFileName: () => string;

                                          method getPropertyConfig

                                          getPropertyConfig: (propertyName: string) => ConfigPropertyMeta;
                                          • Get an individual property config.

                                            **Throws** *SfError{ name: 'UnknownConfigKeyError' }* An attempt to get a property that's not supported.

                                            Parameter propertyName

                                            The name of the property.

                                          method getPropertyConfigMeta

                                          static getPropertyConfigMeta: (
                                          propertyName: string
                                          ) => Nullable<ConfigPropertyMeta>;

                                            method init

                                            protected init: () => Promise<void>;
                                            • Initializer for supported config types.

                                            method read

                                            read: (force?: boolean) => Promise<ConfigProperties>;
                                            • Read, assign, and return the config contents.

                                            method readSync

                                            readSync: (force?: boolean) => Dictionary<T>;

                                              method set

                                              set: <K extends string>(key: K, value: Dictionary<T>) => Dictionary<T>;
                                              • Sets a value for a property.

                                                **Throws** *SfError{ name: 'UnknownConfigKeyError' }* An attempt to get a property that's not supported. **Throws** *SfError{ name: 'InvalidConfigValueError' }* If the input validator fails.

                                                Parameter key

                                                The property to set.

                                                Parameter value

                                                The value of the property.

                                              method unset

                                              unset: (key: string) => boolean;
                                              • Unsets a value for a property.

                                                **Throws** *SfError{ name: 'UnknownConfigKeyError' }* If the input validator fails.

                                                Parameter key

                                                The property to unset.

                                              method update

                                              static update: <K extends string>(
                                              isGlobal: boolean,
                                              propertyName: K,
                                              value?: Dictionary<T>
                                              ) => Promise<ConfigContents>;
                                              • The value of a supported config property.

                                                Parameter isGlobal

                                                True for a global config. False for a local config.

                                                Parameter propertyName

                                                The name of the property to set.

                                                Parameter value

                                                The property value.

                                              method write

                                              write: () => Promise<ConfigProperties>;
                                              • Writes Config properties taking into account encrypted properties.

                                                Parameter newContents

                                                The new Config value to persist.

                                              method writeSync

                                              writeSync: (newContents?: Dictionary<T>) => Dictionary<T>;
                                              • DO NOT CALL - The config file needs to encrypt values which can only be done asynchronously. Call SfdxConfig.write instead.

                                                **Throws** *SfError{ name: 'InvalidWriteError' }* Always.

                                                Parameter newContents

                                                Contents to write

                                              class ConfigAggregator

                                              class ConfigAggregator extends AsyncOptionalCreatable<ConfigAggregator.Options> {}
                                              • Aggregate global and local project config files, as well as environment variables for config.json. The resolution happens in the following bottom-up order:

                                                1. Environment variables (SF_LOG_LEVEL) 1. Workspace settings (<workspace-root>/.sf/config.json) 1. Global settings ($HOME/.sf/config.json)

                                                Use ConfigAggregator.create to instantiate the aggregator.

                                                const aggregator = await ConfigAggregator.create();
                                                console.log(aggregator.getPropertyValue('target-org'));

                                              constructor

                                              constructor(options?: ConfigAggregator.Options);

                                              property encrypted

                                              protected static encrypted: boolean;

                                                property instances

                                                protected static instances: Map<string, ConfigAggregator>;

                                                  method addAllowedProperties

                                                  addAllowedProperties: (
                                                  configMetas: ConfigPropertyMeta | ConfigPropertyMeta[]
                                                  ) => void;
                                                  • Add an allowed config property.

                                                  method clearInstance

                                                  static clearInstance: (projectPath?: string) => Promise<void>;
                                                  • Clear the cache to force reading from disk. If no projectPath is provided, all instances will be cleared.

                                                    *NOTE: Only call this method if you must and you know what you are doing.*

                                                  method create

                                                  static create: {
                                                  <T extends ConfigAggregator>(
                                                  this: new (options?: ConfigAggregator.Options) => T,
                                                  options?: ConfigAggregator.Options
                                                  ): Promise<T>;
                                                  <P extends ConfigAggregator.Options, T extends AsyncOptionalCreatable<P>>(
                                                  this: new (options?: P) => T,
                                                  options?: P
                                                  ): Promise<T>;
                                                  };

                                                    method getAllowedProperties

                                                    protected getAllowedProperties: () => ConfigPropertyMeta[];
                                                    • Get the allowed properties.

                                                    method getConfig

                                                    getConfig: () => JsonMap;
                                                    • Get the resolved config object from the local, global and environment config instances.

                                                    method getConfigInfo

                                                    getConfigInfo: () => ConfigInfo[];
                                                    • Get all resolved config property keys, values, locations, and paths.

                                                      > console.log(aggregator.getConfigInfo());
                                                      [
                                                      { key: 'logLevel', val: 'INFO', location: 'Environment', path: '$SF_LOG_LEVEL'}
                                                      { key: 'target-org', val: '<username>', location: 'Local', path: './.sf/config.json'}
                                                      ]

                                                    method getEnvVars

                                                    getEnvVars: () => Dictionary<string>;
                                                    • Get the config properties that are environment variables.

                                                    method getGlobalConfig

                                                    getGlobalConfig: () => Config;
                                                    • Get the global config instance.

                                                    method getInfo

                                                    getInfo: (key: string, throwOnDeprecation?: boolean) => ConfigInfo;
                                                    • Get a resolved config property. If a property is deprecated, it will try to use the the new key, if there is a config there.

                                                      Parameter key

                                                      The key of the property.

                                                      Parameter throwOnDeprecation

                                                      True, if you want an error throw when reading a deprecated config

                                                    method getLocalConfig

                                                    getLocalConfig: () => Config | undefined;
                                                    • Get the local project config instance.

                                                    method getLocation

                                                    getLocation: (key: string) => Optional<ConfigAggregator.Location>;
                                                    • Gets a resolved config property location.

                                                      For example, getLocation('logLevel') will return: 1. Location.GLOBAL if resolved to an environment variable. 1. Location.LOCAL if resolved to local project config. 1. Location.ENVIRONMENT if resolved to the global config.

                                                      Parameter key

                                                      The key of the property.

                                                    method getPath

                                                    getPath: (key: string) => Optional<string>;
                                                    • Get a resolved file path or environment variable name of the property.

                                                      For example, getPath('logLevel') will return: 1. $SF_LOG_LEVEL if resolved to an environment variable. 1. ./.sf/config.json if resolved to the local config. 1. ~/.sf/config.json if resolved to the global config. 1. undefined, if not resolved.

                                                      **Note:** that the path returned may be the absolute path instead of relative paths such as ./ and ~/.

                                                      Parameter key

                                                      The key of the property.

                                                    method getPropertyMeta

                                                    getPropertyMeta: (key: string) => ConfigPropertyMeta;
                                                    • Get a resolved config property meta. If the property is deprecated, it will return the new key's meta, if it exists, with a deprecation warning

                                                      **Throws** *SfError{ name: 'UnknownConfigKeyError' }* An attempt to get a property that's not supported.

                                                      Parameter key

                                                      The key of the property.

                                                    method getPropertyValue

                                                    getPropertyValue: <T extends AnyJson>(key: string) => Optional<T>;
                                                    • Get a resolved config property. If you use a deprecated property, a warning will be emitted and it will attempt to resolve the new property's value

                                                      **Throws** *SfError{ name: 'UnknownConfigKeyError' }* An attempt to get a property that's not supported.

                                                      Parameter key

                                                      The key of the property.

                                                    method getValue

                                                    static getValue: (key: string, projectPath?: string) => ConfigInfo;
                                                    • Get the info for a given key. If the ConfigAggregator was not asynchronously created OR the ConfigAggregator.reload was not called, the config value may be encrypted.

                                                      Parameter key

                                                      The config key.

                                                    method init

                                                    init: () => Promise<void>;
                                                    • Initialize this instances async dependencies.

                                                    method loadProperties

                                                    protected loadProperties: () => Promise<void>;
                                                    • Loads all the properties and aggregates them according to location.

                                                    method reload

                                                    reload: () => Promise<ConfigAggregator>;
                                                    • Re-read all property configurations from disk.

                                                    method setAllowedProperties

                                                    protected setAllowedProperties: (properties: ConfigPropertyMeta[]) => void;
                                                    • Set the allowed properties.

                                                      Parameter properties

                                                      The properties to set.

                                                    method unsetByValue

                                                    unsetByValue: (key: string) => Promise<void>;

                                                      class ConfigFile

                                                      class ConfigFile<
                                                      T extends ConfigFile.Options = ConfigFile.Options,
                                                      P extends ConfigContents = ConfigContents
                                                      > extends BaseConfigStore<T, P> {}
                                                      • Represents a json config file used to manage settings and state. Global config files are stored in the home directory hidden state folder (.sfdx) and local config files are stored in the project path, either in the hidden state folder or wherever specified.

                                                        class MyConfig extends ConfigFile {
                                                        public static getFileName(): string {
                                                        return 'myConfigFilename.json';
                                                        }
                                                        }
                                                        const myConfig = await MyConfig.create({
                                                        isGlobal: true
                                                        });
                                                        myConfig.set('myKey', 'myValue');
                                                        await myConfig.write();

                                                      constructor

                                                      constructor(options?: ConfigFile.Options);
                                                      • Create an instance of a config file without reading the file. Call read or readSync after creating the ConfigFile OR instantiate with ConfigFile.create instead.

                                                        Parameter options

                                                        The options for the class instance

                                                      property hasRead

                                                      protected hasRead: boolean;

                                                        property logger

                                                        protected logger: Logger;

                                                          method access

                                                          access: (perm?: number) => Promise<boolean>;

                                                          method accessSync

                                                          accessSync: (perm?: number) => boolean;

                                                          method exists

                                                          exists: () => Promise<boolean>;
                                                          • Check to see if the config file exists. Returns true if the config file exists and has access, false otherwise.

                                                          method existsSync

                                                          existsSync: () => boolean;
                                                          • Check to see if the config file exists. Returns true if the config file exists and has access, false otherwise.

                                                          method getDefaultOptions

                                                          static getDefaultOptions: (
                                                          isGlobal?: boolean,
                                                          filename?: string
                                                          ) => ConfigFile.Options;
                                                          • Returns the default options for the config file.

                                                            Parameter isGlobal

                                                            If the file should be stored globally or locally.

                                                            Parameter filename

                                                            The name of the config file.

                                                          method getFileName

                                                          static getFileName: () => string;
                                                          • Returns the config's filename.

                                                          method getPath

                                                          getPath: () => string;
                                                          • Returns the absolute path to the config file.

                                                            The first time getPath is called, the path is resolved and becomes immutable. This allows implementers to override options properties, like filePath, on the init method for async creation. If that is required for creation, the config files can not be synchronously created.

                                                          method init

                                                          protected init: () => Promise<void>;
                                                          • Used to initialize asynchronous components.

                                                            **Throws** *Error{ code: 'ENOENT' }* If the ConfigFile.getFilename file is not found when options.throwOnNotFound is true.

                                                          method isGlobal

                                                          isGlobal: () => boolean;
                                                          • Returns true if this config is using the global path, false otherwise.

                                                          method read

                                                          read: (throwOnNotFound?: boolean, force?: boolean) => Promise<P>;
                                                          • Read the config file and set the config contents. Returns the config contents of the config file. As an optimization, files are only read once per process and updated in memory and via write(). To force a read from the filesystem pass force=true. **Throws** *SfError{ name: 'UnexpectedJsonFileFormat' }* There was a problem reading or parsing the file.

                                                            Parameter throwOnNotFound

                                                            Optionally indicate if a throw should occur on file read.

                                                            Parameter force

                                                            Optionally force the file to be read from disk even when already read within the process.

                                                          method readSync

                                                          readSync: (throwOnNotFound?: boolean, force?: boolean) => P;
                                                          • Read the config file and set the config contents. Returns the config contents of the config file. As an optimization, files are only read once per process and updated in memory and via write(). To force a read from the filesystem pass force=true. **Throws** *SfError{ name: 'UnexpectedJsonFileFormat' }* There was a problem reading or parsing the file.

                                                            Parameter throwOnNotFound

                                                            Optionally indicate if a throw should occur on file read.

                                                            Parameter force

                                                            Optionally force the file to be read from disk even when already read within the process.

                                                          method resolveRootFolder

                                                          static resolveRootFolder: (isGlobal: boolean) => Promise<string>;
                                                          • Helper used to determine what the local and global folder point to. Returns the file path of the root folder.

                                                            Parameter isGlobal

                                                            True if the config should be global. False for local.

                                                          method resolveRootFolderSync

                                                          static resolveRootFolderSync: (isGlobal: boolean) => string;
                                                          • Helper used to determine what the local and global folder point to. Returns the file path of the root folder.

                                                            Parameter isGlobal

                                                            True if the config should be global. False for local.

                                                          method stat

                                                          stat: () => Promise<fsStats>;
                                                          • Get the stats of the file. Returns the stats of the file.

                                                            fs.stat

                                                          method statSync

                                                          statSync: () => fsStats;
                                                          • Get the stats of the file. Returns the stats of the file.

                                                            fs.stat

                                                          unlink: () => Promise<void>;

                                                          method unlinkSync

                                                          unlinkSync: () => void;

                                                          method write

                                                          write: () => Promise<P>;
                                                          • Write the config file with new contents. If no new contents are provided it will write the existing config contents that were set from ConfigFile.read, or an empty file if ConfigFile.read was not called.

                                                            Parameter newContents

                                                            The new contents of the file.

                                                          method writeSync

                                                          writeSync: () => P;
                                                          • Write the config file with new contents. If no new contents are provided it will write the existing config contents that were set from ConfigFile.read, or an empty file if ConfigFile.read was not called.

                                                            Parameter newContents

                                                            The new contents of the file.

                                                          class Connection

                                                          class Connection<S extends Schema = Schema> extends JSForceConnection<S> {}
                                                          • Handles connections and requests to Salesforce Orgs.

                                                            // Uses latest API version
                                                            const connection = await Connection.create({
                                                            authInfo: await AuthInfo.create({ username: 'myAdminUsername' })
                                                            });
                                                            connection.query('SELECT Name from Account');
                                                            // Use different API version
                                                            connection.setApiVersion("42.0");
                                                            connection.query('SELECT Name from Account');

                                                          constructor

                                                          constructor(options: Connection.Options<S>);
                                                          • Constructor **Do not directly construct instances of this class -- use Connection.create instead.**

                                                            Parameter options

                                                            The options for the class instance.

                                                          property tooling

                                                          readonly tooling: Tooling<S>;
                                                          • Tooling api reference.

                                                          method autoFetchQuery

                                                          autoFetchQuery: <T extends Schema = S>(
                                                          soql: string,
                                                          queryOptions?: Partial<QueryOptions & { tooling: boolean }>
                                                          ) => Promise<QueryResult<T>>;
                                                          • Executes a query and auto-fetches (i.e., "queryMore") all results. This is especially useful with large query result sizes, such as over 2000 records. The default maximum fetch size is 10,000 records. Modify this via the options argument.

                                                            Parameter soql

                                                            The SOQL string.

                                                            Parameter queryOptions

                                                            The query options. NOTE: the autoFetch option will always be true.

                                                          method baseUrl

                                                          baseUrl: () => string;
                                                          • The Force API base url for the instance.

                                                          method create

                                                          static create: <S extends Schema>(
                                                          this: new (options: Connection.Options<S>) => Connection<S>,
                                                          options: Connection.Options<S>
                                                          ) => Promise<Connection<S>>;
                                                          • Creates an instance of a Connection. Performs additional async initializations.

                                                            Parameter options

                                                            Constructor options.

                                                          method deploy

                                                          deploy: (
                                                          zipInput: Buffer,
                                                          options: DeployOptionsWithRest
                                                          ) => Promise<DeployResultLocator<AsyncResult & Schema>>;
                                                          • deploy a zipped buffer from the SDRL with REST or SOAP

                                                            Parameter zipInput

                                                            data to deploy

                                                            Parameter options

                                                            JSForce deploy options + a boolean for rest

                                                          method getApiVersion

                                                          getApiVersion: () => string;
                                                          • Get the API version used for all connection requests.

                                                          method getAuthInfo

                                                          getAuthInfo: () => AuthInfo;
                                                          • Getter for AuthInfo.

                                                          method getAuthInfoFields

                                                          getAuthInfoFields: () => AuthFields;
                                                          • Getter for the AuthInfo fields.

                                                          method getConnectionOptions

                                                          getConnectionOptions: () => AuthFields;
                                                          • Getter for the auth fields.

                                                          method getUsername

                                                          getUsername: () => Optional<string>;
                                                          • Getter for the username of the Salesforce Org.

                                                          method init

                                                          init: () => Promise<void>;
                                                          • Async initializer.

                                                          method isResolvable

                                                          isResolvable: () => Promise<boolean>;
                                                          • Verify that instance has a reachable DNS entry, otherwise will throw error

                                                          method isUsingAccessToken

                                                          isUsingAccessToken: () => boolean;
                                                          • Returns true if this connection is using access token auth.

                                                          method normalizeUrl

                                                          normalizeUrl: (url: string) => string;
                                                          • Normalize a Salesforce url to include a instance information.

                                                            Parameter url

                                                            Partial url.

                                                          method refreshAuth

                                                          refreshAuth: () => Promise<void>;
                                                          • Executes a GET request on the baseUrl to force an auth refresh. This is useful for the raw methods (request, requestRaw) that use the accessToken directly and don't handle refreshes.

                                                            This method issues a request using the current access token to check if it is still valid. If the request returns 200, no refresh happens, and we keep the token. If it returns 401, jsforce will request a new token and set it in the connection instance.

                                                          method request

                                                          request: <R = unknown>(
                                                          request: string | HttpRequest,
                                                          options?: JsonMap
                                                          ) => StreamPromise<R>;
                                                          • Send REST API request with given HTTP request info, with connected session information and SFDX headers.

                                                            Parameter request

                                                            HTTP request object or URL to GET request.

                                                            Parameter options

                                                            HTTP API request options.

                                                          method retrieveMaxApiVersion

                                                          retrieveMaxApiVersion: () => Promise<string>;
                                                          • Retrieves the highest api version that is supported by the target server instance.

                                                          method setApiVersion

                                                          setApiVersion: (version: string) => void;
                                                          • Set the API version for all connection requests.

                                                            **Throws** *SfError{ name: 'IncorrectAPIVersionError' }* Incorrect API version.

                                                            Parameter version

                                                            The API version.

                                                          method singleRecordQuery

                                                          singleRecordQuery: <T extends Record>(
                                                          soql: string,
                                                          options?: SingleRecordQueryOptions
                                                          ) => Promise<T>;
                                                          • Executes a query using either standard REST or Tooling API, returning a single record. Will throw if either zero records are found OR multiple records are found.

                                                            Parameter soql

                                                            The SOQL string.

                                                            Parameter options

                                                            The query options.

                                                          method useLatestApiVersion

                                                          useLatestApiVersion: () => Promise<void>;
                                                          • Use the latest API version available on this.instanceUrl.

                                                          class DefaultUserFields

                                                          class DefaultUserFields extends AsyncCreatable<DefaultUserFields.Options> {}
                                                          • Provides a default set of fields values that can be used to create a user. This is handy for software development purposes.

                                                            const connection: Connection = await Connection.create({
                                                            authInfo: await AuthInfo.create({ username: 'user@example.com' })
                                                            });
                                                            const org: Org = await Org.create({ connection });
                                                            const options: DefaultUserFields.Options = {
                                                            templateUser: org.getUsername()
                                                            };
                                                            const fields = (await DefaultUserFields.create(options)).getFields();

                                                          constructor

                                                          constructor(options: DefaultUserFields.Options);

                                                          method getFields

                                                          getFields: () => UserFields;
                                                          • Get user fields.

                                                          method init

                                                          protected init: () => Promise<void>;
                                                          • Initialize asynchronous components.

                                                          class DeviceOauthService

                                                          class DeviceOauthService extends AsyncCreatable<OAuth2Config> {}
                                                          • THIS CLASS IS DEPRECATED AND WILL BE REMOVED MID JANUARY 2026.

                                                            Deprecated

                                                            Use other oauth flows instead

                                                          constructor

                                                          constructor(options: OAuth2Config);

                                                            property GRANT_TYPE

                                                            static GRANT_TYPE: string;

                                                              property RESPONSE_TYPE

                                                              static RESPONSE_TYPE: string;

                                                                property SCOPE

                                                                static SCOPE: string;

                                                                  method authorizeAndSave

                                                                  authorizeAndSave: (approval: DeviceCodePollingResponse) => Promise<AuthInfo>;
                                                                  • Deprecated

                                                                    Will be removed mid January 2026

                                                                  method awaitDeviceApproval

                                                                  awaitDeviceApproval: (
                                                                  loginData: DeviceCodeResponse
                                                                  ) => Promise<Nullable<DeviceCodePollingResponse>>;
                                                                  • Deprecated

                                                                    Will be removed mid January 2026

                                                                  method init

                                                                  protected init: () => Promise<void>;

                                                                    method requestDeviceLogin

                                                                    requestDeviceLogin: () => Promise<DeviceCodeResponse>;
                                                                    • Deprecated

                                                                      Will be removed mid January 2026

                                                                    class EnvVars

                                                                    class EnvVars extends Env {}

                                                                      constructor

                                                                      constructor(env?: NodeJS.ProcessEnv);

                                                                        method asDictionary

                                                                        asDictionary: () => Dictionary<unknown>;

                                                                          method asMap

                                                                          asMap: () => Map<string, unknown>;

                                                                            method getPropertyFromEnv

                                                                            getPropertyFromEnv: <T>(property: string, prefix?: string) => Nullable<T>;

                                                                              method propertyToEnvName

                                                                              static propertyToEnvName: (property: string, prefix?: string) => string;

                                                                                class Global

                                                                                class Global {}
                                                                                • Global constants, methods, and configuration.

                                                                                property DIR

                                                                                static readonly DIR: string;
                                                                                • The full system path to the preferred global state folder

                                                                                property isWeb

                                                                                static readonly isWeb: boolean;
                                                                                • Whether the code is running in a web browser.

                                                                                property SF_DIR

                                                                                static readonly SF_DIR: string;

                                                                                property SF_STATE_FOLDER

                                                                                static readonly SF_STATE_FOLDER: string;
                                                                                • The global folder in which sf state is stored.

                                                                                property SFDX_DIR

                                                                                static readonly SFDX_DIR: string;

                                                                                property SFDX_INTEROPERABILITY

                                                                                static SFDX_INTEROPERABILITY: boolean;
                                                                                • Enable interoperability between .sfdx and .sf.

                                                                                  When @salesforce/core@v2 is deprecated and no longer used, this can be removed.

                                                                                property SFDX_STATE_FOLDER

                                                                                static readonly SFDX_STATE_FOLDER: string;
                                                                                • The global folder in which sfdx state is stored.

                                                                                property STATE_FOLDER

                                                                                static readonly STATE_FOLDER: string;
                                                                                • The preferred global folder in which state is stored.

                                                                                method createDir

                                                                                static createDir: (dirPath?: string) => Promise<void>;
                                                                                • Creates a directory within Global.SFDX_DIR, or Global.SFDX_DIR itself if the dirPath param is not provided. This is resolved or rejected when the directory creation operation has completed.

                                                                                  Parameter dirPath

                                                                                  The directory path to be created within Global.SFDX_DIR.

                                                                                method getEnvironmentMode

                                                                                static getEnvironmentMode: () => Mode;
                                                                                • Gets the current mode environment variable as a Mode instance.

                                                                                  console.log(Global.getEnvironmentMode() === Mode.PRODUCTION);

                                                                                class Lifecycle

                                                                                class Lifecycle {}
                                                                                • An asynchronous event listener and emitter that follows the singleton pattern. The singleton pattern allows lifecycle events to be emitted from deep within a library and still be consumed by any other library or tool. It allows other developers to react to certain situations or events in your library without them having to manually call the method themselves.

                                                                                  An example might be transforming metadata before it is deployed to an environment. As long as an event was emitted from the deploy library and you were listening on that event in the same process, you could transform the metadata before the deploy regardless of where in the code that metadata was initiated.

                                                                                  Example 1

                                                                                  // Listen for an event in a plugin hook
                                                                                  Lifecycle.getInstance().on('deploy-metadata', transformMetadata)
                                                                                  // Deep in the deploy code, fire the event for all libraries and plugins to hear.
                                                                                  Lifecycle.getInstance().emit('deploy-metadata', metadataToBeDeployed);
                                                                                  // if you don't need to await anything
                                                                                  use `void Lifecycle.getInstance().emit('deploy-metadata', metadataToBeDeployed)` ;

                                                                                property telemetryEventName

                                                                                static readonly telemetryEventName: string;

                                                                                  property warningEventName

                                                                                  static readonly warningEventName: string;

                                                                                    method emit

                                                                                    emit: <T = AnyJson>(eventName: string, data: T) => Promise<void>;
                                                                                    • Emit a given event, causing all callback functions to be run in the order they were registered

                                                                                      Parameter eventName

                                                                                      The name of the event to emit

                                                                                      Parameter data

                                                                                      The argument to be passed to the callback function

                                                                                    method emitTelemetry

                                                                                    emitTelemetry: (data: AnyJson) => Promise<void>;
                                                                                    • Emit a telemetry event, causing all callback functions to be run in the order they were registered

                                                                                      Parameter data

                                                                                      The data to emit

                                                                                    method emitWarning

                                                                                    emitWarning: (warning: string) => Promise<void>;
                                                                                    • Emit a warning event, causing all callback functions to be run in the order they were registered

                                                                                      Parameter data

                                                                                      The warning (string) to emit

                                                                                    method getInstance

                                                                                    static getInstance: () => Lifecycle;
                                                                                    • Retrieve the singleton instance of this class so that all listeners and emitters can interact from any library or tool

                                                                                    method getListeners

                                                                                    getListeners: (eventName: string) => callback[];
                                                                                    • Get an array of listeners (callback functions) for a given event

                                                                                      Parameter eventName

                                                                                      The name of the event to get listeners of

                                                                                    method on

                                                                                    on: <T = AnyJson>(
                                                                                    eventName: string,
                                                                                    cb: (data: T) => Promise<void>,
                                                                                    uniqueListenerIdentifier?: string
                                                                                    ) => void;
                                                                                    • Create a new listener for a given event

                                                                                      Parameter eventName

                                                                                      The name of the event that is being listened for

                                                                                      Parameter cb

                                                                                      The callback function to run when the event is emitted

                                                                                      Parameter uniqueListenerIdentifier

                                                                                      A unique identifier for the listener. If a listener with the same identifier is already registered, a new one will not be added

                                                                                    method onTelemetry

                                                                                    onTelemetry: (cb: (data: Record<string, unknown>) => Promise<void>) => void;
                                                                                    • Create a listener for the telemetry event

                                                                                      Parameter cb

                                                                                      The callback function to run when the event is emitted

                                                                                    method onWarning

                                                                                    onWarning: (cb: (warning: string) => Promise<void>) => void;
                                                                                    • Create a listener for the warning event

                                                                                      Parameter cb

                                                                                      The callback function to run when the event is emitted

                                                                                    method removeAllListeners

                                                                                    removeAllListeners: (eventName: string) => void;
                                                                                    • Remove all listeners for a given event

                                                                                      Parameter eventName

                                                                                      The name of the event to remove listeners of

                                                                                    method staticVersion

                                                                                    static staticVersion: () => string;
                                                                                    • return the package.json version of the sfdx-core library.

                                                                                    method version

                                                                                    version: () => string;
                                                                                    • return the package.json version of the sfdx-core library.

                                                                                    class Logger

                                                                                    class Logger {}
                                                                                    • A logging abstraction powered by Pino that provides both a default logger configuration that will log to the default path, and a way to create custom loggers based on the same foundation.

                                                                                      // Gets the root sfdx logger
                                                                                      const logger = await Logger.root();
                                                                                      // Creates a child logger of the root sfdx logger with custom fields applied
                                                                                      const childLogger = await Logger.child('myRootChild', {tag: 'value'});
                                                                                      // Creates a custom logger unaffiliated with the root logger
                                                                                      const myCustomLogger = new Logger('myCustomLogger');
                                                                                      // Creates a child of a custom logger unaffiliated with the root logger with custom fields applied
                                                                                      const myCustomChildLogger = myCustomLogger.child('myCustomChild', {tag: 'value'});
                                                                                      // get a raw pino logger from the root instance of Logger
                                                                                      // you can use these to avoid constructing another Logger wrapper class and to get better type support
                                                                                      const logger = Logger.getRawRootLogger().child({name: 'foo', otherProp: 'bar'});
                                                                                      logger.info({some: 'stuff'}, 'a message');
                                                                                      // get a raw pino logger from the current instance
                                                                                      const childLogger = await Logger.child('myRootChild', {tag: 'value'});
                                                                                      const logger = childLogger.getRawLogger();

                                                                                      **See** https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_dev_cli_log_messages.htm

                                                                                    constructor

                                                                                    constructor(optionsOrName: string | LoggerOptions);
                                                                                    • Constructs a new Logger.

                                                                                      Parameter optionsOrName

                                                                                      A set of LoggerOptions or name to use with the default options.

                                                                                      **Throws** *SfError{ name: 'RedundantRootLoggerError' }* More than one attempt is made to construct the root Logger.

                                                                                    property DEFAULT_LEVEL

                                                                                    static readonly DEFAULT_LEVEL: number;
                                                                                    • The default LoggerLevel when constructing new Logger instances.

                                                                                    property LEVEL_NAMES

                                                                                    static readonly LEVEL_NAMES: string[];
                                                                                    • A list of all lower case LoggerLevel names.

                                                                                      **See** LoggerLevel

                                                                                    property ROOT_NAME

                                                                                    static readonly ROOT_NAME: string;
                                                                                    • The name of the root sfdx Logger.

                                                                                    method addField

                                                                                    addField: (name: string, value: FieldValue) => Logger;
                                                                                    • Add a field to all log lines for this logger. For convenience this object is returned.

                                                                                      Parameter name

                                                                                      The name of the field to add.

                                                                                      Parameter value

                                                                                      The value of the field to be logged.

                                                                                    method child

                                                                                    static child: (name: string, fields?: Fields) => Promise<Logger>;
                                                                                    • Create a child of the root logger, inheriting this instance's configuration such as level, transports, etc.

                                                                                      Parameter name

                                                                                      The name of the child logger.

                                                                                      Parameter fields

                                                                                      Additional fields included in all log lines.

                                                                                    • Create a child logger, typically to add a few log record fields. For convenience this object is returned.

                                                                                      Parameter name

                                                                                      The name of the child logger that is emitted w/ log line. Will be prefixed with the parent logger name and :

                                                                                      Parameter fields

                                                                                      Additional fields included in all log lines for the child logger.

                                                                                    method childFromRoot

                                                                                    static childFromRoot: (name: string, fields?: Fields) => Logger;
                                                                                    • Create a child of the root logger, inheriting this instance's configuration such as level, transports, etc.

                                                                                      Parameter name

                                                                                      The name of the child logger.

                                                                                      Parameter fields

                                                                                      Additional fields included in all log lines.

                                                                                    method debug

                                                                                    debug: (...args: unknown[]) => Logger;
                                                                                    • Logs at debug level with filtering applied. For convenience this object is returned.

                                                                                      Parameter args

                                                                                      Any number of arguments to be logged.

                                                                                    method debugCallback

                                                                                    debugCallback: (cb: () => unknown[] | string) => void;
                                                                                    • Logs at debug level with filtering applied.

                                                                                      Parameter cb

                                                                                      A callback that returns on array objects to be logged.

                                                                                    method destroyRoot

                                                                                    static destroyRoot: () => void;
                                                                                    • Destroys the root Logger.

                                                                                    method error

                                                                                    error: (...args: unknown[]) => Logger;
                                                                                    • Logs at error level with filtering applied. For convenience this object is returned.

                                                                                      Parameter args

                                                                                      Any number of arguments to be logged.

                                                                                    method fatal

                                                                                    fatal: (...args: unknown[]) => Logger;
                                                                                    • Logs at fatal level with filtering applied. For convenience this object is returned.

                                                                                      Parameter args

                                                                                      Any number of arguments to be logged.

                                                                                    method getBufferedRecords

                                                                                    getBufferedRecords: () => LogLine[];
                                                                                    • Gets an array of log line objects. Each element is an object that corresponds to a log line.

                                                                                    method getLevel

                                                                                    getLevel: () => LoggerLevelValue;
                                                                                    • Gets the current level of this logger.

                                                                                    method getLevelByName

                                                                                    static getLevelByName: (levelName: string) => LoggerLevelValue;
                                                                                    • Gets a numeric LoggerLevel value by string name.

                                                                                      Parameter levelName

                                                                                      The level name to convert to a LoggerLevel enum value.

                                                                                      **Throws** *SfError{ name: 'UnrecognizedLoggerLevelNameError' }* The level name was not case-insensitively recognized as a valid LoggerLevel value.

                                                                                      See Also

                                                                                    method getName

                                                                                    getName: () => string;
                                                                                    • Gets the name of this logger.

                                                                                    method getRawLogger

                                                                                    getRawLogger: () => PinoLogger;
                                                                                    • get the bare (pino) logger instead of using the class hierarchy

                                                                                    method getRawRootLogger

                                                                                    static getRawRootLogger: () => PinoLogger;
                                                                                    • get the bare (pino) logger instead of using the class hierarchy

                                                                                    method getRoot

                                                                                    static getRoot: () => Logger;
                                                                                    • Gets the root logger. It's a singleton

                                                                                    method info

                                                                                    info: (...args: unknown[]) => Logger;
                                                                                    • Logs at info level with filtering applied. For convenience this object is returned.

                                                                                      Parameter args

                                                                                      Any number of arguments to be logged.

                                                                                    method readLogContentsAsText

                                                                                    readLogContentsAsText: () => string;
                                                                                    • Reads a text blob of all the log lines contained in memory or the log file.

                                                                                    method root

                                                                                    static root: () => Promise<Logger>;
                                                                                    • Gets the root logger. It's a singleton See also getRawLogger if you don't need the root logger

                                                                                    method setLevel

                                                                                    setLevel: (level?: LoggerLevelValue) => Logger;
                                                                                    • Set the logging level of all streams for this logger. If a specific level is not provided, this method will attempt to read it from the environment variable SFDX_LOG_LEVEL, and if not found, Logger.DEFAULT_LOG_LEVEL will be used instead. For convenience this object is returned.

                                                                                      Parameter level

                                                                                      The logger level.

                                                                                      **Throws** *SfError{ name: 'UnrecognizedLoggerLevelNameError' }* A value of level read from SFDX_LOG_LEVEL was invalid.

                                                                                      // Sets the level from the environment or default value
                                                                                      logger.setLevel()
                                                                                      // Set the level from the INFO enum
                                                                                      logger.setLevel(LoggerLevel.INFO)
                                                                                      // Sets the level case-insensitively from a string value
                                                                                      logger.setLevel(Logger.getLevelByName('info'))

                                                                                    method shouldLog

                                                                                    shouldLog: (level: LoggerLevelValue) => boolean;
                                                                                    • Compares the requested log level with the current log level. Returns true if the requested log level is greater than or equal to the current log level.

                                                                                      Parameter level

                                                                                      The requested log level to compare against the currently set log level.

                                                                                    method trace

                                                                                    trace: (...args: any[]) => Logger;
                                                                                    • Logs at trace level with filtering applied. For convenience this object is returned.

                                                                                      Parameter args

                                                                                      Any number of arguments to be logged.

                                                                                    method warn

                                                                                    warn: (...args: unknown[]) => Logger;
                                                                                    • Logs at warn level with filtering applied. For convenience this object is returned.

                                                                                      Parameter args

                                                                                      Any number of arguments to be logged.

                                                                                    class Messages

                                                                                    class Messages<T extends string> {}
                                                                                    • The core message framework manages messages and allows them to be accessible by all plugins and consumers of sfdx-core. It is set up to handle localization down the road at no additional effort to the consumer. Messages can be used for anything from user output (like the console), to error messages, to returned data from a method.

                                                                                      Messages are loaded from loader functions. The loader functions will only run when a message is required. This prevents all messages from being loaded into memory at application startup. The functions can load from memory, a file, or a server.

                                                                                      In the beginning of your app or file, add the loader functions to be used later. If using json or js files in a root messages directory (<moduleRoot>/messages), load the entire directory automatically with Messages.importMessagesDirectory. Message files must be the following formates.

                                                                                      A .json file:

                                                                                      {
                                                                                      "msgKey": "A message displayed in the user",
                                                                                      "msgGroup": {
                                                                                      "anotherMsgKey": "Another message displayed to the user"
                                                                                      },
                                                                                      "listOfMessage": ["message1", "message2"]
                                                                                      }

                                                                                      A .js file:

                                                                                      module.exports = {
                                                                                      msgKey: 'A message displayed in the user',
                                                                                      msgGroup: {
                                                                                      anotherMsgKey: 'Another message displayed to the user'
                                                                                      },
                                                                                      listOfMessage: ['message1', 'message2']
                                                                                      }

                                                                                      A .md file:

                                                                                      # msgKey
                                                                                      A message displayed in the user
                                                                                      # msgGroup.anotherMsgKey
                                                                                      Another message displayed to the user
                                                                                      # listOfMessage
                                                                                      - message1
                                                                                      - message2

                                                                                      The values support [util.format](https://nodejs.org/api/util.html#util_util_format_format_args) style strings that apply the tokens passed into Message.getMessage

                                                                                      **Note:** When running unit tests individually, you may see errors that the messages aren't found. This is because index.js isn't loaded when tests run like they are when the package is required. To allow tests to run, import the message directory in each test (it will only do it once) or load the message file the test depends on individually.

                                                                                      // Create loader functions for all files in the messages directory
                                                                                      Messages.importMessagesDirectory(__dirname);
                                                                                      // or, for ESM code
                                                                                      Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
                                                                                      // Now you can use the messages from anywhere in your code or file.
                                                                                      // If using importMessageDirectory, the bundle name is the file name.
                                                                                      const messages: Messages = Messages.loadMessages(packageName, bundleName);
                                                                                      // Messages now contains all the message in the bundleName file.
                                                                                      messages.getMessage('authInfoCreationError');

                                                                                    constructor

                                                                                    constructor(bundleName: string, locale: string, messages: StoredMessageMap);
                                                                                    • Create a new messages bundle.

                                                                                      **Note:** Use {Messages.loadMessages} unless you are writing your own loader function.

                                                                                      Parameter bundleName

                                                                                      The bundle name.

                                                                                      Parameter locale

                                                                                      The locale.

                                                                                      Parameter messages

                                                                                      The messages. Can not be modified once created.

                                                                                    property bundleName

                                                                                    readonly bundleName: string;
                                                                                    • The bundle name.

                                                                                    property locale

                                                                                    readonly locale: string;
                                                                                    • The locale of the messages in this bundle.

                                                                                    property messages

                                                                                    readonly messages: StoredMessageMap;

                                                                                      property readFile

                                                                                      static readFile: (filePath: string) => AnyJson;
                                                                                      • Internal readFile. Exposed for unit testing. Do not use util/fs.readFile as messages.js should have no internal dependencies.

                                                                                        Parameter filePath

                                                                                        read file target.

                                                                                      method createError

                                                                                      createError: (
                                                                                      key: T,
                                                                                      tokens?: Tokens,
                                                                                      actionTokens?: Tokens,
                                                                                      exitCodeOrCause?: number | Error,
                                                                                      cause?: Error
                                                                                      ) => SfError;
                                                                                      • Convenience method to create errors using message labels.

                                                                                        error.name will be the upper-cased key, remove prefixed error. and will always end in Error. error.actions will be loaded using ${key}.actions if available.

                                                                                        Parameter key

                                                                                        The key of the error message.

                                                                                        Parameter tokens

                                                                                        The error message tokens.

                                                                                        Parameter actionTokens

                                                                                        The action messages tokens.

                                                                                        Parameter exitCodeOrCause

                                                                                        The exit code which will be used by SfdxCommand or the underlying error that caused this error to be raised.

                                                                                        Parameter cause

                                                                                        The underlying error that caused this error to be raised.

                                                                                      method createInfo

                                                                                      createInfo: (
                                                                                      key: T,
                                                                                      tokens?: Tokens,
                                                                                      actionTokens?: Tokens
                                                                                      ) => StructuredMessage;
                                                                                      • Convenience method to create info using message labels.

                                                                                        info.name will be the upper-cased key, remove prefixed info. and will always end in Info. info.actions will be loaded using ${key}.actions if available.

                                                                                        Parameter key

                                                                                        The key of the warning message.

                                                                                        Parameter tokens

                                                                                        The warning message tokens.

                                                                                        Parameter actionTokens

                                                                                        The action messages tokens.

                                                                                      method createWarning

                                                                                      createWarning: (
                                                                                      key: T,
                                                                                      tokens?: Tokens,
                                                                                      actionTokens?: Tokens
                                                                                      ) => StructuredMessage;
                                                                                      • Convenience method to create warning using message labels.

                                                                                        warning.name will be the upper-cased key, remove prefixed warning. and will always end in Warning. warning.actions will be loaded using ${key}.actions if available.

                                                                                        Parameter key

                                                                                        The key of the warning message.

                                                                                        Parameter tokens

                                                                                        The warning message tokens.

                                                                                        Parameter actionTokens

                                                                                        The action messages tokens.

                                                                                      method generateFileLoaderFunction

                                                                                      static generateFileLoaderFunction: (
                                                                                      bundleName: string,
                                                                                      filePath: string
                                                                                      ) => LoaderFunction<string>;
                                                                                      • Generate a file loading function. Use Messages.importMessageFile unless overriding the bundleName is required, then manually pass the loader function to Messages.setLoaderFunction.

                                                                                        Parameter bundleName

                                                                                        The name of the bundle.

                                                                                        Parameter filePath

                                                                                        The messages file path.

                                                                                      method getLocale

                                                                                      static getLocale: () => string;
                                                                                      • Get the locale. This will always return 'en_US' but will return the machine's locale in the future.

                                                                                      method getMessage

                                                                                      getMessage: (key: T, tokens?: Tokens) => string;
                                                                                      • Get a message using a message key and use the tokens as values for tokenization.

                                                                                        If the key happens to be an array of messages, it will combine with OS.EOL.

                                                                                        Parameter key

                                                                                        The key of the message.

                                                                                        Parameter tokens

                                                                                        The values to substitute in the message.

                                                                                        **See** https://nodejs.org/api/util.html#util_util_format_format_args **Note** Unlike util.format(), specifiers are required for a token to be rendered.

                                                                                      method getMessages

                                                                                      getMessages: (key: T, tokens?: Tokens) => string[];
                                                                                      • Get messages using a message key and use the tokens as values for tokenization.

                                                                                        This will return all messages if the key is an array in the messages file.

                                                                                        {
                                                                                        "myKey": [ "message1", "message2" ]
                                                                                        }

                                                                                        # myKey
                                                                                        * message1
                                                                                        * message2

                                                                                        Parameter key

                                                                                        The key of the messages.

                                                                                        Parameter tokens

                                                                                        The values to substitute in the message.

                                                                                        **See** https://nodejs.org/api/util.html#util_util_format_format_args **Note** Unlike util.format(), specifiers are required for a token to be rendered.

                                                                                      method importMessageFile

                                                                                      static importMessageFile: (packageName: string, filePath: string) => void;
                                                                                      • Add a single message file to the list of loading functions using the file name as the bundle name. The loader will only be added if the bundle name is not already taken.

                                                                                        Parameter packageName

                                                                                        The npm package name.

                                                                                        Parameter filePath

                                                                                        The path of the file.

                                                                                      method importMessagesDirectory

                                                                                      static importMessagesDirectory: (
                                                                                      moduleDirectoryPath: string,
                                                                                      truncateToProjectPath?: boolean,
                                                                                      packageName?: string
                                                                                      ) => void;
                                                                                      • Import all json and js files in a messages directory. Use the file name as the bundle key when Messages.loadMessages is called. By default, we're assuming the moduleDirectoryPart is a typescript project and will truncate to root path (where the package.json file is). If your messages directory is in another spot or you are not using typescript, pass in false for truncateToProjectPath.

                                                                                        // e.g. If your message directory is in the project root, you would do:
                                                                                        Messages.importMessagesDirectory(__dirname);

                                                                                        Parameter moduleDirectoryPath

                                                                                        The path to load the messages folder.

                                                                                        Parameter truncateToProjectPath

                                                                                        Will look for the messages directory in the project root (where the package.json file is located). i.e., the module is typescript and the messages folder is in the top level of the module directory.

                                                                                        Parameter packageName

                                                                                        The npm package name. Figured out from the root directory's package.json.

                                                                                      method importMessagesDirectoryFromMetaUrl

                                                                                      static importMessagesDirectoryFromMetaUrl: (
                                                                                      metaUrl: string,
                                                                                      truncateToProjectPath?: boolean,
                                                                                      packageName?: string
                                                                                      ) => void;
                                                                                      • Support ESM plugins who can't use __dirname

                                                                                        Parameter metaUrl

                                                                                        pass in import.meta.url

                                                                                        Parameter truncateToProjectPath

                                                                                        Will look for the messages directory in the project root (where the package.json file is located). i.e., the module is typescript and the messages folder is in the top level of the module directory.

                                                                                        Parameter packageName

                                                                                        The npm package name. Figured out from the root directory's package.json.

                                                                                      method isCached

                                                                                      static isCached: (packageName: string, bundleName: string) => boolean;
                                                                                      • Check if a bundle already been loaded.

                                                                                        Parameter packageName

                                                                                        The npm package name.

                                                                                        Parameter bundleName

                                                                                        The bundle name.

                                                                                      method loadMessages

                                                                                      static loadMessages: (
                                                                                      packageName: string,
                                                                                      bundleName: string
                                                                                      ) => Messages<string>;
                                                                                      • Load messages for a given package and bundle. If the bundle is not already cached, use the loader function created from Messages.setLoaderFunction or Messages.importMessagesDirectory.

                                                                                        Messages.importMessagesDirectory(__dirname);
                                                                                        const messages = Messages.loadMessages('packageName', 'bundleName');

                                                                                        Parameter packageName

                                                                                        The name of the npm package.

                                                                                        Parameter bundleName

                                                                                        The name of the bundle to load.

                                                                                      method setLoaderFunction

                                                                                      static setLoaderFunction: (
                                                                                      packageName: string,
                                                                                      bundle: string,
                                                                                      loader: LoaderFunction<string>
                                                                                      ) => void;
                                                                                      • Set a custom loader function for a package and bundle that will be called on Messages.loadMessages.

                                                                                        Parameter packageName

                                                                                        The npm package name.

                                                                                        Parameter bundle

                                                                                        The name of the bundle.

                                                                                        Parameter loader

                                                                                        The loader function.

                                                                                      class Mutex

                                                                                      class Mutex {}
                                                                                      • A mutual exclusion (mutex) class that ensures only one asynchronous operation can execute at a time, providing thread-safe execution of critical sections.

                                                                                        Example 1

                                                                                        const mutex = new Mutex();
                                                                                        // Only one of these will execute at a time
                                                                                        mutex.lock(async () => {
                                                                                        // Critical section code here
                                                                                        return someAsyncOperation();
                                                                                        });

                                                                                      method lock

                                                                                      lock: <T>(fn: () => Promise<T> | T) => Promise<T>;
                                                                                      • Acquires the mutex lock and executes the provided function. The function will not execute until all previously queued operations complete.

                                                                                        T - The return type of the function

                                                                                        Parameter fn

                                                                                        The function to execute while holding the mutex lock. Can be synchronous or asynchronous.

                                                                                        Returns

                                                                                        A promise that resolves with the result of the function execution

                                                                                        Example 1

                                                                                        const result = await mutex.lock(async () => {
                                                                                        // This code is guaranteed to run exclusively
                                                                                        return await someAsyncOperation();
                                                                                        });

                                                                                      class MyDomainResolver

                                                                                      class MyDomainResolver extends AsyncOptionalCreatable<MyDomainResolver.Options> {}
                                                                                      • A class used to resolve MyDomains. After a ScratchOrg is created its host name my not be propagated to the Salesforce DNS service. This service is not exclusive to Salesforce My Domain URL and could be used for any hostname.

                                                                                        (async () => {
                                                                                        const options: MyDomainResolver.Options = {
                                                                                        url: new URL('http://mydomain.salesforce.com'),
                                                                                        timeout: Duration.minutes(5),
                                                                                        frequency: Duration.seconds(10)
                                                                                        };
                                                                                        const resolver: MyDomainResolver = await MyDomainResolver.create(options);
                                                                                        const ipAddress: AnyJson = await resolver.resolve();
                                                                                        console.log(`Successfully resolved host: ${options.url} to address: ${ipAddress}`);
                                                                                        })();

                                                                                      constructor

                                                                                      constructor(options?: MyDomainResolver.Options);
                                                                                      • Constructor **Do not directly construct instances of this class -- use MyDomainResolver.create instead.**

                                                                                        Parameter options

                                                                                        The options for the class instance

                                                                                      property DEFAULT_DOMAIN

                                                                                      static DEFAULT_DOMAIN: URL;

                                                                                        method getFrequency

                                                                                        getFrequency: () => Duration;

                                                                                          method getTimeout

                                                                                          getTimeout: () => Duration;

                                                                                            method init

                                                                                            protected init: () => Promise<void>;
                                                                                            • Used to initialize asynchronous components.

                                                                                            method resolve

                                                                                            resolve: () => Promise<string>;
                                                                                            • Method that performs the dns lookup of the host. If the lookup fails the internal polling client will try again given the optional interval. Returns the resolved ip address.

                                                                                              If SFDX_DISABLE_DNS_CHECK environment variable is set to true, it will immediately return the host without executing the dns loookup.

                                                                                            class Org

                                                                                            class Org extends AsyncOptionalCreatable<Org.Options> {}
                                                                                            • Provides a way to manage a locally authenticated Org.

                                                                                              **See** AuthInfo

                                                                                              **See** Connection

                                                                                              **See** Aliases

                                                                                              **See** Config

                                                                                              // Email username
                                                                                              const org1: Org = await Org.create({ aliasOrUsername: 'foo@example.com' });
                                                                                              // The target-org config property
                                                                                              const org2: Org = await Org.create();
                                                                                              // Full Connection
                                                                                              const org3: Org = await Org.create({
                                                                                              connection: await Connection.create({
                                                                                              authInfo: await AuthInfo.create({ username: 'username' })
                                                                                              })
                                                                                              });

                                                                                              **See** https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_cli_usernames_orgs.htm

                                                                                            constructor

                                                                                            constructor(options?: Org.Options);

                                                                                            method addUsername

                                                                                            addUsername: (auth: AuthInfo | string) => Promise<Org>;
                                                                                            • Adds a username to the user config for this org. For convenience this object is returned.

                                                                                              const org: Org = await Org.create({
                                                                                              connection: await Connection.create({
                                                                                              authInfo: await AuthInfo.create('foo@example.com')
                                                                                              })
                                                                                              });
                                                                                              const userAuth: AuthInfo = await AuthInfo.create({
                                                                                              username: 'bar@example.com'
                                                                                              });
                                                                                              await org.addUsername(userAuth);

                                                                                              Parameter auth

                                                                                              The AuthInfo for the username to add.

                                                                                            method checkScratchOrg

                                                                                            checkScratchOrg: (
                                                                                            devHubUsernameOrAlias?: string
                                                                                            ) => Promise<Partial<AuthFields>>;
                                                                                            • Check that this org is a scratch org by asking the dev hub if it knows about it.

                                                                                              **Throws** *SfError{ name: 'NotADevHubError' }* Not a Dev Hub.

                                                                                              **Throws** *SfError{ name: 'NoResultsError' }* No results.

                                                                                              Parameter devHubUsernameOrAlias

                                                                                              The username or alias of the dev hub org.

                                                                                            method cleanLocalOrgData

                                                                                            cleanLocalOrgData: (
                                                                                            orgDataPath?: string,
                                                                                            throwWhenRemoveFails?: boolean
                                                                                            ) => Promise<void>;
                                                                                            • Clean all data files in the org's data path. Usually /.sfdx/orgs/.

                                                                                              Parameter orgDataPath

                                                                                              A relative path other than "orgs/".

                                                                                              Parameter throwWhenRemoveFails

                                                                                              Should the remove org operations throw an error on failure?

                                                                                            method cloneSandbox

                                                                                            cloneSandbox: (
                                                                                            sandboxReq: SandboxRequest,
                                                                                            sourceSandboxName: string,
                                                                                            options: { wait?: Duration; interval?: Duration }
                                                                                            ) => Promise<SandboxProcessObject>;
                                                                                            • Parameter sandboxReq

                                                                                              SandboxRequest options to create the sandbox with

                                                                                              Parameter sourceSandboxName

                                                                                              the name of the sandbox that your new sandbox will be based on

                                                                                              Parameter options

                                                                                              Wait: The amount of time to wait before timing out, defaults to 0, Interval: The time interval between polling defaults to 30 seconds

                                                                                              Returns

                                                                                              {SandboxProcessObject} the newly created sandbox process object

                                                                                            method createSandbox

                                                                                            createSandbox: (
                                                                                            sandboxReq: SandboxRequest,
                                                                                            options?: { wait?: Duration; interval?: Duration; async?: boolean }
                                                                                            ) => Promise<SandboxProcessObject>;
                                                                                            • create a sandbox from a production org 'this' needs to be a production org with sandbox licenses available

                                                                                              Parameter sandboxReq

                                                                                              SandboxRequest options to create the sandbox with

                                                                                              Parameter options

                                                                                              Wait: The amount of time to wait before timing out, Interval: The time interval between polling

                                                                                            method delete

                                                                                            delete: () => Promise<void>;
                                                                                            • Will delete 'this' instance remotely and any files locally

                                                                                            method deleteFrom

                                                                                            deleteFrom: (controllingOrg: string | Org) => Promise<void>;
                                                                                            • Will delete 'this' instance remotely and any files locally

                                                                                              Parameter controllingOrg

                                                                                              username or Org that 'this.devhub' or 'this.production' refers to. AKA a DevHub for a scratch org, or a Production Org for a sandbox

                                                                                            method determineIfDevHubOrg

                                                                                            determineIfDevHubOrg: (forceServerCheck?: boolean) => Promise<boolean>;
                                                                                            • Returns true if the org is a Dev Hub.

                                                                                              Use a cached value. If the cached value is not set, then check access to the ScratchOrgInfo object to determine if the org is a dev hub.

                                                                                              Parameter forceServerCheck

                                                                                              Ignore the cached value and go straight to the server which will be required if the org flips on the dev hub after the value is already cached locally.

                                                                                            method determineIfSandbox

                                                                                            determineIfSandbox: () => Promise<boolean>;
                                                                                            • Returns true if the org is a sandbox.

                                                                                              Use a cached value. If the cached value is not set, then check Organization.IsSandbox == true && Organization.TrialExpirationDate == null using Org.retrieveOrganizationInformation.

                                                                                            method determineIfScratch

                                                                                            determineIfScratch: () => Promise<boolean>;
                                                                                            • Returns true if the org is a scratch org.

                                                                                              Use a cached value. If the cached value is not set, then check Organization.IsSandbox == true && Organization.TrialExpirationDate != null using Org.retrieveOrganizationInformation.

                                                                                            method getConfigAggregator

                                                                                            getConfigAggregator: () => ConfigAggregator;
                                                                                            • Returns for the config aggregator.

                                                                                            method getConnection

                                                                                            getConnection: (apiVersion?: string) => Connection;
                                                                                            • Returns the JSForce connection for the org. side effect: If you pass it an apiVersion, it will set it on the Org so that future calls to getConnection() will also use that version.

                                                                                              Parameter apiVersion

                                                                                              The API version to use for the connection.

                                                                                            method getDefaultOptions

                                                                                            protected getDefaultOptions: () => Org.Options;
                                                                                            • **Throws** *SfError{ name: 'NotSupportedError' }* Throws an unsupported error.

                                                                                            method getDevHubOrg

                                                                                            getDevHubOrg: () => Promise<Org | undefined>;
                                                                                            • Returns the Org object or null if this org is not affiliated with a Dev Hub (according to the local config).

                                                                                            method getField

                                                                                            getField: <T = AnyJson>(key: Org.Fields) => T;
                                                                                            • Returns an org field. Returns undefined if the field is not set or invalid.

                                                                                            method getFields

                                                                                            getFields: (keys: Org.Fields[]) => JsonMap;
                                                                                            • Returns a map of requested fields.

                                                                                            method getFrontDoorUrl

                                                                                            getFrontDoorUrl: (redirectUri?: string) => Promise<string>;
                                                                                            • Get a Frontdoor URL

                                                                                              This uses the UI Bridge API to generate a single-use Frontdoor URL: https://help.salesforce.com/s/articleView?id=xcloud.frontdoor_singleaccess.htm&type=5

                                                                                            method getMetadataUIURL

                                                                                            getMetadataUIURL: (typeName: string, file: string) => Promise<string>;
                                                                                            • Generate a URL to a metadata UI builder/setup section in an org.

                                                                                              Bot: open in Agentforce Builder ApexPage: opens page Flow: open in Flow Builder FlexiPage: open in Lightning App Builder CustomObject: open in Object Manager ApexClass: open in Setup -> Apex Classes UI

                                                                                              if you pass any other metadata type you'll get a path to Lightning App Builder

                                                                                              Example 1

                                                                                              // use SDR resolver: import { MetadataResolver } from '@salesforce/source-deploy-retrieve';

                                                                                              const metadataResolver = new MetadataResolver(); const components = metadataResolver.getComponentsFromPath(filePath); const typeName = components[0]?.type?.name;

                                                                                              const metadataBuilderUrl = await org.getMetadataUIURL(typeName, filePath);

                                                                                              Bot | ApexPage | Flow | FlexiPage | CustomObject | ApexClass Absolute file path to the metadata file

                                                                                            method getOrgId

                                                                                            getOrgId: () => string;
                                                                                            • Returns the orgId for this org.

                                                                                            method getSandboxConfig

                                                                                            getSandboxConfig: (orgId: string) => Promise<Nullable<SandboxFields>>;
                                                                                            • get the sandbox config for the given orgId

                                                                                              Parameter orgId

                                                                                              orgId of the sandbox

                                                                                            method getUsername

                                                                                            getUsername: () => string | undefined;
                                                                                            • Returns the admin username used to create the org.

                                                                                            method init

                                                                                            protected init: () => Promise<void>;
                                                                                            • Initialize async components.

                                                                                            method isDevHubOrg

                                                                                            isDevHubOrg: () => boolean;
                                                                                            • Returns true if the org is a Dev Hub.

                                                                                              **Note** This relies on a cached value in the auth file. If that property is not cached, this method will **always return false even if the org is a dev hub**. If you need accuracy, use the Org.determineIfDevHubOrg method.

                                                                                            method isSandbox

                                                                                            isSandbox: () => Promise<boolean>;
                                                                                            • Check if org is a sandbox org by checking its SandboxOrgConfig.

                                                                                            method isScratch

                                                                                            isScratch: () => boolean;
                                                                                            • Returns true if the org is a scratch org.

                                                                                              **Note** This relies on a cached value in the auth file. If that property is not cached, this method will **always return false even if the org is a scratch org**. If you need accuracy, use the Org.determineIfScratch method.

                                                                                            method querySandboxInfo

                                                                                            querySandboxInfo: (by: SandboxInfoQueryFields) => Promise<SandboxInfo>;

                                                                                              method querySandboxProcessById

                                                                                              querySandboxProcessById: (id: string) => Promise<SandboxProcessObject>;
                                                                                              • query SandboxProcess via Id

                                                                                                Parameter id

                                                                                                SandboxProcessId to query for

                                                                                              method querySandboxProcessByOrgId

                                                                                              querySandboxProcessByOrgId: (
                                                                                              sandboxOrgId: string
                                                                                              ) => Promise<SandboxProcessObject>;
                                                                                              • query SandboxProcess via SandboxOrganization (sandbox Org ID)

                                                                                                Parameter sandboxOrgId

                                                                                                SandboxOrganization ID to query for

                                                                                              method querySandboxProcessBySandboxInfoId

                                                                                              querySandboxProcessBySandboxInfoId: (
                                                                                              id: string
                                                                                              ) => Promise<SandboxProcessObject>;
                                                                                              • query SandboxProcess via SandboxInfoId

                                                                                                Parameter id

                                                                                                SandboxInfoId to query for

                                                                                              method querySandboxProcessBySandboxName

                                                                                              querySandboxProcessBySandboxName: (
                                                                                              name: string
                                                                                              ) => Promise<SandboxProcessObject>;
                                                                                              • query SandboxProcess via sandbox name

                                                                                                Parameter name

                                                                                                SandboxName to query for

                                                                                              method readUserAuthFiles

                                                                                              readUserAuthFiles: () => Promise<AuthInfo[]>;
                                                                                              • Reads and returns the content of all user auth files for this org as an array.

                                                                                              method refreshAuth

                                                                                              refreshAuth: () => Promise<ReturnType<Connection['refreshAuth']>>;
                                                                                              • Executes a GET request on the baseUrl to force an auth refresh. This is useful for the raw methods (request, requestRaw) that use the accessToken directly and don't handle refreshes.

                                                                                                This method issues a request using the current access token to check if it is still valid. If the request returns 200, no refresh happens, and we keep the token. If it returns 401, jsforce will request a new token and set it in the connection instance.

                                                                                              method refreshSandbox

                                                                                              refreshSandbox: (
                                                                                              sandboxInfo: SandboxInfo,
                                                                                              options?: { wait?: Duration; interval?: Duration; async?: boolean }
                                                                                              ) => Promise<SandboxProcessObject>;
                                                                                              • Refresh (update) a sandbox from a production org. 'this' needs to be a production org with sandbox licenses available

                                                                                                Parameter sandboxInfo

                                                                                                SandboxInfo to update the sandbox with

                                                                                                Parameter options

                                                                                                Wait: The amount of time to wait before timing out, Interval: The time interval between polling

                                                                                              method remove

                                                                                              remove: (throwWhenRemoveFails?: boolean) => Promise<void>;
                                                                                              • Cleans up all org related artifacts including users, sandbox config (if a sandbox), source tracking files, and auth file.

                                                                                                Parameter throwWhenRemoveFails

                                                                                                Determines if the call should throw an error or fail silently.

                                                                                              method removeUsername

                                                                                              removeUsername: (auth: AuthInfo | string) => Promise<Org>;
                                                                                              • Removes a username from the user config for this object. For convenience this object is returned.

                                                                                                **Throws** *SfError{ name: 'MissingAuthInfoError' }* Auth info is missing.

                                                                                                Parameter auth

                                                                                                The AuthInfo containing the username to remove.

                                                                                              method resumeSandbox

                                                                                              resumeSandbox: (
                                                                                              resumeSandboxRequest: ResumeSandboxRequest,
                                                                                              options?: { wait?: Duration; interval?: Duration; async?: boolean }
                                                                                              ) => Promise<SandboxProcessObject>;
                                                                                              • Resume a sandbox create or refresh from a production org. this needs to be a production org with sandbox licenses available.

                                                                                                Parameter resumeSandboxRequest

                                                                                                SandboxRequest options to create/refresh the sandbox with

                                                                                                Parameter options

                                                                                                Wait: The amount of time to wait (default: 0 minutes) before timing out, Interval: The time interval (default: 30 seconds) between polling

                                                                                              method retrieveMaxApiVersion

                                                                                              retrieveMaxApiVersion: () => Promise<string>;
                                                                                              • Retrieves the highest api version that is supported by the target server instance. If the apiVersion configured for Sfdx is greater than the one returned in this call an api version mismatch occurs. In the case of the CLI that results in a warning.

                                                                                              method retrieveOrganizationInformation

                                                                                              retrieveOrganizationInformation: () => Promise<OrganizationInformation>;
                                                                                              • Retrieve a handful of fields from the Organization table in Salesforce. If this does not have the data you need, just use Connection.singleRecordQuery with SELECT <needed fields> FROM Organization.

                                                                                                Returns

                                                                                                org information

                                                                                              method retrieveOrgUsersConfig

                                                                                              retrieveOrgUsersConfig: () => Promise<OrgUsersConfig>;

                                                                                              method sandboxStatus

                                                                                              sandboxStatus: (
                                                                                              sandboxname: string,
                                                                                              options: { wait?: Duration; interval?: Duration }
                                                                                              ) => Promise<SandboxProcessObject>;
                                                                                              • Reports sandbox org creation status. If the org is ready, authenticates to the org.

                                                                                                Parameter string

                                                                                                the sandbox name

                                                                                                Parameter options

                                                                                                Wait: The amount of time to wait before timing out, Interval: The time interval between polling

                                                                                                Returns

                                                                                                {SandboxProcessObject} the sandbox process object

                                                                                              method scratchOrgCreate

                                                                                              scratchOrgCreate: (
                                                                                              options: ScratchOrgRequest
                                                                                              ) => Promise<ScratchOrgCreateResult>;
                                                                                              • Creates a scratchOrg 'this' needs to be a valid dev-hub

                                                                                                Parameter ScratchOrgCreateOptions

                                                                                                Returns

                                                                                                {ScratchOrgCreateResult}

                                                                                              method setSandboxConfig

                                                                                              setSandboxConfig: (orgId: string, config: SandboxFields) => Promise<Org>;
                                                                                              • set the sandbox config related to this given org

                                                                                                Parameter orgId

                                                                                                orgId of the sandbox

                                                                                                Parameter config

                                                                                                config of the sandbox

                                                                                              method setTracksSource

                                                                                              setTracksSource: (value: boolean) => Promise<void>;
                                                                                              • Set the tracking property on the org's auth file

                                                                                                Parameter value

                                                                                                true or false (whether the org should use source tracking or not)

                                                                                              method supportsSourceTracking

                                                                                              supportsSourceTracking: () => Promise<boolean>;

                                                                                                method tracksSource

                                                                                                tracksSource: () => Promise<boolean>;
                                                                                                • Returns true if the org uses source tracking. Side effect: updates files where the property doesn't currently exist

                                                                                                method updateLocalInformation

                                                                                                updateLocalInformation: () => Promise<
                                                                                                | Pick<
                                                                                                AuthFields,
                                                                                                | Org.Fields.NAME
                                                                                                | Org.Fields.INSTANCE_NAME
                                                                                                | Org.Fields.NAMESPACE_PREFIX
                                                                                                | Org.Fields.IS_SANDBOX
                                                                                                | Org.Fields.IS_SCRATCH
                                                                                                | Org.Fields.TRIAL_EXPIRATION_DATE
                                                                                                | Org.Fields.ORG_EDITION
                                                                                                >
                                                                                                | undefined
                                                                                                >;
                                                                                                • Some organization information is locally cached, such as if the org name or if it is a scratch org. This method populates/updates the filesystem from information retrieved from the org.

                                                                                                class OrgUsersConfig

                                                                                                class OrgUsersConfig extends ConfigFile<OrgUsersConfig.Options, UserConfig> {}
                                                                                                • A config file that stores usernames for an org.

                                                                                                constructor

                                                                                                constructor(options?: OrgUsersConfig.Options);
                                                                                                • Constructor. **Do not directly construct instances of this class -- use OrgUsersConfig.create instead.**

                                                                                                  Parameter options

                                                                                                  The options for the class instance

                                                                                                method getOptions

                                                                                                static getOptions: (orgId: string) => OrgUsersConfig.Options;
                                                                                                • Gets the config options for a given org ID.

                                                                                                  Parameter orgId

                                                                                                  The orgId. Generally this org would have multiple users configured.

                                                                                                class PermissionSetAssignment

                                                                                                class PermissionSetAssignment {}
                                                                                                • A class for assigning a Salesforce User to one or more permission sets.

                                                                                                method create

                                                                                                create: (
                                                                                                id: string,
                                                                                                permSetString: string
                                                                                                ) => Promise<PermissionSetAssignmentFields>;
                                                                                                • Assigns a user to one or more permission sets.

                                                                                                  Parameter id

                                                                                                  A user id

                                                                                                  Parameter permSetString

                                                                                                  An array of permission set names.

                                                                                                method init

                                                                                                static init: (org: Org) => Promise<PermissionSetAssignment>;
                                                                                                • Creates a new instance of PermissionSetAssignment.

                                                                                                  Parameter org

                                                                                                  The target org for the assignment.

                                                                                                class PollingClient

                                                                                                class PollingClient extends AsyncOptionalCreatable<PollingClient.Options> {}
                                                                                                • This is a polling client that can be used to poll the status of long running tasks. It can be used as a replacement for Streaming when streaming topics are not available or when streaming handshakes are failing. Why wouldn't you want to use this? It can impact Salesforce API usage.

                                                                                                  const options: PollingClient.Options = {
                                                                                                  async poll(): Promise<StatusResult> {
                                                                                                  return Promise.resolve({ completed: true, payload: 'Hello World' });
                                                                                                  },
                                                                                                  frequency: Duration.milliseconds(10),
                                                                                                  timeout: Duration.minutes(1)
                                                                                                  };
                                                                                                  const client = await PollingClient.create(options);
                                                                                                  const pollResult = await client.subscribe();
                                                                                                  console.log(`pollResult: ${pollResult}`);

                                                                                                constructor

                                                                                                constructor(options?: PollingClient.Options);
                                                                                                • Constructor

                                                                                                  Parameter options

                                                                                                  Polling client options

                                                                                                property logger

                                                                                                protected logger: Logger;

                                                                                                  method init

                                                                                                  init: () => Promise<void>;
                                                                                                  • Asynchronous initializer.

                                                                                                  method subscribe

                                                                                                  subscribe: <T = AnyJson>() => Promise<T>;
                                                                                                  • Returns a promise to call the specified polling function using the interval and timeout specified in the polling options.

                                                                                                  class SandboxRequestCache

                                                                                                  class SandboxRequestCache extends TTLConfig<
                                                                                                  TTLConfig.Options,
                                                                                                  SandboxRequestCacheEntry
                                                                                                  > {}

                                                                                                    method getDefaultOptions

                                                                                                    static getDefaultOptions: () => TTLConfig.Options;

                                                                                                      method getFileName

                                                                                                      static getFileName: () => string;

                                                                                                        method set

                                                                                                        static set: (
                                                                                                        key: string,
                                                                                                        sandboxProcessObject: SandboxRequestCacheEntry
                                                                                                        ) => Promise<void>;

                                                                                                          method unset

                                                                                                          static unset: (key: string) => Promise<void>;

                                                                                                            class SchemaValidator

                                                                                                            class SchemaValidator {}
                                                                                                            • Loads a JSON schema and performs validations against JSON objects.

                                                                                                              Deprecated

                                                                                                              For sfdx-project.json and scratch org definitions, use the exported zod schemas (ProjectJsonSchema, ScratchOrgDefSchema) from '@salesforce/core'. For custom schemas, use a schema validator library like zod directly.

                                                                                                            constructor

                                                                                                            constructor(logger: Logger, schemaPath: string);
                                                                                                            • Creates a new SchemaValidator instance given a logger and path to a schema file.

                                                                                                              Parameter logger

                                                                                                              An Logger instance on which to base this class's logger.

                                                                                                              Parameter schemaPath

                                                                                                              The path to the schema file to load and use for validation.

                                                                                                            method load

                                                                                                            load: () => Promise<JsonMap>;
                                                                                                            • Loads a JSON schema from the schemaPath parameter provided at instantiation.

                                                                                                              Deprecated

                                                                                                              For sfdx-project.json and scratch org definitions, use the exported zod schemas (ProjectJsonSchema, ScratchOrgDefSchema) from '@salesforce/core'. For custom schemas, use a schema validator library like zod directly.

                                                                                                            method loadSync

                                                                                                            loadSync: () => JsonMap;
                                                                                                            • Loads a JSON schema from the schemaPath parameter provided at instantiation.

                                                                                                              Deprecated

                                                                                                              For sfdx-project.json and scratch org definitions, use the exported zod schemas (ProjectJsonSchema, ScratchOrgDefSchema) from '@salesforce/core'. For custom schemas, use a schema validator library like zod directly.

                                                                                                            method validate

                                                                                                            validate: (json: AnyJson) => Promise<AnyJson>;
                                                                                                            • Performs validation of JSON data against the schema located at the schemaPath value provided at instantiation.

                                                                                                              **Throws** *SfError{ name: 'ValidationSchemaFieldError' }* If there are known validations errors. **Throws** *SfError{ name: 'ValidationSchemaUnknownError' }* If there are unknown validations errors.

                                                                                                              Parameter json

                                                                                                              A JSON value to validate against this instance's target schema.

                                                                                                              Returns

                                                                                                              The validated JSON data.

                                                                                                              Deprecated

                                                                                                              For sfdx-project.json and scratch org definitions, use the exported zod schemas (ProjectJsonSchema, ScratchOrgDefSchema) from '@salesforce/core'. For custom schemas, use a schema validator library like zod directly.

                                                                                                            method validateSync

                                                                                                            validateSync: <T extends AnyJson>(json: T) => T;
                                                                                                            • Performs validation of JSON data against the schema located at the schemaPath value provided at instantiation.

                                                                                                              **Throws** *SfError{ name: 'ValidationSchemaFieldError' }* If there are known validations errors. **Throws** *SfError{ name: 'ValidationSchemaUnknownError' }* If there are unknown validations errors.

                                                                                                              Parameter json

                                                                                                              A JSON value to validate against this instance's target schema.

                                                                                                              Returns

                                                                                                              The validated JSON data.

                                                                                                              Deprecated

                                                                                                              For sfdx-project.json and scratch org definitions, use the exported zod schemas (ProjectJsonSchema, ScratchOrgDefSchema) from '@salesforce/core'. For custom schemas, use a schema validator library like zod directly.

                                                                                                            class ScratchOrgCache

                                                                                                            class ScratchOrgCache extends TTLConfig<TTLConfig.Options, CachedOptions> {}

                                                                                                              property encryptedKeys

                                                                                                              protected static readonly encryptedKeys: string[];

                                                                                                                method getDefaultOptions

                                                                                                                static getDefaultOptions: () => TTLConfig.Options;

                                                                                                                  method getFileName

                                                                                                                  static getFileName: () => string;

                                                                                                                    method unset

                                                                                                                    static unset: (key: string) => Promise<void>;

                                                                                                                      class ScratchOrgSettingsGenerator

                                                                                                                      class SettingsGenerator {}
                                                                                                                      • Helper class for dealing with the settings that are defined in a scratch definition file. This class knows how to extract the settings from the definition, how to expand them into a MD directory and how to generate a package.xml.

                                                                                                                      constructor

                                                                                                                      constructor(options?: {
                                                                                                                      mdApiTmpDir?: string;
                                                                                                                      shapeDirName?: string;
                                                                                                                      asDirectory?: boolean;
                                                                                                                      capitalizeRecordTypes?: boolean;
                                                                                                                      });

                                                                                                                        method createDeploy

                                                                                                                        createDeploy: () => Promise<void>;
                                                                                                                        • Create temporary deploy directory used to upload the scratch org shape. This will create the dir, all of the .setting files and minimal object files needed for objectSettings

                                                                                                                        method createDeployPackageContents

                                                                                                                        createDeployPackageContents: (apiVersion: string) => Promise<void>;

                                                                                                                          method deploySettingsViaFolder

                                                                                                                          deploySettingsViaFolder: (
                                                                                                                          scratchOrg: Org,
                                                                                                                          apiVersion: string,
                                                                                                                          timeout?: Duration
                                                                                                                          ) => Promise<void>;
                                                                                                                          • Deploys the settings to the org.

                                                                                                                          method extract

                                                                                                                          extract: (
                                                                                                                          scratchDef: ScratchOrgInfo
                                                                                                                          ) => Promise<{
                                                                                                                          settings: Record<string, unknown> | undefined;
                                                                                                                          objectSettings: { [objectName: string]: any };
                                                                                                                          }>;
                                                                                                                          • extract the settings from the scratch def file, if they are present.

                                                                                                                          method getDestinationPath

                                                                                                                          getDestinationPath: () => string | undefined;
                                                                                                                          • Returns the destination where the writer placed the settings content.

                                                                                                                          method getShapeDirName

                                                                                                                          getShapeDirName: () => string;

                                                                                                                            method hasSettings

                                                                                                                            hasSettings: () => boolean;
                                                                                                                            • True if we are currently tracking setting or object setting data.

                                                                                                                            class SfdcUrl

                                                                                                                            class SfdcUrl extends URL {}

                                                                                                                              constructor

                                                                                                                              constructor(input: any, base?: any);

                                                                                                                                property PRODUCTION

                                                                                                                                static readonly PRODUCTION: string;

                                                                                                                                  property SANDBOX

                                                                                                                                  static readonly SANDBOX: string;
                                                                                                                                  • Salesforce URLs

                                                                                                                                  method checkLightningDomain

                                                                                                                                  checkLightningDomain: () => Promise<true>;
                                                                                                                                  • Tests whether this url has the lightning domain extension This method that performs the dns lookup of the host. If the lookup fails the internal polling (1 second), client will try again until timeout If SF_DOMAIN_RETRY environment variable is set (number) it overrides the default timeout duration (240 seconds)

                                                                                                                                    Returns

                                                                                                                                    {Promise<true | never>} The resolved ip address or never

                                                                                                                                    Throws

                                                                                                                                    SfError If can't resolve DNS.

                                                                                                                                  method getJwtAudienceUrl

                                                                                                                                  getJwtAudienceUrl: (createdOrgInstance?: string) => Promise<string>;
                                                                                                                                  • Returns the appropriate jwt audience url for this url Use SF_AUDIENCE_URL env var to override the audience url

                                                                                                                                    Parameter createdOrgInstance

                                                                                                                                    The Salesforce instance the org was created on. e.g. cs42 {Promise} The audience url

                                                                                                                                  method isInternalUrl

                                                                                                                                  isInternalUrl: () => boolean;
                                                                                                                                  • Tests whether this url is an internal Salesforce domain

                                                                                                                                    Returns

                                                                                                                                    {boolean} true if this is an internal domain

                                                                                                                                  method isLightningDomain

                                                                                                                                  isLightningDomain: () => boolean;
                                                                                                                                  • Test whether this url represents a lightning domain

                                                                                                                                    Returns

                                                                                                                                    {boolean} true if this domain is a lightning domain

                                                                                                                                  method isLocalUrl

                                                                                                                                  isLocalUrl: () => boolean;
                                                                                                                                  • Tests whether this url runs on a local machine

                                                                                                                                    Returns

                                                                                                                                    {boolean} true if this is a local machine

                                                                                                                                  method isSalesforceDomain

                                                                                                                                  isSalesforceDomain: () => boolean;
                                                                                                                                  • Tests whether this url contains a Salesforce owned domain

                                                                                                                                    {boolean} true if this is a salesforce domain

                                                                                                                                  method isValidUrl

                                                                                                                                  static isValidUrl: (input: string | URL) => boolean;

                                                                                                                                    method lookup

                                                                                                                                    lookup: () => Promise<string>;
                                                                                                                                    • Method that performs the dns lookup of the host. If the lookup fails the internal polling (1 second), client will try again until timeout If SF_DOMAIN_RETRY environment variable is set (number) it overrides the default timeout duration (240 seconds)

                                                                                                                                      Returns

                                                                                                                                      the resolved ip address.

                                                                                                                                      Throws

                                                                                                                                      SfError If can't resolve DNS.

                                                                                                                                    method toLightningDomain

                                                                                                                                    toLightningDomain: () => string;

                                                                                                                                      class SfError

                                                                                                                                      class SfError<T extends ErrorDataProperties = ErrorDataProperties> extends Error {}
                                                                                                                                      • A generalized sfdx error which also contains an action. The action is used in the CLI to help guide users past the error.

                                                                                                                                        To throw an error in a synchronous function you must either pass the error message and actions directly to the constructor, e.g.

                                                                                                                                        // To load a message bundle (Note that __dirname should contain a messages folder)
                                                                                                                                        Messages.importMessagesDirectory(__dirname);
                                                                                                                                        const messages = Messages.load('myPackageName', 'myBundleName');
                                                                                                                                        // To throw a non-bundle based error:
                                                                                                                                        throw new SfError(message.getMessage('myError'), 'MyErrorName');

                                                                                                                                      constructor

                                                                                                                                      constructor(
                                                                                                                                      message: string,
                                                                                                                                      name?: string,
                                                                                                                                      actions?: string[],
                                                                                                                                      exitCodeOrCause?: number | Error,
                                                                                                                                      cause?: {}
                                                                                                                                      );
                                                                                                                                      • Create an SfError.

                                                                                                                                        Parameter message

                                                                                                                                        The error message.

                                                                                                                                        Parameter name

                                                                                                                                        The error name. Defaults to 'SfError'.

                                                                                                                                        Parameter actions

                                                                                                                                        The action message(s).

                                                                                                                                        Parameter exitCodeOrCause

                                                                                                                                        The exit code which will be used by SfdxCommand or he underlying error that caused this error to be raised.

                                                                                                                                        Parameter cause

                                                                                                                                        The underlying error that caused this error to be raised.

                                                                                                                                      property actions

                                                                                                                                      actions?: string[];
                                                                                                                                      • Action messages. Hints to the users regarding what can be done to fix related issues.

                                                                                                                                      property code

                                                                                                                                      code: string;

                                                                                                                                        property context

                                                                                                                                        context?: string;
                                                                                                                                        • The related context for this error.

                                                                                                                                        property data

                                                                                                                                        data?: AnyJson;

                                                                                                                                          property exitCode

                                                                                                                                          exitCode: number;
                                                                                                                                          • SfdxCommand can return this process exit code.

                                                                                                                                          property name

                                                                                                                                          readonly name: string;

                                                                                                                                            method create

                                                                                                                                            static create: <T extends AnyJson = AnyJson>(
                                                                                                                                            inputs: SfErrorOptions<T>
                                                                                                                                            ) => SfError<T>;
                                                                                                                                            • like the constructor, but takes an typed object and let you also set context and data properties

                                                                                                                                            method setContext

                                                                                                                                            setContext: (context: string) => SfError;
                                                                                                                                            • Sets the context of the error. For convenience this object is returned.

                                                                                                                                              Parameter context

                                                                                                                                              The command name.

                                                                                                                                            method setData

                                                                                                                                            setData: (data: T) => SfError;
                                                                                                                                            • An additional payload for the error. For convenience this object is returned.

                                                                                                                                              Parameter data

                                                                                                                                              The payload data.

                                                                                                                                            method toObject

                                                                                                                                            toObject: () => SfErrorToObjectResult;
                                                                                                                                            • Convert an SfError state to an object. Returns a plain object representing the state of this error.

                                                                                                                                            method wrap

                                                                                                                                            static wrap: <T extends AnyJson = AnyJson>(err: unknown) => SfError<T>;
                                                                                                                                            • Convert an Error to an SfError.

                                                                                                                                              Parameter err

                                                                                                                                              The error to convert.

                                                                                                                                            class SfProject

                                                                                                                                            class SfProject {}
                                                                                                                                            • Represents an SFDX project directory. This directory contains a SfProjectJson config file as well as a hidden .sfdx folder that contains all the other local project config files.

                                                                                                                                              const project = await SfProject.resolve();
                                                                                                                                              const projectJson = await project.resolveProjectConfig();
                                                                                                                                              console.log(projectJson.sfdcLoginUrl);

                                                                                                                                            constructor

                                                                                                                                            protected constructor(path: string);

                                                                                                                                            method clearInstances

                                                                                                                                            static clearInstances: () => void;
                                                                                                                                            • Clear the cache to force reading from disk.

                                                                                                                                              *NOTE: Only call this method if you must and you know what you are doing.*

                                                                                                                                            method findPackage

                                                                                                                                            findPackage: (
                                                                                                                                            predicate: (packageDir: NamedPackageDir) => boolean
                                                                                                                                            ) => Optional<any>;
                                                                                                                                            • Returns the package directory.

                                                                                                                                              Parameter packageName

                                                                                                                                              Name of the package directory. E.g., 'force-app'

                                                                                                                                            method getActivePackage

                                                                                                                                            getActivePackage: () => Nullable<any>;
                                                                                                                                            • Get the currently activated package on the project. This has no implication on sfdx-project.json but is useful for keeping track of package and source specific options in a process.

                                                                                                                                            method getAliasesFromPackageBundleId

                                                                                                                                            getAliasesFromPackageBundleId: (id: string) => string[];

                                                                                                                                              method getAliasesFromPackageId

                                                                                                                                              getAliasesFromPackageId: (id: string) => string[];

                                                                                                                                                method getDefaultPackage

                                                                                                                                                getDefaultPackage: () => NamedPackageDir;
                                                                                                                                                • Get the project's default package directory defined in sfdx-project.json using first 'default: true' found. The first entry is returned if no default is specified.

                                                                                                                                                method getInstance

                                                                                                                                                static getInstance: (path?: string) => SfProject;
                                                                                                                                                • Get a Project from a given path or from the working directory.

                                                                                                                                                  Parameter path

                                                                                                                                                  The path of the project.

                                                                                                                                                  **Throws** *SfError{ name: 'InvalidProjectWorkspaceError' }* If the current folder is not located in a workspace.

                                                                                                                                                method getPackage

                                                                                                                                                getPackage: (packageName: string) => Optional<any>;
                                                                                                                                                • Returns the package directory.

                                                                                                                                                  Parameter packageName

                                                                                                                                                  Name of the package directory. E.g., 'force-app'

                                                                                                                                                method getPackageAliases

                                                                                                                                                getPackageAliases: () => Nullable<Dictionary<string>>;
                                                                                                                                                • Returns a read-only list of packageDirectories within sfdx-project.json, first reading and validating the file if necessary. i.e. modifying this array will not affect the sfdx-project.json file.

                                                                                                                                                method getPackageBundleAliases

                                                                                                                                                getPackageBundleAliases: () => Nullable<Dictionary<string>>;

                                                                                                                                                  method getPackageBundleIdFromAlias

                                                                                                                                                  getPackageBundleIdFromAlias: (alias: string) => Optional<string>;

                                                                                                                                                    method getPackageDirectories

                                                                                                                                                    getPackageDirectories: () => NamedPackageDir[];
                                                                                                                                                    • Returns a read-only list of packageDirectories within sfdx-project.json, first reading and validating the file if necessary. i.e. modifying this array will not affect the sfdx-project.json file.

                                                                                                                                                    method getPackageFromPath

                                                                                                                                                    getPackageFromPath: (path: string) => Optional<any>;
                                                                                                                                                    • Returns the package from a file path.

                                                                                                                                                      Parameter path

                                                                                                                                                      A file path. E.g. /Users/jsmith/projects/ebikes-lwc/force-app/apex/my-cls.cls

                                                                                                                                                    method getPackageIdFromAlias

                                                                                                                                                    getPackageIdFromAlias: (alias: string) => Optional<string>;

                                                                                                                                                      method getPackageNameFromPath

                                                                                                                                                      getPackageNameFromPath: (path: string) => Optional<string>;
                                                                                                                                                      • Returns the package name, E.g. 'force-app', from a file path.

                                                                                                                                                        Parameter path

                                                                                                                                                        A file path. E.g. /Users/jsmith/projects/ebikes-lwc/force-app/apex/my-cls.cls

                                                                                                                                                      method getPackagePath

                                                                                                                                                      getPackagePath: (packageName: string) => Optional<string>;
                                                                                                                                                      • Returns the absolute path of the package directory ending with the path separator. E.g., /Users/jsmith/projects/ebikes-lwc/force-app/

                                                                                                                                                        Parameter packageName

                                                                                                                                                        Name of the package directory. E.g., 'force-app'

                                                                                                                                                      method getPath

                                                                                                                                                      getPath: () => string;
                                                                                                                                                      • Returns the project path.

                                                                                                                                                      method getPluginConfiguration

                                                                                                                                                      getPluginConfiguration: <T extends Record<string, unknown>>(
                                                                                                                                                      pluginName: string
                                                                                                                                                      ) => Promise<Readonly<T>>;
                                                                                                                                                      • retrieve the configuration for a named plugin from sfdx-project.json.plugins.pluginName

                                                                                                                                                        Example 1

                                                                                                                                                        const project = await SfProject.resolve();
                                                                                                                                                        const pluginConfig = await project.getPluginConfiguration('myPlugin');

                                                                                                                                                        optionally pass a type parameter for your plugin configuration's schema

                                                                                                                                                      method getSfProjectJson

                                                                                                                                                      getSfProjectJson: (isGlobal?: boolean) => SfProjectJson;
                                                                                                                                                      • Get the sfdx-project.json config. The global sfdx-project.json is used for user defaults that are not checked in to the project specific file.

                                                                                                                                                        *Note:* When reading values from SfProjectJson, it is recommended to use SfProject.resolveProjectConfig instead.

                                                                                                                                                        This is the sync method of SfProject.resolveSfProjectJson

                                                                                                                                                        Parameter isGlobal

                                                                                                                                                        True to get the global project file, otherwise the local project config.

                                                                                                                                                      method getUniquePackageDirectories

                                                                                                                                                      getUniquePackageDirectories: () => NamedPackageDir[];
                                                                                                                                                      • Returns a read-only list of packageDirectories within sfdx-project.json, first reading and validating the file if necessary. i.e. modifying this array will not affect the sfdx-project.json file.

                                                                                                                                                        There can be multiple packages in packageDirectories that point to the same directory. This method only returns one packageDirectory entry per unique directory path. This is useful when doing source operations based on directories but probably not as useful for packaging operations that want to do something for each package entry.

                                                                                                                                                      method getUniquePackageNames

                                                                                                                                                      getUniquePackageNames: () => string[];

                                                                                                                                                      method hasMultiplePackageBundles

                                                                                                                                                      hasMultiplePackageBundles: () => boolean;
                                                                                                                                                      • Has multiple package bundles defined in the project.

                                                                                                                                                      method hasMultiplePackages

                                                                                                                                                      hasMultiplePackages: () => boolean;
                                                                                                                                                      • Has multiple package directories (MPD) defined in the project.

                                                                                                                                                      method hasPackageAliases

                                                                                                                                                      hasPackageAliases: () => Promise<boolean>;

                                                                                                                                                        method hasPackages

                                                                                                                                                        hasPackages: () => boolean;
                                                                                                                                                        • Has package directories defined in the project.

                                                                                                                                                        method resolve

                                                                                                                                                        static resolve: (path?: string) => Promise<SfProject>;
                                                                                                                                                        • Get a Project from a given path or from the working directory.

                                                                                                                                                          Parameter path

                                                                                                                                                          The path of the project.

                                                                                                                                                          **Throws** *SfError{ name: 'InvalidProjectWorkspaceError' }* If the current folder is not located in a workspace.

                                                                                                                                                        method resolveProjectConfig

                                                                                                                                                        resolveProjectConfig: () => Promise<JsonMap>;
                                                                                                                                                        • The project config is resolved from local and global SfProjectJson, ConfigAggregator, and a set of defaults. It is recommended to use this when reading values from SfProjectJson.

                                                                                                                                                          The global SfProjectJson is used to allow the user to provide default values they may not want checked into their project's source.

                                                                                                                                                          Returns

                                                                                                                                                          A resolved config object that contains a bunch of different properties, including some 3rd party custom properties.

                                                                                                                                                        method resolveProjectPath

                                                                                                                                                        static resolveProjectPath: (dir?: string) => Promise<string>;
                                                                                                                                                        • Performs an upward directory search for an sfdx project file. Returns the absolute path to the project.

                                                                                                                                                          Parameter dir

                                                                                                                                                          The directory path to start traversing from.

                                                                                                                                                          **Throws** *SfError{ name: 'InvalidProjectWorkspaceError' }* If the current folder is not located in a workspace.

                                                                                                                                                          **See** traverseForFile

                                                                                                                                                          **See** [process.cwd()](https://nodejs.org/api/process.html#process_process_cwd)

                                                                                                                                                        method resolveProjectPathSync

                                                                                                                                                        static resolveProjectPathSync: (dir?: string) => string;
                                                                                                                                                        • Performs a synchronous upward directory search for an sfdx project file. Returns the absolute path to the project.

                                                                                                                                                          Parameter dir

                                                                                                                                                          The directory path to start traversing from.

                                                                                                                                                          **Throws** *SfError{ name: 'InvalidProjectWorkspaceError' }* If the current folder is not located in a workspace.

                                                                                                                                                          **See** traverseForFileSync

                                                                                                                                                          **See** [process.cwd()](https://nodejs.org/api/process.html#process_process_cwd)

                                                                                                                                                        method retrieveSfProjectJson

                                                                                                                                                        retrieveSfProjectJson: (isGlobal?: boolean) => Promise<SfProjectJson>;
                                                                                                                                                        • Get the sfdx-project.json config. The global sfdx-project.json is used for user defaults that are not checked in to the project specific file.

                                                                                                                                                          *Note:* When reading values from SfProjectJson, it is recommended to use SfProject.resolveProjectConfig instead.

                                                                                                                                                          Parameter isGlobal

                                                                                                                                                          True to get the global project file, otherwise the local project config.

                                                                                                                                                        method setActivePackage

                                                                                                                                                        setActivePackage: (packageName: Nullable<string>) => void;
                                                                                                                                                        • Set the currently activated package on the project. This has no implication on sfdx-project.json but is useful for keeping track of package and source specific options in a process.

                                                                                                                                                          Parameter packageName

                                                                                                                                                          The package name to activate. E.g. 'force-app'

                                                                                                                                                        method setPluginConfiguration

                                                                                                                                                        setPluginConfiguration: <T extends Record<string, unknown>>(
                                                                                                                                                        pluginName: string,
                                                                                                                                                        config: T
                                                                                                                                                        ) => Promise<void>;
                                                                                                                                                        • set the configuration for a named plugin from sfdx-project.json.plugins.pluginName, overwriting existing configuration

                                                                                                                                                          Example 1

                                                                                                                                                          const project = await SfProject.resolve();
                                                                                                                                                          const pluginConfig = await project.setPluginConfiguration('myPlugin', {foo: 'bar', myLimit: 25});

                                                                                                                                                          optionally pass a type parameter for your plugin configuration's schema

                                                                                                                                                        class SfProjectJson

                                                                                                                                                        class SfProjectJson extends ConfigFile<ConfigFile.Options, ProjectJson> {}
                                                                                                                                                        • The sfdx-project.json config object. This file determines if a folder is a valid sfdx project.

                                                                                                                                                          *Note:* Any non-standard (not owned by Salesforce) properties stored in sfdx-project.json should be in a top level property that represents your project. Plugins should store their configuration

                                                                                                                                                          Example 1

                                                                                                                                                          reading a standard property

                                                                                                                                                          const project = await SfProject.resolve();
                                                                                                                                                          const projectJson = await project.resolveProjectConfig();
                                                                                                                                                          const namespace = projectJson.get('namespace');

                                                                                                                                                          @example writing
                                                                                                                                                          const project = await SfProject.resolve();
                                                                                                                                                          const projectJson = await project.resolveProjectConfig();
                                                                                                                                                          projectJson.set('namespace', 'new');
                                                                                                                                                          await projectJson.write();

                                                                                                                                                          **See** [force:project:create](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ws_create_new.htm)

                                                                                                                                                          See Also

                                                                                                                                                          • SfProject.getPluginConfiguration and

                                                                                                                                                          • SfProject.setPluginConfiguration

                                                                                                                                                        property BLOCKLIST

                                                                                                                                                        static BLOCKLIST: string[];
                                                                                                                                                        • json properties that are uppercase, or allow uppercase keys inside them

                                                                                                                                                        method addPackageAlias

                                                                                                                                                        addPackageAlias: (alias: string, id: string) => void;
                                                                                                                                                        • Add a package alias to the project. If the alias already exists, it will be overwritten.

                                                                                                                                                          Parameter alias

                                                                                                                                                          Parameter id

                                                                                                                                                        method addPackageBundle

                                                                                                                                                        addPackageBundle: (
                                                                                                                                                        bundleEntry: z.infer<
                                                                                                                                                        z.ZodObject<
                                                                                                                                                        {
                                                                                                                                                        name: z.ZodString;
                                                                                                                                                        versionName: z.ZodString;
                                                                                                                                                        versionNumber: z.ZodString;
                                                                                                                                                        versionDescription: z.ZodOptional<z.ZodString>;
                                                                                                                                                        },
                                                                                                                                                        z.core.$strip
                                                                                                                                                        >
                                                                                                                                                        >
                                                                                                                                                        ) => void;
                                                                                                                                                        • Add a bundle entry to the project. If the bundle entry already exists, the new entry properties will be merged with the existing properties.

                                                                                                                                                          Parameter bundleEntry

                                                                                                                                                        method addPackageBundleAlias

                                                                                                                                                        addPackageBundleAlias: (alias: string, id: string) => void;
                                                                                                                                                        • Add a bundle alias to the project. If the bundle alias already exists, it will be overwritten.

                                                                                                                                                          Parameter alias

                                                                                                                                                          The alias name

                                                                                                                                                          Parameter id

                                                                                                                                                          The bundle ID

                                                                                                                                                        method addPackageDirectory

                                                                                                                                                        addPackageDirectory: (
                                                                                                                                                        packageDir: z.infer<
                                                                                                                                                        z.ZodUnion<
                                                                                                                                                        readonly [
                                                                                                                                                        z.ZodObject<
                                                                                                                                                        {
                                                                                                                                                        default: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
                                                                                                                                                        path: z.ZodString;
                                                                                                                                                        },
                                                                                                                                                        z.core.$strict
                                                                                                                                                        >,
                                                                                                                                                        z.ZodObject<
                                                                                                                                                        {
                                                                                                                                                        default: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
                                                                                                                                                        path: z.ZodString;
                                                                                                                                                        ancestorId: z.ZodOptional<z.ZodString>;
                                                                                                                                                        ancestorVersion: z.ZodOptional<z.ZodString>;
                                                                                                                                                        apexTestAccess: z.ZodOptional<
                                                                                                                                                        z.ZodObject<
                                                                                                                                                        {
                                                                                                                                                        permissionSets: z.ZodUnion<
                                                                                                                                                        readonly [
                                                                                                                                                        z.ZodArray<z.ZodString>,
                                                                                                                                                        z.ZodString
                                                                                                                                                        ]
                                                                                                                                                        >;
                                                                                                                                                        permissionSetLicenses: z.ZodUnion<
                                                                                                                                                        readonly [
                                                                                                                                                        z.ZodArray<z.ZodString>,
                                                                                                                                                        z.ZodString
                                                                                                                                                        ]
                                                                                                                                                        >;
                                                                                                                                                        },
                                                                                                                                                        z.core.$strip
                                                                                                                                                        >
                                                                                                                                                        >;
                                                                                                                                                        definitionFile: z.ZodOptional<z.ZodString>;
                                                                                                                                                        dependencies: z.ZodOptional<
                                                                                                                                                        z.ZodArray<
                                                                                                                                                        z.ZodObject<
                                                                                                                                                        {
                                                                                                                                                        package: z.ZodString;
                                                                                                                                                        versionNumber: z.ZodOptional<z.ZodString>;
                                                                                                                                                        branch: z.ZodOptional<z.ZodString>;
                                                                                                                                                        },
                                                                                                                                                        z.core.$catchall<z.ZodUnknown>
                                                                                                                                                        >
                                                                                                                                                        >
                                                                                                                                                        >;
                                                                                                                                                        includeProfileUserLicenses: z.ZodOptional<
                                                                                                                                                        z.ZodDefault<z.ZodBoolean>
                                                                                                                                                        >;
                                                                                                                                                        package: z.ZodString;
                                                                                                                                                        packageMetadataAccess: z.ZodOptional<
                                                                                                                                                        z.ZodObject<
                                                                                                                                                        {
                                                                                                                                                        permissionSets: z.ZodUnion<
                                                                                                                                                        readonly [
                                                                                                                                                        z.ZodString,
                                                                                                                                                        z.ZodArray<z.ZodString>
                                                                                                                                                        ]
                                                                                                                                                        >;
                                                                                                                                                        permissionSetLicenses: z.ZodUnion<
                                                                                                                                                        readonly [
                                                                                                                                                        z.ZodString,
                                                                                                                                                        z.ZodArray<z.ZodString>
                                                                                                                                                        ]
                                                                                                                                                        >;
                                                                                                                                                        },
                                                                                                                                                        z.core.$strip
                                                                                                                                                        >
                                                                                                                                                        >;
                                                                                                                                                        postInstallScript: z.ZodOptional<z.ZodString>;
                                                                                                                                                        postInstallUrl: z.ZodOptional<z.ZodString>;
                                                                                                                                                        releaseNotesUrl: z.ZodOptional<z.ZodString>;
                                                                                                                                                        scopeProfiles: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
                                                                                                                                                        uninstallScript: z.ZodOptional<z.ZodString>;
                                                                                                                                                        calculateTransitiveDependencies: z.ZodOptional<
                                                                                                                                                        z.ZodDefault<z.ZodBoolean>
                                                                                                                                                        >;
                                                                                                                                                        versionDescription: z.ZodOptional<z.ZodString>;
                                                                                                                                                        versionName: z.ZodOptional<z.ZodString>;
                                                                                                                                                        versionNumber: z.ZodString;
                                                                                                                                                        unpackagedMetadata: z.ZodOptional<
                                                                                                                                                        z.ZodObject<{ path: z.ZodString }, z.core.$strip>
                                                                                                                                                        >;
                                                                                                                                                        seedMetadata: z.ZodOptional<
                                                                                                                                                        z.ZodObject<{ path: z.ZodString }, z.core.$strip>
                                                                                                                                                        >;
                                                                                                                                                        functions: z.ZodOptional<z.ZodArray<z.ZodString>>;
                                                                                                                                                        },
                                                                                                                                                        z.core.$strict
                                                                                                                                                        >
                                                                                                                                                        ]
                                                                                                                                                        >
                                                                                                                                                        >
                                                                                                                                                        ) => void;
                                                                                                                                                        • Add a package directory to the project. If the package directory already exists, the new directory properties will be merged with the existing properties.

                                                                                                                                                          Parameter packageDir

                                                                                                                                                        method getDefaultOptions

                                                                                                                                                        static getDefaultOptions: (isGlobal?: boolean) => ConfigFile.Options;

                                                                                                                                                          method getFileName

                                                                                                                                                          static getFileName: () => string;

                                                                                                                                                            method getPackageAliases

                                                                                                                                                            getPackageAliases: () => Nullable<Dictionary<string>>;
                                                                                                                                                            • Get package aliases defined in the project.

                                                                                                                                                            method getPackageBundleAliases

                                                                                                                                                            getPackageBundleAliases: () => Nullable<Dictionary<string>>;
                                                                                                                                                            • Get package bundle aliases defined in the project.

                                                                                                                                                            method getPackageBundles

                                                                                                                                                            getPackageBundles: () => BundleEntry[];
                                                                                                                                                            • Get package bundles defined in the project.

                                                                                                                                                            method getPackageDirectories

                                                                                                                                                            getPackageDirectories: () => Promise<PackageDir[]>;
                                                                                                                                                            • Returns the packageDirectories within sfdx-project.json, first reading and validating the file if necessary.

                                                                                                                                                            method getPackageDirectoriesSync

                                                                                                                                                            getPackageDirectoriesSync: () => NamedPackageDir[];
                                                                                                                                                            • Returns a read-only list of packageDirectories within sfdx-project.json, first reading and validating the file if necessary. i.e. modifying this array will not affect the sfdx-project.json file.

                                                                                                                                                            method getUniquePackageDirectories

                                                                                                                                                            getUniquePackageDirectories: () => NamedPackageDir[];
                                                                                                                                                            • Returns a read-only list of packageDirectories within sfdx-project.json, first reading and validating the file if necessary. i.e. modifying this array will not affect the sfdx-project.json file.

                                                                                                                                                              There can be multiple packages in packageDirectories that point to the same directory. This method only returns one packageDirectory entry per unique directory path. This is useful when doing source operations based on directories but probably not as useful for packaging operations that want to do something for each package entry.

                                                                                                                                                            method getUniquePackageNames

                                                                                                                                                            getUniquePackageNames: () => string[];

                                                                                                                                                            method hasMultiplePackageBundles

                                                                                                                                                            hasMultiplePackageBundles: () => boolean;
                                                                                                                                                            • Has multiple package bundles defined in the project.

                                                                                                                                                            method hasMultiplePackages

                                                                                                                                                            hasMultiplePackages: () => boolean;
                                                                                                                                                            • Has multiple package directories (MPD) defined in the project.

                                                                                                                                                            method hasPackageAliases

                                                                                                                                                            hasPackageAliases: () => Promise<boolean>;
                                                                                                                                                            • Has at least one package alias defined in the project.

                                                                                                                                                            method hasPackageBundleAliases

                                                                                                                                                            hasPackageBundleAliases: () => boolean;
                                                                                                                                                            • Has at least one package bundle alias defined in the project.

                                                                                                                                                            method hasPackages

                                                                                                                                                            hasPackages: () => boolean;
                                                                                                                                                            • Has package directories defined in the project.

                                                                                                                                                            method read

                                                                                                                                                            read: () => Promise<ProjectJson>;

                                                                                                                                                              method readSync

                                                                                                                                                              readSync: () => ProjectJson;

                                                                                                                                                                method refreshSync

                                                                                                                                                                refreshSync: () => SfProjectJson;
                                                                                                                                                                • force a reread of the project contents if you know they may have been modified

                                                                                                                                                                method schemaValidate

                                                                                                                                                                schemaValidate: () => Promise<void>;
                                                                                                                                                                • Validates sfdx-project.json against the schema.

                                                                                                                                                                  Set the SFDX_PROJECT_JSON_VALIDATION environment variable to true to throw an error when schema validation fails. A warning is emitted by default when the file is invalid.

                                                                                                                                                                  ***See*** [sfdx-project.schema.json] ((https://github.com/forcedotcom/schemas/blob/main/sfdx-project.schema.json)

                                                                                                                                                                method schemaValidateSync

                                                                                                                                                                schemaValidateSync: () => void;
                                                                                                                                                                • Validates sfdx-project.json against the schema.

                                                                                                                                                                  Set the SFDX_PROJECT_JSON_VALIDATION environment variable to true to throw an error when schema validation fails. A warning is emitted by default when the file is invalid.

                                                                                                                                                                  ***See*** [sfdx-project.schema.json] ((https://github.com/forcedotcom/schemas/blob/main/sfdx-project.schema.json)

                                                                                                                                                                method write

                                                                                                                                                                write: () => Promise<ProjectJson>;

                                                                                                                                                                  method writeSync

                                                                                                                                                                  writeSync: () => ProjectJson;

                                                                                                                                                                    class StateAggregator

                                                                                                                                                                    class StateAggregator extends AsyncOptionalCreatable {}

                                                                                                                                                                      property aliases

                                                                                                                                                                      aliases: AliasAccessor;

                                                                                                                                                                        property orgs

                                                                                                                                                                        orgs: OrgAccessor;

                                                                                                                                                                          property sandboxes

                                                                                                                                                                          sandboxes: SandboxAccessor;

                                                                                                                                                                            method clearInstance

                                                                                                                                                                            static clearInstance: (path?: string) => void;
                                                                                                                                                                            • Clear the cache to force reading from disk.

                                                                                                                                                                              *NOTE: Only call this method if you must and you know what you are doing.* *NOTE: This call is NOT thread-safe, so it should only be called when no other threads are using the StateAggregator.*

                                                                                                                                                                            method clearInstanceAsync

                                                                                                                                                                            static clearInstanceAsync: (path?: string) => Promise<void>;
                                                                                                                                                                            • Clear the cache to force reading from disk in a thread-safe manner.

                                                                                                                                                                              *NOTE: Only call this method if you must and you know what you are doing.*

                                                                                                                                                                            method getInstance

                                                                                                                                                                            static getInstance: () => Promise<StateAggregator>;
                                                                                                                                                                            • Reuse a StateAggregator if one was already created for the current global state directory Otherwise, create one and adds it to map for future reuse. HomeDir might be stubbed in tests

                                                                                                                                                                            method init

                                                                                                                                                                            protected init: () => Promise<void>;

                                                                                                                                                                              class StreamingClient

                                                                                                                                                                              class StreamingClient extends AsyncOptionalCreatable<StreamingClient.Options> {}
                                                                                                                                                                              • Api wrapper to support Salesforce streaming. The client contains an internal implementation of a cometd specification.

                                                                                                                                                                                Salesforce client and timeout information

                                                                                                                                                                                Streaming API imposes two timeouts, as supported in the Bayeux protocol.

                                                                                                                                                                                Socket timeout: 110 seconds A client receives events (JSON-formatted HTTP responses) while it waits on a connection. If no events are generated and the client is still waiting, the connection times out after 110 seconds and the server closes the connection. Clients should reconnect before two minutes to avoid the connection timeout.

                                                                                                                                                                                Reconnect timeout: 40 seconds After receiving the events, a client needs to reconnect to receive the next set of events. If the reconnection doesn't happen within 40 seconds, the server expires the subscription and the connection is closed. If this happens, the client must start again and handshake, subscribe, and connect. Each Streaming API client logs into an instance and maintains a session. When the client handshakes, connects, or subscribes, the session timeout is restarted. A client session times out if the client doesn’t reconnect to the server within 40 seconds after receiving a response (an event, subscribe result, and so on).

                                                                                                                                                                                Note that these timeouts apply to the Streaming API client session and not the Salesforce authentication session. If the client session times out, the authentication session remains active until the organization-specific timeout policy goes into effect.

                                                                                                                                                                                const streamProcessor = (message: JsonMap): StatusResult => {
                                                                                                                                                                                const payload = ensureJsonMap(message.payload);
                                                                                                                                                                                const id = ensureString(payload.id);
                                                                                                                                                                                if (payload.status !== 'Active') {
                                                                                                                                                                                return { completed: false };
                                                                                                                                                                                }
                                                                                                                                                                                return {
                                                                                                                                                                                completed: true,
                                                                                                                                                                                payload: id
                                                                                                                                                                                };
                                                                                                                                                                                };
                                                                                                                                                                                const org = await Org.create();
                                                                                                                                                                                const options = new StreamingClient.DefaultOptions(org, 'MyPushTopics', streamProcessor);
                                                                                                                                                                                const asyncStatusClient = await StreamingClient.create(options);
                                                                                                                                                                                await asyncStatusClient.handshake();
                                                                                                                                                                                const info: RequestInfo = {
                                                                                                                                                                                method: 'POST',
                                                                                                                                                                                url: `${org.getField(OrgFields.INSTANCE_URL)}/SomeService`,
                                                                                                                                                                                headers: { HEADER: 'HEADER_VALUE'},
                                                                                                                                                                                body: 'My content'
                                                                                                                                                                                };
                                                                                                                                                                                await asyncStatusClient.subscribe(async () => {
                                                                                                                                                                                const connection = await org.getConnection();
                                                                                                                                                                                // Now that we are subscribed, we can initiate the request that will cause the events to start streaming.
                                                                                                                                                                                const requestResponse: JsonCollection = await connection.request(info);
                                                                                                                                                                                const id = ensureJsonMap(requestResponse).id;
                                                                                                                                                                                console.log(`this.id: ${JSON.stringify(ensureString(id), null, 4)}`);
                                                                                                                                                                                });

                                                                                                                                                                              constructor

                                                                                                                                                                              constructor(options?: StreamingClient.Options);

                                                                                                                                                                              method handshake

                                                                                                                                                                              handshake: () => Promise<StreamingClient.ConnectionState>;
                                                                                                                                                                              • Provides a convenient way to handshake with the server endpoint before trying to subscribe.

                                                                                                                                                                              method init

                                                                                                                                                                              init: () => Promise<void>;
                                                                                                                                                                              • Asynchronous initializer.

                                                                                                                                                                              method replay

                                                                                                                                                                              replay: (replayId: number) => void;
                                                                                                                                                                              • Allows replaying of of Streaming events starting with replayId.

                                                                                                                                                                                Parameter replayId

                                                                                                                                                                                The starting message id to replay from.

                                                                                                                                                                              method subscribe

                                                                                                                                                                              subscribe: (streamInit?: () => Promise<void>) => Promise<AnyJson | void>;
                                                                                                                                                                              • Subscribe to streaming events. When the streaming processor that's set in the options completes execution it returns a payload in the StatusResult object. The payload is just echoed here for convenience.

                                                                                                                                                                                **Throws** *SfError{ name: 'StreamingClient.TimeoutErrorType.SUBSCRIBE'}* When the subscribe timeout occurs.

                                                                                                                                                                                Parameter streamInit

                                                                                                                                                                                This function should call the platform apis that result in streaming updates on push topics. StatusResult

                                                                                                                                                                              class TTLConfig

                                                                                                                                                                              class TTLConfig<T extends TTLConfig.Options, P extends JsonMap> extends ConfigFile<
                                                                                                                                                                              T,
                                                                                                                                                                              TTLConfig.Contents<P>
                                                                                                                                                                              > {}
                                                                                                                                                                              • A Time To Live configuration file where each entry is timestamped and removed once the TTL has expired.

                                                                                                                                                                                Example 1

                                                                                                                                                                                import { Duration } from '@salesforce/kit';
                                                                                                                                                                                const config = await TTLConfig.create({
                                                                                                                                                                                isGlobal: false,
                                                                                                                                                                                ttl: Duration.days(1)
                                                                                                                                                                                });

                                                                                                                                                                              method getLatestEntry

                                                                                                                                                                              getLatestEntry: () => Nullable<[string, TTLConfig.Entry<P>]>;

                                                                                                                                                                                method getLatestKey

                                                                                                                                                                                getLatestKey: () => Nullable<string>;

                                                                                                                                                                                  method init

                                                                                                                                                                                  protected init: () => Promise<void>;

                                                                                                                                                                                    method isExpired

                                                                                                                                                                                    isExpired: (dateTime: number, value: P & { timestamp: string }) => boolean;

                                                                                                                                                                                      method set

                                                                                                                                                                                      set: (key: string, value: Partial<TTLConfig.Entry<P>>) => void;

                                                                                                                                                                                        class User

                                                                                                                                                                                        class User extends AsyncCreatable<User.Options> {}
                                                                                                                                                                                        • A class for creating a User, generating a password for a user, and assigning a user to one or more permission sets. See methods for examples.

                                                                                                                                                                                        constructor

                                                                                                                                                                                        constructor(options: User.Options);

                                                                                                                                                                                        method assignPassword

                                                                                                                                                                                        assignPassword: (info: AuthInfo, password?: SecureBuffer<void>) => Promise<void>;
                                                                                                                                                                                        • Assigns a password to a user. For a user to have the ability to assign their own password, the org needs the following org feature: EnableSetPasswordInApi.

                                                                                                                                                                                          Parameter info

                                                                                                                                                                                          The AuthInfo object for user to assign the password to.

                                                                                                                                                                                          Parameter password

                                                                                                                                                                                          [throwWhenRemoveFails = User.generatePasswordUtf8()] A SecureBuffer containing the new password.

                                                                                                                                                                                        method assignPermissionSets

                                                                                                                                                                                        assignPermissionSets: (id: string, permsetNames: string[]) => Promise<void>;
                                                                                                                                                                                        • Methods to assign one or more permission set names to a user.

                                                                                                                                                                                          Parameter id

                                                                                                                                                                                          The Salesforce id of the user to assign the permission set to.

                                                                                                                                                                                          Parameter permsetNames

                                                                                                                                                                                          An array of permission set names.

                                                                                                                                                                                          const username = 'user@example.com';
                                                                                                                                                                                          const connection: Connection = await Connection.create({
                                                                                                                                                                                          authInfo: await AuthInfo.create({ username })
                                                                                                                                                                                          });
                                                                                                                                                                                          const org = await Org.create({ connection });
                                                                                                                                                                                          const user: User = await User.create({ org });
                                                                                                                                                                                          const fields: UserFields = await user.retrieve(username);
                                                                                                                                                                                          await user.assignPermissionSets(fields.id, ['sfdx', 'approver']);

                                                                                                                                                                                        method createUser

                                                                                                                                                                                        createUser: (fields: UserFields) => Promise<AuthInfo>;
                                                                                                                                                                                        • Method for creating a new User.

                                                                                                                                                                                          By default scratch orgs only allow creating 2 additional users. Work with Salesforce Customer Service to increase user limits.

                                                                                                                                                                                          The Org Preferences required to increase the number of users are: Standard User Licenses Salesforce CRM Content User

                                                                                                                                                                                          Parameter fields

                                                                                                                                                                                          The required fields for creating a user.

                                                                                                                                                                                          const connection: Connection = await Connection.create({
                                                                                                                                                                                          authInfo: await AuthInfo.create({ username: 'user@example.com' })
                                                                                                                                                                                          });
                                                                                                                                                                                          const org = await Org.create({ connection });
                                                                                                                                                                                          const defaultUserFields = await DefaultUserFields.create({ templateUser: 'devhub_user@example.com' });
                                                                                                                                                                                          const user: User = await User.create({ org });
                                                                                                                                                                                          const info: AuthInfo = await user.createUser(defaultUserFields.getFields());

                                                                                                                                                                                        method generatePasswordUtf8

                                                                                                                                                                                        static generatePasswordUtf8: (
                                                                                                                                                                                        passwordCondition?: PasswordConditions
                                                                                                                                                                                        ) => SecureBuffer<void>;
                                                                                                                                                                                        • Generate default password for a user. Returns An encrypted buffer containing a utf8 encoded password.

                                                                                                                                                                                        method init

                                                                                                                                                                                        init: () => Promise<void>;
                                                                                                                                                                                        • Initialize a new instance of a user and return it.

                                                                                                                                                                                        method retrieve

                                                                                                                                                                                        retrieve: (username: string) => Promise<UserFields>;
                                                                                                                                                                                        • Method to retrieve the UserFields for a user.

                                                                                                                                                                                          Parameter username

                                                                                                                                                                                          The username of the user.

                                                                                                                                                                                          const username = 'boris@thecat.com';
                                                                                                                                                                                          const connection: Connection = await Connection.create({
                                                                                                                                                                                          authInfo: await AuthInfo.create({ username })
                                                                                                                                                                                          });
                                                                                                                                                                                          const org = await Org.create({ connection });
                                                                                                                                                                                          const user: User = await User.create({ org });
                                                                                                                                                                                          const fields: UserFields = await user.retrieve(username);

                                                                                                                                                                                        class WebOAuthServer

                                                                                                                                                                                        class WebOAuthServer extends AsyncCreatable<WebOAuthServer.Options> {}
                                                                                                                                                                                        • Handles the creation of a web server for web based login flows.

                                                                                                                                                                                          Usage:

                                                                                                                                                                                          const oauthConfig = {
                                                                                                                                                                                          loginUrl: this.flags.instanceurl,
                                                                                                                                                                                          clientId: this.flags.clientid,
                                                                                                                                                                                          };
                                                                                                                                                                                          const oauthServer = await WebOAuthServer.create({ oauthConfig });
                                                                                                                                                                                          await oauthServer.start();
                                                                                                                                                                                          await open(oauthServer.getAuthorizationUrl(), { wait: false });
                                                                                                                                                                                          const authInfo = await oauthServer.authorizeAndSave();

                                                                                                                                                                                        constructor

                                                                                                                                                                                        constructor(options: WebOAuthServer.Options);

                                                                                                                                                                                          property DEFAULT_AUTH_TIMEOUT

                                                                                                                                                                                          static DEFAULT_AUTH_TIMEOUT: number;

                                                                                                                                                                                            property DEFAULT_PORT

                                                                                                                                                                                            static DEFAULT_PORT: number;

                                                                                                                                                                                              method authorizeAndSave

                                                                                                                                                                                              authorizeAndSave: () => Promise<AuthInfo>;
                                                                                                                                                                                              • Executes the oauth request and creates a new AuthInfo when successful

                                                                                                                                                                                                Returns

                                                                                                                                                                                                {Promise}

                                                                                                                                                                                              method determineOauthPort

                                                                                                                                                                                              static determineOauthPort: () => Promise<number>;
                                                                                                                                                                                              • Returns the configured oauthLocalPort or the WebOAuthServer.DEFAULT_PORT

                                                                                                                                                                                                Returns

                                                                                                                                                                                                {Promise}

                                                                                                                                                                                              method getAuthorizationUrl

                                                                                                                                                                                              getAuthorizationUrl: () => string;
                                                                                                                                                                                              • Returns the authorization url that's used for the login flow

                                                                                                                                                                                                Returns

                                                                                                                                                                                                {string}

                                                                                                                                                                                              method getAuthTimeout

                                                                                                                                                                                              static getAuthTimeout: () => number;
                                                                                                                                                                                              • Gets the authentication timeout from environment variable or returns default value

                                                                                                                                                                                                Returns

                                                                                                                                                                                                {number} - represents the auth timeout in ms

                                                                                                                                                                                              method init

                                                                                                                                                                                              protected init: () => Promise<void>;

                                                                                                                                                                                                method start

                                                                                                                                                                                                start: () => Promise<void>;
                                                                                                                                                                                                • Starts the web server

                                                                                                                                                                                                Enums

                                                                                                                                                                                                enum EnvironmentVariable

                                                                                                                                                                                                enum EnvironmentVariable {
                                                                                                                                                                                                'FORCE_OPEN_URL' = 'FORCE_OPEN_URL',
                                                                                                                                                                                                'FORCE_SHOW_SPINNER' = 'FORCE_SHOW_SPINNER',
                                                                                                                                                                                                'FORCE_SPINNER_DELAY' = 'FORCE_SPINNER_DELAY',
                                                                                                                                                                                                'HTTP_PROXY' = 'HTTP_PROXY',
                                                                                                                                                                                                'HTTPS_PROXY' = 'HTTPS_PROXY',
                                                                                                                                                                                                'NODE_EXTRA_CA_CERTS' = 'NODE_EXTRA_CA_CERTS',
                                                                                                                                                                                                'NODE_TLS_REJECT_UNAUTHORIZED' = 'NODE_TLS_REJECT_UNAUTHORIZED',
                                                                                                                                                                                                'SFDX_ACCESS_TOKEN' = 'SFDX_ACCESS_TOKEN',
                                                                                                                                                                                                'SFDX_API_VERSION' = 'SFDX_API_VERSION',
                                                                                                                                                                                                'SFDX_AUDIENCE_URL' = 'SFDX_AUDIENCE_URL',
                                                                                                                                                                                                'SFDX_CONTENT_TYPE' = 'SFDX_CONTENT_TYPE',
                                                                                                                                                                                                'SFDX_DEFAULTDEVHUBUSERNAME' = 'SFDX_DEFAULTDEVHUBUSERNAME',
                                                                                                                                                                                                'SFDX_DEFAULTUSERNAME' = 'SFDX_DEFAULTUSERNAME',
                                                                                                                                                                                                'SFDX_DISABLE_AUTOUPDATE' = 'SFDX_DISABLE_AUTOUPDATE',
                                                                                                                                                                                                'SFDX_AUTOUPDATE_DISABLE' = 'SFDX_AUTOUPDATE_DISABLE',
                                                                                                                                                                                                'SFDX_DISABLE_SOURCE_MEMBER_POLLING' = 'SFDX_DISABLE_SOURCE_MEMBER_POLLING',
                                                                                                                                                                                                'SFDX_SOURCE_TRACKING_BATCH_SIZE' = 'SFDX_SOURCE_TRACKING_BATCH_SIZE',
                                                                                                                                                                                                'SFDX_DISABLE_TELEMETRY' = 'SFDX_DISABLE_TELEMETRY',
                                                                                                                                                                                                'SFDX_DNS_TIMEOUT' = 'SFDX_DNS_TIMEOUT',
                                                                                                                                                                                                'SFDX_DOMAIN_RETRY' = 'SFDX_DOMAIN_RETRY',
                                                                                                                                                                                                'SFDX_IMPROVED_CODE_COVERAGE' = 'SFDX_IMPROVED_CODE_COVERAGE',
                                                                                                                                                                                                'SFDX_INSTANCE_URL' = 'SFDX_INSTANCE_URL',
                                                                                                                                                                                                'SFDX_JSON_TO_STDOUT' = 'SFDX_JSON_TO_STDOUT',
                                                                                                                                                                                                'SFDX_DISABLE_LOG_FILE' = 'SFDX_DISABLE_LOG_FILE',
                                                                                                                                                                                                'SFDX_LOG_LEVEL' = 'SFDX_LOG_LEVEL',
                                                                                                                                                                                                'SFDX_LOG_ROTATION_COUNT' = 'SFDX_LOG_ROTATION_COUNT',
                                                                                                                                                                                                'SFDX_LOG_ROTATION_PERIOD' = 'SFDX_LOG_ROTATION_PERIOD',
                                                                                                                                                                                                'SFDX_MAX_QUERY_LIMIT' = 'SFDX_MAX_QUERY_LIMIT',
                                                                                                                                                                                                'SFDX_MDAPI_TEMP_DIR' = 'SFDX_MDAPI_TEMP_DIR',
                                                                                                                                                                                                'SFDX_NPM_REGISTRY' = 'SFDX_NPM_REGISTRY',
                                                                                                                                                                                                'SFDX_PRECOMPILE_ENABLE' = 'SFDX_PRECOMPILE_ENABLE',
                                                                                                                                                                                                'SFDX_PROJECT_AUTOUPDATE_DISABLE_FOR_PACKAGE_CREATE' = 'SFDX_PROJECT_AUTOUPDATE_DISABLE_FOR_PACKAGE_CREATE',
                                                                                                                                                                                                'SFDX_PROJECT_AUTOUPDATE_DISABLE_FOR_PACKAGE_VERSION_CREATE' = 'SFDX_PROJECT_AUTOUPDATE_DISABLE_FOR_PACKAGE_VERSION_CREATE',
                                                                                                                                                                                                'SFDX_REST_DEPLOY' = 'SFDX_REST_DEPLOY',
                                                                                                                                                                                                'SFDX_SOURCE_MEMBER_POLLING_TIMEOUT' = 'SFDX_SOURCE_MEMBER_POLLING_TIMEOUT',
                                                                                                                                                                                                'SFDX_USE_GENERIC_UNIX_KEYCHAIN' = 'SFDX_USE_GENERIC_UNIX_KEYCHAIN',
                                                                                                                                                                                                'SFDX_USE_PROGRESS_BAR' = 'SFDX_USE_PROGRESS_BAR',
                                                                                                                                                                                                'SFDX_LAZY_LOAD_MODULES' = 'SFDX_LAZY_LOAD_MODULES',
                                                                                                                                                                                                'SFDX_S3_HOST' = 'SFDX_S3_HOST',
                                                                                                                                                                                                'SFDX_UPDATE_INSTRUCTIONS' = 'SFDX_UPDATE_INSTRUCTIONS',
                                                                                                                                                                                                'SFDX_INSTALLER' = 'SFDX_INSTALLER',
                                                                                                                                                                                                'SFDX_ENV' = 'SFDX_ENV',
                                                                                                                                                                                                'SF_TARGET_ORG' = 'SF_TARGET_ORG',
                                                                                                                                                                                                'SF_TARGET_DEV_HUB' = 'SF_TARGET_DEV_HUB',
                                                                                                                                                                                                'SF_ACCESS_TOKEN' = 'SF_ACCESS_TOKEN',
                                                                                                                                                                                                'SF_ORG_API_VERSION' = 'SF_ORG_API_VERSION',
                                                                                                                                                                                                'SF_AUDIENCE_URL' = 'SF_AUDIENCE_URL',
                                                                                                                                                                                                'SF_CONTENT_TYPE' = 'SF_CONTENT_TYPE',
                                                                                                                                                                                                'SF_DISABLE_AUTOUPDATE' = 'SF_DISABLE_AUTOUPDATE',
                                                                                                                                                                                                'SF_AUTOUPDATE_DISABLE' = 'SF_AUTOUPDATE_DISABLE',
                                                                                                                                                                                                'SF_DISABLE_SOURCE_MEMBER_POLLING' = 'SF_DISABLE_SOURCE_MEMBER_POLLING',
                                                                                                                                                                                                'SF_DISABLE_TELEMETRY' = 'SF_DISABLE_TELEMETRY',
                                                                                                                                                                                                'SF_DNS_TIMEOUT' = 'SF_DNS_TIMEOUT',
                                                                                                                                                                                                'SF_DOMAIN_RETRY' = 'SF_DOMAIN_RETRY',
                                                                                                                                                                                                'SF_IMPROVED_CODE_COVERAGE' = 'SF_IMPROVED_CODE_COVERAGE',
                                                                                                                                                                                                'SF_ORG_INSTANCE_URL' = 'SF_ORG_INSTANCE_URL',
                                                                                                                                                                                                'SF_JSON_TO_STDOUT' = 'SF_JSON_TO_STDOUT',
                                                                                                                                                                                                'SF_DISABLE_LOG_FILE' = 'SF_DISABLE_LOG_FILE',
                                                                                                                                                                                                'SF_LOG_LEVEL' = 'SF_LOG_LEVEL',
                                                                                                                                                                                                'SF_LOG_ROTATION_COUNT' = 'SF_LOG_ROTATION_COUNT',
                                                                                                                                                                                                'SF_LOG_ROTATION_PERIOD' = 'SF_LOG_ROTATION_PERIOD',
                                                                                                                                                                                                'SF_ORG_MAX_QUERY_LIMIT' = 'SF_ORG_MAX_QUERY_LIMIT',
                                                                                                                                                                                                'SF_MDAPI_TEMP_DIR' = 'SF_MDAPI_TEMP_DIR',
                                                                                                                                                                                                'SF_NPM_REGISTRY' = 'SF_NPM_REGISTRY',
                                                                                                                                                                                                'SF_PRECOMPILE_ENABLE' = 'SF_PRECOMPILE_ENABLE',
                                                                                                                                                                                                'SF_PROJECT_AUTOUPDATE_DISABLE_FOR_PACKAGE_CREATE' = 'SF_PROJECT_AUTOUPDATE_DISABLE_FOR_PACKAGE_CREATE',
                                                                                                                                                                                                'SF_PROJECT_AUTOUPDATE_DISABLE_FOR_PACKAGE_VERSION_CREATE' = 'SF_PROJECT_AUTOUPDATE_DISABLE_FOR_PACKAGE_VERSION_CREATE',
                                                                                                                                                                                                'SF_SOURCE_MEMBER_POLLING_TIMEOUT' = 'SF_SOURCE_MEMBER_POLLING_TIMEOUT',
                                                                                                                                                                                                'SF_SOURCE_TRACKING_BATCH_SIZE' = 'SF_SOURCE_TRACKING_BATCH_SIZE',
                                                                                                                                                                                                'SF_USE_GENERIC_UNIX_KEYCHAIN' = 'SF_USE_GENERIC_UNIX_KEYCHAIN',
                                                                                                                                                                                                'SF_USE_PROGRESS_BAR' = 'SF_USE_PROGRESS_BAR',
                                                                                                                                                                                                'SF_LAZY_LOAD_MODULES' = 'SF_LAZY_LOAD_MODULES',
                                                                                                                                                                                                'SF_S3_HOST' = 'SF_S3_HOST',
                                                                                                                                                                                                'SF_UPDATE_INSTRUCTIONS' = 'SF_UPDATE_INSTRUCTIONS',
                                                                                                                                                                                                'SF_INSTALLER' = 'SF_INSTALLER',
                                                                                                                                                                                                'SF_ENV' = 'SF_ENV',
                                                                                                                                                                                                'SF_CAPITALIZE_RECORD_TYPES' = 'SF_CAPITALIZE_RECORD_TYPES',
                                                                                                                                                                                                }

                                                                                                                                                                                                  member 'FORCE_OPEN_URL'

                                                                                                                                                                                                  'FORCE_OPEN_URL' = 'FORCE_OPEN_URL'

                                                                                                                                                                                                    member 'FORCE_SHOW_SPINNER'

                                                                                                                                                                                                    'FORCE_SHOW_SPINNER' = 'FORCE_SHOW_SPINNER'

                                                                                                                                                                                                      member 'FORCE_SPINNER_DELAY'

                                                                                                                                                                                                      'FORCE_SPINNER_DELAY' = 'FORCE_SPINNER_DELAY'

                                                                                                                                                                                                        member 'HTTP_PROXY'

                                                                                                                                                                                                        'HTTP_PROXY' = 'HTTP_PROXY'

                                                                                                                                                                                                          member 'HTTPS_PROXY'

                                                                                                                                                                                                          'HTTPS_PROXY' = 'HTTPS_PROXY'

                                                                                                                                                                                                            member 'NODE_EXTRA_CA_CERTS'

                                                                                                                                                                                                            'NODE_EXTRA_CA_CERTS' = 'NODE_EXTRA_CA_CERTS'

                                                                                                                                                                                                              member 'NODE_TLS_REJECT_UNAUTHORIZED'

                                                                                                                                                                                                              'NODE_TLS_REJECT_UNAUTHORIZED' = 'NODE_TLS_REJECT_UNAUTHORIZED'

                                                                                                                                                                                                                member 'SF_ACCESS_TOKEN'

                                                                                                                                                                                                                'SF_ACCESS_TOKEN' = 'SF_ACCESS_TOKEN'

                                                                                                                                                                                                                  member 'SF_AUDIENCE_URL'

                                                                                                                                                                                                                  'SF_AUDIENCE_URL' = 'SF_AUDIENCE_URL'

                                                                                                                                                                                                                    member 'SF_AUTOUPDATE_DISABLE'

                                                                                                                                                                                                                    'SF_AUTOUPDATE_DISABLE' = 'SF_AUTOUPDATE_DISABLE'

                                                                                                                                                                                                                      member 'SF_CAPITALIZE_RECORD_TYPES'

                                                                                                                                                                                                                      'SF_CAPITALIZE_RECORD_TYPES' = 'SF_CAPITALIZE_RECORD_TYPES'

                                                                                                                                                                                                                        member 'SF_CONTENT_TYPE'

                                                                                                                                                                                                                        'SF_CONTENT_TYPE' = 'SF_CONTENT_TYPE'

                                                                                                                                                                                                                          member 'SF_DISABLE_AUTOUPDATE'

                                                                                                                                                                                                                          'SF_DISABLE_AUTOUPDATE' = 'SF_DISABLE_AUTOUPDATE'

                                                                                                                                                                                                                            member 'SF_DISABLE_LOG_FILE'

                                                                                                                                                                                                                            'SF_DISABLE_LOG_FILE' = 'SF_DISABLE_LOG_FILE'

                                                                                                                                                                                                                              member 'SF_DISABLE_SOURCE_MEMBER_POLLING'

                                                                                                                                                                                                                              'SF_DISABLE_SOURCE_MEMBER_POLLING' = 'SF_DISABLE_SOURCE_MEMBER_POLLING'

                                                                                                                                                                                                                                member 'SF_DISABLE_TELEMETRY'

                                                                                                                                                                                                                                'SF_DISABLE_TELEMETRY' = 'SF_DISABLE_TELEMETRY'

                                                                                                                                                                                                                                  member 'SF_DNS_TIMEOUT'

                                                                                                                                                                                                                                  'SF_DNS_TIMEOUT' = 'SF_DNS_TIMEOUT'

                                                                                                                                                                                                                                    member 'SF_DOMAIN_RETRY'

                                                                                                                                                                                                                                    'SF_DOMAIN_RETRY' = 'SF_DOMAIN_RETRY'

                                                                                                                                                                                                                                      member 'SF_ENV'

                                                                                                                                                                                                                                      'SF_ENV' = 'SF_ENV'

                                                                                                                                                                                                                                        member 'SF_IMPROVED_CODE_COVERAGE'

                                                                                                                                                                                                                                        'SF_IMPROVED_CODE_COVERAGE' = 'SF_IMPROVED_CODE_COVERAGE'

                                                                                                                                                                                                                                          member 'SF_INSTALLER'

                                                                                                                                                                                                                                          'SF_INSTALLER' = 'SF_INSTALLER'

                                                                                                                                                                                                                                            member 'SF_JSON_TO_STDOUT'

                                                                                                                                                                                                                                            'SF_JSON_TO_STDOUT' = 'SF_JSON_TO_STDOUT'

                                                                                                                                                                                                                                              member 'SF_LAZY_LOAD_MODULES'

                                                                                                                                                                                                                                              'SF_LAZY_LOAD_MODULES' = 'SF_LAZY_LOAD_MODULES'

                                                                                                                                                                                                                                                member 'SF_LOG_LEVEL'

                                                                                                                                                                                                                                                'SF_LOG_LEVEL' = 'SF_LOG_LEVEL'

                                                                                                                                                                                                                                                  member 'SF_LOG_ROTATION_COUNT'

                                                                                                                                                                                                                                                  'SF_LOG_ROTATION_COUNT' = 'SF_LOG_ROTATION_COUNT'

                                                                                                                                                                                                                                                    member 'SF_LOG_ROTATION_PERIOD'

                                                                                                                                                                                                                                                    'SF_LOG_ROTATION_PERIOD' = 'SF_LOG_ROTATION_PERIOD'

                                                                                                                                                                                                                                                      member 'SF_MDAPI_TEMP_DIR'

                                                                                                                                                                                                                                                      'SF_MDAPI_TEMP_DIR' = 'SF_MDAPI_TEMP_DIR'

                                                                                                                                                                                                                                                        member 'SF_NPM_REGISTRY'

                                                                                                                                                                                                                                                        'SF_NPM_REGISTRY' = 'SF_NPM_REGISTRY'

                                                                                                                                                                                                                                                          member 'SF_ORG_API_VERSION'

                                                                                                                                                                                                                                                          'SF_ORG_API_VERSION' = 'SF_ORG_API_VERSION'

                                                                                                                                                                                                                                                            member 'SF_ORG_INSTANCE_URL'

                                                                                                                                                                                                                                                            'SF_ORG_INSTANCE_URL' = 'SF_ORG_INSTANCE_URL'

                                                                                                                                                                                                                                                              member 'SF_ORG_MAX_QUERY_LIMIT'

                                                                                                                                                                                                                                                              'SF_ORG_MAX_QUERY_LIMIT' = 'SF_ORG_MAX_QUERY_LIMIT'

                                                                                                                                                                                                                                                                member 'SF_PRECOMPILE_ENABLE'

                                                                                                                                                                                                                                                                'SF_PRECOMPILE_ENABLE' = 'SF_PRECOMPILE_ENABLE'

                                                                                                                                                                                                                                                                  member 'SF_PROJECT_AUTOUPDATE_DISABLE_FOR_PACKAGE_CREATE'

                                                                                                                                                                                                                                                                  'SF_PROJECT_AUTOUPDATE_DISABLE_FOR_PACKAGE_CREATE' = 'SF_PROJECT_AUTOUPDATE_DISABLE_FOR_PACKAGE_CREATE'

                                                                                                                                                                                                                                                                    member 'SF_PROJECT_AUTOUPDATE_DISABLE_FOR_PACKAGE_VERSION_CREATE'

                                                                                                                                                                                                                                                                    'SF_PROJECT_AUTOUPDATE_DISABLE_FOR_PACKAGE_VERSION_CREATE' = 'SF_PROJECT_AUTOUPDATE_DISABLE_FOR_PACKAGE_VERSION_CREATE'

                                                                                                                                                                                                                                                                      member 'SF_S3_HOST'

                                                                                                                                                                                                                                                                      'SF_S3_HOST' = 'SF_S3_HOST'

                                                                                                                                                                                                                                                                        member 'SF_SOURCE_MEMBER_POLLING_TIMEOUT'

                                                                                                                                                                                                                                                                        'SF_SOURCE_MEMBER_POLLING_TIMEOUT' = 'SF_SOURCE_MEMBER_POLLING_TIMEOUT'

                                                                                                                                                                                                                                                                          member 'SF_SOURCE_TRACKING_BATCH_SIZE'

                                                                                                                                                                                                                                                                          'SF_SOURCE_TRACKING_BATCH_SIZE' = 'SF_SOURCE_TRACKING_BATCH_SIZE'

                                                                                                                                                                                                                                                                            member 'SF_TARGET_DEV_HUB'

                                                                                                                                                                                                                                                                            'SF_TARGET_DEV_HUB' = 'SF_TARGET_DEV_HUB'

                                                                                                                                                                                                                                                                              member 'SF_TARGET_ORG'

                                                                                                                                                                                                                                                                              'SF_TARGET_ORG' = 'SF_TARGET_ORG'

                                                                                                                                                                                                                                                                                member 'SF_UPDATE_INSTRUCTIONS'

                                                                                                                                                                                                                                                                                'SF_UPDATE_INSTRUCTIONS' = 'SF_UPDATE_INSTRUCTIONS'

                                                                                                                                                                                                                                                                                  member 'SF_USE_GENERIC_UNIX_KEYCHAIN'

                                                                                                                                                                                                                                                                                  'SF_USE_GENERIC_UNIX_KEYCHAIN' = 'SF_USE_GENERIC_UNIX_KEYCHAIN'

                                                                                                                                                                                                                                                                                    member 'SF_USE_PROGRESS_BAR'

                                                                                                                                                                                                                                                                                    'SF_USE_PROGRESS_BAR' = 'SF_USE_PROGRESS_BAR'

                                                                                                                                                                                                                                                                                      member 'SFDX_ACCESS_TOKEN'

                                                                                                                                                                                                                                                                                      'SFDX_ACCESS_TOKEN' = 'SFDX_ACCESS_TOKEN'

                                                                                                                                                                                                                                                                                        member 'SFDX_API_VERSION'

                                                                                                                                                                                                                                                                                        'SFDX_API_VERSION' = 'SFDX_API_VERSION'

                                                                                                                                                                                                                                                                                          member 'SFDX_AUDIENCE_URL'

                                                                                                                                                                                                                                                                                          'SFDX_AUDIENCE_URL' = 'SFDX_AUDIENCE_URL'

                                                                                                                                                                                                                                                                                            member 'SFDX_AUTOUPDATE_DISABLE'

                                                                                                                                                                                                                                                                                            'SFDX_AUTOUPDATE_DISABLE' = 'SFDX_AUTOUPDATE_DISABLE'

                                                                                                                                                                                                                                                                                              member 'SFDX_CONTENT_TYPE'

                                                                                                                                                                                                                                                                                              'SFDX_CONTENT_TYPE' = 'SFDX_CONTENT_TYPE'

                                                                                                                                                                                                                                                                                                member 'SFDX_DEFAULTDEVHUBUSERNAME'

                                                                                                                                                                                                                                                                                                'SFDX_DEFAULTDEVHUBUSERNAME' = 'SFDX_DEFAULTDEVHUBUSERNAME'

                                                                                                                                                                                                                                                                                                  member 'SFDX_DEFAULTUSERNAME'

                                                                                                                                                                                                                                                                                                  'SFDX_DEFAULTUSERNAME' = 'SFDX_DEFAULTUSERNAME'

                                                                                                                                                                                                                                                                                                    member 'SFDX_DISABLE_AUTOUPDATE'

                                                                                                                                                                                                                                                                                                    'SFDX_DISABLE_AUTOUPDATE' = 'SFDX_DISABLE_AUTOUPDATE'

                                                                                                                                                                                                                                                                                                      member 'SFDX_DISABLE_LOG_FILE'

                                                                                                                                                                                                                                                                                                      'SFDX_DISABLE_LOG_FILE' = 'SFDX_DISABLE_LOG_FILE'

                                                                                                                                                                                                                                                                                                        member 'SFDX_DISABLE_SOURCE_MEMBER_POLLING'

                                                                                                                                                                                                                                                                                                        'SFDX_DISABLE_SOURCE_MEMBER_POLLING' = 'SFDX_DISABLE_SOURCE_MEMBER_POLLING'

                                                                                                                                                                                                                                                                                                          member 'SFDX_DISABLE_TELEMETRY'

                                                                                                                                                                                                                                                                                                          'SFDX_DISABLE_TELEMETRY' = 'SFDX_DISABLE_TELEMETRY'

                                                                                                                                                                                                                                                                                                            member 'SFDX_DNS_TIMEOUT'

                                                                                                                                                                                                                                                                                                            'SFDX_DNS_TIMEOUT' = 'SFDX_DNS_TIMEOUT'

                                                                                                                                                                                                                                                                                                              member 'SFDX_DOMAIN_RETRY'

                                                                                                                                                                                                                                                                                                              'SFDX_DOMAIN_RETRY' = 'SFDX_DOMAIN_RETRY'

                                                                                                                                                                                                                                                                                                                member 'SFDX_ENV'

                                                                                                                                                                                                                                                                                                                'SFDX_ENV' = 'SFDX_ENV'

                                                                                                                                                                                                                                                                                                                  member 'SFDX_IMPROVED_CODE_COVERAGE'

                                                                                                                                                                                                                                                                                                                  'SFDX_IMPROVED_CODE_COVERAGE' = 'SFDX_IMPROVED_CODE_COVERAGE'

                                                                                                                                                                                                                                                                                                                    member 'SFDX_INSTALLER'

                                                                                                                                                                                                                                                                                                                    'SFDX_INSTALLER' = 'SFDX_INSTALLER'

                                                                                                                                                                                                                                                                                                                      member 'SFDX_INSTANCE_URL'

                                                                                                                                                                                                                                                                                                                      'SFDX_INSTANCE_URL' = 'SFDX_INSTANCE_URL'

                                                                                                                                                                                                                                                                                                                        member 'SFDX_JSON_TO_STDOUT'

                                                                                                                                                                                                                                                                                                                        'SFDX_JSON_TO_STDOUT' = 'SFDX_JSON_TO_STDOUT'

                                                                                                                                                                                                                                                                                                                          member 'SFDX_LAZY_LOAD_MODULES'

                                                                                                                                                                                                                                                                                                                          'SFDX_LAZY_LOAD_MODULES' = 'SFDX_LAZY_LOAD_MODULES'

                                                                                                                                                                                                                                                                                                                            member 'SFDX_LOG_LEVEL'

                                                                                                                                                                                                                                                                                                                            'SFDX_LOG_LEVEL' = 'SFDX_LOG_LEVEL'

                                                                                                                                                                                                                                                                                                                              member 'SFDX_LOG_ROTATION_COUNT'

                                                                                                                                                                                                                                                                                                                              'SFDX_LOG_ROTATION_COUNT' = 'SFDX_LOG_ROTATION_COUNT'

                                                                                                                                                                                                                                                                                                                                member 'SFDX_LOG_ROTATION_PERIOD'

                                                                                                                                                                                                                                                                                                                                'SFDX_LOG_ROTATION_PERIOD' = 'SFDX_LOG_ROTATION_PERIOD'

                                                                                                                                                                                                                                                                                                                                  member 'SFDX_MAX_QUERY_LIMIT'

                                                                                                                                                                                                                                                                                                                                  'SFDX_MAX_QUERY_LIMIT' = 'SFDX_MAX_QUERY_LIMIT'

                                                                                                                                                                                                                                                                                                                                    member 'SFDX_MDAPI_TEMP_DIR'

                                                                                                                                                                                                                                                                                                                                    'SFDX_MDAPI_TEMP_DIR' = 'SFDX_MDAPI_TEMP_DIR'

                                                                                                                                                                                                                                                                                                                                      member 'SFDX_NPM_REGISTRY'

                                                                                                                                                                                                                                                                                                                                      'SFDX_NPM_REGISTRY' = 'SFDX_NPM_REGISTRY'

                                                                                                                                                                                                                                                                                                                                        member 'SFDX_PRECOMPILE_ENABLE'

                                                                                                                                                                                                                                                                                                                                        'SFDX_PRECOMPILE_ENABLE' = 'SFDX_PRECOMPILE_ENABLE'

                                                                                                                                                                                                                                                                                                                                          member 'SFDX_PROJECT_AUTOUPDATE_DISABLE_FOR_PACKAGE_CREATE'

                                                                                                                                                                                                                                                                                                                                          'SFDX_PROJECT_AUTOUPDATE_DISABLE_FOR_PACKAGE_CREATE' = 'SFDX_PROJECT_AUTOUPDATE_DISABLE_FOR_PACKAGE_CREATE'

                                                                                                                                                                                                                                                                                                                                            member 'SFDX_PROJECT_AUTOUPDATE_DISABLE_FOR_PACKAGE_VERSION_CREATE'

                                                                                                                                                                                                                                                                                                                                            'SFDX_PROJECT_AUTOUPDATE_DISABLE_FOR_PACKAGE_VERSION_CREATE' = 'SFDX_PROJECT_AUTOUPDATE_DISABLE_FOR_PACKAGE_VERSION_CREATE'

                                                                                                                                                                                                                                                                                                                                              member 'SFDX_REST_DEPLOY'

                                                                                                                                                                                                                                                                                                                                              'SFDX_REST_DEPLOY' = 'SFDX_REST_DEPLOY'

                                                                                                                                                                                                                                                                                                                                                member 'SFDX_S3_HOST'

                                                                                                                                                                                                                                                                                                                                                'SFDX_S3_HOST' = 'SFDX_S3_HOST'

                                                                                                                                                                                                                                                                                                                                                  member 'SFDX_SOURCE_MEMBER_POLLING_TIMEOUT'

                                                                                                                                                                                                                                                                                                                                                  'SFDX_SOURCE_MEMBER_POLLING_TIMEOUT' = 'SFDX_SOURCE_MEMBER_POLLING_TIMEOUT'

                                                                                                                                                                                                                                                                                                                                                    member 'SFDX_SOURCE_TRACKING_BATCH_SIZE'

                                                                                                                                                                                                                                                                                                                                                    'SFDX_SOURCE_TRACKING_BATCH_SIZE' = 'SFDX_SOURCE_TRACKING_BATCH_SIZE'

                                                                                                                                                                                                                                                                                                                                                      member 'SFDX_UPDATE_INSTRUCTIONS'

                                                                                                                                                                                                                                                                                                                                                      'SFDX_UPDATE_INSTRUCTIONS' = 'SFDX_UPDATE_INSTRUCTIONS'

                                                                                                                                                                                                                                                                                                                                                        member 'SFDX_USE_GENERIC_UNIX_KEYCHAIN'

                                                                                                                                                                                                                                                                                                                                                        'SFDX_USE_GENERIC_UNIX_KEYCHAIN' = 'SFDX_USE_GENERIC_UNIX_KEYCHAIN'

                                                                                                                                                                                                                                                                                                                                                          member 'SFDX_USE_PROGRESS_BAR'

                                                                                                                                                                                                                                                                                                                                                          'SFDX_USE_PROGRESS_BAR' = 'SFDX_USE_PROGRESS_BAR'

                                                                                                                                                                                                                                                                                                                                                            enum LoggerLevel

                                                                                                                                                                                                                                                                                                                                                            enum LoggerLevel {
                                                                                                                                                                                                                                                                                                                                                            TRACE = 10,
                                                                                                                                                                                                                                                                                                                                                            DEBUG = 20,
                                                                                                                                                                                                                                                                                                                                                            INFO = 30,
                                                                                                                                                                                                                                                                                                                                                            WARN = 40,
                                                                                                                                                                                                                                                                                                                                                            ERROR = 50,
                                                                                                                                                                                                                                                                                                                                                            FATAL = 60,
                                                                                                                                                                                                                                                                                                                                                            }

                                                                                                                                                                                                                                                                                                                                                            member DEBUG

                                                                                                                                                                                                                                                                                                                                                            DEBUG = 20

                                                                                                                                                                                                                                                                                                                                                              member ERROR

                                                                                                                                                                                                                                                                                                                                                              ERROR = 50

                                                                                                                                                                                                                                                                                                                                                                member FATAL

                                                                                                                                                                                                                                                                                                                                                                FATAL = 60

                                                                                                                                                                                                                                                                                                                                                                  member INFO

                                                                                                                                                                                                                                                                                                                                                                  INFO = 30

                                                                                                                                                                                                                                                                                                                                                                    member TRACE

                                                                                                                                                                                                                                                                                                                                                                    TRACE = 10

                                                                                                                                                                                                                                                                                                                                                                      member WARN

                                                                                                                                                                                                                                                                                                                                                                      WARN = 40

                                                                                                                                                                                                                                                                                                                                                                        enum Mode

                                                                                                                                                                                                                                                                                                                                                                        enum Mode {
                                                                                                                                                                                                                                                                                                                                                                        PRODUCTION = 'production',
                                                                                                                                                                                                                                                                                                                                                                        DEVELOPMENT = 'development',
                                                                                                                                                                                                                                                                                                                                                                        DEMO = 'demo',
                                                                                                                                                                                                                                                                                                                                                                        TEST = 'test',
                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                        • Represents an environment mode. Supports production, development, demo, and test with the default mode being production.

                                                                                                                                                                                                                                                                                                                                                                          To set the mode, export SFDX_ENV=<mode> in your current environment.

                                                                                                                                                                                                                                                                                                                                                                        member DEMO

                                                                                                                                                                                                                                                                                                                                                                        DEMO = 'demo'

                                                                                                                                                                                                                                                                                                                                                                          member DEVELOPMENT

                                                                                                                                                                                                                                                                                                                                                                          DEVELOPMENT = 'development'

                                                                                                                                                                                                                                                                                                                                                                            member PRODUCTION

                                                                                                                                                                                                                                                                                                                                                                            PRODUCTION = 'production'

                                                                                                                                                                                                                                                                                                                                                                              member TEST

                                                                                                                                                                                                                                                                                                                                                                              TEST = 'test'

                                                                                                                                                                                                                                                                                                                                                                                enum OrgConfigProperties

                                                                                                                                                                                                                                                                                                                                                                                enum OrgConfigProperties {
                                                                                                                                                                                                                                                                                                                                                                                TARGET_ORG = 'target-org',
                                                                                                                                                                                                                                                                                                                                                                                TARGET_DEV_HUB = 'target-dev-hub',
                                                                                                                                                                                                                                                                                                                                                                                ORG_API_VERSION = 'org-api-version',
                                                                                                                                                                                                                                                                                                                                                                                ORG_CUSTOM_METADATA_TEMPLATES = 'org-custom-metadata-templates',
                                                                                                                                                                                                                                                                                                                                                                                ORG_MAX_QUERY_LIMIT = 'org-max-query-limit',
                                                                                                                                                                                                                                                                                                                                                                                ORG_INSTANCE_URL = 'org-instance-url',
                                                                                                                                                                                                                                                                                                                                                                                ORG_ISV_DEBUGGER_SID = 'org-isv-debugger-sid',
                                                                                                                                                                                                                                                                                                                                                                                ORG_ISV_DEBUGGER_URL = 'org-isv-debugger-url',
                                                                                                                                                                                                                                                                                                                                                                                ORG_CAPITALIZE_RECORD_TYPES = 'org-capitalize-record-types',
                                                                                                                                                                                                                                                                                                                                                                                }

                                                                                                                                                                                                                                                                                                                                                                                  member ORG_API_VERSION

                                                                                                                                                                                                                                                                                                                                                                                  ORG_API_VERSION = 'org-api-version'
                                                                                                                                                                                                                                                                                                                                                                                  • The api version

                                                                                                                                                                                                                                                                                                                                                                                  member ORG_CAPITALIZE_RECORD_TYPES

                                                                                                                                                                                                                                                                                                                                                                                  ORG_CAPITALIZE_RECORD_TYPES = 'org-capitalize-record-types'
                                                                                                                                                                                                                                                                                                                                                                                  • Capitalize record types when deploying scratch org settings

                                                                                                                                                                                                                                                                                                                                                                                  member ORG_CUSTOM_METADATA_TEMPLATES

                                                                                                                                                                                                                                                                                                                                                                                  ORG_CUSTOM_METADATA_TEMPLATES = 'org-custom-metadata-templates'
                                                                                                                                                                                                                                                                                                                                                                                  • Custom templates repo or local location.

                                                                                                                                                                                                                                                                                                                                                                                  member ORG_INSTANCE_URL

                                                                                                                                                                                                                                                                                                                                                                                  ORG_INSTANCE_URL = 'org-instance-url'
                                                                                                                                                                                                                                                                                                                                                                                  • The instance url of the org.

                                                                                                                                                                                                                                                                                                                                                                                  member ORG_ISV_DEBUGGER_SID

                                                                                                                                                                                                                                                                                                                                                                                  ORG_ISV_DEBUGGER_SID = 'org-isv-debugger-sid'
                                                                                                                                                                                                                                                                                                                                                                                  • The sid for the debugger configuration.

                                                                                                                                                                                                                                                                                                                                                                                  member ORG_ISV_DEBUGGER_URL

                                                                                                                                                                                                                                                                                                                                                                                  ORG_ISV_DEBUGGER_URL = 'org-isv-debugger-url'
                                                                                                                                                                                                                                                                                                                                                                                  • The url for the debugger configuration.

                                                                                                                                                                                                                                                                                                                                                                                  member ORG_MAX_QUERY_LIMIT

                                                                                                                                                                                                                                                                                                                                                                                  ORG_MAX_QUERY_LIMIT = 'org-max-query-limit'
                                                                                                                                                                                                                                                                                                                                                                                  • Allows users to override the 10,000 result query limit.

                                                                                                                                                                                                                                                                                                                                                                                  member TARGET_DEV_HUB

                                                                                                                                                                                                                                                                                                                                                                                  TARGET_DEV_HUB = 'target-dev-hub'
                                                                                                                                                                                                                                                                                                                                                                                  • Username associated with the default dev hub org.

                                                                                                                                                                                                                                                                                                                                                                                  member TARGET_ORG

                                                                                                                                                                                                                                                                                                                                                                                  TARGET_ORG = 'target-org'
                                                                                                                                                                                                                                                                                                                                                                                  • Username associate with the default org.

                                                                                                                                                                                                                                                                                                                                                                                  enum OrgTypes

                                                                                                                                                                                                                                                                                                                                                                                  enum OrgTypes {
                                                                                                                                                                                                                                                                                                                                                                                  Scratch = 'scratch',
                                                                                                                                                                                                                                                                                                                                                                                  Sandbox = 'sandbox',
                                                                                                                                                                                                                                                                                                                                                                                  }

                                                                                                                                                                                                                                                                                                                                                                                    member Sandbox

                                                                                                                                                                                                                                                                                                                                                                                    Sandbox = 'sandbox'

                                                                                                                                                                                                                                                                                                                                                                                      member Scratch

                                                                                                                                                                                                                                                                                                                                                                                      Scratch = 'scratch'

                                                                                                                                                                                                                                                                                                                                                                                        enum SandboxEvents

                                                                                                                                                                                                                                                                                                                                                                                        enum SandboxEvents {
                                                                                                                                                                                                                                                                                                                                                                                        EVENT_STATUS = 'status',
                                                                                                                                                                                                                                                                                                                                                                                        EVENT_ASYNC_RESULT = 'asyncResult',
                                                                                                                                                                                                                                                                                                                                                                                        EVENT_RESULT = 'result',
                                                                                                                                                                                                                                                                                                                                                                                        EVENT_AUTH = 'auth',
                                                                                                                                                                                                                                                                                                                                                                                        EVENT_RESUME = 'resume',
                                                                                                                                                                                                                                                                                                                                                                                        EVENT_MULTIPLE_SBX_PROCESSES = 'multipleMatchingSbxProcesses',
                                                                                                                                                                                                                                                                                                                                                                                        }

                                                                                                                                                                                                                                                                                                                                                                                          member EVENT_ASYNC_RESULT

                                                                                                                                                                                                                                                                                                                                                                                          EVENT_ASYNC_RESULT = 'asyncResult'

                                                                                                                                                                                                                                                                                                                                                                                            member EVENT_AUTH

                                                                                                                                                                                                                                                                                                                                                                                            EVENT_AUTH = 'auth'

                                                                                                                                                                                                                                                                                                                                                                                              member EVENT_MULTIPLE_SBX_PROCESSES

                                                                                                                                                                                                                                                                                                                                                                                              EVENT_MULTIPLE_SBX_PROCESSES = 'multipleMatchingSbxProcesses'

                                                                                                                                                                                                                                                                                                                                                                                                member EVENT_RESULT

                                                                                                                                                                                                                                                                                                                                                                                                EVENT_RESULT = 'result'

                                                                                                                                                                                                                                                                                                                                                                                                  member EVENT_RESUME

                                                                                                                                                                                                                                                                                                                                                                                                  EVENT_RESUME = 'resume'

                                                                                                                                                                                                                                                                                                                                                                                                    member EVENT_STATUS

                                                                                                                                                                                                                                                                                                                                                                                                    EVENT_STATUS = 'status'

                                                                                                                                                                                                                                                                                                                                                                                                      enum SfConfigProperties

                                                                                                                                                                                                                                                                                                                                                                                                      enum SfConfigProperties {
                                                                                                                                                                                                                                                                                                                                                                                                      DISABLE_TELEMETRY = 'disable-telemetry',
                                                                                                                                                                                                                                                                                                                                                                                                      }

                                                                                                                                                                                                                                                                                                                                                                                                        member DISABLE_TELEMETRY

                                                                                                                                                                                                                                                                                                                                                                                                        DISABLE_TELEMETRY = 'disable-telemetry'
                                                                                                                                                                                                                                                                                                                                                                                                        • Disables telemetry reporting

                                                                                                                                                                                                                                                                                                                                                                                                        enum SfdxPropertyKeys

                                                                                                                                                                                                                                                                                                                                                                                                        enum SfdxPropertyKeys {
                                                                                                                                                                                                                                                                                                                                                                                                        DEFAULT_DEV_HUB_USERNAME = 'defaultdevhubusername',
                                                                                                                                                                                                                                                                                                                                                                                                        DEFAULT_USERNAME = 'defaultusername',
                                                                                                                                                                                                                                                                                                                                                                                                        ISV_DEBUGGER_SID = 'isvDebuggerSid',
                                                                                                                                                                                                                                                                                                                                                                                                        ISV_DEBUGGER_URL = 'isvDebuggerUrl',
                                                                                                                                                                                                                                                                                                                                                                                                        API_VERSION = 'apiVersion',
                                                                                                                                                                                                                                                                                                                                                                                                        DISABLE_TELEMETRY = 'disableTelemetry',
                                                                                                                                                                                                                                                                                                                                                                                                        CUSTOM_ORG_METADATA_TEMPLATES = 'customOrgMetadataTemplates',
                                                                                                                                                                                                                                                                                                                                                                                                        MAX_QUERY_LIMIT = 'maxQueryLimit',
                                                                                                                                                                                                                                                                                                                                                                                                        REST_DEPLOY = 'restDeploy',
                                                                                                                                                                                                                                                                                                                                                                                                        INSTANCE_URL = 'instanceUrl',
                                                                                                                                                                                                                                                                                                                                                                                                        }

                                                                                                                                                                                                                                                                                                                                                                                                          member API_VERSION

                                                                                                                                                                                                                                                                                                                                                                                                          API_VERSION = 'apiVersion'

                                                                                                                                                                                                                                                                                                                                                                                                          member CUSTOM_ORG_METADATA_TEMPLATES

                                                                                                                                                                                                                                                                                                                                                                                                          CUSTOM_ORG_METADATA_TEMPLATES = 'customOrgMetadataTemplates'

                                                                                                                                                                                                                                                                                                                                                                                                          member DEFAULT_DEV_HUB_USERNAME

                                                                                                                                                                                                                                                                                                                                                                                                          DEFAULT_DEV_HUB_USERNAME = 'defaultdevhubusername'

                                                                                                                                                                                                                                                                                                                                                                                                          member DEFAULT_USERNAME

                                                                                                                                                                                                                                                                                                                                                                                                          DEFAULT_USERNAME = 'defaultusername'

                                                                                                                                                                                                                                                                                                                                                                                                          member DISABLE_TELEMETRY

                                                                                                                                                                                                                                                                                                                                                                                                          DISABLE_TELEMETRY = 'disableTelemetry'

                                                                                                                                                                                                                                                                                                                                                                                                          member INSTANCE_URL

                                                                                                                                                                                                                                                                                                                                                                                                          INSTANCE_URL = 'instanceUrl'

                                                                                                                                                                                                                                                                                                                                                                                                          member ISV_DEBUGGER_SID

                                                                                                                                                                                                                                                                                                                                                                                                          ISV_DEBUGGER_SID = 'isvDebuggerSid'

                                                                                                                                                                                                                                                                                                                                                                                                          member ISV_DEBUGGER_URL

                                                                                                                                                                                                                                                                                                                                                                                                          ISV_DEBUGGER_URL = 'isvDebuggerUrl'

                                                                                                                                                                                                                                                                                                                                                                                                          member MAX_QUERY_LIMIT

                                                                                                                                                                                                                                                                                                                                                                                                          MAX_QUERY_LIMIT = 'maxQueryLimit'

                                                                                                                                                                                                                                                                                                                                                                                                          member REST_DEPLOY

                                                                                                                                                                                                                                                                                                                                                                                                          REST_DEPLOY = 'restDeploy'
                                                                                                                                                                                                                                                                                                                                                                                                          • Deprecated

                                                                                                                                                                                                                                                                                                                                                                                                          Type Aliases

                                                                                                                                                                                                                                                                                                                                                                                                          type AuthFields

                                                                                                                                                                                                                                                                                                                                                                                                          type AuthFields = {
                                                                                                                                                                                                                                                                                                                                                                                                          clientApps?: {
                                                                                                                                                                                                                                                                                                                                                                                                          [key: string]: {
                                                                                                                                                                                                                                                                                                                                                                                                          clientId: string;
                                                                                                                                                                                                                                                                                                                                                                                                          clientSecret?: string;
                                                                                                                                                                                                                                                                                                                                                                                                          accessToken: string;
                                                                                                                                                                                                                                                                                                                                                                                                          refreshToken: string;
                                                                                                                                                                                                                                                                                                                                                                                                          oauthFlow: 'web';
                                                                                                                                                                                                                                                                                                                                                                                                          };
                                                                                                                                                                                                                                                                                                                                                                                                          };
                                                                                                                                                                                                                                                                                                                                                                                                          accessToken?: string;
                                                                                                                                                                                                                                                                                                                                                                                                          alias?: string;
                                                                                                                                                                                                                                                                                                                                                                                                          authCode?: string;
                                                                                                                                                                                                                                                                                                                                                                                                          clientId?: string;
                                                                                                                                                                                                                                                                                                                                                                                                          clientSecret?: string;
                                                                                                                                                                                                                                                                                                                                                                                                          created?: string;
                                                                                                                                                                                                                                                                                                                                                                                                          createdOrgInstance?: string;
                                                                                                                                                                                                                                                                                                                                                                                                          devHubUsername?: string;
                                                                                                                                                                                                                                                                                                                                                                                                          instanceUrl?: string;
                                                                                                                                                                                                                                                                                                                                                                                                          instanceApiVersion?: string;
                                                                                                                                                                                                                                                                                                                                                                                                          instanceApiVersionLastRetrieved?: string;
                                                                                                                                                                                                                                                                                                                                                                                                          isDevHub?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                          loginUrl?: string;
                                                                                                                                                                                                                                                                                                                                                                                                          orgId?: string;
                                                                                                                                                                                                                                                                                                                                                                                                          password?: string;
                                                                                                                                                                                                                                                                                                                                                                                                          privateKey?: string;
                                                                                                                                                                                                                                                                                                                                                                                                          refreshToken?: string;
                                                                                                                                                                                                                                                                                                                                                                                                          snapshot?: string;
                                                                                                                                                                                                                                                                                                                                                                                                          userId?: string;
                                                                                                                                                                                                                                                                                                                                                                                                          username?: string;
                                                                                                                                                                                                                                                                                                                                                                                                          usernames?: string[];
                                                                                                                                                                                                                                                                                                                                                                                                          userProfileName?: string;
                                                                                                                                                                                                                                                                                                                                                                                                          expirationDate?: string;
                                                                                                                                                                                                                                                                                                                                                                                                          tracksSource?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                          [Org.Fields.NAME]?: string;
                                                                                                                                                                                                                                                                                                                                                                                                          [Org.Fields.INSTANCE_NAME]?: string;
                                                                                                                                                                                                                                                                                                                                                                                                          [Org.Fields.NAMESPACE_PREFIX]?: Nullable<string>;
                                                                                                                                                                                                                                                                                                                                                                                                          [Org.Fields.IS_SANDBOX]?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                          [Org.Fields.IS_SCRATCH]?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                          [Org.Fields.TRIAL_EXPIRATION_DATE]?: Nullable<string>;
                                                                                                                                                                                                                                                                                                                                                                                                          [Org.Fields.ORG_EDITION]?: string;
                                                                                                                                                                                                                                                                                                                                                                                                          };
                                                                                                                                                                                                                                                                                                                                                                                                          • Fields for authorization, org, and local information.

                                                                                                                                                                                                                                                                                                                                                                                                          type AuthSideEffects

                                                                                                                                                                                                                                                                                                                                                                                                          type AuthSideEffects = {
                                                                                                                                                                                                                                                                                                                                                                                                          alias?: string;
                                                                                                                                                                                                                                                                                                                                                                                                          setDefault: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                          setDefaultDevHub: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                          setTracksSource?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                          };

                                                                                                                                                                                                                                                                                                                                                                                                            type CometSubscription

                                                                                                                                                                                                                                                                                                                                                                                                            type CometSubscription = {
                                                                                                                                                                                                                                                                                                                                                                                                            callback(callback: () => void): void;
                                                                                                                                                                                                                                                                                                                                                                                                            errback(callback: (error: Error) => void): void;
                                                                                                                                                                                                                                                                                                                                                                                                            };
                                                                                                                                                                                                                                                                                                                                                                                                            • The subscription object returned from the cometd subscribe object.

                                                                                                                                                                                                                                                                                                                                                                                                            type ConfigContents

                                                                                                                                                                                                                                                                                                                                                                                                            type ConfigContents<T = ConfigValue> = Dictionary<T>;
                                                                                                                                                                                                                                                                                                                                                                                                            • The type of content a config stores.

                                                                                                                                                                                                                                                                                                                                                                                                            type ConfigEntry

                                                                                                                                                                                                                                                                                                                                                                                                            type ConfigEntry = [string, ConfigValue];
                                                                                                                                                                                                                                                                                                                                                                                                            • The type of entries in a config store defined by the key and value type of ConfigContents.

                                                                                                                                                                                                                                                                                                                                                                                                            type ConfigInfo

                                                                                                                                                                                                                                                                                                                                                                                                            type ConfigInfo = {
                                                                                                                                                                                                                                                                                                                                                                                                            /**
                                                                                                                                                                                                                                                                                                                                                                                                            * key The config key.
                                                                                                                                                                                                                                                                                                                                                                                                            */
                                                                                                                                                                                                                                                                                                                                                                                                            key: string;
                                                                                                                                                                                                                                                                                                                                                                                                            /**
                                                                                                                                                                                                                                                                                                                                                                                                            * The location of the config property.
                                                                                                                                                                                                                                                                                                                                                                                                            */
                                                                                                                                                                                                                                                                                                                                                                                                            location?: ConfigAggregator.Location;
                                                                                                                                                                                                                                                                                                                                                                                                            /**
                                                                                                                                                                                                                                                                                                                                                                                                            * The config value.
                                                                                                                                                                                                                                                                                                                                                                                                            */
                                                                                                                                                                                                                                                                                                                                                                                                            value?: AnyJson;
                                                                                                                                                                                                                                                                                                                                                                                                            /**
                                                                                                                                                                                                                                                                                                                                                                                                            * The path of the config value.
                                                                                                                                                                                                                                                                                                                                                                                                            */
                                                                                                                                                                                                                                                                                                                                                                                                            path?: string;
                                                                                                                                                                                                                                                                                                                                                                                                            /**
                                                                                                                                                                                                                                                                                                                                                                                                            * `true` if the config property is in the local project.
                                                                                                                                                                                                                                                                                                                                                                                                            */
                                                                                                                                                                                                                                                                                                                                                                                                            isLocal: () => boolean;
                                                                                                                                                                                                                                                                                                                                                                                                            /**
                                                                                                                                                                                                                                                                                                                                                                                                            * `true` if the config property is in the global space.
                                                                                                                                                                                                                                                                                                                                                                                                            */
                                                                                                                                                                                                                                                                                                                                                                                                            isGlobal: () => boolean;
                                                                                                                                                                                                                                                                                                                                                                                                            /**
                                                                                                                                                                                                                                                                                                                                                                                                            * `true` if the config property is an environment variable.
                                                                                                                                                                                                                                                                                                                                                                                                            */
                                                                                                                                                                                                                                                                                                                                                                                                            isEnvVar: () => boolean;
                                                                                                                                                                                                                                                                                                                                                                                                            /**
                                                                                                                                                                                                                                                                                                                                                                                                            * True if the config property is deprecated.
                                                                                                                                                                                                                                                                                                                                                                                                            */
                                                                                                                                                                                                                                                                                                                                                                                                            deprecated?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                            };
                                                                                                                                                                                                                                                                                                                                                                                                            • Information about a config property.

                                                                                                                                                                                                                                                                                                                                                                                                            type ConfigPropertyMeta

                                                                                                                                                                                                                                                                                                                                                                                                            type ConfigPropertyMeta = {
                                                                                                                                                                                                                                                                                                                                                                                                            /**
                                                                                                                                                                                                                                                                                                                                                                                                            * The config property name.
                                                                                                                                                                                                                                                                                                                                                                                                            */
                                                                                                                                                                                                                                                                                                                                                                                                            key: string;
                                                                                                                                                                                                                                                                                                                                                                                                            /**
                                                                                                                                                                                                                                                                                                                                                                                                            * Description
                                                                                                                                                                                                                                                                                                                                                                                                            */
                                                                                                                                                                                                                                                                                                                                                                                                            description: string;
                                                                                                                                                                                                                                                                                                                                                                                                            /**
                                                                                                                                                                                                                                                                                                                                                                                                            * Reference to the config data input validation.
                                                                                                                                                                                                                                                                                                                                                                                                            */
                                                                                                                                                                                                                                                                                                                                                                                                            input?: ConfigPropertyMetaInput;
                                                                                                                                                                                                                                                                                                                                                                                                            /**
                                                                                                                                                                                                                                                                                                                                                                                                            * True if the property should be indirectly hidden from the user.
                                                                                                                                                                                                                                                                                                                                                                                                            */
                                                                                                                                                                                                                                                                                                                                                                                                            hidden?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                            /**
                                                                                                                                                                                                                                                                                                                                                                                                            * True if the property values should be stored encrypted.
                                                                                                                                                                                                                                                                                                                                                                                                            */
                                                                                                                                                                                                                                                                                                                                                                                                            encrypted?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                            /**
                                                                                                                                                                                                                                                                                                                                                                                                            * True if the property is deprecated
                                                                                                                                                                                                                                                                                                                                                                                                            */
                                                                                                                                                                                                                                                                                                                                                                                                            deprecated?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                            /**
                                                                                                                                                                                                                                                                                                                                                                                                            * Reference to config property name that will eventually replace this one.
                                                                                                                                                                                                                                                                                                                                                                                                            * Is only used if deprecated is set to true.
                                                                                                                                                                                                                                                                                                                                                                                                            */
                                                                                                                                                                                                                                                                                                                                                                                                            newKey?: string;
                                                                                                                                                                                                                                                                                                                                                                                                            };
                                                                                                                                                                                                                                                                                                                                                                                                            • Interface for meta information about config properties

                                                                                                                                                                                                                                                                                                                                                                                                            type ConfigPropertyMetaInput

                                                                                                                                                                                                                                                                                                                                                                                                            type ConfigPropertyMetaInput = {
                                                                                                                                                                                                                                                                                                                                                                                                            /**
                                                                                                                                                                                                                                                                                                                                                                                                            * Tests if the input value is valid and returns true if the input data is valid.
                                                                                                                                                                                                                                                                                                                                                                                                            *
                                                                                                                                                                                                                                                                                                                                                                                                            * @param value The input value.
                                                                                                                                                                                                                                                                                                                                                                                                            */
                                                                                                                                                                                                                                                                                                                                                                                                            validator: (value: ConfigValue) => boolean;
                                                                                                                                                                                                                                                                                                                                                                                                            /**
                                                                                                                                                                                                                                                                                                                                                                                                            * The message to return in the error if the validation fails.
                                                                                                                                                                                                                                                                                                                                                                                                            */
                                                                                                                                                                                                                                                                                                                                                                                                            failedMessage: string | ((value: ConfigValue) => string);
                                                                                                                                                                                                                                                                                                                                                                                                            };
                                                                                                                                                                                                                                                                                                                                                                                                            • Config property input validation

                                                                                                                                                                                                                                                                                                                                                                                                            type ConfigStore

                                                                                                                                                                                                                                                                                                                                                                                                            type ConfigStore<P extends ConfigContents = ConfigContents> = {
                                                                                                                                                                                                                                                                                                                                                                                                            entries(): ConfigEntry[];
                                                                                                                                                                                                                                                                                                                                                                                                            get<K extends Key<P>>(key: K, decrypt: boolean): P[K];
                                                                                                                                                                                                                                                                                                                                                                                                            get<T extends ConfigValue>(key: string, decrypt: boolean): T;
                                                                                                                                                                                                                                                                                                                                                                                                            getKeysByValue(value: ConfigValue): Array<Key<P>>;
                                                                                                                                                                                                                                                                                                                                                                                                            has(key: string): boolean;
                                                                                                                                                                                                                                                                                                                                                                                                            keys(): Array<Key<P>>;
                                                                                                                                                                                                                                                                                                                                                                                                            set<K extends Key<P>>(key: K, value: P[K]): void;
                                                                                                                                                                                                                                                                                                                                                                                                            set<T extends ConfigValue>(key: string, value: T): void;
                                                                                                                                                                                                                                                                                                                                                                                                            update<K extends Key<P>>(key: K, value: Partial<P[K]>): void;
                                                                                                                                                                                                                                                                                                                                                                                                            update<T extends ConfigValue>(key: string, value: Partial<T>): void;
                                                                                                                                                                                                                                                                                                                                                                                                            unset(key: string): boolean;
                                                                                                                                                                                                                                                                                                                                                                                                            unsetAll(keys: string[]): boolean;
                                                                                                                                                                                                                                                                                                                                                                                                            clear(): void;
                                                                                                                                                                                                                                                                                                                                                                                                            values(): ConfigValue[];
                                                                                                                                                                                                                                                                                                                                                                                                            forEach(actionFn: (key: string, value: ConfigValue) => void): void;
                                                                                                                                                                                                                                                                                                                                                                                                            getContents(): P;
                                                                                                                                                                                                                                                                                                                                                                                                            };
                                                                                                                                                                                                                                                                                                                                                                                                            • An interface for a config object with a persistent store.

                                                                                                                                                                                                                                                                                                                                                                                                            type ConfigValue

                                                                                                                                                                                                                                                                                                                                                                                                            type ConfigValue = AnyJson;
                                                                                                                                                                                                                                                                                                                                                                                                            • The allowed types stored in a config store.

                                                                                                                                                                                                                                                                                                                                                                                                            type DeviceCodePollingResponse

                                                                                                                                                                                                                                                                                                                                                                                                            type DeviceCodePollingResponse = {
                                                                                                                                                                                                                                                                                                                                                                                                            access_token: string;
                                                                                                                                                                                                                                                                                                                                                                                                            refresh_token: string;
                                                                                                                                                                                                                                                                                                                                                                                                            signature: string;
                                                                                                                                                                                                                                                                                                                                                                                                            scope: string;
                                                                                                                                                                                                                                                                                                                                                                                                            instance_url: string;
                                                                                                                                                                                                                                                                                                                                                                                                            id: string;
                                                                                                                                                                                                                                                                                                                                                                                                            token_type: string;
                                                                                                                                                                                                                                                                                                                                                                                                            issued_at: string;
                                                                                                                                                                                                                                                                                                                                                                                                            } & JsonMap;
                                                                                                                                                                                                                                                                                                                                                                                                            • Deprecated

                                                                                                                                                                                                                                                                                                                                                                                                              Will be removed mid January 2026

                                                                                                                                                                                                                                                                                                                                                                                                            type DeviceCodeResponse

                                                                                                                                                                                                                                                                                                                                                                                                            type DeviceCodeResponse = {
                                                                                                                                                                                                                                                                                                                                                                                                            device_code: string;
                                                                                                                                                                                                                                                                                                                                                                                                            interval: number;
                                                                                                                                                                                                                                                                                                                                                                                                            user_code: string;
                                                                                                                                                                                                                                                                                                                                                                                                            verification_uri: string;
                                                                                                                                                                                                                                                                                                                                                                                                            } & JsonMap;
                                                                                                                                                                                                                                                                                                                                                                                                            • Deprecated

                                                                                                                                                                                                                                                                                                                                                                                                              Will be removed mid January 2026

                                                                                                                                                                                                                                                                                                                                                                                                            type Fields

                                                                                                                                                                                                                                                                                                                                                                                                            type Fields = Record<string, unknown>;
                                                                                                                                                                                                                                                                                                                                                                                                            • An object

                                                                                                                                                                                                                                                                                                                                                                                                            type FieldValue

                                                                                                                                                                                                                                                                                                                                                                                                            type FieldValue = string | number | boolean | Fields;
                                                                                                                                                                                                                                                                                                                                                                                                            • All possible field value types.

                                                                                                                                                                                                                                                                                                                                                                                                            type LoggerLevelValue

                                                                                                                                                                                                                                                                                                                                                                                                            type LoggerLevelValue = LoggerLevel | number;
                                                                                                                                                                                                                                                                                                                                                                                                            • Any numeric Logger level.

                                                                                                                                                                                                                                                                                                                                                                                                            type LoggerOptions

                                                                                                                                                                                                                                                                                                                                                                                                            type LoggerOptions = {
                                                                                                                                                                                                                                                                                                                                                                                                            /**
                                                                                                                                                                                                                                                                                                                                                                                                            * The logger name.
                                                                                                                                                                                                                                                                                                                                                                                                            */
                                                                                                                                                                                                                                                                                                                                                                                                            name: string;
                                                                                                                                                                                                                                                                                                                                                                                                            /**
                                                                                                                                                                                                                                                                                                                                                                                                            * The desired log level.
                                                                                                                                                                                                                                                                                                                                                                                                            */
                                                                                                                                                                                                                                                                                                                                                                                                            level?: LoggerLevelValue;
                                                                                                                                                                                                                                                                                                                                                                                                            /**
                                                                                                                                                                                                                                                                                                                                                                                                            * Create a logger with the fields set
                                                                                                                                                                                                                                                                                                                                                                                                            */
                                                                                                                                                                                                                                                                                                                                                                                                            fields?: Fields;
                                                                                                                                                                                                                                                                                                                                                                                                            /** log to memory instead of to a file. Intended for Unit Testing */
                                                                                                                                                                                                                                                                                                                                                                                                            useMemoryLogger?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                            };
                                                                                                                                                                                                                                                                                                                                                                                                            • The common set of Logger options.

                                                                                                                                                                                                                                                                                                                                                                                                            type LogLine

                                                                                                                                                                                                                                                                                                                                                                                                            type LogLine = {
                                                                                                                                                                                                                                                                                                                                                                                                            name: string;
                                                                                                                                                                                                                                                                                                                                                                                                            hostname: string;
                                                                                                                                                                                                                                                                                                                                                                                                            pid: string;
                                                                                                                                                                                                                                                                                                                                                                                                            log: string;
                                                                                                                                                                                                                                                                                                                                                                                                            level: number;
                                                                                                                                                                                                                                                                                                                                                                                                            msg: string;
                                                                                                                                                                                                                                                                                                                                                                                                            time: string;
                                                                                                                                                                                                                                                                                                                                                                                                            v: number;
                                                                                                                                                                                                                                                                                                                                                                                                            };
                                                                                                                                                                                                                                                                                                                                                                                                            • Log line interface

                                                                                                                                                                                                                                                                                                                                                                                                            type NamedPackageDir

                                                                                                                                                                                                                                                                                                                                                                                                            type NamedPackageDir = PackageDir & NameAndFullPath;

                                                                                                                                                                                                                                                                                                                                                                                                              type OrgAuthorization

                                                                                                                                                                                                                                                                                                                                                                                                              type OrgAuthorization = {
                                                                                                                                                                                                                                                                                                                                                                                                              orgId: string;
                                                                                                                                                                                                                                                                                                                                                                                                              username: string;
                                                                                                                                                                                                                                                                                                                                                                                                              oauthMethod: 'jwt' | 'web' | 'token' | 'unknown';
                                                                                                                                                                                                                                                                                                                                                                                                              aliases: Nullable<string[]>;
                                                                                                                                                                                                                                                                                                                                                                                                              configs: Nullable<string[]>;
                                                                                                                                                                                                                                                                                                                                                                                                              isScratchOrg?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                              isDevHub?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                              isSandbox?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                              instanceUrl?: string;
                                                                                                                                                                                                                                                                                                                                                                                                              accessToken?: string;
                                                                                                                                                                                                                                                                                                                                                                                                              error?: string;
                                                                                                                                                                                                                                                                                                                                                                                                              isExpired: boolean | 'unknown';
                                                                                                                                                                                                                                                                                                                                                                                                              };

                                                                                                                                                                                                                                                                                                                                                                                                                type PermissionSetAssignmentFields

                                                                                                                                                                                                                                                                                                                                                                                                                type PermissionSetAssignmentFields = {
                                                                                                                                                                                                                                                                                                                                                                                                                assigneeId: string;
                                                                                                                                                                                                                                                                                                                                                                                                                permissionSetId: string;
                                                                                                                                                                                                                                                                                                                                                                                                                };
                                                                                                                                                                                                                                                                                                                                                                                                                • Map of fields name for a permission set assignment

                                                                                                                                                                                                                                                                                                                                                                                                                type ProjectJson

                                                                                                                                                                                                                                                                                                                                                                                                                type ProjectJson = z.infer<typeof ProjectJsonSchema>;

                                                                                                                                                                                                                                                                                                                                                                                                                  type ResultEvent

                                                                                                                                                                                                                                                                                                                                                                                                                  type ResultEvent = {
                                                                                                                                                                                                                                                                                                                                                                                                                  sandboxProcessObj: SandboxProcessObject;
                                                                                                                                                                                                                                                                                                                                                                                                                  sandboxRes: SandboxUserAuthResponse;
                                                                                                                                                                                                                                                                                                                                                                                                                  };

                                                                                                                                                                                                                                                                                                                                                                                                                    type ResumeSandboxRequest

                                                                                                                                                                                                                                                                                                                                                                                                                    type ResumeSandboxRequest = {
                                                                                                                                                                                                                                                                                                                                                                                                                    SandboxName?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                    SandboxProcessObjId?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                    };

                                                                                                                                                                                                                                                                                                                                                                                                                      type SandboxInfo

                                                                                                                                                                                                                                                                                                                                                                                                                      type SandboxInfo = {
                                                                                                                                                                                                                                                                                                                                                                                                                      Id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                      IsDeleted: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                      CreatedDate: string;
                                                                                                                                                                                                                                                                                                                                                                                                                      CreatedById: string;
                                                                                                                                                                                                                                                                                                                                                                                                                      LastModifiedDate: string;
                                                                                                                                                                                                                                                                                                                                                                                                                      LastModifiedById: string;
                                                                                                                                                                                                                                                                                                                                                                                                                      SandboxName: string;
                                                                                                                                                                                                                                                                                                                                                                                                                      LicenseType: 'DEVELOPER' | 'DEVELOPER PRO' | 'PARTIAL' | 'FULL';
                                                                                                                                                                                                                                                                                                                                                                                                                      TemplateId?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                      HistoryDays: -1 | 0 | 10 | 20 | 30 | 60 | 90 | 120 | 150 | 180;
                                                                                                                                                                                                                                                                                                                                                                                                                      CopyChatter: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                      AutoActivate: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                      ApexClassId?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                      Description?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                      SourceId?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                      ActivationUserGroupId?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                      CopyArchivedActivities?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                      Features?: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                      PostCopyConfig?: PostCopyConfigEntry[] | string;
                                                                                                                                                                                                                                                                                                                                                                                                                      };

                                                                                                                                                                                                                                                                                                                                                                                                                        type SandboxProcessObject

                                                                                                                                                                                                                                                                                                                                                                                                                        type SandboxProcessObject = {
                                                                                                                                                                                                                                                                                                                                                                                                                        Id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                        Status: string;
                                                                                                                                                                                                                                                                                                                                                                                                                        SandboxName: string;
                                                                                                                                                                                                                                                                                                                                                                                                                        SandboxInfoId: string;
                                                                                                                                                                                                                                                                                                                                                                                                                        LicenseType: string;
                                                                                                                                                                                                                                                                                                                                                                                                                        CreatedDate: string;
                                                                                                                                                                                                                                                                                                                                                                                                                        SandboxOrganization?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                        CopyProgress?: number;
                                                                                                                                                                                                                                                                                                                                                                                                                        SourceId?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                        Description?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                        ApexClassId?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                        EndDate?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                        Features?: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                        };

                                                                                                                                                                                                                                                                                                                                                                                                                          type SandboxRequest

                                                                                                                                                                                                                                                                                                                                                                                                                          type SandboxRequest = {
                                                                                                                                                                                                                                                                                                                                                                                                                          SandboxName: string;
                                                                                                                                                                                                                                                                                                                                                                                                                          LicenseType?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                          /** Should match a SandboxInfoId, not a SandboxProcessId */
                                                                                                                                                                                                                                                                                                                                                                                                                          SourceId?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                          Description?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                          ApexClassId?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                          ActivationUserGroupId?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                          Features?: string[] | string;
                                                                                                                                                                                                                                                                                                                                                                                                                          PostCopyConfig?: PostCopyConfigEntry[] | string;
                                                                                                                                                                                                                                                                                                                                                                                                                          };

                                                                                                                                                                                                                                                                                                                                                                                                                            type SandboxRequestCacheEntry

                                                                                                                                                                                                                                                                                                                                                                                                                            type SandboxRequestCacheEntry = {
                                                                                                                                                                                                                                                                                                                                                                                                                            alias?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                            setDefault?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                            prodOrgUsername: string;
                                                                                                                                                                                                                                                                                                                                                                                                                            action: 'Create' | 'Refresh';
                                                                                                                                                                                                                                                                                                                                                                                                                            sandboxProcessObject: Partial<SandboxProcessObject>;
                                                                                                                                                                                                                                                                                                                                                                                                                            sandboxRequest: Partial<SandboxRequest>;
                                                                                                                                                                                                                                                                                                                                                                                                                            tracksSource?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                            };

                                                                                                                                                                                                                                                                                                                                                                                                                              type SandboxUserAuthRequest

                                                                                                                                                                                                                                                                                                                                                                                                                              type SandboxUserAuthRequest = {
                                                                                                                                                                                                                                                                                                                                                                                                                              sandboxName: string;
                                                                                                                                                                                                                                                                                                                                                                                                                              clientId: string;
                                                                                                                                                                                                                                                                                                                                                                                                                              callbackUrl: string;
                                                                                                                                                                                                                                                                                                                                                                                                                              };

                                                                                                                                                                                                                                                                                                                                                                                                                                type SandboxUserAuthResponse

                                                                                                                                                                                                                                                                                                                                                                                                                                type SandboxUserAuthResponse = {
                                                                                                                                                                                                                                                                                                                                                                                                                                authUserName: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                authCode: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                instanceUrl: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                loginUrl: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                };

                                                                                                                                                                                                                                                                                                                                                                                                                                  type ScratchOrgCreateOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                  type ScratchOrgCreateOptions = {
                                                                                                                                                                                                                                                                                                                                                                                                                                  /** the environment hub org */
                                                                                                                                                                                                                                                                                                                                                                                                                                  hubOrg: Org;
                                                                                                                                                                                                                                                                                                                                                                                                                                  /** The connected app consumer key. */
                                                                                                                                                                                                                                                                                                                                                                                                                                  connectedAppConsumerKey?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                  /** duration of the scratch org (in days) (default:1, min:1, max:30) */
                                                                                                                                                                                                                                                                                                                                                                                                                                  durationDays?: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                  /** create the scratch org with no namespace */
                                                                                                                                                                                                                                                                                                                                                                                                                                  nonamespace?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                  /** create the scratch org with no second-generation package ancestors */
                                                                                                                                                                                                                                                                                                                                                                                                                                  noancestors?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                  /** the streaming client socket timeout (in minutes) must be an instance of the Duration utility class (default:6) */
                                                                                                                                                                                                                                                                                                                                                                                                                                  wait?: Duration;
                                                                                                                                                                                                                                                                                                                                                                                                                                  /** number of scratch org auth retries after scratch org is successfully signed up (default:0, min:0, max:10) */
                                                                                                                                                                                                                                                                                                                                                                                                                                  retry?: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                  /** target server instance API version */
                                                                                                                                                                                                                                                                                                                                                                                                                                  apiversion?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                  * org definition in JSON format, stringified
                                                                                                                                                                                                                                                                                                                                                                                                                                  *
                                                                                                                                                                                                                                                                                                                                                                                                                                  * @deprecated use orgConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                  */
                                                                                                                                                                                                                                                                                                                                                                                                                                  definitionjson?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                  * path to an org definition file
                                                                                                                                                                                                                                                                                                                                                                                                                                  *
                                                                                                                                                                                                                                                                                                                                                                                                                                  * @deprecated use orgConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                  * */
                                                                                                                                                                                                                                                                                                                                                                                                                                  definitionfile?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                  /** overrides definitionjson */
                                                                                                                                                                                                                                                                                                                                                                                                                                  orgConfig?: Record<string, unknown>;
                                                                                                                                                                                                                                                                                                                                                                                                                                  /** OAuth client secret of personal connected app */
                                                                                                                                                                                                                                                                                                                                                                                                                                  clientSecret?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                  /** alias to set for the created org */
                                                                                                                                                                                                                                                                                                                                                                                                                                  alias?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                  /** after complete, set the org as the default */
                                                                                                                                                                                                                                                                                                                                                                                                                                  setDefault?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                  /** if false, do not use source tracking for this scratch org */
                                                                                                                                                                                                                                                                                                                                                                                                                                  tracksSource?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                  };

                                                                                                                                                                                                                                                                                                                                                                                                                                    type ScratchOrgCreateResult

                                                                                                                                                                                                                                                                                                                                                                                                                                    type ScratchOrgCreateResult = {
                                                                                                                                                                                                                                                                                                                                                                                                                                    username?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                    scratchOrgInfo?: ScratchOrgInfo;
                                                                                                                                                                                                                                                                                                                                                                                                                                    authInfo?: AuthInfo;
                                                                                                                                                                                                                                                                                                                                                                                                                                    authFields?: AuthFields;
                                                                                                                                                                                                                                                                                                                                                                                                                                    warnings: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                    };

                                                                                                                                                                                                                                                                                                                                                                                                                                      type ScratchOrgDef

                                                                                                                                                                                                                                                                                                                                                                                                                                      type ScratchOrgDef = z.infer<typeof ScratchOrgDefSchema>;

                                                                                                                                                                                                                                                                                                                                                                                                                                        type ScratchOrgInfo

                                                                                                                                                                                                                                                                                                                                                                                                                                        type ScratchOrgInfo = {
                                                                                                                                                                                                                                                                                                                                                                                                                                        AdminEmail?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                        readonly CreatedDate?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                        ConnectedAppCallbackUrl?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                        ConnectedAppConsumerKey?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                        Country?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                        Description?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                        DurationDays?: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                        Edition?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                        readonly ErrorCode?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                        readonly ExpirationDate?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                        Features?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                        HasSampleData?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                        readonly Id?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                        Language?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                        LoginUrl: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                        readonly Name?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                        Namespace?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                        OrgName?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                        Release?: 'Current' | 'Previous' | 'Preview';
                                                                                                                                                                                                                                                                                                                                                                                                                                        readonly ScratchOrg?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                        SourceOrg?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                        readonly AuthCode: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                        Snapshot?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                        readonly Status: 'New' | 'Creating' | 'Active' | 'Error' | 'Deleted';
                                                                                                                                                                                                                                                                                                                                                                                                                                        readonly SignupEmail: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                        readonly SignupUsername: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                        readonly SignupInstance: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                        Username: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                        settings?: Record<string, unknown>;
                                                                                                                                                                                                                                                                                                                                                                                                                                        objectSettings?: {
                                                                                                                                                                                                                                                                                                                                                                                                                                        [objectName: string]: ObjectSetting;
                                                                                                                                                                                                                                                                                                                                                                                                                                        };
                                                                                                                                                                                                                                                                                                                                                                                                                                        orgPreferences?: {
                                                                                                                                                                                                                                                                                                                                                                                                                                        enabled: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                        disabled: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                        };
                                                                                                                                                                                                                                                                                                                                                                                                                                        };

                                                                                                                                                                                                                                                                                                                                                                                                                                          type ScratchOrgLifecycleEvent

                                                                                                                                                                                                                                                                                                                                                                                                                                          type ScratchOrgLifecycleEvent = {
                                                                                                                                                                                                                                                                                                                                                                                                                                          stage: (typeof scratchOrgLifecycleStages)[number];
                                                                                                                                                                                                                                                                                                                                                                                                                                          scratchOrgInfo?: ScratchOrgInfo;
                                                                                                                                                                                                                                                                                                                                                                                                                                          };

                                                                                                                                                                                                                                                                                                                                                                                                                                            type ScratchOrgRequest

                                                                                                                                                                                                                                                                                                                                                                                                                                            type ScratchOrgRequest = Omit<ScratchOrgCreateOptions, 'hubOrg'>;

                                                                                                                                                                                                                                                                                                                                                                                                                                              type StatusEvent

                                                                                                                                                                                                                                                                                                                                                                                                                                              type StatusEvent = {
                                                                                                                                                                                                                                                                                                                                                                                                                                              sandboxProcessObj: SandboxProcessObject;
                                                                                                                                                                                                                                                                                                                                                                                                                                              interval: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                              remainingWait: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                              waitingOnAuth: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                              };

                                                                                                                                                                                                                                                                                                                                                                                                                                                type StatusResult

                                                                                                                                                                                                                                                                                                                                                                                                                                                type StatusResult = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                * If the result of the streaming or polling client is expected to return a result
                                                                                                                                                                                                                                                                                                                                                                                                                                                */
                                                                                                                                                                                                                                                                                                                                                                                                                                                payload?: AnyJson;
                                                                                                                                                                                                                                                                                                                                                                                                                                                /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                * Indicates to the streaming or polling client that the subscriber has what its needs. If `true` the client will end
                                                                                                                                                                                                                                                                                                                                                                                                                                                * the messaging exchanges with the endpoint.
                                                                                                                                                                                                                                                                                                                                                                                                                                                */
                                                                                                                                                                                                                                                                                                                                                                                                                                                completed: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                };

                                                                                                                                                                                                                                                                                                                                                                                                                                                  type StructuredMessage

                                                                                                                                                                                                                                                                                                                                                                                                                                                  type StructuredMessage = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  message: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  name: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  actions?: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                  };

                                                                                                                                                                                                                                                                                                                                                                                                                                                    type UserFields

                                                                                                                                                                                                                                                                                                                                                                                                                                                    type UserFields = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                    -readonly [K in keyof typeof REQUIRED_FIELDS]: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Required fields type needed to represent a Salesforce User object.

                                                                                                                                                                                                                                                                                                                                                                                                                                                      **See** https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_user.htm

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Namespaces

                                                                                                                                                                                                                                                                                                                                                                                                                                                    namespace AuthInfo

                                                                                                                                                                                                                                                                                                                                                                                                                                                    namespace AuthInfo {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                      type Options

                                                                                                                                                                                                                                                                                                                                                                                                                                                      type Options = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                      * Org signup username.
                                                                                                                                                                                                                                                                                                                                                                                                                                                      */
                                                                                                                                                                                                                                                                                                                                                                                                                                                      username?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                      * OAuth options.
                                                                                                                                                                                                                                                                                                                                                                                                                                                      */
                                                                                                                                                                                                                                                                                                                                                                                                                                                      oauth2Options?: JwtOAuth2Config;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      clientApps?: Array<{
                                                                                                                                                                                                                                                                                                                                                                                                                                                      name: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      accessToken: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      refreshToken: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      clientId: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      clientSecret?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      }>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                      * Options for the access token auth.
                                                                                                                                                                                                                                                                                                                                                                                                                                                      */
                                                                                                                                                                                                                                                                                                                                                                                                                                                      accessTokenOptions?: AccessTokenOptions;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      oauth2?: OAuth2;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                      * In certain situations, a new auth info wants to use the connected app
                                                                                                                                                                                                                                                                                                                                                                                                                                                      * information from another parent org. Typically for scratch org or sandbox
                                                                                                                                                                                                                                                                                                                                                                                                                                                      * creation.
                                                                                                                                                                                                                                                                                                                                                                                                                                                      */
                                                                                                                                                                                                                                                                                                                                                                                                                                                      parentUsername?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      isDevHub?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Constructor options for AuthInfo.

                                                                                                                                                                                                                                                                                                                                                                                                                                                      namespace ConfigAggregator

                                                                                                                                                                                                                                                                                                                                                                                                                                                      namespace ConfigAggregator {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                        enum Location

                                                                                                                                                                                                                                                                                                                                                                                                                                                        const enum Location {
                                                                                                                                                                                                                                                                                                                                                                                                                                                        GLOBAL = 'Global',
                                                                                                                                                                                                                                                                                                                                                                                                                                                        LOCAL = 'Local',
                                                                                                                                                                                                                                                                                                                                                                                                                                                        ENVIRONMENT = 'Environment',
                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • An enum of all possible locations for a config value.

                                                                                                                                                                                                                                                                                                                                                                                                                                                        member ENVIRONMENT

                                                                                                                                                                                                                                                                                                                                                                                                                                                        ENVIRONMENT = 'Environment'
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Represents environment variables.

                                                                                                                                                                                                                                                                                                                                                                                                                                                        member GLOBAL

                                                                                                                                                                                                                                                                                                                                                                                                                                                        GLOBAL = 'Global'
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Represents the global config.

                                                                                                                                                                                                                                                                                                                                                                                                                                                        member LOCAL

                                                                                                                                                                                                                                                                                                                                                                                                                                                        LOCAL = 'Local'
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Represents the local project config.

                                                                                                                                                                                                                                                                                                                                                                                                                                                        type Options

                                                                                                                                                                                                                                                                                                                                                                                                                                                        type Options = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                        customConfigMeta?: ConfigPropertyMeta[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                        /** an absolute path to the project root */
                                                                                                                                                                                                                                                                                                                                                                                                                                                        projectPath?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                        };

                                                                                                                                                                                                                                                                                                                                                                                                                                                          namespace ConfigFile

                                                                                                                                                                                                                                                                                                                                                                                                                                                          namespace ConfigFile {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                            type Options

                                                                                                                                                                                                                                                                                                                                                                                                                                                            type Options = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                            /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                            * The root folder where the config file is stored.
                                                                                                                                                                                                                                                                                                                                                                                                                                                            */
                                                                                                                                                                                                                                                                                                                                                                                                                                                            rootFolder?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                            /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                            * The state folder where the config file is stored.
                                                                                                                                                                                                                                                                                                                                                                                                                                                            */
                                                                                                                                                                                                                                                                                                                                                                                                                                                            stateFolder?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                            /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                            * The file name.
                                                                                                                                                                                                                                                                                                                                                                                                                                                            */
                                                                                                                                                                                                                                                                                                                                                                                                                                                            filename?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                            /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                            * If the file is in the global or project directory.
                                                                                                                                                                                                                                                                                                                                                                                                                                                            */
                                                                                                                                                                                                                                                                                                                                                                                                                                                            isGlobal?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                            /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                            * If the file is in the state folder or no (.sfdx).
                                                                                                                                                                                                                                                                                                                                                                                                                                                            */
                                                                                                                                                                                                                                                                                                                                                                                                                                                            isState?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                            /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                            * The full file path where the config file is stored.
                                                                                                                                                                                                                                                                                                                                                                                                                                                            */
                                                                                                                                                                                                                                                                                                                                                                                                                                                            filePath?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                            /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                            * Indicates if init should throw if the corresponding config file is not found.
                                                                                                                                                                                                                                                                                                                                                                                                                                                            */
                                                                                                                                                                                                                                                                                                                                                                                                                                                            throwOnNotFound?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                            } & BaseConfigStore.Options;
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • The interface for Config options.

                                                                                                                                                                                                                                                                                                                                                                                                                                                            namespace Connection

                                                                                                                                                                                                                                                                                                                                                                                                                                                            namespace Connection {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                              type Options

                                                                                                                                                                                                                                                                                                                                                                                                                                                              type Options<S extends Schema> = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                              /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                              * AuthInfo instance.
                                                                                                                                                                                                                                                                                                                                                                                                                                                              */
                                                                                                                                                                                                                                                                                                                                                                                                                                                              authInfo: AuthInfo;
                                                                                                                                                                                                                                                                                                                                                                                                                                                              /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                              * ConfigAggregator for getting defaults.
                                                                                                                                                                                                                                                                                                                                                                                                                                                              */
                                                                                                                                                                                                                                                                                                                                                                                                                                                              configAggregator?: ConfigAggregator;
                                                                                                                                                                                                                                                                                                                                                                                                                                                              /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                              * Additional connection parameters.
                                                                                                                                                                                                                                                                                                                                                                                                                                                              */
                                                                                                                                                                                                                                                                                                                                                                                                                                                              connectionOptions?: ConnectionConfig<S>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                              /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                              * Client app to use for auth info credentials.
                                                                                                                                                                                                                                                                                                                                                                                                                                                              */
                                                                                                                                                                                                                                                                                                                                                                                                                                                              clientApp?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                              };
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Connection Options.

                                                                                                                                                                                                                                                                                                                                                                                                                                                              namespace DefaultUserFields

                                                                                                                                                                                                                                                                                                                                                                                                                                                              namespace DefaultUserFields {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                type Options

                                                                                                                                                                                                                                                                                                                                                                                                                                                                type Options = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                templateUser: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                newUserName?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Used to initialize default values for fields based on a templateUser user. This user will be part of the Standard User profile.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                namespace MyDomainResolver

                                                                                                                                                                                                                                                                                                                                                                                                                                                                namespace MyDomainResolver {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  type Options

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  type Options = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  * The host to resolve.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  url: URL;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  * The retry interval.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  timeout?: Duration;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  * The retry timeout.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  frequency?: Duration;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Options for the MyDomain DNS resolver.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  namespace Org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  namespace Org {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    enum Fields

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    enum Fields {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ALIAS = 'alias',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    CREATED = 'created',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NAME = 'name',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NAMESPACE_PREFIX = 'namespacePrefix',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    INSTANCE_NAME = 'instanceName',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    TRIAL_EXPIRATION_DATE = 'trailExpirationDate',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ORG_EDITION = 'orgEdition',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    CREATED_ORG_INSTANCE = 'createdOrgInstance',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    DEV_HUB_USERNAME = 'devHubUsername',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    INSTANCE_URL = 'instanceUrl',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    IS_DEV_HUB = 'isDevHub',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    IS_SCRATCH = 'isScratch',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    IS_SANDBOX = 'isSandbox',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    LOGIN_URL = 'loginUrl',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ORG_ID = 'orgId',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    STATUS = 'status',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    SNAPSHOT = 'snapshot',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    TRACKS_SOURCE = 'tracksSource',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Org Fields.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    member ALIAS

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ALIAS = 'alias'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • The org alias.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    member CREATED

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    CREATED = 'created'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      member CREATED_ORG_INSTANCE

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      CREATED_ORG_INSTANCE = 'createdOrgInstance'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • The Salesforce instance the org was created on. e.g. cs42.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      member DEV_HUB_USERNAME

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      DEV_HUB_USERNAME = 'devHubUsername'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • The username of the dev hub org that created this org. Only populated for scratch orgs.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      member INSTANCE_NAME

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      INSTANCE_NAME = 'instanceName'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        member INSTANCE_URL

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        INSTANCE_URL = 'instanceUrl'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • The full url of the instance the org lives on.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        member IS_DEV_HUB

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        IS_DEV_HUB = 'isDevHub'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Is the current org a dev hub org. e.g. They have access to the ScratchOrgInfo object.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        member IS_SANDBOX

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        IS_SANDBOX = 'isSandbox'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Is the current org a sandbox (not a scratch org on a non-prod instance), but an actual Sandbox org). e.g. Organization has IsSandbox == true and TrialExpirationDate == null.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        member IS_SCRATCH

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        IS_SCRATCH = 'isScratch'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Is the current org a scratch org. e.g. Organization has IsSandbox == true and TrialExpirationDate != null.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        member LOGIN_URL

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        LOGIN_URL = 'loginUrl'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • The login url of the org. e.g. https://login.salesforce.com or https://test.salesforce.com.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        member NAME

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NAME = 'name'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          member NAMESPACE_PREFIX

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NAMESPACE_PREFIX = 'namespacePrefix'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            member ORG_EDITION

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ORG_EDITION = 'orgEdition'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • The org edition. e.g. Developer Edition, Enterprise Edition.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            member ORG_ID

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ORG_ID = 'orgId'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • The org ID.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            member SNAPSHOT

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            SNAPSHOT = 'snapshot'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • The snapshot used to create the scratch org.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            member STATUS

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            STATUS = 'status'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • The OrgStatus of the org.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            member TRACKS_SOURCE

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            TRACKS_SOURCE = 'tracksSource'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • true: the org supports and wants source tracking false: the org opted out of tracking or can't support it

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            member TRIAL_EXPIRATION_DATE

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            TRIAL_EXPIRATION_DATE = 'trailExpirationDate'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              enum Status

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              enum Status {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ACTIVE = 'ACTIVE',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              EXPIRED = 'EXPIRED',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              UNKNOWN = 'UNKNOWN',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              MISSING = 'MISSING',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Scratch Org status.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              member ACTIVE

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ACTIVE = 'ACTIVE'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • The scratch org is active.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              member EXPIRED

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              EXPIRED = 'EXPIRED'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • The scratch org has expired.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              member MISSING

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              MISSING = 'MISSING'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • The dev hub configuration is reporting an active Scratch org but the AuthInfo cannot be found.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              member UNKNOWN

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              UNKNOWN = 'UNKNOWN'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • The org is a scratch Org but no dev hub is indicated.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              type Options

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              type Options = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              aliasOrUsername?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              connection?: Connection;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              aggregator?: ConfigAggregator;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              isDevHub?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Constructor Options for and Org.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              namespace OrgUsersConfig

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              namespace OrgUsersConfig {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                type Options

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                type Options = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * The org id associated with this user.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                orgId: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                } & ConfigFile.Options;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • The config file options.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                namespace PollingClient

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                namespace PollingClient {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  class DefaultPollingOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  class DefaultPollingOptions implements PollingClient.Options {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Default options set for polling. The default options specify a timeout of 3 minutes and polling frequency of 15 seconds;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  constructor(poll: () => Promise<StatusResult>);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Parameter poll

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The function used for polling status. StatusResult

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  property frequency

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  frequency: Duration;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    property poll

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    poll: () => Promise<StatusResult>;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      property timeout

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      timeout: Duration;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        type Options

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        type Options = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        * Polling function.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        poll: () => Promise<StatusResult>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        * How frequent should the polling function be called.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        frequency: Duration;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        * Hard timeout for polling.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        timeout: Duration;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        * Change the name of the timeout error.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        * ```
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        * if (err.name === 'MyChangedName) ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        * ```
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        timeoutErrorName?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        * Maximum number of retries. Use 'INFINITELY' for unlimited retries until timeout is reached.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        * If not specified, defaults to 'INFINITELY'.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        retryLimit?: number | 'INFINITELY';
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Options for the polling client.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        namespace StreamingClient

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        namespace StreamingClient {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          class DefaultOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          class DefaultOptions implements StreamingClient.Options {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Default Streaming Options. Uses Faye as the cometd impl.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          org: Org,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          channel: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          streamProcessor: StreamProcessor,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          envDep?: Env
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Constructor for DefaultStreamingOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Parameter org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The streaming target org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Parameter channel

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The streaming channel or topic. If the topic is a system topic then api 36.0 is used. System topics are deprecated.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Parameter streamProcessor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The function called that can process streaming messages.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Parameter envDep

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            See Also

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          property apiVersion

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          apiVersion: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property channel

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            channel: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              property DEFAULT_HANDSHAKE_TIMEOUT

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              static readonly DEFAULT_HANDSHAKE_TIMEOUT: Duration;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                property DEFAULT_SUBSCRIBE_TIMEOUT

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                static readonly DEFAULT_SUBSCRIBE_TIMEOUT: Duration;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  property handshakeTimeout

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  handshakeTimeout: Duration;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    property org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    org: Org;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      property SFDX_ENABLE_FAYE_COOKIES_ALLOW_ALL_PATHS

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      static readonly SFDX_ENABLE_FAYE_COOKIES_ALLOW_ALL_PATHS: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        property SFDX_ENABLE_FAYE_REQUEST_RESPONSE_LOGGING

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        static readonly SFDX_ENABLE_FAYE_REQUEST_RESPONSE_LOGGING: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          property streamingImpl

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          streamingImpl: StreamingClientIfc;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property streamProcessor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            streamProcessor: StreamProcessor;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              property subscribeTimeout

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              subscribeTimeout: Duration;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method setHandshakeTimeout

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                setHandshakeTimeout: (newTime: Duration) => void;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method setSubscribeTimeout

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                setSubscribeTimeout: (newTime: Duration) => void;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                enum ConnectionState

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                enum ConnectionState {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                CONNECTED = 0,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                member CONNECTED

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                CONNECTED = 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Used to indicated that the streaming client is connected.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                enum TimeoutErrorType

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                enum TimeoutErrorType {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                HANDSHAKE = 'GenericHandshakeTimeoutError',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                SUBSCRIBE = 'GenericTimeoutError',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Indicators to test error names for StreamingTimeouts

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                member HANDSHAKE

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                HANDSHAKE = 'GenericHandshakeTimeoutError'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • To indicate the error occurred on handshake

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                member SUBSCRIBE

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                SUBSCRIBE = 'GenericTimeoutError'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • To indicate the error occurred on subscribe

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                type Options

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                type Options = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * The org streaming target.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                org: Org;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * The hard timeout that happens with subscribe
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                subscribeTimeout: Duration;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * The hard timeout that happens with a handshake.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                handshakeTimeout: Duration;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * The streaming channel aka topic
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                channel: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * The salesforce api version
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                apiVersion: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * The function for processing streaming messages
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                streamProcessor: StreamProcessor;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * The function for build the inner client impl. Allows for mocking.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                streamingImpl: StreamingClientIfc;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Options for the StreamingClient

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                namespace TTLConfig

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                namespace TTLConfig {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  type Contents

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  type Contents<T extends JsonMap> = Record<string, Entry<T>>;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    type Entry

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    type Entry<T extends JsonMap> = T & {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    timestamp: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    };

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      type Options

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      type Options = ConfigFile.Options & {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ttl: Duration;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      };

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        namespace User

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        namespace User {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type Options

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type Options = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          org: Org;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Used to initialize default values for fields based on a templateUser user. This user will be part of the Standard User profile.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          namespace WebOAuthServer

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          namespace WebOAuthServer {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type Options

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            type Options =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            oauthConfig: JwtOAuth2Config & {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            * OAuth scopes to be requested for the access token.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            * This should be a string with each scope separated by spaces:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            * "refresh_token sfap_api chatbot_api web api"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            * If not specified, all scopes assigned to the connected app are requested.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            scope?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            oauthConfig: JwtOAuth2Config & {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            * OAuth scopes to be requested for the access token.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            * This should be a string with each scope separated by spaces:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            * "refresh_token sfap_api chatbot_api web api"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            * If not specified, all scopes assigned to the connected app are requested.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            scope?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            clientApp: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            username: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            };

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              type Request

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              type Request = http.IncomingMessage & {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              query: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              code: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              state: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              error?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              error_description?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              };

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Package Files (45)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Dependencies (19)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Dev Dependencies (13)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Peer Dependencies (0)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No peer dependencies.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Badge

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@salesforce/core.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Markdown
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@salesforce/core)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • HTML
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <a href="https://www.jsdocs.io/package/@salesforce/core"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>