types: Abstract inline interfaces to @plunk/types

This commit is contained in:
Dries Augustyns
2026-01-01 09:09:03 +01:00
parent 519b131792
commit 38da58e5e9
50 changed files with 639 additions and 462 deletions
+1 -17
View File
@@ -1,4 +1,5 @@
import type {Membership, Role} from '@plunk/db';
import type {MemberWithEmail, OwnerInfo, DisabledProjectInfo} from '@plunk/types';
import {prisma} from '../database/prisma.js';
import {redis, REDIS_ONE_MINUTE, wrapRedis} from '../database/redis.js';
@@ -7,23 +8,6 @@ import {Keys} from './keys.js';
const FIVE_MINUTES_IN_SECONDS = 5 * 60;
export interface MemberWithEmail {
userId: string;
email: string;
role: Role;
createdAt: Date;
}
export interface OwnerInfo {
userId: string;
email: string;
}
export interface DisabledProjectInfo {
hasDisabledProject: boolean;
disabledProjectNames: string[];
}
/**
* Service for managing project memberships
* Centralizes all membership-related database queries with caching