Introduce EventTypeAppCard in app-store and make it super easy to add it through CLI - Also adds Fathom app (#4727)

* Add OmniInstall button

* Make AppCards configurable by the app itself

* Make OmniInstallAppButton not redirect

* Fixes

* Add extendsFeature support to CLI

* Move to automatic file generation approach as dynamic import checking doesnt work correctly

* Use zod everywhere consistenly for metadata and fix all TS issues

* Fix viewer.eventTypes endpoint. Make prisma base select and _ prefixed models consistent in expecting scalars only

* Remove unnecessary zod parsing of event-types as it is making the scope of the PR huge

* Fix UI TS errors

* wip

* Add zod types support in EventTypeAppCard.tsx

* Fixes during PR review and other failing tests

* Remove unused app

* Fix stripe installation flow

* More fixes

* Fix apps and active apps count

* self review

* Add loading attribute to OmniInsall button

* Handle empty state

* Improve types

* Fix stripe app installation bug

* added fathom app (#4804)

* added fathom app wrapper, needs script injection to public booking page

* new logo

* Add Fathom script support on booking pages and add it as an eventTypeapp

* Add automation and analytics apps

* Add missing pieces for analytics category

* Rename BookingPageScripts to BookingPageTagManager

Co-authored-by: Hariom Balhara <[email protected]>

* Fix lint error

* Fix runtime error with legayAppData being undefined

* Remove duplicate automation key

Co-authored-by: Peer Richelsen <[email protected]>
This commit is contained in:
Hariom BalharaandPeer Richelsen authored and GitHub committed 2022-10-14 10:24:43 -06:00
1 parent 215e3c93d6
commit 271d4319b9
79 files changed
+1324 -1466

No files matched your search

@@ -0,0 +1,2 @@
-- AlterEnum
ALTER TYPE "AppCategories" ADD VALUE 'analytics';
+4
View File
@@ -71,9 +71,12 @@ model EventType {
schedulingType SchedulingType?
schedule Schedule? @relation(fields: [scheduleId], references: [id])
scheduleId Int?
// price is deprecated. It has now moved to metadata.apps.stripe.price. Plan to drop this column.
price Int @default(0)
// currency is deprecated. It has now moved to metadata.apps.stripe.currency. Plan to drop this column.
currency String @default("usd")
slotInterval Int?
/// @zod.custom(imports.EventTypeMetaDataSchema)
metadata Json?
/// @zod.custom(imports.successRedirectUrl)
successRedirectUrl String?
@@ -481,6 +484,7 @@ enum AppCategories {
video
web3
automation
analytics
}
model App {
+40 -12
View File
@@ -2,68 +2,96 @@
{
"/*": "This file is auto-generated and updated by `yarn app-store create/edit`. Don't edit it manually",
"dirName": "routing-forms",
"categories": ["other"],
"categories": [
"other"
],
"slug": "routing-forms",
"type": "routing-forms_other"
},
{
"dirName": "whereby",
"categories": ["video"],
"categories": [
"video"
],
"slug": "whereby",
"type": "whereby_video"
},
{
"dirName": "around",
"categories": ["video"],
"categories": [
"video"
],
"slug": "around",
"type": "around_video"
},
{
"dirName": "riverside",
"categories": ["video"],
"categories": [
"video"
],
"slug": "riverside",
"type": "riverside_video"
},
{
"dirName": "typeform",
"categories": ["other"],
"categories": [
"other"
],
"slug": "typeform",
"type": "typeform_other"
},
{
"dirName": "ping",
"categories": ["video"],
"categories": [
"video"
],
"slug": "ping",
"type": "ping_video"
},
{
"dirName": "campfire",
"categories": ["video"],
"categories": [
"video"
],
"slug": "campfire",
"type": "campfire_video"
},
{
"dirName": "rainbow",
"categories": ["web3"],
"categories": [
"web3"
],
"slug": "rainbow",
"type": "rainbow_web3"
},
{
"dirName": "raycast",
"categories": ["other"],
"categories": [
"other"
],
"slug": "raycast",
"type": "raycast_other"
},
{
"dirName": "n8n",
"categories": ["automation"],
"categories": [
"automation"
],
"slug": "n8n",
"type": "n8n_automation"
},
{
"dirName": "exchangecalendar",
"categories": ["calendar"],
"categories": [
"calendar"
],
"slug": "exchange",
"type": "exchange_calendar"
},
{
"dirName": "fathom",
"categories": ["analytics"],
"slug": "fathom",
"type": "fathom_analytics"
}
]
]
+10
View File
@@ -10,6 +10,7 @@ import type {
ZodTypeAny,
} from "zod";
import { appDataSchemas } from "@calcom/app-store/apps.browser.generated";
import dayjs from "@calcom/dayjs";
import { slugify } from "@calcom/lib/slugify";
@@ -24,6 +25,15 @@ export enum Frequency {
SECONDLY = 6,
}
export const EventTypeMetaDataSchema = z
.object({
smartContractAddress: z.string().optional(),
blockchainId: z.number().optional(),
giphyThankYouPage: z.string().optional(),
apps: z.object(appDataSchemas).partial().optional(),
})
.nullable();
export const eventTypeLocations = z.array(
z.object({
// TODO: Couldn't find a way to make it a union of types from App Store locations