@lokalise/events-common
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Common events library

This library abstracts common models for working with queues and topics.

Getting Started

Install all dependencies:

npm install

Run all tests:

npm run test

Usage:

Use base event schema with you defined event payload. Example:

export type IMPORT_CONTENT_PAYLOAD_SCHEMA = z.object({
    youField: z.string(),
})

export const IMPORT_CONTENT_SCHEMA = z.intersection(
	BASE_EVENT_SCHEMA,
	z.object({
		payload: IMPORT_CONTENT_PAYLOAD_SCHEMA,
	}),
)

In this example BASE_EVENT_SCHEMA payload will be overridden by IMPORT_CONTENT_PAYLOAD_SCHEMA

Readme

Keywords

none

Package Sidebar

Install

npm i @lokalise/events-common

Weekly Downloads

2,065

Version

1.0.1

License

none

Unpacked Size

10.4 kB

Total Files

12

Last publish

Collaborators

  • carlos_gamero
  • kibertoad
  • arthuracs
  • yury.kravtsov
  • filippos.mikropoulos
  • aplokalise
  • botlokalise
  • laurislokalise
  • marcocardosolok
  • bodrovis