@mastra/mssql 1.0.0-beta.1 → 1.0.0-beta.2

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
@@ -2671,13 +2671,14 @@ var WorkflowsMSSQL = class extends WorkflowsStorage {
2671
2671
  snapshot = {
2672
2672
  context: {},
2673
2673
  activePaths: [],
2674
+ activeStepsPath: {},
2674
2675
  timestamp: Date.now(),
2675
2676
  suspendedPaths: {},
2676
2677
  resumeLabels: {},
2677
2678
  serializedStepGraph: [],
2679
+ status: "pending",
2678
2680
  value: {},
2679
2681
  waitingPaths: {},
2680
- status: "pending",
2681
2682
  runId,
2682
2683
  requestContext: {}
2683
2684
  };
@@ -2907,7 +2908,8 @@ var WorkflowsMSSQL = class extends WorkflowsStorage {
2907
2908
  toDate,
2908
2909
  page,
2909
2910
  perPage,
2910
- resourceId
2911
+ resourceId,
2912
+ status
2911
2913
  } = {}) {
2912
2914
  try {
2913
2915
  const conditions = [];
@@ -2916,6 +2918,10 @@ var WorkflowsMSSQL = class extends WorkflowsStorage {
2916
2918
  conditions.push(`[workflow_name] = @workflowName`);
2917
2919
  paramMap["workflowName"] = workflowName;
2918
2920
  }
2921
+ if (status) {
2922
+ conditions.push(`JSON_VALUE([snapshot], '$.status') = @status`);
2923
+ paramMap["status"] = status;
2924
+ }
2919
2925
  if (resourceId) {
2920
2926
  const hasResourceId = await this.operations.hasColumn(TABLE_WORKFLOW_SNAPSHOT, "resourceId");
2921
2927
  if (hasResourceId) {
@@ -3184,15 +3190,8 @@ var MSSQLStore = class extends MastraStorage {
3184
3190
  }) {
3185
3191
  return this.stores.workflows.loadWorkflowSnapshot({ workflowName, runId });
3186
3192
  }
3187
- async listWorkflowRuns({
3188
- workflowName,
3189
- fromDate,
3190
- toDate,
3191
- perPage,
3192
- page,
3193
- resourceId
3194
- } = {}) {
3195
- return this.stores.workflows.listWorkflowRuns({ workflowName, fromDate, toDate, perPage, page, resourceId });
3193
+ async listWorkflowRuns(args = {}) {
3194
+ return this.stores.workflows.listWorkflowRuns(args);
3196
3195
  }
3197
3196
  async getWorkflowRunById({
3198
3197
  runId,