qbo-mcp-ts
Version:
TypeScript QuickBooks Online MCP Server with enhanced features and dual transport support
79 lines • 2.05 kB
TypeScript
/**
* QuickBooks Online API Client with retry logic and error handling
*/
import { QBOConfig } from '../types';
/**
* QuickBooks Online API Client
*/
export declare class QBOApiClient {
private axiosInstance;
private tokens;
private readonly baseUrl;
private readonly authUrl;
private readonly qboConfig;
private tokenRefreshPromise?;
constructor(qboConfig?: QBOConfig);
/**
* Ensure we have a valid access token
*/
private ensureValidToken;
/**
* Refresh the OAuth2 access token
*/
private refreshAccessToken;
/**
* Make a GET request to QuickBooks API
*/
get<T = any>(endpoint: string, params?: any): Promise<T>;
/**
* Make a POST request to QuickBooks API
*/
post<T = any>(endpoint: string, data: any): Promise<T>;
/**
* Make a PUT request to QuickBooks API
*/
put<T = any>(endpoint: string, data: any): Promise<T>;
/**
* Make a DELETE request to QuickBooks API
*/
delete<T = any>(endpoint: string): Promise<T>;
/**
* Execute a query using QuickBooks Query Language
*/
query<T = any>(query: string): Promise<T>;
/**
* Send an email for an entity (invoice, estimate, etc.)
*/
sendEmail(entityType: string, entityId: string, email?: string): Promise<any>;
/**
* Download a PDF for an entity
*/
downloadPDF(entityType: string, entityId: string): Promise<Buffer>;
/**
* Get company info
*/
getCompanyInfo(): Promise<any>;
/**
* Get current user info
*/
getCurrentUser(): Promise<any>;
/**
* Batch operations
*/
batch(operations: Array<{
bId: string;
operation: 'create' | 'update' | 'query' | 'delete';
entity?: string;
data?: any;
query?: string;
}>): Promise<any>;
/**
* Get API limits and usage
*/
getApiLimits(): Promise<{
remaining: number;
limit: number;
reset: Date;
}>;
}
//# sourceMappingURL=client.d.ts.map