stopRunningHandler | — | void | Stops any ongoing process in the Vision SDK (e.g. scanning or image processing). | visionSdkRef.current.stopRunningHandler() |
cameraCaptureHandler | — | void | Triggers the camera to capture an image for processing. | visionSdkRef.current.cameraCaptureHandler() |
restartScanningHandler | — | void | Restarts the scanning process after it has been stopped or interrupted. | visionSdkRef.current.restartScanningHandler() |
startRunningHandler | — | void | Starts the scanning or image‑processing task in the Vision SDK. | visionSdkRef.current.startRunningHandler() |
setMetadata | value: any | void | Sets arbitrary metadata to be sent along with the next capture or scan. | visionSdkRef.current.setMetadata({ orderId: 12345, customerName: 'John Doe' }) |
setRecipient | value: any | void | Sets recipient details (e.g. name, address) for shipping‑label workflows. | visionSdkRef.current.setRecipient({ name: 'Jane Smith', address: '123 Main St' }) |
setSender | value: any | void | Sets sender details (e.g. name, address) for shipping‑label workflows. | visionSdkRef.current.setSender({ name: 'John Doe', address: '456 Elm St' }) |
configureOnDeviceModel | payload: { type: ModuleType; size?: ModuleSize }, token?: string, apiKey?: string | void | Configures which on‑device model to use (e.g. item_label, shipping_label) and optionally its size. | visionSdkRef.current.configureOnDeviceModel({ type: 'item_label', size: 'small' }) |
getPrediction | image: any, barcode: string[] | void | Processes an image plus barcodes client‑side (on‑device) to get a prediction. | visionSdkRef.current.getPrediction(image, ['1234567890']) |
getPredictionWithCloudTransformations | image: any, barcode: string[], token?: string, apiKey?: string, locationId?: string, options?: any, metadata?: any, recipient?: any, sender?: any, shouldResizeImage?: boolean | void | Sends image & barcode to cloud with optional resizing and extra context for advanced transformations. | visionSdkRef.current.getPredictionWithCloudTransformations(image, ['1234567890']) |
getPredictionShippingLabelCloud | image: any, barcode: string[], token?: string, apiKey?: string, locationId?: string, options?: Record<string, any>, metadata?: any, recipient?: any, sender?: any, shouldResizeImage?: boolean | void | Sends a shipping‑label image & barcodes to cloud for OCR/prediction. | visionSdkRef.current.getPredictionShippingLabelCloud(image, ['9876543210']) |
getPredictionBillOfLadingCloud | image: any, barcode: string[], token?: string, apiKey?: string, locationId?: string, options?: Record<string, any>, shouldResizeImage?: boolean | void | Sends a bill‑of‑lading image & barcodes to cloud for OCR/prediction. | visionSdkRef.current.getPredictionBillOfLadingCloud(image, ['1234567890']) |
getPredictionItemLabelCloud | image: string, token?: string, apiKey?: string, shouldResizeImage?: boolean | void | Sends an item‑label image to cloud for OCR/prediction. | visionSdkRef.current.getPredictionItemLabelCloud(image) |
getPredictionDocumentClassificationCloud | image: string, token?: string, apiKey?: string, shouldResizeImage?: boolean | void | Sends a document image to cloud for classification & OCR. | visionSdkRef.current.getPredictionDocumentClassificationCloud(image) |
reportError | payload: ReportErrorType, token?: string, apiKey?: string | void | Reports a custom error (with type & size) to the SDK for debugging or telemetry. | visionSdkRef.current.reportError({ reportText: 'Error processing image.', type: 'shipping_label', size: 'small' }) |
createTemplate | callback?: (res: any, err: any) => void | void | Creates a new template in the SDK. | visionSdkRef.current.createTemplate((res, err) => { /* ... */ }) |
getAllTemplates | — | void | Retrieves all saved templates from the SDK. | visionSdkRef.current.getAllTemplates() |
deleteTemplateWithId | id: string | void | Deletes a specific template by its ID. | visionSdkRef.current.deleteTemplateWithId('template123') |
deleteAllTemplates | id: string | void | Deletes all templates stored in the SDK. (takes a dummy id param) | visionSdkRef.current.deleteAllTemplates() |
setFocusSettings | settings: any | void | Configures the SDK’s camera focus settings (e.g. autoFocus). | visionSdkRef.current.setFocusSettings({ autoFocus: true }) |
setObjectDetectionSettings | settings: any | void | Configures object‑detection parameters (e.g. confidence threshold). | visionSdkRef.current.setObjectDetectionSettings({ confidenceThreshold: 0.85 }) |
setCameraSettings | settings: any | void | Configures camera parameters (e.g. resolution, exposure) for optimal capture. | visionSdkRef.current.setCameraSettings({ resolution: 'high', exposure: 'auto' }) |