0.2.0 • Published 1 year ago

@seneca/customerio-provider v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Seneca Customerio-Provider

Seneca Customerio-Provider is a plugin for Seneca

Provides access to the Customerio API using the Seneca provider convention. Customerio API entities are represented as Seneca entities so that they can be accessed using the Seneca entity API and messages.

See seneca-entity and the Seneca Data Entities Tutorial for more details on the Seneca entity API.

NOTE: underlying third party SDK needs to be replaced as out of date and has a security issue.

npm version build Coverage Status Known Vulnerabilities DeepScan grade Maintainability

VoxgigThis open source module is sponsored and supported by Voxgig.

Quick Example

// Setup - get the key value (<SECRET>) separately from a vault or
// environment variable.
Seneca()
  // Get API keys using the seneca-env plugin
  .use('env', {
    var: {
      $CUSTOMERIO_APIKEY: String,
      $CUSTOMERIO_USERTOKEN: String,
    }
  })
  .use('provider', {
    provider: {
      customerio: {
        keys: {
          apikey: { value: '$CUSTOMERIO_APIKEY' },
          usertoken: { value: '$CUSTOMERIO_USERTOKEN' },
        }
      }
    }
  })
  .use('customerio-provider')

let board = await seneca.entity('provider/customerio/board')
  .load$('<customerio-board-id>')

Console.log('BOARD', board)

board.desc = 'New description'
board = await board.save$()

Console.log('UPDATED BOARD', board)

Install

$ npm install @seneca/customerio-provider @seneca/env

Options

  • debug : boolean false

Set plugin options when loading with:

seneca.use('CustomerioProvider', { name: value, ... })

Note: foo.bar in the list above means { foo: { bar: ... } }

Action Patterns

Action Descriptions

« role:entity,base:customerio,cmd:load,name:repo,zone:provider »

Load Customerio repository data into an entity.


« role:entity,base:customerio,cmd:save,name:repo,zone:provider »

Update Customerio repository data from an entity.


« sys:provider,get:info,provider:customerio »

Get information about the provider.


0.2.0

1 year ago

0.1.0

2 years ago

0.0.3

2 years ago

0.1.1

2 years ago

0.0.4

2 years ago

0.0.2

2 years ago