<?xml version="1.0" encoding="UTF-8"?>
<!--
  Techy Phishing Reporter add-in manifest (MVP v2, minimal collector).

  Architecture decision (2026-11-01): the add-in only collects the message as EML
  (base64) plus basic metadata and POSTs it to the n8n backend. All analysis
  (headers, SPF/DKIM/DMARC, URL reputation, AI classification) happens server-side.

  Base URLs are GitHub Pages on this repo; change if Techy moves hosting.
  Distribution for the pilot: manual per-user install (sideload / My add-ins).
-->
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
           xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0"
           xsi:type="MailApp">

  <Id>9f4a7c62-8b3d-4a51-9e44-2f1b8d6c5a37</Id>
  <Version>2.2.0.0</Version>
  <ProviderName>Techy Solutions</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="Techy Phishing Reporter"/>
  <Description DefaultValue="Report phishing emails to the Techy security team with one click."/>

  <IconUrl DefaultValue="https://solverius-phishing-addin.zpwhqo.easypanel.host/assets/icon-64.png"/>
  <HighResolutionIconUrl DefaultValue="https://solverius-phishing-addin.zpwhqo.easypanel.host/assets/icon-128.png"/>
  <SupportUrl DefaultValue="https://solverius-phishing-addin.zpwhqo.easypanel.host/"/>

  <Hosts>
    <Host Name="Mailbox"/>
  </Hosts>

  <Requirements>
    <Sets>
      <!-- 1.5: the highest set Exchange on-premises (2016, 2019, SE) offers; a higher
           minimum hides the add-in there. The JS detects APIs (1.8 headers, 1.14
           getAsFileAsync, EWS fallback) at runtime and degrades gracefully. -->
      <Set Name="Mailbox" MinVersion="1.5"/>
    </Sets>
  </Requirements>

  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://solverius-phishing-addin.zpwhqo.easypanel.host/taskpane/taskpane.html"/>
        <RequestedHeight>450</RequestedHeight>
      </DesktopSettings>
    </Form>
  </FormSettings>

  <Permissions>ReadWriteMailbox</Permissions>

  <Rule xsi:type="RuleCollection" Mode="Or">
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read"/>
  </Rule>

  <!-- V1_0: clients below Mailbox 1.14 (Exchange on-premises, older Outlook) get only the task-pane button. -->
  <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
    <Description resid="Resid.Description"/>
    <Requirements>
      <bt:Sets DefaultMinVersion="1.5">
        <bt:Set Name="Mailbox"/>
      </bt:Sets>
    </Requirements>
    <Hosts>
      <Host xsi:type="MailHost">
        <DesktopFormFactor>
          <FunctionFile resid="Resid.Commands.Url"/>
          <ExtensionPoint xsi:type="MessageReadCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="MsgRead.Group">
                <Label resid="Resid.Group.Label"/>
                <Control xsi:type="Button" id="MsgRead.OpenPaneButton">
                  <Label resid="Resid.Pane.Label"/>
                  <Supertip>
                    <Title resid="Resid.Pane.Label"/>
                    <Description resid="Resid.Pane.Tooltip"/>
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Resid.Icon.16"/>
                    <bt:Image size="32" resid="Resid.Icon.32"/>
                    <bt:Image size="80" resid="Resid.Icon.80"/>
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="Resid.Pane.Url"/>
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>
    <Resources>
      <bt:Images>
        <bt:Image id="Resid.Icon.16" DefaultValue="https://solverius-phishing-addin.zpwhqo.easypanel.host/assets/icon-16.png"/>
        <bt:Image id="Resid.Icon.32" DefaultValue="https://solverius-phishing-addin.zpwhqo.easypanel.host/assets/icon-32.png"/>
        <bt:Image id="Resid.Icon.80" DefaultValue="https://solverius-phishing-addin.zpwhqo.easypanel.host/assets/icon-80.png"/>
      </bt:Images>
      <bt:Urls>
        <bt:Url id="Resid.Commands.Url" DefaultValue="https://solverius-phishing-addin.zpwhqo.easypanel.host/commands/commands.html"/>
        <bt:Url id="Resid.Pane.Url" DefaultValue="https://solverius-phishing-addin.zpwhqo.easypanel.host/taskpane/taskpane.html"/>
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="Resid.Group.Label" DefaultValue="Report Phishing"/>
        <bt:String id="Resid.Pane.Label" DefaultValue="Report Phishing"/>
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="Resid.Description" DefaultValue="Report phishing emails to the Techy security team with one click."/>
        <bt:String id="Resid.Pane.Tooltip" DefaultValue="Open the panel to report this email as phishing"/>
      </bt:LongStrings>
    </Resources>

    <!-- V1_1 (Mailbox 1.14): adds the integrated Report button, which takes the place of
         Outlook's own Report button in Microsoft 365 work/school mailboxes: OWA and new Outlook
         run commands.html; classic Outlook on Windows (Version 2404+) runs the single JS file of
         the Override (JavaScript-only runtime, see deploy/40-addin-config.sh and
         /.well-known/microsoft-officeaddins-allowed.json). Consumer accounts (outlook.com)
         ignore it and keep the task-pane button. -->
    <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
      <Description resid="Resid.Description"/>
      <Requirements>
        <bt:Sets DefaultMinVersion="1.14">
          <bt:Set Name="Mailbox"/>
        </bt:Sets>
      </Requirements>
      <Hosts>
        <Host xsi:type="MailHost">
          <Runtimes>
            <Runtime resid="Resid.Commands.Url">
              <Override type="javascript" resid="Resid.Commands.Classic.Url"/>
            </Runtime>
          </Runtimes>
          <DesktopFormFactor>
            <FunctionFile resid="Resid.Commands.Url"/>
            <ExtensionPoint xsi:type="MessageReadCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="MsgRead.Group">
                  <Label resid="Resid.Group.Label"/>
                  <Control xsi:type="Button" id="MsgRead.OpenPaneButton">
                    <Label resid="Resid.Pane.Label"/>
                    <Supertip>
                      <Title resid="Resid.Pane.Label"/>
                      <Description resid="Resid.Pane.Tooltip"/>
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="Resid.Icon.16"/>
                      <bt:Image size="32" resid="Resid.Icon.32"/>
                      <bt:Image size="80" resid="Resid.Icon.80"/>
                    </Icon>
                    <Action xsi:type="ShowTaskpane">
                      <SourceLocation resid="Resid.Pane.Url"/>
                    </Action>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>
            <ExtensionPoint xsi:type="ReportPhishingCommandSurface">
              <ReportPhishingCustomization>
                <Control xsi:type="Button" id="Spam.ReportButton">
                  <Label resid="Resid.Spam.Label"/>
                  <Supertip>
                    <Title resid="Resid.Spam.Label"/>
                    <Description resid="Resid.Spam.Tooltip"/>
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Resid.Icon.16"/>
                    <bt:Image size="32" resid="Resid.Icon.32"/>
                    <bt:Image size="80" resid="Resid.Icon.80"/>
                  </Icon>
                  <Action xsi:type="ExecuteFunction">
                    <FunctionName>onSpamReport</FunctionName>
                  </Action>
                </Control>
                <PreProcessingDialog>
                  <Title resid="Resid.Spam.DialogTitle"/>
                  <Description resid="Resid.Spam.DialogText"/>
                  <!-- Same order as REASONS in commands/commands.js. -->
                  <ReportingOptions>
                    <Title resid="Resid.Spam.OptionsTitle"/>
                    <Option resid="Resid.Spam.Option1"/>
                    <Option resid="Resid.Spam.Option2"/>
                    <Option resid="Resid.Spam.Option3"/>
                    <Option resid="Resid.Spam.Option4"/>
                    <Option resid="Resid.Spam.Option5"/>
                  </ReportingOptions>
                  <FreeTextLabel resid="Resid.Spam.FreeText"/>
                </PreProcessingDialog>
                <SourceLocation resid="Resid.Commands.Url"/>
              </ReportPhishingCustomization>
            </ExtensionPoint>
          </DesktopFormFactor>
        </Host>
      </Hosts>
      <Resources>
        <bt:Images>
          <bt:Image id="Resid.Icon.16" DefaultValue="https://solverius-phishing-addin.zpwhqo.easypanel.host/assets/icon-16.png"/>
          <bt:Image id="Resid.Icon.32" DefaultValue="https://solverius-phishing-addin.zpwhqo.easypanel.host/assets/icon-32.png"/>
          <bt:Image id="Resid.Icon.80" DefaultValue="https://solverius-phishing-addin.zpwhqo.easypanel.host/assets/icon-80.png"/>
        </bt:Images>
        <bt:Urls>
          <bt:Url id="Resid.Commands.Url" DefaultValue="https://solverius-phishing-addin.zpwhqo.easypanel.host/commands/commands.html"/>
          <bt:Url id="Resid.Commands.Classic.Url" DefaultValue="https://solverius-phishing-addin.zpwhqo.easypanel.host/commands/commands.classic.js"/>
          <bt:Url id="Resid.Pane.Url" DefaultValue="https://solverius-phishing-addin.zpwhqo.easypanel.host/taskpane/taskpane.html"/>
        </bt:Urls>
        <bt:ShortStrings>
          <bt:String id="Resid.Group.Label" DefaultValue="Report Phishing"/>
          <bt:String id="Resid.Pane.Label" DefaultValue="Report Phishing"/>
          <bt:String id="Resid.Spam.Label" DefaultValue="Report Phishing"/>
          <bt:String id="Resid.Spam.DialogTitle" DefaultValue="Report phishing to Techy"/>
          <bt:String id="Resid.Spam.OptionsTitle" DefaultValue="Why does it look suspicious? (optional)"/>
          <bt:String id="Resid.Spam.Option1" DefaultValue="Asks for my password or to sign in"/>
          <bt:String id="Resid.Spam.Option2" DefaultValue="Asks for a payment, bank details or gift cards"/>
          <bt:String id="Resid.Spam.Option3" DefaultValue="Suspicious link or attachment"/>
          <bt:String id="Resid.Spam.Option4" DefaultValue="Pretends to be someone I know or a company"/>
          <bt:String id="Resid.Spam.Option5" DefaultValue="I clicked a link, opened an attachment or replied"/>
          <bt:String id="Resid.Spam.FreeText" DefaultValue="Anything else the security team should know?"/>
        </bt:ShortStrings>
        <bt:LongStrings>
          <bt:String id="Resid.Description" DefaultValue="Report phishing emails to the Techy security team with one click."/>
          <bt:String id="Resid.Pane.Tooltip" DefaultValue="Open the panel to report this email as phishing"/>
          <bt:String id="Resid.Spam.Tooltip" DefaultValue="Report this email as phishing to the Techy security team."/>
          <bt:String id="Resid.Spam.DialogText" DefaultValue="The Techy security team will analyze this email. After the report it is moved to Junk Email."/>
        </bt:LongStrings>
      </Resources>
    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>
