/* 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 PromptRun */ export interface PromptRun { /** * * @type {string} * @memberof PromptRun */ id: string; /** * * @type {string} * @memberof PromptRun */ promptId: string; /** * * @type {string} * @memberof PromptRun */ boxId: string; /** * * @type {PromptRunStatusEnum} * @memberof PromptRun */ status: PromptRunStatusEnum; /** * * @type {boolean} * @memberof PromptRun */ done: boolean; /** * * @type {Date} * @memberof PromptRun */ createdAt?: Date | null; /** * * @type {string} * @memberof PromptRun */ model?: string | null; /** * * @type {string} * @memberof PromptRun */ reasoningEffort?: string | null; /** * The conversation this prompt ran in. A Box runs many conversations in parallel; see [Integrated agents](/box/integrated-agents). * @type {string} * @memberof PromptRun */ conversationId?: string | null; } /** * @export */ export const PromptRunStatusEnum = { Sending: 'sending', Queued: 'queued', Running: 'running', Finished: 'finished', Failed: 'failed', Interrupted: 'interrupted' } as const; export type PromptRunStatusEnum = typeof PromptRunStatusEnum[keyof typeof PromptRunStatusEnum]; /** * Check if a given object implements the PromptRun interface. */ export function instanceOfPromptRun(value: object): value is PromptRun { if (!('id' in value) || value['id'] === undefined) return false; if (!('promptId' in value) || value['promptId'] === undefined) return false; if (!('boxId' in value) || value['boxId'] === undefined) return false; if (!('status' in value) || value['status'] === undefined) return false; if (!('done' in value) || value['done'] === undefined) return false; return true; } export function PromptRunFromJSON(json: any): PromptRun { return PromptRunFromJSONTyped(json, false); } export function PromptRunFromJSONTyped(json: any, ignoreDiscriminator: boolean): PromptRun { if (json == null) { return json; } return { 'id': json['id'], 'promptId': json['promptId'], 'boxId': json['boxId'], 'status': json['status'], 'done': json['done'], 'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])), 'model': json['model'] == null ? undefined : json['model'], 'reasoningEffort': json['reasoningEffort'] == null ? undefined : json['reasoningEffort'], 'conversationId': json['conversationId'] == null ? undefined : json['conversationId'], }; } export function PromptRunToJSON(json: any): PromptRun { return PromptRunToJSONTyped(json, false); } export function PromptRunToJSONTyped(value?: PromptRun | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'promptId': value['promptId'], 'boxId': value['boxId'], 'status': value['status'], 'done': value['done'], 'createdAt': value['createdAt'] == null ? value['createdAt'] : value['createdAt'].toISOString(), 'model': value['model'], 'reasoningEffort': value['reasoningEffort'], 'conversationId': value['conversationId'], }; }