* WIP * Create Booking Questions builder * Renaming things * wip * wip * Implement Add Guests and other fixes * Fixes after testing * Fix wrong status code 404 * Fixes * Lint fixes * Self review comments addressed * More self review comments addressed * Feedback from zomars * BugFixes after testing * More fixes discovered during review * Update packages/lib/hooks/useHasPaidPlan.ts Co-authored-by: Omar López <[email protected]> * More fixes discovered during review * Update packages/ui/components/form/inputs/Input.tsx Co-authored-by: Omar López <[email protected]> * More fixes discovered during review * Update packages/features/bookings/lib/getBookingFields.ts Co-authored-by: sean-brydon <[email protected]> * More PR review fixes * Hide label using labelSrOnly * Fix Carinas feedback and implement 2 workflows thingy * Misc fixes * Fixes from Loom comments and PR * Fix a lint errr * Fix cancellation reason * Fix regression in edit due to name conflict check * Update packages/features/form-builder/FormBuilder.tsx Co-authored-by: Carina Wollendorfer <[email protected]> * Fix options not set when default value is used * Restoring reqBody to avoid uneeded conflicts with main * Type fix * Update apps/web/components/booking/pages/BookingPage.tsx Co-authored-by: Omar López <[email protected]> * Update packages/features/form-builder/FormBuilder.tsx Co-authored-by: Omar López <[email protected]> * Update apps/web/components/booking/pages/BookingPage.tsx Co-authored-by: Omar López <[email protected]> * Apply suggestions from code review Co-authored-by: Omar López <[email protected]> * Show fields but mark them disabled * Apply suggestions from code review Co-authored-by: Omar López <[email protected]> * More comments * Fix booking success page crash when a booking doesnt have newly added required fields response * Dark theme asterisk not visible * Make location required in zodSchema as was there in production * Linting * Remove _metadata.ts files for apps that have config.json * Revert "Remove _metadata.ts files for apps that have config.json" This reverts commit d79bdd336cf312a30a8943af94c059947bd91ccd. * Fix lint error * Fix missing condition for samlSPConfig * Delete unexpectedly added file * yarn.lock change not required * fix types * Make checkboxes rounded * Fix defaultLabel being stored as label due to SSR rendering * Shaved 16kb from booking page * Explicit types for profile * Show payment value only if price is greater than 0 * Fix type error * Add back inferred types as they are failing * Fix duplicate label on number --------- Co-authored-by: zomars <[email protected]> Co-authored-by: sean-brydon <[email protected]> Co-authored-by: Carina Wollendorfer <[email protected]> Co-authored-by: Efraín Rochín <[email protected]>
62 lines
1.6 KiB
TypeScript
62 lines
1.6 KiB
TypeScript
import jackson from "@boxyhq/saml-jackson";
|
|
import type {
|
|
IConnectionAPIController,
|
|
IOAuthController,
|
|
JacksonOption,
|
|
ISPSAMLConfig,
|
|
} from "@boxyhq/saml-jackson";
|
|
|
|
import {WEBAPP_URL} from "@calcom/lib/constants";
|
|
|
|
import {samlDatabaseUrl, samlAudience, samlPath, oidcPath} from "./saml";
|
|
|
|
// Set the required options. Refer to https://github.com/boxyhq/jackson#configuration for the full list
|
|
const opts: JacksonOption = {
|
|
externalUrl: WEBAPP_URL,
|
|
samlPath,
|
|
samlAudience,
|
|
oidcPath,
|
|
db: {
|
|
engine: "sql",
|
|
type: "postgres",
|
|
url: samlDatabaseUrl,
|
|
encryptionKey: process.env.CALENDSO_ENCRYPTION_KEY,
|
|
},
|
|
};
|
|
|
|
let connectionController: IConnectionAPIController;
|
|
let oauthController: IOAuthController;
|
|
let samlSPConfig: ISPSAMLConfig;
|
|
|
|
const g = global;
|
|
|
|
declare global {
|
|
var connectionController: IConnectionAPIController | undefined;
|
|
var oauthController: IOAuthController | undefined;
|
|
var samlSPConfig: ISPSAMLConfig | undefined;
|
|
}
|
|
|
|
export default async function init() {
|
|
if (!g.connectionController || !g.oauthController || !g.samlSPConfig) {
|
|
const ret = await jackson(opts);
|
|
|
|
connectionController = ret.connectionAPIController;
|
|
oauthController = ret.oauthController;
|
|
samlSPConfig = ret.spConfig;
|
|
|
|
g.connectionController = connectionController;
|
|
g.oauthController = oauthController;
|
|
g.samlSPConfig = samlSPConfig;
|
|
} else {
|
|
connectionController = g.connectionController;
|
|
oauthController = g.oauthController;
|
|
samlSPConfig = g.samlSPConfig;
|
|
}
|
|
|
|
return {
|
|
connectionController,
|
|
oauthController,
|
|
samlSPConfig,
|
|
};
|
|
}
|