@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 +13 -0
- package/dist/index.cjs +23 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +23 -0
- 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 +4 -4
package/dist/index.js
CHANGED
|
@@ -1435,6 +1435,26 @@ var WorkflowsUpstash = class extends WorkflowsStorage {
|
|
|
1435
1435
|
);
|
|
1436
1436
|
}
|
|
1437
1437
|
}
|
|
1438
|
+
async deleteWorkflowRunById({ runId, workflowName }) {
|
|
1439
|
+
const key = getKey(TABLE_WORKFLOW_SNAPSHOT, { namespace: "workflows", workflow_name: workflowName, run_id: runId });
|
|
1440
|
+
try {
|
|
1441
|
+
await this.client.del(key);
|
|
1442
|
+
} catch (error) {
|
|
1443
|
+
throw new MastraError(
|
|
1444
|
+
{
|
|
1445
|
+
id: createStorageErrorId("UPSTASH", "DELETE_WORKFLOW_RUN_BY_ID", "FAILED"),
|
|
1446
|
+
domain: ErrorDomain.STORAGE,
|
|
1447
|
+
category: ErrorCategory.THIRD_PARTY,
|
|
1448
|
+
details: {
|
|
1449
|
+
namespace: "workflows",
|
|
1450
|
+
runId,
|
|
1451
|
+
workflowName
|
|
1452
|
+
}
|
|
1453
|
+
},
|
|
1454
|
+
error
|
|
1455
|
+
);
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1438
1458
|
async listWorkflowRuns({
|
|
1439
1459
|
workflowName,
|
|
1440
1460
|
fromDate,
|
|
@@ -1631,6 +1651,9 @@ var UpstashStore = class extends MastraStorage {
|
|
|
1631
1651
|
async loadWorkflowSnapshot(params) {
|
|
1632
1652
|
return this.stores.workflows.loadWorkflowSnapshot(params);
|
|
1633
1653
|
}
|
|
1654
|
+
async deleteWorkflowRunById({ runId, workflowName }) {
|
|
1655
|
+
return this.stores.workflows.deleteWorkflowRunById({ runId, workflowName });
|
|
1656
|
+
}
|
|
1634
1657
|
async listWorkflowRuns(args = {}) {
|
|
1635
1658
|
return this.stores.workflows.listWorkflowRuns(args);
|
|
1636
1659
|
}
|