open-index/open-npm huggingface dataset:
npm package: @hmcts/div-idam-test-harness
Description: Test harness for the IdAM Express Middleware
Latest version: 1.9.0

# Divorce IDAM Express Test Harness

A test harness for the IDAM-Express-Middleware

## Requirements

* Node >=8.0
* yarn


## Installation

```bash
# Install the latest version
yarn add "@hmcts/div-idam-test-harness"

# Install a specific version
yarn add "@hmcts/div-idam-test-harness@1.2.1"
```


## Usage

Require this module in your tests and call `idamExpressTestHarness.stub()` before the app is initialised.

Remember to call `.restore()` after every test.
npm package: @hmcts/div-pay-client
Description: Wrapper for payment-api calls
Latest version: 7.0.6

# Client library for payment-api

Client library for the Pay common component.

## Requirements

* Node >=10.15.2
* yarn


## Installation

As of now, this module is published only in a private repository.
We are working on publishing this project to NPM.
Until then, the package can be installed from its github URL, examples:

```bash
# Install the latest version
yarn add https://github.com/hmcts/div-pay-client

# Install a specific version
yarn add https://github.com/hmcts/div-pay-client#4.0.2
```


## Usage

First get a client

```es6
const payClient = require('@hmcts/div-pay-client')

const client = payClient.init({
  apiBaseUrl: 'https://payment-api:4501', // Base URL of payment-api
  serviceIdentification: 'DIV1', // Service ID for use in payment reference
})
```

### Create a payment

```js
client.create(user, serviceToken, caseReference, caseType, feeCode, amount, description, returnUrl)
  .then(responsePayload => {
    // JSON response payload should be available here.
  })
  .catch(err => {
    // Or an error in case of an error.
    throw err
  }) 
```

### Query a payment

```js
client.query(user, serviceToken, paymentId)
  .then(responsePayload => {
    // JSON response payload should be available here.
  })
  .catch(err => {
    // Or an error in case of an error.
    throw err
  }) 
```

### Cancel a payment

```js
client.cancel(user, serviceToken, paymentId)
  .then(responsePayload => {
    // The response body is empty with status code 204 on success.
    // A new query needs to run in order to confirm status.
  })
  .catch(err => {
    // Or an error in case of an error.
    throw err
  }) 
```

Please refer to the JSDoc blocks in `/src` for the function signatures.
See response examples in the `/examples` folder in this repo.


## Implementation notes


### User tokens

To make calls to payment-api the user must already be logged in and authenticated. For requests, the user id and the
token are required for every API call.


### Service tokens

In order to make requests a service token is required. This can be obtained from the `/lease` endpoint of
service-auth-provider-api using the already registered service name and a one time password generated using a service
secret.

See `@divorce/service-auth-provider-client` for an example implementation.


### Chargeable Fees

The fee being charged needs to come from the fees-register service.
To create payments, Fee Code, Fee Description and the Amount charged should be obtained from a fees-register service
response.


### Payment Reference

The payment reference is a string containing the service ID, a Case Reference, the Divorce Case Type, and a Fee Code concatenated with `$$$`.
For transactions where the Case Reference is not known, a random identifier is generated.
In these cases the Case Reference must be assigned to the payment for reconciliation purposes.


### Payment Status

The payment status will determine whether the transaction was successful. No details are given if an error occurs
as all payment errors are displayed to the user on the Gov Pay payment pages.
npm package: @hmcts/div-service-auth-provider-client
Description: Client to obtain tokens for service to service calls
Latest version: 3.0.1

# Client library for service-auth-provider service

Client library to obtain service to service call tokens.

## Requirements

* Node >=8.0
* yarn


## Installation

As of now, this module is published only in a private repository.
We are working on publishing this project to NPM.
Until then, the package can be installed from its github URL, examples:

```bash
# Install the latest version
yarn add https://github.com/hmcts/div-service-auht-provider-client

# Install a specific version
yarn add https://github.com/hmcts/div-service-auth-provider-client#2.1.4
```


## Usage

First get a client

```es6
const serviceAuthProviderClient = require('@hmcts/div-service-auth-provider-client')

const client = serviceAuthProviderClient.init({
  apiBaseUrl: 'https://service-auth-provider-api:4502', // Base URL of service-auth-provider API
  microservice: 'reference', // The name of the IDAM service role
  secret: 'AAAAAAAAAAAAAAAA' // Service secret
})
```


### Obtain a token

```es6
client.lease()
  .then(token => {
    // The response payload contains the token in plain text.
    console.log(token)
  })
  .catch(err => {
    // Or an error in case of an error.
    console.error(err)
  })
```


### Check if a token is expired

```es6
client.isTokenExpired(token) // true if expired, false otherwise.
```


## Implementation notes

### Token expiry

Tokens returned contain an expiry date as a unix timestamp under `exp`. Ideally, this expiry date should be respected
and the token should be renewed using the lease method. 


### Service secrets

The service needs to be registered with IDAM and a secret is required in order to generate a token.

For early implementations where IDAM registration has not finished yet, the reference details (microservice, secret) can
be used from the above example.
npm package: @hmcts/draft-store-client
Description: JavaScript client for draft store
Author: HMCTS Reform
Latest version: 1.2.1

# @hmcts/draft-store-client

[![Greenkeeper badge](https://badges.greenkeeper.io/hmcts/draft-store-client.svg)](https://greenkeeper.io/)

[![Standard - JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)

This is a client library for interacting with the [draft store api](https://github.com/hmcts/draft-store)

To configure the draft store client you need to:

* Implement the ServiceAuthTokenFactory interface.  
```
export interface ServiceAuthTokenFactory {
     get (): Promise<ServiceAuthToken>
   }
```
   
* Sample implementation:
```
let token: ServiceAuthToken

export class ServiceAuthTokenFactoryImpl implements ServiceAuthTokenFactory{
  async get (): Promise<ServiceAuthToken> {
    if (token === undefined || token.hasExpired()) {
      token = await IdamClient.retrieveServiceToken()
    }
    return token
  }
}
```   
# API available with clients
* DraftService provides wrapper around creating DraftStoreClientFactory to save and delete draft documents   
* DraftStoreClientFactory is responsible for creating DraftStoreClients
* DraftStoreClient is responsible for search, save and delete of draft store data
* DraftMiddleware manages number of draft store client can be configured and is available if user is logged in

# To add library

```
yarn add @hmcts/draft-store-client
```

## Getting Started

### Prerequisites

* [Node.js](https://nodejs.org/) >= v8.0.0
* [yarn](https://yarnpkg.com/)

### Running the application

Install dependencies by executing the following command:

 ```bash
$ yarn install
 ```

## Developing

### Code style

We use [TSLint](https://palantir.github.io/tslint/) with [StandardJS](http://standardjs.com/index.html) rules 

Running the linting:
`yarn lint`

### Running the tests

Mocha is used for writing tests.

Run them with:

```bash
$ yarn test
```

For test coverage:

```bash
$ yarn test:coverage
```

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE.md) file for details
npm package: @hmcts/environment-variable-setter
Description: Module to set up local process to point to a different environment.
Latest version: 1.0.0

# node-js-environment-variable-setter
This module can used in Node JS applications to mimic the environment variables used in a different environment

To test this module, run the following commands:
- yarn install
- yarn test

#Usage

##Downloading environment variables file
In the module where the functional tests will be run, you need to firstly download the json file with the environment variable configurations. This file can be found in the Azure project of which environment variables you want to mimic locally.
For example, this is the URL for the environment variables file for the RFE project in AAT:
```
https://div-rfe-aat.scm.service.core-compute-aat.internal/api/settings
```
In order to log in, you'll have to enter your SCM credentials. These can be registered in Azure.
Once you have access to this file, just save it as a json file anywhere in your computer. If you choose to save it in your project, don't forget to add this file to .gitignore so that you don't check this into GitHub (exposing secrets).

##Installing the package in your project
To install this as a dev dependency in your project, just run:
```
yarn add "https://github.com/hmcts/node-js-environment-variable-setter#0.2" -D
```

##Having environment variables changed on the fly for your test
```
const processEnvironmentSetup = require('@hmcts/node-js-environment-variable-setter');

const configurationFile = './remote-config.json'; //This will be the path to the file you saved with the environment variables
processEnvironmentSetup.setUpEnvironmentVariables(configurationFile);
```
From this point onwards, your project will have the same environment variables set in the json file (with the exception of the ignored properties - you can find this list in this module's source code).
npm package: @hmcts/eslint-config
Description: Shared eslint config for hmcts projects
Author: Michael Allen
Latest version: 1.4.0

[![Build Status](https://travis-ci.org/hmcts/eslint-config.svg?branch=master)](https://travis-ci.org/hmcts/eslint-config)
[![npm version](https://badge.fury.io/js/%40hmcts%2Feslint-config.svg)](https://badge.fury.io/js/%40hmcts%2Feslint-config)

# ESLint Config

Custom rules for eslint.

## Usage

Add to your `package.json`:

    > yarn add eslint @hmcts/eslint-config

Create a `.eslintrc.json` which extends this config:

    {
      "extends": "@hmcts"
      "env": {
        "es6": true,
        "node": true
      },
      "parserOptions": {
        "sourceType": "module"
      }
    }

Create a `.eslintignore` so your node_modules don't get linted:

    node_modules

Run eslint:

    > ./node_modules/.bin/eslint .

To see example code that conforms to this style check [hmcts/look-and-feel].

[hmcts/look-and-feel]:https://github.com/hmcts/look-and-feel
npm package: @hmcts/feature-toggle-client
Description: JavaScript client for feature togggle
Author: HMCTS Reform
Latest version: 1.0.0

# @hmcts/feature-toggle-client

[![Travis badge](https://api.travis-ci.org/hmcts/feature-toggle-client.svg?branch=master)](https://travis-ci.org/hmcts/feature-toggle-client)
[![Codecov badge](https://codecov.io/gh/hmcts/feature-toggle-client/graphs/badge.svg)](https://codecov.io/github/hmcts/feature-toggle-client)
[![NPM version badge](https://img.shields.io/npm/v/@hmcts/feature-toggle-client.svg)](https://www.npmjs.com/@hmcts/feature-toggle-client)
[![Node version badge](https://img.shields.io/node/v/@hmcts/feature-toggle-client.svg)](https://www.npmjs.com/@hmcts/feature-toggle-client)
[![Greenkeeper badge](https://badges.greenkeeper.io/hmcts/feature-toggle-client.svg)](https://greenkeeper.io/)
[![Standard - JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)

This is a client library for interacting with the Feature Toggle API [Feature Toggle API](https://github.com/hmcts/feature-toggle-api).
   
# API available with clients

* FeatureToggleService provides a thin wrapper around creating FeatureToggleClientFactory
* FeatureToggleClientFactory is responsible for creating FeatureToggleClient
* FeatureToggleClient is responsible for interfacing with the Feature Toggle API

# To add library

```
$ yarn add @hmcts/feature-toggle-client
```

or

```
$ npm install @hmcts/feature-toggle-client
```

## Getting Started

### Prerequisites

* [Node.js](https://nodejs.org/)
* [yarn](https://yarnpkg.com/)

### Running the application

Install dependencies by executing the following command:

 ```bash
$ yarn install
 ```

## Developing

### Code style

We use [TSLint](https://palantir.github.io/tslint/) with [StandardJS](http://standardjs.com/index.html) rules 

Running the linting:

`yarn lint`

### Running the tests

Mocha is used for writing tests.

Run them with:

```bash
$ yarn test
```

For test coverage:

```bash
$ yarn test:coverage
```

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE.md) file for details
npm package: @hmcts/frontend
Description: HMCTS Frontend contains the code you need to start building a user interface for HMCTS.
Author: HMCTS Design System Team
Latest version: 0.0.50-alpha

# HMCTS Frontend

HMCTS Frontend contains the code you need to start building a user interface
for HMCTS government platforms and services.

See live examples of HMCTS Frontend components, and guidance on when to use
them in your service, in the [HMCTS Design
System](https://hmcts-design-system.herokuapp.com/).

## Contact the team

HMCTS Frontend is maintained by a team at HMCTS. If you want to know more about HMCTS Frontend, please email the [Design System
team](mailto:design-system@hmcts.net).

## Quick start

We recommend [installing HMCTS Frontend using node package manager
(npm)](docs/installation/installing-with-npm.md).

Once installed, you will be able to use the code from the examples in the
[HMCTS Design System](https://hmcts-design-system.herokuapp.com/)
in your service.

## Browser support

HMCTS Frontend will allow you to build services that comply with the [guidance
in the Service Manual][service-manual-browsers].

If you are including HMCTS Frontend as part of a stylesheet that you are
generating in your application's build pipeline, you will need to [generate and
include a separate stylesheet in order to support Internet Explorer
8](docs/installation/supporting-internet-explorer-8.md).

[service-manual-browsers]: https://www.gov.uk/service-manual/technology/designing-for-different-browsers-and-devices#browsers-to-test-in

## Assistive technology support

HMCTS Frontend will allow you to build services that comply with the [guidance
in the Service Manual][service-manual-assistive-technologies].

In addition, we test that all content is accessible with keyboard only.

We aim to support [users who adjust or override the colours of websites they visit][how-users-change-colours-on-websites]. We test this by [changing colours in Firefox][changing-colours-in-firefox], by [enabling 'High Contrast' mode in Windows][enabling-high-contrast-mode-in-windows] and by using the [High Contrast plugin for Chrome][high-contrast-plugin-for-chrome].

[service-manual-assistive-technologies]: https://www.gov.uk/service-manual/technology/testing-with-assistive-technologies#what-to-test

[changing-colours-in-firefox]:
https://support.mozilla.org/en-US/kb/change-fonts-and-colors-websites-use

[enabling-high-contrast-mode-in-windows]:
https://support.microsoft.com/en-gb/help/13862/windows-use-high-contrast-mode

[high-contrast-plugin-for-chrome]: https://chrome.google.com/webstore/detail/high-contrast/djcfdncoelnlbldjfhinnjlhdjlikmph?hl=en-US

[how-users-change-colours-on-websites]:
https://accessibility.blog.gov.uk/2017/03/27/how-users-change-colours-on-websites/

## Contribution guidelines

If you want to help us build HMCTS Frontend, view our [contribution
guidelines](CONTRIBUTING.md).
npm package: @hmcts/gatling-hoover
Description: Upload gatling reports to Cosmos DB
Author: HMCTS
Latest version: 1.0.20

# Gatling Hoover

Tool to upload the latest Gatling report to the cosmos performance container.

## Usage
```bash
$ export COSMOS_KEY=[cosmos-key]
$ npx -q @hmcts/gatling-hoover [path-to-perf-tests]
Upload successful: 617221ac-a662-4c47-ade8-c123a37edaca
```

If no path is provided, the current directory is used.

## License
[MIT](LICENSE)
npm package: @hmcts/ia-state-diagram-tool
Description: Tool to generate state diagrams from CCD definition
Latest version: 0.0.5

# Create state diagram

A tool to create a state diagram based in the JSON ccd definition for s project.

You will need the following installed to run this tool
- java
- node

:warning: **If you get errors you may need to read the following.** State diagram is produced using plantUml
which needs Graphviz see this pages for details and to troubleshoot https://plantuml.com/graphviz-dot

## Running standalone

To run the tool standalone clone this repo and run 

```
./generate_state_diagram.js [path to ccd def]
```

This will generate an image in the current directory called state_diagram.png.

For more info on other options run

```
./generate_state_diagram.js -h
```

## Running with yarn as part of another project
This can also be added to another project. Add this module with

```
yarn add @hmcts/ia-state-diagram-tool
```

You can then use it by adding to your package.js file

```
"scripts": {
    ...
    "create-state-diagram": "generateStateDiagram ./definitions/appeal/json/"
  },
```
npm package: @hmcts/info-provider
Description: info-provider
Latest version: 1.4.0

# nodejs-info-provider

`@hmcts/info-provider` is a small Express helper that aggregates `/info` data from
your service and from downstream services into a single endpoint.

## Installation

```bash
yarn add @hmcts/info-provider
```

## Usage

### Typescript

```ts
import { InfoContributor, infoRequestHandler } from '@hmcts/info-provider'

express.Router().get(
  '/info',
  infoRequestHandler({
    info: {
      'fees-register': new InfoContributor('https://fees-register.com/info')
    },
    extraBuildInfo: {
      featureToggles: config.get('featureToggles'),
      hostname: hostname()
    }
  })
)
```

### JavaScript

```js
const { InfoContributor, infoRequestHandler } = require('@hmcts/info-provider')

express.Router().get(
  '/info',
  infoRequestHandler({
    info: {
      'fees-register': new InfoContributor('https://fees-register.com/info')
    },
    extraBuildInfo: {
      featureToggles: config.get('featureToggles'),
      hostname: hostname()
    }
  })
)
```

`InfoContributor` represents a downstream service that exposes an `/info` endpoint.  
Each contributor is queried when `/info` is requested, and the results are combined  
into a single response.

Failures in downstream `/info` calls do not cause the endpoint itself to fail.

## Requirements

- Node.js >= 18.12
- Express >= 4

> Express is a peer dependency and must be provided by the consuming application.

## Contributing

### Getting started

This repository uses **Yarn Berry (v4)** via **Corepack**.

Before installing dependencies, ensure Corepack is enabled:

```bash
corepack enable
```

Then install dependencies:

```bash
yarn install
```

### Making changes

- Make changes on a branch
- Ensure tests pass:

```bash
yarn build
yarn lint
yarn test
```

- If you upgrade dependencies, ensure the lockfile is updated and committed.

### Versioning and releases

This package is released via **GitHub Releases** and published automatically to npm.

To release a new version:

1. Update the `version` field in `package.json`
2. Merge the change into `master`
3. Create a new GitHub Release for that version

Creating the release will trigger a GitHub Actions workflow that:

- builds the package
- publishes it to npm using trusted (OIDC) publishing

> You do **not** need to push tags manually.
npm package: @hmcts/look-and-feel
Description: One Question Per Page apps made easy
Latest version: 5.0.6

# Look and Feel

[![Greenkeeper badge](https://badges.greenkeeper.io/hmcts/look-and-feel.svg)](https://greenkeeper.io/)

[![Build Status](https://travis-ci.org/hmcts/look-and-feel.svg?branch=master)](https://travis-ci.org/hmcts/look-and-feel)
[![npm (scoped)](https://img.shields.io/npm/v/@hmcts/look-and-feel.svg)](https://www.npmjs.com/package/@hmcts/look-and-feel)
[![Codacy grade](https://img.shields.io/codacy/grade/46e31ccc16cf41688c9e8dd5e4c112a9.svg)](https://www.codacy.com/app/michaeldfallen/look-and-feel)

GOV.UK look and feel as a single easy import (at least that's the goal).

## Usage

To use look-and-feel first add it to your `package.json`:

    yarn add @hmcts/look-and-feel

Then configure it in your `app.js`:

    const express = require('express');
    const app = express();
    ...
    const lookAndFeel = require('@hmcts/look-and-feel');
    lookAndFeel.configure(app);
    ...

## Documentation

All documentation is stored in the [docs] folder.

## Verification

Run tests:
    
    yarn test

Run Eslint:

    yarn lint

Check for Vulnerabilities:

    yarn audit
npm package: @hmcts/nodejs-logging
Description: [![Greenkeeper badge](https://badges.greenkeeper.io/hmcts/nodejs-logging.svg)](https://greenkeeper.io/)
Author: HMCTS
Latest version: 4.0.4

# Node.js Logging

[![Greenkeeper badge](https://badges.greenkeeper.io/hmcts/nodejs-logging.svg)](https://greenkeeper.io/)

A logging component used by Reform's Node.js applications.

**This is not compatible with Reform tactical logging spec. Logger 2.x should be used for tactical applications.**

Some background info:
* there are 6 log levels: `silly` (5), `debug` (4), `verbose` (3), `info` (2), `warn` (1) and `error` (0).
* log level can be set via an environment variable `LOG_LEVEL`, the default is `info`.
* logging output in JSON format can be enabled by setting environment variable `JSON_PRINT` to `true`, the default is `false`:
* by default logging is turned off when running the unit tests.

## Usage

Add it as your project's dependency:

```bash
yarn add @hmcts/nodejs-logging
```

Require it:

```javascript
const { Logger } = require('@hmcts/nodejs-logging')
```

Then you can create a logger instance and use it to log information:

```javascript
const logger = Logger.getLogger('app.js') // app.js is just an example, can be anything that's meaningful to you
```

Usage are:

```
logger.info({
  message: 'Yay, logging!'
})
```

or

```
logger.log({
  level: 'info',
  message: 'What time is the testing at?'
});
```

Above will result in the following log printed (if JSON format is enabled).

```
{ level: 'info',
  message: 'What time is the testing at?',
  label: 'app.js',
  timestamp: '2017-09-30T03:57:26.875Z' }
```

### Access logging for Express applications 

Optionally you can use the built-in Express access logger:

```javascript
const { Express } = require('@hmcts/nodejs-logging')

app.use(Express.accessLogger())
```

## Units Tests

Just do

```
yarn test
```

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE.md) file for details.
npm package: @hmcts/one-per-page
Description: One question per page apps made easy
Latest version: 6.0.1

# One per page

## :warning: Deprecated

This project is no longer supported or recommended for use.
There has been no one maintaining it in over 3 years, and is only used by 4 projects at the current time most of which are being retired.

## Introduction

Easily build GOV.UK style one question per page services using express,
nunjucks and webpack.

<img src="/docs/images/hero-screens.png"
  id= "hero"
  onmouseover="changeImage('hero','/docs/images/hero-code.png')"
  onmouseout="changeImage('hero','/docs/images/hero-screens.png')" />

## Features

One per page solves a number of hard problems in building a one question per
page service:

- Capturing and validating users answers
- Navigating branching journeys
- Session management
- Content internationalisation
- Template management

All documentation is available at https://one-per-page.herokuapp.com

## Usage

Add one-per-page and look-and-feel to your package.json:

```bash
> yarn add @hmcts/one-per-page @hmcts/look-and-feel
```

Then create a few steps and wire them to your express app:

_app.js_
```js
const app = express();

class Start extends EntryPoint {
  next() {
    return goTo(this.journey.steps.CheckYourAnswers);
  }
}

class Name extends Question {
  get form() {
    return form({
      firstName: text.joi('Enter your first name', Joi.string().required()),
      lastName: text.joi('Enter your last name', Joi.string().required()),
    });
  }
  next() {
    return goTo(this.journey.steps.CheckYourAnswers);
  }
}

journey(app, {
  steps: [
    Start,
    Name,
    CheckYourAnswers
  ]
});

app.listen(3000);
```

And create a template for your step:

_Name.template.html_

```jinja
{% extends "look-and-feel/layouts/question.html" %}
{% from "look-and-feel/components/fields.njk" import textbox %}

{% set title %}What is your name?{% endset %}

{% block fields %}
  {{ textbox(fields.firstName, "First Name") }}
  {{ textbox(fields.lastName, "Last Name") }}
{% endblock %}
```

> [`@hmcts/look-and-feel`] helps with creating templates

Then start your app:

```bash
> node app.js
# listening on port 3000
```

## Contribute

This project is open to accepting contributions. Check out our
[open issues for ideas][issues] on where to start or to raise your own issue.
Read our [development documentation][dev-docs] for help on getting started.

[issues]: https://github.com/hmcts/one-per-page/issues
[dev-docs]: https://one-per-page.herokuapp.com/docs/development
[`@hmcts/look-and-feel`]: https://github.com/hmcts/look-and-feel
npm package: @hmcts/os-names-client
Description: Ordnance Survey Names client (https://apidocs.os.uk/docs/os-names-overview)
Latest version: 1.0.7

# os-names-client-node

API Client wrapper for [Ordnance Survey Names API](https://apidocs.os.uk/docs/os-names-overview).

[![Build Status](https://travis-ci.org/hmcts/os-places-client-node.svg?branch=master)](https://travis-ci.org/hmcts/os-names-client-node.svg?branch=master)  
[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)  
[![Greenkeeper badge](https://badges.greenkeeper.io/hmcts/os-names-client-node.svg)](https://greenkeeper.io/)

# Usage

## Authentication

You will need an API key for `OS Names API - Capture and Verification`. You can get one by emailing platforms@digital.justice.gov.uk with a brief summary of:

* Who you are
* What project you're going to be using it on
* Roughly how many lookups you expect to do per day
* No. of keys required
* Product and environment type for each key
* Contact name and email address for issuing keys


## Quick start
_TBD_
npm package: @hmcts/os-places-client
Description: Ordnance Survey address lookup client (https://apidocs.os.uk/docs/os-places-postcode)
Latest version: 1.1.7

# os-places-client-node

Written to directly replace the deprecated [postcode-info-client-node](https://github.com/hmcts/postcodeinfo-client-node)

API Client wrapper for [Ordnance Survey Places Postcode API](https://apidocs.os.uk/docs/os-places-postcode).

[![Build Status](https://travis-ci.org/hmcts/os-places-client-node.svg?branch=master)](https://travis-ci.org/hmcts/os-places-client-node.svg?branch=master)  
[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)  
[![Greenkeeper badge](https://badges.greenkeeper.io/hmcts/os-places-client-node.svg)](https://greenkeeper.io/)

# Usage

## Authentication

You will need an API key for `OS Places API - Capture and Verification`. You can get one by emailing platforms@digital.justice.gov.uk with a brief summary of:

* Who you are
* What project you're going to be using it on
* Roughly how many lookups you expect to do per day
* No. of keys required
* Product and environment type for each key
* Contact name and email address for issuing keys


## Quick start
```bash
$ yarn add @hmcts/os-places-client
```

Typescript:
```ts
import { OSPlacesClient  } from '@hmcts/os-places-client'

new OSPlacesClient('<token here>').lookupByPostcode('SN15NB')

```

- Javascript -

```js
const OSPlacesClient = require('@hmcts/os-places-client').OSPlacesClient

new OSPlacesClient('<token here>').lookupByPostcode('SN15NB')
```

## Version 1.1.0+
Changing the api url to https://api.os.uk/search/places/v1/postcode
You will need a new token when upgrading to version 1.1.0+ from version 1.0.6
npm package: @hmcts/pdf-annotate
Description: Fixes for rotation handling of annotations in instructure/pdf-annotates.js
Author: HMCTS
Latest version: 1.1.17

# hmcts/pdf-annotate.js (forked from instructure/pdf-annotate.js)

[![build status](https://api.travis-ci.com/hmcts/pdf-annotate.js.svg?branch=master)](https://travis-ci.com/hmcts/pdf-annotate.js)
[![Coverage Status](https://coveralls.io/repos/github/hmcts/pdf-annotate.js/badge.svg)](https://coveralls.io/github/hmcts/pdf-annotate.js)

A fork of [pdf-annotate.js](https://github.com/instructure/pdf-annotate.js) to fix issues with rotations

## Objectives

- Provide a low level annotation layer for [pdf.js](https://github.com/mozilla/pdf.js).
- Optional high level UI for managing annotations.
- Agnostic of backend, just supply your own `StoreAdapter` to fetch/store data.
- Prescribe annotation format.

## Example

```js
import __pdfjs from 'pdfjs-dist/build/pdf';
import PDFJSAnnotate from 'pdfjs-annotate';
import MyStoreAdapter from './myStoreAdapter';

const { UI } = PDFJSAnnotate;
const VIEWER = document.getElementById('viewer');
const RENDER_OPTIONS = {
  documentId: 'MyPDF.pdf',
  pdfDocument: null,
  scale: 1,
  rotate: 0
};

PDFJS.workerSrc = 'pdf.worker.js';
PDFJSAnnotate.setStoreAdapter(MyStoreAdapter);

PDFJS.getDocument(RENDER_OPTIONS.documentId).then((pdf) => {
  RENDER_OPTIONS.pdfDocument = pdf;
  VIEWER.appendChild(UI.createPage(1));
  UI.renderPage(1, RENDER_OPTIONS);
});
```

See more [examples](https://github.com/instructure/pdf-annotate.js/blob/master/web/index.js).

## Documentation

[View the docs](https://github.com/instructure/pdf-annotate.js/tree/master/docs).

## Developing

```bash
# clone the repo
$ git clone https://github.com/hmcts/pdf-annotate.js.git
$ cd pdf-annotate.js

# intall dependencies
$ npm install

# start example server
$ npm start
$ open http://127.0.0.1:8080

# run tests
$ npm test
```
## License

MIT
npm package: @hmcts/pdf-annotate.js
Description: Fixes for rotation handling of annotations in instructure/pdf-annotates.js
Author: HMCTS
Latest version: 1.1.1

# hmcts/pdf-annotate.js (forked from instructure/pdf-annotate.js)

[![build status](https://img.shields.io/travis/hmcts/pdf-annotate.js.svg?style=flat-square)](https://travis-ci.com/hmcts/pdf-annotate.js)
[![code coverage](https://img.shields.io/coveralls/hmcts/pdf-annotate.js.svg?style=flat-square)](https://coveralls.io/r/hmcts/pdf-annotate.js)

A fork of [pdf-annotate.js](https://github.com/instructure/pdf-annotate.js) to fix issues with rotations

## Objectives

- Provide a low level annotation layer for [pdf.js](https://github.com/mozilla/pdf.js).
- Optional high level UI for managing annotations.
- Agnostic of backend, just supply your own `StoreAdapter` to fetch/store data.
- Prescribe annotation format.

## Example

```js
import __pdfjs from 'pdfjs-dist/build/pdf';
import PDFJSAnnotate from 'pdfjs-annotate';
import MyStoreAdapter from './myStoreAdapter';

const { UI } = PDFJSAnnotate;
const VIEWER = document.getElementById('viewer');
const RENDER_OPTIONS = {
  documentId: 'MyPDF.pdf',
  pdfDocument: null,
  scale: 1,
  rotate: 0
};

PDFJS.workerSrc = 'pdf.worker.js';
PDFJSAnnotate.setStoreAdapter(MyStoreAdapter);

PDFJS.getDocument(RENDER_OPTIONS.documentId).then((pdf) => {
  RENDER_OPTIONS.pdfDocument = pdf;
  VIEWER.appendChild(UI.createPage(1));
  UI.renderPage(1, RENDER_OPTIONS);
});
```

See more [examples](https://github.com/instructure/pdf-annotate.js/blob/master/web/index.js).

## Documentation

[View the docs](https://github.com/instructure/pdf-annotate.js/tree/master/docs).

## Developing

```bash
# clone the repo
$ git clone https://github.com/hmcts/pdf-annotate.js.git
$ cd pdf-annotate.js

# intall dependencies
$ npm install

# start example server
$ npm start
$ open http://127.0.0.1:8080

# run tests
$ npm test
```
## License

MIT
npm package: @hmcts/postcodeinfo-client
Description: MoJ postcode lookup client
Latest version: 1.1.0

# postcode-info-client-node

API Client wrapper for [MoJ Postcode Info API](https://github.com/ministryofjustice/postcodeinfo)
which contains public sector information licensed under the Open Government License v2.0

[![Build Status](https://travis-ci.org/hmcts/postcode-info-client-node.svg?branch=master)](https://travis-ci.org/hmcts/postcode-info-client-node.svg?branch=master)  
[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)  
[![Greenkeeper badge](https://badges.greenkeeper.io/hmcts/postcode-info-client-node.svg)](https://greenkeeper.io/)

# Usage

## Authentication

You will need an _authentication token_ ('auth token'). If you're using MoJ DS's Postcode Info server, 
you can get one by emailing platforms@digital.justice.gov.uk with a brief summary of:

* who you are
* what project you're going to be using it on
* roughly how many lookups you expect to do per day

If you're running your own server, see https://github.com/ministryofjustice/postcodeinfo#auth_tokens for instructions on how to set a token up.

## Quick start
```bash
$ yarn add @hmcts/postcodeinfo-client
```

Typescript:
```ts
import { PostcodeInfoClient  } from '@hmcts/postcodeinfo-client'

new PostcodeInfoClient('<token here>').lookupPostcode('SN15NB')

```

- Javascript -

```js
const PostcodeInfoClient = require('@hmcts/postcodeinfo-client').PostcodeInfoClient

new PostcodeInfoClient('<token here>').lookupPostcode('SN15NB')
```
npm package: @hmcts/probate-dev-env
Description: Scripts to set up the Probate development environment
Author: Probate
Latest version: 1.2.45

# Probate Dev Env

Scripts to set up the Probate development environment.

## Usage

Create the environment:

```
npx @hmcts/probate-dev-env --create
```

Start the environment:

```
npx @hmcts/probate-dev-env
```

Stop the environment:

```
npx @hmcts/probate-dev-env --stop
```

### Custom compose file

A custom docker-compose file can be specified using an environment:

```
COMPOSE_FILE="-f docker/custom/compose.yml" npx @hmcts/probate-dev-env
```

There are assumptions that the fees database will exist and that the CCD services have been specified in the compose file.

## Dependencies

This script requires:

- Azure CLI
- Docker & Docker compose
- jq
- curl
- psql (Postgres client)

## License

The MIT License (MIT)

Copyright (c) 2017 HMCTS (HM Courts & Tribunals Service)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
npm package: @hmcts/tech-docs
Description: Easy govuk styled documentation from your markdown
Latest version: 0.4.0

# Tech Docs

Serve your markdown documentation in GOV.UK style. Store your docs alongside the
code they describe.

## Usage

From the root of your node app:

```bash
> npm install @hmcts/tech-docs
> tech-docs
```

Your documentation will be available on http://localhost:3000.

Tech docs will:
- Parse your package.json for repo / issues / npm links
- Find any markdown files in `/docs` and serve them

## Installation

Docs app can be installed from npm:

```bash
> npm install -g @hmcts/tech-docs
```