Namespace: Manage

Appearition.User.Manage

Use the functions under this module to manage users on the Appearition platform.

Methods

Appearition.User.Manage.AddPersonaToUser (personaName, username, requestOptions) static

Adds the given persona to an existing user

Name Type Description
personaName string

the name of the persona

username string

the user to add to the persona to

requestOptions any

configure callbacks

Appearition.User.Manage.Create (request, requestOptions) static

Creates a new user in the system

Name Type Description
request Appearition.User.Manage.NewUserViewModel

the details of the user to create

requestOptions any

configure callbacks

Appearition.User.Manage.GetPersonaForUser (username, requestOptions)Array.<Appearition.User.PersonaViewModel> static

Retrieves the persona of the given user

Name Type Description
username string

Identifies the user

requestOptions any

configure callbacks

Returns:
Type Description
Array.<Appearition.User.PersonaViewModel> This is returned as part of the success callback function in the requestOptions param

Appearition.User.Manage.IsNewUserEntryValid (request, requestOptions) static

Check if the username is valid

Name Type Description
request Appearition.User.Manage.NewUserViewModel

the details of the user to create

requestOptions any

configure callbacks

Appearition.User.Manage.IsUsernameAvailable (username, requestOptions) static

Check if the username is valid

Name Type Description
username string

the username to check

requestOptions any

configure callbacks

Appearition.User.Manage.List (request, requestOptions)Appearition.User.Manage.ListResponseViewModel static

Retrieves the persona of the given user

Name Type Description
request Appearition.User.Manage.ListRequestViewModel

Contains the various search filters for the method

requestOptions any

configure callbacks

Returns:
Type Description
Appearition.User.Manage.ListResponseViewModel This is returned as part of the success callback function in the requestOptions param

Appearition.User.Manage.ListAvailableRoles (requestOptions) static

Retrieves a list of roles that can be assigned to a persona

Name Type Description
requestOptions any

configure callbacks

Appearition.User.Manage.RemovePersonaFromUser (personaName, username, requestOptions) static

Removes the given persona from the given user

Name Type Description
personaName string

the name of the persona

username string

the user to remove the persona from

requestOptions any

configure callbacks

Appearition.User.Manage.SendAccountInvitation (username, requestOptions) static

Check if the username is valid

Name Type Description
username string

identifies the user to send the invitation to

requestOptions any

configure callbacks

Type Definitions

Appearition.User.Manage.ListRequestViewModel

This is the data structure used to search users via the List method

Properties:
Name Type Description
ChannelId number

Unique identifier to a channel to search in. Leave null for all

ChannelName string

The name of a channel to search in

Username string

Unique identifier for the user

EmailAddress string

Contact email address

FirstName string

First name

LastName string

Last name

SearchText string

Will search across all of the user profile details

Role string

The role to search by

PersonaName string

The name of the persona to filter by

IsVerified boolean

Filter any users by their account verification status. Leave null for all

IsLocked boolean

Filter any users by their account locked status. Leave null for all

IsForbiddenAccess boolean

Filter any users by their account blocked status. Leave null for all

Page number

Which page of the results to return

RecordsPerPage number

How many records to return (max is 50)

Appearition.User.Manage.ListResponseViewModel

This is the data structure returned by the List method

Properties:
Name Type Description
TotalRecords number

The total number of search results found

RecordsPerPage number

The adjusted number of records per page (if an attempt greater than the max allowed was made)

Users Array.<Appearition.User.Manage.UserSummaryViewModel>

The list of users found by the search

Appearition.User.Manage.NewUserViewModel

This is the data structure that represents a new user in the platform

Properties:
Name Type Description
Username string

Unique identifier for the user

EmailAddress string

Contact email address

FirstName string

First name

LastName string

Last name

Mobile string

Contact phone number

BusinessAddress string

Physical street address

BusinessName string

Name of the organisation that the user represents

OtherAttributes Array.<Appearition.User.Manage.UserAttributeViewModel>

A collection of key value pairs

IsAccountVerified boolean

Flags the system to accept this new users account as verified

SendAccountVerification boolean

Indicates if the system should send a verification link to the contact email address so that the new user can click and activate their account

SendAccountInvitation boolean

Indicates if the system should send an invitation to the contact email address so that the new user can set their own password on first login

SetPassword boolean

Indicates that the password is being manually set

Password string

Password

ConfirmPassword string

Repeats the password as confirmation it was entered correctly

PersonaId string

Identifies the persona that is being assigned to the new user

PersonaName string

The name of the persona that is being assigned to the new user

Roles Array.<string>

A list of roles to allocate to the new user

Channels Array.<Appearition.User.ChannelViewModel>

A list of channels to allocate to the new user

AcceptedConsent: boolean

Indicates that the creator or the new user has accepted consent from the new user that it is ok to give them access to the platform

Appearition.User.Manage.UserAttributeViewModel

This is the data structure that represents an attribute of a user

Properties:
Name Type Description
AttributeName string

The name of the attribute (e.g. Gender, Date of Birth)

AttributeValue string

The value associated with the attribute (e.g. M, 1/1/2000)

Appearition.User.Manage.UserSummaryViewModel

This is the data structure that hold summary information about each user

Properties:
Name Type Description
Username string

Unique identifier for the user

EmailAddress string

Contact email address

FirstName string

First name

LastName string

Last name

Mobile string

Mobile phone number

BusinessAddress string

Business postal address

IsVerified boolean

Has the account been verified

IsLocked boolean

Is the account locked

IsForbiddenAccess boolean

is the account blocked from access

PersonaId number

Identifies the Persona allocated to the user

PersonaName string

The name of the Persona allocated to the user

Channels string

A CSV list of channels allocated to the user

Roles string

A CSV list of roles allocated to the user