/* 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'; /** * * @export * @interface Conversation */ export interface Conversation { /** * Conversation id. Pass it as `conversationId` on `POST /prompt` to continue this thread. * @type {string} * @memberof Conversation */ id: string; /** * When the first prompt of this conversation was queued. * @type {Date} * @memberof Conversation */ createdAt: Date | null; /** * When its most recent prompt was queued. The list is sorted by this, newest first. * @type {Date} * @memberof Conversation */ lastPromptAt: Date | null; /** * Number of prompts sent to this conversation. * @type {number} * @memberof Conversation */ prompts: number; /** * `true` while a turn is queued or running in this conversation. * @type {boolean} * @memberof Conversation */ running: boolean; /** * Harness the most recent prompt ran on (`claude`, `codex`, `pi`, `opencode`, `prime-agent`, `kimi`). * @type {string} * @memberof Conversation */ lastHarness: string | null; /** * Model id of the most recent prompt that chose one, or `null` when every prompt used the harness default. * @type {string} * @memberof Conversation */ lastModel: string | null; /** * The first 80 characters of the most recent prompt. * @type {string} * @memberof Conversation */ lastPromptPreview: string | null; /** * `true` on the conversation a `POST /prompt` without `new` or `conversationId` would continue: the Box's most recently prompted one. Exactly one conversation is current unless the list is empty. * @type {boolean} * @memberof Conversation */ current: boolean; } /** * Check if a given object implements the Conversation interface. */ export function instanceOfConversation(value: object): value is Conversation { if (!('id' in value) || value['id'] === undefined) return false; if (!('createdAt' in value) || value['createdAt'] === undefined) return false; if (!('lastPromptAt' in value) || value['lastPromptAt'] === undefined) return false; if (!('prompts' in value) || value['prompts'] === undefined) return false; if (!('running' in value) || value['running'] === undefined) return false; if (!('lastHarness' in value) || value['lastHarness'] === undefined) return false; if (!('lastModel' in value) || value['lastModel'] === undefined) return false; if (!('lastPromptPreview' in value) || value['lastPromptPreview'] === undefined) return false; if (!('current' in value) || value['current'] === undefined) return false; return true; } export function ConversationFromJSON(json: any): Conversation { return ConversationFromJSONTyped(json, false); } export function ConversationFromJSONTyped(json: any, ignoreDiscriminator: boolean): Conversation { if (json == null) { return json; } return { 'id': json['id'], 'createdAt': (json['createdAt'] == null ? null : new Date(json['createdAt'])), 'lastPromptAt': (json['lastPromptAt'] == null ? null : new Date(json['lastPromptAt'])), 'prompts': json['prompts'], 'running': json['running'], 'lastHarness': json['lastHarness'], 'lastModel': json['lastModel'], 'lastPromptPreview': json['lastPromptPreview'], 'current': json['current'], }; } export function ConversationToJSON(json: any): Conversation { return ConversationToJSONTyped(json, false); } export function ConversationToJSONTyped(value?: Conversation | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'createdAt': value['createdAt'] == null ? value['createdAt'] : value['createdAt'].toISOString(), 'lastPromptAt': value['lastPromptAt'] == null ? value['lastPromptAt'] : value['lastPromptAt'].toISOString(), 'prompts': value['prompts'], 'running': value['running'], 'lastHarness': value['lastHarness'], 'lastModel': value['lastModel'], 'lastPromptPreview': value['lastPromptPreview'], 'current': value['current'], }; }