feat: Dub App integration (#21321)

Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: sean-brydon <[email protected]>
This commit is contained in:
authored and GitHub committed 2025-05-22 09:18:45 -07:00
1 parent 324ac691eb
commit 357c82129c
35 files changed
+518 -2

No files matched your search

@@ -12,6 +12,14 @@ type CredentialCreateInput = {
delegationCredentialId?: string | null;
};
type CredentialUpdateInput = {
type?: string;
key?: any;
userId?: number;
appId?: string;
delegationCredentialId?: string | null;
};
export class CredentialRepository {
static async create(data: CredentialCreateInput) {
const credential = await prisma.credential.create({ data: { ...data } });
@@ -64,6 +72,13 @@ export class CredentialRepository {
await prisma.credential.delete({ where: { id } });
}
static async updateCredentialById({ id, data }: { id: number; data: CredentialUpdateInput }) {
await prisma.credential.update({
where: { id },
data,
});
}
static async deleteAllByDelegationCredentialId({
delegationCredentialId,
}: {