Files
calendar/packages/lib/retellAIFetcher.ts
T
Udit TakkarandGitHub 1ce7df324d feat: retell AI webhook url (#14430)
* 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
2024-04-05 22:44:57 +05:30

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);
};