Constructor
new CaasUserManagementClient(serveraddress)
Creates a CaaS User Management Object
Parameters:
Name | Type | Description |
---|---|---|
serveraddress |
string | Address of CaaS User Management Server |
Classes
Methods
(async) acceptHub(hubid, email)
Accept a Hub invitation
Parameters:
Name | Type | Description |
---|---|---|
hubid |
string | Id of Hub |
email |
string | User email |
(async) addHubUser(hubid, email, role)
Add a user to a Hub
Parameters:
Name | Type | Description |
---|---|---|
hubid |
string | Id of Hub |
email |
string | User email |
role |
string | User Role ("User" "Admin", "Owner") |
(async) addProjectUser(projectid, email, role)
Add a user to a Project
Parameters:
Name | Type | Description |
---|---|---|
projectid |
string | Id of Project |
email |
string | User email |
role |
string | User Role ("User" "Admin", "Owner") |
(async) checkLogin() → {bool}
Validates cookie based login state
Returns:
true if logged in
- Type
- bool
(async) createHub(name) → {Object}
Create a new Hub associated with the current user
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Name of new Hub |
Returns:
Data about new Hub
- Type
- Object
(async) createProject(name) → {Object}
Create a new Project associated to a hub
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Name of new Project |
Returns:
Data about new Project
- Type
- Object
(async) deleteHub(hubid)
Delete a Hub
Parameters:
Name | Type | Description |
---|---|---|
hubid |
string | Id of Hub |
(async) deleteHubUser(hubid, email)
Delete a user from a Hub
Parameters:
Name | Type | Description |
---|---|---|
hubid |
string | Id of Hub |
email |
string | User email |
(async) deleteModel(itemid)
Deletes a model
Parameters:
Name | Type | Description |
---|---|---|
itemid |
string | File Id |
(async) deleteProject(projectid)
Delete a user from a project
Parameters:
Name | Type | Description |
---|---|---|
projectid |
string | Id of Project |
(async) deleteProjectUser(projectid, email)
Delete a user from a Project
Parameters:
Name | Type | Description |
---|---|---|
projectid |
string | Id of Project |
email |
string | User email |
(async) enableStreamAccess(itemid)
Enables Stream Access for a model
Parameters:
Name | Type | Description |
---|---|---|
itemid |
string | File Id |
(async) getConfiguration() → {object}
Retrieves the CaaS User Management Server configuration
Returns:
Server Configuration
- Type
- object
getCurrentHub() → {Object}
Retrieves the currently active hub
Returns:
Current Hub Object
- Type
- Object
getCurrentProject() → {Object}
Retrieves the currently active project
Returns:
Current Project Object
- Type
- Object
getCurrentUser() → {Object}
Retrieves the currently active (logged in) user
Returns:
Current User Object
- Type
- Object
getDemoMode() → {bool}
Retrieves if the CaaS User Management Server is in demo mode
Returns:
true if streaming is configured
- Type
- bool
(async) getDownloadToken(itemid, file) → {Object}
Retrieve a download token for a file
Parameters:
Name | Type | Description |
---|---|---|
itemid |
string | File Id |
file |
string | type |
Returns:
Download Token
- Type
- Object
(async) getHubs() → {Object}
Retrieves all hubs associated with the current user
Returns:
List of hubs
- Type
- Object
(async) getHubUsers(hubid) → {Object}
Retrieve all users associated with a Hub
Parameters:
Name | Type | Description |
---|---|---|
hubid |
string | Id of Hub |
Returns:
Users associated with Hub
- Type
- Object
(async) getModels() → {Object}
Retrieve all models associated to currently active project
Returns:
List of models
- Type
- Object
(async) getPNG(itemid) → {Object}
Retrieves the png for a model
Parameters:
Name | Type | Description |
---|---|---|
itemid |
string | File Id |
Returns:
Image
- Type
- Object
(async) getProjects(hubid) → {Object}
Retrieves all projects associated with a hub
Parameters:
Name | Type | Description |
---|---|---|
hubid |
string | Id of Hub |
Returns:
List of projects
- Type
- Object
(async) getProjectUsers(projectid) → {Object}
Retrieve all users associated with a project
Parameters:
Name | Type | Description |
---|---|---|
projectid |
string | Id of Project |
Returns:
Users associated with Hub
- Type
- Object
(async) getSCS(itemid) → {Object}
Retrieves the scs data for a model
Parameters:
Name | Type | Description |
---|---|---|
itemid |
string | File Id |
Returns:
Scs data
- Type
- Object
getUploadArrayURL() → {string}
Retrieves the URL for uploading multiple models (assembly upload) to the CaaS User Management Server
Returns:
URL to upload models to
- Type
- string
(async) getUploadToken(name, size) → {Object}
Retrieve an upload token for a file
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Name of file |
size |
integer | of file |
Returns:
Upload Token
- Type
- Object
getUploadURL() → {string}
Retrieves the URL for uploading models to the CaaS User Management Server
Returns:
URL to upload models to
- Type
- string
getUseDirectFetch() → {bool}
Retrieves if the CaaS User Management Server is configured for direct fetch
Returns:
true if direct fetch is configured
- Type
- bool
getUseStreaming() → {bool}
Retrieves if the CaaS User Management Server is configured for streaming
Returns:
true if streaming is configured
- Type
- bool
(async) initializeWebviewer(container)
Initializes Webviewer
Parameters:
Name | Type | Description |
---|---|---|
container |
string | Div of Webviewer Container |
(async) leaveHub()
Leave currently active Hub
(async) leaveProject()
Leave currently active Project
(async) loadHub(hubid)
Load a Hub
Parameters:
Name | Type | Description |
---|---|---|
hubid |
string | Id of Hub |
(async) loadProject(hubid, projectid)
Load a Project
Parameters:
Name | Type | Description |
---|---|---|
hubid |
string | Id of Hub* |
projectid |
string | Id of Project |
(async) login(email, password)
Login an existing user
Parameters:
Name | Type | Description |
---|---|---|
email |
string | User Email |
password |
string | User Password |
(async) logout()
Logout currently active user
processUploadFromToken(itemid, startpath)
Process a file after upload is complete
Parameters:
Name | Type | Description |
---|---|---|
itemid |
string | File Id |
startpath |
string | (if zipped assembly) |
register(info)
Register a new user
Parameters:
Name | Type | Description |
---|---|---|
info |
object | User Information |
(async) renameHub(hubid, name)
Rename a hub
Parameters:
Name | Type | Description |
---|---|---|
hubid |
string | Id of Hub |
name |
string | New Hub Name |
(async) renameProject(hubid, projectid, name)
Rename a Project
Parameters:
Name | Type | Description |
---|---|---|
hubid |
string | Id of Hub |
projectid |
string | Id of Project |
name |
string | New Hub Project |
(async) updateHubUser(hubid, email, role)
Modify a user's role in a Hub
Parameters:
Name | Type | Description |
---|---|---|
hubid |
string | Id of Hub |
email |
string | User email |
role |
string | User Role ("User" "Admin", "Owner") |
(async) updateProjectUser(hubid, email, role)
Modify a user's role in a Project
Parameters:
Name | Type | Description |
---|---|---|
hubid |
string | Id of Project |
email |
string | User email |
role |
string | User Role ("User" "Admin", "Owner") |