Files
sign/packages/trpc/server/team-router/delete-team-member-invitation-route.ts
2024-12-30 21:01:03 +11:00

30 lines
860 B
TypeScript

import { z } from 'zod';
import { deleteTeamMemberInvitations } from '@documenso/lib/server-only/team/delete-team-invitations';
import { authenticatedProcedure } from '../trpc';
export const ZDeleteTeamMemberInvitationsRequestSchema = z.object({
teamId: z.number(),
invitationIds: z.array(z.number()),
});
export const deleteTeamMemberInvitationRoute = authenticatedProcedure
// .meta({
// openapi: {
// method: 'POST',
// path: '/team/{teamId}/member/invite/delete',
// summary: 'Delete member invite',
// description: 'Delete a pending team member invite',
// tags: ['Teams'],
// },
// })
.input(ZDeleteTeamMemberInvitationsRequestSchema)
.output(z.unknown())
.mutation(async ({ input, ctx }) => {
return await deleteTeamMemberInvitations({
userId: ctx.user.id,
...input,
});
});