Skip to content

Commit 3c01582

Browse files
authored
Merge pull request #174 from signnow/api-features
Api features
2 parents 7122c31 + 29172ab commit 3c01582

File tree

169 files changed

+13103
-144
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+13103
-144
lines changed

.github/dependabot.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ updates:
66
directory: "/"
77
schedule:
88
interval: "weekly"
9+
target-branch: main
10+
commit-message:
11+
prefix: "ci: "

.github/workflows/build_and_test.yml

Lines changed: 103 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,34 @@ on:
1212
- '**'
1313
pull_request:
1414
branches:
15-
- 'master'
15+
- 'main'
1616
- 'develop'
1717
paths-ignore:
1818
- '**.md'
1919
tags-ignore:
2020
- '**'
21+
pull_request_target:
22+
branches:
23+
- 'main'
24+
- 'develop'
25+
paths-ignore:
26+
- '**.md'
27+
tags-ignore:
28+
- '**'
29+
30+
env:
31+
COREHOST_TRACE: false
32+
DOTNET_CLI_TELEMETRY_OPTOUT: 1 # Disable sending usage data to Microsoft
33+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 # prevent the caching of the packages on the build machine
34+
DOTNET_NOLOGO: true # removes logo and telemetry message from first run of dotnet cli
35+
NUGET_XMLDOC_MODE: skip # prevent the download of the XML documentation for the packages
36+
COVERAGE_PATH: SignNow.Net.Test/bin/Debug
37+
# Do not generate summary otherwise it leads to duplicate errors in build log
38+
DOTNET_BUILD_ARGS: /consoleloggerparameters:NoSummary /property:GenerateFullPaths=true
39+
40+
defaults:
41+
run:
42+
shell: pwsh
2143

2244
# Workflow
2345
jobs:
@@ -31,49 +53,39 @@ jobs:
3153
matrix:
3254
include:
3355
# Ubuntu
34-
- { name: 'Linux .NET 8', os: ubuntu-22.04, framework: 'net8.0' }
56+
- { name: 'Linux .NET 8', os: ubuntu-22.04, framework: 'net8.0', net-sdk: '8.0.x', target: 'netstandard2.1' }
3557
# macOs - disabled due to the same behavior as in Ubuntu
3658
# - { name: 'macOS .NET 8', os: macos-13, framework: 'net8.0' }
3759
# Windows
38-
- { name: 'Windows .NET 7', os: windows-latest, framework: 'net7.0' }
39-
- { name: 'Windows .NET 8', os: windows-latest, framework: 'net8.0' }
40-
- { name: 'Windows .NET 4.6', os: windows-latest, framework: 'net462' }
41-
42-
env:
43-
COREHOST_TRACE: false
44-
DOTNET_CLI_TELEMETRY_OPTOUT: 1 # Disable sending usage data to Microsoft
45-
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 # prevent the caching of the packages on the build machine
46-
DOTNET_NOLOGO: true # removes logo and telemetry message from first run of dotnet cli
47-
NUGET_XMLDOC_MODE: skip # prevent the download of the XML documentation for the packages
48-
COVERAGE_PATH: SignNow.Net.Test/bin/Debug
49-
# Do not generate summary otherwise it leads to duplicate errors in build log
50-
DOTNET_BUILD_ARGS: /consoleloggerparameters:NoSummary /property:GenerateFullPaths=true
51-
52-
defaults:
53-
run:
54-
shell: pwsh
60+
- { name: 'Windows .NET 7', os: windows-latest, framework: 'net7.0', net-sdk: '7.0.x', target: 'netstandard2.0' }
61+
- { name: 'Windows .NET 8', os: windows-latest, framework: 'net8.0', net-sdk: '8.0.x', target: 'netstandard2.1' }
62+
- { name: 'Windows .NET 4.6', os: windows-latest, framework: 'net462', net-sdk: '8.0.x', target: 'net462' }
5563

5664
steps:
5765
- uses: actions/checkout@v4
5866
with:
5967
fetch-depth: 1
68+
# For pull_request_target (dependabot), checkout the PR head SHA
69+
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.ref }}
6070

61-
- name: Setup .NET SDK Version for Target Framework
71+
- name: Get SDK Version
72+
id: props
6273
run: |
63-
If ("${{ matrix.framework }}" -eq "net7.0") {
64-
Write-Output "DOTNET_SDK_VERSION=7.0.x" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
65-
Write-Output "TARGET_FRAMEWORK=netstandard20" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
66-
} ElseIf ("${{ matrix.framework }}" -eq "net8.0") {
67-
Write-Output "DOTNET_SDK_VERSION=8.0.x" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
68-
Write-Output "TARGET_FRAMEWORK=netstandard21" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
69-
} Else {
70-
Write-Output "TARGET_FRAMEWORK=462" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
71-
}
74+
$Props = [xml](Get-Content ./SignNow.props)
75+
$Version = $Props.Project.PropertyGroup.Version
76+
Write-Output "version=${Version}" >> $Env:GITHUB_OUTPUT
77+
Write-Host "✓ Found SignNow.NET SDK project version: $Version"
78+
79+
- name: Setup JDK 17 (SonarQube requirement)
80+
uses: actions/setup-java@v4
81+
with:
82+
distribution: 'zulu'
83+
java-version: '17'
7284

7385
- name: Setup .NET SDK
7486
uses: actions/setup-dotnet@v4
7587
with:
76-
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
88+
dotnet-version: ${{ matrix.net-sdk }}
7789

7890
- name: Setup Nuget Cache
7991
uses: actions/cache@v4
@@ -83,41 +95,94 @@ jobs:
8395
key: ${{ runner.os }}-nuget-${{ matrix.framework }}-${{ hashFiles('**/*.csproj') }}
8496
restore-keys: ${{ runner.os }}-nuget-
8597

98+
- name: Install SonarQube Scanner
99+
run: dotnet tool install --global dotnet-sonarscanner
100+
86101
- name: Restore Nuget packages
87102
run: dotnet restore -v:n
88103

89104
- name: Configure signNow API
90105
run: echo '${{ secrets.TEST_CREDITS_JSON }}' >> ${{ github.workspace }}/api-eval.signnow.com.json
91106

92-
- name: Build and Pack Solution
107+
- name: Get SonarQube Project Key
108+
id: sonar
93109
run: |
94-
dotnet build SignNow.Net --configuration Debug ${{ env.DOTNET_BUILD_ARGS }}
95-
dotnet pack --configuration Release --output ./SignNow.Net/bin/Publish SignNow.Net
110+
$SonarConfigPath = "${{ github.workspace }}/SonarQube.Analysis.xml"
111+
if (Test-Path $SonarConfigPath) {
112+
[xml]$SonarConfig = Get-Content $SonarConfigPath
113+
$ProjectKey = $SonarConfig.SonarQubeAnalysisProperties.Property | Where-Object { $_.Name -eq "sonar.projectKey" } | Select-Object -ExpandProperty '#text'
114+
if (-not [string]::IsNullOrWhiteSpace($ProjectKey)) {
115+
Write-Host "✓ Found SonarQube project key: $ProjectKey"
116+
Write-Output "project-key=${ProjectKey}" >> $Env:GITHUB_OUTPUT
117+
Write-Output "has-project-key=true" >> $Env:GITHUB_OUTPUT
118+
} else {
119+
Write-Warning "SonarQube project key is empty in configuration file"
120+
}
121+
} else {
122+
Write-Warning "SonarQube configuration file not found: $SonarConfigPath"
123+
}
96124
97-
- name: Run Tests on ${{ matrix.framework }} with Coverage
125+
- name: SonarQube begin
126+
if: steps.sonar.outputs.has-project-key == 'true'
127+
run: |
128+
dotnet-sonarscanner begin `
129+
/key:${{ steps.sonar.outputs.project-key }} `
130+
/s:${{ github.workspace }}/SonarQube.Analysis.xml `
131+
/v:"${{ steps.props.outputs.version }}" `
132+
/d:sonar.projectBaseDir="${{ github.workspace }}" `
133+
/d:sonar.token="${{ secrets.SONAR_SECRET }}" `
134+
/d:sonar.host.url="${{ secrets.SONAR_HOST_URL }}" `
135+
/d:sonar.scanner.skipJreProvisioning=true
136+
137+
- name: Run Tests on ${{ matrix.framework }} for TargetFramework ${{ matrix.target }} with Coverage
98138
run: |
99-
dotnet test SignNow.Net.Test `
100-
--configuration Debug --framework ${{ matrix.framework }} `
139+
# Build the main library with framework targeting for SonarQube
140+
dotnet build SignNow.Net --configuration Debug --no-incremental `
141+
/p:TargetFramework=${{ matrix.target }} `
142+
${{ env.DOTNET_BUILD_ARGS }}
143+
144+
# Build the test project for the specific framework
145+
dotnet build SignNow.Net.Test --configuration Debug --no-incremental `
146+
--framework ${{ matrix.framework }} `
147+
${{ env.DOTNET_BUILD_ARGS }}
148+
149+
dotnet test SignNow.Net.Test --configuration Debug --no-build `
150+
--framework ${{ matrix.framework }} `
151+
--logger:trx --results-directory ./SignNow.Net.Test/TestResults `
101152
/p:CollectCoverage=true
102153
103154
- name: Save Code Coverage Results
104155
uses: actions/upload-artifact@v4
105156
with:
106157
name: CoverageReports-${{ runner.os }}-${{ matrix.framework }}.zip
107-
path: SignNow.Net.Test/bin/Debug/**/coverage*
158+
path: ${{ env.COVERAGE_PATH }}/**/coverage*
159+
160+
- name: SonarQube end
161+
if: steps.sonar.outputs.has-project-key == 'true'
162+
continue-on-error: true
163+
run: dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_SECRET }}"
108164

109165
- name: Test Release Notes parser
110166
if: (runner.os == 'macOS' || runner.os == 'Linux')
111167
shell: bash
112168
run: |
113169
.github/release-notes.sh CHANGELOG.md
114170
171+
- name: Check entire Solution Compilation and Packaging
172+
run: |
173+
# Build entire solution normally to ensure all projects are compiled
174+
dotnet build SignNow.Net.sln --configuration Debug --no-restore ${{ env.DOTNET_BUILD_ARGS }}
175+
dotnet pack --configuration Release --output ./SignNow.Net/bin/Publish SignNow.Net
176+
115177
- name: Upload Code Coverage Report (Codecov.io)
178+
if: env.CODECOV_TOKEN != ''
116179
continue-on-error: true
180+
env:
181+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
117182
uses: codecov/codecov-action@v5
118183
with:
119184
name: ${{ runner.os }}-codecov-${{ matrix.framework }}
120-
flags: ${{ runner.os }},${{ env.TARGET_FRAMEWORK }}
185+
flags: ${{ runner.os }},${{ matrix.target }}
121186
token: ${{ secrets.CODECOV_TOKEN }}
122187
files: ${{ env.COVERAGE_PATH }}/${{ matrix.framework }}/coverage.${{ matrix.framework }}.opencover.xml
123188
fail_ci_if_error: false

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,9 @@
77

88
# ignore local files with API credentials
99
*.signnow.com.json
10+
11+
# source for API code generation
12+
endpoint.json
13+
14+
*/bin/
15+
*/obj/

CHANGELOG.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,33 @@ The format is based on [Keep a Changelog](http://keepachangelog.com)
55
and this project adheres to [Semantic Versioning](http://semver.org).
66

77
## [Unreleased] - TBD
8+
9+
## [1.4.0] - 2026-01-13
10+
### Added
11+
- Event Subscriptions & Webhooks:
12+
- Get Event Subscriptions List: Enhanced filtering and sorting for retrieving event subscriptions with flexible query
13+
options
14+
- Get Event Subscription by ID: Retrieve detailed information about specific event subscriptions
15+
- Delete Event Subscription: Remove event subscriptions programmatically
16+
- Get Callbacks History: Comprehensive webhook callback event history with advanced filtering and sorting capabilities
17+
- Document Template Operations:
18+
- Template Routing Management: Create, retrieve, and update routing configurations for document templates
19+
- Bulk Invite from Template: Send signing invitations to multiple recipients using templates
20+
- Document Group Templates: List, create, and update document group templates
21+
- Document & Folder Operations
22+
- Get Document Fields: Retrieve all fields from documents with values, types, and metadata
23+
- Get Folder by ID: Fetch detailed folder information including contained documents
24+
- User Management
25+
- Update User Initials: Upload and update user's initial signature using base64-encoded images
26+
- Verify User Email: Send and verify user email addresses with verification tokens
27+
828
### Changed
9-
- Upgraded .NET Core runtime to .NET 7.0 for Tests and Examples projects
10-
- Drop support for .NET Core 2.1 and 3.1 (dropper netstandard 1.x)
11-
- Updated netstandard min version to 2.0
12-
- Removed InheritDoc tool from the project
13-
- Upgraded NET Framework min supported version to 4.6.2
29+
- Upgraded to .NET 7.0/8.0 for tests and examples
30+
- Minimum .NET Framework version upgraded to 4.6.2
31+
- Dropped support for .NET Core 2.1 and 3.1
32+
- Minimum netstandard version updated to 2.0
33+
- Removed InheritDoc tool
34+
- Update the 'UpdateEventSubscriptionAsync' method to use the latest implementation of SignNow API event-subscriptions endpoint
1435

1536

1637
## [1.3.0] - 2024-12-18
264 Bytes
Loading

0 commit comments

Comments
 (0)