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

@digigov-oss/disability-registry-epan-client

v0.1.10

Published

Client for Disability Registry API of EPAN

Readme

Client for Disability Registry API of EPAN

Client to connect to Disability Registry API, useful for nextjs/nodejs projects.

This client supports two different APIs:

  1. Disability Registry API (authenticate, searchCard, updateContact):

    • Base URLs: test-mitroo.epan.gov.gr / mitroo.epan.gov.gr
    • Auth: Bearer Token (JWT) + API Key
  2. Disability Validation API (validateByAmka):

    • Base URL: api.karta.epan.gov.gr
    • Auth: Bearer Token + IP whitelisting (no API Key needed)

For detailed API documentation, see:

Quick Start

import {
  authenticate,
  searchCard,
  updateContact,
  validateByAmka,
} from "@digigov-oss/disability-registry-epan-client";

// Example: Disability Registry API workflow
const example = async () => {
  const overrides = {
    prod: false,
    apiKey: "your-api-key-here",
  };

  try {
    // Authenticate to get a token
    const tokenResponse = await authenticate("username", "password", overrides);

    // Search for a disability card by AMKA
    const cardData = await searchCard(
      { amka: "30119500000" },
      { email: "[email protected]", mobile: "6983619982" },
      {
        ...overrides,
        token: tokenResponse.id_token,
      },
    );

    // Update contact information
    await updateContact(
      "16000000", // VAT number
      { email: "[email protected]", mobile: "6983619982" },
      { ...overrides, token: tokenResponse.id_token },
    );
  } catch (error) {
    console.error(error);
  }
};

// Example: Disability Validation API
const validateExample = async () => {
  try {
    const result = await validateByAmka("17074604863", {
      token: "your-jwt-token-here",
    });

    if (result.isValid) {
      console.log("Valid disability card with >= 50% disability");
    } else {
      console.log(result.reason || "Does not meet criteria");
    }
  } catch (error) {
    console.error(error);
  }
};

Configuration

You can use overrides to override the default configuration:

  • baseUrl: Override the base URL (defaults to test or prod based on prod flag, or validation endpoint for validateByAmka)
  • prod: Set to true for production environment, false for test (default: false)
  • apiKey: Your API Key for requests (required for Disability Registry API endpoints, optional for validateByAmka)
  • token: Pre-authenticated JWT token or long-lived token (required for all endpoints including validateByAmka)
const overrides = {
  baseUrl: "https://custom-endpoint.example.com",
  prod: true,
  apiKey: "your-api-key-here",
  token: "your-jwt-token-here",
};

Testing

The project includes test scripts for both APIs. Before running tests, create configuration files from the templates:

  1. For Disability Registry API:

    cp test/config-disability-registry.json.template test/config-disability-registry.json
    # Edit test/config-disability-registry.json with your credentials
  2. For Disability Validation API:

    cp test/config-disability-validation.json.template test/config-disability-validation.json
    # Edit test/config-disability-validation.json with your AMKA, token, and optionally baseUrl and apiKey

Available test scripts:

  • npm test or npm run test-disability-registry - Run TypeScript tests for Disability Registry API
  • npm run test-disability-validation - Run TypeScript tests for Disability Validation API
  • npm run testesm or npm run testesm-disability-registry - Run ESM tests for Disability Registry API
  • npm run testesm-disability-validation - Run ESM tests for Disability Validation API
  • npm run testcjs or npm run testcjs-disability-registry - Run CommonJS tests for Disability Registry API
  • npm run testcjs-disability-validation - Run CommonJS tests for Disability Validation API

Important Notes

  • The token obtained from authenticate() is valid for 1 day. You can also use a long-lived token via overrides.token
  • All API calls (except authenticate) require a Bearer token
  • Disability Registry API endpoints (authenticate, searchCard, updateContact) require both Bearer token and API Key
  • validateByAmka requires Bearer token and IP whitelisting (no API Key needed)
  • searchCard accepts either amka or vatNumber (or both) in search parameters
  • updateContact requires a vatNumber parameter
  • For detailed endpoint specifications, request/response formats, and error handling, see the Disability Registry API Specification and Disability Validation API Specification

Known Issues

This client is still under development and may contain issues. The Disability Registry API was implemented according to the documentation available here.