Skip to content

Commit ccef253

Browse files
sriharip-docusign94farhansaferoombizthomasio101johannesheesterman
authored
DocuSign Demo Connector : Fix 2 bugs (#2656)
* Fix merge conflicts * Move the login information code block to where it was * FLOW-200: IDV Workflow IDV is a mandatory field but flow saving without selecting Workflow IDV * Throw 400 BadRequest instead of InternalException to make the flow fail fast in case of user error * shorten the custom field suffix to allow for longer field names * Fix setting up phone authentication * FLOW-213: Merge sms related code changes from Angel * Change the field type of country code and phone number to integer * FLOW-225: Trigger do not work after connector upgrade from 2.0 to 2.1 xml parsing logic was missing * Port changes from Demo Connector to Prod Connector * FLOW-245: SMS authentication is missing in Add Verification Type to a recipient action * Insert a place holder instead of client id for the DocuSign Prod connector * Partner Center connector - new fields and deal registration actions (#2130) * Update apiDefinition.swagger.json * Latest changes * fix format warning * X-Caller_Id should be optional * Update apiDefinition.swagger.json Review changes - ->Added reg status and sub status fields. ->Update the fields descriptions as per api's details available on Microsoft public site. ->Remove submission related fields. ->Mark registration status field as read only. ->Remove offerId from root. ->Use Enum values in Create deal registration model. ->Create a separate model for update deal registration. Create a separate action for update deal registration. * Update apiDefinition.swagger.json * Update apiDefinition.swagger.json Add deprecate text in Update a referral by Id action * Update apiDefinition.swagger.json Connector status keep as Preview and UpdateReferralById deprecated keep as false but deprecated word in description. * Update apiDefinition.swagger.json update deal registration success message. * Update apiDefinition.swagger.json added title for registration object * FLOW-251: Add an action to get the deployed build number * Update the action name * Bitskout Connector (#2140) * Bitskout Connector * Requested changes * EC-14395 Make it so fields aren't required anymore for updates (#2150) * Added orderby parameter * Added orderby parameter * feat: add x-ms-pageable extension * feat: add updatenextlink policy instance * refactor: whitespace refactoring * Update apiProperties.json * fix(EC-14395): Integrate the patch schema endpoint * fix(EC-14395): Add specs for the schema endpoint's responses * fix(EC-14395): Add required fields to the schema Co-authored-by: Johannes Heesterman <johannes@elfsquad.io> Co-authored-by: johannesheesterman <heestermanj@gmail.com> Co-authored-by: Stan van Rooy <stanvanrooy6@gmail.com> * FLOW-270: Phone Authentication verification failing with INVALIDPHONENUMBERPROVIDED * FLOW-275 - Restore v1 Create Template Step and rename action names * FLOW-278: Get Envelope Custom Fields Step * Expose field id and name in the get envelope custom field step * FLOW-276: Update Envelope Custom Fields Step * Add envlope and click events * addressing feedback. Alignement fixed. Comments added on backward compatibility * Remove the duplicate event * Update the response schema to return just the custom field that got updated instead of the array * FLOW-282: Add unique tab label for all tab types * FLOW-294: Replace the dropdown for update ecf by text and deprecate v2 version of create from template action * 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 --------- Co-authored-by: Farhan <103836444+94farhan@users.noreply.github.com> Co-authored-by: saferoombiz <32263053+saferoombiz@users.noreply.github.com> Co-authored-by: Tess Ellenoir Duursma <thomasduursma@outlook.com> Co-authored-by: Johannes Heesterman <johannes@elfsquad.io> Co-authored-by: johannesheesterman <heestermanj@gmail.com> Co-authored-by: Stan van Rooy <stanvanrooy6@gmail.com> Co-authored-by: harshitav-docusign <118772192+harshitav-docusign@users.noreply.github.com> Co-authored-by: Harshita Vinnakota <harshita.vinnakota@docusign.com> Co-authored-by: Angel Garcia Reyes <105454462+angelga-docusign@users.noreply.github.com> Co-authored-by: Mahbub Murshed <48570820+mamurshe@users.noreply.github.com>
1 parent e48005a commit ccef253

File tree

2 files changed

+74
-21
lines changed

2 files changed

+74
-21
lines changed

certified-connectors/DocuSignDemo/apiDefinition.swagger.json

Lines changed: 35 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -387,12 +387,12 @@
387387
"type": "string"
388388
},
389389
{
390-
"name": "documentId",
390+
"name": "documentGuid",
391391
"in": "query",
392-
"description": "Document Id",
392+
"description": "Document Guid",
393393
"required": true,
394-
"x-ms-summary": "Document Id",
395-
"x-ms-test-value": "insert document id guid",
394+
"x-ms-summary": "Document Guid",
395+
"x-ms-test-value": "insert document guid",
396396
"type": "string"
397397
},
398398
{
@@ -693,7 +693,7 @@
693693
"/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/fields": {
694694
"get": {
695695
"summary": "Get envelope document custom fields",
696-
"description": "Get envelope document custom fields.",
696+
"description": "Get custom document fields of envelope document.",
697697
"operationId": "GetEnvelopeDocumentFields",
698698
"parameters": [
699699
{
@@ -998,14 +998,12 @@
998998
"consumes": [
999999
"application/json",
10001000
"text/json",
1001-
"application/xml",
10021001
"text/xml",
10031002
"application/x-www-form-urlencoded"
10041003
],
10051004
"produces": [
10061005
"application/json",
10071006
"text/json",
1008-
"application/xml",
10091007
"text/xml"
10101008
],
10111009
"parameters": [
@@ -1029,9 +1027,20 @@
10291027
"in": "query",
10301028
"description": "Template id",
10311029
"required": true,
1032-
"x-ms-summary": "Template id",
1030+
"x-ms-summary": "Template",
10331031
"x-ms-test-value": "insert template id",
10341032
"x-ms-visibility": "important",
1033+
"x-ms-dynamic-values": {
1034+
"operationId": "GetEnvelopeTemplates",
1035+
"parameters": {
1036+
"accountId": {
1037+
"parameter": "accountId"
1038+
}
1039+
},
1040+
"value-collection": "envelopeTemplates",
1041+
"value-path": "templateId",
1042+
"value-title": "name"
1043+
},
10351044
"type": "string"
10361045
},
10371046
{
@@ -3058,9 +3067,9 @@
30583067
},
30593068
"/accounts/{accountId}/envelopes/{envelopeId}/get_document_id": {
30603069
"get": {
3061-
"summary": "Get document id",
3062-
"description": "Get document id",
3063-
"operationId": "GetDocumentId",
3070+
"summary": "Get envelope document id",
3071+
"description": "Get envelope document id",
3072+
"operationId": "GetEnvelopeDocumentId",
30643073
"parameters": [
30653074
{
30663075
"name": "accountId",
@@ -4508,6 +4517,12 @@
45084517
"x-ms-summary": "Envelope Id",
45094518
"x-ms-visibility": "important"
45104519
},
4520+
"templateId": {
4521+
"description": "The id of the template.",
4522+
"type": "string",
4523+
"x-ms-summary": "Template Id",
4524+
"x-ms-visibility": "important"
4525+
},
45114526
"status": {
45124527
"description": "The status of the envelope.",
45134528
"type": "string",
@@ -5100,17 +5115,20 @@
51005115
"EnvelopeDocument": {
51015116
"type": "object",
51025117
"properties": {
5118+
"name": {
5119+
"description": "The name of the document.",
5120+
"type": "string",
5121+
"x-ms-summary": "Name"
5122+
},
51035123
"documentId": {
51045124
"description": "The id of the document.",
51055125
"type": "string",
5106-
"x-ms-summary": "Document Id",
5107-
"x-ms-visibility": "important"
5126+
"x-ms-summary": "Document Id"
51085127
},
5109-
"name": {
5110-
"description": "The name of the document.",
5128+
"documentIdGuid": {
5129+
"description": "The guid of the document.",
51115130
"type": "string",
5112-
"x-ms-summary": "Name",
5113-
"x-ms-visibility": "important"
5131+
"x-ms-summary": "Document Guid"
51145132
}
51155133
}
51165134
},

certified-connectors/DocuSignDemo/script.csx

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,7 +1475,7 @@ public class Script : ScriptBase
14751475
var body = ParseContentAsJArray(await this.Context.Request.Content.ReadAsStringAsync().ConfigureAwait(false), true);
14761476
var query = HttpUtility.ParseQueryString(this.Context.Request.RequestUri.Query);
14771477
var fieldList = new JArray();
1478-
var documentId = query.Get("documentId");
1478+
var documentId = query.Get("documentGuid");
14791479

14801480
foreach (var field in body)
14811481
{
@@ -1752,7 +1752,7 @@ public class Script : ScriptBase
17521752
this.Context.Request.RequestUri = uriBuilder.Uri;
17531753
}
17541754

1755-
if ("GetDocumentId".Equals(this.Context.OperationId, StringComparison.OrdinalIgnoreCase))
1755+
if ("GetEnvelopeDocumentId".Equals(this.Context.OperationId, StringComparison.OrdinalIgnoreCase))
17561756
{
17571757
var uriBuilder = new UriBuilder(this.Context.Request.RequestUri);
17581758
uriBuilder.Path = uriBuilder.Path.Replace("/get_document_id", "/documents");
@@ -1833,6 +1833,29 @@ public class Script : ScriptBase
18331833
body["workflowIds"] = workflowsArray;
18341834
response.Content = new StringContent(body.ToString(), Encoding.UTF8, "application/json");
18351835
}
1836+
1837+
if ("GetEnvelopeDocumentFields".Equals(this.Context.OperationId, StringComparison.OrdinalIgnoreCase))
1838+
{
1839+
var body = ParseContentAsJObject(await response.Content.ReadAsStringAsync().ConfigureAwait(false), false);
1840+
var query = HttpUtility.ParseQueryString(this.Context.Request.RequestUri.Query);
1841+
var newBody = new JObject();
1842+
JArray envelopeDocumentFields = new JArray();
1843+
1844+
foreach(JProperty documentFields in body.Properties())
1845+
{
1846+
foreach(var field in documentFields.Value)
1847+
{
1848+
envelopeDocumentFields.Add(new JObject()
1849+
{
1850+
["name"] = field["name"],
1851+
["value"] = field["value"]
1852+
});
1853+
}
1854+
}
1855+
1856+
newBody["envelopeDocumentFields"] = envelopeDocumentFields;
1857+
response.Content = new StringContent(newBody.ToString(), Encoding.UTF8, "application/json");
1858+
}
18361859

18371860
if ("GetEnvelopeDocumentTabs".Equals(this.Context.OperationId, StringComparison.OrdinalIgnoreCase))
18381861
{
@@ -2392,7 +2415,7 @@ public class Script : ScriptBase
23922415
response.Content = new StringContent(newBody.ToString(), Encoding.UTF8, "application/json");
23932416
}
23942417

2395-
if ("GetDocumentId".Equals(this.Context.OperationId, StringComparison.OrdinalIgnoreCase))
2418+
if ("GetEnvelopeDocumentId".Equals(this.Context.OperationId, StringComparison.OrdinalIgnoreCase))
23962419
{
23972420
var body = ParseContentAsJObject(await response.Content.ReadAsStringAsync().ConfigureAwait(false), false);
23982421
var query = HttpUtility.ParseQueryString(this.Context.Request.RequestUri.Query);
@@ -2403,7 +2426,8 @@ public class Script : ScriptBase
24032426
{
24042427
if (documentName.Equals(documentInfo["name"].ToString()))
24052428
{
2406-
newBody["documentId"] = documentInfo["documentIdGuid"];
2429+
newBody["documentId"] = documentInfo["documentId"];
2430+
newBody["documentIdGuid"] = documentInfo["documentIdGuid"];
24072431
newBody["name"] = documentInfo["name"];
24082432
break;
24092433
}
@@ -2417,6 +2441,17 @@ public class Script : ScriptBase
24172441
response.Content = new StringContent(newBody.ToString(), Encoding.UTF8, "application/json");
24182442
}
24192443

2444+
if ("CreateEnvelopeFromTemplateNoRecipients".Equals(this.Context.OperationId, StringComparison.OrdinalIgnoreCase) ||
2445+
"SendEnvelope".Equals(this.Context.OperationId, StringComparison.OrdinalIgnoreCase))
2446+
{
2447+
var body = ParseContentAsJObject(await response.Content.ReadAsStringAsync().ConfigureAwait(false), false);
2448+
var query = HttpUtility.ParseQueryString(this.Context.Request.RequestUri.Query);
2449+
var templateId = query.Get("templateId");
2450+
body["templateId"] = templateId;
2451+
2452+
response.Content = new StringContent(body.ToString(), Encoding.UTF8, "application/json");
2453+
}
2454+
24202455
if (response.Content?.Headers?.ContentType != null)
24212456
{
24222457
if ("GetDocuments".Equals(this.Context.OperationId, StringComparison.OrdinalIgnoreCase))

0 commit comments

Comments
 (0)