* feat: retell AI webhook url * fix: type error * chore * chore: make company and email optional * chore: remove logs * chore: type error * chore: type error * fix: type err * fix: pass guest email * fix: type err * chore: change date format * chore: move advanced format
14 lines
409 B
TypeScript
14 lines
409 B
TypeScript
import { handleErrorsJson } from "@calcom/lib/errors";
|
|
|
|
export const fetcher = async (endpoint: string, init?: RequestInit | undefined) => {
|
|
return fetch(`https://api.retellai.com${endpoint}`, {
|
|
method: "GET",
|
|
headers: {
|
|
Authorization: `Bearer ${process.env.RETELL_AI_KEY}`,
|
|
"Content-Type": "application/json",
|
|
...init?.headers,
|
|
},
|
|
...init,
|
|
}).then(handleErrorsJson);
|
|
};
|