cal/packages/app-store/types.d.ts
Joe Au-Yeung 58b439ca65
Revamp Google Cal warning for Meet, Amie, and Vimcal (#7308)
* Create requires Google Cal component

* Create installed GCal message

* Move requires GCal component to App

* Clean up

* Abstract prerequisite component

* Add requires message on app card

* Refactor to dependency

* Clean up

* Change typeform dep & remove app card dep component

* Clean up

* Change dependency to dependencies

* Pass disableInstall to default install button for AppCard

* Refactor app page to dependencies

* Type fix

* More type fixes

* Update apps/web/components/apps/App.tsx

* Apply suggestions from code review

---------

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
2023-03-09 10:07:23 +01:00

40 lines
1.1 KiB
TypeScript

import type React from "react";
import type { z } from "zod";
import type { _EventTypeModel } from "@calcom/prisma/zod";
import type { RouterOutputs } from "@calcom/trpc/react";
import type { ButtonProps } from "@calcom/ui";
export type IntegrationOAuthCallbackState = {
returnTo: string;
installGoogleVideo?: boolean;
};
type AppScript = { attrs?: Record<string, string> } & { src?: string; content?: string };
export type Tag = {
scripts: AppScript[];
};
export interface InstallAppButtonProps {
render: (
renderProps: ButtonProps & {
/** Tells that the default render component should be used */
useDefaultComponent?: boolean;
}
) => JSX.Element;
onChanged?: () => unknown;
disableInstall?: boolean;
}
export type EventTypeAppCardComponentProps = {
// Limit what data should be accessible to apps
eventType: Pick<
z.infer<typeof _EventTypeModel>,
"id" | "title" | "description" | "teamId" | "length" | "recurringEvent"
> & {
URL: string;
};
app: RouterOutputs["viewer"]["apps"][number];
};
export type EventTypeAppCardComponent = React.FC<EventTypeAppCardComponentProps>;