refactor: decouple @calcom/features from @calcom/trpc/server (#27751)

* make GetPublicEventInput

* space

* mv feature flags router to trpc

* remove trpc imports

* wip

* mv OrgMembershipLookup to features

* fix

* fix

* update

* fix

* revert formatting-only changes to improve PR reviewability

Co-Authored-By: [email protected] <[email protected]>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Benny JooandDevin AI authored and GitHub committed 2026-02-10 09:28:37 -03:00
1 parent c0504993a6
commit 431fbe44fc
26 files changed
+196 -210

No files matched your search

@@ -4,6 +4,7 @@ import {
ConditionIdentifierEnum,
ConditionOperatorEnum,
type IAttributeSyncRule,
type ICreateAttributeSyncInput,
type IFieldMapping,
type IFieldMappingFormState,
type IFieldMappingWithOptionalId,
@@ -80,3 +81,13 @@ export const syncFormDataSchema: z.ZodType<ISyncFormData> = z.object({
rule: attributeSyncRuleSchema,
syncFieldMappings: z.array(z.union([fieldMappingSchema, newFieldMappingSchema])),
});
export const createAttributeSyncSchema: z.ZodType<ICreateAttributeSyncInput> = z.object({
name: z.string().min(1, "Name is required"),
credentialId: z.number(),
rule: attributeSyncRuleSchema,
syncFieldMappings: z.array(newFieldMappingSchema),
enabled: z.boolean(),
});
export type ZCreateAttributeSyncSchema = ICreateAttributeSyncInput;
@@ -1,6 +1,5 @@
import type { CredentialRepository } from "@calcom/features/credentials/repositories/CredentialRepository";
import type { TeamRepository } from "@calcom/features/ee/teams/repositories/TeamRepository";
import type { ZCreateAttributeSyncSchema } from "@calcom/trpc/server/routers/viewer/attribute-sync/createAttributeSync.schema";
import { enabledAppSlugs } from "../constants";
import {
@@ -11,7 +10,7 @@ import {
AttributeSyncIntegrations,
ConditionIdentifierEnum,
} from "../repositories/IIntegrationAttributeSyncRepository";
import { attributeSyncRuleSchema } from "../schemas/zod";
import { attributeSyncRuleSchema, type ZCreateAttributeSyncSchema } from "../schemas/zod";
export class DuplicateAttributeWithinSyncError extends Error {
constructor(public attributeId: string) {