@openfn/language-telerivet
TypeScript icon, indicating that this package has built-in type declarations

0.3.2 • Public • Published

Language Telerivet

Language Pack for sending messages using the telerivet API.

Documentation

Configuration

View all the required and optional properties for state.configuration in the official configuration-schema definition.

Send message

Current send expression:

send(
  fields(
    field('to_number', dataValue('recipient_number')),
    field('content', dataValue('recipient_text')),
    // Lots of optional parameters...
    field('message_type', 'sms'),
    field('route_id', dataValue('some_route'))
  )
);

sendBulk messages - WIP

Current sendBulk expression:

send(fields(
  field("content", dataValue("recipient_text")),
  field("to_numbers", [
        "+14155550123",
        "+14255550234",
        "+16505550345"
    ]
  // Lots of optional parameters...
  field("message_type", "sms"),
  field("route_id", dataValue("some_route"))
))

Note that "recipient_text" may be a concatenation like this:

field('content', function (state) {
  return dataValue('salutation')(state).concat(
    '. ',
    dataValue('last_name')(state),
    ', )'
  );
});

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

Readme

Keywords

none

Package Sidebar

Install

npm i @openfn/language-telerivet

Weekly Downloads

4

Version

0.3.2

License

LGPLv3

Unpacked Size

64.1 kB

Total Files

11

Last publish

Collaborators

  • mtuchi
  • elias-ba
  • stuartc-openfn
  • taylordowns2000