@mastra/dynamodb 1.0.0-beta.4 → 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 +51 -0
- package/dist/index.cjs +25 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +25 -1
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/operations/index.d.ts.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts +6 -8
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +6 -8
- package/dist/storage/index.d.ts.map +1 -1
- package/package.json +3 -4
package/dist/index.js
CHANGED
|
@@ -1663,7 +1663,8 @@ var StoreOperationsDynamoDB = class extends StoreOperations {
|
|
|
1663
1663
|
[TABLE_SCORERS]: "score",
|
|
1664
1664
|
[TABLE_TRACES]: "trace",
|
|
1665
1665
|
[TABLE_RESOURCES]: "resource",
|
|
1666
|
-
[TABLE_SPANS]: "ai_span"
|
|
1666
|
+
[TABLE_SPANS]: "ai_span",
|
|
1667
|
+
mastra_agents: "agent"
|
|
1667
1668
|
};
|
|
1668
1669
|
return mapping[tableName] || null;
|
|
1669
1670
|
}
|
|
@@ -2483,6 +2484,26 @@ var WorkflowStorageDynamoDB = class extends WorkflowsStorage {
|
|
|
2483
2484
|
);
|
|
2484
2485
|
}
|
|
2485
2486
|
}
|
|
2487
|
+
async deleteWorkflowRunById({ runId, workflowName }) {
|
|
2488
|
+
this.logger.debug("Deleting workflow run by ID", { runId, workflowName });
|
|
2489
|
+
try {
|
|
2490
|
+
await this.service.entities.workflow_snapshot.delete({
|
|
2491
|
+
entity: "workflow_snapshot",
|
|
2492
|
+
workflow_name: workflowName,
|
|
2493
|
+
run_id: runId
|
|
2494
|
+
}).go();
|
|
2495
|
+
} catch (error) {
|
|
2496
|
+
throw new MastraError(
|
|
2497
|
+
{
|
|
2498
|
+
id: createStorageErrorId("DYNAMODB", "DELETE_WORKFLOW_RUN_BY_ID", "FAILED"),
|
|
2499
|
+
domain: ErrorDomain.STORAGE,
|
|
2500
|
+
category: ErrorCategory.THIRD_PARTY,
|
|
2501
|
+
details: { runId, workflowName }
|
|
2502
|
+
},
|
|
2503
|
+
error
|
|
2504
|
+
);
|
|
2505
|
+
}
|
|
2506
|
+
}
|
|
2486
2507
|
};
|
|
2487
2508
|
|
|
2488
2509
|
// src/storage/index.ts
|
|
@@ -2697,6 +2718,9 @@ var DynamoDBStore = class extends MastraStorage {
|
|
|
2697
2718
|
async getWorkflowRunById(args) {
|
|
2698
2719
|
return this.stores.workflows.getWorkflowRunById(args);
|
|
2699
2720
|
}
|
|
2721
|
+
async deleteWorkflowRunById({ runId, workflowName }) {
|
|
2722
|
+
return this.stores.workflows.deleteWorkflowRunById({ runId, workflowName });
|
|
2723
|
+
}
|
|
2700
2724
|
async getResourceById({ resourceId }) {
|
|
2701
2725
|
return this.stores.memory.getResourceById({ resourceId });
|
|
2702
2726
|
}
|