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
{
public class ApiHealthData

View File

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

View File

@ -6,33 +6,20 @@ namespace BTCPayServer.Client.Models
/// the id of the user
/// </summary>
public string Id { get; set; }
/// <summary>
/// the email AND username of the user
/// </summary>
public string Email { get; set; }
/// <summary>
/// Whether the user has verified their email
/// </summary>
public bool EmailConfirmed { get; set; }
/// <summary>
/// whether the user needed to verify their email on account creation
/// </summary>
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 System.Collections.Generic;
using System.Text;
using BTCPayServer.Client.JsonConverters;
using BTCPayServer.Client.JsonConverters;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
@ -9,6 +6,7 @@ namespace BTCPayServer.Client.Models
public class CreateApiKeyRequest
{
public string Label { get; set; }
[JsonProperty(ItemConverterType = typeof(PermissionJsonConverter))]
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
{
public class CreateStoreRequest:StoreBaseData
public class CreateStoreRequest : StoreBaseData
{
}
}

View File

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

View File

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