import { CuneiformCommand } from '../../../base/cuneiform-command.js'; import type { OrgContextResult, UserIdentityResult, PrerequisitesResult, PermissionSetAssignmentResult, ConfigProfileResult, ReadinessResult, ResolutionGuidanceItem, ConfigurationActionResult, ConfigurationResult, LinksResult, UserDetailsResult } from '../../../models/user-details-types.js'; import { type UserInfo, type UserReadiness } from '../../../services/UserReadinessService.js'; import { type OrgIdentity } from '../../../services/OrgInfoService.js'; export type { OrgContextResult, UserIdentityResult, PrerequisitesResult, PermissionSetAssignmentResult, ConfigProfileResult, ReadinessResult, ResolutionGuidanceItem, ConfigurationActionResult, ConfigurationResult, LinksResult, UserDetailsResult, }; /** * Displays authenticated user context and Cuneiform readiness status. * * Use this command to: * - Verify user identity (ID, username, email, profile, role) * - Check required Cuneiform permission set assignments * - Validate Configuration Profile settings for API-only profiling * - Diagnose readiness issues before running other Cuneiform commands * * @example * ```bash * # Display user details and readiness status * sf cuneiform user details --target-org myOrg * * # Output as JSON for programmatic use * sf cuneiform user details --target-org myOrg --json * ``` */ export default class Details extends CuneiformCommand { static readonly summary: string; static readonly description: string; static readonly examples: string[]; static readonly flags: { 'target-org': import("@oclif/core/interfaces").OptionFlag; 'api-version': import("@oclif/core/interfaces").OptionFlag; configure: import("@oclif/core/interfaces").BooleanFlag; unconfigure: import("@oclif/core/interfaces").BooleanFlag; 'dry-run': import("@oclif/core/interfaces").BooleanFlag; }; protected static skipAccessGate: boolean; /** * Builds the command result from service data. */ static buildResult(userInfo: UserInfo, readiness: UserReadiness, orgIdentity: OrgIdentity | undefined, instanceUrl: string): UserDetailsResult; /** * Builds resolution guidance items from readiness state. * Extracted from buildResult to reduce cyclomatic complexity. */ private static buildResolutionGuidance; /** * Maps the service-level UserConfigurationResult to the command-level ConfigurationResult. */ private static mapConfigurationResult; /** * Executes the user details command. * * @returns UserDetailsResult with user identity and readiness status */ run(): Promise; /** * Establishes connection to the Salesforce org and retrieves the current user ID. * Wraps the identity call with a user-friendly error message on failure. */ private connectToOrg; /** * Fetches org identity, user info, and readiness in parallel. * Wraps the API calls with a user-friendly error message on failure. */ private fetchOrgData; /** * Runs the --configure phase: assigns permission sets and enables API-only profiling. * * Threads the outer-fetched `readiness` snapshot into `configure()` so the displayed * readiness block and the configure `previousState` block report the same * `apiOnlyProfilingEnabled` value (CLI-3418). */ private runConfigurePhase; /** * Runs the --unconfigure phase: unassigns permission sets and disables API-only profiling. */ private runUnconfigurePhase; }