1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
|
// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
syntax = "proto3";
option optimize_for = LITE_RUNTIME;
import "components/manta/proto/common.proto";
package manta.proto;
message ScannerInput {
// A user selected region of their device screen as a serialized jpeg.
bytes image = 1;
// The action that the user has selected to be invoked from a previous
// `ScannerOutput` response. This can be unset to request the full set of
// actions that can be performed on the selected region with unpopulated
// details.
ScannerAction selected_action = 2;
// The current timestamp on the user's device.
Timestamp current_timestamp = 3;
}
message ScannerOutput {
// The objects detected within the selected region, as well as actions the
// user may perform on them.
repeated ScannerObject objects = 1;
}
message ScannerObject {
// The actions that can be performed on this object.
//
// If the `ScannerInput` did not contain a `selected_action`, this will
// contain the full set of actions that can be performed on the selected
// region with unpopulated details.
//
// If the `ScannerInput` contained a `selected_action`, this will only
// contain the action that was selected with populated details.
repeated ScannerAction actions = 1;
}
message ScannerAction {
oneof action {
NewEventAction new_event = 1;
NewContactAction new_contact = 2;
NewGoogleDocAction new_google_doc = 3;
NewGoogleSheetAction new_google_sheet = 4;
CopyToClipboardAction copy_to_clipboard = 5;
}
}
// Details on creating a new Google Calendar event.
message NewEventAction {
string title = 1;
string description = 2;
// The start and end dates of the event. The format should be either:-
// 1. "yyyymmdd/yyyymmdd"
// 2. "yyyymmddThhmmss/yyyymmddThhmmss"
string dates = 3;
string location = 4;
}
// Details on creating a new Google contact.
message NewContactAction {
message EmailAddress {
// The email address.
string value = 1;
// The type of email address. The type can be custom or one of these
// predefined values:
// - "home"
// - "work"
// - "other"
string type = 2;
}
message PhoneNumber {
// The phone number.
string value = 1;
// The type of phone number. The type can be custom or one of these
// predefined values:
// - "home"
// - "work"
// - "mobile"
// - "homeFax"
// - "workFax"
// - "otherFax"
// - "pager"
// - "workMobile"
// - "workPager"
// - "main"
// - "googleVoice"
// - "other"
string type = 2;
}
// At least one of the following fields must be specified.
string given_name = 1;
string family_name = 2;
// Deprecated. Use `email_addresses` instead.
// Will only be used if `email_addresses` is empty.
string email = 3 [deprecated = true];
// Deprecated. Use `phone_numbers` instead.
// Will only be used if `phone_numbers` is empty.
string phone = 4 [deprecated = true];
repeated EmailAddress email_addresses = 5;
repeated PhoneNumber phone_numbers = 6;
}
// Details on creating a new Google Doc with some initial rich text content.
message NewGoogleDocAction {
// The title of the Google Doc, i.e. the document's filename.
string title = 1;
// The initial content for the document as a HTML string (rich text). Can
// contain simple text, headings, images, tables, lists, etc.
string html_contents = 2;
}
// Details on creating a new Google Sheet with some initial CSV content.
message NewGoogleSheetAction {
// The title of the Google Sheet, i.e. the sheet's filename.
string title = 1;
// The initial content for the sheet which will form a table. This will be a
// string (probably multiline) with comma-separated values.
string csv_contents = 2;
}
// Content that can be copied to the system clipboard, which allows users to
// paste into any input region.
message CopyToClipboardAction {
// Simple plain text to be copied to the clipboard.
string plain_text = 1;
// A HTML string (rich text) to be copied to the clipboard. Can contain simple
// text, headings, images, tables, lists, etc.
string html_text = 2;
}
|