@microsoft/agents-activity 0.1.49

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 (130) hide show
  1. package/README.md +22 -0
  2. package/dist/src/action/actionTypes.d.ts +25 -0
  3. package/dist/src/action/actionTypes.js +30 -0
  4. package/dist/src/action/actionTypes.js.map +1 -0
  5. package/dist/src/action/cardAction.d.ts +74 -0
  6. package/dist/src/action/cardAction.js +23 -0
  7. package/dist/src/action/cardAction.js.map +1 -0
  8. package/dist/src/action/semanticAction.d.ts +52 -0
  9. package/dist/src/action/semanticAction.js +19 -0
  10. package/dist/src/action/semanticAction.js.map +1 -0
  11. package/dist/src/action/semanticActionStateTypes.d.ts +17 -0
  12. package/dist/src/action/semanticActionStateTypes.js +22 -0
  13. package/dist/src/action/semanticActionStateTypes.js.map +1 -0
  14. package/dist/src/action/suggestedActions.d.ts +77 -0
  15. package/dist/src/action/suggestedActions.js +17 -0
  16. package/dist/src/action/suggestedActions.js.map +1 -0
  17. package/dist/src/activity.d.ts +811 -0
  18. package/dist/src/activity.js +264 -0
  19. package/dist/src/activity.js.map +1 -0
  20. package/dist/src/activityEventNames.d.ts +16 -0
  21. package/dist/src/activityEventNames.js +21 -0
  22. package/dist/src/activityEventNames.js.map +1 -0
  23. package/dist/src/activityImportance.d.ts +17 -0
  24. package/dist/src/activityImportance.js +22 -0
  25. package/dist/src/activityImportance.js.map +1 -0
  26. package/dist/src/activityTypes.d.ts +33 -0
  27. package/dist/src/activityTypes.js +58 -0
  28. package/dist/src/activityTypes.js.map +1 -0
  29. package/dist/src/attachment/attachment.d.ts +37 -0
  30. package/dist/src/attachment/attachment.js +19 -0
  31. package/dist/src/attachment/attachment.js.map +1 -0
  32. package/dist/src/attachment/attachmentLayoutTypes.d.ts +16 -0
  33. package/dist/src/attachment/attachmentLayoutTypes.js +21 -0
  34. package/dist/src/attachment/attachmentLayoutTypes.js.map +1 -0
  35. package/dist/src/callerIdConstants.d.ts +21 -0
  36. package/dist/src/callerIdConstants.js +25 -0
  37. package/dist/src/callerIdConstants.js.map +1 -0
  38. package/dist/src/conversation/channelAccount.d.ts +38 -0
  39. package/dist/src/conversation/channelAccount.js +20 -0
  40. package/dist/src/conversation/channelAccount.js.map +1 -0
  41. package/dist/src/conversation/channels.d.ts +28 -0
  42. package/dist/src/conversation/channels.js +33 -0
  43. package/dist/src/conversation/channels.js.map +1 -0
  44. package/dist/src/conversation/conversationAccount.d.ts +50 -0
  45. package/dist/src/conversation/conversationAccount.js +23 -0
  46. package/dist/src/conversation/conversationAccount.js.map +1 -0
  47. package/dist/src/conversation/conversationReference.d.ts +152 -0
  48. package/dist/src/conversation/conversationReference.js +23 -0
  49. package/dist/src/conversation/conversationReference.js.map +1 -0
  50. package/dist/src/conversation/endOfConversationCodes.d.ts +20 -0
  51. package/dist/src/conversation/endOfConversationCodes.js +25 -0
  52. package/dist/src/conversation/endOfConversationCodes.js.map +1 -0
  53. package/dist/src/conversation/roleTypes.d.ts +17 -0
  54. package/dist/src/conversation/roleTypes.js +22 -0
  55. package/dist/src/conversation/roleTypes.js.map +1 -0
  56. package/dist/src/deliveryModes.d.ts +18 -0
  57. package/dist/src/deliveryModes.js +23 -0
  58. package/dist/src/deliveryModes.js.map +1 -0
  59. package/dist/src/entity/entity.d.ts +28 -0
  60. package/dist/src/entity/entity.js +15 -0
  61. package/dist/src/entity/entity.js.map +1 -0
  62. package/dist/src/entity/geoCoordinates.d.ts +29 -0
  63. package/dist/src/entity/geoCoordinates.js +7 -0
  64. package/dist/src/entity/geoCoordinates.js.map +1 -0
  65. package/dist/src/entity/mention.d.ts +22 -0
  66. package/dist/src/entity/mention.js +7 -0
  67. package/dist/src/entity/mention.js.map +1 -0
  68. package/dist/src/entity/place.d.ts +29 -0
  69. package/dist/src/entity/place.js +7 -0
  70. package/dist/src/entity/place.js.map +1 -0
  71. package/dist/src/entity/thing.d.ts +17 -0
  72. package/dist/src/entity/thing.js +7 -0
  73. package/dist/src/entity/thing.js.map +1 -0
  74. package/dist/src/expectedReplies.d.ts +14 -0
  75. package/dist/src/expectedReplies.js +7 -0
  76. package/dist/src/expectedReplies.js.map +1 -0
  77. package/dist/src/index.d.ts +38 -0
  78. package/dist/src/index.js +57 -0
  79. package/dist/src/index.js.map +1 -0
  80. package/dist/src/inputHints.d.ts +17 -0
  81. package/dist/src/inputHints.js +22 -0
  82. package/dist/src/inputHints.js.map +1 -0
  83. package/dist/src/invoke/adaptiveCardInvokeAction.d.ts +45 -0
  84. package/dist/src/invoke/adaptiveCardInvokeAction.js +18 -0
  85. package/dist/src/invoke/adaptiveCardInvokeAction.js.map +1 -0
  86. package/dist/src/messageReaction.d.ts +25 -0
  87. package/dist/src/messageReaction.js +16 -0
  88. package/dist/src/messageReaction.js.map +1 -0
  89. package/dist/src/messageReactionTypes.d.ts +16 -0
  90. package/dist/src/messageReactionTypes.js +21 -0
  91. package/dist/src/messageReactionTypes.js.map +1 -0
  92. package/dist/src/textFormatTypes.d.ts +17 -0
  93. package/dist/src/textFormatTypes.js +22 -0
  94. package/dist/src/textFormatTypes.js.map +1 -0
  95. package/dist/src/textHighlight.d.ts +31 -0
  96. package/dist/src/textHighlight.js +16 -0
  97. package/dist/src/textHighlight.js.map +1 -0
  98. package/package.json +44 -0
  99. package/src/action/actionTypes.ts +28 -0
  100. package/src/action/cardAction.ts +59 -0
  101. package/src/action/semanticAction.ts +35 -0
  102. package/src/action/semanticActionStateTypes.ts +20 -0
  103. package/src/action/suggestedActions.ts +29 -0
  104. package/src/activity.ts +334 -0
  105. package/src/activityEventNames.ts +19 -0
  106. package/src/activityImportance.ts +20 -0
  107. package/src/activityTypes.ts +56 -0
  108. package/src/attachment/attachment.ts +28 -0
  109. package/src/attachment/attachmentLayoutTypes.ts +19 -0
  110. package/src/callerIdConstants.ts +22 -0
  111. package/src/conversation/channelAccount.ts +29 -0
  112. package/src/conversation/channels.ts +29 -0
  113. package/src/conversation/conversationAccount.ts +35 -0
  114. package/src/conversation/conversationReference.ts +34 -0
  115. package/src/conversation/endOfConversationCodes.ts +23 -0
  116. package/src/conversation/roleTypes.ts +20 -0
  117. package/src/deliveryModes.ts +21 -0
  118. package/src/entity/entity.ts +27 -0
  119. package/src/entity/geoCoordinates.ts +30 -0
  120. package/src/entity/mention.ts +24 -0
  121. package/src/entity/place.ts +30 -0
  122. package/src/entity/thing.ts +18 -0
  123. package/src/expectedReplies.ts +16 -0
  124. package/src/index.ts +44 -0
  125. package/src/inputHints.ts +20 -0
  126. package/src/invoke/adaptiveCardInvokeAction.ts +38 -0
  127. package/src/messageReaction.ts +24 -0
  128. package/src/messageReactionTypes.ts +19 -0
  129. package/src/textFormatTypes.ts +20 -0
  130. package/src/textHighlight.ts +28 -0
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ /**
6
+ * Represents a Place entity.
7
+ */
8
+ export interface Place {
9
+ /**
10
+ * The address of the place.
11
+ */
12
+ address: unknown;
13
+ /**
14
+ * The geographical coordinates of the place.
15
+ */
16
+ geo: unknown;
17
+ /**
18
+ * A map that shows the place.
19
+ */
20
+ hasMap: unknown;
21
+ /**
22
+ * The type of the place.
23
+ */
24
+ type: string;
25
+ /**
26
+ * The name of the place.
27
+ */
28
+ name: string;
29
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) Microsoft Corporation. All rights reserved.
4
+ * Licensed under the MIT License.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ //# sourceMappingURL=place.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"place.js","sourceRoot":"","sources":["../../../src/entity/place.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ /**
6
+ * Represents a Thing entity.
7
+ */
8
+ export interface Thing {
9
+ /**
10
+ * The type of the thing.
11
+ */
12
+ type: string;
13
+ /**
14
+ * The name of the thing.
15
+ */
16
+ name: string;
17
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) Microsoft Corporation. All rights reserved.
4
+ * Licensed under the MIT License.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ //# sourceMappingURL=thing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"thing.js","sourceRoot":"","sources":["../../../src/entity/thing.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ import { Activity } from './activity';
6
+ /**
7
+ * Represents expected replies in a conversation.
8
+ */
9
+ export interface ExpectedReplies {
10
+ /**
11
+ * List of activities representing the expected replies.
12
+ */
13
+ activities: Activity[];
14
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) Microsoft Corporation. All rights reserved.
4
+ * Licensed under the MIT License.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ //# sourceMappingURL=expectedReplies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expectedReplies.js","sourceRoot":"","sources":["../../src/expectedReplies.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ /**
6
+ * Export statements for various modules.
7
+ */
8
+ export { ActionTypes } from './action/actionTypes';
9
+ export { CardAction } from './action/cardAction';
10
+ export { SemanticAction } from './action/semanticAction';
11
+ export { SemanticActionStateTypes } from './action/semanticActionStateTypes';
12
+ export { SuggestedActions } from './action/suggestedActions';
13
+ export { Attachment } from './attachment/attachment';
14
+ export { AttachmentLayoutTypes } from './attachment/attachmentLayoutTypes';
15
+ export { ChannelAccount } from './conversation/channelAccount';
16
+ export { Channels } from './conversation/channels';
17
+ export { ConversationAccount } from './conversation/conversationAccount';
18
+ export { ConversationReference } from './conversation/conversationReference';
19
+ export { EndOfConversationCodes } from './conversation/endOfConversationCodes';
20
+ export { RoleTypes } from './conversation/roleTypes';
21
+ export { Entity } from './entity/entity';
22
+ export { Mention } from './entity/mention';
23
+ export { GeoCoordinates } from './entity/geoCoordinates';
24
+ export { Place } from './entity/place';
25
+ export { Thing } from './entity/thing';
26
+ export * from './invoke/adaptiveCardInvokeAction';
27
+ export { Activity, activityZodSchema } from './activity';
28
+ export { ActivityEventNames } from './activityEventNames';
29
+ export { ActivityImportance } from './activityImportance';
30
+ export { ActivityTypes } from './activityTypes';
31
+ export { CallerIdConstants } from './callerIdConstants';
32
+ export { DeliveryModes } from './deliveryModes';
33
+ export { ExpectedReplies } from './expectedReplies';
34
+ export { InputHints } from './inputHints';
35
+ export { MessageReaction } from './messageReaction';
36
+ export { MessageReactionTypes } from './messageReactionTypes';
37
+ export { TextFormatTypes } from './textFormatTypes';
38
+ export { TextHighlight } from './textHighlight';
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) Microsoft Corporation. All rights reserved.
4
+ * Licensed under the MIT License.
5
+ */
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
18
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
19
+ };
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.TextFormatTypes = exports.MessageReactionTypes = exports.InputHints = exports.DeliveryModes = exports.CallerIdConstants = exports.ActivityTypes = exports.ActivityImportance = exports.ActivityEventNames = exports.activityZodSchema = exports.Activity = exports.RoleTypes = exports.EndOfConversationCodes = exports.Channels = exports.AttachmentLayoutTypes = exports.SemanticActionStateTypes = exports.ActionTypes = void 0;
22
+ /**
23
+ * Export statements for various modules.
24
+ */
25
+ var actionTypes_1 = require("./action/actionTypes");
26
+ Object.defineProperty(exports, "ActionTypes", { enumerable: true, get: function () { return actionTypes_1.ActionTypes; } });
27
+ var semanticActionStateTypes_1 = require("./action/semanticActionStateTypes");
28
+ Object.defineProperty(exports, "SemanticActionStateTypes", { enumerable: true, get: function () { return semanticActionStateTypes_1.SemanticActionStateTypes; } });
29
+ var attachmentLayoutTypes_1 = require("./attachment/attachmentLayoutTypes");
30
+ Object.defineProperty(exports, "AttachmentLayoutTypes", { enumerable: true, get: function () { return attachmentLayoutTypes_1.AttachmentLayoutTypes; } });
31
+ var channels_1 = require("./conversation/channels");
32
+ Object.defineProperty(exports, "Channels", { enumerable: true, get: function () { return channels_1.Channels; } });
33
+ var endOfConversationCodes_1 = require("./conversation/endOfConversationCodes");
34
+ Object.defineProperty(exports, "EndOfConversationCodes", { enumerable: true, get: function () { return endOfConversationCodes_1.EndOfConversationCodes; } });
35
+ var roleTypes_1 = require("./conversation/roleTypes");
36
+ Object.defineProperty(exports, "RoleTypes", { enumerable: true, get: function () { return roleTypes_1.RoleTypes; } });
37
+ __exportStar(require("./invoke/adaptiveCardInvokeAction"), exports);
38
+ var activity_1 = require("./activity");
39
+ Object.defineProperty(exports, "Activity", { enumerable: true, get: function () { return activity_1.Activity; } });
40
+ Object.defineProperty(exports, "activityZodSchema", { enumerable: true, get: function () { return activity_1.activityZodSchema; } });
41
+ var activityEventNames_1 = require("./activityEventNames");
42
+ Object.defineProperty(exports, "ActivityEventNames", { enumerable: true, get: function () { return activityEventNames_1.ActivityEventNames; } });
43
+ var activityImportance_1 = require("./activityImportance");
44
+ Object.defineProperty(exports, "ActivityImportance", { enumerable: true, get: function () { return activityImportance_1.ActivityImportance; } });
45
+ var activityTypes_1 = require("./activityTypes");
46
+ Object.defineProperty(exports, "ActivityTypes", { enumerable: true, get: function () { return activityTypes_1.ActivityTypes; } });
47
+ var callerIdConstants_1 = require("./callerIdConstants");
48
+ Object.defineProperty(exports, "CallerIdConstants", { enumerable: true, get: function () { return callerIdConstants_1.CallerIdConstants; } });
49
+ var deliveryModes_1 = require("./deliveryModes");
50
+ Object.defineProperty(exports, "DeliveryModes", { enumerable: true, get: function () { return deliveryModes_1.DeliveryModes; } });
51
+ var inputHints_1 = require("./inputHints");
52
+ Object.defineProperty(exports, "InputHints", { enumerable: true, get: function () { return inputHints_1.InputHints; } });
53
+ var messageReactionTypes_1 = require("./messageReactionTypes");
54
+ Object.defineProperty(exports, "MessageReactionTypes", { enumerable: true, get: function () { return messageReactionTypes_1.MessageReactionTypes; } });
55
+ var textFormatTypes_1 = require("./textFormatTypes");
56
+ Object.defineProperty(exports, "TextFormatTypes", { enumerable: true, get: function () { return textFormatTypes_1.TextFormatTypes; } });
57
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;AAEH;;GAEG;AACH,oDAAkD;AAAzC,0GAAA,WAAW,OAAA;AAGpB,8EAA4E;AAAnE,oIAAA,wBAAwB,OAAA;AAIjC,4EAA0E;AAAjE,8HAAA,qBAAqB,OAAA;AAG9B,oDAAkD;AAAzC,oGAAA,QAAQ,OAAA;AAGjB,gFAA8E;AAArE,gIAAA,sBAAsB,OAAA;AAC/B,sDAAoD;AAA3C,sGAAA,SAAS,OAAA;AAQlB,oEAAiD;AAEjD,uCAAwD;AAA/C,oGAAA,QAAQ,OAAA;AAAE,6GAAA,iBAAiB,OAAA;AACpC,2DAAyD;AAAhD,wHAAA,kBAAkB,OAAA;AAC3B,2DAAyD;AAAhD,wHAAA,kBAAkB,OAAA;AAC3B,iDAA+C;AAAtC,8GAAA,aAAa,OAAA;AACtB,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA;AAC1B,iDAA+C;AAAtC,8GAAA,aAAa,OAAA;AAEtB,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AAEnB,+DAA6D;AAApD,4HAAA,oBAAoB,OAAA;AAC7B,qDAAmD;AAA1C,kHAAA,eAAe,OAAA"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ import { z } from 'zod';
6
+ /**
7
+ * Enum representing input hints.
8
+ */
9
+ export declare enum InputHints {
10
+ AcceptingInput = "acceptingInput",
11
+ IgnoringInput = "ignoringInput",
12
+ ExpectingInput = "expectingInput"
13
+ }
14
+ /**
15
+ * Zod schema for validating an InputHints enum.
16
+ */
17
+ export declare const inputHintsZodSchema: z.ZodEnum<["acceptingInput", "ignoringInput", "expectingInput"]>;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) Microsoft Corporation. All rights reserved.
4
+ * Licensed under the MIT License.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.inputHintsZodSchema = exports.InputHints = void 0;
8
+ const zod_1 = require("zod");
9
+ /**
10
+ * Enum representing input hints.
11
+ */
12
+ var InputHints;
13
+ (function (InputHints) {
14
+ InputHints["AcceptingInput"] = "acceptingInput";
15
+ InputHints["IgnoringInput"] = "ignoringInput";
16
+ InputHints["ExpectingInput"] = "expectingInput";
17
+ })(InputHints || (exports.InputHints = InputHints = {}));
18
+ /**
19
+ * Zod schema for validating an InputHints enum.
20
+ */
21
+ exports.inputHintsZodSchema = zod_1.z.enum(['acceptingInput', 'ignoringInput', 'expectingInput']);
22
+ //# sourceMappingURL=inputHints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inputHints.js","sourceRoot":"","sources":["../../src/inputHints.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6BAAuB;AAEvB;;GAEG;AACH,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,+CAAiC,CAAA;IACjC,6CAA+B,CAAA;IAC/B,+CAAiC,CAAA;AACnC,CAAC,EAJW,UAAU,0BAAV,UAAU,QAIrB;AAED;;GAEG;AACU,QAAA,mBAAmB,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,gBAAgB,EAAE,eAAe,EAAE,gBAAgB,CAAC,CAAC,CAAA"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ import { z } from 'zod';
6
+ /**
7
+ * Interface representing an adaptive card invoke action.
8
+ */
9
+ export interface AdaptiveCardInvokeAction {
10
+ /**
11
+ * The type of the action.
12
+ */
13
+ type: string;
14
+ /**
15
+ * The unique identifier of the action.
16
+ */
17
+ id?: string;
18
+ /**
19
+ * The verb associated with the action.
20
+ */
21
+ verb: string;
22
+ /**
23
+ * Additional data associated with the action.
24
+ */
25
+ data: Record<string, any>;
26
+ }
27
+ /**
28
+ * Zod schema for validating an adaptive card invoke action.
29
+ */
30
+ export declare const adaptiveCardInvokeActionZodSchema: z.ZodObject<{
31
+ type: z.ZodString;
32
+ id: z.ZodOptional<z.ZodString>;
33
+ verb: z.ZodString;
34
+ data: z.ZodRecord<z.ZodString, z.ZodAny>;
35
+ }, "strip", z.ZodTypeAny, {
36
+ type: string;
37
+ verb: string;
38
+ data: Record<string, any>;
39
+ id?: string | undefined;
40
+ }, {
41
+ type: string;
42
+ verb: string;
43
+ data: Record<string, any>;
44
+ id?: string | undefined;
45
+ }>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) Microsoft Corporation. All rights reserved.
4
+ * Licensed under the MIT License.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.adaptiveCardInvokeActionZodSchema = void 0;
8
+ const zod_1 = require("zod");
9
+ /**
10
+ * Zod schema for validating an adaptive card invoke action.
11
+ */
12
+ exports.adaptiveCardInvokeActionZodSchema = zod_1.z.object({
13
+ type: zod_1.z.string().min(1),
14
+ id: zod_1.z.string().optional(),
15
+ verb: zod_1.z.string().min(1),
16
+ data: zod_1.z.record(zod_1.z.string().min(1), zod_1.z.any())
17
+ });
18
+ //# sourceMappingURL=adaptiveCardInvokeAction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adaptiveCardInvokeAction.js","sourceRoot":"","sources":["../../../src/invoke/adaptiveCardInvokeAction.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6BAAuB;AAwBvB;;GAEG;AACU,QAAA,iCAAiC,GAAG,OAAC,CAAC,MAAM,CAAC;IACxD,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,IAAI,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC;CAC3C,CAAC,CAAA"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ import { z } from 'zod';
6
+ import { MessageReactionTypes } from './messageReactionTypes';
7
+ /**
8
+ * Represents a message reaction.
9
+ */
10
+ export interface MessageReaction {
11
+ /**
12
+ * The type of the reaction.
13
+ */
14
+ type: MessageReactionTypes | string;
15
+ }
16
+ /**
17
+ * Zod schema for validating a MessageReaction object.
18
+ */
19
+ export declare const messageReactionZodSchema: z.ZodObject<{
20
+ type: z.ZodUnion<[z.ZodEnum<["like", "plusOne"]>, z.ZodString]>;
21
+ }, "strip", z.ZodTypeAny, {
22
+ type: string;
23
+ }, {
24
+ type: string;
25
+ }>;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) Microsoft Corporation. All rights reserved.
4
+ * Licensed under the MIT License.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.messageReactionZodSchema = void 0;
8
+ const zod_1 = require("zod");
9
+ const messageReactionTypes_1 = require("./messageReactionTypes");
10
+ /**
11
+ * Zod schema for validating a MessageReaction object.
12
+ */
13
+ exports.messageReactionZodSchema = zod_1.z.object({
14
+ type: zod_1.z.union([messageReactionTypes_1.messageReactionTypesZodSchema, zod_1.z.string().min(1)])
15
+ });
16
+ //# sourceMappingURL=messageReaction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messageReaction.js","sourceRoot":"","sources":["../../src/messageReaction.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6BAAuB;AACvB,iEAA4F;AAY5F;;GAEG;AACU,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,CAAC,oDAA6B,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;CAClE,CAAC,CAAA"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ import { z } from 'zod';
6
+ /**
7
+ * Enum representing message reaction types.
8
+ */
9
+ export declare enum MessageReactionTypes {
10
+ Like = "like",
11
+ PlusOne = "plusOne"
12
+ }
13
+ /**
14
+ * Zod schema for validating MessageReactionTypes enum values.
15
+ */
16
+ export declare const messageReactionTypesZodSchema: z.ZodEnum<["like", "plusOne"]>;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) Microsoft Corporation. All rights reserved.
4
+ * Licensed under the MIT License.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.messageReactionTypesZodSchema = exports.MessageReactionTypes = void 0;
8
+ const zod_1 = require("zod");
9
+ /**
10
+ * Enum representing message reaction types.
11
+ */
12
+ var MessageReactionTypes;
13
+ (function (MessageReactionTypes) {
14
+ MessageReactionTypes["Like"] = "like";
15
+ MessageReactionTypes["PlusOne"] = "plusOne";
16
+ })(MessageReactionTypes || (exports.MessageReactionTypes = MessageReactionTypes = {}));
17
+ /**
18
+ * Zod schema for validating MessageReactionTypes enum values.
19
+ */
20
+ exports.messageReactionTypesZodSchema = zod_1.z.enum(['like', 'plusOne']);
21
+ //# sourceMappingURL=messageReactionTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messageReactionTypes.js","sourceRoot":"","sources":["../../src/messageReactionTypes.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6BAAuB;AAEvB;;GAEG;AACH,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC9B,qCAAa,CAAA;IACb,2CAAmB,CAAA;AACrB,CAAC,EAHW,oBAAoB,oCAApB,oBAAoB,QAG/B;AAED;;GAEG;AACU,QAAA,6BAA6B,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAA"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ import { z } from 'zod';
6
+ /**
7
+ * Enum representing text format types.
8
+ */
9
+ export declare enum TextFormatTypes {
10
+ Markdown = "markdown",
11
+ Plain = "plain",
12
+ Xml = "xml"
13
+ }
14
+ /**
15
+ * Zod schema for validating TextFormatTypes enum values.
16
+ */
17
+ export declare const textFormatTypesZodSchema: z.ZodEnum<["markdown", "plain", "xml"]>;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) Microsoft Corporation. All rights reserved.
4
+ * Licensed under the MIT License.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.textFormatTypesZodSchema = exports.TextFormatTypes = void 0;
8
+ const zod_1 = require("zod");
9
+ /**
10
+ * Enum representing text format types.
11
+ */
12
+ var TextFormatTypes;
13
+ (function (TextFormatTypes) {
14
+ TextFormatTypes["Markdown"] = "markdown";
15
+ TextFormatTypes["Plain"] = "plain";
16
+ TextFormatTypes["Xml"] = "xml";
17
+ })(TextFormatTypes || (exports.TextFormatTypes = TextFormatTypes = {}));
18
+ /**
19
+ * Zod schema for validating TextFormatTypes enum values.
20
+ */
21
+ exports.textFormatTypesZodSchema = zod_1.z.enum(['markdown', 'plain', 'xml']);
22
+ //# sourceMappingURL=textFormatTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textFormatTypes.js","sourceRoot":"","sources":["../../src/textFormatTypes.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6BAAuB;AAEvB;;GAEG;AACH,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,wCAAqB,CAAA;IACrB,kCAAe,CAAA;IACf,8BAAW,CAAA;AACb,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B;AAED;;GAEG;AACU,QAAA,wBAAwB,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAA"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ import { z } from 'zod';
6
+ /**
7
+ * Interface representing a text highlight.
8
+ */
9
+ export interface TextHighlight {
10
+ /**
11
+ * The highlighted text.
12
+ */
13
+ text: string;
14
+ /**
15
+ * The occurrence count of the highlighted text.
16
+ */
17
+ occurrence: number;
18
+ }
19
+ /**
20
+ * Zod schema for validating TextHighlight objects.
21
+ */
22
+ export declare const textHighlightZodSchema: z.ZodObject<{
23
+ text: z.ZodString;
24
+ occurrence: z.ZodNumber;
25
+ }, "strip", z.ZodTypeAny, {
26
+ text: string;
27
+ occurrence: number;
28
+ }, {
29
+ text: string;
30
+ occurrence: number;
31
+ }>;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) Microsoft Corporation. All rights reserved.
4
+ * Licensed under the MIT License.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.textHighlightZodSchema = void 0;
8
+ const zod_1 = require("zod");
9
+ /**
10
+ * Zod schema for validating TextHighlight objects.
11
+ */
12
+ exports.textHighlightZodSchema = zod_1.z.object({
13
+ text: zod_1.z.string().min(1),
14
+ occurrence: zod_1.z.number()
15
+ });
16
+ //# sourceMappingURL=textHighlight.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textHighlight.js","sourceRoot":"","sources":["../../src/textHighlight.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6BAAuB;AAgBvB;;GAEG;AACU,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;CACvB,CAAC,CAAA"}
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/package.json",
3
+ "name": "@microsoft/agents-activity",
4
+ "version": "0.1.49",
5
+ "homepage": "https://github.com/microsoft/Agents-for-js",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/microsoft/Agents-for-js.git"
9
+ },
10
+ "author": {
11
+ "name": "Microsoft",
12
+ "email": "agentssdk@microsoft.com",
13
+ "url": "https://aka.ms/Agents"
14
+ },
15
+ "description": "Microsoft 365 Agents SDK for JavaScript. Activity Protocol serialization and deserialization.",
16
+ "keywords": [
17
+ "Agents"
18
+ ],
19
+ "main": "dist/src/index.js",
20
+ "types": "dist/src/index.d.ts",
21
+ "dependencies": {
22
+ "uuid": "^11.1.0",
23
+ "zod": "^3.24.2"
24
+ },
25
+ "devDependencies": {
26
+ "@types/express": "^5.0.1"
27
+ },
28
+ "license": "MIT",
29
+ "files": [
30
+ "README.md",
31
+ "dist/src",
32
+ "src"
33
+ ],
34
+ "exports": {
35
+ ".": {
36
+ "import": "./dist/src/index.js",
37
+ "require": "./dist/src/index.js"
38
+ },
39
+ "./package.json": "./package.json"
40
+ },
41
+ "engines": {
42
+ "node": ">=18.0.0"
43
+ }
44
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Copyright(c) Microsoft Corporation.All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ import { z } from 'zod'
7
+
8
+ /**
9
+ * Enum representing the types of actions.
10
+ */
11
+ export enum ActionTypes {
12
+ OpenUrl = 'openUrl',
13
+ ImBack = 'imBack',
14
+ PostBack = 'postBack',
15
+ PlayAudio = 'playAudio',
16
+ PlayVideo = 'playVideo',
17
+ ShowImage = 'showImage',
18
+ DownloadFile = 'downloadFile',
19
+ Signin = 'signin',
20
+ Call = 'call',
21
+ MessageBack = 'messageBack',
22
+ OpenApp = 'openApp',
23
+ }
24
+
25
+ /**
26
+ * Zod schema for validating ActionTypes.
27
+ */
28
+ export const actionTypesZodSchema = z.enum(['openUrl', 'imBack', 'postBack', 'playAudio', 'showImage', 'downloadFile', 'signin', 'call', 'messageBack', 'openApp'])
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ import { z } from 'zod'
7
+ import { ActionTypes, actionTypesZodSchema } from './actionTypes'
8
+
9
+ /**
10
+ * Interface representing a card action.
11
+ */
12
+ export interface CardAction {
13
+ /**
14
+ * Type of the action.
15
+ */
16
+ type: ActionTypes | string
17
+ /**
18
+ * Title of the action.
19
+ */
20
+ title: string
21
+ /**
22
+ * URL of the image associated with the action.
23
+ */
24
+ image?: string
25
+ /**
26
+ * Text associated with the action.
27
+ */
28
+ text?: string
29
+ /**
30
+ * Display text for the action.
31
+ */
32
+ displayText?: string
33
+ /**
34
+ * Value associated with the action.
35
+ */
36
+ value?: any
37
+ /**
38
+ * Channel-specific data associated with the action.
39
+ */
40
+ channelData?: unknown
41
+ /**
42
+ * Alt text for the image.
43
+ */
44
+ imageAltText?: string
45
+ }
46
+
47
+ /**
48
+ * Zod schema for validating CardAction.
49
+ */
50
+ export const cardActionZodSchema = z.object({
51
+ type: z.union([actionTypesZodSchema, z.string().min(1)]),
52
+ title: z.string().min(1),
53
+ image: z.string().min(1).optional(),
54
+ text: z.string().min(1).optional(),
55
+ displayText: z.string().min(1).optional(),
56
+ value: z.any().optional(),
57
+ channelData: z.unknown().optional(),
58
+ imageAltText: z.string().min(1).optional()
59
+ })