Skip to content
Public template

About

User Referral business logic plugin for the Seneca platform.

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

2 watching

Forks

Repository files navigation

Seneca

A Seneca.js plugin

@seneca/refer

npm version build Known Vulnerabilities Coverage Status Maintainability

Voxgig This open source module is sponsored and supported by Voxgig.

Install

$ npm install seneca@^4 @seneca/entity @seneca/refer

Requires Node.js >=24, Seneca ^4.0.0 and @seneca/entity ^29.0.0: referral entries are saved as refer/entry and refer/occur entities.

Quick Example

const seneca = Seneca().use('@seneca/entity').use('@seneca/refer', {})

const created = await seneca.post('biz:refer,create:entry', {
  user_id: 'u01',
  email: 'alice@example.com',
})

await seneca.post('biz:refer,accept:entry', { token: created.entry.token })

More Examples

See test/ for more usage examples.

Motivation

A Seneca.js plugin.

Support

If you're using this module and need help, you can:

API

Options

None.

Action Patterns

Action Descriptions

« accept:entry,biz:refer »

No description provided.


« biz:refer,create:entry »

Create referral entry.


« biz:refer,ensure:entry »

No description provided.


« biz:refer,give:award »

No description provided.


« biz:refer,load:entry »

No description provided.


« biz:refer,load:rules »

No description provided.


« biz:refer,lost:entry »

No description provided.


« biz:refer,update:occur »

No description provided.


« biz:refer,update:entry »

No description provided.


Contributing

The Senecajs org encourages open participation. If you feel you can help in any way, be it with documentation, examples, extra testing, or new features please get in touch.

Running tests

npm run test

Background

Part of the Senecajs org.

About

User Referral business logic plugin for the Seneca platform.

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages