api: add support for storage limits
This commit is contained in:
committed by
Abdullah Atta
parent
b3dcdda697
commit
579e65b0be
@@ -1,3 +1,4 @@
|
||||
using System.Net.Http;
|
||||
using System.Text.Json.Serialization;
|
||||
using Streetwriters.Common.Interfaces;
|
||||
using Streetwriters.Common.Models;
|
||||
@@ -7,25 +8,30 @@ namespace Notesnook.API.Models.Responses
|
||||
public class UserResponse : UserModel, IResponse
|
||||
{
|
||||
[JsonPropertyName("salt")]
|
||||
public string Salt { get; set; }
|
||||
public string? Salt { get; set; }
|
||||
|
||||
[JsonPropertyName("attachmentsKey")]
|
||||
public EncryptedData AttachmentsKey { get; set; }
|
||||
public EncryptedData? AttachmentsKey { get; set; }
|
||||
|
||||
[JsonPropertyName("monographPasswordsKey")]
|
||||
public EncryptedData MonographPasswordsKey { get; set; }
|
||||
public EncryptedData? MonographPasswordsKey { get; set; }
|
||||
|
||||
[JsonPropertyName("inboxKeys")]
|
||||
public InboxKeys InboxKeys { get; set; }
|
||||
public InboxKeys? InboxKeys { get; set; }
|
||||
|
||||
[JsonPropertyName("subscription")]
|
||||
public ISubscription Subscription { get; set; }
|
||||
public ISubscription? Subscription { get; set; }
|
||||
|
||||
[JsonPropertyName("profile")]
|
||||
public EncryptedData Profile { get; set; }
|
||||
[JsonPropertyName("storageUsed")]
|
||||
public long StorageUsed { get; set; }
|
||||
|
||||
[JsonPropertyName("totalStorage")]
|
||||
public long TotalStorage { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public bool Success { get; set; }
|
||||
public int StatusCode { get; set; }
|
||||
[JsonIgnore]
|
||||
public HttpContent? Content { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,10 +38,10 @@ namespace Notesnook.API.Models
|
||||
public string UserId { get; set; }
|
||||
public long LastSynced { get; set; }
|
||||
public string Salt { get; set; }
|
||||
public EncryptedData VaultKey { get; set; }
|
||||
public EncryptedData AttachmentsKey { get; set; }
|
||||
public EncryptedData MonographPasswordsKey { get; set; }
|
||||
public InboxKeys InboxKeys { get; set; }
|
||||
public EncryptedData? VaultKey { get; set; }
|
||||
public EncryptedData? AttachmentsKey { get; set; }
|
||||
public EncryptedData? MonographPasswordsKey { get; set; }
|
||||
public InboxKeys? InboxKeys { get; set; }
|
||||
public Limit StorageLimit { get; set; }
|
||||
|
||||
[BsonId]
|
||||
|
||||
Reference in New Issue
Block a user