Skip to main content
Glama

mcp-google-sheets

delete-client.ts1.41 kB
import { createAction } from '@activepieces/pieces-framework'; import { httpClient, HttpMethod } from '@activepieces/pieces-common'; import { simplybookAuth, getAccessToken, SimplybookAuth, clientDropdown } from '../common'; export const deleteClient = createAction({ auth: simplybookAuth, name: 'delete_client', displayName: 'Delete Client', description: 'Delete an existing client', props: { clientId: clientDropdown }, async run(context) { const auth = context.auth as SimplybookAuth; const accessToken = await getAccessToken(auth); const { clientId } = context.propsValue; try { const response = await httpClient.sendRequest({ method: HttpMethod.DELETE, url: `https://user-api-v2.simplybook.me/admin/clients/${clientId}`, headers: { 'Content-Type': 'application/json', 'X-Company-Login': auth.companyLogin, 'X-Token': accessToken } }); return { success: true, message: `Client ${clientId} deleted successfully`, response: response.body }; } catch (error: any) { if (error.response) { throw new Error( `Failed to delete client: ${error.response.status} - ${JSON.stringify( error.response.body )}` ); } throw new Error(`Failed to delete client: ${error.message}`); } } });

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/activepieces/activepieces'

If you have feedback or need assistance with the MCP directory API, please join our Discord server