Enforces explicit type imports (#7158)
* Enforces explicit type imports * Upgrades typescript-eslint * Upgrades eslint related dependencies * Update config * Sync packages mismatches * Syncs prettier version * Linting * Relocks node version * Fixes * Locks @vitejs/plugin-react to 1.3.2 * Linting
This commit is contained in:
1 parent
3df289b557
commit
7c749299bb
425 files changed
+1216
-1069
No files matched your search
@@ -1,9 +1,11 @@
|
||||
## How to build an App using the CLI
|
||||
|
||||
Refer to https://developer.cal.com/guides/how-to-build-an-app
|
||||
|
||||
## TODO
|
||||
|
||||
- Merge app-store:watch and app-store commands; introduce app-store --watch
|
||||
- An app created through CLI should be able to completely skip API validation for testing purposes. Credentials should be created with no API specified specific to the app. It would allow us to test any app end to end not worrying about the corresponding API endpoint.
|
||||
- Someone can add wrong directory name(which doesn't satisfy slug requirements) manually. How to handle it.
|
||||
- Allow editing and updating app from the cal app itself - including assets uploading when developing locally.
|
||||
- Use AppDeclarativeHandler across all apps. Whatever isn't supported in it, support that.
|
||||
- Use AppDeclarativeHandler across all apps. Whatever isn't supported in it, support that.
|
||||
@@ -25,7 +25,7 @@
|
||||
"react": "^18.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^18.0.17",
|
||||
"@types/react": "18.0.26",
|
||||
"chokidar": "^3.5.3",
|
||||
"eslint-plugin-react": "^7.30.1",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
|
||||
@@ -3,7 +3,7 @@ import Script from "next/script";
|
||||
import { appStoreMetadata } from "@calcom/app-store/appStoreMetaData";
|
||||
import { getEventTypeAppData } from "@calcom/app-store/utils";
|
||||
|
||||
import { appDataSchemas } from "./apps.schemas.generated";
|
||||
import type { appDataSchemas } from "./apps.schemas.generated";
|
||||
|
||||
export default function BookingPageTagManager({
|
||||
eventType,
|
||||
@@ -26,7 +26,7 @@ export default function BookingPageTagManager({
|
||||
val ? (val.replace(/\{TRACKING_ID\}/g, trackingId) as T) : val;
|
||||
|
||||
return tag.scripts.map((script, index) => {
|
||||
const parsedAttributes: NonNullable<typeof tag.scripts[number]["attrs"]> = {};
|
||||
const parsedAttributes: NonNullable<(typeof tag.scripts)[number]["attrs"]> = {};
|
||||
const attrs = script.attrs || {};
|
||||
Object.entries(attrs).forEach(([name, value]) => {
|
||||
if (typeof value === "string") {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { z, ZodType } from "zod";
|
||||
import type { z, ZodType } from "zod";
|
||||
|
||||
export type GetAppData = (key: string) => unknown;
|
||||
export type SetAppData = (key: string, value: unknown) => void;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { appStoreMetadata } from "@calcom/app-store/appStoreMetaData";
|
||||
import prisma, { safeAppSelect, safeCredentialSelect } from "@calcom/prisma";
|
||||
import { AppFrontendPayload as App } from "@calcom/types/App";
|
||||
import { CredentialFrontendPayload as Credential } from "@calcom/types/Credential";
|
||||
import type { AppFrontendPayload as App } from "@calcom/types/App";
|
||||
import type { CredentialFrontendPayload as Credential } from "@calcom/types/Credential";
|
||||
|
||||
export async function getAppWithMetadata(app: { dirName: string }) {
|
||||
const appMetadata: App | null = appStoreMetadata[app.dirName as keyof typeof appStoreMetadata] as App;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { useAutoAnimate } from "@formkit/auto-animate/react";
|
||||
import Link from "next/link";
|
||||
|
||||
import { RouterOutputs } from "@calcom/trpc/react";
|
||||
import type { RouterOutputs } from "@calcom/trpc/react";
|
||||
import { Switch } from "@calcom/ui";
|
||||
|
||||
import { SetAppDataGeneric } from "../EventTypeAppContext";
|
||||
import { eventTypeAppCardZod } from "../eventTypeAppCardZod";
|
||||
import type { SetAppDataGeneric } from "../EventTypeAppContext";
|
||||
import type { eventTypeAppCardZod } from "../eventTypeAppCardZod";
|
||||
import OmniInstallAppButton from "./OmniInstallAppButton";
|
||||
|
||||
export default function AppCard({
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import EventTypeAppContext, { GetAppData, SetAppData } from "@calcom/app-store/EventTypeAppContext";
|
||||
import type { GetAppData, SetAppData } from "@calcom/app-store/EventTypeAppContext";
|
||||
import EventTypeAppContext from "@calcom/app-store/EventTypeAppContext";
|
||||
import { EventTypeAddonMap } from "@calcom/app-store/apps.browser.generated";
|
||||
import { RouterOutputs } from "@calcom/trpc/react";
|
||||
import type { RouterOutputs } from "@calcom/trpc/react";
|
||||
import { ErrorBoundary } from "@calcom/ui";
|
||||
|
||||
import { EventTypeAppCardComponentProps } from "../types";
|
||||
import type { EventTypeAppCardComponentProps } from "../types";
|
||||
import { DynamicComponent } from "./DynamicComponent";
|
||||
|
||||
export const EventTypeAppCard = (props: {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { GetStaticPropsContext } from "next";
|
||||
import type { GetStaticPropsContext } from "next";
|
||||
|
||||
export const AppSetupPageMap = {
|
||||
zapier: import("../../zapier/pages/setup/_getStaticProps"),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { NextApiRequest } from "next";
|
||||
import type { NextApiRequest } from "next";
|
||||
|
||||
import { IntegrationOAuthCallbackState } from "../types";
|
||||
import type { IntegrationOAuthCallbackState } from "../types";
|
||||
|
||||
export function decodeOAuthState(req: NextApiRequest) {
|
||||
if (typeof req.query.state !== "string") {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { NextApiRequest } from "next";
|
||||
import type { NextApiRequest } from "next";
|
||||
|
||||
import { IntegrationOAuthCallbackState } from "../types";
|
||||
import type { IntegrationOAuthCallbackState } from "../types";
|
||||
|
||||
export function encodeOAuthState(req: NextApiRequest) {
|
||||
if (typeof req.query.state !== "string") {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import logger from "@calcom/lib/logger";
|
||||
import type { Calendar } from "@calcom/types/Calendar";
|
||||
import { CredentialPayload } from "@calcom/types/Credential";
|
||||
import type { CredentialPayload } from "@calcom/types/Credential";
|
||||
|
||||
import appStore from "..";
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { useMutation, UseMutationOptions } from "@tanstack/react-query";
|
||||
import type { UseMutationOptions } from "@tanstack/react-query";
|
||||
import { useMutation } from "@tanstack/react-query";
|
||||
|
||||
import type { IntegrationOAuthCallbackState } from "@calcom/app-store/types";
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
import { App } from "@calcom/types/App";
|
||||
import type { App } from "@calcom/types/App";
|
||||
|
||||
import getInstalledAppPath from "./getInstalledAppPath";
|
||||
|
||||
|
||||
@@ -15,4 +15,3 @@ items:
|
||||
- Track what you listened to when
|
||||
- Send scheduling links guests love
|
||||
- Always know what your team is up to
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AppDeclarativeHandler } from "@calcom/types/AppHandler";
|
||||
import type { AppDeclarativeHandler } from "@calcom/types/AppHandler";
|
||||
|
||||
import { createDefaultInstallation } from "../../_utils/installation";
|
||||
import appConfig from "../config.json";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AppMeta } from "@calcom/types/App";
|
||||
import type { AppMeta } from "@calcom/types/App";
|
||||
|
||||
import { appStoreMetadata as rawAppStoreMetadata } from "./apps.metadata.generated";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import CalendarService from "@calcom/lib/CalendarService";
|
||||
import { CredentialPayload } from "@calcom/types/Credential";
|
||||
import type { CredentialPayload } from "@calcom/types/Credential";
|
||||
|
||||
export default class AppleCalendarService extends CalendarService {
|
||||
constructor(credential: CredentialPayload) {
|
||||
|
||||
@@ -10,4 +10,4 @@ items:
|
||||
- /api/app-store/around/8.jpg
|
||||
---
|
||||
|
||||
Discover radically unique video calls designed to help hybrid-remote teams create, collaborate and celebrate together.
|
||||
Discover radically unique video calls designed to help hybrid-remote teams create, collaborate and celebrate together.
|
||||
@@ -16,4 +16,4 @@ Every CalDav Provider is different and needs minor adjustments.
|
||||
|
||||
Follow our CalDav Roadmap here: <a class="text-blue-500" target="_blank" href="https://github.com/calcom/cal.com/issues/3457">https://github.com/calcom/cal.com/issues/3457</a>.
|
||||
|
||||
If your CalDav connection is not working, please try another Calendar provider (Google Mail or another CalDav).
|
||||
If your CalDav connection is not working, please try another Calendar provider (Google Mail or another CalDav).
|
||||
@@ -1,5 +1,5 @@
|
||||
import CalendarService from "@calcom/lib/CalendarService";
|
||||
import { CredentialPayload } from "@calcom/types/Credential";
|
||||
import type { CredentialPayload } from "@calcom/types/Credential";
|
||||
|
||||
export default class CalDavCalendarService extends CalendarService {
|
||||
constructor(credential: CredentialPayload) {
|
||||
|
||||
@@ -9,20 +9,25 @@ items:
|
||||
<iframe class="w-full aspect-video -mx-2" width="560" height="315" src="https://player.vimeo.com/video/683733529?app_id=122963&h=025a2fae94&referrer=https%3A%2F%2Fwww.campfire.to%2F" />
|
||||
|
||||
## Feel connected with your remote team
|
||||
|
||||
Team events, new hire onboardings, coffee chats, all on Campfire. No more awkward Zoom calls.
|
||||
|
||||
## Actually fun virtual socials
|
||||
|
||||
Campfire updates your team space with new games & activities weekly. You’ll never need to find another app or plan anything - ever!
|
||||
|
||||
## Your team's relaxed social space
|
||||
|
||||
Give your team the space to unwind and connect- separate from rigid Zoom calls.
|
||||
|
||||
### Fun & casual activities
|
||||
|
||||
We deliver fun and easy-to-play games & activities for teams of 2 to 20+, so you can just relax and connect.
|
||||
|
||||
### Organic interactions
|
||||
|
||||
80% of teams that use Campfire start having spontaneous social hangouts.
|
||||
|
||||
### Casual and friendly
|
||||
Separate work chats from social & human interactions by giving your team a more relaxed space to share.
|
||||
|
||||
Separate work chats from social & human interactions by giving your team a more relaxed space to share.
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AppDeclarativeHandler } from "@calcom/types/AppHandler";
|
||||
import type { AppDeclarativeHandler } from "@calcom/types/AppHandler";
|
||||
|
||||
import { createDefaultInstallation } from "../../_utils/installation";
|
||||
import appConfig from "../config.json";
|
||||
|
||||
@@ -12,5 +12,3 @@ items:
|
||||
- Track the entire sales process and performance with powerful activity and funnel reporting
|
||||
|
||||
Close.com subscriptions range from $29 - $149 per month. <a href="https://www.close.com/pricing" target="_blank">See pricing page</a>
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import z from "zod";
|
||||
|
||||
import CloseCom, { CloseComFieldOptions } from "@calcom/lib/CloseCom";
|
||||
import type { CloseComFieldOptions } from "@calcom/lib/CloseCom";
|
||||
import CloseCom from "@calcom/lib/CloseCom";
|
||||
import { getCustomActivityTypeInstanceData } from "@calcom/lib/CloseComeUtils";
|
||||
import { symmetricDecrypt } from "@calcom/lib/crypto";
|
||||
import logger from "@calcom/lib/logger";
|
||||
@@ -11,7 +12,7 @@ import type {
|
||||
IntegrationCalendar,
|
||||
NewCalendarEventType,
|
||||
} from "@calcom/types/Calendar";
|
||||
import { CredentialPayload } from "@calcom/types/Credential";
|
||||
import type { CredentialPayload } from "@calcom/types/Credential";
|
||||
|
||||
const apiKeySchema = z.object({
|
||||
encrypted: z.string(),
|
||||
|
||||
@@ -5,4 +5,4 @@ items:
|
||||
- /api/app-store/dailyvideo/3.jpg
|
||||
---
|
||||
|
||||
Cal Video is the in-house web-based video conferencing platform powered by Daily.co, which is minimalistic and lightweight, but has most of the features you need.
|
||||
Cal Video is the in-house web-based video conferencing platform powered by Daily.co, which is minimalistic and lightweight, but has most of the features you need.
|
||||
@@ -1,9 +1,10 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import { handleErrorsJson } from "@calcom/lib/errors";
|
||||
import { GetRecordingsResponseSchema, getRecordingsResponseSchema } from "@calcom/prisma/zod-utils";
|
||||
import type { GetRecordingsResponseSchema } from "@calcom/prisma/zod-utils";
|
||||
import { getRecordingsResponseSchema } from "@calcom/prisma/zod-utils";
|
||||
import type { CalendarEvent } from "@calcom/types/Calendar";
|
||||
import { CredentialPayload } from "@calcom/types/Credential";
|
||||
import type { CredentialPayload } from "@calcom/types/Credential";
|
||||
import type { PartialReference } from "@calcom/types/EventManager";
|
||||
import type { VideoApiAdapter, VideoCallData } from "@calcom/types/VideoApiAdapter";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import prisma from "@calcom/prisma";
|
||||
import { AppDeclarativeHandler } from "@calcom/types/AppHandler";
|
||||
import type { AppDeclarativeHandler } from "@calcom/types/AppHandler";
|
||||
|
||||
import appConfig from "../config.json";
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import type { App_RoutingForms_Form } from "@prisma/client";
|
||||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
|
||||
import prisma from "@calcom/prisma";
|
||||
|
||||
import { getSerializableForm } from "../../lib/getSerializableForm";
|
||||
import { Response, SerializableForm } from "../../types/types";
|
||||
import { App_RoutingForms_Form } from ".prisma/client";
|
||||
import type { Response, SerializableForm } from "../../types/types";
|
||||
|
||||
function escapeCsvText(str: string) {
|
||||
return str.replace(/,/, "%2C");
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { App_RoutingForms_Form } from "@prisma/client";
|
||||
import type { NextRouter } from "next/router";
|
||||
import { useRouter } from "next/router";
|
||||
import { createContext, forwardRef, useContext, useState } from "react";
|
||||
@@ -10,9 +11,9 @@ import { classNames } from "@calcom/lib";
|
||||
import { CAL_URL } from "@calcom/lib/constants";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import type { ButtonProps } from "@calcom/ui";
|
||||
import {
|
||||
Button,
|
||||
ButtonProps,
|
||||
ConfirmationDialogContent,
|
||||
Dialog,
|
||||
DialogClose,
|
||||
@@ -33,8 +34,7 @@ import { FiMoreHorizontal } from "@calcom/ui/components/icon";
|
||||
import { EmbedButton, EmbedDialog } from "@components/Embed";
|
||||
|
||||
import getFieldIdentifier from "../lib/getFieldIdentifier";
|
||||
import { SerializableForm } from "../types/types";
|
||||
import { App_RoutingForms_Form } from ".prisma/client";
|
||||
import type { SerializableForm } from "../types/types";
|
||||
|
||||
type RoutingForm = SerializableForm<App_RoutingForms_Form>;
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { App_RoutingForms_Form } from "@prisma/client";
|
||||
import { Dispatch, SetStateAction } from "react";
|
||||
import type { App_RoutingForms_Form } from "@prisma/client";
|
||||
import type { Dispatch, SetStateAction } from "react";
|
||||
|
||||
import { getQueryBuilderConfig } from "../lib/getQueryBuilderConfig";
|
||||
import isRouterLinkedField from "../lib/isRouterLinkedField";
|
||||
import { SerializableForm, Response } from "../types/types";
|
||||
import type { SerializableForm, Response } from "../types/types";
|
||||
|
||||
type Props = {
|
||||
form: SerializableForm<App_RoutingForms_Form>;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { HorizontalTabs } from "@calcom/ui";
|
||||
|
||||
import { getSerializableForm } from "../lib/getSerializableForm";
|
||||
import type { getSerializableForm } from "../lib/getSerializableForm";
|
||||
|
||||
export default function RoutingNavBar({
|
||||
form,
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
import { App_RoutingForms_Form } from "@prisma/client";
|
||||
import type { App_RoutingForms_Form } from "@prisma/client";
|
||||
import Link from "next/link";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Controller, useForm, UseFormReturn } from "react-hook-form";
|
||||
import type { UseFormReturn } from "react-hook-form";
|
||||
import { Controller, useForm } from "react-hook-form";
|
||||
|
||||
import { ShellMain } from "@calcom/features/shell/Shell";
|
||||
import useApp from "@calcom/lib/hooks/useApp";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import {
|
||||
import type {
|
||||
AppGetServerSidePropsContext,
|
||||
AppPrisma,
|
||||
AppSsrInit,
|
||||
@@ -38,7 +39,7 @@ import { FiExternalLink, FiLink, FiDownload, FiCode, FiTrash } from "@calcom/ui/
|
||||
import { RoutingPages } from "../lib/RoutingPages";
|
||||
import { getSerializableForm } from "../lib/getSerializableForm";
|
||||
import { processRoute } from "../lib/processRoute";
|
||||
import { Response, Route, SerializableForm } from "../types/types";
|
||||
import type { Response, Route, SerializableForm } from "../types/types";
|
||||
import { FormAction, FormActionsDropdown, FormActionsProvider } from "./FormActions";
|
||||
import FormInputFields from "./FormInputFields";
|
||||
import RoutingNavBar from "./RoutingNavBar";
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Settings, Widgets, SelectWidgetProps } from "react-awesome-query-builder";
|
||||
import type { Settings, Widgets, SelectWidgetProps } from "react-awesome-query-builder";
|
||||
// Figure out why ee/routing-forms/env.d.ts doesn't work
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
//@ts-ignore
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import { ChangeEvent } from "react";
|
||||
import {
|
||||
import type { ChangeEvent } from "react";
|
||||
import type {
|
||||
ButtonGroupProps,
|
||||
ButtonProps,
|
||||
ConjsProps,
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import type { App_RoutingForms_Form } from "@prisma/client";
|
||||
|
||||
import { BaseEmailHtml, Info } from "@calcom/emails/src/components";
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
|
||||
import { Response } from "../../types/types";
|
||||
import { App_RoutingForms_Form } from ".prisma/client";
|
||||
import type { Response } from "../../types/types";
|
||||
|
||||
export const ResponseEmail = ({
|
||||
form,
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import type { App_RoutingForms_Form } from "@prisma/client";
|
||||
|
||||
import { renderEmail } from "@calcom/emails";
|
||||
import BaseEmail from "@calcom/emails/templates/_base-email";
|
||||
|
||||
import { Response } from "../../types/types";
|
||||
import { App_RoutingForms_Form } from ".prisma/client";
|
||||
import type { Response } from "../../types/types";
|
||||
|
||||
type Form = Pick<App_RoutingForms_Form, "id" | "name">;
|
||||
export default class ResponseEmail extends BaseEmail {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { LocalRoute } from "../types/types";
|
||||
import type { LocalRoute } from "../types/types";
|
||||
|
||||
export const RoutingPages: { label: string; value: NonNullable<LocalRoute["action"]>["type"] }[] = [
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Utils as QbUtils } from "react-awesome-query-builder";
|
||||
|
||||
import { GlobalRoute, SerializableRoute } from "../types/types";
|
||||
import type { GlobalRoute, SerializableRoute } from "../types/types";
|
||||
|
||||
export const createFallbackRoute = (): Exclude<SerializableRoute, GlobalRoute> => {
|
||||
const uuid = QbUtils.uuid();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { App_RoutingForms_Form } from "@calcom/prisma/client";
|
||||
import type { App_RoutingForms_Form } from "@calcom/prisma/client";
|
||||
|
||||
export default async function getConnectedForms(
|
||||
prisma: typeof import("@calcom/prisma").default,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Field } from "../types/types";
|
||||
import type { Field } from "../types/types";
|
||||
|
||||
const getFieldIdentifier = (field: Field) => field.identifier || field.label;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { FieldTypes } from "../pages/form-edit/[...appPages]";
|
||||
import { QueryBuilderUpdatedConfig, RoutingForm } from "../types/types";
|
||||
import type { QueryBuilderUpdatedConfig, RoutingForm } from "../types/types";
|
||||
import { InitialConfig } from "./InitialConfig";
|
||||
|
||||
export function getQueryBuilderConfig(form: RoutingForm, forReporting = false) {
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { App_RoutingForms_Form } from "@prisma/client";
|
||||
import { z } from "zod";
|
||||
import type { App_RoutingForms_Form } from "@prisma/client";
|
||||
import type { z } from "zod";
|
||||
|
||||
import { RoutingFormSettings } from "@calcom/prisma/zod-utils";
|
||||
|
||||
import { SerializableForm } from "../types/types";
|
||||
import { zodFields, zodRoutes, zodRoutesView, zodFieldsView } from "../zod";
|
||||
import type { SerializableForm } from "../types/types";
|
||||
import type { zodRoutesView, zodFieldsView } from "../zod";
|
||||
import { zodFields, zodRoutes } from "../zod";
|
||||
import getConnectedForms from "./getConnectedForms";
|
||||
import isRouter from "./isRouter";
|
||||
import isRouterLinkedField from "./isRouterLinkedField";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod";
|
||||
import type { z } from "zod";
|
||||
|
||||
import { zodRoute } from "../zod";
|
||||
import type { zodRoute } from "../zod";
|
||||
import isRouter from "./isRouter";
|
||||
|
||||
export const isFallbackRoute = (route: z.infer<typeof zodRoute>) => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import prisma from "@calcom/prisma";
|
||||
import type { App_RoutingForms_Form, User } from "@prisma/client";
|
||||
|
||||
import { App_RoutingForms_Form, User } from ".prisma/client";
|
||||
import prisma from "@calcom/prisma";
|
||||
|
||||
export async function isFormEditAllowed({
|
||||
userId,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod";
|
||||
import type { z } from "zod";
|
||||
|
||||
import { zodRouterRouteView, zodRoute, zodRouterRoute, zodRouteView } from "../zod";
|
||||
import type { zodRouterRouteView, zodRoute, zodRouterRoute, zodRouteView } from "../zod";
|
||||
|
||||
export default function isRouter(
|
||||
route: z.infer<typeof zodRouteView> | z.infer<typeof zodRoute>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod";
|
||||
import type { z } from "zod";
|
||||
|
||||
import { zodFieldView, zodField, zodRouterField, zodRouterFieldView } from "../zod";
|
||||
import type { zodFieldView, zodField, zodRouterField, zodRouterFieldView } from "../zod";
|
||||
|
||||
export default function isRouterLinkedField(
|
||||
field: z.infer<typeof zodFieldView> | z.infer<typeof zodField>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import type { App_RoutingForms_Form } from "@prisma/client";
|
||||
import jsonLogic from "json-logic-js";
|
||||
import { Utils as QbUtils } from "react-awesome-query-builder";
|
||||
import { z } from "zod";
|
||||
import type { z } from "zod";
|
||||
|
||||
import { Response, Route, SerializableForm } from "../types/types";
|
||||
import { zodNonRouterRoute } from "../zod";
|
||||
import type { Response, Route, SerializableForm } from "../types/types";
|
||||
import type { zodNonRouterRoute } from "../zod";
|
||||
import { getQueryBuilderConfig } from "./getQueryBuilderConfig";
|
||||
import { isFallbackRoute } from "./isFallbackRoute";
|
||||
import isRouter from "./isRouter";
|
||||
import { App_RoutingForms_Form } from ".prisma/client";
|
||||
|
||||
export function processRoute({
|
||||
form,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { useAutoAnimate } from "@formkit/auto-animate/react";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Controller, useFieldArray, UseFormReturn } from "react-hook-form";
|
||||
import type { UseFormReturn } from "react-hook-form";
|
||||
import { Controller, useFieldArray } from "react-hook-form";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
|
||||
import Shell from "@calcom/features/shell/Shell";
|
||||
@@ -16,11 +17,11 @@ import {
|
||||
} from "@calcom/ui";
|
||||
import { FiPlus, FiFileText } from "@calcom/ui/components/icon";
|
||||
|
||||
import { inferSSRProps } from "@lib/types/inferSSRProps";
|
||||
import type { inferSSRProps } from "@lib/types/inferSSRProps";
|
||||
|
||||
import type { RoutingFormWithResponseCount } from "../../components/SingleForm";
|
||||
import SingleForm, {
|
||||
getServerSidePropsForSingleFormView as getServerSideProps,
|
||||
RoutingFormWithResponseCount,
|
||||
} from "../../components/SingleForm";
|
||||
|
||||
export { getServerSideProps };
|
||||
|
||||
@@ -9,7 +9,7 @@ import useApp from "@calcom/lib/hooks/useApp";
|
||||
import { useHasPaidPlan } from "@calcom/lib/hooks/useHasPaidPlan";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import { AppGetServerSidePropsContext, AppPrisma, AppUser } from "@calcom/types/AppGetServerSideProps";
|
||||
import type { AppGetServerSidePropsContext, AppPrisma, AppUser } from "@calcom/types/AppGetServerSideProps";
|
||||
import {
|
||||
Badge,
|
||||
ButtonGroup,
|
||||
@@ -39,7 +39,7 @@ import {
|
||||
FiMail,
|
||||
} from "@calcom/ui/components/icon";
|
||||
|
||||
import { inferSSRProps } from "@lib/types/inferSSRProps";
|
||||
import type { inferSSRProps } from "@lib/types/inferSSRProps";
|
||||
|
||||
import { FormAction, FormActionsDropdown, FormActionsProvider } from "../../components/FormActions";
|
||||
import { getSerializableForm } from "../../lib/getSerializableForm";
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
import React, { useCallback, useRef, useState } from "react";
|
||||
import {
|
||||
Builder,
|
||||
import type {
|
||||
BuilderProps,
|
||||
Config,
|
||||
ImmutableTree,
|
||||
JsonLogicResult,
|
||||
JsonTree,
|
||||
Query,
|
||||
Utils as QbUtils,
|
||||
} from "react-awesome-query-builder";
|
||||
import { Builder, Query, Utils as QbUtils } from "react-awesome-query-builder";
|
||||
|
||||
import Shell from "@calcom/features/shell/Shell";
|
||||
import { classNames } from "@calcom/lib";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import { inferSSRProps } from "@calcom/types/inferSSRProps";
|
||||
import type { inferSSRProps } from "@calcom/types/inferSSRProps";
|
||||
import { Button } from "@calcom/ui";
|
||||
|
||||
import { useInViewObserver } from "@lib/hooks/useInViewObserver";
|
||||
@@ -22,9 +20,9 @@ import { useInViewObserver } from "@lib/hooks/useInViewObserver";
|
||||
import SingleForm, {
|
||||
getServerSidePropsForSingleFormView as getServerSideProps,
|
||||
} from "../../components/SingleForm";
|
||||
import QueryBuilderInitialConfig from "../../components/react-awesome-query-builder/config/config";
|
||||
import type QueryBuilderInitialConfig from "../../components/react-awesome-query-builder/config/config";
|
||||
import "../../components/react-awesome-query-builder/styles.css";
|
||||
import { JsonLogicQuery } from "../../jsonLogicToPrisma";
|
||||
import type { JsonLogicQuery } from "../../jsonLogicToPrisma";
|
||||
import { getQueryBuilderConfig } from "../../lib/getQueryBuilderConfig";
|
||||
|
||||
export { getServerSideProps };
|
||||
|
||||
@@ -3,11 +3,11 @@ import Link from "next/link";
|
||||
import React, { useCallback, useState } from "react";
|
||||
import { Query, Builder, Utils as QbUtils } from "react-awesome-query-builder";
|
||||
// types
|
||||
import { JsonTree, ImmutableTree, BuilderProps } from "react-awesome-query-builder";
|
||||
import type { JsonTree, ImmutableTree, BuilderProps } from "react-awesome-query-builder";
|
||||
|
||||
import Shell from "@calcom/features/shell/Shell";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import { inferSSRProps } from "@calcom/types/inferSSRProps";
|
||||
import type { inferSSRProps } from "@calcom/types/inferSSRProps";
|
||||
import {
|
||||
SelectField,
|
||||
FormCard,
|
||||
@@ -25,7 +25,12 @@ import { RoutingPages } from "../../lib/RoutingPages";
|
||||
import { createFallbackRoute } from "../../lib/createFallbackRoute";
|
||||
import { getQueryBuilderConfig } from "../../lib/getQueryBuilderConfig";
|
||||
import isRouter from "../../lib/isRouter";
|
||||
import { GlobalRoute, LocalRoute, QueryBuilderUpdatedConfig, SerializableRoute } from "../../types/types";
|
||||
import type {
|
||||
GlobalRoute,
|
||||
LocalRoute,
|
||||
QueryBuilderUpdatedConfig,
|
||||
SerializableRoute,
|
||||
} from "../../types/types";
|
||||
|
||||
export { getServerSideProps };
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import Head from "next/head";
|
||||
import z from "zod";
|
||||
|
||||
import { AppGetServerSidePropsContext, AppPrisma } from "@calcom/types/AppGetServerSideProps";
|
||||
import { inferSSRProps } from "@calcom/types/inferSSRProps";
|
||||
import type { AppGetServerSidePropsContext, AppPrisma } from "@calcom/types/AppGetServerSideProps";
|
||||
import type { inferSSRProps } from "@calcom/types/inferSSRProps";
|
||||
|
||||
import getFieldIdentifier from "../../lib/getFieldIdentifier";
|
||||
import { getSerializableForm } from "../../lib/getSerializableForm";
|
||||
import { processRoute } from "../../lib/processRoute";
|
||||
import { Response } from "../../types/types";
|
||||
import type { Response } from "../../types/types";
|
||||
|
||||
export default function Router({ form, message }: inferSSRProps<typeof getServerSideProps>) {
|
||||
return (
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import Head from "next/head";
|
||||
import { useRouter } from "next/router";
|
||||
import { FormEvent, useEffect, useRef, useState } from "react";
|
||||
import type { FormEvent } from "react";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { Toaster } from "react-hot-toast";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
|
||||
@@ -10,14 +11,14 @@ import classNames from "@calcom/lib/classNames";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import useTheme from "@calcom/lib/hooks/useTheme";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import { AppGetServerSidePropsContext, AppPrisma } from "@calcom/types/AppGetServerSideProps";
|
||||
import { inferSSRProps } from "@calcom/types/inferSSRProps";
|
||||
import type { AppGetServerSidePropsContext, AppPrisma } from "@calcom/types/AppGetServerSideProps";
|
||||
import type { inferSSRProps } from "@calcom/types/inferSSRProps";
|
||||
import { Button, showToast } from "@calcom/ui";
|
||||
|
||||
import FormInputFields from "../../components/FormInputFields";
|
||||
import { getSerializableForm } from "../../lib/getSerializableForm";
|
||||
import { processRoute } from "../../lib/processRoute";
|
||||
import { Response, Route } from "../../types/types";
|
||||
import type { Response, Route } from "../../types/types";
|
||||
|
||||
function RoutingForm({ form, profile, ...restProps }: inferSSRProps<typeof getServerSideProps>) {
|
||||
const [customPageMessage, setCustomPageMessage] = useState<Route["action"]["value"]>("");
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { expect, Page } from "@playwright/test";
|
||||
import type { Page } from "@playwright/test";
|
||||
import { expect } from "@playwright/test";
|
||||
|
||||
import { Fixtures, test } from "@calcom/web/playwright/lib/fixtures";
|
||||
import type { Fixtures } from "@calcom/web/playwright/lib/fixtures";
|
||||
import { test } from "@calcom/web/playwright/lib/fixtures";
|
||||
|
||||
function todo(title: string) {
|
||||
// eslint-disable-next-line playwright/no-skipped-test, @typescript-eslint/no-empty-function
|
||||
@@ -47,7 +49,7 @@ test.describe("Routing Forms", () => {
|
||||
|
||||
await page.reload();
|
||||
|
||||
expect(await page.inputValue(`[data-testid="description"]`), description);
|
||||
expect(await page.inputValue(`[data-testid="description"]`)).toMatch(description);
|
||||
expect(await page.locator('[data-testid="field"]').count()).toBe(1);
|
||||
|
||||
await expectCurrentFormToHaveFields(page, { 0: field }, types);
|
||||
@@ -340,14 +342,9 @@ async function expectCurrentFormToHaveFields(
|
||||
) {
|
||||
for (const [index, field] of Object.entries(fields)) {
|
||||
expect(await page.inputValue(`[name="fields.${index}.label"]`)).toBe(field.label);
|
||||
expect(
|
||||
await page
|
||||
.locator(".data-testid-field-type")
|
||||
.nth(+index)
|
||||
.locator("div")
|
||||
.nth(1)
|
||||
.innerText()
|
||||
).toBe(types[field.typeIndex]);
|
||||
expect(await page.locator(".data-testid-field-type").nth(+index).locator("div").nth(1).innerText()).toBe(
|
||||
types[field.typeIndex]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { App_RoutingForms_Form, Prisma, User, WebhookTriggerEvents } from "@prisma/client";
|
||||
import type { App_RoutingForms_Form, User } from "@prisma/client";
|
||||
import { Prisma, WebhookTriggerEvents } from "@prisma/client";
|
||||
import { z } from "zod";
|
||||
|
||||
import getWebhooks from "@calcom/features/webhooks/lib/getWebhooks";
|
||||
@@ -7,7 +8,7 @@ import logger from "@calcom/lib/logger";
|
||||
import { RoutingFormSettings } from "@calcom/prisma/zod-utils";
|
||||
import { TRPCError } from "@calcom/trpc/server";
|
||||
import { authedProcedure, publicProcedure, router } from "@calcom/trpc/server/trpc";
|
||||
import { Ensure } from "@calcom/types/utils";
|
||||
import type { Ensure } from "@calcom/types/utils";
|
||||
|
||||
import ResponseEmail from "./emails/templates/response-email";
|
||||
import { jsonLogicToPrisma } from "./jsonLogicToPrisma";
|
||||
@@ -18,14 +19,14 @@ import { isFallbackRoute } from "./lib/isFallbackRoute";
|
||||
import { isFormEditAllowed } from "./lib/isFormEditAllowed";
|
||||
import isRouter from "./lib/isRouter";
|
||||
import isRouterLinkedField from "./lib/isRouterLinkedField";
|
||||
import { Response, SerializableForm } from "./types/types";
|
||||
import type { Response, SerializableForm } from "./types/types";
|
||||
import { zodFields, zodRouterRoute, zodRoutes } from "./zod";
|
||||
|
||||
async function onFormSubmission(
|
||||
form: Ensure<SerializableForm<App_RoutingForms_Form> & { user: User }, "fields">,
|
||||
response: Response
|
||||
) {
|
||||
const fieldResponsesByName: Record<string, typeof response[keyof typeof response]["value"]> = {};
|
||||
const fieldResponsesByName: Record<string, (typeof response)[keyof typeof response]["value"]> = {};
|
||||
|
||||
for (const [fieldId, fieldResponse] of Object.entries(response)) {
|
||||
// Use the label lowercased as the key to identify a field.
|
||||
|
||||
+5
-5
@@ -1,10 +1,10 @@
|
||||
import { App_RoutingForms_Form } from "@prisma/client";
|
||||
import z from "zod";
|
||||
import type { App_RoutingForms_Form } from "@prisma/client";
|
||||
import type z from "zod";
|
||||
|
||||
import { RoutingFormSettings } from "@calcom/prisma/zod-utils";
|
||||
import type { RoutingFormSettings } from "@calcom/prisma/zod-utils";
|
||||
|
||||
import QueryBuilderInitialConfig from "../components/react-awesome-query-builder/config/config";
|
||||
import { zodRouterRouteView, zodNonRouterRoute, zodFieldsView, zodRoutesView } from "../zod";
|
||||
import type QueryBuilderInitialConfig from "../components/react-awesome-query-builder/config/config";
|
||||
import type { zodRouterRouteView, zodNonRouterRoute, zodFieldsView, zodRoutesView } from "../zod";
|
||||
|
||||
export type RoutingForm = SerializableForm<App_RoutingForms_Form>;
|
||||
|
||||
|
||||
@@ -24,14 +24,14 @@ import { symmetricDecrypt } from "@calcom/lib/crypto";
|
||||
// Probably don't need
|
||||
// import { CALENDAR_INTEGRATIONS_TYPES } from "@calcom/lib/integrations/calendar/constants/generals";
|
||||
import logger from "@calcom/lib/logger";
|
||||
import {
|
||||
import type {
|
||||
Calendar,
|
||||
CalendarEvent,
|
||||
EventBusyDate,
|
||||
IntegrationCalendar,
|
||||
NewCalendarEventType,
|
||||
} from "@calcom/types/Calendar";
|
||||
import { CredentialPayload } from "@calcom/types/Credential";
|
||||
import type { CredentialPayload } from "@calcom/types/Credential";
|
||||
|
||||
export default class ExchangeCalendarService implements Calendar {
|
||||
private url = "";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import useAddAppMutation from "../../_utils/useAddAppMutation";
|
||||
import { InstallAppButtonProps } from "../../types";
|
||||
import type { InstallAppButtonProps } from "../../types";
|
||||
|
||||
export default function InstallAppButton(props: InstallAppButtonProps) {
|
||||
const mutation = useAddAppMutation("exchange2016_calendar");
|
||||
|
||||
@@ -24,14 +24,14 @@ import { symmetricDecrypt } from "@calcom/lib/crypto";
|
||||
// Probably don't need
|
||||
// import { CALENDAR_INTEGRATIONS_TYPES } from "@calcom/lib/integrations/calendar/constants/generals";
|
||||
import logger from "@calcom/lib/logger";
|
||||
import {
|
||||
import type {
|
||||
Calendar,
|
||||
CalendarEvent,
|
||||
EventBusyDate,
|
||||
IntegrationCalendar,
|
||||
NewCalendarEventType,
|
||||
} from "@calcom/types/Calendar";
|
||||
import { CredentialPayload } from "@calcom/types/Credential";
|
||||
import type { CredentialPayload } from "@calcom/types/Credential";
|
||||
|
||||
export default class ExchangeCalendarService implements Calendar {
|
||||
private url = "";
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { XhrApi } from "@ewsjs/xhr";
|
||||
import type { FindFoldersResults, FindItemsResults } from "ews-javascript-api";
|
||||
import {
|
||||
Appointment,
|
||||
Attendee,
|
||||
@@ -8,8 +9,6 @@ import {
|
||||
DateTime,
|
||||
DeleteMode,
|
||||
ExchangeService,
|
||||
FindFoldersResults,
|
||||
FindItemsResults,
|
||||
Folder,
|
||||
FolderId,
|
||||
FolderSchema,
|
||||
@@ -30,7 +29,7 @@ import {
|
||||
|
||||
import { symmetricDecrypt } from "@calcom/lib/crypto";
|
||||
import logger from "@calcom/lib/logger";
|
||||
import {
|
||||
import type {
|
||||
Calendar,
|
||||
CalendarEvent,
|
||||
EventBusyDate,
|
||||
@@ -38,7 +37,7 @@ import {
|
||||
NewCalendarEventType,
|
||||
Person,
|
||||
} from "@calcom/types/Calendar";
|
||||
import { CredentialPayload } from "@calcom/types/Credential";
|
||||
import type { CredentialPayload } from "@calcom/types/Credential";
|
||||
|
||||
import { ExchangeAuthentication } from "../enums";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AppDeclarativeHandler } from "@calcom/types/AppHandler";
|
||||
import type { AppDeclarativeHandler } from "@calcom/types/AppHandler";
|
||||
|
||||
import { createDefaultInstallation } from "../../_utils/installation";
|
||||
import appConfig from "../config.json";
|
||||
|
||||
@@ -5,7 +5,7 @@ import AppCard from "@calcom/app-store/_components/AppCard";
|
||||
import type { EventTypeAppCardComponent } from "@calcom/app-store/types";
|
||||
import { TextField } from "@calcom/ui";
|
||||
|
||||
import { appDataSchema } from "../zod";
|
||||
import type { appDataSchema } from "../zod";
|
||||
|
||||
const EventTypeAppCard: EventTypeAppCardComponent = function EventTypeAppCard({ app }) {
|
||||
const [getAppData, setAppData] = useAppContextWithSchema<typeof appDataSchema>();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AppDeclarativeHandler } from "@calcom/types/AppHandler";
|
||||
import type { AppDeclarativeHandler } from "@calcom/types/AppHandler";
|
||||
|
||||
import { createDefaultInstallation } from "../../_utils/installation";
|
||||
import appConfig from "../config.json";
|
||||
|
||||
@@ -5,7 +5,7 @@ import AppCard from "@calcom/app-store/_components/AppCard";
|
||||
import type { EventTypeAppCardComponent } from "@calcom/app-store/types";
|
||||
import { TextField } from "@calcom/ui";
|
||||
|
||||
import { appDataSchema } from "../zod";
|
||||
import type { appDataSchema } from "../zod";
|
||||
|
||||
const EventTypeAppCard: EventTypeAppCardComponent = function EventTypeAppCard({ app }) {
|
||||
const [getAppData, setAppData] = useAppContextWithSchema<typeof appDataSchema>();
|
||||
|
||||
@@ -4,4 +4,4 @@ items:
|
||||
- /api/app-store/giphy/GIPHY2.png
|
||||
---
|
||||
|
||||
An online database and search engine that allows users to search for and share short looping videos with no sound that resemble animated GIF files. GIPHY is your top source for the best & newest GIFs & Animated Stickers online. Find everything from funny GIFs, reaction GIFs, unique GIFs and more to add to your custom booking page. Located under advanced settings in each event type.
|
||||
An online database and search engine that allows users to search for and share short looping videos with no sound that resemble animated GIF files. GIPHY is your top source for the best & newest GIFs & Animated Stickers online. Find everything from funny GIFs, reaction GIFs, unique GIFs and more to add to your custom booking page. Located under advanced settings in each event type.
|
||||
@@ -6,7 +6,7 @@ import { SelectGifInput } from "@calcom/app-store/giphy/components";
|
||||
import type { EventTypeAppCardComponent } from "@calcom/app-store/types";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
|
||||
import { appDataSchema } from "../zod";
|
||||
import type { appDataSchema } from "../zod";
|
||||
|
||||
const EventTypeAppCard: EventTypeAppCardComponent = function EventTypeAppCard({ app }) {
|
||||
const [getAppData, setAppData] = useAppContextWithSchema<typeof appDataSchema>();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { LinkIcon, SearchIcon } from "@heroicons/react/outline";
|
||||
import { Dispatch, SetStateAction, useState } from "react";
|
||||
import type { Dispatch, SetStateAction } from "react";
|
||||
import { useState } from "react";
|
||||
|
||||
import classNames from "@calcom/lib/classNames";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { Prisma } from "@prisma/client";
|
||||
import { calendar_v3, google } from "googleapis";
|
||||
import type { Prisma } from "@prisma/client";
|
||||
import type { calendar_v3 } from "googleapis";
|
||||
import { google } from "googleapis";
|
||||
|
||||
import { MeetLocationType } from "@calcom/app-store/locations";
|
||||
import { getLocation, getRichDescription } from "@calcom/lib/CalEventParser";
|
||||
import CalendarService from "@calcom/lib/CalendarService";
|
||||
import type CalendarService from "@calcom/lib/CalendarService";
|
||||
import logger from "@calcom/lib/logger";
|
||||
import prisma from "@calcom/prisma";
|
||||
import type {
|
||||
@@ -13,7 +14,7 @@ import type {
|
||||
IntegrationCalendar,
|
||||
NewCalendarEventType,
|
||||
} from "@calcom/types/Calendar";
|
||||
import { CredentialPayload } from "@calcom/types/Credential";
|
||||
import type { CredentialPayload } from "@calcom/types/Credential";
|
||||
|
||||
import { getGoogleAppKeys } from "./getGoogleAppKeys";
|
||||
import { googleCredentialSchema } from "./googleCredentialSchema";
|
||||
|
||||
@@ -6,5 +6,6 @@ items:
|
||||
HubSpot is a cloud-based CRM designed to help align sales and marketing teams, foster sales enablement, boost ROI and optimize your inbound marketing strategy to generate more, qualified leads.
|
||||
|
||||
Features:
|
||||
- Creates a meeting in HubSpot for one or many attendees
|
||||
- Attendees that don't exist in HubSpot, gets created first to associate them in the meeting
|
||||
|
||||
- Creates a meeting in HubSpot for one or many attendees
|
||||
- Attendees that don't exist in HubSpot, gets created first to associate them in the meeting
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as hubspot from "@hubspot/api-client";
|
||||
import { TokenResponseIF } from "@hubspot/api-client/lib/codegen/oauth/models/TokenResponseIF";
|
||||
import type { TokenResponseIF } from "@hubspot/api-client/lib/codegen/oauth/models/TokenResponseIF";
|
||||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as hubspot from "@hubspot/api-client";
|
||||
import { BatchInputPublicAssociation } from "@hubspot/api-client/lib/codegen/crm/associations";
|
||||
import { PublicObjectSearchRequest } from "@hubspot/api-client/lib/codegen/crm/contacts";
|
||||
import { SimplePublicObjectInput } from "@hubspot/api-client/lib/codegen/crm/objects/meetings";
|
||||
import type { BatchInputPublicAssociation } from "@hubspot/api-client/lib/codegen/crm/associations";
|
||||
import type { PublicObjectSearchRequest } from "@hubspot/api-client/lib/codegen/crm/contacts";
|
||||
import type { SimplePublicObjectInput } from "@hubspot/api-client/lib/codegen/crm/objects/meetings";
|
||||
|
||||
import { getLocation } from "@calcom/lib/CalEventParser";
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
@@ -16,7 +16,7 @@ import type {
|
||||
NewCalendarEventType,
|
||||
Person,
|
||||
} from "@calcom/types/Calendar";
|
||||
import { CredentialPayload } from "@calcom/types/Credential";
|
||||
import type { CredentialPayload } from "@calcom/types/Credential";
|
||||
|
||||
import getAppKeysFromSlug from "../../_utils/getAppKeysFromSlug";
|
||||
import type { HubspotToken } from "../api/callback";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import logger from "@calcom/lib/logger";
|
||||
import type logger from "@calcom/lib/logger";
|
||||
|
||||
import getAppKeysFromSlug from "../_utils/getAppKeysFromSlug";
|
||||
import { LarkAppKeys } from "./types/LarkCalendar";
|
||||
import type { LarkAppKeys } from "./types/LarkCalendar";
|
||||
|
||||
export const LARK_HOST = "open.larksuite.com";
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import type {
|
||||
IntegrationCalendar,
|
||||
NewCalendarEventType,
|
||||
} from "@calcom/types/Calendar";
|
||||
import { CredentialPayload } from "@calcom/types/Credential";
|
||||
import type { CredentialPayload } from "@calcom/types/Credential";
|
||||
|
||||
import { handleLarkError, isExpired, LARK_HOST } from "../common";
|
||||
import type {
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { TFunction } from "next-i18next";
|
||||
|
||||
import { appStoreMetadata } from "@calcom/app-store/appStoreMetaData";
|
||||
import logger from "@calcom/lib/logger";
|
||||
import { Ensure, Optional } from "@calcom/types/utils";
|
||||
import type { Ensure, Optional } from "@calcom/types/utils";
|
||||
|
||||
import type { EventLocationTypeFromAppMeta } from "../types/App";
|
||||
|
||||
|
||||
@@ -20,4 +20,4 @@ items:
|
||||
<li>Click on <a target="_blank" href="/settings"><strong>Settings</strong></a>.</li>
|
||||
<li>There you will find the API keys section which allows you to generate a key for use. More information on this can be found on the <a href="https://developer.cal.com/api/authentication">Cal Authentication</a> page.</li>
|
||||
<li>Use API key in your Cal trigger node credentials in n8n.</li>
|
||||
</ol>
|
||||
</ol>
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AppDeclarativeHandler } from "@calcom/types/AppHandler";
|
||||
import type { AppDeclarativeHandler } from "@calcom/types/AppHandler";
|
||||
|
||||
import { createDefaultInstallation } from "../../_utils/installation";
|
||||
import appConfig from "../config.json";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Calendar as OfficeCalendar, User } from "@microsoft/microsoft-graph-types-beta";
|
||||
import type { Calendar as OfficeCalendar, User } from "@microsoft/microsoft-graph-types-beta";
|
||||
|
||||
import { getLocation, getRichDescription } from "@calcom/lib/CalEventParser";
|
||||
import { handleErrorsJson, handleErrorsRaw } from "@calcom/lib/errors";
|
||||
@@ -12,9 +12,9 @@ import type {
|
||||
IntegrationCalendar,
|
||||
NewCalendarEventType,
|
||||
} from "@calcom/types/Calendar";
|
||||
import { CredentialPayload } from "@calcom/types/Credential";
|
||||
import type { CredentialPayload } from "@calcom/types/Credential";
|
||||
|
||||
import { O365AuthCredentials } from "../types/Office365Calendar";
|
||||
import type { O365AuthCredentials } from "../types/Office365Calendar";
|
||||
import { getOfficeAppKeys } from "./getOfficeAppKeys";
|
||||
|
||||
interface IRequest {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useState } from "react";
|
||||
|
||||
import { InstallAppButtonProps } from "../../types";
|
||||
import type { InstallAppButtonProps } from "../../types";
|
||||
import AddIntegration from "./AccountDialog";
|
||||
|
||||
export default function InstallAppButton(props: InstallAppButtonProps) {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Prisma } from "@prisma/client";
|
||||
import type { Prisma } from "@prisma/client";
|
||||
|
||||
import { handleErrorsJson, handleErrorsRaw } from "@calcom/lib/errors";
|
||||
import { HttpError } from "@calcom/lib/http-error";
|
||||
import prisma from "@calcom/prisma";
|
||||
import type { CalendarEvent } from "@calcom/types/Calendar";
|
||||
import { CredentialPayload } from "@calcom/types/Credential";
|
||||
import type { CredentialPayload } from "@calcom/types/Credential";
|
||||
import type { PartialReference } from "@calcom/types/EventManager";
|
||||
import type { VideoApiAdapter, VideoCallData } from "@calcom/types/VideoApiAdapter";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AppDeclarativeHandler } from "@calcom/types/AppHandler";
|
||||
import type { AppDeclarativeHandler } from "@calcom/types/AppHandler";
|
||||
|
||||
import { createDefaultInstallation } from "../../_utils/installation";
|
||||
import appConfig from "../config.json";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AppDeclarativeHandler } from "@calcom/types/AppHandler";
|
||||
import type { AppDeclarativeHandler } from "@calcom/types/AppHandler";
|
||||
|
||||
import { createDefaultInstallation } from "../../_utils/installation";
|
||||
import appConfig from "../config.json";
|
||||
|
||||
@@ -5,7 +5,7 @@ import AppCard from "@calcom/app-store/_components/AppCard";
|
||||
import type { EventTypeAppCardComponent } from "@calcom/app-store/types";
|
||||
import { TextField } from "@calcom/ui";
|
||||
|
||||
import { appDataSchema } from "../zod";
|
||||
import type { appDataSchema } from "../zod";
|
||||
|
||||
const EventTypeAppCard: EventTypeAppCardComponent = function EventTypeAppCard({ app }) {
|
||||
const [getAppData, setAppData] = useAppContextWithSchema<typeof appDataSchema>();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AppDeclarativeHandler } from "@calcom/types/AppHandler";
|
||||
import type { AppDeclarativeHandler } from "@calcom/types/AppHandler";
|
||||
|
||||
import { createDefaultInstallation } from "../../_utils/installation";
|
||||
import appConfig from "../config.json";
|
||||
|
||||
@@ -5,7 +5,7 @@ import AppCard from "@calcom/app-store/_components/AppCard";
|
||||
import type { EventTypeAppCardComponent } from "@calcom/app-store/types";
|
||||
import { Tooltip } from "@calcom/ui";
|
||||
|
||||
import { appDataSchema } from "../zod";
|
||||
import type { appDataSchema } from "../zod";
|
||||
|
||||
const EventTypeAppCard: EventTypeAppCardComponent = function EventTypeAppCard({ eventType, app }) {
|
||||
const [getAppData, setAppData] = useAppContextWithSchema<typeof appDataSchema>();
|
||||
|
||||
@@ -6,4 +6,3 @@ items:
|
||||
---
|
||||
|
||||
Token gate bookings based on NFTs, DAO tokens, and ERC-20 tokens. Rainbow supports dozens of trusted Ethereum wallet apps to verify token ownership. Available blockchains are Ethereum mainnet, Arbitrum, Optimism, and Polygon mainnet.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AppDeclarativeHandler } from "@calcom/types/AppHandler";
|
||||
import type { AppDeclarativeHandler } from "@calcom/types/AppHandler";
|
||||
|
||||
import { createDefaultInstallation } from "../../_utils/installation";
|
||||
import appConfig from "../config.json";
|
||||
|
||||
@@ -5,7 +5,7 @@ import AppCard from "@calcom/app-store/_components/AppCard";
|
||||
import RainbowInstallForm from "@calcom/app-store/rainbow/components/RainbowInstallForm";
|
||||
import type { EventTypeAppCardComponent } from "@calcom/app-store/types";
|
||||
|
||||
import { appDataSchema } from "../zod";
|
||||
import type { appDataSchema } from "../zod";
|
||||
|
||||
const EventTypeAppCard: EventTypeAppCardComponent = function EventTypeAppCard({ app }) {
|
||||
const [getAppData, setAppData] = useAppContextWithSchema<typeof appDataSchema>();
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { z } from "zod";
|
||||
import type { z } from "zod";
|
||||
|
||||
import { SetAppDataGeneric } from "@calcom/app-store/EventTypeAppContext";
|
||||
import type { SetAppDataGeneric } from "@calcom/app-store/EventTypeAppContext";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { SUPPORTED_CHAINS_FOR_FORM } from "@calcom/rainbow/utils/ethereum";
|
||||
import { Select } from "@calcom/ui";
|
||||
|
||||
import { appDataSchema } from "../zod";
|
||||
import type { appDataSchema } from "../zod";
|
||||
|
||||
type RainbowInstallFormProps = {
|
||||
setAppData: SetAppDataGeneric<typeof appDataSchema>;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AppDeclarativeHandler } from "@calcom/types/AppHandler";
|
||||
import type { AppDeclarativeHandler } from "@calcom/types/AppHandler";
|
||||
|
||||
import { createDefaultInstallation } from "../../_utils/installation";
|
||||
import appConfig from "../config.json";
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import jsforce, { TokenResponse } from "jsforce";
|
||||
import type { TokenResponse } from "jsforce";
|
||||
import jsforce from "jsforce";
|
||||
import { RRule } from "rrule";
|
||||
|
||||
import { getLocation } from "@calcom/lib/CalEventParser";
|
||||
@@ -12,7 +13,7 @@ import type {
|
||||
NewCalendarEventType,
|
||||
Person,
|
||||
} from "@calcom/types/Calendar";
|
||||
import { CredentialPayload } from "@calcom/types/Credential";
|
||||
import type { CredentialPayload } from "@calcom/types/Credential";
|
||||
|
||||
import getAppKeysFromSlug from "../../_utils/getAppKeysFromSlug";
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import z from "zod";
|
||||
|
||||
import Sendgrid, { SendgridNewContact } from "@calcom/lib/Sendgrid";
|
||||
import type { SendgridNewContact } from "@calcom/lib/Sendgrid";
|
||||
import Sendgrid from "@calcom/lib/Sendgrid";
|
||||
import { symmetricDecrypt } from "@calcom/lib/crypto";
|
||||
import logger from "@calcom/lib/logger";
|
||||
import type {
|
||||
@@ -10,7 +11,7 @@ import type {
|
||||
IntegrationCalendar,
|
||||
NewCalendarEventType,
|
||||
} from "@calcom/types/Calendar";
|
||||
import { CredentialPayload } from "@calcom/types/Credential";
|
||||
import type { CredentialPayload } from "@calcom/types/Credential";
|
||||
|
||||
const apiKeySchema = z.object({
|
||||
encrypted: z.string(),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AppDeclarativeHandler } from "@calcom/types/AppHandler";
|
||||
import type { AppDeclarativeHandler } from "@calcom/types/AppHandler";
|
||||
|
||||
import { createDefaultInstallation } from "../../_utils/installation";
|
||||
import appConfig from "../config.json";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AppDeclarativeHandler } from "@calcom/types/AppHandler";
|
||||
import type { AppDeclarativeHandler } from "@calcom/types/AppHandler";
|
||||
|
||||
import { createDefaultInstallation } from "../../_utils/installation";
|
||||
import appConfig from "../config.json";
|
||||
|
||||
@@ -7,4 +7,4 @@ items:
|
||||
- /api/app-store/stripepayment/stripe5.jpg
|
||||
---
|
||||
|
||||
Stripe provides payment infrastructure for everyone from startups to Fortune 500 companies. They provide payment processing software as well as application programming interfaces (APIs) for mobile applications as well as e-commerce websites processing payments from (but not limited to) credit cards, debit cards, digital wallets, Google Pay, Apple Pay, Bank Transfers, Alipay and WeChat.
|
||||
Stripe provides payment infrastructure for everyone from startups to Fortune 500 companies. They provide payment processing software as well as application programming interfaces (APIs) for mobile applications as well as e-commerce websites processing payments from (but not limited to) credit cards, debit cards, digital wallets, Google Pay, Apple Pay, Bank Transfers, Alipay and WeChat.
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
import stringify from "qs-stringify";
|
||||
import Stripe from "stripe";
|
||||
import type Stripe from "stripe";
|
||||
import { z } from "zod";
|
||||
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { Prisma } from "@prisma/client";
|
||||
import type { Prisma } from "@prisma/client";
|
||||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
import { stringify } from "querystring";
|
||||
|
||||
import prisma from "@calcom/prisma";
|
||||
|
||||
import getInstalledAppPath from "../../_utils/getInstalledAppPath";
|
||||
import stripe, { StripeData } from "../lib/server";
|
||||
import type { StripeData } from "../lib/server";
|
||||
import stripe from "../lib/server";
|
||||
|
||||
function getReturnToValueFromQueryState(req: NextApiRequest) {
|
||||
let returnTo = "";
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { NextApiRequest, NextApiResponse } from "next";
|
||||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
import z from "zod";
|
||||
|
||||
import { getCustomerAndCheckoutSession } from "@calcom/app-store/stripepayment/lib/getCustomerAndCheckoutSession";
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
import { defaultHandler, defaultResponder } from "@calcom/lib/server";
|
||||
import { prisma } from "@calcom/prisma";
|
||||
import { Prisma } from "@calcom/prisma/client";
|
||||
import type { Prisma } from "@calcom/prisma/client";
|
||||
|
||||
const querySchema = z.object({
|
||||
callbackUrl: z.string().transform((url) => {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
import Stripe from "stripe";
|
||||
import type Stripe from "stripe";
|
||||
|
||||
import { getPremiumMonthlyPlanPriceId } from "@calcom/app-store/stripepayment/lib/utils";
|
||||
import { checkPremiumUsername } from "@calcom/features/ee/common/lib/checkPremiumUsername";
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
import prisma from "@calcom/prisma";
|
||||
import { Prisma } from "@calcom/prisma/client";
|
||||
import type { Prisma } from "@calcom/prisma/client";
|
||||
|
||||
import { getStripeCustomerIdFromUserId } from "../lib/customer";
|
||||
import stripe from "../lib/server";
|
||||
|
||||
@@ -9,7 +9,7 @@ import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { Alert, TextField } from "@calcom/ui";
|
||||
|
||||
import { appDataSchema } from "../zod";
|
||||
import type { appDataSchema } from "../zod";
|
||||
|
||||
const EventTypeAppCard: EventTypeAppCardComponent = function EventTypeAppCard({ app, eventType }) {
|
||||
const { asPath } = useRouter();
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import { Booking, Payment, Prisma } from "@prisma/client";
|
||||
import type { Booking, Payment, Prisma } from "@prisma/client";
|
||||
import Stripe from "stripe";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
import z from "zod";
|
||||
|
||||
import { sendAwaitingPaymentEmail } from "@calcom/emails";
|
||||
import { IAbstractPaymentService } from "@calcom/lib/PaymentService";
|
||||
import type { IAbstractPaymentService } from "@calcom/lib/PaymentService";
|
||||
import { getErrorFromUnknown } from "@calcom/lib/errors";
|
||||
import prisma from "@calcom/prisma";
|
||||
import { CalendarEvent } from "@calcom/types/Calendar";
|
||||
import type { CalendarEvent } from "@calcom/types/Calendar";
|
||||
|
||||
import { createPaymentLink } from "./client";
|
||||
import { StripePaymentData } from "./server";
|
||||
import type { StripePaymentData } from "./server";
|
||||
|
||||
const stripeCredentialKeysSchema = z.object({
|
||||
stripe_user_id: z.string(),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Stripe } from "@stripe/stripe-js";
|
||||
import type { Stripe } from "@stripe/stripe-js";
|
||||
import { loadStripe } from "@stripe/stripe-js/pure";
|
||||
|
||||
export type Maybe<T> = T | undefined | null;
|
||||
|
||||
Loaded 100 of 425 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user