UNPKG

traceo-api

Version:

TypeScript client for Traceo Analytics API v2.0 - Auto-generated OpenAPI SDK with performance metrics support

205 lines (204 loc) 6.2 kB
/** * Traceo API * API for Traceo Analytics Platform - Model Context Protocol (MCP) Observability This API receives event data from Traceo SDK and queues it for async processing. Heavy analytics, insights, and aggregations are performed on the backend. * * The version of the OpenAPI document: v2 * Contact: support@traceo.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import type { PublishEventRequestPerformanceMetrics } from './PublishEventRequestPerformanceMetrics'; import type { PublishEventRequestError } from './PublishEventRequestError'; /** * * @export * @interface PublishEventRequest */ export interface PublishEventRequest { /** * ID of the event, typically auto-generated by the Traceo SDK * @type {string} * @memberof PublishEventRequest */ id?: string; /** * ID of the project this event belongs to * @type {string} * @memberof PublishEventRequest */ projectId?: string; /** * ID of the session this event belongs to (REQUIRED) * @type {string} * @memberof PublishEventRequest */ sessionId: string; /** * ISO 8601 timestamp of when the event occurred * @type {Date} * @memberof PublishEventRequest */ timestamp?: Date; /** * Duration of the operation in milliseconds * @type {number} * @memberof PublishEventRequest */ duration?: number; /** * Type of event (e.g., mcp:tools/call, traceo:identify) * @type {string} * @memberof PublishEventRequest */ eventType?: PublishEventRequestEventTypeEnum; /** * Name of the resource accessed (for resource events) * @type {string} * @memberof PublishEventRequest */ resourceName?: string; /** * * @type {PublishEventRequestPerformanceMetrics} * @memberof PublishEventRequest */ performanceMetrics?: PublishEventRequestPerformanceMetrics; /** * Parameters sent with the request * @type {{ [key: string]: any; }} * @memberof PublishEventRequest */ parameters?: { [key: string]: any; }; /** * Response data from the operation * @type {{ [key: string]: any; }} * @memberof PublishEventRequest */ response?: { [key: string]: any; }; /** * Captured explanation of why the actor made this request * @type {string} * @memberof PublishEventRequest */ userIntent?: string; /** * Whether this event represents an error * @type {boolean} * @memberof PublishEventRequest */ isError?: boolean; /** * * @type {PublishEventRequestError} * @memberof PublishEventRequest */ error?: PublishEventRequestError; /** * Actor ID for traceo:identify events * @type {string} * @memberof PublishEventRequest */ identifyActorGivenId?: string; /** * Actor name for traceo:identify events * @type {string} * @memberof PublishEventRequest */ identifyActorName?: string; /** * Additional data for traceo:identify events * @type {{ [key: string]: any; }} * @memberof PublishEventRequest */ identifyData?: { [key: string]: any; }; /** * IP address of the client * @type {string} * @memberof PublishEventRequest */ ipAddress?: string; /** * Programming language of the SDK used * @type {string} * @memberof PublishEventRequest */ sdkLanguage?: string; /** * Version of Traceo SDK being used * @type {string} * @memberof PublishEventRequest */ traceoVersion?: string; /** * Name of the MCP server * @type {string} * @memberof PublishEventRequest */ serverName?: string; /** * Version of the MCP server * @type {string} * @memberof PublishEventRequest */ serverVersion?: string; /** * Name of the MCP client * @type {string} * @memberof PublishEventRequest */ clientName?: string; /** * Version of the MCP client * @type {string} * @memberof PublishEventRequest */ clientVersion?: string; /** * Optional actor ID (legacy field, maps to identify_actor_given_id) * @type {string} * @memberof PublishEventRequest */ actorId?: string; /** * Optional custom event ID (must be unique) * @type {string} * @memberof PublishEventRequest */ eventId?: string; } /** * @export */ export declare const PublishEventRequestEventTypeEnum: { readonly McpPing: "mcp:ping"; readonly McpInitialize: "mcp:initialize"; readonly McpCompletionComplete: "mcp:completion/complete"; readonly McpLoggingSetLevel: "mcp:logging/setLevel"; readonly McpPromptsGet: "mcp:prompts/get"; readonly McpPromptsList: "mcp:prompts/list"; readonly McpResourcesList: "mcp:resources/list"; readonly McpResourcesTemplatesList: "mcp:resources/templates/list"; readonly McpResourcesRead: "mcp:resources/read"; readonly McpResourcesSubscribe: "mcp:resources/subscribe"; readonly McpResourcesUnsubscribe: "mcp:resources/unsubscribe"; readonly McpToolsCall: "mcp:tools/call"; readonly McpToolsList: "mcp:tools/list"; readonly TraceoIdentify: "traceo:identify"; }; export type PublishEventRequestEventTypeEnum = typeof PublishEventRequestEventTypeEnum[keyof typeof PublishEventRequestEventTypeEnum]; /** * Check if a given object implements the PublishEventRequest interface. */ export declare function instanceOfPublishEventRequest(value: object): value is PublishEventRequest; export declare function PublishEventRequestFromJSON(json: any): PublishEventRequest; export declare function PublishEventRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PublishEventRequest; export declare function PublishEventRequestToJSON(json: any): PublishEventRequest; export declare function PublishEventRequestToJSONTyped(value?: PublishEventRequest | null, ignoreDiscriminator?: boolean): any;