import { CoderSessionDataQuerySchema, CoderSessionEventHistorySchema, CoderSessionParticipantsSchema, CoderSessionReplaySchema, } from "./types.js";
export const CoderGetSessionReplayParamsSchema = CoderSessionDataQuerySchema.describe('Parameters for retrieving session replay data');
export const CoderListParticipantsParamsSchema = CoderSessionDataQuerySchema.describe('Parameters for listing session participants');
export const CoderListEventHistoryParamsSchema = CoderSessionDataQuerySchema.describe('Parameters for listing session event history');
function buildSessionDataQuery(params) {
    const query = new URLSearchParams();
    if (params.limit !== undefined) {
        query.set('limit', String(params.limit));
    }
    if (params.offset !== undefined) {
        query.set('offset', String(params.offset));
    }
    const queryString = query.toString();
    return queryString ? `?${queryString}` : '';
}
export async function coderGetReplay(client, params) {
    const path = `/hub/session/${encodeURIComponent(params.sessionId)}/replay${buildSessionDataQuery(params)}`;
    return client.get(path, CoderSessionReplaySchema);
}
export async function coderListParticipants(client, params) {
    const path = `/hub/session/${encodeURIComponent(params.sessionId)}/participants${buildSessionDataQuery(params)}`;
    return client.get(path, CoderSessionParticipantsSchema);
}
export async function coderListEventHistory(client, params) {
    const path = `/hub/session/${encodeURIComponent(params.sessionId)}/events/history${buildSessionDataQuery(params)}`;
    return client.get(path, CoderSessionEventHistorySchema);
}
//# sourceMappingURL=session-data.js.map