@mastra/upstash 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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # @mastra/upstash
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
@@ -1437,6 +1437,26 @@ var WorkflowsUpstash = class extends storage.WorkflowsStorage {
1437
1437
  );
1438
1438
  }
1439
1439
  }
1440
+ async deleteWorkflowRunById({ runId, workflowName }) {
1441
+ const key = getKey(storage.TABLE_WORKFLOW_SNAPSHOT, { namespace: "workflows", workflow_name: workflowName, run_id: runId });
1442
+ try {
1443
+ await this.client.del(key);
1444
+ } catch (error$1) {
1445
+ throw new error.MastraError(
1446
+ {
1447
+ id: storage.createStorageErrorId("UPSTASH", "DELETE_WORKFLOW_RUN_BY_ID", "FAILED"),
1448
+ domain: error.ErrorDomain.STORAGE,
1449
+ category: error.ErrorCategory.THIRD_PARTY,
1450
+ details: {
1451
+ namespace: "workflows",
1452
+ runId,
1453
+ workflowName
1454
+ }
1455
+ },
1456
+ error$1
1457
+ );
1458
+ }
1459
+ }
1440
1460
  async listWorkflowRuns({
1441
1461
  workflowName,
1442
1462
  fromDate,
@@ -1633,6 +1653,9 @@ var UpstashStore = class extends storage.MastraStorage {
1633
1653
  async loadWorkflowSnapshot(params) {
1634
1654
  return this.stores.workflows.loadWorkflowSnapshot(params);
1635
1655
  }
1656
+ async deleteWorkflowRunById({ runId, workflowName }) {
1657
+ return this.stores.workflows.deleteWorkflowRunById({ runId, workflowName });
1658
+ }
1636
1659
  async listWorkflowRuns(args = {}) {
1637
1660
  return this.stores.workflows.listWorkflowRuns(args);
1638
1661
  }