# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# Adding a new metric? We have docs for that!
# https://firefox-source-docs.mozilla.org/toolkit/components/glean/user/new_definitions_file.html

---
$schema: moz://mozilla.org/schemas/glean/metrics/2-0-0
$tags:
  - 'Toolkit :: Password Manager'

pwmgr:
  form_autofill_result:
    type: labeled_counter
    description:
      The result of auto-filling a login form.
    labels:
      - filled
      - no_password_field
      - password_disabled_readonly
      - no_logins_fit
      - no_saved_logins
      - existing_password
      - existing_username
      - multiple_logins
      - no_autofill_forms
      - autocomplete_off
      - insecure
      - password_autocomplete_new_password
      - type_no_longer_password
      - form_in_crossorigin_subframe
      - filled_username_only_form
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1340021
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1833398
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1833398#c3
    notification_emails:
      - passwords-dev@mozilla.org
    expires: never

  autocomplete_field_generatedpassword:
    type: event
    description: >
      "autocomplete_field": The first time each unique generated password
      is used to fill a login field - i.e. the user selects it from from
      the autocomplete dropdown on a password input "autocomplete_shown":
      The first time the password generation option is shown in the
      autocomplete dropdown on a password input for a site per session
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.autocomplete_field#generatedpassword.
    bugs: &pwmgr_autocomplete_field_bugs
      - https://bugzil.la/1548878
      - https://bugzil.la/1616356
    data_reviews: &pwmgr_autocomplete_field_data_reviews
      - https://bugzil.la/1548878
      - https://bugzil.la/1616356
    notification_emails: &pwmgr_autocomplete_field_emails
      - loines@mozilla.com
      - passwords-dev@mozilla.org
      - sfoster@mozilla.com
    expires: never
    telemetry_mirror: Pwmgr_AutocompleteField_Generatedpassword

  autocomplete_shown_generatedpassword:
    type: event
    description: >
      "autocomplete_field": The first time each unique generated password
      is used to fill a login field - i.e. the user selects it from from
      the autocomplete dropdown on a password input "autocomplete_shown":
      The first time the password generation option is shown in the
      autocomplete dropdown on a password input for a site per session
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.autocomplete_shown#generatedpassword.
    bugs: *pwmgr_autocomplete_field_bugs
    data_reviews: *pwmgr_autocomplete_field_data_reviews
    notification_emails: *pwmgr_autocomplete_field_emails
    expires: never
    telemetry_mirror: Pwmgr_AutocompleteShown_Generatedpassword

  filled_field_edited_generatedpassword:
    type: event
    description: >
      The first time each generated password filled in a website form
      field is edited by the user in a field it was filled in
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.filled_field_edited#generatedpassword.
    bugs:
      - https://bugzil.la/1548880
    data_reviews:
      - https://bugzil.la/1548880
    notification_emails:
      - loines@mozilla.com
      - passwords-dev@mozilla.org
    expires: never
    telemetry_mirror: Pwmgr_FilledFieldEdited_Generatedpassword

  doorhanger_submitted_save:
    type: event
    description: >
      A login is saved or updated via the capture doorhanger. Carries
      information about whether the username and password _that were
      saved/updated by the user_ were modified in the doorhanger, selected
      from the suggestion autocomplete, or neither. `did_edit_X` and
      `did_select_X` will never both be true in the same event. The
      `object` describes the type of doorhanger when it was originally
      created. Note that user updates to the doorhanger may change whether
      a login is actually saved or updated, but will not impact the sent
      object.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.doorhanger_submitted#save.
    bugs: &pwmgr_doorhanger_submitted_bugs
      - https://bugzil.la/1650929
      - https://bugzil.la/1650941
      - https://bugzil.la/1678200
      - https://bugzil.la/1714252
      - https://bugzil.la/1754637
      - https://bugzil.la/1850872
    data_reviews: &pwmgr_doorhanger_submitted_data_reviews
      - https://bugzil.la/1650929
      - https://bugzil.la/1650941
      - https://bugzil.la/1678200
      - https://bugzil.la/1714252
      - https://bugzil.la/1754637
      - https://bugzil.la/1850872
    notification_emails: &pwmgr_doorhanger_submitted_emails
      - passwords-dev@mozilla.org
    expires: 142
    extra_keys: &pwmgr_doorhanger_submitted_extra
      did_edit_un:
        description: >
          Whether or not the saved/updated username was modified by the user typing into the username field.

        type: boolean
      did_select_un:
        description: >
          Whether or not the saved/updated username was selected by the user choosing a suggested value from the autocomplete popup.

        type: boolean
      did_edit_pw:
        description: >
          Whether or not the saved/updated password was modified by the user typing into the password field.

        type: boolean
      did_select_pw:
        description: >
          Whether or not the saved/updated password was selected by the user choosing a suggested value from the autocomplete popup.

        type: boolean
    telemetry_mirror: Pwmgr_DoorhangerSubmitted_Save

  doorhanger_submitted_update:
    type: event
    description: >
      A login is saved or updated via the capture doorhanger. Carries
      information about whether the username and password _that were
      saved/updated by the user_ were modified in the doorhanger, selected
      from the suggestion autocomplete, or neither. `did_edit_X` and
      `did_select_X` will never both be true in the same event. The
      `object` describes the type of doorhanger when it was originally
      created. Note that user updates to the doorhanger may change whether
      a login is actually saved or updated, but will not impact the sent
      object.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.doorhanger_submitted#update.
    bugs: *pwmgr_doorhanger_submitted_bugs
    data_reviews: *pwmgr_doorhanger_submitted_data_reviews
    notification_emails: *pwmgr_doorhanger_submitted_emails
    expires: 142
    extra_keys: *pwmgr_doorhanger_submitted_extra
    telemetry_mirror: Pwmgr_DoorhangerSubmitted_Update

  saved_login_used_form_login:
    type: event
    description: >
      Each time a saved login is used in a form or authentication dialog.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.saved_login_used#form_login.
    bugs: &pwmgr_saved_login_used_bugs
      - https://bugzil.la/1631130
    data_reviews: &pwmgr_saved_login_used_data_reviews
      - https://bugzil.la/1631130
    notification_emails: &pwmgr_saved_login_used_emails
      - loines@mozilla.com
      - passwords-dev@mozilla.org
    expires: never
    extra_keys: &pwmgr_saved_login_used_extra
      filled:
        description: >
          Whether the browser filled the login details for the user vs. typing saved values.
        type: boolean
    telemetry_mirror: Pwmgr_SavedLoginUsed_FormLogin

  saved_login_used_form_password:
    type: event
    description: >
      Each time a saved login is used in a form or authentication dialog.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.saved_login_used#form_password.
    bugs: *pwmgr_saved_login_used_bugs
    data_reviews: *pwmgr_saved_login_used_data_reviews
    notification_emails: *pwmgr_saved_login_used_emails
    expires: never
    extra_keys: *pwmgr_saved_login_used_extra
    telemetry_mirror: Pwmgr_SavedLoginUsed_FormPassword

  saved_login_used_auth_login:
    type: event
    description: >
      Each time a saved login is used in a form or authentication dialog.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.saved_login_used#auth_login.
    bugs: *pwmgr_saved_login_used_bugs
    data_reviews: *pwmgr_saved_login_used_data_reviews
    notification_emails: *pwmgr_saved_login_used_emails
    expires: never
    extra_keys: *pwmgr_saved_login_used_extra
    telemetry_mirror: Pwmgr_SavedLoginUsed_AuthLogin

  saved_login_used_prompt_login:
    type: event
    description: >
      Each time a saved login is used in a form or authentication dialog.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.saved_login_used#prompt_login.
    bugs: *pwmgr_saved_login_used_bugs
    data_reviews: *pwmgr_saved_login_used_data_reviews
    notification_emails: *pwmgr_saved_login_used_emails
    expires: never
    extra_keys: *pwmgr_saved_login_used_extra
    telemetry_mirror: Pwmgr_SavedLoginUsed_PromptLogin

  mgmt_menu_item_used_import_from_browser:
    type: event
    description: >
      Record interactions with the about:logins menu.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.mgmt_menu_item_used#import_from_browser.
    bugs: &pwmgr_mgmt_menu_item_used_bugs
      - https://bugzil.la/1641396
      - https://bugzil.la/1641777
      - https://bugzil.la/1641393
    data_reviews: &pwmgr_mgmt_menu_item_used_data_reviews
      - https://bugzil.la/1641396
      - https://bugzil.la/1641777
      - https://bugzil.la/1641393
    notification_emails: &pwmgr_mgmt_menu_item_used_emails
      - loines@mozilla.com
      - passwords-dev@mozilla.org
    expires: never
    telemetry_mirror: Pwmgr_MgmtMenuItemUsed_ImportFromBrowser

  mgmt_menu_item_used_import_from_csv:
    type: event
    description: >
      Record interactions with the about:logins menu.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.mgmt_menu_item_used#import_from_csv.
    bugs: *pwmgr_mgmt_menu_item_used_bugs
    data_reviews: *pwmgr_mgmt_menu_item_used_data_reviews
    notification_emails: *pwmgr_mgmt_menu_item_used_emails
    expires: never
    telemetry_mirror: Pwmgr_MgmtMenuItemUsed_ImportFromCsv

  mgmt_menu_item_used_import_csv_complete:
    type: event
    description: >
      Record interactions with the about:logins menu.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.mgmt_menu_item_used#import_csv_complete.
    bugs: *pwmgr_mgmt_menu_item_used_bugs
    data_reviews: *pwmgr_mgmt_menu_item_used_data_reviews
    notification_emails: *pwmgr_mgmt_menu_item_used_emails
    expires: never
    telemetry_mirror: Pwmgr_MgmtMenuItemUsed_ImportCsvComplete

  mgmt_menu_item_used_export:
    type: event
    description: >
      Record interactions with the about:logins menu.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.mgmt_menu_item_used#export.
    bugs: *pwmgr_mgmt_menu_item_used_bugs
    data_reviews: *pwmgr_mgmt_menu_item_used_data_reviews
    notification_emails: *pwmgr_mgmt_menu_item_used_emails
    expires: never
    telemetry_mirror: Pwmgr_MgmtMenuItemUsed_Export

  mgmt_menu_item_used_export_complete:
    type: event
    description: >
      Record interactions with the about:logins menu.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.mgmt_menu_item_used#export_complete.
    bugs: *pwmgr_mgmt_menu_item_used_bugs
    data_reviews: *pwmgr_mgmt_menu_item_used_data_reviews
    notification_emails: *pwmgr_mgmt_menu_item_used_emails
    expires: never
    telemetry_mirror: Pwmgr_MgmtMenuItemUsed_ExportComplete

  mgmt_menu_item_used_preferences:
    type: event
    description: >
      Record interactions with the about:logins menu.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.mgmt_menu_item_used#preferences.
    bugs: *pwmgr_mgmt_menu_item_used_bugs
    data_reviews: *pwmgr_mgmt_menu_item_used_data_reviews
    notification_emails: *pwmgr_mgmt_menu_item_used_emails
    expires: never
    telemetry_mirror: Pwmgr_MgmtMenuItemUsed_Preferences

  reauthenticate_master_password:
    type: event
    description: >
      Measure how often users are asked to authenticate with their Operating System or Master Password to gain access to stored passwords.
      Possible values are as follows,
        "success" should be used when the user authenticates and provides a password or other authentication factor.
        "success_no_prompt" should be used when the feature is enabled but no prompt is given to the user because they have recently authenticated.
        "success_disabled" is used when the feature is disabled.
        "success_unsupported_platform" should be set when the user attempts to authenticate on an unsupported platform.
        "success_no_password" should be used when the user doesn't have an OS password set.
        "fail" should be used when the user cancels the authentication prompt or an unexpected exception is encountered. The user may or may not have provided an incorrect password before cancelling.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.reauthenticate#master_password.
    bugs: &pwmgr_reauthenticate_bugs
      - https://bugzil.la/1628029
      - https://bugzil.la/1623745
      - https://bugzil.la/1636729
      - https://bugzil.la/1642267
    data_reviews: &pwmgr_reauthenticate_data_reviews
      - https://bugzil.la/1628029
      - https://bugzil.la/1623745
      - https://bugzil.la/1636729
      - https://bugzil.la/1642267
    notification_emails: &pwmgr_reauthenticate_emails
      - loines@mozilla.com
      - passwords-dev@mozilla.org
      - jaws@mozilla.com
    expires: never
    extra_keys: &pwmgr_reauthenticate_extra
      value:
        description: >
          The `value` of the event. Mirrors to the Legacy Telemetry
          event's `value` parameter.
        type: string
      auto_admin:
        description: >
          If the AutoAdminLogon Windows feature is enabled. This feature disables password prompt when logging in to Windows.

        type: string
      require_signon:
        description: >
          If the Power Settings on Windows are configured to not prompt for password upon resuming from sleep.

        type: string
    telemetry_mirror: Pwmgr_Reauthenticate_MasterPassword

  reauthenticate_os_auth:
    type: event
    description: >
      Measure how often users are asked to authenticate with their Operating System or Master Password to gain access to stored passwords.
      Possible values are as follows,
        "success" should be used when the user authenticates and provides a password or other authentication factor.
        "success_no_prompt" should be used when the feature is enabled but no prompt is given to the user because they have recently authenticated.
        "success_disabled" is used when the feature is disabled.
        "success_unsupported_platform" should be set when the user attempts to authenticate on an unsupported platform.
        "success_no_password" should be used when the user doesn't have an OS password set.
        "fail" should be used when the user cancels the authentication prompt or an unexpected exception is encountered. The user may or may not have provided an incorrect password before cancelling.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.reauthenticate#os_auth.
    bugs: *pwmgr_reauthenticate_bugs
    data_reviews: *pwmgr_reauthenticate_data_reviews
    notification_emails: *pwmgr_reauthenticate_emails
    expires: never
    extra_keys: *pwmgr_reauthenticate_extra
    telemetry_mirror: Pwmgr_Reauthenticate_OsAuth

  prompt_shown_os_reauth:
    type: event
    description: >
      Captures the method of user interaction initiating the prompt and the result of the prompt.
      Possible triggers include:
        "copy_logins" when a user copies a password in about:logins
        "copy_cpm" when a user copies a password in contextual password manager
        "edit_logins" when a user edits a login in about:logins
        "edit_cpm" when a user edits a login in contextual password manager
        "export_logins" when a user exports all passwords in about:logins
        "export_cpm" when a user exports all passwords in contextual password manager
        "reveal_logins" when a user reveals a password a login in about:logins
        "reveal_cpm" when a user reveals a password a login in contextual password manager
        "toggle_pref_primary_password" when a user toggles "Use a Primary Password" in about:preferences
        "toggle_pref_os_auth" when a user toggles "Passwords / Require device sign in" in about:preferences
      Possible results include:
        "success" should be used when the user is shown the OS Auth prompt and successfully authenticates.
        "fail_user_canceled" should be used when the user cancels the authentication prompt. The user may or may not have provided an incorrect password before cancelling.
        "fail_error" should be used when an unexpected exception is encountered.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1915672
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1915672
    notification_emails:
      - autofill@lists.mozilla.org
      - passwords-dev@mozilla.org
    expires: never
    extra_keys:
      trigger:
        description: >
          Which user interaction triggered the event.
        type: string
      result:
        description: >
          The result of the OS Authentication.
        type: string

  require_os_reauth_toggle:
    type: event
    description: >
      Captures the state of the toggle after the change was made.
      Toggle states include:
        True means the OS Auth preference is enabeled.
        False means it is disabled.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1915672
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1915672
    notification_emails:
      - autofill@lists.mozilla.org
      - passwords-dev@mozilla.org
    expires: never
    extra_keys:
      toggle_state:
        description: >
          The toggle state after the event.
        type: boolean

  os_auth_enabled:
      type: boolean
      description: >
          Check at startup whether OS Authentication has been enabled for passwords.
      bugs:
        - https://bugzilla.mozilla.org/show_bug.cgi?id=1915672
      data_reviews:
        - https://bugzilla.mozilla.org/show_bug.cgi?id=1915672
      notification_emails:
        - autofill@lists.mozilla.org
        - passwords-dev@mozilla.org
      expires: never


  open_management_aboutprotections:
    type: event
    description: >
      Sent when opening the password management UI.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.open_management#aboutprotections.
    bugs: &pwmgr_open_management_bugs
      - https://bugzil.la/1543499
      - https://bugzil.la/1454733
      - https://bugzil.la/1545172
      - https://bugzil.la/1550631
      - https://bugzil.la/1622971
    data_reviews: &pwmgr_open_management_data_reviews
      - https://bugzil.la/1543499
      - https://bugzil.la/1454733
      - https://bugzil.la/1545172
      - https://bugzil.la/1550631
      - https://bugzil.la/1622971
    notification_emails: &pwmgr_open_management_emails
      - loines@mozilla.com
      - passwords-dev@mozilla.org
      - sfoster@mozilla.com
    expires: never
    telemetry_mirror: Pwmgr_OpenManagement_Aboutprotections

  open_management_autocomplete:
    type: event
    description: >
      Sent when opening the password management UI.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.open_management#autocomplete.
    bugs: *pwmgr_open_management_bugs
    data_reviews: *pwmgr_open_management_data_reviews
    notification_emails: *pwmgr_open_management_emails
    expires: never
    telemetry_mirror: Pwmgr_OpenManagement_Autocomplete

  open_management_contextmenu:
    type: event
    description: >
      Sent when opening the password management UI.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.open_management#contextmenu.
    bugs: *pwmgr_open_management_bugs
    data_reviews: *pwmgr_open_management_data_reviews
    notification_emails: *pwmgr_open_management_emails
    expires: never
    telemetry_mirror: Pwmgr_OpenManagement_Contextmenu

  open_management_direct:
    type: event
    description: >
      Sent when opening the password management UI.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.open_management#direct.
    bugs: *pwmgr_open_management_bugs
    data_reviews: *pwmgr_open_management_data_reviews
    notification_emails: *pwmgr_open_management_emails
    expires: never
    telemetry_mirror: Pwmgr_OpenManagement_Direct

  open_management_mainmenu:
    type: event
    description: >
      Sent when opening the password management UI.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.open_management#mainmenu.
    bugs: *pwmgr_open_management_bugs
    data_reviews: *pwmgr_open_management_data_reviews
    notification_emails: *pwmgr_open_management_emails
    expires: never
    telemetry_mirror: Pwmgr_OpenManagement_Mainmenu

  open_management_pageinfo:
    type: event
    description: >
      Sent when opening the password management UI.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.open_management#pageinfo.
    bugs: *pwmgr_open_management_bugs
    data_reviews: *pwmgr_open_management_data_reviews
    notification_emails: *pwmgr_open_management_emails
    expires: never
    telemetry_mirror: Pwmgr_OpenManagement_Pageinfo

  open_management_preferences:
    type: event
    description: >
      Sent when opening the password management UI.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.open_management#preferences.
    bugs: *pwmgr_open_management_bugs
    data_reviews: *pwmgr_open_management_data_reviews
    notification_emails: *pwmgr_open_management_emails
    expires: never
    telemetry_mirror: Pwmgr_OpenManagement_Preferences

  open_management_snippet:
    type: event
    description: >
      Sent when opening the password management UI.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.open_management#snippet.
    bugs: *pwmgr_open_management_bugs
    data_reviews: *pwmgr_open_management_data_reviews
    notification_emails: *pwmgr_open_management_emails
    expires: never
    telemetry_mirror: Pwmgr_OpenManagement_Snippet

  cancel_existing_login:
    type: event
    description: >
      These events record interactions on the about:logins page.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.cancel#existing_login.
    bugs: &pwmgr_cancel_bugs
      - https://bugzil.la/1548463
      - https://bugzil.la/1600958
      - https://bugzil.la/1549115
      - https://bugzil.la/1628165
    data_reviews: &pwmgr_cancel_data_reviews
      - https://bugzil.la/1548463
      - https://bugzil.la/1600958
      - https://bugzil.la/1549115
      - https://bugzil.la/1628165
    notification_emails: &pwmgr_cancel_emails
      - loines@mozilla.com
      - passwords-dev@mozilla.org
      - jaws@mozilla.com
    expires: never
    extra_keys: &pwmgr_cancel_extra
      breached:
        description: >
          Whether the login is marked as breached or not. If a login is both breached and vulnerable, it will only be reported as breached.
        type: boolean
      vulnerable:
        description: >
          Whether the login is marked as vulnerable or not. If a login is both breached and vulnerable, it will only be reported as breached.
        type: boolean
    telemetry_mirror: Pwmgr_Cancel_ExistingLogin

  cancel_new_login:
    type: event
    description: >
      These events record interactions on the about:logins page.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.cancel#new_login.
    bugs: *pwmgr_cancel_bugs
    data_reviews: *pwmgr_cancel_data_reviews
    notification_emails: *pwmgr_cancel_emails
    expires: never
    extra_keys: *pwmgr_cancel_extra
    telemetry_mirror: Pwmgr_Cancel_NewLogin

  copy_password:
    type: event
    description: >
      These events record interactions on the about:logins page.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.copy#password.
    bugs: *pwmgr_cancel_bugs
    data_reviews: *pwmgr_cancel_data_reviews
    notification_emails: *pwmgr_cancel_emails
    expires: never
    extra_keys: *pwmgr_cancel_extra
    telemetry_mirror: Pwmgr_Copy_Password

  copy_username:
    type: event
    description: >
      These events record interactions on the about:logins page.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.copy#username.
    bugs: *pwmgr_cancel_bugs
    data_reviews: *pwmgr_cancel_data_reviews
    notification_emails: *pwmgr_cancel_emails
    expires: never
    extra_keys: *pwmgr_cancel_extra
    telemetry_mirror: Pwmgr_Copy_Username

  delete_existing_login:
    type: event
    description: >
      These events record interactions on the about:logins page.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.delete#existing_login.
    bugs: *pwmgr_cancel_bugs
    data_reviews: *pwmgr_cancel_data_reviews
    notification_emails: *pwmgr_cancel_emails
    expires: never
    extra_keys: *pwmgr_cancel_extra
    telemetry_mirror: Pwmgr_Delete_ExistingLogin

  delete_new_login:
    type: event
    description: >
      These events record interactions on the about:logins page.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.delete#new_login.
    bugs: *pwmgr_cancel_bugs
    data_reviews: *pwmgr_cancel_data_reviews
    notification_emails: *pwmgr_cancel_emails
    expires: never
    extra_keys: *pwmgr_cancel_extra
    telemetry_mirror: Pwmgr_Delete_NewLogin

  edit_existing_login:
    type: event
    description: >
      These events record interactions on the about:logins page.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.edit#existing_login.
    bugs: *pwmgr_cancel_bugs
    data_reviews: *pwmgr_cancel_data_reviews
    notification_emails: *pwmgr_cancel_emails
    expires: never
    extra_keys: *pwmgr_cancel_extra
    telemetry_mirror: Pwmgr_Edit_ExistingLogin

  filter_list:
    type: event
    description: >
      These events record interactions on the about:logins page.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.filter#list.
    bugs: *pwmgr_cancel_bugs
    data_reviews: *pwmgr_cancel_data_reviews
    notification_emails: *pwmgr_cancel_emails
    expires: never
    telemetry_mirror: Pwmgr_Filter_List

  hide_password:
    type: event
    description: >
      These events record interactions on the about:logins page.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.hide#password.
    bugs: *pwmgr_cancel_bugs
    data_reviews: *pwmgr_cancel_data_reviews
    notification_emails: *pwmgr_cancel_emails
    expires: never
    extra_keys: *pwmgr_cancel_extra
    telemetry_mirror: Pwmgr_Hide_Password

  learn_more_vuln_existing_login:
    type: event
    description: >
      These events record interactions on the about:logins page.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.learn_more_vuln#existing_login.
    bugs: *pwmgr_cancel_bugs
    data_reviews: *pwmgr_cancel_data_reviews
    notification_emails: *pwmgr_cancel_emails
    expires: never
    extra_keys: *pwmgr_cancel_extra
    telemetry_mirror: Pwmgr_LearnMoreVuln_ExistingLogin

  new_new_login:
    type: event
    description: >
      These events record interactions on the about:logins page.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.new#new_login.
    bugs: *pwmgr_cancel_bugs
    data_reviews: *pwmgr_cancel_data_reviews
    notification_emails: *pwmgr_cancel_emails
    expires: never
    telemetry_mirror: Pwmgr_New_NewLogin

  open_site_existing_login:
    type: event
    description: >
      These events record interactions on the about:logins page.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.open_site#existing_login.
    bugs: *pwmgr_cancel_bugs
    data_reviews: *pwmgr_cancel_data_reviews
    notification_emails: *pwmgr_cancel_emails
    expires: never
    extra_keys: *pwmgr_cancel_extra
    telemetry_mirror: Pwmgr_OpenSite_ExistingLogin

  save_existing_login:
    type: event
    description: >
      These events record interactions on the about:logins page.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.save#existing_login.
    bugs: *pwmgr_cancel_bugs
    data_reviews: *pwmgr_cancel_data_reviews
    notification_emails: *pwmgr_cancel_emails
    expires: never
    extra_keys: *pwmgr_cancel_extra
    telemetry_mirror: Pwmgr_Save_ExistingLogin

  save_new_login:
    type: event
    description: >
      These events record interactions on the about:logins page.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.save#new_login.
    bugs: *pwmgr_cancel_bugs
    data_reviews: *pwmgr_cancel_data_reviews
    notification_emails: *pwmgr_cancel_emails
    expires: never
    extra_keys: *pwmgr_cancel_extra
    telemetry_mirror: Pwmgr_Save_NewLogin

  select_existing_login:
    type: event
    description: >
      These events record interactions on the about:logins page.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.select#existing_login.
    bugs: *pwmgr_cancel_bugs
    data_reviews: *pwmgr_cancel_data_reviews
    notification_emails: *pwmgr_cancel_emails
    expires: never
    extra_keys: *pwmgr_cancel_extra
    telemetry_mirror: Pwmgr_Select_ExistingLogin

  show_password:
    type: event
    description: >
      These events record interactions on the about:logins page.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.show#password.
    bugs: *pwmgr_cancel_bugs
    data_reviews: *pwmgr_cancel_data_reviews
    notification_emails: *pwmgr_cancel_emails
    expires: never
    extra_keys: *pwmgr_cancel_extra
    telemetry_mirror: Pwmgr_Show_Password

  sort_list:
    type: event
    description: >
      These events record interactions on the about:logins page.
      This event was generated to correspond to the Legacy Telemetry event
      pwmgr.sort#list.
    bugs: *pwmgr_cancel_bugs
    data_reviews: *pwmgr_cancel_data_reviews
    notification_emails: *pwmgr_cancel_emails
    expires: never
    extra_keys:
      sort_key:
        description: >
          The key that is used for sorting the login-list.
        type: string
    telemetry_mirror: Pwmgr_Sort_List

  potentially_breached_passwords:
    type: quantity
    description: >
      The number of potentially breached passwords, as determined by
      LoginBreaches.getPotentialBreachesByLoginGUID.
      This metric was generated to correspond to the Legacy Telemetry
      scalar pwmgr.potentially_breached_passwords.
    bugs:
      - https://bugzil.la/1577808
    data_reviews:
      - https://bugzil.la/1577808
    notification_emails:
      - seceng-telemetry@mozilla.com
      - passwords-dev@mozilla.org
    expires: never
    unit: passwords
    telemetry_mirror: PWMGR_POTENTIALLY_BREACHED_PASSWORDS
    no_lint:
      - UNIT_IN_NAME

  num_saved_passwords:
    type: quantity
    unit: passwords
    lifetime: application
    description: |
      The number of saved logins, including those that cannot be decrypted.
      Similar to the legacy telemetry histogram PWMGR_NUM_SAVED_PASSWORDS.
    bugs:
      - https://bugzil.la/1937186
    data_reviews:
      - https://bugzil.la/1937186
    notification_emails:
      - passwords-dev@mozilla.org
    expires: never
    no_lint:
      - UNIT_IN_NAME

  saving_enabled:
    type: boolean
    lifetime: application
    description: |
      Whether password saving is enabled globally.
      Tracks the pref `signon.rememberSignons`.
    metadata:
      permit_non_commutative_operations_over_ipc: true
    bugs:
      - https://bugzil.la/1937186
    data_reviews:
      - https://bugzil.la/1937186
    notification_emails:
      - passwords-dev@mozilla.org
    expires: never


form_autocomplete:
  show_logins:
    type: event
    description: >
      An content form autocomplete popup was shown. Details on the timing
      and context are provided.
      This event was generated to correspond to the Legacy Telemetry event
      form_autocomplete.show#logins.
    bugs:
      - https://bugzil.la/1619498
      - https://bugzil.la/1628849
    data_reviews:
      - https://bugzil.la/1619498
      - https://bugzil.la/1628849
    notification_emails:
      - passwords-dev@mozilla.org
    expires: never
    extra_keys:
      value:
        description: >
          The `value` is the number of milliseconds since the autocomplete search started.
        type: quantity
      acFieldName:
        description: >
          The "field name" token (last one) of the field's autocomplete attribute.
        type: string
      fieldType:
        description: >
          The `type` property value of the field.
        type: string
      generatedPasswo:
        description: >
          The number of generated password rows shown.
        type: string
      hadPrevious:
        description: >
          Whether the autocomplete results had cached previous results it could use.
        type: string
      typeWasPassword:
        description: >
          Whether the input `type` was ever "password".
        type: string
      insecureWarning:
        description: >
          The number of insecure login field warning rows shown (should be 0 or 1).
        type: string
      login:
        description: >
          The number of login rows shown (with or without the domain line).
        type: string
      importableLogin:
        description: >
          The number of import suggestion rows shown.
        type: string
      loginsFooter:
        description: >
          The number of "Manage Passwords" footer row shown.
        type: string
      stringLength:
        description: >
          Length of the text in the field that triggered these results.
        type: string
    telemetry_mirror: Form_autocomplete_Show_Logins

relay_integration:
  enabled_pref_change:
    type: event
    description: >
      Checkbox in the settings page to enable/disable relay
      This event was generated to correspond to the Legacy Telemetry event
      relay_integration.enabled#pref_change.
    bugs: &relay_integration_enabled_bugs
      - https://bugzil.la/1804502
    data_reviews: &relay_integration_enabled_data_reviews
      - https://bugzil.la/1804502
    notification_emails: &relay_integration_enabled_emails
      - passwords-dev@mozilla.org
    expires: never
    telemetry_mirror: Relay_integration_Enabled_PrefChange

  disabled_pref_change:
    type: event
    description: >
      Checkbox in the settings page to enable/disable relay
      This event was generated to correspond to the Legacy Telemetry event
      relay_integration.disabled#pref_change.
    bugs: *relay_integration_enabled_bugs
    data_reviews: *relay_integration_enabled_data_reviews
    notification_emails: *relay_integration_enabled_emails
    expires: never
    telemetry_mirror: Relay_integration_Disabled_PrefChange

  shown_offer_relay:
    type: event
    description: >
      Firefox relay integration autocomplete popup
      This event was generated to correspond to the Legacy Telemetry event
      relay_integration.shown#offer_relay.
    bugs: &relay_integration_shown_bugs
      - https://bugzil.la/1804502
    data_reviews: &relay_integration_shown_data_reviews
      - https://bugzil.la/1804502
    notification_emails: &relay_integration_shown_emails
      - passwords-dev@mozilla.org
    expires: never
    extra_keys: &relay_integration_offer_relay
      value:
        description: >
          The `value` of the event. Mirrors to the Legacy Telemetry
          event's `value` parameter.
        type: string
      scenario:
        description: >
          Describes the auth context for now only SignupForm is supported
        type: string
    telemetry_mirror: Relay_integration_Shown_OfferRelay

  clicked_offer_relay:
    type: event
    description: >
      Firefox relay integration autocomplete popup
      This event was generated to correspond to the Legacy Telemetry event
      relay_integration.clicked#offer_relay.
    bugs: *relay_integration_shown_bugs
    data_reviews: *relay_integration_shown_data_reviews
    notification_emails: *relay_integration_shown_emails
    expires: never
    extra_keys: *relay_integration_offer_relay
    telemetry_mirror: Relay_integration_Clicked_OfferRelay

  shown_fill_username:
    type: event
    description: >
      Firefox relay integration autocomplete popup
      This event was generated to correspond to the Legacy Telemetry event
      relay_integration.shown#fill_username.
    bugs: *relay_integration_shown_bugs
    data_reviews: *relay_integration_shown_data_reviews
    notification_emails: *relay_integration_shown_emails
    expires: never
    extra_keys: &relay_integration_fill_username
      value:
        description: >
          The `value` of the event. Mirrors to the Legacy Telemetry
          event's `value` parameter.
        type: string
      error_code:
        description: >
          The error code after users click the fill username autocomplete entry. Only present if the object is "fill_username". When the event is successful, the error_code  is 0.

        type: string
    telemetry_mirror: Relay_integration_Shown_FillUsername

  clicked_fill_username:
    type: event
    description: >
      Firefox relay integration autocomplete popup
      This event was generated to correspond to the Legacy Telemetry event
      relay_integration.clicked#fill_username.
    bugs: *relay_integration_shown_bugs
    data_reviews: *relay_integration_shown_data_reviews
    notification_emails: *relay_integration_shown_emails
    expires: never
    extra_keys: *relay_integration_fill_username
    telemetry_mirror: Relay_integration_Clicked_FillUsername

  shown_reuse_panel:
    type: event
    description: >
      Panels to show the state of the email alias generation
      This event was generated to correspond to the Legacy Telemetry event
      relay_integration.shown#reuse_panel.
    bugs: &relay_integration_reuse_panel_bugs
      - https://bugzil.la/1804502
    data_reviews: &relay_integration_reuse_panel_data_reviews
      - https://bugzil.la/1804502
    notification_emails: &relay_integration_reuse_panel_emails
      - passwords-dev@mozilla.org
    expires: never
    extra_keys:
      value:
        description: >
          The `value` of the event. Mirrors to the Legacy Telemetry
          event's `value` parameter.
        type: string
      error_code:
        description: >
          The error code after users click the email alias generation panel. When the event is successful, the error_code  is 0.

        type: string
    telemetry_mirror: Relay_integration_Shown_ReusePanel

  get_unlimited_masks_reuse_panel:
    type: event
    description: >
      Panels to show the state of the email alias generation
      This event was generated to correspond to the Legacy Telemetry event
      relay_integration.get_unlimited_masks#reuse_panel.
    bugs: *relay_integration_reuse_panel_bugs
    data_reviews: *relay_integration_reuse_panel_data_reviews
    notification_emails: *relay_integration_reuse_panel_emails
    expires: never
    extra_keys: &relay_integration_reuse_panel_extra
      value:
        description: >
          The `value` of the event. Mirrors to the Legacy Telemetry
          event's `value` parameter.
        type: string
    telemetry_mirror: Relay_integration_GetUnlimitedMasks_ReusePanel

  reuse_mask_reuse_panel:
    type: event
    description: >
      Panels to show the state of the email alias generation
      This event was generated to correspond to the Legacy Telemetry event
      relay_integration.reuse_mask#reuse_panel.
    bugs: *relay_integration_reuse_panel_bugs
    data_reviews: *relay_integration_reuse_panel_data_reviews
    notification_emails: *relay_integration_reuse_panel_emails
    expires: never
    extra_keys: *relay_integration_reuse_panel_extra
    telemetry_mirror: Relay_integration_ReuseMask_ReusePanel

  shown_opt_in_panel:
    type: event
    description: >
      Panel to opt-in Firefox Relay Integration
      This event was generated to correspond to the Legacy Telemetry event
      relay_integration.shown#opt_in_panel.
    bugs: &relay_integration_opt_in_panel_bugs
      - https://bugzil.la/1804502
    data_reviews: &relay_integration_opt_in_panel_data_reviews
      - https://bugzil.la/1804502
    notification_emails: &relay_integration_opt_in_panel_emails
      - passwords-dev@mozilla.org
    expires: never
    extra_keys: &relay_integration_opt_in_panel_extra
      value:
        description: >
          The `value` of the event. Mirrors to the Legacy Telemetry
          event's `value` parameter.
        type: string
    telemetry_mirror: Relay_integration_Shown_OptInPanel

  enabled_opt_in_panel:
    type: event
    description: >
      Panel to opt-in Firefox Relay Integration
      This event was generated to correspond to the Legacy Telemetry event
      relay_integration.enabled#opt_in_panel.
    bugs: *relay_integration_opt_in_panel_bugs
    data_reviews: *relay_integration_opt_in_panel_data_reviews
    notification_emails: *relay_integration_opt_in_panel_emails
    expires: never
    extra_keys: *relay_integration_opt_in_panel_extra
    telemetry_mirror: Relay_integration_Enabled_OptInPanel

  postponed_opt_in_panel:
    type: event
    description: >
      Panel to opt-in Firefox Relay Integration
      This event was generated to correspond to the Legacy Telemetry event
      relay_integration.postponed#opt_in_panel.
    bugs: *relay_integration_opt_in_panel_bugs
    data_reviews: *relay_integration_opt_in_panel_data_reviews
    notification_emails: *relay_integration_opt_in_panel_emails
    expires: never
    extra_keys: *relay_integration_opt_in_panel_extra
    telemetry_mirror: Relay_integration_Postponed_OptInPanel

  disabled_opt_in_panel:
    type: event
    description: >
      Panel to opt-in Firefox Relay Integration
      This event was generated to correspond to the Legacy Telemetry event
      relay_integration.disabled#opt_in_panel.
    bugs: *relay_integration_opt_in_panel_bugs
    data_reviews: *relay_integration_opt_in_panel_data_reviews
    notification_emails: *relay_integration_opt_in_panel_emails
    expires: never
    extra_keys: *relay_integration_opt_in_panel_extra
    telemetry_mirror: Relay_integration_Disabled_OptInPanel
