* feat: installing the app works * Update yarn.lock * feat: /api/callback now gets user auth info from basecamp * feat: updated basecamp logo * feat: added project dropdown on event apps page * feat: basecamp event creation and deletion working * feat: basecamp event rescheduling now works * refactor(CalendarService): basecamp CaldendarService code clean up * refactor: code cleanup for basecamp app API * feat: updated event summary text sent to basecamp * chore: updated basecamp images and contact info * fix: fixed typescript errors and added logic to refresh tokens on event settings * refactor(CaldendarService): used refreshAccessToken from helpers.ts instead * chore: updated basecamp description * fix: fixed incorrect import * fix: accidentally deleted props to toggle app for event * chore: updated .env.appStore.example and added README for app * Update .env.appStore.example Co-authored-by: Leo Giovanetti <[email protected]> * feat: added basecamp userAgent in env instead of hardcoded value * feat: updated README to include how to set basecamp user agent env * fix: removed unused import * feat: used URLSearchParams to construct url params * fix: fixed typescript errors * chore: updated README to include an example on how to set basecamp user-agent * feat: using TRPC instead of REST * chore: removed old projects REST code --------- Co-authored-by: Leo Giovanetti <[email protected]>
26 lines
967 B
TypeScript
26 lines
967 B
TypeScript
import authedProcedure from "@calcom/trpc/server/procedures/authedProcedure";
|
|
import { router } from "@calcom/trpc/server/trpc";
|
|
|
|
import { ZProjectMutationInputSchema } from "./projectMutation.schema";
|
|
|
|
const UNSTABLE_HANDLER_CACHE: any = {};
|
|
|
|
const appBasecamp3 = router({
|
|
projects: authedProcedure.query(async ({ ctx }) => {
|
|
if (!UNSTABLE_HANDLER_CACHE.projects) {
|
|
UNSTABLE_HANDLER_CACHE.projects = await import("./projects.handler").then((mod) => mod.projectHandler);
|
|
}
|
|
return UNSTABLE_HANDLER_CACHE.projects({ ctx });
|
|
}),
|
|
projectMutation: authedProcedure.input(ZProjectMutationInputSchema).mutation(async ({ ctx, input }) => {
|
|
if (!UNSTABLE_HANDLER_CACHE.projectMutation) {
|
|
UNSTABLE_HANDLER_CACHE.projectMutation = await import("./projectMutation.handler").then(
|
|
(mod) => mod.projectMutationHandler
|
|
);
|
|
}
|
|
return UNSTABLE_HANDLER_CACHE.projectMutation({ ctx, input });
|
|
}),
|
|
});
|
|
|
|
export default appBasecamp3;
|