@eagleeye-solutions/integration-events-common
Version:
Eagle Eye CDP connector common functionality
25 lines (24 loc) • 1.19 kB
TypeScript
import { EeAirOutboundEvent, POSConnectWalletFulfilEventData } from '..';
import { BaseEventHandlerOpts } from './types';
/**
* Returns an array of events derived from a POSCONNECT.WALLET.FULFIL event.
*
* In some cases, multiple similar atomic operations may be included per event.
* particularly when considering POSCONNECT.WALLET.FULFIL events that differ
* depending on whether they are the first, intermediate or final FULFIL in
* the sequence.
*
* The three functions that handle either first, intermediate or final FULFIL
* events are configured to pick the relevant data (discount amounts, products,
* etc) from the appropriate WalletTransactionEntity atomic operations.
*
* In general, a single WalletTransactionEntity is used to derive the content
* of the TransactionAttributes that are returned in the output of this function,
* however for intermediate FULFIL events the TransactionAttributes are derived
* from multiple atomic operations and merged.
*
* @param event
* @param configuration
* @returns
*/
export declare function getPosConnectWalletFulfilEventData(event: EeAirOutboundEvent, opts: BaseEventHandlerOpts): POSConnectWalletFulfilEventData;