npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@gamanza-engage/web-client-sdk

v1.8.1

Published

<img src="https://docs.gamanzaengage.com/img/logo-engage-black.svg" alt="Gamanza Engage" title="Gamanza Engage" align="right" width="180"/>

Readme

Gamanza Engage Web Client SDK

Overview

The Gamanza Engage Web Client SDK empowers developers to build rich, customizable user interfaces that integrate seamlessly with the Gamanza Engage Platform. Designed for flexibility and performance, this SDK provides a structured, modular interface for interacting with key engagement features such as player profiles, missions, tournaments, rewards, and more.

By leveraging this SDK, you can:

  • Access real-time data and events for the authenticated player.
  • Listen for live updates from the Gamanza Player Engagement Platform.
  • Build custom loyalty and gamification components tailored to your product’s needs.
  • Maintain a clean and consistent integration using a singleton-based architecture.

Whether you're building from scratch or enhancing an existing frontend, the SDK simplifies communication with the Gamanza Engage Frontend API, helping you deliver engaging experiences with ease and efficiency.

Quickstart

Before you begin

  1. Understand the APIs you need to implement
  2. Create a Client Id
  3. Set up authentication

Install the SDK

npm install --save @gamanza-engage/web-client-sdk

Using the SDK

import { GamanzaEngageWebClientSDK } from "@gamanza-engage/web-client-sdk";

export const initSDK = async () => {
  await GamanzaEngageWebClientSDK.init({
    clientId: 'your client id',
    identityToken: 'player identity token',
    serviceUrl: '[https://fontend-api-[your-instance].gamanzaengage.com]'
  });
  
  const { Player } = GamanzaEngageWebClientSDK.getInstance();
  const playerInfo = await Player.getPlayer();
  console.log(playerInfo);
}

Static Methods

init(config: AuthConfig): Promise<GamanzaEngageWebClientSDK>

Initializes the SDK with the provided authentication configuration. This method must be called before using any SDK functionality.

Parameters:

  • config (AuthConfig): Authentication configuration object containing:
    • clientId (string): Client ID generated in your Gamanza Engage Admin Instance
    • identityToken (string): The identity token for authentication
    • serviceUrl (string): The base URL for the Gamanza Engage service

Returns:

  • Promise<GamanzaEngageWebClientSDK>: A promise that resolves to the initialized SDK instance

Example:

const config = {
    clientId: 'your-client-id',
    identityToken: 'your-identity-token', 
    serviceUrl: '[https://fontend-api-[your-instance].gamanzaengage.com]' 
};
const sdk = await GamanzaEngageWebClientSDK.init(config);

getInstance(): GamanzaEngageWebClientSDK

Returns the singleton instance of the SDK. The SDK must be initialized using init() before calling this method.

Returns:

  • GamanzaEngageWebClientSDK: The singleton SDK instance

Throws:

  • SDKNotInitializedException: When called before SDK initialization or after session closure

Example:

const sdk = GamanzaEngageWebClientSDK.getInstance();

or

const { Player } = GamanzaEngageWebClientSDK.getInstance();

Instance Methods

closeSession(): Promise<void>

[MANDATORY] Destroys the SDK instance and cleans up all resources. This method:

  • Clears the current user session
  • Deletes all data required for API communication
  • Closes all active connections
  • Destroys the SDK instance (requiring re-initialization)

Returns:

  • Promise<void>: A promise that resolves when the session is closed

Example:

await sdk.closeSession();

Public Modules

The SDK provides access to the following modules through public properties:

Events: RtmEventsModule

Real-time messaging and event handling functionality. Documentation

Player: PlayerModule

Player data management, including profile information and virtual currency. Documentation

RewardShop: RewardShopModule

Reward shop functionality for browsing and purchasing rewards. Documentation

Missions: MissionsModule

Mission management and tracking functionality. Documentation

Tournaments: TournamentsModule

Tournament participation and management features. Documentation

RewardsProcessor: RewardsProcessorModule

Reward processing and redemption functionality. Documentation

Crm: CrmModule

Customer relationship management features. Documentation

FeatureFlags: FeatureFlagsModule

Feature flag management for dynamic feature control. Documentation

Catalog: CatalogModule

Game catalog browsing and management functionality. Documentation

MiniGames: MiniGamesModule

Mini-game management and tracking functionality. Documentation

Usage Example

import { GamanzaEngageWebClientSDK } from '@gamanza-engage/web-client-sdk';
// Initialize the SDK const config = { identityToken: 'your-identity-token', serviceUrl: '[https://api.gamanzaengage.com](https://api.gamanzaengage.com)' };
try {
    const sdk = await GamanzaEngageWebClientSDK.init(config);
}catch (e: SDKNotInitializedException) {}
// Use SDK modules const playerData = await sdk.Player.getPlayerData(); const missions = await sdk.Missions.getActiveMissions();
// Always close the session when done await sdk.closeSession(); } catch (error) { console.error('SDK initialization failed:', error); }

Error Handling

The SDK throws the following exceptions:

SDKNotInitializedException

Thrown when attempting to get the SDK instance before initialization or after session closure.

Global Configuration

The SDK supports the following global configuration options:

window.GMZ_ENG_DEBUG

Set to true to enable debug logging throughout the SDK.

window.GMZ_ENG_DEBUG = true;

Important Notes

  1. Singleton Pattern: The SDK uses a singleton pattern. Only one instance can exist at a time.

  2. Initialization Required: Always call init() before using any SDK functionality.

  3. Session Management: Always call closeSession() when finished to properly clean up resources and avoid issues with the player session data.

  4. Error Handling: Implement proper error handling for all async operations.

Type Definitions

The SDK exports comprehensive type definitions for all interfaces and data structures. Import them alongside the main SDK class:

import { 
  GamanzaEngageWebClientSDK,
  SimpleResponse,
  PaginationResponse,
  // ... other types
} from '@gamanza-engage/web-client-sdk';

📢 This SDK is proprietary. Use is governed by the Gamanza Engage SDK License Agreement. Redistribution or modification is strictly prohibited.