@mastra/dynamodb 0.14.0-alpha.2 → 0.14.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/dist/index.cjs CHANGED
@@ -2197,9 +2197,9 @@ var ScoresStorageDynamoDB = class extends storage.ScoresStorage {
2197
2197
  scorerId,
2198
2198
  pagination,
2199
2199
  entityId,
2200
- entityType
2200
+ entityType,
2201
+ source
2201
2202
  }) {
2202
- this.logger.debug("Getting scores by scorer ID", { scorerId, pagination, entityId, entityType });
2203
2203
  try {
2204
2204
  const query = this.service.entities.score.query.byScorer({ entity: "score", scorerId });
2205
2205
  const results = await query.go();
@@ -2210,6 +2210,9 @@ var ScoresStorageDynamoDB = class extends storage.ScoresStorage {
2210
2210
  if (entityType) {
2211
2211
  allScores = allScores.filter((score) => score.entityType === entityType);
2212
2212
  }
2213
+ if (source) {
2214
+ allScores = allScores.filter((score) => score.source === source);
2215
+ }
2213
2216
  allScores.sort((a, b) => b.createdAt.getTime() - a.createdAt.getTime());
2214
2217
  const startIndex = pagination.page * pagination.perPage;
2215
2218
  const endIndex = startIndex + pagination.perPage;
@@ -2235,6 +2238,7 @@ var ScoresStorageDynamoDB = class extends storage.ScoresStorage {
2235
2238
  scorerId: scorerId || "",
2236
2239
  entityId: entityId || "",
2237
2240
  entityType: entityType || "",
2241
+ source: source || "",
2238
2242
  page: pagination.page,
2239
2243
  perPage: pagination.perPage
2240
2244
  }
@@ -3045,10 +3049,13 @@ var DynamoDBStore = class extends storage.MastraStorage {
3045
3049
  });
3046
3050
  }
3047
3051
  async getScoresByScorerId({
3048
- scorerId: _scorerId,
3049
- pagination: _pagination
3052
+ scorerId,
3053
+ source,
3054
+ entityId,
3055
+ entityType,
3056
+ pagination
3050
3057
  }) {
3051
- return this.stores.scores.getScoresByScorerId({ scorerId: _scorerId, pagination: _pagination });
3058
+ return this.stores.scores.getScoresByScorerId({ scorerId, source, entityId, entityType, pagination });
3052
3059
  }
3053
3060
  };
3054
3061