@mastra/mongodb 1.19.0 → 1.19.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.
@@ -3,7 +3,7 @@ name: mastra-mongodb
3
3
  description: Documentation for @mastra/mongodb. Use when working with @mastra/mongodb APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/mongodb"
6
- version: "1.19.0"
6
+ version: "1.19.1-alpha.0"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.19.0",
2
+ "version": "1.19.1-alpha.0",
3
3
  "package": "@mastra/mongodb",
4
4
  "exports": {},
5
5
  "modules": {}
package/dist/index.cjs CHANGED
@@ -10,7 +10,7 @@ let _mastra_core_agent = require("@mastra/core/agent");
10
10
  let _mastra_core_evals = require("@mastra/core/evals");
11
11
  let _mastra_core_storage_domains_skills = require("@mastra/core/storage/domains/skills");
12
12
  //#region package.json
13
- var version = "1.19.0";
13
+ var version = "1.19.1-alpha.0";
14
14
  //#endregion
15
15
  //#region src/vector/filter.ts
16
16
  /**
@@ -11015,7 +11015,7 @@ var MongoDBSkillsStorage = class MongoDBSkillsStorage extends _mastra_core_stora
11015
11015
  }
11016
11016
  async list(args) {
11017
11017
  try {
11018
- const { page = 0, perPage: perPageInput, orderBy, authorId, visibility, metadata } = args || {};
11018
+ const { page = 0, perPage: perPageInput, orderBy, authorId, visibility, metadata, status, entityIds } = args || {};
11019
11019
  const { field, direction } = this.parseOrderBy(orderBy);
11020
11020
  if (page < 0) throw new _mastra_core_error.MastraError({
11021
11021
  id: (0, _mastra_core_storage.createStorageErrorId)("MONGODB", "LIST_SKILLS", "INVALID_PAGE"),
@@ -11025,8 +11025,17 @@ var MongoDBSkillsStorage = class MongoDBSkillsStorage extends _mastra_core_stora
11025
11025
  }, /* @__PURE__ */ new Error("page must be >= 0"));
11026
11026
  const perPage = (0, _mastra_core_storage.normalizePerPage)(perPageInput, 100);
11027
11027
  const { offset, perPage: perPageForResponse } = (0, _mastra_core_storage.calculatePagination)(page, perPageInput, perPage);
11028
+ if (entityIds && entityIds.length === 0) return {
11029
+ skills: [],
11030
+ total: 0,
11031
+ page,
11032
+ perPage: perPageForResponse,
11033
+ hasMore: false
11034
+ };
11028
11035
  const collection = await this.getCollection(_mastra_core_storage.TABLE_SKILLS);
11029
11036
  const filter = {};
11037
+ if (entityIds && entityIds.length > 0) filter.id = { $in: entityIds };
11038
+ if (status) filter.status = status;
11030
11039
  if (authorId) filter.authorId = authorId;
11031
11040
  if (visibility) filter.visibility = visibility;
11032
11041
  if (metadata) for (const [key, value] of Object.entries(metadata)) filter[`metadata.${key}`] = value;