<!--
 ⚠️  AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
 This file is automatically generated by scripts/docs-generator.js
 To make changes, edit the source TypeScript files or update the generator script
-->

[agents](../../) / [Exports](../modules) / StructuredEventService

# Class: StructuredEventService

A scoped event service that always emits with an owner binding applied.

## Hierarchy

- [`AbstractEventService`](AbstractEventService)

  ↳ **`StructuredEventService`**

## Table of contents

### Constructors

- [constructor](StructuredEventService#constructor)

### Methods

- [emit](StructuredEventService#emit)

## Constructors

### constructor

• **new StructuredEventService**(`base`, `binding`): [`StructuredEventService`](StructuredEventService)

#### Parameters

| Name      | Type                                                                   |
| :-------- | :--------------------------------------------------------------------- |
| `base`    | [`IEventService`](../interfaces/IEventService)                         |
| `binding` | [`IEventServiceOwnerBinding`](../interfaces/IEventServiceOwnerBinding) |

#### Returns

[`StructuredEventService`](StructuredEventService)

#### Overrides

[AbstractEventService](AbstractEventService).[constructor](AbstractEventService#constructor)

#### Defined in

[packages/agents/src/services/event-service.ts:60](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/services/event-service.ts#L60)

## Methods

### emit

▸ **emit**(`eventType`, `data`, `context?`): `void`

#### Parameters

| Name        | Type                                             |
| :---------- | :----------------------------------------------- |
| `eventType` | `string`                                         |
| `data`      | [`IBaseEventData`](../interfaces/IBaseEventData) |
| `context?`  | [`IEventContext`](../interfaces/IEventContext)   |

#### Returns

`void`

#### Overrides

[AbstractEventService](AbstractEventService).[emit](AbstractEventService#emit)

#### Defined in

[packages/agents/src/services/event-service.ts:66](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/services/event-service.ts#L66)
