feat(activity): per-tenant audit feed in notification dropdown

activity_events records booking lifecycle transitions with the actor
behind each change — staff (dashboard), customer (self-service), or
system (auto-promotion). The notification dropdown leads with the real
feed instead of derived recent-booking guesses.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Tomas DvorakandDevin committed 2026-09-18 16:06:13 +02:00
1 parent e5cb9bd543
commit d86cba61e3
18 files changed
+634 -28

No files matched your search

@@ -15,6 +15,26 @@ export interface paths {
patch?: never;
trace?: never;
};
"/v1/activity": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Recent tenant activity feed
* @description Audit feed of booking lifecycle events — created, cancelled, rescheduled, moved, promoted — with the actor (staff member, customer, or system) for each change. Newest first.
*/
get: operations["listActivityEvents"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/v1/admin/stats": {
parameters: {
query?: never;
@@ -1060,6 +1080,28 @@ export interface paths {
export type webhooks = Record<string, never>;
export interface components {
schemas: {
ActivityEvent: {
/** @description Dotted verb, e.g. booking.created, booking.cancelled, booking.promoted */
action: string;
/**
* @description Who performed the change — dashboard user, self-service customer, or an automatic transition
* @enum {string}
*/
actorKind: "staff" | "customer" | "system";
actorName?: string;
/** Format: date-time */
createdAt: string;
/** Format: uuid */
entityId?: string;
entityType: string;
/** Format: uuid */
id: string;
/** @description Human-readable label, e.g. "Alice Johnson — Relaxation massage" */
summary: string;
};
ActivityFeedResponse: {
events: components["schemas"]["ActivityEvent"][];
};
AuthResponse: {
accessToken: string;
expiresIn?: number;
@@ -1679,6 +1721,35 @@ export interface operations {
};
};
};
listActivityEvents: {
parameters: {
query?: {
limit?: number;
};
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Activity events, newest first */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["ActivityFeedResponse"];
};
};
/** @description Tenant membership not found */
404: {
headers: {
[name: string]: unknown;
};
content?: never;
};
};
};
getAdminStats: {
parameters: {
query?: never;