Module: database/repositories/activityRepo

Activity log CRUD backed by SQLite.

Source:

Methods

(static) clearByWorkspaceId(workspaceId) → {number}

Delete all activities in a workspace.

Parameters:
Name Type Description
workspaceId string
Source:
Returns:

Number of deleted rows.

Type
number

(static) countFiltered(filtersopt) → {number}

Count activities with optional workspace/project scope.

Parameters:
Name Type Attributes Description
filters Object <optional>
Properties
Name Type Attributes Description
workspaceId string <optional>
projectId string <optional>
Source:
Returns:
Type
number

(static) create(activity)

Create an activity entry.

Parameters:
Name Type Description
activity Object

— { id, type, projectId, projectName, testId, testName, detail, status, createdAt, userId?, userName?, workspaceId? }

Source:

(static) deleteByProjectId(projectId) → {number}

Delete all activities for a project.

Parameters:
Name Type Description
projectId string
Source:
Returns:

Number of deleted rows.

Type
number

(static) getAll() → {Array.<Object>}

Get all activities.

Source:
Returns:
Type
Array.<Object>

(static) getAllAsDict() → {Object.<string, Object>}

Get all activities as a dictionary keyed by ID.

Source:
Returns:
Type
Object.<string, Object>

(static) getByTypes(types, optsopt) → {Array.<Object>}

Get activities filtered by type for dashboard analytics. Only returns type, status, createdAt — skips detail, names, etc.

Parameters:
Name Type Attributes Description
types Array.<string>

— Activity types to include.

opts Object <optional>
Properties
Name Type Attributes Description
workspaceId string <optional>

— Optional workspace scope.

Source:
Returns:
Type
Array.<Object>

(static) getFiltered(filtersopt) → {Array.<Object>}

Get filtered activities.

Parameters:
Name Type Attributes Description
filters Object <optional>
Properties
Name Type Attributes Default Description
type string <optional>
projectId string <optional>
workspaceId string <optional>

— Scope to workspace (ACL-001).

limit number <optional>
200
Source:
Returns:
Type
Array.<Object>