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

@axvietnam/types

v1.0.27

Published

Shared types for AXVN connectors

Readme

AXVN TypeScript Types

Code Style: Prettier npm version npm Downloads Node.js Version Socket Badge License: MIT

@axvietnam/types is a TypeScript type definition package for AXVN modular connectors. It centralizes shared interfaces, types, and error classes, ensuring consistency across all AXVN Connectors.

This package is designed to be used with the modular AXVN connectors.

Table of Contents

Features

  • Centralized Type Definitions for AXVN REST/WebSocket APIs
  • Error Classes for standardized exception handling
  • Shared Configuration Interfaces used across all AXVN Connectors
  • Lightweight & Tree-Shakeable – excludes runtime values when possible
  • Fully Compatible with TypeScript for strong type safety

Installation

To use this package, install it via npm:

npm install @axvietnam/types

Usage

This package provides types and error classes to be used within AXVN Connectors.

Example: Importing Common Types

import type { ConfigurationRestAPI } from '@axvietnam/types';

const config: ConfigurationRestAPI = {
    apiKey: 'your-api-key',
    apiSecret: 'your-api-secret',
};

Example: Handling Errors Consistently

import { ConnectorClientError, UnauthorizedError } from '@axvietnam/types';

try {
    // Some API call
} catch (err) {
    if (err instanceof ConnectorClientError) {
        console.error('Client error occurred:', err);
    } else if (err instanceof UnauthorizedError) {
        console.error('Invalid API credentials:', err);
    } else {
        console.error('Unexpected error:', err);
    }
}

Available Types

API Response Types

  • RestApiResponse<T> – Standardized REST API response structure
  • WebsocketApiResponse<T> – WebSocket response format

Configuration Types

  • ConfigurationRestAPI – Configuration structure for REST API clients
  • ConfigurationWebsocketAPI – Configuration for WebSocket API clients
  • ConfigurationWebsocketStreams – Config for managing WebSocket streams

Rate Limit Types

  • RestApiRateLimit
  • WebsocketApiRateLimit

Error Handling

The package includes predefined error classes to simplify error handling across AXVN SDKs.

| Error Class | Description | | ---------------------- | --------------------------------- | | ConnectorClientError | Generic client error | | RequiredError | Missing required parameter | | UnauthorizedError | Invalid or missing API key | | ForbiddenError | Access denied | | TooManyRequestsError | Rate limit exceeded | | RateLimitBanError | Banned due to excessive API calls | | ServerError | Internal AXVN server error | | NetworkError | Network connectivity issue | | NotFoundError | Requested resource not found | | BadRequestError | Malformed request |

Example: Catching API Errors

import { RequiredError, NotFoundError } from '@axvietnam/types';

try {
    // API call
} catch (err) {
    if (err instanceof RequiredError) {
        console.error('Missing required parameters:', err);
    } else if (err instanceof NotFoundError) {
        console.error('Requested resource does not exist:', err);
    }
}

Contributing

Contributions are welcome!

  1. Open a GitHub issue before making changes.
  2. Discuss proposed changes with maintainers.
  3. Follow the existing TypeScript structure.

Disclaimer

This SDK is provided by AXVN on an "as is" and "as available" basis for use at your own risk. AXVN makes no representations or warranties of any kind, whether express or implied, as to the operation of the SDK, its accuracy, reliability, completeness, or fitness for any particular purpose.

To the fullest extent permitted by law, AXVN shall not be liable for any losses, damages, or expenses of any kind arising from or in connection with your use of, or inability to use, this SDK, including but not limited to any financial losses resulting from errors, bugs, interruptions, or inaccuracies in the SDK.

Your use of this SDK to access the AXVN Platform is subject to the AXVN API Key Terms and the AXVN Terms of Use, which shall prevail in the event of any conflict with this disclaimer. You are solely responsible for any orders or transactions executed through the AXVN Platform using this SDK.

This SDK is not intended to constitute investment advice or a recommendation to buy, sell, or hold any digital asset. You should independently evaluate and verify all information before acting.

License

This project is licensed under the MIT License - see the LICENSE file for details.