Coffrify.Webhook.EventCatalog (Coffrify v0.9.0)

View Source

Static catalog of every Coffrify webhook event. Mirrors the JS catalog bundled with @coffrify/sdk and the server endpoint GET /v1/webhooks/events.

Each entry is a map with the keys :type, :family, :stability, :description, and optionally :required_plan.

Usage

Coffrify.Webhook.EventCatalog.all()
Coffrify.Webhook.EventCatalog.types()
Coffrify.Webhook.EventCatalog.by_family(:transfer)
Coffrify.Webhook.EventCatalog.get("transfer.created")

Summary

Functions

Return every catalog entry.

Return every entry within a given family.

Return every entry restricted to (or above) a given plan.

Return the catalog entry for a given type, or nil.

Return true when type is in the catalog.

Return every known type as a flat list of strings.

Types

entry()

@type entry() :: %{
  type: String.t(),
  family: atom(),
  stability: stability(),
  description: String.t(),
  required_plan: plan() | nil
}

plan()

@type plan() :: :free | :pro | :ultra | :enterprise

stability()

@type stability() :: :stable | :beta | :alpha

Functions

all()

@spec all() :: [entry()]

Return every catalog entry.

by_family(family)

@spec by_family(atom()) :: [entry()]

Return every entry within a given family.

by_plan(plan)

@spec by_plan(plan() | nil) :: [entry()]

Return every entry restricted to (or above) a given plan.

get(type)

@spec get(String.t()) :: entry() | nil

Return the catalog entry for a given type, or nil.

known?(type)

@spec known?(String.t()) :: boolean()

Return true when type is in the catalog.

types()

@spec types() :: [String.t()]

Return every known type as a flat list of strings.