Giter Site home page Giter Site logo

mandatory-disclosure-rules's Introduction

Mandatory disclosure rules

This microservice is used to submit an XML file to EIS.

Overview:

This microservice receives an upscan url from mandatory-disclosure-rules-frontend. It loads the XML and then validates it against XML schema. If this fails validation we pass errors back to the frontend to be displayed to the user. If it passes schema validation the submission undergoes a second layer of validation against business rules handled by CADX. If the submission passes this validation and is submitted successfully an Accepted status is returned. If the submission fails business rule validation a Rejected status containing error codes is returned which is then passed back to the frontend.

This service notifies users if the submission is successfully submitted or has problems.

This service interacts with mandatory disclosure rules frontend, Upscan, Email Service & EIS/CADX.

API

PATH Supported Methods Description
/callback POST Upscan callback
/upscan/details/:uploadId GET Retrieves upscan session details containing UploadId, Reference & Status
/upscan/status/:uploadId GET Retrieves only the upload Status
/upscan/upload POST Request an upload
/validate-submission POST Performs XML schema validation & returns either messageSpecData containing messageRefID & messageTypeIndic or errors
/files/:conversationId/details GET Retrieves specific file details from Mongo store containing subscriptionID, messageRefID, file status, file name & timestamps
/files/details GET Retrieves details of all submitted files from Mongo store
/files/:conversationId/status GET Retrieves file status for a specific file from Mongo store
/dac6/dct72a/v1 POST Submits disclosure to EIS
/dac6/dct70d/v1 POST Retrieves Subscription Details (Contact Details)
/dac6/dct70e/v1 POST Updates Subscription Details (Contact Details)
/validation-result POST Retrieves & Processes result from CADX validation
/sdes/callback POST Retrieves the status of the file as it passes through SDES and updates Mongo
/sdes-stub/notification/fileready POST Notifies SDES we have a file ready for transfer and provides metadata and a location for the file

API specs:

Run Locally

This service runs on port 10019 and is named MANDATORY_DISCLOSURE_RULES in service manager.

Run the following command to start services locally:

sm2 --start MDR_ALL

Acceptance test repo:

mandatory-disclosure-rules-file-upload-ui-tests

Requirements

This service is written in Scala and Play, and requires at least Java 11 [JRE] to run.

SDES Info

For more information on how to set up SDES stubs for a specific callback visit the readme here: https://github.com/hmrc/sdes-stub

Apache-2.0 license

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.