Git Product home page Git Product logo

nav-connector's People

Contributors

attila-angro avatar dependabot[bot] avatar kailniris avatar peter-gyulavari avatar rokszinrokko avatar vighrichard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nav-connector's Issues

add test connection function

A function should be added to test connection, technicalUser and softwareData validity.
This should be a tokenExchange operation. It throws if connection, technicalUser or softwareData is invalid but an additional testing should be done on the exchange key.
The exchange key length should be 16 character and the returned token should match the [0-9A-Za-z][-] pattern.

queryInvoiceStatus() test failed

Az alábbi hibát írja teszt futtatás után:

  1. queryInvoiceStatus()
    "before all" hook: before:
    Error: An invoice is still under processing!
    at retry (test/lib/wait-invoice-processing.js:81:15)
    at
    at process._tickCallback (internal/process/next_tick.js:188:7)

A NAV felületén pedig ezt írja gondnak:

A megadott számlaszám egynél többször szerepel a kérésben

  • Field [productCodes] contains error: [Invalid content was found starting with element 'productCodes'. One of '{"http://schemas.nav.gov.hu/OSA/1.0/data":lineNumber}' is expected.]

add NavConnector constructor

The NavConnector constructor should assign the argument object's properties to the instantiation.
The constructor should also do basic validation on the technicalUser argument.

add public api

  • remove unused eventEmitter class inheritance
  • add public methods to NavConnector class
  • add public api documentation
  • remove unused dependency (cross-env)
  • remove unused index.js file
  • remove unused validation functionality

remove unnecessary code

The sendRequest method normalizes error responses and renames schemaValidationMessages property to technicalValidationMessages to match documentation. After NAV service version 0.14 this functionality will be unnecesery because schemaValidationMessages will be technicalValidationMessages by default in the error response.

add entry point

The module entry point should be en event emitter subclass which exposes public APIs and emits error and other events.

project setup

  • editor config
  • git
  • npm
  • eslint
  • babel
  • test framework (mocha)
  • code coverage (Istanbul)
  • continuous integration (CircleCi)
  • add codecov

Increase default timeout to 70 sec

The default timeout is 60 sec but the NAV service closes the connection after 60 sec (gateway timeout 504).
The default timeout should be increased to give a chance to the service to close the connection before force close it.

NAV service version 0.13

  • add queryInvoiceData operation
  • fix response error handling
  • add compressedContent to ManageInvoiceRequest

fix request xml element order

The request xml schema has sequential element order requirement. The softwareData object key order must be normalized before creating the request xml.

add software data validation

add a validation function which can validate software data with a predefined schema just like technical user validation

queryInvoiceStatus returnOriginalRequest parameter

The queryInvoiceStatus function returnOriginalRequest parameter does not work. The NAV service api does not return the originalRequest property in the response.

Could be a NAV api service upstream issue.

add NavConnector axios default timeout paramater

The NavConnector constructor parameters should be extended with a timeout property.
This should set the axios default timeout option to 5500 milliseconds by default but it should be configured.
This is required because during NAV service outages, requests will never timeout if axios timeout option is not set.
The default 5500 milliseconds are sufficient because according to the NAV online invoice service documentation the request timeout is set to 5000 ms on the service side.

fix technical user validation schema

login pattern [a-zA-Z0-9]{6,15} should be ^[a-zA-Z0-9]{6,15}$
taxNumber pattern [0-9]{8} should be ^[0-9]{8}$

This pattern validation is incorrect in the specification.

XSD 2.0

hello ewol123,
Is nav-connector ready to work with XSD 2.0?
Is branch nav2.0 functional?
Thank you and best regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.