Skip to main content

Developer README for the progres adaptor

Source: https://github.com/OpenFn/adaptors/tree/main/packages/progres

language-progres

An OpenFn adaptor for building integration jobs for use with the UNHCR ProGres v4 API.

Design notes

  • Integration must run through UNHCR's DTP, a middleware layer that provides a public API for UNHCR internal software.
  • An API token and a self-signed certificate must be provided for communication with UNHCR's DTP.
  • Two-way sync must be possible between Primero and ProGres
  • Teams still in discussion about whether the most common use-case will be a timed sync or real-time/event-based sync.

Documentation

sample configuration

{
"url": "https://endpoint/To/DTP",
"key": "-----BEGIN PRIVATE KEY-----SOMETYPEOFPRIVATEVALUE-----END PRIVATE KEY-----",
"cert": "-----BEGIN CERTIFICATE-----SOMETYPEOFVALUE-----END CERTIFICATE-----",
"token": "[REDACTED]"
}

Posting data to an endpoint with SSL cert authentication

postData({
url: urlDTP,
body: { a: 1 },
headers: {
'Subscription-Key': configuration['token'],
},
agentOptions: {
key,
cert,
},
});

Development

Clone the adaptors monorepo. Follow the Getting Started guide inside to get set up.

Run tests using pnpm run test or pnpm run test:watch

Build the project using pnpm build.

To just build the docs run pnpm build docs