"""
Webhook-out system for g-gremlin.

Enables any command to emit its AgenticResult to external webhooks
with format-specific transformations for iPaaS compatibility.

Usage:
    g-gremlin push --webhook-out https://hooks.zapier.com/... --webhook-format flat
    g-gremlin sync --webhook-out @my-profile
"""

from g_gremlin.webhook_out.envelope import (
    WebhookEnvelope,
    derive_event_type,
    mask_url,
    redact_sensitive,
)
from g_gremlin.webhook_out.emitter import WebhookDeliveryResult, WebhookEmitter
from g_gremlin.webhook_out.profiles import (
    WebhookProfile,
    profile_delete,
    profile_get,
    profile_list,
    profile_set,
)
from g_gremlin.webhook_out.transformers import (
    TRANSFORMERS,
    get_transformer,
    transform_flat,
    transform_generic,
    transform_wrapped,
)

__all__ = [
    # Envelope
    "WebhookEnvelope",
    "derive_event_type",
    "redact_sensitive",
    "mask_url",
    # Emitter
    "WebhookEmitter",
    "WebhookDeliveryResult",
    # Profiles
    "WebhookProfile",
    "profile_set",
    "profile_get",
    "profile_list",
    "profile_delete",
    # Transformers
    "TRANSFORMERS",
    "get_transformer",
    "transform_flat",
    "transform_wrapped",
    "transform_generic",
]
