MonetizationOS Docs
Workflows ReferenceType Definitions

ReadIdentityLinksWorkflowUtils

type ReadIdentityLinksWorkflowUtils = {
  getLinkedSources: (identifier) => Promise<IdentityLinkWorkflowData[]>;
  getLinkedTargets: (identifier) => Promise<IdentityLinkWorkflowData[]>;
};

Utilities for reading identity links associated with a user.

Properties

getLinkedSources()

getLinkedSources: (identifier) => Promise<IdentityLinkWorkflowData[]>;

Retrieves all source links that have been linked to the specified target identity.

Parameters

ParameterTypeDescription
identifierWorkflowUserIdentifierThe user identity for which to fetch linked sources.

Returns

Promise<IdentityLinkWorkflowData[]>

A promise resolving to an array of link data where the user is the target.

Example

const sources = await utils.identity.getLinkedSources({ identifier: 'member_1234', userType: 'authenticated' });

getLinkedTargets()

getLinkedTargets: (identifier) => Promise<IdentityLinkWorkflowData[]>;

Retrieves all target links that have been linked to the specified source identity.

Parameters

ParameterTypeDescription
identifierWorkflowUserIdentifierThe user identity for which to fetch linked targets.

Returns

Promise<IdentityLinkWorkflowData[]>

A promise resolving to an array of link data where the user is the source.

Example

const targets = await utils.identity.getLinkedTargets({ identifier: 'member_1234', userType: 'authenticated' });