feat(logs): add workspace activity log api

This commit is contained in:
2026-04-28 16:42:37 +03:30
parent c8a118788b
commit 71924ce6fb
32 changed files with 1118 additions and 122 deletions

View File

@@ -0,0 +1,27 @@
from __future__ import annotations
def build_workspace_log_metadata(
*,
section: str,
workspace_id,
target_id,
target_label: str,
extra: dict | None = None,
) -> dict:
metadata = {
"workspace_id": str(workspace_id),
"section": section,
"target_id": str(target_id),
"target_label": target_label,
}
if extra:
metadata.update(
{
key: value
for key, value in extra.items()
if value is not None
}
)
return metadata