Skip to content

Commit

Permalink
Merge pull request #3 from docusign/1.0.0-rc2-v1.0.0-1.0.4
Browse files Browse the repository at this point in the history
Version 1.0.0-rc2 release
  • Loading branch information
garg-mudit authored Apr 29, 2024
2 parents 18f431f + f966391 commit f356956
Show file tree
Hide file tree
Showing 15 changed files with 248 additions and 233 deletions.
46 changes: 7 additions & 39 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,8 @@
## [v1.0.0-rc1] - Maestro API v1.0.0-1.0.3 - 2024-04-03
### Changed
- Added support for version v1.0.0-1.0.3 of the DocuSign Maestro API.
- Updated the SDK release version.

## [v1.0.1-rc1] - Maestro API v1.0.0-1.0.1 - 2024-01-29
### Changed
- Added support for version v1.0.0-1.0.1 of the DocuSign Maestro API.
- Updated the SDK release version.

## [v1.0.0-rc7] - Maestro API v1.0.0-1.0.0 - 2024-01-05
### Changed
- Added support for version v1.0.0-1.0.0 of the DocuSign Maestro API.
- Updated the SDK release version.

## [v1.0.0-rc6] - Maestro API v1.0.0-1.0.0 - 2024-01-04
### Changed
- Added support for version v1.0.0-1.0.0 of the DocuSign Maestro API.
- Updated the SDK release version.

## [v1.0.0-rc5] - Maestro API v1.0.0-1.0.0 - 2023-12-26
### Changed
- Added support for version v1.0.0-1.0.0 of the DocuSign Maestro API.
- Updated the SDK release version.

## [v1.0.0-rc4] - Maestro API v1.0.0-1.0.0 - 2023-12-20
### Changed
- Added support for version v1.0.0-1.0.0 of the DocuSign Maestro API.
- Updated the SDK release version.

## [v1.0.0-rc02] - Maestro API v1.0.0-1.0.0 - 2023-12-19
### Changed
- Added support for version v1.0.0-1.0.0 of the DocuSign Maestro API.
- Updated the SDK release version.

## [v1.0.0-rc01] - Maestro API 1.0.0-1.0.0 - 2023-12-15
### Changed
- Added support for version 1.0.0-1.0.0 of the DocuSign Maestro API.
- Updated the SDK release version.
## [v1.0.0-rc2] - Maestro API v1.0.0-1.0.4 - 2024-04-22
### Breaking Changes
- Updated from System.IdentityModel.Tokens.Jwt to Microsoft.IdentityModel.JsonWebTokens for token handling.
### Other Changes
- Added support for version v1.0.0-1.0.4 of the DocuSign Maestro API.

## [v1.0.0-rc1] - Maestro API v1.0.0-1.0.3 - 2024-04-03
- Announcing the Release Candidate SDK built on the OpenAPI specification for DocuSign Maestro APIs.
146 changes: 72 additions & 74 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,80 +1,78 @@
# DocuSign.Maestro - the C# library for the Maestro API
# The Official Docusign Maestro C# Client SDK

Maestro authors and executes experiences that allow non-coders the ability to define Simple Business Process without having to write code and to deploy them seamlessly without having to have development expertise
[![Nuget version][nuget-image]][nuget-url]
[![Nuget downloads][downloads-image]][downloads-url]

This C# SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
Maestro authors and executes experiences that allow non-coders the ability to define Simple Business Process without having to write code and to deploy them seamlessly without having to have development expertise.

- Build package: io.swagger.codegen.languages.CSharpClientCodegen
For more information, please visit [https://developers.docusign.com/](https://developers.docusign.com/)
## Version Information
- **API version**: 1.0.0
- **Latest SDK version (Including prerelease)**: 1.0.0-rc2

## Frameworks supported
- .NET 4.0 or later
- Windows Phone 7.1 (Mango)
## Requirements
* Microsoft .NET version 4.6.2+ (4.7 recommended)
* Free [developer account](https://go.docusign.com/o/sandbox/?postActivateUrl=https://developers.docusign.com/)

## Compatibility
* .NET Standard 2.0. See [.NET Standard Selector](https://immo.landwerth.net/netstandard-versions/) for details on versioning for the individual components in .NET Standard.
* .NET Core 2.0 or above.
* Microsoft .NET version 4.6.2+.
* TLS 1.2

## Installation
This SDK is provided as open source, which enables you to customize its functionality to suit your particular use case. To do so, download or clone the repository. If the SDK’s given functionality meets your integration needs, or if you’re working through our [code examples](https://developers.docusign.com/docs/maestro-api/how-to/) from the [Docusign Developer Center](https://developers.docusign.com/), you merely need to install it by following the instructions below.

### NuGet Package Manager:
1. Create a new C# project, or open an existing one.
2. Select **Tools** -> **NuGet Package Manager** -> **Manage NuGet Packages for Solution.**
3. Search for **DocuSign**.
4. Select **DocuSign.Maestro**.
5. Select the check box next to your project name.
6. Click **Install.**

### Package Manager Console:
1. Create a new C# project, or open an existing one.
2. Open the **Package Manager Console** by either method:
1. Clicking **Package Manager Console** along the bottom of Visual Studio
2. Clicking **Tools** -> **NuGet Package Manager** -> **Package Manager Console**
3. In the **Package Manager Console**, type: **Install-Package DocuSign.Maestro**

## Dependencies
- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 13.0.1 or later

The DLLs included in the package may not be the latest version. We recommned using [NuGet] (https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages:
```
Install-Package Newtonsoft.Json
```


## Getting Started

```csharp
using System;
using System.Diagnostics;
using DocuSign.Maestro.Api;
using DocuSign.Maestro.Client;
using DocuSign.Maestro.Model;

namespace Example
{
public class Example
{
public void main()
{

// Configure OAuth2 access token for authorization: DSAuth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
// Configure API key authorization: DSBearerAuth
Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
var apiInstance = new WorkflowInstanceManagementApi();
var accountId = new Guid?(); // Guid? | Account ID
var instanceId = new Guid?(); // Guid? | DS Workflow Instance Id (dacId)
try
{
// Cancels a running workflow instance.
CancelResponse result = apiInstance.CancelWorkflowInstance(accountId, instanceId);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling WorkflowInstanceManagementApi.CancelWorkflowInstance: " + e.Message );
}
}
}
}
```

## Documentation for Authorization


### DSAuth

- **Type**: OAuth
- **Flow**: accessCode
- **Authorization URL**: https://account-tk1.tk.docusign.dev/oauth/auth
- **Scopes**:
- aow_manage: Manage workflows scope

### DSBearerAuth

- **Type**: API key
- **API key parameter name**: Authorization
- **Location**: HTTP header
This client has the following external dependencies:

### .NET Standard v2 and .NET Core:
* Newtonsoft.Json v13.0.3
* BouncyCastle.Cryptography v2.3.0
* System.ComponentModel.Annotations v5.0.0
* Microsoft.IdentityModel.JsonWebTokens v7.5.1

### .NET Framework, version 4.6.2:
* Newtonsoft.Json v13.0.3
* BouncyCastle.Cryptography v2.3.0
* System.ComponentModel.Annotations v5.0.0
* Microsoft.IdentityModel.JsonWebTokens v7.5.1

## Code examples
Explore our GitHub repository for the [Launcher](https://github.com/docusign/code-examples-csharp/), a self-executing package housing code examples for the Maestro C# SDK. This package showcases several common use cases and their respective source files. Additionally, you can download a version preconfigured for your Docusign developer account from [Quickstart](https://developers.docusign.com/docs/esign-rest-api/quickstart/). These examples support both the [Authorization Code Grant](https://developers.docusign.com/platform/auth/authcode/) and [JSON Web Token (JWT)](https://developers.docusign.com/platform/auth/jwt/) authentication workflows.

## OAuth implementations
For details regarding which type of OAuth grant will work best for your Docusign integration, see [Choose OAuth Type](https://developers.docusign.com/platform/auth/choose/) in the [Docusign Developer Center](https://developers.docusign.com/).

For security purposes, Docusign recommends using the [Authorization Code Grant](https://developers.docusign.com/platform/auth/authcode/) flow.

## Support
Log issues against this client through GitHub. We also have an [active developer community on Stack Overflow](https://stackoverflow.com/questions/tagged/docusignapi).

## License
The Docusign Maestro C# Client SDK is licensed under the [MIT License](https://github.com/docusign/docusign-maestro-csharp-client/blob/master/LICENSE).

## Additional resources
* [Docusign Developer Center](https://developers.docusign.com/)
* [Docusign API on Twitter](https://twitter.com/docusignapi)
* [Docusign For Developers on LinkedIn](https://www.linkedin.com/showcase/docusign-for-developers/)
* [Docusign For Developers on YouTube](https://www.youtube.com/channel/UCJSJ2kMs_qeQotmw4-lX2NQ)

[nuget-image]: https://img.shields.io/nuget/v/DocuSign.Maestro.svg?style=flat
[nuget-url]: https://www.nuget.org/packages/DocuSign.Maestro
[downloads-image]: https://img.shields.io/nuget/dt/DocuSign.Maestro.svg?style=flat
[downloads-url]: https://www.nuget.org/packages/DocuSign.Maestro
10 changes: 5 additions & 5 deletions sdk/DocuSign.Maestro.sln
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
VisualStudioVersion = 12.0.0.0
MinimumVisualStudioVersion = 10.0.0.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DocuSign.Maestro", "src\DocuSign.Maestro\DocuSign.Maestro.csproj", "{E96CD198-212B-44BC-9613-BA7F03291BDD}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DocuSign.Maestro", "src\DocuSign.Maestro\DocuSign.Maestro.csproj", "{E4D29887-C68D-45BE-90AA-75DB9406A8E8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E96CD198-212B-44BC-9613-BA7F03291BDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E96CD198-212B-44BC-9613-BA7F03291BDD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E96CD198-212B-44BC-9613-BA7F03291BDD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E96CD198-212B-44BC-9613-BA7F03291BDD}.Release|Any CPU.Build.0 = Release|Any CPU
{E4D29887-C68D-45BE-90AA-75DB9406A8E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E4D29887-C68D-45BE-90AA-75DB9406A8E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E4D29887-C68D-45BE-90AA-75DB9406A8E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E4D29887-C68D-45BE-90AA-75DB9406A8E8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/DocuSign.Maestro/Client/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class Configuration
/// Version of the package.
/// </summary>
/// <value>Version of the package.</value>
public const string Version = "1.0.0-rc1";
public const string Version = "1.0.0-rc2";

/// <summary>
/// Identifier for ISO 8601 DateTime Format
Expand Down
28 changes: 15 additions & 13 deletions sdk/src/DocuSign.Maestro/Client/DocuSignClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/

using DocuSign.Maestro.Client.Auth;
using Microsoft.IdentityModel.JsonWebTokens;
using Microsoft.IdentityModel.Tokens;
using Newtonsoft.Json;
using Org.BouncyCastle.Crypto;
Expand All @@ -18,7 +19,6 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.IdentityModel.Tokens.Jwt;
using System.IO;
using System.Linq;
using System.Net;
Expand Down Expand Up @@ -915,7 +915,7 @@ public OAuth.OAuthToken RequestJWTUserToken(string clientId, string userId, stri
{
string privateKey = Encoding.UTF8.GetString(privateKeyBytes);

JwtSecurityTokenHandler handler = new JwtSecurityTokenHandler
JsonWebTokenHandler handler = new JsonWebTokenHandler
{
SetDefaultTimesOnTokenCreation = false
};
Expand Down Expand Up @@ -953,12 +953,13 @@ public OAuth.OAuthToken RequestJWTUserToken(string clientId, string userId, stri
throw new ApiException(400, "Private key not supplied or is invalid!");
}

var token = handler.CreateToken(descriptor);
string jwtToken = handler.WriteToken(token);
var jwtToken = handler.CreateToken(descriptor);

var localVarFormParams = new Dictionary<String, String>();
localVarFormParams.Add("grant_type", OAuth.Grant_Type_JWT);
localVarFormParams.Add("assertion", jwtToken);
var localVarFormParams = new Dictionary<string, string>
{
{ "grant_type", OAuth.Grant_Type_JWT },
{ "assertion", jwtToken }
};

DocuSignRequest request = PrepareOAuthRequest(oauthBasePath, $"oauth/token", HttpMethod.Post, Configuration.DefaultHeader?.ToList(), localVarFormParams.ToList());
DocuSignResponse response = RestClient.SendRequest(request);
Expand Down Expand Up @@ -1003,7 +1004,7 @@ public OAuth.OAuthToken RequestJWTApplicationToken(string clientId, string oauth
{
string privateKey = Encoding.UTF8.GetString(privateKeyBytes);

JwtSecurityTokenHandler handler = new JwtSecurityTokenHandler();
JsonWebTokenHandler handler = new JsonWebTokenHandler();

SecurityTokenDescriptor descriptor = new SecurityTokenDescriptor()
{
Expand All @@ -1028,12 +1029,13 @@ public OAuth.OAuthToken RequestJWTApplicationToken(string clientId, string oauth
throw new ApiException(400, "Private key not supplied or is invalid!");
}

var token = handler.CreateToken(descriptor);
string jwtToken = handler.WriteToken(token);
var jwtToken = handler.CreateToken(descriptor);

var localVarFormParams = new Dictionary<String, String>();
localVarFormParams.Add("grant_type", OAuth.Grant_Type_JWT);
localVarFormParams.Add("assertion", jwtToken);
var localVarFormParams = new Dictionary<string, string>
{
{ "grant_type", OAuth.Grant_Type_JWT },
{ "assertion", jwtToken }
};

DocuSignRequest request = PrepareOAuthRequest(oauthBasePath, $"oauth/token", HttpMethod.Post, Configuration.DefaultHeader?.ToList(), localVarFormParams.ToList());
DocuSignResponse response = RestClient.SendRequest(request);
Expand Down
16 changes: 7 additions & 9 deletions sdk/src/DocuSign.Maestro/DocuSign.Maestro.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>net462;netstandard2.0</TargetFrameworks>
<IsPackable>true</IsPackable>
<PackageId>DocuSign.Maestro</PackageId>
<Description>The DocuSign NuGet package makes integrating DocuSign into your apps and websites a super fast and painless process. The library is open sourced on GitHub, look for the docusign-maestro-csharp-client repository.</Description>
<Description>The Docusign NuGet package makes integrating Docusign into your apps and websites a super fast and painless process. The library is open sourced on GitHub, look for the docusign-maestro-csharp-client repository.</Description>
<Company>DocuSign Inc.</Company>
<Owners>DocuSign</Owners>
<Copyright>Copyright © DocuSign 2024</Copyright>
Expand All @@ -16,7 +16,7 @@
<RootNamespace>DocuSign.Maestro</RootNamespace>
<AssemblyName>DocuSign.Maestro</AssemblyName>
<NeutralLanguage>en-US</NeutralLanguage>
<VersionPrefix>1.0.0-rc1</VersionPrefix>
<VersionPrefix>1.0.0-rc2</VersionPrefix>
<VersionSuffix/>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand All @@ -26,7 +26,7 @@
<PackageLicenseUrl>https://github.com/docusign/docusign-csharp-client/blob/master/LICENSE</PackageLicenseUrl>
<RepositoryUrl>https://github.com/docusign/docusign-csharp-client</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageReleaseNotes>[v1.0.0-rc1] - Maestro API v1.0.0-1.0.3 - 4/3/2024</PackageReleaseNotes>
<PackageReleaseNotes>[v1.0.0-rc2] - Maestro API v1.0.0-1.0.4 - 4/22/2024</PackageReleaseNotes>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net462'">
<DefineConstants>NET462</DefineConstants>
Expand All @@ -38,12 +38,10 @@
<Reference Include="System.Web"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.5.0"/>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1"/>
<PackageReference Include="System.ComponentModel.Annotations" Version="4.5.0"/>
<PackageReference Include="Microsoft.IdentityModel.Protocols" Version="5.4.0"/>
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="5.4.0"/>
<PackageReference Include="BouncyCastle.Cryptography" Version="2.2.1"/>
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="7.5.1"/>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3"/>
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0"/>
<PackageReference Include="BouncyCastle.Cryptography" Version="2.3.0"/>
</ItemGroup>
<ItemGroup/>
</Project>
Loading

0 comments on commit f356956

Please sign in to comment.