@mastra/convex 1.3.0 → 1.3.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/reference-storage-convex.md +2 -0
- package/dist/docs/references/reference-vectors-convex.md +2 -0
- package/dist/index.cjs +10 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -7
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/scores/index.d.ts +7 -4
- package/dist/storage/domains/scores/index.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1632,29 +1632,32 @@ var ScoresConvex = class extends ScoresStorage {
|
|
|
1632
1632
|
pagination,
|
|
1633
1633
|
entityId,
|
|
1634
1634
|
entityType,
|
|
1635
|
-
source
|
|
1635
|
+
source,
|
|
1636
|
+
filters
|
|
1636
1637
|
}) {
|
|
1637
1638
|
return this.listScores({
|
|
1638
|
-
filters: { scorerId, entityId, entityType, source },
|
|
1639
|
+
filters: { scorerId, entityId, entityType, source, ...filters },
|
|
1639
1640
|
pagination
|
|
1640
1641
|
});
|
|
1641
1642
|
}
|
|
1642
1643
|
async listScoresByRunId({
|
|
1643
1644
|
runId,
|
|
1644
|
-
pagination
|
|
1645
|
+
pagination,
|
|
1646
|
+
filters
|
|
1645
1647
|
}) {
|
|
1646
1648
|
return this.listScores({
|
|
1647
|
-
filters: { runId },
|
|
1649
|
+
filters: { runId, ...filters },
|
|
1648
1650
|
pagination
|
|
1649
1651
|
});
|
|
1650
1652
|
}
|
|
1651
1653
|
async listScoresByEntityId({
|
|
1652
1654
|
entityId,
|
|
1653
1655
|
entityType,
|
|
1654
|
-
pagination
|
|
1656
|
+
pagination,
|
|
1657
|
+
filters
|
|
1655
1658
|
}) {
|
|
1656
1659
|
return this.listScores({
|
|
1657
|
-
filters: { entityId, entityType },
|
|
1660
|
+
filters: { entityId, entityType, ...filters },
|
|
1658
1661
|
pagination
|
|
1659
1662
|
});
|
|
1660
1663
|
}
|
|
@@ -1673,7 +1676,7 @@ var ScoresConvex = class extends ScoresStorage {
|
|
|
1673
1676
|
);
|
|
1674
1677
|
}
|
|
1675
1678
|
const rows = await this.#db.queryTable(TABLE_SCORERS, void 0);
|
|
1676
|
-
const filtered = rows.filter((row) => filters.scorerId ? row.scorerId === filters.scorerId : true).filter((row) => filters.entityId ? row.entityId === filters.entityId : true).filter((row) => filters.entityType ? row.entityType === filters.entityType : true).filter((row) => filters.runId ? row.runId === filters.runId : true).filter((row) => filters.source ? row.source === filters.source : true).sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime());
|
|
1679
|
+
const filtered = rows.filter((row) => filters.scorerId ? row.scorerId === filters.scorerId : true).filter((row) => filters.entityId ? row.entityId === filters.entityId : true).filter((row) => filters.entityType ? row.entityType === filters.entityType : true).filter((row) => filters.runId ? row.runId === filters.runId : true).filter((row) => filters.source ? row.source === filters.source : true).filter((row) => filters.organizationId !== void 0 ? row.organizationId === filters.organizationId : true).filter((row) => filters.projectId !== void 0 ? row.projectId === filters.projectId : true).sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime());
|
|
1677
1680
|
const { perPage, page } = pagination;
|
|
1678
1681
|
const perPageValue = perPage === false ? filtered.length : perPage;
|
|
1679
1682
|
const start = perPage === false ? 0 : page * perPageValue;
|