-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathIFolderService.cs
More file actions
76 lines (70 loc) · 3.78 KB
/
Copy pathIFolderService.cs
File metadata and controls
76 lines (70 loc) · 3.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
using System.Threading;
using System.Threading.Tasks;
using SignNow.Net.Model;
using SignNow.Net.Model.Requests;
using SignNow.Net.Model.Responses;
namespace SignNow.Net.Interfaces
{
/// <summary>
/// Interface for any operations with a folders in signNow
/// </summary>
/// <remarks>
/// Folders serve for storing user's documents. <br />
/// By default, there are three folders in every account:
/// <list type="bullet">
/// <item><description>Documents</description></item>
/// <item><description>Templates</description></item>
/// <item><description>Archive</description></item>
/// </list>
/// Subfolders can be created only for these three and their child folders.
/// </remarks>
public interface IFolderService
{
/// <summary>
/// Returns all folders of a <see cref="User"/>.
/// </summary>
/// <param name="cancellationToken">Propagates notification that operations should be canceled.</param>
/// <returns></returns>
Task<SignNowFolders> GetAllFoldersAsync(CancellationToken cancellationToken = default);
/// <summary>
/// Returns all details of a specific folder including all documents in that folder.
/// </summary>
/// <param name="folderId">ID of the folder to get details of</param>
/// <param name="options">Folder filter and sort options</param>
/// <param name="cancellation">Propagates notification that operations should be canceled.</param>
/// <returns></returns>
Task<SignNowFolders> GetFolderAsync(string folderId, GetFolderOptions options = default, CancellationToken cancellation = default);
/// <summary>
/// Returns all details of a specific folder including all documents in that folder using the newer API endpoint (/folder/{folder_id}).
/// Both endpoints provide the same functionality but use different API paths.
/// </summary>
/// <param name="folderId">ID of the folder to get details of</param>
/// <param name="options">Folder filter and sort options</param>
/// <param name="cancellation">Propagates notification that operations should be canceled.</param>
/// <returns></returns>
Task<SignNowFolders> GetFolderByIdAsync(string folderId, GetFolderOptions options = default, CancellationToken cancellation = default);
/// <summary>
/// Creates a folder for the user.
/// </summary>
/// <param name="name">Name of a new folder</param>
/// <param name="parentId">Identifier for the parent folder that contains this folder.</param>
/// <param name="cancellationToken">Propagates notification that operations should be canceled.</param>
/// <returns>Returns ID of a new folder.</returns>
Task<FolderIdentityResponse> CreateFolderAsync(string name, string parentId, CancellationToken cancellationToken = default);
/// <summary>
/// Deletes a folder.
/// </summary>
/// <param name="folderId">ID of the folder to delete.</param>
/// <param name="cancellationToken">Propagates notification that operations should be canceled.</param>
/// <returns></returns>
Task DeleteFolderAsync(string folderId, CancellationToken cancellationToken = default);
/// <summary>
/// Renames a folder.
/// </summary>
/// <param name="name">A new folder's name.</param>
/// <param name="folderId">ID of the folder to rename.</param>
/// <param name="cancellationToken">Propagates notification that operations should be canceled.</param>
/// <returns>Returns ID of the renamed folder.</returns>
Task<FolderIdentityResponse> RenameFolderAsync(string name, string folderId, CancellationToken cancellationToken = default);
}
}