From 21410512f0e354617911793ebc3560e958ea611d Mon Sep 17 00:00:00 2001 From: Dynamsoft-Henry <78675724+Dynamsoft-Henry@users.noreply.github.com> Date: Wed, 3 Dec 2025 16:56:53 +0800 Subject: [PATCH 1/2] Adding React Native and fixed some bugs --- .../flutter/api-reference/parsed-result.md | 2 +- .../api-reference/enum/mapping-status.md | 33 ++++++++++ .../api-reference/enum/validation-status.md | 33 ++++++++++ .../api-reference/parsed-field.md | 53 +++++++++++++++ .../api-reference/parsed-result-item.md | 64 +++++++++++++++++++ .../api-reference/parsed-result.md | 44 +++++++++++++ 6 files changed, 228 insertions(+), 1 deletion(-) create mode 100644 programming/react-native/api-reference/enum/mapping-status.md create mode 100644 programming/react-native/api-reference/enum/validation-status.md create mode 100644 programming/react-native/api-reference/parsed-field.md create mode 100644 programming/react-native/api-reference/parsed-result-item.md create mode 100644 programming/react-native/api-reference/parsed-result.md diff --git a/programming/flutter/api-reference/parsed-result.md b/programming/flutter/api-reference/parsed-result.md index 81049ac..962baf7 100644 --- a/programming/flutter/api-reference/parsed-result.md +++ b/programming/flutter/api-reference/parsed-result.md @@ -17,7 +17,7 @@ The `ParsedResult` class represents the result of a code parsing process. It pro *Assembly:* dynamsoft_capture_vision_flutter ```dart -class ParsedResult +class ParsedResult extends CapturedResultBase ``` ## Properties diff --git a/programming/react-native/api-reference/enum/mapping-status.md b/programming/react-native/api-reference/enum/mapping-status.md new file mode 100644 index 0000000..eceb440 --- /dev/null +++ b/programming/react-native/api-reference/enum/mapping-status.md @@ -0,0 +1,33 @@ +--- +layout: default-layout +title: EnumMappingStatus - Dynamsoft Capture Vision React Native +description: Enumeration EnumMappingStatus of Dynamsoft Capture Vision React Native Edition defines whether the field was mapped from the source data or not +keywords: captured result, react native, capture vision, mapping, code parser, mapping +needAutoGenerateSidebar: true +needGenerateH3Content: true +breadcrumbText: EnumMappingStatus +--- + +# EnumMappingStatus + +`EnumMappingStatus` is an enumeration that represents whether the associated field was mapped from the source data or not. + +## Definition + +*Assembly:* dynamsoft-capture-vision-react-native + +```js +enum EnumMappingStatus { + MS_NONE, + MS_SUCCEEDED, + MS_FAILED +} +``` + +## Members + +| Member | Description | +| ------ | ----------- | +| `MS_NONE` | No mapping has been performed. | +| `MS_SUCCEEDED` | Mapping of this field was successful. | +| `MS_FAILED` | Mapping of this field was unsuccessful. | diff --git a/programming/react-native/api-reference/enum/validation-status.md b/programming/react-native/api-reference/enum/validation-status.md new file mode 100644 index 0000000..2435d66 --- /dev/null +++ b/programming/react-native/api-reference/enum/validation-status.md @@ -0,0 +1,33 @@ +--- +layout: default-layout +title: EnumValidationStatus - Dynamsoft Capture Vision React Native +description: Enumeration EnumValidationStatus of Dynamsoft Capture Vision React Native Edition defines the status of a field's value after the internal validation checks +keywords: captured result, react native, capture vision, mapping, code parser, validation +needAutoGenerateSidebar: true +needGenerateH3Content: true +breadcrumbText: EnumValidationStatus +--- + +# EnumValidationStatus + +`EnumValidationStatus` is an enumeration that represents whether the associated field's value passed the internal validation checks. + +## Definition + +*Assembly:* dynamsoft-capture-vision-react-native + +```js +enum EnumValidationStatus { + VS_NONE, + VS_SUCCEEDED, + VS_FAILED +} +``` + +## Members + +| Member | Description | +| ------ | ----------- | +| `VS_NONE` | No validation check has been performed. | +| `VS_SUCCEEDED` | The validation of this field was successful. | +| `VS_FAILED` | The validation of this field was unsuccessful. | diff --git a/programming/react-native/api-reference/parsed-field.md b/programming/react-native/api-reference/parsed-field.md new file mode 100644 index 0000000..c77456a --- /dev/null +++ b/programming/react-native/api-reference/parsed-field.md @@ -0,0 +1,53 @@ +--- +layout: default-layout +title: ParsedField - Dynamsoft Capture Vision React Native Edition +description: Interface ParsedField represents the result of a code parsing process. It provides access to the individual parsed items resulting from a document or an encrypted text. +keywords: originalImageHashId, items, errorCode, ParsedField, api reference, barcode result, capture, React Native, code parser +needAutoGenerateSidebar: true +needGenerateH3Content: true +breadcrumbText: ParsedField +--- + +# Interface ParsedField + +Interface `ParsedField` represents a field from the [`ParsedResultItem`](parsed-result-item.md) output of an encrypted text coming from a document or a data source. It contains the parsed value along with its mapping and validation status. + +## Definition + +*Assembly:* dynamsoft-capture-vision-react-native + +```js +interface ParsedField +``` + +## Properties + +| Property | Type | Description | +| -------- | ---- | ----------- | +| [`value`](#value) | *String* | The processed value of the parsed field. | +| [`mappingStatus`](#mappingstatus) | [*EnumMappingStatus*](enum/mapping-status.md) | A status representing whether the field was mapped from the source data or not. | +| [`validationStatus`](#validationstatus) | [*EnumValidationStatus*](enum/validation-status.md) | The status of a field's value after the internal validation checks. | + +### value + +The processed value of the parsed field. + +```js +value?: string +``` + +### mappingStatus + +A status representing whether the field was mapped from the source data or not, represented as a [`EnumMappingStatus`](enum/mapping-status.md). If the field was unsuccessful during the mapping process, the mappingStatus would be `EnumMappingStatus.failed`. + +```js +mappingStatus?: EnumMappingStatus | number +``` + +### validationStatus + +The status of a field's value after the internal validation checks, represented as a [`EnumValidationStatus`](enum/validation-status.md). Once a field is parsed by the Code Parser, it is run through validation checks to make sure that the information is accurate and correct. If a field's value does not pass, the validationStatus would be `EnumValidationStatus.failed`. + +```js +validationStatus?: EnumValidationStatus | number +``` diff --git a/programming/react-native/api-reference/parsed-result-item.md b/programming/react-native/api-reference/parsed-result-item.md new file mode 100644 index 0000000..47ded2f --- /dev/null +++ b/programming/react-native/api-reference/parsed-result-item.md @@ -0,0 +1,64 @@ +--- +layout: default-layout +title: ParsedResultItem - Dynamsoft Capture Vision React Native Edition +description: Interface ParsedResult represents the result of a code parsing process. It provides access to the individual parsed items resulting from a document or an encrypted text. +keywords: originalImageHashId, items, errorCode, ParsedResultItem, api reference, barcode result, capture, React Native, code parser +needAutoGenerateSidebar: true +needGenerateH3Content: true +breadcrumbText: ParsedResultItem +--- + +# Interface ParsedResultItem + +Interface `ParsedResultItem` represents the most basic unit of a parsed result. It includes specific details relevant to the parsed data, including the code type, the raw JSON string, and a map of the individual parsed fields. + +## Definition + +*Assembly:* dynamsoft-capture-vision-react-native + +```js +interface ParsedResultItem extends CapturedResultItem +``` + +## Properties + +| Property | Type | Description | +| -------- | ---- | ----------- | +| [`parsedFields`](#parsedfields) | *Map\* | A map of parsed fields extracted from the parsed result. | +| [`jsonString`](#jsonstring) | *String* | The raw JSON string representation of the parsed result. | +| [`codeType`](#codetype) | *String* | The type of the encrypted code associated to the attached parsed result. | + +The following methods are inherited from [`CapturedResultItem`]({{ site.dcv_react_native_api }}core/captured-result-item.html). + +| Property | Type | Description | +| -------- | ---- | ----------- | +| [`targetROIDefName`]({{ site.dcv_react_native_api }}core/captured-result-item.html#targetroidefname) | *String* | The name of the target region of interest (ROI) where the captured result was found. | +| [`taskName`]({{ site.dcv_react_native_api }}core/captured-result-item.html#taskname) | *String* | The name of the recognition task that produced the CapturedResultItem. | +| [`type`]({{ site.dcv_react_native_api }}core/captured-result-item.html#type) | [*EnumCapturedResultItemType*]({{ site.dcv_react_native_api }}core/enum/captured-result-item-type.html) | The type of the captured result item. | + +### parsedFields + +A map of the parsed fields extracted from the parsed result. + +- Key: The field names of the code. [Check the available field names]({{ site.code_types }}) +- Value: [`ParsedField`](parsed-field.md) + +```js +parsedFields?: Record +``` + +### jsonString + +The text of the parsed result as a JSON string. + +```js +jsonString: string +``` + +### codeType + +The type of the encrypted code associated to the attached parsed result. The code can be a MRZ document (passport, visa, etc.), a driver license (North America or South Africa), or an Aadhar card. + +```js +codeType: string +``` diff --git a/programming/react-native/api-reference/parsed-result.md b/programming/react-native/api-reference/parsed-result.md new file mode 100644 index 0000000..1d507bf --- /dev/null +++ b/programming/react-native/api-reference/parsed-result.md @@ -0,0 +1,44 @@ +--- +layout: default-layout +title: ParsedResult - Dynamsoft Capture Vision React Native Edition +description: Interface ParsedResult represents the result of a code parsing process. It provides access to the individual parsed items resulting from a document or an encrypted text. +keywords: originalImageHashId, items, errorCode, ParsedResult, api reference, barcode result, capture, React Native, code parser +needAutoGenerateSidebar: true +needGenerateH3Content: true +breadcrumbText: ParsedResult +--- + +# Interface ParsedResult + +Interface `ParsedResult` represents the result of a code parsing process. It provides access to the individual parsed items resulting from a document or an encrypted text. + +## Definition + +*Assembly:* dynamsoft-capture-vision-react-native + +```js +interface ParsedResult extends CapturedResultBase +``` + +## Properties + +| Property | Type | Description | +| -------- | ---- | ----------- | +| [`items`](#items) | *Array\* | A list of [`ParsedResultItem`](parsed-result-item.md), the basic unit representing a single parsed result from an encrypted text. | + +The following properties are inherited from [`CapturedResultBase`]({{ site.dcv_react_native_api }}core/captured-result-base.html): + +| Property | Type | Description | +| -------- | ---- | ----------- | +| [`originalImageHashId`]({{ site.dcv_react_native_api }}core/captured-result-base.html#originalimagehashid) | *String* | The hash id of the original image. You can use this ID to get the original image via the `IntermediateResultManager` interface. | +| [`rotationTransformMatrix`]({{ site.dcv_react_native_api }}core/captured-result-base.html#rotationtransformmatrix) | *Matrix4* | The rotation transformation matrix of the original image relative to the rotated image. | +| [`errorCode`]({{ site.dcv_react_native_api }}core/captured-result-base.html#errorcode) | *int* | The error code associated with the capture result. | +| [`errorMessage`]({{ site.dcv_react_native_api }}core/captured-result-base.html#errormessage) | *String* | The error message associated with the capture result. | + +### items + +A list of [`ParsedResultItem`](parsed-result-item.md), the basic unit representing a single parsed result from an encrypted text. + +```js +items?: Array +``` From c4758d667c7b7848e51009e5ac838c8e32bd7b99 Mon Sep 17 00:00:00 2001 From: Dynamsoft-Henry <78675724+Dynamsoft-Henry@users.noreply.github.com> Date: Wed, 3 Dec 2025 17:41:28 +0800 Subject: [PATCH 2/2] Fixed a wrong link bug --- _config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/_config.yml b/_config.yml index de4c2bb..a166e90 100644 --- a/_config.yml +++ b/_config.yml @@ -28,6 +28,8 @@ dcv_flutter_api: /capture-vision/docs/mobile/programming/flutter/api-reference/ dcp_flutter: /code-parser/docs/mobile/programming/flutter/ dcp_flutter_api: /code-parser/docs/mobile/programming/flutter/api-reference/ +dcv_react_native_api: /capture-vision/docs/mobile/programming/react-native/api-reference/ + dcv_android_api: /capture-vision/docs/mobile/programming/android/api-reference/ dcv_ios_api: /capture-vision/docs/mobile/programming/ios/api-reference/ dcv_maui_api: /capture-vision/docs/mobile/programming/maui/api-reference/