@mastra/pg 1.0.0-beta.0 → 1.0.0-beta.1

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
@@ -3779,7 +3779,8 @@ var WorkflowsPG = class extends WorkflowsStorage {
3779
3779
  toDate,
3780
3780
  perPage,
3781
3781
  page,
3782
- resourceId
3782
+ resourceId,
3783
+ status
3783
3784
  } = {}) {
3784
3785
  try {
3785
3786
  const conditions = [];
@@ -3790,6 +3791,11 @@ var WorkflowsPG = class extends WorkflowsStorage {
3790
3791
  values.push(workflowName);
3791
3792
  paramIndex++;
3792
3793
  }
3794
+ if (status) {
3795
+ conditions.push(`snapshot::jsonb ->> 'status' = $${paramIndex}`);
3796
+ values.push(status);
3797
+ paramIndex++;
3798
+ }
3793
3799
  if (resourceId) {
3794
3800
  const hasResourceId = await this.operations.hasColumn(TABLE_WORKFLOW_SNAPSHOT, "resourceId");
3795
3801
  if (hasResourceId) {
@@ -4076,15 +4082,8 @@ var PostgresStore = class extends MastraStorage {
4076
4082
  }) {
4077
4083
  return this.stores.workflows.loadWorkflowSnapshot({ workflowName, runId });
4078
4084
  }
4079
- async listWorkflowRuns({
4080
- workflowName,
4081
- fromDate,
4082
- toDate,
4083
- perPage,
4084
- page,
4085
- resourceId
4086
- } = {}) {
4087
- return this.stores.workflows.listWorkflowRuns({ workflowName, fromDate, toDate, perPage, page, resourceId });
4085
+ async listWorkflowRuns(args = {}) {
4086
+ return this.stores.workflows.listWorkflowRuns(args);
4088
4087
  }
4089
4088
  async getWorkflowRunById({
4090
4089
  runId,