docusign-package

1.0.1 • Public • Published

npm-package

A brief description of what this project does and who it's for

Installation

Install our package with npm

  npm install npm-package

Usage/Examples

import DsJwtAuth from 'docusign-package'

const obj={
    integrationKey:"",
    userId:""
}

async function handler() {
  const JwtAuth = await new DsJwtAuth(obj)
}
async function getToken() {
  const JwtAuth = await new DsJwtAuth(obj)
  const response = await JwtAuth.getToken()
}
const payload={
    dsReturnUrl:"http://localhost:3000/callback",
    signerEmail:"test@gmail.com",
    signerName:"lorem ipsum",
    emailSubject:"subject here",
    signerClientId:1000,
    status:'sent',
    outputFileName:"lorem ipsum", 
    docName:'document.docx',
    tabValues:{
        "eSignName": {
            "tabLabel": "Name",
            "tabId": "eSignName",
            "anchorString": "/f01/",
            "value": "lorem ipsum"
        },
        "eSignEmailAddress": {
            "tabLabel": "E-mail address",
            "tabId": "eSignEmailAddress",
            "anchorString": "/f02/",
            "value": "test@gmail.com"
        },
        "eSignName": {
            "tabLabel": "Project Name",
            "tabId": "eSignNameOfInvestor",
            "anchorString": "/f03/",
            "value": "lorem ipsum"
        },
    }
}
async function createEnvelope() {
  const JwtAuth = await new DsJwtAuth(obj)
  const response = await JwtAuth.createEnvelope(payload)
}
const templateRoles=[
    {
      roleName: 'Signer',           // Role name as defined in the template
      name: 'lorem ipsum',       // Recipient's name
      email: 'test@gmail.com', // Recipient's email
      roleName: 'Signer',
      authenticationMethod: 'None',
      tabs: {
        textTabs: [
          {
            tabLabel: 'T01',
            value: 'lorem ipsum',
          },
          {
            tabLabel: 'T02',
            value: 'lorem ipsum',
          },
        ],
      },
    },
    // Add more recipients and roles as needed
]

async function createTemplateWithEnvelope() {
  const JwtAuth = await new DsJwtAuth(obj)
  const response = await JwtAuth.createTemplateWithEnvelope(templateName,templateRoles)
}

Readme

Keywords

none

Package Sidebar

Install

npm i docusign-package

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

1.71 MB

Total Files

35

Last publish

Collaborators

  • jayeshberani