Wire shapes of webhook configs, deliveries and delivery stats, plus the canonical list of webhook events.
Summary
Types
Params for CorvoNfse.Resources.Webhooks.create/2: %{url:, events:}.
Stats returned by Deliveries.stats/2: a plain JSON string-keyed map of
integers under the keys total, sent, failed, pending, delayed.
Environment wire value: "test" | "live".
Webhook event wire value - one of the canonical 9 events from events/0:
nfse.invoice.authorized, nfse.invoice.rejected, nfse.invoice.failed,
nfse.invoice.reconciliation_required, nfse.invoice.manual_review,
nfse.invoice.documents_ready, nfse.invoice.email_sent,
nfse.invoice.email_failed, nfse.invoice.fiscal_discrepancy. The
webhook.test event is only sent by Webhooks.test/2 and cannot be
subscribed.
A webhook config including its signing secret - returned only by
CorvoNfse.Resources.Webhooks.create/2.
Types
@type create_params() :: map()
Params for CorvoNfse.Resources.Webhooks.create/2: %{url:, events:}.
@type delivery() :: CorvoNfse.Types.Webhook.Delivery.t()
Stats returned by Deliveries.stats/2: a plain JSON string-keyed map of
integers under the keys total, sent, failed, pending, delayed.
@type environment() :: String.t()
Environment wire value: "test" | "live".
@type event() :: String.t()
Webhook event wire value - one of the canonical 9 events from events/0:
nfse.invoice.authorized, nfse.invoice.rejected, nfse.invoice.failed,
nfse.invoice.reconciliation_required, nfse.invoice.manual_review,
nfse.invoice.documents_ready, nfse.invoice.email_sent,
nfse.invoice.email_failed, nfse.invoice.fiscal_discrepancy. The
webhook.test event is only sent by Webhooks.test/2 and cannot be
subscribed.
@type with_secret() :: map()
A webhook config including its signing secret - returned only by
CorvoNfse.Resources.Webhooks.create/2.
Functions
@spec events() :: [String.t()]
The canonical 9 webhook events.