The platform for continuously improving AI agents.
/* tslint:disable */
/* eslint-disable */
/**
* Overbae API
* Backend API for the Overclaw / Overmind platform.
*
* The version of the OpenAPI document: 2.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
import type { TraceStatusEnum } from './TraceStatusEnum';
import {
TraceStatusEnumFromJSON,
TraceStatusEnumFromJSONTyped,
TraceStatusEnumToJSON,
TraceStatusEnumToJSONTyped,
} from './TraceStatusEnum';
/**
* ``GET /api/traces/`` row — one span per trace, its head: the root when it
* has arrived, else the earliest span.
* @export
* @interface RootSpanList
*/
export interface RootSpanList {
/**
*
* @type {string}
* @memberof RootSpanList
*/
readonly traceId: string;
/**
*
* @type {string}
* @memberof RootSpanList
*/
readonly spanId: string;
/**
*
* @type {string}
* @memberof RootSpanList
*/
readonly project: string;
/**
*
* @type {string}
* @memberof RootSpanList
*/
readonly capability: string | null;
/**
*
* @type {string}
* @memberof RootSpanList
*/
readonly capabilityName: string | null;
/**
*
* @type {string}
* @memberof RootSpanList
*/
readonly spanType: string;
/**
*
* @type {string}
* @memberof RootSpanList
*/
readonly operation: string;
/**
*
* @type {string}
* @memberof RootSpanList
*/
readonly name: string;
/**
*
* @type {string}
* @memberof RootSpanList
*/
readonly serviceName: string;
/**
*
* @type {number}
* @memberof RootSpanList
*/
readonly kind: number;
/**
*
* @type {number}
* @memberof RootSpanList
*/
readonly statusCode: number;
/**
*
* @type {string}
* @memberof RootSpanList
*/
readonly statusMessage: string;
/**
*
* @type {string}
* @memberof RootSpanList
*/
readonly errorSummary: string | null;
/**
*
* @type {number}
* @memberof RootSpanList
*/
readonly startTimeNs: number;
/**
*
* @type {number}
* @memberof RootSpanList
*/
readonly endTimeNs: number;
/**
*
* @type {number}
* @memberof RootSpanList
*/
readonly durationNs: number;
/**
*
* @type {number}
* @memberof RootSpanList
*/
readonly totalTokens: number | null;
/**
*
* @type {number}
* @memberof RootSpanList
*/
readonly totalCost: number | null;
/**
*
* @type {number}
* @memberof RootSpanList
*/
readonly cacheReadTokens: number | null;
/**
*
* @type {string}
* @memberof RootSpanList
*/
readonly model: string | null;
/**
*
* @type {string}
* @memberof RootSpanList
*/
readonly conversation: string | null;
/**
*
* @type {any}
* @memberof RootSpanList
*/
readonly feedbackScore: any | null;
/**
*
* @type {Date}
* @memberof RootSpanList
*/
readonly receivedAt: Date;
/**
*
* @type {string}
* @memberof RootSpanList
*/
readonly source: string;
/**
*
* @type {any}
* @memberof RootSpanList
*/
readonly evalAttributes: any | null;
/**
*
* @type {TraceStatusEnum}
* @memberof RootSpanList
*/
readonly traceStatus: TraceStatusEnum;
}
/**
* Check if a given object implements the RootSpanList interface.
*/
export function instanceOfRootSpanList(value: object): value is RootSpanList {
if (!('traceId' in value) || value['traceId'] === undefined) return false;
if (!('spanId' in value) || value['spanId'] === undefined) return false;
if (!('project' in value) || value['project'] === undefined) return false;
if (!('capability' in value) || value['capability'] === undefined) return false;
if (!('capabilityName' in value) || value['capabilityName'] === undefined) return false;
if (!('spanType' in value) || value['spanType'] === undefined) return false;
if (!('operation' in value) || value['operation'] === undefined) return false;
if (!('name' in value) || value['name'] === undefined) return false;
if (!('serviceName' in value) || value['serviceName'] === undefined) return false;
if (!('kind' in value) || value['kind'] === undefined) return false;
if (!('statusCode' in value) || value['statusCode'] === undefined) return false;
if (!('statusMessage' in value) || value['statusMessage'] === undefined) return false;
if (!('errorSummary' in value) || value['errorSummary'] === undefined) return false;
if (!('startTimeNs' in value) || value['startTimeNs'] === undefined) return false;
if (!('endTimeNs' in value) || value['endTimeNs'] === undefined) return false;
if (!('durationNs' in value) || value['durationNs'] === undefined) return false;
if (!('totalTokens' in value) || value['totalTokens'] === undefined) return false;
if (!('totalCost' in value) || value['totalCost'] === undefined) return false;
if (!('cacheReadTokens' in value) || value['cacheReadTokens'] === undefined) return false;
if (!('model' in value) || value['model'] === undefined) return false;
if (!('conversation' in value) || value['conversation'] === undefined) return false;
if (!('feedbackScore' in value) || value['feedbackScore'] === undefined) return false;
if (!('receivedAt' in value) || value['receivedAt'] === undefined) return false;
if (!('source' in value) || value['source'] === undefined) return false;
if (!('evalAttributes' in value) || value['evalAttributes'] === undefined) return false;
if (!('traceStatus' in value) || value['traceStatus'] === undefined) return false;
return true;
}
export function RootSpanListFromJSON(json: any): RootSpanList {
return RootSpanListFromJSONTyped(json, false);
}
export function RootSpanListFromJSONTyped(json: any, ignoreDiscriminator: boolean): RootSpanList {
if (json == null) {
return json;
}
return {
'traceId': json['trace_id'],
'spanId': json['span_id'],
'project': json['project'],
'capability': json['capability'],
'capabilityName': json['capability_name'],
'spanType': json['span_type'],
'operation': json['operation'],
'name': json['name'],
'serviceName': json['service_name'],
'kind': json['kind'],
'statusCode': json['status_code'],
'statusMessage': json['status_message'],
'errorSummary': json['error_summary'],
'startTimeNs': json['start_time_ns'],
'endTimeNs': json['end_time_ns'],
'durationNs': json['duration_ns'],
'totalTokens': json['total_tokens'],
'totalCost': json['total_cost'],
'cacheReadTokens': json['cache_read_tokens'],
'model': json['model'],
'conversation': json['conversation'],
'feedbackScore': json['feedback_score'],
'receivedAt': (new Date(json['received_at'])),
'source': json['source'],
'evalAttributes': json['eval_attributes'],
'traceStatus': TraceStatusEnumFromJSON(json['trace_status']),
};
}
export function RootSpanListToJSON(json: any): RootSpanList {
return RootSpanListToJSONTyped(json, false);
}
export function RootSpanListToJSONTyped(value?: Omit<RootSpanList, 'trace_id'|'span_id'|'project'|'capability'|'capability_name'|'span_type'|'operation'|'name'|'service_name'|'kind'|'status_code'|'status_message'|'error_summary'|'start_time_ns'|'end_time_ns'|'duration_ns'|'total_tokens'|'total_cost'|'cache_read_tokens'|'model'|'conversation'|'feedback_score'|'received_at'|'source'|'eval_attributes'|'trace_status'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
};
}