Activity log CRUD backed by SQLite.
Methods
(static) clearByWorkspaceId(workspaceId) → {number}
Delete all activities in a workspace.
Parameters:
| Name | Type | Description |
|---|---|---|
workspaceId |
string |
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
|
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? } |
(static) deleteByProjectId(projectId) → {number}
Delete all activities for a project.
Parameters:
| Name | Type | Description |
|---|---|---|
projectId |
string |
Returns:
Number of deleted rows.
- Type
- number
(static) getAll() → {Array.<Object>}
Get all activities.
Returns:
- Type
- Array.<Object>
(static) getAllAsDict() → {Object.<string, Object>}
Get all activities as a dictionary keyed by ID.
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
|
Returns:
- Type
- Array.<Object>
(static) getFiltered(filtersopt) → {Array.<Object>}
Get filtered activities.
Parameters:
| Name | Type | Attributes | Description | |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
filters |
Object |
<optional> |
Properties
|
Returns:
- Type
- Array.<Object>