@bjorkhaug/sevent
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

@bjorkhaug/sevent

Description

@bjorkhaug/sevent is an event creation library that helps maintain a consistent event contract across services. It provides functionalities for event encryption, policy management, and metrics tracking on events.

Usage

import { Event } from '@bjorkhaug/sevent'

const event = Event.create('user.request.create', {
  name: 'John Doe',
  email: 'john.doe@example.com',
})
  .setMetadata('description', 'Create a new user')
  .setPolicy('retry', {
    expires_at: Event.seconds(60 * 5),
  })
  .setEncryption('algorithm', 'AES-GCM')

Dependents (0)

Package Sidebar

Install

npm i @bjorkhaug/sevent

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

33.5 kB

Total Files

60

Last publish

Collaborators

  • simenbjorkhaug