UserAccessService
Source: UserAccessService.ts:3
Service for managing user access relationships.
Constructor
new UserAccessService(): UserAccessServiceInstance Methods
getOwners(): Promise.<Array>
Get all owners that have shared access with the current user.
Returns
Promise.<Array>— List of user access relationships
getChildren(): Promise.<Array>
Get all users that the current user has access to (children).
Returns
Promise.<Array>— List of user access relationships
invite(childEmail: string, role: string): Promise.<Object>
Invite a user by email to share access.
Parameters
childEmail(string) — Email of the user to inviterole(string) — Role (coach/assistant/athlete)
Returns
Promise.<Object>— Created access
update(id: string, data: Object): Promise.<Object>
Update a user access relationship.
Parameters
id(string) — ID of the access to updatedata(Object) — Data to update (role, enabled)
Returns
Promise.<Object>— Updated access
remove(id: string): Promise.<void>
Remove a user access relationship.
Parameters
id(string) — ID of the access to remove
Returns
Promise.<void>— Response
accept(id: string): Promise.<Object>
Accept an access invitation.
Parameters
id(string) — ID of the access to accept
Returns
Promise.<Object>— Updated access
decline(id: string): Promise.<void>
Decline an access invitation.
Parameters
id(string) — ID of the access to decline
Returns
Promise.<void>— Response