@@ -10,12 +10,15 @@ const fs = require('fs-extra');
1010
1111const createWebFormTemplate = async ( args ) => {
1212 //ds-snippet-start:WebForms1Step2
13+ //ds-snippet-start:WebForms2Step2
1314 const apiClient = new docusignEsign . ApiClient ( ) ;
1415 apiClient . setBasePath ( args . basePath ) ;
1516 apiClient . addDefaultHeader ( 'Authorization' , 'Bearer ' + args . accessToken ) ;
17+ //ds-snippet-end:WebForms2Step2
1618 //ds-snippet-end:WebForms1Step2
1719
1820 //ds-snippet-start:WebForms1Step3
21+ //ds-snippet-start:WebForms2Step3
1922 const templatesApi = new docusignEsign . TemplatesApi ( apiClient ) ;
2023
2124 const webFormsTemplates = await templatesApi . listTemplates ( args . accountId , {
@@ -25,6 +28,7 @@ const createWebFormTemplate = async (args) => {
2528 if ( webFormsTemplates . resultSetSize > 0 ) {
2629 return webFormsTemplates . envelopeTemplates [ 0 ] . templateId ;
2730 }
31+ //ds-snippet-end:WebForms2Step3
2832 //ds-snippet-end:WebForms1Step3
2933
3034 const templateReqObject = makeTemplate ( args ) ;
@@ -41,6 +45,7 @@ const createWebFormInstance = async (formId, args) => {
4145 apiClient . addDefaultHeader ( 'Authorization' , 'Bearer ' + args . accessToken ) ;
4246
4347 //ds-snippet-start:WebForms1Step4
48+ //ds-snippet-start:WebForms2Step4
4449 const webFormValues = {
4550 PhoneNumber : '555-555-5555' ,
4651 Yes : [ 'Yes' ] ,
@@ -59,11 +64,14 @@ const createWebFormInstance = async (formId, args) => {
5964 recipients : [ recipient ] ,
6065 sendOption : 'now' ,
6166 } ;
67+ //ds-snippet-end:WebForms2Step4
6268 //ds-snippet-end:WebForms1Step4
6369
6470 //ds-snippet-start:WebForms1Step5
71+ //ds-snippet-start:WebForms2Step5
6572 const formInstanceManagementApi = new docusignWebForms . FormInstanceManagementApi ( apiClient ) ;
6673 const webForm = await formInstanceManagementApi . createInstance ( createInstanceBody , args . accountId , formId ) ;
74+ //ds-snippet-end:WebForms2Step5
6775 //ds-snippet-end:WebForms1Step5
6876 return webForm ;
6977} ;
0 commit comments