Hierarchy (view full)

Constructors

  • Parameters

    • __namedParameters: {
          onReady?: ((sdk) => void);
          projectId?: number;
          publicToken?: string;
      } = {}
      • Optional onReady?: ((sdk) => void)
          • (sdk): void
          • Parameters

            Returns void

      • Optional projectId?: number
      • Optional publicToken?: string
    • bootConfig: BootConfig

    Returns CoreSDK

Properties

#apiClient: default
#debugConfig: DebugConfig
#projectConfig: PlayerProjectConfig
#serverTime: number
_events: EventLite = ...
_params: URLSearchParams
_pointersManager: PointersManager
_services: Omit<Services, "apiClient" | "setupAnalytics">
_storage: Storage
achievements: Achievements

Achievements manager

ads: Ads

Ads manager

analytics: Analytics

Analytics manager

app: default

App manager

avatarGenerator: string

Current selected avatar generator

avatarGeneratorTemplate: string

Current selected avatar generator template URL

channels: default

Channels manager

device: default

Provides info about user's device

devtools: {
    addShortcut(): Promise<boolean>;
    changeLanguage(language): Promise<void>;
    closeSticky(): void;
    purchaseProduct(product): Promise<boolean>;
    requestReview(): Promise<RequestReviewResult>;
    resumeSubscription(product, purchase): Promise<boolean>;
    showCounter(apiReqCounter): void;
    showFullscreen(): Promise<boolean>;
    showPreloader(): Promise<boolean>;
    showRewardedVideo(): Promise<boolean>;
    showSticky(): Promise<boolean>;
    showToast(__namedParameters): void;
    unsubscribe(product, purchase): Promise<boolean>;
}

Devtools manager, only in dev

Type declaration

documents: Documents

Documents manager

events: Events

Events manager

experiments: Experiments

AB experiments manager

files: Files

Images manager

fullscreen: Fullscreen

Fullscreen manager

gamesCollections: GamesCollections

Games Collections manager

images: Images

Images manager

isGameStarted: boolean = false

Check is game started (load is finished)

isGameplay: boolean = false

Check is in gameplay

isMobile: boolean

Is on mobile device

isPaused: boolean = false

Check game paused

language: Lang

Current selected language

leaderboard: Leaderboard

Leaderboard manager

loader: {
    dec(): void;
    inc(): void;
}

Global loader manager

Type declaration

logger: Logger = logger

Logger

name: string = ''
onReady: ((sdk) => void)

Type declaration

    • (sdk): void
    • Parameters

      Returns void

overlay: {
    changeAvatarGenerator(avatarGenerator): void;
    changeLanguage(lang): Promise<void>;
    close(): void;
    closeOrientationOverlay(): void;
    closePreAdCountdownOverlay(): void;
    closePreAdCountdownOverlayFinish(): void;
    closeRewardedFailedOverlay(): void;
    login(options?): Promise<{
        secretCode?: string;
        type: string;
    }>;
    openAchievements(achievementsInfo, __namedParameters?): Promise<void>;
    openChat(channel, channelMessages, personalChannelData?): Promise<void>;
    openDocument(document): Promise<void>;
    openGamesCollections(gamesCollection): Promise<void>;
    openLeaderboard(query, leaderbordInfo): Promise<void>;
    openProductPurchase(product): Promise<void>;
    pickPlayerOnConflict(conflictInfo): Promise<PlayerState>;
    setSizeOffsets(sizeOffsets): void;
    setUnsupportedDeviceOverlay(__namedParameters): void;
    share(shareType, options): Promise<boolean>;
    showOrientationOverlay(orientationRequired): void;
    showPreAdCountdownOverlay(): void;
    showPreAdCountdownOverlayFinish(wasInFullscreen): Promise<any>;
    showRewardedFailedOverlay(): Promise<any>;
    unlockAchievement(achievement): void;
}

Overlay manager

Type declaration

  • changeAvatarGenerator:function
    • Parameters

      • avatarGenerator: string

      Returns void

  • changeLanguage:function
  • close:function
  • closeOrientationOverlay:function
  • closePreAdCountdownOverlay:function
  • closePreAdCountdownOverlayFinish:function
  • closeRewardedFailedOverlay:function
  • login:function
    • Parameters

      • options: {
            withSecretCode?: boolean;
        } = {}
        • Optional withSecretCode?: boolean

      Returns Promise<{
          secretCode?: string;
          type: string;
      }>

  • openAchievements:function
    • Parameters

      • achievementsInfo: FetchPlayerAchievementsOutput
      • __namedParameters: {
            scrollTo?: string | number;
        } = {}
        • Optional scrollTo?: string | number

      Returns Promise<void>

  • openChat:function
    • Parameters

      • channel: Channel
      • channelMessages: FetchOutput<ChannelMessage>
      • Optional personalChannelData: PersonalChannelData

      Returns Promise<void>

  • openDocument:function
    • Parameters

      • document: Document

      Returns Promise<void>

  • openGamesCollections:function
    • Parameters

      • gamesCollection: GamesCollection

      Returns Promise<void>

  • openLeaderboard:function
    • Parameters

      • query: GetLeaderboardQuery
      • leaderbordInfo: RatingData

      Returns Promise<void>

  • openProductPurchase:function
    • Parameters

      • product: Product

      Returns Promise<void>

  • pickPlayerOnConflict:function
    • Parameters

      • conflictInfo: Omit<PlayerSyncConflict, "__typename">

      Returns Promise<PlayerState>

  • setSizeOffsets:function
    • Parameters

      • sizeOffsets: {
            bottom: number;
            top: number;
        }
        • bottom: number
        • top: number

      Returns void

  • setUnsupportedDeviceOverlay:function
    • Parameters

      • __namedParameters: {
            allowed: TargetOs[];
            detected: TargetOs;
        }
        • allowed: TargetOs[]
        • detected: TargetOs

      Returns void

  • share:function
    • Parameters

      • shareType: ShareType
      • options: ShareOptions

      Returns Promise<boolean>

  • showOrientationOverlay:function
    • Parameters

      • orientationRequired: GameOrientation

      Returns void

  • showPreAdCountdownOverlay:function
  • showPreAdCountdownOverlayFinish:function
    • Parameters

      • wasInFullscreen: boolean

      Returns Promise<any>

  • showRewardedFailedOverlay:function
  • unlockAchievement:function
payments: Payments

Payments manager

platform: Platform

Platform info

player: MyPlayer

Player manager

players: Players

Players manager

projectId: number
publicToken: string
ready: Promise<CoreSDK>

Resolves when all platform and project data was loaded

  • platform SDK loaded
rewards: Rewards

Rewards manager

schedulers: Schedulers

Schedulers manager

segments: Segments

Segments manager

setBackground: ((__namedParameters) => void) = setBackground

Type declaration

    • (__namedParameters): void
    • Parameters

      • __namedParameters: Partial<BackgroundSettings>

      Returns void

socials: Socials

Socials manager

triggers: Triggers

Triggers manager

variables: GameVariables

Game variables manager

Accessors

  • get _overlaySizeOffsets(): {
        bottom: number;
        top: number;
    }
  • Returns {
        bottom: number;
        top: number;
    }

    • bottom: number
    • top: number
  • get isAllowedOrigin(): boolean
  • Is on development origin

    Returns boolean

  • get isDev(): boolean
  • Is on development origin

    Returns boolean

  • get locale(): string
  • Language locale

    Returns string

  • get nativeSDK(): any
  • SDK provided by the platform

    Returns any

  • get serverTime(): string
  • Server time in ISO 8601 format

    Returns string

Methods

  • Returns Promise<void>

  • Parameters

    • bootConfig: BootConfig

    Returns Promise<void>

  • Returns Promise<void>

  • Parameters

    • lang: Lang

    Returns Promise<void>

  • Returns Promise<void>

  • Returns Promise<void>

  • Returns Promise<void>

  • Parameters

    • hash: any
    • size: number

    Returns string

  • You can preload overlay to fast open when required

    Returns Promise<void>