@mastra/libsql 1.23.3-alpha.0 → 1.23.4-alpha.0

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
@@ -13527,7 +13527,7 @@ var WorkflowsLibSQL = class WorkflowsLibSQL extends WorkflowsStorage {
13527
13527
  }
13528
13528
  }, "deleteWorkflowRunById");
13529
13529
  }
13530
- async listWorkflowRuns({ workflowName, fromDate, toDate, page, perPage, resourceId, threadId, status } = {}) {
13530
+ async listWorkflowRuns({ workflowName, fromDate, toDate, page, perPage, resourceId, threadId, status, summary } = {}) {
13531
13531
  try {
13532
13532
  const conditions = [];
13533
13533
  const args = [];
@@ -13568,7 +13568,7 @@ var WorkflowsLibSQL = class WorkflowsLibSQL extends WorkflowsStorage {
13568
13568
  const normalizedPerPage = usePagination ? normalizePerPage(perPage, Number.MAX_SAFE_INTEGER) : 0;
13569
13569
  const offset = usePagination ? page * normalizedPerPage : 0;
13570
13570
  const runs = ((await this.#client.execute({
13571
- sql: `SELECT workflow_name, run_id, resourceId, json(snapshot) as snapshot, createdAt, updatedAt FROM ${TABLE_WORKFLOW_SNAPSHOT} ${whereClause} ORDER BY createdAt DESC${usePagination ? ` LIMIT ? OFFSET ?` : ""}`,
13571
+ sql: `SELECT workflow_name, run_id, resourceId, ${summary ? `json_object('status', json_extract(snapshot, '$.status'), 'timestamp', json_extract(snapshot, '$.timestamp'))` : "json(snapshot)"} as snapshot, createdAt, updatedAt FROM ${TABLE_WORKFLOW_SNAPSHOT} ${whereClause} ORDER BY createdAt DESC${usePagination ? ` LIMIT ? OFFSET ?` : ""}`,
13572
13572
  args: usePagination ? [
13573
13573
  ...args,
13574
13574
  normalizedPerPage,