@mastra/dynamodb 0.14.0 → 0.14.1

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.js CHANGED
@@ -2195,9 +2195,9 @@ var ScoresStorageDynamoDB = class extends ScoresStorage {
2195
2195
  scorerId,
2196
2196
  pagination,
2197
2197
  entityId,
2198
- entityType
2198
+ entityType,
2199
+ source
2199
2200
  }) {
2200
- this.logger.debug("Getting scores by scorer ID", { scorerId, pagination, entityId, entityType });
2201
2201
  try {
2202
2202
  const query = this.service.entities.score.query.byScorer({ entity: "score", scorerId });
2203
2203
  const results = await query.go();
@@ -2208,6 +2208,9 @@ var ScoresStorageDynamoDB = class extends ScoresStorage {
2208
2208
  if (entityType) {
2209
2209
  allScores = allScores.filter((score) => score.entityType === entityType);
2210
2210
  }
2211
+ if (source) {
2212
+ allScores = allScores.filter((score) => score.source === source);
2213
+ }
2211
2214
  allScores.sort((a, b) => b.createdAt.getTime() - a.createdAt.getTime());
2212
2215
  const startIndex = pagination.page * pagination.perPage;
2213
2216
  const endIndex = startIndex + pagination.perPage;
@@ -2233,6 +2236,7 @@ var ScoresStorageDynamoDB = class extends ScoresStorage {
2233
2236
  scorerId: scorerId || "",
2234
2237
  entityId: entityId || "",
2235
2238
  entityType: entityType || "",
2239
+ source: source || "",
2236
2240
  page: pagination.page,
2237
2241
  perPage: pagination.perPage
2238
2242
  }
@@ -3043,10 +3047,13 @@ var DynamoDBStore = class extends MastraStorage {
3043
3047
  });
3044
3048
  }
3045
3049
  async getScoresByScorerId({
3046
- scorerId: _scorerId,
3047
- pagination: _pagination
3050
+ scorerId,
3051
+ source,
3052
+ entityId,
3053
+ entityType,
3054
+ pagination
3048
3055
  }) {
3049
- return this.stores.scores.getScoresByScorerId({ scorerId: _scorerId, pagination: _pagination });
3056
+ return this.stores.scores.getScoresByScorerId({ scorerId, source, entityId, entityType, pagination });
3050
3057
  }
3051
3058
  };
3052
3059