// Copyright © 2022-2026 Partium, Inc. DBA Partium import { Observable } from 'rxjs'; import { BaseService } from '../../core/services/base.service'; import { ServiceProvider } from '../../core/services/service-provider'; import { OcrResponse } from '../models/ocr-response'; import { EventContext, PFile } from '../../core'; export interface OCREventContext extends EventContext { searchSessionId?: string; } /** * Service that provides OCR functionality. */ export interface OcrService { /** * Detect text in an image. * * @param organizationName Name of the organization to use the OCR in. * @param image PFile of the image to use (ideally cropped to the area of interest) * @param eventContext (optional) OCREventContext object to add the missing data that will be logged using the log format V2. * Pass a searchSessionId to associate the OCR-detection with an existing search-session. * @returns The detected texts and the imageId of the image-asset that is generated during OCR-detection. */ detectFromFile(organizationName: string, image: PFile, eventContext?: OCREventContext): Observable; } export declare class OcrServiceImpl extends BaseService implements OcrService { private httpsService; constructor(serviceProvider: ServiceProvider); onCreate(): void; detectFromFile(organizationName: string, image: PFile, eventContext?: OCREventContext): Observable; }