Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ All notable changes to this project will be documented in this file.
## [0.4.2] - TBA

### Added
- Support for new version 3.7.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Support for new version 3.7.
- Support for new version v3.7.

Stick to the same naming convention everywhere.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did. To naming convention in changlog visible to customers

- Support for new version 3.6.

- New method `delete_event` in customer-api v3.6.
- New methods in configuration-api v3.6 for greetings: `create_greeting`, `delete_greeting`, `get_greeting`, `update_greeting`, `list_greetings`.
- New methods in agent-api v3.6: `send_thinking_indicator`, `send_message_preview`.

### Changed
- Config now points to v3.6 as stable and 3.7 as dev-preview version.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Config now points to v3.6 as stable and 3.7 as dev-preview version.
- Config now points to v3.6 as stable and v3.7 as dev-preview version.

Stick to the same naming convention everywhere.

- Improved websocket response collection + extended logging in the websocket client.

### Bugfixes
Expand Down
5 changes: 5 additions & 0 deletions docs/agent/rtm/api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ <h2 class="section-title" id="header-submodules">Sub-modules</h2>
<dd>
<div class="desc"><p>Module containing Agent RTM API client implementation for v3.6.</p></div>
</dd>
<dt><code class="name"><a title="livechat.agent.rtm.api.v37" href="v37.html">livechat.agent.rtm.api.v37</a></code></dt>
<dd>
<div class="desc"><p>Module containing Agent RTM API client implementation for v3.7.</p></div>
</dd>
</dl>
</section>
<section>
Expand All @@ -68,6 +72,7 @@ <h1>Index</h1>
<li><code><a title="livechat.agent.rtm.api.v34" href="v34.html">livechat.agent.rtm.api.v34</a></code></li>
<li><code><a title="livechat.agent.rtm.api.v35" href="v35.html">livechat.agent.rtm.api.v35</a></code></li>
<li><code><a title="livechat.agent.rtm.api.v36" href="v36.html">livechat.agent.rtm.api.v36</a></code></li>
<li><code><a title="livechat.agent.rtm.api.v37" href="v37.html">livechat.agent.rtm.api.v37</a></code></li>
</ul>
</li>
</ul>
Expand Down
216 changes: 216 additions & 0 deletions docs/agent/rtm/api/v36.html
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,58 @@ <h1 class="title">Module <code>livechat.agent.rtm.api.v36</code></h1>
&#39;payload&#39;: payload
})

def send_thinking_indicator(self,
chat_id: str = None,
visibility: str = None,
title: str = None,
description: str = None,
custom_id: str = None,
payload: dict = None) -&gt; RtmResponse:
&#39;&#39;&#39; Sends a thinking indicator.

Args:
chat_id (str): ID of the chat you want to send the thinking indicator to.
visibility (str): Possible values: `all`, `agents`.
title (str): Title of the thinking indicator.
description (str): Description of the thinking indicator.
custom_id (str): Custom ID for the thinking indicator.
payload (dict): Custom payload to be used as request&#39;s data.
It overrides all other parameters provided for the method.

Returns:
RtmResponse: RTM response structure (`request_id`, `action`,
`type`, `success` and `payload` properties)
&#39;&#39;&#39;
if payload is None:
payload = prepare_payload(locals())
return self.ws.send({
&#39;action&#39;: &#39;send_thinking_indicator&#39;,
&#39;payload&#39;: payload
})

def send_event_preview(self,
chat_id: str = None,
event: dict = None,
payload: dict = None) -&gt; RtmResponse:
&#39;&#39;&#39; Sends an event preview.

Args:
chat_id (str): ID of the chat to send event preview to.
event (dict): Event object containing the event data.
payload (dict): Custom payload to be used as request&#39;s data.
It overrides all other parameters provided for the method.

Returns:
RtmResponse: RTM response structure (`request_id`, `action`,
`type`, `success` and `payload` properties)
&#39;&#39;&#39;
if payload is None:
payload = prepare_payload(locals())
return self.ws.send({
&#39;action&#39;: &#39;send_event_preview&#39;,
&#39;payload&#39;: payload
})

def multicast(self,
recipients: dict = None,
content: Any = None,
Expand Down Expand Up @@ -1987,6 +2039,58 @@ <h2 class="section-title" id="header-classes">Classes</h2>
&#39;payload&#39;: payload
})

def send_thinking_indicator(self,
chat_id: str = None,
visibility: str = None,
title: str = None,
description: str = None,
custom_id: str = None,
payload: dict = None) -&gt; RtmResponse:
&#39;&#39;&#39; Sends a thinking indicator.

Args:
chat_id (str): ID of the chat you want to send the thinking indicator to.
visibility (str): Possible values: `all`, `agents`.
title (str): Title of the thinking indicator.
description (str): Description of the thinking indicator.
custom_id (str): Custom ID for the thinking indicator.
payload (dict): Custom payload to be used as request&#39;s data.
It overrides all other parameters provided for the method.

Returns:
RtmResponse: RTM response structure (`request_id`, `action`,
`type`, `success` and `payload` properties)
&#39;&#39;&#39;
if payload is None:
payload = prepare_payload(locals())
return self.ws.send({
&#39;action&#39;: &#39;send_thinking_indicator&#39;,
&#39;payload&#39;: payload
})

def send_event_preview(self,
chat_id: str = None,
event: dict = None,
payload: dict = None) -&gt; RtmResponse:
&#39;&#39;&#39; Sends an event preview.

Args:
chat_id (str): ID of the chat to send event preview to.
event (dict): Event object containing the event data.
payload (dict): Custom payload to be used as request&#39;s data.
It overrides all other parameters provided for the method.

Returns:
RtmResponse: RTM response structure (`request_id`, `action`,
`type`, `success` and `payload` properties)
&#39;&#39;&#39;
if payload is None:
payload = prepare_payload(locals())
return self.ws.send({
&#39;action&#39;: &#39;send_event_preview&#39;,
&#39;payload&#39;: payload
})

def multicast(self,
recipients: dict = None,
content: Any = None,
Expand Down Expand Up @@ -3371,6 +3475,55 @@ <h2 id="returns">Returns</h2>
})</code></pre>
</details>
</dd>
<dt id="livechat.agent.rtm.api.v36.AgentRtmV36.send_event_preview"><code class="name flex">
<span>def <span class="ident">send_event_preview</span></span>(<span>self, chat_id: str = None, event: dict = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse</span>
</code></dt>
<dd>
<div class="desc"><p>Sends an event preview.</p>
<h2 id="args">Args</h2>
<dl>
<dt><strong><code>chat_id</code></strong> :&ensp;<code>str</code></dt>
<dd>ID of the chat to send event preview to.</dd>
<dt><strong><code>event</code></strong> :&ensp;<code>dict</code></dt>
<dd>Event object containing the event data.</dd>
<dt><strong><code>payload</code></strong> :&ensp;<code>dict</code></dt>
<dd>Custom payload to be used as request's data.
It overrides all other parameters provided for the method.</dd>
</dl>
<h2 id="returns">Returns</h2>
<dl>
<dt><code>RtmResponse</code></dt>
<dd>RTM response structure (<code>request_id</code>, <code>action</code>,
<code>type</code>, <code>success</code> and <code>payload</code> properties)</dd>
</dl></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def send_event_preview(self,
chat_id: str = None,
event: dict = None,
payload: dict = None) -&gt; RtmResponse:
&#39;&#39;&#39; Sends an event preview.

Args:
chat_id (str): ID of the chat to send event preview to.
event (dict): Event object containing the event data.
payload (dict): Custom payload to be used as request&#39;s data.
It overrides all other parameters provided for the method.

Returns:
RtmResponse: RTM response structure (`request_id`, `action`,
`type`, `success` and `payload` properties)
&#39;&#39;&#39;
if payload is None:
payload = prepare_payload(locals())
return self.ws.send({
&#39;action&#39;: &#39;send_event_preview&#39;,
&#39;payload&#39;: payload
})</code></pre>
</details>
</dd>
<dt id="livechat.agent.rtm.api.v36.AgentRtmV36.send_rich_message_postback"><code class="name flex">
<span>def <span class="ident">send_rich_message_postback</span></span>(<span>self, chat_id: str = None, thread_id: str = None, event_id: str = None, postback: dict = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse</span>
</code></dt>
Expand Down Expand Up @@ -3428,6 +3581,67 @@ <h2 id="returns">Returns</h2>
})</code></pre>
</details>
</dd>
<dt id="livechat.agent.rtm.api.v36.AgentRtmV36.send_thinking_indicator"><code class="name flex">
<span>def <span class="ident">send_thinking_indicator</span></span>(<span>self, chat_id: str = None, visibility: str = None, title: str = None, description: str = None, custom_id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse</span>
</code></dt>
<dd>
<div class="desc"><p>Sends a thinking indicator.</p>
<h2 id="args">Args</h2>
<dl>
<dt><strong><code>chat_id</code></strong> :&ensp;<code>str</code></dt>
<dd>ID of the chat you want to send the thinking indicator to.</dd>
<dt><strong><code>visibility</code></strong> :&ensp;<code>str</code></dt>
<dd>Possible values: <code>all</code>, <code>agents</code>.</dd>
<dt><strong><code>title</code></strong> :&ensp;<code>str</code></dt>
<dd>Title of the thinking indicator.</dd>
<dt><strong><code>description</code></strong> :&ensp;<code>str</code></dt>
<dd>Description of the thinking indicator.</dd>
<dt><strong><code>custom_id</code></strong> :&ensp;<code>str</code></dt>
<dd>Custom ID for the thinking indicator.</dd>
<dt><strong><code>payload</code></strong> :&ensp;<code>dict</code></dt>
<dd>Custom payload to be used as request's data.
It overrides all other parameters provided for the method.</dd>
</dl>
<h2 id="returns">Returns</h2>
<dl>
<dt><code>RtmResponse</code></dt>
<dd>RTM response structure (<code>request_id</code>, <code>action</code>,
<code>type</code>, <code>success</code> and <code>payload</code> properties)</dd>
</dl></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def send_thinking_indicator(self,
chat_id: str = None,
visibility: str = None,
title: str = None,
description: str = None,
custom_id: str = None,
payload: dict = None) -&gt; RtmResponse:
&#39;&#39;&#39; Sends a thinking indicator.

Args:
chat_id (str): ID of the chat you want to send the thinking indicator to.
visibility (str): Possible values: `all`, `agents`.
title (str): Title of the thinking indicator.
description (str): Description of the thinking indicator.
custom_id (str): Custom ID for the thinking indicator.
payload (dict): Custom payload to be used as request&#39;s data.
It overrides all other parameters provided for the method.

Returns:
RtmResponse: RTM response structure (`request_id`, `action`,
`type`, `success` and `payload` properties)
&#39;&#39;&#39;
if payload is None:
payload = prepare_payload(locals())
return self.ws.send({
&#39;action&#39;: &#39;send_thinking_indicator&#39;,
&#39;payload&#39;: payload
})</code></pre>
</details>
</dd>
<dt id="livechat.agent.rtm.api.v36.AgentRtmV36.send_typing_indicator"><code class="name flex">
<span>def <span class="ident">send_typing_indicator</span></span>(<span>self, chat_id: str = None, visibility: str = None, is_typing: bool = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse</span>
</code></dt>
Expand Down Expand Up @@ -4181,7 +4395,9 @@ <h4><code><a title="livechat.agent.rtm.api.v36.AgentRtmV36" href="#livechat.agen
<li><code><a title="livechat.agent.rtm.api.v36.AgentRtmV36.remove_user_from_chat" href="#livechat.agent.rtm.api.v36.AgentRtmV36.remove_user_from_chat">remove_user_from_chat</a></code></li>
<li><code><a title="livechat.agent.rtm.api.v36.AgentRtmV36.resume_chat" href="#livechat.agent.rtm.api.v36.AgentRtmV36.resume_chat">resume_chat</a></code></li>
<li><code><a title="livechat.agent.rtm.api.v36.AgentRtmV36.send_event" href="#livechat.agent.rtm.api.v36.AgentRtmV36.send_event">send_event</a></code></li>
<li><code><a title="livechat.agent.rtm.api.v36.AgentRtmV36.send_event_preview" href="#livechat.agent.rtm.api.v36.AgentRtmV36.send_event_preview">send_event_preview</a></code></li>
<li><code><a title="livechat.agent.rtm.api.v36.AgentRtmV36.send_rich_message_postback" href="#livechat.agent.rtm.api.v36.AgentRtmV36.send_rich_message_postback">send_rich_message_postback</a></code></li>
<li><code><a title="livechat.agent.rtm.api.v36.AgentRtmV36.send_thinking_indicator" href="#livechat.agent.rtm.api.v36.AgentRtmV36.send_thinking_indicator">send_thinking_indicator</a></code></li>
<li><code><a title="livechat.agent.rtm.api.v36.AgentRtmV36.send_typing_indicator" href="#livechat.agent.rtm.api.v36.AgentRtmV36.send_typing_indicator">send_typing_indicator</a></code></li>
<li><code><a title="livechat.agent.rtm.api.v36.AgentRtmV36.set_away_status" href="#livechat.agent.rtm.api.v36.AgentRtmV36.set_away_status">set_away_status</a></code></li>
<li><code><a title="livechat.agent.rtm.api.v36.AgentRtmV36.set_routing_status" href="#livechat.agent.rtm.api.v36.AgentRtmV36.set_routing_status">set_routing_status</a></code></li>
Expand Down
Loading