WrapperSessionParameters Documentation

Human Readable Documentation

Linked above is the complete human-readable documentation for the WrapperSessionParameters JSON Schema. This schema defines all request and response types used by the Infinity Plugin, including scan start/stop requests, scan results, UCR reporting, and cached events export.

Raw JSON Schemas

Below you can find the full JSON Schema used for the WrapperSessionParameters classes.

WrapperSessionParameters JSON Schema
{
  "$schema": "http://json-schema.org/draft-07/schema",
  "title": "WrapperSessionParameters",
  "description": "Top-level schema encompassing all request and response types exchanged between the wrapper plugin and the Anyline SDK during a scanning session.",
  "type": "object",
  "properties": {
    "sdkInitializationRequest": {
      "$ref": "#/definitions/wrapperSessionSdkInitializationRequest"
    },
    "sdkInitializationResponse": {
      "$ref": "#/definitions/wrapperSessionSdkInitializationResponse"
    },
    "scanStartRequest": {
      "$ref": "#/definitions/wrapperSessionScanStartRequest"
    },
    "scanStopRequest": {
      "$ref": "#/definitions/wrapperSessionScanStopRequest"
    },
    "scanResultsResponse": {
      "$ref": "#/definitions/wrapperSessionScanResultsResponse"
    },
    "scanResponse": {
      "$ref": "#/definitions/wrapperSessionScanResponse"
    },
    "scanViewConfigOptions": {
      "$ref": "#/definitions/wrapperSessionScanViewConfigOptions"
    },
    "ucrReportRequest": {
      "$ref": "#/definitions/wrapperSessionUCRReportRequest"
    },
    "ucrReportResponse": {
      "$ref": "#/definitions/wrapperSessionUCRReportResponse"
    },
    "exportCachedEventsResponse": {
      "$ref": "#/definitions/wrapperSessionExportCachedEventsResponse"
    }
  },
  "definitions": {
    "wrapperSessionSdkInitializationCacheConfig": {
      "title": "WrapperSessionSdkInitializationCacheConfig",
      "description": "Cache configuration to be applied on SDK initialization.",
      "type": "object",
      "properties": {
        "offlineLicenseCachingEnabled": {
          "description": "Whether offline license caching is enabled.",
          "type": "boolean",
          "default": false
        }
      }
    },
    "wrapperSessionSdkInitializationRequest": {
      "title": "WrapperSessionSdkInitializationRequest",
      "description": "General information to be used for SDK initialization.",
      "type": "object",
      "properties": {
        "licenseKey": {
          "description": "Anyline license key to be used for SDK initialization.",
          "type": "string"
        },
        "assetPathPrefix": {
          "description": "Root folder path the SDK uses when resolving asset files. Leave empty to use the default asset location.",
          "type": "string",
          "default": ""
        },
        "cacheConfig": {
          "description": "Optional cache settings applied during initialization.",
          "$ref": "#/definitions/wrapperSessionSdkInitializationCacheConfig"
        }
      },
      "required": [
        "licenseKey"
      ]
    },
    "wrapperSessionSdkInitializationResponseNotInitialized": {
      "title": "WrapperSessionSdkInitializationResponseNotInitialized",
      "description": "Details about a failed SDK initialization attempt.",
      "type": "object",
      "properties": {
        "lastError": {
          "description": "The last error received while trying to initialize the SDK.",
          "type": "string"
        }
      }
    },
    "wrapperSessionSdkInitializationResponseInitialized": {
      "title": "WrapperSessionSdkInitializationResponseInitialized",
      "description": "Details about a successful SDK initialization.",
      "type": "object",
      "properties": {
        "expiryDate": {
          "description": "License expiry date in ISO 8601 format (YYYY-MM-DD).",
          "type": "string"
        }
      }
    },
    "wrapperSessionSdkInitializationResponse": {
      "title": "WrapperSessionSdkInitializationResponse",
      "description": "Response containing SDK initialization result. Must include either failInfo (if initialization failed) or succeedInfo (if successful). The 'initialized' boolean indicates the overall status.",
      "type": "object",
      "allOf": [
        {
          "oneOf": [
            {
              "required": [
                "failInfo"
              ]
            },
            {
              "required": [
                "succeedInfo"
              ]
            }
          ]
        }
      ],
      "properties": {
        "initialized": {
          "description": "True if SDK initialization succeeded and scanning is available, false if initialization failed.",
          "type": "boolean",
          "default": false
        },
        "failInfo": {
          "description": "Populated when initialized is false. Contains the error that prevented SDK initialization.",
          "$ref": "#/definitions/wrapperSessionSdkInitializationResponseNotInitialized"
        },
        "succeedInfo": {
          "description": "Populated when initialized is true. Contains license details from the successful initialization.",
          "$ref": "#/definitions/wrapperSessionSdkInitializationResponseInitialized"
        }
      }
    },
    "wrapperSessionScanResultCallbackConfig": {
      "title": "WrapperSessionScanResultCallbackConfig",
      "description": "Deprecated. Used only by the legacy plugin. Configuration for callback method names invoked during scanning events.",
      "type": "object",
      "properties": {
        "onResultEventName": {
          "description": "Name of the callback method to invoke when scan results are available. Method will receive a list of ExportedScanResult as parameter.",
          "type": "string"
        },
        "onUIElementClickedEventName": {
          "description": "Name of the callback method to invoke when user taps a UI feedback element during scanning. Method receives a UIFeedbackElementConfig as parameter.",
          "type": "string"
        }
      }
    },
    "wrapperSessionScanResultCleanStrategyConfig": {
      "title": "WrapperSessionScanResultCleanStrategyConfig",
      "description": "Controls when previously generated result files are removed from storage.",
      "type": "string",
      "enum": [
        "cleanFolderOnStartScanning",
        "deleteResultFilesOnFinishScanning",
        "keepResultFiles"
      ],
      "default": "cleanFolderOnStartScanning"
    },
    "wrapperSessionScanResultConfig": {
      "title": "WrapperSessionScanResultConfig",
      "description": "Configuration for how scan results are returned and stored during a scanning session.",
      "type": "object",
      "properties": {
        "callbackConfig": {
          "description": "Deprecated. Used only by the legacy plugin. Custom callback method names for scan result and UI element click events.",
          "$ref": "#/definitions/wrapperSessionScanResultCallbackConfig"
        },
        "imageContainer": {
          "description": "Specifies how scan result images are delivered — either saved to a file path or encoded as base64 strings.",
          "$ref": "exported_scan_result.schema.json#/definitions/exportedScanResultImageContainer"
        },
        "imageParameters": {
          "description": "Output format and quality settings for scan result images.",
          "$ref": "exported_scan_result.schema.json#/definitions/exportedScanResultImageParameters"
        },
        "cleanStrategy": {
          "description": "Controls when previously generated result files are removed from storage.",
          "$ref": "#/definitions/wrapperSessionScanResultCleanStrategyConfig"
        }
      }
    },
    "wrapperSessionScanStopRequest": {
      "title": "WrapperSessionScanStopRequest",
      "description": "Request to stop the current scanning session with optional message explaining the reason for termination.",
      "type": "object",
      "properties": {
        "message": {
          "description": "Optional message describing the reason for stopping the scan session.",
          "type": "string"
        }
      }
    },
    "wrapperSessionScanStartRequest": {
      "title": "WrapperSessionScanStartRequest",
      "description": "Request to start a scanning session. Requires both scanViewConfigContentString (defining what to scan) and scanResultConfig (defining how to handle results). Optional scanViewInitializationParameters for workflow correlation.",
      "type": "object",
      "properties": {
        "scanViewConfigContentString": {
          "description": "ScanViewConfig JSON string defining the scanner configuration.",
          "type": "string"
        },
        "scanResultConfig": {
          "description": "Configuration for how scan results are returned and stored during the session.",
          "$ref": "#/definitions/wrapperSessionScanResultConfig"
        },
        "scanViewInitializationParameters": {
          "description": "Optional initialization parameters applied when the ScanView is created.",
          "$ref": "scanview_initialization_parameters.schema.json"
        },
        "scanViewConfigPath": {
          "description": "Path relative to the assets folder used to resolve ScanViewConfig JSON files when a SegmentControl references them by filename.",
          "type": "string"
        },
        "platformOptions": {
          "title": "WrapperSessionScanStartPlatformOptions",
          "description": "Platform-specific options applied when starting a scan session.",
          "type": "object",
          "properties": {
            "androidScanViewAttributes": {
              "description": "Android-specific ScanView attributes for layout and behavior customization.",
              "$ref": "android/scanview_attributes.schema.json"
            }
          }
        }
      },
      "required": [
        "scanViewConfigContentString",
        "scanResultConfig"
      ]
    },
    "wrapperSessionScanResultExtraInfo": {
      "title": "WrapperSessionScanResultExtraInfo",
      "description": "Extra information returned by a scanning session.",
      "type": "object",
      "properties": {
        "viewPluginType": {
          "description": "The type of the source ViewPlugin that generated result(s).",
          "type": "string",
          "enum": [
            "viewPlugin",
            "viewPluginComposite"
          ],
          "default": "viewPlugin"
        }
      }
    },
    "wrapperSessionScanResultsResponse": {
      "title": "WrapperSessionScanResultsResponse",
      "description": "Information about the results collected during the scanning process.",
      "type": "object",
      "properties": {
        "scanResultConfig": {
          "description": "The result configuration that was active when these results were produced.",
          "$ref": "#/definitions/wrapperSessionScanResultConfig"
        },
        "scanResultExtraInfo": {
          "description": "Additional metadata about the source plugin that produced these results.",
          "$ref": "#/definitions/wrapperSessionScanResultExtraInfo"
        },
        "exportedScanResults": {
          "description": "List of scan results produced in this scanning event, one per detected item.",
          "type": "array",
          "items": {
            "$ref": "exported_scan_result.schema.json"
          }
        }
      }
    },
    "wrapperSessionScanResponseFail": {
      "title": "WrapperSessionScanResponseFail",
      "description": "Details about a failed scan session.",
      "type": "object",
      "properties": {
        "lastError": {
          "description": "The last error received while trying to scan.",
          "type": "string"
        }
      }
    },
    "wrapperSessionScanResponseAbort": {
      "title": "WrapperSessionScanResponseAbort",
      "description": "Details about an aborted scan session.",
      "type": "object",
      "properties": {
        "message": {
          "description": "Optional message provided when the scan session was aborted.",
          "type": "string"
        }
      }
    },
    "wrapperSessionScanResponseSucceed": {
      "title": "WrapperSessionScanResponseSucceed",
      "description": "Details about a successfully completed scan session.",
      "type": "object",
      "properties": {
        "message": {
          "description": "Optional informational message from the completed scan session.",
          "type": "string"
        }
      }
    },
    "wrapperSessionScanResponseStatus": {
      "title": "WrapperSessionScanResponseStatus",
      "description": "Final status of a scan session.",
      "type": "string",
      "enum": [
        "scanFailed",
        "scanAborted",
        "scanSucceeded"
      ]
    },
    "wrapperSessionScanResponse": {
      "title": "WrapperSessionScanResponse",
      "description": "Response indicating scan session completion status. Includes exactly one info object (failInfo, abortInfo, or succeedInfo) corresponding to the status field value.",
      "type": "object",
      "allOf": [
        {
          "oneOf": [
            {
              "required": [
                "failInfo"
              ]
            },
            {
              "required": [
                "abortInfo"
              ]
            },
            {
              "required": [
                "succeedInfo"
              ]
            }
          ]
        }
      ],
      "properties": {
        "scanResultConfig": {
          "description": "The result configuration that was active during the completed scan session.",
          "$ref": "#/definitions/wrapperSessionScanResultConfig"
        },
        "status": {
          "description": "The final status of the scan session.",
          "$ref": "#/definitions/wrapperSessionScanResponseStatus"
        },
        "failInfo": {
          "description": "Populated when status is scanFailed. Contains the error that caused the failure.",
          "$ref": "#/definitions/wrapperSessionScanResponseFail"
        },
        "abortInfo": {
          "description": "Populated when status is scanAborted. Contains the reason for the abort.",
          "$ref": "#/definitions/wrapperSessionScanResponseAbort"
        },
        "succeedInfo": {
          "description": "Populated when status is scanSucceeded. Contains an optional completion message.",
          "$ref": "#/definitions/wrapperSessionScanResponseSucceed"
        }
      }
    },
    "wrapperSessionUCRReportRequest": {
      "title": "WrapperSessionUCRReportRequest",
      "description": "Request to submit a User Corrected Result (UCR) for a previously scanned item.",
      "type": "object",
      "properties": {
        "blobKey": {
          "description": "Unique identifier for the scan event, taken from PluginResult.blobKey. Used to correlate the correction with the original scan on the server.",
          "type": "string"
        },
        "correctedResult": {
          "description": "The corrected result value to report.",
          "type": "string"
        }
      },
      "required": [
        "blobKey",
        "correctedResult"
      ]
    },
    "wrapperSessionUCRReportResponseFail": {
      "title": "WrapperSessionUCRReportResponseFail",
      "description": "Details about a failed UCR report submission.",
      "type": "object",
      "properties": {
        "lastError": {
          "description": "The last error received while reporting UCR.",
          "type": "string"
        },
        "responseErrorCode": {
          "description": "The error code received while connecting to server.",
          "type": "integer"
        },
        "responseErrorMessage": {
          "description": "The error message received while connecting to server.",
          "type": "string"
        }
      }
    },
    "wrapperSessionUCRReportResponseSucceed": {
      "title": "WrapperSessionUCRReportResponseSucceed",
      "description": "Details about a successful UCR report submission.",
      "type": "object",
      "properties": {
        "message": {
          "description": "The confirmation message returned from the server.",
          "type": "string"
        }
      }
    },
    "wrapperSessionUCRReportResponseStatus": {
      "title": "WrapperSessionUCRReportResponseStatus",
      "description": "Final status of a UCR report submission.",
      "type": "string",
      "enum": [
        "ucrReportFailed",
        "ucrReportSucceeded"
      ]
    },
    "wrapperSessionUCRReportResponse": {
      "title": "WrapperSessionUCRReportResponse",
      "description": "Response from UCR (User Corrected Result) reporting. Must include either failInfo (if reporting failed) or succeedInfo (if successful), corresponding to the status field.",
      "type": "object",
      "allOf": [
        {
          "oneOf": [
            {
              "required": [
                "failInfo"
              ]
            },
            {
              "required": [
                "succeedInfo"
              ]
            }
          ]
        }
      ],
      "properties": {
        "status": {
          "description": "The final status of the UCR report submission.",
          "$ref": "#/definitions/wrapperSessionUCRReportResponseStatus"
        },
        "failInfo": {
          "description": "Populated when status is ucrReportFailed. Contains the error details.",
          "$ref": "#/definitions/wrapperSessionUCRReportResponseFail"
        },
        "succeedInfo": {
          "description": "Populated when status is ucrReportSucceeded. Contains the server confirmation message.",
          "$ref": "#/definitions/wrapperSessionUCRReportResponseSucceed"
        }
      }
    },
    "wrapperSessionExportCachedEventsResponseFail": {
      "title": "WrapperSessionExportCachedEventsResponseFail",
      "description": "Details about a failed cached events export.",
      "type": "object",
      "properties": {
        "lastError": {
          "description": "The last error received while exporting cached events.",
          "type": "string"
        }
      }
    },
    "wrapperSessionExportCachedEventsResponseSucceed": {
      "title": "WrapperSessionExportCachedEventsResponseSucceed",
      "description": "Details about a successful cached events export.",
      "type": "object",
      "properties": {
        "exportedFile": {
          "description": "Path to the generated file containing the exported cached events.",
          "type": "string"
        }
      }
    },
    "wrapperSessionExportCachedEventsResponseStatus": {
      "title": "WrapperSessionExportCachedEventsResponseStatus",
      "description": "Final status of a cached events export operation.",
      "type": "string",
      "enum": [
        "exportFailed",
        "exportSucceeded"
      ]
    },
    "wrapperSessionExportCachedEventsResponse": {
      "title": "WrapperSessionExportCachedEventsResponse",
      "description": "Response from cached events export operation. Includes either failInfo (if export failed) or succeedInfo (if successful), corresponding to the status field.",
      "type": "object",
      "allOf": [
        {
          "oneOf": [
            {
              "required": [
                "failInfo"
              ]
            },
            {
              "required": [
                "succeedInfo"
              ]
            }
          ]
        }
      ],
      "properties": {
        "status": {
          "description": "The final status of the export operation.",
          "$ref": "#/definitions/wrapperSessionExportCachedEventsResponseStatus"
        },
        "failInfo": {
          "description": "Populated when status is exportFailed. Contains the error that caused the failure.",
          "$ref": "#/definitions/wrapperSessionExportCachedEventsResponseFail"
        },
        "succeedInfo": {
          "description": "Populated when status is exportSucceeded. Contains the path to the exported file.",
          "$ref": "#/definitions/wrapperSessionExportCachedEventsResponseSucceed"
        }
      }
    },
    "wrapperSessionScanViewConfigOptionElementOffset": {
      "title": "WrapperSessionScanViewConfigOptionElementOffset",
      "description": "Optional pixel offset from the element's aligned position. Use positive/negative values to fine-tune positioning.",
      "type": "object",
      "properties": {
        "x": {
          "description": "Horizontal offset in pixels. Positive values move the element right, negative values move it left.",
          "type": "integer",
          "default": 0
        },
        "y": {
          "description": "Vertical offset in pixels. Positive values move the element down, negative values move it up.",
          "type": "integer",
          "default": 0
        }
      }
    },
    "wrapperSessionScanViewConfigOptionElementAlignment": {
      "title": "WrapperSessionScanViewConfigOptionElementAlignment",
      "description": "Screen corner where the UI element will be positioned. Element will align to the specified corner before applying any offset.",
      "type": "string",
      "enum": [
        "top_left",
        "top_right",
        "bottom_left",
        "bottom_right"
      ]
    },
    "wrapperSessionScanViewConfigOptionRotateButton": {
      "title": "WrapperSessionScanViewConfigOptionRotateButton",
      "description": "Button that toggles between portrait and landscape orientations when tapped. Positioned according to alignment and optional offset settings.",
      "type": "object",
      "properties": {
        "alignment": {
          "description": "Corner of the screen where the rotate button is positioned.",
          "$ref": "#/definitions/wrapperSessionScanViewConfigOptionElementAlignment"
        },
        "offset": {
          "description": "Optional pixel offset from the aligned corner position.",
          "$ref": "#/definitions/wrapperSessionScanViewConfigOptionElementOffset"
        }
      },
      "required": [
        "alignment"
      ]
    },
    "wrapperSessionScanViewConfigOptionDefaultOrientation": {
      "title": "WrapperSessionScanViewConfigOptionDefaultOrientation",
      "description": "Initial screen orientation when scanning starts.",
      "type": "string",
      "enum": [
        "portrait",
        "landscape"
      ]
    },
    "wrapperSessionScanViewConfigOptionOffsetConfig": {
      "title": "WrapperSessionScanViewConfigOptionOffsetConfig",
      "description": "Pixel offset (positive or negative) for fine-tuning a UI element's position along one axis.",
      "type": "number"
    },
    "wrapperSessionScanViewConfigOptionSegmentConfig": {
      "title": "WrapperSessionScanViewConfigOptionSegmentConfig",
      "description": "Multi-mode segment control allowing users to switch between different scanning configurations (e.g., MRZ, Barcode, License Plate modes). Requires equal numbers of titles and viewConfigs.",
      "type": "object",
      "properties": {
        "viewConfigs": {
          "description": "Array of ScanView configuration filenames located in the assets folder. Each file defines a complete scanning mode configuration.",
          "type": "array",
          "items": {
            "type": "string",
            "description": "A JSON file located in the assets folder."
          }
        },
        "titles": {
          "description": "Array of display names for each scanning mode shown to users in the segment control.",
          "type": "array",
          "items": {
            "type": "string",
            "description": "A user-visible string corresponding to the mode."
          }
        },
        "titleIndex": {
          "description": "Zero-based index indicating which segment should be initially selected. Must be within the bounds of the titles array.",
          "type": "integer"
        },
        "tintColor": {
          "description": "Hex color code (e.g., 'FF0000' for red) applied to the selected segment and control tinting.",
          "type": "string"
        },
        "offset.x": {
          "$ref": "#/definitions/wrapperSessionScanViewConfigOptionOffsetConfig"
        },
        "offset.y": {
          "$ref": "#/definitions/wrapperSessionScanViewConfigOptionOffsetConfig"
        }
      }
    },
    "wrapperSessionScanViewConfigOptionLabel": {
      "title": "WrapperSessionScanViewConfigOptionLabel",
      "description": "Deprecated. iOS only. A static text label displayed on the scan view. Use the Simple Instruction Label UI Feedback preset instead.",
      "type": "object",
      "properties": {
        "text": {
          "description": "The text to display.",
          "type": "string"
        },
        "color": {
          "description": "Hex color string for the label text.",
          "type": "string"
        },
        "size": {
          "description": "The font size of the label.",
          "type": "integer"
        },
        "offset.x": {
          "$ref": "#/definitions/wrapperSessionScanViewConfigOptionOffsetConfig"
        },
        "offset.y": {
          "$ref": "#/definitions/wrapperSessionScanViewConfigOptionOffsetConfig"
        }
      }
    },
    "wrapperSessionScanViewConfigOptionDoneButton": {
      "title": "WrapperSessionScanViewConfigOptionDoneButton",
      "description": "Deprecated. iOS only. A button that dismisses the scan view screen when pressed. Use toolbarTitle instead.",
      "type": "object",
      "properties": {
        "title": {
          "description": "The text displayed for the button.",
          "type": "string"
        },
        "textColor": {
          "description": "A color, denoted by a hex string of the button title.",
          "type": "string"
        },
        "textColorHighlighted": {
          "description": "A color, denoted by a hex string used by the button title when pressed.",
          "type": "string"
        },
        "backgroundColor": {
          "description": "A color, denoted by a hex string of the button background. The default is empty (clear color).",
          "type": "string"
        },
        "fontSize": {
          "description": "Button title font size in points (typically 8-72).",
          "type": "integer"
        },
        "fontName": {
          "description": "The name of the font (note: the font must be available for the device).",
          "type": "string"
        },
        "positionXAlignment": {
          "description": "The preset locations for the button along the x-axis.",
          "type": "string",
          "enum": [
            "center",
            "left",
            "right"
          ],
          "default": "center"
        },
        "positionYAlignment": {
          "description": "The preset locations for the button along the y-axis.",
          "type": "string",
          "enum": [
            "bottom",
            "center",
            "top"
          ],
          "default": "bottom"
        },
        "fillType": {
          "description": "The preset used for width fill.",
          "type": "string",
          "enum": [
            "rect",
            "fullwidth"
          ],
          "default": "rect"
        },
        "cornerRadius": {
          "description": "A Float value indicating the corner rounding of the Done button.",
          "type": "number"
        },
        "offset.x": {
          "$ref": "#/definitions/wrapperSessionScanViewConfigOptionOffsetConfig"
        },
        "offset.y": {
          "$ref": "#/definitions/wrapperSessionScanViewConfigOptionOffsetConfig"
        }
      }
    },
    "wrapperSessionScanViewConfigOptions": {
      "title": "WrapperSessionScanViewConfigOptions",
      "description": "UI configuration options for the scan view, controlling optional controls, orientation, and overlays.",
      "type": "object",
      "properties": {
        "rotateButton": {
          "description": "Optional button that lets users toggle between portrait and landscape orientations.",
          "$ref": "#/definitions/wrapperSessionScanViewConfigOptionRotateButton"
        },
        "label": {
          "description": "Deprecated. iOS only. Static text label on the scan view. Use the Simple Instruction Label UI Feedback preset instead.",
          "$ref": "#/definitions/wrapperSessionScanViewConfigOptionLabel"
        },
        "doneButtonConfig": {
          "description": "Deprecated. iOS only. Button that dismisses the scan view. Use toolbarTitle instead.",
          "$ref": "#/definitions/wrapperSessionScanViewConfigOptionDoneButton"
        },
        "defaultOrientation": {
          "description": "Initial screen orientation when the scan view is presented.",
          "$ref": "#/definitions/wrapperSessionScanViewConfigOptionDefaultOrientation"
        },
        "toolbarTitle": {
          "description": "Title shown on the toolbar with a back button. Fullscreen scanning only; ignored when using a ContainerView.",
          "type": "string"
        },
        "segmentConfig": {
          "description": "Optional multi-mode segment control for switching between scanning configurations.",
          "$ref": "#/definitions/wrapperSessionScanViewConfigOptionSegmentConfig"
        }
      }
    }
  }
}