feat: sync api
This commit is contained in:
parent
da9d0a319e
commit
3d413e76cb
@ -111,20 +111,4 @@ public partial class RepositoryModel : ReactiveModel
|
|||||||
|
|
||||||
[Reactive] private Guid _depotId;
|
[Reactive] private Guid _depotId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public partial class Lock : ReactiveModel
|
|
||||||
{
|
|
||||||
[Reactive] private string _path;
|
|
||||||
|
|
||||||
[Reactive] private string _ownerName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public partial class Depot : ReactiveModel
|
|
||||||
{
|
|
||||||
[Reactive] private Guid _depotId;
|
|
||||||
|
|
||||||
[Reactive] private long _length;
|
|
||||||
|
|
||||||
public ObservableCollection<Guid> Dependencies { get; } = new();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,7 +15,7 @@ using Flawless.Client.Models;
|
|||||||
|
|
||||||
namespace Flawless.Client.Remote
|
namespace Flawless.Client.Remote
|
||||||
{
|
{
|
||||||
[System.CodeDom.Compiler.GeneratedCode("Refitter", "1.5.3.0")]
|
[System.CodeDom.Compiler.GeneratedCode("Refitter", "1.5.5.0")]
|
||||||
public partial interface IFlawlessServer
|
public partial interface IFlawlessServer
|
||||||
{
|
{
|
||||||
/// <returns>A <see cref="Task"/> that completes when the request is finished.</returns>
|
/// <returns>A <see cref="Task"/> that completes when the request is finished.</returns>
|
||||||
@ -29,6 +29,12 @@ namespace Flawless.Client.Remote
|
|||||||
[Get("/api/admin/superuser/{username}")]
|
[Get("/api/admin/superuser/{username}")]
|
||||||
Task<bool> SuperuserGet(string username, CancellationToken cancellationToken = default);
|
Task<bool> SuperuserGet(string username, CancellationToken cancellationToken = default);
|
||||||
|
|
||||||
|
/// <returns>OK</returns>
|
||||||
|
/// <exception cref="ApiException">Thrown when the request returns a non-success status code.</exception>
|
||||||
|
[Headers("Accept: text/plain, application/json, text/json")]
|
||||||
|
[Get("/api/admin/user/list")]
|
||||||
|
Task<ICollection<UserInfoResponse>> List(CancellationToken cancellationToken = default);
|
||||||
|
|
||||||
/// <returns>A <see cref="Task"/> that completes when the request is finished.</returns>
|
/// <returns>A <see cref="Task"/> that completes when the request is finished.</returns>
|
||||||
/// <exception cref="ApiException">Thrown when the request returns a non-success status code.</exception>
|
/// <exception cref="ApiException">Thrown when the request returns a non-success status code.</exception>
|
||||||
[Post("/api/admin/user/delete/{username}")]
|
[Post("/api/admin/user/delete/{username}")]
|
||||||
@ -209,7 +215,7 @@ namespace Flawless.Client.Remote
|
|||||||
/// <exception cref="ApiException">Thrown when the request returns a non-success status code.</exception>
|
/// <exception cref="ApiException">Thrown when the request returns a non-success status code.</exception>
|
||||||
[Headers("Accept: text/plain, application/json, text/json")]
|
[Headers("Accept: text/plain, application/json, text/json")]
|
||||||
[Get("/api/repo/{userName}/{repositoryName}/webhooks")]
|
[Get("/api/repo/{userName}/{repositoryName}/webhooks")]
|
||||||
Task<ICollection<Webhook>> WebhooksGet(string userName, string repositoryName, CancellationToken cancellationToken = default);
|
Task<ICollection<WebhookResponse>> WebhooksGet(string userName, string repositoryName, CancellationToken cancellationToken = default);
|
||||||
|
|
||||||
/// <returns>A <see cref="Task"/> that completes when the request is finished.</returns>
|
/// <returns>A <see cref="Task"/> that completes when the request is finished.</returns>
|
||||||
/// <exception cref="ApiException">Thrown when the request returns a non-success status code.</exception>
|
/// <exception cref="ApiException">Thrown when the request returns a non-success status code.</exception>
|
||||||
@ -264,7 +270,7 @@ namespace Flawless.Client.Remote
|
|||||||
/// <returns>OK</returns>
|
/// <returns>OK</returns>
|
||||||
/// <exception cref="ApiException">Thrown when the request returns a non-success status code.</exception>
|
/// <exception cref="ApiException">Thrown when the request returns a non-success status code.</exception>
|
||||||
[Multipart]
|
[Multipart]
|
||||||
[Headers("Accept: text/plain, application/json, text/json")]
|
[Headers("Accept: text/plain, application/json, text/json", "Content-Type: multipart/form-data")]
|
||||||
[Post("/api/repo/{userName}/{repositoryName}/create_commit")]
|
[Post("/api/repo/{userName}/{repositoryName}/create_commit")]
|
||||||
Task<CommitSuccessResponse> CreateCommit(string userName, string repositoryName, StreamPart depot, string message, IEnumerable<string> workspaceSnapshot, IEnumerable<string> requiredDepots, string mainDepotId, CancellationToken cancellationToken = default);
|
Task<CommitSuccessResponse> CreateCommit(string userName, string repositoryName, StreamPart depot, string message, IEnumerable<string> workspaceSnapshot, IEnumerable<string> requiredDepots, string mainDepotId, CancellationToken cancellationToken = default);
|
||||||
|
|
||||||
@ -332,7 +338,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
//----------------------
|
//----------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// Generated using the NSwag toolchain v14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
|
// Generated using the NSwag toolchain v14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
|
||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//----------------------
|
//----------------------
|
||||||
|
|
||||||
@ -358,7 +364,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class AddCommentRequest
|
public partial class AddCommentRequest
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -370,7 +376,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class CommentResponse
|
public partial class CommentResponse
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -391,7 +397,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class CommentResponseListingResponse
|
public partial class CommentResponseListingResponse
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -400,7 +406,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class CommitManifest
|
public partial class CommitManifest
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -415,7 +421,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class CommitSuccessResponse
|
public partial class CommitSuccessResponse
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -430,7 +436,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class CreateIssueRequest
|
public partial class CreateIssueRequest
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -445,7 +451,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class DepotLabel
|
public partial class DepotLabel
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -457,7 +463,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class FirstSetupRequest
|
public partial class FirstSetupRequest
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -472,7 +478,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class GuidPeekResponse
|
public partial class GuidPeekResponse
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -481,7 +487,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class IssueDetailInfo
|
public partial class IssueDetailInfo
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -511,7 +517,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class IssueInfo
|
public partial class IssueInfo
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -538,7 +544,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class IssueInfoListingResponse
|
public partial class IssueInfoListingResponse
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -547,7 +553,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class LockFileInfo
|
public partial class LockFileInfo
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -559,7 +565,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class LockFileInfoListingResponse
|
public partial class LockFileInfoListingResponse
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -568,7 +574,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class LogEntryResponse
|
public partial class LogEntryResponse
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -586,7 +592,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public enum LogLevel
|
public enum LogLevel
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -606,7 +612,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class LoginRequest
|
public partial class LoginRequest
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -620,7 +626,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class RegisterRequest
|
public partial class RegisterRequest
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -638,7 +644,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class RepoUserRole
|
public partial class RepoUserRole
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -651,7 +657,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class RepoUserRoleListingResponse
|
public partial class RepoUserRoleListingResponse
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -660,7 +666,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class RepositoryCommitResponse
|
public partial class RepositoryCommitResponse
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -681,7 +687,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class RepositoryCommitResponseListingResponse
|
public partial class RepositoryCommitResponseListingResponse
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -690,7 +696,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class RepositoryInfoResponse
|
public partial class RepositoryInfoResponse
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -713,7 +719,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class RepositoryInfoResponseListingResponse
|
public partial class RepositoryInfoResponseListingResponse
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -722,7 +728,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public enum RepositoryRole
|
public enum RepositoryRole
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -736,7 +742,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class ResetPasswordRequest
|
public partial class ResetPasswordRequest
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -752,7 +758,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class ServerStatusResponse
|
public partial class ServerStatusResponse
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -770,7 +776,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class TokenInfo
|
public partial class TokenInfo
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -783,7 +789,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class UpdateIssueRequest
|
public partial class UpdateIssueRequest
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -798,7 +804,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class UserContactModifyResponse
|
public partial class UserContactModifyResponse
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -810,7 +816,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class UserInfoModifyResponse
|
public partial class UserInfoModifyResponse
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -828,7 +834,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class UserInfoResponse
|
public partial class UserInfoResponse
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -867,7 +873,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class UserInfoResponseListingResponse
|
public partial class UserInfoResponseListingResponse
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -876,50 +882,21 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public enum UserSex
|
public enum UserSex
|
||||||
{
|
{
|
||||||
|
|
||||||
_0 = 0,
|
Unset = 0,
|
||||||
|
|
||||||
_1 = 1,
|
Male = 1,
|
||||||
|
|
||||||
_2 = 2,
|
Female = 2,
|
||||||
|
|
||||||
_3 = 3,
|
WalmartPlasticBag = 3,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class Webhook
|
|
||||||
{
|
|
||||||
|
|
||||||
[JsonPropertyName("id")]
|
|
||||||
public int Id { get; set; }
|
|
||||||
|
|
||||||
[JsonPropertyName("repositoryId")]
|
|
||||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
|
||||||
public System.Guid RepositoryId { get; set; }
|
|
||||||
|
|
||||||
[JsonPropertyName("targetUrl")]
|
|
||||||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
|
||||||
public string TargetUrl { get; set; }
|
|
||||||
|
|
||||||
[JsonPropertyName("eventType")]
|
|
||||||
public WebhookEventType EventType { get; set; }
|
|
||||||
|
|
||||||
[JsonPropertyName("secret")]
|
|
||||||
public string Secret { get; set; }
|
|
||||||
|
|
||||||
[JsonPropertyName("isActive")]
|
|
||||||
public bool IsActive { get; set; }
|
|
||||||
|
|
||||||
[JsonPropertyName("createdAt")]
|
|
||||||
public System.DateTimeOffset CreatedAt { get; set; }
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
|
||||||
public partial class WebhookCreateRequest
|
public partial class WebhookCreateRequest
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -934,7 +911,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public enum WebhookEventType
|
public enum WebhookEventType
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -946,7 +923,28 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
|
public partial class WebhookResponse
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonPropertyName("id")]
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("targetUrl")]
|
||||||
|
public string TargetUrl { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("eventType")]
|
||||||
|
public WebhookEventType EventType { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("isActive")]
|
||||||
|
public bool IsActive { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("createdAt")]
|
||||||
|
public System.DateTimeOffset CreatedAt { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class WorkspaceFile
|
public partial class WorkspaceFile
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -961,7 +959,7 @@ namespace Flawless.Client.Remote
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NSwag", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NSwag", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class FileParameter
|
public partial class FileParameter
|
||||||
{
|
{
|
||||||
public FileParameter(System.IO.Stream data)
|
public FileParameter(System.IO.Stream data)
|
||||||
@ -988,7 +986,7 @@ namespace Flawless.Client.Remote
|
|||||||
public string ContentType { get; private set; }
|
public string ContentType { get; private set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCode("NSwag", "14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0))")]
|
[System.CodeDom.Compiler.GeneratedCode("NSwag", "14.4.0.0 (NJsonSchema v11.3.2.0 (Newtonsoft.Json v13.0.0.0))")]
|
||||||
public partial class FileResponse : System.IDisposable
|
public partial class FileResponse : System.IDisposable
|
||||||
{
|
{
|
||||||
private System.IDisposable _client;
|
private System.IDisposable _client;
|
||||||
|
|||||||
@ -352,7 +352,7 @@ public partial class RepositoryViewModel : RoutableViewModelBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
[ReactiveCommand]
|
[ReactiveCommand]
|
||||||
private async Task DeleteWebhookAsync(Webhook webhook)
|
private async Task DeleteWebhookAsync(RepositoryModel.Webhook webhook)
|
||||||
{
|
{
|
||||||
if (!IsOwnerRole) return;
|
if (!IsOwnerRole) return;
|
||||||
|
|
||||||
@ -365,7 +365,7 @@ public partial class RepositoryViewModel : RoutableViewModelBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
[ReactiveCommand]
|
[ReactiveCommand]
|
||||||
public async Task ToggleWebhookAsync(Webhook webhook)
|
public async Task ToggleWebhookAsync(RepositoryModel.Webhook webhook)
|
||||||
{
|
{
|
||||||
if (!IsOwnerRole) return;
|
if (!IsOwnerRole) return;
|
||||||
|
|
||||||
@ -373,7 +373,7 @@ public partial class RepositoryViewModel : RoutableViewModelBase
|
|||||||
var success = await RepositoryService.C.ToggleWebhookAsync(
|
var success = await RepositoryService.C.ToggleWebhookAsync(
|
||||||
Repository,
|
Repository,
|
||||||
webhook.Id,
|
webhook.Id,
|
||||||
!webhook.IsActive);
|
!webhook.Active);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -608,7 +608,7 @@ public partial class RepositoryViewModel : RoutableViewModelBase
|
|||||||
{
|
{
|
||||||
ShowWebHook = IsDeveloperRole && (Api.C.Status.Value?.AllowWebHook ?? false);
|
ShowWebHook = IsDeveloperRole && (Api.C.Status.Value?.AllowWebHook ?? false);
|
||||||
if (!ShowWebHook) return;
|
if (!ShowWebHook) return;
|
||||||
using var l = UIHelper.MakeLoading("刷新Webhook列表...");
|
using var l = UIHelper.MakeLoading("Refresh webhooks...");
|
||||||
await RepositoryService.C.UpdateWebhooksFromServerAsync(Repository);
|
await RepositoryService.C.UpdateWebhooksFromServerAsync(Repository);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -54,13 +54,25 @@ public class AdminController(
|
|||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet("user/list")]
|
[HttpGet("user/list")]
|
||||||
public async Task<ActionResult<List<AppUser>>> GetUsersAsync()
|
public async Task<ActionResult<IEnumerable<UserInfoResponse>>> GetUsersAsync()
|
||||||
{
|
{
|
||||||
var t = await TestIfValid();
|
var t = await TestIfValid();
|
||||||
if (t != null) return t;
|
if (t != null) return t;
|
||||||
|
|
||||||
var users = await userManager.Users.ToListAsync();
|
return await userManager.Users.Select(x => new UserInfoResponse
|
||||||
return users;
|
{
|
||||||
|
Authorized = true,
|
||||||
|
Username = x.UserName,
|
||||||
|
CreatedAt = x.CreatedOn,
|
||||||
|
Bio = x.Bio,
|
||||||
|
Gender = x.Gender,
|
||||||
|
NickName = x.NickName,
|
||||||
|
PublicEmail = x.PublicEmail,
|
||||||
|
Email = x.Email,
|
||||||
|
Phone = x.PhoneNumber,
|
||||||
|
IsAdmin = x.Admin,
|
||||||
|
IsActive = x.LockoutEnabled
|
||||||
|
}).ToArrayAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost("user/delete/{username}")]
|
[HttpPost("user/delete/{username}")]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user