@wmfs/tymly-enf-reg-plugin

Provides enf reg upload functionality to the Tymly framework

Usage no npm install needed!

<script type="module">
  import wmfsTymlyEnfRegPlugin from 'https://cdn.skypack.dev/@wmfs/tymly-enf-reg-plugin';
</script>

README

Uploading Enforcement Register records via REST endpoint

ENDPOINT https://< TYMLY URL >/enforcement-register-upload
USE POST REQUEST

Headers

Header Val
Authorization Bearer <token>
Content-Type application/json
Token to be supplied

Body of REST request like:

  • data is array of records to be uploaded

** ensure submissionSource is REST_SUBMISSION in order to facilitate data reporting

{
  "data": [
    {
      "brigade": "WMFS",
      "issueDate": "2020-10-08T00:00:00",
      "noticeType": "ALTERATION",
      "premisesType": "OFFICE",
      "status": "COMPLIED",
      "responsiblePerson": "Joe Bloggs",
      "articles": [
        "A12",
        "A14"
      ],
      "uprn": "10090434308",
      "addressLabel": "99, VAUXHALL ROAD, BIRMINGHAM, B7 4HW",
      "submissionSource": "REST_SUBMISSION"
    },
    {
      "brigade": "WMFS",
      "issueDate": "2020-10-08T00:00:00",
      "noticeType": "ALTERATION",
      "premisesType": "OTHER_WORKPLACE",
      "status": "COMPLIED",
      "responsiblePerson": "Jane Doe",
      "articles": [
        "A1",
        "A9"
      ],
      "uprn": "1234567890",
      "addressLabel": "1 Test Street",
      "submissionSource": "REST_SUBMISSION"
    }
  ]
}

Supported Data Types

Attribute Data Type Notes
brigade String The brigade the data is being submitted for
issueDate String The date the enforcement was issued in format "YYYY-MM-DD"
noticeType String One of: "ALTERATION", "ENFORCEMENT", "PROHIBITION"
premisesType String The type of the premises. Single select. See appendix A below
status String One of: "COMPLIED", "IN_FORCE", "WITHDRAWN"
responsiblePerson String The name of the responsible person for the property
articles Array of Strings Any articles used during this enforcement. See appendix B below
uprn String The UPRN of the premises
addressLabel String The address label of the premises
submissionSource String The source of this submission of enforcement register records. If using this REST upload please set as "REST_SUBMISSION" to facilitate reporting

Appendix A

premisesType:

  • HOSPITAL
  • CARE_HOME
  • HMO
  • FLATS
  • HOSTEL
  • HOTEL
  • HOUSE_CONVERTED_FLATS
  • OTHER_SLEEPING
  • FURTHER_EDUCATION
  • PUBLIC_BUILDING
  • LICENSED_PREMISES
  • SCHOOL
  • SHOP
  • OTHER_PREMISES_OPEN_TO_PUBLIC
  • FACTORY_WAREHOUSE
  • OFFICE
  • OTHER_WORKPLACE

Appendix B

articles

  • A8
  • A9
  • A10
  • A11
  • A12
  • A13
  • A14
  • A15
  • A16
  • A17
  • A18
  • A19
  • A20
  • A21
  • A22
  • A23
  • A24
  • A37
  • A38