Constructor
# new ConversationResource(client) → {ConversationResource}
Creates a new instance of the ConversationResource class.
Parameters:
Name | Type | Description |
---|---|---|
client |
ConnectClient | An instance of the ConnectClient class. |
An instance of the ConversationResource class.
Extends
Members
Methods
# async create(obj) → {object}
Create a new resource.
Parameters:
Name | Type | Description |
---|---|---|
obj |
object | The resource to create. |
- Overrides:
The created resource.
# async createMessage(id, msg) → {object}
Add a message to a Conversation object.
Parameters:
Name | Type | Description |
---|---|---|
id |
string | The unique identifier of the Conversation object. |
msg |
string | The text of the message to post. |
The newly created Message object.
# async delete(id)
Delete a resource.
Parameters:
Name | Type | Description |
---|---|---|
id |
string | The unique identifier of the resource to delete. |
- Overrides:
# async fetch(url, options)
Fetch the URL and returns a response.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | the URL to fetch. |
options |
object | the request options. |
- Overrides:
# async get(id) → {object}
Retrieve a resource by its unique identifier.
Parameters:
Name | Type | Description |
---|---|---|
id |
string | The unique identifier of the resource to retrieve. |
- Overrides:
The resource.
# async getConversationsByObjectId(id) → {Array}
Returns a list of conversations attached to the business object specified by its id.
Parameters:
Name | Type | Description |
---|---|---|
id |
string | The unique id of the business object attached to a conversation. |
A list of conversations attached to a business object.
# messages(id) → {CaseCommentsResource}
Returns an instance of the ConversationMessageResource for a Conversation.
Parameters:
Name | Type | Description |
---|---|---|
id |
string | The unique identifier of the Conversation. |
An instance of the ConversationMessageResource for the case.
# async search(filters) → {Array}
Search for a resource.
Parameters:
Name | Type | Description |
---|---|---|
filters |
object | The query to send to the server as a RQL object. |
- Overrides:
An array of resources that match the provided filters.
# async update(id, obj) → {object}
Update a resource.
Parameters:
Name | Type | Description |
---|---|---|
id |
string | The unique identifier of the resource to update. |
obj |
object | The eventually partial resource to update. |
- Overrides:
The updated resource.