2021-03-18 16:40:47 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2021-04-22 00:09:37 +00:00
|
|
|
package pb;
|
2021-03-18 16:40:47 +00:00
|
|
|
|
|
|
|
import "waku_message.proto";
|
|
|
|
|
|
|
|
message Index {
|
|
|
|
bytes digest = 1;
|
2022-02-23 15:01:53 +00:00
|
|
|
sint64 receiverTime = 2;
|
|
|
|
sint64 senderTime = 3;
|
2022-03-02 16:02:13 +00:00
|
|
|
string pubsubTopic = 4;
|
2021-03-18 16:40:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message PagingInfo {
|
2021-04-07 21:16:29 +00:00
|
|
|
uint64 pageSize = 1;
|
2021-03-18 16:40:47 +00:00
|
|
|
Index cursor = 2;
|
|
|
|
enum Direction {
|
2021-04-07 21:16:29 +00:00
|
|
|
BACKWARD = 0;
|
|
|
|
FORWARD = 1;
|
2021-03-18 16:40:47 +00:00
|
|
|
}
|
|
|
|
Direction direction = 3;
|
|
|
|
}
|
|
|
|
|
2021-04-20 21:46:35 +00:00
|
|
|
message ContentFilter {
|
|
|
|
string contentTopic = 1;
|
|
|
|
}
|
|
|
|
|
2021-03-18 16:40:47 +00:00
|
|
|
message HistoryQuery {
|
2021-04-28 15:11:32 +00:00
|
|
|
string pubsubTopic = 2;
|
|
|
|
repeated ContentFilter contentFilters = 3;
|
|
|
|
PagingInfo pagingInfo = 4; // used for pagination
|
2022-02-23 15:01:53 +00:00
|
|
|
sint64 startTime = 5;
|
|
|
|
sint64 endTime = 6;
|
2021-03-18 16:40:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message HistoryResponse {
|
2021-07-29 12:43:29 +00:00
|
|
|
// the first field is reserved for future use
|
|
|
|
repeated WakuMessage messages = 2;
|
|
|
|
PagingInfo pagingInfo = 3;
|
|
|
|
enum Error {
|
|
|
|
NONE = 0;
|
|
|
|
INVALID_CURSOR = 1;
|
|
|
|
}
|
|
|
|
Error error = 4;
|
2021-03-18 16:40:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message HistoryRPC {
|
|
|
|
string request_id = 1;
|
|
|
|
HistoryQuery query = 2;
|
|
|
|
HistoryResponse response = 3;
|
2021-04-07 21:16:29 +00:00
|
|
|
}
|