ping-identity
    Preparing search index...

    Type Alias MetadataCollector

    MetadataCollector: BaseCollector & {
        metadata: Record<string, unknown>;
        type: "METADATA";
    }

    SDK Integrator connector pause/resume collector — a DaVinci flow pauses and hands the app an opaque payload; the app performs the on-device work and supplies a result before the flow can resume.

    Type Declaration

    • metadata: Record<string, unknown>

      Opaque payload delivered by the connector (server field payload).

      Serialized as-is by the bridge — no transformation or filtering. The app interprets the shape and performs the on-device work itself.

    • type: "METADATA"

    Field names and defaults mirror the native 2.2 MetadataCollector exactly (iOS Davinci/Davinci/collector/MetadataCollector.swift, Android davinci/src/main/kotlin/com/pingidentity/davinci/collector/MetadataCollector.kt): the server field is { type: "METADATA", key: "sdkMetadata", payload: <object> }.

    • label/required platform delta: Android's native collector extends FieldCollector<JsonObject> and exposes both natively; iOS's native collector is an AnyFieldCollector with no such properties, so the iOS bridge synthesizes them from the raw form field JSON (defaults "" and false). The serialized bridge shape is identical across platforms.
    • metadata is opaque: the SDK does not validate or introspect the payload — the app interprets the shape and performs the on-device work itself (third-party SDK call, risk evaluation, payment, etc.).
    • Resume contract: the value set as the collector's form value is what the native bridge applies and what lands in formData.sdkMetadata when the flow resumes via next(). A plain object is the success result (DaVinciMetadataResult); an object carrying a well-formed { error: { code, message } } envelope routes the connector's error branch (DaVinciMetadataErrorResult — build one with buildMetadataError). The error envelope is the collector's value, which the connector routes on, so a well-formed envelope resolves the flow instead of rejecting the bridge call.
    • Submission gating is result-set-based: the native validate() reports REQUIRED until a result is set and ignores the server required flag, so the submit helper blocks with METADATA_RESULT_REQUIRED while no result is set.
    • Native version: the bridge requires native SDK 2.2.0, the first release with MetadataCollector. A METADATA field the native SDK does not instantiate as a collector is not special-cased — it surfaces in the node's unsupportedFields and classifies as executionMode: 'unsupported'.