# @types/kafka-node-avro

> TypeScript definitions for kafka-node-avro

Latest version **4.0.2** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/kafka-node-avro
pnpm add @types/kafka-node-avro
yarn add @types/kafka-node-avro
bun add @types/kafka-node-avro
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 4.0.2 |
| Published | 2023-11-07 |
| First published | 2019-10-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51372 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/kafka-node-avro
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/kafka-node-avro
- npm.io page: https://npm.io/package/@types/kafka-node-avro

## Recent versions

- 4.0.2 (latest) — 2023-11-07
- 4.0.0 (ts2.2) — 2019-10-22
- 4.0.1 — 2023-10-18

## README

# Installation
> `npm install --save @types/kafka-node-avro`

# Summary
This package contains type definitions for kafka-node-avro (https://github.com/narcisoguillen/kafka-node-avro#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/kafka-node-avro.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/kafka-node-avro/index.d.ts)
````ts
export interface SchemaSettings {
    /** Kafka schema registry url */
    registry: string;
}

export interface KafkaSettings {
    /** Kafka broker host name */
    kafkaHost: string;
}

export interface Settings {
    /** Kafka broker settings */
    kafka: KafkaSettings;
    /** Kafka schema registry settings */
    schema: SchemaSettings;
}

export interface SendOptions {
    /** Kafka topic name to publish message */
    topic: string;
    /** Message key */
    key: string;
    /**
     * Object to send to kafka.
     * It will be automatically Avro encoded if schema registry finds a valid schema for topic
     */
    messages: object;
}

export interface Kafka {
    /** Publishes message to Kafka */
    send: (options: SendOptions) => Promise<{}>;
}

/**
 * Initialize Kafka client
 */
export function init(settings: Settings): Promise<Kafka>;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 03:09:37 GMT
 * Dependencies: none

# Credits
These definitions were written by [Gediminas Katilevicius](https://github.com/alfamegaxq).

---
_Source: https://npm.io/package/@types/kafka-node-avro · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
