Admin API / Types

DirectConversation

Object

A one-to-one conversation between the caller and another user. Visible when the caller is a participant, the other participant has a membership row in this store that is not BANNED and has no shadow ban, the caller does not block them, and the conversation has a message that is not deleted. A conversation that the caller hid stays hidden until a new message comes. Only the caller's own conversations: store staff do not see the inbox of the store owner.

Requires a client key with one of these scopes: admin:chat:read

The requirement applies to every field of DirectConversation unless that field declares its own scopes.

type DirectConversation implements Node

Fields

FieldTypeDescription
awaitingReplyBoolean!
True when the other participant wrote the newest message that the caller sees. A read in a District app does not change it. An answer from the caller sets it to false.
createdAtDateTime!
When the conversation started.
hasUnreadMessagesBoolean!
True when another user posted a message after the caller's last read.
idID!
A globally unique ID. Treat this value as an opaque string.
inboxDirectConversationInbox!
The inbox of the conversation for the caller.
lastMessageAtDateTime!
When the newest message was posted.
latestMessageChatMessage
The newest message that is not deleted and is after the caller's hide point. Null when no such message exists.
messagesDirectConversationMessageConnection!
The messages after the caller's hide point and within retention, newest first. A deleted message reads as a tombstone: text null. first outside 1 to 100 (10,000 for Soho) or an after that this connection did not issue gives a thrown VALIDATION_ERROR. Keyset cursors; no row ceiling. Reading the messages does not mark them read.Arguments:
after: String — Return messages after this cursor. Omit for the first page.
first: Int — Maximum number of messages to return. Defaults to 20, capped at 100 (10,000 for Soho).
participantUser!
The other participant.

Returned by