UNPKG

@telstra/core

Version:
75 lines (74 loc) 2.38 kB
import { IAuthCredentials, IAuthTokenData } from '../../authentication/index.js'; /** * @interface IConfigurationService * @description Configuration service to manage the configuration data * @exports IConfigurationService */ export interface IConfigurationService { /** * @method setAuthCredentials * @param {IAuthCredentials} authCredentials * @returns {Promise<boolean>} * @description Set the authentication credentials * @memberof IConfigurationService * @public * @async * @instance * @throws {InvalidAuthCredentialsError} Invalid authentication credentials */ setAuthCredentials(authCredentials: IAuthCredentials): Promise<boolean>; /** * @method getAuthCredentials * @returns {Promise<IAuthCredentials | null>} * @description Get the authentication credentials * @memberof IConfigurationService * @public * @async * @instance */ getAuthCredentials(): Promise<IAuthCredentials | null>; /** * @method setAuthTokenData * @param {IAuthTokenData} authTokenData * @returns {Promise<boolean>} * @description Set the authentication token data * @memberof IConfigurationService * @public * @async * @instance * @throws {MissingTokenDataError} Invalid authentication token data */ setAuthTokenData(authTokenData: IAuthTokenData | null): Promise<boolean>; /** * @method getAuthTokenData * @returns {Promise<IAuthTokenData | null>} * @description Get the authentication token data * @memberof IConfigurationService * @public * @async * @instance */ getAuthTokenData(): Promise<IAuthTokenData | null>; /** * @method setAuthTokenRetryCount * @param {number} retryCount * @returns {Promise<boolean>} * @description Set the authentication token retry count * @memberof IConfigurationService * @public * @async * @instance * @throws {InvalidTokenRetryCountError} */ setAuthTokenRetryCount(retryCount: number): Promise<boolean>; /** * @method getAuthTokenRetryCount * @returns {Promise<number>} * @description Get the authentication token retry count * @memberof IConfigurationService * @public * @async * @instance */ getAuthTokenRetryCount(): Promise<number>; }