conversations
Conversations between a signed-in person and youSleep's staff.
A person writes about a topic and the staff answer in the same thread, which belongs to the person's account. Staff appear as youSleep, never by name. Someone without an account emails contact@yousleep.ai instead.
ConversationCreate
pydantic-model
¶
Bases: BaseModel
The first message of a conversation, and what it is about.
Fields:
-
topic(ConversationTopic) -
body(MessageBody)
ConversationOut
pydantic-model
¶
Bases: BaseModel
A conversation, as the person who started it sees it.
Fields:
-
id(UUID) -
topic(ConversationTopic) -
created_at(datetime) -
closed_at(datetime | None) -
last_message_at(datetime) -
waiting_on(ConversationWaitingOn) -
unread(bool) -
preview(str) -
messages(list[MessageOut] | None)
ConversationPage
pydantic-model
¶
Bases: PaginatedResponse
A page of the caller's conversations, the latest first.
Asked for with limit=0, it carries the totals and no conversations:
what an unread badge needs.
Fields:
-
total(NonNegativeInt) -
offset(NonNegativeInt) -
limit(NonNegativeInt) -
conversations(list[ConversationOut]) -
unread_total(NonNegativeInt)
MessageCreate
pydantic-model
¶
Bases: BaseModel
A message added to a conversation.
Fields:
-
body(MessageBody)
MessageOut
pydantic-model
¶
Bases: BaseModel
One message in a conversation.
Fields:
-
id(UUID) -
from_staff(bool) -
body(str) -
created_at(datetime)
from_staff
pydantic-field
¶
Written by youSleep's staff.