Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

Commit 6068d07

Browse files
Eric Dahlvangaxelsrz
authored andcommitted
callerId, SemanticActionStates, and other swagger file updates (#211)
1 parent 449b969 commit 6068d07

File tree

4 files changed

+2534
-2465
lines changed

4 files changed

+2534
-2465
lines changed

libraries/botbuilder-schema/botbuilder/schema/_connector_client_enums.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,9 @@ class InstallationUpdateActionTypes(str, Enum):
111111

112112
add = "add"
113113
remove = "remove"
114+
115+
class SemanticActionStates(str, Enum):
116+
117+
start_action = "start"
118+
continue_action = "continue"
119+
done_action = "done"

libraries/botbuilder-schema/botbuilder/schema/_models.py

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ class Activity(Model):
2929
:param timestamp: Contains the date and time that the message was sent, in
3030
UTC, expressed in ISO-8601 format.
3131
:type timestamp: datetime
32-
:param local_timestamp: Contains the date and time that the message was
33-
sent, in local time, expressed in ISO-8601 format.
32+
:param local_timestamp: Contains the local date and time of the message
33+
expressed in ISO-8601 format.
3434
For example, 2016-09-23T13:07:49.4714686-07:00.
3535
:type local_timestamp: datetime
36-
:param local_timezone: Contains the name of the timezone in which the
37-
message, in local time, expressed in IANA Time Zone database format.
36+
:param local_timezone: Contains the name of the local timezone of the message,
37+
expressed in IANA Time Zone database format.
3838
For example, America/Los_Angeles.
3939
:type local_timezone: str
4040
:param service_url: Contains the URL that specifies the channel's service
@@ -144,6 +144,11 @@ class Activity(Model):
144144
:param semantic_action: An optional programmatic action accompanying this
145145
request
146146
:type semantic_action: ~botframework.connector.models.SemanticAction
147+
:param caller_id: A string containing an IRI identifying the caller of a
148+
bot. This field is not intended to be transmitted over the wire, but is
149+
instead populated by bots and clients based on cryptographically
150+
verifiable data that asserts the identity of the callers (e.g. tokens).
151+
:type caller_id: str
147152
"""
148153

149154
_attribute_map = {
@@ -188,6 +193,7 @@ class Activity(Model):
188193
'listen_for': {'key': 'listenFor', 'type': '[str]'},
189194
'text_highlights': {'key': 'textHighlights', 'type': '[TextHighlight]'},
190195
'semantic_action': {'key': 'semanticAction', 'type': 'SemanticAction'},
196+
'caller_id': {'key': 'callerId', 'type': 'str'},
191197
}
192198

193199
def __init__(self, **kwargs):
@@ -233,6 +239,7 @@ def __init__(self, **kwargs):
233239
self.listen_for = kwargs.get('listen_for', None)
234240
self.text_highlights = kwargs.get('text_highlights', None)
235241
self.semantic_action = kwargs.get('semantic_action', None)
242+
self.caller_id = kwargs.get('caller_id', None)
236243

237244

238245
class AnimationCard(Model):
@@ -388,9 +395,9 @@ def __init__(self, **kwargs):
388395
class AttachmentView(Model):
389396
"""Attachment View name and size.
390397
391-
:param view_id: Content type of the attachment
398+
:param view_id: Id of the attachment
392399
:type view_id: str
393-
:param size: Name of the attachment
400+
:param size: Size of the attachment
394401
:type size: int
395402
"""
396403

@@ -609,7 +616,7 @@ def __init__(self, **kwargs):
609616

610617

611618
class ConversationAccount(Model):
612-
"""Channel account information for a conversation.
619+
"""Conversation account represents the identity of the conversation within a channel.
613620
614621
:param is_group: Indicates whether the conversation contains more than two
615622
participants at the time the activity was generated
@@ -1790,17 +1797,21 @@ class SemanticAction(Model):
17901797
:type id: str
17911798
:param entities: Entities associated with this action
17921799
:type entities: dict[str, ~botframework.connector.models.Entity]
1800+
:param state: State of this action. Allowed values: `start`, `continue`, `done`
1801+
:type state: str or ~botframework.connector.models.SemanticActionStates
17931802
"""
17941803

17951804
_attribute_map = {
17961805
'id': {'key': 'id', 'type': 'str'},
17971806
'entities': {'key': 'entities', 'type': '{Entity}'},
1807+
'state': {'key': 'state', 'type': 'str'},
17981808
}
17991809

18001810
def __init__(self, **kwargs):
18011811
super(SemanticAction, self).__init__(**kwargs)
18021812
self.id = kwargs.get('id', None)
18031813
self.entities = kwargs.get('entities', None)
1814+
self.state = kwargs.get('state', None)
18041815

18051816

18061817
class SigninCard(Model):
@@ -1974,19 +1985,23 @@ class TokenResponse(Model):
19741985
:param expiration: Expiration for the token, in ISO 8601 format (e.g.
19751986
"2007-04-05T14:30Z")
19761987
:type expiration: str
1988+
:param channel_id: The channelId of the TokenResponse
1989+
:type channel_id: str
19771990
"""
19781991

19791992
_attribute_map = {
19801993
'connection_name': {'key': 'connectionName', 'type': 'str'},
19811994
'token': {'key': 'token', 'type': 'str'},
19821995
'expiration': {'key': 'expiration', 'type': 'str'},
1996+
'channel_id': {'key': 'channelId', 'type': 'str'},
19831997
}
19841998

19851999
def __init__(self, **kwargs):
19862000
super(TokenResponse, self).__init__(**kwargs)
19872001
self.connection_name = kwargs.get('connection_name', None)
19882002
self.token = kwargs.get('token', None)
19892003
self.expiration = kwargs.get('expiration', None)
2004+
self.channel_id = kwargs.get('channel_id', None)
19902005

19912006

19922007
class Transcript(Model):

libraries/botbuilder-schema/botbuilder/schema/_models_py3.py

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ class Activity(Model):
2929
:param timestamp: Contains the date and time that the message was sent, in
3030
UTC, expressed in ISO-8601 format.
3131
:type timestamp: datetime
32-
:param local_timestamp: Contains the date and time that the message was
33-
sent, in local time, expressed in ISO-8601 format.
32+
:param local_timestamp: Contains the local date and time of the message
33+
expressed in ISO-8601 format.
3434
For example, 2016-09-23T13:07:49.4714686-07:00.
3535
:type local_timestamp: datetime
36-
:param local_timezone: Contains the name of the timezone in which the
37-
message, in local time, expressed in IANA Time Zone database format.
36+
:param local_timezone: Contains the name of the local timezone of the message,
37+
expressed in IANA Time Zone database format.
3838
For example, America/Los_Angeles.
3939
:type local_timezone: str
4040
:param service_url: Contains the URL that specifies the channel's service
@@ -144,6 +144,11 @@ class Activity(Model):
144144
:param semantic_action: An optional programmatic action accompanying this
145145
request
146146
:type semantic_action: ~botframework.connector.models.SemanticAction
147+
:param caller_id: A string containing an IRI identifying the caller of a
148+
bot. This field is not intended to be transmitted over the wire, but is
149+
instead populated by bots and clients based on cryptographically
150+
verifiable data that asserts the identity of the callers (e.g. tokens).
151+
:type caller_id: str
147152
"""
148153

149154
_attribute_map = {
@@ -188,9 +193,10 @@ class Activity(Model):
188193
'listen_for': {'key': 'listenFor', 'type': '[str]'},
189194
'text_highlights': {'key': 'textHighlights', 'type': '[TextHighlight]'},
190195
'semantic_action': {'key': 'semanticAction', 'type': 'SemanticAction'},
196+
'caller_id': {'key': 'callerId', 'type': 'str'},
191197
}
192198

193-
def __init__(self, *, type=None, id: str=None, timestamp=None, local_timestamp=None, local_timezone: str=None, service_url: str=None, channel_id: str=None, from_property=None, conversation=None, recipient=None, text_format=None, attachment_layout=None, members_added=None, members_removed=None, reactions_added=None, reactions_removed=None, topic_name: str=None, history_disclosed: bool=None, locale: str=None, text: str=None, speak: str=None, input_hint=None, summary: str=None, suggested_actions=None, attachments=None, entities=None, channel_data=None, action: str=None, reply_to_id: str=None, label: str=None, value_type: str=None, value=None, name: str=None, relates_to=None, code=None, expiration=None, importance=None, delivery_mode=None, listen_for=None, text_highlights=None, semantic_action=None, **kwargs) -> None:
199+
def __init__(self, *, type=None, id: str=None, timestamp=None, local_timestamp=None, local_timezone: str=None, service_url: str=None, channel_id: str=None, from_property=None, conversation=None, recipient=None, text_format=None, attachment_layout=None, members_added=None, members_removed=None, reactions_added=None, reactions_removed=None, topic_name: str=None, history_disclosed: bool=None, locale: str=None, text: str=None, speak: str=None, input_hint=None, summary: str=None, suggested_actions=None, attachments=None, entities=None, channel_data=None, action: str=None, reply_to_id: str=None, label: str=None, value_type: str=None, value=None, name: str=None, relates_to=None, code=None, expiration=None, importance=None, delivery_mode=None, listen_for=None, text_highlights=None, semantic_action=None, caller_id: str=None, **kwargs) -> None:
194200
super(Activity, self).__init__(**kwargs)
195201
self.type = type
196202
self.id = id
@@ -233,7 +239,7 @@ def __init__(self, *, type=None, id: str=None, timestamp=None, local_timestamp=N
233239
self.listen_for = listen_for
234240
self.text_highlights = text_highlights
235241
self.semantic_action = semantic_action
236-
242+
self.caller_id = caller_id
237243

238244
class AnimationCard(Model):
239245
"""An animation card (Ex: gif or short video clip).
@@ -388,9 +394,9 @@ def __init__(self, *, name: str=None, type: str=None, views=None, **kwargs) -> N
388394
class AttachmentView(Model):
389395
"""Attachment View name and size.
390396
391-
:param view_id: Content type of the attachment
397+
:param view_id: Id of the attachment
392398
:type view_id: str
393-
:param size: Name of the attachment
399+
:param size: Size of the attachment
394400
:type size: int
395401
"""
396402

@@ -609,7 +615,7 @@ def __init__(self, *, id: str=None, name: str=None, aad_object_id: str=None, rol
609615

610616

611617
class ConversationAccount(Model):
612-
"""Channel account information for a conversation.
618+
"""Conversation account represents the identity of the conversation within a channel.
613619
614620
:param is_group: Indicates whether the conversation contains more than two
615621
participants at the time the activity was generated
@@ -1790,17 +1796,21 @@ class SemanticAction(Model):
17901796
:type id: str
17911797
:param entities: Entities associated with this action
17921798
:type entities: dict[str, ~botframework.connector.models.Entity]
1799+
:param state: State of this action. Allowed values: `start`, `continue`, `done`
1800+
:type state: str or ~botframework.connector.models.SemanticActionStates
17931801
"""
17941802

17951803
_attribute_map = {
17961804
'id': {'key': 'id', 'type': 'str'},
17971805
'entities': {'key': 'entities', 'type': '{Entity}'},
1806+
'state': {'key': 'state', 'type': 'str'},
17981807
}
17991808

1800-
def __init__(self, *, id: str=None, entities=None, **kwargs) -> None:
1809+
def __init__(self, *, id: str=None, entities=None, state=None, **kwargs) -> None:
18011810
super(SemanticAction, self).__init__(**kwargs)
18021811
self.id = id
18031812
self.entities = entities
1813+
self.state = state
18041814

18051815

18061816
class SigninCard(Model):
@@ -1974,19 +1984,23 @@ class TokenResponse(Model):
19741984
:param expiration: Expiration for the token, in ISO 8601 format (e.g.
19751985
"2007-04-05T14:30Z")
19761986
:type expiration: str
1987+
:param channel_id: The channelId of the TokenResponse
1988+
:type channel_id: str
19771989
"""
19781990

19791991
_attribute_map = {
19801992
'connection_name': {'key': 'connectionName', 'type': 'str'},
19811993
'token': {'key': 'token', 'type': 'str'},
19821994
'expiration': {'key': 'expiration', 'type': 'str'},
1995+
'channel_id': {'key': 'channelId', 'type': 'str'},
19831996
}
19841997

1985-
def __init__(self, *, connection_name: str=None, token: str=None, expiration: str=None, **kwargs) -> None:
1998+
def __init__(self, *, connection_name: str=None, token: str=None, expiration: str=None, channel_id: str=None, **kwargs) -> None:
19861999
super(TokenResponse, self).__init__(**kwargs)
19872000
self.connection_name = connection_name
19882001
self.token = token
19892002
self.expiration = expiration
2003+
self.channel_id = channel_id
19902004

19912005

19922006
class Transcript(Model):

0 commit comments

Comments
 (0)