# @types/rabbitmq-schema

> TypeScript definitions for rabbitmq-schema

Latest version **2.0.5** (published 2023-11-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/rabbitmq-schema
pnpm add @types/rabbitmq-schema
yarn add @types/rabbitmq-schema
bun add @types/rabbitmq-schema
```

## Health

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

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.0.5 |
| Published | 2023-11-22 |
| First published | 2018-12-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51437 |
| Maintainers | types |

## Links

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

## Recent versions

- 2.0.5 (latest) — 2023-11-22
- 2.0.1 (ts3.6) — 2021-07-08
- 2.0.0 (ts2.2) — 2018-12-06
- 2.0.4 — 2023-11-07
- 2.0.3 — 2023-10-18
- 2.0.2 — 2023-09-27

## README

# Installation
> `npm install --save @types/rabbitmq-schema`

# Summary
This package contains type definitions for rabbitmq-schema (https://github.com/tjmehta/rabbitmq-schema).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rabbitmq-schema.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rabbitmq-schema/index.d.ts)
````ts
interface Binding {
    destination: Exchange | Queue;
    source: Exchange;
    args?: object | undefined;
    routingPattern?: string | undefined;
}

interface TopicBinding extends Binding {
    routingPattern: string;
}

interface DirectBinding extends Binding {
    routingPattern: string;
}

interface Topology {
    options?: object | undefined;
}

interface Exchange extends Topology {
    exchange: string;
    type: string;
    bindings: Binding[];
}

interface FanoutExchange extends Exchange {
    type: "fanout";
}

interface TopicExchange extends Exchange {
    type: "topic";
    bindings: TopicBinding[];
}

interface DirectExchange extends Exchange {
    type: "direct";
    bindings: DirectBinding[];
}

interface Queue extends Topology {
    queue: string;
    messageSchema: object;
}

declare class RabbitMQSchema {
    constructor(schema: Topology | Topology[], parentPath?: string);

    getExchanges(): Exchange[];

    getBindings(): Binding[];

    getQueues(): Queue[];

    getDirectBindings(): DirectBinding[];

    validate(schema: Topology | Topology[], parentPath?: string): void;

    validateMessage<T>(exchangeName: string, routingPattern: string, message: T): T;

    // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
    getQueueByName(name: string): Queue | void;

    // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
    getExchangeByName(name: string): Exchange | void;
}

export = RabbitMQSchema;

````

### Additional Details
 * Last updated: Wed, 22 Nov 2023 00:24:48 GMT
 * Dependencies: none

# Credits
These definitions were written by [Alex Duka](https://github.com/rulezzz1987).

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