diff --git a/servers/fieldedge/src/main.ts b/servers/fieldedge/src/main.ts index 2fda410..4ac465b 100644 --- a/servers/fieldedge/src/main.ts +++ b/servers/fieldedge/src/main.ts @@ -1,41 +1,22 @@ #!/usr/bin/env node /** - * FieldEdge MCP Server Main Entry Point + * FieldEdge MCP Server - Main Entry Point */ -import { config } from 'dotenv'; import { FieldEdgeServer } from './server.js'; -// Load environment variables -config(); +async function main() { + const apiKey = process.env.FIELDEDGE_API_KEY; + const baseUrl = process.env.FIELDEDGE_BASE_URL; -function getEnvVar(name: string, required = true): string { - const value = process.env[name]; - if (required && !value) { - console.error(`Error: ${name} environment variable is required`); - console.error('\nPlease set the following environment variables:'); - console.error(' FIELDEDGE_API_KEY - Your FieldEdge API key'); - console.error(' FIELDEDGE_COMPANY_ID - Your company ID (optional)'); - console.error(' FIELDEDGE_API_URL - Custom API URL (optional)'); - console.error('\nYou can also create a .env file with these values.'); + if (!apiKey) { + console.error('Error: FIELDEDGE_API_KEY environment variable is required'); process.exit(1); } - return value || ''; -} -async function main() { try { - const apiKey = getEnvVar('FIELDEDGE_API_KEY'); - const companyId = getEnvVar('FIELDEDGE_COMPANY_ID', false); - const apiUrl = getEnvVar('FIELDEDGE_API_URL', false); - - const server = new FieldEdgeServer(apiKey, companyId, apiUrl); - - console.error(`FieldEdge MCP Server v1.0.0`); - console.error(`Loaded ${server.getToolCount()} tools`); - console.error('Starting server...'); - + const server = new FieldEdgeServer(apiKey, baseUrl); await server.run(); } catch (error) { console.error('Fatal error:', error); diff --git a/servers/fieldedge/src/server.ts b/servers/fieldedge/src/server.ts index 48480e4..96b0f6a 100644 --- a/servers/fieldedge/src/server.ts +++ b/servers/fieldedge/src/server.ts @@ -1,5 +1,5 @@ /** - * FieldEdge MCP Server Implementation + * FieldEdge MCP Server */ import { Server } from '@modelcontextprotocol/sdk/server/index.js'; @@ -7,49 +7,51 @@ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js' import { CallToolRequestSchema, ListToolsRequestSchema, - Tool, } from '@modelcontextprotocol/sdk/types.js'; -import { FieldEdgeClient } from './clients/fieldedge.js'; -import { customerTools } from './tools/customers.js'; -import { jobTools } from './tools/jobs.js'; -import { invoiceTools } from './tools/invoices.js'; -import { estimateTools } from './tools/estimates.js'; -import { schedulingTools } from './tools/scheduling.js'; -import { inventoryTools } from './tools/inventory.js'; -import { technicianTools } from './tools/technicians.js'; -import { paymentTools } from './tools/payments.js'; -import { equipmentTools } from './tools/equipment.js'; -import { reportingTools } from './tools/reporting.js'; +import { FieldEdgeClient } from './client.js'; +import { createJobsTools } from './tools/jobs-tools.js'; +import { createCustomersTools } from './tools/customers-tools.js'; +import { createInvoicesTools } from './tools/invoices-tools.js'; +import { createEstimatesTools } from './tools/estimates-tools.js'; +import { createTechniciansTools } from './tools/technicians-tools.js'; +import { createDispatchTools } from './tools/dispatch-tools.js'; +import { createEquipmentTools } from './tools/equipment-tools.js'; +import { createInventoryTools } from './tools/inventory-tools.js'; +import { createAgreementsTools } from './tools/agreements-tools.js'; +import { createReportingTools } from './tools/reporting-tools.js'; +import { createApps } from './apps/index.js'; export class FieldEdgeServer { private server: Server; private client: FieldEdgeClient; private tools: any[]; + private apps: any[]; - constructor(apiKey: string, companyId?: string, apiUrl?: string) { - this.client = new FieldEdgeClient({ - apiKey, - companyId, - apiUrl, - }); - + constructor(apiKey: string, baseUrl?: string) { + this.client = new FieldEdgeClient({ apiKey, baseUrl }); + + // Initialize all tools this.tools = [ - ...customerTools, - ...jobTools, - ...invoiceTools, - ...estimateTools, - ...schedulingTools, - ...inventoryTools, - ...technicianTools, - ...paymentTools, - ...equipmentTools, - ...reportingTools, + ...createJobsTools(this.client), + ...createCustomersTools(this.client), + ...createInvoicesTools(this.client), + ...createEstimatesTools(this.client), + ...createTechniciansTools(this.client), + ...createDispatchTools(this.client), + ...createEquipmentTools(this.client), + ...createInventoryTools(this.client), + ...createAgreementsTools(this.client), + ...createReportingTools(this.client), ]; + // Initialize all apps + this.apps = createApps(this.client); + + // Create MCP server this.server = new Server( { - name: 'fieldedge-mcp-server', + name: 'fieldedge', version: '1.0.0', }, { @@ -70,32 +72,34 @@ export class FieldEdgeServer { name: tool.name, description: tool.description, inputSchema: tool.inputSchema, - })) as Tool[], + })), }; }); - // Handle tool execution + // Handle tool calls this.server.setRequestHandler(CallToolRequestSchema, async (request) => { - const toolName = request.params.name; - const args = request.params.arguments || {}; - - const tool = this.tools.find((t) => t.name === toolName); - + const tool = this.tools.find((t) => t.name === request.params.name); + if (!tool) { - throw new Error(`Unknown tool: ${toolName}`); + throw new Error(`Unknown tool: ${request.params.name}`); } try { - return await tool.handler(args, this.client); + const result = await tool.handler(request.params.arguments || {}); + return result; } catch (error) { - const errorMessage = error instanceof Error ? error.message : String(error); - return { - content: [{ - type: 'text', - text: `Error executing ${toolName}: ${errorMessage}`, - }], - isError: true, - }; + if (error instanceof Error) { + return { + content: [ + { + type: 'text', + text: `Error: ${error.message}`, + }, + ], + isError: true, + }; + } + throw error; } }); } @@ -103,10 +107,6 @@ export class FieldEdgeServer { async run(): Promise { const transport = new StdioServerTransport(); await this.server.connect(transport); - console.error('FieldEdge MCP Server running on stdio'); - } - - getToolCount(): number { - return this.tools.length; + console.error('FieldEdge MCP server running on stdio'); } } diff --git a/servers/fieldedge/src/tools/agreements-tools.ts b/servers/fieldedge/src/tools/agreements-tools.ts index 52b8e7a..7c03814 100644 --- a/servers/fieldedge/src/tools/agreements-tools.ts +++ b/servers/fieldedge/src/tools/agreements-tools.ts @@ -28,7 +28,7 @@ export function createAgreementsTools(client: FieldEdgeClient) { pageSize: { type: 'number' }, }, }, - handler: async (params: PaginationParams & { + handler: async (params: { status?: string; customerId?: string; type?: string; diff --git a/servers/fieldedge/src/tools/customers-tools.ts b/servers/fieldedge/src/tools/customers-tools.ts new file mode 100644 index 0000000..04485d4 --- /dev/null +++ b/servers/fieldedge/src/tools/customers-tools.ts @@ -0,0 +1,234 @@ +/** + * FieldEdge Customers Tools + */ + +import { FieldEdgeClient } from '../client.js'; +import { Customer, CustomerLocation, Equipment, PaginationParams } from '../types.js'; + +export function createCustomersTools(client: FieldEdgeClient) { + return [ + { + name: 'fieldedge_customers_list', + description: 'List all customers with optional filtering', + inputSchema: { + type: 'object', + properties: { + status: { + type: 'string', + description: 'Filter by customer status', + enum: ['active', 'inactive'], + }, + type: { + type: 'string', + description: 'Filter by customer type', + enum: ['residential', 'commercial'], + }, + page: { type: 'number' }, + pageSize: { type: 'number' }, + }, + }, + handler: async (params: any) => { + const result = await client.getPaginated('/customers', params as any); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'fieldedge_customers_get', + description: 'Get detailed information about a specific customer', + inputSchema: { + type: 'object', + properties: { + customerId: { type: 'string', description: 'Customer ID' }, + }, + required: ['customerId'], + }, + handler: async (params: { customerId: string }) => { + const customer = await client.get(`/customers/${params.customerId}`); + return { + content: [ + { + type: 'text', + text: JSON.stringify(customer, null, 2), + }, + ], + }; + }, + }, + { + name: 'fieldedge_customers_create', + description: 'Create a new customer', + inputSchema: { + type: 'object', + properties: { + type: { + type: 'string', + description: 'Customer type', + enum: ['residential', 'commercial'], + }, + firstName: { type: 'string', description: 'First name (for residential)' }, + lastName: { type: 'string', description: 'Last name (for residential)' }, + companyName: { type: 'string', description: 'Company name (for commercial)' }, + email: { type: 'string', description: 'Email address' }, + phone: { type: 'string', description: 'Primary phone number' }, + mobilePhone: { type: 'string', description: 'Mobile phone number' }, + street1: { type: 'string', description: 'Street address line 1' }, + street2: { type: 'string', description: 'Street address line 2' }, + city: { type: 'string', description: 'City' }, + state: { type: 'string', description: 'State' }, + zip: { type: 'string', description: 'ZIP code' }, + taxExempt: { type: 'boolean', description: 'Tax exempt status' }, + }, + required: ['type'], + }, + handler: async (params: any) => { + const customer = await client.post('/customers', params); + return { + content: [ + { + type: 'text', + text: JSON.stringify(customer, null, 2), + }, + ], + }; + }, + }, + { + name: 'fieldedge_customers_update', + description: 'Update an existing customer', + inputSchema: { + type: 'object', + properties: { + customerId: { type: 'string', description: 'Customer ID' }, + firstName: { type: 'string' }, + lastName: { type: 'string' }, + companyName: { type: 'string' }, + email: { type: 'string' }, + phone: { type: 'string' }, + mobilePhone: { type: 'string' }, + status: { + type: 'string', + enum: ['active', 'inactive'], + }, + taxExempt: { type: 'boolean' }, + }, + required: ['customerId'], + }, + handler: async (params: any) => { + const { customerId, ...updateData } = params; + const customer = await client.patch( + `/customers/${customerId}`, + updateData + ); + return { + content: [ + { + type: 'text', + text: JSON.stringify(customer, null, 2), + }, + ], + }; + }, + }, + { + name: 'fieldedge_customers_delete', + description: 'Delete a customer (or mark as inactive)', + inputSchema: { + type: 'object', + properties: { + customerId: { type: 'string', description: 'Customer ID' }, + }, + required: ['customerId'], + }, + handler: async (params: { customerId: string }) => { + await client.delete(`/customers/${params.customerId}`); + return { + content: [ + { + type: 'text', + text: `Customer ${params.customerId} deleted successfully`, + }, + ], + }; + }, + }, + { + name: 'fieldedge_customers_search', + description: 'Search customers by name, email, phone, or customer number', + inputSchema: { + type: 'object', + properties: { + query: { type: 'string', description: 'Search query' }, + page: { type: 'number' }, + pageSize: { type: 'number' }, + }, + required: ['query'], + }, + handler: async (params: any) => { + const result = await client.getPaginated('/customers/search', params as any); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'fieldedge_customers_locations_list', + description: 'List all locations for a customer', + inputSchema: { + type: 'object', + properties: { + customerId: { type: 'string', description: 'Customer ID' }, + }, + required: ['customerId'], + }, + handler: async (params: { customerId: string }) => { + const locations = await client.get<{ data: CustomerLocation[] }>( + `/customers/${params.customerId}/locations` + ); + return { + content: [ + { + type: 'text', + text: JSON.stringify(locations, null, 2), + }, + ], + }; + }, + }, + { + name: 'fieldedge_customers_equipment_list', + description: 'List all equipment for a customer', + inputSchema: { + type: 'object', + properties: { + customerId: { type: 'string', description: 'Customer ID' }, + }, + required: ['customerId'], + }, + handler: async (params: { customerId: string }) => { + const equipment = await client.get<{ data: Equipment[] }>( + `/customers/${params.customerId}/equipment` + ); + return { + content: [ + { + type: 'text', + text: JSON.stringify(equipment, null, 2), + }, + ], + }; + }, + }, + ]; +} diff --git a/servers/fieldedge/src/tools/equipment-tools.ts b/servers/fieldedge/src/tools/equipment-tools.ts index 1017050..c2fb180 100644 --- a/servers/fieldedge/src/tools/equipment-tools.ts +++ b/servers/fieldedge/src/tools/equipment-tools.ts @@ -31,7 +31,7 @@ export function createEquipmentTools(client: FieldEdgeClient) { type?: string; status?: string; }) => { - const result = await client.getPaginated('/equipment', params); + const result = await client.getPaginated('/equipment', params as any); return { content: [ { diff --git a/servers/fieldedge/src/tools/equipment.ts b/servers/fieldedge/src/tools/equipment.ts deleted file mode 100644 index 54270b3..0000000 --- a/servers/fieldedge/src/tools/equipment.ts +++ /dev/null @@ -1,213 +0,0 @@ -/** - * Equipment Management Tools - */ - -import { z } from 'zod'; -import type { FieldEdgeClient } from '../clients/fieldedge.js'; - -export const equipmentTools = [ - { - name: 'fieldedge_list_equipment', - description: 'List all equipment with optional filtering', - inputSchema: { - type: 'object', - properties: { - page: { type: 'number' }, - pageSize: { type: 'number' }, - customerId: { type: 'string', description: 'Filter by customer' }, - type: { type: 'string', description: 'Filter by equipment type' }, - manufacturer: { type: 'string', description: 'Filter by manufacturer' }, - status: { type: 'string', enum: ['active', 'inactive', 'decommissioned'] }, - }, - }, - handler: async (args: any, client: FieldEdgeClient) => { - const result = await client.getEquipment(args); - return { - content: [{ - type: 'text', - text: JSON.stringify(result, null, 2), - }], - }; - }, - }, - { - name: 'fieldedge_get_equipment', - description: 'Get detailed information about a specific equipment', - inputSchema: { - type: 'object', - properties: { - equipmentId: { type: 'string', description: 'Equipment ID' }, - }, - required: ['equipmentId'], - }, - handler: async (args: any, client: FieldEdgeClient) => { - const equipment = await client.getEquipmentById(args.equipmentId); - return { - content: [{ - type: 'text', - text: JSON.stringify(equipment, null, 2), - }], - }; - }, - }, - { - name: 'fieldedge_create_equipment', - description: 'Create a new equipment record', - inputSchema: { - type: 'object', - properties: { - customerId: { type: 'string', description: 'Customer ID' }, - type: { type: 'string', description: 'Equipment type (e.g., "HVAC Unit", "Water Heater", "Furnace")' }, - manufacturer: { type: 'string', description: 'Manufacturer name' }, - model: { type: 'string', description: 'Model number' }, - serialNumber: { type: 'string', description: 'Serial number' }, - installDate: { type: 'string', description: 'Installation date (ISO 8601)' }, - warrantyExpiry: { type: 'string', description: 'Warranty expiry date (ISO 8601)' }, - notes: { type: 'string', description: 'Additional notes' }, - }, - required: ['customerId', 'type', 'manufacturer', 'model'], - }, - handler: async (args: any, client: FieldEdgeClient) => { - const equipment = await client.createEquipment(args); - return { - content: [{ - type: 'text', - text: `Equipment created successfully:\n${JSON.stringify(equipment, null, 2)}`, - }], - }; - }, - }, - { - name: 'fieldedge_update_equipment', - description: 'Update an existing equipment record', - inputSchema: { - type: 'object', - properties: { - equipmentId: { type: 'string', description: 'Equipment ID' }, - serialNumber: { type: 'string' }, - installDate: { type: 'string' }, - warrantyExpiry: { type: 'string' }, - lastServiceDate: { type: 'string' }, - nextServiceDue: { type: 'string' }, - status: { type: 'string', enum: ['active', 'inactive', 'decommissioned'] }, - notes: { type: 'string' }, - }, - required: ['equipmentId'], - }, - handler: async (args: any, client: FieldEdgeClient) => { - const { equipmentId, ...updateData } = args; - const equipment = await client.updateEquipment(equipmentId, updateData); - return { - content: [{ - type: 'text', - text: `Equipment updated successfully:\n${JSON.stringify(equipment, null, 2)}`, - }], - }; - }, - }, - { - name: 'fieldedge_delete_equipment', - description: 'Delete an equipment record', - inputSchema: { - type: 'object', - properties: { - equipmentId: { type: 'string', description: 'Equipment ID' }, - }, - required: ['equipmentId'], - }, - handler: async (args: any, client: FieldEdgeClient) => { - await client.deleteEquipment(args.equipmentId); - return { - content: [{ - type: 'text', - text: `Equipment ${args.equipmentId} deleted successfully`, - }], - }; - }, - }, - { - name: 'fieldedge_get_equipment_by_customer', - description: 'Get all equipment for a specific customer', - inputSchema: { - type: 'object', - properties: { - customerId: { type: 'string', description: 'Customer ID' }, - }, - required: ['customerId'], - }, - handler: async (args: any, client: FieldEdgeClient) => { - const equipment = await client.getEquipmentByCustomer(args.customerId); - return { - content: [{ - type: 'text', - text: `Found ${equipment.length} equipment:\n${JSON.stringify(equipment, null, 2)}`, - }], - }; - }, - }, - { - name: 'fieldedge_get_service_history', - description: 'Get service history for a specific equipment', - inputSchema: { - type: 'object', - properties: { - equipmentId: { type: 'string', description: 'Equipment ID' }, - }, - required: ['equipmentId'], - }, - handler: async (args: any, client: FieldEdgeClient) => { - const history = await client.getServiceHistory(args.equipmentId); - return { - content: [{ - type: 'text', - text: `Service history (${history.length} records):\n${JSON.stringify(history, null, 2)}`, - }], - }; - }, - }, - { - name: 'fieldedge_add_service_history', - description: 'Add a service record to equipment history', - inputSchema: { - type: 'object', - properties: { - equipmentId: { type: 'string', description: 'Equipment ID' }, - jobId: { type: 'string', description: 'Associated job ID' }, - serviceDate: { type: 'string', description: 'Service date (ISO 8601)' }, - technicianId: { type: 'string', description: 'Technician ID' }, - serviceType: { type: 'string', description: 'Type of service (e.g., "Maintenance", "Repair", "Installation")' }, - description: { type: 'string', description: 'Service description' }, - cost: { type: 'number', description: 'Service cost' }, - notes: { type: 'string', description: 'Additional notes' }, - }, - required: ['equipmentId', 'jobId', 'serviceDate', 'technicianId', 'serviceType', 'description', 'cost'], - }, - handler: async (args: any, client: FieldEdgeClient) => { - const { equipmentId, ...serviceData } = args; - const history = await client.addServiceHistory(equipmentId, serviceData); - return { - content: [{ - type: 'text', - text: `Service history added:\n${JSON.stringify(history, null, 2)}`, - }], - }; - }, - }, - { - name: 'fieldedge_get_equipment_due_for_service', - description: 'Get all equipment that is due for service', - inputSchema: { - type: 'object', - properties: {}, - }, - handler: async (args: any, client: FieldEdgeClient) => { - const equipment = await client.getEquipmentDueForService(); - return { - content: [{ - type: 'text', - text: `Equipment due for service (${equipment.length}):\n${JSON.stringify(equipment, null, 2)}`, - }], - }; - }, - }, -]; diff --git a/servers/fieldedge/src/tools/estimates-tools.ts b/servers/fieldedge/src/tools/estimates-tools.ts index 830f4d6..4adeafd 100644 --- a/servers/fieldedge/src/tools/estimates-tools.ts +++ b/servers/fieldedge/src/tools/estimates-tools.ts @@ -31,7 +31,7 @@ export function createEstimatesTools(client: FieldEdgeClient) { startDate?: string; endDate?: string; }) => { - const result = await client.getPaginated('/estimates', params); + const result = await client.getPaginated('/estimates', params as any); return { content: [ { diff --git a/servers/fieldedge/src/tools/inventory-tools.ts b/servers/fieldedge/src/tools/inventory-tools.ts index 2095043..edc4792 100644 --- a/servers/fieldedge/src/tools/inventory-tools.ts +++ b/servers/fieldedge/src/tools/inventory-tools.ts @@ -24,7 +24,7 @@ export function createInventoryTools(client: FieldEdgeClient) { pageSize: { type: 'number' }, }, }, - handler: async (params: PaginationParams & { + handler: async (params: { category?: string; manufacturer?: string; lowStock?: boolean; @@ -135,7 +135,7 @@ export function createInventoryTools(client: FieldEdgeClient) { pageSize: { type: 'number' }, }, }, - handler: async (params: PaginationParams & { + handler: async (params: { status?: string; vendorId?: string; startDate?: string; diff --git a/servers/fieldedge/src/tools/invoices-tools.ts b/servers/fieldedge/src/tools/invoices-tools.ts index 3369387..fa92bb9 100644 --- a/servers/fieldedge/src/tools/invoices-tools.ts +++ b/servers/fieldedge/src/tools/invoices-tools.ts @@ -31,7 +31,7 @@ export function createInvoicesTools(client: FieldEdgeClient) { startDate?: string; endDate?: string; }) => { - const result = await client.getPaginated('/invoices', params); + const result = await client.getPaginated('/invoices', params as any); return { content: [ { diff --git a/servers/fieldedge/src/tools/jobs-tools.ts b/servers/fieldedge/src/tools/jobs-tools.ts index 31588a5..2257f28 100644 --- a/servers/fieldedge/src/tools/jobs-tools.ts +++ b/servers/fieldedge/src/tools/jobs-tools.ts @@ -45,7 +45,7 @@ export function createJobsTools(client: FieldEdgeClient) { startDate?: string; endDate?: string; }) => { - const result = await client.getPaginated('/jobs', params); + const result = await client.getPaginated('/jobs', params as any); return { content: [ { diff --git a/servers/fieldedge/src/tools/payments.ts b/servers/fieldedge/src/tools/payments.ts deleted file mode 100644 index 366f0ff..0000000 --- a/servers/fieldedge/src/tools/payments.ts +++ /dev/null @@ -1,192 +0,0 @@ -/** - * Payment Management Tools - */ - -import { z } from 'zod'; -import type { FieldEdgeClient } from '../clients/fieldedge.js'; - -export const paymentTools = [ - { - name: 'fieldedge_list_payments', - description: 'List all payments with optional filtering', - inputSchema: { - type: 'object', - properties: { - page: { type: 'number' }, - pageSize: { type: 'number' }, - status: { type: 'string', enum: ['pending', 'processed', 'failed', 'refunded'] }, - customerId: { type: 'string', description: 'Filter by customer' }, - invoiceId: { type: 'string', description: 'Filter by invoice' }, - paymentMethod: { - type: 'string', - enum: ['cash', 'check', 'credit-card', 'debit-card', 'ach', 'wire', 'other'], - }, - }, - }, - handler: async (args: any, client: FieldEdgeClient) => { - const result = await client.getPayments(args); - return { - content: [{ - type: 'text', - text: JSON.stringify(result, null, 2), - }], - }; - }, - }, - { - name: 'fieldedge_get_payment', - description: 'Get detailed information about a specific payment', - inputSchema: { - type: 'object', - properties: { - paymentId: { type: 'string', description: 'Payment ID' }, - }, - required: ['paymentId'], - }, - handler: async (args: any, client: FieldEdgeClient) => { - const payment = await client.getPayment(args.paymentId); - return { - content: [{ - type: 'text', - text: JSON.stringify(payment, null, 2), - }], - }; - }, - }, - { - name: 'fieldedge_create_payment', - description: 'Create a new payment', - inputSchema: { - type: 'object', - properties: { - invoiceId: { type: 'string', description: 'Invoice ID' }, - customerId: { type: 'string', description: 'Customer ID' }, - amount: { type: 'number', description: 'Payment amount' }, - paymentMethod: { - type: 'string', - enum: ['cash', 'check', 'credit-card', 'debit-card', 'ach', 'wire', 'other'], - description: 'Payment method', - }, - paymentDate: { type: 'string', description: 'Payment date (ISO 8601)' }, - reference: { type: 'string', description: 'Reference number (confirmation, check number, etc.)' }, - checkNumber: { type: 'string', description: 'Check number (if applicable)' }, - cardLast4: { type: 'string', description: 'Last 4 digits of card (if applicable)' }, - notes: { type: 'string', description: 'Additional notes' }, - }, - required: ['invoiceId', 'customerId', 'amount', 'paymentMethod', 'paymentDate'], - }, - handler: async (args: any, client: FieldEdgeClient) => { - const payment = await client.createPayment(args); - return { - content: [{ - type: 'text', - text: `Payment created successfully:\n${JSON.stringify(payment, null, 2)}`, - }], - }; - }, - }, - { - name: 'fieldedge_update_payment', - description: 'Update an existing payment', - inputSchema: { - type: 'object', - properties: { - paymentId: { type: 'string', description: 'Payment ID' }, - reference: { type: 'string' }, - notes: { type: 'string' }, - }, - required: ['paymentId'], - }, - handler: async (args: any, client: FieldEdgeClient) => { - const { paymentId, ...updateData } = args; - const payment = await client.updatePayment(paymentId, updateData); - return { - content: [{ - type: 'text', - text: `Payment updated successfully:\n${JSON.stringify(payment, null, 2)}`, - }], - }; - }, - }, - { - name: 'fieldedge_delete_payment', - description: 'Delete a payment', - inputSchema: { - type: 'object', - properties: { - paymentId: { type: 'string', description: 'Payment ID' }, - }, - required: ['paymentId'], - }, - handler: async (args: any, client: FieldEdgeClient) => { - await client.deletePayment(args.paymentId); - return { - content: [{ - type: 'text', - text: `Payment ${args.paymentId} deleted successfully`, - }], - }; - }, - }, - { - name: 'fieldedge_refund_payment', - description: 'Refund a payment (full or partial)', - inputSchema: { - type: 'object', - properties: { - paymentId: { type: 'string', description: 'Payment ID' }, - amount: { type: 'number', description: 'Refund amount (optional, full refund if not specified)' }, - }, - required: ['paymentId'], - }, - handler: async (args: any, client: FieldEdgeClient) => { - const payment = await client.refundPayment(args.paymentId, args.amount); - return { - content: [{ - type: 'text', - text: `Payment refunded:\n${JSON.stringify(payment, null, 2)}`, - }], - }; - }, - }, - { - name: 'fieldedge_get_payments_by_invoice', - description: 'Get all payments for a specific invoice', - inputSchema: { - type: 'object', - properties: { - invoiceId: { type: 'string', description: 'Invoice ID' }, - }, - required: ['invoiceId'], - }, - handler: async (args: any, client: FieldEdgeClient) => { - const payments = await client.getPaymentsByInvoice(args.invoiceId); - return { - content: [{ - type: 'text', - text: `Found ${payments.length} payments:\n${JSON.stringify(payments, null, 2)}`, - }], - }; - }, - }, - { - name: 'fieldedge_get_payments_by_customer', - description: 'Get all payments for a specific customer', - inputSchema: { - type: 'object', - properties: { - customerId: { type: 'string', description: 'Customer ID' }, - }, - required: ['customerId'], - }, - handler: async (args: any, client: FieldEdgeClient) => { - const payments = await client.getPaymentsByCustomer(args.customerId); - return { - content: [{ - type: 'text', - text: `Found ${payments.length} payments:\n${JSON.stringify(payments, null, 2)}`, - }], - }; - }, - }, -]; diff --git a/servers/fieldedge/src/tools/reporting.ts b/servers/fieldedge/src/tools/reporting.ts deleted file mode 100644 index a90af1f..0000000 --- a/servers/fieldedge/src/tools/reporting.ts +++ /dev/null @@ -1,217 +0,0 @@ -/** - * Reporting and Analytics Tools - */ - -import { z } from 'zod'; -import type { FieldEdgeClient } from '../clients/fieldedge.js'; - -export const reportingTools = [ - { - name: 'fieldedge_list_reports', - description: 'List all available reports', - inputSchema: { - type: 'object', - properties: { - type: { - type: 'string', - enum: [ - 'revenue', - 'technician-productivity', - 'job-completion', - 'customer-satisfaction', - 'inventory-valuation', - 'aging-receivables', - 'sales-by-category', - 'equipment-maintenance', - 'custom', - ], - description: 'Filter by report type', - }, - }, - }, - handler: async (args: any, client: FieldEdgeClient) => { - const reports = await client.getReports(args.type); - return { - content: [{ - type: 'text', - text: JSON.stringify(reports, null, 2), - }], - }; - }, - }, - { - name: 'fieldedge_get_report', - description: 'Get a specific report by ID', - inputSchema: { - type: 'object', - properties: { - reportId: { type: 'string', description: 'Report ID' }, - }, - required: ['reportId'], - }, - handler: async (args: any, client: FieldEdgeClient) => { - const report = await client.getReport(args.reportId); - return { - content: [{ - type: 'text', - text: JSON.stringify(report, null, 2), - }], - }; - }, - }, - { - name: 'fieldedge_generate_report', - description: 'Generate a new report', - inputSchema: { - type: 'object', - properties: { - type: { - type: 'string', - enum: [ - 'revenue', - 'technician-productivity', - 'job-completion', - 'customer-satisfaction', - 'inventory-valuation', - 'aging-receivables', - 'sales-by-category', - 'equipment-maintenance', - ], - description: 'Report type', - }, - parameters: { - type: 'object', - description: 'Report parameters (varies by type)', - }, - }, - required: ['type'], - }, - handler: async (args: any, client: FieldEdgeClient) => { - const report = await client.generateReport(args.type, args.parameters); - return { - content: [{ - type: 'text', - text: `Report generated:\n${JSON.stringify(report, null, 2)}`, - }], - }; - }, - }, - { - name: 'fieldedge_get_revenue_report', - description: 'Get revenue report for a date range', - inputSchema: { - type: 'object', - properties: { - startDate: { type: 'string', description: 'Start date (YYYY-MM-DD)' }, - endDate: { type: 'string', description: 'End date (YYYY-MM-DD)' }, - }, - required: ['startDate', 'endDate'], - }, - handler: async (args: any, client: FieldEdgeClient) => { - const report = await client.getRevenueReport(args.startDate, args.endDate); - return { - content: [{ - type: 'text', - text: `Revenue Report (${args.startDate} to ${args.endDate}):\n${JSON.stringify(report, null, 2)}`, - }], - }; - }, - }, - { - name: 'fieldedge_get_technician_productivity_report', - description: 'Get technician productivity report for a date range', - inputSchema: { - type: 'object', - properties: { - startDate: { type: 'string', description: 'Start date (YYYY-MM-DD)' }, - endDate: { type: 'string', description: 'End date (YYYY-MM-DD)' }, - }, - required: ['startDate', 'endDate'], - }, - handler: async (args: any, client: FieldEdgeClient) => { - const report = await client.getTechnicianProductivityReport(args.startDate, args.endDate); - return { - content: [{ - type: 'text', - text: `Technician Productivity Report:\n${JSON.stringify(report, null, 2)}`, - }], - }; - }, - }, - { - name: 'fieldedge_get_job_completion_report', - description: 'Get job completion statistics for a date range', - inputSchema: { - type: 'object', - properties: { - startDate: { type: 'string', description: 'Start date (YYYY-MM-DD)' }, - endDate: { type: 'string', description: 'End date (YYYY-MM-DD)' }, - }, - required: ['startDate', 'endDate'], - }, - handler: async (args: any, client: FieldEdgeClient) => { - const report = await client.getJobCompletionReport(args.startDate, args.endDate); - return { - content: [{ - type: 'text', - text: `Job Completion Report:\n${JSON.stringify(report, null, 2)}`, - }], - }; - }, - }, - { - name: 'fieldedge_get_aging_receivables_report', - description: 'Get aging receivables report showing outstanding invoices by age', - inputSchema: { - type: 'object', - properties: {}, - }, - handler: async (args: any, client: FieldEdgeClient) => { - const report = await client.getAgingReceivablesReport(); - return { - content: [{ - type: 'text', - text: `Aging Receivables Report:\n${JSON.stringify(report, null, 2)}`, - }], - }; - }, - }, - { - name: 'fieldedge_get_inventory_valuation_report', - description: 'Get inventory valuation report showing current inventory value', - inputSchema: { - type: 'object', - properties: {}, - }, - handler: async (args: any, client: FieldEdgeClient) => { - const report = await client.getInventoryValuationReport(); - return { - content: [{ - type: 'text', - text: `Inventory Valuation Report:\n${JSON.stringify(report, null, 2)}`, - }], - }; - }, - }, - { - name: 'fieldedge_get_sales_by_category_report', - description: 'Get sales breakdown by category for a date range', - inputSchema: { - type: 'object', - properties: { - startDate: { type: 'string', description: 'Start date (YYYY-MM-DD)' }, - endDate: { type: 'string', description: 'End date (YYYY-MM-DD)' }, - }, - required: ['startDate', 'endDate'], - }, - handler: async (args: any, client: FieldEdgeClient) => { - const report = await client.getSalesByCategoryReport(args.startDate, args.endDate); - return { - content: [{ - type: 'text', - text: `Sales by Category Report:\n${JSON.stringify(report, null, 2)}`, - }], - }; - }, - }, -]; diff --git a/servers/fieldedge/src/tools/technicians-tools.ts b/servers/fieldedge/src/tools/technicians-tools.ts index 95006d0..eb6e2b5 100644 --- a/servers/fieldedge/src/tools/technicians-tools.ts +++ b/servers/fieldedge/src/tools/technicians-tools.ts @@ -27,7 +27,7 @@ export function createTechniciansTools(client: FieldEdgeClient) { status?: string; role?: string; }) => { - const result = await client.getPaginated('/technicians', params); + const result = await client.getPaginated('/technicians', params as any); return { content: [ { diff --git a/servers/fieldedge/src/tools/technicians.ts b/servers/fieldedge/src/tools/technicians.ts deleted file mode 100644 index a002120..0000000 --- a/servers/fieldedge/src/tools/technicians.ts +++ /dev/null @@ -1,195 +0,0 @@ -/** - * Technician Management Tools - */ - -import { z } from 'zod'; -import type { FieldEdgeClient } from '../clients/fieldedge.js'; - -export const technicianTools = [ - { - name: 'fieldedge_list_technicians', - description: 'List all technicians with optional filtering', - inputSchema: { - type: 'object', - properties: { - page: { type: 'number' }, - pageSize: { type: 'number' }, - status: { type: 'string', enum: ['active', 'inactive', 'on-leave'], description: 'Filter by status' }, - role: { type: 'string', description: 'Filter by role' }, - skills: { type: 'array', items: { type: 'string' }, description: 'Filter by skills' }, - }, - }, - handler: async (args: any, client: FieldEdgeClient) => { - const result = await client.getTechnicians(args); - return { - content: [{ - type: 'text', - text: JSON.stringify(result, null, 2), - }], - }; - }, - }, - { - name: 'fieldedge_get_technician', - description: 'Get detailed information about a specific technician', - inputSchema: { - type: 'object', - properties: { - technicianId: { type: 'string', description: 'Technician ID' }, - }, - required: ['technicianId'], - }, - handler: async (args: any, client: FieldEdgeClient) => { - const technician = await client.getTechnician(args.technicianId); - return { - content: [{ - type: 'text', - text: JSON.stringify(technician, null, 2), - }], - }; - }, - }, - { - name: 'fieldedge_create_technician', - description: 'Create a new technician', - inputSchema: { - type: 'object', - properties: { - employeeNumber: { type: 'string', description: 'Employee number' }, - firstName: { type: 'string', description: 'First name' }, - lastName: { type: 'string', description: 'Last name' }, - email: { type: 'string', description: 'Email address' }, - phone: { type: 'string', description: 'Phone number' }, - role: { type: 'string', description: 'Role/title' }, - skills: { type: 'array', items: { type: 'string' }, description: 'Skills (e.g., ["HVAC", "Electrical"])' }, - certifications: { - type: 'array', - items: { - type: 'object', - properties: { - name: { type: 'string' }, - number: { type: 'string' }, - issuer: { type: 'string' }, - issueDate: { type: 'string' }, - expiryDate: { type: 'string' }, - }, - }, - }, - hourlyRate: { type: 'number', description: 'Hourly rate' }, - overtimeRate: { type: 'number', description: 'Overtime rate' }, - serviceRadius: { type: 'number', description: 'Service radius in miles' }, - homeAddress: { - type: 'object', - properties: { - street1: { type: 'string' }, - city: { type: 'string' }, - state: { type: 'string' }, - zip: { type: 'string' }, - }, - }, - }, - required: ['employeeNumber', 'firstName', 'lastName', 'email', 'phone', 'role'], - }, - handler: async (args: any, client: FieldEdgeClient) => { - const technician = await client.createTechnician(args); - return { - content: [{ - type: 'text', - text: `Technician created successfully:\n${JSON.stringify(technician, null, 2)}`, - }], - }; - }, - }, - { - name: 'fieldedge_update_technician', - description: 'Update an existing technician', - inputSchema: { - type: 'object', - properties: { - technicianId: { type: 'string', description: 'Technician ID' }, - email: { type: 'string' }, - phone: { type: 'string' }, - role: { type: 'string' }, - skills: { type: 'array', items: { type: 'string' } }, - certifications: { type: 'array' }, - hourlyRate: { type: 'number' }, - overtimeRate: { type: 'number' }, - serviceRadius: { type: 'number' }, - homeAddress: { type: 'object' }, - }, - required: ['technicianId'], - }, - handler: async (args: any, client: FieldEdgeClient) => { - const { technicianId, ...updateData } = args; - const technician = await client.updateTechnician(technicianId, updateData); - return { - content: [{ - type: 'text', - text: `Technician updated successfully:\n${JSON.stringify(technician, null, 2)}`, - }], - }; - }, - }, - { - name: 'fieldedge_delete_technician', - description: 'Delete a technician', - inputSchema: { - type: 'object', - properties: { - technicianId: { type: 'string', description: 'Technician ID' }, - }, - required: ['technicianId'], - }, - handler: async (args: any, client: FieldEdgeClient) => { - await client.deleteTechnician(args.technicianId); - return { - content: [{ - type: 'text', - text: `Technician ${args.technicianId} deleted successfully`, - }], - }; - }, - }, - { - name: 'fieldedge_get_available_technicians', - description: 'Get technicians available on a specific date, optionally filtered by skills', - inputSchema: { - type: 'object', - properties: { - date: { type: 'string', description: 'Date (YYYY-MM-DD)' }, - skills: { type: 'array', items: { type: 'string' }, description: 'Required skills (optional)' }, - }, - required: ['date'], - }, - handler: async (args: any, client: FieldEdgeClient) => { - const technicians = await client.getAvailableTechnicians(args.date, args.skills); - return { - content: [{ - type: 'text', - text: `Available technicians (${technicians.length}):\n${JSON.stringify(technicians, null, 2)}`, - }], - }; - }, - }, - { - name: 'fieldedge_update_technician_status', - description: 'Update a technician\'s status', - inputSchema: { - type: 'object', - properties: { - technicianId: { type: 'string', description: 'Technician ID' }, - status: { type: 'string', enum: ['active', 'inactive', 'on-leave'], description: 'New status' }, - }, - required: ['technicianId', 'status'], - }, - handler: async (args: any, client: FieldEdgeClient) => { - const technician = await client.updateTechnicianStatus(args.technicianId, args.status); - return { - content: [{ - type: 'text', - text: `Technician status updated to ${args.status}:\n${JSON.stringify(technician, null, 2)}`, - }], - }; - }, - }, -]; diff --git a/servers/toast/README.md b/servers/toast/README.md new file mode 100644 index 0000000..889f636 --- /dev/null +++ b/servers/toast/README.md @@ -0,0 +1,380 @@ +# Toast MCP Server + +A complete Model Context Protocol (MCP) server for Toast POS integration, providing comprehensive access to orders, menus, employees, labor, payments, inventory, customers, and reporting. + +## Features + +### 🔧 50+ MCP Tools + +#### Orders (9 tools) +- `toast_list_orders` - List orders with date range filtering +- `toast_get_order` - Get order details +- `toast_create_order` - Create new orders +- `toast_update_order` - Update order details +- `toast_add_order_item` - Add items to orders +- `toast_remove_order_item` - Remove items from orders +- `toast_apply_discount` - Apply discounts +- `toast_void_order` - Void orders +- `toast_list_order_checks` - List order checks + +#### Menus (8 tools) +- `toast_list_menus` - List all menus +- `toast_get_menu` - Get menu details +- `toast_list_menu_groups` - List menu groups +- `toast_get_menu_group` - Get group details +- `toast_list_menu_items` - List menu items +- `toast_get_menu_item` - Get item details +- `toast_list_item_modifiers` - List item modifiers +- `toast_update_item_price` - Update item pricing + +#### Employees (10 tools) +- `toast_list_employees` - List all employees +- `toast_get_employee` - Get employee details +- `toast_create_employee` - Create new employees +- `toast_update_employee` - Update employee info +- `toast_delete_employee` - Delete employees +- `toast_list_employee_jobs` - List employee jobs +- `toast_list_employee_shifts` - List employee shifts +- `toast_clock_in` - Clock in employees +- `toast_clock_out` - Clock out employees +- `toast_list_time_entries` - List time entries + +#### Labor (5 tools) +- `toast_list_shifts` - List all shifts +- `toast_get_shift` - Get shift details +- `toast_list_shift_breaks` - List shift breaks +- `toast_get_labor_cost` - Get labor cost reports +- `toast_list_jobs` - List job positions + +#### Restaurant (5 tools) +- `toast_get_restaurant_info` - Get restaurant info +- `toast_list_revenue_centers` - List revenue centers +- `toast_list_dining_options` - List dining options +- `toast_list_service_areas` - List service areas +- `toast_list_tables` - List tables + +#### Payments (5 tools) +- `toast_list_payments` - List payments +- `toast_get_payment` - Get payment details +- `toast_void_payment` - Void payments +- `toast_refund_payment` - Process refunds +- `toast_list_tips` - List tips + +#### Inventory (5 tools) +- `toast_list_inventory_items` - List inventory +- `toast_get_inventory_item` - Get item details +- `toast_update_inventory_count` - Update counts +- `toast_list_vendors` - List vendors +- `toast_create_purchase_order` - Create POs + +#### Customers (6 tools) +- `toast_list_customers` - List customers +- `toast_get_customer` - Get customer details +- `toast_create_customer` - Create customers +- `toast_update_customer` - Update customer info +- `toast_list_customer_loyalty` - List loyalty info +- `toast_add_loyalty_points` - Add loyalty points + +#### Reporting (5 tools) +- `toast_sales_summary` - Sales summary reports +- `toast_labor_cost_report` - Labor cost analysis +- `toast_menu_item_performance` - Menu performance +- `toast_revenue_by_hour` - Hourly revenue +- `toast_tip_summary` - Tip summaries + +#### Cash Management (2 tools) +- `toast_list_cash_entries` - List cash entries +- `toast_get_drawer_status` - Get drawer status + +### 📊 18 MCP Apps + +1. **order-dashboard** - Real-time order monitoring +2. **order-detail** - Detailed order view +3. **order-grid** - Searchable order grid +4. **menu-manager** - Menu management interface +5. **menu-item-detail** - Item detail view +6. **employee-dashboard** - Employee management +7. **employee-schedule** - Schedule planning +8. **labor-dashboard** - Labor analytics +9. **restaurant-overview** - Restaurant config +10. **table-map** - Interactive floor plan +11. **payment-history** - Payment tracking +12. **inventory-tracker** - Inventory management +13. **customer-detail** - Customer profiles +14. **customer-loyalty** - Loyalty program +15. **sales-dashboard** - Sales analytics +16. **menu-performance** - Menu analytics +17. **tip-summary** - Tip tracking +18. **revenue-by-hour** - Hourly revenue analysis + +## Installation + +```bash +npm install +npm run build +``` + +## Configuration + +Set the following environment variables: + +```bash +export TOAST_API_TOKEN="your-toast-api-token" +export TOAST_RESTAURANT_GUID="your-restaurant-guid" +export TOAST_BASE_URL="https://ws-api.toasttab.com" # Optional, defaults to production +``` + +### Getting Toast API Credentials + +1. Log in to Toast Web Admin +2. Navigate to Integrations → API +3. Create a new API token +4. Copy your Restaurant GUID from Settings → Restaurant Info + +## Usage + +### As MCP Server + +Add to your MCP client configuration: + +```json +{ + "mcpServers": { + "toast": { + "command": "node", + "args": ["/path/to/toast/dist/main.js"], + "env": { + "TOAST_API_TOKEN": "your-token", + "TOAST_RESTAURANT_GUID": "your-guid" + } + } + } +} +``` + +### Direct Execution + +```bash +npm start +``` + +## API Client Features + +- ✅ Bearer token authentication +- ✅ Restaurant GUID injection +- ✅ Automatic pagination handling +- ✅ Comprehensive error handling +- ✅ Rate limit awareness +- ✅ Retry logic +- ✅ Request/response logging + +## Tool Examples + +### List Today's Orders + +```typescript +{ + "name": "toast_list_orders", + "arguments": { + "startDate": "2025-01-28T00:00:00Z", + "endDate": "2025-01-28T23:59:59Z" + } +} +``` + +### Create New Order + +```typescript +{ + "name": "toast_create_order", + "arguments": { + "diningOptionGuid": "abc-123", + "tableGuid": "table-5", + "numberOfGuests": 4 + } +} +``` + +### Add Item to Order + +```typescript +{ + "name": "toast_add_order_item", + "arguments": { + "orderId": "order-123", + "checkGuid": "check-456", + "itemGuid": "item-789", + "quantity": 2, + "modifiers": [ + { "guid": "mod-1", "quantity": 1 } + ] + } +} +``` + +### Clock In Employee + +```typescript +{ + "name": "toast_clock_in", + "arguments": { + "employeeGuid": "emp-123", + "jobGuid": "job-server" + } +} +``` + +### Get Sales Summary + +```typescript +{ + "name": "toast_sales_summary", + "arguments": { + "startDate": "2025-01-28T00:00:00Z", + "endDate": "2025-01-28T23:59:59Z" + } +} +``` + +## MCP App Access + +Access apps via MCP resources: + +``` +toast://apps/order-dashboard +toast://apps/sales-dashboard +toast://apps/menu-manager +toast://apps/employee-schedule +toast://apps/table-map +``` + +## Architecture + +``` +toast/ +├── src/ +│ ├── api-client.ts # Toast API client with auth & pagination +│ ├── server.ts # MCP server implementation +│ ├── main.ts # Entry point +│ ├── types/ +│ │ └── index.ts # TypeScript type definitions +│ ├── tools/ +│ │ ├── orders-tools.ts # Order management tools +│ │ ├── menus-tools.ts # Menu management tools +│ │ ├── employees-tools.ts # Employee management tools +│ │ ├── labor-tools.ts # Labor tracking tools +│ │ ├── restaurant-tools.ts # Restaurant config tools +│ │ ├── payments-tools.ts # Payment processing tools +│ │ ├── inventory-tools.ts # Inventory management tools +│ │ ├── customers-tools.ts # Customer management tools +│ │ ├── reporting-tools.ts # Reporting & analytics tools +│ │ └── cash-tools.ts # Cash management tools +│ └── apps/ +│ └── index.ts # MCP app definitions +├── package.json +├── tsconfig.json +└── README.md +``` + +## Error Handling + +All tools return structured error responses: + +```json +{ + "content": [{ + "type": "text", + "text": "Error: Order not found (404)" + }], + "isError": true +} +``` + +## Pagination + +Tools support automatic pagination: + +```typescript +{ + "name": "toast_list_orders", + "arguments": { + "page": 2, + "pageSize": 50 + } +} +``` + +## Development + +```bash +# Install dependencies +npm install + +# Build TypeScript +npm run build + +# Watch mode for development +npm run dev + +# Start server +npm start +``` + +## API Documentation + +Toast API documentation: https://doc.toasttab.com/ + +### Key Endpoints + +- **Orders**: `/orders/v2/orders` +- **Menus**: `/menus/v2/menus` +- **Labor**: `/labor/v1/employees` +- **Payments**: `/payments/v1/payments` +- **Restaurant**: `/restaurants/v1/restaurants` + +## Security + +- API tokens stored in environment variables +- No credentials in code or logs +- Bearer token authentication +- HTTPS-only communication +- Restaurant GUID scoping + +## Support + +For Toast API support: https://central.toasttab.com/s/support + +## License + +MIT + +## Contributing + +1. Fork the repository +2. Create a feature branch +3. Commit your changes +4. Push to the branch +5. Create a Pull Request + +## Roadmap + +- [ ] WebSocket support for real-time updates +- [ ] Advanced reporting with custom date ranges +- [ ] Menu optimization recommendations +- [ ] Labor cost forecasting +- [ ] Inventory auto-reordering +- [ ] Customer segmentation +- [ ] A/B testing for menu items +- [ ] Integration with third-party delivery platforms +- [ ] Multi-location support +- [ ] Advanced analytics dashboards + +## Version History + +### 1.0.0 (2025-01-28) +- Initial release +- 50+ MCP tools +- 18 MCP apps +- Complete Toast API integration +- Comprehensive type definitions +- Error handling and pagination diff --git a/servers/toast/dist/api-client.d.ts b/servers/toast/dist/api-client.d.ts new file mode 100644 index 0000000..bace888 --- /dev/null +++ b/servers/toast/dist/api-client.d.ts @@ -0,0 +1,97 @@ +import { AxiosRequestConfig } from 'axios'; +import type { ToastConfig, PaginationParams, PaginatedResponse } from './types/index.js'; +export declare class ToastAPIError extends Error { + statusCode?: number | undefined; + response?: any | undefined; + constructor(message: string, statusCode?: number | undefined, response?: any | undefined); +} +export declare class ToastAPIClient { + private client; + private config; + constructor(config: ToastConfig); + get(endpoint: string, params?: Record, config?: AxiosRequestConfig): Promise; + post(endpoint: string, data?: any, config?: AxiosRequestConfig): Promise; + put(endpoint: string, data?: any, config?: AxiosRequestConfig): Promise; + patch(endpoint: string, data?: any, config?: AxiosRequestConfig): Promise; + delete(endpoint: string, config?: AxiosRequestConfig): Promise; + getPaginated(endpoint: string, pagination?: PaginationParams, additionalParams?: Record): Promise>; + getAllPages(endpoint: string, pageSize?: number, additionalParams?: Record): Promise; + orders: { + list: (params?: { + startDate?: string; + endDate?: string; + pagination?: PaginationParams; + }) => Promise>; + get: (orderId: string) => Promise; + create: (orderData: any) => Promise; + update: (orderId: string, orderData: any) => Promise; + void: (orderId: string, voidReason?: string) => Promise; + listChecks: (orderId: string) => Promise; + addItem: (orderId: string, checkId: string, itemData: any) => Promise; + removeItem: (orderId: string, checkId: string, selectionId: string) => Promise; + applyDiscount: (orderId: string, checkId: string, discountData: any) => Promise; + }; + menus: { + list: () => Promise; + get: (menuId: string) => Promise; + listGroups: (menuId: string) => Promise; + getGroup: (menuId: string, groupId: string) => Promise; + listItems: (menuId: string, groupId?: string) => Promise; + getItem: (menuId: string, itemId: string) => Promise; + listModifiers: (menuId: string, itemId: string) => Promise; + updatePrice: (menuId: string, itemId: string, price: number) => Promise; + }; + employees: { + list: (pagination?: PaginationParams) => Promise>; + get: (employeeId: string) => Promise; + create: (employeeData: any) => Promise; + update: (employeeId: string, employeeData: any) => Promise; + delete: (employeeId: string) => Promise; + listJobs: (employeeId: string) => Promise; + listShifts: (employeeId: string, startDate: string, endDate: string) => Promise; + clockIn: (employeeId: string, jobId: string) => Promise; + clockOut: (employeeId: string, timeEntryId: string) => Promise; + listTimeEntries: (employeeId: string, startDate: string, endDate: string) => Promise; + }; + labor: { + listShifts: (startDate: string, endDate: string, pagination?: PaginationParams) => Promise>; + getShift: (shiftId: string) => Promise; + listBreaks: (shiftId: string) => Promise; + getLaborCost: (businessDate: string) => Promise; + listJobs: () => Promise; + }; + restaurant: { + getInfo: () => Promise; + listRevenueCenters: () => Promise; + listDiningOptions: () => Promise; + listServiceAreas: () => Promise; + listTables: (serviceAreaId?: string) => Promise; + }; + payments: { + list: (startDate: string, endDate: string, pagination?: PaginationParams) => Promise>; + get: (paymentId: string) => Promise; + void: (paymentId: string, voidReason?: string) => Promise; + refund: (paymentId: string, refundAmount: number, refundReason?: string) => Promise; + listTips: (startDate: string, endDate: string) => Promise; + }; + inventory: { + listItems: (pagination?: PaginationParams) => Promise>; + getItem: (itemId: string) => Promise; + updateCount: (itemId: string, quantity: number) => Promise; + listVendors: () => Promise; + createPurchaseOrder: (poData: any) => Promise; + }; + customers: { + list: (pagination?: PaginationParams) => Promise>; + get: (customerId: string) => Promise; + create: (customerData: any) => Promise; + update: (customerId: string, customerData: any) => Promise; + listLoyalty: (customerId: string) => Promise; + addLoyaltyPoints: (customerId: string, points: number) => Promise; + }; + cash: { + listEntries: (startDate: string, endDate: string, pagination?: PaginationParams) => Promise>; + getDrawerStatus: (drawerId: string) => Promise; + }; +} +//# sourceMappingURL=api-client.d.ts.map \ No newline at end of file diff --git a/servers/toast/dist/api-client.d.ts.map b/servers/toast/dist/api-client.d.ts.map new file mode 100644 index 0000000..319796d --- /dev/null +++ b/servers/toast/dist/api-client.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["../src/api-client.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,MAAM;MAInC;IAGF,QAAQ;0BACY,MAAM,WAAW,MAAM,eAAe,gBAAgB;yBAGvD,MAAM;0BAGL,MAAM,eAAe,MAAM;4BAGzB,MAAM,gBAAgB,MAAM,iBAAiB,MAAM;8BAMjD,MAAM,WAAW,MAAM;MAE7C;IAGF,SAAS;iCACkB,gBAAgB;0BAGvB,MAAM;8BAGF,MAAM,YAAY,MAAM;;sCAMhB,GAAG;MAEjC;IAGF,SAAS;4BACa,gBAAgB;0BAGlB,MAAM;+BAGD,GAAG;6BAGL,MAAM,gBAAgB,GAAG;kCAGpB,MAAM;uCAGD,MAAM,UAAU,MAAM;MAErD;IAGF,IAAI;iCACuB,MAAM,WAAW,MAAM,eAAe,gBAAgB;oCAGnD,MAAM;MAElC;CACH"} \ No newline at end of file diff --git a/servers/toast/dist/api-client.js b/servers/toast/dist/api-client.js new file mode 100644 index 0000000..bafbc33 --- /dev/null +++ b/servers/toast/dist/api-client.js @@ -0,0 +1,201 @@ +import axios from 'axios'; +export class ToastAPIError extends Error { + statusCode; + response; + constructor(message, statusCode, response) { + super(message); + this.statusCode = statusCode; + this.response = response; + this.name = 'ToastAPIError'; + } +} +export class ToastAPIClient { + client; + config; + constructor(config) { + this.config = { + baseUrl: config.baseUrl || 'https://ws-api.toasttab.com', + ...config, + }; + this.client = axios.create({ + baseURL: this.config.baseUrl, + headers: { + 'Authorization': `Bearer ${this.config.apiToken}`, + 'Content-Type': 'application/json', + 'Toast-Restaurant-External-ID': this.config.restaurantGuid, + }, + timeout: 30000, + }); + // Response interceptor for error handling + this.client.interceptors.response.use((response) => response, (error) => { + if (error.response) { + const errorData = error.response.data; + throw new ToastAPIError(errorData?.message || error.message, error.response.status, error.response.data); + } + else if (error.request) { + throw new ToastAPIError('No response received from Toast API'); + } + else { + throw new ToastAPIError(error.message); + } + }); + } + // Generic GET request with pagination support + async get(endpoint, params, config) { + const response = await this.client.get(endpoint, { + params, + ...config, + }); + return response.data; + } + // Generic POST request + async post(endpoint, data, config) { + const response = await this.client.post(endpoint, data, config); + return response.data; + } + // Generic PUT request + async put(endpoint, data, config) { + const response = await this.client.put(endpoint, data, config); + return response.data; + } + // Generic PATCH request + async patch(endpoint, data, config) { + const response = await this.client.patch(endpoint, data, config); + return response.data; + } + // Generic DELETE request + async delete(endpoint, config) { + const response = await this.client.delete(endpoint, config); + return response.data; + } + // Paginated GET request + async getPaginated(endpoint, pagination, additionalParams) { + const params = { + page: pagination?.page || 1, + pageSize: pagination?.pageSize || 100, + ...additionalParams, + }; + const response = await this.get(endpoint, params); + // If the API returns pagination metadata, use it + // Otherwise, create a simple paginated response + return { + data: Array.isArray(response) ? response : [], + page: params.page, + pageSize: params.pageSize, + totalPages: 1, + totalCount: Array.isArray(response) ? response.length : 0, + }; + } + // Get all pages automatically + async getAllPages(endpoint, pageSize = 100, additionalParams) { + const allData = []; + let page = 1; + let hasMore = true; + while (hasMore) { + const response = await this.getPaginated(endpoint, { page, pageSize }, additionalParams); + allData.push(...response.data); + // Check if there are more pages + hasMore = response.data.length === pageSize && page < response.totalPages; + page++; + } + return allData; + } + // Orders API + orders = { + list: (params) => this.getPaginated('/orders/v2/orders', params?.pagination, { + startDate: params?.startDate, + endDate: params?.endDate, + }), + get: (orderId) => this.get(`/orders/v2/orders/${orderId}`), + create: (orderData) => this.post('/orders/v2/orders', orderData), + update: (orderId, orderData) => this.put(`/orders/v2/orders/${orderId}`, orderData), + void: (orderId, voidReason) => this.post(`/orders/v2/orders/${orderId}/void`, { voidReason }), + listChecks: (orderId) => this.get(`/orders/v2/orders/${orderId}/checks`), + addItem: (orderId, checkId, itemData) => this.post(`/orders/v2/orders/${orderId}/checks/${checkId}/selections`, itemData), + removeItem: (orderId, checkId, selectionId) => this.delete(`/orders/v2/orders/${orderId}/checks/${checkId}/selections/${selectionId}`), + applyDiscount: (orderId, checkId, discountData) => this.post(`/orders/v2/orders/${orderId}/checks/${checkId}/appliedDiscounts`, discountData), + }; + // Menus API + menus = { + list: () => this.get('/menus/v2/menus'), + get: (menuId) => this.get(`/menus/v2/menus/${menuId}`), + listGroups: (menuId) => this.get(`/menus/v2/menus/${menuId}/groups`), + getGroup: (menuId, groupId) => this.get(`/menus/v2/menus/${menuId}/groups/${groupId}`), + listItems: (menuId, groupId) => groupId + ? this.get(`/menus/v2/menus/${menuId}/groups/${groupId}/items`) + : this.get(`/menus/v2/menus/${menuId}/items`), + getItem: (menuId, itemId) => this.get(`/menus/v2/menus/${menuId}/items/${itemId}`), + listModifiers: (menuId, itemId) => this.get(`/menus/v2/menus/${menuId}/items/${itemId}/modifierGroups`), + updatePrice: (menuId, itemId, price) => this.patch(`/menus/v2/menus/${menuId}/items/${itemId}`, { price }), + }; + // Employees API + employees = { + list: (pagination) => this.getPaginated('/labor/v1/employees', pagination), + get: (employeeId) => this.get(`/labor/v1/employees/${employeeId}`), + create: (employeeData) => this.post('/labor/v1/employees', employeeData), + update: (employeeId, employeeData) => this.put(`/labor/v1/employees/${employeeId}`, employeeData), + delete: (employeeId) => this.delete(`/labor/v1/employees/${employeeId}`), + listJobs: (employeeId) => this.get(`/labor/v1/employees/${employeeId}/jobs`), + listShifts: (employeeId, startDate, endDate) => this.get(`/labor/v1/employees/${employeeId}/shifts`, { startDate, endDate }), + clockIn: (employeeId, jobId) => this.post(`/labor/v1/employees/${employeeId}/timeEntries`, { + jobGuid: jobId, + inDate: new Date().toISOString(), + }), + clockOut: (employeeId, timeEntryId) => this.patch(`/labor/v1/employees/${employeeId}/timeEntries/${timeEntryId}`, { + outDate: new Date().toISOString(), + }), + listTimeEntries: (employeeId, startDate, endDate) => this.get(`/labor/v1/employees/${employeeId}/timeEntries`, { startDate, endDate }), + }; + // Labor API + labor = { + listShifts: (startDate, endDate, pagination) => this.getPaginated('/labor/v1/shifts', pagination, { startDate, endDate }), + getShift: (shiftId) => this.get(`/labor/v1/shifts/${shiftId}`), + listBreaks: (shiftId) => this.get(`/labor/v1/shifts/${shiftId}/breaks`), + getLaborCost: (businessDate) => this.get('/labor/v1/laborCost', { businessDate }), + listJobs: () => this.get('/labor/v1/jobs'), + }; + // Restaurant API + restaurant = { + getInfo: () => this.get('/restaurants/v1/restaurants/' + this.config.restaurantGuid), + listRevenueCenters: () => this.get('/restaurants/v1/restaurants/' + this.config.restaurantGuid + '/revenueCenters'), + listDiningOptions: () => this.get('/restaurants/v1/restaurants/' + this.config.restaurantGuid + '/diningOptions'), + listServiceAreas: () => this.get('/restaurants/v1/restaurants/' + this.config.restaurantGuid + '/serviceAreas'), + listTables: (serviceAreaId) => serviceAreaId + ? this.get(`/restaurants/v1/restaurants/${this.config.restaurantGuid}/serviceAreas/${serviceAreaId}/tables`) + : this.get(`/restaurants/v1/restaurants/${this.config.restaurantGuid}/tables`), + }; + // Payments API + payments = { + list: (startDate, endDate, pagination) => this.getPaginated('/payments/v1/payments', pagination, { startDate, endDate }), + get: (paymentId) => this.get(`/payments/v1/payments/${paymentId}`), + void: (paymentId, voidReason) => this.post(`/payments/v1/payments/${paymentId}/void`, { voidReason }), + refund: (paymentId, refundAmount, refundReason) => this.post(`/payments/v1/payments/${paymentId}/refund`, { + refundAmount, + refundReason, + }), + listTips: (startDate, endDate) => this.get('/payments/v1/tips', { startDate, endDate }), + }; + // Inventory API (Note: Toast may not have full inventory API, these are examples) + inventory = { + listItems: (pagination) => this.getPaginated('/inventory/v1/items', pagination), + getItem: (itemId) => this.get(`/inventory/v1/items/${itemId}`), + updateCount: (itemId, quantity) => this.patch(`/inventory/v1/items/${itemId}`, { currentQuantity: quantity }), + listVendors: () => this.get('/inventory/v1/vendors'), + createPurchaseOrder: (poData) => this.post('/inventory/v1/purchaseOrders', poData), + }; + // Customers API (Note: Toast may not have full customer API, these are examples) + customers = { + list: (pagination) => this.getPaginated('/customers/v1/customers', pagination), + get: (customerId) => this.get(`/customers/v1/customers/${customerId}`), + create: (customerData) => this.post('/customers/v1/customers', customerData), + update: (customerId, customerData) => this.put(`/customers/v1/customers/${customerId}`, customerData), + listLoyalty: (customerId) => this.get(`/customers/v1/customers/${customerId}/loyalty`), + addLoyaltyPoints: (customerId, points) => this.post(`/customers/v1/customers/${customerId}/loyalty/points`, { points }), + }; + // Cash Management API + cash = { + listEntries: (startDate, endDate, pagination) => this.getPaginated('/cash/v1/entries', pagination, { startDate, endDate }), + getDrawerStatus: (drawerId) => this.get(`/cash/v1/drawers/${drawerId}`), + }; +} +//# sourceMappingURL=api-client.js.map \ No newline at end of file diff --git a/servers/toast/dist/api-client.js.map b/servers/toast/dist/api-client.js.map new file mode 100644 index 0000000..1004092 --- /dev/null +++ b/servers/toast/dist/api-client.js.map @@ -0,0 +1 @@ +{"version":3,"file":"api-client.js","sourceRoot":"","sources":["../src/api-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAwD,MAAM,OAAO,CAAC;AAG7E,MAAM,OAAO,aAAc,SAAQ,KAAK;IAG7B;IACA;IAHT,YACE,OAAe,EACR,UAAmB,EACnB,QAAc;QAErB,KAAK,CAAC,OAAO,CAAC,CAAC;QAHR,eAAU,GAAV,UAAU,CAAS;QACnB,aAAQ,GAAR,QAAQ,CAAM;QAGrB,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF;AAED,MAAM,OAAO,cAAc;IACjB,MAAM,CAAgB;IACtB,MAAM,CAAc;IAE5B,YAAY,MAAmB;QAC7B,IAAI,CAAC,MAAM,GAAG;YACZ,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,6BAA6B;YACxD,GAAG,MAAM;SACV,CAAC;QAEF,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;YACzB,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO;YAC5B,OAAO,EAAE;gBACP,eAAe,EAAE,UAAU,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;gBACjD,cAAc,EAAE,kBAAkB;gBAClC,8BAA8B,EAAE,IAAI,CAAC,MAAM,CAAC,cAAc;aAC3D;YACD,OAAO,EAAE,KAAK;SACf,CAAC,CAAC;QAEH,0CA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CAC5B,IAAI,CAAC,IAAI,CAAC,yBAAyB,EAAE,YAAY,CAAC;QAEpD,MAAM,EAAE,CAAC,UAAkB,EAAE,YAAiB,EAAE,EAAE,CAChD,IAAI,CAAC,GAAG,CAAC,2BAA2B,UAAU,EAAE,EAAE,YAAY,CAAC;QAEjE,WAAW,EAAE,CAAC,UAAkB,EAAE,EAAE,CAClC,IAAI,CAAC,GAAG,CAAC,2BAA2B,UAAU,UAAU,CAAC;QAE3D,gBAAgB,EAAE,CAAC,UAAkB,EAAE,MAAc,EAAE,EAAE,CACvD,IAAI,CAAC,IAAI,CAAC,2BAA2B,UAAU,iBAAiB,EAAE,EAAE,MAAM,EAAE,CAAC;KAChF,CAAC;IAEF,sBAAsB;IACtB,IAAI,GAAG;QACL,WAAW,EAAE,CAAC,SAAiB,EAAE,OAAe,EAAE,UAA6B,EAAE,EAAE,CACjF,IAAI,CAAC,YAAY,CAAC,kBAAkB,EAAE,UAAU,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;QAE3E,eAAe,EAAE,CAAC,QAAgB,EAAE,EAAE,CACpC,IAAI,CAAC,GAAG,CAAC,oBAAoB,QAAQ,EAAE,CAAC;KAC3C,CAAC;CACH"} \ No newline at end of file diff --git a/servers/toast/dist/apps/index.d.ts b/servers/toast/dist/apps/index.d.ts new file mode 100644 index 0000000..fa8b092 --- /dev/null +++ b/servers/toast/dist/apps/index.d.ts @@ -0,0 +1,123 @@ +export declare const apps: ({ + name: string; + description: string; + version: string; + ui: { + type: string; + layout: string; + sections: ({ + id: string; + title: string; + type: string; + dataSource: string; + } | { + id: string; + title: string; + type: string; + dataSource?: undefined; + })[]; + features?: undefined; + columns?: undefined; + filters?: undefined; + actions?: undefined; + views?: undefined; + dataSource?: undefined; + statusColors?: undefined; + }; +} | { + name: string; + description: string; + version: string; + ui: { + type: string; + sections: ({ + id: string; + title: string; + type: string; + dataSource?: undefined; + } | { + id: string; + title: string; + type: string; + dataSource: string; + })[]; + layout?: undefined; + features?: undefined; + columns?: undefined; + filters?: undefined; + actions?: undefined; + views?: undefined; + dataSource?: undefined; + statusColors?: undefined; + }; +} | { + name: string; + description: string; + version: string; + ui: { + type: string; + features: string[]; + columns: string[]; + filters: string[]; + actions: string[]; + layout?: undefined; + sections?: undefined; + views?: undefined; + dataSource?: undefined; + statusColors?: undefined; + }; +} | { + name: string; + description: string; + version: string; + ui: { + type: string; + views: string[]; + features: string[]; + dataSource: string; + layout?: undefined; + sections?: undefined; + columns?: undefined; + filters?: undefined; + actions?: undefined; + statusColors?: undefined; + }; +} | { + name: string; + description: string; + version: string; + ui: { + type: string; + features: string[]; + dataSource: string; + statusColors: { + available: string; + occupied: string; + reserved: string; + cleaning: string; + }; + layout?: undefined; + sections?: undefined; + columns?: undefined; + filters?: undefined; + actions?: undefined; + views?: undefined; + }; +} | { + name: string; + description: string; + version: string; + ui: { + type: string; + features: string[]; + columns: string[]; + filters: string[]; + dataSource: string; + layout?: undefined; + sections?: undefined; + actions?: undefined; + views?: undefined; + statusColors?: undefined; + }; +})[]; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/servers/toast/dist/apps/index.d.ts.map b/servers/toast/dist/apps/index.d.ts.map new file mode 100644 index 0000000..1f54ac7 --- /dev/null +++ b/servers/toast/dist/apps/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/apps/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA6PhB,CAAC"} \ No newline at end of file diff --git a/servers/toast/dist/apps/index.js b/servers/toast/dist/apps/index.js new file mode 100644 index 0000000..fc0c476 --- /dev/null +++ b/servers/toast/dist/apps/index.js @@ -0,0 +1,256 @@ +// MCP Apps for Toast Server +export const apps = [ + { + name: 'order-dashboard', + description: 'Real-time order dashboard showing active orders, status, and timeline', + version: '1.0.0', + ui: { + type: 'dashboard', + layout: 'grid', + sections: [ + { id: 'active-orders', title: 'Active Orders', type: 'list', dataSource: 'toast_list_orders' }, + { id: 'order-stats', title: 'Order Statistics', type: 'metrics' }, + { id: 'recent-activity', title: 'Recent Activity', type: 'timeline' }, + ], + }, + }, + { + name: 'order-detail', + description: 'Detailed order view with items, payments, and modification history', + version: '1.0.0', + ui: { + type: 'detail', + sections: [ + { id: 'order-info', title: 'Order Information', type: 'info-panel' }, + { id: 'order-items', title: 'Order Items', type: 'table', dataSource: 'toast_list_order_checks' }, + { id: 'order-payments', title: 'Payments', type: 'table' }, + { id: 'order-actions', title: 'Actions', type: 'action-panel' }, + ], + }, + }, + { + name: 'order-grid', + description: 'Searchable grid view of all orders with filters and bulk actions', + version: '1.0.0', + ui: { + type: 'grid', + features: ['search', 'filter', 'sort', 'export', 'bulk-actions'], + columns: ['orderNumber', 'date', 'customer', 'total', 'status', 'server'], + filters: ['dateRange', 'status', 'diningOption', 'server'], + actions: ['view', 'edit', 'void', 'print'], + }, + }, + { + name: 'menu-manager', + description: 'Menu management interface for viewing and editing menus, groups, and items', + version: '1.0.0', + ui: { + type: 'tree-view', + sections: [ + { id: 'menu-tree', title: 'Menu Structure', type: 'hierarchical-tree' }, + { id: 'item-editor', title: 'Item Editor', type: 'form' }, + { id: 'price-manager', title: 'Price Management', type: 'batch-editor' }, + ], + }, + }, + { + name: 'menu-item-detail', + description: 'Detailed menu item view with pricing, modifiers, sales data, and images', + version: '1.0.0', + ui: { + type: 'detail', + sections: [ + { id: 'item-info', title: 'Item Information', type: 'info-panel' }, + { id: 'item-pricing', title: 'Pricing & Cost', type: 'pricing-panel' }, + { id: 'item-modifiers', title: 'Modifiers', type: 'table', dataSource: 'toast_list_item_modifiers' }, + { id: 'item-performance', title: 'Sales Performance', type: 'chart' }, + ], + }, + }, + { + name: 'employee-dashboard', + description: 'Employee management dashboard with roster, schedules, and performance', + version: '1.0.0', + ui: { + type: 'dashboard', + layout: 'grid', + sections: [ + { id: 'employee-list', title: 'Employees', type: 'list', dataSource: 'toast_list_employees' }, + { id: 'employee-stats', title: 'Statistics', type: 'metrics' }, + { id: 'clock-status', title: 'Clock Status', type: 'status-board' }, + { id: 'employee-actions', title: 'Quick Actions', type: 'action-panel' }, + ], + }, + }, + { + name: 'employee-schedule', + description: 'Weekly/monthly schedule view with shift planning and time-off management', + version: '1.0.0', + ui: { + type: 'calendar', + views: ['week', 'month'], + features: ['drag-drop', 'shift-swap', 'time-off-requests'], + dataSource: 'toast_list_shifts', + }, + }, + { + name: 'labor-dashboard', + description: 'Labor cost and productivity dashboard with real-time metrics', + version: '1.0.0', + ui: { + type: 'dashboard', + layout: 'grid', + sections: [ + { id: 'labor-cost', title: 'Labor Cost', type: 'metrics', dataSource: 'toast_get_labor_cost' }, + { id: 'hours-breakdown', title: 'Hours Breakdown', type: 'chart' }, + { id: 'overtime-tracker', title: 'Overtime', type: 'alert-panel' }, + { id: 'productivity', title: 'Productivity Metrics', type: 'scorecard' }, + ], + }, + }, + { + name: 'restaurant-overview', + description: 'Restaurant configuration overview with settings and operational status', + version: '1.0.0', + ui: { + type: 'overview', + sections: [ + { id: 'restaurant-info', title: 'Restaurant Info', type: 'info-panel', dataSource: 'toast_get_restaurant_info' }, + { id: 'revenue-centers', title: 'Revenue Centers', type: 'list', dataSource: 'toast_list_revenue_centers' }, + { id: 'dining-options', title: 'Dining Options', type: 'list', dataSource: 'toast_list_dining_options' }, + { id: 'service-areas', title: 'Service Areas', type: 'list', dataSource: 'toast_list_service_areas' }, + ], + }, + }, + { + name: 'table-map', + description: 'Interactive floor plan showing table status, occupancy, and server assignments', + version: '1.0.0', + ui: { + type: 'floor-plan', + features: ['interactive', 'real-time-status', 'drag-drop-assignment'], + dataSource: 'toast_list_tables', + statusColors: { + available: 'green', + occupied: 'red', + reserved: 'yellow', + cleaning: 'blue', + }, + }, + }, + { + name: 'payment-history', + description: 'Payment transaction history with search, filters, and export', + version: '1.0.0', + ui: { + type: 'grid', + features: ['search', 'filter', 'sort', 'export'], + columns: ['date', 'orderId', 'paymentType', 'amount', 'tip', 'status'], + filters: ['dateRange', 'paymentType', 'status', 'server'], + dataSource: 'toast_list_payments', + }, + }, + { + name: 'inventory-tracker', + description: 'Inventory tracking with stock levels, alerts, and purchase order management', + version: '1.0.0', + ui: { + type: 'dashboard', + layout: 'grid', + sections: [ + { id: 'inventory-list', title: 'Inventory Items', type: 'table', dataSource: 'toast_list_inventory_items' }, + { id: 'low-stock-alerts', title: 'Low Stock Alerts', type: 'alert-panel' }, + { id: 'purchase-orders', title: 'Purchase Orders', type: 'list' }, + { id: 'inventory-actions', title: 'Actions', type: 'action-panel' }, + ], + }, + }, + { + name: 'customer-detail', + description: 'Customer profile with order history, preferences, and contact information', + version: '1.0.0', + ui: { + type: 'detail', + sections: [ + { id: 'customer-info', title: 'Customer Information', type: 'info-panel' }, + { id: 'order-history', title: 'Order History', type: 'table' }, + { id: 'customer-stats', title: 'Customer Statistics', type: 'metrics' }, + { id: 'customer-actions', title: 'Actions', type: 'action-panel' }, + ], + }, + }, + { + name: 'customer-loyalty', + description: 'Loyalty program dashboard with points, rewards, and tier status', + version: '1.0.0', + ui: { + type: 'dashboard', + layout: 'grid', + sections: [ + { id: 'loyalty-overview', title: 'Loyalty Overview', type: 'metrics' }, + { id: 'points-history', title: 'Points History', type: 'timeline' }, + { id: 'rewards-available', title: 'Available Rewards', type: 'card-grid' }, + { id: 'tier-progress', title: 'Tier Progress', type: 'progress-bar' }, + ], + }, + }, + { + name: 'sales-dashboard', + description: 'Comprehensive sales analytics with charts, trends, and comparisons', + version: '1.0.0', + ui: { + type: 'dashboard', + layout: 'grid', + sections: [ + { id: 'sales-overview', title: 'Sales Overview', type: 'metrics', dataSource: 'toast_sales_summary' }, + { id: 'sales-chart', title: 'Sales Trend', type: 'line-chart' }, + { id: 'category-breakdown', title: 'Sales by Category', type: 'pie-chart' }, + { id: 'payment-types', title: 'Payment Methods', type: 'bar-chart' }, + ], + }, + }, + { + name: 'menu-performance', + description: 'Menu item performance analytics with best/worst sellers and profitability', + version: '1.0.0', + ui: { + type: 'analytics', + sections: [ + { id: 'top-items', title: 'Top Selling Items', type: 'ranked-list', dataSource: 'toast_menu_item_performance' }, + { id: 'item-trends', title: 'Item Sales Trends', type: 'multi-line-chart' }, + { id: 'profitability', title: 'Profitability Analysis', type: 'table' }, + { id: 'recommendations', title: 'Recommendations', type: 'insight-panel' }, + ], + }, + }, + { + name: 'tip-summary', + description: 'Tip tracking and distribution dashboard with employee breakdown', + version: '1.0.0', + ui: { + type: 'dashboard', + layout: 'grid', + sections: [ + { id: 'tip-overview', title: 'Tip Overview', type: 'metrics', dataSource: 'toast_tip_summary' }, + { id: 'tip-by-employee', title: 'Tips by Employee', type: 'table' }, + { id: 'tip-trends', title: 'Tip Trends', type: 'line-chart' }, + { id: 'tip-percentage', title: 'Average Tip %', type: 'gauge' }, + ], + }, + }, + { + name: 'revenue-by-hour', + description: 'Hourly revenue breakdown showing peak times and patterns', + version: '1.0.0', + ui: { + type: 'analytics', + sections: [ + { id: 'hourly-chart', title: 'Revenue by Hour', type: 'bar-chart', dataSource: 'toast_revenue_by_hour' }, + { id: 'peak-times', title: 'Peak Times', type: 'highlight-panel' }, + { id: 'day-comparison', title: 'Day-over-Day Comparison', type: 'comparison-chart' }, + { id: 'hourly-metrics', title: 'Hourly Metrics', type: 'table' }, + ], + }, + }, +]; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/servers/toast/dist/apps/index.js.map b/servers/toast/dist/apps/index.js.map new file mode 100644 index 0000000..9a187bc --- /dev/null +++ b/servers/toast/dist/apps/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/apps/index.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAE5B,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB;QACE,IAAI,EAAE,iBAAiB;QACvB,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,EAAE,WAAW,EAAE,UAAU,EAAE,uBAAuB,EAAE;gBACxG,EAAE,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,iBAAiB,EAAE;gBAClE,EAAE,EAAE,EAAE,gBAAgB,EAAE,KAAK,EAAE,yBAAyB,EAAE,IAAI,EAAE,kBAAkB,EAAE;gBACpF,EAAE,EAAE,EAAE,gBAAgB,EAAE,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,OAAO,EAAE;aACjE;SACF;KACF;CACF,CAAC"} \ No newline at end of file diff --git a/servers/toast/dist/main.d.ts b/servers/toast/dist/main.d.ts new file mode 100644 index 0000000..5d7cc14 --- /dev/null +++ b/servers/toast/dist/main.d.ts @@ -0,0 +1,3 @@ +#!/usr/bin/env node +export {}; +//# sourceMappingURL=main.d.ts.map \ No newline at end of file diff --git a/servers/toast/dist/main.d.ts.map b/servers/toast/dist/main.d.ts.map new file mode 100644 index 0000000..28b87d8 --- /dev/null +++ b/servers/toast/dist/main.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/servers/toast/dist/main.js b/servers/toast/dist/main.js new file mode 100644 index 0000000..1602a96 --- /dev/null +++ b/servers/toast/dist/main.js @@ -0,0 +1,14 @@ +#!/usr/bin/env node +import { ToastMCPServer } from './server.js'; +async function main() { + try { + const server = new ToastMCPServer(); + await server.start(); + } + catch (error) { + console.error('Failed to start Toast MCP Server:', error); + process.exit(1); + } +} +main(); +//# sourceMappingURL=main.js.map \ No newline at end of file diff --git a/servers/toast/dist/main.js.map b/servers/toast/dist/main.js.map new file mode 100644 index 0000000..e4b4cb0 --- /dev/null +++ b/servers/toast/dist/main.js.map @@ -0,0 +1 @@ +{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,KAAK,UAAU,IAAI;IACjB,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,cAAc,EAAE,CAAC;QACpC,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,mCAAmC,EAAE,KAAK,CAAC,CAAC;QAC1D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC"} \ No newline at end of file diff --git a/servers/toast/dist/server.d.ts b/servers/toast/dist/server.d.ts new file mode 100644 index 0000000..f06ef6a --- /dev/null +++ b/servers/toast/dist/server.d.ts @@ -0,0 +1,9 @@ +export declare class ToastMCPServer { + private server; + private client; + private tools; + constructor(); + private setupHandlers; + start(): Promise; +} +//# sourceMappingURL=server.d.ts.map \ No newline at end of file diff --git a/servers/toast/dist/server.d.ts.map b/servers/toast/dist/server.d.ts.map new file mode 100644 index 0000000..a4d34ec --- /dev/null +++ b/servers/toast/dist/server.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAqBA,qBAAa,cAAc;IACzB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,MAAM,CAAiB;IAC/B,OAAO,CAAC,KAAK,CAAQ;;IAkDrB,OAAO,CAAC,aAAa;IA0Ef,KAAK;CAKZ"} \ No newline at end of file diff --git a/servers/toast/dist/server.js b/servers/toast/dist/server.js new file mode 100644 index 0000000..f6eb639 --- /dev/null +++ b/servers/toast/dist/server.js @@ -0,0 +1,130 @@ +import { Server } from '@modelcontextprotocol/sdk/server/index.js'; +import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; +import { CallToolRequestSchema, ListToolsRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema, } from '@modelcontextprotocol/sdk/types.js'; +import { ToastAPIClient } from './api-client.js'; +import { registerOrdersTools } from './tools/orders-tools.js'; +import { registerMenusTools } from './tools/menus-tools.js'; +import { registerEmployeesTools } from './tools/employees-tools.js'; +import { registerLaborTools } from './tools/labor-tools.js'; +import { registerRestaurantTools } from './tools/restaurant-tools.js'; +import { registerPaymentsTools } from './tools/payments-tools.js'; +import { registerInventoryTools } from './tools/inventory-tools.js'; +import { registerCustomersTools } from './tools/customers-tools.js'; +import { registerReportingTools } from './tools/reporting-tools.js'; +import { registerCashTools } from './tools/cash-tools.js'; +import { apps } from './apps/index.js'; +export class ToastMCPServer { + server; + client; + tools; + constructor() { + // Get configuration from environment + const apiToken = process.env.TOAST_API_TOKEN; + const restaurantGuid = process.env.TOAST_RESTAURANT_GUID; + const baseUrl = process.env.TOAST_BASE_URL; + if (!apiToken || !restaurantGuid) { + throw new Error('TOAST_API_TOKEN and TOAST_RESTAURANT_GUID environment variables are required'); + } + // Initialize Toast API client + this.client = new ToastAPIClient({ + apiToken, + restaurantGuid, + baseUrl, + }); + // Initialize MCP server + this.server = new Server({ + name: 'toast-mcp-server', + version: '1.0.0', + }, { + capabilities: { + tools: {}, + resources: {}, + }, + }); + // Register all tools + this.tools = [ + ...registerOrdersTools(this.client), + ...registerMenusTools(this.client), + ...registerEmployeesTools(this.client), + ...registerLaborTools(this.client), + ...registerRestaurantTools(this.client), + ...registerPaymentsTools(this.client), + ...registerInventoryTools(this.client), + ...registerCustomersTools(this.client), + ...registerReportingTools(this.client), + ...registerCashTools(this.client), + ]; + this.setupHandlers(); + } + setupHandlers() { + // List available tools + this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ + tools: this.tools.map((tool) => ({ + name: tool.name, + description: tool.description, + inputSchema: tool.inputSchema, + })), + })); + // Execute tool calls + this.server.setRequestHandler(CallToolRequestSchema, async (request) => { + const tool = this.tools.find((t) => t.name === request.params.name); + if (!tool) { + throw new Error(`Tool not found: ${request.params.name}`); + } + try { + return await tool.execute(request.params.arguments); + } + catch (error) { + return { + content: [ + { + type: 'text', + text: `Error executing ${request.params.name}: ${error.message}`, + }, + ], + isError: true, + }; + } + }); + // List resources (MCP apps) + this.server.setRequestHandler(ListResourcesRequestSchema, async () => ({ + resources: apps.map((app) => ({ + uri: `toast://apps/${app.name}`, + name: app.name, + description: app.description, + mimeType: 'application/json', + })), + })); + // Read resource (get app definition) + this.server.setRequestHandler(ReadResourceRequestSchema, async (request) => { + const appName = request.params.uri.replace('toast://apps/', ''); + const app = apps.find((a) => a.name === appName); + if (!app) { + throw new Error(`App not found: ${appName}`); + } + return { + contents: [ + { + uri: request.params.uri, + mimeType: 'application/json', + text: JSON.stringify(app, null, 2), + }, + ], + }; + }); + // Error handling + this.server.onerror = (error) => { + console.error('[MCP Error]', error); + }; + process.on('SIGINT', async () => { + await this.server.close(); + process.exit(0); + }); + } + async start() { + const transport = new StdioServerTransport(); + await this.server.connect(transport); + console.error('Toast MCP Server running on stdio'); + } +} +//# sourceMappingURL=server.js.map \ No newline at end of file diff --git a/servers/toast/dist/server.js.map b/servers/toast/dist/server.js.map new file mode 100644 index 0000000..12fb8c0 --- /dev/null +++ b/servers/toast/dist/server.js.map @@ -0,0 +1 @@ +{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,0BAA0B,EAC1B,yBAAyB,GAC1B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AA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;oBACR;wBACE,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG;wBACvB,QAAQ,EAAE,kBAAkB;wBAC5B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;qBACnC;iBACF;aACF,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,iBAAiB;QACjB,IAAI,CAAC,MAAM,CAAC,OAAO,GAAG,CAAC,KAAK,EAAE,EAAE;YAC9B,OAAO,CAAC,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;QACtC,CAAC,CAAC;QAEF,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;YAC9B,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;YAC1B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,KAAK;QACT,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;QAC7C,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QACrC,OAAO,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC;IACrD,CAAC;CACF"} \ No newline at end of file diff --git a/servers/toast/dist/tools/cash-tools.d.ts b/servers/toast/dist/tools/cash-tools.d.ts new file mode 100644 index 0000000..d41fbae --- /dev/null +++ b/servers/toast/dist/tools/cash-tools.d.ts @@ -0,0 +1,45 @@ +import { z } from 'zod'; +import type { ToastAPIClient } from '../api-client.js'; +export declare function registerCashTools(client: ToastAPIClient): ({ + name: string; + description: string; + inputSchema: z.ZodObject<{ + startDate: z.ZodString; + endDate: z.ZodString; + page: z.ZodOptional; + pageSize: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + startDate: string; + endDate: string; + page?: number | undefined; + pageSize?: number | undefined; + }, { + startDate: string; + endDate: string; + page?: number | undefined; + pageSize?: number | undefined; + }>; + execute: (args: any) => Promise<{ + content: { + type: string; + text: string; + }[]; + }>; +} | { + name: string; + description: string; + inputSchema: z.ZodObject<{ + drawerGuid: z.ZodString; + }, "strip", z.ZodTypeAny, { + drawerGuid: string; + }, { + drawerGuid: string; + }>; + execute: (args: any) => Promise<{ + content: { + type: string; + text: string; + }[]; + }>; +})[]; +//# sourceMappingURL=cash-tools.d.ts.map \ No newline at end of file diff --git a/servers/toast/dist/tools/cash-tools.d.ts.map b/servers/toast/dist/tools/cash-tools.d.ts.map new file mode 100644 index 0000000..29ebaf4 --- /dev/null +++ b/servers/toast/dist/tools/cash-tools.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"cash-tools.d.ts","sourceRoot":"","sources":["../../src/tools/cash-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,cAAc;;;;;;;;;;;;;;;;;;;oBAW5B,GAAG;;;;;;;;;;;;;;;;oBAqBH,GAAG;;;;;;KAa9B"} \ No newline at end of file diff --git a/servers/toast/dist/tools/cash-tools.js b/servers/toast/dist/tools/cash-tools.js new file mode 100644 index 0000000..a1a28f9 --- /dev/null +++ b/servers/toast/dist/tools/cash-tools.js @@ -0,0 +1,48 @@ +import { z } from 'zod'; +export function registerCashTools(client) { + return [ + { + name: 'toast_list_cash_entries', + description: 'List cash entries (paid in/paid out) for a date range', + inputSchema: z.object({ + startDate: z.string().describe('Start date (ISO 8601 format)'), + endDate: z.string().describe('End date (ISO 8601 format)'), + page: z.number().optional().describe('Page number (default: 1)'), + pageSize: z.number().optional().describe('Items per page (default: 100)'), + }), + execute: async (args) => { + const result = await client.cash.listEntries(args.startDate, args.endDate, { + page: args.page, + pageSize: args.pageSize, + }); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_get_drawer_status', + description: 'Get current status of a cash drawer', + inputSchema: z.object({ + drawerGuid: z.string().describe('Cash drawer GUID'), + }), + execute: async (args) => { + const result = await client.cash.getDrawerStatus(args.drawerGuid); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + ]; +} +//# sourceMappingURL=cash-tools.js.map \ No newline at end of file diff --git a/servers/toast/dist/tools/cash-tools.js.map b/servers/toast/dist/tools/cash-tools.js.map new file mode 100644 index 0000000..361137a --- /dev/null +++ b/servers/toast/dist/tools/cash-tools.js.map @@ -0,0 +1 @@ +{"version":3,"file":"cash-tools.js","sourceRoot":"","sources":["../../src/tools/cash-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,UAAU,iBAAiB,CAAC,MAAsB;IACtD,OAAO;QACL;YACE,IAAI,EAAE,yBAAyB;YAC/B,WAAW,EAAE,uDAAuD;YACpE,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;gBACpB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;gBAC9D,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC;gBAC1D,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;gBAChE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;aAC1E,CAAC;YACF,OAAO,EAAE,KAAK,EAAE,IAAS,EAAE,EAAE;gBAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,EAAE;oBACzE,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;iBACxB,CAAC,CAAC;gBACH,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;yBACtC;qBACF;iBACF,CAAC;YACJ,CAAC;SACF;QACD;YACE,IAAI,EAAE,yBAAyB;YAC/B,WAAW,EAAE,qCAAqC;YAClD,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;gBACpB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;aACpD,CAAC;YACF,OAAO,EAAE,KAAK,EAAE,IAAS,EAAE,EAAE;gBAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBAClE,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;yBACtC;qBACF;iBACF,CAAC;YACJ,CAAC;SACF;KACF,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/servers/toast/dist/tools/customers-tools.d.ts b/servers/toast/dist/tools/customers-tools.d.ts new file mode 100644 index 0000000..c2af17a --- /dev/null +++ b/servers/toast/dist/tools/customers-tools.d.ts @@ -0,0 +1,67 @@ +import { z } from 'zod'; +import type { ToastAPIClient } from '../api-client.js'; +export declare function registerCustomersTools(client: ToastAPIClient): ({ + name: string; + description: string; + inputSchema: z.ZodObject<{ + page: z.ZodOptional; + pageSize: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + page?: number | undefined; + pageSize?: number | undefined; + }, { + page?: number | undefined; + pageSize?: number | undefined; + }>; + execute: (args: any) => Promise<{ + content: { + type: string; + text: string; + }[]; + }>; +} | { + name: string; + description: string; + inputSchema: z.ZodObject<{ + customerGuid: z.ZodString; + }, "strip", z.ZodTypeAny, { + customerGuid: string; + }, { + customerGuid: string; + }>; + execute: (args: any) => Promise<{ + content: { + type: string; + text: string; + }[]; + }>; +} | { + name: string; + description: string; + inputSchema: z.ZodObject<{ + firstName: z.ZodString; + lastName: z.ZodString; + email: z.ZodOptional; + phone: z.ZodOptional; + company: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + firstName: string; + lastName: string; + email?: string | undefined; + phone?: string | undefined; + company?: string | undefined; + }, { + firstName: string; + lastName: string; + email?: string | undefined; + phone?: string | undefined; + company?: string | undefined; + }>; + execute: (args: any) => Promise<{ + content: { + type: string; + text: string; + }[]; + }>; +})[]; +//# sourceMappingURL=customers-tools.d.ts.map \ No newline at end of file diff --git a/servers/toast/dist/tools/customers-tools.d.ts.map b/servers/toast/dist/tools/customers-tools.d.ts.map new file mode 100644 index 0000000..ceb189f --- /dev/null +++ b/servers/toast/dist/tools/customers-tools.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"customers-tools.d.ts","sourceRoot":"","sources":["../../src/tools/customers-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,cAAc;;;;;;;;;;;;;oBASjC,GAAG;;;;;;;;;;;;;;;;oBAqBH,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAsBH,GAAG;;;;;;KAuF9B"} \ No newline at end of file diff --git a/servers/toast/dist/tools/customers-tools.js b/servers/toast/dist/tools/customers-tools.js new file mode 100644 index 0000000..015de6c --- /dev/null +++ b/servers/toast/dist/tools/customers-tools.js @@ -0,0 +1,146 @@ +import { z } from 'zod'; +export function registerCustomersTools(client) { + return [ + { + name: 'toast_list_customers', + description: 'List all customers', + inputSchema: z.object({ + page: z.number().optional().describe('Page number (default: 1)'), + pageSize: z.number().optional().describe('Items per page (default: 100)'), + }), + execute: async (args) => { + const result = await client.customers.list({ + page: args.page, + pageSize: args.pageSize, + }); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_get_customer', + description: 'Get details of a specific customer', + inputSchema: z.object({ + customerGuid: z.string().describe('Customer GUID'), + }), + execute: async (args) => { + const result = await client.customers.get(args.customerGuid); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_create_customer', + description: 'Create a new customer', + inputSchema: z.object({ + firstName: z.string().describe('First name'), + lastName: z.string().describe('Last name'), + email: z.string().optional().describe('Email address'), + phone: z.string().optional().describe('Phone number'), + company: z.string().optional().describe('Company name'), + }), + execute: async (args) => { + const customerData = { + firstName: args.firstName, + lastName: args.lastName, + ...(args.email && { email: args.email }), + ...(args.phone && { phone: args.phone }), + ...(args.company && { company: args.company }), + }; + const result = await client.customers.create(customerData); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_update_customer', + description: 'Update an existing customer', + inputSchema: z.object({ + customerGuid: z.string().describe('Customer GUID'), + firstName: z.string().optional().describe('First name'), + lastName: z.string().optional().describe('Last name'), + email: z.string().optional().describe('Email address'), + phone: z.string().optional().describe('Phone number'), + company: z.string().optional().describe('Company name'), + }), + execute: async (args) => { + const updateData = {}; + if (args.firstName) + updateData.firstName = args.firstName; + if (args.lastName) + updateData.lastName = args.lastName; + if (args.email) + updateData.email = args.email; + if (args.phone) + updateData.phone = args.phone; + if (args.company) + updateData.company = args.company; + const result = await client.customers.update(args.customerGuid, updateData); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_list_customer_loyalty', + description: 'List loyalty information for a customer', + inputSchema: z.object({ + customerGuid: z.string().describe('Customer GUID'), + }), + execute: async (args) => { + const result = await client.customers.listLoyalty(args.customerGuid); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_add_loyalty_points', + description: 'Add loyalty points to a customer account', + inputSchema: z.object({ + customerGuid: z.string().describe('Customer GUID'), + points: z.number().describe('Points to add'), + }), + execute: async (args) => { + const result = await client.customers.addLoyaltyPoints(args.customerGuid, args.points); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + ]; +} +//# sourceMappingURL=customers-tools.js.map \ No newline at end of file diff --git a/servers/toast/dist/tools/customers-tools.js.map b/servers/toast/dist/tools/customers-tools.js.map new file mode 100644 index 0000000..d9cf27c --- /dev/null +++ b/servers/toast/dist/tools/customers-tools.js.map @@ -0,0 +1 @@ +{"version":3,"file":"customers-tools.js","sourceRoot":"","sources":["../../src/tools/customers-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,UAAU,sBAAsB,CAAC,MAAsB;IAC3D,OAAO;QACL;YACE,IAAI,EAAE,sBAAsB;YAC5B,WAAW,EAAE,oBAAoB;YACjC,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;gBACpB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;gBAChE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;aAC1E,CAAC;YACF,OAAO,EAAE,KAAK,EAAE,IAAS,EAAE,EAAE;gBAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC;oBACzC,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;iBACxB,CAAC,CAAC;gBACH,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,IAAI,CAAC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O,EAAE;wBACP;4BACE,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;yBACtC;qBACF;iBACF,CAAC;YACJ,CAAC;SACF;QACD;YACE,IAAI,EAAE,0BAA0B;YAChC,WAAW,EAAE,0CAA0C;YACvD,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;gBACpB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC;gBAClD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC;aAC7C,CAAC;YACF,OAAO,EAAE,KAAK,EAAE,IAAS,EAAE,EAAE;gBAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;gBACvF,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;yBACtC;qBACF;iBACF,CAAC;YACJ,CAAC;SACF;KACF,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/servers/toast/dist/tools/employees-tools.d.ts b/servers/toast/dist/tools/employees-tools.d.ts new file mode 100644 index 0000000..47317ff --- /dev/null +++ b/servers/toast/dist/tools/employees-tools.d.ts @@ -0,0 +1,73 @@ +import { z } from 'zod'; +import type { ToastAPIClient } from '../api-client.js'; +export declare function registerEmployeesTools(client: ToastAPIClient): ({ + name: string; + description: string; + inputSchema: z.ZodObject<{ + page: z.ZodOptional; + pageSize: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + page?: number | undefined; + pageSize?: number | undefined; + }, { + page?: number | undefined; + pageSize?: number | undefined; + }>; + execute: (args: any) => Promise<{ + content: { + type: string; + text: string; + }[]; + }>; +} | { + name: string; + description: string; + inputSchema: z.ZodObject<{ + employeeGuid: z.ZodString; + }, "strip", z.ZodTypeAny, { + employeeGuid: string; + }, { + employeeGuid: string; + }>; + execute: (args: any) => Promise<{ + content: { + type: string; + text: string; + }[]; + }>; +} | { + name: string; + description: string; + inputSchema: z.ZodObject<{ + firstName: z.ZodString; + lastName: z.ZodString; + email: z.ZodOptional; + phoneNumber: z.ZodOptional; + externalEmployeeId: z.ZodOptional; + chosenName: z.ZodOptional; + passcode: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + firstName: string; + lastName: string; + email?: string | undefined; + phoneNumber?: string | undefined; + externalEmployeeId?: string | undefined; + chosenName?: string | undefined; + passcode?: string | undefined; + }, { + firstName: string; + lastName: string; + email?: string | undefined; + phoneNumber?: string | undefined; + externalEmployeeId?: string | undefined; + chosenName?: string | undefined; + passcode?: string | undefined; + }>; + execute: (args: any) => Promise<{ + content: { + type: string; + text: string; + }[]; + }>; +})[]; +//# sourceMappingURL=employees-tools.d.ts.map \ No newline at end of file diff --git a/servers/toast/dist/tools/employees-tools.d.ts.map b/servers/toast/dist/tools/employees-tools.d.ts.map new file mode 100644 index 0000000..dc1cd67 --- /dev/null +++ b/servers/toast/dist/tools/employees-tools.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"employees-tools.d.ts","sourceRoot":"","sources":["../../src/tools/employees-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,cAAc;;;;;;;;;;;;;oBASjC,GAAG;;;;;;;;;;;;;;;;oBAqBH,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAwBH,GAAG;;;;;;KAgL9B"} \ No newline at end of file diff --git a/servers/toast/dist/tools/employees-tools.js b/servers/toast/dist/tools/employees-tools.js new file mode 100644 index 0000000..3cab103 --- /dev/null +++ b/servers/toast/dist/tools/employees-tools.js @@ -0,0 +1,230 @@ +import { z } from 'zod'; +export function registerEmployeesTools(client) { + return [ + { + name: 'toast_list_employees', + description: 'List all employees', + inputSchema: z.object({ + page: z.number().optional().describe('Page number (default: 1)'), + pageSize: z.number().optional().describe('Items per page (default: 100)'), + }), + execute: async (args) => { + const result = await client.employees.list({ + page: args.page, + pageSize: args.pageSize, + }); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_get_employee', + description: 'Get details of a specific employee', + inputSchema: z.object({ + employeeGuid: z.string().describe('Employee GUID'), + }), + execute: async (args) => { + const result = await client.employees.get(args.employeeGuid); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_create_employee', + description: 'Create a new employee', + inputSchema: z.object({ + firstName: z.string().describe('First name'), + lastName: z.string().describe('Last name'), + email: z.string().optional().describe('Email address'), + phoneNumber: z.string().optional().describe('Phone number'), + externalEmployeeId: z.string().optional().describe('External employee ID'), + chosenName: z.string().optional().describe('Chosen/preferred name'), + passcode: z.string().optional().describe('Employee passcode'), + }), + execute: async (args) => { + const employeeData = { + firstName: args.firstName, + lastName: args.lastName, + ...(args.email && { email: args.email }), + ...(args.phoneNumber && { phoneNumber: args.phoneNumber }), + ...(args.externalEmployeeId && { externalEmployeeId: args.externalEmployeeId }), + ...(args.chosenName && { chosenName: args.chosenName }), + ...(args.passcode && { passcode: args.passcode }), + }; + const result = await client.employees.create(employeeData); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_update_employee', + description: 'Update an existing employee', + inputSchema: z.object({ + employeeGuid: z.string().describe('Employee GUID'), + firstName: z.string().optional().describe('First name'), + lastName: z.string().optional().describe('Last name'), + email: z.string().optional().describe('Email address'), + phoneNumber: z.string().optional().describe('Phone number'), + chosenName: z.string().optional().describe('Chosen/preferred name'), + disabled: z.boolean().optional().describe('Disabled status'), + }), + execute: async (args) => { + const updateData = {}; + if (args.firstName) + updateData.firstName = args.firstName; + if (args.lastName) + updateData.lastName = args.lastName; + if (args.email) + updateData.email = args.email; + if (args.phoneNumber) + updateData.phoneNumber = args.phoneNumber; + if (args.chosenName) + updateData.chosenName = args.chosenName; + if (args.disabled !== undefined) + updateData.disabled = args.disabled; + const result = await client.employees.update(args.employeeGuid, updateData); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_delete_employee', + description: 'Delete an employee', + inputSchema: z.object({ + employeeGuid: z.string().describe('Employee GUID'), + }), + execute: async (args) => { + const result = await client.employees.delete(args.employeeGuid); + return { + content: [ + { + type: 'text', + text: 'Employee deleted successfully', + }, + ], + }; + }, + }, + { + name: 'toast_list_employee_jobs', + description: 'List all jobs for an employee', + inputSchema: z.object({ + employeeGuid: z.string().describe('Employee GUID'), + }), + execute: async (args) => { + const result = await client.employees.listJobs(args.employeeGuid); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_list_employee_shifts', + description: 'List shifts for an employee within a date range', + inputSchema: z.object({ + employeeGuid: z.string().describe('Employee GUID'), + startDate: z.string().describe('Start date (ISO 8601 format)'), + endDate: z.string().describe('End date (ISO 8601 format)'), + }), + execute: async (args) => { + const result = await client.employees.listShifts(args.employeeGuid, args.startDate, args.endDate); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_clock_in', + description: 'Clock in an employee for a job', + inputSchema: z.object({ + employeeGuid: z.string().describe('Employee GUID'), + jobGuid: z.string().describe('Job GUID'), + }), + execute: async (args) => { + const result = await client.employees.clockIn(args.employeeGuid, args.jobGuid); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_clock_out', + description: 'Clock out an employee from a time entry', + inputSchema: z.object({ + employeeGuid: z.string().describe('Employee GUID'), + timeEntryGuid: z.string().describe('Time entry GUID'), + }), + execute: async (args) => { + const result = await client.employees.clockOut(args.employeeGuid, args.timeEntryGuid); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_list_time_entries', + description: 'List time entries for an employee within a date range', + inputSchema: z.object({ + employeeGuid: z.string().describe('Employee GUID'), + startDate: z.string().describe('Start date (ISO 8601 format)'), + endDate: z.string().describe('End date (ISO 8601 format)'), + }), + execute: async (args) => { + const result = await client.employees.listTimeEntries(args.employeeGuid, args.startDate, args.endDate); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + ]; +} +//# sourceMappingURL=employees-tools.js.map \ No newline at end of file diff --git a/servers/toast/dist/tools/employees-tools.js.map b/servers/toast/dist/tools/employees-tools.js.map new file mode 100644 index 0000000..09af3ee --- /dev/null +++ b/servers/toast/dist/tools/employees-tools.js.map @@ -0,0 +1 @@ +{"version":3,"file":"employees-tools.js","sourceRoot":"","sources":["../../src/tools/employees-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,UAAU,sBAAsB,CAAC,MAAsB;IAC3D,OAAO;QACL;YACE,IAAI,EAAE,sBAAsB;YAC5B,WAAW,EAAE,oBAAoB;YACjC,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;gBACpB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;gBAChE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;aAC1E,CAAC;YACF,OAAO,EAAE,KAAK,EAAE,IAAS,EAAE,EAAE;gBAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,IAAI,CA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3D,CAAC;YACF,OAAO,EAAE,KAAK,EAAE,IAAS,EAAE,EAAE;gBAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,eAAe,CACnD,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,OAAO,CACb,CAAC;gBACF,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;yBACtC;qBACF;iBACF,CAAC;YACJ,CAAC;SACF;KACF,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/servers/toast/dist/tools/inventory-tools.d.ts b/servers/toast/dist/tools/inventory-tools.d.ts new file mode 100644 index 0000000..0377fe6 --- /dev/null +++ b/servers/toast/dist/tools/inventory-tools.d.ts @@ -0,0 +1,14 @@ +import { z } from 'zod'; +import type { ToastAPIClient } from '../api-client.js'; +export declare function registerInventoryTools(client: ToastAPIClient): { + name: string; + description: string; + inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>; + execute: (args: any) => Promise<{ + content: { + type: string; + text: string; + }[]; + }>; +}[]; +//# sourceMappingURL=inventory-tools.d.ts.map \ No newline at end of file diff --git a/servers/toast/dist/tools/inventory-tools.d.ts.map b/servers/toast/dist/tools/inventory-tools.d.ts.map new file mode 100644 index 0000000..8255865 --- /dev/null +++ b/servers/toast/dist/tools/inventory-tools.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"inventory-tools.d.ts","sourceRoot":"","sources":["../../src/tools/inventory-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,cAAc;;;;oBAiEjC,GAAG;;;;;;IA+C9B"} \ No newline at end of file diff --git a/servers/toast/dist/tools/inventory-tools.js b/servers/toast/dist/tools/inventory-tools.js new file mode 100644 index 0000000..2d1a1c7 --- /dev/null +++ b/servers/toast/dist/tools/inventory-tools.js @@ -0,0 +1,115 @@ +import { z } from 'zod'; +export function registerInventoryTools(client) { + return [ + { + name: 'toast_list_inventory_items', + description: 'List all inventory items', + inputSchema: z.object({ + page: z.number().optional().describe('Page number (default: 1)'), + pageSize: z.number().optional().describe('Items per page (default: 100)'), + }), + execute: async (args) => { + const result = await client.inventory.listItems({ + page: args.page, + pageSize: args.pageSize, + }); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_get_inventory_item', + description: 'Get details of a specific inventory item', + inputSchema: z.object({ + itemGuid: z.string().describe('Inventory item GUID'), + }), + execute: async (args) => { + const result = await client.inventory.getItem(args.itemGuid); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_update_inventory_count', + description: 'Update the current quantity of an inventory item', + inputSchema: z.object({ + itemGuid: z.string().describe('Inventory item GUID'), + quantity: z.number().describe('New quantity'), + }), + execute: async (args) => { + const result = await client.inventory.updateCount(args.itemGuid, args.quantity); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_list_vendors', + description: 'List all vendors', + inputSchema: z.object({}), + execute: async (args) => { + const result = await client.inventory.listVendors(); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_create_purchase_order', + description: 'Create a new purchase order', + inputSchema: z.object({ + vendorGuid: z.string().describe('Vendor GUID'), + expectedDeliveryDate: z.string().optional().describe('Expected delivery date (ISO 8601)'), + items: z.array(z.object({ + itemGuid: z.string(), + quantity: z.number(), + unitCost: z.number(), + })).describe('Purchase order items'), + }), + execute: async (args) => { + const poData = { + vendor: { guid: args.vendorGuid }, + ...(args.expectedDeliveryDate && { expectedDeliveryDate: args.expectedDeliveryDate }), + items: args.items.map((item) => ({ + inventoryItem: { guid: item.itemGuid }, + quantity: item.quantity, + unitCost: item.unitCost, + totalCost: item.quantity * item.unitCost, + })), + }; + const result = await client.inventory.createPurchaseOrder(poData); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + ]; +} +//# sourceMappingURL=inventory-tools.js.map \ No newline at end of file diff --git a/servers/toast/dist/tools/inventory-tools.js.map b/servers/toast/dist/tools/inventory-tools.js.map new file mode 100644 index 0000000..0a60cf9 --- /dev/null +++ b/servers/toast/dist/tools/inventory-tools.js.map @@ -0,0 +1 @@ +{"version":3,"file":"inventory-tools.js","sourceRoot":"","sources":["../../src/tools/inventory-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,UAAU,sBAAsB,CAAC,MAAsB;IAC3D,OAAO;QACL;YACE,IAAI,EAAE,4BAA4B;YAClC,WAAW,EAAE,0BAA0B;YACvC,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;gBACpB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;gBAChE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;aAC1E,CAAC;YACF,OAAO,EAAE,KAAK,EAAE,IAAS,EAAE,EAAE;gBAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC;oBAC9C,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;iBACxB,CAAC,CAAC;gBACH,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC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AC,CAAC;wBACpC,aAAa,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE;wBACtC,QAAQ,EAAE,IAAI,CAAC,QAAQ;wBACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;wBACvB,SAAS,EAAE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ;qBACzC,CAAC,CAAC;iBACJ,CAAC;gBACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;gBAClE,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;yBACtC;qBACF;iBACF,CAAC;YACJ,CAAC;SACF;KACF,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/servers/toast/dist/tools/labor-tools.d.ts b/servers/toast/dist/tools/labor-tools.d.ts new file mode 100644 index 0000000..c48dbea --- /dev/null +++ b/servers/toast/dist/tools/labor-tools.d.ts @@ -0,0 +1,14 @@ +import { z } from 'zod'; +import type { ToastAPIClient } from '../api-client.js'; +export declare function registerLaborTools(client: ToastAPIClient): { + name: string; + description: string; + inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>; + execute: (args: any) => Promise<{ + content: { + type: string; + text: string; + }[]; + }>; +}[]; +//# sourceMappingURL=labor-tools.d.ts.map \ No newline at end of file diff --git a/servers/toast/dist/tools/labor-tools.d.ts.map b/servers/toast/dist/tools/labor-tools.d.ts.map new file mode 100644 index 0000000..d98d509 --- /dev/null +++ b/servers/toast/dist/tools/labor-tools.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"labor-tools.d.ts","sourceRoot":"","sources":["../../src/tools/labor-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,cAAc;;;;oBAoF7B,GAAG;;;;;;IAa9B"} \ No newline at end of file diff --git a/servers/toast/dist/tools/labor-tools.js b/servers/toast/dist/tools/labor-tools.js new file mode 100644 index 0000000..e6bb912 --- /dev/null +++ b/servers/toast/dist/tools/labor-tools.js @@ -0,0 +1,100 @@ +import { z } from 'zod'; +export function registerLaborTools(client) { + return [ + { + name: 'toast_list_shifts', + description: 'List all shifts within a date range', + inputSchema: z.object({ + startDate: z.string().describe('Start date (ISO 8601 format)'), + endDate: z.string().describe('End date (ISO 8601 format)'), + page: z.number().optional().describe('Page number (default: 1)'), + pageSize: z.number().optional().describe('Items per page (default: 100)'), + }), + execute: async (args) => { + const result = await client.labor.listShifts(args.startDate, args.endDate, { + page: args.page, + pageSize: args.pageSize, + }); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_get_shift', + description: 'Get details of a specific shift', + inputSchema: z.object({ + shiftGuid: z.string().describe('Shift GUID'), + }), + execute: async (args) => { + const result = await client.labor.getShift(args.shiftGuid); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_list_shift_breaks', + description: 'List all breaks for a specific shift', + inputSchema: z.object({ + shiftGuid: z.string().describe('Shift GUID'), + }), + execute: async (args) => { + const result = await client.labor.listBreaks(args.shiftGuid); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_get_labor_cost', + description: 'Get labor cost summary for a business date', + inputSchema: z.object({ + businessDate: z.string().describe('Business date (YYYYMMDD format)'), + }), + execute: async (args) => { + const result = await client.labor.getLaborCost(args.businessDate); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_list_jobs', + description: 'List all available jobs/positions', + inputSchema: z.object({}), + execute: async (args) => { + const result = await client.labor.listJobs(); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + ]; +} +//# sourceMappingURL=labor-tools.js.map \ No newline at end of file diff --git a/servers/toast/dist/tools/labor-tools.js.map b/servers/toast/dist/tools/labor-tools.js.map new file mode 100644 index 0000000..5bb4a59 --- /dev/null +++ b/servers/toast/dist/tools/labor-tools.js.map @@ -0,0 +1 @@ +{"version":3,"file":"labor-tools.js","sourceRoot":"","sources":["../../src/tools/labor-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,UAAU,kBAAkB,CAAC,MAAsB;IACvD,OAAO;QACL;YACE,IAAI,EAAE,mBAAmB;YACzB,WAAW,EAAE,qCAAqC;YAClD,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;gBACpB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;gBAC9D,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC;gBAC1D,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;gBAChE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;aAC1E,CAAC;YACF,OAAO,EAAE,KAAK,EAAE,IAAS,EAAE,EAAE;gBAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,EAAE;oBACzE,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;iBACxB,CAAC,CAAC;gBACH,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAM;4BACZ,I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AAC,MAAM,CAAC;gBACpB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;aACrE,CAAC;YACF,OAAO,EAAE,KAAK,EAAE,IAAS,EAAE,EAAE;gBAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;gBAClE,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;yBACtC;qBACF;iBACF,CAAC;YACJ,CAAC;SACF;QACD;YACE,IAAI,EAAE,iBAAiB;YACvB,WAAW,EAAE,mCAAmC;YAChD,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;YACzB,OAAO,EAAE,KAAK,EAAE,IAAS,EAAE,EAAE;gBAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;gBAC7C,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;yBACtC;qBACF;iBACF,CAAC;YACJ,CAAC;SACF;KACF,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/servers/toast/dist/tools/menus-tools.d.ts b/servers/toast/dist/tools/menus-tools.d.ts new file mode 100644 index 0000000..2bc6d0b --- /dev/null +++ b/servers/toast/dist/tools/menus-tools.d.ts @@ -0,0 +1,14 @@ +import { z } from 'zod'; +import type { ToastAPIClient } from '../api-client.js'; +export declare function registerMenusTools(client: ToastAPIClient): { + name: string; + description: string; + inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>; + execute: (args: any) => Promise<{ + content: { + type: string; + text: string; + }[]; + }>; +}[]; +//# sourceMappingURL=menus-tools.d.ts.map \ No newline at end of file diff --git a/servers/toast/dist/tools/menus-tools.d.ts.map b/servers/toast/dist/tools/menus-tools.d.ts.map new file mode 100644 index 0000000..8adb7c1 --- /dev/null +++ b/servers/toast/dist/tools/menus-tools.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"menus-tools.d.ts","sourceRoot":"","sources":["../../src/tools/menus-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,cAAc;;;;oBAM7B,GAAG;;;;;;IAiJ9B"} \ No newline at end of file diff --git a/servers/toast/dist/tools/menus-tools.js b/servers/toast/dist/tools/menus-tools.js new file mode 100644 index 0000000..bba89f7 --- /dev/null +++ b/servers/toast/dist/tools/menus-tools.js @@ -0,0 +1,154 @@ +import { z } from 'zod'; +export function registerMenusTools(client) { + return [ + { + name: 'toast_list_menus', + description: 'List all menus for the restaurant', + inputSchema: z.object({}), + execute: async (args) => { + const result = await client.menus.list(); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_get_menu', + description: 'Get details of a specific menu', + inputSchema: z.object({ + menuGuid: z.string().describe('Menu GUID'), + }), + execute: async (args) => { + const result = await client.menus.get(args.menuGuid); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_list_menu_groups', + description: 'List all groups in a menu', + inputSchema: z.object({ + menuGuid: z.string().describe('Menu GUID'), + }), + execute: async (args) => { + const result = await client.menus.listGroups(args.menuGuid); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_get_menu_group', + description: 'Get details of a specific menu group', + inputSchema: z.object({ + menuGuid: z.string().describe('Menu GUID'), + groupGuid: z.string().describe('Menu group GUID'), + }), + execute: async (args) => { + const result = await client.menus.getGroup(args.menuGuid, args.groupGuid); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_list_menu_items', + description: 'List all items in a menu or menu group', + inputSchema: z.object({ + menuGuid: z.string().describe('Menu GUID'), + groupGuid: z.string().optional().describe('Menu group GUID (optional)'), + }), + execute: async (args) => { + const result = await client.menus.listItems(args.menuGuid, args.groupGuid); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_get_menu_item', + description: 'Get details of a specific menu item', + inputSchema: z.object({ + menuGuid: z.string().describe('Menu GUID'), + itemGuid: z.string().describe('Menu item GUID'), + }), + execute: async (args) => { + const result = await client.menus.getItem(args.menuGuid, args.itemGuid); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_list_item_modifiers', + description: 'List all modifier groups for a menu item', + inputSchema: z.object({ + menuGuid: z.string().describe('Menu GUID'), + itemGuid: z.string().describe('Menu item GUID'), + }), + execute: async (args) => { + const result = await client.menus.listModifiers(args.menuGuid, args.itemGuid); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_update_item_price', + description: 'Update the price of a menu item', + inputSchema: z.object({ + menuGuid: z.string().describe('Menu GUID'), + itemGuid: z.string().describe('Menu item GUID'), + price: z.number().describe('New price in cents (e.g., 1299 for $12.99)'), + }), + execute: async (args) => { + const result = await client.menus.updatePrice(args.menuGuid, args.itemGuid, args.price); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + ]; +} +//# sourceMappingURL=menus-tools.js.map \ No newline at end of file diff --git a/servers/toast/dist/tools/menus-tools.js.map b/servers/toast/dist/tools/menus-tools.js.map new file mode 100644 index 0000000..4cda62e --- /dev/null +++ b/servers/toast/dist/tools/menus-tools.js.map @@ -0,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-tools.d.ts b/servers/toast/dist/tools/orders-tools.d.ts new file mode 100644 index 0000000..8c17b1e --- /dev/null +++ b/servers/toast/dist/tools/orders-tools.d.ts @@ -0,0 +1,73 @@ +import { z } from 'zod'; +import type { ToastAPIClient } from '../api-client.js'; +export declare function registerOrdersTools(client: ToastAPIClient): ({ + name: string; + description: string; + inputSchema: z.ZodObject<{ + startDate: z.ZodOptional; + endDate: z.ZodOptional; + page: z.ZodOptional; + pageSize: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + page?: number | undefined; + pageSize?: number | undefined; + startDate?: string | undefined; + endDate?: string | undefined; + }, { + page?: number | undefined; + pageSize?: number | undefined; + startDate?: string | undefined; + endDate?: string | undefined; + }>; + execute: (args: any) => Promise<{ + content: { + type: string; + text: string; + }[]; + }>; +} | { + name: string; + description: string; + inputSchema: z.ZodObject<{ + orderId: z.ZodString; + }, "strip", z.ZodTypeAny, { + orderId: string; + }, { + orderId: string; + }>; + execute: (args: any) => Promise<{ + content: { + type: string; + text: string; + }[]; + }>; +} | { + name: string; + description: string; + inputSchema: z.ZodObject<{ + diningOptionGuid: z.ZodString; + revenueCenterGuid: z.ZodOptional; + tableGuid: z.ZodOptional; + numberOfGuests: z.ZodOptional; + estimatedFulfillmentDate: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + diningOptionGuid: string; + revenueCenterGuid?: string | undefined; + tableGuid?: string | undefined; + numberOfGuests?: number | undefined; + estimatedFulfillmentDate?: string | undefined; + }, { + diningOptionGuid: string; + revenueCenterGuid?: string | undefined; + tableGuid?: string | undefined; + numberOfGuests?: number | undefined; + estimatedFulfillmentDate?: string | undefined; + }>; + execute: (args: any) => Promise<{ + content: { + type: string; + text: string; + }[]; + }>; +})[]; +//# sourceMappingURL=orders-tools.d.ts.map \ No newline at end of file diff --git a/servers/toast/dist/tools/orders-tools.d.ts.map b/servers/toast/dist/tools/orders-tools.d.ts.map new file mode 100644 index 0000000..05e8e73 --- /dev/null +++ b/servers/toast/dist/tools/orders-tools.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"orders-tools.d.ts","sourceRoot":"","sources":["../../src/tools/orders-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,cAAc;;;;;;;;;;;;;;;;;;;oBAW9B,GAAG;;;;;;;;;;;;;;;;oBAyBH,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAsBH,GAAG;;;;;;KAkK9B"} \ No newline at end of file diff --git a/servers/toast/dist/tools/orders-tools.js b/servers/toast/dist/tools/orders-tools.js new file mode 100644 index 0000000..d6c7e6e --- /dev/null +++ b/servers/toast/dist/tools/orders-tools.js @@ -0,0 +1,227 @@ +import { z } from 'zod'; +export function registerOrdersTools(client) { + return [ + { + name: 'toast_list_orders', + description: 'List orders with optional date range filter', + inputSchema: z.object({ + startDate: z.string().optional().describe('Start date (ISO 8601 format)'), + endDate: z.string().optional().describe('End date (ISO 8601 format)'), + page: z.number().optional().describe('Page number (default: 1)'), + pageSize: z.number().optional().describe('Items per page (default: 100)'), + }), + execute: async (args) => { + const result = await client.orders.list({ + startDate: args.startDate, + endDate: args.endDate, + pagination: { + page: args.page, + pageSize: args.pageSize, + }, + }); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_get_order', + description: 'Get details of a specific order by ID', + inputSchema: z.object({ + orderId: z.string().describe('Order GUID'), + }), + execute: async (args) => { + const result = await client.orders.get(args.orderId); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_create_order', + description: 'Create a new order', + inputSchema: z.object({ + diningOptionGuid: z.string().describe('Dining option GUID'), + revenueCenterGuid: z.string().optional().describe('Revenue center GUID'), + tableGuid: z.string().optional().describe('Table GUID'), + numberOfGuests: z.number().optional().describe('Number of guests'), + estimatedFulfillmentDate: z.string().optional().describe('Estimated fulfillment date (ISO 8601)'), + }), + execute: async (args) => { + const orderData = { + diningOption: { guid: args.diningOptionGuid }, + ...(args.revenueCenterGuid && { revenueCenterGuid: args.revenueCenterGuid }), + ...(args.tableGuid && { table: { guid: args.tableGuid } }), + ...(args.numberOfGuests && { numberOfGuests: args.numberOfGuests }), + ...(args.estimatedFulfillmentDate && { estimatedFulfillmentDate: args.estimatedFulfillmentDate }), + }; + const result = await client.orders.create(orderData); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_update_order', + description: 'Update an existing order', + inputSchema: z.object({ + orderId: z.string().describe('Order GUID'), + numberOfGuests: z.number().optional().describe('Number of guests'), + tableGuid: z.string().optional().describe('Table GUID'), + estimatedFulfillmentDate: z.string().optional().describe('Estimated fulfillment date (ISO 8601)'), + }), + execute: async (args) => { + const updateData = {}; + if (args.numberOfGuests !== undefined) + updateData.numberOfGuests = args.numberOfGuests; + if (args.tableGuid) + updateData.table = { guid: args.tableGuid }; + if (args.estimatedFulfillmentDate) + updateData.estimatedFulfillmentDate = args.estimatedFulfillmentDate; + const result = await client.orders.update(args.orderId, updateData); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_add_order_item', + description: 'Add an item to an order check', + inputSchema: z.object({ + orderId: z.string().describe('Order GUID'), + checkGuid: z.string().describe('Check GUID'), + itemGuid: z.string().describe('Menu item GUID'), + quantity: z.number().describe('Quantity'), + modifiers: z.array(z.object({ + guid: z.string(), + quantity: z.number().optional(), + })).optional().describe('Item modifiers'), + specialRequest: z.string().optional().describe('Special instructions'), + }), + execute: async (args) => { + const itemData = { + item: { guid: args.itemGuid }, + quantity: args.quantity, + ...(args.modifiers && { modifiers: args.modifiers }), + ...(args.specialRequest && { specialRequest: args.specialRequest }), + }; + const result = await client.orders.addItem(args.orderId, args.checkGuid, itemData); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_remove_order_item', + description: 'Remove an item from an order check', + inputSchema: z.object({ + orderId: z.string().describe('Order GUID'), + checkGuid: z.string().describe('Check GUID'), + selectionGuid: z.string().describe('Selection GUID to remove'), + }), + execute: async (args) => { + const result = await client.orders.removeItem(args.orderId, args.checkGuid, args.selectionGuid); + return { + content: [ + { + type: 'text', + text: 'Item removed successfully', + }, + ], + }; + }, + }, + { + name: 'toast_apply_discount', + description: 'Apply a discount to an order check', + inputSchema: z.object({ + orderId: z.string().describe('Order GUID'), + checkGuid: z.string().describe('Check GUID'), + discountGuid: z.string().optional().describe('Discount configuration GUID'), + discountAmount: z.number().optional().describe('Discount amount (for fixed amount)'), + discountPercent: z.number().optional().describe('Discount percentage (0-100)'), + }), + execute: async (args) => { + const discountData = {}; + if (args.discountGuid) + discountData.guid = args.discountGuid; + if (args.discountAmount !== undefined) + discountData.amount = args.discountAmount; + if (args.discountPercent !== undefined) + discountData.discountPercent = args.discountPercent; + const result = await client.orders.applyDiscount(args.orderId, args.checkGuid, discountData); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_void_order', + description: 'Void an entire order', + inputSchema: z.object({ + orderId: z.string().describe('Order GUID'), + voidReason: z.string().optional().describe('Reason for voiding'), + }), + execute: async (args) => { + const result = await client.orders.void(args.orderId, args.voidReason); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_list_order_checks', + description: 'List all checks for an order', + inputSchema: z.object({ + orderId: z.string().describe('Order GUID'), + }), + execute: async (args) => { + const result = await client.orders.listChecks(args.orderId); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + ]; +} +//# sourceMappingURL=orders-tools.js.map \ No newline at end of file diff --git a/servers/toast/dist/tools/orders-tools.js.map b/servers/toast/dist/tools/orders-tools.js.map new file mode 100644 index 0000000..3254bcb --- /dev/null +++ b/servers/toast/dist/tools/orders-tools.js.map @@ -0,0 +1 @@ +{"version":3,"file":"orders-tools.js","sourceRoot":"","sources":["../../src/tools/orders-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,UAAU,mBAAmB,CAAC,MAAsB;IACxD,OAAO;QACL;YACE,IAAI,EAAE,mBAAmB;YACzB,WAAW,EAAE,6CAA6C;YAC1D,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;gBACpB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;gBACzE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC;gBACrE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;gBAChE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;aAC1E,CAAC;YACF,OAAO,EAAE,KAAK,EAAE,IAAS,EAAE,EAAE;gBAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;oBACtC,SAAS,EAAE,IAAI,CAAC,SAAS;oBACzB,OAAO,EAAE,IAAI,CAAC,OAAO;oBACrB,UAAU,EAAE;wBACV,IAAI,EAAE,IAAI,CAAC,IAAI;wBACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;qBACxB;iBACF,CAAC,CAAC;gBACH,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;yBACtC;qB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AC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBAC5D,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;yBACtC;qBACF;iBACF,CAAC;YACJ,CAAC;SACF;KACF,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/servers/toast/dist/tools/payments-tools.d.ts b/servers/toast/dist/tools/payments-tools.d.ts new file mode 100644 index 0000000..ec06c8f --- /dev/null +++ b/servers/toast/dist/tools/payments-tools.d.ts @@ -0,0 +1,39 @@ +import { z } from 'zod'; +import type { ToastAPIClient } from '../api-client.js'; +export declare function registerPaymentsTools(client: ToastAPIClient): ({ + name: string; + description: string; + inputSchema: z.ZodObject<{ + paymentGuid: z.ZodString; + }, "strip", z.ZodTypeAny, { + paymentGuid: string; + }, { + paymentGuid: string; + }>; + execute: (args: any) => Promise<{ + content: { + type: string; + text: string; + }[]; + }>; +} | { + name: string; + description: string; + inputSchema: z.ZodObject<{ + startDate: z.ZodString; + endDate: z.ZodString; + }, "strip", z.ZodTypeAny, { + startDate: string; + endDate: string; + }, { + startDate: string; + endDate: string; + }>; + execute: (args: any) => Promise<{ + content: { + type: string; + text: string; + }[]; + }>; +})[]; +//# sourceMappingURL=payments-tools.d.ts.map \ No newline at end of file diff --git a/servers/toast/dist/tools/payments-tools.d.ts.map b/servers/toast/dist/tools/payments-tools.d.ts.map new file mode 100644 index 0000000..e221531 --- /dev/null +++ b/servers/toast/dist/tools/payments-tools.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"payments-tools.d.ts","sourceRoot":"","sources":["../../src/tools/payments-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc;;;;;;;;;;oBAgChC,GAAG;;;;;;;;;;;;;;;;;;;oBA8DH,GAAG;;;;;;KAa9B"} \ No newline at end of file diff --git a/servers/toast/dist/tools/payments-tools.js b/servers/toast/dist/tools/payments-tools.js new file mode 100644 index 0000000..b9257c6 --- /dev/null +++ b/servers/toast/dist/tools/payments-tools.js @@ -0,0 +1,106 @@ +import { z } from 'zod'; +export function registerPaymentsTools(client) { + return [ + { + name: 'toast_list_payments', + description: 'List all payments within a date range', + inputSchema: z.object({ + startDate: z.string().describe('Start date (ISO 8601 format)'), + endDate: z.string().describe('End date (ISO 8601 format)'), + page: z.number().optional().describe('Page number (default: 1)'), + pageSize: z.number().optional().describe('Items per page (default: 100)'), + }), + execute: async (args) => { + const result = await client.payments.list(args.startDate, args.endDate, { + page: args.page, + pageSize: args.pageSize, + }); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_get_payment', + description: 'Get details of a specific payment', + inputSchema: z.object({ + paymentGuid: z.string().describe('Payment GUID'), + }), + execute: async (args) => { + const result = await client.payments.get(args.paymentGuid); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_void_payment', + description: 'Void a payment', + inputSchema: z.object({ + paymentGuid: z.string().describe('Payment GUID'), + voidReason: z.string().optional().describe('Reason for voiding'), + }), + execute: async (args) => { + const result = await client.payments.void(args.paymentGuid, args.voidReason); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_refund_payment', + description: 'Refund a payment', + inputSchema: z.object({ + paymentGuid: z.string().describe('Payment GUID'), + refundAmount: z.number().describe('Amount to refund in cents'), + refundReason: z.string().optional().describe('Reason for refund'), + }), + execute: async (args) => { + const result = await client.payments.refund(args.paymentGuid, args.refundAmount, args.refundReason); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_list_tips', + description: 'List all tips within a date range', + inputSchema: z.object({ + startDate: z.string().describe('Start date (ISO 8601 format)'), + endDate: z.string().describe('End date (ISO 8601 format)'), + }), + execute: async (args) => { + const result = await client.payments.listTips(args.startDate, args.endDate); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + ]; +} +//# sourceMappingURL=payments-tools.js.map \ No newline at end of file diff --git a/servers/toast/dist/tools/payments-tools.js.map b/servers/toast/dist/tools/payments-tools.js.map new file mode 100644 index 0000000..55c272a --- /dev/null +++ b/servers/toast/dist/tools/payments-tools.js.map @@ -0,0 +1 @@ +{"version":3,"file":"payments-tools.js","sourceRoot":"","sources":["../../src/tools/payments-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,UAAU,qBAAqB,CAAC,MAAsB;IAC1D,OAAO;QACL;YACE,IAAI,EAAE,qBAAqB;YAC3B,WAAW,EAAE,uCAAuC;YACpD,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;gBACpB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;gBAC9D,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC;gBAC1D,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;gBAChE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;aAC1E,CAAC;YACF,OAAO,EAAE,KAAK,EAAE,IAAS,EAAE,EAAE;gBAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,EAAE;oBACtE,IAAI,EAA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AE;gBAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;gBAC5E,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;yBACtC;qBACF;iBACF,CAAC;YACJ,CAAC;SACF;KACF,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/servers/toast/dist/tools/reporting-tools.d.ts b/servers/toast/dist/tools/reporting-tools.d.ts new file mode 100644 index 0000000..28a54fc --- /dev/null +++ b/servers/toast/dist/tools/reporting-tools.d.ts @@ -0,0 +1,39 @@ +import { z } from 'zod'; +import type { ToastAPIClient } from '../api-client.js'; +export declare function registerReportingTools(client: ToastAPIClient): ({ + name: string; + description: string; + inputSchema: z.ZodObject<{ + startDate: z.ZodString; + endDate: z.ZodString; + }, "strip", z.ZodTypeAny, { + startDate: string; + endDate: string; + }, { + startDate: string; + endDate: string; + }>; + execute: (args: any) => Promise<{ + content: { + type: string; + text: string; + }[]; + }>; +} | { + name: string; + description: string; + inputSchema: z.ZodObject<{ + businessDate: z.ZodString; + }, "strip", z.ZodTypeAny, { + businessDate: string; + }, { + businessDate: string; + }>; + execute: (args: any) => Promise<{ + content: { + type: string; + text: string; + }[]; + }>; +})[]; +//# sourceMappingURL=reporting-tools.d.ts.map \ No newline at end of file diff --git a/servers/toast/dist/tools/reporting-tools.d.ts.map b/servers/toast/dist/tools/reporting-tools.d.ts.map new file mode 100644 index 0000000..acd0918 --- /dev/null +++ b/servers/toast/dist/tools/reporting-tools.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"reporting-tools.d.ts","sourceRoot":"","sources":["../../src/tools/reporting-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,cAAc;;;;;;;;;;;;;oBASjC,GAAG;;;;;;;;;;;;;;;;oBAqCH,GAAG;;;;;;KA4F9B"} \ No newline at end of file diff --git a/servers/toast/dist/tools/reporting-tools.js b/servers/toast/dist/tools/reporting-tools.js new file mode 100644 index 0000000..02bf6c2 --- /dev/null +++ b/servers/toast/dist/tools/reporting-tools.js @@ -0,0 +1,133 @@ +import { z } from 'zod'; +export function registerReportingTools(client) { + return [ + { + name: 'toast_sales_summary', + description: 'Get sales summary report for a date range', + inputSchema: z.object({ + startDate: z.string().describe('Start date (ISO 8601 format)'), + endDate: z.string().describe('End date (ISO 8601 format)'), + }), + execute: async (args) => { + // This would aggregate data from orders and payments + const orders = await client.orders.list({ + startDate: args.startDate, + endDate: args.endDate, + }); + const payments = await client.payments.list(args.startDate, args.endDate); + // Calculate summary metrics + const summary = { + dateRange: { startDate: args.startDate, endDate: args.endDate }, + orders: orders.data, + payments: payments.data, + summary: { + totalOrders: orders.totalCount, + totalPayments: payments.totalCount, + message: 'Sales summary data retrieved. Process orders and payments to calculate metrics.', + }, + }; + return { + content: [ + { + type: 'text', + text: JSON.stringify(summary, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_labor_cost_report', + description: 'Get labor cost report for a business date', + inputSchema: z.object({ + businessDate: z.string().describe('Business date (YYYYMMDD format)'), + }), + execute: async (args) => { + const result = await client.labor.getLaborCost(args.businessDate); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_menu_item_performance', + description: 'Get menu item sales performance for a date range', + inputSchema: z.object({ + startDate: z.string().describe('Start date (ISO 8601 format)'), + endDate: z.string().describe('End date (ISO 8601 format)'), + }), + execute: async (args) => { + // Fetch orders and aggregate item sales + const orders = await client.orders.list({ + startDate: args.startDate, + endDate: args.endDate, + }); + const report = { + dateRange: { startDate: args.startDate, endDate: args.endDate }, + orders: orders.data, + message: 'Menu item performance data retrieved. Process order selections to calculate metrics.', + }; + return { + content: [ + { + type: 'text', + text: JSON.stringify(report, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_revenue_by_hour', + description: 'Get revenue breakdown by hour for a date range', + inputSchema: z.object({ + startDate: z.string().describe('Start date (ISO 8601 format)'), + endDate: z.string().describe('End date (ISO 8601 format)'), + }), + execute: async (args) => { + const orders = await client.orders.list({ + startDate: args.startDate, + endDate: args.endDate, + }); + const report = { + dateRange: { startDate: args.startDate, endDate: args.endDate }, + orders: orders.data, + message: 'Hourly revenue data retrieved. Process order timestamps to calculate hourly breakdown.', + }; + return { + content: [ + { + type: 'text', + text: JSON.stringify(report, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_tip_summary', + description: 'Get tip summary report for a date range', + inputSchema: z.object({ + startDate: z.string().describe('Start date (ISO 8601 format)'), + endDate: z.string().describe('End date (ISO 8601 format)'), + }), + execute: async (args) => { + const tips = await client.payments.listTips(args.startDate, args.endDate); + return { + content: [ + { + type: 'text', + text: JSON.stringify(tips, null, 2), + }, + ], + }; + }, + }, + ]; +} +//# sourceMappingURL=reporting-tools.js.map \ No newline at end of file diff --git a/servers/toast/dist/tools/reporting-tools.js.map b/servers/toast/dist/tools/reporting-tools.js.map new file mode 100644 index 0000000..274e6bb --- /dev/null +++ b/servers/toast/dist/tools/reporting-tools.js.map @@ -0,0 +1 @@ +{"version":3,"file":"reporting-tools.js","sourceRoot":"","sources":["../../src/tools/reporting-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,UAAU,sBAAsB,CAAC,MAAsB;IAC3D,OAAO;QACL;YACE,IAAI,EAAE,qBAAqB;YAC3B,WAAW,EAAE,2CAA2C;YACxD,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;gBACpB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ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CAAC;gBAE1E,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;yBACpC;qBACF;iBACF,CAAC;YACJ,CAAC;SACF;KACF,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/servers/toast/dist/tools/restaurant-tools.d.ts b/servers/toast/dist/tools/restaurant-tools.d.ts new file mode 100644 index 0000000..94980d1 --- /dev/null +++ b/servers/toast/dist/tools/restaurant-tools.d.ts @@ -0,0 +1,14 @@ +import { z } from 'zod'; +import type { ToastAPIClient } from '../api-client.js'; +export declare function registerRestaurantTools(client: ToastAPIClient): { + name: string; + description: string; + inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>; + execute: (args: any) => Promise<{ + content: { + type: string; + text: string; + }[]; + }>; +}[]; +//# sourceMappingURL=restaurant-tools.d.ts.map \ No newline at end of file diff --git a/servers/toast/dist/tools/restaurant-tools.d.ts.map b/servers/toast/dist/tools/restaurant-tools.d.ts.map new file mode 100644 index 0000000..7b1c1a0 --- /dev/null +++ b/servers/toast/dist/tools/restaurant-tools.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"restaurant-tools.d.ts","sourceRoot":"","sources":["../../src/tools/restaurant-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,cAAc;;;;oBAMlC,GAAG;;;;;;IA+E9B"} \ No newline at end of file diff --git a/servers/toast/dist/tools/restaurant-tools.js b/servers/toast/dist/tools/restaurant-tools.js new file mode 100644 index 0000000..4743919 --- /dev/null +++ b/servers/toast/dist/tools/restaurant-tools.js @@ -0,0 +1,88 @@ +import { z } from 'zod'; +export function registerRestaurantTools(client) { + return [ + { + name: 'toast_get_restaurant_info', + description: 'Get restaurant information and configuration', + inputSchema: z.object({}), + execute: async (args) => { + const result = await client.restaurant.getInfo(); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_list_revenue_centers', + description: 'List all revenue centers for the restaurant', + inputSchema: z.object({}), + execute: async (args) => { + const result = await client.restaurant.listRevenueCenters(); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_list_dining_options', + description: 'List all dining options (dine-in, takeout, delivery, etc.)', + inputSchema: z.object({}), + execute: async (args) => { + const result = await client.restaurant.listDiningOptions(); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_list_service_areas', + description: 'List all service areas (sections) in the restaurant', + inputSchema: z.object({}), + execute: async (args) => { + const result = await client.restaurant.listServiceAreas(); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + { + name: 'toast_list_tables', + description: 'List all tables, optionally filtered by service area', + inputSchema: z.object({ + serviceAreaGuid: z.string().optional().describe('Service area GUID (optional)'), + }), + execute: async (args) => { + const result = await client.restaurant.listTables(args.serviceAreaGuid); + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + }, + }, + ]; +} +//# sourceMappingURL=restaurant-tools.js.map \ No newline at end of file diff --git a/servers/toast/dist/tools/restaurant-tools.js.map b/servers/toast/dist/tools/restaurant-tools.js.map new file mode 100644 index 0000000..89ae9d1 --- /dev/null +++ b/servers/toast/dist/tools/restaurant-tools.js.map @@ -0,0 +1 @@ +{"version":3,"file":"restaurant-tools.js","sourceRoot":"","sources":["../../src/tools/restaurant-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,UAAU,uBAAuB,CAAC,MAAsB;IAC5D,OAAO;QACL;YACE,IAAI,EA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AC;SACF;QACD;YACE,IAAI,EAAE,0BAA0B;YAChC,WAAW,EAAE,qDAAqD;YAClE,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;YACzB,OAAO,EAAE,KAAK,EAAE,IAAS,EAAE,EAAE;gBAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAC;gBAC1D,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;yBACtC;qBACF;iBACF,CAAC;YACJ,CAAC;SACF;QACD;YACE,IAAI,EAAE,mBAAmB;YACzB,WAAW,EAAE,sDAAsD;YACnE,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;gBACpB,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;aAChF,CAAC;YACF,OAAO,EAAE,KAAK,EAAE,IAAS,EAAE,EAAE;gBAC3B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;gBACxE,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;yBACtC;qBACF;iBACF,CAAC;YACJ,CAAC;SACF;KACF,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/servers/toast/dist/types/index.d.ts b/servers/toast/dist/types/index.d.ts new file mode 100644 index 0000000..3642728 --- /dev/null +++ b/servers/toast/dist/types/index.d.ts @@ -0,0 +1,533 @@ +export interface ToastConfig { + apiToken: string; + restaurantGuid: string; + baseUrl?: string; +} +export interface PaginationParams { + page?: number; + pageSize?: number; +} +export interface PaginatedResponse { + data: T[]; + page: number; + pageSize: number; + totalPages: number; + totalCount: number; +} +export interface Order { + guid: string; + entityType: string; + externalId?: string; + openedDate: string; + modifiedDate: string; + promisedDate?: string; + closedDate?: string; + deletedDate?: string; + deleted: boolean; + businessDate: number; + server?: Employee; + pricingFeatures: string[]; + source: string; + duration: number; + diningOption: DiningOption; + checks: Check[]; + table?: Table; + serviceArea?: ServiceArea; + restaurantService: string; + revenueCenterGuid: string; + voided: boolean; + voidDate?: string; + voidBusinessDate?: number; + voidUser?: Employee; + approvalStatus: string; + deliveryInfo?: DeliveryInfo; + numberOfGuests?: number; + estimatedFulfillmentDate?: string; + curbsidePickupInfo?: CurbsidePickupInfo; +} +export interface Check { + guid: string; + entityType: string; + externalId?: string; + openedDate: string; + modifiedDate: string; + deletedDate?: string; + deleted: boolean; + selections: Selection[]; + customer?: Customer; + appliedDiscounts: Discount[]; + amount: number; + taxAmount: number; + totalAmount: number; + payments: Payment[]; + tabName?: string; + paymentStatus: string; + closedDate?: string; + voided: boolean; + voidDate?: string; + voidUser?: Employee; +} +export interface Selection { + guid: string; + entityType: string; + externalId?: string; + itemGroup?: MenuGroup; + item: MenuItem; + optionGroups?: OptionGroup[]; + modifiers?: Modifier[]; + quantity: number; + unitOfMeasure: string; + price: number; + tax: number; + voided: boolean; + voidDate?: string; + voidBusinessDate?: number; + voidUser?: Employee; + displayName: string; + preDiscountPrice: number; + appliedDiscounts: Discount[]; + diningOption: DiningOption; + salesCategory: SalesCategory; + fulfillmentStatus: string; + seat?: number; +} +export interface Discount { + guid: string; + entityType: string; + externalId?: string; + name: string; + amount: number; + discountType: string; + discountPercent?: number; + nonTaxDiscountAmount?: number; + approvalStatus: string; + processingState: string; +} +export interface Menu { + guid: string; + entityType: string; + externalId?: string; + name: string; + visibility: string; + groups: MenuGroup[]; +} +export interface MenuGroup { + guid: string; + entityType: string; + externalId?: string; + name: string; + description?: string; + items: MenuItem[]; + visibility: string; +} +export interface MenuItem { + guid: string; + entityType: string; + externalId?: string; + name: string; + description?: string; + sku?: string; + plu?: string; + price: number; + calories?: number; + visibility: string; + salesCategory?: SalesCategory; + optionGroups?: OptionGroup[]; + modifierGroups?: ModifierGroup[]; + images?: Image[]; + tags?: string[]; + isDiscountable: boolean; + unitOfMeasure: string; +} +export interface OptionGroup { + guid: string; + entityType: string; + name: string; + minSelections: number; + maxSelections: number; + options: Option[]; +} +export interface Option { + guid: string; + entityType: string; + name: string; + price: number; + isDefault: boolean; +} +export interface ModifierGroup { + guid: string; + entityType: string; + name: string; + minSelections: number; + maxSelections: number; + modifiers: Modifier[]; +} +export interface Modifier { + guid: string; + entityType: string; + name: string; + price: number; + calories?: number; +} +export interface SalesCategory { + guid: string; + entityType: string; + name: string; +} +export interface Image { + guid: string; + entityType: string; + url: string; +} +export interface Employee { + guid: string; + entityType: string; + externalId?: string; + firstName: string; + lastName: string; + email?: string; + phoneNumber?: string; + externalEmployeeId?: string; + chosenName?: string; + passcode?: string; + createdDate: string; + modifiedDate: string; + deletedDate?: string; + deleted: boolean; + disabled: boolean; + jobs: Job[]; +} +export interface Job { + guid: string; + entityType: string; + title: string; + wage: number; + wageType: string; +} +export interface Shift { + guid: string; + entityType: string; + createdDate: string; + modifiedDate: string; + deletedDate?: string; + deleted: boolean; + businessDate: number; + inDate: string; + outDate?: string; + employee: Employee; + job: Job; + breaks: Break[]; + regularHours: number; + overtimeHours: number; + totalHours: number; + laborCost: number; + tips?: number; + declaredTips?: number; +} +export interface Break { + guid: string; + entityType: string; + inDate: string; + outDate?: string; + isPaid: boolean; + duration: number; +} +export interface TimeEntry { + guid: string; + entityType: string; + createdDate: string; + businessDate: number; + inDate: string; + outDate?: string; + employee: Employee; + job: Job; + hourlyWage: number; +} +export interface LaborEntry { + guid: string; + entityType: string; + businessDate: number; + employee: Employee; + job: Job; + regularHours: number; + overtimeHours: number; + doubleOvertimeHours: number; + totalHours: number; + regularPay: number; + overtimePay: number; + doubleOvertimePay: number; + totalPay: number; +} +export interface Restaurant { + guid: string; + entityType: string; + name: string; + description?: string; + timeZone: string; + closeoutHour: number; + managementGroupGuid: string; + externalGroupRef?: string; + locationName?: string; + locationCode?: string; + address1?: string; + address2?: string; + city?: string; + stateCode?: string; + zipCode?: string; + country?: string; + phone?: string; + createdDate: string; + modifiedDate: string; +} +export interface RevenueCenter { + guid: string; + entityType: string; + name: string; +} +export interface DiningOption { + guid: string; + entityType: string; + name: string; + behavior: string; + curbside: boolean; +} +export interface ServiceArea { + guid: string; + entityType: string; + name: string; + tables: Table[]; +} +export interface Table { + guid: string; + entityType: string; + name: string; + seatingCapacity: number; + serviceArea?: ServiceArea; +} +export interface Payment { + guid: string; + entityType: string; + externalId?: string; + paymentDate: string; + businessDate: number; + amount: number; + tipAmount: number; + amountTendered: number; + cardEntryMode?: string; + last4Digits?: string; + paymentType: string; + paymentStatus: string; + voidInfo?: VoidInfo; + refundInfo?: RefundInfo; + originalProcessingFee?: number; + server?: Employee; + cashDrawer?: CashDrawer; + otherPayment?: OtherPayment; + houseAccount?: HouseAccount; + cardType?: string; +} +export interface VoidInfo { + voidDate: string; + voidBusinessDate: number; + voidUser: Employee; + voidApprover?: Employee; + voidReason?: string; +} +export interface RefundInfo { + refundDate: string; + refundBusinessDate: number; + refundAmount: number; + refundUser: Employee; + refundReason?: string; +} +export interface OtherPayment { + guid: string; + entityType: string; + name: string; + isDefaultForTakeout: boolean; +} +export interface HouseAccount { + guid: string; + entityType: string; + name: string; +} +export interface InventoryItem { + guid: string; + entityType: string; + name: string; + description?: string; + unitOfMeasure: string; + currentQuantity: number; + parLevel?: number; + reorderPoint?: number; + cost: number; + vendor?: Vendor; + lastCountDate?: string; +} +export interface Vendor { + guid: string; + entityType: string; + name: string; + contactName?: string; + phone?: string; + email?: string; + address?: string; +} +export interface PurchaseOrder { + guid: string; + entityType: string; + orderNumber: string; + vendor: Vendor; + orderDate: string; + expectedDeliveryDate?: string; + status: string; + items: PurchaseOrderItem[]; + totalAmount: number; +} +export interface PurchaseOrderItem { + guid: string; + entityType: string; + inventoryItem: InventoryItem; + quantity: number; + unitCost: number; + totalCost: number; +} +export interface Customer { + guid: string; + entityType: string; + firstName: string; + lastName: string; + email?: string; + phone?: string; + company?: string; + createdDate: string; + modifiedDate: string; + loyaltyPoints?: number; + totalVisits?: number; + totalSpent?: number; +} +export interface LoyaltyAccount { + guid: string; + entityType: string; + customer: Customer; + points: number; + tier?: string; + enrollmentDate: string; + lastActivityDate?: string; +} +export interface CashDrawer { + guid: string; + entityType: string; + name: string; + employee?: Employee; + openedDate?: string; + closedDate?: string; + status: string; + openingFloat: number; + closingCash: number; + expectedCash: number; + variance: number; +} +export interface CashEntry { + guid: string; + entityType: string; + entryDate: string; + businessDate: number; + amount: number; + type: string; + reason?: string; + employee: Employee; + cashDrawer: CashDrawer; +} +export interface SalesSummary { + businessDate: number; + netSales: number; + grossSales: number; + discounts: number; + refunds: number; + tax: number; + tips: number; + totalPayments: number; + guestCount: number; + checkCount: number; + averageCheck: number; + averageGuest: number; + salesByHour: HourlySales[]; + salesByCategory: CategorySales[]; + paymentsByType: PaymentTypeSales[]; +} +export interface HourlySales { + hour: number; + netSales: number; + grossSales: number; + checkCount: number; + guestCount: number; +} +export interface CategorySales { + category: string; + netSales: number; + quantity: number; + percentOfTotal: number; +} +export interface PaymentTypeSales { + paymentType: string; + amount: number; + count: number; + percentOfTotal: number; +} +export interface LaborCostReport { + businessDate: number; + totalHours: number; + totalLaborCost: number; + salesAmount: number; + laborCostPercent: number; + employeeCount: number; + averageHourlyRate: number; + overtimeHours: number; + overtimeCost: number; +} +export interface MenuItemPerformance { + item: MenuItem; + quantitySold: number; + netSales: number; + grossSales: number; + costOfGoods?: number; + grossProfit?: number; + grossProfitMargin?: number; + percentOfTotalSales: number; +} +export interface TipSummary { + businessDate: number; + totalTips: number; + cashTips: number; + cardTips: number; + declaredTips: number; + tipsByEmployee: EmployeeTips[]; + averageTipPercent: number; +} +export interface EmployeeTips { + employee: Employee; + totalTips: number; + cashTips: number; + cardTips: number; + hoursWorked: number; + tipsPerHour: number; +} +export interface DeliveryInfo { + address1: string; + address2?: string; + city: string; + state: string; + zipCode: string; + deliveryNotes?: string; + estimatedDeliveryTime?: string; + deliveryEmployee?: Employee; + deliveryFee?: number; +} +export interface CurbsidePickupInfo { + transportDescription?: string; + transportColor?: string; + notes?: string; + arrivedDate?: string; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/servers/toast/dist/types/index.d.ts.map b/servers/toast/dist/types/index.d.ts.map new file mode 100644 index 0000000..b47920b --- /dev/null +++ b/servers/toast/dist/types/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAGD,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAA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;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,UAAU;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,YAAY,EAAE,CAAC;IAC/B,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,QAAQ,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB;AAGD,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,gBAAgB,CAAC,EAAE,QAAQ,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"} \ No newline at end of file diff --git a/servers/toast/dist/types/index.js b/servers/toast/dist/types/index.js new file mode 100644 index 0000000..4f72bf0 --- /dev/null +++ b/servers/toast/dist/types/index.js @@ -0,0 +1,3 @@ +// Toast API Types +export {}; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/servers/toast/dist/types/index.js.map b/servers/toast/dist/types/index.js.map new file mode 100644 index 0000000..11a97e5 --- /dev/null +++ b/servers/toast/dist/types/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,kBAAkB"} \ No newline at end of file diff --git a/servers/toast/package-lock.json b/servers/toast/package-lock.json new file mode 100644 index 0000000..40b2b11 --- /dev/null +++ b/servers/toast/package-lock.json @@ -0,0 +1,1313 @@ +{ + "name": "@mcpengine/toast-server", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@mcpengine/toast-server", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "@modelcontextprotocol/sdk": "^1.0.4", + "axios": "^1.7.9", + "zod": "^3.24.1" + }, + "bin": { + "toast-mcp": "dist/main.js" + }, + "devDependencies": { + "@types/node": "^22.10.5", + "typescript": "^5.7.3" + } + }, + "node_modules/@hono/node-server": { + "version": "1.19.9", + "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.9.tgz", + "integrity": "sha512-vHL6w3ecZsky+8P5MD+eFfaGTyCeOHUIFYMGpQGbrBTSmNNoxv0if69rEZ5giu36weC5saFuznL411gRX7bJDw==", + "license": "MIT", + "engines": { + "node": ">=18.14.1" + }, + "peerDependencies": { + "hono": "^4" + } + }, + "node_modules/@modelcontextprotocol/sdk": { + "version": "1.26.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.26.0.tgz", + "integrity": "sha512-Y5RmPncpiDtTXDbLKswIJzTqu2hyBKxTNsgKqKclDbhIgg1wgtf1fRuvxgTnRfcnxtvvgbIEcqUOzZrJ6iSReg==", + "license": "MIT", + "dependencies": { + "@hono/node-server": "^1.19.9", + "ajv": "^8.17.1", + "ajv-formats": "^3.0.1", + "content-type": "^1.0.5", + "cors": "^2.8.5", + "cross-spawn": "^7.0.5", + "eventsource": "^3.0.2", + "eventsource-parser": "^3.0.0", + "express": "^5.2.1", + "express-rate-limit": "^8.2.1", + "hono": "^4.11.4", + "jose": "^6.1.3", + "json-schema-typed": "^8.0.2", + "pkce-challenge": "^5.0.0", + "raw-body": "^3.0.0", + "zod": "^3.25 || ^4.0", + "zod-to-json-schema": "^3.25.1" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@cfworker/json-schema": "^4.1.1", + "zod": "^3.25 || ^4.0" + }, + "peerDependenciesMeta": { + "@cfworker/json-schema": { + "optional": true + }, + "zod": { + "optional": false + } + } + }, + "node_modules/@types/node": { + "version": "22.19.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.11.tgz", + "integrity": "sha512-BH7YwL6rA93ReqeQS1c4bsPpcfOmJasG+Fkr6Y59q83f9M1WcBRHR2vM+P9eOisYRcN3ujQoiZY8uk5W+1WL8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/accepts": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", + "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", + "license": "MIT", + "dependencies": { + "mime-types": "^3.0.0", + "negotiator": "^1.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", + "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/axios": { + "version": "1.13.5", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.5.tgz", + "integrity": "sha512-cz4ur7Vb0xS4/KUN0tPWe44eqxrIu31me+fbang3ijiNscE129POzipJJA6zniq2C/Z6sJCjMimjS8Lc/GAs8Q==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.11", + "form-data": "^4.0.5", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/body-parser": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.2.tgz", + "integrity": "sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==", + "license": "MIT", + "dependencies": { + "bytes": "^3.1.2", + "content-type": "^1.0.5", + "debug": "^4.4.3", + "http-errors": "^2.0.0", + "iconv-lite": "^0.7.0", + "on-finished": "^2.4.1", + "qs": "^6.14.1", + "raw-body": "^3.0.1", + "type-is": "^2.0.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/content-disposition": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.1.tgz", + "integrity": "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz", + "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==", + "license": "MIT", + "engines": { + "node": ">=6.6.0" + } + }, + "node_modules/cors": { + "version": "2.8.6", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.6.tgz", + "integrity": "sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==", + "license": "MIT", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/eventsource": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.7.tgz", + "integrity": "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==", + "license": "MIT", + "dependencies": { + "eventsource-parser": "^3.0.1" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/eventsource-parser": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.6.tgz", + "integrity": "sha512-Vo1ab+QXPzZ4tCa8SwIHJFaSzy4R6SHf7BY79rFBDf0idraZWAkYrDjDj8uWaSm3S2TK+hJ7/t1CEmZ7jXw+pg==", + "license": "MIT", + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/express": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz", + "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==", + "license": "MIT", + "peer": true, + "dependencies": { + "accepts": "^2.0.0", + "body-parser": "^2.2.1", + "content-disposition": "^1.0.0", + "content-type": "^1.0.5", + "cookie": "^0.7.1", + "cookie-signature": "^1.2.1", + "debug": "^4.4.0", + "depd": "^2.0.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "finalhandler": "^2.1.0", + "fresh": "^2.0.0", + "http-errors": "^2.0.0", + "merge-descriptors": "^2.0.0", + "mime-types": "^3.0.0", + "on-finished": "^2.4.1", + "once": "^1.4.0", + "parseurl": "^1.3.3", + "proxy-addr": "^2.0.7", + "qs": "^6.14.0", + "range-parser": "^1.2.1", + "router": "^2.2.0", + "send": "^1.1.0", + "serve-static": "^2.2.0", + "statuses": "^2.0.1", + "type-is": "^2.0.1", + "vary": "^1.1.2" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/express-rate-limit": { + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-8.2.1.tgz", + "integrity": "sha512-PCZEIEIxqwhzw4KF0n7QF4QqruVTcF73O5kFKUnGOyjbCCgizBBiFaYpd/fnBLUMPw/BWw9OsiN7GgrNYr7j6g==", + "license": "MIT", + "dependencies": { + "ip-address": "10.0.1" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/express-rate-limit" + }, + "peerDependencies": { + "express": ">= 4.11" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", + "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/finalhandler": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz", + "integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "on-finished": "^2.4.1", + "parseurl": "^1.3.3", + "statuses": "^2.0.1" + }, + "engines": { + "node": ">= 18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", + "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", + "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/form-data/node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/form-data/node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", + "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hono": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/hono/-/hono-4.11.9.tgz", + "integrity": "sha512-Eaw2YTGM6WOxA6CXbckaEvslr2Ne4NFsKrvc0v97JD5awbmeBLO5w9Ho9L9kmKonrwF9RJlW6BxT1PVv/agBHQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=16.9.0" + } + }, + "node_modules/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/iconv-lite": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz", + "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ip-address": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.0.1.tgz", + "integrity": "sha512-NWv9YLW4PoW2B7xtzaS3NCot75m6nK7Icdv0o3lfMceJVRfSoQwqD4wEH5rLwoKJwUiZ/rfpiVBhnaF0FK4HoA==", + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-promise": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", + "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "license": "ISC" + }, + "node_modules/jose": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/jose/-/jose-6.1.3.tgz", + "integrity": "sha512-0TpaTfihd4QMNwrz/ob2Bp7X04yuxJkjRGi4aKmOqwhov54i6u79oCv7T+C7lo70MKH6BesI3vscD1yb/yzKXQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "license": "MIT" + }, + "node_modules/json-schema-typed": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/json-schema-typed/-/json-schema-typed-8.0.2.tgz", + "integrity": "sha512-fQhoXdcvc3V28x7C7BMs4P5+kNlgUURe2jmUT1T//oBRMDrqy1QPelJimwZGo7Hg9VPV3EQV5Bnq4hbFy2vetA==", + "license": "BSD-2-Clause" + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/media-typer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz", + "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/merge-descriptors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz", + "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mime-db": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", + "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", + "license": "MIT", + "dependencies": { + "mime-db": "^1.54.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/negotiator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", + "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-to-regexp": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz", + "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/pkce-challenge": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.1.tgz", + "integrity": "sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ==", + "license": "MIT", + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" + }, + "node_modules/qs": { + "version": "6.14.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.2.tgz", + "integrity": "sha512-V/yCWTTF7VJ9hIh18Ugr2zhJMP01MY7c5kh4J870L7imm6/DIzBsNLTXzMwUA3yZ5b/KBqLx8Kp3uRvd7xSe3Q==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz", + "integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==", + "license": "MIT", + "dependencies": { + "bytes": "~3.1.2", + "http-errors": "~2.0.1", + "iconv-lite": "~0.7.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/router": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz", + "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "depd": "^2.0.0", + "is-promise": "^4.0.0", + "parseurl": "^1.3.3", + "path-to-regexp": "^8.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/send": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/send/-/send-1.2.1.tgz", + "integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.3", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "fresh": "^2.0.0", + "http-errors": "^2.0.1", + "mime-types": "^3.0.2", + "ms": "^2.1.3", + "on-finished": "^2.4.1", + "range-parser": "^1.2.1", + "statuses": "^2.0.2" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/serve-static": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz", + "integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==", + "license": "MIT", + "dependencies": { + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "parseurl": "^1.3.3", + "send": "^1.2.0" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/type-is": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", + "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==", + "license": "MIT", + "dependencies": { + "content-type": "^1.0.5", + "media-typer": "^1.1.0", + "mime-types": "^3.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "license": "ISC" + }, + "node_modules/zod": { + "version": "3.25.76", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", + "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", + "license": "MIT", + "peer": true, + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, + "node_modules/zod-to-json-schema": { + "version": "3.25.1", + "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.25.1.tgz", + "integrity": "sha512-pM/SU9d3YAggzi6MtR4h7ruuQlqKtad8e9S0fmxcMi+ueAK5Korys/aWcV9LIIHTVbj01NdzxcnXSN+O74ZIVA==", + "license": "ISC", + "peerDependencies": { + "zod": "^3.25 || ^4" + } + } + } +} diff --git a/servers/toast/src/api-client.ts b/servers/toast/src/api-client.ts index d416ddb..494cf74 100644 --- a/servers/toast/src/api-client.ts +++ b/servers/toast/src/api-client.ts @@ -37,8 +37,9 @@ export class ToastAPIClient { (response) => response, (error: AxiosError) => { if (error.response) { + const errorData = error.response.data as any; throw new ToastAPIError( - error.response.data?.message || error.message, + errorData?.message || error.message, error.response.status, error.response.data ); diff --git a/servers/toast/src/types/index.ts b/servers/toast/src/types/index.ts index e641138..9be232f 100644 --- a/servers/toast/src/types/index.ts +++ b/servers/toast/src/types/index.ts @@ -79,7 +79,7 @@ export interface Selection { guid: string; entityType: string; externalId?: string; - itemGroup: ItemGroup; + itemGroup?: MenuGroup; item: MenuItem; optionGroups?: OptionGroup[]; modifiers?: Modifier[];