73 lines
2.9 KiB
YAML
73 lines
2.9 KiB
YAML
|
|
# =====================================================================
|
||
|
|
# Tenant Events — multi-tenancy / reseller-specific
|
||
|
|
# =====================================================================
|
||
|
|
events:
|
||
|
|
|
||
|
|
tenant.usage.recorded.v1:
|
||
|
|
routing_key: tenant.usage.recorded.v1
|
||
|
|
description: Daily usage aggregate published (by usage aggregator cron).
|
||
|
|
payload:
|
||
|
|
type: object
|
||
|
|
required: [tenant_id, usage_date, renders_completed, render_seconds]
|
||
|
|
properties:
|
||
|
|
tenant_id: { type: string, format: uuid }
|
||
|
|
usage_date: { type: string, format: date }
|
||
|
|
renders_started: { type: integer }
|
||
|
|
renders_completed: { type: integer }
|
||
|
|
renders_failed: { type: integer }
|
||
|
|
render_seconds: { type: integer, format: int64 }
|
||
|
|
render_compute_sec: { type: integer, format: int64 }
|
||
|
|
storage_bytes: { type: integer, format: int64 }
|
||
|
|
api_calls: { type: integer, format: int64 }
|
||
|
|
active_users: { type: integer }
|
||
|
|
new_users: { type: integer }
|
||
|
|
amount_billed_minor: { type: integer, format: int64 }
|
||
|
|
currency: { type: string }
|
||
|
|
|
||
|
|
tenant.webhook.fired.v1:
|
||
|
|
routing_key: tenant.webhook.fired.v1
|
||
|
|
description: A webhook was successfully delivered to a reseller.
|
||
|
|
payload:
|
||
|
|
type: object
|
||
|
|
required: [webhook_id, tenant_id, event_type, response_status]
|
||
|
|
properties:
|
||
|
|
webhook_id: { type: string, format: uuid }
|
||
|
|
tenant_id: { type: string, format: uuid }
|
||
|
|
delivery_id: { type: string, format: uuid }
|
||
|
|
event_type: { type: string }
|
||
|
|
request_url: { type: string }
|
||
|
|
response_status: { type: integer }
|
||
|
|
duration_ms: { type: integer }
|
||
|
|
attempt: { type: integer }
|
||
|
|
|
||
|
|
tenant.webhook.failed.v1:
|
||
|
|
routing_key: tenant.webhook.failed.v1
|
||
|
|
description: A webhook delivery exhausted retries.
|
||
|
|
payload:
|
||
|
|
type: object
|
||
|
|
required: [webhook_id, tenant_id, event_type, last_status, last_error]
|
||
|
|
properties:
|
||
|
|
webhook_id: { type: string, format: uuid }
|
||
|
|
tenant_id: { type: string, format: uuid }
|
||
|
|
delivery_id: { type: string, format: uuid }
|
||
|
|
event_type: { type: string }
|
||
|
|
request_url: { type: string }
|
||
|
|
last_status: { type: integer, nullable: true }
|
||
|
|
last_error: { type: string }
|
||
|
|
attempts: { type: integer }
|
||
|
|
webhook_disabled: { type: boolean, description: "True if auto-disabled" }
|
||
|
|
|
||
|
|
tenant.api.rate_limited.v1:
|
||
|
|
routing_key: tenant.api.rate_limited.v1
|
||
|
|
description: A tenant exceeded its API rate limit (informational).
|
||
|
|
payload:
|
||
|
|
type: object
|
||
|
|
required: [tenant_id, api_key_id, limit_rpm, window_start]
|
||
|
|
properties:
|
||
|
|
tenant_id: { type: string, format: uuid }
|
||
|
|
api_key_id: { type: string, format: uuid }
|
||
|
|
limit_rpm: { type: integer }
|
||
|
|
actual_rpm: { type: integer }
|
||
|
|
window_start: { type: string, format: date-time }
|
||
|
|
ip_address: { type: string }
|