docusign-rooms
Version:
DocuSign Node.js API client.
216 lines (189 loc) • 8.86 kB
JavaScript
/*
* DocuSign Rooms API - v2
* An API for an integrator to access the features of DocuSign Rooms
*
* OpenAPI spec version: v2
* Contact: devcenter@docusign.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
*
* Swagger Codegen version: 2.4.13-SNAPSHOT
*
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['ApiClient', 'model/ClassicManagerPermissions'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./ClassicManagerPermissions'));
} else {
// Browser globals (root is window)
if (!root.Docusign) {
root.Docusign = {};
}
root.Docusign.Users = factory(root.Docusign.ApiClient, root.Docusign.ClassicManagerPermissions);
}
}(this, function(ApiClient, ClassicManagerPermissions) {
'use strict';
/**
* The Users model module.
* @module model/Users
* @version 3.0.0
*/
/**
* Constructs a new <code>Users</code>.
* The Users resource provides methods that enable you to add, update, delete, and manage users. A user is a person who is either added to a room (as a participant), or who is a member of a company.
* @alias module:model/Users
* @class
*/
var exports = function() {
};
/**
* Constructs a <code>Users</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/Users} obj Optional instance to populate.
* @return {module:model/Users} The populated <code>Users</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('userId'))
obj.userId = ApiClient.convertToType(data['userId'], 'Number');
if (data.hasOwnProperty('email'))
obj.email = ApiClient.convertToType(data['email'], 'String');
if (data.hasOwnProperty('firstName'))
obj.firstName = ApiClient.convertToType(data['firstName'], 'String');
if (data.hasOwnProperty('lastName'))
obj.lastName = ApiClient.convertToType(data['lastName'], 'String');
if (data.hasOwnProperty('isLockedOut'))
obj.isLockedOut = ApiClient.convertToType(data['isLockedOut'], 'Boolean');
if (data.hasOwnProperty('status'))
obj.status = ApiClient.convertToType(data['status'], 'String');
if (data.hasOwnProperty('accessLevel'))
obj.accessLevel = ApiClient.convertToType(data['accessLevel'], 'String');
if (data.hasOwnProperty('defaultOfficeId'))
obj.defaultOfficeId = ApiClient.convertToType(data['defaultOfficeId'], 'Number');
if (data.hasOwnProperty('titleId'))
obj.titleId = ApiClient.convertToType(data['titleId'], 'Number');
if (data.hasOwnProperty('roleId'))
obj.roleId = ApiClient.convertToType(data['roleId'], 'Number');
if (data.hasOwnProperty('profileImageUrl'))
obj.profileImageUrl = ApiClient.convertToType(data['profileImageUrl'], 'String');
if (data.hasOwnProperty('offices'))
obj.offices = ApiClient.convertToType(data['offices'], ['Number']);
if (data.hasOwnProperty('regions'))
obj.regions = ApiClient.convertToType(data['regions'], ['Number']);
if (data.hasOwnProperty('permissions'))
obj.permissions = ClassicManagerPermissions.constructFromObject(data['permissions']);
}
return obj;
}
/**
* The id of the user.
* @member {Number} userId
*/
exports.prototype.userId = undefined;
/**
* The user's email address.
* @member {String} email
*/
exports.prototype.email = undefined;
/**
* The user's first name.
* @member {String} firstName
*/
exports.prototype.firstName = undefined;
/**
* The user's last name.
* @member {String} lastName
*/
exports.prototype.lastName = undefined;
/**
* When set to **true**, an administrator has locked the user's account. For example, an administrator might want to lock an agent's account after they leave the brokerage until they determine how to transfer the agent's rooms and data to another active user.
* @member {Boolean} isLockedOut
*/
exports.prototype.isLockedOut = undefined;
/**
*
* @member {String} status
*/
exports.prototype.status = undefined;
/**
* The user's level of access to the account. This property determines what the user can see in the system. In contrast, a user's permissions determine the actions that they can take in a room. For example, a user who has `accessLevel` set to `Company` can see all of the rooms associated with their company. However, if they do not have a role for which the **Add documents to room** permission is set to **true**, they can't add documents to those rooms. Valid values are: - `Company`: The user has access to rooms, and if they have permission to manage users, they have access to users across the entire company. What they can do in the rooms and with users is controlled by their permissions. This is the default for the Users::InviteClassicAdmin method. - `Region`: The user has access to rooms and, if they have permission to manage users, they have access to users across their regions. - `Office`: The user has access to rooms and, if they have permission to manage users, they have access to users across their offices. - `Contributor`: The user has access only to their own rooms and those to which they are invited. They cannot perform any user management actions because they do not oversee other users. For example, agents typically have the `Contributor` access level. **Note**: In requests, the values that you may use for this property depend on your permissions and whether you can add users at your access level or lower.
* @member {module:model/Users.AccessLevelEnum} accessLevel
*/
exports.prototype.accessLevel = undefined;
/**
* The id of the user's default office.
* @member {Number} defaultOfficeId
*/
exports.prototype.defaultOfficeId = undefined;
/**
* In Rooms Version 5, this is the id of the custom job title for a Manager role within your company. For example, your company might have the custom job titles \"Transaction Coordinator\" and \"Office Manager\". **Note**: If you are using Rooms Version 5, you must enter a `titleId` when using the Users::InviteClassicManager method. (The `titleId` property is empty for Agent users on Rooms Version 5.) If you are using Rooms Version 6, use the Users::InviteUser method with the `roleId` property instead.
* @member {Number} titleId
*/
exports.prototype.titleId = undefined;
/**
* In Rooms v6, this is the id of the company role assigned to the user. You can assign external roles to users who aren't a part of your organization. **Note**: If you are using Rooms v6, you must enter a `roleId` in requests. If you are using Rooms v5, you must enter a value for the `titleId` property instead.
* @member {Number} roleId
*/
exports.prototype.roleId = undefined;
/**
* The URL for the user's profile image.
* @member {String} profileImageUrl
*/
exports.prototype.profileImageUrl = undefined;
/**
* An array of office ids for the offices in which a user with an `Office` or `Contributor` `accessLevel` has been granted the ability to participate.
* @member {Array.<Number>} offices
*/
exports.prototype.offices = undefined;
/**
* An array of region ids for the regions in which a user with the `Region accessLevel` has been granted the ability to participate.
* @member {Array.<Number>} regions
*/
exports.prototype.regions = undefined;
/**
* An object that contains details about a manager user's permissions. **Note**: These permissions only apply to Rooms v5.
* @member {module:model/ClassicManagerPermissions} permissions
*/
exports.prototype.permissions = undefined;
/**
* Allowed values for the <code>accessLevel</code> property.
* @enum {String}
* @readonly
*/
exports.AccessLevelEnum = {
/**
* value: "Contributor"
* @const
*/
contributor: "Contributor",
/**
* value: "Office"
* @const
*/
office: "Office",
/**
* value: "Region"
* @const
*/
region: "Region",
/**
* value: "Company"
* @const
*/
company: "Company",
/**
* value: "Admin"
* @const
*/
admin: "Admin"
};
return exports;
}));