@mastra/dynamodb 0.15.11 → 0.15.12

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
@@ -2712,7 +2712,6 @@ var WorkflowStorageDynamoDB = class extends WorkflowsStorage {
2712
2712
  workflow_name: workflowName,
2713
2713
  run_id: runId,
2714
2714
  snapshot: JSON.stringify(snapshot),
2715
- // Stringify the snapshot object
2716
2715
  createdAt: now,
2717
2716
  updatedAt: now,
2718
2717
  resourceId
@@ -2784,6 +2783,11 @@ var WorkflowStorageDynamoDB = class extends WorkflowsStorage {
2784
2783
  });
2785
2784
  if (pageResults.data && pageResults.data.length > 0) {
2786
2785
  let pageFilteredData = pageResults.data;
2786
+ if (args?.status) {
2787
+ pageFilteredData = pageFilteredData.filter((snapshot) => {
2788
+ return snapshot.snapshot.status === args.status;
2789
+ });
2790
+ }
2787
2791
  if (args?.fromDate || args?.toDate) {
2788
2792
  pageFilteredData = pageFilteredData.filter((snapshot) => {
2789
2793
  const createdAt = new Date(snapshot.createdAt);