/**
 * Deprecated Authentication Plugins
 *
 * These plugins provide backward compatibility for the old authentication naming.
 * They are simple aliases that delegate to the connection plugins.
 * The connection plugins already accept both connectionId and authenticationId parameters.
 *
 * @deprecated Use the connection equivalents instead:
 * - listAuthentications -> listConnections
 * - getAuthentication -> getConnection
 * - findFirstAuthentication -> findFirstConnection
 * - findUniqueAuthentication -> findUniqueConnection
 */
import { definePlugin } from "../../utils/plugin-utils";
import { ListConnectionsQuerySchema } from "../listConnections/schemas";
import { GetConnectionParamSchema } from "../getConnection/schemas";
import { FindFirstConnectionSchema } from "../findFirstConnection/schemas";
import { FindUniqueConnectionSchema } from "../findUniqueConnection/schemas";
import { ConnectionItemSchema } from "../../schemas/Connection";
/**
 * @deprecated Use listConnections instead
 */
export const listAuthenticationsPlugin = definePlugin((sdk) => ({
    listAuthentications: sdk.listConnections,
    context: {
        meta: {
            listAuthentications: {
                packages: ["cli", "mcp"],
                categories: ["connection", "deprecated"],
                type: "list",
                itemType: "Connection",
                inputSchema: ListConnectionsQuerySchema,
                outputSchema: ConnectionItemSchema,
            },
        },
    },
}));
/**
 * @deprecated Use getConnection instead
 */
export const getAuthenticationPlugin = definePlugin((sdk) => ({
    getAuthentication: sdk.getConnection,
    context: {
        meta: {
            getAuthentication: {
                packages: ["cli", "mcp"],
                categories: ["connection", "deprecated"],
                type: "item",
                itemType: "Connection",
                inputSchema: GetConnectionParamSchema,
                outputSchema: ConnectionItemSchema,
            },
        },
    },
}));
/**
 * @deprecated Use findFirstConnection instead
 */
export const findFirstAuthenticationPlugin = definePlugin((sdk) => ({
    findFirstAuthentication: sdk.findFirstConnection,
    context: {
        meta: {
            findFirstAuthentication: {
                packages: ["cli", "mcp"],
                categories: ["connection", "deprecated"],
                type: "item",
                itemType: "Connection",
                inputSchema: FindFirstConnectionSchema,
                outputSchema: ConnectionItemSchema,
            },
        },
    },
}));
/**
 * @deprecated Use findUniqueConnection instead
 */
export const findUniqueAuthenticationPlugin = definePlugin((sdk) => ({
    findUniqueAuthentication: sdk.findUniqueConnection,
    context: {
        meta: {
            findUniqueAuthentication: {
                packages: ["cli", "mcp"],
                categories: ["connection", "deprecated"],
                type: "item",
                itemType: "Connection",
                inputSchema: FindUniqueConnectionSchema,
                outputSchema: ConnectionItemSchema,
            },
        },
    },
}));
