Timeline API
The call that reads back the events of one conversation, and the messages only that call uses.
This page is made from the API contract, contract/schema/namjai/v1/timeline.proto, so it always says what the server really accepts. How to reach the server and what a failure looks like are on Server API.
TimelineService
TimelineService reads back what landed. Version 1 serves the end-to-end test with the demo sender: it lists the events of one conversation.
Full name: namjai.v1.TimelineService.
ListConversationEvents
Path: POST /namjai.v1.TimelineService/ListConversationEvents
Request: ListConversationEventsRequest. Response: ListConversationEventsResponse.
ListConversationEvents returns the events of one conversation in the order they happened: by occurred_at_unix_ms, then source_sequence, then event_id, so the order is the same on every call (ING-8). It reads only.
Messages
Each message is a JSON object, or protobuf. A field's JSON name is the name to use in JSON; the server also accepts the field name. A field left out reads as empty, zero or false.
ListConversationEventsRequest
ListConversationEventsRequest names one conversation and a page of it.
| Number | Field | JSON name | Type | Kind | What it is |
|---|---|---|---|---|---|
| 1 | channel | channel | Channel | single | The conversation's channel. |
| 2 | account | account | string | single | The agent's own handle, as in Event.account. |
| 3 | conversation_id | conversationId | string | single | The source's ID for the conversation, as in Event.conversation_id. |
| 4 | page_size | pageSize | int32 | single | The most events to return. 0 means the server's default of 100; the server caps it at 1,000. |
| 5 | page_token | pageToken | string | single | Empty for the first page; otherwise next_page_token from the previous response, unchanged. |
ListConversationEventsResponse
ListConversationEventsResponse is one page of a conversation.
| Number | Field | JSON name | Type | Kind | What it is |
|---|---|---|---|---|---|
| 1 | events | events | StoredEvent | repeated | The events on this page, in the order they happened. |
| 2 | next_page_token | nextPageToken | string | single | The token for the next page, or empty when this is the last page. |
StoredEvent
StoredEvent is an event as the server holds it.
| Number | Field | JSON name | Type | Kind | What it is |
|---|---|---|---|---|---|
| 1 | event | event | Event | single | The event as it was sent. |
| 2 | received_at_unix_ms | receivedAtUnixMs | int64 | single | When the server first stored it, in UTC milliseconds. |
| 3 | media_sha256 | mediaSha256 | string | repeated | The SHA-256 of every media file attached to it, in the order they were registered. |