@mastra/cloudflare 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/cloudflare
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
@@ -2052,6 +2052,28 @@ var WorkflowsStorageCloudflare = class extends storage.WorkflowsStorage {
2052
2052
  return null;
2053
2053
  }
2054
2054
  }
2055
+ async deleteWorkflowRunById({ runId, workflowName }) {
2056
+ try {
2057
+ if (!runId || !workflowName) {
2058
+ throw new Error("runId and workflowName are required");
2059
+ }
2060
+ const key = this.operations.getKey(storage.TABLE_WORKFLOW_SNAPSHOT, { workflow_name: workflowName, run_id: runId });
2061
+ await this.operations.deleteKV(storage.TABLE_WORKFLOW_SNAPSHOT, key);
2062
+ } catch (error$1) {
2063
+ throw new error.MastraError(
2064
+ {
2065
+ id: storage.createStorageErrorId("CLOUDFLARE", "DELETE_WORKFLOW_RUN_BY_ID", "FAILED"),
2066
+ domain: error.ErrorDomain.STORAGE,
2067
+ category: error.ErrorCategory.THIRD_PARTY,
2068
+ details: {
2069
+ workflowName,
2070
+ runId
2071
+ }
2072
+ },
2073
+ error$1
2074
+ );
2075
+ }
2076
+ }
2055
2077
  };
2056
2078
 
2057
2079
  // src/storage/types.ts
@@ -2243,6 +2265,9 @@ var CloudflareStore = class extends storage.MastraStorage {
2243
2265
  }) {
2244
2266
  return this.stores.workflows.getWorkflowRunById({ runId, workflowName });
2245
2267
  }
2268
+ async deleteWorkflowRunById({ runId, workflowName }) {
2269
+ return this.stores.workflows.deleteWorkflowRunById({ runId, workflowName });
2270
+ }
2246
2271
  async updateMessages(args) {
2247
2272
  return this.stores.memory.updateMessages(args);
2248
2273
  }