From 9e2f5e0ff13c6a955320653e54c9a3efc2b4c09c Mon Sep 17 00:00:00 2001 From: inbargazit Date: Thu, 22 Feb 2024 11:56:17 -0800 Subject: [PATCH 1/4] Fixing date format in listEnvelopes.js --- lib/eSignature/examples/listEnvelopes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/eSignature/examples/listEnvelopes.js b/lib/eSignature/examples/listEnvelopes.js index 0a031697..499914d5 100644 --- a/lib/eSignature/examples/listEnvelopes.js +++ b/lib/eSignature/examples/listEnvelopes.js @@ -32,7 +32,7 @@ const listEnvelope = async (args) => { // a set of envelopeIds. Here we filter using a from_date. // Here we set the from_date to filter envelopes for the last month // Use ISO 8601 date format - let options = { fromDate: moment().subtract(30, 'days').format() }; + let options = { fromDate: moment().subtract(30, 'days').format('YYYY-MM-DD') }; // Exceptions will be caught by the calling function //ds-snippet-start:eSign3Step2 From 3dd59618454f0741cf2951a99e5459c451cc8a82 Mon Sep 17 00:00:00 2001 From: inbargazit Date: Wed, 13 Mar 2024 11:49:41 -0700 Subject: [PATCH 2/4] Updating comments --- lib/eSignature/examples/embeddedSending.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/lib/eSignature/examples/embeddedSending.js b/lib/eSignature/examples/embeddedSending.js index e493358a..f081e638 100644 --- a/lib/eSignature/examples/embeddedSending.js +++ b/lib/eSignature/examples/embeddedSending.js @@ -19,12 +19,13 @@ const sendEnvelopeUsingEmbeddedSending = async (args) => { // args.accountId // args.startingView -- 'recipient' or 'tagging' + //ds-snippet-start:eSign11Step2 let dsApiClient = new docusign.ApiClient(); dsApiClient.setBasePath(args.basePath); dsApiClient.addDefaultHeader('Authorization', 'Bearer ' + args.accessToken); let envelopesApi = new docusign.EnvelopesApi(dsApiClient); - // Step 1. Make the envelope with "created" (draft) status + // Step 2. Make the envelope with "created" (draft) status args.envelopeArgs.status = 'created'; // We want a draft envelope let envelope = makeEnvelope(args.envelopeArgs); @@ -33,8 +34,10 @@ const sendEnvelopeUsingEmbeddedSending = async (args) => { envelopeDefinition: envelope, }); let envelopeId = results.envelopeId; - - // Step 2. create the sender view + //ds-snippet-end:eSign11Step2 + + // Step 3. create the sender view + //ds-snippet-start:eSign11Step3 let viewRequest = makeSenderViewRequest(args.envelopeArgs); // Call the CreateSenderView API // Exceptions will be caught by the calling function @@ -44,6 +47,7 @@ const sendEnvelopeUsingEmbeddedSending = async (args) => { // Switch to Recipient and Documents view if requested by the user let url = results.url; + //ds-snippet-end:eSign11Step3 console.log(`startingView: ${args.startingView}`); if (args.startingView === 'recipient') { url = url.replace('send=1', 'send=0'); @@ -52,6 +56,7 @@ const sendEnvelopeUsingEmbeddedSending = async (args) => { return { envelopeId: envelopeId, redirectUrl: url }; }; +//ds-snippet-start:eSign11Step3 function makeSenderViewRequest(args) { let viewRequest = new docusign.ReturnUrlRequest(); // Data for this method @@ -62,7 +67,9 @@ function makeSenderViewRequest(args) { viewRequest.returnUrl = args.dsReturnUrl; return viewRequest; } - +//ds-snippet-end:eSign11Step3 + +//ds-snippet-start:eSign11Step2 function makeEnvelope(args) { // Data for this method // args.signerEmail @@ -219,5 +226,6 @@ function document1(args) { `; } - +//ds-snippet-end:eSign11Step2 + module.exports = { sendEnvelopeUsingEmbeddedSending }; From 1f0e3d4499ba2f0e9995f27dddcf76c8d51c8fb6 Mon Sep 17 00:00:00 2001 From: inbargazit Date: Wed, 13 Mar 2024 15:11:06 -0700 Subject: [PATCH 3/4] Fixing issue #58 --- package-lock.json | 9 ++++----- package.json | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 21cccffb..dd914e13 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "docusign-esign": "^6.4.0", "docusign-monitor": "^2.1.0", "docusign-rooms": "^2.0.0", - "docusign-webforms": "^1.0.2-rc11", + "docusign-webforms": "^1.0.0", "ejs": "^3.1.9", "express": "^4.18.2", "express-flash": "0.0.2", @@ -1248,10 +1248,9 @@ } }, "node_modules/docusign-webforms": { - "version": "1.0.2-rc11", - "resolved": "file:docusign-webforms-1.0.2-rc11.tgz", - "integrity": "sha512-MA2aPRRjXNMiXNzKEyrurrmG8czGyEAeMvKkEaKhmxkw/oBmfY/mnnIb0jRynx3LSqTPIqlPfa3FsuLKbyhGmg==", - "license": "MIT", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/docusign-webforms/-/docusign-webforms-1.0.0.tgz", + "integrity": "sha512-ZvVvMhws7z8xGt62I1dPE8End2Wu6cDpCWghzQaBfkfuexKmBPHRvttV48aex+etoK53XkNMubtusWRniZbraQ==", "dependencies": { "csv-stringify": "^1.0.0", "jsonwebtoken": "^9.0.0", diff --git a/package.json b/package.json index 8be46f20..d70cc037 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "docusign-esign": "^6.4.0", "docusign-monitor": "^2.1.0", "docusign-rooms": "^2.0.0", - "docusign-webforms": "^1.0.2-rc11", + "docusign-webforms": "^1.0.0", "ejs": "^3.1.9", "express": "^4.18.2", "express-flash": "0.0.2", From f20a8864ba7184f4d357d37050d411dd2a55d14a Mon Sep 17 00:00:00 2001 From: Raileen Del Rosario Date: Fri, 5 Apr 2024 11:04:25 -0700 Subject: [PATCH 4/4] fixing the source code link for focused view --- lib/eSignature/controllers/eg044FocusedView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/eSignature/controllers/eg044FocusedView.js b/lib/eSignature/controllers/eg044FocusedView.js index 725295ca..12b032bf 100644 --- a/lib/eSignature/controllers/eg044FocusedView.js +++ b/lib/eSignature/controllers/eg044FocusedView.js @@ -102,7 +102,7 @@ eg044FocusedView.getController = async (req, res) => { csrfToken: req.csrfToken(), example: example, sourceFile: path.basename(__filename), - sourceUrl: "https://github.com/docusign/code-examples-node/blob/master/embeddedSigning.js", + sourceUrl: "https://github.com/docusign/code-examples-node/blob/master/lib/eSignature/examples/focusedView.js", documentation: dsConfig.documentation + eg, showDoc: dsConfig.documentation, });