import { ClassId } from './Base/ClassId'; import { SAWGetTemplatesResponse } from './MiniGames/SAWGetTemplatesResponse'; import { ILogger } from './ILogger'; import { SAWDoAknowledgeResponse, SAWDoSpinResponse, SAWPrizesHistory, SAWWinningHistoryResponse } from './MiniGames'; import { ActivityTypeLimited, GetTranslationsResponse, PublicLabelSettings, ResponseIdentify, TranslationArea } from './Core'; import { GetLabelInfoResponse } from './Core/GetLabelInfoResponse'; import { GetInboxMessagesResponse, InboxMessageBody, InboxReadStatus, MarkInboxMessageDeletedResponse, MarkInboxMessageReadResponse, MarkInboxMessageStarredResponse } from './Inbox'; import { BuyStoreItemResponse, GetCategoriesStoreResponse, GetStoreHistoryResponse, GetStoreItemsResponse } from './Store'; import { AchClaimPrizeResponse, AchievementOptinResponse, GetAchCategoriesResponse, GetAchievementMapResponse } from './Missions'; import { GetTournamentInfoResponse, GetTournamentsResponse, TournamentRegisterResponse } from './Tournaments'; import { LeaderBoardDetails, LeaderBoardPeriodType } from './Leaderboard'; import { GetLevelMapResponse } from './Level'; import { WSAPI } from './WSAPI/WSAPI'; import { TInboxMessage, TInboxMessageBody, TLevel, TMiniGameTemplate, TMissionOrBadge, TStoreCategory, TAchCategory, TStoreItem, TTournament, TTournamentDetailed, LeaderBoardDetailsT, UserLevelExtraCountersT, TSegmentCheckResult, TUICustomSection, TBonus, TRaffle, TLevelCurrent, TActivityLog, TRaffleDraw, TAvatarDefinition, TAvatarCustomized, TAvatarPrompt, TClans, TClanInfo, TClanJoinResult, TClanTournamentPlayers } from './WSAPI/WSAPITypes'; import { GetAchievementsUserInfoResponse } from './Core/GetAchievementsUserInfoResponse'; import { GetJackpotsPotsResponse, GetJackpotsResponse, JackpotsOptinResponse, JackpotsOptoutResponse } from './Jackpots'; import { GetCustomSectionsResponse } from './CustomSections'; import { ClaimBonusResponse, GetBonusesResponse } from './Bonuses'; import { SAWDoSpinBatchResponse } from './MiniGames/SAWDoSpinBatchResponse'; import { SAWDoAcknowledgeBatchResponse } from './MiniGames/SAWDoAcknowledgeBatchResponse'; import { GetRelatedAchTourResponse } from './Missions/GetRelatedAchTourResponse'; import { GetRafflesResponse } from './Raffle/GetRafflesResponse'; import { GetActivityLogResponse } from './ActivityLog'; import { GetClanListResponse, GetClanInfoResponse } from './Clans'; import { InboxCategories } from './Inbox/InboxCategories'; import { GetDrawRunResponse, GetRaffleDrawRunsHistoryResponse, RaffleClaimPrizeResponse, RaffleOptinResponse, GetRaffleWonPrizesResponse } from './Raffle'; import { GetAvatarsListResponse } from './Avatars/GetAvatarsListResponse'; import { GetAvatarsCustomizedResponse } from './Avatars/GetAvatarsCustomizedResponse'; import { GetAvatarPromptsResponse } from './Avatars/GetAvatarPromptsResponse'; import { SetAvatarResponse } from './Avatars'; import { AvatarCustomizeResponse } from './Avatars/AvatarCustomizeResponse'; import { GetJackpotWinnersResponse, JackpotWinnerHistory } from './Jackpots/GetJackpotWinnersResponse'; import { GetJackpotEligibleGamesResponse, TGetJackpotEligibleGamesResponse } from './Jackpots/GetJackpotEligibleGamesResponse'; import { GamePickGameInfo, GamePickRound, GamePickRoundBoard, GamePickUserInfo, GamesApiResponse } from './GamePick'; interface Tracker { label_api_key: string; userPublicProps: any; params?: { brand_key?: string; }; on: (callBackKey: ClassId, func: (data: any) => void) => void; getLabelSetting: (key: PublicLabelSettings) => any; triggerExternalCallBack: (callBackKey: string, payload: any) => void; getExtUserId: () => string; } interface IOptions { logger?: ILogger; logCIDs?: ClassId[]; logHTTPTiming?: boolean; tracker?: Tracker; brand_api_key?: string; } type MessageSender = (message: any, publicApuUrl?: string, expectCID?: ClassId) => Promise; declare class SmarticoAPI { private label_api_key; private brand_api_key; private messageSender; private publicUrl; private wsUrl; private inboxCdnUrl; private partnerUrl; private gamesApiUrl; private baseRgApiParams; avatarDomain: string; private avatarOriginDomain; private envId; private logger; private logCIDs; private logHTTPTiming; tracker?: Tracker; constructor(label_api_key: string, brand_api_key: string, messageSender: MessageSender, options?: IOptions); static getEnvDnsSuffix(label_api_key: string): string; static replaceSmrDomainsWithCloudfront(value: string | { [key: string]: any; }): T; static getEnvId(label_api_key: string): number; static getCleanLabelApiKey(label_api_key: string): string; static getPublicUrl(label_api_key: string): string; static getPublicWsUrl(label_api_key: string): string; static getAvatarUrl(label_api_key: string): string; static getAvatarOriginUrl(label_api_key: string): string; private send; private buildMessage; coreReportCustomEvent(user_ext_id: string, eventType: string, payload?: any): Promise; coreGetTranslations(user_ext_id: string, lang_code: string, areas: TranslationArea[], cacheSec?: number): Promise; coreIdentifyLabel(user_ext_id: string, cacheSec?: number): Promise; coreIdentifyUser(user_ext_id: string): Promise; coreChangeUsername(user_ext_id: string, public_username_custom: string): Promise<{ public_username_custom: string; }>; coreCheckSegments(user_ext_id: string, segment_id: number[]): Promise; /** * Reports an engagement impression event (when engagement content is displayed to the user). */ reportEngagementImpression(user_ext_id: string, engagement_uid: string, activityType: ActivityTypeLimited | number): void; /** * Reports an engagement action event (when user clicks/interacts with engagement content). */ reportEngagementAction(user_ext_id: string, engagement_uid: string, activityType: ActivityTypeLimited | number, action?: string): void; jackpotGet(user_ext_id: string, filter?: { related_game_id?: string; jp_template_id?: number; }, force_language?: string): Promise; potGet(user_ext_id: string, filter: { jp_template_ids: number[]; }): Promise; jackpotOptIn(user_ext_id: string, payload: { jp_template_id: number; }): Promise; jackpotOptOut(user_ext_id: string, payload: { jp_template_id: number; }): Promise; getJackpotWinners(user_ext_id: string, limit: number, offset: number, jp_template_id: number): Promise; getJackpotWinnersT(user_ext_id: string, limit: number, offset: number, jp_template_id: number): Promise; getJackpotEligibleGames(user_ext_id: string, { jp_template_id }: { jp_template_id: number; }): Promise; getJackpotEligibleGamesT(user_ext_id: string, { jp_template_id }: { jp_template_id: number; }): Promise; sawGetTemplates(user_ext_id: string, force_language?: string, is_visitor_mode?: boolean): Promise; sawGetTemplatesT(user_ext_id: string): Promise; doAcknowledgeRequest(user_ext_id: string, request_id: string, lose?: boolean): Promise; sawSpinRequest(user_ext_id: string, saw_template_id: number, round_id?: number): Promise; doAcknowledgeBatchRequest(user_ext_id: string, request_ids: string[]): Promise; sawSpinBatchRequest(user_ext_id: string, saw_template_id: number, spins_count: number): Promise; getSawWinningHistory(user_ext_id: string, limit: number, offset: number, saw_template_id: number): Promise; getSawWinningHistoryT(user_ext_id: string, limit?: number, offset?: number, saw_template_id?: number): Promise; missionOptIn(user_ext_id: string, mission_id: number): Promise; missionClaimPrize(user_ext_id: string, mission_id: number, ach_completed_id: number): Promise; registerInTournament(user_ext_id: string, tournamentInstanceId: number): Promise; buyStoreItem(user_ext_id: string, itemId: number): Promise; inboxGetMessages(user_ext_id: string, limit?: number, offset?: number): Promise; storeGetItems(user_ext_id: string, force_language?: string): Promise; storeGetItemsT(user_ext_id: string): Promise; storeGetCategories(user_ext_id: string, force_language?: string): Promise; storeGetCategoriesT(user_ext_id: string): Promise; storeGetPurchasedItems(user_ext_id: string, limit?: number, offset?: number): Promise; storeGetPurchasedItemsT(user_ext_id: string, limit?: number, offset?: number): Promise; missionsGetItems(user_ext_id: string, force_language?: string): Promise; missionsGetItemsT(user_ext_id: string): Promise; getUserGamificationInfo(user_ext_id: string): Promise; getUserGamificationInfoT(user_ext_id: string): Promise; achGetCategories(user_ext_id: string, force_language?: string): Promise; achGetCategoriesT(user_ext_id: string): Promise; badgetsGetItems(user_ext_id: string, force_language?: string): Promise; bonusesGetItems(user_ext_id: string, force_language?: string): Promise; bonusClaimItem(user_ext_id: string, bonus_id: number): Promise; bonusesGetItemsT(user_ext_id: string): Promise; badgetsGetItemsT(user_ext_id: string): Promise; tournamentsGetLobby(user_ext_id: string, force_language?: string): Promise; tournamentsGetLobbyT(user_ext_id: string): Promise; clansGetList(user_ext_id: string, force_language?: string): Promise; clansGetListT(user_ext_id: string): Promise; clansGetInfo(user_ext_id: string, clanId: number, force_language?: string): Promise; clansGetInfoT(user_ext_id: string, clanId: number, force_language?: string): Promise; clanJoin(user_ext_id: string, clanId: number, joinSourceId?: number): Promise; tournamentsGetInfo(user_ext_id: string, tournamentInstanceId: number, force_language?: string): Promise; tournamentsGetInfoT(user_ext_id: string, tournamentInstanceId: number): Promise; clanTournamentGetPlayers(user_ext_id: string, tournament_instance_id: number, clan_id: number, force_language?: string): Promise; leaderboardGet(user_ext_id: string, period_type_id?: LeaderBoardPeriodType, prevPeriod?: boolean | number, force_language?: string): Promise; leaderboardsGetT(user_ext_id: string, period_type_id?: LeaderBoardPeriodType, prevPeriod?: boolean | number): Promise; leaderboardsGetList(user_ext_id: string, force_language?: string): Promise; leaderboardsGetListT(user_ext_id: string): Promise; levelsGet(user_ext_id: string, force_language?: string): Promise; levelsGetT(user_ext_id: string): Promise; getLevelCurrent(user_ext_id: string): Promise; customSectionsGet(user_ext_id: string, force_language?: string): Promise; customSectionsGetT(user_ext_id: string): Promise; getTranslationsT(user_ext_id: string, lang_code: string, areas: TranslationArea[], cacheSec?: number): Promise; getInboxMessages(user_ext_id: string, limit: number, offset: number, starred_only: boolean, category_id?: InboxCategories, read_status?: InboxReadStatus): Promise; getInboxMessagesT(user_ext_id: string, from?: number, to?: number, favoriteOnly?: boolean, categoryId?: InboxCategories, read_status?: InboxReadStatus): Promise; getInboxUnreadCountT(user_ext_id: string): Promise; getInboxMessageBody(messageGuid: string): Promise; getInboxMessageBodyT(messageGuid: string): Promise; markInboxMessageRead(user_ext_id: string, messageGuid: string): Promise; markAllInboxMessageRead(user_ext_id: string): Promise; markUnmarkInboxMessageAsFavorite(user_ext_id: string, messageGuid: string, mark: boolean): Promise; deleteInboxMessage(user_ext_id: string, messageGuid: string): Promise; deleteAllInboxMessages(user_ext_id: string): Promise; private buildGamesApiParams; private sendGamesApi; private sendAvatarApi; gpGetActiveRounds(saw_template_id: number): Promise>; gpGetActiveRound(saw_template_id: number, round_id?: number): Promise>; gpGetGamesHistory(saw_template_id: number): Promise>; gpGetGameBoard(saw_template_id: number, round_id: number): Promise>; gpSubmitSelection(saw_template_id: number, round: any, isQuiz: boolean): Promise>; gpGetUserInfo(saw_template_id: number): Promise>; gpGetGameInfo(saw_template_id: number): Promise>; gpGetTranslations(saw_template_id: number): Promise>; gpGetRoundInfoForUser(saw_template_id: number, round_id: number, int_user_id: number): Promise>; avatarsGetList(user_ext_id: string): Promise; avatarsGetCustomized(user_ext_id: string): Promise; avatarsGetPrompts(user_ext_id: string): Promise; avatarSetAvatar(user_ext_id: string, avatar_id: string, avatar_real_id: number): Promise; avatarsCustomize(params: { user_id: number; prompt_id: number; avatar_url: string; avatar_real_id: number; }): Promise; avatarsGetListT(user_ext_id: string): Promise; avatarsGetCustomizedT(user_ext_id: string): Promise; avatarsGetPromptsT(user_ext_id: string): Promise; getWSCalls(): WSAPI; getRelatedItemsForGame(user_ext_id: string, related_game_id: string): Promise; getRafflesT(user_ext_id: string): Promise; getRaffles(user_ext_id: string): Promise; getRaffleDrawRun(user_ext_id: string, payload: { raffle_id: number; run_id: number; winners_limit?: number; winners_offset?: number; }): Promise; getRaffleDrawRunT(user_ext_id: string, raffle_id: number, run_id: number, winners_from?: number, winners_to?: number): Promise; getRaffleDrawRunsHistory(user_ext_id: string, props: { raffle_id: number; draw_id?: number; }): Promise; claimRafflePrize(user_ext_id: string, props: { won_id: number; }): Promise; raffleOptin(user_ext_id: string, props: { raffle_id: number; draw_id: number; raffle_run_id: number; }): Promise; getRaffleWonPrizes(user_ext_id: string, props: { raffle_id: number; offset: number; limit: number; }): Promise; getActivityLog(user_ext_id: string, startTimeSeconds: number, endTimeSeconds: number, limit: number, offset: number, types?: number[], src_types?: number[]): Promise; getActivityLogT(user_ext_id: string, startTimeSeconds: number, endTimeSeconds: number, from?: number, to?: number, types?: number[], src_types?: number[]): Promise; } export { SmarticoAPI, MessageSender };