@mastra/mongodb 1.5.0 → 1.5.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
@@ -12,7 +12,7 @@ import { saveScorePayloadSchema } from '@mastra/core/evals';
12
12
 
13
13
  // package.json
14
14
  var package_default = {
15
- version: "1.5.0"};
15
+ version: "1.5.1"};
16
16
  var MongoDBFilterTranslator = class extends BaseFilterTranslator {
17
17
  getSupportedOperators() {
18
18
  return {
@@ -5135,7 +5135,7 @@ Note: This migration may take some time for large collections.
5135
5135
  return span;
5136
5136
  }
5137
5137
  };
5138
- var SNAPSHOT_FIELDS4 = ["name", "description", "content", "rules"];
5138
+ var SNAPSHOT_FIELDS4 = ["name", "description", "content", "rules", "requestContextSchema"];
5139
5139
  var MongoDBPromptBlocksStorage = class _MongoDBPromptBlocksStorage extends PromptBlocksStorage {
5140
5140
  #connector;
5141
5141
  #skipDefaultIndexes;
@@ -5362,7 +5362,7 @@ var MongoDBPromptBlocksStorage = class _MongoDBPromptBlocksStorage extends Promp
5362
5362
  }
5363
5363
  async list(args) {
5364
5364
  try {
5365
- const { page = 0, perPage: perPageInput, orderBy, authorId, metadata, status = "published" } = args || {};
5365
+ const { page = 0, perPage: perPageInput, orderBy, authorId, metadata, status } = args || {};
5366
5366
  const { field, direction } = this.parseOrderBy(orderBy);
5367
5367
  if (page < 0) {
5368
5368
  throw new MastraError(
@@ -5379,7 +5379,9 @@ var MongoDBPromptBlocksStorage = class _MongoDBPromptBlocksStorage extends Promp
5379
5379
  const { offset, perPage: perPageForResponse } = calculatePagination(page, perPageInput, perPage);
5380
5380
  const collection = await this.getCollection(TABLE_PROMPT_BLOCKS);
5381
5381
  const filter = {};
5382
- filter.status = status;
5382
+ if (status) {
5383
+ filter.status = status;
5384
+ }
5383
5385
  if (authorId) {
5384
5386
  filter.authorId = authorId;
5385
5387
  }