import { Tool, ToolResult } from '../base.js';
import type { MewsAuthConfig } from '../../types/auth.js';
import { mewsRequest } from '../../utils/http.js';
export const deleteCustomersTool: Tool = {
name: 'deleteCustomers',
description: 'Deletes specified customers',
inputSchema: {
type: 'object',
properties: {
CustomerIds: {
type: 'array',
items: { type: 'string' },
description: 'Array of customer IDs to delete',
maxItems: 1000
}
},
required: ['CustomerIds'],
additionalProperties: false
},
async execute(config: MewsAuthConfig, args: unknown): Promise<ToolResult> {
const inputArgs = args as Record<string, unknown>;
const requestData = {
...inputArgs
};
const result = await mewsRequest(config, '/api/connector/v1/customers/delete', requestData);
return {
content: [{
type: 'text',
text: JSON.stringify(result, null, 2)
}]
};
}
};