backend: updated packages version
This commit is contained in:
parent
36d914724d
commit
e11fc2ff79
@ -53,7 +53,9 @@ public static class JsonWebToken
|
||||
|
||||
private static (IJsonSerializer, IJwtAlgorithm, IBase64UrlEncoder) GetSettings(bool baseSerializer = false)
|
||||
{
|
||||
#pragma warning disable CS0618 // Type or member is obsolete
|
||||
return (baseSerializer ? (IJsonSerializer)new JsonNetSerializer() : new JwtSerializer(), new HMACSHA256Algorithm(), new JwtBase64UrlEncoder());
|
||||
#pragma warning restore CS0618 // Type or member is obsolete
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="MailKit" Version="3.1.1" />
|
||||
<PackageReference Include="MailKit" Version="3.2.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.4" />
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.1" />
|
||||
|
@ -21,7 +21,7 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AppLimit.CloudComputing.SharpBox" Version="1.2.0.1" />
|
||||
<PackageReference Include="Box.V2.Core" Version="4.3.1" />
|
||||
<PackageReference Include="DocuSign.eSign.dll" Version="4.4.1" />
|
||||
<PackageReference Include="DocuSign.eSign.dll" Version="5.10.0" />
|
||||
<PackageReference Include="Dropbox.Api" Version="6.27.0" />
|
||||
<PackageReference Include="Google.Apis.Drive.v3" Version="1.57.0.2663" />
|
||||
<PackageReference Include="Grpc.Tools" Version="2.45.0">
|
||||
|
@ -181,10 +181,10 @@ public class DocuSignHelper
|
||||
var token = _docuSignToken.GetToken();
|
||||
var account = GetDocuSignAccount(token);
|
||||
|
||||
var configuration = GetConfiguration(account, token);
|
||||
var apiClient = GetApiClient(account, token);
|
||||
var (document, sourceFile) = await CreateDocumentAsync(fileId, docuSignData.Name, docuSignData.FolderId);
|
||||
|
||||
var url = CreateEnvelope(account.AccountId, document, docuSignData, configuration);
|
||||
var url = CreateEnvelope(account.AccountId, document, docuSignData, apiClient);
|
||||
|
||||
_filesMessageService.Send(sourceFile, requestHeaders, MessageAction.DocumentSendToSign, "DocuSign", sourceFile.Title);
|
||||
|
||||
@ -212,17 +212,16 @@ public class DocuSignHelper
|
||||
return account;
|
||||
}
|
||||
|
||||
private DocuSign.eSign.Client.Configuration GetConfiguration(DocuSignAccount account, OAuth20Token token)
|
||||
private ApiClient GetApiClient(DocuSignAccount account, OAuth20Token token)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(account);
|
||||
ArgumentNullException.ThrowIfNull(token);
|
||||
|
||||
var apiClient = new ApiClient(account.BaseUri + "/restapi");
|
||||
|
||||
apiClient.Configuration.DefaultHeader.Add("Authorization", "Bearer " + _docuSignToken.GetRefreshedToken(token));
|
||||
|
||||
var configuration = new DocuSign.eSign.Client.Configuration { ApiClient = apiClient };
|
||||
configuration.AddDefaultHeader("Authorization", "Bearer " + _docuSignToken.GetRefreshedToken(token));
|
||||
|
||||
return configuration;
|
||||
return apiClient;
|
||||
}
|
||||
|
||||
private async Task<(Document document, File<T> file)> CreateDocumentAsync<T>(T fileId, string documentName, string folderId)
|
||||
@ -281,7 +280,7 @@ public class DocuSignHelper
|
||||
return (document, file);
|
||||
}
|
||||
|
||||
private string CreateEnvelope(string accountId, Document document, DocuSignData docuSignData, DocuSign.eSign.Client.Configuration configuration)
|
||||
private string CreateEnvelope(string accountId, Document document, DocuSignData docuSignData, ApiClient apiClient)
|
||||
{
|
||||
var eventNotification = new EventNotification
|
||||
{
|
||||
@ -347,7 +346,7 @@ public class DocuSignHelper
|
||||
Status = "created",
|
||||
};
|
||||
|
||||
var envelopesApi = new EnvelopesApi(configuration);
|
||||
var envelopesApi = new EnvelopesApi(apiClient);
|
||||
var envelopeSummary = envelopesApi.CreateEnvelope(accountId, envelopeDefinition);
|
||||
|
||||
Logger.Debug("DocuSign createdEnvelope: " + envelopeSummary.EnvelopeId);
|
||||
@ -369,7 +368,7 @@ public class DocuSignHelper
|
||||
|
||||
var token = _docuSignToken.GetToken();
|
||||
var account = GetDocuSignAccount(token);
|
||||
var configuration = GetConfiguration(account, token);
|
||||
var apiClient = GetApiClient(account, token);
|
||||
|
||||
var fileDao = _daoFactory.GetFileDao<T>();
|
||||
var folderDao = _daoFactory.GetFolderDao<T>();
|
||||
@ -399,7 +398,7 @@ public class DocuSignHelper
|
||||
file.Comment = FilesCommonResource.CommentCreateByDocuSign;
|
||||
file.Title = FileUtility.ReplaceFileExtension(documentName, ".pdf");
|
||||
|
||||
var envelopesApi = new EnvelopesApi(configuration);
|
||||
var envelopesApi = new EnvelopesApi(apiClient);
|
||||
Logger.Info("DocuSign webhook get stream: " + documentId);
|
||||
using (var stream = await envelopesApi.GetDocumentAsync(account.AccountId, envelopeId, documentId))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user