| // 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/feature.proto"; |
| import "src/trellis/proto/in_place_update_handle.proto"; |
| import "src/trellis/proto/payload_metadata.proto"; |
| import "src/trellis/proto/render_data.proto"; |
| import "src/trellis/proto/templates.proto"; |
| import "src/trellis/proto/token.proto"; |
| |
| // An extensible operation to change the state of data on the client. |
| message DataOperation { |
| // Next tag: 8 |
| |
| enum Operation { |
| UNKNOWN_OPERATION = 0; |
| // Remove all stored content of all types |
| CLEAR_ALL = 1; |
| // Update content if it exists, else append to the bottom of the feed |
| UPDATE_OR_APPEND = 2; |
| // Remove the item from the stream |
| REMOVE = 3; |
| } |
| |
| // The operation to perform on the data. |
| optional Operation operation = 1; |
| |
| // Data common to all payload types. |
| optional PayloadMetadata metadata = 2; |
| |
| // The actual data being supplied. |
| oneof payload { |
| // A stream UI level feature such as a cluster or card. |
| Feature feature = 3; |
| |
| // A token, capable of making a next page request. |
| Token next_page_token = 5; |
| |
| // Information to help render the content in the response. |
| RenderData render_data = 6; |
| |
| // A handle for updating one or more pieces of content in place. |
| InPlaceUpdateHandle in_place_update_handle = 8; |
| |
| // A collection of templates. |
| Templates templates = 4 [deprecated = true]; |
| } |
| } |