@microsoft/agents-activity
Version:
Microsoft 365 Agents SDK for JavaScript. Activity Protocol serialization and deserialization.
25 lines (21 loc) • 569 B
text/typescript
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { z } from 'zod'
import { MessageReactionTypes, messageReactionTypesZodSchema } from './messageReactionTypes'
/**
* Represents a message reaction.
*/
export interface MessageReaction {
/**
* The type of the reaction.
*/
type: MessageReactionTypes | string
}
/**
* Zod schema for validating a MessageReaction object.
*/
export const messageReactionZodSchema = z.object({
type: z.union([messageReactionTypesZodSchema, z.string().min(1)])
})