ovok_sdk.resources.chat
The `ovok.chat` namespace: chat between patients and their care team.
- Stable unknown
- Release candidate not available
- Development since 0.2.0-dev.34+53a6a64
The ovok.chat namespace: chat between patients and their care team.
ChatThreadsResource
ChatThreadsResource(chat: HttpClient)Threads the signed-in person takes part in; access it as ovok.chat.threads.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
chat | HttpClient | The HTTP client scoped to the chat routes. |
open()
open(body: JsonObject, *, options: RequestOptions | None = None) -> AnyOpen a thread about a patient, or return the open one with the same people.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
body | JsonObject | patient and participants as references, and an optional title. | |
options | RequestOptions | None | None | Per-request options; timeout overrides the client's. |
Returns
Any: The thread.
list()
list(
params: JsonObject | None = None,
*,
options: RequestOptions | None = None,
) -> Page[Any]List threads, most recently active first.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
params | JsonObject | None | None | Optional patient reference, updatedSince (ISO time) and limit. |
options | RequestOptions | None | None | Per-request options; timeout overrides the client's. |
Returns
Page[Any]: A page of threads that loads later pages on demand.
retrieve()
retrieve(thread_id: str, *, options: RequestOptions | None = None) -> AnyRead one thread.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
thread_id | str | The thread ID. | |
options | RequestOptions | None | None | Per-request options; timeout overrides the client's. |
Returns
Any: The thread, with its last message and unread count.
ChatThreadMessagesResource
ChatThreadMessagesResource(chat: HttpClient)Messages in a thread; access it as ovok.chat.messages.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
chat | HttpClient | The HTTP client scoped to the chat routes. |
list()
list(
thread_id: str,
params: JsonObject | None = None,
*,
options: RequestOptions | None = None,
) -> Page[Any]List a thread's messages, newest first.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
thread_id | str | The thread ID. | |
params | JsonObject | None | None | Optional since (ISO time) and limit. |
options | RequestOptions | None | None | Per-request options; timeout overrides the client's. |
Returns
Page[Any]: A page of messages that loads older pages on demand.
send()
send(thread_id: str, body: JsonObject, *, options: RequestOptions | None = None) -> AnySend a message; a retry with the same clientId answers the message already sent.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
thread_id | str | The thread ID. | |
body | JsonObject | text, optional attachments (IDs from ovok.chat.attachments.upload), replyTo and clientId; a random clientId is added when there is none. | |
options | RequestOptions | None | None | Per-request options; timeout overrides the client's. |
Returns
Any: The message.
attachment_link()
attachment_link(
thread_id: str,
message_id: str,
attachment_id: str,
*,
options: RequestOptions | None = None,
) -> AnyGet a link that downloads a message's attachment.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
thread_id | str | The thread ID. | |
message_id | str | The message ID. | |
attachment_id | str | The attachment ID. | |
options | RequestOptions | None | None | Per-request options; timeout overrides the client's. |
Returns
Any:url, usable without a bearer, andexpiresAt.
ChatAttachmentsResource
ChatAttachmentsResource(chat: HttpClient, settings: OvokSettings)Files to send in chat messages; access it as ovok.chat.attachments.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
chat | HttpClient | The HTTP client scoped to the chat routes. | |
settings | OvokSettings | The client's settings; the file goes to the store through its transport. |
upload()
upload(
*,
file: bytes,
file_name: str,
content_type: str,
options: RequestOptions | None = None,
) -> AnyUpload a file to send with a message.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
file | bytes | The file's content. | |
file_name | str | The file's name. | |
content_type | str | application/pdf, image/png, image/jpeg or image/webp. | |
options | RequestOptions | None | None | Per-request options; timeout overrides the client's. |
Returns
Any: The attachment:id,titleandcontentType. Send itsidin a message'sattachments.
Raises
OvokConnectionError: The file store could not be reached.OvokServiceError: The file store refused the file.
link()
link(attachment_id: str, *, options: RequestOptions | None = None) -> AnyGet a link that downloads an attachment you uploaded.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
attachment_id | str | The attachment ID. | |
options | RequestOptions | None | None | Per-request options; timeout overrides the client's. |
Returns
Any:url, usable without a bearer, andexpiresAt.
ChatResource
ChatResource(http: HttpClient, settings: OvokSettings)Chat between patients and their care team.
Created by Ovok; access it as ovok.chat.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
http | HttpClient | The client's HTTP client. | |
settings | OvokSettings | The client's settings. |
read()
read(
thread_id: str,
body: JsonObject | None = None,
*,
options: RequestOptions | None = None,
) -> NoneMark a thread read for the signed-in person.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
thread_id | str | The thread ID. | |
body | JsonObject | None | None | Optional readAt (ISO time); defaults to now. |
options | RequestOptions | None | None | Per-request options; timeout overrides the client's. |
Last updated on