diff --git a/ExamplesAPIType.cs b/ExamplesAPIType.cs
index 3755493a..ba05e560 100644
--- a/ExamplesAPIType.cs
+++ b/ExamplesAPIType.cs
@@ -67,6 +67,12 @@ public enum ExamplesApiType
/// ")]
[Description("mae")]
Maestro = 9,
+
+ ///
+ @Html.Raw(ViewBag.CodeExampleText.ExampleDescription) +
+ +@if (ViewBag.showDoc == true) +{ +Documentation about this example
+} + ++ @Html.Raw(@String.Format(ViewBag.SupportingTexts.ViewSourceFile, "CreateWorkspace.cs")) +
+ + diff --git a/launcher-csharp/Workspaces/Views/Work002AddDocumentToWorkspace/work002.cshtml b/launcher-csharp/Workspaces/Views/Work002AddDocumentToWorkspace/work002.cshtml new file mode 100644 index 00000000..6cf2646a --- /dev/null +++ b/launcher-csharp/Workspaces/Views/Work002AddDocumentToWorkspace/work002.cshtml @@ -0,0 +1,98 @@ +@{ + int formNumber = 0; + int documentNameInputNumber = 0; + int documentPathInputNumber = 1; + + string redirectToCodeExample = string.Format( + ViewBag.CodeExampleText.RedirectsToOtherCodeExamples[0].RedirectText, + string.Format("href=\"work00{0}\"", ViewBag.CodeExampleText.RedirectsToOtherCodeExamples[0].CodeExampleToRedirectTo) + ); + string helperText = string.Format( + ViewBag.SupportingTexts.HelpingTexts.SelectPDFFileFromFolder, + "code-examples-csharp/launcher-csharp/" + ); +} + ++ @Html.Raw(ViewBag.CodeExampleText.ExampleDescription) +
+ +@if (ViewBag.showDoc == true) +{ +Documentation about this example
+} + ++ @Html.Raw(@String.Format(ViewBag.SupportingTexts.ViewSourceFile, "AddDocumentToWorkspace.cs")) +
+ +@if (ViewBag.WorkspaceIdOk) +{ + + + +} +else +{ + @Html.Raw( + redirectToCodeExample + ) + + +} \ No newline at end of file diff --git a/launcher-csharp/Workspaces/Views/Work003SendEnvelopeWithRecipientInfo/work003.cshtml b/launcher-csharp/Workspaces/Views/Work003SendEnvelopeWithRecipientInfo/work003.cshtml new file mode 100644 index 00000000..aeea5119 --- /dev/null +++ b/launcher-csharp/Workspaces/Views/Work003SendEnvelopeWithRecipientInfo/work003.cshtml @@ -0,0 +1,85 @@ +@{ + int formNumber = 0; + int signerEmailInputNumber = 0; + int signerNameInputNumber = 1; + + string redirectToCodeExample = string.Format( + ViewBag.CodeExampleText.RedirectsToOtherCodeExamples[0].RedirectText, + string.Format("href=\"work00{0}\"", ViewBag.CodeExampleText.RedirectsToOtherCodeExamples[0].CodeExampleToRedirectTo) + ); + + string redirectToSecondCodeExample = string.Format( + ViewBag.CodeExampleText.RedirectsToOtherCodeExamples[1].RedirectText, + string.Format("href=\"work00{0}\"", ViewBag.CodeExampleText.RedirectsToOtherCodeExamples[1].CodeExampleToRedirectTo) + ); +} + ++ @Html.Raw(ViewBag.CodeExampleText.ExampleDescription) +
+ +@if (ViewBag.showDoc == true) +{ +Documentation about this example
+} + ++ @Html.Raw(@String.Format(ViewBag.SupportingTexts.ViewSourceFile, "SendEnvelopeWithRecipientInfo.cs")) +
+ +@if (ViewBag.WorkspaceIdOk == false) +{ + @Html.Raw( + redirectToCodeExample + ) + + +} +else if (ViewBag.DocumentIdOk == false) +{ + @Html.Raw( + redirectToSecondCodeExample + ) + + +} +else +{ + +} diff --git a/launcher-csharp/World_Wide_Corp_Web_Form.pdf b/launcher-csharp/World_Wide_Corp_Web_Form.pdf index d6b95276..b6af1fa0 100644 Binary files a/launcher-csharp/World_Wide_Corp_Web_Form.pdf and b/launcher-csharp/World_Wide_Corp_Web_Form.pdf differ diff --git a/launcher-csharp/eSignature/Controllers/AccountController.cs b/launcher-csharp/eSignature/Controllers/AccountController.cs index d87b9c93..5e1fe726 100644 --- a/launcher-csharp/eSignature/Controllers/AccountController.cs +++ b/launcher-csharp/eSignature/Controllers/AccountController.cs @@ -134,6 +134,10 @@ private string BuildConsentUrl() { scopes += " adm_store_unified_repo_read"; } + else if (apiType == ExamplesApiType.Workspaces) + { + scopes += " impersonation dtr.company.read dtr.rooms.read dtr.rooms.write dtr.documents.write"; + } return this.Configuration["DocuSign:AuthorizationEndpoint"] + "?response_type=code" + "&scope=" + scopes + diff --git a/launcher-csharp/eSignature/Models/ModelsToReadManifest/HelpingTexts.cs b/launcher-csharp/eSignature/Models/ModelsToReadManifest/HelpingTexts.cs index e8c4b97c..3ef3e0ba 100644 --- a/launcher-csharp/eSignature/Models/ModelsToReadManifest/HelpingTexts.cs +++ b/launcher-csharp/eSignature/Models/ModelsToReadManifest/HelpingTexts.cs @@ -64,5 +64,11 @@ public class HelpingTexts [JsonProperty("UserIDOfUserToDelete")] public string UserIDOfUserToDelete { get; set; } + + [JsonProperty("SelectPDFFileFromFolder")] + public string SelectPDFFileFromFolder { get; set; } + + [JsonProperty("SpecifyNameWithExtension")] + public string SpecifyNameWithExtension { get; set; } } } \ No newline at end of file diff --git a/launcher-csharp/launcher-csharp.csproj b/launcher-csharp/launcher-csharp.csproj index 5aab707d..98201836 100644 --- a/launcher-csharp/launcher-csharp.csproj +++ b/launcher-csharp/launcher-csharp.csproj @@ -42,7 +42,7 @@Prerequisite: Please create a workspace before running this example using Create a workspace.
" + } + ], + "Forms": [ + { + "Inputs": [ + { + "InputName": "Document name" + }, + { + "InputName": "Document path" + } + ] + } + ], + "ResultsPageText": "Document added! ID: {0}" + }, + { + "ExampleNumber": 3, + "ExampleName": "Send a Workspace Envelope with Recipient Info", + "ExampleDescription": "Sends a Workspace Envelope with Recipient Info", + "LinksToAPIMethod": [ + { + "Path": "https://developers.docusign.com/docs/workspaces-api/reference/workspaces/workspaces/createworkspaceenvelope/", + "PathName": "Workspaces:createWorkspaceEnvelope" + }, + { + "Path": "https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopes/update/", + "PathName": "Envelopes:update" + } + ], + "RedirectsToOtherCodeExamples": [ + { + "CodeExampleToRedirectTo": 1, + "RedirectText": "Prerequisite: Please create a workspace before running this example using Create a workspace.
" + }, + { + "CodeExampleToRedirectTo": 2, + "RedirectText": "Prerequisite: Please create a document in the workspace before running this example using Add a document to a Workspace.
" + } + ], + "Forms": [ + { + "Inputs": [ + { + "InputName": "Signer email" + }, + { + "InputName": "Signer name" + } + ] + } + ], + "ResultsPageText": "The workspace envelope has been created and sent!