import type { FeedsAttributes, FeedsComponentProps, FeedsStoryComponentProps, EngagementJSON } from './libs/fsengagementlite'; import type { FC } from 'react'; import React from 'react'; import { PlausibleService } from './libs/services'; import { ComponentList } from './libs/engagement-utils'; import { FeedsDeeplinkComponentProps } from './libs/fsengagementlite/types'; export interface FlagshipServiceType { userID: string; userAttributes: FeedsAttributes; localDynamicData: FeedsAttributes; performCleanup: () => void; } export interface FlagshipTools { FlagshipFeed: React.FC; FlagshipStacked: React.FC; FlagshipStory: React.FC; FlagshipDeeplink: React.FC; FlagshipService: FlagshipServiceType; trackConversion: PlausibleService['trackConversionEvent']; } export interface EngagementAttributes { key: string; value: any; type?: string; } export interface DeepLinkEvent { id: string; title: string; type: string; value: string; tag?: string; contentType?: string; postPosition?: number; } export interface ViewStoryEvent { id: string; title: string; tag?: string; contentType?: string; postPosition?: number; } export interface DismissBannerEvent { id: string; title: string; tag?: string; contentType?: string; value: string; bannerId: string; } export declare enum FlagshipError { NO_APP_ID = "NO_APP_ID", INVALID_APP_ID = "INVALID_APP_ID", EMPTY_FEED = "EMPTY_FEED", FETCH_FEED_ERROR = "FETCH_FEED_ERROR", INVALID_POST_ID = "INVALID_POST_ID" } export declare type KeyedStory = Record; export interface FilterOptions { filter?: string; initialTag?: string; } export interface FlagshipProps { appId: string; apiURL?: string; handleShowStory?: (postID: string, json?: EngagementJSON) => void; handleCloseStory?: (postID?: string) => void; handleDeeplink?: (uri: string) => void; handleAnalytics?: (postID: string | null, title: string | null, action: string | null, url: string | null, eventID: string | null) => void; handleError?: (error: FlagshipError) => void; portalComponents?: Record; createEnvironment?: "prod" | "uat"; layoutComponents?: ComponentList; cacheTTLMinutes?: number; useHTTPCache?: boolean; createAppId?: number; } export declare const Flagship: (props: FlagshipProps) => FlagshipTools;