Gamend.Notifications.Types (gamend_core v1.0.1192)

Copy Markdown View Source

The metadata["type"] codes a notification may carry.

A notification's type is never read by the server — it exists purely so a client can decide how to render and route it. That makes an unregistered code fail silently: the server stores and delivers it happily, and the client simply never handles it. So the set is closed. Gamend.Notifications rejects an unknown code at write time, and this module is the list clients can rely on.

Plugins add their own by exporting notification_types/0 (see Gamend.Hooks.Declarations); those merge with the core codes below.

Summary

Functions

Core plus plugin-declared codes.

Core notification codes, mapped to their description.

True when code is declared by core or a loaded plugin.

Functions

all()

@spec all() :: %{required(String.t()) => String.t()}

Core plus plugin-declared codes.

core()

@spec core() :: %{required(String.t()) => String.t()}

Core notification codes, mapped to their description.

known?(code)

@spec known?(term()) :: boolean()

True when code is declared by core or a loaded plugin.