# Events

### NubrickEvent

{% hint style="info" %}
送信された `NubrickEvent` は Nubrick サーバーへ送信されます。
{% endhint %}

`NubrickEvent` は `NubrickSDK.dispatch(...)` で送信するアプリイベントです。

```kotlin
data class NubrickEvent(
    val name: String
)
```

```kotlin
NubrickSDK.dispatch(NubrickEvent("<TRIGGER_EVENT_NAME>"))
```

### Event

`Event` は、埋め込みコンポーネント内のアクション発生時に `onEvent` で受け取るイベントです。

```kotlin
data class Event(
    val name: String?,
    val deepLink: String?,
    val payload: List<EventProperty>?
)

data class EventProperty(
    val name: String,
    val value: String,
    val type: EventPropertyType
)

enum class EventPropertyType {
    INTEGER,
    STRING,
    TIMESTAMPZ,
    UNKNOWN
}
```

`onEvent` は `Config(onEvent = ...)`、`NubrickSDK.Embedding(...)`、`RemoteConfigVariant.GetAsEmbedding(...)` などで設定できます。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nubrick.app/reference/android/events.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
