Relationships
@smokeballdev/smokeball-client-sdk
Interface: Api
Entry point for relationships to Smokeball.
Methods
add()
add(
request
):Promise
<Relationship
>
Adds a new relationship to a role with the specified contact id to the current context and returns the relationship.
Parameters
request
the add relationship request.
Returns
Promise
<Relationship
>
Example
get()
get(
roleId
):Promise
<Relationships
>
Gets the relationships of a role for the current context.
Parameters
roleId
string
the role id to get relationships from.
Returns
Promise
<Relationships
>
the relationships of a role for the current context.
Example
remove()
remove(
roleId
,id
):Promise
<Relationships
>
Removes the specified relationship from a role for the current context. Returns the remaining relationships for that role.
Parameters
roleId
string
the role id to remove from.
id
string
the relationship id to remove.
Returns
Promise
<Relationships
>
Example
update()
update(
request
):Promise
<Relationship
>
Updates the relationship associated to the specified role id and returns the relationship.
Parameters
request
the update request.
Returns
Promise
<Relationship
>