// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

// Sub-schema: messageManagement — Actions related to creating, fetching, and managing messages in channels.
// Auto-generated by the onboarding scaffolder.

export type MessageManagementActions =
    | CreateMessageAction
    | GetChannelMessagesAction
    | TriggerTypingIndicatorAction;

// Creates a new message in a specified channel.
// Sample phrases:
//   - "Send a message to the general channel saying 'Hello everyone!'"
//   - "Post 'Meeting starts at 3 PM' in the announcements channel, please."
//   - "Can you create a new message in the #updates channel with the text 'New features are live!'?"
export type CreateMessageAction = {
    actionName: "createMessage";
    parameters: {
        // The ID of the channel where the message will be sent.
        channel_id: string;
        // The content of the message.
        content: string;
        // A unique identifier for the message.
        nonce?: string;
        // Whether the message should be sent as text-to-speech.
        tts?: boolean;
    };
};

// Fetches messages from a specified channel.
// Sample phrases:
//   - "Can you show me the latest messages from the channel with ID 12345?"
//   - "Fetch the last 50 messages from the channel 67890, please."
//   - "Get messages from the channel 54321, but only those sent after yesterday."
export type GetChannelMessagesAction = {
    actionName: "getChannelMessages";
    parameters: {
        // The ID of the channel from which to fetch messages.
        channel_id: string;
        // The maximum number of messages to return.
        limit?: number;
        // Get messages before this message ID.
        before?: string;
        // Get messages after this message ID.
        after?: string;
    };
};

// Trigger the typing indicator in a channel.
export type TriggerTypingIndicatorAction = {
    actionName: "triggerTypingIndicator";
    parameters: {
        // The ID of the channel.
        channel_id: string;
    };
};
