I’m using the DocuSign Node.js package to create an envelope in my Next.js application. I have imported the necessary classes from DocuSign as:
import { ApiClient, EnvelopesApi, EnvelopeDefinition, TemplateRole } from 'docusign-esign';
But, it seems like I am unable to use the “EnvelopeDefinition” method. I have it as:
// Prepare the envelope details
const envelopeDefinition = new EnvelopeDefinition();
The issue I’m having is that I get the message; “'EnvelopeDefinition' only refers to a type, but is being used as a value here.” when try to initialize the envelope definition.
What am I doing wrong? Can someone please asssist?