* feat: Cal.diy — community-driven MIT-licensed fork of Cal.com This squashed commit contains all Cal.diy changes applied on top of calcom/cal.com main: - Rebrand Cal.com to Cal.diy across the entire codebase - Remove Enterprise Edition (EE) features, license checks, and AGPL restrictions - Switch license from AGPL-3.0 to MIT - Remove docs/ directory (migrated to Nextra at cal.diy) - Remove dead code: org tests, EE tips, platform nav, premium username, SAML/SSO, etc. - Clean up .env.example for self-hosted Cal.diy - Update Docker image references to calcom/cal.diy - Update README, CONTRIBUTING.md, and issue templates for Cal.diy community fork - Add PR welcome bot for Cal.diy contributors - Fix API v2 breaking changes oasdiff ignore entries - Replace Blacksmith CI runners with default GitHub Actions 3893 files changed, 20789 insertions(+), 411020 deletions(-) Co-Authored-By: benny@cal.com <sldisek783@gmail.com> * refactor: remove org-specific /organizations/:orgId endpoints from API v2 atoms controllers (#1701) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix: revert Cal.diy Inc to Cal.com, Inc. in license files, copyright notices, and package metadata (#1702) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * rip out org related comments in api v2 --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
119 lines
3.3 KiB
TypeScript
119 lines
3.3 KiB
TypeScript
import { z } from "zod";
|
|
|
|
const eventLocationTypeSchema = z.object({
|
|
type: z.string(),
|
|
label: z.string(),
|
|
messageForOrganizer: z.string().optional(),
|
|
iconUrl: z.string().optional(),
|
|
variable: z.literal("locationLink").optional(),
|
|
defaultValueVariable: z.literal("link").optional(),
|
|
attendeeInputType: z.null().optional(),
|
|
attendeeInputPlaceholder: z.null().optional(),
|
|
linkType: z.enum(["static", "dynamic"]),
|
|
urlRegExp: z.string().optional(),
|
|
organizerInputPlaceholder: z.string().optional(),
|
|
organizerInputType: z.enum(["text", "phone"]).optional(),
|
|
default: z.boolean().optional(),
|
|
});
|
|
|
|
const appDataSchema = z
|
|
.object({
|
|
location: eventLocationTypeSchema.optional(),
|
|
tag: z
|
|
.object({
|
|
scripts: z
|
|
.array(
|
|
z
|
|
.object({
|
|
src: z.string().optional(),
|
|
content: z.string().optional(),
|
|
attrs: z.record(z.any()).optional(),
|
|
})
|
|
.passthrough()
|
|
)
|
|
.optional(),
|
|
})
|
|
.passthrough()
|
|
.optional(),
|
|
})
|
|
.passthrough()
|
|
.nullable()
|
|
.optional();
|
|
|
|
const paidAppDataSchema = z.object({
|
|
priceInUsd: z.number(),
|
|
priceId: z.string().optional(),
|
|
trial: z.number().optional(),
|
|
mode: z.enum(["subscription", "one_time"]).optional(),
|
|
});
|
|
|
|
export const AppMetaSchema = z
|
|
.object({
|
|
name: z.string(),
|
|
description: z.string(),
|
|
type: z.string(),
|
|
variant: z.enum([
|
|
"calendar",
|
|
"payment",
|
|
"conferencing",
|
|
"video",
|
|
"other",
|
|
"other_calendar",
|
|
"automation",
|
|
"crm",
|
|
"analytics",
|
|
"messaging",
|
|
]),
|
|
slug: z.string(),
|
|
categories: z.array(z.string()),
|
|
logo: z.string(),
|
|
publisher: z.string(),
|
|
url: z.string().optional(),
|
|
email: z.string(),
|
|
installed: z.boolean().optional(),
|
|
title: z.string().optional(),
|
|
category: z.string().optional(),
|
|
extendsFeature: z.enum(["EventType", "User"]).optional(),
|
|
docsUrl: z.string().optional(),
|
|
verified: z.boolean().optional(),
|
|
trending: z.boolean().optional(),
|
|
rating: z.number().optional(),
|
|
reviews: z.number().optional(),
|
|
isGlobal: z.boolean().optional(),
|
|
simplePath: z.string().optional(),
|
|
key: z.any().optional(),
|
|
feeType: z.enum(["monthly", "usage-based", "one-time", "free"]).optional(),
|
|
price: z.number().optional(),
|
|
commission: z.number().optional(),
|
|
licenseRequired: z.boolean().optional(),
|
|
appData: appDataSchema,
|
|
paid: paidAppDataSchema.optional(),
|
|
dirName: z.string().optional(),
|
|
isTemplate: z.boolean().optional(),
|
|
__template: z.string().optional(),
|
|
dependencies: z.array(z.string()).optional(),
|
|
concurrentMeetings: z.boolean().optional(),
|
|
createdAt: z.string().optional(),
|
|
isOAuth: z.boolean().optional(),
|
|
isAuth: z.boolean().optional(),
|
|
delegationCredential: z
|
|
.object({
|
|
workspacePlatformSlug: z.string(),
|
|
})
|
|
.passthrough()
|
|
.optional(),
|
|
__createdUsingCli: z.boolean().optional(),
|
|
imageSrc: z.string().optional(),
|
|
label: z.string().optional(),
|
|
linkType: z.string().optional(),
|
|
externalLink: z
|
|
.object({
|
|
url: z.string(),
|
|
newTab: z.boolean().optional(),
|
|
})
|
|
.optional(),
|
|
})
|
|
.passthrough();
|
|
|
|
export type AppMetaType = z.infer<typeof AppMetaSchema>;
|