import { HTTPError } from 'got'; /** * Parse and handle error returned from EDL endpoint * * @param {HTTPError} error - the HTTP error response returned by the EarthdataLogin endpoint * @param {string} requestType - the type of token request (options: 'retrieve', 'create', 'revoke') * @returns {Error} - EarthdataLogin error */ export declare const parseHttpError: (error: HTTPError, requestType: string) => Error; /** * Retrieve an existing valid token * * @param {string} username - the username of the Earthdata Login user * @param {string} password - the password of the Earthdata Login user * @param {string} edlEnv - the environment of the Earthdata Login (ex. 'SIT') * @returns {Promise } - the token or undefined if there */ export declare const retrieveEDLToken: (username: string, password: string, edlEnv: string) => Promise; /** * Create a token. * * @param {string} username - the username of the Earthdata Login user * @param {string} password - the password of the Earthdata Login user * @param {string} edlEnv - the environment of the Earthdata Login (ex. 'SIT') * @returns {Promise } - the token or undefined */ export declare const createEDLToken: (username: string, password: string, edlEnv: string) => Promise; /** * Revoke a token * * @param {string} username - the username of the Earthdata Login user * @param {string} password - the password of the Earthdata Login user * @param {string} edlEnv - the environment of the Earthdata Login user (ex. 'SIT') * @param {string} token - the token to revoke * @returns {void} */ export declare const revokeEDLToken: (username: string, password: string, edlEnv: string, token: string) => Promise; /** * Get a token by retrieving an existing token or creating a new one * * @param {string} username - the username of the Earthdata Login user * @param {string} password - the password of the Earthdata Login user * @param {string} edlEnv - the environment of the Earthdata Login (ex. 'SIT') * @returns {Promise } - the JSON Web Token string or undefined */ export declare const getEDLToken: (username: string, password: string, edlEnv: string) => Promise; //# sourceMappingURL=EarthdataLogin.d.ts.map