Skip to content

The platform for continuously improving AI agents.

2.4 KB
Raw Blame
/* 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 { CapturedError } from './CapturedError';
import {
    CapturedErrorFromJSON,
    CapturedErrorFromJSONTyped,
    CapturedErrorToJSON,
    CapturedErrorToJSONTyped,
} from './CapturedError';

/**
 *
 * @export
 * @interface TraceErrorDetails
 */
export interface TraceErrorDetails {
    /**
     *
     * @type {string}
     * @memberof TraceErrorDetails
     */
    summary: string;
    /**
     *
     * @type {Array<CapturedError>}
     * @memberof TraceErrorDetails
     */
    records: Array<CapturedError>;
    /**
     *
     * @type {{ [key: string]: string; }}
     * @memberof TraceErrorDetails
     */
    context: { [key: string]: string; };
}

/**
 * Check if a given object implements the TraceErrorDetails interface.
 */
export function instanceOfTraceErrorDetails(value: object): value is TraceErrorDetails {
    if (!('summary' in value) || value['summary'] === undefined) return false;
    if (!('records' in value) || value['records'] === undefined) return false;
    if (!('context' in value) || value['context'] === undefined) return false;
    return true;
}

export function TraceErrorDetailsFromJSON(json: any): TraceErrorDetails {
    return TraceErrorDetailsFromJSONTyped(json, false);
}

export function TraceErrorDetailsFromJSONTyped(json: any, ignoreDiscriminator: boolean): TraceErrorDetails {
    if (json == null) {
        return json;
    }
    return {

        'summary': json['summary'],
        'records': ((json['records'] as Array<any>).map(CapturedErrorFromJSON)),
        'context': json['context'],
    };
}

export function TraceErrorDetailsToJSON(json: any): TraceErrorDetails {
    return TraceErrorDetailsToJSONTyped(json, false);
}

export function TraceErrorDetailsToJSONTyped(value?: TraceErrorDetails | null, ignoreDiscriminator: boolean = false): any {
    if (value == null) {
        return value;
    }

    return {

        'summary': value['summary'],
        'records': ((value['records'] as Array<any>).map(CapturedErrorToJSON)),
        'context': value['context'],
    };
}