"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ListSessionsQuery = void 0; const Result_1 = require("../../../../shared/domain/Result"); class ListSessionsQuery { constructor(repository) { this.repository = repository; } async execute(_request) { const sessions = await this.repository.findAll(); const dtos = sessions.map((session) => ({ id: session.id.toString(), url: session.url, status: session.status, seed: session.seed, maxStates: session.maxStates, statesVisited: session.statesVisited, config: session.config, })); return (0, Result_1.Ok)(dtos); } } exports.ListSessionsQuery = ListSessionsQuery;