UNPKG

@sap_oss/wdio-qmate-service

Version:

[![REUSE status](https://api.reuse.software/badge/github.com/SAP/wdio-qmate-service)](https://api.reuse.software/info/github.com/SAP/wdio-qmate-service)[![Node.js CI](https://github.com/SAP/wdio-qmate-service/actions/workflows/node.js.yml/badge.svg)](http

187 lines (186 loc) 9.43 kB
/** * @class userSettings * @memberof flp */ export declare class UserSettings { private vlf; private _srvInstance; /** * @private * @function _initS4UserSettingService * @memberOf flp.userSettings * @description Initializes the S4 User Setting Service. * @param {String} user - The username for authentication. * @param {String} password - The password for authentication. * @example await flp.userSettings._initS4UserSettingService("user", "password"); * @returns {Promise<void>} A promise that resolves when the service has been initialized. */ private _initS4UserSettingService; /** * @function setLanguageFromUserSettings * @memberOf flp.userSettings * @description Sets the environment variable 'USER_SETTINGS_LANG_KEY' language from user settings. * @param {String} user - The username for authentication. * @param {String} password - The password for authentication. * @example await flp.userSettings.setLanguageFromUserSettings("user", "password"); * @returns {Promise<void>} A promise that resolves when the language has been set. */ setLanguageFromUserSettings(user: string, password: string): Promise<void>; /** * @function setDateFormatFromUserSettings * @memberOf flp.userSettings * @description Sets the environment variable 'USER_SETTINGS_DATE_FORMAT' date format from user settings. * @param {String} user - The username for authentication. * @param {String} password - The password for authentication. * @example await flp.userSettings.setDateFormatFromUserSettings("user", "password"); * @returns {Promise<void>} A promise that resolves when the date format has been set. */ setDateFormatFromUserSettings(user: string, password: string): Promise<void>; /** * @function setTimeFormatFromUserSettings * @memberOf flp.userSettings * @description Sets the environment variable 'USER_SETTINGS_DATE_FORMAT' time format from user settings. * @param {String} user - The username for authentication. * @param {String} password - The password for authentication. * @example await flp.userSettings.setTimeFormatFromUserSettings("user", "password"); * @returns {Promise<void>} A promise that resolves when the time format has been set. */ setTimeFormatFromUserSettings(user: string, password: string): Promise<void>; /** * @function setTimeZoneFromUserSettings * @memberOf flp.userSettings * @description Sets the environment variable 'USER_SETTINGS_TIME_ZONE' time zone from user settings. * @param {String} user - The username for authentication. * @param {String} password - The password for authentication. * @example await flp.userSettings.setTimeZoneFromUserSettings("user", "password"); * @returns {Promise<void>} A promise that resolves when the time zone has been set. */ setTimeZoneFromUserSettings(user: string, password: string): Promise<void>; /** * @function setNumberFormatFromUserSettings * @memberOf flp.userSettings * @description Sets the environment variable 'USER_SETTINGS_NUMBER_FORMAT' number format from user settings. * @param {String} user - The username for authentication. * @param {String} password - The password for authentication. * @example await flp.userSettings.setNumberFormatFromUserSettings("user", "password"); * @returns {Promise<void>} A promise that resolves when the number format has been set. */ setNumberFormatFromUserSettings(user: string, password: string): Promise<void>; /** * @function setS4UserSettings * @memberOf flp.userSettings * @description Sets the user settings for S4. * @param {String} user - The username for authentication. * @param {String} password - The password for authentication. * @example await flp.userSettings.setS4UserSettings("user", "password"); * @returns {Promise<void>} A promise that resolves when the user settings have been set. */ setS4UserSettings(user: string, password: string): Promise<void>; /** * @function getLanguageFromUserSettings * @memberOf flp.userSettings * @description Gets the language from user settings. * @param {String} user - The username for authentication. * @param {String} password - The password for authentication. * @example const language = await flp.userSettings.getLanguageFromUserSettings("user", "password"); * @returns {Promise<String>} The language from user settings. */ getLanguageFromUserSettings(user: string, password: string): Promise<string>; /** * @function getDateFormatFromUserSettings * @memberOf flp.userSettings * @description Gets the date format from user settings. * @param {String} user - The username for authentication. * @param {String} password - The password for authentication. * @example const dateFormat = await flp.userSettings.getDateFormatFromUserSettings("user", "password"); * @returns {Promise<String>} The date format from user settings. */ getDateFormatFromUserSettings(user: string, password: string): Promise<string>; /** * @function getTimeFormatFromUserSettings * @memberOf flp.userSettings * @description Gets the time format from user settings. * @param {String} user - The username for authentication. * @param {String} password - The password for authentication. * @example const timeFormat = await flp.userSettings.getTimeFormatFromUserSettings("user", "password"); * @returns {Promise<String>} The time format from user settings. */ getTimeFormatFromUserSettings(user: string, password: string): Promise<string>; /** * @function getTimeZoneFromUserSettings * @memberOf flp.userSettings * @description Gets the time zone from user settings. * @param {String} user - The username for authentication. * @param {String} password - The password for authentication. * @example const timeZone = await flp.userSettings.getTimeZoneFromUserSettings("user", "password"); * @returns {Promise<String>} The time zone from user settings. */ getTimeZoneFromUserSettings(user: string, password: string): Promise<string>; /** * @function getNumberFormatFromUserSettings * @memberOf flp.userSettings * @description Gets the number format from user settings. * @param {String} user - The username for authentication. * @param {String} password - The password for authentication. * @example const numberFormat = await flp.userSettings.getNumberFormatFromUserSettings("user", "password"); * @returns {Promise<String>} The number format from user settings. */ getNumberFormatFromUserSettings(user: string, password: string): Promise<string>; /** * @private * @function _getTimeZoneResponse * @memberOf flp.userSettings * @description Gets the time zone from user settings. * @param {Object} srvInstance - The service instance. * @example const timeZone = await flp.userSettings._getTimeZoneResponse(srvInstance); * @returns {Promise<String>} The time zone from user settings. * @throws {Error} Thrown if the time zone could not be retrieved. */ private _getTimeZoneResponse; /** * @private * @function _getTimeFormatResponse * @memberOf flp.userSettings * @description Gets the time format from user settings. * @param {Object} srvInstance - The service instance. * @example const timeFormat = await flp.userSettings._getTimeFormatResponse(srvInstance); * @returns {Promise<String>} The time format from user settings. * @throws {Error} Thrown if the time format could not be retrieved. */ private _getTimeFormatResponse; /** * @private * @function _getDateFormatsResponse * @memberOf flp.userSettings * @description Gets the date format from user settings. * @param {Object} srvInstance - The service instance. * @example const dateFormat = await flp.userSettings._getDateFormatsResponse(srvInstance); * @returns {Promise<String>} The date format from user settings. * @throws {Error} Thrown if the date format could not be retrieved. */ private _getDateFormatsResponse; /** * @private * @function _getLanguageResponse * @memberOf flp.userSettings * @description Gets the language from user settings. * @param {Object} srvInstance - The service instance. * @example const language = await flp.userSettings._getLanguageResponse(srvInstance); * @returns {Promise<String>} The language from user settings. * @throws {Error} Thrown if the language could not be retrieved. */ private _getLanguageResponse; /** * @private * @function _getNumberFormatResponse * @memberOf flp.userSettings * @description Gets the number format from user settings. * @param {Object} srvInstance - The service instance. * @example const numberFormat = await flp.userSettings._getNumberFormatResponse(srvInstance); * @returns {Promise<String>} The number format from user settings. * @throws {Error} Thrown if the number format could not be retrieved. */ private _getNumberFormatResponse; } declare const _default: UserSettings; export default _default;