@@ -9,15 +9,12 @@ const docusignWebForms = require('docusign-webforms');
99const fs = require ( 'fs-extra' ) ;
1010
1111const createWebFormTemplate = async ( args ) => {
12- //ds-snippet-start:WebForms1Step2
1312 //ds-snippet-start:WebForms2Step2
1413 const apiClient = new docusignEsign . ApiClient ( ) ;
1514 apiClient . setBasePath ( args . basePath ) ;
1615 apiClient . addDefaultHeader ( 'Authorization' , 'Bearer ' + args . accessToken ) ;
1716 //ds-snippet-end:WebForms2Step2
18- //ds-snippet-end:WebForms1Step2
1917
20- //ds-snippet-start:WebForms1Step3
2118 //ds-snippet-start:WebForms2Step3
2219 const templatesApi = new docusignEsign . TemplatesApi ( apiClient ) ;
2320
@@ -29,7 +26,6 @@ const createWebFormTemplate = async (args) => {
2926 return webFormsTemplates . envelopeTemplates [ 0 ] . templateId ;
3027 }
3128 //ds-snippet-end:WebForms2Step3
32- //ds-snippet-end:WebForms1Step3
3329
3430 const templateReqObject = makeTemplate ( args ) ;
3531 const template = await templatesApi . createTemplate ( args . accountId , {
@@ -44,7 +40,6 @@ const createWebFormInstance = async (formId, args) => {
4440 apiClient . setBasePath ( args . basePath ) ;
4541 apiClient . addDefaultHeader ( 'Authorization' , 'Bearer ' + args . accessToken ) ;
4642
47- //ds-snippet-start:WebForms1Step4
4843 //ds-snippet-start:WebForms2Step4
4944 const webFormValues = {
5045 PhoneNumber : '555-555-5555' ,
@@ -65,14 +60,11 @@ const createWebFormInstance = async (formId, args) => {
6560 sendOption : 'now' ,
6661 } ;
6762 //ds-snippet-end:WebForms2Step4
68- //ds-snippet-end:WebForms1Step4
6963
70- //ds-snippet-start:WebForms1Step5
7164 //ds-snippet-start:WebForms2Step5
7265 const formInstanceManagementApi = new docusignWebForms . FormInstanceManagementApi ( apiClient ) ;
7366 const webForm = await formInstanceManagementApi . createInstance ( createInstanceBody , args . accountId , formId ) ;
7467 //ds-snippet-end:WebForms2Step5
75- //ds-snippet-end:WebForms1Step5
7668 return webForm ;
7769} ;
7870
0 commit comments