export type GetApiV1ExternalSupportProjectIdConversationsConversationIdArgs = {projectId: string, conversationId: string}; export type GetApiV1ExternalSupportProjectIdConversationsConversationIdOptions = {baseUrl?: string | undefined, apiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Get Conversation * * GET /v1/external-support/{projectId}/conversations/{conversationId} */ export const getApiV1ExternalSupportProjectIdConversationsConversationId = async (args: GetApiV1ExternalSupportProjectIdConversationsConversationIdArgs, options?: GetApiV1ExternalSupportProjectIdConversationsConversationIdOptions) => { const {baseUrl = "https://api.jelou.ai", fetch: fetchFn = fetch, apiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (apiKey !== undefined) headers.set("x-api-key", apiKey) const url = `${baseUrl.replace(/\/+$/, '')}/v1/external-support/${encodeURIComponent(String(args.projectId))}/conversations/${encodeURIComponent(String(args.conversationId))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };