Skip to content

Commit 383580f

Browse files
authored
Merge pull request #164 from signnow/feature/document-group
Feature / document group
2 parents e93acb0 + b5c4af0 commit 383580f

83 files changed

Lines changed: 2776 additions & 1593 deletions

File tree

Some content is hidden

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

.github/workflows/build_and_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ jobs:
126126
127127
- name: Upload Code Coverage Report (Codecov.io)
128128
continue-on-error: true
129-
uses: codecov/codecov-action@v4
129+
uses: codecov/codecov-action@v5
130130
with:
131131
name: ${{ runner.os }}-codecov-${{ matrix.framework }}
132132
flags: ${{ runner.os }},${{ env.TARGET_FRAMEWORK }}

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,18 @@ 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.3.0] - 2024-12-18
810
### Added
911
- Resend Invite feature [#153](https://github.com/signnow/SignNow.NET/issues/153)
1012
- Options for Embedded invite [#160](https://github.com/signnow/SignNow.NET/issues/160)
13+
- DocumentGroup feature [#161](https://github.com/signnow/SignNow.NET/issues/161)
14+
15+
### Changed
16+
- `DownloadDocumentResponse` model extended with `MediaType` property
17+
18+
### Fixed
19+
- Fixed force logout after user details update
1120

1221

1322
## [1.2.3] - 2023-10-15
@@ -214,7 +223,9 @@ and this project adheres to [Semantic Versioning](http://semver.org).
214223
[create freeform invite]: https://github.com/signnow/SignNow.NET/blob/develop/README.md#create-freeform-invite
215224

216225
<!-- Links to compare changes from previous version vs new version -->
217-
[Unreleased]: https://github.com/signnow/SignNow.NET/compare/1.2.2...HEAD
226+
[Unreleased]: https://github.com/signnow/SignNow.NET/compare/1.3.0...HEAD
227+
[1.3.0]: https://github.com/signnow/SignNow.NET/compare/1.2.3...1.3.0
228+
[1.2.3]: https://github.com/signnow/SignNow.NET/compare/1.2.2...1.2.3
218229
[1.2.2]: https://github.com/signnow/SignNow.NET/compare/1.2.1...1.2.2
219230
[1.2.1]: https://github.com/signnow/SignNow.NET/compare/1.2.0...1.2.1
220231
[1.2.0]: https://github.com/signnow/SignNow.NET/compare/1.1.1...1.2.0

README.md

Lines changed: 94 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -20,36 +20,45 @@ Get your account at <https://www.signnow.com/developers>
2020
4. [Documentation](#documentation)
2121
5. [Features](#features)
2222
- [Authorization](#authorization)
23-
- [Request Access Token](#get-token)
23+
- [Request Access Token][request_access_token example]
2424
- [Verify Access Token][verify_access_token example]
2525
- [Refresh Access Token][refresh_access_token example]
2626
- [User](#user)
27-
- [Creates an account for a user](#create-user)
27+
- [Creates an account for a user][create_user example]
2828
- [Retrieve User Information][get_user_info example]
2929
- [Sends verification email to a user][send_verification example]
3030
- [Change User details][update_user example]
3131
- [Sends password reset link via email][reset_password example]
3232
- [Get modified documents][get_modified_docs example]
3333
- [Get user documents][get_user_docs example]
3434
- [Document](#document)
35-
- [Upload a document to signNow](#upload-document)
35+
- [Upload a document to signNow][upload_document example]
3636
- [Upload a document & Extract Fields][upload_doc_extract example]
37-
- [Download a document from signNow](#download-document)
37+
- [Download a document from signNow][download_signed_doc example]
3838
- [Retrieve a document resource][get_document example]
39-
- [Merge two or more signNow documents into one](#merge-documents)
40-
- [Create a signing link to the document for signature](#create-signing-link)
41-
- [Create a freeform invite to the document for signature](#create-freeform-invite)
42-
- [Create a role-based invite to the document for signature](#create-role-based-invite)
43-
- [Create embedded signing invite to the document for signature](#create-embedded-invite)
44-
- [Create a one-time link to download the document as a PDF](#share-document-via-link)
45-
- [Get the history of a document](#document-history)
39+
- [Merge two or more signNow documents into one][merge_documents example]
40+
- [Create a signing link to the document for signature][create_sign_lnk example]
41+
- [Create a freeform invite to the document for signature][create_ff_invite example]
42+
- [Create a role-based invite to the document for signature][create_rb_invite example]
43+
- [Create embedded signing invite to the document for signature][generate_embedded_link example]
44+
- [Create a one-time link to download the document as a PDF][create_one_time_link example]
45+
- [Get the history of a document][document_history example]
4646
- [Check the status of the document][check_sign_status example]
4747
- [Move document into specified folder][move_document example]
4848
- [Edit document][edit_document example]
4949
- [Prefill document text fields][prefill_text_field example]
5050
- [Template](#template)
51-
- [Create a template by flattening an existing document](#create-template)
51+
- [Create a template by flattening an existing document][create_template example]
5252
- [Create document from the template][create_document example]
53+
- [Document Group](#document-group)
54+
- [Create a document group](#create-document-group)
55+
- [Delete document group][doc_group_operations example]
56+
- [Rename document group][doc_group_operations example]
57+
- [Create a copy of document group][doc_group_operations example]
58+
- [Download document group][doc_group_operations example]
59+
- [Move document group][doc_group_operations example]
60+
- [Get document group info][doc_group_operations example]
61+
- [Get all document groups the user owns][doc_group_operations example]
5362
- [Folders](#folders)
5463
- [Get all folders](#get-all-folders)
5564
- [Get folder by Id][get_folder example]
@@ -68,7 +77,7 @@ To start using the API you will need an API key. You can get one here <https://
6877
#### API and Application
6978

7079
| Resources | Sandbox | Production |
71-
| ------------ | ------------------------------ | ------------------------- |
80+
|--------------|--------------------------------|---------------------------|
7281
| API: | api-eval.signnow.com:443 | api.signnow.com:443 |
7382
| Application: | <https://app-eval.signnow.com> | <https://app.signnow.com> |
7483
| Entry page: | <https://eval.signnow.com> | |
@@ -548,6 +557,53 @@ public static class DocumentExamples
548557

549558
More examples: [Create a template by flattening an existing document][create_template example], [Create document from the template][create_document example]
550559

560+
561+
## Document Group
562+
563+
### Create document group
564+
565+
Creates a document group from a list of document ids
566+
567+
All documents:
568+
569+
- Must be owned by the person creating the document group.
570+
- Cannot be templates.
571+
- Cannot already be a part of another document group (delete document group first to add them).
572+
- At least one of the documents must have fields.
573+
574+
```csharp
575+
public async Task<DocumentGroupInfoResponse> CreateDocumentGroupAsync()
576+
{
577+
// using token from the Authorization step
578+
var signNowContext = new SignNowContext(token);
579+
580+
// Upload test documents
581+
await using var fileStream = File.OpenRead("./PdfWithSignatureField.pdf");
582+
583+
var documents = new List<SignNowDocument>();
584+
585+
for (int i = 0; i < 2; i++)
586+
{
587+
var upload = await signNowContext.Documents
588+
.UploadDocumentAsync(fileStream, $"ForDocumentGroupFile-{i}.pdf");
589+
var doc = await signNowContext.Documents.GetDocumentAsync(upload.Id).ConfigureAwait(false);
590+
documents.Add(doc);
591+
}
592+
593+
// Create document group from uploaded documents
594+
var documentGroup = await signNowContext.DocumentGroup
595+
.CreateDocumentGroupAsync("CreateDocumentGroupExample", documents)
596+
.ConfigureAwait(false);
597+
598+
// Get document group by id
599+
return await signNowContext.DocumentGroup
600+
.GetDocumentGroupInfoAsync(documentGroup.Id)
601+
.ConfigureAwait(false);
602+
}
603+
```
604+
More examples: [Document group operations][doc_group_operations example]
605+
606+
551607
## Folders
552608

553609
### Get all folders
@@ -573,6 +629,7 @@ public static class FolderExamples
573629

574630
More examples: [Get all folders][get_all_folders example], [Get folder][get_folder example], [Create folder][create_folder example]
575631

632+
576633
## Contribution guidelines
577634

578635
### XML doc generation
@@ -594,6 +651,7 @@ Thanks to all contributors who got interested in this project. We're excited to
594651
- When suggesting new functionality, give as many details as possible. Add a test or code example if you can.
595652
- When reporting a bug, please, provide full system information. If possible, add a test that helps us reproduce the bug. It will speed up the fix significantly.
596653

654+
597655
## License
598656

599657
This SDK is distributed under the MIT License, see [LICENSE][license link] for more information.
@@ -618,46 +676,51 @@ If you have questions about the signNow API, please visit [signNow API Reference
618676
[license badge]: https://img.shields.io/github/license/signnow/SignNow.NET?style=flat-square "signNow .Net SDK License"
619677
[license link]: https://github.com/signnow/SignNow.NET/blob/develop/LICENSE
620678
[api docs link]: https://docs.signnow.com
621-
[api reference link]: https://docs.signnow.com/sn/ref
679+
[api reference link]: https://docs.signnow.com/docs/signnow/reference
622680

623681
<!-- All examples URLs should be there -->
624682
<!-- Authorization -->
625-
[request_access_token example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Authentication/RequestAccessToken.cs#L16
626-
[verify_access_token example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Authentication/RequestAccessToken.cs#39
627-
[refresh_access_token example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Authentication/RequestAccessToken.cs#54
683+
[request_access_token example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/OAuth2/GenerateAccessToken.cs
684+
[verify_access_token example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/OAuth2/VerifyAccessToken.cs
685+
[refresh_access_token example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/OAuth2/RefreshAccessToken.cs
628686

629687
<!-- Users -->
630688
[create_user example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Users/CreateSignNowUser.cs
631-
[get_user_info example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Users/CreateSignNowUser.cs#42
632-
[send_verification example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Users/SendVerificationEmailToUser.cs
633-
[update_user example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Users/ChangeUserDetails.cs#18
634-
[reset_password example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Users/ChangeUserDetails.cs#40
635-
[get_modified_docs example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Users/GetUserModifiedDocuments.cs#15
636-
[get_user_docs example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Users/GetUserDocuments.cs#15
689+
[get_user_info example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Users/ChangeUserDetails.cs
690+
[send_verification example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Users/CreateSignNowUser.cs
691+
[update_user example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Users/ChangeUserDetails.cs
692+
[reset_password example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Users/ChangeUserDetails.cs
693+
[get_modified_docs example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Users/GetUserModifiedDocuments.cs
694+
[get_user_docs example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Users/GetUserDocuments.cs
637695

638696
<!-- Documents -->
639-
[upload_document example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Documents/UploadDocument.cs#33
640-
[upload_doc_extract example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Documents/UploadDocument.cs#14
641-
[upload_document_complex_tags]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/ExamplesRunner.cs#L364
697+
[upload_document example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Documents/UploadDocument.cs
698+
[upload_doc_extract example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Documents/UploadDocumentWithTags.cs
699+
[upload_document_complex_tags]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Documents/UploadDocumentWithComplexTags.cs
642700
[download_signed_doc example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Documents/DownloadSignedDocument.cs
643701
[get_document example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Documents/CheckTheStatusOfTheDocument.cs
644702
[merge_documents example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Documents/MergeTwoDocuments.cs
645703
[create_sign_lnk example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Documents/CreateSigningLinkToTheDocument.cs
646-
[create_ff_invite example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Invites/CreateFreeformInviteToSignTheDocument.cs
647-
[create_rb_invite example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Invites/CreateRoleBasedInviteToSignTheDocument.cs
648-
[generate_embedded_link example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Invites/GenerateLinkForEmbeddedInvite.cs
649-
[cancel_embedded_invite example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Invites/CancelEmbeddedInvite.cs
650704
[check_sign_status example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Documents/CheckTheStatusOfTheDocument.cs
651705
[create_one_time_link example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Documents/CreateOneTimeLinkToDownloadTheDocument.cs
652706
[document_history example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Documents/GetTheDocumentHistory.cs
653707
[move_document example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Documents/MoveTheDocumentToFolder.cs
654-
[edit_document example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Documents/EditDocumentTextFields.cs
708+
[edit_document example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Documents/PrefillTextFields.cs
655709
[prefill_text_field example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Documents/PrefillTextFields.cs
656710

711+
<!-- Invites -->
712+
[create_ff_invite example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Invites/CreateFreeformInviteToSignTheDocument.cs
713+
[create_rb_invite example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Invites/CreateRoleBasedInviteToSignTheDocument.cs
714+
[generate_embedded_link example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Invites/GCreateEmbeddedSigningInviteToSignTheDocument.cs
715+
[cancel_embedded_invite example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Invites/CreateEmbeddedSigningInviteToSignTheDocument.cs
716+
657717
<!-- Templates -->
658718
[create_template example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Documents/CreateTemplateFromTheDocument.cs
659719
[create_document example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Documents/CreateDocumentFromTheTemplate.cs
660720

721+
<!-- Document group -->
722+
[doc_group_operations example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Document%20group/DocumentGroupOperations.cs
723+
661724
<!-- Folders -->
662725
[get_all_folders example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Folders/GetAllFolders.cs
663726
[get_folder example]: https://github.com/signnow/SignNow.NET/blob/develop/SignNow.Net.Examples/Folders/GetFolder.cs

SignNow.Net.Examples/Authentication/RequestAccessToken.cs

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)