ia-sdk-react-native-monorepo - v1.0.0
    Preparing search index...

    Interface IaCardLinkModule

    Interface for the CardLink module. Provides NFC-based prescription transfer functionality.

    interface IaCardLinkModule {
        moduleType: CardLink;
        addAnalyticsEventListener(
            callback: (eventName: string) => void,
        ): IaCardLinkEventSubscription;
        addConsentEventListener(
            callback: (event: IaCardLinkConsentEvent) => void,
        ): IaCardLinkEventSubscription;
        addEventListener(
            callback: (event: IaCardLinkEvent) => void,
        ): IaCardLinkEventSubscription;
        addPrescriptionsRedeemedListener(
            callback: (prescriptions: string) => void,
        ): IaCardLinkEventSubscription;
        addSessionCreatedListener(
            callback: (session: IaCardLinkSession) => void,
        ): IaCardLinkEventSubscription;
        deleteAllCards(): Promise<string | null>;
        deleteAllUserRelatedData(): Promise<void>;
        deleteCard(userId: string, cardName: string): Promise<void>;
        finish(): Promise<void>;
        getEnvironment(): Promise<IaCardLinkEnvironment>;
        getLogFilePath(): Promise<string | null>;
        getSavedCards(userId: string): Promise<string | null>;
        getVersion(): Promise<string | null>;
        launch(options: IaCardLinkLaunchOptions): Promise<void>;
        register(): Promise<void>;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    moduleType: CardLink

    The type of module this instance represents.

    Methods

    • Adds a listener for analytics events.

      Parameters

      • callback: (eventName: string) => void

        Called with analytics event names.

      Returns IaCardLinkEventSubscription

      Subscription handle to remove the listener.

    • Adds a listener for prescription redemption events.

      Parameters

      • callback: (prescriptions: string) => void

        Called with prescription JSON data.

      Returns IaCardLinkEventSubscription

      Subscription handle to remove the listener.

    • Deletes all saved cards (iOS only).

      Returns Promise<string | null>

      Status string ("successDeleteAll" or "emptyStorage"), or null on Android.

    • Deletes all user-related data from CardLink (iOS only).

      Returns Promise<void>

    • Deletes a specific saved card.

      Parameters

      • userId: string

        The user identifier.

      • cardName: string

        The card name to delete.

      Returns Promise<void>

    • Finishes/dismisses the CardLink flow (iOS only).

      Returns Promise<void>

    • Gets the path to the CardLink SDK log file.

      Returns Promise<string | null>

      The log file path, or null if unavailable.

    • Gets saved insurance cards for a user.

      Parameters

      • userId: string

        The user identifier.

      Returns Promise<string | null>

      JSON-encoded list of saved cards, or null if unavailable.

    • Gets the CardLink SDK version.

      Returns Promise<string | null>

      The SDK version string, or null if unavailable.

    • Launches the CardLink flow with the specified configuration.

      Parameters

      Returns Promise<void>

    • Register the module with the native side.

      Returns Promise<void>