Skip to content

Commit

Permalink
Ms.ds1003.10.20.2023 (microsoft#3050)
Browse files Browse the repository at this point in the history
* The 'summary' value goes over the character limit '80'. Shortened it.

* FLOW-292: witness "name" should not be displayed as a required field

* Don't show V2 in the deprecated version of create envelope using template

* FLOW-271: Power Automate: Unable to turn off and turn back on, a flow, that uses connect trigger

* Adding delete hook for v3 trigger

* FLOW-312 - Value property needs to be part the output field in Get envelope custom field action

* FLOW-338: template prefill : in create from template action , add support for email subject and body

* UI is added

* Phone and SMS recipients added to the solution

* Add all the signer properties to the output

* Add + to the trip character array

* Indendation fixed

* Implement feedback

* FLOW-343: update recipient action
* support SMS delivery
* support all recipient types

* remove the extra forward slash

* Implemented GetRecipientFields for all the recipient types

* Remove signers array

* Remove double referencing. Add signer object to an array

* remove the extra blank line

* FLOW-345: DocGen: Get document id given a document name

* Code optimization implemented

* UI of the GetTabValues

* Lower case the labels

* Updated the custom action title

* Updated the operationId

* Fix bug around no-match found

* Convert token to string before matching

* Get Tab Info method implementation added

* Validation added to check if tab label provided is missing

* UI is added. Script needs little work

* Removed the string conversion tabLabel

* able to output 1 tab

* FLOW-348: List Templates Action for Power Automate
Expose it , so that Microsoft's maker / c2 experience can leverage.

* Fix the meal db connector issue

* no message

* Working code generating output. The body data needs to be added

* Document details are returned

* FLOW-377: c2: Sender/Signer can create an envelope from a template using a variable for the template ID

* Add validation message

* Rewrite request url for /envelopes/createFromTemplateNoRecipients endpoint

* Operation Id updated

* Add the shortform to create array of objects

* Get template documents action added

* Updated the description

* Removed the x-ms-visibility property

* fixed the indendation

* FLOW-374: c2 get document tabs from envelope

* Update the schema for Tab with additional properties

* Recipient tabs test case added

* Add validation statement

* Removing the duplicate code

* UI fix

* Get template document tabs added

* ListEnvelopeDocumentFields custom action added

* Update UI

* FLOW-365: c2: update envelope prefill tabs

* Rename field identifier to match the internal names

* Fix description grammar

* Add a field to indicate whether a tab is prefill or not for the get action

* UI added

* FLOW-346: DocGen - Get merge fields

* UpdateRecipientTabs added

* Removed StaticResponse

* REmoved StaticResponseForTabTypesWithValues

* Remove the ms-visibility

* FLOW-347: DocGen: Update merge fields

* Add a check if the email token exists in the signer objects

* Optimize the if statement

* Bump the build number for C2/R2 release

* Add back the removed Meal DB/Readme.md file

* FLOW-392: Get document id action should return both id and guid

* Expose template id in the output of create envelope using template actions

* Add GetEnvelopeDocumentFields custom method

* Added delivery phone and SMS phone options

* formating the code

* convert template input to a template dropdown

* Rename actions to make it more readable for the user

* Update doc gen action name

* identiti verification added

* Fix typo in "List documents from an envelope" action name

* DS1002 R2 and C2 Release for DocuSign Connector
Porting changes from DocuSign Demo -> DocuSign Connector

* FLOW-427: Support "Transform PDF fields to DocuSign tabs" in Power Automate

* 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

* 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

* 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

* Additional properties fixed. DateTime formatted

* Added local time and additional properties

* rearranged the swagger definition

---------

Co-authored-by: Srihari Padmanabhan <[email protected]>
Co-authored-by: Srihari Padmanabhan <[email protected]>
Co-authored-by: Angel Garcia Reyes <[email protected]>
Co-authored-by: Mahbub Murshed <[email protected]>
  • Loading branch information
5 people authored Oct 31, 2023
1 parent 7bdd290 commit 616657c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 14 deletions.
22 changes: 15 additions & 7 deletions certified-connectors/DocuSign/script.csx
Original file line number Diff line number Diff line change
Expand Up @@ -2132,6 +2132,7 @@ public class Script : ScriptBase
var body = ParseContentAsJObject(await response.Content.ReadAsStringAsync().ConfigureAwait(false), false);
var query = HttpUtility.ParseQueryString(this.Context.Request.RequestUri.Query);
JObject newBody = new JObject();
TimeZoneInfo userTimeZone = TimeZoneInfo.Local;

JArray envelopes = (body["envelopes"] as JArray) ?? new JArray();
JArray filteredActivities = new JArray();
Expand Down Expand Up @@ -2169,6 +2170,8 @@ public class Script : ScriptBase

foreach (var envelope in envelopes)
{
DateTime statusUpdateTime = envelope["statusChangedDateTime"].ToObject<DateTime>();
DateTime statusUpdateTimeInLocalTimeZone = TimeZoneInfo.ConvertTimeFromUtc(statusUpdateTime, userTimeZone);
JArray recipientNames = new JArray();
System.Globalization.TextInfo textInfo = new System.Globalization.CultureInfo("en-US", false).TextInfo;
foreach (var recipient in (envelope["recipients"]["signers"] as JArray) ?? new JArray())
Expand All @@ -2178,16 +2181,16 @@ public class Script : ScriptBase

JObject additionalPropertiesForActivity = new JObject()
{
["Recipients"] = recipientNames,
["Owner"] = envelope["sender"]["userName"],
["Recipients"] = string.Join(", ", recipientNames),
["Sender Name"] = envelope["sender"]["userName"],
["Status"] = textInfo.ToTitleCase(envelope["status"].ToString()),
["Date"] = envelope["statusChangedDateTime"]
["Date"] = statusUpdateTimeInLocalTimeZone.ToString("h:mm tt, M/d/yy")
};
activities.Add(new JObject()
{
["title"] = envelope["emailSubject"],
["description"] = GetDescriptionNLPForRelatedActivities(envelope),
["dateTime"] = envelope["statusChangedDateTime"],
["dateTime"] = statusUpdateTimeInLocalTimeZone.ToString("h:mm tt, M/d/yy"),
["url"] = GetEnvelopeUrl(envelope),
["additionalProperties"] = additionalPropertiesForActivity,
});
Expand All @@ -2204,6 +2207,7 @@ public class Script : ScriptBase
var body = ParseContentAsJObject(await response.Content.ReadAsStringAsync().ConfigureAwait(false), false);
var query = HttpUtility.ParseQueryString(this.Context.Request.RequestUri.Query);
JObject newBody = new JObject();
TimeZoneInfo userTimeZone = TimeZoneInfo.Local;

JArray envelopes = (body["envelopes"] as JArray) ?? new JArray();
JArray filteredRecords = new JArray();
Expand Down Expand Up @@ -2241,6 +2245,9 @@ public class Script : ScriptBase

foreach (var envelope in envelopes)
{
DateTime statusUpdateTime = envelope["statusChangedDateTime"].ToObject<DateTime>();
DateTime statusUpdateTimeInLocalTimeZone = TimeZoneInfo.ConvertTimeFromUtc(statusUpdateTime, userTimeZone);
System.Globalization.TextInfo textInfo = new System.Globalization.CultureInfo("en-US", false).TextInfo;
JArray recipientNames = new JArray();
foreach (var recipient in (envelope["recipients"]["signers"] as JArray) ?? new JArray())
{
Expand All @@ -2249,9 +2256,10 @@ public class Script : ScriptBase

JObject additionalPropertiesForDocumentRecords = new JObject()
{
["Recipients"] = recipientNames,
["Owner"] = envelope["sender"]["userName"],
["Date"] = envelope["statusChangedDateTime"]
["Recipients"] = string.Join(", ", recipientNames),
["Sender Name"] = envelope["sender"]["userName"],
["Status"] = textInfo.ToTitleCase(envelope["status"].ToString()),
["Date"] = statusUpdateTimeInLocalTimeZone.ToString("h:mm tt, M/d/yy")
};

documentRecords.Add(new JObject()
Expand Down
22 changes: 15 additions & 7 deletions certified-connectors/DocuSignDemo/script.csx
Original file line number Diff line number Diff line change
Expand Up @@ -2132,6 +2132,7 @@ public class Script : ScriptBase
var body = ParseContentAsJObject(await response.Content.ReadAsStringAsync().ConfigureAwait(false), false);
var query = HttpUtility.ParseQueryString(this.Context.Request.RequestUri.Query);
JObject newBody = new JObject();
TimeZoneInfo userTimeZone = TimeZoneInfo.Local;

JArray envelopes = (body["envelopes"] as JArray) ?? new JArray();
JArray filteredActivities = new JArray();
Expand Down Expand Up @@ -2169,6 +2170,8 @@ public class Script : ScriptBase

foreach (var envelope in envelopes)
{
DateTime statusUpdateTime = envelope["statusChangedDateTime"].ToObject<DateTime>();
DateTime statusUpdateTimeInLocalTimeZone = TimeZoneInfo.ConvertTimeFromUtc(statusUpdateTime, userTimeZone);
JArray recipientNames = new JArray();
System.Globalization.TextInfo textInfo = new System.Globalization.CultureInfo("en-US", false).TextInfo;
foreach (var recipient in (envelope["recipients"]["signers"] as JArray) ?? new JArray())
Expand All @@ -2178,16 +2181,16 @@ public class Script : ScriptBase

JObject additionalPropertiesForActivity = new JObject()
{
["Recipients"] = recipientNames,
["Owner"] = envelope["sender"]["userName"],
["Recipients"] = string.Join(", ", recipientNames),
["Sender Name"] = envelope["sender"]["userName"],
["Status"] = textInfo.ToTitleCase(envelope["status"].ToString()),
["Date"] = envelope["statusChangedDateTime"]
["Date"] = statusUpdateTimeInLocalTimeZone.ToString("h:mm tt, M/d/yy")
};
activities.Add(new JObject()
{
["title"] = envelope["emailSubject"],
["description"] = GetDescriptionNLPForRelatedActivities(envelope),
["dateTime"] = envelope["statusChangedDateTime"],
["dateTime"] = statusUpdateTimeInLocalTimeZone.ToString("h:mm tt, M/d/yy"),
["url"] = GetEnvelopeUrl(envelope),
["additionalProperties"] = additionalPropertiesForActivity,
});
Expand All @@ -2204,6 +2207,7 @@ public class Script : ScriptBase
var body = ParseContentAsJObject(await response.Content.ReadAsStringAsync().ConfigureAwait(false), false);
var query = HttpUtility.ParseQueryString(this.Context.Request.RequestUri.Query);
JObject newBody = new JObject();
TimeZoneInfo userTimeZone = TimeZoneInfo.Local;

JArray envelopes = (body["envelopes"] as JArray) ?? new JArray();
JArray filteredRecords = new JArray();
Expand Down Expand Up @@ -2241,6 +2245,9 @@ public class Script : ScriptBase

foreach (var envelope in envelopes)
{
DateTime statusUpdateTime = envelope["statusChangedDateTime"].ToObject<DateTime>();
DateTime statusUpdateTimeInLocalTimeZone = TimeZoneInfo.ConvertTimeFromUtc(statusUpdateTime, userTimeZone);
System.Globalization.TextInfo textInfo = new System.Globalization.CultureInfo("en-US", false).TextInfo;
JArray recipientNames = new JArray();
foreach (var recipient in (envelope["recipients"]["signers"] as JArray) ?? new JArray())
{
Expand All @@ -2249,9 +2256,10 @@ public class Script : ScriptBase

JObject additionalPropertiesForDocumentRecords = new JObject()
{
["Recipients"] = recipientNames,
["Owner"] = envelope["sender"]["userName"],
["Date"] = envelope["statusChangedDateTime"]
["Recipients"] = string.Join(", ", recipientNames),
["Sender Name"] = envelope["sender"]["userName"],
["Status"] = textInfo.ToTitleCase(envelope["status"].ToString()),
["Date"] = statusUpdateTimeInLocalTimeZone.ToString("h:mm tt, M/d/yy")
};

documentRecords.Add(new JObject()
Expand Down

0 comments on commit 616657c

Please sign in to comment.