Collaborator
This class defines a Collaborator of a [[Book]].
A Collaborator represents a user that has been granted access to a Book with specific permissions.
Extends
Resource<bkper.Collaborator>
Constructors
Constructor
new Collaborator(book, payload?): Collaborator;Parameters
| Parameter | Type |
|---|---|
book | Book |
payload? | Collaborator |
Returns
Collaborator
Overrides
Resource<bkper.Collaborator>.constructorProperties
payload
payload: Collaborator;The underlying payload data for this resource
Inherited from
Resource.payloadMethods
create()
create(message?): Promise<Collaborator>;Performs create new Collaborator.
Parameters
| Parameter | Type |
|---|---|
message? | string |
Returns
Promise<Collaborator>
Promise with the created Collaborator
getEmail()
getEmail(): string | undefined;Gets the Collaborator email address.
Returns
string | undefined
The Collaborator email address
getId()
getId(): string | undefined;Gets the Collaborator internal id.
Returns
string | undefined
The Collaborator internal id
getPermission()
getPermission(): Permission | undefined;Gets the permission level of the Collaborator.
Returns
Permission | undefined
The permission level
json()
json(): Collaborator;Gets an immutable copy of the JSON payload for this resource.
Returns
Collaborator
An immutable copy of the json payload
Inherited from
Resource.jsonremove()
remove(): Promise<Collaborator>;Performs remove Collaborator.
Returns
Promise<Collaborator>
Promise with the removed Collaborator
setEmail()
setEmail(email): Collaborator;Sets the email address of the Collaborator.
Parameters
| Parameter | Type | Description |
|---|---|---|
email | string | The email address to set |
Returns
Collaborator
This Collaborator, for chaining
setPermission()
setPermission(permission): Collaborator;Sets the permission level of the Collaborator.
Parameters
| Parameter | Type | Description |
|---|---|---|
permission | Permission | The permission level to set |
Returns
Collaborator
This Collaborator, for chaining
update()
update(): Promise<Collaborator>;Performs update Collaborator.
Returns
Promise<Collaborator>
Promise with the updated Collaborator