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

// Sub-schema: userManagement — Actions related to fetching and modifying user accounts and connections.
// Auto-generated by the onboarding scaffolder.

export type UserManagementActions =
    | GetCurrentUserAction
    | GetUserAction
    | ModifyCurrentUserAction
    | GetCurrentUserConnectionsAction
    | GetCurrentUserApplicationRoleConnectionAction
    | UpdateCurrentUserApplicationRoleConnectionAction;

// Returns the user object of the requester's account.
// Sample phrases:
//   - "Can you show me my account details?"
//   - "What's my user info?"
//   - "Get my profile information, please."
export type GetCurrentUserAction = {
    actionName: "getCurrentUser";
};

// Returns a user object for a given user ID.
// Sample phrases:
//   - "Can you fetch the user details for ID 123456?"
//   - "I need information on the user with ID 123456."
//   - "Please get me the user object for ID 123456."
export type GetUserAction = {
    actionName: "getUser";
    parameters: {
        // The ID of the user to fetch.
        user_id: string;
    };
};

// Modify the requester's user account settings. Returns a user object on success.
// Sample phrases:
//   - "Can you update my username and profile picture?"
//   - "I'd like to change my username and avatar, please."
//   - "Please modify my account settings with a new username and banner image."
export type ModifyCurrentUserAction = {
    actionName: "modifyCurrentUser";
    parameters?: {
        // The new username for the account.
        username?: string;
        // The new avatar for the account.
        avatar?: string;
        // The new banner image for the account.
        banner?: string;
    };
};

// Returns a list of connection objects.
// Sample phrases:
//   - "Can you show me my current connections?"
//   - "What are my linked accounts right now?"
//   - "I'd like to see my active connections, please."
export type GetCurrentUserConnectionsAction = {
    actionName: "getCurrentUserConnections";
};

// Returns the application role connection for the user.
// Sample phrases:
//   - "Can you show me my role connection for the app with ID 123456?"
//   - "What's my application role connection for the app with ID 123456?"
//   - "Please get my role connection for the application with ID 123456."
export type GetCurrentUserApplicationRoleConnectionAction = {
    actionName: "getCurrentUserApplicationRoleConnection";
    parameters: {
        // The ID of the application to fetch the role connection for.
        application_id: string;
    };
};

// Updates and returns the application role connection for the user.
// Sample phrases:
//   - "Can you update my role connection for the app with my new username?"
//   - "Please change my application role connection details to reflect my updated platform name and username."
//   - "I need to update my role connection for the app. My platform name is [platform_name] and my username is [platform_username]."
export type UpdateCurrentUserApplicationRoleConnectionAction = {
    actionName: "updateCurrentUserApplicationRoleConnection";
    parameters?: {
        // The ID of the application.
        application_id?: string;
        // The new platform name for the role connection.
        platform_name?: string;
        // The new platform username for the role connection.
        platform_username?: string;
        // The metadata for the role connection (JSON string).
        metadata?: string;
    };
};
