Webex integration (#7651)
* start webex app creation * webex integration wip * fix lint errors * fix lint errors * add webex env vars in appStore.example * webex app wip * fix lint errors * edit webex oauth scopes * add location in webex app config * add site url placeholder and regex in webex config location * debug translateEvent * fix utc formatting for event start time, add test boilerplate for webex, add envs * fix location and datetime formatting * get correct videoCredentials for deleteMeeting * Move webex specific readme content to webex README * Fix app not visible in app-store * Delete setup route * add webex icon * delete prev icon * webex api fix * add app screenshots * Revert tests changes as they dont run * Use config instead of hardcoding vales * Update README * Remove all env variables related to WEBEX app. They can be added through settings->admin->apps interface * update from origin * fix icon path * update webex readme * Update yarn.lock * update webex readme * Remove unnecessary URL from webex * revert changes in cancel booking handler * simply webex zod schemas, logs for debugging --------- Co-authored-by: Peer Richelsen <[email protected]> Co-authored-by: Hariom Balhara <[email protected]>
This commit is contained in:
31 files changed
+912
-86
No files matched your search
@@ -1,12 +1,14 @@
|
||||
import { z } from "zod";
|
||||
import type { AnyRouter } from "@trpc/server";
|
||||
|
||||
import * as trpcNext from "@calcom/trpc/server/adapters/next";
|
||||
import { createContext as createTrpcContext } from "@calcom/trpc/server/createContext";
|
||||
|
||||
import type { AnyRouter } from "@trpc/server";
|
||||
|
||||
/**
|
||||
* Creates an API handler executed by Next.js.
|
||||
*/
|
||||
export function createNextApiHandler(router: AnyRouter, isPublic: boolean = false) {
|
||||
export function createNextApiHandler(router: AnyRouter, isPublic = false) {
|
||||
return trpcNext.createNextApiHandler({
|
||||
router,
|
||||
/**
|
||||
@@ -57,11 +59,11 @@ export function createNextApiHandler(router: AnyRouter, isPublic: boolean = fals
|
||||
if (isPublic && paths) {
|
||||
const ONE_DAY_IN_SECONDS = 60 * 60 * 24;
|
||||
const cacheRules = {
|
||||
"session": `no-cache`,
|
||||
"i18n": `no-cache`,
|
||||
session: `no-cache`,
|
||||
i18n: `no-cache`,
|
||||
// Revalidation time here should be 1 second, per https://github.com/calcom/cal.com/pull/6823#issuecomment-1423215321
|
||||
"slots.getSchedule": `no-cache`, // FIXME
|
||||
"cityTimezones": `max-age=${ONE_DAY_IN_SECONDS}, stale-while-revalidate`,
|
||||
cityTimezones: `max-age=${ONE_DAY_IN_SECONDS}, stale-while-revalidate`,
|
||||
} as const;
|
||||
|
||||
const matchedPath = paths.find((v) => v in cacheRules) as keyof typeof cacheRules;
|
||||
@@ -71,4 +73,4 @@ export function createNextApiHandler(router: AnyRouter, isPublic: boolean = fals
|
||||
return defaultHeaders;
|
||||
},
|
||||
});
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user