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 { ContextSummary } from './ContextSummary';
import {
ContextSummaryFromJSON,
ContextSummaryFromJSONTyped,
ContextSummaryToJSON,
ContextSummaryToJSONTyped,
} from './ContextSummary';
import type { ContextNode } from './ContextNode';
import {
ContextNodeFromJSON,
ContextNodeFromJSONTyped,
ContextNodeToJSON,
ContextNodeToJSONTyped,
} from './ContextNode';
import type { ContextEdge } from './ContextEdge';
import {
ContextEdgeFromJSON,
ContextEdgeFromJSONTyped,
ContextEdgeToJSON,
ContextEdgeToJSONTyped,
} from './ContextEdge';
/**
*
* @export
* @interface ContextPage
*/
export interface ContextPage {
/**
*
* @type {ContextSummary}
* @memberof ContextPage
*/
graph: ContextSummary;
/**
*
* @type {Array<ContextNode>}
* @memberof ContextPage
*/
nodes: Array<ContextNode>;
/**
*
* @type {Array<ContextEdge>}
* @memberof ContextPage
*/
edges: Array<ContextEdge>;
/**
*
* @type {number}
* @memberof ContextPage
*/
total: number;
/**
*
* @type {number}
* @memberof ContextPage
*/
nextOffset: number | null;
}
/**
* Check if a given object implements the ContextPage interface.
*/
export function instanceOfContextPage(value: object): value is ContextPage {
if (!('graph' in value) || value['graph'] === undefined) return false;
if (!('nodes' in value) || value['nodes'] === undefined) return false;
if (!('edges' in value) || value['edges'] === undefined) return false;
if (!('total' in value) || value['total'] === undefined) return false;
if (!('nextOffset' in value) || value['nextOffset'] === undefined) return false;
return true;
}
export function ContextPageFromJSON(json: any): ContextPage {
return ContextPageFromJSONTyped(json, false);
}
export function ContextPageFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContextPage {
if (json == null) {
return json;
}
return {
'graph': ContextSummaryFromJSON(json['graph']),
'nodes': ((json['nodes'] as Array<any>).map(ContextNodeFromJSON)),
'edges': ((json['edges'] as Array<any>).map(ContextEdgeFromJSON)),
'total': json['total'],
'nextOffset': json['next_offset'],
};
}
export function ContextPageToJSON(json: any): ContextPage {
return ContextPageToJSONTyped(json, false);
}
export function ContextPageToJSONTyped(value?: ContextPage | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'graph': ContextSummaryToJSON(value['graph']),
'nodes': ((value['nodes'] as Array<any>).map(ContextNodeToJSON)),
'edges': ((value['edges'] as Array<any>).map(ContextEdgeToJSON)),
'total': value['total'],
'next_offset': value['nextOffset'],
};
}