feat: add envelope editor

This commit is contained in:
David Nguyen
2025-10-12 23:35:54 +11:00
parent bf89bc781b
commit 0da8e7dbc6
307 changed files with 24657 additions and 3681 deletions

View File

@ -2,20 +2,18 @@ import { EnvelopeType } from '@prisma/client';
import { prisma } from '@documenso/prisma';
import { type EnvelopeIdOptions } from '../../utils/envelope';
import { getEnvelopeWhereInput } from '../envelope/get-envelope-by-id';
export type DeleteTemplateOptions = {
id: number;
id: EnvelopeIdOptions;
userId: number;
teamId: number;
};
export const deleteTemplate = async ({ id, userId, teamId }: DeleteTemplateOptions) => {
const { envelopeWhereInput } = await getEnvelopeWhereInput({
id: {
type: 'templateId',
id,
},
id,
type: EnvelopeType.TEMPLATE,
userId,
teamId,