@sudoplatform/sudo-privacy-interaction
    Preparing search index...

    Interface SudoPrivacyInteractionClient

    interface SudoPrivacyInteractionClient {
        archiveDataHolder(id: string): Promise<DataHolder>;
        confirmActionOutcome(id: string): Promise<Action>;
        connectVirtualPresenceWithAuthCode(
            input: ConnectVirtualPresenceWithAuthCodeInput,
        ): Promise<VirtualPresence>;
        connectVirtualPresenceWithRefreshToken(
            input: ConnectVirtualPresenceWithRefreshTokenInput,
        ): Promise<VirtualPresence>;
        disconnectVirtualPresence(id: string): Promise<VirtualPresence>;
        getAction(id: string): Promise<Action | undefined>;
        getAnalysisResult(id: string): Promise<AnalysisResult | undefined>;
        getDataHolder(
            id: string,
            options?: GetDataHolderOptions,
        ): Promise<DataHolder | undefined>;
        getOrganizationAnalysis(
            input: GetOrganizationAnalysisInput,
        ): Promise<OrganizationAnalysis | undefined>;
        getProviderConfiguration(): Promise<ProviderConfiguration[]>;
        initiateAction(input: InitiateActionInput): Promise<Action>;
        listActionsForDataHolder(
            input: ListActionsForDataHolderInput,
        ): Promise<ListOutput<Action>>;
        listAnalysisResults(
            input: ListAnalysisResultsInput,
        ): Promise<ListOutput<AnalysisResult>>;
        listAvailableActions(
            input: ListAvailableActionsInput,
        ): Promise<ListOutput<AvailableAction>>;
        listDataHolders(
            input: ListDataHoldersInput,
        ): Promise<ListOutput<DataHolder>>;
        listDataHolderScanSummaries(
            input: ListDataHolderScanSummariesInput,
        ): Promise<ListOutput<DataHolderScanSummary>>;
        listVirtualPresences(
            input: ListVirtualPresencesInput,
        ): Promise<ListOutput<VirtualPresence>>;
        refreshVirtualPresenceState(id: string): Promise<VirtualPresence>;
        rescanVirtualPresence(
            input: RescanVirtualPresenceInput,
        ): Promise<VirtualPresence>;
        subscribeToActions(
            subscriptionId: string,
            subscriber: ActionSubscriber,
        ): Promise<void>;
        subscribeToAnalysisResult(
            subscriptionId: string,
            subscriber: AnalysisResultSubscriber,
        ): Promise<void>;
        subscribeToDataHolders(
            subscriptionId: string,
            subscriber: DataHolderSubscriber,
        ): Promise<void>;
        subscribeToVirtualPresence(
            subscriptionId: string,
            subscriber: VirtualPresenceSubscriber,
        ): Promise<void>;
        unarchiveDataHolder(id: string): Promise<DataHolder>;
        unsubscribeFromActions(subscriptionId: string): void;
        unsubscribeFromAnalysisResult(subscriptionId: string): void;
        unsubscribeFromDataHolders(subscriptionId: string): void;
        unsubscribeFromVirtualPresence(subscriptionId: string): void;
    }

    Implemented by

    Index
    • Archive a data holder, removing it from the user's active list.

      Parameters

      • id: string

        The unique identifier of the data holder to archive.

      Returns Promise<DataHolder>

      The archived data holder.

    • Confirm that an assisted or delegated action was completed, transitioning it from CompletedUnverified to CompletedVerified.

      Parameters

      • id: string

        The unique identifier of the action to confirm.

      Returns Promise<Action>

      The confirmed action.

    • Disconnect a virtual presence.

      Parameters

      • id: string

        The unique identifier of the virtual presence to disconnect.

      Returns Promise<VirtualPresence>

      The disconnected virtual presence.

    • Read a single initiated action by id. Resolves an in-flight delegated action on read: if the action is still in progress, its outcome is polled and, once terminal, the action is updated to its verified result before being returned.

      Parameters

      • id: string

        The unique identifier of the action.

      Returns Promise<Action | undefined>

      The action, or undefined if no action with the given id exists for the user.

    • Retrieve a full analysis result by ID.

      Parameters

      • id: string

        The unique identifier of the analysis result.

      Returns Promise<AnalysisResult | undefined>

      The analysis result, or undefined if not found.

    • Retrieve a single data holder by ID.

      Parameters

      • id: string

        The unique identifier of the data holder.

      • Optionaloptions: GetDataHolderOptions

        Optional settings controlling what is returned. By default the most recent scan summary is fetched concurrently and attached as latestScanSummary.

      Returns Promise<DataHolder | undefined>

      The data holder, or undefined if not found.

    • Analyze (read-through) and return the shared, organization-generic analysis for a domain.

      Returns a result with a Pending status when an asynchronous source is still resolving; re-query for the terminal result. When mode is omitted, the backend behaves as Analyze.

      Parameters

      Returns Promise<OrganizationAnalysis | undefined>

      The organization analysis, or undefined if not found.

    • Retrieve the provider configurations required by consumers to support the provider OAuth flow.

      Returns Promise<ProviderConfiguration[]>

      The provider configurations.

    • Initiate an action against a data holder relationship. Delegated actions are performed on the user's behalf; assisted actions return structured materials for the client to complete.

      Parameters

      Returns Promise<Action>

      The initiated action.

    • List the persisted action history for a data holder. Returns every action that has been initiated against the data holder (all intents, all statuses, every attempt), ordered newest-first. This is the executed-action history, distinct from listAvailableActions, which returns the derived set of actions a user could take.

      Parameters

      Returns Promise<ListOutput<Action>>

      A list of actions matching the search criteria.

    • List analysis results associated with a virtual presence.

      Parameters

      Returns Promise<ListOutput<AnalysisResult>>

      A list of analysis results matching the search criteria.

    • List the actions currently available for a data holder relationship.

      Parameters

      Returns Promise<ListOutput<AvailableAction>>

      A list of available actions matching the search criteria.

    • List data holders associated with a virtual presence.

      Parameters

      Returns Promise<ListOutput<DataHolder>>

      A list of data holders matching the search criteria.

    • List all virtual presences for the signed in user.

      Parameters

      Returns Promise<ListOutput<VirtualPresence>>

      A list of all virtual presences matching the search criteria.

    • Validate a virtual presence's provider grant on demand and return its reconciled state. If the provider confirms the grant has been revoked (e.g. the user removed access in their provider account), the presence transitions to NeedsReauth; otherwise its state is returned unchanged. Use before gating access on a current Connected state.

      Parameters

      • id: string

        The unique identifier of the virtual presence to refresh.

      Returns Promise<VirtualPresence>

      The virtual presence with its reconciled state.

    • Subscribe to action status events. Emitted each time an action's status changes.

      Parameters

      • subscriptionId: string

        A unique identifier for this subscription.

      • subscriber: ActionSubscriber

        Callback implementation to be invoked when an action event occurs.

      Returns Promise<void>

    • Subscribe to analysis result state events. Emitted when an analysis result changes status or is updated.

      Parameters

      • subscriptionId: string

        A unique identifier for this subscription.

      • subscriber: AnalysisResultSubscriber

        Callback implementation to be invoked when an analysis result event occurs.

      Returns Promise<void>

    • Subscribe to data holder state events. Emitted when data holders are discovered or updated during scanning.

      Parameters

      • subscriptionId: string

        A unique identifier for this subscription.

      • subscriber: DataHolderSubscriber

        Callback implementation to be invoked when data holder events occur.

      Returns Promise<void>

    • Subscribe to virtual presence state events. Emitted when a virtual presence changes state (e.g. to NEEDS_REAUTH or SCANNING).

      Parameters

      • subscriptionId: string

        A unique identifier for this subscription.

      • subscriber: VirtualPresenceSubscriber

        Callback implementation to be invoked when a virtual presence event occurs.

      Returns Promise<void>

    • Unarchive a previously archived data holder, returning it to the Monitored state. Only a data holder in the Archived state may be unarchived.

      Parameters

      • id: string

        The unique identifier of the data holder to unarchive.

      Returns Promise<DataHolder>

      The unarchived data holder.

    • Unsubscribe from action status events.

      Parameters

      • subscriptionId: string

        The subscription identifier to unsubscribe.

      Returns void

    • Unsubscribe from analysis result state events.

      Parameters

      • subscriptionId: string

        The subscription identifier to unsubscribe.

      Returns void

    • Unsubscribe from data holder state events.

      Parameters

      • subscriptionId: string

        The subscription identifier to unsubscribe.

      Returns void

    • Unsubscribe from virtual presence state events.

      Parameters

      • subscriptionId: string

        The subscription identifier to unsubscribe.

      Returns void