import type * as Extend from "../index"; /** * Classify run object. */ export interface ClassifyRun { /** The type of object. Will always be `"classify_run"`. */ object: "classify_run"; /** * The unique identifier for this classify run. * * Example: `"clr_Xj8mK2pL9nR4vT7qY5wZ"` */ id: string; status: Extend.ProcessorRunStatus; /** * The final output, either reviewed or initial. * * **Availability:** Present when `status` is `"PROCESSED"`. */ output: Extend.ClassifyOutput | null; /** * The classifier that was used for this run. * * **Availability:** Present when a classifier reference was provided. Not present when using inline `config`. */ classifier: Extend.ClassifierSummary | null; /** * The version of the classifier that was used for this run. * * **Availability:** Present when a classifier reference was provided. Not present when using inline `config`. */ classifierVersion: Extend.ClassifierVersionSummary | null; /** * The initial output from the classify run, before any review edits. * * **Availability:** Present when `reviewed` is `true`. */ initialOutput: Extend.ClassifyOutput | null; /** * The output after human review. * * **Availability:** Present when `reviewed` is `true`. */ reviewedOutput: Extend.ClassifyOutput | null; /** * The reason for failure. * * **Availability:** Present when `status` is `"FAILED"`. * * Possible values include: * * `ABORTED` - The run was aborted by the user * * `INTERNAL_ERROR` - An unexpected internal error occurred * * `FAILED_TO_PROCESS_FILE` - Failed to process the file (e.g., OCR failure, file access issues) * * `INVALID_PROCESSOR` - The processor configuration is invalid * * `INVALID_CONFIGURATION` - The provided configuration is incompatible with the selected model * * `PARSING_ERROR` - Failed to parse the classification output * * `PRE_PROCESSING_FAILURE` - An error occurred during preprocessing * * `POST_PROCESSING_FAILURE` - An error occurred during postprocessing * * `OUT_OF_CREDITS` - Insufficient credits to run the classification * * **Note:** Additional failure reasons may be added in the future. Your integration should handle unknown values gracefully. */ failureReason: string | null; /** * A detailed message about the failure. * * **Availability:** Present when `status` is `"FAILED"`. */ failureMessage: string | null; /** * Any metadata that was provided when creating the classify run. * * **Availability:** Present when metadata was provided during creation. */ metadata: Extend.RunMetadata | null; /** Indicates whether the run has been reviewed by a human. */ reviewed: boolean; /** Indicates whether the run results have been edited during review. */ edited: boolean; /** The configuration used for this classify run. */ config: Extend.ClassifyConfig; /** The file that was processed. */ file: Extend.FileSummary; /** * The ID of the parse run that was used for this classify run. * * **Availability:** Present when a parse run was created. */ parseRunId: string | null; /** The URL to view the classify run in the Extend dashboard. */ dashboardUrl: string; /** * Usage credits consumed by this classify run. * * **Availability:** Present when `status` is `"PROCESSED"`. Will not be returned for runs created before October 7, 2025 or for customers on legacy billing systems. */ usage: Extend.RunUsage | null; createdAt: Extend.CreatedAt; updatedAt: Extend.UpdatedAt; }