This commit is contained in:
Kukks
2020-04-30 16:44:27 +02:00
parent 85517b0344
commit 33ea8984fc
8 changed files with 29 additions and 27 deletions

View File

@@ -1,6 +1,3 @@
using BTCPayServer.Client.JsonConverters;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models namespace BTCPayServer.Client.Models
{ {
public class ApiHealthData public class ApiHealthData

View File

@@ -7,6 +7,7 @@ namespace BTCPayServer.Client.Models
{ {
public string ApiKey { get; set; } public string ApiKey { get; set; }
public string Label { get; set; } public string Label { get; set; }
[JsonProperty(ItemConverterType = typeof(PermissionJsonConverter))] [JsonProperty(ItemConverterType = typeof(PermissionJsonConverter))]
public Permission[] Permissions { get; set; } public Permission[] Permissions { get; set; }
} }

View File

@@ -6,33 +6,20 @@ namespace BTCPayServer.Client.Models
/// the id of the user /// the id of the user
/// </summary> /// </summary>
public string Id { get; set; } public string Id { get; set; }
/// <summary> /// <summary>
/// the email AND username of the user /// the email AND username of the user
/// </summary> /// </summary>
public string Email { get; set; } public string Email { get; set; }
/// <summary> /// <summary>
/// Whether the user has verified their email /// Whether the user has verified their email
/// </summary> /// </summary>
public bool EmailConfirmed { get; set; } public bool EmailConfirmed { get; set; }
/// <summary> /// <summary>
/// whether the user needed to verify their email on account creation /// whether the user needed to verify their email on account creation
/// </summary> /// </summary>
public bool RequiresEmailConfirmation { get; set; } public bool RequiresEmailConfirmation { get; set; }
} }
public class CreateApplicationUserRequest
{
/// <summary>
/// the email AND username of the new user
/// </summary>
public string Email { get; set; }
/// <summary>
/// password of the new user
/// </summary>
public string Password { get; set; }
/// <summary>
/// Whether this user is an administrator. If left null and there are no admins in the system, the user will be created as an admin.
/// </summary>
public bool? IsAdministrator { get; set; }
}
} }

View File

@@ -1,7 +1,4 @@
using System; using BTCPayServer.Client.JsonConverters;
using System.Collections.Generic;
using System.Text;
using BTCPayServer.Client.JsonConverters;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace BTCPayServer.Client.Models namespace BTCPayServer.Client.Models
@@ -9,6 +6,7 @@ namespace BTCPayServer.Client.Models
public class CreateApiKeyRequest public class CreateApiKeyRequest
{ {
public string Label { get; set; } public string Label { get; set; }
[JsonProperty(ItemConverterType = typeof(PermissionJsonConverter))] [JsonProperty(ItemConverterType = typeof(PermissionJsonConverter))]
public Permission[] Permissions { get; set; } public Permission[] Permissions { get; set; }
} }

View File

@@ -0,0 +1,20 @@
namespace BTCPayServer.Client.Models
{
public class CreateApplicationUserRequest
{
/// <summary>
/// the email AND username of the new user
/// </summary>
public string Email { get; set; }
/// <summary>
/// password of the new user
/// </summary>
public string Password { get; set; }
/// <summary>
/// Whether this user is an administrator. If left null and there are no admins in the system, the user will be created as an admin.
/// </summary>
public bool? IsAdministrator { get; set; }
}
}

View File

@@ -1,6 +1,6 @@
namespace BTCPayServer.Client.Models namespace BTCPayServer.Client.Models
{ {
public class CreateStoreRequest:StoreBaseData public class CreateStoreRequest : StoreBaseData
{ {
} }
} }

View File

@@ -1,11 +1,10 @@
namespace BTCPayServer.Client.Models namespace BTCPayServer.Client.Models
{ {
public class StoreData: StoreBaseData public class StoreData : StoreBaseData
{ {
/// <summary> /// <summary>
/// the id of the store /// the id of the store
/// </summary> /// </summary>
public string Id { get; set; } public string Id { get; set; }
} }
} }

View File

@@ -1,6 +1,6 @@
namespace BTCPayServer.Client.Models namespace BTCPayServer.Client.Models
{ {
public class UpdateStoreRequest: StoreBaseData public class UpdateStoreRequest : StoreBaseData
{ {
} }
} }