@mastra/mongodb 1.0.0-beta.5 → 1.0.0-beta.6
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 +13 -0
- package/dist/index.cjs +20 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +20 -1
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts +4 -0
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +4 -0
- package/dist/storage/index.d.ts.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @mastra/mongodb
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Add delete workflow run API ([#10991](https://github.com/mastra-ai/mastra/pull/10991))
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
await workflow.deleteWorkflowRunById(runId);
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [[`edb07e4`](https://github.com/mastra-ai/mastra/commit/edb07e49283e0c28bd094a60e03439bf6ecf0221), [`b7e17d3`](https://github.com/mastra-ai/mastra/commit/b7e17d3f5390bb5a71efc112204413656fcdc18d), [`261473a`](https://github.com/mastra-ai/mastra/commit/261473ac637e633064a22076671e2e02b002214d), [`5d7000f`](https://github.com/mastra-ai/mastra/commit/5d7000f757cd65ea9dc5b05e662fd83dfd44e932), [`4f0331a`](https://github.com/mastra-ai/mastra/commit/4f0331a79bf6eb5ee598a5086e55de4b5a0ada03), [`8a000da`](https://github.com/mastra-ai/mastra/commit/8a000da0c09c679a2312f6b3aa05b2ca78ca7393)]:
|
|
14
|
+
- @mastra/core@1.0.0-beta.10
|
|
15
|
+
|
|
3
16
|
## 1.0.0-beta.5
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -13,7 +13,7 @@ var evals = require('@mastra/core/evals');
|
|
|
13
13
|
|
|
14
14
|
// package.json
|
|
15
15
|
var package_default = {
|
|
16
|
-
version: "1.0.0-beta.
|
|
16
|
+
version: "1.0.0-beta.6"};
|
|
17
17
|
var MongoDBFilterTranslator = class extends filter.BaseFilterTranslator {
|
|
18
18
|
getSupportedOperators() {
|
|
19
19
|
return {
|
|
@@ -2380,6 +2380,22 @@ var WorkflowsStorageMongoDB = class extends storage.WorkflowsStorage {
|
|
|
2380
2380
|
);
|
|
2381
2381
|
}
|
|
2382
2382
|
}
|
|
2383
|
+
async deleteWorkflowRunById({ runId, workflowName }) {
|
|
2384
|
+
try {
|
|
2385
|
+
const collection = await this.operations.getCollection(storage.TABLE_WORKFLOW_SNAPSHOT);
|
|
2386
|
+
await collection.deleteOne({ workflow_name: workflowName, run_id: runId });
|
|
2387
|
+
} catch (error$1) {
|
|
2388
|
+
throw new error.MastraError(
|
|
2389
|
+
{
|
|
2390
|
+
id: storage.createStorageErrorId("MONGODB", "DELETE_WORKFLOW_RUN_BY_ID", "FAILED"),
|
|
2391
|
+
domain: error.ErrorDomain.STORAGE,
|
|
2392
|
+
category: error.ErrorCategory.THIRD_PARTY,
|
|
2393
|
+
details: { runId, workflowName }
|
|
2394
|
+
},
|
|
2395
|
+
error$1
|
|
2396
|
+
);
|
|
2397
|
+
}
|
|
2398
|
+
}
|
|
2383
2399
|
parseWorkflowRun(row) {
|
|
2384
2400
|
let parsedSnapshot = row.snapshot;
|
|
2385
2401
|
if (typeof parsedSnapshot === "string") {
|
|
@@ -2564,6 +2580,9 @@ var MongoDBStore = class extends storage.MastraStorage {
|
|
|
2564
2580
|
}) {
|
|
2565
2581
|
return this.stores.workflows.getWorkflowRunById({ runId, workflowName });
|
|
2566
2582
|
}
|
|
2583
|
+
async deleteWorkflowRunById({ runId, workflowName }) {
|
|
2584
|
+
return this.stores.workflows.deleteWorkflowRunById({ runId, workflowName });
|
|
2585
|
+
}
|
|
2567
2586
|
async close() {
|
|
2568
2587
|
try {
|
|
2569
2588
|
await this.#connector.close();
|