import { z } from 'zod';
import { APIResponseSchema } from "../api.js";
import { ThreadSchema } from "./list.js";
import { ThreadResponseError } from "./util.js";
export const _ThreadGetRequestSchema = z.object({
    id: z.string().describe('the thread id'),
});
export const ThreadGetResponseSchema = APIResponseSchema(ThreadSchema);
/**
 * Get a single thread by id
 *
 * @param client
 * @param request
 * @returns
 */
export async function threadGet(client, request) {
    const resp = await client.request('GET', `/thread/${encodeURIComponent(request.id)}`, ThreadGetResponseSchema);
    if (resp.success) {
        return resp.data;
    }
    throw new ThreadResponseError({ message: resp.message });
}
//# sourceMappingURL=get.js.map