Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@


class ClientCitationIconName(str, Enum):
"""Enumeration of supported citation icon names."""
"""Supported citation icon names for ``citation.appearance.image.name``.

The values mirror the predefined icon names documented for Teams bot
messages with AI-generated content. See "Add citations":
https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/bot-messages-ai-generated-content#add-citations
"""

MICROSOFT_WORD = "Microsoft Word"
MICROSOFT_EXCEL = "Microsoft Excel"
Expand All @@ -21,12 +26,12 @@ class ClientCitationIconName(str, Enum):
MICROSOFT_VISIO = "Microsoft Visio"
MICROSOFT_LOOP = "Microsoft Loop"
MICROSOFT_WHITEBOARD = "Microsoft Whiteboard"
SOURCE_CODE = "Source Code"
SKETCH = "Sketch"
ADOBE_ILLUSTRATOR = "Adobe Illustrator"
ADOBE_PHOTOSHOP = "Adobe Photoshop"
ADOBE_INDESIGN = "Adobe InDesign"
ADOBE_FLASH = "Adobe Flash"
SKETCH = "Sketch"
SOURCE_CODE = "Source Code"
IMAGE = "Image"
GIF = "GIF"
VIDEO = "Video"
Expand Down
36 changes: 36 additions & 0 deletions tests/activity/entity/test_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
AIEntity,
ClientCitation,
ClientCitationAppearance,
ClientCitationIconName,
SensitivityPattern,
SensitivityUsageInfo,
)
Expand Down Expand Up @@ -58,3 +59,38 @@ def test_schema_mixin_at_context_serialization():

assert "at_type" not in data
assert "at_context" not in data


def test_client_citation_icon_name_matches_teams_docs():
"""The icon names must match the predefined values documented for
citation.appearance.image.name in the Teams "Add citations" article:
https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/bot-messages-ai-generated-content#add-citations
"""
expected_values = [
"Microsoft Word",
"Microsoft Excel",
"Microsoft PowerPoint",
"Microsoft OneNote",
"Microsoft SharePoint",
"Microsoft Visio",
"Microsoft Loop",
"Microsoft Whiteboard",
"Source Code",
"Sketch",
"Adobe Illustrator",
"Adobe Photoshop",
"Adobe InDesign",
"Adobe Flash",
"Image",
"GIF",
"Video",
"Sound",
"ZIP",
"Text",
"PDF",
]

actual_values = [member.value for member in ClientCitationIconName]

assert set(actual_values) == set(expected_values)
assert actual_values == expected_values