@microsoft/agents-activity 0.2.14 → 0.4.1

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 (69) hide show
  1. package/dist/src/action/actionTypes.d.ts +33 -0
  2. package/dist/src/action/actionTypes.js +33 -0
  3. package/dist/src/action/actionTypes.js.map +1 -1
  4. package/dist/src/action/semanticActionStateTypes.d.ts +9 -0
  5. package/dist/src/action/semanticActionStateTypes.js +9 -0
  6. package/dist/src/action/semanticActionStateTypes.js.map +1 -1
  7. package/dist/src/activity.d.ts +166 -17
  8. package/dist/src/activity.js +90 -11
  9. package/dist/src/activity.js.map +1 -1
  10. package/dist/src/activityEventNames.d.ts +6 -0
  11. package/dist/src/activityEventNames.js +6 -0
  12. package/dist/src/activityEventNames.js.map +1 -1
  13. package/dist/src/activityImportance.d.ts +9 -0
  14. package/dist/src/activityImportance.js +9 -0
  15. package/dist/src/activityImportance.js.map +1 -1
  16. package/dist/src/activityTypes.d.ts +57 -0
  17. package/dist/src/activityTypes.js +57 -0
  18. package/dist/src/activityTypes.js.map +1 -1
  19. package/dist/src/attachment/attachment.d.ts +17 -2
  20. package/dist/src/attachment/attachment.js.map +1 -1
  21. package/dist/src/attachment/attachmentLayoutTypes.d.ts +6 -0
  22. package/dist/src/attachment/attachmentLayoutTypes.js +6 -0
  23. package/dist/src/attachment/attachmentLayoutTypes.js.map +1 -1
  24. package/dist/src/conversation/channelAccount.d.ts +15 -0
  25. package/dist/src/conversation/channelAccount.js.map +1 -1
  26. package/dist/src/conversation/channels.d.ts +57 -0
  27. package/dist/src/conversation/channels.js +57 -0
  28. package/dist/src/conversation/channels.js.map +1 -1
  29. package/dist/src/conversation/conversationAccount.d.ts +24 -0
  30. package/dist/src/conversation/conversationAccount.js.map +1 -1
  31. package/dist/src/conversation/conversationReference.d.ts +21 -0
  32. package/dist/src/conversation/conversationReference.js.map +1 -1
  33. package/dist/src/conversation/endOfConversationCodes.d.ts +18 -0
  34. package/dist/src/conversation/endOfConversationCodes.js +18 -0
  35. package/dist/src/conversation/endOfConversationCodes.js.map +1 -1
  36. package/dist/src/conversation/roleTypes.d.ts +9 -0
  37. package/dist/src/conversation/roleTypes.js +9 -0
  38. package/dist/src/conversation/roleTypes.js.map +1 -1
  39. package/dist/src/deliveryModes.d.ts +12 -0
  40. package/dist/src/deliveryModes.js +12 -0
  41. package/dist/src/deliveryModes.js.map +1 -1
  42. package/dist/src/inputHints.d.ts +9 -0
  43. package/dist/src/inputHints.js +9 -0
  44. package/dist/src/inputHints.js.map +1 -1
  45. package/dist/src/messageReactionTypes.d.ts +6 -0
  46. package/dist/src/messageReactionTypes.js +6 -0
  47. package/dist/src/messageReactionTypes.js.map +1 -1
  48. package/dist/src/textFormatTypes.d.ts +9 -0
  49. package/dist/src/textFormatTypes.js +9 -0
  50. package/dist/src/textFormatTypes.js.map +1 -1
  51. package/package.json +2 -2
  52. package/src/action/actionTypes.ts +43 -0
  53. package/src/action/semanticActionStateTypes.ts +11 -0
  54. package/src/activity.ts +285 -11
  55. package/src/activityEventNames.ts +7 -0
  56. package/src/activityImportance.ts +11 -0
  57. package/src/activityTypes.ts +75 -0
  58. package/src/attachment/attachment.ts +19 -0
  59. package/src/attachment/attachmentLayoutTypes.ts +7 -0
  60. package/src/conversation/channelAccount.ts +19 -0
  61. package/src/conversation/channels.ts +75 -0
  62. package/src/conversation/conversationAccount.ts +31 -0
  63. package/src/conversation/conversationReference.ts +27 -0
  64. package/src/conversation/endOfConversationCodes.ts +23 -0
  65. package/src/conversation/roleTypes.ts +11 -0
  66. package/src/deliveryModes.ts +15 -0
  67. package/src/inputHints.ts +11 -0
  68. package/src/messageReactionTypes.ts +7 -0
  69. package/src/textFormatTypes.ts +11 -0
@@ -9,7 +9,14 @@ import { z } from 'zod'
9
9
  * Enum representing activity event names.
10
10
  */
11
11
  export enum ActivityEventNames {
12
+ /**
13
+ * Event name for continuing a conversation.
14
+ */
12
15
  ContinueConversation = 'ContinueConversation',
16
+
17
+ /**
18
+ * Event name for creating a new conversation.
19
+ */
13
20
  CreateConversation = 'CreateConversation',
14
21
  }
15
22
 
@@ -9,8 +9,19 @@ import { z } from 'zod'
9
9
  * Enum representing activity importance levels.
10
10
  */
11
11
  export enum ActivityImportance {
12
+ /**
13
+ * Indicates low importance.
14
+ */
12
15
  Low = 'low',
16
+
17
+ /**
18
+ * Indicates normal importance.
19
+ */
13
20
  Normal = 'normal',
21
+
22
+ /**
23
+ * Indicates high importance.
24
+ */
14
25
  High = 'high',
15
26
  }
16
27
 
@@ -9,24 +9,99 @@ import { z } from 'zod'
9
9
  * Enum representing activity types.
10
10
  */
11
11
  export enum ActivityTypes {
12
+ /**
13
+ * A message activity.
14
+ */
12
15
  Message = 'message',
16
+
17
+ /**
18
+ * An update to a contact relationship.
19
+ */
13
20
  ContactRelationUpdate = 'contactRelationUpdate',
21
+
22
+ /**
23
+ * An update to a conversation.
24
+ */
14
25
  ConversationUpdate = 'conversationUpdate',
26
+
27
+ /**
28
+ * A typing indicator activity.
29
+ */
15
30
  Typing = 'typing',
31
+
32
+ /**
33
+ * Indicates the end of a conversation.
34
+ */
16
35
  EndOfConversation = 'endOfConversation',
36
+
37
+ /**
38
+ * An event activity.
39
+ */
17
40
  Event = 'event',
41
+
42
+ /**
43
+ * An invoke activity.
44
+ */
18
45
  Invoke = 'invoke',
46
+
47
+ /**
48
+ * A response to an invoke activity.
49
+ */
19
50
  InvokeResponse = 'invokeResponse',
51
+
52
+ /**
53
+ * An activity to delete user data.
54
+ */
20
55
  DeleteUserData = 'deleteUserData',
56
+
57
+ /**
58
+ * An update to a message.
59
+ */
21
60
  MessageUpdate = 'messageUpdate',
61
+
62
+ /**
63
+ * A deletion of a message.
64
+ */
22
65
  MessageDelete = 'messageDelete',
66
+
67
+ /**
68
+ * An update to an installation.
69
+ */
23
70
  InstallationUpdate = 'installationUpdate',
71
+
72
+ /**
73
+ * A reaction to a message.
74
+ */
24
75
  MessageReaction = 'messageReaction',
76
+
77
+ /**
78
+ * A suggestion activity.
79
+ */
25
80
  Suggestion = 'suggestion',
81
+
82
+ /**
83
+ * A trace activity for debugging.
84
+ */
26
85
  Trace = 'trace',
86
+
87
+ /**
88
+ * A handoff activity to another bot or human.
89
+ */
27
90
  Handoff = 'handoff',
91
+
92
+ /**
93
+ * A command activity.
94
+ */
28
95
  Command = 'command',
96
+
97
+ /**
98
+ * A result of a command activity.
99
+ */
29
100
  CommandResult = 'commandResult',
101
+
102
+ /**
103
+ * A delay activity.
104
+ */
30
105
  Delay = 'delay'
31
106
  }
32
107
 
@@ -9,10 +9,29 @@ import { z } from 'zod'
9
9
  * Interface representing an attachment.
10
10
  */
11
11
  export interface Attachment {
12
+ /**
13
+ * The MIME type of the attachment content.
14
+ */
12
15
  contentType: string
16
+
17
+ /**
18
+ * The URL of the attachment content.
19
+ */
13
20
  contentUrl?: string
21
+
22
+ /**
23
+ * The content of the attachment.
24
+ */
14
25
  content?: unknown
26
+
27
+ /**
28
+ * The name of the attachment.
29
+ */
15
30
  name?: string
31
+
32
+ /**
33
+ * The URL of the thumbnail for the attachment.
34
+ */
16
35
  thumbnailUrl?: string
17
36
  }
18
37
 
@@ -9,7 +9,14 @@ import { z } from 'zod'
9
9
  * Enum representing the layout types for attachments.
10
10
  */
11
11
  export enum AttachmentLayoutTypes {
12
+ /**
13
+ * Displays attachments in a list format.
14
+ */
12
15
  List = 'list',
16
+
17
+ /**
18
+ * Displays attachments in a carousel format.
19
+ */
13
20
  Carousel = 'carousel',
14
21
  }
15
22
 
@@ -10,10 +10,29 @@ import { roleTypeZodSchema, RoleTypes } from './roleTypes'
10
10
  * Interface representing a channel account.
11
11
  */
12
12
  export interface ChannelAccount {
13
+ /**
14
+ * The unique identifier of the channel account.
15
+ */
13
16
  id?: string
17
+
18
+ /**
19
+ * The name of the channel account.
20
+ */
14
21
  name?: string
22
+
23
+ /**
24
+ * The Azure Active Directory object ID of the channel account.
25
+ */
15
26
  aadObjectId?: string
27
+
28
+ /**
29
+ * The role of the channel account.
30
+ */
16
31
  role?: RoleTypes | string
32
+
33
+ /**
34
+ * Additional properties of the channel account.
35
+ */
17
36
  properties?: unknown
18
37
  }
19
38
 
@@ -7,23 +7,98 @@
7
7
  * Enum representing the different channels an agent can communicate through.
8
8
  */
9
9
  export enum Channels {
10
+ /**
11
+ * Represents the Alexa channel.
12
+ */
10
13
  Alexa = 'alexa',
14
+
15
+ /**
16
+ * Represents the Console channel.
17
+ */
11
18
  Console = 'console',
19
+
20
+ /**
21
+ * Represents the Directline channel.
22
+ */
12
23
  Directline = 'directline',
24
+
25
+ /**
26
+ * Represents the Directline Speech channel.
27
+ */
13
28
  DirectlineSpeech = 'directlinespeech',
29
+
30
+ /**
31
+ * Represents the Email channel.
32
+ */
14
33
  Email = 'email',
34
+
35
+ /**
36
+ * Represents the Emulator channel.
37
+ */
15
38
  Emulator = 'emulator',
39
+
40
+ /**
41
+ * Represents the Facebook channel.
42
+ */
16
43
  Facebook = 'facebook',
44
+
45
+ /**
46
+ * Represents the GroupMe channel.
47
+ */
17
48
  Groupme = 'groupme',
49
+
50
+ /**
51
+ * Represents the Line channel.
52
+ */
18
53
  Line = 'line',
54
+
55
+ /**
56
+ * Represents the Microsoft Teams channel.
57
+ */
19
58
  Msteams = 'msteams',
59
+
60
+ /**
61
+ * Represents the Omnichannel.
62
+ */
20
63
  Omni = 'omnichannel',
64
+
65
+ /**
66
+ * Represents the Outlook channel.
67
+ */
21
68
  Outlook = 'outlook',
69
+
70
+ /**
71
+ * Represents the Skype channel.
72
+ */
22
73
  Skype = 'skype',
74
+
75
+ /**
76
+ * Represents the Slack channel.
77
+ */
23
78
  Slack = 'slack',
79
+
80
+ /**
81
+ * Represents the SMS channel.
82
+ */
24
83
  Sms = 'sms',
84
+
85
+ /**
86
+ * Represents the Telegram channel.
87
+ */
25
88
  Telegram = 'telegram',
89
+
90
+ /**
91
+ * Represents the Telephony channel.
92
+ */
26
93
  Telephony = 'telephony',
94
+
95
+ /**
96
+ * Represents the Test channel.
97
+ */
27
98
  Test = 'test',
99
+
100
+ /**
101
+ * Represents the Webchat channel.
102
+ */
28
103
  Webchat = 'webchat',
29
104
  }
@@ -10,13 +10,44 @@ import { roleTypeZodSchema, RoleTypes } from './roleTypes'
10
10
  * Interface representing a conversation account.
11
11
  */
12
12
  export interface ConversationAccount {
13
+ /**
14
+ * The unique identifier of the conversation account.
15
+ */
13
16
  id: string
17
+
18
+ /**
19
+ * The type of the conversation (e.g., personal, group, etc.).
20
+ */
14
21
  conversationType?: string
22
+
23
+ /**
24
+ * The tenant ID associated with the conversation account.
25
+ */
15
26
  tenantId?: string
27
+
28
+ /**
29
+ * Indicates whether the conversation is a group.
30
+ */
16
31
  isGroup?: boolean
32
+
33
+ /**
34
+ * The name of the conversation account.
35
+ */
17
36
  name?: string
37
+
38
+ /**
39
+ * The Azure Active Directory object ID of the conversation account.
40
+ */
18
41
  aadObjectId?: string
42
+
43
+ /**
44
+ * The role of the conversation account.
45
+ */
19
46
  role?: RoleTypes | string
47
+
48
+ /**
49
+ * Additional properties of the conversation account.
50
+ */
20
51
  properties?: unknown
21
52
  }
22
53
 
@@ -11,12 +11,39 @@ import { ConversationAccount, conversationAccountZodSchema } from './conversatio
11
11
  * Interface representing a reference to a conversation.
12
12
  */
13
13
  export interface ConversationReference {
14
+ /**
15
+ * The ID of the activity. Optional.
16
+ */
14
17
  activityId?: string
18
+
19
+ /**
20
+ * The user involved in the conversation. Optional.
21
+ */
15
22
  user?: ChannelAccount
23
+
24
+ /**
25
+ * The locale of the conversation. Optional.
26
+ */
16
27
  locale?: string
28
+
29
+ /**
30
+ * The agent involved in the conversation. Can be undefined or null. Optional.
31
+ */
17
32
  agent?: ChannelAccount | undefined | null
33
+
34
+ /**
35
+ * The conversation account details.
36
+ */
18
37
  conversation: ConversationAccount
38
+
39
+ /**
40
+ * The ID of the channel where the conversation is taking place.
41
+ */
19
42
  channelId: string
43
+
44
+ /**
45
+ * The service URL for the conversation. Optional.
46
+ */
20
47
  serviceUrl?: string | undefined
21
48
  }
22
49
 
@@ -9,11 +9,34 @@ import { z } from 'zod'
9
9
  * Enum representing the different end of conversation codes.
10
10
  */
11
11
  export enum EndOfConversationCodes {
12
+ /**
13
+ * The end of conversation reason is unknown.
14
+ */
12
15
  Unknown = 'unknown',
16
+
17
+ /**
18
+ * The conversation completed successfully.
19
+ */
13
20
  CompletedSuccessfully = 'completedSuccessfully',
21
+
22
+ /**
23
+ * The user cancelled the conversation.
24
+ */
14
25
  UserCancelled = 'userCancelled',
26
+
27
+ /**
28
+ * The agent timed out during the conversation.
29
+ */
15
30
  AgentTimedOut = 'agentTimedOut',
31
+
32
+ /**
33
+ * The agent issued an invalid message.
34
+ */
16
35
  AgentIssuedInvalidMessage = 'agentIssuedInvalidMessage',
36
+
37
+ /**
38
+ * The channel failed during the conversation.
39
+ */
17
40
  ChannelFailed = 'channelFailed',
18
41
  }
19
42
 
@@ -9,8 +9,19 @@ import { z } from 'zod'
9
9
  * Enum representing the different role types in a conversation.
10
10
  */
11
11
  export enum RoleTypes {
12
+ /**
13
+ * Represents a user in the conversation.
14
+ */
12
15
  User = 'user',
16
+
17
+ /**
18
+ * Represents an agent or bot in the conversation.
19
+ */
13
20
  Agent = 'bot',
21
+
22
+ /**
23
+ * Represents a skill in the conversation.
24
+ */
14
25
  Skill = 'skill',
15
26
  }
16
27
 
@@ -9,9 +9,24 @@ import { z } from 'zod'
9
9
  * Enum representing delivery modes.
10
10
  */
11
11
  export enum DeliveryModes {
12
+ /**
13
+ * Represents the normal delivery mode.
14
+ */
12
15
  Normal = 'normal',
16
+
17
+ /**
18
+ * Represents a notification delivery mode.
19
+ */
13
20
  Notification = 'notification',
21
+
22
+ /**
23
+ * Represents a delivery mode where replies are expected.
24
+ */
14
25
  ExpectReplies = 'expectReplies',
26
+
27
+ /**
28
+ * Represents an ephemeral delivery mode.
29
+ */
15
30
  Ephemeral = 'ephemeral',
16
31
  }
17
32
 
package/src/inputHints.ts CHANGED
@@ -9,8 +9,19 @@ import { z } from 'zod'
9
9
  * Enum representing input hints.
10
10
  */
11
11
  export enum InputHints {
12
+ /**
13
+ * Indicates that the bot is ready to accept input from the user.
14
+ */
12
15
  AcceptingInput = 'acceptingInput',
16
+
17
+ /**
18
+ * Indicates that the bot is ignoring input from the user.
19
+ */
13
20
  IgnoringInput = 'ignoringInput',
21
+
22
+ /**
23
+ * Indicates that the bot is expecting input from the user.
24
+ */
14
25
  ExpectingInput = 'expectingInput',
15
26
  }
16
27
 
@@ -9,7 +9,14 @@ import { z } from 'zod'
9
9
  * Enum representing message reaction types.
10
10
  */
11
11
  export enum MessageReactionTypes {
12
+ /**
13
+ * Represents a 'like' reaction to a message.
14
+ */
12
15
  Like = 'like',
16
+
17
+ /**
18
+ * Represents a '+1' reaction to a message.
19
+ */
13
20
  PlusOne = 'plusOne',
14
21
  }
15
22
 
@@ -9,8 +9,19 @@ import { z } from 'zod'
9
9
  * Enum representing text format types.
10
10
  */
11
11
  export enum TextFormatTypes {
12
+ /**
13
+ * Represents text formatted using Markdown.
14
+ */
12
15
  Markdown = 'markdown',
16
+
17
+ /**
18
+ * Represents plain text without any formatting.
19
+ */
13
20
  Plain = 'plain',
21
+
22
+ /**
23
+ * Represents text formatted using XML.
24
+ */
14
25
  Xml = 'xml',
15
26
  }
16
27