Success result for a MetadataCollector — the exact object applied to
the native collector and POSTed as formData.sdkMetadata when the flow
resumes. Create one with buildMetadataResult.
Remarks
The type is branded: only buildMetadataResult produces it, so a
plain object literal is not assignable. That keeps a mis-shaped value for
another collector kind (for example a phone number missing countryCode) a
compile-time error instead of being absorbed by an "any object" member of
DaVinciFormValue. The brand exists only in the type system; at
runtime the value is the plain object passed to the helper.
The wrapped object must be a plain JSON object, forwarded to the native
collector unchanged (an empty object is not special-cased). An object
carrying an error key is interpreted as a
DaVinciMetadataErrorResult instead — build that shape with
buildMetadataError.
Platform difference in native 2.2.0: iOS posts an empty result as
formData.sdkMetadata: {}, which the server accepts. Android omits an empty
result from the resume request, and the server replies with an
INVALID_RESUME_PAYLOAD message instead of resuming. Return a non-empty
object on Android until the native SDK is fixed.
Success result for a MetadataCollector — the exact object applied to the native collector and POSTed as
formData.sdkMetadatawhen the flow resumes. Create one with buildMetadataResult.Remarks
The type is branded: only buildMetadataResult produces it, so a plain object literal is not assignable. That keeps a mis-shaped value for another collector kind (for example a phone number missing
countryCode) a compile-time error instead of being absorbed by an "any object" member of DaVinciFormValue. The brand exists only in the type system; at runtime the value is the plain object passed to the helper.The wrapped object must be a plain JSON object, forwarded to the native collector unchanged (an empty object is not special-cased). An object carrying an
errorkey is interpreted as a DaVinciMetadataErrorResult instead — build that shape with buildMetadataError.Platform difference in native 2.2.0: iOS posts an empty result as
formData.sdkMetadata: {}, which the server accepts. Android omits an empty result from the resume request, and the server replies with anINVALID_RESUME_PAYLOADmessage instead of resuming. Return a non-empty object on Android until the native SDK is fixed.