OrganizationApi

circle-info

This class implements BaseApi.

circle-exclamation
circle-info

This is a JavaScript implementation of the Organization API.

circle-check

Interfaces

RoleReference

interface RoleReference {
    name: string,
    id: string
}

MembershipInfo

interface MembershipInfo {
    roles: RoleReference[],
    firstName: string,
    lastName: string,
    email: string,
    organizationId: number,
    membershipId: string,
    userId: string
}

OrganizationCreateDetails

OrganizationUpdateDetails

OrganizationInfo

OrganizationMembershipReference

Methods

constructor(user, endpoint)

Create an Organization API object.

  • user should be an instance of the User object.

  • endpoint should be the Vulos Identity endpoint.

async organizationList()

Get a list of all the organizations that the user is in.

The result is an array of objects that implement the OrganizationMembershipReference.

circle-info

This method's response has the organization:list cache prefix.

async organizationInfo(id)

Get information of an organization by the organization's ID.

The result implements the OrganizationInfo interface.

circle-info

This method's response has the organization:info cache prefix.

async organizationUpdate(id, details)

Update an organization's details.

The details object implements the OrganizationUpdateDetails interface.

The result implements the SuccessResponse interface.

circle-info

This method's response has the organization:update cache prefix.

async organizationDelete(id)

Delete an organization.

The result implements the SuccessResponse interface.

circle-info

This method's response has the organization:delete cache prefix.

async organizationCreate(details)

Create a new organization.

The details object implements the OrganizationCreateDetails interface.

The result implements the OrganizationMembershipReference interface.

circle-info

This method's response has the organization:create cache prefix.

async memberInfo(id, member)

Get information about a specific member.

  • id is the organization id;

  • member is the membership id;

The result implements the MembershipInfo interface.

circle-info

This method's response has the organization:member:info cache prefix.

async memberDelete(id, member)

Remove a member from an organization.

The result implements the SuccessResponse interface.

circle-info

This method's response has the organization:member:delete cache prefix.

async memberInvite(id, email)

Invite a user to an organization by email.

The result implements the SuccessResponse interface.

circle-info

This method's response has the organization:member:invite cache prefix.

async roleList(id, member)

Get all the roles for a member.

The result is an array of objects that implement the RoleReference interface.

circle-info

This method's response has the organization:role:list cache prefix.

async roleCreate(id, member, name)

Add a new role to a user.

The result implements the RoleReference interface.

circle-info

This method's response has the organization:role:create cache prefix.

async roleDelete(id, member, role)

Remove a role from a member.

  • role is the role id;

The result implements the SuccessResponse interface.

circle-info

This method's response has the organization:role:delete cache prefix.

Last updated