chore: remove campsite from app store (#20032)
This commit is contained in:
@@ -9683,7 +9683,6 @@
|
||||
"eightxeight-video",
|
||||
"discord-video",
|
||||
"demodesk-video",
|
||||
"campsite-conferencing",
|
||||
"campfire-video",
|
||||
"around-video"
|
||||
],
|
||||
@@ -16418,7 +16417,6 @@
|
||||
"eightxeight-video",
|
||||
"discord-video",
|
||||
"demodesk-video",
|
||||
"campsite-conferencing",
|
||||
"campfire-video",
|
||||
"around-video"
|
||||
]
|
||||
|
||||
@@ -8962,7 +8962,6 @@
|
||||
"eightxeight-video",
|
||||
"discord-video",
|
||||
"demodesk-video",
|
||||
"campsite-conferencing",
|
||||
"campfire-video",
|
||||
"around-video"
|
||||
],
|
||||
@@ -14786,7 +14785,6 @@
|
||||
"eightxeight-video",
|
||||
"discord-video",
|
||||
"demodesk-video",
|
||||
"campsite-conferencing",
|
||||
"campfire-video",
|
||||
"around-video"
|
||||
]
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
**/
|
||||
import { appKeysSchema as alby_zod_ts } from "./alby/zod";
|
||||
import { appKeysSchema as basecamp3_zod_ts } from "./basecamp3/zod";
|
||||
import { appKeysSchema as campsite_zod_ts } from "./campsite/zod";
|
||||
import { appKeysSchema as closecom_zod_ts } from "./closecom/zod";
|
||||
import { appKeysSchema as dailyvideo_zod_ts } from "./dailyvideo/zod";
|
||||
import { appKeysSchema as fathom_zod_ts } from "./fathom/zod";
|
||||
@@ -54,7 +53,6 @@ import { appKeysSchema as zoomvideo_zod_ts } from "./zoomvideo/zod";
|
||||
export const appKeysSchemas = {
|
||||
alby: alby_zod_ts,
|
||||
basecamp3: basecamp3_zod_ts,
|
||||
campsite: campsite_zod_ts,
|
||||
closecom: closecom_zod_ts,
|
||||
dailyvideo: dailyvideo_zod_ts,
|
||||
fathom: fathom_zod_ts,
|
||||
|
||||
@@ -13,7 +13,6 @@ import basecamp3_config_json from "./basecamp3/config.json";
|
||||
import bolna_config_json from "./bolna/config.json";
|
||||
import { metadata as caldavcalendar__metadata_ts } from "./caldavcalendar/_metadata";
|
||||
import campfire_config_json from "./campfire/config.json";
|
||||
import campsite_config_json from "./campsite/config.json";
|
||||
import chatbase_config_json from "./chatbase/config.json";
|
||||
import clic_config_json from "./clic/config.json";
|
||||
import closecom_config_json from "./closecom/config.json";
|
||||
@@ -119,7 +118,6 @@ export const appStoreMetadata = {
|
||||
bolna: bolna_config_json,
|
||||
caldavcalendar: caldavcalendar__metadata_ts,
|
||||
campfire: campfire_config_json,
|
||||
campsite: campsite_config_json,
|
||||
chatbase: chatbase_config_json,
|
||||
clic: clic_config_json,
|
||||
closecom: closecom_config_json,
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
**/
|
||||
import { appDataSchema as alby_zod_ts } from "./alby/zod";
|
||||
import { appDataSchema as basecamp3_zod_ts } from "./basecamp3/zod";
|
||||
import { appDataSchema as campsite_zod_ts } from "./campsite/zod";
|
||||
import { appDataSchema as closecom_zod_ts } from "./closecom/zod";
|
||||
import { appDataSchema as dailyvideo_zod_ts } from "./dailyvideo/zod";
|
||||
import { appDataSchema as fathom_zod_ts } from "./fathom/zod";
|
||||
@@ -54,7 +53,6 @@ import { appDataSchema as zoomvideo_zod_ts } from "./zoomvideo/zod";
|
||||
export const appDataSchemas = {
|
||||
alby: alby_zod_ts,
|
||||
basecamp3: basecamp3_zod_ts,
|
||||
campsite: campsite_zod_ts,
|
||||
closecom: closecom_zod_ts,
|
||||
dailyvideo: dailyvideo_zod_ts,
|
||||
fathom: fathom_zod_ts,
|
||||
|
||||
@@ -14,7 +14,6 @@ export const apiHandlers = {
|
||||
bolna: import("./bolna/api"),
|
||||
caldavcalendar: import("./caldavcalendar/api"),
|
||||
campfire: import("./campfire/api"),
|
||||
campsite: import("./campsite/api"),
|
||||
chatbase: import("./chatbase/api"),
|
||||
clic: import("./clic/api"),
|
||||
closecom: import("./closecom/api"),
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
**/
|
||||
import around_config_json from "./around/config.json";
|
||||
import campfire_config_json from "./campfire/config.json";
|
||||
import campsite_config_json from "./campsite/config.json";
|
||||
import { metadata as dailyvideo__metadata_ts } from "./dailyvideo/_metadata";
|
||||
import demodesk_config_json from "./demodesk/config.json";
|
||||
import dialpad_config_json from "./dialpad/config.json";
|
||||
@@ -51,7 +50,6 @@ import { metadata as zoomvideo__metadata_ts } from "./zoomvideo/_metadata";
|
||||
export const appStoreMetadata = {
|
||||
around: around_config_json,
|
||||
campfire: campfire_config_json,
|
||||
campsite: campsite_config_json,
|
||||
dailyvideo: dailyvideo__metadata_ts,
|
||||
demodesk: demodesk_config_json,
|
||||
dialpad: dialpad_config_json,
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
items:
|
||||
- 1.png
|
||||
- 2.png
|
||||
- 3.png
|
||||
---
|
||||
|
||||
{DESCRIPTION}
|
||||
@@ -1,46 +0,0 @@
|
||||
import type { NextApiRequest } from "next";
|
||||
import { stringify } from "querystring";
|
||||
import { z } from "zod";
|
||||
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
import { defaultHandler } from "@calcom/lib/server/defaultHandler";
|
||||
import { defaultResponder } from "@calcom/lib/server/defaultResponder";
|
||||
|
||||
import getAppKeysFromSlug from "../../_utils/getAppKeysFromSlug";
|
||||
import { encodeOAuthState } from "../../_utils/oauth/encodeOAuthState";
|
||||
|
||||
const campsiteAppKeysSchema = z.object({
|
||||
client_id: z.string(),
|
||||
client_secret: z.string(),
|
||||
});
|
||||
|
||||
export const getCampsiteAppKeys = async () => {
|
||||
const appKeys = await getAppKeysFromSlug("campsite");
|
||||
return campsiteAppKeysSchema.parse(appKeys);
|
||||
};
|
||||
|
||||
async function handler(req: NextApiRequest) {
|
||||
// Get user
|
||||
const user = req?.session?.user;
|
||||
if (!user) {
|
||||
return { status: 401, body: { error: "Unauthorized" } };
|
||||
}
|
||||
|
||||
const { client_id } = await getCampsiteAppKeys();
|
||||
const state = encodeOAuthState(req);
|
||||
|
||||
const params = {
|
||||
response_type: "code",
|
||||
client_id,
|
||||
redirect_uri: `${WEBAPP_URL}/api/integrations/campsite/callback`,
|
||||
state,
|
||||
scope: "read_user write_call_room",
|
||||
};
|
||||
const query = stringify(params);
|
||||
const url = `https://auth.campsite.com/oauth/authorize?${query}`;
|
||||
return { url };
|
||||
}
|
||||
|
||||
export default defaultHandler({
|
||||
GET: Promise.resolve({ default: defaultResponder(handler) }),
|
||||
});
|
||||
@@ -1,73 +0,0 @@
|
||||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
import { getSafeRedirectUrl } from "@calcom/lib/getSafeRedirectUrl";
|
||||
import prisma from "@calcom/prisma";
|
||||
|
||||
import getAppKeysFromSlug from "../../_utils/getAppKeysFromSlug";
|
||||
import getInstalledAppPath from "../../_utils/getInstalledAppPath";
|
||||
import createOAuthAppCredential from "../../_utils/oauth/createOAuthAppCredential";
|
||||
import { decodeOAuthState } from "../../_utils/oauth/decodeOAuthState";
|
||||
|
||||
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||
const state = decodeOAuthState(req);
|
||||
const userId = req.session?.user.id;
|
||||
if (!userId) {
|
||||
return res.status(404).json({ message: "No user found" });
|
||||
}
|
||||
const { code } = req.query;
|
||||
const { client_id, client_secret } = await getAppKeysFromSlug("campsite");
|
||||
|
||||
const result = await fetch(`https://auth.campsite.com/oauth/token`, {
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
grant_type: "authorization_code",
|
||||
code,
|
||||
client_id,
|
||||
client_secret,
|
||||
redirect_uri: `${WEBAPP_URL}/api/integrations/campsite/callback`,
|
||||
}),
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
});
|
||||
|
||||
if (result.status !== 200) {
|
||||
let errorMessage = "Something is wrong with the Campsite API";
|
||||
try {
|
||||
const responseBody = await result.json();
|
||||
errorMessage = responseBody.error;
|
||||
} catch (e) {}
|
||||
|
||||
res.status(400).json({ message: errorMessage });
|
||||
return;
|
||||
}
|
||||
|
||||
const responseBody = await result.json();
|
||||
if (responseBody.error) {
|
||||
res.status(400).json({ message: responseBody.error });
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* With this we take care of no duplicate Campsite keys for a single user
|
||||
* when creating a room using deleteMany if there is already a Campsite key
|
||||
* */
|
||||
await prisma.credential.deleteMany({
|
||||
where: {
|
||||
type: "campsite_conferencing",
|
||||
userId,
|
||||
appId: "campsite",
|
||||
},
|
||||
});
|
||||
|
||||
await createOAuthAppCredential(
|
||||
{ appId: "campsite", type: "campsite_conferencing" },
|
||||
{ access_token: responseBody.access_token },
|
||||
req
|
||||
);
|
||||
|
||||
res.redirect(
|
||||
getSafeRedirectUrl(state?.returnTo) ?? getInstalledAppPath({ variant: "conferencing", slug: "campsite" })
|
||||
);
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
export { default as add } from "./add";
|
||||
export { default as callback } from "./callback";
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"/*": "Don't modify slug - If required, do it using cli edit command",
|
||||
"name": "Campsite",
|
||||
"slug": "campsite",
|
||||
"type": "campsite_conferencing",
|
||||
"logo": "icon.png",
|
||||
"url": "https://campsite.com",
|
||||
"variant": "conferencing",
|
||||
"categories": ["conferencing"],
|
||||
"publisher": "Campsite",
|
||||
"email": "support@campsite.com",
|
||||
"appData": {
|
||||
"location": {
|
||||
"type": "integrations:{SLUG}_conferencing",
|
||||
"label": "{TITLE}",
|
||||
"linkType": "dynamic"
|
||||
}
|
||||
},
|
||||
"description": "Campsite is an all-in-one communication app that helps async teams move faster. Posts, docs, calls, and chat in one place — finally. Everything is searchable and easy to find.",
|
||||
"isTemplate": false,
|
||||
"__createdUsingCli": true,
|
||||
"__template": "event-type-location-video-static"
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
export * as api from "./api";
|
||||
export * as lib from "./lib";
|
||||
@@ -1,47 +0,0 @@
|
||||
import type { CalendarEvent, EventBusyDate } from "@calcom/types/Calendar";
|
||||
import type { CredentialPayload } from "@calcom/types/Credential";
|
||||
import type { PartialReference } from "@calcom/types/EventManager";
|
||||
import type { VideoApiAdapter, VideoCallData } from "@calcom/types/VideoApiAdapter";
|
||||
|
||||
type CampsiteToken = {
|
||||
access_token: string;
|
||||
};
|
||||
const CampsiteVideoApiAdapter = (credential: CredentialPayload): VideoApiAdapter => {
|
||||
return {
|
||||
createMeeting: async (_event: CalendarEvent): Promise<VideoCallData> => {
|
||||
const keys = credential.key as CampsiteToken;
|
||||
const { access_token } = keys;
|
||||
const response = await fetch("https://api.campsite.com/v1/integrations/cal_dot_com/call_rooms", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: `Bearer ${access_token}`,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
});
|
||||
const callRoom = await response.json();
|
||||
|
||||
return {
|
||||
type: "campsite_conferencing",
|
||||
id: callRoom.id,
|
||||
password: "",
|
||||
url: callRoom.url,
|
||||
};
|
||||
},
|
||||
updateMeeting: async (bookingRef: PartialReference, _event: CalendarEvent): Promise<VideoCallData> => {
|
||||
return {
|
||||
type: "campsite_conferencing",
|
||||
id: bookingRef.externalCalendarId ? bookingRef.externalCalendarId : "",
|
||||
password: "",
|
||||
url: bookingRef.meetingUrl ? bookingRef.meetingUrl : "",
|
||||
};
|
||||
},
|
||||
deleteMeeting: async (_uid: string): Promise<unknown> => {
|
||||
return {};
|
||||
},
|
||||
getAvailability: async (_dateFrom?: string, _dateTo?: string): Promise<EventBusyDate[]> => {
|
||||
return [];
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export default CampsiteVideoApiAdapter;
|
||||
@@ -1 +0,0 @@
|
||||
export { default as VideoApiAdapter } from "./VideoApiAdapter";
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/package.json",
|
||||
"private": true,
|
||||
"name": "@calcom/campsite",
|
||||
"version": "0.0.0",
|
||||
"main": "./index.ts",
|
||||
"dependencies": {
|
||||
"@calcom/lib": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@calcom/types": "*"
|
||||
},
|
||||
"description": "Campsite is an all-in-one communication app that helps async teams move faster. Posts, docs, calls, and chat in one place — finally. Everything is searchable and easy to find."
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 305 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 353 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 160 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 9.4 KiB |
@@ -1,8 +0,0 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const appDataSchema = z.object({});
|
||||
|
||||
export const appKeysSchema = z.object({
|
||||
client_id: z.string().min(1),
|
||||
client_secret: z.string().min(1),
|
||||
});
|
||||
@@ -3,7 +3,6 @@ const appStore = {
|
||||
applecalendar: createCachedImport(() => import("./applecalendar")),
|
||||
aroundvideo: createCachedImport(() => import("./around")),
|
||||
caldavcalendar: createCachedImport(() => import("./caldavcalendar")),
|
||||
campsiteconferencing: createCachedImport(() => import("./campsite")),
|
||||
closecom: createCachedImport(() => import("./closecom")),
|
||||
dailyvideo: createCachedImport(() => import("./dailyvideo")),
|
||||
googlecalendar: createCachedImport(() => import("./googlecalendar")),
|
||||
|
||||
@@ -40,7 +40,6 @@ export const apiToInternalintegrationsMapping = {
|
||||
"eightxeight-video": "integrations:eightxeight_video",
|
||||
"discord-video": "integrations:discord_video",
|
||||
"demodesk-video": "integrations:demodesk_video",
|
||||
"campsite-conferencing": "integrations:campsite_conferencing",
|
||||
"campfire-video": "integrations:campfire_video",
|
||||
"around-video": "integrations:around_video",
|
||||
} as const;
|
||||
|
||||
@@ -42,7 +42,6 @@ const internalToApiIntegrationsMapping: Record<string, OutputIntegration_2024_06
|
||||
"integrations:eightxeight_video": "eightxeight-video",
|
||||
"integrations:discord_video": "discord-video",
|
||||
"integrations:demodesk_video": "demodesk-video",
|
||||
"integrations:campsite_conferencing": "campsite-conferencing",
|
||||
"integrations:campfire_video": "campfire-video",
|
||||
"integrations:around_video": "around-video",
|
||||
};
|
||||
|
||||
@@ -33,7 +33,6 @@ const integrationsApiUnavailable = {
|
||||
"eightxeight-video": z.literal("integrations:eightxeight_video"),
|
||||
"discord-video": z.literal("integrations:discord_video"),
|
||||
"demodesk-video": z.literal("integrations:demodesk_video"),
|
||||
"campsite-conferencing": z.literal("integrations:campsite_conferencing"),
|
||||
"campfire-video": z.literal("integrations:campfire_video"),
|
||||
"around-video": z.literal("integrations:around_video"),
|
||||
};
|
||||
@@ -73,7 +72,6 @@ const OrganizerIntegrationSchema = z.object({
|
||||
integrationsApiToInternalMappingSchema["eightxeight-video"],
|
||||
integrationsApiToInternalMappingSchema["discord-video"],
|
||||
integrationsApiToInternalMappingSchema["demodesk-video"],
|
||||
integrationsApiToInternalMappingSchema["campsite-conferencing"],
|
||||
integrationsApiToInternalMappingSchema["campfire-video"],
|
||||
integrationsApiToInternalMappingSchema["around-video"],
|
||||
]),
|
||||
|
||||
@@ -62,7 +62,6 @@ export const supportedIntegrations = [
|
||||
"eightxeight-video",
|
||||
"discord-video",
|
||||
"demodesk-video",
|
||||
"campsite-conferencing",
|
||||
"campfire-video",
|
||||
"around-video",
|
||||
] as const;
|
||||
|
||||
@@ -53,7 +53,6 @@ const integrationsValues = [
|
||||
"eightxeight-video",
|
||||
"discord-video",
|
||||
"demodesk-video",
|
||||
"campsite-conferencing",
|
||||
"campfire-video",
|
||||
"around-video",
|
||||
] as const;
|
||||
|
||||
@@ -2952,15 +2952,6 @@ __metadata:
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@calcom/campsite@workspace:packages/app-store/campsite":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@calcom/campsite@workspace:packages/app-store/campsite"
|
||||
dependencies:
|
||||
"@calcom/lib": "*"
|
||||
"@calcom/types": "*"
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@calcom/chatbase@workspace:packages/app-store/chatbase":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@calcom/chatbase@workspace:packages/app-store/chatbase"
|
||||
|
||||
Reference in New Issue
Block a user