/* 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 { PromptEventData } from './PromptEventData'; import { PromptEventDataFromJSON, PromptEventDataFromJSONTyped, PromptEventDataToJSON, PromptEventDataToJSONTyped, } from './PromptEventData'; /** * * @export * @interface PromptEvent */ export interface PromptEvent { /** * * @type {string} * @memberof PromptEvent */ id: string; /** * * @type {PromptEventTypeEnum} * @memberof PromptEvent */ type: PromptEventTypeEnum; /** * * @type {number} * @memberof PromptEvent */ timestamp: number; /** * * @type {string} * @memberof PromptEvent */ taskId?: string | null; /** * The conversation this prompt belongs to. * @type {string} * @memberof PromptEvent */ conversationId?: string | null; /** * * @type {PromptEventData} * @memberof PromptEvent */ data: PromptEventData; } /** * @export */ export const PromptEventTypeEnum = { Prompt: 'prompt' } as const; export type PromptEventTypeEnum = typeof PromptEventTypeEnum[keyof typeof PromptEventTypeEnum]; /** * Check if a given object implements the PromptEvent interface. */ export function instanceOfPromptEvent(value: object): value is PromptEvent { 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 PromptEventFromJSON(json: any): PromptEvent { return PromptEventFromJSONTyped(json, false); } export function PromptEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): PromptEvent { 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': PromptEventDataFromJSON(json['data']), }; } export function PromptEventToJSON(json: any): PromptEvent { return PromptEventToJSONTyped(json, false); } export function PromptEventToJSONTyped(value?: PromptEvent | 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': PromptEventDataToJSON(value['data']), }; }