Skip to content

A set of Typescript utilities for working with Flow Spec packages, from the [Flow Interoperability Project](https://flowinterop.org).

License

Notifications You must be signed in to change notification settings

FLOIP/flow-utils

Repository files navigation

TypeScript version Node.js version MIT

flow-utils

A set of Typescript utilities for working with Flow Spec packages, from the Flow Interoperability Project. For the Flow Interoperability standard, see:

This library provides:

  • Typescript model objects for representing and converting from RapidPro flows to the Flow Interoperability standard. (This is a beta initiative under active development and is not guaranteed to work for all RapidPro action types)
  • Additional utilities for working with Flow Spec packages and the Flow Spec API

Usage

RapidPro Conversion

To convert a RapidPro Flow to the Flow Interoperability standard

import { RapidProToFlowInteropConverter } from '@floip/flow-utils';

const rapidProJson = `{
        "name": "Summary Case Report Test",
        "uuid": "630aed00-f07a-4506-9196-8c77d892cfc9",
        "spec_version": "13.1.0",
        "language": "eng",
        "type": "messaging",
        "nodes": [
          ...
        ]
      }`

const converter = new RapidProToFlowInteropConverter(rapidProJson)
const result = converter.convert()

if(result.isOk()) {
  console.log(result.value)
}
else {
  console.log("Error: " + result.error)
}

About

A set of Typescript utilities for working with Flow Spec packages, from the [Flow Interoperability Project](https://flowinterop.org).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published