// Copyright 2019 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. syntax = "proto2"; option optimize_for = LITE_RUNTIME; option java_package = "org.chromium.chrome.browser.autofill_assistant.proto"; option java_multiple_files = true; package autofill_assistant; message ModelProto { message ModelValue { optional string identifier = 1; optional ValueProto value = 2; } // Maps model identifiers to their values. repeated ModelValue values = 1; } // Remember to update the comparison operator in |user_model.cc| when adding new // fields. message ValueProto { oneof kind { StringList strings = 1; BooleanList booleans = 2; IntList ints = 3; UserActionList user_actions = 4; DateList dates = 5; CreditCardList credit_cards = 7; ProfileList profiles = 8; LoginOptionList login_options = 9; CreditCardResponseProto credit_card_response = 10; bytes server_payload = 12; } // If set to true, this value will not be sent to the backend. This flag is // mostly used internally, to prevent certain values from leaving the device. // Note that values derived from client_side_only values will inherit this // property. optional bool is_client_side_only = 6; reserved 11; } message ValueReferenceProto { oneof kind { ValueProto value = 1; string model_identifier = 2; } } message StringList { repeated string values = 1; } message BooleanList { repeated bool values = 1; } message IntList { repeated int32 values = 1; } message UserActionList { repeated UserActionProto values = 1; } message DateList { repeated DateProto values = 1; } message CreditCardList { repeated AutofillCreditCardProto values = 1; } message ProfileList { repeated AutofillProfileProto values = 1; } message LoginOptionList { repeated LoginOptionProto values = 1; } // Can be used to indicate the presence of a field, without the ambiguity that // a boolean field would have. message Empty {} // Next Id: 45 enum ProcessedActionStatusProto { UNKNOWN_ACTION_STATUS = 0; // Element could not be found. ELEMENT_RESOLUTION_FAILED = 1; // The action was applied successfully. ACTION_APPLIED = 2; // The action failed (generic error). // // This usually means that the client needs to be fixed: either the error // should be assigned a more specific error code, or a bug in the client code // needs to be fixed. // // ProcessedActionProto.UnexpectedErrorInfoProto contains more details. OTHER_ACTION_STATUS = 3; // The action failed to collect the requested user data. COLLECT_USER_DATA_ERROR = 4; // Server asked the client to execute an unknown or unsupported action. UNSUPPORTED_ACTION = 5; // The action decided to fallback to manual mode, stopping the script. // // This can happen: // - if an autofill action or an update details action cancels the script, // possibly, not necessarily, as a result of a user action. // - if an interrupt explicitly stops the main script, for wait for dom MANUAL_FALLBACK = 6; // The WaitForDom action failed because an interrupt that ran during // that action failed. INTERRUPT_FAILED = 7; // The script was canceled by the user, while it was running. // // This only report such events that happen while a script is running. It can // affect any action. It is a signal that the action or script ran in an // abnormal situation and its outcome cannot be trusted. USER_ABORTED_ACTION = 8; // The Autofill Action failed to get the full card information. // // Possible causes: // - the user filled in the wrong CVC number. // - the card has expired GET_FULL_CARD_FAILED = 9; // The action did not have what it needs. This is generally a bug in the // script. // // This is currently returned by the autofill action, when it could not find // the credit card or the address it needs in the client memory. This is // usually the sign that the CollectUserDataAction was not run or failed. PRECONDITION_FAILED = 10; // The action definition returned by the server was rejected. INVALID_ACTION = 11; // Executing the action as defined is unsupported. UNSUPPORTED = 12; // Timed out waiting for the document to load. TIMED_OUT = 13; // Failed to get a stable position for the element, usually to click on it. ELEMENT_UNSTABLE = 14; // The value passed to the select option action does not exist in the element. // This is usually a scripting error. OPTION_VALUE_NOT_FOUND = 16; // The client got an unexpected error from a JavaScript snippet executed // through devtools. This means that there's a bug in the client code. // // ProcessedActionProto.UnexpectedErrorInfoProto contains more details. UNEXPECTED_JS_ERROR = 17; // There were more than one matching element in the DOM in a context where // only one is supported. This is generally a scripting error: the selector is // not specific enough. TOO_MANY_ELEMENTS = 18; // The browser failed to navigate to a new document for its main frame. Note // that this doesn't include page load errors, which are reported as // TIMED_OUT. NAVIGATION_ERROR = 19; // A selector included into the current action is invalid. INVALID_SELECTOR = 20; // The requested autofill info (e.g., Chrome password manager login) was not // available. It might have been recently deleted. AUTOFILL_INFO_NOT_AVAILABLE = 21; // An unexpected error occurred during element resolution. FRAME_HOST_NOT_FOUND = 22; // Autofill could not fully fill the form as expected. // // Possible causes: // - The fallback data was not available. // - A field defined as required was empty after the action completed. // - Filling a field resulted in error, e.g. the field was not found. // // ProcessedActionStatusProto.AutofillErrorInfoProto contains more details. AUTOFILL_INCOMPLETE = 24; // Evaluating the element did report an unexpected mismatch in either value // or text. ELEMENT_MISMATCH = 26; // Another element covered the targeted element, when trying to click. ELEMENT_NOT_ON_TOP = 27; // The client_id could not be found in the client's ElementStore. This means // the element was either not successfully found or a wrong client_id was // used. CLIENT_ID_RESOLUTION_FAILED = 28; // The target element's frame was not in the same domain or subdomain as the // password's origin. PASSWORD_ORIGIN_MISMATCH = 29; // Selecting an option failed because more than one option matched. TOO_MANY_OPTION_VALUES_FOUND = 30; // The action's target did not fit the action. E.g. a |SelectOption| being // called on any element other than