/* tslint:disable */ /* eslint-disable */ /** * Boat Public API v1 * Public JSON API for creating, operating, prompting, observing, and exposing Boat sandboxes from backend services, CI jobs, hosted workers, and Boat automation products. The v1 reference intentionally documents the developer integration surface only. Dashboard billing actions are not part of v1. * * The version of the OpenAPI document: 1.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 { ResponseEventData } from './ResponseEventData'; import { ResponseEventDataFromJSON, ResponseEventDataFromJSONTyped, ResponseEventDataToJSON, ResponseEventDataToJSONTyped, } from './ResponseEventData'; /** * Agent response event. Text deltas/finals and tool-call batches are both represented as response events; tool-call batches have `data.tools`. * @export * @interface ResponseEvent */ export interface ResponseEvent { /** * * @type {string} * @memberof ResponseEvent */ id: string; /** * * @type {ResponseEventTypeEnum} * @memberof ResponseEvent */ type: ResponseEventTypeEnum; /** * * @type {number} * @memberof ResponseEvent */ timestamp: number; /** * * @type {string} * @memberof ResponseEvent */ taskId?: string | null; /** * The conversation this response belongs to. * @type {string} * @memberof ResponseEvent */ conversationId?: string | null; /** * * @type {ResponseEventData} * @memberof ResponseEvent */ data: ResponseEventData; } /** * @export */ export const ResponseEventTypeEnum = { Response: 'response' } as const; export type ResponseEventTypeEnum = typeof ResponseEventTypeEnum[keyof typeof ResponseEventTypeEnum]; /** * Check if a given object implements the ResponseEvent interface. */ export function instanceOfResponseEvent(value: object): value is ResponseEvent { if (!('id' in value) || value['id'] === undefined) return false; if (!('type' in value) || value['type'] === undefined) return false; if (!('timestamp' in value) || value['timestamp'] === undefined) return false; if (!('data' in value) || value['data'] === undefined) return false; return true; } export function ResponseEventFromJSON(json: any): ResponseEvent { return ResponseEventFromJSONTyped(json, false); } export function ResponseEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResponseEvent { if (json == null) { return json; } return { 'id': json['id'], 'type': json['type'], 'timestamp': json['timestamp'], 'taskId': json['taskId'] == null ? undefined : json['taskId'], 'conversationId': json['conversationId'] == null ? undefined : json['conversationId'], 'data': ResponseEventDataFromJSON(json['data']), }; } export function ResponseEventToJSON(json: any): ResponseEvent { return ResponseEventToJSONTyped(json, false); } export function ResponseEventToJSONTyped(value?: ResponseEvent | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'type': value['type'], 'timestamp': value['timestamp'], 'taskId': value['taskId'], 'conversationId': value['conversationId'], 'data': ResponseEventDataToJSON(value['data']), }; }