fix: Show messaging app in locations list (#10741)

* Get messaging app as well through query because a messaging app is also a location app

* Fix type error

---------

Co-authored-by: Joe Au-Yeung <[email protected]>
This commit is contained in:
Hariom BalharaandJoe Au-Yeung authored and GitHub committed 2023-08-14 15:02:29 +00:00
1 parent 1b3f676e57
commit 0f9c3571fe
4 files changed
+34 -17

No files matched your search

+11 -4
View File
@@ -1,4 +1,4 @@
import type { Prisma } from "@prisma/client";
import type { AppCategories, Prisma } from "@prisma/client";
import type { Tag } from "@calcom/app-store/types";
@@ -31,6 +31,10 @@ type DynamicLinkBasedEventLocation = {
export type EventLocationTypeFromAppMeta = StaticLinkBasedEventLocation | DynamicLinkBasedEventLocation;
type AppData = {
/**
* TODO: We must assert that if `location` is set in App config.json, then it must have atleast Messaging or Conferencing as a category.
* This is because we fetch only those credentials(as an optimization) which match that category.
*/
location?: EventLocationTypeFromAppMeta;
tag?: Tag;
} | null;
@@ -81,14 +85,17 @@ export interface App {
/** The slug for the app store public page inside `/apps/[slug] */
slug: string;
/** The category to which this app belongs, currently we have `calendar`, `payment` or `video` */
/** The category to which this app belongs. Remove all usages of category and then remove the prop */
/*
* @deprecated Use categories
*/
category?: string;
/** The category to which this app belongs, currently we have `calendar`, `payment` or `video` */
categories: string[];
/** The category to which this app belongs. */
/**
* Messaging and Conferencing(Earlier called Video) are considered location apps and are fetched when configuring an event-type location.
*/
categories: AppCategories[];
/**
* `User` is the broadest category. `EventType` is when you want to add features to EventTypes.
* See https://app.gitbook.com/o/6snd8PyPYMhg0wUw6CeQ/s/VXRprBTuMlihk37NQgUU/~/changes/6xkqZ4qvJ3Xh9k8UaWaZ/engineering/product-specs/app-store#user-apps for more details