Skip to content

Commit f3e5250

Browse files
Backend part for care plans case (#8)
1 parent b748842 commit f3e5250

12 files changed

Lines changed: 244 additions & 5 deletions

File tree

DocuSign.Workspaces/DocuSign.Workspaces.sln.DotSettings.user

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
22
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAccountsApi_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fc5a0acb18b7542e28324415a109391b15bd200_003F25_003F2cfa9a24_003FAccountsApi_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
33
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AActionMethodExecutor_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Fdb7395f4add94e6d10e515b3e55373f2821f8323de7dc8e314d78feefacf5584_003FActionMethodExecutor_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
4+
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAddWorkspaceDocumentRequestFile_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F618474b3a7a24c07a172752f30df361467000_003F19_003Fca19d218_003FAddWorkspaceDocumentRequestFile_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
45
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAddWorkspaceDocumentRequest_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F618474b3a7a24c07a172752f30df361467000_003F98_003Fe9d6affe_003FAddWorkspaceDocumentRequest_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
56
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ACreateWorkspaceEnvelopeResponse_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F618474b3a7a24c07a172752f30df361467000_003F05_003F07035242_003FCreateWorkspaceEnvelopeResponse_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
67
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ACreateWorkspaceUploadRequestAssignment_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F618474b3a7a24c07a172752f30df361467000_003Fe4_003F72813357_003FCreateWorkspaceUploadRequestAssignment_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
@@ -19,6 +20,7 @@
1920
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AIWorkspacesApi_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F794c641b43b94a01a5d242cf8963ec4156e600_003F53_003F74bb8418_003FIWorkspacesApi_002Ecs_002Fz_003A5_002D4/@EntryIndexedValue">ForceIncluded</s:String>
2021
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AIWorkspacesApi_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fc5a0acb18b7542e28324415a109391b15bd200_003Fd0_003Fc96c3fd9_003FIWorkspacesApi_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
2122
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AIWorkspacesApi_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fd4f85be0744b49c9b2b64c94a22109f55b7a00_003Fc9_003Fda703158_003FIWorkspacesApi_002Ecs_002Fz_003A2_002D1/@EntryIndexedValue">ForceIncluded</s:String>
23+
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AIWorkspaceUsers_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F618474b3a7a24c07a172752f30df361467000_003F40_003Fc86a34fb_003FIWorkspaceUsers_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
2224
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ALazy_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F281a55f0808d96e0c82a7b55d3f43c7e4a4c22089db577da26c290b0153bc_003FLazy_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
2325
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ARecipients_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fc5a0acb18b7542e28324415a109391b15bd200_003Fbc_003F58ad24e0_003FRecipients_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
2426
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASDKConfig_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F618474b3a7a24c07a172752f30df361467000_003Fbe_003F1e66a60a_003FSDKConfig_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
@@ -34,6 +36,7 @@
3436
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AWorkspacesApi_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fc5a0acb18b7542e28324415a109391b15bd200_003Faa_003F7a505e4a_003FWorkspacesApi_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
3537
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AWorkspacesApi_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fc5a0acb18b7542e28324415a109391b15bd200_003Faa_003F7a505e4a_003FWorkspacesApi_002Ecs_002Fz_003A4_002D0/@EntryIndexedValue">ForceIncluded</s:String>
3638
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AWorkspaceUploadRequest_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F618474b3a7a24c07a172752f30df361467000_003F18_003F0e6b023c_003FWorkspaceUploadRequest_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
39+
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AWorkspaceUsers_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F618474b3a7a24c07a172752f30df361467000_003F0e_003F70a536ae_003FWorkspaceUsers_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
3740
<s:String x:Key="/Default/CodeInspection/Highlighting/AnalysisEnabled/@EntryValue">SOLUTION</s:String>
3841
<s:String x:Key="/Default/Environment/AssemblyExplorer/XmlDocument/@EntryValue">&lt;AssemblyExplorer&gt;
3942
&lt;Assembly Path="/Users/bohdanmoroz/.nuget/packages/docusign.iam.sdk/1.0.0-beta.6/lib/net8.0/Docusign.IAM.SDK.dll" /&gt;
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
using System.Collections.Generic;
2+
using System.Threading.Tasks;
3+
using DocuSign.Workspaces.Domain.CarePlans;
4+
using DocuSign.Workspaces.Domain.CarePlans.Model;
5+
using Microsoft.AspNetCore.Mvc;
6+
7+
namespace DocuSign.Workspaces.Controllers.CarePlans;
8+
9+
public class CarePlansController(ICarePlansService carePlansService) : Controller
10+
{
11+
[HttpGet]
12+
[Route("/api/care-plans/physicians")]
13+
public async Task<List<PhysicianModel>> GetPhysicians()
14+
{
15+
var physicians = await carePlansService.GetPhysician();
16+
return physicians;
17+
}
18+
19+
[HttpPost]
20+
[Route("/api/care-plans/submit-physician")]
21+
public async Task<List<CareDocumentsModel>> SubmitToPhysician([FromBody] SubmitToPhysiciansModel model)
22+
{
23+
var documents = await carePlansService.SubmitToPhysician(model);
24+
return documents;
25+
}
26+
}

DocuSign.Workspaces/DocuSign.Workspaces/DocuSign.Workspaces.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@
5656
</None>
5757
</ItemGroup>
5858

59-
<ItemGroup>
60-
<Folder Include="Controllers\WealthManagement\Models\" />
61-
</ItemGroup>
62-
6359
<Target Name="DebugEnsureNodeEnv" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' And !Exists('$(SpaRoot)node_modules') ">
6460
<!-- Ensure Node.js is installed -->
6561
<Exec Command="node --version" ContinueOnError="true">
Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using DocuSign.eSign.Model;
6+
using Docusign.IAM.SDK.Models.Components;
7+
using DocuSign.Workspaces.Domain.CarePlans.Model;
8+
using DocuSign.Workspaces.Infrastructure.Services.Interfaces;
9+
10+
namespace DocuSign.Workspaces.Domain.CarePlans;
11+
12+
public class CarePlansService(IDocuSignApiProvider docuSignApiProvider, IAppConfiguration appConfiguration, IAccountRepository accountRepository)
13+
: ICarePlansService
14+
{
15+
public async Task<List<PhysicianModel>> GetPhysician()
16+
{
17+
var physiciansWorkspaces = new List<PhysicianModel>();
18+
if (appConfiguration.DocuSign.TestAccountConnectionSettings.AccountId == accountRepository.AccountId)
19+
{
20+
List<string> physicians = ["Dr. Max Payne", "Dr. Angela Kerr", "Dr. Luke Heer"];
21+
var workspaces = await docuSignApiProvider.Workspace2.GetWorkspacesAsync(accountRepository.AccountId);
22+
if (workspaces.Workspaces != null || workspaces.Workspaces?.Count != 0)
23+
{
24+
var physician = workspaces.Workspaces
25+
?.Where(a => physicians.Contains(a.Name + " Workspace"))
26+
.Select(a => new PhysicianModel
27+
{
28+
Name = a.Name,
29+
WorkspaceId = a.WorkspaceId
30+
}).ToList();
31+
32+
if (physician?.Count == physicians.Count)
33+
{
34+
return physician;
35+
}
36+
}
37+
38+
foreach (var physician in physicians)
39+
{
40+
var workspaceBody = new CreateWorkspaceBody
41+
{
42+
Name = physician + " Workspace"
43+
};
44+
var workspace = await docuSignApiProvider.Workspace2.CreateWorkspaceAsync(accountRepository.AccountId, workspaceBody);
45+
physiciansWorkspaces.Add(new PhysicianModel
46+
{
47+
Name = physician,
48+
WorkspaceId = workspace.WorkspaceId
49+
});
50+
}
51+
}
52+
else
53+
{
54+
var workspaceBody = new CreateWorkspaceBody
55+
{
56+
Name = accountRepository.AccountName + " Workspace"
57+
};
58+
var workspace = await docuSignApiProvider.Workspace2.CreateWorkspaceAsync(accountRepository.AccountId, workspaceBody);
59+
physiciansWorkspaces.Add(new PhysicianModel
60+
{
61+
Name = accountRepository.AccountName,
62+
WorkspaceId = workspace.WorkspaceId
63+
});
64+
}
65+
66+
return physiciansWorkspaces;
67+
}
68+
69+
public async Task<List<CareDocumentsModel>> SubmitToPhysician(SubmitToPhysiciansModel model)
70+
{
71+
const string sentStatus = "Sent";
72+
var documents = new List<CareDocumentsModel>();
73+
foreach (var document in model.Documents)
74+
{
75+
if (document.IsForSignature)
76+
{
77+
var workspaceEnvelopeForCreate = new WorkspaceEnvelopeForCreate
78+
{
79+
EnvelopeName = document.Name
80+
};
81+
82+
var envelopeResponse = await docuSignApiProvider.Workspace2.CreateWorkspaceEnvelopeAsync(
83+
accountRepository.AccountId,
84+
model.Physician.WorkspaceId,
85+
workspaceEnvelopeForCreate);
86+
87+
var env = new EnvelopeDefinition
88+
{
89+
EnvelopeIdStamping = "true",
90+
EmailSubject = "Please Sign",
91+
EmailBlurb = "Sample text for email body",
92+
Status = sentStatus
93+
};
94+
95+
var doc1 = new Document
96+
{
97+
DocumentId = "1",
98+
Name = document.Name,
99+
DocumentBase64 = document.Base64String
100+
};
101+
102+
env.Documents = [doc1];
103+
var signHere1 = new SignHere
104+
{
105+
AnchorString = "/sn1/",
106+
AnchorUnits = "pixels",
107+
AnchorXOffset = "10",
108+
AnchorYOffset = "20",
109+
};
110+
111+
var signer1Tabs = new Tabs
112+
{
113+
SignHereTabs = [signHere1],
114+
};
115+
116+
var signer1 = new Signer
117+
{
118+
Name = model.Physician.Name,
119+
Email = "signerEmail@mail.com",
120+
RoutingOrder = "1",
121+
Status = "Created",
122+
DeliveryMethod = "Email",
123+
RecipientId = "1",
124+
Tabs = signer1Tabs
125+
};
126+
127+
var recipients = new Recipients
128+
{
129+
Signers = [signer1]
130+
};
131+
env.Recipients = recipients;
132+
133+
await docuSignApiProvider.EnvelopApi.UpdateDocumentsAsync(accountRepository.AccountId, envelopeResponse.EnvelopeId, env);
134+
135+
documents.Add(new CareDocumentsModel(document.Name, document.IsForSignature, sentStatus));
136+
}
137+
else
138+
{
139+
var documentRequest = new AddWorkspaceDocumentRequest
140+
{
141+
File = new AddWorkspaceDocumentRequestFile
142+
{
143+
Content = Convert.FromBase64String(document.Base64String),
144+
FileName = document.Name
145+
}
146+
};
147+
await docuSignApiProvider.WorkspaceDocuments.AddWorkspaceDocumentAsync(accountRepository.AccountId, model.Physician.WorkspaceId, documentRequest);
148+
149+
var userForCreate = new WorkspaceUserForCreate
150+
{
151+
Email = model.Email,
152+
FirstName = model.Physician.Name,
153+
LastName = ""
154+
};
155+
await docuSignApiProvider.WorkspaceUsers.AddWorkspaceUserAsync(accountRepository.AccountId, model.Physician.WorkspaceId, userForCreate);
156+
157+
documents.Add(new CareDocumentsModel(document.Name, document.IsForSignature, string.Empty));
158+
}
159+
}
160+
161+
return documents;
162+
}
163+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using System.Collections.Generic;
2+
using System.Threading.Tasks;
3+
using DocuSign.Workspaces.Domain.CarePlans.Model;
4+
using DocuSign.Workspaces.Domain.Workspaces.Models;
5+
6+
namespace DocuSign.Workspaces.Domain.CarePlans;
7+
8+
public interface ICarePlansService
9+
{
10+
Task<List<PhysicianModel>> GetPhysician();
11+
12+
Task<List<CareDocumentsModel>> SubmitToPhysician(SubmitToPhysiciansModel model);
13+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
namespace DocuSign.Workspaces.Domain.CarePlans.Model;
2+
3+
public record CareDocumentsModel(string Name, bool IsSigned, string Status);
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace DocuSign.Workspaces.Domain.CarePlans.Model;
2+
3+
public class PhysicianModel
4+
{
5+
public string Name { get; set; }
6+
public string WorkspaceId { get; set; }
7+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System.Collections.Generic;
2+
3+
namespace DocuSign.Workspaces.Domain.CarePlans.Model;
4+
5+
public class SubmitToPhysiciansModel
6+
{
7+
public string Email { get; set; }
8+
public IList<Document1> Documents { get; set; }
9+
public PhysicianModel Physician { get; set; }
10+
}
11+
12+
public class Document1
13+
{
14+
public string Base64String { get; set; }
15+
public string Name { get; set; }
16+
public bool IsForSignature { get; set; }
17+
}
18+

DocuSign.Workspaces/DocuSign.Workspaces/Domain/Workspaces/WealthManagementClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ private async Task<string> ProcessDocument(WorkspaceAddDocumentsModel createMode
5858

5959
var uploadRequestBody = new CreateWorkspaceUploadRequestBody
6060
{
61-
Name = envelopeName + " Upload",
61+
Name = envelopeName + " Upload " + Guid.NewGuid(),
6262
Description = "Description Test",
6363
DueDate = DateTime.Now,
6464
Status = WorkspaceUploadRequestStatus.Draft,

DocuSign.Workspaces/DocuSign.Workspaces/Infrastructure/Services/DocuSignApiProvider.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ public class DocuSignApiProvider : IDocuSignApiProvider
1919
private Lazy<IAccountsApi> _accountsApi => new (() => new AccountsApi(_apiClient.Value));
2020
private Lazy<IWorkspaces2> _workspace2;
2121
private Lazy<IWorkspaceUploadRequest> _workspaceUploadRequest;
22+
private Lazy<IWorkspaceDocuments> _workspaceDocuments;
23+
private Lazy<IWorkspaceUsers> _workspaceUsers;
2224

2325
private Lazy<DocuSignClient> _apiClient => new (() => _docuSignClientsFactory.BuildDocuSignApiClient());
2426
private Lazy<HttpClient> _docuSignHttpClient => new (() => _docuSignClientsFactory.BuildHttpClient());
@@ -28,6 +30,8 @@ public DocuSignApiProvider(IDocuSignClientsFactory docuSignClientsFactory)
2830
{
2931
_workspace2 = new Lazy<IWorkspaces2>(() => new Workspaces2(_docusingSdkConfig.Value));
3032
_workspaceUploadRequest = new Lazy<IWorkspaceUploadRequest>(() => new WorkspaceUploadRequest(_docusingSdkConfig.Value));
33+
_workspaceDocuments = new Lazy<IWorkspaceDocuments>(() => new WorkspaceDocuments(_docusingSdkConfig.Value));
34+
_workspaceUsers = new Lazy<IWorkspaceUsers>(() => new WorkspaceUsers(_docusingSdkConfig.Value));
3135
_docuSignClientsFactory = docuSignClientsFactory;
3236
}
3337

@@ -38,6 +42,8 @@ public DocuSignApiProvider(IDocuSignClientsFactory docuSignClientsFactory)
3842
public DocuSignClient ApiClient => _apiClient.Value;
3943
public IWorkspaces2 Workspace2 => _workspace2.Value;
4044
public IWorkspaceUploadRequest WorkspaceUploadRequest => _workspaceUploadRequest.Value;
45+
public IWorkspaceDocuments WorkspaceDocuments => _workspaceDocuments.Value;
46+
public IWorkspaceUsers WorkspaceUsers => _workspaceUsers.Value;
4147

4248
public HttpClient DocuSignHttpClient => _docuSignHttpClient.Value;
4349
}

0 commit comments

Comments
 (0)