export type DevhubAuthStrategy = 'AUTO' | 'JWT' | 'AUTH_URL' | 'REUSE' | 'NONE'; export declare const prepareForJwt: (homeDir: string) => string; export declare const prepareForAuthUrl: (homeDir: string) => string; /** * Inspects the environment (via AuthStrategy) and authenticates to a devhub via JWT or AuthUrl * Sets the hub as default for use in tests * * @param homeDir the testSession directory where credential files will be written * @param authStrategy the authorization method to use * * reads environment variables that are set by the user OR via transferExistingAuthToEnv * for jwt: TESTKIT_HUB_USERNAME, TESTKIT_JWT_CLIENT_ID, TESTKIT_JWT_KEY * optional but recommended: TESTKIT_HUB_INSTANCE * required for AuthUrl: TESTKIT_AUTH_URL */ export declare const testkitHubAuth: (homeDir: string, authStrategy?: DevhubAuthStrategy) => void; export declare const getAuthStrategy: () => DevhubAuthStrategy; /** * For scenarios where a hub has already been authenticated in the environment and the username is provided, * set the environment variables from the existing hub's information. * * reads environment variables * TESTKIT_HUB_USERNAME : the username (not alias) of a devHub * * write environment variables * TESTKIT_AUTH_URL (if using refreshToken) * TESTKIT_JWT_KEY,TESTKIT_JWT_CLIENT_ID,TESTKIT_HUB_INSTANCE (if using jwt) * */ export declare const transferExistingAuthToEnv: (authStrategy: DevhubAuthStrategy) => void;