Skip to content

Commit f8c2e89

Browse files
harshitav-docusignsriharip-docusignyoungl-docusign
authored
DS October 2024 release Ms.ds1007.9.5.2024.demo (microsoft#3662)
* FLOW-427: Support "Transform PDF fields to DocuSign tabs" in Power Automate * Updated the text and rearranged the Signature type position * Add signatureType implementation * modularize the signatureType block * Optimized code * REmoved enum * recipient events are added to V3 connect * Fix SMS issue * Add tooltip * Fixing DS EU Qualified signature type * Added support to checkbox and radio button * Checkbox and radio button code added to trigger * Enable COC added on selecting Combined option * rename the sataticSchema definition * String replace fixed * Add checkbox and radio button to the tabs output * zip header added * Removed statis response for certificate * Removed Log Information * Sales copilot custom actions are added * Update title with lower case * Sales copilot custom actions are added (cherry picked from commit 90c0601) * Update title with lower case (cherry picked from commit 9b6111c) * Release candidate DS1003 created * Build number updated * CRMOrgUrl issue fixed. Displaying records in the descending order. recordId filtering fixed * recordId and OrgURL is fixed. Descending order of the activities implemented * renamed activities and documentsRecords to follow camelcase naming pattern * Recipient names as array. Status to TitleCase. DocumentNLP formatting * DocumentNaturalLanguage reformatted * cherry picking from harshita devMerge pull request #37 from harshitav-docusign/BugBashFixes SalesCopilot: Recipient names as array. Status to TitleCase. DocumentNLP formatting * Merged bug fixesMerge pull request #36 from harshitav-docusign/recordId_issue RecordId and OrgUrl filters fixed. Activities and Records render latest first * Merge pull request #37 from harshitav-docusign/BugBashFixes SalesCopilot: Recipient names as array. Status to TitleCase. DocumentNLP formatting * Adding back PPDF tranformation fields * Fix spacing issues * Transfering DocuSign demo code to DocuSign prod connector * Porting changes from DocuSign demo dev to MSFlow.DS1003.10.17.2023 * Fix the title and description specific to Prod * Fix swagger errors. Remove envelope Id from the description * Corrected the swagger. Removed envelopeId from responseMerge pull request #38 from harshitav-docusign/swagger_updates Fixed swagger errors. Remove envelope Id from the description * removed merge conflicts * Update DocumentId to Output Format * Additional properties fixed. DateTime formatted * Additional properties fixed. DateTime formatted * Added local time and additional properties * Add reminders code added * remove ms-test-value * Add response * corrected the spelling error * Lock functionality added * Removed the text tab lock and added lock to all the tabs * Add optional property for the tab * Added recipient Type to the output of the get recipient info * Modify the default date to older date * Saleforce support is added to copilot * Add the error handling * Increment build number * Flow-512-b * Embedded recipient type feature added * Remove remote option * convert to string * string conversion implemented * label name updated * remove the AddParam method * Add entityLogicName * migrating DocuSign demo connector code to DocuSign connector * Update swagger file metadata * Void envelope added * Resend custom action added * Get recipient information added * Required output added * Documents added * Remove the Max payload exceed messaging * Remove changes in the DocuSign folder * Flow-532 * Filters working for most of the cases * Working for status, emailid * remove debuggin lines * Implemented sorting order, Skip and top, folder-Ids * updated the description * Added expiry after in the Add reminder for envelope * Added custom field support * Fixed indendation * Add custom name search field * correct the customFieldName * correct the spell error * Bunmping the release number * Prod branch for DS1006 release created * correct the host name * Update the description * Branding update added * Resend envelope AI enabled * ListEnvelope for sales copilot added * Migrated code from demo to Prod * Undo prod related texts * spell corrections * Update spelling error * fixed the if case at filteredEnvelopes * Remove extra brackets * to and from Date propertiews updates. Resend automatically picks up the Account id * Key sales custom action added * Email summary added * update the connector description to be within character limit. * Prod code updated * Update description of the demo connector. * Descriptions updated to related activities and records * Email summary and Key sales info are tested to be working * Update the description * Update background color to white * swagger updates are made and protocol is filtered for crmOrgURL * Update the description * Check for forward slash and update the parameter * Add recipientGuid. Add TabInfo in the tabs * add decline tab to add tabs action * support all tab types * Read hostURL from the context * Rename the host url methods and optimise the GetEnvelopeURL code * Renaming variables * UpdateDSDemoDescription * Upgrade the version number * FLOW-198 suuport all tab types * remove unused array * FLOW-20 Apply a template * Fix sales copilot Email Summary issue * Updated the description of List envelopes * Hostname changes ported from Prod connector * Update the end date description * FLOW-623 numerical tab field update * FLOW-623 update numerical value field label * FLOW-629 document ID field added to Checkbox groups * get tab info action does not support tab groups * Update the spelling of the associated word --------- Co-authored-by: Srihari Padmanabhan <srihari.padmanabhan@docusign.com> Co-authored-by: Srihari Padmanabhan <90345666+sriharip-docusign@users.noreply.github.com> Co-authored-by: Young Seok Lee <young.lee@docusign.com>
1 parent 63ef7fa commit f8c2e89

File tree

3 files changed

+2306
-207
lines changed

3 files changed

+2306
-207
lines changed

certified-connectors/DocuSign/script.csx

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ public class Script : ScriptBase
298298
response["schema"]["properties"]["Build Number"] = new JObject
299299
{
300300
["type"] = "string",
301-
["x-ms-summary"] = "DS1006"
301+
["x-ms-summary"] = "DS1007"
302302
};
303303
}
304304

@@ -1322,14 +1322,7 @@ public class Script : ScriptBase
13221322

13231323
if (returnUrl.Equals("DocuSign homepage"))
13241324
{
1325-
if (url.Equals("demo.docusign.net"))
1326-
{
1327-
body["returnUrl"] = "https://appdemo.docusign.com/";
1328-
}
1329-
else
1330-
{
1331-
body["returnUrl"] = "https://app.docusign.com/";
1332-
}
1325+
body["returnUrl"] = GetDocusignApiBaseUri();
13331326
}
13341327
else
13351328
{
@@ -1471,13 +1464,42 @@ public class Script : ScriptBase
14711464
private string GetEnvelopeUrl(JToken envelope)
14721465
{
14731466
var uriBuilder = new UriBuilder(this.Context.Request.RequestUri);
1474-
var envelopeUrl = uriBuilder.Uri.ToString().Contains("demo") ?
1475-
"https://apps-d.docusign.com/send/documents/details/" + envelope["envelopeId"] :
1476-
"https://app.docusign.com/documents/details/" + envelope["envelopeId"];
1467+
1468+
var path = uriBuilder.Uri.ToString().Contains("demo") || uriBuilder.Uri.ToString().Contains("stage") ?
1469+
"/send/documents/details/" : "/documents/details/";
1470+
var envelopeUrl = GetDocusignApiBaseUri() + path + envelope["envelopeId"];
14771471

14781472
return envelopeUrl;
14791473
}
14801474

1475+
private string GetDocusignApiBaseUri()
1476+
{
1477+
var host = this.Context.Request.RequestUri.Host.ToLower();
1478+
var docusignApiBaseUri = host.Contains("demo") ?
1479+
"https://apps-d.docusign.com"
1480+
: host.Contains("stage") ?
1481+
"https://apps-s.docusign.com"
1482+
: host.Contains(".mil") ?
1483+
"https://app.docusign.mil"
1484+
: "https://app.docusign.com";
1485+
1486+
return docusignApiBaseUri;
1487+
}
1488+
1489+
private string GetAccountServerBaseUri()
1490+
{
1491+
var host = this.Context.Request.RequestUri.Host.ToLower();
1492+
var accountServerBaseUri = host.Contains("demo") ?
1493+
"https://account-d.docusign.com"
1494+
: host.Contains("stage") ?
1495+
"https://account-s.docusign.com"
1496+
: host.Contains(".mil") ?
1497+
"https://account.docusign.mil"
1498+
: "https://account.docusign.com";
1499+
1500+
return accountServerBaseUri;
1501+
}
1502+
14811503
private void AddCoreRecipientParams(JArray signers, JObject body)
14821504
{
14831505
var query = HttpUtility.ParseQueryString(this.Context.Request.RequestUri.Query);
@@ -1738,7 +1760,7 @@ public class Script : ScriptBase
17381760
private async Task UpdateApiEndpoint()
17391761
{
17401762
string content = string.Empty;
1741-
using var userInfoRequest = new HttpRequestMessage(HttpMethod.Get, "https://account.docusign.com/oauth/userinfo");
1763+
using var userInfoRequest = new HttpRequestMessage(HttpMethod.Get, GetAccountServerBaseUri() + "/oauth/userinfo");
17421764

17431765
// Access token is in the authorization header already
17441766
userInfoRequest.Headers.Authorization = this.Context.Request.Headers.Authorization;

0 commit comments

Comments
 (0)