mirror of
https://github.com/documenso/documenso.git
synced 2025-11-10 04:22:32 +10:00
## Description Introduces the ability for users with the **Assistant** role to prefill fields on behalf of other signers. Assistants can fill in various field types such as text, checkboxes, dates, and more, streamlining the document preparation process before it reaches the final signers. https://github.com/user-attachments/assets/c1321578-47ec-405b-a70a-7d9578385895
17 lines
332 B
TypeScript
17 lines
332 B
TypeScript
import { prisma } from '@documenso/prisma';
|
|
|
|
export interface GetRecipientByTokenOptions {
|
|
token: string;
|
|
}
|
|
|
|
export const getRecipientByToken = async ({ token }: GetRecipientByTokenOptions) => {
|
|
return await prisma.recipient.findFirstOrThrow({
|
|
where: {
|
|
token,
|
|
},
|
|
include: {
|
|
fields: true,
|
|
},
|
|
});
|
|
};
|