Skip to content

Commit 3afcf66

Browse files
committed
Various updates to C# UI for some code examples, also updates version of the Maestro SDK
1 parent 0370f9f commit 3afcf66

File tree

19 files changed

+62
-38
lines changed

19 files changed

+62
-38
lines changed

launcher-csharp/Admin/Controllers/CreateCLMESignUser.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ protected override void InitializeInternal()
106106

107107
//ds-snippet-start:Admin2Step3
108108
var productPermissionProfileApi = new ProductPermissionProfilesApi(apiClient);
109-
var productPermissionProfiles = productPermissionProfileApi.GetProductPermissionProfiles(organizationId, Guid.Parse(accountId));
109+
var productPermissionProfiles = productPermissionProfileApi.GetProductPermissionProfiles(organizationId.Value, Guid.Parse(accountId));
110110
this.ViewBag.CLMPermissionProfiles = productPermissionProfiles.ProductPermissionProfiles.Find(x => x.ProductName == "CLM").PermissionProfiles;
111111
this.ViewBag.ESignPermissionProfiles = productPermissionProfiles.ProductPermissionProfiles.Find(x => x.ProductName == "ESign").PermissionProfiles;
112112
clmProductId = productPermissionProfiles.ProductPermissionProfiles.Find(x => x.ProductName == "CLM").ProductId;

launcher-csharp/Admin/Controllers/DeleteUserDataFromAccount.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace DocuSign.CodeExamples.Admin.Controllers
1717
using Newtonsoft.Json;
1818

1919
[Area("Admin")]
20-
[Route("Aeg011")]
20+
[Route("aeg011")]
2121
public class DeleteUserDataFromAccount : EgController
2222
{
2323
public DeleteUserDataFromAccount(DsConfiguration config, LauncherTexts launcherTexts, IRequestItemsService requestItemsService)
@@ -27,7 +27,7 @@ public DeleteUserDataFromAccount(DsConfiguration config, LauncherTexts launcherT
2727
this.ViewBag.title = this.CodeExampleText.ExampleName;
2828
}
2929

30-
public override string EgName => "Aeg011";
30+
public override string EgName => "aeg011";
3131

3232
[MustAuthenticate]
3333
[SetViewBag]

launcher-csharp/Admin/Controllers/DeleteUserDataFromOrganization.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace DocuSign.CodeExamples.Admin.Controllers
1717
using Newtonsoft.Json;
1818

1919
[Area("Admin")]
20-
[Route("Aeg010")]
20+
[Route("aeg010")]
2121
public class DeleteUserDataFromOrganization : EgController
2222
{
2323
public DeleteUserDataFromOrganization(DsConfiguration config, LauncherTexts launcherTexts, IRequestItemsService requestItemsService)
@@ -27,7 +27,7 @@ public DeleteUserDataFromOrganization(DsConfiguration config, LauncherTexts laun
2727
this.ViewBag.title = this.CodeExampleText.ExampleName;
2828
}
2929

30-
public override string EgName => "Aeg010";
30+
public override string EgName => "aeg010";
3131

3232
[MustAuthenticate]
3333
[SetViewBag]

launcher-csharp/Maestro/Controllers/TriggerWorkflow.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ public ActionResult SubmitForm(WorkflowTriggerModel model)
150150
docuSignManageClient,
151151
accountId,
152152
new Uri(workflow.TriggerUrl),
153-
model);
153+
model,
154+
this.RequestItemsService.WorkflowId);
154155

155156
this.RequestItemsService.InstanceId = result.InstanceId;
156157

launcher-csharp/Maestro/Examples/TriggerWorkflowService.cs

+7-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@ public static string PublishWorkFlow(DocuSignClient docuSignClient, string accou
5050
}
5151
}
5252

53-
public static TriggerWorkflowViaPostResponse TriggerWorkflow(DocuSignClient docuSignClient, string accountId, Uri triggerUrl, WorkflowTriggerModel model)
53+
public static TriggerWorkflowViaPostResponse TriggerWorkflow(
54+
DocuSignClient docuSignClient,
55+
string accountId,
56+
Uri triggerUrl,
57+
WorkflowTriggerModel model,
58+
string workflowId)
5459
{
5560
//ds-snippet-start:Maestro1Step4
5661
var maestroApi = new WorkflowTriggerApi(docuSignClient);
@@ -76,7 +81,7 @@ public static TriggerWorkflowViaPostResponse TriggerWorkflow(DocuSignClient docu
7681
};
7782
//ds-snippet-end:Maestro1Step4
7883
//ds-snippet-start:Maestro1Step5
79-
return maestroApi.TriggerWorkflow(accountId, payload, options);
84+
return maestroApi.TriggerWorkflow(accountId, workflowId, payload, options);
8085
//ds-snippet-end:Maestro1Step5
8186
}
8287
}

launcher-csharp/Views/Home/Index.cshtml

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
Boolean.TryParse(ViewData["showDoc"].ToString(), out showDoc);//ViewBag.ShowDoc;
77
Layout = "_HomeLayout";
88
}
9-
<div class="jumbotron">
9+
<div class="jumbotron" style="background-color: #210058!important">
1010
<table>
1111
<tbody>
1212
<tr>
1313
<td>
14-
<h1 class="display-4">C# Launcher</h1>
14+
<h1 class="display-4" style="background-color: #210058!important">C# Launcher</h1>
1515
<p class="Xlead">
1616
@Html.Raw(ViewBag.SupportingTexts.HomePageText)
1717
</p>
1818
</td>
1919
<td>
20-
<img src="/images/banner-code.PNG" />
20+
<img src="/images/header.PNG" />
2121
</td>
2222
</tr>
2323
</tbody>

launcher-csharp/appsettings.example.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"AppUrl": "https://localhost:44333",
1616
"RoomsApiEndpoint": "https://demo.rooms.docusign.com",
1717
"AdminApiEndpoint": "https://api-d.docusign.net/management",
18-
"MaestroApiEndpoint": "https://demo.services.docusign.net/",
18+
"MaestroApiEndpoint": "https://apps-d.docusign.com/api/maestro",
1919
"WebFormsBasePath": "https://apps-d.docusign.com/api/webforms/v1.1",
2020
"CodeExamplesManifest": "https://raw.githubusercontent.com/docusign/code-examples-csharp/master/manifest/CodeExamplesManifest.json",
2121
"SignerEmail": "{SIGNER_EMAIL}",

launcher-csharp/eSignature/Controllers/RecipientAuthIDV.cs

+9
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ public RecipientAuthIdv(DsConfiguration config, LauncherTexts launcherTexts, IRe
2727
[SetViewBag]
2828
public IActionResult Create(string signerEmail, string signerName, string ccEmail, string ccName)
2929
{
30+
if (signerEmail == this.Config.SignerEmail)
31+
{
32+
this.ViewBag.errorCode = "400";
33+
this.ViewBag.errorMessage = this.LauncherTexts.ManifestStructure.SupportingTexts.IdenticalEmailsNotAllowedErrorMessage;
34+
this.ViewBag.SupportingTexts = this.LauncherTexts.ManifestStructure.SupportingTexts;
35+
36+
return this.View("Error");
37+
}
38+
3039
try
3140
{
3241
// Check the token with minimal buffer time.

launcher-csharp/eSignature/Controllers/RecipientAuthKBA.cs

+9
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ public RecipientAuthKba(DsConfiguration config, LauncherTexts launcherTexts, IRe
2626
[SetViewBag]
2727
public IActionResult Create(string signerEmail, string signerName)
2828
{
29+
if (signerEmail == this.Config.SignerEmail)
30+
{
31+
this.ViewBag.errorCode = "400";
32+
this.ViewBag.errorMessage = this.LauncherTexts.ManifestStructure.SupportingTexts.IdenticalEmailsNotAllowedErrorMessage;
33+
this.ViewBag.SupportingTexts = this.LauncherTexts.ManifestStructure.SupportingTexts;
34+
35+
return this.View("Error");
36+
}
37+
2938
// Check the token with minimal buffer time.
3039
bool tokenOk = this.CheckToken(3);
3140
if (!tokenOk)

launcher-csharp/eSignature/Controllers/RecipientAuthPhone.cs

+9
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ public RecipientAuthPhone(DsConfiguration config, LauncherTexts launcherTexts, I
2727
[SetViewBag]
2828
public IActionResult Create(string signerEmail, string signerName, string signerCountryCode, string signerPhoneNumber)
2929
{
30+
if (signerEmail == this.Config.SignerEmail)
31+
{
32+
this.ViewBag.errorCode = "400";
33+
this.ViewBag.errorMessage = this.LauncherTexts.ManifestStructure.SupportingTexts.IdenticalEmailsNotAllowedErrorMessage;
34+
this.ViewBag.SupportingTexts = this.LauncherTexts.ManifestStructure.SupportingTexts;
35+
36+
return this.View("Error");
37+
}
38+
3039
try
3140
{
3241
// Check the token with minimal buffer time.

launcher-csharp/eSignature/Models/ModelsToReadManifest/SupportingTexts.cs

+3
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ public class SupportingTexts
5050
[JsonProperty("ContactSupportToEnableFeature")]
5151
public string ContactSupportToEnableFeature { get; set; }
5252

53+
[JsonProperty("IdenticalEmailsNotAllowedErrorMessage")]
54+
public string IdenticalEmailsNotAllowedErrorMessage { get; set; }
55+
5356
[JsonProperty("LoginPage")]
5457
public LoginPage LoginPage { get; set; }
5558

launcher-csharp/eSignature/Views/Eg020SmsAuth/eg020.cshtml

+1-3
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@
5151
name="signerEmail"
5252
aria-describedby="emailHelp"
5353
placeholder="@ViewBag.CodeExampleText.Forms[formNumber].Inputs[emailInputNumber].InputPlaceholder"
54-
required
55-
value="@ViewBag.Locals.DsConfig.SignerEmail">
54+
required>
5655

5756
<small id="emailHelp" class="form-text text-muted">
5857
@Html.Raw(ViewBag.SupportingTexts.HelpingTexts.EmailWontBeShared)
@@ -68,7 +67,6 @@
6867
id="signerName"
6968
placeholder="@ViewBag.CodeExampleText.Forms[formNumber].Inputs[nameInputNumber].InputPlaceholder"
7069
name="signerName"
71-
value="@ViewBag.Locals.DsConfig.SignerName"
7270
required>
7371
</div>
7472

launcher-csharp/eSignature/Views/RecipientAuthIDV/eg023.cshtml

+1-5
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
</p>
2222

2323
<form class="eg" action="" method="post" data-busy="form">
24-
<p>@Html.Raw(ViewBag.CodeExampleText.Notes)</p>
25-
2624
<div class="form-group">
2725
<label for="signerEmail">
2826
@Html.Raw(ViewBag.CodeExampleText.Forms[formNumber].Inputs[signerEmailInputNumber].InputName)
@@ -34,8 +32,7 @@
3432
name="signerEmail"
3533
aria-describedby="emailHelp"
3634
placeholder="@ViewBag.CodeExampleText.Forms[formNumber].Inputs[signerEmailInputNumber].InputPlaceholder"
37-
required
38-
value="@ViewBag.Locals.DsConfig.SignerEmail">
35+
required>
3936

4037
<small id="emailHelp" class="form-text text-muted">
4138
@Html.Raw(ViewBag.SupportingTexts.HelpingTexts.EmailWontBeShared)
@@ -51,7 +48,6 @@
5148
id="signerName"
5249
placeholder="@ViewBag.CodeExampleText.Forms[formNumber].Inputs[signerNameInputNumber].InputPlaceholder"
5350
name="signerName"
54-
value="@ViewBag.Locals.DsConfig.SignerName"
5551
required />
5652
</div>
5753

launcher-csharp/eSignature/Views/RecipientAuthKBA/eg022.cshtml

+1-5
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
</p>
2222

2323
<form class="eg" action="" method="post" data-busy="form">
24-
<p>@Html.Raw(ViewBag.CodeExampleText.Notes)</p>
25-
2624
<div class="form-group">
2725
<label for="signerEmail">
2826
@Html.Raw(ViewBag.CodeExampleText.Forms[formNumber].Inputs[signerEmailInputNumber].InputName)
@@ -34,8 +32,7 @@
3432
name="signerEmail"
3533
aria-describedby="emailHelp"
3634
placeholder="@ViewBag.CodeExampleText.Forms[formNumber].Inputs[signerEmailInputNumber].InputPlaceholder"
37-
required
38-
value="@ViewBag.Locals.DsConfig.SignerEmail">
35+
required>
3936
<small id="emailHelp" class="form-text text-muted">
4037
@Html.Raw(ViewBag.SupportingTexts.HelpingTexts.EmailWontBeShared)
4138
</small>
@@ -50,7 +47,6 @@
5047
id="signerName"
5148
placeholder="@ViewBag.CodeExampleText.Forms[formNumber].Inputs[signerNameInputNumber].InputPlaceholder"
5249
name="signerName"
53-
value="@ViewBag.Locals.DsConfig.SignerName"
5450
required />
5551
</div>
5652
<input type="hidden" name="_csrf" value="<%- csrfToken %>">

launcher-csharp/eSignature/Views/RecipientAuthPhone/eg020.cshtml

+1-3
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@
6565
name="signerEmail"
6666
aria-describedby="emailHelp"
6767
placeholder="@ViewBag.CodeExampleText.Forms[formNumber].Inputs[signerEmailInputNumber].InputPlaceholder"
68-
required
69-
value="@ViewBag.Locals.DsConfig.SignerEmail">
68+
required>
7069

7170
<small id="emailHelp" class="form-text text-muted">
7271
@Html.Raw(ViewBag.SupportingTexts.HelpingTexts.EmailWontBeShared)
@@ -81,7 +80,6 @@
8180
id="signerName"
8281
placeholder="@ViewBag.CodeExampleText.Forms[formNumber].Inputs[signerNameInputNumber].InputPlaceholder"
8382
name="signerName"
84-
value="@ViewBag.Locals.DsConfig.SignerName"
8583
required />
8684
</div>
8785
<input type="hidden" name="_csrf" value="<%- csrfToken %>">

launcher-csharp/launcher-csharp.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<PackageReference Include="DocuSign.Click" Version="2.0.0-rc1" />
4141
<PackageReference Include="DocuSign.eSign.dll" Version="7.0.0-rc2" />
4242
<PackageReference Include="DocuSign.Monitor" Version="2.0.0-rc1" />
43-
<PackageReference Include="DocuSign.Maestro" Version="1.0.0-rc1" />
43+
<PackageReference Include="DocuSign.Maestro" Version="1.0.0-rc4" />
4444
<PackageReference Include="DocuSign.Rooms" Version="2.0.0-rc1" />
4545
<PackageReference Include="DocuSign.WebForms" Version="2.0.0-rc1" />
4646
<PackageReference Include="Microsoft.AspNetCore.Session" Version="2.2.0" />
-52.3 KB
Binary file not shown.
83.4 KB
Loading

manifest/CodeExamplesManifest.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"WelcomeText":"Welcome {0} (Account: {1})",
1515
"CFRError":"This example is not compatible with your CFR Part 11 account. Please return to the homepage to run one of the examples that is compatible or authenticate with a different account.",
1616
"ContactSupportToEnableFeature": "Please contact <a href=\"https://support.docusign.com/\">support</a> to enable {0} in your account",
17+
"IdenticalEmailsNotAllowedErrorMessage": "For recipient authentication you must specify a different recipient from the account owner (sender) in order to ensure recipient authentication is performed",
1718
"LoginPage":{
1819
"LoginHeader":"<h1 class='display-4'>Please Authenticate with Docusign</h1><label for='auth_type'>Please choose your authentication type</label>",
1920
"LoginButton":"Authenticate with Docusign",
@@ -187,7 +188,8 @@
187188
},
188189
{
189190
"InputName": "RSUs"
190-
} ]
191+
}
192+
]
191193
}
192194
],
193195
"ResultsPageText":"The envelope has been created and sent!<br />Envelope ID {0}."
@@ -1520,7 +1522,7 @@
15201522
"CFREnabled":"AllAccounts",
15211523
"ExampleName":"Send an envelope with ID Verification Authentication",
15221524
"ExampleDescription":"Submit an envelope that requires verification of a government issued identity.",
1523-
"Notes":"<p><b>Note:<b/> The access code for this example is the Signer Name.</p>",
1525+
"Notes":"<b>Note:</b> The access code for this example is the Signer Name.",
15241526
"LinksToAPIMethod":[
15251527
{
15261528
"Path":"https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopes/create/",
@@ -1554,7 +1556,7 @@
15541556
"CFREnabled":"AllAccounts",
15551557
"ExampleName":"Send an envelope with Recipient Knowledged Based Authentication",
15561558
"ExampleDescription":"Submit an envelope with multiple choice, public records based questions to provide multi-factor authentication.",
1557-
"Notes":"<p><b>Note:<b/> The access code for this example is the Signer Name.</p>",
1559+
"Notes":"<b>Note:</b> The access code for this example is the Signer Name.",
15581560
"LinksToAPIMethod":[
15591561
{
15601562
"Path":"https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopes/create/",
@@ -1886,7 +1888,7 @@
18861888
}
18871889
],
18881890
"ResultsPageText":"This value should match the value of your x-docusign-signature header: <br/>HMAC signature {0}",
1889-
"SkipForLanguages":"bash;powershell;java;php"
1891+
"SkipForLanguages":"bash;powershell"
18901892
}
18911893
]
18921894
}
@@ -2711,8 +2713,7 @@
27112713
]
27122714
}
27132715
],
2714-
"ResultsPageText":"Results from DataDeletion:redactIndividualMembershipData method:",
2715-
"SkipForLanguages":"java"
2716+
"ResultsPageText":"Results from DataDeletion:redactIndividualMembershipData method:"
27162717
},
27172718
{
27182719
"ExampleNumber":11,
@@ -2734,8 +2735,7 @@
27342735
]
27352736
}
27362737
],
2737-
"ResultsPageText":"Results from DataDeletion:redactIndividualUserData method:",
2738-
"SkipForLanguages":"java"
2738+
"ResultsPageText":"Results from DataDeletion:redactIndividualUserData method:"
27392739
},
27402740
{
27412741
"ExampleNumber":12,
@@ -2783,4 +2783,4 @@
27832783
]
27842784
}
27852785
]
2786-
}
2786+
}

0 commit comments

Comments
 (0)