1.0.1 • Published 6 months ago

@lokalise/events-common v1.0.1

Weekly downloads
-
License
-
Repository
github
Last release
6 months 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.1

6 months ago

1.0.0

6 months ago