import type VideoPlaybackDetails from './VideoPlaybackDetails'; import type FWError from './FWError'; import type VideoPlaybackEventName from './VideoPlaybackEventName'; import type FeedItemDetails from './FeedItemDetails'; import type LiveStreamMessageDetails from './LiveStreamMessageDetails'; import type LiveStreamChatEventName from './LiveStreamChatEventName'; import type LiveStreamEventDetails from './LiveStreamEventDetails'; import type LiveStreamEventName from './LiveStreamEventName'; export interface SDKInitEvent { /** * If error equals undefined/null, it means the initialization is successful. */ error?: FWError | null; } export interface PlayerHandler { /** * Pause The video playback associated with this CTA. * Only supported on iOS */ pause: () => void; /** * Resume The video playback associated with this CTA. * Only supported on iOS */ resume: () => void; } export interface CustomCTAClickEvent { /** * Action URL that is associated with this CTA */ url: string; /** * The video playback pause/resume handler for the video. * Only supported on iOS */ playerHandler?: PlayerHandler; /** * The video playback details for the event. */ video: VideoPlaybackDetails; } export interface VideoPlaybackEvent { eventName: VideoPlaybackEventName; info: VideoPlaybackDetails; } export interface VideoFeedClickEvent { info: FeedItemDetails; } export interface CustomCTA { /** * Action URL that is associated with this CTA */ url: string; /** * The title key of the CTA, such as buy_now. */ titleKey: string; /** * The title of the CTA, such as "Buy Now". */ title: string; } export interface ShoppingCTAEvent { /** * The url for the product unit */ url: string; /** * A unique identifier of the product. */ productId: string; /** * A unique identifier of the product unit. */ unitId: string; /** * The video playback details for the event. */ video: VideoPlaybackDetails; /** * This property only has value when configuring a custom product primary CTA in the business portal. */ customCTA?: CustomCTA; } export interface UpdateProductDetailsEvent { /** * A unique identifier list of the products. */ productIds: string[]; /** * The video playback details for the event. */ video: VideoPlaybackDetails; } export interface CustomClickLinkButtonEvent { /** * The url for the product unit */ url: string; /** * A unique identifier of the product. */ productId: string; /** * A unique identifier of the product unit. */ unitId: string; /** * The video playback details for the event. */ video?: VideoPlaybackDetails; } export interface CustomTapProductCardEvent { /** * The url for the product unit */ url: string; /** * A unique identifier of the product. */ productId: string; /** * A unique identifier of the product unit. */ unitId: string; /** * The video playback details for the event. */ video: VideoPlaybackDetails; /** * The video playback pause/resume handler for the video. */ playerHandler?: PlayerHandler; } export interface ClickProductEvent { /** * The url for the product unit */ url: string; /** * A unique identifier of the product. */ productId: string; /** * A unique identifier of the product unit. */ unitId: string; /** * The video playback details for the event. */ video: VideoPlaybackDetails; } export interface LiveStreamEvent { eventName: LiveStreamEventName; info: LiveStreamEventDetails; } export interface LiveStreamChatEvent { eventName: LiveStreamChatEventName; message: LiveStreamMessageDetails; liveStream: LiveStreamEventDetails; } export interface CustomClickCartIconEvent { /** * The video playback details for the event. */ video: VideoPlaybackDetails; } export interface CustomLinkInteractionClickEvent { /** * The link interaction title. */ title: string; /** * The link interaction url. */ url: string; /** * The livestream event details. */ info: LiveStreamEventDetails; }