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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@dapex-tech/elite-online-services

v0.0.6

Published

A client library to connect with the **Elite Online App**. This package provides a simple interface to request information from the **Elite Online REST API**.

Readme

📦 @dapex-tech/elite-online-services

A client library to connect with the Elite Online App.
This package provides a simple interface to request information from the Elite Online REST API.


🛠 API Coverage

This client includes typed interfaces for the Elite Online REST API, including:

  • MainService → Core endpoints of Elite Online App
  • SocketService → Real-time events (if enabled)
  • CancelablePromise → Control async requests
  • Request utilities → Custom API requests

🚀 Installation

Using npm:

npm install @dapex-tech/elite-online-services

Using Yarn:

yarn add @dapex-tech/elite-online-services

🔑 Authentication

Before making requests, configure the client with your API key or auth token (depending on how the Elite Online App issues credentials).

import { OpenAPI } from '@dapex-tech/elite-online-services';

OpenAPI.TOKEN = 'your_api_token_here';
OpenAPI.BASE = 'https://api.eliteonlineapp.com';

📘 Usage Example

Import the client

import { MainService } from '@dapex-tech/elite-online-services';

Make a request

async function run() {
  try {
    const data = await MainService.getUserProfile({ userId: 123 });
    console.log('User profile:', data);
  } catch (error) {
    console.error('API error:', error);
  }
}

run();

🔌 Socket Usage

This package includes a SocketService class that wraps socket.io-client and provides convenient methods to work with real-time events.

Import and Connect

import { SocketService } from '@dapex-tech/elite-online-services';

const socket = new SocketService('https://your-api-base-url');

// Connect to the socket
socket.connect();

// Disconnect when done
// socket.disconnect();

Sending and Receiving Messages

// Send a message
socket.sendMessage('Hello world!');

// Listen for incoming messages
socket.onMessageReceived((data) => {
  console.log('Message received:', data.text);
});

Updating and Listening to Location Events

// Emit a location update
socket.updateLocation({ lat: 35.9185, lng: -110.7258, clientID: '12345' });

// Listen for location updates from the server
socket.onLocationUpdated((data) => {
  console.log('Location updated:', data);
});

// Listen for all active client locations
socket.onAllLocations((locations) => {
  console.log('All locations:', locations);
});

Removing Listeners

// Remove a specific listener
socket.offMessageReceived(myMessageHandler);

// Or remove all listeners for an event
socket.off('locationUpdated');

⚙️ Configuration

You can configure global client settings via OpenAPI:

import { OpenAPI } from '@dapex-tech/elite-online-services';

OpenAPI.BASE = 'https://api.eliteonlineapp.com';
OpenAPI.TOKEN = 'my-secret-token';
OpenAPI.WITH_CREDENTIALS = true;

📄 TypeScript Support

The client is written in TypeScript, so you get full type definitions out of the box.

import { ApiResult } from '@dapex-tech/elite-online-services';

const result: ApiResult = {
  ok: true,
  status: 200,
  body: { message: 'success' },
};

🤝 Contributing

Contributions are welcome!

  1. Fork the repo
  2. Create a feature branch (git checkout -b feature/my-feature)
  3. Commit your changes (git commit -m 'Add new feature')
  4. Push to your branch (git push origin feature/my-feature)
  5. Open a Pull Request

📜 License

MIT © 2025 Dapex Tech