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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@digigov-oss/id-validator-rest-service-client

v1.1.10

Published

Client for idValidatorRestService of GSIS

Downloads

41

Readme

idValidatorRestServiceClient

This is a client for the idValidatorRestService. It is a REST service that validates a given ID number against a given ID type. Under the scope, it is made calls to other existing KED services for the same purposes transparently.

Example

import ValidateID from '@digigov-oss/id-validator-rest-service-client';
import config from './config.json';
const test = async () => {
  const validateID = new ValidateID(config.user, config.pass);
  const result = await validateID.validateID('ΑΔ100000', 1,'test');
  console.log(result);
};
  • you can use overrides to override the default values for auditrecord and input fields.
  • for your tests, you don't need to use the overrides mechanism, in that case, the default storage path will be used ie /tmp

Note: On windows you might face the error "/tmp/sequence" Path not found. You can set overrides.auditStoragePath property to a folder that exists on your system.

  • look at KED standard guides for records you can use on auditInit" Also, you can use overrides to override the default storage engine. Look at module AuditRecordDB for more details on how to use the AuditEngine.

Returns

{ kedResponse: { validateIDOutputRecord: { isFoundFlag: true, isValidFlag: true, idOut: 'ΑΔ100000', issueDate: '01/01/2012', name: 'ΔΟΚ-ΟΝΟΜΑ', surname: 'ΔΟΚ-ΕΠΩΝΥΜΟ', fatherName: 'ΔΟΚ-ΠΑΤΡΩΝΥΜΟ', motherName: 'ΔΟΚ - ΜΗΤΡΩΝΥΜΟ', nameLatin: 'DOK-ONOMA', surnameLatin: 'DOK-EPONYMO', fatherNameLatin: 'DOK-PATRONYMO', gender: 'Α', birthDate: '22/07/1981', birthPlace: 'ΑΘΗΝΑ', serviceCalled: 'searchIdentitiesById', idTypeDescr: '1 - ΑΤ ΑΣΤΥΝΟΜΙΚΗ ΤΑΥΤΟΤΗΤΑ' }, callSequenceId: 71972008, callSequenceDate: '2023-01-24T12:42:51.480+02:00', errorRecord: {} }, auditRecord: { auditUnit: 'gov.gr', auditTransactionId: '88', auditProtocol: '88/2023-01-24', auditTransactionDate: '2023-01-24T10:42:51Z', auditUserIp: '127.0.0.1', auditUserId: 'system' } }

or an error message.

{ validateIDOutputRecord: { isFoundFlag: false, serviceCalled: 'searchIdentitiesById', idTypeDescr: '1 - ΑΤ ΑΣΤΥΝΟΜΙΚΗ ΤΑΥΤΟΤΗΤΑ' }, callSequenceId: 71971997, callSequenceDate: '2023-01-24T12:22:09.938+02:00', errorRecord: { errorCode: 'WS_EXTERNAL_ERROR', errorDescr: 'Η μορφή του αριθμού εγγράφου δεν είναι σωστή (μη έγκυρη είσοδος)' } }

Lookup

for your convenience, you can use the following lookup DOCTYPESLOOKUP exported from the module.

Notes

In case of KED advertises wrong endpoint on production you have to use (override) the endpoint: https://ked.gsis.gr/esb/idValidatorRestService You can do that by setting the endpoint property on the overrides object.

const overrides = {
    endpoint: 'https://ked.gsis.gr/esb/idValidatorRestService',
}