import OreIdContext from '../../core/IOreidContext'; import { AuthProvider } from '../../models'; import { ApiResultWithErrorCode } from '../models'; export declare type ApiNewUserWithTokenParams = { accessToken?: string; /** whether we should skip creation of blockchain accounts for a new user */ delayWalletSetup?: boolean; isTestUser?: boolean; idToken?: string; provider?: AuthProvider; }; export declare type ApiNewUserWithTokenBodyParams = { access_token?: string; /** whether we should skip creation of blockchain accounts for a new user */ delay_wallet_setup?: boolean; is_test_user?: boolean; id_token?: string; provider?: string; }; /** Call api account/new-user-with-token * Converts OAuth accesstoken or idToken from some 3rd-party source to OREID Oauth accessTokens * The third-party (e.g. Auth0 or Google) must be registered in the AppRegistration.oauthSettings * If a user does not curently exist that matches the info in the incoming idToken, a new OreID user and account is created * Requires ether: * 1) a valid idToken (needs no accessToken or apiKey in header) * 2) a 3rd-party accessToken (usually not a JWT) and provider param (e.g. 'google') - Requires api-key in header * Set isTestUser to true to create a test user - a test user can be deleted using user.deleteTestUser() - this is helpful for testing * Returns: OreId issued accessToken and user's account name (if new account created, this is a new account name) * */ export declare function callApiNewUserWithToken(oreIdContext: OreIdContext, params: ApiNewUserWithTokenParams): Promise<{ accessToken: string; } & ApiResultWithErrorCode>;