Skip to main content
Glama
vapi-client.mock.ts1.23 kB
export class MockVapiClient { assistants = { list: jest.fn().mockResolvedValue([ { id: 'mock-assistant-id-1', name: 'Mock Assistant 1', model: 'gpt-4', instructions: 'Example instructions', createdAt: new Date().toISOString(), updatedAt: new Date().toISOString(), }, { id: 'mock-assistant-id-2', name: 'Mock Assistant 2', model: 'claude-3-opus', instructions: 'Another example', createdAt: new Date().toISOString(), updatedAt: new Date().toISOString(), }, ]), get: jest.fn().mockImplementation((id) => { return Promise.resolve({ id, name: `Mock Assistant ${id}`, model: 'gpt-4', instructions: 'Example instructions', createdAt: new Date().toISOString(), updatedAt: new Date().toISOString(), }); }), create: jest.fn().mockImplementation((data) => { return Promise.resolve({ id: 'new-mock-assistant-id', ...data, createdAt: new Date().toISOString(), updatedAt: new Date().toISOString(), }); }), }; } export const createMockVapiClient = () => { return new MockVapiClient(); };

Latest Blog Posts

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/KuchikiRenji/mcp-server'

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