microsoft-agents-activity 0.7.0.dev0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. microsoft_agents/activity/__init__.py +200 -0
  2. microsoft_agents/activity/_channel_id_field_mixin.py +95 -0
  3. microsoft_agents/activity/_load_configuration.py +33 -0
  4. microsoft_agents/activity/_model_utils.py +64 -0
  5. microsoft_agents/activity/_type_aliases.py +7 -0
  6. microsoft_agents/activity/_utils/__init__.py +6 -0
  7. microsoft_agents/activity/_utils/_deferred_string.py +34 -0
  8. microsoft_agents/activity/action_types.py +17 -0
  9. microsoft_agents/activity/activity.py +787 -0
  10. microsoft_agents/activity/activity_event_names.py +9 -0
  11. microsoft_agents/activity/activity_importance.py +10 -0
  12. microsoft_agents/activity/activity_types.py +25 -0
  13. microsoft_agents/activity/adaptive_card_invoke_action.py +27 -0
  14. microsoft_agents/activity/adaptive_card_invoke_response.py +23 -0
  15. microsoft_agents/activity/adaptive_card_invoke_value.py +25 -0
  16. microsoft_agents/activity/agents_model.py +49 -0
  17. microsoft_agents/activity/animation_card.py +57 -0
  18. microsoft_agents/activity/attachment.py +27 -0
  19. microsoft_agents/activity/attachment_data.py +24 -0
  20. microsoft_agents/activity/attachment_info.py +22 -0
  21. microsoft_agents/activity/attachment_layout_types.py +9 -0
  22. microsoft_agents/activity/attachment_view.py +18 -0
  23. microsoft_agents/activity/audio_card.py +57 -0
  24. microsoft_agents/activity/basic_card.py +33 -0
  25. microsoft_agents/activity/caller_id_constants.py +10 -0
  26. microsoft_agents/activity/card_action.py +42 -0
  27. microsoft_agents/activity/card_image.py +22 -0
  28. microsoft_agents/activity/channel_account.py +39 -0
  29. microsoft_agents/activity/channel_adapter_protocol.py +79 -0
  30. microsoft_agents/activity/channel_id.py +95 -0
  31. microsoft_agents/activity/channels.py +161 -0
  32. microsoft_agents/activity/contact_relation_update_action_types.py +9 -0
  33. microsoft_agents/activity/conversation_account.py +41 -0
  34. microsoft_agents/activity/conversation_members.py +19 -0
  35. microsoft_agents/activity/conversation_parameters.py +40 -0
  36. microsoft_agents/activity/conversation_reference.py +69 -0
  37. microsoft_agents/activity/conversation_resource_response.py +22 -0
  38. microsoft_agents/activity/conversation_update_types.py +18 -0
  39. microsoft_agents/activity/conversations_result.py +20 -0
  40. microsoft_agents/activity/delivery_modes.py +12 -0
  41. microsoft_agents/activity/end_of_conversation_codes.py +13 -0
  42. microsoft_agents/activity/entity/__init__.py +36 -0
  43. microsoft_agents/activity/entity/ai_entity.py +111 -0
  44. microsoft_agents/activity/entity/entity.py +41 -0
  45. microsoft_agents/activity/entity/entity_types.py +14 -0
  46. microsoft_agents/activity/entity/geo_coordinates.py +33 -0
  47. microsoft_agents/activity/entity/mention.py +24 -0
  48. microsoft_agents/activity/entity/place.py +33 -0
  49. microsoft_agents/activity/entity/product_info.py +20 -0
  50. microsoft_agents/activity/entity/thing.py +21 -0
  51. microsoft_agents/activity/error.py +22 -0
  52. microsoft_agents/activity/error_response.py +15 -0
  53. microsoft_agents/activity/errors/__init__.py +14 -0
  54. microsoft_agents/activity/errors/error_message.py +64 -0
  55. microsoft_agents/activity/errors/error_resources.py +52 -0
  56. microsoft_agents/activity/expected_replies.py +16 -0
  57. microsoft_agents/activity/fact.py +21 -0
  58. microsoft_agents/activity/hero_card.py +33 -0
  59. microsoft_agents/activity/inner_http_error.py +17 -0
  60. microsoft_agents/activity/input_hints.py +10 -0
  61. microsoft_agents/activity/installation_update_action_types.py +9 -0
  62. microsoft_agents/activity/invoke_response.py +27 -0
  63. microsoft_agents/activity/media_card.py +57 -0
  64. microsoft_agents/activity/media_event_value.py +15 -0
  65. microsoft_agents/activity/media_url.py +19 -0
  66. microsoft_agents/activity/message_reaction.py +16 -0
  67. microsoft_agents/activity/message_reaction_types.py +14 -0
  68. microsoft_agents/activity/message_update_types.py +10 -0
  69. microsoft_agents/activity/oauth_card.py +27 -0
  70. microsoft_agents/activity/paged_members_result.py +19 -0
  71. microsoft_agents/activity/receipt_card.py +39 -0
  72. microsoft_agents/activity/receipt_item.py +38 -0
  73. microsoft_agents/activity/resource_response.py +15 -0
  74. microsoft_agents/activity/role_types.py +12 -0
  75. microsoft_agents/activity/semantic_action.py +21 -0
  76. microsoft_agents/activity/semantic_actions_states.py +10 -0
  77. microsoft_agents/activity/sign_in_constants.py +13 -0
  78. microsoft_agents/activity/sign_in_resource.py +17 -0
  79. microsoft_agents/activity/signin_card.py +19 -0
  80. microsoft_agents/activity/suggested_actions.py +21 -0
  81. microsoft_agents/activity/teams/__init__.py +198 -0
  82. microsoft_agents/activity/teams/app_based_link_query.py +18 -0
  83. microsoft_agents/activity/teams/batch_failed_entries_response.py +15 -0
  84. microsoft_agents/activity/teams/batch_failed_entry.py +16 -0
  85. microsoft_agents/activity/teams/batch_operation_response.py +13 -0
  86. microsoft_agents/activity/teams/batch_operation_state_response.py +24 -0
  87. microsoft_agents/activity/teams/bot_config_auth.py +18 -0
  88. microsoft_agents/activity/teams/cache_info.py +18 -0
  89. microsoft_agents/activity/teams/cancel_operation_response.py +19 -0
  90. microsoft_agents/activity/teams/channel_info.py +21 -0
  91. microsoft_agents/activity/teams/config_auth_response.py +17 -0
  92. microsoft_agents/activity/teams/config_response.py +18 -0
  93. microsoft_agents/activity/teams/config_response_base.py +14 -0
  94. microsoft_agents/activity/teams/config_task_response.py +18 -0
  95. microsoft_agents/activity/teams/conversation_list.py +17 -0
  96. microsoft_agents/activity/teams/file_consent_card.py +24 -0
  97. microsoft_agents/activity/teams/file_consent_card_response.py +21 -0
  98. microsoft_agents/activity/teams/file_download_info.py +24 -0
  99. microsoft_agents/activity/teams/file_info_card.py +21 -0
  100. microsoft_agents/activity/teams/file_upload_info.py +26 -0
  101. microsoft_agents/activity/teams/meeting_details.py +23 -0
  102. microsoft_agents/activity/teams/meeting_details_base.py +21 -0
  103. microsoft_agents/activity/teams/meeting_end_event_details.py +15 -0
  104. microsoft_agents/activity/teams/meeting_event_details.py +15 -0
  105. microsoft_agents/activity/teams/meeting_info.py +24 -0
  106. microsoft_agents/activity/teams/meeting_notification.py +15 -0
  107. microsoft_agents/activity/teams/meeting_notification_base.py +14 -0
  108. microsoft_agents/activity/teams/meeting_notification_channel_data.py +16 -0
  109. microsoft_agents/activity/teams/meeting_notification_recipient_failure_info.py +20 -0
  110. microsoft_agents/activity/teams/meeting_notification_response.py +20 -0
  111. microsoft_agents/activity/teams/meeting_participant_info.py +18 -0
  112. microsoft_agents/activity/teams/meeting_participants_event_details.py +16 -0
  113. microsoft_agents/activity/teams/meeting_stage_surface.py +25 -0
  114. microsoft_agents/activity/teams/meeting_start_event_details.py +15 -0
  115. microsoft_agents/activity/teams/meeting_tab_icon_surface.py +15 -0
  116. microsoft_agents/activity/teams/message_actions_payload.py +70 -0
  117. microsoft_agents/activity/teams/message_actions_payload_app.py +29 -0
  118. microsoft_agents/activity/teams/message_actions_payload_attachment.py +30 -0
  119. microsoft_agents/activity/teams/message_actions_payload_body.py +17 -0
  120. microsoft_agents/activity/teams/message_actions_payload_conversation.py +20 -0
  121. microsoft_agents/activity/teams/message_actions_payload_from.py +25 -0
  122. microsoft_agents/activity/teams/message_actions_payload_mention.py +23 -0
  123. microsoft_agents/activity/teams/message_actions_payload_reaction.py +23 -0
  124. microsoft_agents/activity/teams/message_actions_payload_user.py +27 -0
  125. microsoft_agents/activity/teams/messaging_extension_action.py +37 -0
  126. microsoft_agents/activity/teams/messaging_extension_action_response.py +24 -0
  127. microsoft_agents/activity/teams/messaging_extension_attachment.py +32 -0
  128. microsoft_agents/activity/teams/messaging_extension_parameter.py +17 -0
  129. microsoft_agents/activity/teams/messaging_extension_query.py +27 -0
  130. microsoft_agents/activity/teams/messaging_extension_query_options.py +17 -0
  131. microsoft_agents/activity/teams/messaging_extension_response.py +21 -0
  132. microsoft_agents/activity/teams/messaging_extension_result.py +34 -0
  133. microsoft_agents/activity/teams/messaging_extension_suggested_action.py +17 -0
  134. microsoft_agents/activity/teams/notification_info.py +21 -0
  135. microsoft_agents/activity/teams/o365_connector_card.py +32 -0
  136. microsoft_agents/activity/teams/o365_connector_card_action_base.py +21 -0
  137. microsoft_agents/activity/teams/o365_connector_card_action_card.py +30 -0
  138. microsoft_agents/activity/teams/o365_connector_card_action_query.py +15 -0
  139. microsoft_agents/activity/teams/o365_connector_card_date_input.py +30 -0
  140. microsoft_agents/activity/teams/o365_connector_card_fact.py +17 -0
  141. microsoft_agents/activity/teams/o365_connector_card_http_post.py +25 -0
  142. microsoft_agents/activity/teams/o365_connector_card_image.py +18 -0
  143. microsoft_agents/activity/teams/o365_connector_card_input_base.py +28 -0
  144. microsoft_agents/activity/teams/o365_connector_card_multichoice_input.py +40 -0
  145. microsoft_agents/activity/teams/o365_connector_card_multichoice_input_choice.py +17 -0
  146. microsoft_agents/activity/teams/o365_connector_card_open_uri.py +26 -0
  147. microsoft_agents/activity/teams/o365_connector_card_open_uri_target.py +17 -0
  148. microsoft_agents/activity/teams/o365_connector_card_section.py +42 -0
  149. microsoft_agents/activity/teams/o365_connector_card_text_input.py +31 -0
  150. microsoft_agents/activity/teams/o365_connector_card_view_action.py +25 -0
  151. microsoft_agents/activity/teams/on_behalf_of.py +23 -0
  152. microsoft_agents/activity/teams/read_receipt_info.py +47 -0
  153. microsoft_agents/activity/teams/signin_state_verification_query.py +14 -0
  154. microsoft_agents/activity/teams/surface.py +18 -0
  155. microsoft_agents/activity/teams/tab_context.py +14 -0
  156. microsoft_agents/activity/teams/tab_entity_context.py +15 -0
  157. microsoft_agents/activity/teams/tab_request.py +22 -0
  158. microsoft_agents/activity/teams/tab_response.py +16 -0
  159. microsoft_agents/activity/teams/tab_response_card.py +14 -0
  160. microsoft_agents/activity/teams/tab_response_cards.py +17 -0
  161. microsoft_agents/activity/teams/tab_response_payload.py +25 -0
  162. microsoft_agents/activity/teams/tab_submit.py +23 -0
  163. microsoft_agents/activity/teams/tab_submit_data.py +18 -0
  164. microsoft_agents/activity/teams/tab_suggested_actions.py +17 -0
  165. microsoft_agents/activity/teams/targeted_meeting_notification.py +19 -0
  166. microsoft_agents/activity/teams/targeted_meeting_notification_value.py +19 -0
  167. microsoft_agents/activity/teams/task_module_card_response.py +15 -0
  168. microsoft_agents/activity/teams/task_module_continue_response.py +19 -0
  169. microsoft_agents/activity/teams/task_module_message_response.py +18 -0
  170. microsoft_agents/activity/teams/task_module_request.py +25 -0
  171. microsoft_agents/activity/teams/task_module_request_context.py +15 -0
  172. microsoft_agents/activity/teams/task_module_response.py +20 -0
  173. microsoft_agents/activity/teams/task_module_response_base.py +17 -0
  174. microsoft_agents/activity/teams/task_module_task_info.py +30 -0
  175. microsoft_agents/activity/teams/team_details.py +29 -0
  176. microsoft_agents/activity/teams/team_info.py +20 -0
  177. microsoft_agents/activity/teams/teams_batch_operation_response.py +19 -0
  178. microsoft_agents/activity/teams/teams_channel_account.py +44 -0
  179. microsoft_agents/activity/teams/teams_channel_data.py +43 -0
  180. microsoft_agents/activity/teams/teams_channel_data_settings.py +15 -0
  181. microsoft_agents/activity/teams/teams_meeting_info.py +14 -0
  182. microsoft_agents/activity/teams/teams_meeting_member.py +19 -0
  183. microsoft_agents/activity/teams/teams_meeting_participant.py +24 -0
  184. microsoft_agents/activity/teams/teams_member.py +14 -0
  185. microsoft_agents/activity/teams/teams_paged_members_result.py +19 -0
  186. microsoft_agents/activity/teams/tenant_info.py +14 -0
  187. microsoft_agents/activity/teams/user_meeting_details.py +17 -0
  188. microsoft_agents/activity/text_format_types.py +10 -0
  189. microsoft_agents/activity/text_highlight.py +19 -0
  190. microsoft_agents/activity/thumbnail_card.py +33 -0
  191. microsoft_agents/activity/thumbnail_url.py +18 -0
  192. microsoft_agents/activity/token_exchange_invoke_request.py +24 -0
  193. microsoft_agents/activity/token_exchange_invoke_response.py +24 -0
  194. microsoft_agents/activity/token_exchange_resource.py +16 -0
  195. microsoft_agents/activity/token_exchange_state.py +41 -0
  196. microsoft_agents/activity/token_or_sign_in_resource_response.py +21 -0
  197. microsoft_agents/activity/token_post_resource.py +14 -0
  198. microsoft_agents/activity/token_request.py +19 -0
  199. microsoft_agents/activity/token_response.py +46 -0
  200. microsoft_agents/activity/token_status.py +32 -0
  201. microsoft_agents/activity/transcript.py +16 -0
  202. microsoft_agents/activity/turn_context_protocol.py +68 -0
  203. microsoft_agents/activity/video_card.py +57 -0
  204. microsoft_agents_activity-0.7.0.dev0.dist-info/METADATA +173 -0
  205. microsoft_agents_activity-0.7.0.dev0.dist-info/RECORD +208 -0
  206. microsoft_agents_activity-0.7.0.dev0.dist-info/WHEEL +5 -0
  207. microsoft_agents_activity-0.7.0.dev0.dist-info/licenses/LICENSE +21 -0
  208. microsoft_agents_activity-0.7.0.dev0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,19 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ from .batch_operation_response import BatchOperationResponse
5
+
6
+
7
+ class TeamsBatchOperationResponse(BatchOperationResponse):
8
+ """
9
+ :param operation_id: Unique identifier of the batch operation.
10
+ :type operation_id: str
11
+ :param body_as_text: The body of the request as text.
12
+ :type body_as_text: str
13
+ :param parsed_body: The parsed body of the request.
14
+ :type parsed_body: BatchOperationResponse
15
+ """
16
+
17
+ operation_id: str = None
18
+ body_as_text: str = None
19
+ parsed_body: BatchOperationResponse = None
@@ -0,0 +1,44 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ from typing import Any
5
+ from pydantic import ConfigDict
6
+ from ..agents_model import AgentsModel
7
+
8
+
9
+ class TeamsChannelAccount(AgentsModel):
10
+ """Teams channel account detailing user Azure Active Directory details.
11
+
12
+ :param id: Channel id for the user or bot on this channel (Example: ``joe@smith.com``, or ``@joesmith`` or ``123456``)
13
+ :type id: str
14
+ :param name: Display friendly name
15
+ :type name: str
16
+ :param given_name: Given name part of the user name.
17
+ :type given_name: str
18
+ :param surname: Surname part of the user name.
19
+ :type surname: str
20
+ :param email: Email Id of the user.
21
+ :type email: str
22
+ :param user_principal_name: Unique user principal name.
23
+ :type user_principal_name: str
24
+ :param tenant_id: Tenant Id of the user.
25
+ :type tenant_id: str
26
+ :param user_role: User Role of the user.
27
+ :type user_role: str
28
+ """
29
+
30
+ model_config = ConfigDict(extra="allow")
31
+
32
+ id: str = None
33
+ name: str = None
34
+ given_name: str = None
35
+ surname: str = None
36
+ email: str = None
37
+ user_principal_name: str = None
38
+ tenant_id: str = None
39
+ user_role: str = None
40
+
41
+ @property
42
+ def properties(self) -> dict[str, Any]:
43
+ """Returns the set of properties that are not None."""
44
+ return self.model_extra
@@ -0,0 +1,43 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ from ..agents_model import AgentsModel
5
+ from typing import List
6
+ from .channel_info import ChannelInfo
7
+ from .team_info import TeamInfo
8
+ from .notification_info import NotificationInfo
9
+ from .tenant_info import TenantInfo
10
+ from .teams_meeting_info import TeamsMeetingInfo
11
+ from .teams_channel_data_settings import TeamsChannelDataSettings
12
+ from .on_behalf_of import OnBehalfOf
13
+
14
+
15
+ class TeamsChannelData(AgentsModel):
16
+ """Channel data specific to messages received in Microsoft Teams.
17
+
18
+ :param channel: Information about the channel in which the message was sent
19
+ :type channel: ChannelInfo
20
+ :param event_type: Type of event.
21
+ :type event_type: str
22
+ :param team: Information about the team in which the message was sent
23
+ :type team: TeamInfo
24
+ :param notification: Notification settings for the message
25
+ :type notification: NotificationInfo
26
+ :param tenant: Information about the tenant in which the message was sent
27
+ :type tenant: TenantInfo
28
+ :param meeting: Information about the meeting in which the message was sent
29
+ :type meeting: TeamsMeetingInfo
30
+ :param settings: Information about the settings in which the message was sent
31
+ :type settings: TeamsChannelDataSettings
32
+ :param on_behalf_of: The OnBehalfOf list for user attribution
33
+ :type on_behalf_of: List[OnBehalfOf]
34
+ """
35
+
36
+ channel: ChannelInfo = None
37
+ event_type: str = None
38
+ team: TeamInfo = None
39
+ notification: NotificationInfo = None
40
+ tenant: TenantInfo = None
41
+ meeting: TeamsMeetingInfo = None
42
+ settings: TeamsChannelDataSettings = None
43
+ on_behalf_of: List[OnBehalfOf] = None
@@ -0,0 +1,15 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ from ..agents_model import AgentsModel
5
+ from .channel_info import ChannelInfo
6
+
7
+
8
+ class TeamsChannelDataSettings(AgentsModel):
9
+ """Represents the settings information for a Teams channel data.
10
+
11
+ :param selected_channel: Information about the selected Teams channel.
12
+ :type selected_channel: ChannelInfo
13
+ """
14
+
15
+ selected_channel: ChannelInfo = None
@@ -0,0 +1,14 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ from ..agents_model import AgentsModel
5
+
6
+
7
+ class TeamsMeetingInfo(AgentsModel):
8
+ """Describes a Teams Meeting.
9
+
10
+ :param id: Unique identifier representing a meeting
11
+ :type id: str
12
+ """
13
+
14
+ id: str = None
@@ -0,0 +1,19 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ from ..agents_model import AgentsModel
5
+ from .teams_channel_account import TeamsChannelAccount
6
+ from .user_meeting_details import UserMeetingDetails
7
+
8
+
9
+ class TeamsMeetingMember(AgentsModel):
10
+ """Data about the meeting participants.
11
+
12
+ :param user: The channel user data.
13
+ :type user: TeamsChannelAccount
14
+ :param meeting: The user meeting details.
15
+ :type meeting: UserMeetingDetails
16
+ """
17
+
18
+ user: TeamsChannelAccount = None
19
+ meeting: UserMeetingDetails = None
@@ -0,0 +1,24 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ from ..agents_model import AgentsModel
5
+
6
+ from .teams_channel_account import TeamsChannelAccount
7
+ from .meeting_participant_info import MeetingParticipantInfo
8
+ from ..conversation_account import ConversationAccount
9
+
10
+
11
+ class TeamsMeetingParticipant(AgentsModel):
12
+ """Teams participant channel account detailing user Azure Active Directory and meeting participant details.
13
+
14
+ :param user: Teams Channel Account information for this meeting participant
15
+ :type user: TeamsChannelAccount
16
+ :param meeting: Information specific to this participant in the specific meeting.
17
+ :type meeting: MeetingParticipantInfo
18
+ :param conversation: Conversation Account for the meeting.
19
+ :type conversation: ConversationAccount
20
+ """
21
+
22
+ user: TeamsChannelAccount = None
23
+ meeting: MeetingParticipantInfo = None
24
+ conversation: ConversationAccount = None
@@ -0,0 +1,14 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ from ..agents_model import AgentsModel
5
+
6
+
7
+ class TeamsMember(AgentsModel):
8
+ """Describes a member.
9
+
10
+ :param id: Unique identifier representing a member (user or channel).
11
+ :type id: str
12
+ """
13
+
14
+ id: str = None
@@ -0,0 +1,19 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ from ..agents_model import AgentsModel
5
+ from typing import List
6
+ from .teams_channel_account import TeamsChannelAccount
7
+
8
+
9
+ class TeamsPagedMembersResult(AgentsModel):
10
+ """Page of members for Teams.
11
+
12
+ :param continuation_token: Paging token
13
+ :type continuation_token: str
14
+ :param members: The Teams Channel Accounts.
15
+ :type members: list[TeamsChannelAccount]
16
+ """
17
+
18
+ continuation_token: str = None
19
+ members: List[TeamsChannelAccount] = None
@@ -0,0 +1,14 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ from ..agents_model import AgentsModel
5
+
6
+
7
+ class TenantInfo(AgentsModel):
8
+ """Describes a tenant.
9
+
10
+ :param id: Unique identifier representing a tenant
11
+ :type id: str
12
+ """
13
+
14
+ id: str = None
@@ -0,0 +1,17 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ from ..agents_model import AgentsModel
5
+
6
+
7
+ class UserMeetingDetails(AgentsModel):
8
+ """Specific details of a user in a Teams meeting.
9
+
10
+ :param role: Role of the participant in the current meeting.
11
+ :type role: str
12
+ :param in_meeting: True, if the participant is in the meeting.
13
+ :type in_meeting: bool
14
+ """
15
+
16
+ role: str = None
17
+ in_meeting: bool = None
@@ -0,0 +1,10 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ from enum import Enum
5
+
6
+
7
+ class TextFormatTypes(str, Enum):
8
+ markdown = "markdown"
9
+ plain = "plain"
10
+ xml = "xml"
@@ -0,0 +1,19 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ from .agents_model import AgentsModel
5
+ from ._type_aliases import NonEmptyString
6
+
7
+
8
+ class TextHighlight(AgentsModel):
9
+ """Refers to a substring of content within another field.
10
+
11
+ :param text: Defines the snippet of text to highlight
12
+ :type text: str
13
+ :param occurrence: Occurrence of the text field within the referenced
14
+ text, if multiple exist.
15
+ :type occurrence: int
16
+ """
17
+
18
+ text: str
19
+ occurrence: int
@@ -0,0 +1,33 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ from .card_image import CardImage
5
+ from .card_action import CardAction
6
+ from .agents_model import AgentsModel
7
+ from ._type_aliases import NonEmptyString
8
+
9
+
10
+ class ThumbnailCard(AgentsModel):
11
+ """A thumbnail card (card with a single, small thumbnail image).
12
+
13
+ :param title: Title of the card
14
+ :type title: str
15
+ :param subtitle: Subtitle of the card
16
+ :type subtitle: str
17
+ :param text: Text for the card
18
+ :type text: str
19
+ :param images: Array of images for the card
20
+ :type images: list[~microsoft_agents.activity.CardImage]
21
+ :param buttons: Set of actions applicable to the current card
22
+ :type buttons: list[~microsoft_agents.activity.CardAction]
23
+ :param tap: This action will be activated when user taps on the card
24
+ itself
25
+ :type tap: ~microsoft_agents.activity.CardAction
26
+ """
27
+
28
+ title: NonEmptyString = None
29
+ subtitle: NonEmptyString = None
30
+ text: str = None
31
+ images: list[CardImage] = None
32
+ buttons: list[CardAction] = None
33
+ tap: CardAction = None
@@ -0,0 +1,18 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ from .agents_model import AgentsModel
5
+ from ._type_aliases import NonEmptyString
6
+
7
+
8
+ class ThumbnailUrl(AgentsModel):
9
+ """Thumbnail URL.
10
+
11
+ :param url: URL pointing to the thumbnail to use for media content
12
+ :type url: str
13
+ :param alt: HTML alt text to include on this thumbnail image
14
+ :type alt: str
15
+ """
16
+
17
+ url: NonEmptyString = None
18
+ alt: NonEmptyString = None
@@ -0,0 +1,24 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ from .agents_model import AgentsModel
5
+ from ._type_aliases import NonEmptyString
6
+
7
+
8
+ class TokenExchangeInvokeRequest(AgentsModel):
9
+ """TokenExchangeInvokeRequest.
10
+
11
+ :param id: The id from the OAuthCard.
12
+ :type id: str
13
+ :param connection_name: The connection name.
14
+ :type connection_name: str
15
+ :param token: The user token that can be exchanged.
16
+ :type token: str
17
+ :param properties: Extension data for overflow of properties.
18
+ :type properties: dict[str, object]
19
+ """
20
+
21
+ id: NonEmptyString = None
22
+ connection_name: NonEmptyString = None
23
+ token: NonEmptyString = None
24
+ properties: dict = None
@@ -0,0 +1,24 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ from .agents_model import AgentsModel
5
+ from ._type_aliases import NonEmptyString
6
+
7
+
8
+ class TokenExchangeInvokeResponse(AgentsModel):
9
+ """TokenExchangeInvokeResponse.
10
+
11
+ :param id: The id from the OAuthCard.
12
+ :type id: str
13
+ :param connection_name: The connection name.
14
+ :type connection_name: str
15
+ :param failure_detail: The details of why the token exchange failed.
16
+ :type failure_detail: str
17
+ :param properties: Extension data for overflow of properties.
18
+ :type properties: dict[str, object]
19
+ """
20
+
21
+ id: NonEmptyString = None
22
+ connection_name: NonEmptyString = None
23
+ failure_detail: NonEmptyString = None
24
+ properties: dict = None
@@ -0,0 +1,16 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ from .agents_model import AgentsModel
5
+
6
+ from ._type_aliases import NonEmptyString
7
+
8
+
9
+ class TokenExchangeResource(AgentsModel):
10
+ """
11
+ A type containing information for token exchange.
12
+ """
13
+
14
+ id: NonEmptyString = None
15
+ uri: NonEmptyString = None
16
+ provider_id: NonEmptyString = None
@@ -0,0 +1,41 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ import base64
5
+ import json
6
+ from typing import Optional
7
+ from pydantic import Field
8
+
9
+ from .conversation_reference import ConversationReference
10
+ from .agents_model import AgentsModel
11
+ from ._type_aliases import NonEmptyString
12
+
13
+
14
+ class TokenExchangeState(AgentsModel):
15
+ """TokenExchangeState
16
+
17
+ :param connection_name: The connection name that was used.
18
+ :type connection_name: str
19
+ :param conversation: Gets or sets a reference to the conversation.
20
+ :type conversation: ~microsoft_agents.activity.ConversationReference
21
+ :param relates_to: Gets or sets a reference to a related parent conversation for this token exchange.
22
+ :type relates_to: ~microsoft_agents.activity.ConversationReference
23
+ :param agent_url: The URL of the agent messaging endpoint.
24
+ :type agent_url: str
25
+ :param ms_app_id: The agent's registered application ID.
26
+ :type ms_app_id: str
27
+ """
28
+
29
+ connection_name: NonEmptyString = None
30
+ conversation: ConversationReference = None
31
+ relates_to: Optional[ConversationReference] = None
32
+ agent_url: NonEmptyString = Field(None, alias="bot_url")
33
+ ms_app_id: NonEmptyString = None
34
+
35
+ def get_encoded_state(self) -> str:
36
+ """Returns the encoded state for the token exchange."""
37
+ return base64.b64encode(
38
+ json.dumps(
39
+ self.model_dump(by_alias=True, exclude_none=True, exclude_unset=True)
40
+ ).encode(encoding="UTF-8", errors="strict")
41
+ ).decode()
@@ -0,0 +1,21 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ from .agents_model import AgentsModel
5
+ from .token_response import TokenResponse
6
+ from .sign_in_resource import SignInResource
7
+
8
+
9
+ class TokenOrSignInResourceResponse(AgentsModel):
10
+ """Represents the response containing either a token or a sign-in resource.
11
+
12
+ One of the two properties should be set (if returned from the 'getTokenOrSignInResource' endpoint), not both.
13
+
14
+ :param token_response: The token response.
15
+ :type token_response: TokenResponse
16
+ :param sign_in_resource: The sign-in resource.
17
+ :type sign_in_resource: SignInResource
18
+ """
19
+
20
+ token_response: TokenResponse = None
21
+ sign_in_resource: SignInResource = None
@@ -0,0 +1,14 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ from .agents_model import AgentsModel
5
+
6
+ from ._type_aliases import NonEmptyString
7
+
8
+
9
+ class TokenPostResource(AgentsModel):
10
+ """
11
+ A type containing information for token posting.
12
+ """
13
+
14
+ sas_url: NonEmptyString = None
@@ -0,0 +1,19 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ from .agents_model import AgentsModel
5
+ from ._type_aliases import NonEmptyString
6
+
7
+
8
+ class TokenRequest(AgentsModel):
9
+ """A request to receive a user token.
10
+
11
+ :param provider: The provider to request a user token from
12
+ :type provider: str
13
+ :param settings: A collection of settings for the specific provider for
14
+ this request
15
+ :type settings: dict[str, object]
16
+ """
17
+
18
+ provider: NonEmptyString = None
19
+ settings: dict = None
@@ -0,0 +1,46 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ import jwt
5
+
6
+ from .agents_model import AgentsModel
7
+ from ._type_aliases import NonEmptyString
8
+
9
+
10
+ class TokenResponse(AgentsModel):
11
+ """A response that includes a user token.
12
+
13
+ :param connection_name: The connection name
14
+ :type connection_name: str
15
+ :param token: The user token
16
+ :type token: str
17
+ :param expiration: Expiration for the token, in ISO 8601 format (e.g.
18
+ "2007-04-05T14:30Z")
19
+ :type expiration: str
20
+ :param channel_id: The channelId of the TokenResponse
21
+ :type channel_id: str
22
+ """
23
+
24
+ connection_name: NonEmptyString = None
25
+ token: NonEmptyString = None
26
+ expiration: NonEmptyString = None
27
+ channel_id: NonEmptyString = None
28
+
29
+ def __bool__(self):
30
+ return bool(self.token)
31
+
32
+ def is_exchangeable(self) -> bool:
33
+ """
34
+ Checks if a token is exchangeable (has api:// audience).
35
+
36
+ :param token: The token to check.
37
+ :type token: str
38
+ :return: True if the token is exchangeable, False otherwise.
39
+ """
40
+ try:
41
+ # Decode without verification to check the audience
42
+ payload = jwt.decode(self.token, options={"verify_signature": False})
43
+ aud = payload.get("aud")
44
+ return isinstance(aud, str) and aud.startswith("api://")
45
+ except Exception:
46
+ return False
@@ -0,0 +1,32 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ """Models for token status operations."""
5
+
6
+ from typing import Optional
7
+ from pydantic import Field
8
+
9
+ from .agents_model import AgentsModel
10
+ from ._type_aliases import NonEmptyString
11
+
12
+
13
+ class TokenStatus(AgentsModel):
14
+ """
15
+ The status of a user token.
16
+
17
+ :param channel_id: The channelId of the token status pertains to.
18
+ :type channel_id: str
19
+ :param connection_name: The name of the connection the token status pertains to.
20
+ :type connection_name: str
21
+ :param has_token: True if a token is stored for this ConnectionName.
22
+ :type has_token: bool
23
+ :param service_provider_display_name: The display name of the service provider for which this Token belongs to.
24
+ :type service_provider_display_name: str
25
+ """
26
+
27
+ channel_id: Optional[NonEmptyString] = Field(None, alias="channelId")
28
+ connection_name: Optional[NonEmptyString] = Field(None, alias="connectionName")
29
+ has_token: Optional[bool] = Field(None, alias="hasToken")
30
+ service_provider_display_name: Optional[NonEmptyString] = Field(
31
+ None, alias="serviceProviderDisplayName"
32
+ )
@@ -0,0 +1,16 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ from .activity import Activity
5
+ from .agents_model import AgentsModel
6
+
7
+
8
+ class Transcript(AgentsModel):
9
+ """Transcript.
10
+
11
+ :param activities: A collection of Activities that conforms to the
12
+ Transcript schema.
13
+ :type activities: list[~microsoft_agents.activity.Activity]
14
+ """
15
+
16
+ activities: list[Activity] = None
@@ -0,0 +1,68 @@
1
+ # Copyright (c) Microsoft Corporation. All rights reserved.
2
+ # Licensed under the MIT License.
3
+
4
+ from __future__ import annotations
5
+
6
+ from typing import Protocol, List, Callable, Optional, Generic, TypeVar
7
+ from abc import abstractmethod
8
+
9
+ from microsoft_agents.activity import (
10
+ Activity,
11
+ ResourceResponse,
12
+ ConversationReference,
13
+ )
14
+
15
+ # TODO: refactor circular dependency
16
+ # from .channel_adapter_protocol import ChannelAdapterProtocol
17
+
18
+ T = TypeVar("T", bound=Activity)
19
+
20
+
21
+ class TurnContextProtocol(Protocol, Generic[T]):
22
+ adapter: "ChannelAdapterProtocol"
23
+ activity: Activity | T
24
+ responded: bool
25
+ turn_state: dict
26
+
27
+ @abstractmethod
28
+ async def send_activity(
29
+ self,
30
+ activity_or_text: Activity | str,
31
+ speak: Optional[str] = None,
32
+ input_hint: Optional[str] = None,
33
+ ) -> Optional[ResourceResponse]:
34
+ pass
35
+
36
+ @abstractmethod
37
+ async def send_activities(
38
+ self, activities: List[Activity]
39
+ ) -> List[ResourceResponse]:
40
+ pass
41
+
42
+ @abstractmethod
43
+ async def update_activity(self, activity: Activity) -> Optional[ResourceResponse]:
44
+ pass
45
+
46
+ @abstractmethod
47
+ async def delete_activity(
48
+ self, id_or_reference: str | ConversationReference
49
+ ) -> None:
50
+ pass
51
+
52
+ @abstractmethod
53
+ def on_send_activities(self, handler: Callable) -> "TurnContextProtocol":
54
+ pass
55
+
56
+ @abstractmethod
57
+ def on_update_activity(self, handler: Callable) -> "TurnContextProtocol":
58
+ pass
59
+
60
+ @abstractmethod
61
+ def on_delete_activity(self, handler: Callable) -> "TurnContextProtocol":
62
+ pass
63
+
64
+ @abstractmethod
65
+ async def send_trace_activity(
66
+ self, name: str, value: object = None, value_type: str = None, label: str = None
67
+ ) -> ResourceResponse:
68
+ pass