* feat: AI description - DB model + frontend + backend (fetch only) * fix types and add validation to backend * improve log * improve * import type * add EventTypeTranslationRepository * fix replexica error * fix replexica error * fix * fix test * wip * wip * add createManyDescriptionTranslations method * improve logic * refactor * update replexica type * improve typing * Renamed descriptionTranslations to fieldTranslations * log errors in replexica service * handle translations in background * don't create, upsert instead * make sure that description is updated * simplify * fix * Update packages/trpc/server/routers/viewer/eventTypes/update.handler.ts * improve filter logic in frontend * implement background job using Tasker * update schema * update schema again * rename * rename id to uid * add migration * fix type * update * update schema and migration sql * fix migration * fix type check * fix type check 2 * improve find logic in EventMeta * add more validation * add logger * rename * upgrade replexica/sdk to 0.7.0 * upgrade replexica to 0.7.0 * use batchLocalizeText * add comments * override browser locale if user is a signed in calcom user * fix type in replexica * fix migration sql * fix type * use dynamic import * do not use batchLocalizeText * chore: drop sourceLang, targetLang and id columns * fix * wip * add more validations * fix type error * address comment * refactor * update booking page to use translated title * fix type error * fix * revert yarn.lock changes * remove unused import * remove duplication migrate.sql file * fix test * remove test tags * fix function name * refactor * fix type check * use Promise.all * remove unneeded code --------- Co-authored-by: Keith Williams <keithwillcode@gmail.com>
25 lines
1.2 KiB
TypeScript
25 lines
1.2 KiB
TypeScript
import type { TaskHandler, TaskTypes } from "../tasker";
|
|
|
|
/**
|
|
* This is a map of all the tasks that the Tasker can handle.
|
|
* The keys are the TaskTypes and the values are the task handlers.
|
|
* The task handlers are imported dynamically to avoid circular dependencies.
|
|
*/
|
|
const tasks: Record<TaskTypes, () => Promise<TaskHandler>> = {
|
|
sendEmail: () => import("./sendEmail").then((module) => module.sendEmail),
|
|
sendWebhook: () => import("./sendWebook").then((module) => module.sendWebhook),
|
|
triggerHostNoShowWebhook: () =>
|
|
import("./triggerNoShow/triggerHostNoShow").then((module) => module.triggerHostNoShow),
|
|
triggerGuestNoShowWebhook: () =>
|
|
import("./triggerNoShow/triggerGuestNoShow").then((module) => module.triggerGuestNoShow),
|
|
triggerFormSubmittedNoEventWebhook: () =>
|
|
import("./triggerFormSubmittedNoEvent/triggerFormSubmittedNoEventWebhook").then(
|
|
(module) => module.triggerFormSubmittedNoEventWebhook
|
|
),
|
|
sendSms: () => Promise.resolve(() => Promise.reject(new Error("Not implemented"))),
|
|
translateEventTypeData: () =>
|
|
import("./translateEventTypeData").then((module) => module.translateEventTypeData),
|
|
};
|
|
|
|
export default tasks;
|