blob: e942f24e60cd2f610d16226b95890f6b0c2a6226 [file] [log] [blame]
// Copyright 2020 The Feed Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto2";
package feedwire;
option optimize_for=LITE_RUNTIME;
import "src/trellis/proto/token.proto";
message FeedQuery {
enum RequestReason {
// Bucket for any not listed. Should not be used (prefer adding a new
// request reason)
UNKNOWN_REQUEST_REASON = 0;
// App is manually triggering a request, outside of scheduling a request.
// Should be used rarely.
MANUAL_REFRESH = 1;
// Host wants a request to refresh content.
SCHEDULED_REFRESH = 2;
// Host wants a request to load more content.
NEXT_PAGE_SCROLL = 3;
REDACTED_4 = 4;
// Host wants to update content in place.
IN_PLACE_UPDATE = 5;
}
// The reason the query is being initiated.
optional RequestReason reason = 1;
// A collection of Token messages, wrapped in a message so it can be used in a
// oneof.
message Tokens {
repeated Token tokens = 1;
}
oneof token {
// The token for requesting the next page of Feed content, to be used with
// reason = NEXT_PAGE_SCROLL.
Token next_page_token = 3;
// Tokens from InPlaceUpdateHandle for content to update in place, if
// reason = IN_PLACE_UPDATE.
Tokens in_place_update_tokens = 5;
}
reserved 2;
}