1.0.2 • Published 1 year ago

@lokalise/events-common v1.0.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

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

1.0.2

1 year ago

1.0.1

2 years ago

1.0.0

2 years ago