Interfazhost
StatsService
Metricas AGREGADAS del dominio (READ_STATS, riesgo medio). Solo conteos: nunca asuntos, remitentes, direcciones ni contenido. Solo responde si el usuario que ejecuta es administrador (nivel >= 1); para los demas falla con STATS_ERROR: forbidden. Cuota: 20 consultas por ejecucion.
Firma
export interface StatsService {
overview(args?: { days?: number; }): Promise<{ users: { total: number; new7d: number; active30d: number; }; mail: { days: StatsMailDay[]; totals: { received: number; sent: number; spamBlocked: number; }; }; generatedAt: string; }>;
}Miembros (1)
| Nombre | Tipo | Descripción |
|---|---|---|
| overview | overview(args?: { days?: number; }): Promise<{ users: { total: number; new7d: number; active30d: number; }; mail: { days: StatsMailDay[]; totals: { received: number; sent: number; spamBlocked: number; }; }; generatedAt: string; }> | READ_STATS. |
Ejemplos
const s = await ctx.services.stats.overview({ days: 7 });
// s.users.total, s.mail.days[6].spamBlocked, s.mail.totals.receivedUsado en / Referenciado por
Referencia a
Fuente: bloomx-extensions/_shared/sdk/ctx.d.ts:784 · ctx.d.ts