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:
1 parent
c0504993a6
commit
431fbe44fc
26 files changed
+196
-210
No files matched your search
@@ -1,9 +1,16 @@
|
||||
import { ProfileRepository } from "@calcom/features/profile/repositories/ProfileRepository";
|
||||
import type { OrgMembershipLookup } from "@calcom/trpc/server/routers/viewer/slots/util";
|
||||
|
||||
import { createModule, type Module } from "../di";
|
||||
import { DI_TOKENS } from "../tokens";
|
||||
|
||||
/**
|
||||
* Minimal capability interface for looking up a user's organization membership.
|
||||
* Used as a fallback when org context can't be determined from request or eventType.
|
||||
*/
|
||||
export interface OrgMembershipLookup {
|
||||
findFirstOrganizationIdForUser(args: { userId: number }): Promise<number | null>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adapter that wraps ProfileRepository's static method to satisfy the OrgMembershipLookup interface.
|
||||
* This lives in the composition root where implementation details are wired together.
|
||||
|
||||
Reference in new issue
Block a user