rosettajs_dist_lib_rosetta_user-environment.js

"use strict";
/***************************************************
* Licensed Materials - Property of HCL.
* (c)Copyright HCL America, Inc. 2023-2024
****************************************************/
Object.defineProperty(exports, "__esModule", { value: true });
exports._notes = void 0;
exports.domain = domain;
exports.mailDbName = mailDbName;
exports.name = name;
exports.optimizeMailAddress = optimizeMailAddress;
exports.password = password;
exports.platform = platform;
exports.statusBar = statusBar;
exports.userAccess = userAccess;
exports.userNamesList = userNamesList;
exports.userName = userName;
exports.userNameLanguage = userNameLanguage;
exports.userPrivileges = userPrivileges;
exports.userRoles = userRoles;
exports.version = version;
exports.v3UserName = v3UserName;
exports.v4UserAccess = v4UserAccess;
const tslib_1 = require("tslib");
/**
 * @file User Environment
 * @module user-environment
 * @category User Environment
 */
const notesf = tslib_1.__importStar(require("../notes/user-environment"));
exports._notes = notesf;
//-----------------------------
// Open Formula user-environment
//-----------------------------
// Notes @functions user-environment
/**
 * Returns the name of the current user's Domino® mail domain listed in the current
 * location document of the Personal Address Book.
 * @throws {Error} method not implemented
 * @TODO this needs to be implemented
 */
function domain() {
    return notesf.Domain();
}
/**
 * Returns the name of the Domino® server and the name of the current user's mail
 * database.
 */
function mailDbName() {
    return notesf.MailDbName();
}
/**
 * Allows you to manipulate hierarchical names. You can abbreviate the canonical
 * format of a name, expand an abbreviated name to its canonical format, identify
 * particular components within the name, and reverse the order of the components
 * so that you can categorize a view by hierarchical names.
 *
 * Enables you to convert a name between the Domino® and LDAP formats.
 * @action {string} action to perform on name
 * @name_arg {TextOrTextList} name to convert
 * @returns Promise
 */
function name(action, name_arg) {
    return notesf.Name(action, name_arg);
}
/**
 * Returns a mail address with all unnecessary domains removed.
 */
function optimizeMailAddress() {
    return notesf.OptimizeMailAddress();
}
/**
 * Encodes a string.
 * @throws {Error} method not implemented
 * @TODO this needs to be implemented
 */
function password() {
    return notesf.Password();
}
/**
 * Returns the name of the currently running platform version of Domino.
 * @param [spec] - Value of "SPECIFIC" returns more detailed information; for example,
 * the version number in addition to the name of the platform.
 * @returns {TextOrTextList} Without the parameter, returns the name of the platform.
 * When you use the "SPECIFIC" keyword, platform returns an array.
 * The array contains the following items:
 * - PrimaryOSName - The detailed platform name.
 * - PrimaryOSVersionNumber - The current version number of the primary operating system if avaliable. For the UNIX™ platform, platform("SPECIFIC") returns only the specific platform name, not the version number.
 */
function platform(spec) {
    return notesf.Platform(spec);
}
/**
 * Writes a message or messages to the status bar.
 * @throws {Error} method not implemented
 * @TODO this needs to be implemented
 */
function statusBar() {
    return notesf.StatusBar();
}
/**
 * Given a server and file name, indicates the current user's level of access to
 * the database.
 * @throws {Error} method not implemented
 * @TODO this needs to be implemented
 */
function userAccess() {
    return notesf.UserAccess();
}
/**
 * For a database on a server or a local database with "Enforce a consistent Access
 * Control List across all replicas" in effect, @UserNamesList returns a text
 * list containing the following information for the current user:
 * - Common name
 * - All hierarchical names (fully distinguished) that include the user name; for
 *   example, CN=My Name/OU=My Org Unit/O=My Org, plus  	*/OU=My Org
 *   Unit/O=My Org, */O=My Org, and *
 * - Any roles associated with the user in the ACL
 * - All groups to which the user belongs (only if the database is on a server)
 * @throws {Error} method not implemented
 * @TODO this needs to be implemented
 */
function userNamesList() {
    return notesf.UserNamesList();
}
/**
 * Returns the current user name.
 *
 * If the user name is hierarchical, @UserName returns it in canonical format
 * (including the CN, OU, O, and C identifiers). To return the name in abbreviated
 * format (omitting those identifiers), use @V3UserName.
 * @param {string} [index] Number. Optional. Indicating the index of user names.
 * 0 is for primary name and 1 is for the alternate name. If this parameter is omitted, @UserName returns the primary name.
 * @returns Promise that resolves to the current user name.
 */
function userName(index) {
    return notesf.UserName(index);
}
/**
 * Returns language tags associated with the user ID.
 */
function userNameLanguage() {
    return notesf.UserNameLanguage();
}
/**
 * Returns a text list of the current user's privileges. This function returns only
 * the position of the privilege in the privilege list, not the name of the
 * privilege.
 * @throws {Error} method not implemented
 * @TODO this needs to be implemented
 */
function userPrivileges() {
    return notesf.UserPrivileges();
}
/**
 * For a database on a server or a local replicated database, returns a list of
 * roles that the current user has. Roles are defined in a database's access control
 * list.
 * @throws {Error} method not implemented
 * @TODO this needs to be implemented
 */
function userRoles() {
    return notesf.UserRoles();
}
/**
 * Returns the release number of the Notes/Domino software you're running.
*/
function version() {
    return notesf.Version();
}
/**
 * Returns the current user name or server name. Using @V3UserName on a local
 * database or in a private view in a server-based database returns the user's name.
 *
 * If the user name is hierarchical, @V3UserName returns the name in
 * abbreviated format (omitting the CN, OU, O, and C identifiers). To return the
 * name in canonical format, use @UserName.
 * @returns Promise that resolves to the current user name or server name.
 */
function v3UserName() {
    return notesf.V3UserName();
}
/**
 * Given a server and file name, indicates the current user's level of access to
 * the database.
 */
function v4UserAccess() {
    return notesf.V4UserAccess();
}
//# sourceMappingURL=user-environment.js.map