import type { EngagementMessage, FeedPost, FetchContentPayload, FetchContentResponse, FetchPostResponse } from './types'; export declare type SortItem = EngagementMessage | FeedPost; export interface EngagementServiceConfig { appId: string; apiKey?: string; baseURL: string; cacheTTL?: number; cacheTTLMinutes?: number; useHTTPCache?: boolean; messageTypeId?: number; } export interface Segment { id: number; name: string; attributes?: string[]; } export interface Attribute { key: string; value: string; } export interface AttributePayload { attributes: string; } export declare class EngagementService { constructor(config: EngagementServiceConfig); private appId; private baseURL; private readonly networkClient; private readonly events; private profileId?; private profileData?; private messages; private posts; private readonly environment?; private messageCache; private messageTypeId?; private readonly cacheTTL; private readonly cacheTTLMinutes; private readonly useHTTPCache; private userId?; setProfileAttributes(attributes: Attribute[]): Promise; setProfileAttribute(key: string, value: string): Promise; setUserID(userId: string): Promise; getProfile(accountId?: string, forceProfileSync?: boolean, appId?: string): Promise; getSegments(attribute?: string): Promise; setPushToken(pushToken: string): Promise; setAppId(id: string): void; /** * Get inbox messages for the current user * * @return inbox messages */ getMessages(): Promise; getInboxMessages(attributes?: AttributePayload): Promise; /** * Accepts array of inbox messages * Fetches sort order array (stored in app settings) * * @param messages inbox messages to sort * @return sorted inbox messages */ sortInbox(messages: SortItem[], messageTypeId?: number): Promise; fetchPost(postId: string): Promise; fetchDeeplink(customId: string): Promise; getDataFromCache(asyncStorageKey: string): Promise; makeRequestWithCache(url: string, payload: any, invalidateCache?: boolean, additionalCacheKey?: string): Promise; fetchContent(payload?: FetchContentPayload, messageTypeId?: number, invalidateCache?: boolean): Promise; getInboxBySegment(segmentId: number | string, segmentOnly?: boolean): Promise; }