@mastra/libsql 1.0.0-beta.6 → 1.0.0-beta.7
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 +21 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +21 -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 +3 -3
package/dist/index.js
CHANGED
|
@@ -3422,6 +3422,24 @@ var WorkflowsLibSQL = class extends WorkflowsStorage {
|
|
|
3422
3422
|
);
|
|
3423
3423
|
}
|
|
3424
3424
|
}
|
|
3425
|
+
async deleteWorkflowRunById({ runId, workflowName }) {
|
|
3426
|
+
try {
|
|
3427
|
+
await this.client.execute({
|
|
3428
|
+
sql: `DELETE FROM ${TABLE_WORKFLOW_SNAPSHOT} WHERE workflow_name = ? AND run_id = ?`,
|
|
3429
|
+
args: [workflowName, runId]
|
|
3430
|
+
});
|
|
3431
|
+
} catch (error) {
|
|
3432
|
+
throw new MastraError(
|
|
3433
|
+
{
|
|
3434
|
+
id: createStorageErrorId("LIBSQL", "DELETE_WORKFLOW_RUN_BY_ID", "FAILED"),
|
|
3435
|
+
domain: ErrorDomain.STORAGE,
|
|
3436
|
+
category: ErrorCategory.THIRD_PARTY,
|
|
3437
|
+
details: { runId, workflowName }
|
|
3438
|
+
},
|
|
3439
|
+
error
|
|
3440
|
+
);
|
|
3441
|
+
}
|
|
3442
|
+
}
|
|
3425
3443
|
async listWorkflowRuns({
|
|
3426
3444
|
workflowName,
|
|
3427
3445
|
fromDate,
|
|
@@ -3684,6 +3702,9 @@ var LibSQLStore = class extends MastraStorage {
|
|
|
3684
3702
|
}) {
|
|
3685
3703
|
return this.stores.workflows.getWorkflowRunById({ runId, workflowName });
|
|
3686
3704
|
}
|
|
3705
|
+
async deleteWorkflowRunById({ runId, workflowName }) {
|
|
3706
|
+
return this.stores.workflows.deleteWorkflowRunById({ runId, workflowName });
|
|
3707
|
+
}
|
|
3687
3708
|
async getResourceById({ resourceId }) {
|
|
3688
3709
|
return this.stores.memory.getResourceById({ resourceId });
|
|
3689
3710
|
}
|