diff --git a/.ogen.yml b/.ogen.yml index 7fe72ad..a774a3e 100644 --- a/.ogen.yml +++ b/.ogen.yml @@ -3,7 +3,7 @@ parser: allow_remote: true generator: - ignore_not_implemented: ["object defaults"] + ignore_not_implemented: ["object defaults", "array defaults"] features: disable_all: true enable: diff --git a/README.md b/README.md index 75deffb..feda2bc 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ A Go SDK client for interacting with the **[Remnawave API](https://remna.st)**. | API Version | SDK Version | Install | |-------------|-------------|---------| +| 2.8.0 | v2.8.0 | `go get git.voidsmiths.dev/shiranui/remnawave-api-go/v2@v2.8.0` | | 2.7.4 | v2.7.4 | `go get git.voidsmiths.dev/shiranui/remnawave-api-go/v2@v2.7.4` | Generated with [**ogen**](https://github.com/ogen-go/ogen) v1.19.0: @@ -21,7 +22,7 @@ Generated with [**ogen**](https://github.com/ogen-go/ogen) v1.19.0: ## Installation ```bash -go get github.com/shiranuiyami/remnawave-api-go/v2@v2.7.4 +go get github.com/shiranuiyami/remnawave-api-go/v2@v2.8.0 ``` ## Quick Start diff --git a/api/client_ext.go b/api/client_ext.go index c28c8f4..df55866 100644 --- a/api/client_ext.go +++ b/api/client_ext.go @@ -259,6 +259,11 @@ func (sc *ApiTokensClient) FindAll(ctx context.Context, options ...RequestOption return sc.client.ApiTokensFindAll(ctx, options...) } +// GetScopes calls ApiTokens_getScopes. +func (sc *ApiTokensClient) GetScopes(ctx context.Context, options ...RequestOption) (ApiTokensGetScopesRes, error) { + return sc.client.ApiTokensGetScopes(ctx, options...) +} + // AuthClient provides Auth operations. type AuthClient struct { client *Client @@ -324,6 +329,11 @@ func (sc *BandwidthStatsNodesClient) GetStatsNodeUsersUsage(ctx context.Context, return sc.client.BandwidthStatsNodesGetStatsNodeUsersUsage(ctx, params, options...) } +// GetStatsNodesUsersUsage calls BandwidthStatsNodes_getStatsNodesUsersUsage. +func (sc *BandwidthStatsNodesClient) GetStatsNodesUsersUsage(ctx context.Context, request *GetStatsNodesUsersUsageRequest, params BandwidthStatsNodesGetStatsNodesUsersUsageParams, options ...RequestOption) (BandwidthStatsNodesGetStatsNodesUsersUsageRes, error) { + return sc.client.BandwidthStatsNodesGetStatsNodesUsersUsage(ctx, request, params, options...) +} + // BandwidthStatsUsersClient provides BandwidthStatsUsers operations. type BandwidthStatsUsersClient struct { client *Client @@ -539,13 +549,8 @@ func (sc *HostsBulkActionsClient) EnableHosts(ctx context.Context, request *Bulk return sc.client.HostsBulkActionsEnableHosts(ctx, request, options...) } -// SetInboundToHosts calls HostsBulkActions_setInboundToHosts. -func (sc *HostsBulkActionsClient) SetInboundToHosts(ctx context.Context, request *SetInboundToManyHostsRequest, options ...RequestOption) (HostsBulkActionsSetInboundToHostsRes, error) { - return sc.client.HostsBulkActionsSetInboundToHosts(ctx, request, options...) -} - // SetPortToHosts calls HostsBulkActions_setPortToHosts. -func (sc *HostsBulkActionsClient) SetPortToHosts(ctx context.Context, request *SetPortToManyHostsRequest, options ...RequestOption) (HostsBulkActionsSetPortToHostsRes, error) { +func (sc *HostsBulkActionsClient) SetPortToHosts(ctx context.Context, request *UpdateManyHostsRequest, options ...RequestOption) (HostsBulkActionsSetPortToHostsRes, error) { return sc.client.HostsBulkActionsSetPortToHosts(ctx, request, options...) } @@ -976,13 +981,13 @@ func (sc *NodesClient) ResetNodeTraffic(ctx context.Context, uuid string, option } // RestartAllNodes calls Nodes_restartAllNodes. -func (sc *NodesClient) RestartAllNodes(ctx context.Context, request *RestartAllNodesRequestBody, options ...RequestOption) (NodesRestartAllNodesRes, error) { +func (sc *NodesClient) RestartAllNodes(ctx context.Context, request *NodeRequestBodyRequest, options ...RequestOption) (NodesRestartAllNodesRes, error) { return sc.client.NodesRestartAllNodes(ctx, request, options...) } // RestartNode calls Nodes_restartNode. -func (sc *NodesClient) RestartNode(ctx context.Context, uuid string, options ...RequestOption) (NodesRestartNodeRes, error) { - return sc.client.NodesRestartNode(ctx, NodesRestartNodeParams{ +func (sc *NodesClient) RestartNode(ctx context.Context, request *NodeRequestBodyRequest, uuid string, options ...RequestOption) (NodesRestartNodeRes, error) { + return sc.client.NodesRestartNode(ctx, request, NodesRestartNodeParams{ UUID: uuid, }, options...) } @@ -1310,11 +1315,6 @@ func (sc *SystemClient) DebugSrrMatcher(ctx context.Context, request *DebugSrrMa return sc.client.SystemDebugSrrMatcher(ctx, request, options...) } -// EncryptHappCryptoLink calls System_encryptHappCryptoLink. -func (sc *SystemClient) EncryptHappCryptoLink(ctx context.Context, request *EncryptHappCryptoLinkRequest, options ...RequestOption) (SystemEncryptHappCryptoLinkRes, error) { - return sc.client.SystemEncryptHappCryptoLink(ctx, request, options...) -} - // GetBandwidthStats calls System_getBandwidthStats. func (sc *SystemClient) GetBandwidthStats(ctx context.Context, options ...RequestOption) (SystemGetBandwidthStatsRes, error) { return sc.client.SystemGetBandwidthStats(ctx, options...) @@ -1518,6 +1518,14 @@ func (sc *UsersClient) GetUsersByTag(ctx context.Context, tag string, options .. }, options...) } +// GetUsersStream calls Users_getUsersStream. +func (sc *UsersClient) GetUsersStream(ctx context.Context, size int, cursor string, options ...RequestOption) (UsersGetUsersStreamRes, error) { + return sc.client.UsersGetUsersStream(ctx, UsersGetUsersStreamParams{ + Size: NewOptInt(size), + Cursor: NewOptString(cursor), + }, options...) +} + // ResetUserTraffic calls Users_resetUserTraffic. func (sc *UsersClient) ResetUserTraffic(ctx context.Context, uuid string, options ...RequestOption) (UsersResetUserTrafficRes, error) { return sc.client.UsersResetUserTraffic(ctx, UsersResetUserTrafficParams{ diff --git a/api/oas_cfg_gen.go b/api/oas_cfg_gen.go index 8de306e..28e8b66 100644 --- a/api/oas_cfg_gen.go +++ b/api/oas_cfg_gen.go @@ -22,6 +22,7 @@ var regexMap = map[string]ogenregex.Regexp{ "^[A-Z0-9_]+$": ogenregex.MustCompile("^[A-Z0-9_]+$"), "^[A-Za-z0-9_\\s-]+$": ogenregex.MustCompile("^[A-Za-z0-9_\\s-]+$"), "^[a-zA-Z0-9_-]+$": ogenregex.MustCompile("^[a-zA-Z0-9_-]+$"), + "^socks5:\\/\\/(?:[^:@/\\s]+(?::[^@/\\s]*)?@)?[^:@/\\s]+:\\d{1,5}$": ogenregex.MustCompile("^socks5:\\/\\/(?:[^:@/\\s]+(?::[^@/\\s]*)?@)?[^:@/\\s]+:\\d{1,5}$"), } var ( // Allocate option closure once. diff --git a/api/oas_client_gen.go b/api/oas_client_gen.go index c9e107c..d68931c 100644 --- a/api/oas_client_gen.go +++ b/api/oas_client_gen.go @@ -105,6 +105,13 @@ type Invoker interface { // // GET /api/tokens ApiTokensFindAll(ctx context.Context, options ...RequestOption) (ApiTokensFindAllRes, error) + // ApiTokensGetScopes invokes ApiTokens_getScopes operation. + // + // Returns the catalog of scopes that can be granted to an API token, grouped by resource. Forbidden + // via "API-key", admin JWT only. + // + // GET /api/tokens/scopes + ApiTokensGetScopes(ctx context.Context, options ...RequestOption) (ApiTokensGetScopesRes, error) // AuthGetStatus invokes Auth_getStatus operation. // // Get the status of the authentication. @@ -159,6 +166,12 @@ type Invoker interface { // // GET /api/bandwidth-stats/nodes/{uuid}/users BandwidthStatsNodesGetStatsNodeUsersUsage(ctx context.Context, params BandwidthStatsNodesGetStatsNodeUsersUsageParams, options ...RequestOption) (BandwidthStatsNodesGetStatsNodeUsersUsageRes, error) + // BandwidthStatsNodesGetStatsNodesUsersUsage invokes BandwidthStatsNodes_getStatsNodesUsersUsage operation. + // + // Get Nodes Users Usage by Nodes UUIDs. + // + // POST /api/bandwidth-stats/nodes/users + BandwidthStatsNodesGetStatsNodesUsersUsage(ctx context.Context, request *GetStatsNodesUsersUsageRequest, params BandwidthStatsNodesGetStatsNodesUsersUsageParams, options ...RequestOption) (BandwidthStatsNodesGetStatsNodesUsersUsageRes, error) // BandwidthStatsUsersGetStatsNodesUsage invokes BandwidthStatsUsers_getStatsNodesUsage operation. // // Get User Usage by Range. @@ -291,18 +304,12 @@ type Invoker interface { // // POST /api/hosts/bulk/enable HostsBulkActionsEnableHosts(ctx context.Context, request *BulkUuidsRequest2, options ...RequestOption) (HostsBulkActionsEnableHostsRes, error) - // HostsBulkActionsSetInboundToHosts invokes HostsBulkActions_setInboundToHosts operation. - // - // Set inbound to hosts by UUIDs. - // - // POST /api/hosts/bulk/set-inbound - HostsBulkActionsSetInboundToHosts(ctx context.Context, request *SetInboundToManyHostsRequest, options ...RequestOption) (HostsBulkActionsSetInboundToHostsRes, error) // HostsBulkActionsSetPortToHosts invokes HostsBulkActions_setPortToHosts operation. // - // Set port to hosts by UUIDs. + // Update many hosts. // - // POST /api/hosts/bulk/set-port - HostsBulkActionsSetPortToHosts(ctx context.Context, request *SetPortToManyHostsRequest, options ...RequestOption) (HostsBulkActionsSetPortToHostsRes, error) + // PATCH /api/hosts/bulk/update + HostsBulkActionsSetPortToHosts(ctx context.Context, request *UpdateManyHostsRequest, options ...RequestOption) (HostsBulkActionsSetPortToHostsRes, error) // HostsCreateHost invokes Hosts_createHost operation. // // Create a new host. @@ -698,13 +705,13 @@ type Invoker interface { // Restart all nodes. // // POST /api/nodes/actions/restart-all - NodesRestartAllNodes(ctx context.Context, request *RestartAllNodesRequestBody, options ...RequestOption) (NodesRestartAllNodesRes, error) + NodesRestartAllNodes(ctx context.Context, request *NodeRequestBodyRequest, options ...RequestOption) (NodesRestartAllNodesRes, error) // NodesRestartNode invokes Nodes_restartNode operation. // // Restart node. // // POST /api/nodes/{uuid}/actions/restart - NodesRestartNode(ctx context.Context, params NodesRestartNodeParams, options ...RequestOption) (NodesRestartNodeRes, error) + NodesRestartNode(ctx context.Context, request *NodeRequestBodyRequest, params NodesRestartNodeParams, options ...RequestOption) (NodesRestartNodeRes, error) // NodesUpdateNode invokes Nodes_updateNode operation. // // Update node. @@ -935,12 +942,6 @@ type Invoker interface { // // POST /api/system/testers/srr-matcher SystemDebugSrrMatcher(ctx context.Context, request *DebugSrrMatcherRequest, options ...RequestOption) (SystemDebugSrrMatcherRes, error) - // SystemEncryptHappCryptoLink invokes System_encryptHappCryptoLink operation. - // - // Encrypt Happ Crypto Link. - // - // POST /api/system/tools/happ/encrypt - SystemEncryptHappCryptoLink(ctx context.Context, request *EncryptHappCryptoLinkRequest, options ...RequestOption) (SystemEncryptHappCryptoLinkRes, error) // SystemGetBandwidthStats invokes System_getBandwidthStats operation. // // Get Bandwidth Stats. @@ -1111,7 +1112,7 @@ type Invoker interface { UsersGetAllTags(ctx context.Context, options ...RequestOption) (UsersGetAllTagsRes, error) // UsersGetAllUsers invokes Users_getAllUsers operation. // - // Get all users. + // Get all users using offset-based pagination. // // GET /api/users UsersGetAllUsers(ctx context.Context, params UsersGetAllUsersParams, options ...RequestOption) (UsersGetAllUsersRes, error) @@ -1169,6 +1170,12 @@ type Invoker interface { // // GET /api/users/by-tag/{tag} UsersGetUsersByTag(ctx context.Context, params UsersGetUsersByTagParams, options ...RequestOption) (UsersGetUsersByTagRes, error) + // UsersGetUsersStream invokes Users_getUsersStream operation. + // + // Get all users using cursor-based (keyset) pagination. + // + // GET /api/users/stream + UsersGetUsersStream(ctx context.Context, params UsersGetUsersStreamParams, options ...RequestOption) (UsersGetUsersStreamRes, error) // UsersResetUserTraffic invokes Users_resetUserTraffic operation. // // Reset user traffic. @@ -1249,6 +1256,15 @@ func (c *Client) ApiTokensCreate(ctx context.Context, request *CreateApiTokenReq } func (c *Client) sendApiTokensCreate(ctx context.Context, request *CreateApiTokenRequest, requestOptions ...RequestOption) (res ApiTokensCreateRes, err error) { + // Validate request before sending. + if err := func() error { + if err := request.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return res, errors.Wrap(err, "validate") + } otelAttrs := []attribute.KeyValue{ otelogen.OperationID("ApiTokens_create"), semconv.HTTPRequestMethodKey.String("POST"), @@ -1655,6 +1671,139 @@ func (c *Client) sendApiTokensFindAll(ctx context.Context, requestOptions ...Req return result, nil } +// ApiTokensGetScopes invokes ApiTokens_getScopes operation. +// +// Returns the catalog of scopes that can be granted to an API token, grouped by resource. Forbidden +// via "API-key", admin JWT only. +// +// GET /api/tokens/scopes +func (c *Client) ApiTokensGetScopes(ctx context.Context, options ...RequestOption) (ApiTokensGetScopesRes, error) { + res, err := c.sendApiTokensGetScopes(ctx, options...) + return res, err +} + +func (c *Client) sendApiTokensGetScopes(ctx context.Context, requestOptions ...RequestOption) (res ApiTokensGetScopesRes, err error) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("ApiTokens_getScopes"), + semconv.HTTPRequestMethodKey.String("GET"), + semconv.URLTemplateKey.String("/api/tokens/scopes"), + } + otelAttrs = append(otelAttrs, c.cfg.Attributes...) + + // Run stopwatch. + startTime := time.Now() + defer func() { + // Use floating point division here for higher precision (instead of Millisecond method). + elapsedDuration := time.Since(startTime) + c.duration.Record(ctx, float64(elapsedDuration)/float64(time.Millisecond), metric.WithAttributes(otelAttrs...)) + }() + + // Increment request counter. + c.requests.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) + + // Start a span for this request. + ctx, span := c.cfg.Tracer.Start(ctx, ApiTokensGetScopesOperation, + trace.WithAttributes(otelAttrs...), + clientSpanKind, + ) + // Track stage for error reporting. + var stage string + defer func() { + if err != nil { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + c.errors.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) + } + span.End() + }() + + var reqCfg requestConfig + reqCfg.setDefaults(c.baseClient) + for _, o := range requestOptions { + o(&reqCfg) + } + + stage = "BuildURL" + u := c.serverURL + if override := reqCfg.ServerURL; override != nil { + u = override + } + u = uri.Clone(u) + var pathParts [1]string + pathParts[0] = "/api/tokens/scopes" + uri.AddPathParts(u, pathParts[:]...) + + stage = "EncodeRequest" + r, err := ht.NewRequest(ctx, "GET", u) + if err != nil { + return res, errors.Wrap(err, "create request") + } + + { + type bitset = [1]uint8 + var satisfied bitset + { + stage = "Security:Authorization" + switch err := c.securityAuthorization(ctx, ApiTokensGetScopesOperation, r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 0 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"Authorization\"") + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + return res, ogenerrors.ErrSecurityRequirementIsNotSatisfied + } + } + + if err := c.onRequest(ctx, r); err != nil { + return res, errors.Wrap(err, "client edit request") + } + + if err := reqCfg.onRequest(r); err != nil { + return res, errors.Wrap(err, "edit request") + } + + stage = "SendRequest" + resp, err := reqCfg.Client.Do(r) + if err != nil { + return res, errors.Wrap(err, "do request") + } + defer resp.Body.Close() + + if err := c.onResponse(ctx, resp); err != nil { + return res, errors.Wrap(err, "client edit response") + } + + if err := reqCfg.onResponse(resp); err != nil { + return res, errors.Wrap(err, "edit response") + } + + stage = "DecodeResponse" + result, err := decodeApiTokensGetScopesResponse(resp) + if err != nil { + return res, errors.Wrap(err, "decode response") + } + + return result, nil +} + // AuthGetStatus invokes Auth_getStatus operation. // // Get the status of the authentication. @@ -2770,6 +2919,196 @@ func (c *Client) sendBandwidthStatsNodesGetStatsNodeUsersUsage(ctx context.Conte return result, nil } +// BandwidthStatsNodesGetStatsNodesUsersUsage invokes BandwidthStatsNodes_getStatsNodesUsersUsage operation. +// +// Get Nodes Users Usage by Nodes UUIDs. +// +// POST /api/bandwidth-stats/nodes/users +func (c *Client) BandwidthStatsNodesGetStatsNodesUsersUsage(ctx context.Context, request *GetStatsNodesUsersUsageRequest, params BandwidthStatsNodesGetStatsNodesUsersUsageParams, options ...RequestOption) (BandwidthStatsNodesGetStatsNodesUsersUsageRes, error) { + res, err := c.sendBandwidthStatsNodesGetStatsNodesUsersUsage(ctx, request, params, options...) + return res, err +} + +func (c *Client) sendBandwidthStatsNodesGetStatsNodesUsersUsage(ctx context.Context, request *GetStatsNodesUsersUsageRequest, params BandwidthStatsNodesGetStatsNodesUsersUsageParams, requestOptions ...RequestOption) (res BandwidthStatsNodesGetStatsNodesUsersUsageRes, err error) { + // Validate request before sending. + if err := func() error { + if err := request.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return res, errors.Wrap(err, "validate") + } + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("BandwidthStatsNodes_getStatsNodesUsersUsage"), + semconv.HTTPRequestMethodKey.String("POST"), + semconv.URLTemplateKey.String("/api/bandwidth-stats/nodes/users"), + } + otelAttrs = append(otelAttrs, c.cfg.Attributes...) + + // Run stopwatch. + startTime := time.Now() + defer func() { + // Use floating point division here for higher precision (instead of Millisecond method). + elapsedDuration := time.Since(startTime) + c.duration.Record(ctx, float64(elapsedDuration)/float64(time.Millisecond), metric.WithAttributes(otelAttrs...)) + }() + + // Increment request counter. + c.requests.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) + + // Start a span for this request. + ctx, span := c.cfg.Tracer.Start(ctx, BandwidthStatsNodesGetStatsNodesUsersUsageOperation, + trace.WithAttributes(otelAttrs...), + clientSpanKind, + ) + // Track stage for error reporting. + var stage string + defer func() { + if err != nil { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + c.errors.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) + } + span.End() + }() + + var reqCfg requestConfig + reqCfg.setDefaults(c.baseClient) + for _, o := range requestOptions { + o(&reqCfg) + } + + stage = "BuildURL" + u := c.serverURL + if override := reqCfg.ServerURL; override != nil { + u = override + } + u = uri.Clone(u) + var pathParts [1]string + pathParts[0] = "/api/bandwidth-stats/nodes/users" + uri.AddPathParts(u, pathParts[:]...) + + stage = "EncodeQueryParams" + q := uri.NewQueryEncoder() + { + // Encode "topUsersLimit" parameter. + cfg := uri.QueryParameterEncodingConfig{ + Name: "topUsersLimit", + Style: uri.QueryStyleForm, + Explode: true, + } + + if err := q.EncodeParam(cfg, func(e uri.Encoder) error { + return e.EncodeValue(conv.IntToString(params.TopUsersLimit)) + }); err != nil { + return res, errors.Wrap(err, "encode query") + } + } + { + // Encode "start" parameter. + cfg := uri.QueryParameterEncodingConfig{ + Name: "start", + Style: uri.QueryStyleForm, + Explode: true, + } + + if err := q.EncodeParam(cfg, func(e uri.Encoder) error { + return e.EncodeValue(conv.DateToString(params.Start)) + }); err != nil { + return res, errors.Wrap(err, "encode query") + } + } + { + // Encode "end" parameter. + cfg := uri.QueryParameterEncodingConfig{ + Name: "end", + Style: uri.QueryStyleForm, + Explode: true, + } + + if err := q.EncodeParam(cfg, func(e uri.Encoder) error { + return e.EncodeValue(conv.DateToString(params.End)) + }); err != nil { + return res, errors.Wrap(err, "encode query") + } + } + u.RawQuery = q.Values().Encode() + + stage = "EncodeRequest" + r, err := ht.NewRequest(ctx, "POST", u) + if err != nil { + return res, errors.Wrap(err, "create request") + } + if err := encodeBandwidthStatsNodesGetStatsNodesUsersUsageRequest(request, r); err != nil { + return res, errors.Wrap(err, "encode request") + } + + { + type bitset = [1]uint8 + var satisfied bitset + { + stage = "Security:Authorization" + switch err := c.securityAuthorization(ctx, BandwidthStatsNodesGetStatsNodesUsersUsageOperation, r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 0 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"Authorization\"") + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + return res, ogenerrors.ErrSecurityRequirementIsNotSatisfied + } + } + + if err := c.onRequest(ctx, r); err != nil { + return res, errors.Wrap(err, "client edit request") + } + + if err := reqCfg.onRequest(r); err != nil { + return res, errors.Wrap(err, "edit request") + } + + stage = "SendRequest" + resp, err := reqCfg.Client.Do(r) + if err != nil { + return res, errors.Wrap(err, "do request") + } + defer resp.Body.Close() + + if err := c.onResponse(ctx, resp); err != nil { + return res, errors.Wrap(err, "client edit response") + } + + if err := reqCfg.onResponse(resp); err != nil { + return res, errors.Wrap(err, "edit response") + } + + stage = "DecodeResponse" + result, err := decodeBandwidthStatsNodesGetStatsNodesUsersUsageResponse(resp) + if err != nil { + return res, errors.Wrap(err, "decode response") + } + + return result, nil +} + // BandwidthStatsUsersGetStatsNodesUsage invokes BandwidthStatsUsers_getStatsNodesUsage operation. // // Get User Usage by Range. @@ -6045,161 +6384,17 @@ func (c *Client) sendHostsBulkActionsEnableHosts(ctx context.Context, request *B return result, nil } -// HostsBulkActionsSetInboundToHosts invokes HostsBulkActions_setInboundToHosts operation. -// -// Set inbound to hosts by UUIDs. -// -// POST /api/hosts/bulk/set-inbound -func (c *Client) HostsBulkActionsSetInboundToHosts(ctx context.Context, request *SetInboundToManyHostsRequest, options ...RequestOption) (HostsBulkActionsSetInboundToHostsRes, error) { - res, err := c.sendHostsBulkActionsSetInboundToHosts(ctx, request, options...) - return res, err -} - -func (c *Client) sendHostsBulkActionsSetInboundToHosts(ctx context.Context, request *SetInboundToManyHostsRequest, requestOptions ...RequestOption) (res HostsBulkActionsSetInboundToHostsRes, err error) { - // Validate request before sending. - if err := func() error { - if err := request.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - return res, errors.Wrap(err, "validate") - } - otelAttrs := []attribute.KeyValue{ - otelogen.OperationID("HostsBulkActions_setInboundToHosts"), - semconv.HTTPRequestMethodKey.String("POST"), - semconv.URLTemplateKey.String("/api/hosts/bulk/set-inbound"), - } - otelAttrs = append(otelAttrs, c.cfg.Attributes...) - - // Run stopwatch. - startTime := time.Now() - defer func() { - // Use floating point division here for higher precision (instead of Millisecond method). - elapsedDuration := time.Since(startTime) - c.duration.Record(ctx, float64(elapsedDuration)/float64(time.Millisecond), metric.WithAttributes(otelAttrs...)) - }() - - // Increment request counter. - c.requests.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) - - // Start a span for this request. - ctx, span := c.cfg.Tracer.Start(ctx, HostsBulkActionsSetInboundToHostsOperation, - trace.WithAttributes(otelAttrs...), - clientSpanKind, - ) - // Track stage for error reporting. - var stage string - defer func() { - if err != nil { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - c.errors.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) - } - span.End() - }() - - var reqCfg requestConfig - reqCfg.setDefaults(c.baseClient) - for _, o := range requestOptions { - o(&reqCfg) - } - - stage = "BuildURL" - u := c.serverURL - if override := reqCfg.ServerURL; override != nil { - u = override - } - u = uri.Clone(u) - var pathParts [1]string - pathParts[0] = "/api/hosts/bulk/set-inbound" - uri.AddPathParts(u, pathParts[:]...) - - stage = "EncodeRequest" - r, err := ht.NewRequest(ctx, "POST", u) - if err != nil { - return res, errors.Wrap(err, "create request") - } - if err := encodeHostsBulkActionsSetInboundToHostsRequest(request, r); err != nil { - return res, errors.Wrap(err, "encode request") - } - - { - type bitset = [1]uint8 - var satisfied bitset - { - stage = "Security:Authorization" - switch err := c.securityAuthorization(ctx, HostsBulkActionsSetInboundToHostsOperation, r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 0 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"Authorization\"") - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - return res, ogenerrors.ErrSecurityRequirementIsNotSatisfied - } - } - - if err := c.onRequest(ctx, r); err != nil { - return res, errors.Wrap(err, "client edit request") - } - - if err := reqCfg.onRequest(r); err != nil { - return res, errors.Wrap(err, "edit request") - } - - stage = "SendRequest" - resp, err := reqCfg.Client.Do(r) - if err != nil { - return res, errors.Wrap(err, "do request") - } - defer resp.Body.Close() - - if err := c.onResponse(ctx, resp); err != nil { - return res, errors.Wrap(err, "client edit response") - } - - if err := reqCfg.onResponse(resp); err != nil { - return res, errors.Wrap(err, "edit response") - } - - stage = "DecodeResponse" - result, err := decodeHostsBulkActionsSetInboundToHostsResponse(resp) - if err != nil { - return res, errors.Wrap(err, "decode response") - } - - return result, nil -} - // HostsBulkActionsSetPortToHosts invokes HostsBulkActions_setPortToHosts operation. // -// Set port to hosts by UUIDs. +// Update many hosts. // -// POST /api/hosts/bulk/set-port -func (c *Client) HostsBulkActionsSetPortToHosts(ctx context.Context, request *SetPortToManyHostsRequest, options ...RequestOption) (HostsBulkActionsSetPortToHostsRes, error) { +// PATCH /api/hosts/bulk/update +func (c *Client) HostsBulkActionsSetPortToHosts(ctx context.Context, request *UpdateManyHostsRequest, options ...RequestOption) (HostsBulkActionsSetPortToHostsRes, error) { res, err := c.sendHostsBulkActionsSetPortToHosts(ctx, request, options...) return res, err } -func (c *Client) sendHostsBulkActionsSetPortToHosts(ctx context.Context, request *SetPortToManyHostsRequest, requestOptions ...RequestOption) (res HostsBulkActionsSetPortToHostsRes, err error) { +func (c *Client) sendHostsBulkActionsSetPortToHosts(ctx context.Context, request *UpdateManyHostsRequest, requestOptions ...RequestOption) (res HostsBulkActionsSetPortToHostsRes, err error) { // Validate request before sending. if err := func() error { if err := request.Validate(); err != nil { @@ -6211,8 +6406,8 @@ func (c *Client) sendHostsBulkActionsSetPortToHosts(ctx context.Context, request } otelAttrs := []attribute.KeyValue{ otelogen.OperationID("HostsBulkActions_setPortToHosts"), - semconv.HTTPRequestMethodKey.String("POST"), - semconv.URLTemplateKey.String("/api/hosts/bulk/set-port"), + semconv.HTTPRequestMethodKey.String("PATCH"), + semconv.URLTemplateKey.String("/api/hosts/bulk/update"), } otelAttrs = append(otelAttrs, c.cfg.Attributes...) @@ -6256,11 +6451,11 @@ func (c *Client) sendHostsBulkActionsSetPortToHosts(ctx context.Context, request } u = uri.Clone(u) var pathParts [1]string - pathParts[0] = "/api/hosts/bulk/set-port" + pathParts[0] = "/api/hosts/bulk/update" uri.AddPathParts(u, pathParts[:]...) stage = "EncodeRequest" - r, err := ht.NewRequest(ctx, "POST", u) + r, err := ht.NewRequest(ctx, "PATCH", u) if err != nil { return res, errors.Wrap(err, "create request") } @@ -8511,6 +8706,15 @@ func (c *Client) InfraBillingCreateInfraBillingNode(ctx context.Context, request } func (c *Client) sendInfraBillingCreateInfraBillingNode(ctx context.Context, request *CreateInfraBillingNodeRequest, requestOptions ...RequestOption) (res InfraBillingCreateInfraBillingNodeRes, err error) { + // Validate request before sending. + if err := func() error { + if err := request.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return res, errors.Wrap(err, "validate") + } otelAttrs := []attribute.KeyValue{ otelogen.OperationID("InfraBilling_createInfraBillingNode"), semconv.HTTPRequestMethodKey.String("POST"), @@ -15747,12 +15951,12 @@ func (c *Client) sendNodesResetNodeTraffic(ctx context.Context, params NodesRese // Restart all nodes. // // POST /api/nodes/actions/restart-all -func (c *Client) NodesRestartAllNodes(ctx context.Context, request *RestartAllNodesRequestBody, options ...RequestOption) (NodesRestartAllNodesRes, error) { +func (c *Client) NodesRestartAllNodes(ctx context.Context, request *NodeRequestBodyRequest, options ...RequestOption) (NodesRestartAllNodesRes, error) { res, err := c.sendNodesRestartAllNodes(ctx, request, options...) return res, err } -func (c *Client) sendNodesRestartAllNodes(ctx context.Context, request *RestartAllNodesRequestBody, requestOptions ...RequestOption) (res NodesRestartAllNodesRes, err error) { +func (c *Client) sendNodesRestartAllNodes(ctx context.Context, request *NodeRequestBodyRequest, requestOptions ...RequestOption) (res NodesRestartAllNodesRes, err error) { otelAttrs := []attribute.KeyValue{ otelogen.OperationID("Nodes_restartAllNodes"), semconv.HTTPRequestMethodKey.String("POST"), @@ -15882,12 +16086,12 @@ func (c *Client) sendNodesRestartAllNodes(ctx context.Context, request *RestartA // Restart node. // // POST /api/nodes/{uuid}/actions/restart -func (c *Client) NodesRestartNode(ctx context.Context, params NodesRestartNodeParams, options ...RequestOption) (NodesRestartNodeRes, error) { - res, err := c.sendNodesRestartNode(ctx, params, options...) +func (c *Client) NodesRestartNode(ctx context.Context, request *NodeRequestBodyRequest, params NodesRestartNodeParams, options ...RequestOption) (NodesRestartNodeRes, error) { + res, err := c.sendNodesRestartNode(ctx, request, params, options...) return res, err } -func (c *Client) sendNodesRestartNode(ctx context.Context, params NodesRestartNodeParams, requestOptions ...RequestOption) (res NodesRestartNodeRes, err error) { +func (c *Client) sendNodesRestartNode(ctx context.Context, request *NodeRequestBodyRequest, params NodesRestartNodeParams, requestOptions ...RequestOption) (res NodesRestartNodeRes, err error) { otelAttrs := []attribute.KeyValue{ otelogen.OperationID("Nodes_restartNode"), semconv.HTTPRequestMethodKey.String("POST"), @@ -15962,6 +16166,9 @@ func (c *Client) sendNodesRestartNode(ctx context.Context, params NodesRestartNo if err != nil { return res, errors.Wrap(err, "create request") } + if err := encodeNodesRestartNodeRequest(request, r); err != nil { + return res, errors.Wrap(err, "encode request") + } { type bitset = [1]uint8 @@ -21613,141 +21820,6 @@ func (c *Client) sendSystemDebugSrrMatcher(ctx context.Context, request *DebugSr return result, nil } -// SystemEncryptHappCryptoLink invokes System_encryptHappCryptoLink operation. -// -// Encrypt Happ Crypto Link. -// -// POST /api/system/tools/happ/encrypt -func (c *Client) SystemEncryptHappCryptoLink(ctx context.Context, request *EncryptHappCryptoLinkRequest, options ...RequestOption) (SystemEncryptHappCryptoLinkRes, error) { - res, err := c.sendSystemEncryptHappCryptoLink(ctx, request, options...) - return res, err -} - -func (c *Client) sendSystemEncryptHappCryptoLink(ctx context.Context, request *EncryptHappCryptoLinkRequest, requestOptions ...RequestOption) (res SystemEncryptHappCryptoLinkRes, err error) { - otelAttrs := []attribute.KeyValue{ - otelogen.OperationID("System_encryptHappCryptoLink"), - semconv.HTTPRequestMethodKey.String("POST"), - semconv.URLTemplateKey.String("/api/system/tools/happ/encrypt"), - } - otelAttrs = append(otelAttrs, c.cfg.Attributes...) - - // Run stopwatch. - startTime := time.Now() - defer func() { - // Use floating point division here for higher precision (instead of Millisecond method). - elapsedDuration := time.Since(startTime) - c.duration.Record(ctx, float64(elapsedDuration)/float64(time.Millisecond), metric.WithAttributes(otelAttrs...)) - }() - - // Increment request counter. - c.requests.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) - - // Start a span for this request. - ctx, span := c.cfg.Tracer.Start(ctx, SystemEncryptHappCryptoLinkOperation, - trace.WithAttributes(otelAttrs...), - clientSpanKind, - ) - // Track stage for error reporting. - var stage string - defer func() { - if err != nil { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - c.errors.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) - } - span.End() - }() - - var reqCfg requestConfig - reqCfg.setDefaults(c.baseClient) - for _, o := range requestOptions { - o(&reqCfg) - } - - stage = "BuildURL" - u := c.serverURL - if override := reqCfg.ServerURL; override != nil { - u = override - } - u = uri.Clone(u) - var pathParts [1]string - pathParts[0] = "/api/system/tools/happ/encrypt" - uri.AddPathParts(u, pathParts[:]...) - - stage = "EncodeRequest" - r, err := ht.NewRequest(ctx, "POST", u) - if err != nil { - return res, errors.Wrap(err, "create request") - } - if err := encodeSystemEncryptHappCryptoLinkRequest(request, r); err != nil { - return res, errors.Wrap(err, "encode request") - } - - { - type bitset = [1]uint8 - var satisfied bitset - { - stage = "Security:Authorization" - switch err := c.securityAuthorization(ctx, SystemEncryptHappCryptoLinkOperation, r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 0 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"Authorization\"") - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - return res, ogenerrors.ErrSecurityRequirementIsNotSatisfied - } - } - - if err := c.onRequest(ctx, r); err != nil { - return res, errors.Wrap(err, "client edit request") - } - - if err := reqCfg.onRequest(r); err != nil { - return res, errors.Wrap(err, "edit request") - } - - stage = "SendRequest" - resp, err := reqCfg.Client.Do(r) - if err != nil { - return res, errors.Wrap(err, "do request") - } - defer resp.Body.Close() - - if err := c.onResponse(ctx, resp); err != nil { - return res, errors.Wrap(err, "client edit response") - } - - if err := reqCfg.onResponse(resp); err != nil { - return res, errors.Wrap(err, "edit response") - } - - stage = "DecodeResponse" - result, err := decodeSystemEncryptHappCryptoLinkResponse(resp) - if err != nil { - return res, errors.Wrap(err, "decode response") - } - - return result, nil -} - // SystemGetBandwidthStats invokes System_getBandwidthStats operation. // // Get Bandwidth Stats. @@ -25698,7 +25770,7 @@ func (c *Client) sendUsersGetAllTags(ctx context.Context, requestOptions ...Requ // UsersGetAllUsers invokes Users_getAllUsers operation. // -// Get all users. +// Get all users using offset-based pagination. // // GET /api/users func (c *Client) UsersGetAllUsers(ctx context.Context, params UsersGetAllUsersParams, options ...RequestOption) (UsersGetAllUsersRes, error) { @@ -27218,6 +27290,176 @@ func (c *Client) sendUsersGetUsersByTag(ctx context.Context, params UsersGetUser return result, nil } +// UsersGetUsersStream invokes Users_getUsersStream operation. +// +// Get all users using cursor-based (keyset) pagination. +// +// GET /api/users/stream +func (c *Client) UsersGetUsersStream(ctx context.Context, params UsersGetUsersStreamParams, options ...RequestOption) (UsersGetUsersStreamRes, error) { + res, err := c.sendUsersGetUsersStream(ctx, params, options...) + return res, err +} + +func (c *Client) sendUsersGetUsersStream(ctx context.Context, params UsersGetUsersStreamParams, requestOptions ...RequestOption) (res UsersGetUsersStreamRes, err error) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("Users_getUsersStream"), + semconv.HTTPRequestMethodKey.String("GET"), + semconv.URLTemplateKey.String("/api/users/stream"), + } + otelAttrs = append(otelAttrs, c.cfg.Attributes...) + + // Run stopwatch. + startTime := time.Now() + defer func() { + // Use floating point division here for higher precision (instead of Millisecond method). + elapsedDuration := time.Since(startTime) + c.duration.Record(ctx, float64(elapsedDuration)/float64(time.Millisecond), metric.WithAttributes(otelAttrs...)) + }() + + // Increment request counter. + c.requests.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) + + // Start a span for this request. + ctx, span := c.cfg.Tracer.Start(ctx, UsersGetUsersStreamOperation, + trace.WithAttributes(otelAttrs...), + clientSpanKind, + ) + // Track stage for error reporting. + var stage string + defer func() { + if err != nil { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + c.errors.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) + } + span.End() + }() + + var reqCfg requestConfig + reqCfg.setDefaults(c.baseClient) + for _, o := range requestOptions { + o(&reqCfg) + } + + stage = "BuildURL" + u := c.serverURL + if override := reqCfg.ServerURL; override != nil { + u = override + } + u = uri.Clone(u) + var pathParts [1]string + pathParts[0] = "/api/users/stream" + uri.AddPathParts(u, pathParts[:]...) + + stage = "EncodeQueryParams" + q := uri.NewQueryEncoder() + { + // Encode "size" parameter. + cfg := uri.QueryParameterEncodingConfig{ + Name: "size", + Style: uri.QueryStyleForm, + Explode: true, + } + + if err := q.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := params.Size.Get(); ok { + return e.EncodeValue(conv.IntToString(val)) + } + return nil + }); err != nil { + return res, errors.Wrap(err, "encode query") + } + } + { + // Encode "cursor" parameter. + cfg := uri.QueryParameterEncodingConfig{ + Name: "cursor", + Style: uri.QueryStyleForm, + Explode: true, + } + + if err := q.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := params.Cursor.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return res, errors.Wrap(err, "encode query") + } + } + u.RawQuery = q.Values().Encode() + + stage = "EncodeRequest" + r, err := ht.NewRequest(ctx, "GET", u) + if err != nil { + return res, errors.Wrap(err, "create request") + } + + { + type bitset = [1]uint8 + var satisfied bitset + { + stage = "Security:Authorization" + switch err := c.securityAuthorization(ctx, UsersGetUsersStreamOperation, r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 0 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"Authorization\"") + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + return res, ogenerrors.ErrSecurityRequirementIsNotSatisfied + } + } + + if err := c.onRequest(ctx, r); err != nil { + return res, errors.Wrap(err, "client edit request") + } + + if err := reqCfg.onRequest(r); err != nil { + return res, errors.Wrap(err, "edit request") + } + + stage = "SendRequest" + resp, err := reqCfg.Client.Do(r) + if err != nil { + return res, errors.Wrap(err, "do request") + } + defer resp.Body.Close() + + if err := c.onResponse(ctx, resp); err != nil { + return res, errors.Wrap(err, "client edit response") + } + + if err := reqCfg.onResponse(resp); err != nil { + return res, errors.Wrap(err, "edit response") + } + + stage = "DecodeResponse" + result, err := decodeUsersGetUsersStreamResponse(resp) + if err != nil { + return res, errors.Wrap(err, "decode response") + } + + return result, nil +} + // UsersResetUserTraffic invokes Users_resetUserTraffic operation. // // Reset user traffic. diff --git a/api/oas_defaults_gen.go b/api/oas_defaults_gen.go index a1aacd8..586ca6a 100644 --- a/api/oas_defaults_gen.go +++ b/api/oas_defaults_gen.go @@ -48,10 +48,6 @@ func (s *CreateHostRequest) setDefaults() { val := bool(false) s.KeepSniBlank.SetTo(val) } - { - val := bool(false) - s.AllowInsecure.SetTo(val) - } { val := bool(false) s.ShuffleHost.SetTo(val) @@ -88,10 +84,6 @@ func (s *CreateUserRequest) setDefaults() { // setDefaults set default value of fields. func (s *HostItem) setDefaults() { - { - val := bool(false) - s.IsDisabled.SetTo(val) - } { val := HostItemSecurityLayer("DEFAULT") s.SecurityLayer.SetTo(val) @@ -108,10 +100,6 @@ func (s *HostItem) setDefaults() { val := bool(false) s.KeepSniBlank.SetTo(val) } - { - val := bool(false) - s.AllowInsecure.SetTo(val) - } } // setDefaults set default value of fields. @@ -122,6 +110,22 @@ func (s *RevokeUserSubscriptionBody) setDefaults() { } } +// setDefaults set default value of fields. +func (s *UpdateHostRequest) setDefaults() { + { + val := bool(false) + s.IsDisabled.SetTo(val) + } +} + +// setDefaults set default value of fields. +func (s *UpdateManyHostsRequest) setDefaults() { + { + val := bool(false) + s.IsDisabled.SetTo(val) + } +} + // setDefaults set default value of fields. func (s *UpdateUserRequest) setDefaults() { { @@ -137,7 +141,7 @@ func (s *UserItemInfo) setDefaults() { s.Status.SetTo(val) } { - val := int(0) + val := float64(0) s.TrafficLimitBytes.SetTo(val) } { diff --git a/api/oas_faker_gen.go b/api/oas_faker_gen.go index 7a7fac2..46f1a51 100644 --- a/api/oas_faker_gen.go +++ b/api/oas_faker_gen.go @@ -219,11 +219,6 @@ func (s *BillingHistoryResponseResponseRecordsItemProvider) SetFake() { // SetFake set fake values. func (s *BillingNode) SetFake() { - { - { - s.NodeUuid = uuid.New() - } - } { { s.Name = "string" @@ -231,7 +226,7 @@ func (s *BillingNode) SetFake() { } { { - s.CountryCode = "string" + s.Details.SetFake() } } } @@ -297,7 +292,12 @@ func (s *BillingNodesResponseResponseBillingNodesItem) SetFake() { } { { - s.NodeUuid = uuid.New() + s.NodeUuid.SetFake() + } + } + { + { + s.Name.SetFake() } } { @@ -569,6 +569,11 @@ func (s *BulkNodesUpdateRequestFields) SetFake() { s.ConsumptionMultiplier.SetFake() } } + { + { + s.NodeConsumptionMultiplier.SetFake() + } + } { { s.ProviderUuid.SetFake() @@ -591,6 +596,11 @@ func (s *BulkNodesUpdateRequestFields) SetFake() { s.ActivePluginUuid.SetFake() } } + { + { + s.Note.SetFake() + } + } } // SetFake set fake values. @@ -957,7 +967,24 @@ func (s *ConfigProfilesResponseResponse) SetFake() { func (s *CreateApiTokenRequest) SetFake() { { { - s.TokenName = "string" + s.Name = "string" + } + } + { + { + s.ExpiresInDays = float64(0) + } + } + { + { + s.Scopes = nil + for i := 0; i < 0; i++ { + var elem string + { + elem = "string" + } + s.Scopes = append(s.Scopes, elem) + } } } } @@ -975,12 +1002,44 @@ func (s *CreateApiTokenResponse) SetFake() { func (s *CreateApiTokenResponseResponse) SetFake() { { { - s.Token = "string" + s.UUID = uuid.New() } } { { - s.UUID = "string" + s.Name = "string" + } + } + { + { + s.ExpireAt = time.Now() + } + } + { + { + s.Scopes = nil + for i := 0; i < 0; i++ { + var elem string + { + elem = "string" + } + s.Scopes = append(s.Scopes, elem) + } + } + } + { + { + s.CreatedAt = time.Now() + } + } + { + { + s.UpdatedAt = time.Now() + } + } + { + { + s.Token = "string" } } } @@ -1071,7 +1130,7 @@ func (s *CreateHostRequest) SetFake() { } { { - s.XHttpExtraParams = []byte("null") + s.XhttpExtraParams = []byte("null") } } { @@ -1096,7 +1155,14 @@ func (s *CreateHostRequest) SetFake() { } { { - s.Tag.SetFake() + s.Tags = nil + for i := 0; i < 0; i++ { + var elem string + { + elem = "string" + } + s.Tags = append(s.Tags, elem) + } } } { @@ -1116,7 +1182,12 @@ func (s *CreateHostRequest) SetFake() { } { { - s.AllowInsecure.SetFake() + s.PinnedPeerCertSha256.SetFake() + } + } + { + { + s.VerifyPeerCertByName.SetFake() } } { @@ -1134,6 +1205,11 @@ func (s *CreateHostRequest) SetFake() { s.MihomoX25519.SetFake() } } + { + { + s.MihomoIpVersion.SetFake() + } + } { { s.Nodes = nil @@ -1188,8 +1264,8 @@ func (s *CreateHostRequestExcludeFromSubscriptionTypesItem) SetFake() { } // SetFake set fake values. -func (s *CreateHostRequestFingerprint) SetFake() { - *s = CreateHostRequestFingerprintChrome +func (s *CreateHostRequestMihomoIpVersion) SetFake() { + *s = CreateHostRequestMihomoIpVersionDual } // SetFake set fake values. @@ -1225,12 +1301,17 @@ func (s *CreateInfraBillingNodeRequest) SetFake() { } { { - s.NodeUuid = uuid.New() + s.NodeUuid.SetFake() } } { { - s.NextBillingAt.SetFake() + s.Name.SetFake() + } + } + { + { + s.NextBillingAt = time.Now() } } } @@ -1310,6 +1391,11 @@ func (s *CreateNodeRequest) SetFake() { s.Port.SetFake() } } + { + { + s.ProxyUrl.SetFake() + } + } { { s.IsTrafficTrackingActive.SetFake() @@ -1340,6 +1426,11 @@ func (s *CreateNodeRequest) SetFake() { s.ConsumptionMultiplier.SetFake() } } + { + { + s.NodeConsumptionMultiplier.SetFake() + } + } { { s.ConfigProfile.SetFake() @@ -1367,6 +1458,11 @@ func (s *CreateNodeRequest) SetFake() { s.ActivePluginUuid.SetFake() } } + { + { + s.Note.SetFake() + } + } } // SetFake set fake values. @@ -1438,6 +1534,11 @@ func (s *CreateUserHwidDeviceRequest) SetFake() { s.UserAgent.SetFake() } } + { + { + s.RequestIp.SetFake() + } + } } // SetFake set fake values. @@ -1792,7 +1893,7 @@ func (s *Device) SetFake() { } { { - s.UserUuid = uuid.New() + s.UserId = float64(0) } } { @@ -1815,6 +1916,11 @@ func (s *Device) SetFake() { s.UserAgent.SetFake() } } + { + { + s.RequestIp.SetFake() + } + } { { s.CreatedAt = time.Now() @@ -1954,30 +2060,22 @@ func (s *DropConnectionsRequestTargetNodes1Target) SetFake() { } // SetFake set fake values. -func (s *EncryptHappCryptoLinkRequest) SetFake() { +func (s *EncryptionItem) SetFake() { { { - s.LinkToEncrypt = url.URL{Scheme: "https", Host: "github.com", Path: "/ogen-go/ogen"} + s.Method.SetFake() + } + } + { + { + s.Key = "string" } } } // SetFake set fake values. -func (s *EncryptHappCryptoLinkResponse) SetFake() { - { - { - s.Response.SetFake() - } - } -} - -// SetFake set fake values. -func (s *EncryptHappCryptoLinkResponseResponse) SetFake() { - { - { - s.EncryptedLink = "string" - } - } +func (s *EncryptionItemMethod) SetFake() { + *s = EncryptionItemMethodAge1 } // SetFake set fake values. @@ -2335,13 +2433,13 @@ func (s *FindAllApiTokensResponse) SetFake() { func (s *FindAllApiTokensResponseResponse) SetFake() { { { - s.ApiKeys = nil + s.Tokens = nil for i := 0; i < 0; i++ { - var elem FindAllApiTokensResponseResponseApiKeysItem + var elem FindAllApiTokensResponseResponseTokensItem { elem.SetFake() } - s.ApiKeys = append(s.ApiKeys, elem) + s.Tokens = append(s.Tokens, elem) } } } @@ -2352,40 +2450,11 @@ func (s *FindAllApiTokensResponseResponse) SetFake() { } } -// SetFake set fake values. -func (s *FindAllApiTokensResponseResponseApiKeysItem) SetFake() { - { - { - s.UUID = uuid.New() - } - } - { - { - s.Token = "string" - } - } - { - { - s.TokenName = "string" - } - } - { - { - s.CreatedAt = time.Now() - } - } - { - { - s.UpdatedAt = time.Now() - } - } -} - // SetFake set fake values. func (s *FindAllApiTokensResponseResponseDocs) SetFake() { { { - s.IsDocsEnabled = true + s.Enabled = true } } { @@ -2400,6 +2469,47 @@ func (s *FindAllApiTokensResponseResponseDocs) SetFake() { } } +// SetFake set fake values. +func (s *FindAllApiTokensResponseResponseTokensItem) SetFake() { + { + { + s.UUID = uuid.New() + } + } + { + { + s.Name = "string" + } + } + { + { + s.ExpireAt = time.Now() + } + } + { + { + s.Scopes = nil + for i := 0; i < 0; i++ { + var elem string + { + elem = "string" + } + s.Scopes = append(s.Scopes, elem) + } + } + } + { + { + s.CreatedAt = time.Now() + } + } + { + { + s.UpdatedAt = time.Now() + } + } +} + // SetFake set fake values. func (s *ForbiddenError) SetFake() { { @@ -2573,6 +2683,103 @@ func (s *GetAllUsersResponseResponse) SetFake() { } } +// SetFake set fake values. +func (s *GetApiTokenScopesResponse) SetFake() { + { + { + s.Response.SetFake() + } + } +} + +// SetFake set fake values. +func (s *GetApiTokenScopesResponseResponse) SetFake() { + { + { + s.Wildcard = "string" + } + } + { + { + s.Resources = nil + for i := 0; i < 0; i++ { + var elem GetApiTokenScopesResponseResponseResourcesItem + { + elem.SetFake() + } + s.Resources = append(s.Resources, elem) + } + } + } +} + +// SetFake set fake values. +func (s *GetApiTokenScopesResponseResponseResourcesItem) SetFake() { + { + { + s.Resource = "string" + } + } + { + { + s.ResourceScopes = nil + for i := 0; i < 0; i++ { + var elem string + { + elem = "string" + } + s.ResourceScopes = append(s.ResourceScopes, elem) + } + } + } + { + { + s.Endpoints = nil + for i := 0; i < 0; i++ { + var elem GetApiTokenScopesResponseResponseResourcesItemEndpointsItem + { + elem.SetFake() + } + s.Endpoints = append(s.Endpoints, elem) + } + } + } +} + +// SetFake set fake values. +func (s *GetApiTokenScopesResponseResponseResourcesItemEndpointsItem) SetFake() { + { + { + s.Key = "string" + } + } + { + { + s.Kind.SetFake() + } + } + { + { + s.Method = "string" + } + } + { + { + s.Path = "string" + } + } + { + { + s.Description = "string" + } + } +} + +// SetFake set fake values. +func (s *GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKind) SetFake() { + *s = GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKindRead +} + // SetFake set fake values. func (s *GetBandwidthStatsResponse) SetFake() { { @@ -2683,18 +2890,6 @@ func (s *GetHwidDevicesStatsResponseResponse) SetFake() { } } } - { - { - s.ByApp = nil - for i := 0; i < 0; i++ { - var elem ByAppItem - { - elem.SetFake() - } - s.ByApp = append(s.ByApp, elem) - } - } - } { { s.Stats.SetFake() @@ -2714,6 +2909,18 @@ func (s *GetHwidDevicesStatsResponseResponseByPlatformItem) SetFake() { s.Count = float64(0) } } + { + { + s.ByApp = nil + for i := 0; i < 0; i++ { + var elem ByAppItem + { + elem.SetFake() + } + s.ByApp = append(s.ByApp, elem) + } + } + } } // SetFake set fake values. @@ -3224,7 +3431,31 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfo) SetFake } { { - s.IsHwidLimited = true + s.HwidCheckup.SetFake() + } + } +} + +// SetFake set fake values. +func (s *GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup) SetFake() { + { + { + s.SubscriptionAllowed = true + } + } + { + { + s.MaxDeviceReached = true + } + } + { + { + s.HwidNotSupported = true + } + } + { + { + s.LimitBypassed = true } } } @@ -3321,6 +3552,11 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemCl s.MihomoX25519 = true } } + { + { + s.MihomoIpVersion.SetFake() + } + } { { s.ServerDescription.SetFake() @@ -3333,6 +3569,11 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemCl } } +// SetFake set fake values. +func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion) SetFake() { + *s = GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionDual +} + // SetFake set fake values. func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemMetadata) SetFake() { { @@ -3342,7 +3583,14 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemMe } { { - s.Tag.SetFake() + s.Tags = nil + for i := 0; i < 0; i++ { + var elem string + { + elem = "string" + } + s.Tags = append(s.Tags, elem) + } } } { @@ -3509,7 +3757,12 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSe func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSecurityOptions0) SetFake() { { { - s.AllowInsecure = true + s.PinnedPeerCertSha256.SetFake() + } + } + { + { + s.VerifyPeerCertByName.SetFake() } } { @@ -3874,7 +4127,7 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemTr } { { - s.Tti = int(0) + s.ClientTti = int(0) } } { @@ -4074,71 +4327,19 @@ func (s *GetRemnawaveHealthResponseResponseRuntimeMetricsItem) SetFake() { } // SetFake set fake values. -func (s *GetStatsNodeUsersUsageResponse) SetFake() { +func (s *GetStatsNodesUsersUsageRequest) SetFake() { { { - s.Response.SetFake() - } - } -} - -// SetFake set fake values. -func (s *GetStatsNodeUsersUsageResponseResponse) SetFake() { - { - { - s.Categories = nil - for i := 0; i < 0; i++ { - var elem string + s.NodesUuids = nil + for i := 0; i < 1; i++ { + var elem uuid.UUID { - elem = "string" + elem = uuid.New() } - s.Categories = append(s.Categories, elem) + s.NodesUuids = append(s.NodesUuids, elem) } } } - { - { - s.SparklineData = nil - for i := 0; i < 0; i++ { - var elem float64 - { - elem = float64(0) - } - s.SparklineData = append(s.SparklineData, elem) - } - } - } - { - { - s.TopUsers = nil - for i := 0; i < 0; i++ { - var elem GetStatsNodeUsersUsageResponseResponseTopUsersItem - { - elem.SetFake() - } - s.TopUsers = append(s.TopUsers, elem) - } - } - } -} - -// SetFake set fake values. -func (s *GetStatsNodeUsersUsageResponseResponseTopUsersItem) SetFake() { - { - { - s.Color = "string" - } - } - { - { - s.Username = "string" - } - } - { - { - s.Total = float64(0) - } - } } // SetFake set fake values. @@ -4714,6 +4915,41 @@ func (s *GetUserSubscriptionRequestHistoryResponse) SetFake() { } } +// SetFake set fake values. +func (s *GetUsersStreamResponse) SetFake() { + { + { + s.Response.SetFake() + } + } +} + +// SetFake set fake values. +func (s *GetUsersStreamResponseResponse) SetFake() { + { + { + s.Users = nil + for i := 0; i < 0; i++ { + var elem UserItemInfo + { + elem.SetFake() + } + s.Users = append(s.Users, elem) + } + } + } + { + { + s.NextCursor.SetFake() + } + } + { + { + s.HasMore = true + } + } +} + // SetFake set fake values. func (s *Github) SetFake() { { @@ -4813,7 +5049,7 @@ func (s *HostItem) SetFake() { } { { - s.IsDisabled.SetFake() + s.IsDisabled = true } } { @@ -4823,7 +5059,7 @@ func (s *HostItem) SetFake() { } { { - s.XHttpExtraParams = []byte("null") + s.XhttpExtraParams = []byte("null") } } { @@ -4853,7 +5089,14 @@ func (s *HostItem) SetFake() { } { { - s.Tag.SetFake() + s.Tags = nil + for i := 0; i < 0; i++ { + var elem string + { + elem = "string" + } + s.Tags = append(s.Tags, elem) + } } } { @@ -4878,7 +5121,12 @@ func (s *HostItem) SetFake() { } { { - s.AllowInsecure.SetFake() + s.PinnedPeerCertSha256.SetFake() + } + } + { + { + s.VerifyPeerCertByName.SetFake() } } { @@ -4891,6 +5139,11 @@ func (s *HostItem) SetFake() { s.MihomoX25519 = true } } + { + { + s.MihomoIpVersion.SetFake() + } + } { { s.Nodes = nil @@ -4934,11 +5187,21 @@ func (s *HostItem) SetFake() { } } +// SetFake set fake values. +func (s *HostItemAlpn) SetFake() { + *s = HostItemAlpnH3 +} + // SetFake set fake values. func (s *HostItemExcludeFromSubscriptionTypesItem) SetFake() { *s = HostItemExcludeFromSubscriptionTypesItemXRAYJSON } +// SetFake set fake values. +func (s *HostItemMihomoIpVersion) SetFake() { + *s = HostItemMihomoIpVersionDual +} + // SetFake set fake values. func (s *HostItemSecurityLayer) SetFake() { *s = HostItemSecurityLayerDEFAULT @@ -5197,6 +5460,20 @@ func (s *InfraProviderResponseResponse) SetFake() { } } +// SetFake set fake values. +func (s *InfraProvidersDetail) SetFake() { + { + { + s.NodeUuid = uuid.New() + } + } + { + { + s.CountryCode = "string" + } + } +} + // SetFake set fake values. func (s *InterfaceItem) SetFake() { { @@ -5476,6 +5753,16 @@ func (s *NilFloat64) SetFake() { s.Null = true } +// SetFake set fake values. +func (s *NilGetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup) SetFake() { + s.Null = true +} + +// SetFake set fake values. +func (s *NilGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion) SetFake() { + s.Null = true +} + // SetFake set fake values. func (s *NilGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemTransportOptions0Header) SetFake() { s.Null = true @@ -5501,6 +5788,16 @@ func (s *NilGetStatusResponseResponseAuthentication) SetFake() { s.Null = true } +// SetFake set fake values. +func (s *NilHostItemAlpn) SetFake() { + s.Null = true +} + +// SetFake set fake values. +func (s *NilHostItemMihomoIpVersion) SetFake() { + s.Null = true +} + // SetFake set fake values. func (s *NilHostOverride) SetFake() { s.Null = true @@ -5511,6 +5808,11 @@ func (s *NilHwidSettings) SetFake() { s.Null = true } +// SetFake set fake values. +func (s *NilInfraProvidersDetail) SetFake() { + s.Null = true +} + // SetFake set fake values. func (s *NilInt) SetFake() { s.Null = true @@ -5682,6 +5984,15 @@ func (s *NodePluginsResponseResponseResponse) SetFake() { } } +// SetFake set fake values. +func (s *NodeRequestBodyRequest) SetFake() { + { + { + s.ForceRestart = true + } + } +} + // SetFake set fake values. func (s *NodeResponse) SetFake() { { @@ -5713,6 +6024,11 @@ func (s *NodeResponseDataItem) SetFake() { s.Port.SetFake() } } + { + { + s.ProxyUrl.SetFake() + } + } { { s.IsConnected = true @@ -5778,6 +6094,11 @@ func (s *NodeResponseDataItem) SetFake() { s.ConsumptionMultiplier = float64(0) } } + { + { + s.NodeConsumptionMultiplier = float64(0) + } + } { { s.Tags = nil @@ -5840,6 +6161,11 @@ func (s *NodeResponseDataItem) SetFake() { s.UsersOnline = float64(0) } } + { + { + s.Note.SetFake() + } + } } // SetFake set fake values. @@ -6131,6 +6457,15 @@ func (s *OptDebugSrrMatcherSettings) SetFake() { s.SetTo(elem) } +// SetFake set fake values. +func (s *OptEncryptionItem) SetFake() { + var elem EncryptionItem + { + elem.SetFake() + } + s.SetTo(elem) +} + // SetFake set fake values. func (s *OptFloat64) SetFake() { var elem float64 @@ -6243,7 +6578,7 @@ func (s *OptNilCreateHostRequestAlpn) SetFake() { } // SetFake set fake values. -func (s *OptNilCreateHostRequestFingerprint) SetFake() { +func (s *OptNilCreateHostRequestMihomoIpVersion) SetFake() { s.Null = true s.Set = true } @@ -6327,7 +6662,19 @@ func (s *OptNilUpdateHostRequestAlpn) SetFake() { } // SetFake set fake values. -func (s *OptNilUpdateHostRequestFingerprint) SetFake() { +func (s *OptNilUpdateHostRequestMihomoIpVersion) SetFake() { + s.Null = true + s.Set = true +} + +// SetFake set fake values. +func (s *OptNilUpdateManyHostsRequestAlpn) SetFake() { + s.Null = true + s.Set = true +} + +// SetFake set fake values. +func (s *OptNilUpdateManyHostsRequestMihomoIpVersion) SetFake() { s.Null = true s.Set = true } @@ -6395,6 +6742,15 @@ func (s *OptUpdateHostRequestSecurityLayer) SetFake() { s.SetTo(elem) } +// SetFake set fake values. +func (s *OptUpdateManyHostsRequestSecurityLayer) SetFake() { + var elem UpdateManyHostsRequestSecurityLayer + { + elem.SetFake() + } + s.SetTo(elem) +} + // SetFake set fake values. func (s *OptUpdateSubscriptionSettingsRequestCustomResponseHeaders) SetFake() { var elem UpdateSubscriptionSettingsRequestCustomResponseHeaders @@ -6852,7 +7208,7 @@ func (s *Record) SetFake() { } { { - s.UserUuid = uuid.New() + s.UserId = float64(0) } } { @@ -7083,6 +7439,28 @@ func (s *ResponseModification) SetFake() { } } } + { + { + s.DisableHwidCheck.SetFake() + } + } + { + { + s.Encryption.SetFake() + } + } + { + { + s.ExcludeHostsByTags = nil + for i := 0; i < 1; i++ { + var elem string + { + elem = "string" + } + s.ExcludeHostsByTags = append(s.ExcludeHostsByTags, elem) + } + } + } } // SetFake set fake values. @@ -7116,15 +7494,6 @@ func (s *ResponseRulesVersion) SetFake() { *s = ResponseRulesVersion1 } -// SetFake set fake values. -func (s *RestartAllNodesRequestBody) SetFake() { - { - { - s.ForceRestart.SetFake() - } - } -} - // SetFake set fake values. func (s *RevokeUserSubscriptionBody) SetFake() { { @@ -7195,53 +7564,6 @@ func (s *RuleResponseType) SetFake() { *s = RuleResponseTypeXRAYJSON } -// SetFake set fake values. -func (s *SetInboundToManyHostsRequest) SetFake() { - { - { - s.Uuids = nil - for i := 0; i < 0; i++ { - var elem uuid.UUID - { - elem = uuid.New() - } - s.Uuids = append(s.Uuids, elem) - } - } - } - { - { - s.ConfigProfileUuid = uuid.New() - } - } - { - { - s.ConfigProfileInboundUuid = uuid.New() - } - } -} - -// SetFake set fake values. -func (s *SetPortToManyHostsRequest) SetFake() { - { - { - s.Uuids = nil - for i := 0; i < 0; i++ { - var elem uuid.UUID - { - elem = uuid.New() - } - s.Uuids = append(s.Uuids, elem) - } - } - } - { - { - s.Port = int(0) - } - } -} - // SetFake set fake values. func (s *SettingsResponse) SetFake() { { @@ -7380,6 +7702,74 @@ func (s *Stat) SetFake() { } } +// SetFake set fake values. +func (s *StatsNodeUsersUsageResponseResponse) SetFake() { + { + { + s.Response.SetFake() + } + } +} + +// SetFake set fake values. +func (s *StatsNodeUsersUsageResponseResponseResponse) SetFake() { + { + { + s.Categories = nil + for i := 0; i < 0; i++ { + var elem string + { + elem = "string" + } + s.Categories = append(s.Categories, elem) + } + } + } + { + { + s.SparklineData = nil + for i := 0; i < 0; i++ { + var elem float64 + { + elem = float64(0) + } + s.SparklineData = append(s.SparklineData, elem) + } + } + } + { + { + s.TopUsers = nil + for i := 0; i < 0; i++ { + var elem StatsNodeUsersUsageResponseResponseResponseTopUsersItem + { + elem.SetFake() + } + s.TopUsers = append(s.TopUsers, elem) + } + } + } +} + +// SetFake set fake values. +func (s *StatsNodeUsersUsageResponseResponseResponseTopUsersItem) SetFake() { + { + { + s.Color = "string" + } + } + { + { + s.Username = "string" + } + } + { + { + s.Total = float64(0) + } + } +} + // SetFake set fake values. func (s *StatsUserUsageResponseResponse) SetFake() { { @@ -8224,7 +8614,7 @@ func (s *UpdateHostRequest) SetFake() { } { { - s.XHttpExtraParams = []byte("null") + s.XhttpExtraParams = []byte("null") } } { @@ -8249,7 +8639,14 @@ func (s *UpdateHostRequest) SetFake() { } { { - s.Tag.SetFake() + s.Tags = nil + for i := 0; i < 0; i++ { + var elem string + { + elem = "string" + } + s.Tags = append(s.Tags, elem) + } } } { @@ -8274,7 +8671,12 @@ func (s *UpdateHostRequest) SetFake() { } { { - s.AllowInsecure.SetFake() + s.PinnedPeerCertSha256.SetFake() + } + } + { + { + s.VerifyPeerCertByName.SetFake() } } { @@ -8287,6 +8689,11 @@ func (s *UpdateHostRequest) SetFake() { s.MihomoX25519.SetFake() } } + { + { + s.MihomoIpVersion.SetFake() + } + } { { s.Nodes = nil @@ -8341,8 +8748,8 @@ func (s *UpdateHostRequestExcludeFromSubscriptionTypesItem) SetFake() { } // SetFake set fake values. -func (s *UpdateHostRequestFingerprint) SetFake() { - *s = UpdateHostRequestFingerprintChrome +func (s *UpdateHostRequestMihomoIpVersion) SetFake() { + *s = UpdateHostRequestMihomoIpVersionDual } // SetFake set fake values. @@ -8421,6 +8828,220 @@ func (s *UpdateInternalSquadRequest) SetFake() { } } +// SetFake set fake values. +func (s *UpdateManyHostsRequest) SetFake() { + { + { + s.Inbound.SetFake() + } + } + { + { + s.Remark.SetFake() + } + } + { + { + s.Address.SetFake() + } + } + { + { + s.Port.SetFake() + } + } + { + { + s.Path.SetFake() + } + } + { + { + s.Sni.SetFake() + } + } + { + { + s.Host.SetFake() + } + } + { + { + s.Alpn.SetFake() + } + } + { + { + s.Fingerprint.SetFake() + } + } + { + { + s.IsDisabled.SetFake() + } + } + { + { + s.SecurityLayer.SetFake() + } + } + { + { + s.XhttpExtraParams = []byte("null") + } + } + { + { + s.MuxParams = []byte("null") + } + } + { + { + s.SockoptParams = []byte("null") + } + } + { + { + s.FinalMask = []byte("null") + } + } + { + { + s.ServerDescription.SetFake() + } + } + { + { + s.Tags = nil + for i := 0; i < 0; i++ { + var elem string + { + elem = "string" + } + s.Tags = append(s.Tags, elem) + } + } + } + { + { + s.IsHidden.SetFake() + } + } + { + { + s.OverrideSniFromAddress.SetFake() + } + } + { + { + s.KeepSniBlank.SetFake() + } + } + { + { + s.VlessRouteId.SetFake() + } + } + { + { + s.PinnedPeerCertSha256.SetFake() + } + } + { + { + s.VerifyPeerCertByName.SetFake() + } + } + { + { + s.ShuffleHost.SetFake() + } + } + { + { + s.MihomoX25519.SetFake() + } + } + { + { + s.MihomoIpVersion.SetFake() + } + } + { + { + s.Nodes = nil + for i := 0; i < 0; i++ { + var elem uuid.UUID + { + elem = uuid.New() + } + s.Nodes = append(s.Nodes, elem) + } + } + } + { + { + s.XrayJsonTemplateUuid.SetFake() + } + } + { + { + s.ExcludedInternalSquads = nil + for i := 0; i < 0; i++ { + var elem uuid.UUID + { + elem = uuid.New() + } + s.ExcludedInternalSquads = append(s.ExcludedInternalSquads, elem) + } + } + } + { + { + s.ExcludeFromSubscriptionTypes = nil + for i := 0; i < 0; i++ { + var elem UpdateManyHostsRequestExcludeFromSubscriptionTypesItem + { + elem.SetFake() + } + s.ExcludeFromSubscriptionTypes = append(s.ExcludeFromSubscriptionTypes, elem) + } + } + } + { + { + s.Uuids = nil + for i := 0; i < 1; i++ { + var elem uuid.UUID + { + elem = uuid.New() + } + s.Uuids = append(s.Uuids, elem) + } + } + } +} + +// SetFake set fake values. +func (s *UpdateManyHostsRequestAlpn) SetFake() { + *s = UpdateManyHostsRequestAlpnH3 +} + +// SetFake set fake values. +func (s *UpdateManyHostsRequestExcludeFromSubscriptionTypesItem) SetFake() { + *s = UpdateManyHostsRequestExcludeFromSubscriptionTypesItemXRAYJSON +} + +// SetFake set fake values. +func (s *UpdateManyHostsRequestMihomoIpVersion) SetFake() { + *s = UpdateManyHostsRequestMihomoIpVersionDual +} + +// SetFake set fake values. +func (s *UpdateManyHostsRequestSecurityLayer) SetFake() { + *s = UpdateManyHostsRequestSecurityLayerDEFAULT +} + // SetFake set fake values. func (s *UpdateNodePluginRequest) SetFake() { { @@ -8462,6 +9083,11 @@ func (s *UpdateNodeRequest) SetFake() { s.Port.SetFake() } } + { + { + s.ProxyUrl.SetFake() + } + } { { s.IsTrafficTrackingActive.SetFake() @@ -8492,6 +9118,11 @@ func (s *UpdateNodeRequest) SetFake() { s.ConsumptionMultiplier.SetFake() } } + { + { + s.NodeConsumptionMultiplier.SetFake() + } + } { { s.ConfigProfile.SetFake() @@ -8519,6 +9150,11 @@ func (s *UpdateNodeRequest) SetFake() { s.ActivePluginUuid.SetFake() } } + { + { + s.Note.SetFake() + } + } } // SetFake set fake values. diff --git a/api/oas_interfaces_gen.go b/api/oas_interfaces_gen.go index 5820b89..952aad9 100644 --- a/api/oas_interfaces_gen.go +++ b/api/oas_interfaces_gen.go @@ -13,6 +13,10 @@ type ApiTokensFindAllRes interface { apiTokensFindAllRes() } +type ApiTokensGetScopesRes interface { + apiTokensGetScopesRes() +} + type AuthGetStatusRes interface { authGetStatusRes() } @@ -49,6 +53,10 @@ type BandwidthStatsNodesGetStatsNodeUsersUsageRes interface { bandwidthStatsNodesGetStatsNodeUsersUsageRes() } +type BandwidthStatsNodesGetStatsNodesUsersUsageRes interface { + bandwidthStatsNodesGetStatsNodesUsersUsageRes() +} + type BandwidthStatsUsersGetStatsNodesUsageRes interface { bandwidthStatsUsersGetStatsNodesUsageRes() } @@ -137,10 +145,6 @@ type HostsBulkActionsEnableHostsRes interface { hostsBulkActionsEnableHostsRes() } -type HostsBulkActionsSetInboundToHostsRes interface { - hostsBulkActionsSetInboundToHostsRes() -} - type HostsBulkActionsSetPortToHostsRes interface { hostsBulkActionsSetPortToHostsRes() } @@ -561,10 +565,6 @@ type SystemDebugSrrMatcherRes interface { systemDebugSrrMatcherRes() } -type SystemEncryptHappCryptoLinkRes interface { - systemEncryptHappCryptoLinkRes() -} - type SystemGetBandwidthStatsRes interface { systemGetBandwidthStatsRes() } @@ -717,6 +717,10 @@ type UsersGetUsersByTagRes interface { usersGetUsersByTagRes() } +type UsersGetUsersStreamRes interface { + usersGetUsersStreamRes() +} + type UsersResetUserTrafficRes interface { usersResetUserTrafficRes() } diff --git a/api/oas_json_gen.go b/api/oas_json_gen.go index 88f9832..6bd6377 100644 --- a/api/oas_json_gen.go +++ b/api/oas_json_gen.go @@ -1331,24 +1331,19 @@ func (s *BillingNode) Encode(e *jx.Encoder) { // encodeFields encodes fields. func (s *BillingNode) encodeFields(e *jx.Encoder) { - { - e.FieldStart("nodeUuid") - json.EncodeUUID(e, s.NodeUuid) - } { e.FieldStart("name") e.Str(s.Name) } { - e.FieldStart("countryCode") - e.Str(s.CountryCode) + e.FieldStart("details") + s.Details.Encode(e) } } -var jsonFieldsNameOfBillingNode = [3]string{ - 0: "nodeUuid", - 1: "name", - 2: "countryCode", +var jsonFieldsNameOfBillingNode = [2]string{ + 0: "name", + 1: "details", } // Decode decodes BillingNode from json. @@ -1360,20 +1355,8 @@ func (s *BillingNode) Decode(d *jx.Decoder) error { if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { switch string(k) { - case "nodeUuid": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - v, err := json.DecodeUUID(d) - s.NodeUuid = v - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"nodeUuid\"") - } case "name": - requiredBitSet[0] |= 1 << 1 + requiredBitSet[0] |= 1 << 0 if err := func() error { v, err := d.Str() s.Name = string(v) @@ -1384,17 +1367,15 @@ func (s *BillingNode) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"name\"") } - case "countryCode": - requiredBitSet[0] |= 1 << 2 + case "details": + requiredBitSet[0] |= 1 << 1 if err := func() error { - v, err := d.Str() - s.CountryCode = string(v) - if err != nil { + if err := s.Details.Decode(d); err != nil { return err } return nil }(); err != nil { - return errors.Wrap(err, "decode field \"countryCode\"") + return errors.Wrap(err, "decode field \"details\"") } default: return d.Skip() @@ -1406,7 +1387,7 @@ func (s *BillingNode) Decode(d *jx.Decoder) error { // Validate required fields. var failures []validate.FieldError for i, mask := range [1]uint8{ - 0b00000111, + 0b00000011, } { if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { // Mask only required fields and check equality to mask using XOR. @@ -1743,7 +1724,11 @@ func (s *BillingNodesResponseResponseBillingNodesItem) encodeFields(e *jx.Encode } { e.FieldStart("nodeUuid") - json.EncodeUUID(e, s.NodeUuid) + s.NodeUuid.Encode(e) + } + { + e.FieldStart("name") + s.Name.Encode(e) } { e.FieldStart("providerUuid") @@ -1771,15 +1756,16 @@ func (s *BillingNodesResponseResponseBillingNodesItem) encodeFields(e *jx.Encode } } -var jsonFieldsNameOfBillingNodesResponseResponseBillingNodesItem = [8]string{ +var jsonFieldsNameOfBillingNodesResponseResponseBillingNodesItem = [9]string{ 0: "uuid", 1: "nodeUuid", - 2: "providerUuid", - 3: "provider", - 4: "node", - 5: "nextBillingAt", - 6: "createdAt", - 7: "updatedAt", + 2: "name", + 3: "providerUuid", + 4: "provider", + 5: "node", + 6: "nextBillingAt", + 7: "createdAt", + 8: "updatedAt", } // Decode decodes BillingNodesResponseResponseBillingNodesItem from json. @@ -1787,7 +1773,7 @@ func (s *BillingNodesResponseResponseBillingNodesItem) Decode(d *jx.Decoder) err if s == nil { return errors.New("invalid: unable to decode BillingNodesResponseResponseBillingNodesItem to nil") } - var requiredBitSet [1]uint8 + var requiredBitSet [2]uint8 if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { switch string(k) { @@ -1806,17 +1792,25 @@ func (s *BillingNodesResponseResponseBillingNodesItem) Decode(d *jx.Decoder) err case "nodeUuid": requiredBitSet[0] |= 1 << 1 if err := func() error { - v, err := json.DecodeUUID(d) - s.NodeUuid = v - if err != nil { + if err := s.NodeUuid.Decode(d); err != nil { return err } return nil }(); err != nil { return errors.Wrap(err, "decode field \"nodeUuid\"") } - case "providerUuid": + case "name": requiredBitSet[0] |= 1 << 2 + if err := func() error { + if err := s.Name.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + case "providerUuid": + requiredBitSet[0] |= 1 << 3 if err := func() error { v, err := json.DecodeUUID(d) s.ProviderUuid = v @@ -1828,7 +1822,7 @@ func (s *BillingNodesResponseResponseBillingNodesItem) Decode(d *jx.Decoder) err return errors.Wrap(err, "decode field \"providerUuid\"") } case "provider": - requiredBitSet[0] |= 1 << 3 + requiredBitSet[0] |= 1 << 4 if err := func() error { if err := s.Provider.Decode(d); err != nil { return err @@ -1838,7 +1832,7 @@ func (s *BillingNodesResponseResponseBillingNodesItem) Decode(d *jx.Decoder) err return errors.Wrap(err, "decode field \"provider\"") } case "node": - requiredBitSet[0] |= 1 << 4 + requiredBitSet[0] |= 1 << 5 if err := func() error { if err := s.Node.Decode(d); err != nil { return err @@ -1848,7 +1842,7 @@ func (s *BillingNodesResponseResponseBillingNodesItem) Decode(d *jx.Decoder) err return errors.Wrap(err, "decode field \"node\"") } case "nextBillingAt": - requiredBitSet[0] |= 1 << 5 + requiredBitSet[0] |= 1 << 6 if err := func() error { v, err := json.DecodeDateTime(d) s.NextBillingAt = v @@ -1860,7 +1854,7 @@ func (s *BillingNodesResponseResponseBillingNodesItem) Decode(d *jx.Decoder) err return errors.Wrap(err, "decode field \"nextBillingAt\"") } case "createdAt": - requiredBitSet[0] |= 1 << 6 + requiredBitSet[0] |= 1 << 7 if err := func() error { v, err := json.DecodeDateTime(d) s.CreatedAt = v @@ -1872,7 +1866,7 @@ func (s *BillingNodesResponseResponseBillingNodesItem) Decode(d *jx.Decoder) err return errors.Wrap(err, "decode field \"createdAt\"") } case "updatedAt": - requiredBitSet[0] |= 1 << 7 + requiredBitSet[1] |= 1 << 0 if err := func() error { v, err := json.DecodeDateTime(d) s.UpdatedAt = v @@ -1892,8 +1886,9 @@ func (s *BillingNodesResponseResponseBillingNodesItem) Decode(d *jx.Decoder) err } // Validate required fields. var failures []validate.FieldError - for i, mask := range [1]uint8{ + for i, mask := range [2]uint8{ 0b11111111, + 0b00000001, } { if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { // Mask only required fields and check equality to mask using XOR. @@ -3441,6 +3436,12 @@ func (s *BulkNodesUpdateRequestFields) encodeFields(e *jx.Encoder) { s.ConsumptionMultiplier.Encode(e) } } + { + if s.NodeConsumptionMultiplier.Set { + e.FieldStart("nodeConsumptionMultiplier") + s.NodeConsumptionMultiplier.Encode(e) + } + } { if s.ProviderUuid.Set { e.FieldStart("providerUuid") @@ -3463,14 +3464,22 @@ func (s *BulkNodesUpdateRequestFields) encodeFields(e *jx.Encoder) { s.ActivePluginUuid.Encode(e) } } + { + if s.Note.Set { + e.FieldStart("note") + s.Note.Encode(e) + } + } } -var jsonFieldsNameOfBulkNodesUpdateRequestFields = [5]string{ +var jsonFieldsNameOfBulkNodesUpdateRequestFields = [7]string{ 0: "countryCode", 1: "consumptionMultiplier", - 2: "providerUuid", - 3: "tags", - 4: "activePluginUuid", + 2: "nodeConsumptionMultiplier", + 3: "providerUuid", + 4: "tags", + 5: "activePluginUuid", + 6: "note", } // Decode decodes BulkNodesUpdateRequestFields from json. @@ -3501,6 +3510,16 @@ func (s *BulkNodesUpdateRequestFields) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"consumptionMultiplier\"") } + case "nodeConsumptionMultiplier": + if err := func() error { + s.NodeConsumptionMultiplier.Reset() + if err := s.NodeConsumptionMultiplier.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"nodeConsumptionMultiplier\"") + } case "providerUuid": if err := func() error { s.ProviderUuid.Reset() @@ -3540,6 +3559,16 @@ func (s *BulkNodesUpdateRequestFields) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"activePluginUuid\"") } + case "note": + if err := func() error { + s.Note.Reset() + if err := s.Note.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"note\"") + } default: return d.Skip() } @@ -5710,13 +5739,29 @@ func (s *CreateApiTokenRequest) Encode(e *jx.Encoder) { // encodeFields encodes fields. func (s *CreateApiTokenRequest) encodeFields(e *jx.Encoder) { { - e.FieldStart("tokenName") - e.Str(s.TokenName) + e.FieldStart("name") + e.Str(s.Name) + } + { + e.FieldStart("expiresInDays") + e.Float64(s.ExpiresInDays) + } + { + if s.Scopes != nil { + e.FieldStart("scopes") + e.ArrStart() + for _, elem := range s.Scopes { + e.Str(elem) + } + e.ArrEnd() + } } } -var jsonFieldsNameOfCreateApiTokenRequest = [1]string{ - 0: "tokenName", +var jsonFieldsNameOfCreateApiTokenRequest = [3]string{ + 0: "name", + 1: "expiresInDays", + 2: "scopes", } // Decode decodes CreateApiTokenRequest from json. @@ -5728,17 +5773,48 @@ func (s *CreateApiTokenRequest) Decode(d *jx.Decoder) error { if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { switch string(k) { - case "tokenName": + case "name": requiredBitSet[0] |= 1 << 0 if err := func() error { v, err := d.Str() - s.TokenName = string(v) + s.Name = string(v) if err != nil { return err } return nil }(); err != nil { - return errors.Wrap(err, "decode field \"tokenName\"") + return errors.Wrap(err, "decode field \"name\"") + } + case "expiresInDays": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Float64() + s.ExpiresInDays = float64(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"expiresInDays\"") + } + case "scopes": + if err := func() error { + s.Scopes = make([]string, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem string + v, err := d.Str() + elem = string(v) + if err != nil { + return err + } + s.Scopes = append(s.Scopes, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"scopes\"") } default: return d.Skip() @@ -5750,7 +5826,7 @@ func (s *CreateApiTokenRequest) Decode(d *jx.Decoder) error { // Validate required fields. var failures []validate.FieldError for i, mask := range [1]uint8{ - 0b00000001, + 0b00000011, } { if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { // Mask only required fields and check equality to mask using XOR. @@ -5899,19 +5975,48 @@ func (s *CreateApiTokenResponseResponse) Encode(e *jx.Encoder) { // encodeFields encodes fields. func (s *CreateApiTokenResponseResponse) encodeFields(e *jx.Encoder) { + { + e.FieldStart("uuid") + json.EncodeUUID(e, s.UUID) + } + { + e.FieldStart("name") + e.Str(s.Name) + } + { + e.FieldStart("expireAt") + json.EncodeDateTime(e, s.ExpireAt) + } + { + e.FieldStart("scopes") + e.ArrStart() + for _, elem := range s.Scopes { + e.Str(elem) + } + e.ArrEnd() + } + { + e.FieldStart("createdAt") + json.EncodeDateTime(e, s.CreatedAt) + } + { + e.FieldStart("updatedAt") + json.EncodeDateTime(e, s.UpdatedAt) + } { e.FieldStart("token") e.Str(s.Token) } - { - e.FieldStart("uuid") - e.Str(s.UUID) - } } -var jsonFieldsNameOfCreateApiTokenResponseResponse = [2]string{ - 0: "token", - 1: "uuid", +var jsonFieldsNameOfCreateApiTokenResponseResponse = [7]string{ + 0: "uuid", + 1: "name", + 2: "expireAt", + 3: "scopes", + 4: "createdAt", + 5: "updatedAt", + 6: "token", } // Decode decodes CreateApiTokenResponseResponse from json. @@ -5923,8 +6028,88 @@ func (s *CreateApiTokenResponseResponse) Decode(d *jx.Decoder) error { if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { switch string(k) { - case "token": + case "uuid": requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := json.DecodeUUID(d) + s.UUID = v + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"uuid\"") + } + case "name": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + case "expireAt": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + v, err := json.DecodeDateTime(d) + s.ExpireAt = v + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"expireAt\"") + } + case "scopes": + requiredBitSet[0] |= 1 << 3 + if err := func() error { + s.Scopes = make([]string, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem string + v, err := d.Str() + elem = string(v) + if err != nil { + return err + } + s.Scopes = append(s.Scopes, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"scopes\"") + } + case "createdAt": + requiredBitSet[0] |= 1 << 4 + if err := func() error { + v, err := json.DecodeDateTime(d) + s.CreatedAt = v + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"createdAt\"") + } + case "updatedAt": + requiredBitSet[0] |= 1 << 5 + if err := func() error { + v, err := json.DecodeDateTime(d) + s.UpdatedAt = v + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"updatedAt\"") + } + case "token": + requiredBitSet[0] |= 1 << 6 if err := func() error { v, err := d.Str() s.Token = string(v) @@ -5935,18 +6120,6 @@ func (s *CreateApiTokenResponseResponse) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"token\"") } - case "uuid": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.UUID = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"uuid\"") - } default: return d.Skip() } @@ -5957,7 +6130,7 @@ func (s *CreateApiTokenResponseResponse) Decode(d *jx.Decoder) error { // Validate required fields. var failures []validate.FieldError for i, mask := range [1]uint8{ - 0b00000011, + 0b01111111, } { if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { // Mask only required fields and check equality to mask using XOR. @@ -6322,9 +6495,9 @@ func (s *CreateHostRequest) encodeFields(e *jx.Encoder) { } } { - if len(s.XHttpExtraParams) != 0 { - e.FieldStart("xHttpExtraParams") - e.Raw(s.XHttpExtraParams) + if len(s.XhttpExtraParams) != 0 { + e.FieldStart("xhttpExtraParams") + e.Raw(s.XhttpExtraParams) } } { @@ -6352,9 +6525,13 @@ func (s *CreateHostRequest) encodeFields(e *jx.Encoder) { } } { - if s.Tag.Set { - e.FieldStart("tag") - s.Tag.Encode(e) + if s.Tags != nil { + e.FieldStart("tags") + e.ArrStart() + for _, elem := range s.Tags { + e.Str(elem) + } + e.ArrEnd() } } { @@ -6376,9 +6553,15 @@ func (s *CreateHostRequest) encodeFields(e *jx.Encoder) { } } { - if s.AllowInsecure.Set { - e.FieldStart("allowInsecure") - s.AllowInsecure.Encode(e) + if s.PinnedPeerCertSha256.Set { + e.FieldStart("pinnedPeerCertSha256") + s.PinnedPeerCertSha256.Encode(e) + } + } + { + if s.VerifyPeerCertByName.Set { + e.FieldStart("verifyPeerCertByName") + s.VerifyPeerCertByName.Encode(e) } } { @@ -6399,6 +6582,12 @@ func (s *CreateHostRequest) encodeFields(e *jx.Encoder) { s.MihomoX25519.Encode(e) } } + { + if s.MihomoIpVersion.Set { + e.FieldStart("mihomoIpVersion") + s.MihomoIpVersion.Encode(e) + } + } { if s.Nodes != nil { e.FieldStart("nodes") @@ -6437,7 +6626,7 @@ func (s *CreateHostRequest) encodeFields(e *jx.Encoder) { } } -var jsonFieldsNameOfCreateHostRequest = [28]string{ +var jsonFieldsNameOfCreateHostRequest = [30]string{ 0: "inbound", 1: "remark", 2: "address", @@ -6449,23 +6638,25 @@ var jsonFieldsNameOfCreateHostRequest = [28]string{ 8: "fingerprint", 9: "isDisabled", 10: "securityLayer", - 11: "xHttpExtraParams", + 11: "xhttpExtraParams", 12: "muxParams", 13: "sockoptParams", 14: "finalMask", 15: "serverDescription", - 16: "tag", + 16: "tags", 17: "isHidden", 18: "overrideSniFromAddress", 19: "keepSniBlank", - 20: "allowInsecure", - 21: "vlessRouteId", - 22: "shuffleHost", - 23: "mihomoX25519", - 24: "nodes", - 25: "xrayJsonTemplateUuid", - 26: "excludedInternalSquads", - 27: "excludeFromSubscriptionTypes", + 20: "pinnedPeerCertSha256", + 21: "verifyPeerCertByName", + 22: "vlessRouteId", + 23: "shuffleHost", + 24: "mihomoX25519", + 25: "mihomoIpVersion", + 26: "nodes", + 27: "xrayJsonTemplateUuid", + 28: "excludedInternalSquads", + 29: "excludeFromSubscriptionTypes", } // Decode decodes CreateHostRequest from json. @@ -6594,16 +6785,16 @@ func (s *CreateHostRequest) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"securityLayer\"") } - case "xHttpExtraParams": + case "xhttpExtraParams": if err := func() error { v, err := d.RawAppend(nil) - s.XHttpExtraParams = jx.Raw(v) + s.XhttpExtraParams = jx.Raw(v) if err != nil { return err } return nil }(); err != nil { - return errors.Wrap(err, "decode field \"xHttpExtraParams\"") + return errors.Wrap(err, "decode field \"xhttpExtraParams\"") } case "muxParams": if err := func() error { @@ -6648,15 +6839,24 @@ func (s *CreateHostRequest) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"serverDescription\"") } - case "tag": + case "tags": if err := func() error { - s.Tag.Reset() - if err := s.Tag.Decode(d); err != nil { + s.Tags = make([]string, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem string + v, err := d.Str() + elem = string(v) + if err != nil { + return err + } + s.Tags = append(s.Tags, elem) + return nil + }); err != nil { return err } return nil }(); err != nil { - return errors.Wrap(err, "decode field \"tag\"") + return errors.Wrap(err, "decode field \"tags\"") } case "isHidden": if err := func() error { @@ -6688,15 +6888,25 @@ func (s *CreateHostRequest) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"keepSniBlank\"") } - case "allowInsecure": + case "pinnedPeerCertSha256": if err := func() error { - s.AllowInsecure.Reset() - if err := s.AllowInsecure.Decode(d); err != nil { + s.PinnedPeerCertSha256.Reset() + if err := s.PinnedPeerCertSha256.Decode(d); err != nil { return err } return nil }(); err != nil { - return errors.Wrap(err, "decode field \"allowInsecure\"") + return errors.Wrap(err, "decode field \"pinnedPeerCertSha256\"") + } + case "verifyPeerCertByName": + if err := func() error { + s.VerifyPeerCertByName.Reset() + if err := s.VerifyPeerCertByName.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"verifyPeerCertByName\"") } case "vlessRouteId": if err := func() error { @@ -6728,6 +6938,16 @@ func (s *CreateHostRequest) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"mihomoX25519\"") } + case "mihomoIpVersion": + if err := func() error { + s.MihomoIpVersion.Reset() + if err := s.MihomoIpVersion.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"mihomoIpVersion\"") + } case "nodes": if err := func() error { s.Nodes = make([]uuid.UUID, 0) @@ -6948,56 +7168,48 @@ func (s *CreateHostRequestExcludeFromSubscriptionTypesItem) UnmarshalJSON(data [ return s.Decode(d) } -// Encode encodes CreateHostRequestFingerprint as json. -func (s CreateHostRequestFingerprint) Encode(e *jx.Encoder) { +// Encode encodes CreateHostRequestMihomoIpVersion as json. +func (s CreateHostRequestMihomoIpVersion) Encode(e *jx.Encoder) { e.Str(string(s)) } -// Decode decodes CreateHostRequestFingerprint from json. -func (s *CreateHostRequestFingerprint) Decode(d *jx.Decoder) error { +// Decode decodes CreateHostRequestMihomoIpVersion from json. +func (s *CreateHostRequestMihomoIpVersion) Decode(d *jx.Decoder) error { if s == nil { - return errors.New("invalid: unable to decode CreateHostRequestFingerprint to nil") + return errors.New("invalid: unable to decode CreateHostRequestMihomoIpVersion to nil") } v, err := d.StrBytes() if err != nil { return err } // Try to use constant string. - switch CreateHostRequestFingerprint(v) { - case CreateHostRequestFingerprintChrome: - *s = CreateHostRequestFingerprintChrome - case CreateHostRequestFingerprintFirefox: - *s = CreateHostRequestFingerprintFirefox - case CreateHostRequestFingerprintSafari: - *s = CreateHostRequestFingerprintSafari - case CreateHostRequestFingerprintIos: - *s = CreateHostRequestFingerprintIos - case CreateHostRequestFingerprintAndroid: - *s = CreateHostRequestFingerprintAndroid - case CreateHostRequestFingerprintEdge: - *s = CreateHostRequestFingerprintEdge - case CreateHostRequestFingerprintQq: - *s = CreateHostRequestFingerprintQq - case CreateHostRequestFingerprintRandom: - *s = CreateHostRequestFingerprintRandom - case CreateHostRequestFingerprintRandomized: - *s = CreateHostRequestFingerprintRandomized + switch CreateHostRequestMihomoIpVersion(v) { + case CreateHostRequestMihomoIpVersionDual: + *s = CreateHostRequestMihomoIpVersionDual + case CreateHostRequestMihomoIpVersionIpv4: + *s = CreateHostRequestMihomoIpVersionIpv4 + case CreateHostRequestMihomoIpVersionIpv6: + *s = CreateHostRequestMihomoIpVersionIpv6 + case CreateHostRequestMihomoIpVersionIpv4Prefer: + *s = CreateHostRequestMihomoIpVersionIpv4Prefer + case CreateHostRequestMihomoIpVersionIpv6Prefer: + *s = CreateHostRequestMihomoIpVersionIpv6Prefer default: - *s = CreateHostRequestFingerprint(v) + *s = CreateHostRequestMihomoIpVersion(v) } return nil } // MarshalJSON implements stdjson.Marshaler. -func (s CreateHostRequestFingerprint) MarshalJSON() ([]byte, error) { +func (s CreateHostRequestMihomoIpVersion) MarshalJSON() ([]byte, error) { e := jx.Encoder{} s.Encode(&e) return e.Bytes(), nil } // UnmarshalJSON implements stdjson.Unmarshaler. -func (s *CreateHostRequestFingerprint) UnmarshalJSON(data []byte) error { +func (s *CreateHostRequestMihomoIpVersion) UnmarshalJSON(data []byte) error { d := jx.DecodeBytes(data) return s.Decode(d) } @@ -7189,20 +7401,23 @@ func (s *CreateInfraBillingNodeRequest) encodeFields(e *jx.Encoder) { } { e.FieldStart("nodeUuid") - json.EncodeUUID(e, s.NodeUuid) + s.NodeUuid.Encode(e) } { - if s.NextBillingAt.Set { - e.FieldStart("nextBillingAt") - s.NextBillingAt.Encode(e, json.EncodeDateTime) - } + e.FieldStart("name") + s.Name.Encode(e) + } + { + e.FieldStart("nextBillingAt") + json.EncodeDateTime(e, s.NextBillingAt) } } -var jsonFieldsNameOfCreateInfraBillingNodeRequest = [3]string{ +var jsonFieldsNameOfCreateInfraBillingNodeRequest = [4]string{ 0: "providerUuid", 1: "nodeUuid", - 2: "nextBillingAt", + 2: "name", + 3: "nextBillingAt", } // Decode decodes CreateInfraBillingNodeRequest from json. @@ -7229,19 +7444,29 @@ func (s *CreateInfraBillingNodeRequest) Decode(d *jx.Decoder) error { case "nodeUuid": requiredBitSet[0] |= 1 << 1 if err := func() error { - v, err := json.DecodeUUID(d) - s.NodeUuid = v - if err != nil { + if err := s.NodeUuid.Decode(d); err != nil { return err } return nil }(); err != nil { return errors.Wrap(err, "decode field \"nodeUuid\"") } - case "nextBillingAt": + case "name": + requiredBitSet[0] |= 1 << 2 if err := func() error { - s.NextBillingAt.Reset() - if err := s.NextBillingAt.Decode(d, json.DecodeDateTime); err != nil { + if err := s.Name.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + case "nextBillingAt": + requiredBitSet[0] |= 1 << 3 + if err := func() error { + v, err := json.DecodeDateTime(d) + s.NextBillingAt = v + if err != nil { return err } return nil @@ -7258,7 +7483,7 @@ func (s *CreateInfraBillingNodeRequest) Decode(d *jx.Decoder) error { // Validate required fields. var failures []validate.FieldError for i, mask := range [1]uint8{ - 0b00000011, + 0b00001111, } { if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { // Mask only required fields and check equality to mask using XOR. @@ -7772,6 +7997,12 @@ func (s *CreateNodeRequest) encodeFields(e *jx.Encoder) { s.Port.Encode(e) } } + { + if s.ProxyUrl.Set { + e.FieldStart("proxyUrl") + s.ProxyUrl.Encode(e) + } + } { if s.IsTrafficTrackingActive.Set { e.FieldStart("isTrafficTrackingActive") @@ -7808,6 +8039,12 @@ func (s *CreateNodeRequest) encodeFields(e *jx.Encoder) { s.ConsumptionMultiplier.Encode(e) } } + { + if s.NodeConsumptionMultiplier.Set { + e.FieldStart("nodeConsumptionMultiplier") + s.NodeConsumptionMultiplier.Encode(e) + } + } { e.FieldStart("configProfile") s.ConfigProfile.Encode(e) @@ -7834,22 +8071,31 @@ func (s *CreateNodeRequest) encodeFields(e *jx.Encoder) { s.ActivePluginUuid.Encode(e) } } + { + if s.Note.Set { + e.FieldStart("note") + s.Note.Encode(e) + } + } } -var jsonFieldsNameOfCreateNodeRequest = [13]string{ +var jsonFieldsNameOfCreateNodeRequest = [16]string{ 0: "name", 1: "address", 2: "port", - 3: "isTrafficTrackingActive", - 4: "trafficLimitBytes", - 5: "notifyPercent", - 6: "trafficResetDay", - 7: "countryCode", - 8: "consumptionMultiplier", - 9: "configProfile", - 10: "providerUuid", - 11: "tags", - 12: "activePluginUuid", + 3: "proxyUrl", + 4: "isTrafficTrackingActive", + 5: "trafficLimitBytes", + 6: "notifyPercent", + 7: "trafficResetDay", + 8: "countryCode", + 9: "consumptionMultiplier", + 10: "nodeConsumptionMultiplier", + 11: "configProfile", + 12: "providerUuid", + 13: "tags", + 14: "activePluginUuid", + 15: "note", } // Decode decodes CreateNodeRequest from json. @@ -7896,6 +8142,16 @@ func (s *CreateNodeRequest) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"port\"") } + case "proxyUrl": + if err := func() error { + s.ProxyUrl.Reset() + if err := s.ProxyUrl.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"proxyUrl\"") + } case "isTrafficTrackingActive": if err := func() error { s.IsTrafficTrackingActive.Reset() @@ -7956,8 +8212,18 @@ func (s *CreateNodeRequest) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"consumptionMultiplier\"") } + case "nodeConsumptionMultiplier": + if err := func() error { + s.NodeConsumptionMultiplier.Reset() + if err := s.NodeConsumptionMultiplier.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"nodeConsumptionMultiplier\"") + } case "configProfile": - requiredBitSet[1] |= 1 << 1 + requiredBitSet[1] |= 1 << 3 if err := func() error { if err := s.ConfigProfile.Decode(d); err != nil { return err @@ -8005,6 +8271,16 @@ func (s *CreateNodeRequest) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"activePluginUuid\"") } + case "note": + if err := func() error { + s.Note.Reset() + if err := s.Note.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"note\"") + } default: return d.Skip() } @@ -8016,7 +8292,7 @@ func (s *CreateNodeRequest) Decode(d *jx.Decoder) error { var failures []validate.FieldError for i, mask := range [2]uint8{ 0b00000011, - 0b00000010, + 0b00001000, } { if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { // Mask only required fields and check equality to mask using XOR. @@ -8452,15 +8728,22 @@ func (s *CreateUserHwidDeviceRequest) encodeFields(e *jx.Encoder) { s.UserAgent.Encode(e) } } + { + if s.RequestIp.Set { + e.FieldStart("requestIp") + s.RequestIp.Encode(e) + } + } } -var jsonFieldsNameOfCreateUserHwidDeviceRequest = [6]string{ +var jsonFieldsNameOfCreateUserHwidDeviceRequest = [7]string{ 0: "hwid", 1: "userUuid", 2: "platform", 3: "osVersion", 4: "deviceModel", 5: "userAgent", + 6: "requestIp", } // Decode decodes CreateUserHwidDeviceRequest from json. @@ -8536,6 +8819,16 @@ func (s *CreateUserHwidDeviceRequest) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"userAgent\"") } + case "requestIp": + if err := func() error { + s.RequestIp.Reset() + if err := s.RequestIp.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"requestIp\"") + } default: return d.Skip() } @@ -10631,8 +10924,8 @@ func (s *Device) encodeFields(e *jx.Encoder) { e.Str(s.Hwid) } { - e.FieldStart("userUuid") - json.EncodeUUID(e, s.UserUuid) + e.FieldStart("userId") + e.Float64(s.UserId) } { e.FieldStart("platform") @@ -10650,6 +10943,10 @@ func (s *Device) encodeFields(e *jx.Encoder) { e.FieldStart("userAgent") s.UserAgent.Encode(e) } + { + e.FieldStart("requestIp") + s.RequestIp.Encode(e) + } { e.FieldStart("createdAt") json.EncodeDateTime(e, s.CreatedAt) @@ -10660,15 +10957,16 @@ func (s *Device) encodeFields(e *jx.Encoder) { } } -var jsonFieldsNameOfDevice = [8]string{ +var jsonFieldsNameOfDevice = [9]string{ 0: "hwid", - 1: "userUuid", + 1: "userId", 2: "platform", 3: "osVersion", 4: "deviceModel", 5: "userAgent", - 6: "createdAt", - 7: "updatedAt", + 6: "requestIp", + 7: "createdAt", + 8: "updatedAt", } // Decode decodes Device from json. @@ -10676,7 +10974,7 @@ func (s *Device) Decode(d *jx.Decoder) error { if s == nil { return errors.New("invalid: unable to decode Device to nil") } - var requiredBitSet [1]uint8 + var requiredBitSet [2]uint8 if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { switch string(k) { @@ -10692,17 +10990,17 @@ func (s *Device) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"hwid\"") } - case "userUuid": + case "userId": requiredBitSet[0] |= 1 << 1 if err := func() error { - v, err := json.DecodeUUID(d) - s.UserUuid = v + v, err := d.Float64() + s.UserId = float64(v) if err != nil { return err } return nil }(); err != nil { - return errors.Wrap(err, "decode field \"userUuid\"") + return errors.Wrap(err, "decode field \"userId\"") } case "platform": requiredBitSet[0] |= 1 << 2 @@ -10744,8 +11042,18 @@ func (s *Device) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"userAgent\"") } - case "createdAt": + case "requestIp": requiredBitSet[0] |= 1 << 6 + if err := func() error { + if err := s.RequestIp.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"requestIp\"") + } + case "createdAt": + requiredBitSet[0] |= 1 << 7 if err := func() error { v, err := json.DecodeDateTime(d) s.CreatedAt = v @@ -10757,7 +11065,7 @@ func (s *Device) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"createdAt\"") } case "updatedAt": - requiredBitSet[0] |= 1 << 7 + requiredBitSet[1] |= 1 << 0 if err := func() error { v, err := json.DecodeDateTime(d) s.UpdatedAt = v @@ -10777,8 +11085,9 @@ func (s *Device) Decode(d *jx.Decoder) error { } // Validate required fields. var failures []validate.FieldError - for i, mask := range [1]uint8{ + for i, mask := range [2]uint8{ 0b11111111, + 0b00000001, } { if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { // Mask only required fields and check equality to mask using XOR. @@ -11788,246 +12097,71 @@ func (s *DropConnectionsRequestTargetNodes1Target) UnmarshalJSON(data []byte) er } // Encode implements json.Marshaler. -func (s *EncryptHappCryptoLinkRequest) Encode(e *jx.Encoder) { +func (s *EncryptionItem) Encode(e *jx.Encoder) { e.ObjStart() s.encodeFields(e) e.ObjEnd() } // encodeFields encodes fields. -func (s *EncryptHappCryptoLinkRequest) encodeFields(e *jx.Encoder) { +func (s *EncryptionItem) encodeFields(e *jx.Encoder) { { - e.FieldStart("linkToEncrypt") - json.EncodeURI(e, s.LinkToEncrypt) + e.FieldStart("method") + s.Method.Encode(e) + } + { + e.FieldStart("key") + e.Str(s.Key) } } -var jsonFieldsNameOfEncryptHappCryptoLinkRequest = [1]string{ - 0: "linkToEncrypt", +var jsonFieldsNameOfEncryptionItem = [2]string{ + 0: "method", + 1: "key", } -// Decode decodes EncryptHappCryptoLinkRequest from json. -func (s *EncryptHappCryptoLinkRequest) Decode(d *jx.Decoder) error { +// Decode decodes EncryptionItem from json. +func (s *EncryptionItem) Decode(d *jx.Decoder) error { if s == nil { - return errors.New("invalid: unable to decode EncryptHappCryptoLinkRequest to nil") + return errors.New("invalid: unable to decode EncryptionItem to nil") } var requiredBitSet [1]uint8 if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { switch string(k) { - case "linkToEncrypt": + case "method": requiredBitSet[0] |= 1 << 0 if err := func() error { - v, err := json.DecodeURI(d) - s.LinkToEncrypt = v - if err != nil { + if err := s.Method.Decode(d); err != nil { return err } return nil }(); err != nil { - return errors.Wrap(err, "decode field \"linkToEncrypt\"") + return errors.Wrap(err, "decode field \"method\"") } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode EncryptHappCryptoLinkRequest") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000001, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfEncryptHappCryptoLinkRequest) { - name = jsonFieldsNameOfEncryptHappCryptoLinkRequest[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *EncryptHappCryptoLinkRequest) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *EncryptHappCryptoLinkRequest) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *EncryptHappCryptoLinkResponse) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *EncryptHappCryptoLinkResponse) encodeFields(e *jx.Encoder) { - { - e.FieldStart("response") - s.Response.Encode(e) - } -} - -var jsonFieldsNameOfEncryptHappCryptoLinkResponse = [1]string{ - 0: "response", -} - -// Decode decodes EncryptHappCryptoLinkResponse from json. -func (s *EncryptHappCryptoLinkResponse) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode EncryptHappCryptoLinkResponse to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "response": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Response.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"response\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode EncryptHappCryptoLinkResponse") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000001, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfEncryptHappCryptoLinkResponse) { - name = jsonFieldsNameOfEncryptHappCryptoLinkResponse[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *EncryptHappCryptoLinkResponse) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *EncryptHappCryptoLinkResponse) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *EncryptHappCryptoLinkResponseResponse) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *EncryptHappCryptoLinkResponseResponse) encodeFields(e *jx.Encoder) { - { - e.FieldStart("encryptedLink") - e.Str(s.EncryptedLink) - } -} - -var jsonFieldsNameOfEncryptHappCryptoLinkResponseResponse = [1]string{ - 0: "encryptedLink", -} - -// Decode decodes EncryptHappCryptoLinkResponseResponse from json. -func (s *EncryptHappCryptoLinkResponseResponse) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode EncryptHappCryptoLinkResponseResponse to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "encryptedLink": - requiredBitSet[0] |= 1 << 0 + case "key": + requiredBitSet[0] |= 1 << 1 if err := func() error { v, err := d.Str() - s.EncryptedLink = string(v) + s.Key = string(v) if err != nil { return err } return nil }(); err != nil { - return errors.Wrap(err, "decode field \"encryptedLink\"") + return errors.Wrap(err, "decode field \"key\"") } default: return d.Skip() } return nil }); err != nil { - return errors.Wrap(err, "decode EncryptHappCryptoLinkResponseResponse") + return errors.Wrap(err, "decode EncryptionItem") } // Validate required fields. var failures []validate.FieldError for i, mask := range [1]uint8{ - 0b00000001, + 0b00000011, } { if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { // Mask only required fields and check equality to mask using XOR. @@ -12039,8 +12173,8 @@ func (s *EncryptHappCryptoLinkResponseResponse) Decode(d *jx.Decoder) error { bitIdx := bits.TrailingZeros8(result) fieldIdx := i*8 + bitIdx var name string - if fieldIdx < len(jsonFieldsNameOfEncryptHappCryptoLinkResponseResponse) { - name = jsonFieldsNameOfEncryptHappCryptoLinkResponseResponse[fieldIdx] + if fieldIdx < len(jsonFieldsNameOfEncryptionItem) { + name = jsonFieldsNameOfEncryptionItem[fieldIdx] } else { name = strconv.Itoa(fieldIdx) } @@ -12061,14 +12195,54 @@ func (s *EncryptHappCryptoLinkResponseResponse) Decode(d *jx.Decoder) error { } // MarshalJSON implements stdjson.Marshaler. -func (s *EncryptHappCryptoLinkResponseResponse) MarshalJSON() ([]byte, error) { +func (s *EncryptionItem) MarshalJSON() ([]byte, error) { e := jx.Encoder{} s.Encode(&e) return e.Bytes(), nil } // UnmarshalJSON implements stdjson.Unmarshaler. -func (s *EncryptHappCryptoLinkResponseResponse) UnmarshalJSON(data []byte) error { +func (s *EncryptionItem) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes EncryptionItemMethod as json. +func (s EncryptionItemMethod) Encode(e *jx.Encoder) { + e.Str(string(s)) +} + +// Decode decodes EncryptionItemMethod from json. +func (s *EncryptionItemMethod) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode EncryptionItemMethod to nil") + } + v, err := d.StrBytes() + if err != nil { + return err + } + // Try to use constant string. + switch EncryptionItemMethod(v) { + case EncryptionItemMethodAge1: + *s = EncryptionItemMethodAge1 + case EncryptionItemMethodAge1pq1: + *s = EncryptionItemMethodAge1pq1 + default: + *s = EncryptionItemMethod(v) + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s EncryptionItemMethod) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *EncryptionItemMethod) UnmarshalJSON(data []byte) error { d := jx.DecodeBytes(data) return s.Decode(d) } @@ -14293,9 +14467,9 @@ func (s *FindAllApiTokensResponseResponse) Encode(e *jx.Encoder) { // encodeFields encodes fields. func (s *FindAllApiTokensResponseResponse) encodeFields(e *jx.Encoder) { { - e.FieldStart("apiKeys") + e.FieldStart("tokens") e.ArrStart() - for _, elem := range s.ApiKeys { + for _, elem := range s.Tokens { elem.Encode(e) } e.ArrEnd() @@ -14307,7 +14481,7 @@ func (s *FindAllApiTokensResponseResponse) encodeFields(e *jx.Encoder) { } var jsonFieldsNameOfFindAllApiTokensResponseResponse = [2]string{ - 0: "apiKeys", + 0: "tokens", 1: "docs", } @@ -14320,23 +14494,23 @@ func (s *FindAllApiTokensResponseResponse) Decode(d *jx.Decoder) error { if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { switch string(k) { - case "apiKeys": + case "tokens": requiredBitSet[0] |= 1 << 0 if err := func() error { - s.ApiKeys = make([]FindAllApiTokensResponseResponseApiKeysItem, 0) + s.Tokens = make([]FindAllApiTokensResponseResponseTokensItem, 0) if err := d.Arr(func(d *jx.Decoder) error { - var elem FindAllApiTokensResponseResponseApiKeysItem + var elem FindAllApiTokensResponseResponseTokensItem if err := elem.Decode(d); err != nil { return err } - s.ApiKeys = append(s.ApiKeys, elem) + s.Tokens = append(s.Tokens, elem) return nil }); err != nil { return err } return nil }(); err != nil { - return errors.Wrap(err, "decode field \"apiKeys\"") + return errors.Wrap(err, "decode field \"tokens\"") } case "docs": requiredBitSet[0] |= 1 << 1 @@ -14404,170 +14578,6 @@ func (s *FindAllApiTokensResponseResponse) UnmarshalJSON(data []byte) error { return s.Decode(d) } -// Encode implements json.Marshaler. -func (s *FindAllApiTokensResponseResponseApiKeysItem) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *FindAllApiTokensResponseResponseApiKeysItem) encodeFields(e *jx.Encoder) { - { - e.FieldStart("uuid") - json.EncodeUUID(e, s.UUID) - } - { - e.FieldStart("token") - e.Str(s.Token) - } - { - e.FieldStart("tokenName") - e.Str(s.TokenName) - } - { - e.FieldStart("createdAt") - json.EncodeDateTime(e, s.CreatedAt) - } - { - e.FieldStart("updatedAt") - json.EncodeDateTime(e, s.UpdatedAt) - } -} - -var jsonFieldsNameOfFindAllApiTokensResponseResponseApiKeysItem = [5]string{ - 0: "uuid", - 1: "token", - 2: "tokenName", - 3: "createdAt", - 4: "updatedAt", -} - -// Decode decodes FindAllApiTokensResponseResponseApiKeysItem from json. -func (s *FindAllApiTokensResponseResponseApiKeysItem) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode FindAllApiTokensResponseResponseApiKeysItem to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "uuid": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - v, err := json.DecodeUUID(d) - s.UUID = v - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"uuid\"") - } - case "token": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.Token = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"token\"") - } - case "tokenName": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - v, err := d.Str() - s.TokenName = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"tokenName\"") - } - case "createdAt": - requiredBitSet[0] |= 1 << 3 - if err := func() error { - v, err := json.DecodeDateTime(d) - s.CreatedAt = v - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"createdAt\"") - } - case "updatedAt": - requiredBitSet[0] |= 1 << 4 - if err := func() error { - v, err := json.DecodeDateTime(d) - s.UpdatedAt = v - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"updatedAt\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode FindAllApiTokensResponseResponseApiKeysItem") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00011111, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfFindAllApiTokensResponseResponseApiKeysItem) { - name = jsonFieldsNameOfFindAllApiTokensResponseResponseApiKeysItem[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *FindAllApiTokensResponseResponseApiKeysItem) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *FindAllApiTokensResponseResponseApiKeysItem) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - // Encode implements json.Marshaler. func (s *FindAllApiTokensResponseResponseDocs) Encode(e *jx.Encoder) { e.ObjStart() @@ -14578,8 +14588,8 @@ func (s *FindAllApiTokensResponseResponseDocs) Encode(e *jx.Encoder) { // encodeFields encodes fields. func (s *FindAllApiTokensResponseResponseDocs) encodeFields(e *jx.Encoder) { { - e.FieldStart("isDocsEnabled") - e.Bool(s.IsDocsEnabled) + e.FieldStart("enabled") + e.Bool(s.Enabled) } { e.FieldStart("scalarPath") @@ -14592,7 +14602,7 @@ func (s *FindAllApiTokensResponseResponseDocs) encodeFields(e *jx.Encoder) { } var jsonFieldsNameOfFindAllApiTokensResponseResponseDocs = [3]string{ - 0: "isDocsEnabled", + 0: "enabled", 1: "scalarPath", 2: "swaggerPath", } @@ -14606,17 +14616,17 @@ func (s *FindAllApiTokensResponseResponseDocs) Decode(d *jx.Decoder) error { if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { switch string(k) { - case "isDocsEnabled": + case "enabled": requiredBitSet[0] |= 1 << 0 if err := func() error { v, err := d.Bool() - s.IsDocsEnabled = bool(v) + s.Enabled = bool(v) if err != nil { return err } return nil }(); err != nil { - return errors.Wrap(err, "decode field \"isDocsEnabled\"") + return errors.Wrap(err, "decode field \"enabled\"") } case "scalarPath": requiredBitSet[0] |= 1 << 1 @@ -14694,6 +14704,199 @@ func (s *FindAllApiTokensResponseResponseDocs) UnmarshalJSON(data []byte) error return s.Decode(d) } +// Encode implements json.Marshaler. +func (s *FindAllApiTokensResponseResponseTokensItem) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *FindAllApiTokensResponseResponseTokensItem) encodeFields(e *jx.Encoder) { + { + e.FieldStart("uuid") + json.EncodeUUID(e, s.UUID) + } + { + e.FieldStart("name") + e.Str(s.Name) + } + { + e.FieldStart("expireAt") + json.EncodeDateTime(e, s.ExpireAt) + } + { + e.FieldStart("scopes") + e.ArrStart() + for _, elem := range s.Scopes { + e.Str(elem) + } + e.ArrEnd() + } + { + e.FieldStart("createdAt") + json.EncodeDateTime(e, s.CreatedAt) + } + { + e.FieldStart("updatedAt") + json.EncodeDateTime(e, s.UpdatedAt) + } +} + +var jsonFieldsNameOfFindAllApiTokensResponseResponseTokensItem = [6]string{ + 0: "uuid", + 1: "name", + 2: "expireAt", + 3: "scopes", + 4: "createdAt", + 5: "updatedAt", +} + +// Decode decodes FindAllApiTokensResponseResponseTokensItem from json. +func (s *FindAllApiTokensResponseResponseTokensItem) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode FindAllApiTokensResponseResponseTokensItem to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "uuid": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := json.DecodeUUID(d) + s.UUID = v + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"uuid\"") + } + case "name": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + case "expireAt": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + v, err := json.DecodeDateTime(d) + s.ExpireAt = v + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"expireAt\"") + } + case "scopes": + requiredBitSet[0] |= 1 << 3 + if err := func() error { + s.Scopes = make([]string, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem string + v, err := d.Str() + elem = string(v) + if err != nil { + return err + } + s.Scopes = append(s.Scopes, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"scopes\"") + } + case "createdAt": + requiredBitSet[0] |= 1 << 4 + if err := func() error { + v, err := json.DecodeDateTime(d) + s.CreatedAt = v + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"createdAt\"") + } + case "updatedAt": + requiredBitSet[0] |= 1 << 5 + if err := func() error { + v, err := json.DecodeDateTime(d) + s.UpdatedAt = v + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"updatedAt\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode FindAllApiTokensResponseResponseTokensItem") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00111111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfFindAllApiTokensResponseResponseTokensItem) { + name = jsonFieldsNameOfFindAllApiTokensResponseResponseTokensItem[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *FindAllApiTokensResponseResponseTokensItem) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *FindAllApiTokensResponseResponseTokensItem) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + // Encode implements json.Marshaler. func (s *ForbiddenError) Encode(e *jx.Encoder) { e.ObjStart() @@ -15865,6 +16068,577 @@ func (s *GetAllUsersResponseResponse) UnmarshalJSON(data []byte) error { return s.Decode(d) } +// Encode implements json.Marshaler. +func (s *GetApiTokenScopesResponse) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *GetApiTokenScopesResponse) encodeFields(e *jx.Encoder) { + { + e.FieldStart("response") + s.Response.Encode(e) + } +} + +var jsonFieldsNameOfGetApiTokenScopesResponse = [1]string{ + 0: "response", +} + +// Decode decodes GetApiTokenScopesResponse from json. +func (s *GetApiTokenScopesResponse) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode GetApiTokenScopesResponse to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "response": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Response.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"response\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode GetApiTokenScopesResponse") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000001, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfGetApiTokenScopesResponse) { + name = jsonFieldsNameOfGetApiTokenScopesResponse[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *GetApiTokenScopesResponse) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *GetApiTokenScopesResponse) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *GetApiTokenScopesResponseResponse) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *GetApiTokenScopesResponseResponse) encodeFields(e *jx.Encoder) { + { + e.FieldStart("wildcard") + e.Str(s.Wildcard) + } + { + e.FieldStart("resources") + e.ArrStart() + for _, elem := range s.Resources { + elem.Encode(e) + } + e.ArrEnd() + } +} + +var jsonFieldsNameOfGetApiTokenScopesResponseResponse = [2]string{ + 0: "wildcard", + 1: "resources", +} + +// Decode decodes GetApiTokenScopesResponseResponse from json. +func (s *GetApiTokenScopesResponseResponse) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode GetApiTokenScopesResponseResponse to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "wildcard": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.Wildcard = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"wildcard\"") + } + case "resources": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + s.Resources = make([]GetApiTokenScopesResponseResponseResourcesItem, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem GetApiTokenScopesResponseResponseResourcesItem + if err := elem.Decode(d); err != nil { + return err + } + s.Resources = append(s.Resources, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"resources\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode GetApiTokenScopesResponseResponse") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfGetApiTokenScopesResponseResponse) { + name = jsonFieldsNameOfGetApiTokenScopesResponseResponse[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *GetApiTokenScopesResponseResponse) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *GetApiTokenScopesResponseResponse) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *GetApiTokenScopesResponseResponseResourcesItem) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *GetApiTokenScopesResponseResponseResourcesItem) encodeFields(e *jx.Encoder) { + { + e.FieldStart("resource") + e.Str(s.Resource) + } + { + e.FieldStart("resourceScopes") + e.ArrStart() + for _, elem := range s.ResourceScopes { + e.Str(elem) + } + e.ArrEnd() + } + { + e.FieldStart("endpoints") + e.ArrStart() + for _, elem := range s.Endpoints { + elem.Encode(e) + } + e.ArrEnd() + } +} + +var jsonFieldsNameOfGetApiTokenScopesResponseResponseResourcesItem = [3]string{ + 0: "resource", + 1: "resourceScopes", + 2: "endpoints", +} + +// Decode decodes GetApiTokenScopesResponseResponseResourcesItem from json. +func (s *GetApiTokenScopesResponseResponseResourcesItem) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode GetApiTokenScopesResponseResponseResourcesItem to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "resource": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.Resource = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"resource\"") + } + case "resourceScopes": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + s.ResourceScopes = make([]string, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem string + v, err := d.Str() + elem = string(v) + if err != nil { + return err + } + s.ResourceScopes = append(s.ResourceScopes, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"resourceScopes\"") + } + case "endpoints": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + s.Endpoints = make([]GetApiTokenScopesResponseResponseResourcesItemEndpointsItem, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem GetApiTokenScopesResponseResponseResourcesItemEndpointsItem + if err := elem.Decode(d); err != nil { + return err + } + s.Endpoints = append(s.Endpoints, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"endpoints\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode GetApiTokenScopesResponseResponseResourcesItem") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfGetApiTokenScopesResponseResponseResourcesItem) { + name = jsonFieldsNameOfGetApiTokenScopesResponseResponseResourcesItem[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *GetApiTokenScopesResponseResponseResourcesItem) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *GetApiTokenScopesResponseResponseResourcesItem) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *GetApiTokenScopesResponseResponseResourcesItemEndpointsItem) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *GetApiTokenScopesResponseResponseResourcesItemEndpointsItem) encodeFields(e *jx.Encoder) { + { + e.FieldStart("key") + e.Str(s.Key) + } + { + e.FieldStart("kind") + s.Kind.Encode(e) + } + { + e.FieldStart("method") + e.Str(s.Method) + } + { + e.FieldStart("path") + e.Str(s.Path) + } + { + e.FieldStart("description") + e.Str(s.Description) + } +} + +var jsonFieldsNameOfGetApiTokenScopesResponseResponseResourcesItemEndpointsItem = [5]string{ + 0: "key", + 1: "kind", + 2: "method", + 3: "path", + 4: "description", +} + +// Decode decodes GetApiTokenScopesResponseResponseResourcesItemEndpointsItem from json. +func (s *GetApiTokenScopesResponseResponseResourcesItemEndpointsItem) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode GetApiTokenScopesResponseResponseResourcesItemEndpointsItem to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "key": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.Key = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"key\"") + } + case "kind": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + if err := s.Kind.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"kind\"") + } + case "method": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + v, err := d.Str() + s.Method = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"method\"") + } + case "path": + requiredBitSet[0] |= 1 << 3 + if err := func() error { + v, err := d.Str() + s.Path = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"path\"") + } + case "description": + requiredBitSet[0] |= 1 << 4 + if err := func() error { + v, err := d.Str() + s.Description = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"description\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode GetApiTokenScopesResponseResponseResourcesItemEndpointsItem") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00011111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfGetApiTokenScopesResponseResponseResourcesItemEndpointsItem) { + name = jsonFieldsNameOfGetApiTokenScopesResponseResponseResourcesItemEndpointsItem[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *GetApiTokenScopesResponseResponseResourcesItemEndpointsItem) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *GetApiTokenScopesResponseResponseResourcesItemEndpointsItem) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKind as json. +func (s GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKind) Encode(e *jx.Encoder) { + e.Str(string(s)) +} + +// Decode decodes GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKind from json. +func (s *GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKind) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKind to nil") + } + v, err := d.StrBytes() + if err != nil { + return err + } + // Try to use constant string. + switch GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKind(v) { + case GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKindRead: + *s = GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKindRead + case GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKindWrite: + *s = GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKindWrite + default: + *s = GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKind(v) + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKind) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKind) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + // Encode implements json.Marshaler. func (s *GetBandwidthStatsResponse) Encode(e *jx.Encoder) { e.ObjStart() @@ -16484,24 +17258,15 @@ func (s *GetHwidDevicesStatsResponseResponse) encodeFields(e *jx.Encoder) { } e.ArrEnd() } - { - e.FieldStart("byApp") - e.ArrStart() - for _, elem := range s.ByApp { - elem.Encode(e) - } - e.ArrEnd() - } { e.FieldStart("stats") s.Stats.Encode(e) } } -var jsonFieldsNameOfGetHwidDevicesStatsResponseResponse = [3]string{ +var jsonFieldsNameOfGetHwidDevicesStatsResponseResponse = [2]string{ 0: "byPlatform", - 1: "byApp", - 2: "stats", + 1: "stats", } // Decode decodes GetHwidDevicesStatsResponseResponse from json. @@ -16531,26 +17296,8 @@ func (s *GetHwidDevicesStatsResponseResponse) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"byPlatform\"") } - case "byApp": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - s.ByApp = make([]ByAppItem, 0) - if err := d.Arr(func(d *jx.Decoder) error { - var elem ByAppItem - if err := elem.Decode(d); err != nil { - return err - } - s.ByApp = append(s.ByApp, elem) - return nil - }); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"byApp\"") - } case "stats": - requiredBitSet[0] |= 1 << 2 + requiredBitSet[0] |= 1 << 1 if err := func() error { if err := s.Stats.Decode(d); err != nil { return err @@ -16569,7 +17316,7 @@ func (s *GetHwidDevicesStatsResponseResponse) Decode(d *jx.Decoder) error { // Validate required fields. var failures []validate.FieldError for i, mask := range [1]uint8{ - 0b00000111, + 0b00000011, } { if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { // Mask only required fields and check equality to mask using XOR. @@ -16632,11 +17379,20 @@ func (s *GetHwidDevicesStatsResponseResponseByPlatformItem) encodeFields(e *jx.E e.FieldStart("count") e.Float64(s.Count) } + { + e.FieldStart("byApp") + e.ArrStart() + for _, elem := range s.ByApp { + elem.Encode(e) + } + e.ArrEnd() + } } -var jsonFieldsNameOfGetHwidDevicesStatsResponseResponseByPlatformItem = [2]string{ +var jsonFieldsNameOfGetHwidDevicesStatsResponseResponseByPlatformItem = [3]string{ 0: "platform", 1: "count", + 2: "byApp", } // Decode decodes GetHwidDevicesStatsResponseResponseByPlatformItem from json. @@ -16672,6 +17428,24 @@ func (s *GetHwidDevicesStatsResponseResponseByPlatformItem) Decode(d *jx.Decoder }(); err != nil { return errors.Wrap(err, "decode field \"count\"") } + case "byApp": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + s.ByApp = make([]ByAppItem, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem ByAppItem + if err := elem.Decode(d); err != nil { + return err + } + s.ByApp = append(s.ByApp, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"byApp\"") + } default: return d.Skip() } @@ -16682,7 +17456,7 @@ func (s *GetHwidDevicesStatsResponseResponseByPlatformItem) Decode(d *jx.Decoder // Validate required fields. var failures []validate.FieldError for i, mask := range [1]uint8{ - 0b00000011, + 0b00000111, } { if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { // Mask only required fields and check equality to mask using XOR. @@ -19936,8 +20710,8 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfo) encodeF e.Str(s.LifetimeTrafficUsed) } { - e.FieldStart("isHwidLimited") - e.Bool(s.IsHwidLimited) + e.FieldStart("hwidCheckup") + s.HwidCheckup.Encode(e) } } @@ -19946,7 +20720,7 @@ var jsonFieldsNameOfGetRawSubscriptionByShortUuidResponseResponseConvertedUserIn 1: "trafficLimit", 2: "trafficUsed", 3: "lifetimeTrafficUsed", - 4: "isHwidLimited", + 4: "hwidCheckup", } // Decode decodes GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfo from json. @@ -20006,17 +20780,15 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfo) Decode( }(); err != nil { return errors.Wrap(err, "decode field \"lifetimeTrafficUsed\"") } - case "isHwidLimited": + case "hwidCheckup": requiredBitSet[0] |= 1 << 4 if err := func() error { - v, err := d.Bool() - s.IsHwidLimited = bool(v) - if err != nil { + if err := s.HwidCheckup.Decode(d); err != nil { return err } return nil }(); err != nil { - return errors.Wrap(err, "decode field \"isHwidLimited\"") + return errors.Wrap(err, "decode field \"hwidCheckup\"") } default: return d.Skip() @@ -20074,6 +20846,153 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfo) Unmarsh return s.Decode(d) } +// Encode implements json.Marshaler. +func (s *GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup) encodeFields(e *jx.Encoder) { + { + e.FieldStart("subscriptionAllowed") + e.Bool(s.SubscriptionAllowed) + } + { + e.FieldStart("maxDeviceReached") + e.Bool(s.MaxDeviceReached) + } + { + e.FieldStart("hwidNotSupported") + e.Bool(s.HwidNotSupported) + } + { + e.FieldStart("limitBypassed") + e.Bool(s.LimitBypassed) + } +} + +var jsonFieldsNameOfGetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup = [4]string{ + 0: "subscriptionAllowed", + 1: "maxDeviceReached", + 2: "hwidNotSupported", + 3: "limitBypassed", +} + +// Decode decodes GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup from json. +func (s *GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "subscriptionAllowed": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Bool() + s.SubscriptionAllowed = bool(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"subscriptionAllowed\"") + } + case "maxDeviceReached": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Bool() + s.MaxDeviceReached = bool(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"maxDeviceReached\"") + } + case "hwidNotSupported": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + v, err := d.Bool() + s.HwidNotSupported = bool(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"hwidNotSupported\"") + } + case "limitBypassed": + requiredBitSet[0] |= 1 << 3 + if err := func() error { + v, err := d.Bool() + s.LimitBypassed = bool(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"limitBypassed\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00001111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfGetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup) { + name = jsonFieldsNameOfGetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + // Encode implements json.Marshaler. func (s GetRawSubscriptionByShortUuidResponseResponseHeaders) Encode(e *jx.Encoder) { e.ObjStart() @@ -20434,6 +21353,10 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemCl e.FieldStart("mihomoX25519") e.Bool(s.MihomoX25519) } + { + e.FieldStart("mihomoIpVersion") + s.MihomoIpVersion.Encode(e) + } { e.FieldStart("serverDescription") s.ServerDescription.Encode(e) @@ -20446,11 +21369,12 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemCl } } -var jsonFieldsNameOfGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverrides = [4]string{ +var jsonFieldsNameOfGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverrides = [5]string{ 0: "shuffleHost", 1: "mihomoX25519", - 2: "serverDescription", - 3: "xrayJsonTemplate", + 2: "mihomoIpVersion", + 3: "serverDescription", + 4: "xrayJsonTemplate", } // Decode decodes GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverrides from json. @@ -20486,8 +21410,18 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemCl }(); err != nil { return errors.Wrap(err, "decode field \"mihomoX25519\"") } - case "serverDescription": + case "mihomoIpVersion": requiredBitSet[0] |= 1 << 2 + if err := func() error { + if err := s.MihomoIpVersion.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"mihomoIpVersion\"") + } + case "serverDescription": + requiredBitSet[0] |= 1 << 3 if err := func() error { if err := s.ServerDescription.Decode(d); err != nil { return err @@ -20497,7 +21431,7 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemCl return errors.Wrap(err, "decode field \"serverDescription\"") } case "xrayJsonTemplate": - requiredBitSet[0] |= 1 << 3 + requiredBitSet[0] |= 1 << 4 if err := func() error { v, err := d.RawAppend(nil) s.XrayJsonTemplate = jx.Raw(v) @@ -20518,7 +21452,7 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemCl // Validate required fields. var failures []validate.FieldError for i, mask := range [1]uint8{ - 0b00001111, + 0b00011111, } { if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { // Mask only required fields and check equality to mask using XOR. @@ -20564,6 +21498,52 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemCl return s.Decode(d) } +// Encode encodes GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion as json. +func (s GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion) Encode(e *jx.Encoder) { + e.Str(string(s)) +} + +// Decode decodes GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion from json. +func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion to nil") + } + v, err := d.StrBytes() + if err != nil { + return err + } + // Try to use constant string. + switch GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion(v) { + case GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionDual: + *s = GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionDual + case GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionIpv4: + *s = GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionIpv4 + case GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionIpv6: + *s = GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionIpv6 + case GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionIpv4Prefer: + *s = GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionIpv4Prefer + case GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionIpv6Prefer: + *s = GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionIpv6Prefer + default: + *s = GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion(v) + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + // Encode implements json.Marshaler. func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemMetadata) Encode(e *jx.Encoder) { e.ObjStart() @@ -20578,8 +21558,12 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemMe json.EncodeUUID(e, s.UUID) } { - e.FieldStart("tag") - s.Tag.Encode(e) + e.FieldStart("tags") + e.ArrStart() + for _, elem := range s.Tags { + e.Str(elem) + } + e.ArrEnd() } { e.FieldStart("excludeFromSubscriptionTypes") @@ -20631,7 +21615,7 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemMe var jsonFieldsNameOfGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemMetadata = [12]string{ 0: "uuid", - 1: "tag", + 1: "tags", 2: "excludeFromSubscriptionTypes", 3: "inboundTag", 4: "configProfileUuid", @@ -20665,15 +21649,25 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemMe }(); err != nil { return errors.Wrap(err, "decode field \"uuid\"") } - case "tag": + case "tags": requiredBitSet[0] |= 1 << 1 if err := func() error { - if err := s.Tag.Decode(d); err != nil { + s.Tags = make([]string, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem string + v, err := d.Str() + elem = string(v) + if err != nil { + return err + } + s.Tags = append(s.Tags, elem) + return nil + }); err != nil { return err } return nil }(); err != nil { - return errors.Wrap(err, "decode field \"tag\"") + return errors.Wrap(err, "decode field \"tags\"") } case "excludeFromSubscriptionTypes": requiredBitSet[0] |= 1 << 2 @@ -21705,19 +22699,6 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSe if err := d.Capture(func(d *jx.Decoder) error { return d.ObjBytes(func(d *jx.Decoder, key []byte) error { switch string(key) { - case "allowInsecure": - // Type-based discrimination: check if field has expected JSON type - if typ := d.Next(); typ != jx.Bool { - // Field exists but has wrong type, not a match for this variant - return d.Skip() - } - match := GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSecurityOptions0GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSecurityOptions - if found && s.Type != match { - s.Type = "" - return errors.Errorf("multiple oneOf matches: (%v, %v)", s.Type, match) - } - found = true - s.Type = match case "alpn": // Type-based discrimination: check if field has expected JSON type (nullable) typ := d.Next() @@ -21787,6 +22768,20 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSe } found = true s.Type = match + case "pinnedPeerCertSha256": + // Type-based discrimination: check if field has expected JSON type (nullable) + typ := d.Next() + if typ != jx.String && typ != jx.Null { + // Field exists but has wrong type, not a match for this variant + return d.Skip() + } + match := GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSecurityOptions0GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSecurityOptions + if found && s.Type != match { + s.Type = "" + return errors.Errorf("multiple oneOf matches: (%v, %v)", s.Type, match) + } + found = true + s.Type = match case "publicKey": // Type-based discrimination: check if field has expected JSON type if typ := d.Next(); typ != jx.String { @@ -21828,6 +22823,20 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSe } found = true s.Type = match + case "verifyPeerCertByName": + // Type-based discrimination: check if field has expected JSON type (nullable) + typ := d.Next() + if typ != jx.String && typ != jx.Null { + // Field exists but has wrong type, not a match for this variant + return d.Skip() + } + match := GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSecurityOptions0GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSecurityOptions + if found && s.Type != match { + s.Type = "" + return errors.Errorf("multiple oneOf matches: (%v, %v)", s.Type, match) + } + found = true + s.Type = match } return d.Skip() }) @@ -21875,8 +22884,12 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSe // encodeFields encodes fields. func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSecurityOptions0) encodeFields(e *jx.Encoder) { { - e.FieldStart("allowInsecure") - e.Bool(s.AllowInsecure) + e.FieldStart("pinnedPeerCertSha256") + s.PinnedPeerCertSha256.Encode(e) + } + { + e.FieldStart("verifyPeerCertByName") + s.VerifyPeerCertByName.Encode(e) } { e.FieldStart("alpn") @@ -21904,14 +22917,15 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSe } } -var jsonFieldsNameOfGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSecurityOptions0 = [7]string{ - 0: "allowInsecure", - 1: "alpn", - 2: "enableSessionResumption", - 3: "fingerprint", - 4: "serverName", - 5: "echConfigList", - 6: "echForceQuery", +var jsonFieldsNameOfGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSecurityOptions0 = [8]string{ + 0: "pinnedPeerCertSha256", + 1: "verifyPeerCertByName", + 2: "alpn", + 3: "enableSessionResumption", + 4: "fingerprint", + 5: "serverName", + 6: "echConfigList", + 7: "echForceQuery", } // Decode decodes GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSecurityOptions0 from json. @@ -21923,20 +22937,28 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSe if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { switch string(k) { - case "allowInsecure": + case "pinnedPeerCertSha256": requiredBitSet[0] |= 1 << 0 if err := func() error { - v, err := d.Bool() - s.AllowInsecure = bool(v) - if err != nil { + if err := s.PinnedPeerCertSha256.Decode(d); err != nil { return err } return nil }(); err != nil { - return errors.Wrap(err, "decode field \"allowInsecure\"") + return errors.Wrap(err, "decode field \"pinnedPeerCertSha256\"") + } + case "verifyPeerCertByName": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + if err := s.VerifyPeerCertByName.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"verifyPeerCertByName\"") } case "alpn": - requiredBitSet[0] |= 1 << 1 + requiredBitSet[0] |= 1 << 2 if err := func() error { if err := s.Alpn.Decode(d); err != nil { return err @@ -21946,7 +22968,7 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSe return errors.Wrap(err, "decode field \"alpn\"") } case "enableSessionResumption": - requiredBitSet[0] |= 1 << 2 + requiredBitSet[0] |= 1 << 3 if err := func() error { v, err := d.Bool() s.EnableSessionResumption = bool(v) @@ -21958,7 +22980,7 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSe return errors.Wrap(err, "decode field \"enableSessionResumption\"") } case "fingerprint": - requiredBitSet[0] |= 1 << 3 + requiredBitSet[0] |= 1 << 4 if err := func() error { if err := s.Fingerprint.Decode(d); err != nil { return err @@ -21968,7 +22990,7 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSe return errors.Wrap(err, "decode field \"fingerprint\"") } case "serverName": - requiredBitSet[0] |= 1 << 4 + requiredBitSet[0] |= 1 << 5 if err := func() error { if err := s.ServerName.Decode(d); err != nil { return err @@ -21978,7 +23000,7 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSe return errors.Wrap(err, "decode field \"serverName\"") } case "echConfigList": - requiredBitSet[0] |= 1 << 5 + requiredBitSet[0] |= 1 << 6 if err := func() error { if err := s.EchConfigList.Decode(d); err != nil { return err @@ -21988,7 +23010,7 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSe return errors.Wrap(err, "decode field \"echConfigList\"") } case "echForceQuery": - requiredBitSet[0] |= 1 << 6 + requiredBitSet[0] |= 1 << 7 if err := func() error { if err := s.EchForceQuery.Decode(d); err != nil { return err @@ -22007,7 +23029,7 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSe // Validate required fields. var failures []validate.FieldError for i, mask := range [1]uint8{ - 0b01111111, + 0b11111111, } { if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { // Mask only required fields and check equality to mask using XOR. @@ -22488,6 +23510,19 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemTr } found = true s.Type = match + case "clientTti": + // Type-based discrimination: check if field has expected JSON type + if typ := d.Next(); typ != jx.Number { + // Field exists but has wrong type, not a match for this variant + return d.Skip() + } + match := GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemTransportOptions5GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemTransportOptions + if found && s.Type != match { + s.Type = "" + return errors.Errorf("multiple oneOf matches: (%v, %v)", s.Type, match) + } + found = true + s.Type = match case "congestion": // Type-based discrimination: check if field has expected JSON type if typ := d.Next(); typ != jx.Bool { @@ -22577,19 +23612,6 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemTr } found = true s.Type = match - case "tti": - // Type-based discrimination: check if field has expected JSON type - if typ := d.Next(); typ != jx.Number { - // Field exists but has wrong type, not a match for this variant - return d.Skip() - } - match := GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemTransportOptions5GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemTransportOptions - if found && s.Type != match { - s.Type = "" - return errors.Errorf("multiple oneOf matches: (%v, %v)", s.Type, match) - } - found = true - s.Type = match case "version": // Type-based discrimination: check if field has expected JSON type if typ := d.Next(); typ != jx.Number { @@ -24291,8 +25313,8 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemTr e.Int(s.ClientMtu) } { - e.FieldStart("tti") - e.Int(s.Tti) + e.FieldStart("clientTti") + e.Int(s.ClientTti) } { e.FieldStart("congestion") @@ -24302,7 +25324,7 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemTr var jsonFieldsNameOfGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemTransportOptions5 = [3]string{ 0: "clientMtu", - 1: "tti", + 1: "clientTti", 2: "congestion", } @@ -24327,17 +25349,17 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemTr }(); err != nil { return errors.Wrap(err, "decode field \"clientMtu\"") } - case "tti": + case "clientTti": requiredBitSet[0] |= 1 << 1 if err := func() error { v, err := d.Int() - s.Tti = int(v) + s.ClientTti = int(v) if err != nil { return err } return nil }(); err != nil { - return errors.Wrap(err, "decode field \"tti\"") + return errors.Wrap(err, "decode field \"clientTti\"") } case "congestion": requiredBitSet[0] |= 1 << 2 @@ -25553,49 +26575,63 @@ func (s *GetRemnawaveHealthResponseResponseRuntimeMetricsItem) UnmarshalJSON(dat } // Encode implements json.Marshaler. -func (s *GetStatsNodeUsersUsageResponse) Encode(e *jx.Encoder) { +func (s *GetStatsNodesUsersUsageRequest) Encode(e *jx.Encoder) { e.ObjStart() s.encodeFields(e) e.ObjEnd() } // encodeFields encodes fields. -func (s *GetStatsNodeUsersUsageResponse) encodeFields(e *jx.Encoder) { +func (s *GetStatsNodesUsersUsageRequest) encodeFields(e *jx.Encoder) { { - e.FieldStart("response") - s.Response.Encode(e) + e.FieldStart("nodesUuids") + e.ArrStart() + for _, elem := range s.NodesUuids { + json.EncodeUUID(e, elem) + } + e.ArrEnd() } } -var jsonFieldsNameOfGetStatsNodeUsersUsageResponse = [1]string{ - 0: "response", +var jsonFieldsNameOfGetStatsNodesUsersUsageRequest = [1]string{ + 0: "nodesUuids", } -// Decode decodes GetStatsNodeUsersUsageResponse from json. -func (s *GetStatsNodeUsersUsageResponse) Decode(d *jx.Decoder) error { +// Decode decodes GetStatsNodesUsersUsageRequest from json. +func (s *GetStatsNodesUsersUsageRequest) Decode(d *jx.Decoder) error { if s == nil { - return errors.New("invalid: unable to decode GetStatsNodeUsersUsageResponse to nil") + return errors.New("invalid: unable to decode GetStatsNodesUsersUsageRequest to nil") } var requiredBitSet [1]uint8 if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { switch string(k) { - case "response": + case "nodesUuids": requiredBitSet[0] |= 1 << 0 if err := func() error { - if err := s.Response.Decode(d); err != nil { + s.NodesUuids = make([]uuid.UUID, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem uuid.UUID + v, err := json.DecodeUUID(d) + elem = v + if err != nil { + return err + } + s.NodesUuids = append(s.NodesUuids, elem) + return nil + }); err != nil { return err } return nil }(); err != nil { - return errors.Wrap(err, "decode field \"response\"") + return errors.Wrap(err, "decode field \"nodesUuids\"") } default: return d.Skip() } return nil }); err != nil { - return errors.Wrap(err, "decode GetStatsNodeUsersUsageResponse") + return errors.Wrap(err, "decode GetStatsNodesUsersUsageRequest") } // Validate required fields. var failures []validate.FieldError @@ -25612,8 +26648,8 @@ func (s *GetStatsNodeUsersUsageResponse) Decode(d *jx.Decoder) error { bitIdx := bits.TrailingZeros8(result) fieldIdx := i*8 + bitIdx var name string - if fieldIdx < len(jsonFieldsNameOfGetStatsNodeUsersUsageResponse) { - name = jsonFieldsNameOfGetStatsNodeUsersUsageResponse[fieldIdx] + if fieldIdx < len(jsonFieldsNameOfGetStatsNodesUsersUsageRequest) { + name = jsonFieldsNameOfGetStatsNodesUsersUsageRequest[fieldIdx] } else { name = strconv.Itoa(fieldIdx) } @@ -25634,308 +26670,14 @@ func (s *GetStatsNodeUsersUsageResponse) Decode(d *jx.Decoder) error { } // MarshalJSON implements stdjson.Marshaler. -func (s *GetStatsNodeUsersUsageResponse) MarshalJSON() ([]byte, error) { +func (s *GetStatsNodesUsersUsageRequest) MarshalJSON() ([]byte, error) { e := jx.Encoder{} s.Encode(&e) return e.Bytes(), nil } // UnmarshalJSON implements stdjson.Unmarshaler. -func (s *GetStatsNodeUsersUsageResponse) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *GetStatsNodeUsersUsageResponseResponse) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *GetStatsNodeUsersUsageResponseResponse) encodeFields(e *jx.Encoder) { - { - e.FieldStart("categories") - e.ArrStart() - for _, elem := range s.Categories { - e.Str(elem) - } - e.ArrEnd() - } - { - e.FieldStart("sparklineData") - e.ArrStart() - for _, elem := range s.SparklineData { - e.Float64(elem) - } - e.ArrEnd() - } - { - e.FieldStart("topUsers") - e.ArrStart() - for _, elem := range s.TopUsers { - elem.Encode(e) - } - e.ArrEnd() - } -} - -var jsonFieldsNameOfGetStatsNodeUsersUsageResponseResponse = [3]string{ - 0: "categories", - 1: "sparklineData", - 2: "topUsers", -} - -// Decode decodes GetStatsNodeUsersUsageResponseResponse from json. -func (s *GetStatsNodeUsersUsageResponseResponse) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode GetStatsNodeUsersUsageResponseResponse to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "categories": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - s.Categories = make([]string, 0) - if err := d.Arr(func(d *jx.Decoder) error { - var elem string - v, err := d.Str() - elem = string(v) - if err != nil { - return err - } - s.Categories = append(s.Categories, elem) - return nil - }); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"categories\"") - } - case "sparklineData": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - s.SparklineData = make([]float64, 0) - if err := d.Arr(func(d *jx.Decoder) error { - var elem float64 - v, err := d.Float64() - elem = float64(v) - if err != nil { - return err - } - s.SparklineData = append(s.SparklineData, elem) - return nil - }); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"sparklineData\"") - } - case "topUsers": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - s.TopUsers = make([]GetStatsNodeUsersUsageResponseResponseTopUsersItem, 0) - if err := d.Arr(func(d *jx.Decoder) error { - var elem GetStatsNodeUsersUsageResponseResponseTopUsersItem - if err := elem.Decode(d); err != nil { - return err - } - s.TopUsers = append(s.TopUsers, elem) - return nil - }); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"topUsers\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode GetStatsNodeUsersUsageResponseResponse") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000111, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfGetStatsNodeUsersUsageResponseResponse) { - name = jsonFieldsNameOfGetStatsNodeUsersUsageResponseResponse[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *GetStatsNodeUsersUsageResponseResponse) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *GetStatsNodeUsersUsageResponseResponse) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *GetStatsNodeUsersUsageResponseResponseTopUsersItem) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *GetStatsNodeUsersUsageResponseResponseTopUsersItem) encodeFields(e *jx.Encoder) { - { - e.FieldStart("color") - e.Str(s.Color) - } - { - e.FieldStart("username") - e.Str(s.Username) - } - { - e.FieldStart("total") - e.Float64(s.Total) - } -} - -var jsonFieldsNameOfGetStatsNodeUsersUsageResponseResponseTopUsersItem = [3]string{ - 0: "color", - 1: "username", - 2: "total", -} - -// Decode decodes GetStatsNodeUsersUsageResponseResponseTopUsersItem from json. -func (s *GetStatsNodeUsersUsageResponseResponseTopUsersItem) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode GetStatsNodeUsersUsageResponseResponseTopUsersItem to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "color": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - v, err := d.Str() - s.Color = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"color\"") - } - case "username": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.Username = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"username\"") - } - case "total": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - v, err := d.Float64() - s.Total = float64(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"total\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode GetStatsNodeUsersUsageResponseResponseTopUsersItem") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000111, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfGetStatsNodeUsersUsageResponseResponseTopUsersItem) { - name = jsonFieldsNameOfGetStatsNodeUsersUsageResponseResponseTopUsersItem[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *GetStatsNodeUsersUsageResponseResponseTopUsersItem) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *GetStatsNodeUsersUsageResponseResponseTopUsersItem) UnmarshalJSON(data []byte) error { +func (s *GetStatsNodesUsersUsageRequest) UnmarshalJSON(data []byte) error { d := jx.DecodeBytes(data) return s.Decode(d) } @@ -29811,6 +30553,238 @@ func (s *GetUserSubscriptionRequestHistoryResponse) UnmarshalJSON(data []byte) e return s.Decode(d) } +// Encode implements json.Marshaler. +func (s *GetUsersStreamResponse) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *GetUsersStreamResponse) encodeFields(e *jx.Encoder) { + { + e.FieldStart("response") + s.Response.Encode(e) + } +} + +var jsonFieldsNameOfGetUsersStreamResponse = [1]string{ + 0: "response", +} + +// Decode decodes GetUsersStreamResponse from json. +func (s *GetUsersStreamResponse) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode GetUsersStreamResponse to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "response": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Response.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"response\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode GetUsersStreamResponse") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000001, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfGetUsersStreamResponse) { + name = jsonFieldsNameOfGetUsersStreamResponse[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *GetUsersStreamResponse) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *GetUsersStreamResponse) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *GetUsersStreamResponseResponse) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *GetUsersStreamResponseResponse) encodeFields(e *jx.Encoder) { + { + e.FieldStart("users") + e.ArrStart() + for _, elem := range s.Users { + elem.Encode(e) + } + e.ArrEnd() + } + { + e.FieldStart("nextCursor") + s.NextCursor.Encode(e) + } + { + e.FieldStart("hasMore") + e.Bool(s.HasMore) + } +} + +var jsonFieldsNameOfGetUsersStreamResponseResponse = [3]string{ + 0: "users", + 1: "nextCursor", + 2: "hasMore", +} + +// Decode decodes GetUsersStreamResponseResponse from json. +func (s *GetUsersStreamResponseResponse) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode GetUsersStreamResponseResponse to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "users": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + s.Users = make([]UserItemInfo, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem UserItemInfo + if err := elem.Decode(d); err != nil { + return err + } + s.Users = append(s.Users, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"users\"") + } + case "nextCursor": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + if err := s.NextCursor.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"nextCursor\"") + } + case "hasMore": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + v, err := d.Bool() + s.HasMore = bool(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"hasMore\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode GetUsersStreamResponseResponse") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfGetUsersStreamResponseResponse) { + name = jsonFieldsNameOfGetUsersStreamResponseResponse[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *GetUsersStreamResponseResponse) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *GetUsersStreamResponseResponse) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + // Encode implements json.Marshaler. func (s *Github) Encode(e *jx.Encoder) { e.ObjStart() @@ -30129,10 +31103,8 @@ func (s *HostItem) encodeFields(e *jx.Encoder) { s.Fingerprint.Encode(e) } { - if s.IsDisabled.Set { - e.FieldStart("isDisabled") - s.IsDisabled.Encode(e) - } + e.FieldStart("isDisabled") + e.Bool(s.IsDisabled) } { if s.SecurityLayer.Set { @@ -30141,9 +31113,9 @@ func (s *HostItem) encodeFields(e *jx.Encoder) { } } { - if len(s.XHttpExtraParams) != 0 { - e.FieldStart("xHttpExtraParams") - e.Raw(s.XHttpExtraParams) + if len(s.XhttpExtraParams) != 0 { + e.FieldStart("xhttpExtraParams") + e.Raw(s.XhttpExtraParams) } } { @@ -30173,8 +31145,14 @@ func (s *HostItem) encodeFields(e *jx.Encoder) { s.ServerDescription.Encode(e) } { - e.FieldStart("tag") - s.Tag.Encode(e) + if s.Tags != nil { + e.FieldStart("tags") + e.ArrStart() + for _, elem := range s.Tags { + e.Str(elem) + } + e.ArrEnd() + } } { if s.IsHidden.Set { @@ -30199,10 +31177,12 @@ func (s *HostItem) encodeFields(e *jx.Encoder) { s.VlessRouteId.Encode(e) } { - if s.AllowInsecure.Set { - e.FieldStart("allowInsecure") - s.AllowInsecure.Encode(e) - } + e.FieldStart("pinnedPeerCertSha256") + s.PinnedPeerCertSha256.Encode(e) + } + { + e.FieldStart("verifyPeerCertByName") + s.VerifyPeerCertByName.Encode(e) } { e.FieldStart("shuffleHost") @@ -30212,6 +31192,10 @@ func (s *HostItem) encodeFields(e *jx.Encoder) { e.FieldStart("mihomoX25519") e.Bool(s.MihomoX25519) } + { + e.FieldStart("mihomoIpVersion") + s.MihomoIpVersion.Encode(e) + } { e.FieldStart("nodes") e.ArrStart() @@ -30233,18 +31217,16 @@ func (s *HostItem) encodeFields(e *jx.Encoder) { e.ArrEnd() } { - if s.ExcludeFromSubscriptionTypes != nil { - e.FieldStart("excludeFromSubscriptionTypes") - e.ArrStart() - for _, elem := range s.ExcludeFromSubscriptionTypes { - elem.Encode(e) - } - e.ArrEnd() + e.FieldStart("excludeFromSubscriptionTypes") + e.ArrStart() + for _, elem := range s.ExcludeFromSubscriptionTypes { + elem.Encode(e) } + e.ArrEnd() } } -var jsonFieldsNameOfHostItem = [30]string{ +var jsonFieldsNameOfHostItem = [32]string{ 0: "uuid", 1: "viewPosition", 2: "remark", @@ -30257,24 +31239,26 @@ var jsonFieldsNameOfHostItem = [30]string{ 9: "fingerprint", 10: "isDisabled", 11: "securityLayer", - 12: "xHttpExtraParams", + 12: "xhttpExtraParams", 13: "muxParams", 14: "sockoptParams", 15: "finalMask", 16: "inbound", 17: "serverDescription", - 18: "tag", + 18: "tags", 19: "isHidden", 20: "overrideSniFromAddress", 21: "keepSniBlank", 22: "vlessRouteId", - 23: "allowInsecure", - 24: "shuffleHost", - 25: "mihomoX25519", - 26: "nodes", - 27: "xrayJsonTemplateUuid", - 28: "excludedInternalSquads", - 29: "excludeFromSubscriptionTypes", + 23: "pinnedPeerCertSha256", + 24: "verifyPeerCertByName", + 25: "shuffleHost", + 26: "mihomoX25519", + 27: "mihomoIpVersion", + 28: "nodes", + 29: "xrayJsonTemplateUuid", + 30: "excludedInternalSquads", + 31: "excludeFromSubscriptionTypes", } // Decode decodes HostItem from json. @@ -30398,9 +31382,11 @@ func (s *HostItem) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"fingerprint\"") } case "isDisabled": + requiredBitSet[1] |= 1 << 2 if err := func() error { - s.IsDisabled.Reset() - if err := s.IsDisabled.Decode(d); err != nil { + v, err := d.Bool() + s.IsDisabled = bool(v) + if err != nil { return err } return nil @@ -30417,17 +31403,17 @@ func (s *HostItem) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"securityLayer\"") } - case "xHttpExtraParams": + case "xhttpExtraParams": requiredBitSet[1] |= 1 << 4 if err := func() error { v, err := d.RawAppend(nil) - s.XHttpExtraParams = jx.Raw(v) + s.XhttpExtraParams = jx.Raw(v) if err != nil { return err } return nil }(); err != nil { - return errors.Wrap(err, "decode field \"xHttpExtraParams\"") + return errors.Wrap(err, "decode field \"xhttpExtraParams\"") } case "muxParams": requiredBitSet[1] |= 1 << 5 @@ -30485,15 +31471,24 @@ func (s *HostItem) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"serverDescription\"") } - case "tag": - requiredBitSet[2] |= 1 << 2 + case "tags": if err := func() error { - if err := s.Tag.Decode(d); err != nil { + s.Tags = make([]string, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem string + v, err := d.Str() + elem = string(v) + if err != nil { + return err + } + s.Tags = append(s.Tags, elem) + return nil + }); err != nil { return err } return nil }(); err != nil { - return errors.Wrap(err, "decode field \"tag\"") + return errors.Wrap(err, "decode field \"tags\"") } case "isHidden": if err := func() error { @@ -30535,18 +31530,28 @@ func (s *HostItem) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"vlessRouteId\"") } - case "allowInsecure": + case "pinnedPeerCertSha256": + requiredBitSet[2] |= 1 << 7 if err := func() error { - s.AllowInsecure.Reset() - if err := s.AllowInsecure.Decode(d); err != nil { + if err := s.PinnedPeerCertSha256.Decode(d); err != nil { return err } return nil }(); err != nil { - return errors.Wrap(err, "decode field \"allowInsecure\"") + return errors.Wrap(err, "decode field \"pinnedPeerCertSha256\"") + } + case "verifyPeerCertByName": + requiredBitSet[3] |= 1 << 0 + if err := func() error { + if err := s.VerifyPeerCertByName.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"verifyPeerCertByName\"") } case "shuffleHost": - requiredBitSet[3] |= 1 << 0 + requiredBitSet[3] |= 1 << 1 if err := func() error { v, err := d.Bool() s.ShuffleHost = bool(v) @@ -30558,7 +31563,7 @@ func (s *HostItem) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"shuffleHost\"") } case "mihomoX25519": - requiredBitSet[3] |= 1 << 1 + requiredBitSet[3] |= 1 << 2 if err := func() error { v, err := d.Bool() s.MihomoX25519 = bool(v) @@ -30569,8 +31574,18 @@ func (s *HostItem) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"mihomoX25519\"") } + case "mihomoIpVersion": + requiredBitSet[3] |= 1 << 3 + if err := func() error { + if err := s.MihomoIpVersion.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"mihomoIpVersion\"") + } case "nodes": - requiredBitSet[3] |= 1 << 2 + requiredBitSet[3] |= 1 << 4 if err := func() error { s.Nodes = make([]uuid.UUID, 0) if err := d.Arr(func(d *jx.Decoder) error { @@ -30590,7 +31605,7 @@ func (s *HostItem) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"nodes\"") } case "xrayJsonTemplateUuid": - requiredBitSet[3] |= 1 << 3 + requiredBitSet[3] |= 1 << 5 if err := func() error { if err := s.XrayJsonTemplateUuid.Decode(d); err != nil { return err @@ -30600,7 +31615,7 @@ func (s *HostItem) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"xrayJsonTemplateUuid\"") } case "excludedInternalSquads": - requiredBitSet[3] |= 1 << 4 + requiredBitSet[3] |= 1 << 6 if err := func() error { s.ExcludedInternalSquads = make([]uuid.UUID, 0) if err := d.Arr(func(d *jx.Decoder) error { @@ -30620,6 +31635,7 @@ func (s *HostItem) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"excludedInternalSquads\"") } case "excludeFromSubscriptionTypes": + requiredBitSet[3] |= 1 << 7 if err := func() error { s.ExcludeFromSubscriptionTypes = make([]HostItemExcludeFromSubscriptionTypesItem, 0) if err := d.Arr(func(d *jx.Decoder) error { @@ -30647,9 +31663,9 @@ func (s *HostItem) Decode(d *jx.Decoder) error { var failures []validate.FieldError for i, mask := range [4]uint8{ 0b11111111, - 0b11110011, - 0b01000111, - 0b00011111, + 0b11110111, + 0b11000011, + 0b11111111, } { if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { // Mask only required fields and check equality to mask using XOR. @@ -30695,6 +31711,54 @@ func (s *HostItem) UnmarshalJSON(data []byte) error { return s.Decode(d) } +// Encode encodes HostItemAlpn as json. +func (s HostItemAlpn) Encode(e *jx.Encoder) { + e.Str(string(s)) +} + +// Decode decodes HostItemAlpn from json. +func (s *HostItemAlpn) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode HostItemAlpn to nil") + } + v, err := d.StrBytes() + if err != nil { + return err + } + // Try to use constant string. + switch HostItemAlpn(v) { + case HostItemAlpnH3: + *s = HostItemAlpnH3 + case HostItemAlpnH2: + *s = HostItemAlpnH2 + case HostItemAlpnHTTP11: + *s = HostItemAlpnHTTP11 + case HostItemAlpnH2HTTP11: + *s = HostItemAlpnH2HTTP11 + case HostItemAlpnH3H2HTTP11: + *s = HostItemAlpnH3H2HTTP11 + case HostItemAlpnH3H2: + *s = HostItemAlpnH3H2 + default: + *s = HostItemAlpn(v) + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s HostItemAlpn) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *HostItemAlpn) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + // Encode encodes HostItemExcludeFromSubscriptionTypesItem as json. func (s HostItemExcludeFromSubscriptionTypesItem) Encode(e *jx.Encoder) { e.Str(string(s)) @@ -30743,6 +31807,52 @@ func (s *HostItemExcludeFromSubscriptionTypesItem) UnmarshalJSON(data []byte) er return s.Decode(d) } +// Encode encodes HostItemMihomoIpVersion as json. +func (s HostItemMihomoIpVersion) Encode(e *jx.Encoder) { + e.Str(string(s)) +} + +// Decode decodes HostItemMihomoIpVersion from json. +func (s *HostItemMihomoIpVersion) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode HostItemMihomoIpVersion to nil") + } + v, err := d.StrBytes() + if err != nil { + return err + } + // Try to use constant string. + switch HostItemMihomoIpVersion(v) { + case HostItemMihomoIpVersionDual: + *s = HostItemMihomoIpVersionDual + case HostItemMihomoIpVersionIpv4: + *s = HostItemMihomoIpVersionIpv4 + case HostItemMihomoIpVersionIpv6: + *s = HostItemMihomoIpVersionIpv6 + case HostItemMihomoIpVersionIpv4Prefer: + *s = HostItemMihomoIpVersionIpv4Prefer + case HostItemMihomoIpVersionIpv6Prefer: + *s = HostItemMihomoIpVersionIpv6Prefer + default: + *s = HostItemMihomoIpVersion(v) + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s HostItemMihomoIpVersion) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *HostItemMihomoIpVersion) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + // Encode encodes HostItemSecurityLayer as json. func (s HostItemSecurityLayer) Encode(e *jx.Encoder) { e.Str(string(s)) @@ -32402,6 +33512,119 @@ func (s *InfraProviderResponseResponse) UnmarshalJSON(data []byte) error { return s.Decode(d) } +// Encode implements json.Marshaler. +func (s *InfraProvidersDetail) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *InfraProvidersDetail) encodeFields(e *jx.Encoder) { + { + e.FieldStart("nodeUuid") + json.EncodeUUID(e, s.NodeUuid) + } + { + e.FieldStart("countryCode") + e.Str(s.CountryCode) + } +} + +var jsonFieldsNameOfInfraProvidersDetail = [2]string{ + 0: "nodeUuid", + 1: "countryCode", +} + +// Decode decodes InfraProvidersDetail from json. +func (s *InfraProvidersDetail) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode InfraProvidersDetail to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "nodeUuid": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := json.DecodeUUID(d) + s.NodeUuid = v + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"nodeUuid\"") + } + case "countryCode": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.CountryCode = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"countryCode\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode InfraProvidersDetail") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfInfraProvidersDetail) { + name = jsonFieldsNameOfInfraProvidersDetail[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *InfraProvidersDetail) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *InfraProvidersDetail) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + // Encode implements json.Marshaler. func (s *InterfaceItem) Encode(e *jx.Encoder) { e.ObjStart() @@ -34239,6 +35462,94 @@ func (s *NilFloat64) UnmarshalJSON(data []byte) error { return s.Decode(d) } +// Encode encodes GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup as json. +func (o NilGetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup) Encode(e *jx.Encoder) { + if o.Null { + e.Null() + return + } + o.Value.Encode(e) +} + +// Decode decodes GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup from json. +func (o *NilGetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode NilGetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup to nil") + } + if d.Next() == jx.Null { + if err := d.Null(); err != nil { + return err + } + + var v GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup + o.Value = v + o.Null = true + return nil + } + o.Null = false + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s NilGetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *NilGetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion as json. +func (o NilGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion) Encode(e *jx.Encoder) { + if o.Null { + e.Null() + return + } + e.Str(string(o.Value)) +} + +// Decode decodes GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion from json. +func (o *NilGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode NilGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion to nil") + } + if d.Next() == jx.Null { + if err := d.Null(); err != nil { + return err + } + + var v GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion + o.Value = v + o.Null = true + return nil + } + o.Null = false + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s NilGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *NilGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + // Encode encodes GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemTransportOptions0Header as json. func (o NilGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemTransportOptions0Header) Encode(e *jx.Encoder) { if o.Null { @@ -34462,6 +35773,94 @@ func (s *NilGetStatusResponseResponseAuthentication) UnmarshalJSON(data []byte) return s.Decode(d) } +// Encode encodes HostItemAlpn as json. +func (o NilHostItemAlpn) Encode(e *jx.Encoder) { + if o.Null { + e.Null() + return + } + e.Str(string(o.Value)) +} + +// Decode decodes HostItemAlpn from json. +func (o *NilHostItemAlpn) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode NilHostItemAlpn to nil") + } + if d.Next() == jx.Null { + if err := d.Null(); err != nil { + return err + } + + var v HostItemAlpn + o.Value = v + o.Null = true + return nil + } + o.Null = false + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s NilHostItemAlpn) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *NilHostItemAlpn) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes HostItemMihomoIpVersion as json. +func (o NilHostItemMihomoIpVersion) Encode(e *jx.Encoder) { + if o.Null { + e.Null() + return + } + e.Str(string(o.Value)) +} + +// Decode decodes HostItemMihomoIpVersion from json. +func (o *NilHostItemMihomoIpVersion) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode NilHostItemMihomoIpVersion to nil") + } + if d.Next() == jx.Null { + if err := d.Null(); err != nil { + return err + } + + var v HostItemMihomoIpVersion + o.Value = v + o.Null = true + return nil + } + o.Null = false + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s NilHostItemMihomoIpVersion) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *NilHostItemMihomoIpVersion) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + // Encode encodes HostOverride as json. func (o NilHostOverride) Encode(e *jx.Encoder) { if o.Null { @@ -34550,6 +35949,50 @@ func (s *NilHwidSettings) UnmarshalJSON(data []byte) error { return s.Decode(d) } +// Encode encodes InfraProvidersDetail as json. +func (o NilInfraProvidersDetail) Encode(e *jx.Encoder) { + if o.Null { + e.Null() + return + } + o.Value.Encode(e) +} + +// Decode decodes InfraProvidersDetail from json. +func (o *NilInfraProvidersDetail) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode NilInfraProvidersDetail to nil") + } + if d.Next() == jx.Null { + if err := d.Null(); err != nil { + return err + } + + var v InfraProvidersDetail + o.Value = v + o.Null = true + return nil + } + o.Null = false + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s NilInfraProvidersDetail) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *NilInfraProvidersDetail) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + // Encode encodes int as json. func (o NilInt) Encode(e *jx.Encoder) { if o.Null { @@ -35870,6 +37313,102 @@ func (s *NodePluginsResponseResponseResponse) UnmarshalJSON(data []byte) error { return s.Decode(d) } +// Encode implements json.Marshaler. +func (s *NodeRequestBodyRequest) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *NodeRequestBodyRequest) encodeFields(e *jx.Encoder) { + { + e.FieldStart("forceRestart") + e.Bool(s.ForceRestart) + } +} + +var jsonFieldsNameOfNodeRequestBodyRequest = [1]string{ + 0: "forceRestart", +} + +// Decode decodes NodeRequestBodyRequest from json. +func (s *NodeRequestBodyRequest) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode NodeRequestBodyRequest to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "forceRestart": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Bool() + s.ForceRestart = bool(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"forceRestart\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode NodeRequestBodyRequest") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000001, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfNodeRequestBodyRequest) { + name = jsonFieldsNameOfNodeRequestBodyRequest[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *NodeRequestBodyRequest) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *NodeRequestBodyRequest) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + // Encode implements json.Marshaler. func (s *NodeResponse) Encode(e *jx.Encoder) { e.ObjStart() @@ -35989,6 +37528,10 @@ func (s *NodeResponseDataItem) encodeFields(e *jx.Encoder) { e.FieldStart("port") s.Port.Encode(e) } + { + e.FieldStart("proxyUrl") + s.ProxyUrl.Encode(e) + } { e.FieldStart("isConnected") e.Bool(s.IsConnected) @@ -36041,6 +37584,10 @@ func (s *NodeResponseDataItem) encodeFields(e *jx.Encoder) { e.FieldStart("consumptionMultiplier") e.Float64(s.ConsumptionMultiplier) } + { + e.FieldStart("nodeConsumptionMultiplier") + e.Float64(s.NodeConsumptionMultiplier) + } { e.FieldStart("tags") e.ArrStart() @@ -36089,37 +37636,44 @@ func (s *NodeResponseDataItem) encodeFields(e *jx.Encoder) { e.FieldStart("usersOnline") e.Float64(s.UsersOnline) } + { + e.FieldStart("note") + s.Note.Encode(e) + } } -var jsonFieldsNameOfNodeResponseDataItem = [28]string{ +var jsonFieldsNameOfNodeResponseDataItem = [31]string{ 0: "uuid", 1: "name", 2: "address", 3: "port", - 4: "isConnected", - 5: "isDisabled", - 6: "isConnecting", - 7: "lastStatusChange", - 8: "lastStatusMessage", - 9: "isTrafficTrackingActive", - 10: "trafficResetDay", - 11: "trafficLimitBytes", - 12: "trafficUsedBytes", - 13: "notifyPercent", - 14: "viewPosition", - 15: "countryCode", - 16: "consumptionMultiplier", - 17: "tags", - 18: "createdAt", - 19: "updatedAt", - 20: "configProfile", - 21: "providerUuid", - 22: "provider", - 23: "activePluginUuid", - 24: "system", - 25: "versions", - 26: "xrayUptime", - 27: "usersOnline", + 4: "proxyUrl", + 5: "isConnected", + 6: "isDisabled", + 7: "isConnecting", + 8: "lastStatusChange", + 9: "lastStatusMessage", + 10: "isTrafficTrackingActive", + 11: "trafficResetDay", + 12: "trafficLimitBytes", + 13: "trafficUsedBytes", + 14: "notifyPercent", + 15: "viewPosition", + 16: "countryCode", + 17: "consumptionMultiplier", + 18: "nodeConsumptionMultiplier", + 19: "tags", + 20: "createdAt", + 21: "updatedAt", + 22: "configProfile", + 23: "providerUuid", + 24: "provider", + 25: "activePluginUuid", + 26: "system", + 27: "versions", + 28: "xrayUptime", + 29: "usersOnline", + 30: "note", } // Decode decodes NodeResponseDataItem from json. @@ -36177,8 +37731,18 @@ func (s *NodeResponseDataItem) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"port\"") } - case "isConnected": + case "proxyUrl": requiredBitSet[0] |= 1 << 4 + if err := func() error { + if err := s.ProxyUrl.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"proxyUrl\"") + } + case "isConnected": + requiredBitSet[0] |= 1 << 5 if err := func() error { v, err := d.Bool() s.IsConnected = bool(v) @@ -36190,7 +37754,7 @@ func (s *NodeResponseDataItem) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"isConnected\"") } case "isDisabled": - requiredBitSet[0] |= 1 << 5 + requiredBitSet[0] |= 1 << 6 if err := func() error { v, err := d.Bool() s.IsDisabled = bool(v) @@ -36202,7 +37766,7 @@ func (s *NodeResponseDataItem) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"isDisabled\"") } case "isConnecting": - requiredBitSet[0] |= 1 << 6 + requiredBitSet[0] |= 1 << 7 if err := func() error { v, err := d.Bool() s.IsConnecting = bool(v) @@ -36214,7 +37778,7 @@ func (s *NodeResponseDataItem) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"isConnecting\"") } case "lastStatusChange": - requiredBitSet[0] |= 1 << 7 + requiredBitSet[1] |= 1 << 0 if err := func() error { if err := s.LastStatusChange.Decode(d, json.DecodeDateTime); err != nil { return err @@ -36224,7 +37788,7 @@ func (s *NodeResponseDataItem) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"lastStatusChange\"") } case "lastStatusMessage": - requiredBitSet[1] |= 1 << 0 + requiredBitSet[1] |= 1 << 1 if err := func() error { if err := s.LastStatusMessage.Decode(d); err != nil { return err @@ -36234,7 +37798,7 @@ func (s *NodeResponseDataItem) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"lastStatusMessage\"") } case "isTrafficTrackingActive": - requiredBitSet[1] |= 1 << 1 + requiredBitSet[1] |= 1 << 2 if err := func() error { v, err := d.Bool() s.IsTrafficTrackingActive = bool(v) @@ -36246,7 +37810,7 @@ func (s *NodeResponseDataItem) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"isTrafficTrackingActive\"") } case "trafficResetDay": - requiredBitSet[1] |= 1 << 2 + requiredBitSet[1] |= 1 << 3 if err := func() error { if err := s.TrafficResetDay.Decode(d); err != nil { return err @@ -36256,7 +37820,7 @@ func (s *NodeResponseDataItem) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"trafficResetDay\"") } case "trafficLimitBytes": - requiredBitSet[1] |= 1 << 3 + requiredBitSet[1] |= 1 << 4 if err := func() error { if err := s.TrafficLimitBytes.Decode(d); err != nil { return err @@ -36266,7 +37830,7 @@ func (s *NodeResponseDataItem) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"trafficLimitBytes\"") } case "trafficUsedBytes": - requiredBitSet[1] |= 1 << 4 + requiredBitSet[1] |= 1 << 5 if err := func() error { if err := s.TrafficUsedBytes.Decode(d); err != nil { return err @@ -36276,7 +37840,7 @@ func (s *NodeResponseDataItem) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"trafficUsedBytes\"") } case "notifyPercent": - requiredBitSet[1] |= 1 << 5 + requiredBitSet[1] |= 1 << 6 if err := func() error { if err := s.NotifyPercent.Decode(d); err != nil { return err @@ -36286,7 +37850,7 @@ func (s *NodeResponseDataItem) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"notifyPercent\"") } case "viewPosition": - requiredBitSet[1] |= 1 << 6 + requiredBitSet[1] |= 1 << 7 if err := func() error { v, err := d.Int() s.ViewPosition = int(v) @@ -36298,7 +37862,7 @@ func (s *NodeResponseDataItem) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"viewPosition\"") } case "countryCode": - requiredBitSet[1] |= 1 << 7 + requiredBitSet[2] |= 1 << 0 if err := func() error { v, err := d.Str() s.CountryCode = string(v) @@ -36310,7 +37874,7 @@ func (s *NodeResponseDataItem) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"countryCode\"") } case "consumptionMultiplier": - requiredBitSet[2] |= 1 << 0 + requiredBitSet[2] |= 1 << 1 if err := func() error { v, err := d.Float64() s.ConsumptionMultiplier = float64(v) @@ -36321,8 +37885,20 @@ func (s *NodeResponseDataItem) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"consumptionMultiplier\"") } + case "nodeConsumptionMultiplier": + requiredBitSet[2] |= 1 << 2 + if err := func() error { + v, err := d.Float64() + s.NodeConsumptionMultiplier = float64(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"nodeConsumptionMultiplier\"") + } case "tags": - requiredBitSet[2] |= 1 << 1 + requiredBitSet[2] |= 1 << 3 if err := func() error { s.Tags = make([]string, 0) if err := d.Arr(func(d *jx.Decoder) error { @@ -36342,7 +37918,7 @@ func (s *NodeResponseDataItem) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"tags\"") } case "createdAt": - requiredBitSet[2] |= 1 << 2 + requiredBitSet[2] |= 1 << 4 if err := func() error { v, err := json.DecodeDateTime(d) s.CreatedAt = v @@ -36354,7 +37930,7 @@ func (s *NodeResponseDataItem) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"createdAt\"") } case "updatedAt": - requiredBitSet[2] |= 1 << 3 + requiredBitSet[2] |= 1 << 5 if err := func() error { v, err := json.DecodeDateTime(d) s.UpdatedAt = v @@ -36366,7 +37942,7 @@ func (s *NodeResponseDataItem) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"updatedAt\"") } case "configProfile": - requiredBitSet[2] |= 1 << 4 + requiredBitSet[2] |= 1 << 6 if err := func() error { if err := s.ConfigProfile.Decode(d); err != nil { return err @@ -36376,7 +37952,7 @@ func (s *NodeResponseDataItem) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"configProfile\"") } case "providerUuid": - requiredBitSet[2] |= 1 << 5 + requiredBitSet[2] |= 1 << 7 if err := func() error { if err := s.ProviderUuid.Decode(d); err != nil { return err @@ -36386,7 +37962,7 @@ func (s *NodeResponseDataItem) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"providerUuid\"") } case "provider": - requiredBitSet[2] |= 1 << 6 + requiredBitSet[3] |= 1 << 0 if err := func() error { if err := s.Provider.Decode(d); err != nil { return err @@ -36396,7 +37972,7 @@ func (s *NodeResponseDataItem) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"provider\"") } case "activePluginUuid": - requiredBitSet[2] |= 1 << 7 + requiredBitSet[3] |= 1 << 1 if err := func() error { if err := s.ActivePluginUuid.Decode(d); err != nil { return err @@ -36406,7 +37982,7 @@ func (s *NodeResponseDataItem) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"activePluginUuid\"") } case "system": - requiredBitSet[3] |= 1 << 0 + requiredBitSet[3] |= 1 << 2 if err := func() error { if err := s.System.Decode(d); err != nil { return err @@ -36416,7 +37992,7 @@ func (s *NodeResponseDataItem) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"system\"") } case "versions": - requiredBitSet[3] |= 1 << 1 + requiredBitSet[3] |= 1 << 3 if err := func() error { if err := s.Versions.Decode(d); err != nil { return err @@ -36426,7 +38002,7 @@ func (s *NodeResponseDataItem) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"versions\"") } case "xrayUptime": - requiredBitSet[3] |= 1 << 2 + requiredBitSet[3] |= 1 << 4 if err := func() error { v, err := d.Float64() s.XrayUptime = float64(v) @@ -36438,7 +38014,7 @@ func (s *NodeResponseDataItem) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"xrayUptime\"") } case "usersOnline": - requiredBitSet[3] |= 1 << 3 + requiredBitSet[3] |= 1 << 5 if err := func() error { v, err := d.Float64() s.UsersOnline = float64(v) @@ -36449,6 +38025,16 @@ func (s *NodeResponseDataItem) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"usersOnline\"") } + case "note": + requiredBitSet[3] |= 1 << 6 + if err := func() error { + if err := s.Note.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"note\"") + } default: return d.Skip() } @@ -36462,7 +38048,7 @@ func (s *NodeResponseDataItem) Decode(d *jx.Decoder) error { 0b11111111, 0b11111111, 0b11111111, - 0b00001111, + 0b01111111, } { if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { // Mask only required fields and check equality to mask using XOR. @@ -38070,6 +39656,39 @@ func (s *OptDebugSrrMatcherSettings) UnmarshalJSON(data []byte) error { return s.Decode(d) } +// Encode encodes EncryptionItem as json. +func (o OptEncryptionItem) Encode(e *jx.Encoder) { + if !o.Set { + return + } + o.Value.Encode(e) +} + +// Decode decodes EncryptionItem from json. +func (o *OptEncryptionItem) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptEncryptionItem to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptEncryptionItem) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptEncryptionItem) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + // Encode encodes float64 as json. func (o OptFloat64) Encode(e *jx.Encoder) { if !o.Set { @@ -38537,8 +40156,8 @@ func (s *OptNilCreateHostRequestAlpn) UnmarshalJSON(data []byte) error { return s.Decode(d) } -// Encode encodes CreateHostRequestFingerprint as json. -func (o OptNilCreateHostRequestFingerprint) Encode(e *jx.Encoder) { +// Encode encodes CreateHostRequestMihomoIpVersion as json. +func (o OptNilCreateHostRequestMihomoIpVersion) Encode(e *jx.Encoder) { if !o.Set { return } @@ -38549,17 +40168,17 @@ func (o OptNilCreateHostRequestFingerprint) Encode(e *jx.Encoder) { e.Str(string(o.Value)) } -// Decode decodes CreateHostRequestFingerprint from json. -func (o *OptNilCreateHostRequestFingerprint) Decode(d *jx.Decoder) error { +// Decode decodes CreateHostRequestMihomoIpVersion from json. +func (o *OptNilCreateHostRequestMihomoIpVersion) Decode(d *jx.Decoder) error { if o == nil { - return errors.New("invalid: unable to decode OptNilCreateHostRequestFingerprint to nil") + return errors.New("invalid: unable to decode OptNilCreateHostRequestMihomoIpVersion to nil") } if d.Next() == jx.Null { if err := d.Null(); err != nil { return err } - var v CreateHostRequestFingerprint + var v CreateHostRequestMihomoIpVersion o.Value = v o.Set = true o.Null = true @@ -38574,14 +40193,14 @@ func (o *OptNilCreateHostRequestFingerprint) Decode(d *jx.Decoder) error { } // MarshalJSON implements stdjson.Marshaler. -func (s OptNilCreateHostRequestFingerprint) MarshalJSON() ([]byte, error) { +func (s OptNilCreateHostRequestMihomoIpVersion) MarshalJSON() ([]byte, error) { e := jx.Encoder{} s.Encode(&e) return e.Bytes(), nil } // UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptNilCreateHostRequestFingerprint) UnmarshalJSON(data []byte) error { +func (s *OptNilCreateHostRequestMihomoIpVersion) UnmarshalJSON(data []byte) error { d := jx.DecodeBytes(data) return s.Decode(d) } @@ -39232,8 +40851,8 @@ func (s *OptNilUpdateHostRequestAlpn) UnmarshalJSON(data []byte) error { return s.Decode(d) } -// Encode encodes UpdateHostRequestFingerprint as json. -func (o OptNilUpdateHostRequestFingerprint) Encode(e *jx.Encoder) { +// Encode encodes UpdateHostRequestMihomoIpVersion as json. +func (o OptNilUpdateHostRequestMihomoIpVersion) Encode(e *jx.Encoder) { if !o.Set { return } @@ -39244,17 +40863,17 @@ func (o OptNilUpdateHostRequestFingerprint) Encode(e *jx.Encoder) { e.Str(string(o.Value)) } -// Decode decodes UpdateHostRequestFingerprint from json. -func (o *OptNilUpdateHostRequestFingerprint) Decode(d *jx.Decoder) error { +// Decode decodes UpdateHostRequestMihomoIpVersion from json. +func (o *OptNilUpdateHostRequestMihomoIpVersion) Decode(d *jx.Decoder) error { if o == nil { - return errors.New("invalid: unable to decode OptNilUpdateHostRequestFingerprint to nil") + return errors.New("invalid: unable to decode OptNilUpdateHostRequestMihomoIpVersion to nil") } if d.Next() == jx.Null { if err := d.Null(); err != nil { return err } - var v UpdateHostRequestFingerprint + var v UpdateHostRequestMihomoIpVersion o.Value = v o.Set = true o.Null = true @@ -39269,14 +40888,112 @@ func (o *OptNilUpdateHostRequestFingerprint) Decode(d *jx.Decoder) error { } // MarshalJSON implements stdjson.Marshaler. -func (s OptNilUpdateHostRequestFingerprint) MarshalJSON() ([]byte, error) { +func (s OptNilUpdateHostRequestMihomoIpVersion) MarshalJSON() ([]byte, error) { e := jx.Encoder{} s.Encode(&e) return e.Bytes(), nil } // UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptNilUpdateHostRequestFingerprint) UnmarshalJSON(data []byte) error { +func (s *OptNilUpdateHostRequestMihomoIpVersion) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes UpdateManyHostsRequestAlpn as json. +func (o OptNilUpdateManyHostsRequestAlpn) Encode(e *jx.Encoder) { + if !o.Set { + return + } + if o.Null { + e.Null() + return + } + e.Str(string(o.Value)) +} + +// Decode decodes UpdateManyHostsRequestAlpn from json. +func (o *OptNilUpdateManyHostsRequestAlpn) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptNilUpdateManyHostsRequestAlpn to nil") + } + if d.Next() == jx.Null { + if err := d.Null(); err != nil { + return err + } + + var v UpdateManyHostsRequestAlpn + o.Value = v + o.Set = true + o.Null = true + return nil + } + o.Set = true + o.Null = false + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptNilUpdateManyHostsRequestAlpn) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptNilUpdateManyHostsRequestAlpn) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes UpdateManyHostsRequestMihomoIpVersion as json. +func (o OptNilUpdateManyHostsRequestMihomoIpVersion) Encode(e *jx.Encoder) { + if !o.Set { + return + } + if o.Null { + e.Null() + return + } + e.Str(string(o.Value)) +} + +// Decode decodes UpdateManyHostsRequestMihomoIpVersion from json. +func (o *OptNilUpdateManyHostsRequestMihomoIpVersion) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptNilUpdateManyHostsRequestMihomoIpVersion to nil") + } + if d.Next() == jx.Null { + if err := d.Null(); err != nil { + return err + } + + var v UpdateManyHostsRequestMihomoIpVersion + o.Value = v + o.Set = true + o.Null = true + return nil + } + o.Set = true + o.Null = false + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptNilUpdateManyHostsRequestMihomoIpVersion) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptNilUpdateManyHostsRequestMihomoIpVersion) UnmarshalJSON(data []byte) error { d := jx.DecodeBytes(data) return s.Decode(d) } @@ -39518,6 +41235,39 @@ func (s *OptUpdateHostRequestSecurityLayer) UnmarshalJSON(data []byte) error { return s.Decode(d) } +// Encode encodes UpdateManyHostsRequestSecurityLayer as json. +func (o OptUpdateManyHostsRequestSecurityLayer) Encode(e *jx.Encoder) { + if !o.Set { + return + } + e.Str(string(o.Value)) +} + +// Decode decodes UpdateManyHostsRequestSecurityLayer from json. +func (o *OptUpdateManyHostsRequestSecurityLayer) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptUpdateManyHostsRequestSecurityLayer to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptUpdateManyHostsRequestSecurityLayer) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptUpdateManyHostsRequestSecurityLayer) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + // Encode encodes UpdateSubscriptionSettingsRequestCustomResponseHeaders as json. func (o OptUpdateSubscriptionSettingsRequestCustomResponseHeaders) Encode(e *jx.Encoder) { if !o.Set { @@ -42418,8 +44168,8 @@ func (s *Record) encodeFields(e *jx.Encoder) { e.Float64(s.ID) } { - e.FieldStart("userUuid") - json.EncodeUUID(e, s.UserUuid) + e.FieldStart("userId") + e.Float64(s.UserId) } { e.FieldStart("requestAt") @@ -42437,7 +44187,7 @@ func (s *Record) encodeFields(e *jx.Encoder) { var jsonFieldsNameOfRecord = [5]string{ 0: "id", - 1: "userUuid", + 1: "userId", 2: "requestAt", 3: "requestIp", 4: "userAgent", @@ -42464,17 +44214,17 @@ func (s *Record) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"id\"") } - case "userUuid": + case "userId": requiredBitSet[0] |= 1 << 1 if err := func() error { - v, err := json.DecodeUUID(d) - s.UserUuid = v + v, err := d.Float64() + s.UserId = float64(v) if err != nil { return err } return nil }(); err != nil { - return errors.Wrap(err, "decode field \"userUuid\"") + return errors.Wrap(err, "decode field \"userId\"") } case "requestAt": requiredBitSet[0] |= 1 << 2 @@ -43815,15 +45565,40 @@ func (s *ResponseModification) encodeFields(e *jx.Encoder) { e.ArrEnd() } } + { + if s.DisableHwidCheck.Set { + e.FieldStart("disableHwidCheck") + s.DisableHwidCheck.Encode(e) + } + } + { + if s.Encryption.Set { + e.FieldStart("encryption") + s.Encryption.Encode(e) + } + } + { + if s.ExcludeHostsByTags != nil { + e.FieldStart("excludeHostsByTags") + e.ArrStart() + for _, elem := range s.ExcludeHostsByTags { + e.Str(elem) + } + e.ArrEnd() + } + } } -var jsonFieldsNameOfResponseModification = [6]string{ +var jsonFieldsNameOfResponseModification = [9]string{ 0: "headers", 1: "applyHeadersToEnd", 2: "subscriptionTemplate", 3: "ignoreHostXrayJsonTemplate", 4: "ignoreServeJsonAtBaseSubscription", 5: "additionalExtendedClientsRegex", + 6: "disableHwidCheck", + 7: "encryption", + 8: "excludeHostsByTags", } // Decode decodes ResponseModification from json. @@ -43910,6 +45685,45 @@ func (s *ResponseModification) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"additionalExtendedClientsRegex\"") } + case "disableHwidCheck": + if err := func() error { + s.DisableHwidCheck.Reset() + if err := s.DisableHwidCheck.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"disableHwidCheck\"") + } + case "encryption": + if err := func() error { + s.Encryption.Reset() + if err := s.Encryption.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"encryption\"") + } + case "excludeHostsByTags": + if err := func() error { + s.ExcludeHostsByTags = make([]string, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem string + v, err := d.Str() + elem = string(v) + if err != nil { + return err + } + s.ExcludeHostsByTags = append(s.ExcludeHostsByTags, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"excludeHostsByTags\"") + } default: return d.Skip() } @@ -44110,69 +45924,6 @@ func (s *ResponseRulesVersion) UnmarshalJSON(data []byte) error { return s.Decode(d) } -// Encode implements json.Marshaler. -func (s *RestartAllNodesRequestBody) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *RestartAllNodesRequestBody) encodeFields(e *jx.Encoder) { - { - if s.ForceRestart.Set { - e.FieldStart("forceRestart") - s.ForceRestart.Encode(e) - } - } -} - -var jsonFieldsNameOfRestartAllNodesRequestBody = [1]string{ - 0: "forceRestart", -} - -// Decode decodes RestartAllNodesRequestBody from json. -func (s *RestartAllNodesRequestBody) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode RestartAllNodesRequestBody to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "forceRestart": - if err := func() error { - s.ForceRestart.Reset() - if err := s.ForceRestart.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"forceRestart\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode RestartAllNodesRequestBody") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *RestartAllNodesRequestBody) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *RestartAllNodesRequestBody) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - // Encode implements json.Marshaler. func (s *RevokeUserSubscriptionBody) Encode(e *jx.Encoder) { e.ObjStart() @@ -44556,273 +46307,6 @@ func (s *RuleResponseType) UnmarshalJSON(data []byte) error { return s.Decode(d) } -// Encode implements json.Marshaler. -func (s *SetInboundToManyHostsRequest) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *SetInboundToManyHostsRequest) encodeFields(e *jx.Encoder) { - { - e.FieldStart("uuids") - e.ArrStart() - for _, elem := range s.Uuids { - json.EncodeUUID(e, elem) - } - e.ArrEnd() - } - { - e.FieldStart("configProfileUuid") - json.EncodeUUID(e, s.ConfigProfileUuid) - } - { - e.FieldStart("configProfileInboundUuid") - json.EncodeUUID(e, s.ConfigProfileInboundUuid) - } -} - -var jsonFieldsNameOfSetInboundToManyHostsRequest = [3]string{ - 0: "uuids", - 1: "configProfileUuid", - 2: "configProfileInboundUuid", -} - -// Decode decodes SetInboundToManyHostsRequest from json. -func (s *SetInboundToManyHostsRequest) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode SetInboundToManyHostsRequest to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "uuids": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - s.Uuids = make([]uuid.UUID, 0) - if err := d.Arr(func(d *jx.Decoder) error { - var elem uuid.UUID - v, err := json.DecodeUUID(d) - elem = v - if err != nil { - return err - } - s.Uuids = append(s.Uuids, elem) - return nil - }); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"uuids\"") - } - case "configProfileUuid": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := json.DecodeUUID(d) - s.ConfigProfileUuid = v - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"configProfileUuid\"") - } - case "configProfileInboundUuid": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - v, err := json.DecodeUUID(d) - s.ConfigProfileInboundUuid = v - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"configProfileInboundUuid\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode SetInboundToManyHostsRequest") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000111, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfSetInboundToManyHostsRequest) { - name = jsonFieldsNameOfSetInboundToManyHostsRequest[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *SetInboundToManyHostsRequest) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *SetInboundToManyHostsRequest) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *SetPortToManyHostsRequest) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *SetPortToManyHostsRequest) encodeFields(e *jx.Encoder) { - { - e.FieldStart("uuids") - e.ArrStart() - for _, elem := range s.Uuids { - json.EncodeUUID(e, elem) - } - e.ArrEnd() - } - { - e.FieldStart("port") - e.Int(s.Port) - } -} - -var jsonFieldsNameOfSetPortToManyHostsRequest = [2]string{ - 0: "uuids", - 1: "port", -} - -// Decode decodes SetPortToManyHostsRequest from json. -func (s *SetPortToManyHostsRequest) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode SetPortToManyHostsRequest to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "uuids": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - s.Uuids = make([]uuid.UUID, 0) - if err := d.Arr(func(d *jx.Decoder) error { - var elem uuid.UUID - v, err := json.DecodeUUID(d) - elem = v - if err != nil { - return err - } - s.Uuids = append(s.Uuids, elem) - return nil - }); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"uuids\"") - } - case "port": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Int() - s.Port = int(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"port\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode SetPortToManyHostsRequest") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000011, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfSetPortToManyHostsRequest) { - name = jsonFieldsNameOfSetPortToManyHostsRequest[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *SetPortToManyHostsRequest) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *SetPortToManyHostsRequest) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - // Encode implements json.Marshaler. func (s *SettingsResponse) Encode(e *jx.Encoder) { e.ObjStart() @@ -45729,6 +47213,394 @@ func (s *Stat) UnmarshalJSON(data []byte) error { return s.Decode(d) } +// Encode implements json.Marshaler. +func (s *StatsNodeUsersUsageResponseResponse) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *StatsNodeUsersUsageResponseResponse) encodeFields(e *jx.Encoder) { + { + e.FieldStart("response") + s.Response.Encode(e) + } +} + +var jsonFieldsNameOfStatsNodeUsersUsageResponseResponse = [1]string{ + 0: "response", +} + +// Decode decodes StatsNodeUsersUsageResponseResponse from json. +func (s *StatsNodeUsersUsageResponseResponse) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode StatsNodeUsersUsageResponseResponse to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "response": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Response.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"response\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode StatsNodeUsersUsageResponseResponse") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000001, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfStatsNodeUsersUsageResponseResponse) { + name = jsonFieldsNameOfStatsNodeUsersUsageResponseResponse[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *StatsNodeUsersUsageResponseResponse) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *StatsNodeUsersUsageResponseResponse) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *StatsNodeUsersUsageResponseResponseResponse) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *StatsNodeUsersUsageResponseResponseResponse) encodeFields(e *jx.Encoder) { + { + e.FieldStart("categories") + e.ArrStart() + for _, elem := range s.Categories { + e.Str(elem) + } + e.ArrEnd() + } + { + e.FieldStart("sparklineData") + e.ArrStart() + for _, elem := range s.SparklineData { + e.Float64(elem) + } + e.ArrEnd() + } + { + e.FieldStart("topUsers") + e.ArrStart() + for _, elem := range s.TopUsers { + elem.Encode(e) + } + e.ArrEnd() + } +} + +var jsonFieldsNameOfStatsNodeUsersUsageResponseResponseResponse = [3]string{ + 0: "categories", + 1: "sparklineData", + 2: "topUsers", +} + +// Decode decodes StatsNodeUsersUsageResponseResponseResponse from json. +func (s *StatsNodeUsersUsageResponseResponseResponse) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode StatsNodeUsersUsageResponseResponseResponse to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "categories": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + s.Categories = make([]string, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem string + v, err := d.Str() + elem = string(v) + if err != nil { + return err + } + s.Categories = append(s.Categories, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"categories\"") + } + case "sparklineData": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + s.SparklineData = make([]float64, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem float64 + v, err := d.Float64() + elem = float64(v) + if err != nil { + return err + } + s.SparklineData = append(s.SparklineData, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"sparklineData\"") + } + case "topUsers": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + s.TopUsers = make([]StatsNodeUsersUsageResponseResponseResponseTopUsersItem, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem StatsNodeUsersUsageResponseResponseResponseTopUsersItem + if err := elem.Decode(d); err != nil { + return err + } + s.TopUsers = append(s.TopUsers, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"topUsers\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode StatsNodeUsersUsageResponseResponseResponse") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfStatsNodeUsersUsageResponseResponseResponse) { + name = jsonFieldsNameOfStatsNodeUsersUsageResponseResponseResponse[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *StatsNodeUsersUsageResponseResponseResponse) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *StatsNodeUsersUsageResponseResponseResponse) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *StatsNodeUsersUsageResponseResponseResponseTopUsersItem) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *StatsNodeUsersUsageResponseResponseResponseTopUsersItem) encodeFields(e *jx.Encoder) { + { + e.FieldStart("color") + e.Str(s.Color) + } + { + e.FieldStart("username") + e.Str(s.Username) + } + { + e.FieldStart("total") + e.Float64(s.Total) + } +} + +var jsonFieldsNameOfStatsNodeUsersUsageResponseResponseResponseTopUsersItem = [3]string{ + 0: "color", + 1: "username", + 2: "total", +} + +// Decode decodes StatsNodeUsersUsageResponseResponseResponseTopUsersItem from json. +func (s *StatsNodeUsersUsageResponseResponseResponseTopUsersItem) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode StatsNodeUsersUsageResponseResponseResponseTopUsersItem to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "color": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.Color = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"color\"") + } + case "username": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.Username = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"username\"") + } + case "total": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + v, err := d.Float64() + s.Total = float64(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"total\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode StatsNodeUsersUsageResponseResponseResponseTopUsersItem") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfStatsNodeUsersUsageResponseResponseResponseTopUsersItem) { + name = jsonFieldsNameOfStatsNodeUsersUsageResponseResponseResponseTopUsersItem[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *StatsNodeUsersUsageResponseResponseResponseTopUsersItem) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *StatsNodeUsersUsageResponseResponseResponseTopUsersItem) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + // Encode implements json.Marshaler. func (s *StatsUserUsageResponseResponse) Encode(e *jx.Encoder) { e.ObjStart() @@ -50401,9 +52273,9 @@ func (s *UpdateHostRequest) encodeFields(e *jx.Encoder) { } } { - if len(s.XHttpExtraParams) != 0 { - e.FieldStart("xHttpExtraParams") - e.Raw(s.XHttpExtraParams) + if len(s.XhttpExtraParams) != 0 { + e.FieldStart("xhttpExtraParams") + e.Raw(s.XhttpExtraParams) } } { @@ -50431,9 +52303,13 @@ func (s *UpdateHostRequest) encodeFields(e *jx.Encoder) { } } { - if s.Tag.Set { - e.FieldStart("tag") - s.Tag.Encode(e) + if s.Tags != nil { + e.FieldStart("tags") + e.ArrStart() + for _, elem := range s.Tags { + e.Str(elem) + } + e.ArrEnd() } } { @@ -50461,9 +52337,15 @@ func (s *UpdateHostRequest) encodeFields(e *jx.Encoder) { } } { - if s.AllowInsecure.Set { - e.FieldStart("allowInsecure") - s.AllowInsecure.Encode(e) + if s.PinnedPeerCertSha256.Set { + e.FieldStart("pinnedPeerCertSha256") + s.PinnedPeerCertSha256.Encode(e) + } + } + { + if s.VerifyPeerCertByName.Set { + e.FieldStart("verifyPeerCertByName") + s.VerifyPeerCertByName.Encode(e) } } { @@ -50478,6 +52360,12 @@ func (s *UpdateHostRequest) encodeFields(e *jx.Encoder) { s.MihomoX25519.Encode(e) } } + { + if s.MihomoIpVersion.Set { + e.FieldStart("mihomoIpVersion") + s.MihomoIpVersion.Encode(e) + } + } { if s.Nodes != nil { e.FieldStart("nodes") @@ -50516,7 +52404,7 @@ func (s *UpdateHostRequest) encodeFields(e *jx.Encoder) { } } -var jsonFieldsNameOfUpdateHostRequest = [29]string{ +var jsonFieldsNameOfUpdateHostRequest = [31]string{ 0: "uuid", 1: "inbound", 2: "remark", @@ -50529,23 +52417,25 @@ var jsonFieldsNameOfUpdateHostRequest = [29]string{ 9: "fingerprint", 10: "isDisabled", 11: "securityLayer", - 12: "xHttpExtraParams", + 12: "xhttpExtraParams", 13: "muxParams", 14: "sockoptParams", 15: "finalMask", 16: "serverDescription", - 17: "tag", + 17: "tags", 18: "isHidden", 19: "overrideSniFromAddress", 20: "keepSniBlank", 21: "vlessRouteId", - 22: "allowInsecure", - 23: "shuffleHost", - 24: "mihomoX25519", - 25: "nodes", - 26: "xrayJsonTemplateUuid", - 27: "excludedInternalSquads", - 28: "excludeFromSubscriptionTypes", + 22: "pinnedPeerCertSha256", + 23: "verifyPeerCertByName", + 24: "shuffleHost", + 25: "mihomoX25519", + 26: "mihomoIpVersion", + 27: "nodes", + 28: "xrayJsonTemplateUuid", + 29: "excludedInternalSquads", + 30: "excludeFromSubscriptionTypes", } // Decode decodes UpdateHostRequest from json. @@ -50554,6 +52444,7 @@ func (s *UpdateHostRequest) Decode(d *jx.Decoder) error { return errors.New("invalid: unable to decode UpdateHostRequest to nil") } var requiredBitSet [4]uint8 + s.setDefaults() if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { switch string(k) { @@ -50679,16 +52570,16 @@ func (s *UpdateHostRequest) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"securityLayer\"") } - case "xHttpExtraParams": + case "xhttpExtraParams": if err := func() error { v, err := d.RawAppend(nil) - s.XHttpExtraParams = jx.Raw(v) + s.XhttpExtraParams = jx.Raw(v) if err != nil { return err } return nil }(); err != nil { - return errors.Wrap(err, "decode field \"xHttpExtraParams\"") + return errors.Wrap(err, "decode field \"xhttpExtraParams\"") } case "muxParams": if err := func() error { @@ -50733,15 +52624,24 @@ func (s *UpdateHostRequest) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"serverDescription\"") } - case "tag": + case "tags": if err := func() error { - s.Tag.Reset() - if err := s.Tag.Decode(d); err != nil { + s.Tags = make([]string, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem string + v, err := d.Str() + elem = string(v) + if err != nil { + return err + } + s.Tags = append(s.Tags, elem) + return nil + }); err != nil { return err } return nil }(); err != nil { - return errors.Wrap(err, "decode field \"tag\"") + return errors.Wrap(err, "decode field \"tags\"") } case "isHidden": if err := func() error { @@ -50783,15 +52683,25 @@ func (s *UpdateHostRequest) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"vlessRouteId\"") } - case "allowInsecure": + case "pinnedPeerCertSha256": if err := func() error { - s.AllowInsecure.Reset() - if err := s.AllowInsecure.Decode(d); err != nil { + s.PinnedPeerCertSha256.Reset() + if err := s.PinnedPeerCertSha256.Decode(d); err != nil { return err } return nil }(); err != nil { - return errors.Wrap(err, "decode field \"allowInsecure\"") + return errors.Wrap(err, "decode field \"pinnedPeerCertSha256\"") + } + case "verifyPeerCertByName": + if err := func() error { + s.VerifyPeerCertByName.Reset() + if err := s.VerifyPeerCertByName.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"verifyPeerCertByName\"") } case "shuffleHost": if err := func() error { @@ -50813,6 +52723,16 @@ func (s *UpdateHostRequest) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"mihomoX25519\"") } + case "mihomoIpVersion": + if err := func() error { + s.MihomoIpVersion.Reset() + if err := s.MihomoIpVersion.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"mihomoIpVersion\"") + } case "nodes": if err := func() error { s.Nodes = make([]uuid.UUID, 0) @@ -51033,56 +52953,48 @@ func (s *UpdateHostRequestExcludeFromSubscriptionTypesItem) UnmarshalJSON(data [ return s.Decode(d) } -// Encode encodes UpdateHostRequestFingerprint as json. -func (s UpdateHostRequestFingerprint) Encode(e *jx.Encoder) { +// Encode encodes UpdateHostRequestMihomoIpVersion as json. +func (s UpdateHostRequestMihomoIpVersion) Encode(e *jx.Encoder) { e.Str(string(s)) } -// Decode decodes UpdateHostRequestFingerprint from json. -func (s *UpdateHostRequestFingerprint) Decode(d *jx.Decoder) error { +// Decode decodes UpdateHostRequestMihomoIpVersion from json. +func (s *UpdateHostRequestMihomoIpVersion) Decode(d *jx.Decoder) error { if s == nil { - return errors.New("invalid: unable to decode UpdateHostRequestFingerprint to nil") + return errors.New("invalid: unable to decode UpdateHostRequestMihomoIpVersion to nil") } v, err := d.StrBytes() if err != nil { return err } // Try to use constant string. - switch UpdateHostRequestFingerprint(v) { - case UpdateHostRequestFingerprintChrome: - *s = UpdateHostRequestFingerprintChrome - case UpdateHostRequestFingerprintFirefox: - *s = UpdateHostRequestFingerprintFirefox - case UpdateHostRequestFingerprintSafari: - *s = UpdateHostRequestFingerprintSafari - case UpdateHostRequestFingerprintIos: - *s = UpdateHostRequestFingerprintIos - case UpdateHostRequestFingerprintAndroid: - *s = UpdateHostRequestFingerprintAndroid - case UpdateHostRequestFingerprintEdge: - *s = UpdateHostRequestFingerprintEdge - case UpdateHostRequestFingerprintQq: - *s = UpdateHostRequestFingerprintQq - case UpdateHostRequestFingerprintRandom: - *s = UpdateHostRequestFingerprintRandom - case UpdateHostRequestFingerprintRandomized: - *s = UpdateHostRequestFingerprintRandomized + switch UpdateHostRequestMihomoIpVersion(v) { + case UpdateHostRequestMihomoIpVersionDual: + *s = UpdateHostRequestMihomoIpVersionDual + case UpdateHostRequestMihomoIpVersionIpv4: + *s = UpdateHostRequestMihomoIpVersionIpv4 + case UpdateHostRequestMihomoIpVersionIpv6: + *s = UpdateHostRequestMihomoIpVersionIpv6 + case UpdateHostRequestMihomoIpVersionIpv4Prefer: + *s = UpdateHostRequestMihomoIpVersionIpv4Prefer + case UpdateHostRequestMihomoIpVersionIpv6Prefer: + *s = UpdateHostRequestMihomoIpVersionIpv6Prefer default: - *s = UpdateHostRequestFingerprint(v) + *s = UpdateHostRequestMihomoIpVersion(v) } return nil } // MarshalJSON implements stdjson.Marshaler. -func (s UpdateHostRequestFingerprint) MarshalJSON() ([]byte, error) { +func (s UpdateHostRequestMihomoIpVersion) MarshalJSON() ([]byte, error) { e := jx.Encoder{} s.Encode(&e) return e.Bytes(), nil } // UnmarshalJSON implements stdjson.Unmarshaler. -func (s *UpdateHostRequestFingerprint) UnmarshalJSON(data []byte) error { +func (s *UpdateHostRequestMihomoIpVersion) UnmarshalJSON(data []byte) error { d := jx.DecodeBytes(data) return s.Decode(d) } @@ -51544,6 +53456,866 @@ func (s *UpdateInternalSquadRequest) UnmarshalJSON(data []byte) error { return s.Decode(d) } +// Encode implements json.Marshaler. +func (s *UpdateManyHostsRequest) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *UpdateManyHostsRequest) encodeFields(e *jx.Encoder) { + { + if s.Inbound.Set { + e.FieldStart("inbound") + s.Inbound.Encode(e) + } + } + { + if s.Remark.Set { + e.FieldStart("remark") + s.Remark.Encode(e) + } + } + { + if s.Address.Set { + e.FieldStart("address") + s.Address.Encode(e) + } + } + { + if s.Port.Set { + e.FieldStart("port") + s.Port.Encode(e) + } + } + { + if s.Path.Set { + e.FieldStart("path") + s.Path.Encode(e) + } + } + { + if s.Sni.Set { + e.FieldStart("sni") + s.Sni.Encode(e) + } + } + { + if s.Host.Set { + e.FieldStart("host") + s.Host.Encode(e) + } + } + { + if s.Alpn.Set { + e.FieldStart("alpn") + s.Alpn.Encode(e) + } + } + { + if s.Fingerprint.Set { + e.FieldStart("fingerprint") + s.Fingerprint.Encode(e) + } + } + { + if s.IsDisabled.Set { + e.FieldStart("isDisabled") + s.IsDisabled.Encode(e) + } + } + { + if s.SecurityLayer.Set { + e.FieldStart("securityLayer") + s.SecurityLayer.Encode(e) + } + } + { + if len(s.XhttpExtraParams) != 0 { + e.FieldStart("xhttpExtraParams") + e.Raw(s.XhttpExtraParams) + } + } + { + if len(s.MuxParams) != 0 { + e.FieldStart("muxParams") + e.Raw(s.MuxParams) + } + } + { + if len(s.SockoptParams) != 0 { + e.FieldStart("sockoptParams") + e.Raw(s.SockoptParams) + } + } + { + if len(s.FinalMask) != 0 { + e.FieldStart("finalMask") + e.Raw(s.FinalMask) + } + } + { + if s.ServerDescription.Set { + e.FieldStart("serverDescription") + s.ServerDescription.Encode(e) + } + } + { + if s.Tags != nil { + e.FieldStart("tags") + e.ArrStart() + for _, elem := range s.Tags { + e.Str(elem) + } + e.ArrEnd() + } + } + { + if s.IsHidden.Set { + e.FieldStart("isHidden") + s.IsHidden.Encode(e) + } + } + { + if s.OverrideSniFromAddress.Set { + e.FieldStart("overrideSniFromAddress") + s.OverrideSniFromAddress.Encode(e) + } + } + { + if s.KeepSniBlank.Set { + e.FieldStart("keepSniBlank") + s.KeepSniBlank.Encode(e) + } + } + { + if s.VlessRouteId.Set { + e.FieldStart("vlessRouteId") + s.VlessRouteId.Encode(e) + } + } + { + if s.PinnedPeerCertSha256.Set { + e.FieldStart("pinnedPeerCertSha256") + s.PinnedPeerCertSha256.Encode(e) + } + } + { + if s.VerifyPeerCertByName.Set { + e.FieldStart("verifyPeerCertByName") + s.VerifyPeerCertByName.Encode(e) + } + } + { + if s.ShuffleHost.Set { + e.FieldStart("shuffleHost") + s.ShuffleHost.Encode(e) + } + } + { + if s.MihomoX25519.Set { + e.FieldStart("mihomoX25519") + s.MihomoX25519.Encode(e) + } + } + { + if s.MihomoIpVersion.Set { + e.FieldStart("mihomoIpVersion") + s.MihomoIpVersion.Encode(e) + } + } + { + if s.Nodes != nil { + e.FieldStart("nodes") + e.ArrStart() + for _, elem := range s.Nodes { + json.EncodeUUID(e, elem) + } + e.ArrEnd() + } + } + { + if s.XrayJsonTemplateUuid.Set { + e.FieldStart("xrayJsonTemplateUuid") + s.XrayJsonTemplateUuid.Encode(e) + } + } + { + if s.ExcludedInternalSquads != nil { + e.FieldStart("excludedInternalSquads") + e.ArrStart() + for _, elem := range s.ExcludedInternalSquads { + json.EncodeUUID(e, elem) + } + e.ArrEnd() + } + } + { + if s.ExcludeFromSubscriptionTypes != nil { + e.FieldStart("excludeFromSubscriptionTypes") + e.ArrStart() + for _, elem := range s.ExcludeFromSubscriptionTypes { + elem.Encode(e) + } + e.ArrEnd() + } + } + { + e.FieldStart("uuids") + e.ArrStart() + for _, elem := range s.Uuids { + json.EncodeUUID(e, elem) + } + e.ArrEnd() + } +} + +var jsonFieldsNameOfUpdateManyHostsRequest = [31]string{ + 0: "inbound", + 1: "remark", + 2: "address", + 3: "port", + 4: "path", + 5: "sni", + 6: "host", + 7: "alpn", + 8: "fingerprint", + 9: "isDisabled", + 10: "securityLayer", + 11: "xhttpExtraParams", + 12: "muxParams", + 13: "sockoptParams", + 14: "finalMask", + 15: "serverDescription", + 16: "tags", + 17: "isHidden", + 18: "overrideSniFromAddress", + 19: "keepSniBlank", + 20: "vlessRouteId", + 21: "pinnedPeerCertSha256", + 22: "verifyPeerCertByName", + 23: "shuffleHost", + 24: "mihomoX25519", + 25: "mihomoIpVersion", + 26: "nodes", + 27: "xrayJsonTemplateUuid", + 28: "excludedInternalSquads", + 29: "excludeFromSubscriptionTypes", + 30: "uuids", +} + +// Decode decodes UpdateManyHostsRequest from json. +func (s *UpdateManyHostsRequest) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode UpdateManyHostsRequest to nil") + } + var requiredBitSet [4]uint8 + s.setDefaults() + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "inbound": + if err := func() error { + s.Inbound.Reset() + if err := s.Inbound.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"inbound\"") + } + case "remark": + if err := func() error { + s.Remark.Reset() + if err := s.Remark.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"remark\"") + } + case "address": + if err := func() error { + s.Address.Reset() + if err := s.Address.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"address\"") + } + case "port": + if err := func() error { + s.Port.Reset() + if err := s.Port.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"port\"") + } + case "path": + if err := func() error { + s.Path.Reset() + if err := s.Path.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"path\"") + } + case "sni": + if err := func() error { + s.Sni.Reset() + if err := s.Sni.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"sni\"") + } + case "host": + if err := func() error { + s.Host.Reset() + if err := s.Host.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"host\"") + } + case "alpn": + if err := func() error { + s.Alpn.Reset() + if err := s.Alpn.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"alpn\"") + } + case "fingerprint": + if err := func() error { + s.Fingerprint.Reset() + if err := s.Fingerprint.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"fingerprint\"") + } + case "isDisabled": + if err := func() error { + s.IsDisabled.Reset() + if err := s.IsDisabled.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"isDisabled\"") + } + case "securityLayer": + if err := func() error { + s.SecurityLayer.Reset() + if err := s.SecurityLayer.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"securityLayer\"") + } + case "xhttpExtraParams": + if err := func() error { + v, err := d.RawAppend(nil) + s.XhttpExtraParams = jx.Raw(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"xhttpExtraParams\"") + } + case "muxParams": + if err := func() error { + v, err := d.RawAppend(nil) + s.MuxParams = jx.Raw(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"muxParams\"") + } + case "sockoptParams": + if err := func() error { + v, err := d.RawAppend(nil) + s.SockoptParams = jx.Raw(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"sockoptParams\"") + } + case "finalMask": + if err := func() error { + v, err := d.RawAppend(nil) + s.FinalMask = jx.Raw(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"finalMask\"") + } + case "serverDescription": + if err := func() error { + s.ServerDescription.Reset() + if err := s.ServerDescription.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"serverDescription\"") + } + case "tags": + if err := func() error { + s.Tags = make([]string, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem string + v, err := d.Str() + elem = string(v) + if err != nil { + return err + } + s.Tags = append(s.Tags, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"tags\"") + } + case "isHidden": + if err := func() error { + s.IsHidden.Reset() + if err := s.IsHidden.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"isHidden\"") + } + case "overrideSniFromAddress": + if err := func() error { + s.OverrideSniFromAddress.Reset() + if err := s.OverrideSniFromAddress.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"overrideSniFromAddress\"") + } + case "keepSniBlank": + if err := func() error { + s.KeepSniBlank.Reset() + if err := s.KeepSniBlank.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"keepSniBlank\"") + } + case "vlessRouteId": + if err := func() error { + s.VlessRouteId.Reset() + if err := s.VlessRouteId.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"vlessRouteId\"") + } + case "pinnedPeerCertSha256": + if err := func() error { + s.PinnedPeerCertSha256.Reset() + if err := s.PinnedPeerCertSha256.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"pinnedPeerCertSha256\"") + } + case "verifyPeerCertByName": + if err := func() error { + s.VerifyPeerCertByName.Reset() + if err := s.VerifyPeerCertByName.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"verifyPeerCertByName\"") + } + case "shuffleHost": + if err := func() error { + s.ShuffleHost.Reset() + if err := s.ShuffleHost.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"shuffleHost\"") + } + case "mihomoX25519": + if err := func() error { + s.MihomoX25519.Reset() + if err := s.MihomoX25519.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"mihomoX25519\"") + } + case "mihomoIpVersion": + if err := func() error { + s.MihomoIpVersion.Reset() + if err := s.MihomoIpVersion.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"mihomoIpVersion\"") + } + case "nodes": + if err := func() error { + s.Nodes = make([]uuid.UUID, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem uuid.UUID + v, err := json.DecodeUUID(d) + elem = v + if err != nil { + return err + } + s.Nodes = append(s.Nodes, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"nodes\"") + } + case "xrayJsonTemplateUuid": + if err := func() error { + s.XrayJsonTemplateUuid.Reset() + if err := s.XrayJsonTemplateUuid.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"xrayJsonTemplateUuid\"") + } + case "excludedInternalSquads": + if err := func() error { + s.ExcludedInternalSquads = make([]uuid.UUID, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem uuid.UUID + v, err := json.DecodeUUID(d) + elem = v + if err != nil { + return err + } + s.ExcludedInternalSquads = append(s.ExcludedInternalSquads, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"excludedInternalSquads\"") + } + case "excludeFromSubscriptionTypes": + if err := func() error { + s.ExcludeFromSubscriptionTypes = make([]UpdateManyHostsRequestExcludeFromSubscriptionTypesItem, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem UpdateManyHostsRequestExcludeFromSubscriptionTypesItem + if err := elem.Decode(d); err != nil { + return err + } + s.ExcludeFromSubscriptionTypes = append(s.ExcludeFromSubscriptionTypes, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"excludeFromSubscriptionTypes\"") + } + case "uuids": + requiredBitSet[3] |= 1 << 6 + if err := func() error { + s.Uuids = make([]uuid.UUID, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem uuid.UUID + v, err := json.DecodeUUID(d) + elem = v + if err != nil { + return err + } + s.Uuids = append(s.Uuids, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"uuids\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode UpdateManyHostsRequest") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [4]uint8{ + 0b00000000, + 0b00000000, + 0b00000000, + 0b01000000, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfUpdateManyHostsRequest) { + name = jsonFieldsNameOfUpdateManyHostsRequest[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *UpdateManyHostsRequest) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *UpdateManyHostsRequest) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes UpdateManyHostsRequestAlpn as json. +func (s UpdateManyHostsRequestAlpn) Encode(e *jx.Encoder) { + e.Str(string(s)) +} + +// Decode decodes UpdateManyHostsRequestAlpn from json. +func (s *UpdateManyHostsRequestAlpn) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode UpdateManyHostsRequestAlpn to nil") + } + v, err := d.StrBytes() + if err != nil { + return err + } + // Try to use constant string. + switch UpdateManyHostsRequestAlpn(v) { + case UpdateManyHostsRequestAlpnH3: + *s = UpdateManyHostsRequestAlpnH3 + case UpdateManyHostsRequestAlpnH2: + *s = UpdateManyHostsRequestAlpnH2 + case UpdateManyHostsRequestAlpnHTTP11: + *s = UpdateManyHostsRequestAlpnHTTP11 + case UpdateManyHostsRequestAlpnH2HTTP11: + *s = UpdateManyHostsRequestAlpnH2HTTP11 + case UpdateManyHostsRequestAlpnH3H2HTTP11: + *s = UpdateManyHostsRequestAlpnH3H2HTTP11 + case UpdateManyHostsRequestAlpnH3H2: + *s = UpdateManyHostsRequestAlpnH3H2 + default: + *s = UpdateManyHostsRequestAlpn(v) + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s UpdateManyHostsRequestAlpn) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *UpdateManyHostsRequestAlpn) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes UpdateManyHostsRequestExcludeFromSubscriptionTypesItem as json. +func (s UpdateManyHostsRequestExcludeFromSubscriptionTypesItem) Encode(e *jx.Encoder) { + e.Str(string(s)) +} + +// Decode decodes UpdateManyHostsRequestExcludeFromSubscriptionTypesItem from json. +func (s *UpdateManyHostsRequestExcludeFromSubscriptionTypesItem) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode UpdateManyHostsRequestExcludeFromSubscriptionTypesItem to nil") + } + v, err := d.StrBytes() + if err != nil { + return err + } + // Try to use constant string. + switch UpdateManyHostsRequestExcludeFromSubscriptionTypesItem(v) { + case UpdateManyHostsRequestExcludeFromSubscriptionTypesItemXRAYJSON: + *s = UpdateManyHostsRequestExcludeFromSubscriptionTypesItemXRAYJSON + case UpdateManyHostsRequestExcludeFromSubscriptionTypesItemXRAYBASE64: + *s = UpdateManyHostsRequestExcludeFromSubscriptionTypesItemXRAYBASE64 + case UpdateManyHostsRequestExcludeFromSubscriptionTypesItemMIHOMO: + *s = UpdateManyHostsRequestExcludeFromSubscriptionTypesItemMIHOMO + case UpdateManyHostsRequestExcludeFromSubscriptionTypesItemSTASH: + *s = UpdateManyHostsRequestExcludeFromSubscriptionTypesItemSTASH + case UpdateManyHostsRequestExcludeFromSubscriptionTypesItemCLASH: + *s = UpdateManyHostsRequestExcludeFromSubscriptionTypesItemCLASH + case UpdateManyHostsRequestExcludeFromSubscriptionTypesItemSINGBOX: + *s = UpdateManyHostsRequestExcludeFromSubscriptionTypesItemSINGBOX + default: + *s = UpdateManyHostsRequestExcludeFromSubscriptionTypesItem(v) + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s UpdateManyHostsRequestExcludeFromSubscriptionTypesItem) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *UpdateManyHostsRequestExcludeFromSubscriptionTypesItem) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes UpdateManyHostsRequestMihomoIpVersion as json. +func (s UpdateManyHostsRequestMihomoIpVersion) Encode(e *jx.Encoder) { + e.Str(string(s)) +} + +// Decode decodes UpdateManyHostsRequestMihomoIpVersion from json. +func (s *UpdateManyHostsRequestMihomoIpVersion) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode UpdateManyHostsRequestMihomoIpVersion to nil") + } + v, err := d.StrBytes() + if err != nil { + return err + } + // Try to use constant string. + switch UpdateManyHostsRequestMihomoIpVersion(v) { + case UpdateManyHostsRequestMihomoIpVersionDual: + *s = UpdateManyHostsRequestMihomoIpVersionDual + case UpdateManyHostsRequestMihomoIpVersionIpv4: + *s = UpdateManyHostsRequestMihomoIpVersionIpv4 + case UpdateManyHostsRequestMihomoIpVersionIpv6: + *s = UpdateManyHostsRequestMihomoIpVersionIpv6 + case UpdateManyHostsRequestMihomoIpVersionIpv4Prefer: + *s = UpdateManyHostsRequestMihomoIpVersionIpv4Prefer + case UpdateManyHostsRequestMihomoIpVersionIpv6Prefer: + *s = UpdateManyHostsRequestMihomoIpVersionIpv6Prefer + default: + *s = UpdateManyHostsRequestMihomoIpVersion(v) + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s UpdateManyHostsRequestMihomoIpVersion) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *UpdateManyHostsRequestMihomoIpVersion) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes UpdateManyHostsRequestSecurityLayer as json. +func (s UpdateManyHostsRequestSecurityLayer) Encode(e *jx.Encoder) { + e.Str(string(s)) +} + +// Decode decodes UpdateManyHostsRequestSecurityLayer from json. +func (s *UpdateManyHostsRequestSecurityLayer) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode UpdateManyHostsRequestSecurityLayer to nil") + } + v, err := d.StrBytes() + if err != nil { + return err + } + // Try to use constant string. + switch UpdateManyHostsRequestSecurityLayer(v) { + case UpdateManyHostsRequestSecurityLayerDEFAULT: + *s = UpdateManyHostsRequestSecurityLayerDEFAULT + case UpdateManyHostsRequestSecurityLayerTLS: + *s = UpdateManyHostsRequestSecurityLayerTLS + case UpdateManyHostsRequestSecurityLayerNONE: + *s = UpdateManyHostsRequestSecurityLayerNONE + default: + *s = UpdateManyHostsRequestSecurityLayer(v) + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s UpdateManyHostsRequestSecurityLayer) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *UpdateManyHostsRequestSecurityLayer) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + // Encode implements json.Marshaler. func (s *UpdateNodePluginRequest) Encode(e *jx.Encoder) { e.ObjStart() @@ -51706,6 +54478,12 @@ func (s *UpdateNodeRequest) encodeFields(e *jx.Encoder) { s.Port.Encode(e) } } + { + if s.ProxyUrl.Set { + e.FieldStart("proxyUrl") + s.ProxyUrl.Encode(e) + } + } { if s.IsTrafficTrackingActive.Set { e.FieldStart("isTrafficTrackingActive") @@ -51742,6 +54520,12 @@ func (s *UpdateNodeRequest) encodeFields(e *jx.Encoder) { s.ConsumptionMultiplier.Encode(e) } } + { + if s.NodeConsumptionMultiplier.Set { + e.FieldStart("nodeConsumptionMultiplier") + s.NodeConsumptionMultiplier.Encode(e) + } + } { if s.ConfigProfile.Set { e.FieldStart("configProfile") @@ -51770,23 +54554,32 @@ func (s *UpdateNodeRequest) encodeFields(e *jx.Encoder) { s.ActivePluginUuid.Encode(e) } } + { + if s.Note.Set { + e.FieldStart("note") + s.Note.Encode(e) + } + } } -var jsonFieldsNameOfUpdateNodeRequest = [14]string{ +var jsonFieldsNameOfUpdateNodeRequest = [17]string{ 0: "uuid", 1: "name", 2: "address", 3: "port", - 4: "isTrafficTrackingActive", - 5: "trafficLimitBytes", - 6: "notifyPercent", - 7: "trafficResetDay", - 8: "countryCode", - 9: "consumptionMultiplier", - 10: "configProfile", - 11: "providerUuid", - 12: "tags", - 13: "activePluginUuid", + 4: "proxyUrl", + 5: "isTrafficTrackingActive", + 6: "trafficLimitBytes", + 7: "notifyPercent", + 8: "trafficResetDay", + 9: "countryCode", + 10: "consumptionMultiplier", + 11: "nodeConsumptionMultiplier", + 12: "configProfile", + 13: "providerUuid", + 14: "tags", + 15: "activePluginUuid", + 16: "note", } // Decode decodes UpdateNodeRequest from json. @@ -51794,7 +54587,7 @@ func (s *UpdateNodeRequest) Decode(d *jx.Decoder) error { if s == nil { return errors.New("invalid: unable to decode UpdateNodeRequest to nil") } - var requiredBitSet [2]uint8 + var requiredBitSet [3]uint8 if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { switch string(k) { @@ -51840,6 +54633,16 @@ func (s *UpdateNodeRequest) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"port\"") } + case "proxyUrl": + if err := func() error { + s.ProxyUrl.Reset() + if err := s.ProxyUrl.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"proxyUrl\"") + } case "isTrafficTrackingActive": if err := func() error { s.IsTrafficTrackingActive.Reset() @@ -51900,6 +54703,16 @@ func (s *UpdateNodeRequest) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"consumptionMultiplier\"") } + case "nodeConsumptionMultiplier": + if err := func() error { + s.NodeConsumptionMultiplier.Reset() + if err := s.NodeConsumptionMultiplier.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"nodeConsumptionMultiplier\"") + } case "configProfile": if err := func() error { s.ConfigProfile.Reset() @@ -51949,6 +54762,16 @@ func (s *UpdateNodeRequest) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"activePluginUuid\"") } + case "note": + if err := func() error { + s.Note.Reset() + if err := s.Note.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"note\"") + } default: return d.Skip() } @@ -51958,9 +54781,10 @@ func (s *UpdateNodeRequest) Decode(d *jx.Decoder) error { } // Validate required fields. var failures []validate.FieldError - for i, mask := range [2]uint8{ + for i, mask := range [3]uint8{ 0b00000001, 0b00000000, + 0b00000000, } { if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { // Mask only required fields and check equality to mask using XOR. diff --git a/api/oas_operations_gen.go b/api/oas_operations_gen.go index ebe264b..7dba34f 100644 --- a/api/oas_operations_gen.go +++ b/api/oas_operations_gen.go @@ -9,6 +9,7 @@ const ( ApiTokensCreateOperation OperationName = "ApiTokensCreate" ApiTokensDeleteOperation OperationName = "ApiTokensDelete" ApiTokensFindAllOperation OperationName = "ApiTokensFindAll" + ApiTokensGetScopesOperation OperationName = "ApiTokensGetScopes" AuthGetStatusOperation OperationName = "AuthGetStatus" AuthLoginOperation OperationName = "AuthLogin" AuthOauth2AuthorizeOperation OperationName = "AuthOauth2Authorize" @@ -18,6 +19,7 @@ const ( AuthRegisterOperation OperationName = "AuthRegister" BandwidthStatsNodesGetNodeUserUsageOperation OperationName = "BandwidthStatsNodesGetNodeUserUsage" BandwidthStatsNodesGetStatsNodeUsersUsageOperation OperationName = "BandwidthStatsNodesGetStatsNodeUsersUsage" + BandwidthStatsNodesGetStatsNodesUsersUsageOperation OperationName = "BandwidthStatsNodesGetStatsNodesUsersUsage" BandwidthStatsUsersGetStatsNodesUsageOperation OperationName = "BandwidthStatsUsersGetStatsNodesUsage" BandwidthStatsUsersGetUserUsageByRangeOperation OperationName = "BandwidthStatsUsersGetUserUsageByRange" ConfigProfileCreateConfigProfileOperation OperationName = "ConfigProfileCreateConfigProfile" @@ -40,7 +42,6 @@ const ( HostsBulkActionsDeleteHostsOperation OperationName = "HostsBulkActionsDeleteHosts" HostsBulkActionsDisableHostsOperation OperationName = "HostsBulkActionsDisableHosts" HostsBulkActionsEnableHostsOperation OperationName = "HostsBulkActionsEnableHosts" - HostsBulkActionsSetInboundToHostsOperation OperationName = "HostsBulkActionsSetInboundToHosts" HostsBulkActionsSetPortToHostsOperation OperationName = "HostsBulkActionsSetPortToHosts" HostsCreateHostOperation OperationName = "HostsCreateHost" HostsDeleteHostOperation OperationName = "HostsDeleteHost" @@ -148,7 +149,6 @@ const ( SubscriptionsGetSubscriptionByUsernameOperation OperationName = "SubscriptionsGetSubscriptionByUsername" SubscriptionsGetSubscriptionByUuidOperation OperationName = "SubscriptionsGetSubscriptionByUuid" SystemDebugSrrMatcherOperation OperationName = "SystemDebugSrrMatcher" - SystemEncryptHappCryptoLinkOperation OperationName = "SystemEncryptHappCryptoLink" SystemGetBandwidthStatsOperation OperationName = "SystemGetBandwidthStats" SystemGetMetadataOperation OperationName = "SystemGetMetadata" SystemGetNodesMetricsOperation OperationName = "SystemGetNodesMetrics" @@ -187,6 +187,7 @@ const ( UsersGetUserSubscriptionRequestHistoryOperation OperationName = "UsersGetUserSubscriptionRequestHistory" UsersGetUsersByEmailOperation OperationName = "UsersGetUsersByEmail" UsersGetUsersByTagOperation OperationName = "UsersGetUsersByTag" + UsersGetUsersStreamOperation OperationName = "UsersGetUsersStream" UsersResetUserTrafficOperation OperationName = "UsersResetUserTraffic" UsersResolveUserOperation OperationName = "UsersResolveUser" UsersRevokeUserSubscriptionOperation OperationName = "UsersRevokeUserSubscription" diff --git a/api/oas_parameters_gen.go b/api/oas_parameters_gen.go index 532879b..b139b75 100644 --- a/api/oas_parameters_gen.go +++ b/api/oas_parameters_gen.go @@ -34,6 +34,16 @@ type BandwidthStatsNodesGetStatsNodeUsersUsageParams struct { UUID string } +// BandwidthStatsNodesGetStatsNodesUsersUsageParams is parameters of BandwidthStatsNodes_getStatsNodesUsersUsage operation. +type BandwidthStatsNodesGetStatsNodesUsersUsageParams struct { + // Limit of top users to return. + TopUsersLimit int + // Start date (YYYY-MM-DD). + Start time.Time + // End date (YYYY-MM-DD). + End time.Time +} + // BandwidthStatsUsersGetStatsNodesUsageParams is parameters of BandwidthStatsUsers_getStatsNodesUsage operation. type BandwidthStatsUsersGetStatsNodesUsageParams struct { // Limit of top nodes to return. @@ -468,6 +478,14 @@ type UsersGetUsersByTagParams struct { Tag string } +// UsersGetUsersStreamParams is parameters of Users_getUsersStream operation. +type UsersGetUsersStreamParams struct { + // Page size, no more than 1000 (default 250). + Size OptInt `json:",omitempty,omitzero"` + // Cursor from the previous response (nextCursor). Omit on the first request. + Cursor OptString `json:",omitempty,omitzero"` +} + // UsersResetUserTrafficParams is parameters of Users_resetUserTraffic operation. type UsersResetUserTrafficParams struct { // UUID of the user. diff --git a/api/oas_request_encoders_gen.go b/api/oas_request_encoders_gen.go index c31e700..142d294 100644 --- a/api/oas_request_encoders_gen.go +++ b/api/oas_request_encoders_gen.go @@ -94,6 +94,20 @@ func encodeAuthRegisterRequest( return nil } +func encodeBandwidthStatsNodesGetStatsNodesUsersUsageRequest( + req *GetStatsNodesUsersUsageRequest, + r *http.Request, +) error { + const contentType = "application/json" + e := new(jx.Encoder) + { + req.Encode(e) + } + encoded := e.Bytes() + ht.SetBody(r, bytes.NewReader(encoded), contentType) + return nil +} + func encodeConfigProfileCreateConfigProfileRequest( req *CreateConfigProfileRequest, r *http.Request, @@ -220,22 +234,8 @@ func encodeHostsBulkActionsEnableHostsRequest( return nil } -func encodeHostsBulkActionsSetInboundToHostsRequest( - req *SetInboundToManyHostsRequest, - r *http.Request, -) error { - const contentType = "application/json" - e := new(jx.Encoder) - { - req.Encode(e) - } - encoded := e.Bytes() - ht.SetBody(r, bytes.NewReader(encoded), contentType) - return nil -} - func encodeHostsBulkActionsSetPortToHostsRequest( - req *SetPortToManyHostsRequest, + req *UpdateManyHostsRequest, r *http.Request, ) error { const contentType = "application/json" @@ -627,7 +627,21 @@ func encodeNodesReorderNodesRequest( } func encodeNodesRestartAllNodesRequest( - req *RestartAllNodesRequestBody, + req *NodeRequestBodyRequest, + r *http.Request, +) error { + const contentType = "application/json" + e := new(jx.Encoder) + { + req.Encode(e) + } + encoded := e.Bytes() + ht.SetBody(r, bytes.NewReader(encoded), contentType) + return nil +} + +func encodeNodesRestartNodeRequest( + req *NodeRequestBodyRequest, r *http.Request, ) error { const contentType = "application/json" @@ -892,20 +906,6 @@ func encodeSystemDebugSrrMatcherRequest( return nil } -func encodeSystemEncryptHappCryptoLinkRequest( - req *EncryptHappCryptoLinkRequest, - r *http.Request, -) error { - const contentType = "application/json" - e := new(jx.Encoder) - { - req.Encode(e) - } - encoded := e.Bytes() - ht.SetBody(r, bytes.NewReader(encoded), contentType) - return nil -} - func encodeUsersBulkActionsBulkAllExtendExpirationDateRequest( req *BulkAllExtendExpirationDateRequest, r *http.Request, diff --git a/api/oas_response_decoders_gen.go b/api/oas_response_decoders_gen.go index 127e2a9..e2c53ad 100644 --- a/api/oas_response_decoders_gen.go +++ b/api/oas_response_decoders_gen.go @@ -47,6 +47,15 @@ func decodeApiTokensCreateResponse(resp *http.Response) (res ApiTokensCreateRes, } return res, err } + // Validate response. + if err := func() error { + if err := response.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return res, errors.Wrap(err, "validate") + } return &response, nil default: return res, validate.InvalidContentType(ct) @@ -383,6 +392,135 @@ func decodeApiTokensFindAllResponse(resp *http.Response) (res ApiTokensFindAllRe return res, validate.UnexpectedStatusCodeWithResponse(resp) } +func decodeApiTokensGetScopesResponse(resp *http.Response) (res ApiTokensGetScopesRes, _ error) { + switch resp.StatusCode { + case 200: + // Code 200. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response GetApiTokenScopesResponse + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + // Validate response. + if err := func() error { + if err := response.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return res, errors.Wrap(err, "validate") + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + case 400: + // Code 400. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response BadRequestError + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + // Validate response. + if err := func() error { + if err := response.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return res, errors.Wrap(err, "validate") + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + case 500: + // Code 500. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response InternalServerError + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + } + return res, validate.UnexpectedStatusCodeWithResponse(resp) +} + func decodeAuthGetStatusResponse(resp *http.Response) (res AuthGetStatusRes, _ error) { switch resp.StatusCode { case 400: @@ -1505,7 +1643,136 @@ func decodeBandwidthStatsNodesGetStatsNodeUsersUsageResponse(resp *http.Response } d := jx.DecodeBytes(buf) - var response GetStatsNodeUsersUsageResponse + var response StatsNodeUsersUsageResponseResponse + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + // Validate response. + if err := func() error { + if err := response.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return res, errors.Wrap(err, "validate") + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + case 400: + // Code 400. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response BadRequestError + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + // Validate response. + if err := func() error { + if err := response.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return res, errors.Wrap(err, "validate") + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + case 500: + // Code 500. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response InternalServerError + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + } + return res, validate.UnexpectedStatusCodeWithResponse(resp) +} + +func decodeBandwidthStatsNodesGetStatsNodesUsersUsageResponse(resp *http.Response) (res BandwidthStatsNodesGetStatsNodesUsersUsageRes, _ error) { + switch resp.StatusCode { + case 200: + // Code 200. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response StatsNodeUsersUsageResponseResponse if err := func() error { if err := response.Decode(d); err != nil { return err @@ -4872,135 +5139,6 @@ func decodeHostsBulkActionsEnableHostsResponse(resp *http.Response) (res HostsBu return res, validate.UnexpectedStatusCodeWithResponse(resp) } -func decodeHostsBulkActionsSetInboundToHostsResponse(resp *http.Response) (res HostsBulkActionsSetInboundToHostsRes, _ error) { - switch resp.StatusCode { - case 200: - // Code 200. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response HostListResponse - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - // Validate response. - if err := func() error { - if err := response.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - return res, errors.Wrap(err, "validate") - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - case 400: - // Code 400. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response BadRequestError - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - // Validate response. - if err := func() error { - if err := response.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - return res, errors.Wrap(err, "validate") - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - case 500: - // Code 500. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response InternalServerError - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - } - return res, validate.UnexpectedStatusCodeWithResponse(resp) -} - func decodeHostsBulkActionsSetPortToHostsResponse(resp *http.Response) (res HostsBulkActionsSetPortToHostsRes, _ error) { switch resp.StatusCode { case 200: @@ -19419,126 +19557,6 @@ func decodeSystemDebugSrrMatcherResponse(resp *http.Response) (res SystemDebugSr return res, validate.UnexpectedStatusCodeWithResponse(resp) } -func decodeSystemEncryptHappCryptoLinkResponse(resp *http.Response) (res SystemEncryptHappCryptoLinkRes, _ error) { - switch resp.StatusCode { - case 200: - // Code 200. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response EncryptHappCryptoLinkResponse - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - case 400: - // Code 400. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response BadRequestError - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - // Validate response. - if err := func() error { - if err := response.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - return res, errors.Wrap(err, "validate") - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - case 500: - // Code 500. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response InternalServerError - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - } - return res, validate.UnexpectedStatusCodeWithResponse(resp) -} - func decodeSystemGetBandwidthStatsResponse(resp *http.Response) (res SystemGetBandwidthStatsRes, _ error) { switch resp.StatusCode { case 200: @@ -24783,6 +24801,135 @@ func decodeUsersGetUsersByTagResponse(resp *http.Response) (res UsersGetUsersByT return res, validate.UnexpectedStatusCodeWithResponse(resp) } +func decodeUsersGetUsersStreamResponse(resp *http.Response) (res UsersGetUsersStreamRes, _ error) { + switch resp.StatusCode { + case 200: + // Code 200. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response GetUsersStreamResponse + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + // Validate response. + if err := func() error { + if err := response.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return res, errors.Wrap(err, "validate") + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + case 400: + // Code 400. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response BadRequestError + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + // Validate response. + if err := func() error { + if err := response.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return res, errors.Wrap(err, "validate") + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + case 500: + // Code 500. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response InternalServerError + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + } + return res, validate.UnexpectedStatusCodeWithResponse(resp) +} + func decodeUsersResetUserTrafficResponse(resp *http.Response) (res UsersResetUserTrafficRes, _ error) { switch resp.StatusCode { case 200: diff --git a/api/oas_schemas_gen.go b/api/oas_schemas_gen.go index de87a07..bf378dd 100644 --- a/api/oas_schemas_gen.go +++ b/api/oas_schemas_gen.go @@ -199,6 +199,7 @@ func (s *BadRequestError) SetErrors(val []ValidationError) { func (*BadRequestError) apiTokensCreateRes() {} func (*BadRequestError) apiTokensDeleteRes() {} func (*BadRequestError) apiTokensFindAllRes() {} +func (*BadRequestError) apiTokensGetScopesRes() {} func (*BadRequestError) authGetStatusRes() {} func (*BadRequestError) authLoginRes() {} func (*BadRequestError) authOauth2AuthorizeRes() {} @@ -208,6 +209,7 @@ func (*BadRequestError) authPasskeyAuthenticationVerifyRes() func (*BadRequestError) authRegisterRes() {} func (*BadRequestError) bandwidthStatsNodesGetNodeUserUsageRes() {} func (*BadRequestError) bandwidthStatsNodesGetStatsNodeUsersUsageRes() {} +func (*BadRequestError) bandwidthStatsNodesGetStatsNodesUsersUsageRes() {} func (*BadRequestError) bandwidthStatsUsersGetStatsNodesUsageRes() {} func (*BadRequestError) bandwidthStatsUsersGetUserUsageByRangeRes() {} func (*BadRequestError) configProfileCreateConfigProfileRes() {} @@ -230,7 +232,6 @@ func (*BadRequestError) externalSquadUpdateExternalSquadRes() func (*BadRequestError) hostsBulkActionsDeleteHostsRes() {} func (*BadRequestError) hostsBulkActionsDisableHostsRes() {} func (*BadRequestError) hostsBulkActionsEnableHostsRes() {} -func (*BadRequestError) hostsBulkActionsSetInboundToHostsRes() {} func (*BadRequestError) hostsBulkActionsSetPortToHostsRes() {} func (*BadRequestError) hostsCreateHostRes() {} func (*BadRequestError) hostsDeleteHostRes() {} @@ -336,7 +337,6 @@ func (*BadRequestError) subscriptionsGetSubscriptionByShortUuidProtectedRes() func (*BadRequestError) subscriptionsGetSubscriptionByUsernameRes() {} func (*BadRequestError) subscriptionsGetSubscriptionByUuidRes() {} func (*BadRequestError) systemDebugSrrMatcherRes() {} -func (*BadRequestError) systemEncryptHappCryptoLinkRes() {} func (*BadRequestError) systemGetBandwidthStatsRes() {} func (*BadRequestError) systemGetMetadataRes() {} func (*BadRequestError) systemGetNodesMetricsRes() {} @@ -375,6 +375,7 @@ func (*BadRequestError) usersGetUserByUuidRes() func (*BadRequestError) usersGetUserSubscriptionRequestHistoryRes() {} func (*BadRequestError) usersGetUsersByEmailRes() {} func (*BadRequestError) usersGetUsersByTagRes() {} +func (*BadRequestError) usersGetUsersStreamRes() {} func (*BadRequestError) usersResetUserTrafficRes() {} func (*BadRequestError) usersResolveUserRes() {} func (*BadRequestError) usersRevokeUserSubscriptionRes() {} @@ -583,14 +584,8 @@ func (s *BillingHistoryResponseResponseRecordsItemProvider) SetFaviconLink(val N // Ref: #/components/schemas/BillingNode type BillingNode struct { - NodeUuid uuid.UUID `json:"nodeUuid"` - Name string `json:"name"` - CountryCode string `json:"countryCode"` -} - -// GetNodeUuid returns the value of NodeUuid. -func (s *BillingNode) GetNodeUuid() uuid.UUID { - return s.NodeUuid + Name string `json:"name"` + Details NilInfraProvidersDetail `json:"details"` } // GetName returns the value of Name. @@ -598,14 +593,9 @@ func (s *BillingNode) GetName() string { return s.Name } -// GetCountryCode returns the value of CountryCode. -func (s *BillingNode) GetCountryCode() string { - return s.CountryCode -} - -// SetNodeUuid sets the value of NodeUuid. -func (s *BillingNode) SetNodeUuid(val uuid.UUID) { - s.NodeUuid = val +// GetDetails returns the value of Details. +func (s *BillingNode) GetDetails() NilInfraProvidersDetail { + return s.Details } // SetName sets the value of Name. @@ -613,9 +603,9 @@ func (s *BillingNode) SetName(val string) { s.Name = val } -// SetCountryCode sets the value of CountryCode. -func (s *BillingNode) SetCountryCode(val string) { - s.CountryCode = val +// SetDetails sets the value of Details. +func (s *BillingNode) SetDetails(val NilInfraProvidersDetail) { + s.Details = val } // Ref: #/components/schemas/BillingNodesResponse @@ -698,7 +688,8 @@ func (s *BillingNodesResponseResponse) SetStats(val BillingNodesResponseResponse type BillingNodesResponseResponseBillingNodesItem struct { UUID uuid.UUID `json:"uuid"` - NodeUuid uuid.UUID `json:"nodeUuid"` + NodeUuid NilUUID `json:"nodeUuid"` + Name NilString `json:"name"` ProviderUuid uuid.UUID `json:"providerUuid"` Provider BillingNodesResponseResponseBillingNodesItemProvider `json:"provider"` Node Node `json:"node"` @@ -713,10 +704,15 @@ func (s *BillingNodesResponseResponseBillingNodesItem) GetUUID() uuid.UUID { } // GetNodeUuid returns the value of NodeUuid. -func (s *BillingNodesResponseResponseBillingNodesItem) GetNodeUuid() uuid.UUID { +func (s *BillingNodesResponseResponseBillingNodesItem) GetNodeUuid() NilUUID { return s.NodeUuid } +// GetName returns the value of Name. +func (s *BillingNodesResponseResponseBillingNodesItem) GetName() NilString { + return s.Name +} + // GetProviderUuid returns the value of ProviderUuid. func (s *BillingNodesResponseResponseBillingNodesItem) GetProviderUuid() uuid.UUID { return s.ProviderUuid @@ -753,10 +749,15 @@ func (s *BillingNodesResponseResponseBillingNodesItem) SetUUID(val uuid.UUID) { } // SetNodeUuid sets the value of NodeUuid. -func (s *BillingNodesResponseResponseBillingNodesItem) SetNodeUuid(val uuid.UUID) { +func (s *BillingNodesResponseResponseBillingNodesItem) SetNodeUuid(val NilUUID) { s.NodeUuid = val } +// SetName sets the value of Name. +func (s *BillingNodesResponseResponseBillingNodesItem) SetName(val NilString) { + s.Name = val +} + // SetProviderUuid sets the value of ProviderUuid. func (s *BillingNodesResponseResponseBillingNodesItem) SetProviderUuid(val uuid.UUID) { s.ProviderUuid = val @@ -952,7 +953,7 @@ func (s *BulkAllExtendExpirationDateRequest) SetExtendDays(val int) { type BulkAllUpdateUsersRequest struct { Status OptBulkAllUpdateUsersRequestStatus `json:"status"` // Traffic limit in bytes. 0 - unlimited. - TrafficLimitBytes OptInt `json:"trafficLimitBytes"` + TrafficLimitBytes OptFloat64 `json:"trafficLimitBytes"` // Traffic limit reset strategy. TrafficLimitStrategy OptBulkAllUpdateUsersRequestTrafficLimitStrategy `json:"trafficLimitStrategy"` // Expiration date: 2025-01-17T15:38:45.065Z. @@ -970,7 +971,7 @@ func (s *BulkAllUpdateUsersRequest) GetStatus() OptBulkAllUpdateUsersRequestStat } // GetTrafficLimitBytes returns the value of TrafficLimitBytes. -func (s *BulkAllUpdateUsersRequest) GetTrafficLimitBytes() OptInt { +func (s *BulkAllUpdateUsersRequest) GetTrafficLimitBytes() OptFloat64 { return s.TrafficLimitBytes } @@ -1015,7 +1016,7 @@ func (s *BulkAllUpdateUsersRequest) SetStatus(val OptBulkAllUpdateUsersRequestSt } // SetTrafficLimitBytes sets the value of TrafficLimitBytes. -func (s *BulkAllUpdateUsersRequest) SetTrafficLimitBytes(val OptInt) { +func (s *BulkAllUpdateUsersRequest) SetTrafficLimitBytes(val OptFloat64) { s.TrafficLimitBytes = val } @@ -1376,11 +1377,13 @@ func (s *BulkNodesUpdateRequest) SetFields(val BulkNodesUpdateRequestFields) { } type BulkNodesUpdateRequestFields struct { - CountryCode OptString `json:"countryCode"` - ConsumptionMultiplier OptFloat64 `json:"consumptionMultiplier"` - ProviderUuid OptNilUUID `json:"providerUuid"` - Tags []string `json:"tags"` - ActivePluginUuid OptNilUUID `json:"activePluginUuid"` + CountryCode OptString `json:"countryCode"` + ConsumptionMultiplier OptFloat64 `json:"consumptionMultiplier"` + NodeConsumptionMultiplier OptFloat64 `json:"nodeConsumptionMultiplier"` + ProviderUuid OptNilUUID `json:"providerUuid"` + Tags []string `json:"tags"` + ActivePluginUuid OptNilUUID `json:"activePluginUuid"` + Note OptNilString `json:"note"` } // GetCountryCode returns the value of CountryCode. @@ -1393,6 +1396,11 @@ func (s *BulkNodesUpdateRequestFields) GetConsumptionMultiplier() OptFloat64 { return s.ConsumptionMultiplier } +// GetNodeConsumptionMultiplier returns the value of NodeConsumptionMultiplier. +func (s *BulkNodesUpdateRequestFields) GetNodeConsumptionMultiplier() OptFloat64 { + return s.NodeConsumptionMultiplier +} + // GetProviderUuid returns the value of ProviderUuid. func (s *BulkNodesUpdateRequestFields) GetProviderUuid() OptNilUUID { return s.ProviderUuid @@ -1408,6 +1416,11 @@ func (s *BulkNodesUpdateRequestFields) GetActivePluginUuid() OptNilUUID { return s.ActivePluginUuid } +// GetNote returns the value of Note. +func (s *BulkNodesUpdateRequestFields) GetNote() OptNilString { + return s.Note +} + // SetCountryCode sets the value of CountryCode. func (s *BulkNodesUpdateRequestFields) SetCountryCode(val OptString) { s.CountryCode = val @@ -1418,6 +1431,11 @@ func (s *BulkNodesUpdateRequestFields) SetConsumptionMultiplier(val OptFloat64) s.ConsumptionMultiplier = val } +// SetNodeConsumptionMultiplier sets the value of NodeConsumptionMultiplier. +func (s *BulkNodesUpdateRequestFields) SetNodeConsumptionMultiplier(val OptFloat64) { + s.NodeConsumptionMultiplier = val +} + // SetProviderUuid sets the value of ProviderUuid. func (s *BulkNodesUpdateRequestFields) SetProviderUuid(val OptNilUUID) { s.ProviderUuid = val @@ -1433,6 +1451,11 @@ func (s *BulkNodesUpdateRequestFields) SetActivePluginUuid(val OptNilUUID) { s.ActivePluginUuid = val } +// SetNote sets the value of Note. +func (s *BulkNodesUpdateRequestFields) SetNote(val OptNilString) { + s.Note = val +} + // Ref: #/components/schemas/BulkUpdateUsersRequest type BulkUpdateUsersRequest struct { Uuids []uuid.UUID `json:"uuids"` @@ -1462,7 +1485,7 @@ func (s *BulkUpdateUsersRequest) SetFields(val BulkUpdateUsersRequestFields) { type BulkUpdateUsersRequestFields struct { Status OptBulkUpdateUsersRequestFieldsStatus `json:"status"` // Traffic limit in bytes. 0 - unlimited. - TrafficLimitBytes OptInt `json:"trafficLimitBytes"` + TrafficLimitBytes OptFloat64 `json:"trafficLimitBytes"` // Traffic limit reset strategy. TrafficLimitStrategy OptBulkUpdateUsersRequestFieldsTrafficLimitStrategy `json:"trafficLimitStrategy"` // Expiration date: 2025-01-17T15:38:45.065Z. @@ -1482,7 +1505,7 @@ func (s *BulkUpdateUsersRequestFields) GetStatus() OptBulkUpdateUsersRequestFiel } // GetTrafficLimitBytes returns the value of TrafficLimitBytes. -func (s *BulkUpdateUsersRequestFields) GetTrafficLimitBytes() OptInt { +func (s *BulkUpdateUsersRequestFields) GetTrafficLimitBytes() OptFloat64 { return s.TrafficLimitBytes } @@ -1532,7 +1555,7 @@ func (s *BulkUpdateUsersRequestFields) SetStatus(val OptBulkUpdateUsersRequestFi } // SetTrafficLimitBytes sets the value of TrafficLimitBytes. -func (s *BulkUpdateUsersRequestFields) SetTrafficLimitBytes(val OptInt) { +func (s *BulkUpdateUsersRequestFields) SetTrafficLimitBytes(val OptFloat64) { s.TrafficLimitBytes = val } @@ -2239,17 +2262,39 @@ func (s *ConfigProfilesResponseResponse) SetConfigProfiles(val []ConfigProfile) // Ref: #/components/schemas/CreateApiTokenRequest type CreateApiTokenRequest struct { - TokenName string `json:"tokenName"` + Name string `json:"name"` + ExpiresInDays float64 `json:"expiresInDays"` + Scopes []string `json:"scopes"` } -// GetTokenName returns the value of TokenName. -func (s *CreateApiTokenRequest) GetTokenName() string { - return s.TokenName +// GetName returns the value of Name. +func (s *CreateApiTokenRequest) GetName() string { + return s.Name } -// SetTokenName sets the value of TokenName. -func (s *CreateApiTokenRequest) SetTokenName(val string) { - s.TokenName = val +// GetExpiresInDays returns the value of ExpiresInDays. +func (s *CreateApiTokenRequest) GetExpiresInDays() float64 { + return s.ExpiresInDays +} + +// GetScopes returns the value of Scopes. +func (s *CreateApiTokenRequest) GetScopes() []string { + return s.Scopes +} + +// SetName sets the value of Name. +func (s *CreateApiTokenRequest) SetName(val string) { + s.Name = val +} + +// SetExpiresInDays sets the value of ExpiresInDays. +func (s *CreateApiTokenRequest) SetExpiresInDays(val float64) { + s.ExpiresInDays = val +} + +// SetScopes sets the value of Scopes. +func (s *CreateApiTokenRequest) SetScopes(val []string) { + s.Scopes = val } // Ref: #/components/schemas/CreateApiTokenResponse @@ -2270,8 +2315,43 @@ func (s *CreateApiTokenResponse) SetResponse(val CreateApiTokenResponseResponse) func (*CreateApiTokenResponse) apiTokensCreateRes() {} type CreateApiTokenResponseResponse struct { - Token string `json:"token"` - UUID string `json:"uuid"` + UUID uuid.UUID `json:"uuid"` + Name string `json:"name"` + ExpireAt time.Time `json:"expireAt"` + Scopes []string `json:"scopes"` + CreatedAt time.Time `json:"createdAt"` + UpdatedAt time.Time `json:"updatedAt"` + Token string `json:"token"` +} + +// GetUUID returns the value of UUID. +func (s *CreateApiTokenResponseResponse) GetUUID() uuid.UUID { + return s.UUID +} + +// GetName returns the value of Name. +func (s *CreateApiTokenResponseResponse) GetName() string { + return s.Name +} + +// GetExpireAt returns the value of ExpireAt. +func (s *CreateApiTokenResponseResponse) GetExpireAt() time.Time { + return s.ExpireAt +} + +// GetScopes returns the value of Scopes. +func (s *CreateApiTokenResponseResponse) GetScopes() []string { + return s.Scopes +} + +// GetCreatedAt returns the value of CreatedAt. +func (s *CreateApiTokenResponseResponse) GetCreatedAt() time.Time { + return s.CreatedAt +} + +// GetUpdatedAt returns the value of UpdatedAt. +func (s *CreateApiTokenResponseResponse) GetUpdatedAt() time.Time { + return s.UpdatedAt } // GetToken returns the value of Token. @@ -2279,9 +2359,34 @@ func (s *CreateApiTokenResponseResponse) GetToken() string { return s.Token } -// GetUUID returns the value of UUID. -func (s *CreateApiTokenResponseResponse) GetUUID() string { - return s.UUID +// SetUUID sets the value of UUID. +func (s *CreateApiTokenResponseResponse) SetUUID(val uuid.UUID) { + s.UUID = val +} + +// SetName sets the value of Name. +func (s *CreateApiTokenResponseResponse) SetName(val string) { + s.Name = val +} + +// SetExpireAt sets the value of ExpireAt. +func (s *CreateApiTokenResponseResponse) SetExpireAt(val time.Time) { + s.ExpireAt = val +} + +// SetScopes sets the value of Scopes. +func (s *CreateApiTokenResponseResponse) SetScopes(val []string) { + s.Scopes = val +} + +// SetCreatedAt sets the value of CreatedAt. +func (s *CreateApiTokenResponseResponse) SetCreatedAt(val time.Time) { + s.CreatedAt = val +} + +// SetUpdatedAt sets the value of UpdatedAt. +func (s *CreateApiTokenResponseResponse) SetUpdatedAt(val time.Time) { + s.UpdatedAt = val } // SetToken sets the value of Token. @@ -2289,11 +2394,6 @@ func (s *CreateApiTokenResponseResponse) SetToken(val string) { s.Token = val } -// SetUUID sets the value of UUID. -func (s *CreateApiTokenResponseResponse) SetUUID(val string) { - s.UUID = val -} - // Ref: #/components/schemas/CreateConfigProfileRequest type CreateConfigProfileRequest struct { Name string `json:"name"` @@ -2339,34 +2439,34 @@ func (s *CreateExternalSquadRequest) SetName(val string) { // Ref: #/components/schemas/CreateHostRequest type CreateHostRequest struct { - Inbound InboundRef `json:"inbound"` - Remark string `json:"remark"` - Address string `json:"address"` - Port int `json:"port"` - Path OptString `json:"path"` - Sni OptString `json:"sni"` - Host OptString `json:"host"` - Alpn OptNilCreateHostRequestAlpn `json:"alpn"` - Fingerprint OptNilCreateHostRequestFingerprint `json:"fingerprint"` - IsDisabled OptBool `json:"isDisabled"` - SecurityLayer OptCreateHostRequestSecurityLayer `json:"securityLayer"` - XHttpExtraParams jx.Raw `json:"xHttpExtraParams"` - MuxParams jx.Raw `json:"muxParams"` - SockoptParams jx.Raw `json:"sockoptParams"` - FinalMask jx.Raw `json:"finalMask"` - ServerDescription OptNilString `json:"serverDescription"` - // Optional. Host tag for categorization. Max 32 characters, uppercase letters, numbers, underscores - // and colons are allowed. - Tag OptNilString `json:"tag"` - IsHidden OptBool `json:"isHidden"` - OverrideSniFromAddress OptBool `json:"overrideSniFromAddress"` - KeepSniBlank OptBool `json:"keepSniBlank"` - AllowInsecure OptBool `json:"allowInsecure"` - VlessRouteId OptNilInt `json:"vlessRouteId"` - ShuffleHost OptBool `json:"shuffleHost"` - MihomoX25519 OptBool `json:"mihomoX25519"` - Nodes []uuid.UUID `json:"nodes"` - XrayJsonTemplateUuid OptNilUUID `json:"xrayJsonTemplateUuid"` + Inbound InboundRef `json:"inbound"` + Remark string `json:"remark"` + Address string `json:"address"` + Port int `json:"port"` + Path OptNilString `json:"path"` + Sni OptNilString `json:"sni"` + Host OptNilString `json:"host"` + Alpn OptNilCreateHostRequestAlpn `json:"alpn"` + Fingerprint OptNilString `json:"fingerprint"` + IsDisabled OptBool `json:"isDisabled"` + SecurityLayer OptCreateHostRequestSecurityLayer `json:"securityLayer"` + XhttpExtraParams jx.Raw `json:"xhttpExtraParams"` + MuxParams jx.Raw `json:"muxParams"` + SockoptParams jx.Raw `json:"sockoptParams"` + FinalMask jx.Raw `json:"finalMask"` + ServerDescription OptNilString `json:"serverDescription"` + Tags []string `json:"tags"` + IsHidden OptBool `json:"isHidden"` + OverrideSniFromAddress OptBool `json:"overrideSniFromAddress"` + KeepSniBlank OptBool `json:"keepSniBlank"` + PinnedPeerCertSha256 OptNilString `json:"pinnedPeerCertSha256"` + VerifyPeerCertByName OptNilString `json:"verifyPeerCertByName"` + VlessRouteId OptNilInt `json:"vlessRouteId"` + ShuffleHost OptBool `json:"shuffleHost"` + MihomoX25519 OptBool `json:"mihomoX25519"` + MihomoIpVersion OptNilCreateHostRequestMihomoIpVersion `json:"mihomoIpVersion"` + Nodes []uuid.UUID `json:"nodes"` + XrayJsonTemplateUuid OptNilUUID `json:"xrayJsonTemplateUuid"` // Optional. Internal squads from which the host will be excluded. ExcludedInternalSquads []uuid.UUID `json:"excludedInternalSquads"` // Optional. Subscription types from which the host will be excluded from. @@ -2394,17 +2494,17 @@ func (s *CreateHostRequest) GetPort() int { } // GetPath returns the value of Path. -func (s *CreateHostRequest) GetPath() OptString { +func (s *CreateHostRequest) GetPath() OptNilString { return s.Path } // GetSni returns the value of Sni. -func (s *CreateHostRequest) GetSni() OptString { +func (s *CreateHostRequest) GetSni() OptNilString { return s.Sni } // GetHost returns the value of Host. -func (s *CreateHostRequest) GetHost() OptString { +func (s *CreateHostRequest) GetHost() OptNilString { return s.Host } @@ -2414,7 +2514,7 @@ func (s *CreateHostRequest) GetAlpn() OptNilCreateHostRequestAlpn { } // GetFingerprint returns the value of Fingerprint. -func (s *CreateHostRequest) GetFingerprint() OptNilCreateHostRequestFingerprint { +func (s *CreateHostRequest) GetFingerprint() OptNilString { return s.Fingerprint } @@ -2428,9 +2528,9 @@ func (s *CreateHostRequest) GetSecurityLayer() OptCreateHostRequestSecurityLayer return s.SecurityLayer } -// GetXHttpExtraParams returns the value of XHttpExtraParams. -func (s *CreateHostRequest) GetXHttpExtraParams() jx.Raw { - return s.XHttpExtraParams +// GetXhttpExtraParams returns the value of XhttpExtraParams. +func (s *CreateHostRequest) GetXhttpExtraParams() jx.Raw { + return s.XhttpExtraParams } // GetMuxParams returns the value of MuxParams. @@ -2453,9 +2553,9 @@ func (s *CreateHostRequest) GetServerDescription() OptNilString { return s.ServerDescription } -// GetTag returns the value of Tag. -func (s *CreateHostRequest) GetTag() OptNilString { - return s.Tag +// GetTags returns the value of Tags. +func (s *CreateHostRequest) GetTags() []string { + return s.Tags } // GetIsHidden returns the value of IsHidden. @@ -2473,9 +2573,14 @@ func (s *CreateHostRequest) GetKeepSniBlank() OptBool { return s.KeepSniBlank } -// GetAllowInsecure returns the value of AllowInsecure. -func (s *CreateHostRequest) GetAllowInsecure() OptBool { - return s.AllowInsecure +// GetPinnedPeerCertSha256 returns the value of PinnedPeerCertSha256. +func (s *CreateHostRequest) GetPinnedPeerCertSha256() OptNilString { + return s.PinnedPeerCertSha256 +} + +// GetVerifyPeerCertByName returns the value of VerifyPeerCertByName. +func (s *CreateHostRequest) GetVerifyPeerCertByName() OptNilString { + return s.VerifyPeerCertByName } // GetVlessRouteId returns the value of VlessRouteId. @@ -2493,6 +2598,11 @@ func (s *CreateHostRequest) GetMihomoX25519() OptBool { return s.MihomoX25519 } +// GetMihomoIpVersion returns the value of MihomoIpVersion. +func (s *CreateHostRequest) GetMihomoIpVersion() OptNilCreateHostRequestMihomoIpVersion { + return s.MihomoIpVersion +} + // GetNodes returns the value of Nodes. func (s *CreateHostRequest) GetNodes() []uuid.UUID { return s.Nodes @@ -2534,17 +2644,17 @@ func (s *CreateHostRequest) SetPort(val int) { } // SetPath sets the value of Path. -func (s *CreateHostRequest) SetPath(val OptString) { +func (s *CreateHostRequest) SetPath(val OptNilString) { s.Path = val } // SetSni sets the value of Sni. -func (s *CreateHostRequest) SetSni(val OptString) { +func (s *CreateHostRequest) SetSni(val OptNilString) { s.Sni = val } // SetHost sets the value of Host. -func (s *CreateHostRequest) SetHost(val OptString) { +func (s *CreateHostRequest) SetHost(val OptNilString) { s.Host = val } @@ -2554,7 +2664,7 @@ func (s *CreateHostRequest) SetAlpn(val OptNilCreateHostRequestAlpn) { } // SetFingerprint sets the value of Fingerprint. -func (s *CreateHostRequest) SetFingerprint(val OptNilCreateHostRequestFingerprint) { +func (s *CreateHostRequest) SetFingerprint(val OptNilString) { s.Fingerprint = val } @@ -2568,9 +2678,9 @@ func (s *CreateHostRequest) SetSecurityLayer(val OptCreateHostRequestSecurityLay s.SecurityLayer = val } -// SetXHttpExtraParams sets the value of XHttpExtraParams. -func (s *CreateHostRequest) SetXHttpExtraParams(val jx.Raw) { - s.XHttpExtraParams = val +// SetXhttpExtraParams sets the value of XhttpExtraParams. +func (s *CreateHostRequest) SetXhttpExtraParams(val jx.Raw) { + s.XhttpExtraParams = val } // SetMuxParams sets the value of MuxParams. @@ -2593,9 +2703,9 @@ func (s *CreateHostRequest) SetServerDescription(val OptNilString) { s.ServerDescription = val } -// SetTag sets the value of Tag. -func (s *CreateHostRequest) SetTag(val OptNilString) { - s.Tag = val +// SetTags sets the value of Tags. +func (s *CreateHostRequest) SetTags(val []string) { + s.Tags = val } // SetIsHidden sets the value of IsHidden. @@ -2613,9 +2723,14 @@ func (s *CreateHostRequest) SetKeepSniBlank(val OptBool) { s.KeepSniBlank = val } -// SetAllowInsecure sets the value of AllowInsecure. -func (s *CreateHostRequest) SetAllowInsecure(val OptBool) { - s.AllowInsecure = val +// SetPinnedPeerCertSha256 sets the value of PinnedPeerCertSha256. +func (s *CreateHostRequest) SetPinnedPeerCertSha256(val OptNilString) { + s.PinnedPeerCertSha256 = val +} + +// SetVerifyPeerCertByName sets the value of VerifyPeerCertByName. +func (s *CreateHostRequest) SetVerifyPeerCertByName(val OptNilString) { + s.VerifyPeerCertByName = val } // SetVlessRouteId sets the value of VlessRouteId. @@ -2633,6 +2748,11 @@ func (s *CreateHostRequest) SetMihomoX25519(val OptBool) { s.MihomoX25519 = val } +// SetMihomoIpVersion sets the value of MihomoIpVersion. +func (s *CreateHostRequest) SetMihomoIpVersion(val OptNilCreateHostRequestMihomoIpVersion) { + s.MihomoIpVersion = val +} + // SetNodes sets the value of Nodes. func (s *CreateHostRequest) SetNodes(val []uuid.UUID) { s.Nodes = val @@ -2791,55 +2911,39 @@ func (s *CreateHostRequestExcludeFromSubscriptionTypesItem) UnmarshalText(data [ } } -type CreateHostRequestFingerprint string +type CreateHostRequestMihomoIpVersion string const ( - CreateHostRequestFingerprintChrome CreateHostRequestFingerprint = "chrome" - CreateHostRequestFingerprintFirefox CreateHostRequestFingerprint = "firefox" - CreateHostRequestFingerprintSafari CreateHostRequestFingerprint = "safari" - CreateHostRequestFingerprintIos CreateHostRequestFingerprint = "ios" - CreateHostRequestFingerprintAndroid CreateHostRequestFingerprint = "android" - CreateHostRequestFingerprintEdge CreateHostRequestFingerprint = "edge" - CreateHostRequestFingerprintQq CreateHostRequestFingerprint = "qq" - CreateHostRequestFingerprintRandom CreateHostRequestFingerprint = "random" - CreateHostRequestFingerprintRandomized CreateHostRequestFingerprint = "randomized" + CreateHostRequestMihomoIpVersionDual CreateHostRequestMihomoIpVersion = "dual" + CreateHostRequestMihomoIpVersionIpv4 CreateHostRequestMihomoIpVersion = "ipv4" + CreateHostRequestMihomoIpVersionIpv6 CreateHostRequestMihomoIpVersion = "ipv6" + CreateHostRequestMihomoIpVersionIpv4Prefer CreateHostRequestMihomoIpVersion = "ipv4-prefer" + CreateHostRequestMihomoIpVersionIpv6Prefer CreateHostRequestMihomoIpVersion = "ipv6-prefer" ) -// AllValues returns all CreateHostRequestFingerprint values. -func (CreateHostRequestFingerprint) AllValues() []CreateHostRequestFingerprint { - return []CreateHostRequestFingerprint{ - CreateHostRequestFingerprintChrome, - CreateHostRequestFingerprintFirefox, - CreateHostRequestFingerprintSafari, - CreateHostRequestFingerprintIos, - CreateHostRequestFingerprintAndroid, - CreateHostRequestFingerprintEdge, - CreateHostRequestFingerprintQq, - CreateHostRequestFingerprintRandom, - CreateHostRequestFingerprintRandomized, +// AllValues returns all CreateHostRequestMihomoIpVersion values. +func (CreateHostRequestMihomoIpVersion) AllValues() []CreateHostRequestMihomoIpVersion { + return []CreateHostRequestMihomoIpVersion{ + CreateHostRequestMihomoIpVersionDual, + CreateHostRequestMihomoIpVersionIpv4, + CreateHostRequestMihomoIpVersionIpv6, + CreateHostRequestMihomoIpVersionIpv4Prefer, + CreateHostRequestMihomoIpVersionIpv6Prefer, } } // MarshalText implements encoding.TextMarshaler. -func (s CreateHostRequestFingerprint) MarshalText() ([]byte, error) { +func (s CreateHostRequestMihomoIpVersion) MarshalText() ([]byte, error) { switch s { - case CreateHostRequestFingerprintChrome: + case CreateHostRequestMihomoIpVersionDual: return []byte(s), nil - case CreateHostRequestFingerprintFirefox: + case CreateHostRequestMihomoIpVersionIpv4: return []byte(s), nil - case CreateHostRequestFingerprintSafari: + case CreateHostRequestMihomoIpVersionIpv6: return []byte(s), nil - case CreateHostRequestFingerprintIos: + case CreateHostRequestMihomoIpVersionIpv4Prefer: return []byte(s), nil - case CreateHostRequestFingerprintAndroid: - return []byte(s), nil - case CreateHostRequestFingerprintEdge: - return []byte(s), nil - case CreateHostRequestFingerprintQq: - return []byte(s), nil - case CreateHostRequestFingerprintRandom: - return []byte(s), nil - case CreateHostRequestFingerprintRandomized: + case CreateHostRequestMihomoIpVersionIpv6Prefer: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) @@ -2847,34 +2951,22 @@ func (s CreateHostRequestFingerprint) MarshalText() ([]byte, error) { } // UnmarshalText implements encoding.TextUnmarshaler. -func (s *CreateHostRequestFingerprint) UnmarshalText(data []byte) error { - switch CreateHostRequestFingerprint(data) { - case CreateHostRequestFingerprintChrome: - *s = CreateHostRequestFingerprintChrome +func (s *CreateHostRequestMihomoIpVersion) UnmarshalText(data []byte) error { + switch CreateHostRequestMihomoIpVersion(data) { + case CreateHostRequestMihomoIpVersionDual: + *s = CreateHostRequestMihomoIpVersionDual return nil - case CreateHostRequestFingerprintFirefox: - *s = CreateHostRequestFingerprintFirefox + case CreateHostRequestMihomoIpVersionIpv4: + *s = CreateHostRequestMihomoIpVersionIpv4 return nil - case CreateHostRequestFingerprintSafari: - *s = CreateHostRequestFingerprintSafari + case CreateHostRequestMihomoIpVersionIpv6: + *s = CreateHostRequestMihomoIpVersionIpv6 return nil - case CreateHostRequestFingerprintIos: - *s = CreateHostRequestFingerprintIos + case CreateHostRequestMihomoIpVersionIpv4Prefer: + *s = CreateHostRequestMihomoIpVersionIpv4Prefer return nil - case CreateHostRequestFingerprintAndroid: - *s = CreateHostRequestFingerprintAndroid - return nil - case CreateHostRequestFingerprintEdge: - *s = CreateHostRequestFingerprintEdge - return nil - case CreateHostRequestFingerprintQq: - *s = CreateHostRequestFingerprintQq - return nil - case CreateHostRequestFingerprintRandom: - *s = CreateHostRequestFingerprintRandom - return nil - case CreateHostRequestFingerprintRandomized: - *s = CreateHostRequestFingerprintRandomized + case CreateHostRequestMihomoIpVersionIpv6Prefer: + *s = CreateHostRequestMihomoIpVersionIpv6Prefer return nil default: return errors.Errorf("invalid value: %q", data) @@ -2970,9 +3062,10 @@ func (s *CreateInfraBillingHistoryRecordRequest) SetBilledAt(val time.Time) { // Ref: #/components/schemas/CreateInfraBillingNodeRequest type CreateInfraBillingNodeRequest struct { ProviderUuid uuid.UUID `json:"providerUuid"` - NodeUuid uuid.UUID `json:"nodeUuid"` + NodeUuid NilUUID `json:"nodeUuid"` + Name NilString `json:"name"` // Next billing date. Format: 2025-01-17T15:38:45.065Z. - NextBillingAt OptDateTime `json:"nextBillingAt"` + NextBillingAt time.Time `json:"nextBillingAt"` } // GetProviderUuid returns the value of ProviderUuid. @@ -2981,12 +3074,17 @@ func (s *CreateInfraBillingNodeRequest) GetProviderUuid() uuid.UUID { } // GetNodeUuid returns the value of NodeUuid. -func (s *CreateInfraBillingNodeRequest) GetNodeUuid() uuid.UUID { +func (s *CreateInfraBillingNodeRequest) GetNodeUuid() NilUUID { return s.NodeUuid } +// GetName returns the value of Name. +func (s *CreateInfraBillingNodeRequest) GetName() NilString { + return s.Name +} + // GetNextBillingAt returns the value of NextBillingAt. -func (s *CreateInfraBillingNodeRequest) GetNextBillingAt() OptDateTime { +func (s *CreateInfraBillingNodeRequest) GetNextBillingAt() time.Time { return s.NextBillingAt } @@ -2996,12 +3094,17 @@ func (s *CreateInfraBillingNodeRequest) SetProviderUuid(val uuid.UUID) { } // SetNodeUuid sets the value of NodeUuid. -func (s *CreateInfraBillingNodeRequest) SetNodeUuid(val uuid.UUID) { +func (s *CreateInfraBillingNodeRequest) SetNodeUuid(val NilUUID) { s.NodeUuid = val } +// SetName sets the value of Name. +func (s *CreateInfraBillingNodeRequest) SetName(val NilString) { + s.Name = val +} + // SetNextBillingAt sets the value of NextBillingAt. -func (s *CreateInfraBillingNodeRequest) SetNextBillingAt(val OptDateTime) { +func (s *CreateInfraBillingNodeRequest) SetNextBillingAt(val time.Time) { s.NextBillingAt = val } @@ -3102,19 +3205,22 @@ func (*CreateNodePluginResponse) nodePluginCreateConfigRes() {} // Ref: #/components/schemas/CreateNodeRequest type CreateNodeRequest struct { - Name string `json:"name"` - Address string `json:"address"` - Port OptInt `json:"port"` - IsTrafficTrackingActive OptBool `json:"isTrafficTrackingActive"` - TrafficLimitBytes OptInt `json:"trafficLimitBytes"` - NotifyPercent OptInt `json:"notifyPercent"` - TrafficResetDay OptInt `json:"trafficResetDay"` - CountryCode OptString `json:"countryCode"` - ConsumptionMultiplier OptFloat64 `json:"consumptionMultiplier"` - ConfigProfile ConfigProfileRef `json:"configProfile"` - ProviderUuid OptNilUUID `json:"providerUuid"` - Tags []string `json:"tags"` - ActivePluginUuid OptNilUUID `json:"activePluginUuid"` + Name string `json:"name"` + Address string `json:"address"` + Port OptInt `json:"port"` + ProxyUrl OptNilString `json:"proxyUrl"` + IsTrafficTrackingActive OptBool `json:"isTrafficTrackingActive"` + TrafficLimitBytes OptFloat64 `json:"trafficLimitBytes"` + NotifyPercent OptInt `json:"notifyPercent"` + TrafficResetDay OptInt `json:"trafficResetDay"` + CountryCode OptString `json:"countryCode"` + ConsumptionMultiplier OptFloat64 `json:"consumptionMultiplier"` + NodeConsumptionMultiplier OptFloat64 `json:"nodeConsumptionMultiplier"` + ConfigProfile ConfigProfileRef `json:"configProfile"` + ProviderUuid OptNilUUID `json:"providerUuid"` + Tags []string `json:"tags"` + ActivePluginUuid OptNilUUID `json:"activePluginUuid"` + Note OptString `json:"note"` } // GetName returns the value of Name. @@ -3132,13 +3238,18 @@ func (s *CreateNodeRequest) GetPort() OptInt { return s.Port } +// GetProxyUrl returns the value of ProxyUrl. +func (s *CreateNodeRequest) GetProxyUrl() OptNilString { + return s.ProxyUrl +} + // GetIsTrafficTrackingActive returns the value of IsTrafficTrackingActive. func (s *CreateNodeRequest) GetIsTrafficTrackingActive() OptBool { return s.IsTrafficTrackingActive } // GetTrafficLimitBytes returns the value of TrafficLimitBytes. -func (s *CreateNodeRequest) GetTrafficLimitBytes() OptInt { +func (s *CreateNodeRequest) GetTrafficLimitBytes() OptFloat64 { return s.TrafficLimitBytes } @@ -3162,6 +3273,11 @@ func (s *CreateNodeRequest) GetConsumptionMultiplier() OptFloat64 { return s.ConsumptionMultiplier } +// GetNodeConsumptionMultiplier returns the value of NodeConsumptionMultiplier. +func (s *CreateNodeRequest) GetNodeConsumptionMultiplier() OptFloat64 { + return s.NodeConsumptionMultiplier +} + // GetConfigProfile returns the value of ConfigProfile. func (s *CreateNodeRequest) GetConfigProfile() ConfigProfileRef { return s.ConfigProfile @@ -3182,6 +3298,11 @@ func (s *CreateNodeRequest) GetActivePluginUuid() OptNilUUID { return s.ActivePluginUuid } +// GetNote returns the value of Note. +func (s *CreateNodeRequest) GetNote() OptString { + return s.Note +} + // SetName sets the value of Name. func (s *CreateNodeRequest) SetName(val string) { s.Name = val @@ -3197,13 +3318,18 @@ func (s *CreateNodeRequest) SetPort(val OptInt) { s.Port = val } +// SetProxyUrl sets the value of ProxyUrl. +func (s *CreateNodeRequest) SetProxyUrl(val OptNilString) { + s.ProxyUrl = val +} + // SetIsTrafficTrackingActive sets the value of IsTrafficTrackingActive. func (s *CreateNodeRequest) SetIsTrafficTrackingActive(val OptBool) { s.IsTrafficTrackingActive = val } // SetTrafficLimitBytes sets the value of TrafficLimitBytes. -func (s *CreateNodeRequest) SetTrafficLimitBytes(val OptInt) { +func (s *CreateNodeRequest) SetTrafficLimitBytes(val OptFloat64) { s.TrafficLimitBytes = val } @@ -3227,6 +3353,11 @@ func (s *CreateNodeRequest) SetConsumptionMultiplier(val OptFloat64) { s.ConsumptionMultiplier = val } +// SetNodeConsumptionMultiplier sets the value of NodeConsumptionMultiplier. +func (s *CreateNodeRequest) SetNodeConsumptionMultiplier(val OptFloat64) { + s.NodeConsumptionMultiplier = val +} + // SetConfigProfile sets the value of ConfigProfile. func (s *CreateNodeRequest) SetConfigProfile(val ConfigProfileRef) { s.ConfigProfile = val @@ -3247,6 +3378,11 @@ func (s *CreateNodeRequest) SetActivePluginUuid(val OptNilUUID) { s.ActivePluginUuid = val } +// SetNote sets the value of Note. +func (s *CreateNodeRequest) SetNote(val OptString) { + s.Note = val +} + // Ref: #/components/schemas/CreateSubscriptionPageConfigRequest type CreateSubscriptionPageConfigRequest struct { Name string `json:"name"` @@ -3382,6 +3518,7 @@ type CreateUserHwidDeviceRequest struct { OsVersion OptString `json:"osVersion"` DeviceModel OptString `json:"deviceModel"` UserAgent OptString `json:"userAgent"` + RequestIp OptString `json:"requestIp"` } // GetHwid returns the value of Hwid. @@ -3414,6 +3551,11 @@ func (s *CreateUserHwidDeviceRequest) GetUserAgent() OptString { return s.UserAgent } +// GetRequestIp returns the value of RequestIp. +func (s *CreateUserHwidDeviceRequest) GetRequestIp() OptString { + return s.RequestIp +} + // SetHwid sets the value of Hwid. func (s *CreateUserHwidDeviceRequest) SetHwid(val string) { s.Hwid = val @@ -3444,6 +3586,11 @@ func (s *CreateUserHwidDeviceRequest) SetUserAgent(val OptString) { s.UserAgent = val } +// SetRequestIp sets the value of RequestIp. +func (s *CreateUserHwidDeviceRequest) SetRequestIp(val OptString) { + s.RequestIp = val +} + // Ref: #/components/schemas/CreateUserRequest type CreateUserRequest struct { // Unique username for the user. Required. Must be 3-36 characters long and contain only letters, @@ -3460,7 +3607,7 @@ type CreateUserRequest struct { // Optional. Password for Shadowsocks protocol. Must be 8-32 characters. SsPassword OptString `json:"ssPassword"` // Optional. Traffic limit in bytes. Set to 0 for unlimited traffic. - TrafficLimitBytes OptInt `json:"trafficLimitBytes"` + TrafficLimitBytes OptFloat64 `json:"trafficLimitBytes"` // Available reset periods. TrafficLimitStrategy OptCreateUserRequestTrafficLimitStrategy `json:"trafficLimitStrategy"` // Account expiration date. Required. Format: 2025-01-17T15:38:45.065Z. @@ -3520,7 +3667,7 @@ func (s *CreateUserRequest) GetSsPassword() OptString { } // GetTrafficLimitBytes returns the value of TrafficLimitBytes. -func (s *CreateUserRequest) GetTrafficLimitBytes() OptInt { +func (s *CreateUserRequest) GetTrafficLimitBytes() OptFloat64 { return s.TrafficLimitBytes } @@ -3615,7 +3762,7 @@ func (s *CreateUserRequest) SetSsPassword(val OptString) { } // SetTrafficLimitBytes sets the value of TrafficLimitBytes. -func (s *CreateUserRequest) SetTrafficLimitBytes(val OptInt) { +func (s *CreateUserRequest) SetTrafficLimitBytes(val OptFloat64) { s.TrafficLimitBytes = val } @@ -4234,11 +4381,12 @@ func (s *DeleteUserHwidDeviceRequest) SetHwid(val string) { // Ref: #/components/schemas/Device type Device struct { Hwid string `json:"hwid"` - UserUuid uuid.UUID `json:"userUuid"` + UserId float64 `json:"userId"` Platform NilString `json:"platform"` OsVersion NilString `json:"osVersion"` DeviceModel NilString `json:"deviceModel"` UserAgent NilString `json:"userAgent"` + RequestIp NilString `json:"requestIp"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` } @@ -4248,9 +4396,9 @@ func (s *Device) GetHwid() string { return s.Hwid } -// GetUserUuid returns the value of UserUuid. -func (s *Device) GetUserUuid() uuid.UUID { - return s.UserUuid +// GetUserId returns the value of UserId. +func (s *Device) GetUserId() float64 { + return s.UserId } // GetPlatform returns the value of Platform. @@ -4273,6 +4421,11 @@ func (s *Device) GetUserAgent() NilString { return s.UserAgent } +// GetRequestIp returns the value of RequestIp. +func (s *Device) GetRequestIp() NilString { + return s.RequestIp +} + // GetCreatedAt returns the value of CreatedAt. func (s *Device) GetCreatedAt() time.Time { return s.CreatedAt @@ -4288,9 +4441,9 @@ func (s *Device) SetHwid(val string) { s.Hwid = val } -// SetUserUuid sets the value of UserUuid. -func (s *Device) SetUserUuid(val uuid.UUID) { - s.UserUuid = val +// SetUserId sets the value of UserId. +func (s *Device) SetUserId(val float64) { + s.UserId = val } // SetPlatform sets the value of Platform. @@ -4313,6 +4466,11 @@ func (s *Device) SetUserAgent(val NilString) { s.UserAgent = val } +// SetRequestIp sets the value of RequestIp. +func (s *Device) SetRequestIp(val NilString) { + s.RequestIp = val +} + // SetCreatedAt sets the value of CreatedAt. func (s *Device) SetCreatedAt(val time.Time) { s.CreatedAt = val @@ -4714,50 +4872,73 @@ func (s *DropConnectionsRequestTargetNodes1Target) UnmarshalText(data []byte) er } } -// Ref: #/components/schemas/EncryptHappCryptoLinkRequest -type EncryptHappCryptoLinkRequest struct { - LinkToEncrypt url.URL `json:"linkToEncrypt"` +// {"markdownDescription":"Encrypt response body with given parameters. Generate keypairs with Rescue +// CLI: `docker exec -it remnawave cli`, select \"Generate keypairs\"."}. +// Ref: #/components/schemas/EncryptionItem +type EncryptionItem struct { + Method EncryptionItemMethod `json:"method"` + Key string `json:"key"` } -// GetLinkToEncrypt returns the value of LinkToEncrypt. -func (s *EncryptHappCryptoLinkRequest) GetLinkToEncrypt() url.URL { - return s.LinkToEncrypt +// GetMethod returns the value of Method. +func (s *EncryptionItem) GetMethod() EncryptionItemMethod { + return s.Method } -// SetLinkToEncrypt sets the value of LinkToEncrypt. -func (s *EncryptHappCryptoLinkRequest) SetLinkToEncrypt(val url.URL) { - s.LinkToEncrypt = val +// GetKey returns the value of Key. +func (s *EncryptionItem) GetKey() string { + return s.Key } -// Ref: #/components/schemas/EncryptHappCryptoLinkResponse -type EncryptHappCryptoLinkResponse struct { - Response EncryptHappCryptoLinkResponseResponse `json:"response"` +// SetMethod sets the value of Method. +func (s *EncryptionItem) SetMethod(val EncryptionItemMethod) { + s.Method = val } -// GetResponse returns the value of Response. -func (s *EncryptHappCryptoLinkResponse) GetResponse() EncryptHappCryptoLinkResponseResponse { - return s.Response +// SetKey sets the value of Key. +func (s *EncryptionItem) SetKey(val string) { + s.Key = val } -// SetResponse sets the value of Response. -func (s *EncryptHappCryptoLinkResponse) SetResponse(val EncryptHappCryptoLinkResponseResponse) { - s.Response = val +type EncryptionItemMethod string + +const ( + EncryptionItemMethodAge1 EncryptionItemMethod = "age1" + EncryptionItemMethodAge1pq1 EncryptionItemMethod = "age1pq1" +) + +// AllValues returns all EncryptionItemMethod values. +func (EncryptionItemMethod) AllValues() []EncryptionItemMethod { + return []EncryptionItemMethod{ + EncryptionItemMethodAge1, + EncryptionItemMethodAge1pq1, + } } -func (*EncryptHappCryptoLinkResponse) systemEncryptHappCryptoLinkRes() {} - -type EncryptHappCryptoLinkResponseResponse struct { - EncryptedLink string `json:"encryptedLink"` +// MarshalText implements encoding.TextMarshaler. +func (s EncryptionItemMethod) MarshalText() ([]byte, error) { + switch s { + case EncryptionItemMethodAge1: + return []byte(s), nil + case EncryptionItemMethodAge1pq1: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } } -// GetEncryptedLink returns the value of EncryptedLink. -func (s *EncryptHappCryptoLinkResponseResponse) GetEncryptedLink() string { - return s.EncryptedLink -} - -// SetEncryptedLink sets the value of EncryptedLink. -func (s *EncryptHappCryptoLinkResponseResponse) SetEncryptedLink(val string) { - s.EncryptedLink = val +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *EncryptionItemMethod) UnmarshalText(data []byte) error { + switch EncryptionItemMethod(data) { + case EncryptionItemMethodAge1: + *s = EncryptionItemMethodAge1 + return nil + case EncryptionItemMethodAge1pq1: + *s = EncryptionItemMethodAge1pq1 + return nil + default: + return errors.Errorf("invalid value: %q", data) + } } // Ref: #/components/schemas/EventResponse @@ -5376,13 +5557,13 @@ func (s *FindAllApiTokensResponse) SetResponse(val FindAllApiTokensResponseRespo func (*FindAllApiTokensResponse) apiTokensFindAllRes() {} type FindAllApiTokensResponseResponse struct { - ApiKeys []FindAllApiTokensResponseResponseApiKeysItem `json:"apiKeys"` - Docs FindAllApiTokensResponseResponseDocs `json:"docs"` + Tokens []FindAllApiTokensResponseResponseTokensItem `json:"tokens"` + Docs FindAllApiTokensResponseResponseDocs `json:"docs"` } -// GetApiKeys returns the value of ApiKeys. -func (s *FindAllApiTokensResponseResponse) GetApiKeys() []FindAllApiTokensResponseResponseApiKeysItem { - return s.ApiKeys +// GetTokens returns the value of Tokens. +func (s *FindAllApiTokensResponseResponse) GetTokens() []FindAllApiTokensResponseResponseTokensItem { + return s.Tokens } // GetDocs returns the value of Docs. @@ -5390,9 +5571,9 @@ func (s *FindAllApiTokensResponseResponse) GetDocs() FindAllApiTokensResponseRes return s.Docs } -// SetApiKeys sets the value of ApiKeys. -func (s *FindAllApiTokensResponseResponse) SetApiKeys(val []FindAllApiTokensResponseResponseApiKeysItem) { - s.ApiKeys = val +// SetTokens sets the value of Tokens. +func (s *FindAllApiTokensResponseResponse) SetTokens(val []FindAllApiTokensResponseResponseTokensItem) { + s.Tokens = val } // SetDocs sets the value of Docs. @@ -5400,73 +5581,15 @@ func (s *FindAllApiTokensResponseResponse) SetDocs(val FindAllApiTokensResponseR s.Docs = val } -type FindAllApiTokensResponseResponseApiKeysItem struct { - UUID uuid.UUID `json:"uuid"` - Token string `json:"token"` - TokenName string `json:"tokenName"` - CreatedAt time.Time `json:"createdAt"` - UpdatedAt time.Time `json:"updatedAt"` -} - -// GetUUID returns the value of UUID. -func (s *FindAllApiTokensResponseResponseApiKeysItem) GetUUID() uuid.UUID { - return s.UUID -} - -// GetToken returns the value of Token. -func (s *FindAllApiTokensResponseResponseApiKeysItem) GetToken() string { - return s.Token -} - -// GetTokenName returns the value of TokenName. -func (s *FindAllApiTokensResponseResponseApiKeysItem) GetTokenName() string { - return s.TokenName -} - -// GetCreatedAt returns the value of CreatedAt. -func (s *FindAllApiTokensResponseResponseApiKeysItem) GetCreatedAt() time.Time { - return s.CreatedAt -} - -// GetUpdatedAt returns the value of UpdatedAt. -func (s *FindAllApiTokensResponseResponseApiKeysItem) GetUpdatedAt() time.Time { - return s.UpdatedAt -} - -// SetUUID sets the value of UUID. -func (s *FindAllApiTokensResponseResponseApiKeysItem) SetUUID(val uuid.UUID) { - s.UUID = val -} - -// SetToken sets the value of Token. -func (s *FindAllApiTokensResponseResponseApiKeysItem) SetToken(val string) { - s.Token = val -} - -// SetTokenName sets the value of TokenName. -func (s *FindAllApiTokensResponseResponseApiKeysItem) SetTokenName(val string) { - s.TokenName = val -} - -// SetCreatedAt sets the value of CreatedAt. -func (s *FindAllApiTokensResponseResponseApiKeysItem) SetCreatedAt(val time.Time) { - s.CreatedAt = val -} - -// SetUpdatedAt sets the value of UpdatedAt. -func (s *FindAllApiTokensResponseResponseApiKeysItem) SetUpdatedAt(val time.Time) { - s.UpdatedAt = val -} - type FindAllApiTokensResponseResponseDocs struct { - IsDocsEnabled bool `json:"isDocsEnabled"` - ScalarPath NilString `json:"scalarPath"` - SwaggerPath NilString `json:"swaggerPath"` + Enabled bool `json:"enabled"` + ScalarPath NilString `json:"scalarPath"` + SwaggerPath NilString `json:"swaggerPath"` } -// GetIsDocsEnabled returns the value of IsDocsEnabled. -func (s *FindAllApiTokensResponseResponseDocs) GetIsDocsEnabled() bool { - return s.IsDocsEnabled +// GetEnabled returns the value of Enabled. +func (s *FindAllApiTokensResponseResponseDocs) GetEnabled() bool { + return s.Enabled } // GetScalarPath returns the value of ScalarPath. @@ -5479,9 +5602,9 @@ func (s *FindAllApiTokensResponseResponseDocs) GetSwaggerPath() NilString { return s.SwaggerPath } -// SetIsDocsEnabled sets the value of IsDocsEnabled. -func (s *FindAllApiTokensResponseResponseDocs) SetIsDocsEnabled(val bool) { - s.IsDocsEnabled = val +// SetEnabled sets the value of Enabled. +func (s *FindAllApiTokensResponseResponseDocs) SetEnabled(val bool) { + s.Enabled = val } // SetScalarPath sets the value of ScalarPath. @@ -5494,6 +5617,75 @@ func (s *FindAllApiTokensResponseResponseDocs) SetSwaggerPath(val NilString) { s.SwaggerPath = val } +type FindAllApiTokensResponseResponseTokensItem struct { + UUID uuid.UUID `json:"uuid"` + Name string `json:"name"` + ExpireAt time.Time `json:"expireAt"` + Scopes []string `json:"scopes"` + CreatedAt time.Time `json:"createdAt"` + UpdatedAt time.Time `json:"updatedAt"` +} + +// GetUUID returns the value of UUID. +func (s *FindAllApiTokensResponseResponseTokensItem) GetUUID() uuid.UUID { + return s.UUID +} + +// GetName returns the value of Name. +func (s *FindAllApiTokensResponseResponseTokensItem) GetName() string { + return s.Name +} + +// GetExpireAt returns the value of ExpireAt. +func (s *FindAllApiTokensResponseResponseTokensItem) GetExpireAt() time.Time { + return s.ExpireAt +} + +// GetScopes returns the value of Scopes. +func (s *FindAllApiTokensResponseResponseTokensItem) GetScopes() []string { + return s.Scopes +} + +// GetCreatedAt returns the value of CreatedAt. +func (s *FindAllApiTokensResponseResponseTokensItem) GetCreatedAt() time.Time { + return s.CreatedAt +} + +// GetUpdatedAt returns the value of UpdatedAt. +func (s *FindAllApiTokensResponseResponseTokensItem) GetUpdatedAt() time.Time { + return s.UpdatedAt +} + +// SetUUID sets the value of UUID. +func (s *FindAllApiTokensResponseResponseTokensItem) SetUUID(val uuid.UUID) { + s.UUID = val +} + +// SetName sets the value of Name. +func (s *FindAllApiTokensResponseResponseTokensItem) SetName(val string) { + s.Name = val +} + +// SetExpireAt sets the value of ExpireAt. +func (s *FindAllApiTokensResponseResponseTokensItem) SetExpireAt(val time.Time) { + s.ExpireAt = val +} + +// SetScopes sets the value of Scopes. +func (s *FindAllApiTokensResponseResponseTokensItem) SetScopes(val []string) { + s.Scopes = val +} + +// SetCreatedAt sets the value of CreatedAt. +func (s *FindAllApiTokensResponseResponseTokensItem) SetCreatedAt(val time.Time) { + s.CreatedAt = val +} + +// SetUpdatedAt sets the value of UpdatedAt. +func (s *FindAllApiTokensResponseResponseTokensItem) SetUpdatedAt(val time.Time) { + s.UpdatedAt = val +} + // Ref: #/components/schemas/ForbiddenError type ForbiddenError struct { Message string `json:"message"` @@ -5771,6 +5963,183 @@ func (s *GetAllUsersResponseResponse) SetTotal(val float64) { s.Total = val } +// Ref: #/components/schemas/GetApiTokenScopesResponse +type GetApiTokenScopesResponse struct { + Response GetApiTokenScopesResponseResponse `json:"response"` +} + +// GetResponse returns the value of Response. +func (s *GetApiTokenScopesResponse) GetResponse() GetApiTokenScopesResponseResponse { + return s.Response +} + +// SetResponse sets the value of Response. +func (s *GetApiTokenScopesResponse) SetResponse(val GetApiTokenScopesResponseResponse) { + s.Response = val +} + +func (*GetApiTokenScopesResponse) apiTokensGetScopesRes() {} + +type GetApiTokenScopesResponseResponse struct { + Wildcard string `json:"wildcard"` + Resources []GetApiTokenScopesResponseResponseResourcesItem `json:"resources"` +} + +// GetWildcard returns the value of Wildcard. +func (s *GetApiTokenScopesResponseResponse) GetWildcard() string { + return s.Wildcard +} + +// GetResources returns the value of Resources. +func (s *GetApiTokenScopesResponseResponse) GetResources() []GetApiTokenScopesResponseResponseResourcesItem { + return s.Resources +} + +// SetWildcard sets the value of Wildcard. +func (s *GetApiTokenScopesResponseResponse) SetWildcard(val string) { + s.Wildcard = val +} + +// SetResources sets the value of Resources. +func (s *GetApiTokenScopesResponseResponse) SetResources(val []GetApiTokenScopesResponseResponseResourcesItem) { + s.Resources = val +} + +type GetApiTokenScopesResponseResponseResourcesItem struct { + Resource string `json:"resource"` + ResourceScopes []string `json:"resourceScopes"` + Endpoints []GetApiTokenScopesResponseResponseResourcesItemEndpointsItem `json:"endpoints"` +} + +// GetResource returns the value of Resource. +func (s *GetApiTokenScopesResponseResponseResourcesItem) GetResource() string { + return s.Resource +} + +// GetResourceScopes returns the value of ResourceScopes. +func (s *GetApiTokenScopesResponseResponseResourcesItem) GetResourceScopes() []string { + return s.ResourceScopes +} + +// GetEndpoints returns the value of Endpoints. +func (s *GetApiTokenScopesResponseResponseResourcesItem) GetEndpoints() []GetApiTokenScopesResponseResponseResourcesItemEndpointsItem { + return s.Endpoints +} + +// SetResource sets the value of Resource. +func (s *GetApiTokenScopesResponseResponseResourcesItem) SetResource(val string) { + s.Resource = val +} + +// SetResourceScopes sets the value of ResourceScopes. +func (s *GetApiTokenScopesResponseResponseResourcesItem) SetResourceScopes(val []string) { + s.ResourceScopes = val +} + +// SetEndpoints sets the value of Endpoints. +func (s *GetApiTokenScopesResponseResponseResourcesItem) SetEndpoints(val []GetApiTokenScopesResponseResponseResourcesItemEndpointsItem) { + s.Endpoints = val +} + +type GetApiTokenScopesResponseResponseResourcesItemEndpointsItem struct { + Key string `json:"key"` + Kind GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKind `json:"kind"` + Method string `json:"method"` + Path string `json:"path"` + Description string `json:"description"` +} + +// GetKey returns the value of Key. +func (s *GetApiTokenScopesResponseResponseResourcesItemEndpointsItem) GetKey() string { + return s.Key +} + +// GetKind returns the value of Kind. +func (s *GetApiTokenScopesResponseResponseResourcesItemEndpointsItem) GetKind() GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKind { + return s.Kind +} + +// GetMethod returns the value of Method. +func (s *GetApiTokenScopesResponseResponseResourcesItemEndpointsItem) GetMethod() string { + return s.Method +} + +// GetPath returns the value of Path. +func (s *GetApiTokenScopesResponseResponseResourcesItemEndpointsItem) GetPath() string { + return s.Path +} + +// GetDescription returns the value of Description. +func (s *GetApiTokenScopesResponseResponseResourcesItemEndpointsItem) GetDescription() string { + return s.Description +} + +// SetKey sets the value of Key. +func (s *GetApiTokenScopesResponseResponseResourcesItemEndpointsItem) SetKey(val string) { + s.Key = val +} + +// SetKind sets the value of Kind. +func (s *GetApiTokenScopesResponseResponseResourcesItemEndpointsItem) SetKind(val GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKind) { + s.Kind = val +} + +// SetMethod sets the value of Method. +func (s *GetApiTokenScopesResponseResponseResourcesItemEndpointsItem) SetMethod(val string) { + s.Method = val +} + +// SetPath sets the value of Path. +func (s *GetApiTokenScopesResponseResponseResourcesItemEndpointsItem) SetPath(val string) { + s.Path = val +} + +// SetDescription sets the value of Description. +func (s *GetApiTokenScopesResponseResponseResourcesItemEndpointsItem) SetDescription(val string) { + s.Description = val +} + +type GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKind string + +const ( + GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKindRead GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKind = "read" + GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKindWrite GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKind = "write" +) + +// AllValues returns all GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKind values. +func (GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKind) AllValues() []GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKind { + return []GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKind{ + GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKindRead, + GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKindWrite, + } +} + +// MarshalText implements encoding.TextMarshaler. +func (s GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKind) MarshalText() ([]byte, error) { + switch s { + case GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKindRead: + return []byte(s), nil + case GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKindWrite: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKind) UnmarshalText(data []byte) error { + switch GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKind(data) { + case GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKindRead: + *s = GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKindRead + return nil + case GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKindWrite: + *s = GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKindWrite + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + // Ref: #/components/schemas/GetBandwidthStatsResponse type GetBandwidthStatsResponse struct { Response GetBandwidthStatsResponseResponse `json:"response"` @@ -5918,7 +6287,6 @@ func (*GetHwidDevicesStatsResponse) hwidUserDevicesGetHwidDevicesStatsRes() {} type GetHwidDevicesStatsResponseResponse struct { ByPlatform []GetHwidDevicesStatsResponseResponseByPlatformItem `json:"byPlatform"` - ByApp []ByAppItem `json:"byApp"` Stats GetHwidDevicesStatsResponseResponseStats `json:"stats"` } @@ -5927,11 +6295,6 @@ func (s *GetHwidDevicesStatsResponseResponse) GetByPlatform() []GetHwidDevicesSt return s.ByPlatform } -// GetByApp returns the value of ByApp. -func (s *GetHwidDevicesStatsResponseResponse) GetByApp() []ByAppItem { - return s.ByApp -} - // GetStats returns the value of Stats. func (s *GetHwidDevicesStatsResponseResponse) GetStats() GetHwidDevicesStatsResponseResponseStats { return s.Stats @@ -5942,19 +6305,15 @@ func (s *GetHwidDevicesStatsResponseResponse) SetByPlatform(val []GetHwidDevices s.ByPlatform = val } -// SetByApp sets the value of ByApp. -func (s *GetHwidDevicesStatsResponseResponse) SetByApp(val []ByAppItem) { - s.ByApp = val -} - // SetStats sets the value of Stats. func (s *GetHwidDevicesStatsResponseResponse) SetStats(val GetHwidDevicesStatsResponseResponseStats) { s.Stats = val } type GetHwidDevicesStatsResponseResponseByPlatformItem struct { - Platform string `json:"platform"` - Count float64 `json:"count"` + Platform string `json:"platform"` + Count float64 `json:"count"` + ByApp []ByAppItem `json:"byApp"` } // GetPlatform returns the value of Platform. @@ -5967,6 +6326,11 @@ func (s *GetHwidDevicesStatsResponseResponseByPlatformItem) GetCount() float64 { return s.Count } +// GetByApp returns the value of ByApp. +func (s *GetHwidDevicesStatsResponseResponseByPlatformItem) GetByApp() []ByAppItem { + return s.ByApp +} + // SetPlatform sets the value of Platform. func (s *GetHwidDevicesStatsResponseResponseByPlatformItem) SetPlatform(val string) { s.Platform = val @@ -5977,6 +6341,11 @@ func (s *GetHwidDevicesStatsResponseResponseByPlatformItem) SetCount(val float64 s.Count = val } +// SetByApp sets the value of ByApp. +func (s *GetHwidDevicesStatsResponseResponseByPlatformItem) SetByApp(val []ByAppItem) { + s.ByApp = val +} + type GetHwidDevicesStatsResponseResponseStats struct { TotalUniqueDevices float64 `json:"totalUniqueDevices"` TotalHwidDevices float64 `json:"totalHwidDevices"` @@ -6765,11 +7134,11 @@ func (s *GetRawSubscriptionByShortUuidResponseResponse) SetResolvedProxyConfigs( } type GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfo struct { - DaysLeft float64 `json:"daysLeft"` - TrafficLimit string `json:"trafficLimit"` - TrafficUsed string `json:"trafficUsed"` - LifetimeTrafficUsed string `json:"lifetimeTrafficUsed"` - IsHwidLimited bool `json:"isHwidLimited"` + DaysLeft float64 `json:"daysLeft"` + TrafficLimit string `json:"trafficLimit"` + TrafficUsed string `json:"trafficUsed"` + LifetimeTrafficUsed string `json:"lifetimeTrafficUsed"` + HwidCheckup NilGetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup `json:"hwidCheckup"` } // GetDaysLeft returns the value of DaysLeft. @@ -6792,9 +7161,9 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfo) GetLife return s.LifetimeTrafficUsed } -// GetIsHwidLimited returns the value of IsHwidLimited. -func (s *GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfo) GetIsHwidLimited() bool { - return s.IsHwidLimited +// GetHwidCheckup returns the value of HwidCheckup. +func (s *GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfo) GetHwidCheckup() NilGetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup { + return s.HwidCheckup } // SetDaysLeft sets the value of DaysLeft. @@ -6817,9 +7186,56 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfo) SetLife s.LifetimeTrafficUsed = val } -// SetIsHwidLimited sets the value of IsHwidLimited. -func (s *GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfo) SetIsHwidLimited(val bool) { - s.IsHwidLimited = val +// SetHwidCheckup sets the value of HwidCheckup. +func (s *GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfo) SetHwidCheckup(val NilGetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup) { + s.HwidCheckup = val +} + +type GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup struct { + SubscriptionAllowed bool `json:"subscriptionAllowed"` + MaxDeviceReached bool `json:"maxDeviceReached"` + HwidNotSupported bool `json:"hwidNotSupported"` + LimitBypassed bool `json:"limitBypassed"` +} + +// GetSubscriptionAllowed returns the value of SubscriptionAllowed. +func (s *GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup) GetSubscriptionAllowed() bool { + return s.SubscriptionAllowed +} + +// GetMaxDeviceReached returns the value of MaxDeviceReached. +func (s *GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup) GetMaxDeviceReached() bool { + return s.MaxDeviceReached +} + +// GetHwidNotSupported returns the value of HwidNotSupported. +func (s *GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup) GetHwidNotSupported() bool { + return s.HwidNotSupported +} + +// GetLimitBypassed returns the value of LimitBypassed. +func (s *GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup) GetLimitBypassed() bool { + return s.LimitBypassed +} + +// SetSubscriptionAllowed sets the value of SubscriptionAllowed. +func (s *GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup) SetSubscriptionAllowed(val bool) { + s.SubscriptionAllowed = val +} + +// SetMaxDeviceReached sets the value of MaxDeviceReached. +func (s *GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup) SetMaxDeviceReached(val bool) { + s.MaxDeviceReached = val +} + +// SetHwidNotSupported sets the value of HwidNotSupported. +func (s *GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup) SetHwidNotSupported(val bool) { + s.HwidNotSupported = val +} + +// SetLimitBypassed sets the value of LimitBypassed. +func (s *GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup) SetLimitBypassed(val bool) { + s.LimitBypassed = val } type GetRawSubscriptionByShortUuidResponseResponseHeaders map[string]string @@ -6980,10 +7396,11 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItem) } type GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverrides struct { - ShuffleHost bool `json:"shuffleHost"` - MihomoX25519 bool `json:"mihomoX25519"` - ServerDescription NilString `json:"serverDescription"` - XrayJsonTemplate jx.Raw `json:"xrayJsonTemplate"` + ShuffleHost bool `json:"shuffleHost"` + MihomoX25519 bool `json:"mihomoX25519"` + MihomoIpVersion NilGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion `json:"mihomoIpVersion"` + ServerDescription NilString `json:"serverDescription"` + XrayJsonTemplate jx.Raw `json:"xrayJsonTemplate"` } // GetShuffleHost returns the value of ShuffleHost. @@ -6996,6 +7413,11 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemCl return s.MihomoX25519 } +// GetMihomoIpVersion returns the value of MihomoIpVersion. +func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverrides) GetMihomoIpVersion() NilGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion { + return s.MihomoIpVersion +} + // GetServerDescription returns the value of ServerDescription. func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverrides) GetServerDescription() NilString { return s.ServerDescription @@ -7016,6 +7438,11 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemCl s.MihomoX25519 = val } +// SetMihomoIpVersion sets the value of MihomoIpVersion. +func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverrides) SetMihomoIpVersion(val NilGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion) { + s.MihomoIpVersion = val +} + // SetServerDescription sets the value of ServerDescription. func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverrides) SetServerDescription(val NilString) { s.ServerDescription = val @@ -7026,9 +7453,71 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemCl s.XrayJsonTemplate = val } +type GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion string + +const ( + GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionDual GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion = "dual" + GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionIpv4 GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion = "ipv4" + GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionIpv6 GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion = "ipv6" + GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionIpv4Prefer GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion = "ipv4-prefer" + GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionIpv6Prefer GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion = "ipv6-prefer" +) + +// AllValues returns all GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion values. +func (GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion) AllValues() []GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion { + return []GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion{ + GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionDual, + GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionIpv4, + GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionIpv6, + GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionIpv4Prefer, + GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionIpv6Prefer, + } +} + +// MarshalText implements encoding.TextMarshaler. +func (s GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion) MarshalText() ([]byte, error) { + switch s { + case GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionDual: + return []byte(s), nil + case GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionIpv4: + return []byte(s), nil + case GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionIpv6: + return []byte(s), nil + case GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionIpv4Prefer: + return []byte(s), nil + case GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionIpv6Prefer: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion) UnmarshalText(data []byte) error { + switch GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion(data) { + case GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionDual: + *s = GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionDual + return nil + case GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionIpv4: + *s = GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionIpv4 + return nil + case GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionIpv6: + *s = GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionIpv6 + return nil + case GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionIpv4Prefer: + *s = GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionIpv4Prefer + return nil + case GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionIpv6Prefer: + *s = GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersionIpv6Prefer + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + type GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemMetadata struct { UUID uuid.UUID `json:"uuid"` - Tag NilString `json:"tag"` + Tags []string `json:"tags"` ExcludeFromSubscriptionTypes []GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemMetadataExcludeFromSubscriptionTypesItem `json:"excludeFromSubscriptionTypes"` InboundTag string `json:"inboundTag"` ConfigProfileUuid NilUUID `json:"configProfileUuid"` @@ -7046,9 +7535,9 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemMe return s.UUID } -// GetTag returns the value of Tag. -func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemMetadata) GetTag() NilString { - return s.Tag +// GetTags returns the value of Tags. +func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemMetadata) GetTags() []string { + return s.Tags } // GetExcludeFromSubscriptionTypes returns the value of ExcludeFromSubscriptionTypes. @@ -7106,9 +7595,9 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemMe s.UUID = val } -// SetTag sets the value of Tag. -func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemMetadata) SetTag(val NilString) { - s.Tag = val +// SetTags sets the value of Tags. +func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemMetadata) SetTags(val []string) { + s.Tags = val } // SetExcludeFromSubscriptionTypes sets the value of ExcludeFromSubscriptionTypes. @@ -7685,7 +8174,8 @@ func NewGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSec } type GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSecurityOptions0 struct { - AllowInsecure bool `json:"allowInsecure"` + PinnedPeerCertSha256 NilString `json:"pinnedPeerCertSha256"` + VerifyPeerCertByName NilString `json:"verifyPeerCertByName"` Alpn NilString `json:"alpn"` EnableSessionResumption bool `json:"enableSessionResumption"` Fingerprint NilString `json:"fingerprint"` @@ -7694,9 +8184,14 @@ type GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSecuri EchForceQuery NilString `json:"echForceQuery"` } -// GetAllowInsecure returns the value of AllowInsecure. -func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSecurityOptions0) GetAllowInsecure() bool { - return s.AllowInsecure +// GetPinnedPeerCertSha256 returns the value of PinnedPeerCertSha256. +func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSecurityOptions0) GetPinnedPeerCertSha256() NilString { + return s.PinnedPeerCertSha256 +} + +// GetVerifyPeerCertByName returns the value of VerifyPeerCertByName. +func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSecurityOptions0) GetVerifyPeerCertByName() NilString { + return s.VerifyPeerCertByName } // GetAlpn returns the value of Alpn. @@ -7729,9 +8224,14 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSe return s.EchForceQuery } -// SetAllowInsecure sets the value of AllowInsecure. -func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSecurityOptions0) SetAllowInsecure(val bool) { - s.AllowInsecure = val +// SetPinnedPeerCertSha256 sets the value of PinnedPeerCertSha256. +func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSecurityOptions0) SetPinnedPeerCertSha256(val NilString) { + s.PinnedPeerCertSha256 = val +} + +// SetVerifyPeerCertByName sets the value of VerifyPeerCertByName. +func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemSecurityOptions0) SetVerifyPeerCertByName(val NilString) { + s.VerifyPeerCertByName = val } // SetAlpn sets the value of Alpn. @@ -8714,7 +9214,7 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemTr type GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemTransportOptions5 struct { ClientMtu int `json:"clientMtu"` - Tti int `json:"tti"` + ClientTti int `json:"clientTti"` Congestion bool `json:"congestion"` } @@ -8723,9 +9223,9 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemTr return s.ClientMtu } -// GetTti returns the value of Tti. -func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemTransportOptions5) GetTti() int { - return s.Tti +// GetClientTti returns the value of ClientTti. +func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemTransportOptions5) GetClientTti() int { + return s.ClientTti } // GetCongestion returns the value of Congestion. @@ -8738,9 +9238,9 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemTr s.ClientMtu = val } -// SetTti sets the value of Tti. -func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemTransportOptions5) SetTti(val int) { - s.Tti = val +// SetClientTti sets the value of ClientTti. +func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemTransportOptions5) SetClientTti(val int) { + s.ClientTti = val } // SetCongestion sets the value of Congestion. @@ -9108,93 +9608,19 @@ func (s *GetRemnawaveHealthResponseResponseRuntimeMetricsItem) SetInstanceType(v s.InstanceType = val } -// Ref: #/components/schemas/GetStatsNodeUsersUsageResponse -type GetStatsNodeUsersUsageResponse struct { - Response GetStatsNodeUsersUsageResponseResponse `json:"response"` +// Ref: #/components/schemas/GetStatsNodesUsersUsageRequest +type GetStatsNodesUsersUsageRequest struct { + NodesUuids []uuid.UUID `json:"nodesUuids"` } -// GetResponse returns the value of Response. -func (s *GetStatsNodeUsersUsageResponse) GetResponse() GetStatsNodeUsersUsageResponseResponse { - return s.Response +// GetNodesUuids returns the value of NodesUuids. +func (s *GetStatsNodesUsersUsageRequest) GetNodesUuids() []uuid.UUID { + return s.NodesUuids } -// SetResponse sets the value of Response. -func (s *GetStatsNodeUsersUsageResponse) SetResponse(val GetStatsNodeUsersUsageResponseResponse) { - s.Response = val -} - -func (*GetStatsNodeUsersUsageResponse) bandwidthStatsNodesGetStatsNodeUsersUsageRes() {} - -type GetStatsNodeUsersUsageResponseResponse struct { - Categories []string `json:"categories"` - SparklineData []float64 `json:"sparklineData"` - TopUsers []GetStatsNodeUsersUsageResponseResponseTopUsersItem `json:"topUsers"` -} - -// GetCategories returns the value of Categories. -func (s *GetStatsNodeUsersUsageResponseResponse) GetCategories() []string { - return s.Categories -} - -// GetSparklineData returns the value of SparklineData. -func (s *GetStatsNodeUsersUsageResponseResponse) GetSparklineData() []float64 { - return s.SparklineData -} - -// GetTopUsers returns the value of TopUsers. -func (s *GetStatsNodeUsersUsageResponseResponse) GetTopUsers() []GetStatsNodeUsersUsageResponseResponseTopUsersItem { - return s.TopUsers -} - -// SetCategories sets the value of Categories. -func (s *GetStatsNodeUsersUsageResponseResponse) SetCategories(val []string) { - s.Categories = val -} - -// SetSparklineData sets the value of SparklineData. -func (s *GetStatsNodeUsersUsageResponseResponse) SetSparklineData(val []float64) { - s.SparklineData = val -} - -// SetTopUsers sets the value of TopUsers. -func (s *GetStatsNodeUsersUsageResponseResponse) SetTopUsers(val []GetStatsNodeUsersUsageResponseResponseTopUsersItem) { - s.TopUsers = val -} - -type GetStatsNodeUsersUsageResponseResponseTopUsersItem struct { - Color string `json:"color"` - Username string `json:"username"` - Total float64 `json:"total"` -} - -// GetColor returns the value of Color. -func (s *GetStatsNodeUsersUsageResponseResponseTopUsersItem) GetColor() string { - return s.Color -} - -// GetUsername returns the value of Username. -func (s *GetStatsNodeUsersUsageResponseResponseTopUsersItem) GetUsername() string { - return s.Username -} - -// GetTotal returns the value of Total. -func (s *GetStatsNodeUsersUsageResponseResponseTopUsersItem) GetTotal() float64 { - return s.Total -} - -// SetColor sets the value of Color. -func (s *GetStatsNodeUsersUsageResponseResponseTopUsersItem) SetColor(val string) { - s.Color = val -} - -// SetUsername sets the value of Username. -func (s *GetStatsNodeUsersUsageResponseResponseTopUsersItem) SetUsername(val string) { - s.Username = val -} - -// SetTotal sets the value of Total. -func (s *GetStatsNodeUsersUsageResponseResponseTopUsersItem) SetTotal(val float64) { - s.Total = val +// SetNodesUuids sets the value of NodesUuids. +func (s *GetStatsNodesUsersUsageRequest) SetNodesUuids(val []uuid.UUID) { + s.NodesUuids = val } // Ref: #/components/schemas/GetStatsResponse @@ -10172,6 +10598,61 @@ func (s *GetUserSubscriptionRequestHistoryResponse) SetResponse(val UserSubscrip func (*GetUserSubscriptionRequestHistoryResponse) usersGetUserSubscriptionRequestHistoryRes() {} +// Ref: #/components/schemas/GetUsersStreamResponse +type GetUsersStreamResponse struct { + Response GetUsersStreamResponseResponse `json:"response"` +} + +// GetResponse returns the value of Response. +func (s *GetUsersStreamResponse) GetResponse() GetUsersStreamResponseResponse { + return s.Response +} + +// SetResponse sets the value of Response. +func (s *GetUsersStreamResponse) SetResponse(val GetUsersStreamResponseResponse) { + s.Response = val +} + +func (*GetUsersStreamResponse) usersGetUsersStreamRes() {} + +type GetUsersStreamResponseResponse struct { + Users []UserItemInfo `json:"users"` + // Cursor to fetch the next page, or null if there are no more results. + NextCursor NilString `json:"nextCursor"` + // Whether there are more results to fetch. + HasMore bool `json:"hasMore"` +} + +// GetUsers returns the value of Users. +func (s *GetUsersStreamResponseResponse) GetUsers() []UserItemInfo { + return s.Users +} + +// GetNextCursor returns the value of NextCursor. +func (s *GetUsersStreamResponseResponse) GetNextCursor() NilString { + return s.NextCursor +} + +// GetHasMore returns the value of HasMore. +func (s *GetUsersStreamResponseResponse) GetHasMore() bool { + return s.HasMore +} + +// SetUsers sets the value of Users. +func (s *GetUsersStreamResponseResponse) SetUsers(val []UserItemInfo) { + s.Users = val +} + +// SetNextCursor sets the value of NextCursor. +func (s *GetUsersStreamResponseResponse) SetNextCursor(val NilString) { + s.NextCursor = val +} + +// SetHasMore sets the value of HasMore. +func (s *GetUsersStreamResponseResponse) SetHasMore(val bool) { + s.HasMore = val +} + // Ref: #/components/schemas/Github type Github struct { Enabled bool `json:"enabled"` @@ -10260,24 +10741,26 @@ type HostItem struct { Path NilString `json:"path"` Sni NilString `json:"sni"` Host NilString `json:"host"` - Alpn NilString `json:"alpn"` + Alpn NilHostItemAlpn `json:"alpn"` Fingerprint NilString `json:"fingerprint"` - IsDisabled OptBool `json:"isDisabled"` + IsDisabled bool `json:"isDisabled"` SecurityLayer OptHostItemSecurityLayer `json:"securityLayer"` - XHttpExtraParams jx.Raw `json:"xHttpExtraParams"` + XhttpExtraParams jx.Raw `json:"xhttpExtraParams"` MuxParams jx.Raw `json:"muxParams"` SockoptParams jx.Raw `json:"sockoptParams"` FinalMask jx.Raw `json:"finalMask"` Inbound InboundItem `json:"inbound"` ServerDescription NilString `json:"serverDescription"` - Tag NilString `json:"tag"` + Tags []string `json:"tags"` IsHidden OptBool `json:"isHidden"` OverrideSniFromAddress OptBool `json:"overrideSniFromAddress"` KeepSniBlank OptBool `json:"keepSniBlank"` VlessRouteId NilInt `json:"vlessRouteId"` - AllowInsecure OptBool `json:"allowInsecure"` + PinnedPeerCertSha256 NilString `json:"pinnedPeerCertSha256"` + VerifyPeerCertByName NilString `json:"verifyPeerCertByName"` ShuffleHost bool `json:"shuffleHost"` MihomoX25519 bool `json:"mihomoX25519"` + MihomoIpVersion NilHostItemMihomoIpVersion `json:"mihomoIpVersion"` Nodes []uuid.UUID `json:"nodes"` XrayJsonTemplateUuid NilUUID `json:"xrayJsonTemplateUuid"` ExcludedInternalSquads []uuid.UUID `json:"excludedInternalSquads"` @@ -10325,7 +10808,7 @@ func (s *HostItem) GetHost() NilString { } // GetAlpn returns the value of Alpn. -func (s *HostItem) GetAlpn() NilString { +func (s *HostItem) GetAlpn() NilHostItemAlpn { return s.Alpn } @@ -10335,7 +10818,7 @@ func (s *HostItem) GetFingerprint() NilString { } // GetIsDisabled returns the value of IsDisabled. -func (s *HostItem) GetIsDisabled() OptBool { +func (s *HostItem) GetIsDisabled() bool { return s.IsDisabled } @@ -10344,9 +10827,9 @@ func (s *HostItem) GetSecurityLayer() OptHostItemSecurityLayer { return s.SecurityLayer } -// GetXHttpExtraParams returns the value of XHttpExtraParams. -func (s *HostItem) GetXHttpExtraParams() jx.Raw { - return s.XHttpExtraParams +// GetXhttpExtraParams returns the value of XhttpExtraParams. +func (s *HostItem) GetXhttpExtraParams() jx.Raw { + return s.XhttpExtraParams } // GetMuxParams returns the value of MuxParams. @@ -10374,9 +10857,9 @@ func (s *HostItem) GetServerDescription() NilString { return s.ServerDescription } -// GetTag returns the value of Tag. -func (s *HostItem) GetTag() NilString { - return s.Tag +// GetTags returns the value of Tags. +func (s *HostItem) GetTags() []string { + return s.Tags } // GetIsHidden returns the value of IsHidden. @@ -10399,9 +10882,14 @@ func (s *HostItem) GetVlessRouteId() NilInt { return s.VlessRouteId } -// GetAllowInsecure returns the value of AllowInsecure. -func (s *HostItem) GetAllowInsecure() OptBool { - return s.AllowInsecure +// GetPinnedPeerCertSha256 returns the value of PinnedPeerCertSha256. +func (s *HostItem) GetPinnedPeerCertSha256() NilString { + return s.PinnedPeerCertSha256 +} + +// GetVerifyPeerCertByName returns the value of VerifyPeerCertByName. +func (s *HostItem) GetVerifyPeerCertByName() NilString { + return s.VerifyPeerCertByName } // GetShuffleHost returns the value of ShuffleHost. @@ -10414,6 +10902,11 @@ func (s *HostItem) GetMihomoX25519() bool { return s.MihomoX25519 } +// GetMihomoIpVersion returns the value of MihomoIpVersion. +func (s *HostItem) GetMihomoIpVersion() NilHostItemMihomoIpVersion { + return s.MihomoIpVersion +} + // GetNodes returns the value of Nodes. func (s *HostItem) GetNodes() []uuid.UUID { return s.Nodes @@ -10475,7 +10968,7 @@ func (s *HostItem) SetHost(val NilString) { } // SetAlpn sets the value of Alpn. -func (s *HostItem) SetAlpn(val NilString) { +func (s *HostItem) SetAlpn(val NilHostItemAlpn) { s.Alpn = val } @@ -10485,7 +10978,7 @@ func (s *HostItem) SetFingerprint(val NilString) { } // SetIsDisabled sets the value of IsDisabled. -func (s *HostItem) SetIsDisabled(val OptBool) { +func (s *HostItem) SetIsDisabled(val bool) { s.IsDisabled = val } @@ -10494,9 +10987,9 @@ func (s *HostItem) SetSecurityLayer(val OptHostItemSecurityLayer) { s.SecurityLayer = val } -// SetXHttpExtraParams sets the value of XHttpExtraParams. -func (s *HostItem) SetXHttpExtraParams(val jx.Raw) { - s.XHttpExtraParams = val +// SetXhttpExtraParams sets the value of XhttpExtraParams. +func (s *HostItem) SetXhttpExtraParams(val jx.Raw) { + s.XhttpExtraParams = val } // SetMuxParams sets the value of MuxParams. @@ -10524,9 +11017,9 @@ func (s *HostItem) SetServerDescription(val NilString) { s.ServerDescription = val } -// SetTag sets the value of Tag. -func (s *HostItem) SetTag(val NilString) { - s.Tag = val +// SetTags sets the value of Tags. +func (s *HostItem) SetTags(val []string) { + s.Tags = val } // SetIsHidden sets the value of IsHidden. @@ -10549,9 +11042,14 @@ func (s *HostItem) SetVlessRouteId(val NilInt) { s.VlessRouteId = val } -// SetAllowInsecure sets the value of AllowInsecure. -func (s *HostItem) SetAllowInsecure(val OptBool) { - s.AllowInsecure = val +// SetPinnedPeerCertSha256 sets the value of PinnedPeerCertSha256. +func (s *HostItem) SetPinnedPeerCertSha256(val NilString) { + s.PinnedPeerCertSha256 = val +} + +// SetVerifyPeerCertByName sets the value of VerifyPeerCertByName. +func (s *HostItem) SetVerifyPeerCertByName(val NilString) { + s.VerifyPeerCertByName = val } // SetShuffleHost sets the value of ShuffleHost. @@ -10564,6 +11062,11 @@ func (s *HostItem) SetMihomoX25519(val bool) { s.MihomoX25519 = val } +// SetMihomoIpVersion sets the value of MihomoIpVersion. +func (s *HostItem) SetMihomoIpVersion(val NilHostItemMihomoIpVersion) { + s.MihomoIpVersion = val +} + // SetNodes sets the value of Nodes. func (s *HostItem) SetNodes(val []uuid.UUID) { s.Nodes = val @@ -10584,6 +11087,75 @@ func (s *HostItem) SetExcludeFromSubscriptionTypes(val []HostItemExcludeFromSubs s.ExcludeFromSubscriptionTypes = val } +type HostItemAlpn string + +const ( + HostItemAlpnH3 HostItemAlpn = "h3" + HostItemAlpnH2 HostItemAlpn = "h2" + HostItemAlpnHTTP11 HostItemAlpn = "http/1.1" + HostItemAlpnH2HTTP11 HostItemAlpn = "h2,http/1.1" + HostItemAlpnH3H2HTTP11 HostItemAlpn = "h3,h2,http/1.1" + HostItemAlpnH3H2 HostItemAlpn = "h3,h2" +) + +// AllValues returns all HostItemAlpn values. +func (HostItemAlpn) AllValues() []HostItemAlpn { + return []HostItemAlpn{ + HostItemAlpnH3, + HostItemAlpnH2, + HostItemAlpnHTTP11, + HostItemAlpnH2HTTP11, + HostItemAlpnH3H2HTTP11, + HostItemAlpnH3H2, + } +} + +// MarshalText implements encoding.TextMarshaler. +func (s HostItemAlpn) MarshalText() ([]byte, error) { + switch s { + case HostItemAlpnH3: + return []byte(s), nil + case HostItemAlpnH2: + return []byte(s), nil + case HostItemAlpnHTTP11: + return []byte(s), nil + case HostItemAlpnH2HTTP11: + return []byte(s), nil + case HostItemAlpnH3H2HTTP11: + return []byte(s), nil + case HostItemAlpnH3H2: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *HostItemAlpn) UnmarshalText(data []byte) error { + switch HostItemAlpn(data) { + case HostItemAlpnH3: + *s = HostItemAlpnH3 + return nil + case HostItemAlpnH2: + *s = HostItemAlpnH2 + return nil + case HostItemAlpnHTTP11: + *s = HostItemAlpnHTTP11 + return nil + case HostItemAlpnH2HTTP11: + *s = HostItemAlpnH2HTTP11 + return nil + case HostItemAlpnH3H2HTTP11: + *s = HostItemAlpnH3H2HTTP11 + return nil + case HostItemAlpnH3H2: + *s = HostItemAlpnH3H2 + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + type HostItemExcludeFromSubscriptionTypesItem string const ( @@ -10653,6 +11225,68 @@ func (s *HostItemExcludeFromSubscriptionTypesItem) UnmarshalText(data []byte) er } } +type HostItemMihomoIpVersion string + +const ( + HostItemMihomoIpVersionDual HostItemMihomoIpVersion = "dual" + HostItemMihomoIpVersionIpv4 HostItemMihomoIpVersion = "ipv4" + HostItemMihomoIpVersionIpv6 HostItemMihomoIpVersion = "ipv6" + HostItemMihomoIpVersionIpv4Prefer HostItemMihomoIpVersion = "ipv4-prefer" + HostItemMihomoIpVersionIpv6Prefer HostItemMihomoIpVersion = "ipv6-prefer" +) + +// AllValues returns all HostItemMihomoIpVersion values. +func (HostItemMihomoIpVersion) AllValues() []HostItemMihomoIpVersion { + return []HostItemMihomoIpVersion{ + HostItemMihomoIpVersionDual, + HostItemMihomoIpVersionIpv4, + HostItemMihomoIpVersionIpv6, + HostItemMihomoIpVersionIpv4Prefer, + HostItemMihomoIpVersionIpv6Prefer, + } +} + +// MarshalText implements encoding.TextMarshaler. +func (s HostItemMihomoIpVersion) MarshalText() ([]byte, error) { + switch s { + case HostItemMihomoIpVersionDual: + return []byte(s), nil + case HostItemMihomoIpVersionIpv4: + return []byte(s), nil + case HostItemMihomoIpVersionIpv6: + return []byte(s), nil + case HostItemMihomoIpVersionIpv4Prefer: + return []byte(s), nil + case HostItemMihomoIpVersionIpv6Prefer: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *HostItemMihomoIpVersion) UnmarshalText(data []byte) error { + switch HostItemMihomoIpVersion(data) { + case HostItemMihomoIpVersionDual: + *s = HostItemMihomoIpVersionDual + return nil + case HostItemMihomoIpVersionIpv4: + *s = HostItemMihomoIpVersionIpv4 + return nil + case HostItemMihomoIpVersionIpv6: + *s = HostItemMihomoIpVersionIpv6 + return nil + case HostItemMihomoIpVersionIpv4Prefer: + *s = HostItemMihomoIpVersionIpv4Prefer + return nil + case HostItemMihomoIpVersionIpv6Prefer: + *s = HostItemMihomoIpVersionIpv6Prefer + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + type HostItemSecurityLayer string const ( @@ -10716,12 +11350,11 @@ func (s *HostListResponse) SetResponse(val []HostItem) { s.Response = val } -func (*HostListResponse) hostsBulkActionsDeleteHostsRes() {} -func (*HostListResponse) hostsBulkActionsDisableHostsRes() {} -func (*HostListResponse) hostsBulkActionsEnableHostsRes() {} -func (*HostListResponse) hostsBulkActionsSetInboundToHostsRes() {} -func (*HostListResponse) hostsBulkActionsSetPortToHostsRes() {} -func (*HostListResponse) hostsGetAllHostsRes() {} +func (*HostListResponse) hostsBulkActionsDeleteHostsRes() {} +func (*HostListResponse) hostsBulkActionsDisableHostsRes() {} +func (*HostListResponse) hostsBulkActionsEnableHostsRes() {} +func (*HostListResponse) hostsBulkActionsSetPortToHostsRes() {} +func (*HostListResponse) hostsGetAllHostsRes() {} // Ref: #/components/schemas/HostOverride type HostOverride struct { @@ -11170,6 +11803,32 @@ func (*InfraProviderResponseResponse) infraBillingCreateInfraProviderRes() {} func (*InfraProviderResponseResponse) infraBillingGetInfraProviderByUuidRes() {} func (*InfraProviderResponseResponse) infraBillingUpdateInfraProviderRes() {} +// Ref: #/components/schemas/InfraProvidersDetail +type InfraProvidersDetail struct { + NodeUuid uuid.UUID `json:"nodeUuid"` + CountryCode string `json:"countryCode"` +} + +// GetNodeUuid returns the value of NodeUuid. +func (s *InfraProvidersDetail) GetNodeUuid() uuid.UUID { + return s.NodeUuid +} + +// GetCountryCode returns the value of CountryCode. +func (s *InfraProvidersDetail) GetCountryCode() string { + return s.CountryCode +} + +// SetNodeUuid sets the value of NodeUuid. +func (s *InfraProvidersDetail) SetNodeUuid(val uuid.UUID) { + s.NodeUuid = val +} + +// SetCountryCode sets the value of CountryCode. +func (s *InfraProvidersDetail) SetCountryCode(val string) { + s.CountryCode = val +} + // Ref: #/components/schemas/InterfaceItem type InterfaceItem struct { Interface string `json:"interface"` @@ -11280,6 +11939,7 @@ func (s *InternalServerError) SetErrorCode(val OptString) { func (*InternalServerError) apiTokensCreateRes() {} func (*InternalServerError) apiTokensDeleteRes() {} func (*InternalServerError) apiTokensFindAllRes() {} +func (*InternalServerError) apiTokensGetScopesRes() {} func (*InternalServerError) authGetStatusRes() {} func (*InternalServerError) authLoginRes() {} func (*InternalServerError) authOauth2AuthorizeRes() {} @@ -11289,6 +11949,7 @@ func (*InternalServerError) authPasskeyAuthenticationVerifyRes() func (*InternalServerError) authRegisterRes() {} func (*InternalServerError) bandwidthStatsNodesGetNodeUserUsageRes() {} func (*InternalServerError) bandwidthStatsNodesGetStatsNodeUsersUsageRes() {} +func (*InternalServerError) bandwidthStatsNodesGetStatsNodesUsersUsageRes() {} func (*InternalServerError) bandwidthStatsUsersGetStatsNodesUsageRes() {} func (*InternalServerError) bandwidthStatsUsersGetUserUsageByRangeRes() {} func (*InternalServerError) configProfileCreateConfigProfileRes() {} @@ -11311,7 +11972,6 @@ func (*InternalServerError) externalSquadUpdateExternalSquadRes() func (*InternalServerError) hostsBulkActionsDeleteHostsRes() {} func (*InternalServerError) hostsBulkActionsDisableHostsRes() {} func (*InternalServerError) hostsBulkActionsEnableHostsRes() {} -func (*InternalServerError) hostsBulkActionsSetInboundToHostsRes() {} func (*InternalServerError) hostsBulkActionsSetPortToHostsRes() {} func (*InternalServerError) hostsCreateHostRes() {} func (*InternalServerError) hostsDeleteHostRes() {} @@ -11417,7 +12077,6 @@ func (*InternalServerError) subscriptionsGetSubscriptionByShortUuidProtectedRes( func (*InternalServerError) subscriptionsGetSubscriptionByUsernameRes() {} func (*InternalServerError) subscriptionsGetSubscriptionByUuidRes() {} func (*InternalServerError) systemDebugSrrMatcherRes() {} -func (*InternalServerError) systemEncryptHappCryptoLinkRes() {} func (*InternalServerError) systemGetBandwidthStatsRes() {} func (*InternalServerError) systemGetMetadataRes() {} func (*InternalServerError) systemGetNodesMetricsRes() {} @@ -11456,6 +12115,7 @@ func (*InternalServerError) usersGetUserByUuidRes() func (*InternalServerError) usersGetUserSubscriptionRequestHistoryRes() {} func (*InternalServerError) usersGetUsersByEmailRes() {} func (*InternalServerError) usersGetUsersByTagRes() {} +func (*InternalServerError) usersGetUsersStreamRes() {} func (*InternalServerError) usersResetUserTrafficRes() {} func (*InternalServerError) usersResolveUserRes() {} func (*InternalServerError) usersRevokeUserSubscriptionRes() {} @@ -12120,6 +12780,100 @@ func (o NilFloat64) Or(d float64) float64 { return d } +// NewNilGetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup returns new NilGetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup with value set to v. +func NewNilGetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup(v GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup) NilGetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup { + return NilGetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup{ + Value: v, + } +} + +// NilGetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup is nullable GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup. +type NilGetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup struct { + Value GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup + Null bool +} + +// SetTo sets value to v. +func (o *NilGetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup) SetTo(v GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup) { + o.Null = false + o.Value = v +} + +// IsNull returns true if value is Null. +func (o NilGetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup) IsNull() bool { + return o.Null +} + +// SetToNull sets value to null. +func (o *NilGetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup) SetToNull() { + o.Null = true + var v GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o NilGetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup) Get() (v GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup, ok bool) { + if o.Null { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o NilGetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup) Or(d GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup) GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewNilGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion returns new NilGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion with value set to v. +func NewNilGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion(v GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion) NilGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion { + return NilGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion{ + Value: v, + } +} + +// NilGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion is nullable GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion. +type NilGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion struct { + Value GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion + Null bool +} + +// SetTo sets value to v. +func (o *NilGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion) SetTo(v GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion) { + o.Null = false + o.Value = v +} + +// IsNull returns true if value is Null. +func (o NilGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion) IsNull() bool { + return o.Null +} + +// SetToNull sets value to null. +func (o *NilGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion) SetToNull() { + o.Null = true + var v GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o NilGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion) Get() (v GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion, ok bool) { + if o.Null { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o NilGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion) Or(d GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion) GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion { + if v, ok := o.Get(); ok { + return v + } + return d +} + // NewNilGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemTransportOptions0Header returns new NilGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemTransportOptions0Header with value set to v. func NewNilGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemTransportOptions0Header(v GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemTransportOptions0Header) NilGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemTransportOptions0Header { return NilGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemTransportOptions0Header{ @@ -12353,6 +13107,96 @@ func (o NilGetStatusResponseResponseAuthentication) Or(d GetStatusResponseRespon return d } +// NewNilHostItemAlpn returns new NilHostItemAlpn with value set to v. +func NewNilHostItemAlpn(v HostItemAlpn) NilHostItemAlpn { + return NilHostItemAlpn{ + Value: v, + } +} + +// NilHostItemAlpn is nullable HostItemAlpn. +type NilHostItemAlpn struct { + Value HostItemAlpn + Null bool +} + +// SetTo sets value to v. +func (o *NilHostItemAlpn) SetTo(v HostItemAlpn) { + o.Null = false + o.Value = v +} + +// IsNull returns true if value is Null. +func (o NilHostItemAlpn) IsNull() bool { return o.Null } + +// SetToNull sets value to null. +func (o *NilHostItemAlpn) SetToNull() { + o.Null = true + var v HostItemAlpn + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o NilHostItemAlpn) Get() (v HostItemAlpn, ok bool) { + if o.Null { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o NilHostItemAlpn) Or(d HostItemAlpn) HostItemAlpn { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewNilHostItemMihomoIpVersion returns new NilHostItemMihomoIpVersion with value set to v. +func NewNilHostItemMihomoIpVersion(v HostItemMihomoIpVersion) NilHostItemMihomoIpVersion { + return NilHostItemMihomoIpVersion{ + Value: v, + } +} + +// NilHostItemMihomoIpVersion is nullable HostItemMihomoIpVersion. +type NilHostItemMihomoIpVersion struct { + Value HostItemMihomoIpVersion + Null bool +} + +// SetTo sets value to v. +func (o *NilHostItemMihomoIpVersion) SetTo(v HostItemMihomoIpVersion) { + o.Null = false + o.Value = v +} + +// IsNull returns true if value is Null. +func (o NilHostItemMihomoIpVersion) IsNull() bool { return o.Null } + +// SetToNull sets value to null. +func (o *NilHostItemMihomoIpVersion) SetToNull() { + o.Null = true + var v HostItemMihomoIpVersion + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o NilHostItemMihomoIpVersion) Get() (v HostItemMihomoIpVersion, ok bool) { + if o.Null { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o NilHostItemMihomoIpVersion) Or(d HostItemMihomoIpVersion) HostItemMihomoIpVersion { + if v, ok := o.Get(); ok { + return v + } + return d +} + // NewNilHostOverride returns new NilHostOverride with value set to v. func NewNilHostOverride(v HostOverride) NilHostOverride { return NilHostOverride{ @@ -12443,6 +13287,51 @@ func (o NilHwidSettings) Or(d HwidSettings) HwidSettings { return d } +// NewNilInfraProvidersDetail returns new NilInfraProvidersDetail with value set to v. +func NewNilInfraProvidersDetail(v InfraProvidersDetail) NilInfraProvidersDetail { + return NilInfraProvidersDetail{ + Value: v, + } +} + +// NilInfraProvidersDetail is nullable InfraProvidersDetail. +type NilInfraProvidersDetail struct { + Value InfraProvidersDetail + Null bool +} + +// SetTo sets value to v. +func (o *NilInfraProvidersDetail) SetTo(v InfraProvidersDetail) { + o.Null = false + o.Value = v +} + +// IsNull returns true if value is Null. +func (o NilInfraProvidersDetail) IsNull() bool { return o.Null } + +// SetToNull sets value to null. +func (o *NilInfraProvidersDetail) SetToNull() { + o.Null = true + var v InfraProvidersDetail + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o NilInfraProvidersDetail) Get() (v InfraProvidersDetail, ok bool) { + if o.Null { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o NilInfraProvidersDetail) Or(d InfraProvidersDetail) InfraProvidersDetail { + if v, ok := o.Get(); ok { + return v + } + return d +} + // NewNilInt returns new NilInt with value set to v. func NewNilInt(v int) NilInt { return NilInt{ @@ -13222,6 +14111,21 @@ func (s *NodePluginsResponseResponseResponse) SetNodePlugins(val []NodePlugin) { s.NodePlugins = val } +// Ref: #/components/schemas/NodeRequestBodyRequest +type NodeRequestBodyRequest struct { + ForceRestart bool `json:"forceRestart"` +} + +// GetForceRestart returns the value of ForceRestart. +func (s *NodeRequestBodyRequest) GetForceRestart() bool { + return s.ForceRestart +} + +// SetForceRestart sets the value of ForceRestart. +func (s *NodeRequestBodyRequest) SetForceRestart(val bool) { + s.ForceRestart = val +} + // Ref: #/components/schemas/NodeResponse type NodeResponse struct { Response NodeResponseDataItem `json:"response"` @@ -13245,34 +14149,37 @@ func (*NodeResponse) nodesUpdateNodeRes() {} // Ref: #/components/schemas/NodeResponseDataItem type NodeResponseDataItem struct { - UUID uuid.UUID `json:"uuid"` - Name string `json:"name"` - Address string `json:"address"` - Port NilInt `json:"port"` - IsConnected bool `json:"isConnected"` - IsDisabled bool `json:"isDisabled"` - IsConnecting bool `json:"isConnecting"` - LastStatusChange NilDateTime `json:"lastStatusChange"` - LastStatusMessage NilString `json:"lastStatusMessage"` - IsTrafficTrackingActive bool `json:"isTrafficTrackingActive"` - TrafficResetDay NilInt `json:"trafficResetDay"` - TrafficLimitBytes NilFloat64 `json:"trafficLimitBytes"` - TrafficUsedBytes NilFloat64 `json:"trafficUsedBytes"` - NotifyPercent NilInt `json:"notifyPercent"` - ViewPosition int `json:"viewPosition"` - CountryCode string `json:"countryCode"` - ConsumptionMultiplier float64 `json:"consumptionMultiplier"` - Tags []string `json:"tags"` - CreatedAt time.Time `json:"createdAt"` - UpdatedAt time.Time `json:"updatedAt"` - ConfigProfile ConfigProfileItem `json:"configProfile"` - ProviderUuid NilUUID `json:"providerUuid"` - Provider NilProviderItem `json:"provider"` - ActivePluginUuid NilUUID `json:"activePluginUuid"` - System NilSystemItem `json:"system"` - Versions NilVersion `json:"versions"` - XrayUptime float64 `json:"xrayUptime"` - UsersOnline float64 `json:"usersOnline"` + UUID uuid.UUID `json:"uuid"` + Name string `json:"name"` + Address string `json:"address"` + Port NilInt `json:"port"` + ProxyUrl NilString `json:"proxyUrl"` + IsConnected bool `json:"isConnected"` + IsDisabled bool `json:"isDisabled"` + IsConnecting bool `json:"isConnecting"` + LastStatusChange NilDateTime `json:"lastStatusChange"` + LastStatusMessage NilString `json:"lastStatusMessage"` + IsTrafficTrackingActive bool `json:"isTrafficTrackingActive"` + TrafficResetDay NilInt `json:"trafficResetDay"` + TrafficLimitBytes NilFloat64 `json:"trafficLimitBytes"` + TrafficUsedBytes NilFloat64 `json:"trafficUsedBytes"` + NotifyPercent NilInt `json:"notifyPercent"` + ViewPosition int `json:"viewPosition"` + CountryCode string `json:"countryCode"` + ConsumptionMultiplier float64 `json:"consumptionMultiplier"` + NodeConsumptionMultiplier float64 `json:"nodeConsumptionMultiplier"` + Tags []string `json:"tags"` + CreatedAt time.Time `json:"createdAt"` + UpdatedAt time.Time `json:"updatedAt"` + ConfigProfile ConfigProfileItem `json:"configProfile"` + ProviderUuid NilUUID `json:"providerUuid"` + Provider NilProviderItem `json:"provider"` + ActivePluginUuid NilUUID `json:"activePluginUuid"` + System NilSystemItem `json:"system"` + Versions NilVersion `json:"versions"` + XrayUptime float64 `json:"xrayUptime"` + UsersOnline float64 `json:"usersOnline"` + Note NilString `json:"note"` } // GetUUID returns the value of UUID. @@ -13295,6 +14202,11 @@ func (s *NodeResponseDataItem) GetPort() NilInt { return s.Port } +// GetProxyUrl returns the value of ProxyUrl. +func (s *NodeResponseDataItem) GetProxyUrl() NilString { + return s.ProxyUrl +} + // GetIsConnected returns the value of IsConnected. func (s *NodeResponseDataItem) GetIsConnected() bool { return s.IsConnected @@ -13360,6 +14272,11 @@ func (s *NodeResponseDataItem) GetConsumptionMultiplier() float64 { return s.ConsumptionMultiplier } +// GetNodeConsumptionMultiplier returns the value of NodeConsumptionMultiplier. +func (s *NodeResponseDataItem) GetNodeConsumptionMultiplier() float64 { + return s.NodeConsumptionMultiplier +} + // GetTags returns the value of Tags. func (s *NodeResponseDataItem) GetTags() []string { return s.Tags @@ -13415,6 +14332,11 @@ func (s *NodeResponseDataItem) GetUsersOnline() float64 { return s.UsersOnline } +// GetNote returns the value of Note. +func (s *NodeResponseDataItem) GetNote() NilString { + return s.Note +} + // SetUUID sets the value of UUID. func (s *NodeResponseDataItem) SetUUID(val uuid.UUID) { s.UUID = val @@ -13435,6 +14357,11 @@ func (s *NodeResponseDataItem) SetPort(val NilInt) { s.Port = val } +// SetProxyUrl sets the value of ProxyUrl. +func (s *NodeResponseDataItem) SetProxyUrl(val NilString) { + s.ProxyUrl = val +} + // SetIsConnected sets the value of IsConnected. func (s *NodeResponseDataItem) SetIsConnected(val bool) { s.IsConnected = val @@ -13500,6 +14427,11 @@ func (s *NodeResponseDataItem) SetConsumptionMultiplier(val float64) { s.ConsumptionMultiplier = val } +// SetNodeConsumptionMultiplier sets the value of NodeConsumptionMultiplier. +func (s *NodeResponseDataItem) SetNodeConsumptionMultiplier(val float64) { + s.NodeConsumptionMultiplier = val +} + // SetTags sets the value of Tags. func (s *NodeResponseDataItem) SetTags(val []string) { s.Tags = val @@ -13555,6 +14487,11 @@ func (s *NodeResponseDataItem) SetUsersOnline(val float64) { s.UsersOnline = val } +// SetNote sets the value of Note. +func (s *NodeResponseDataItem) SetNote(val NilString) { + s.Note = val +} + // Ref: #/components/schemas/NodeResponseInfoItem type NodeResponseInfoItem struct { Arch string `json:"arch"` @@ -14630,6 +15567,52 @@ func (o OptDebugSrrMatcherSettings) Or(d DebugSrrMatcherSettings) DebugSrrMatche return d } +// NewOptEncryptionItem returns new OptEncryptionItem with value set to v. +func NewOptEncryptionItem(v EncryptionItem) OptEncryptionItem { + return OptEncryptionItem{ + Value: v, + Set: true, + } +} + +// OptEncryptionItem is optional EncryptionItem. +type OptEncryptionItem struct { + Value EncryptionItem + Set bool +} + +// IsSet returns true if OptEncryptionItem was set. +func (o OptEncryptionItem) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptEncryptionItem) Reset() { + var v EncryptionItem + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptEncryptionItem) SetTo(v EncryptionItem) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptEncryptionItem) Get() (v EncryptionItem, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptEncryptionItem) Or(d EncryptionItem) EncryptionItem { + if v, ok := o.Get(); ok { + return v + } + return d +} + // NewOptFloat64 returns new OptFloat64 with value set to v. func NewOptFloat64(v float64) OptFloat64 { return OptFloat64{ @@ -15272,52 +16255,52 @@ func (o OptNilCreateHostRequestAlpn) Or(d CreateHostRequestAlpn) CreateHostReque return d } -// NewOptNilCreateHostRequestFingerprint returns new OptNilCreateHostRequestFingerprint with value set to v. -func NewOptNilCreateHostRequestFingerprint(v CreateHostRequestFingerprint) OptNilCreateHostRequestFingerprint { - return OptNilCreateHostRequestFingerprint{ +// NewOptNilCreateHostRequestMihomoIpVersion returns new OptNilCreateHostRequestMihomoIpVersion with value set to v. +func NewOptNilCreateHostRequestMihomoIpVersion(v CreateHostRequestMihomoIpVersion) OptNilCreateHostRequestMihomoIpVersion { + return OptNilCreateHostRequestMihomoIpVersion{ Value: v, Set: true, } } -// OptNilCreateHostRequestFingerprint is optional nullable CreateHostRequestFingerprint. -type OptNilCreateHostRequestFingerprint struct { - Value CreateHostRequestFingerprint +// OptNilCreateHostRequestMihomoIpVersion is optional nullable CreateHostRequestMihomoIpVersion. +type OptNilCreateHostRequestMihomoIpVersion struct { + Value CreateHostRequestMihomoIpVersion Set bool Null bool } -// IsSet returns true if OptNilCreateHostRequestFingerprint was set. -func (o OptNilCreateHostRequestFingerprint) IsSet() bool { return o.Set } +// IsSet returns true if OptNilCreateHostRequestMihomoIpVersion was set. +func (o OptNilCreateHostRequestMihomoIpVersion) IsSet() bool { return o.Set } // Reset unsets value. -func (o *OptNilCreateHostRequestFingerprint) Reset() { - var v CreateHostRequestFingerprint +func (o *OptNilCreateHostRequestMihomoIpVersion) Reset() { + var v CreateHostRequestMihomoIpVersion o.Value = v o.Set = false o.Null = false } // SetTo sets value to v. -func (o *OptNilCreateHostRequestFingerprint) SetTo(v CreateHostRequestFingerprint) { +func (o *OptNilCreateHostRequestMihomoIpVersion) SetTo(v CreateHostRequestMihomoIpVersion) { o.Set = true o.Null = false o.Value = v } // IsNull returns true if value is Null. -func (o OptNilCreateHostRequestFingerprint) IsNull() bool { return o.Null } +func (o OptNilCreateHostRequestMihomoIpVersion) IsNull() bool { return o.Null } // SetToNull sets value to null. -func (o *OptNilCreateHostRequestFingerprint) SetToNull() { +func (o *OptNilCreateHostRequestMihomoIpVersion) SetToNull() { o.Set = true o.Null = true - var v CreateHostRequestFingerprint + var v CreateHostRequestMihomoIpVersion o.Value = v } // Get returns value and boolean that denotes whether value was set. -func (o OptNilCreateHostRequestFingerprint) Get() (v CreateHostRequestFingerprint, ok bool) { +func (o OptNilCreateHostRequestMihomoIpVersion) Get() (v CreateHostRequestMihomoIpVersion, ok bool) { if o.Null { return v, false } @@ -15328,7 +16311,7 @@ func (o OptNilCreateHostRequestFingerprint) Get() (v CreateHostRequestFingerprin } // Or returns value if set, or given parameter if does not. -func (o OptNilCreateHostRequestFingerprint) Or(d CreateHostRequestFingerprint) CreateHostRequestFingerprint { +func (o OptNilCreateHostRequestMihomoIpVersion) Or(d CreateHostRequestMihomoIpVersion) CreateHostRequestMihomoIpVersion { if v, ok := o.Get(); ok { return v } @@ -16154,52 +17137,52 @@ func (o OptNilUpdateHostRequestAlpn) Or(d UpdateHostRequestAlpn) UpdateHostReque return d } -// NewOptNilUpdateHostRequestFingerprint returns new OptNilUpdateHostRequestFingerprint with value set to v. -func NewOptNilUpdateHostRequestFingerprint(v UpdateHostRequestFingerprint) OptNilUpdateHostRequestFingerprint { - return OptNilUpdateHostRequestFingerprint{ +// NewOptNilUpdateHostRequestMihomoIpVersion returns new OptNilUpdateHostRequestMihomoIpVersion with value set to v. +func NewOptNilUpdateHostRequestMihomoIpVersion(v UpdateHostRequestMihomoIpVersion) OptNilUpdateHostRequestMihomoIpVersion { + return OptNilUpdateHostRequestMihomoIpVersion{ Value: v, Set: true, } } -// OptNilUpdateHostRequestFingerprint is optional nullable UpdateHostRequestFingerprint. -type OptNilUpdateHostRequestFingerprint struct { - Value UpdateHostRequestFingerprint +// OptNilUpdateHostRequestMihomoIpVersion is optional nullable UpdateHostRequestMihomoIpVersion. +type OptNilUpdateHostRequestMihomoIpVersion struct { + Value UpdateHostRequestMihomoIpVersion Set bool Null bool } -// IsSet returns true if OptNilUpdateHostRequestFingerprint was set. -func (o OptNilUpdateHostRequestFingerprint) IsSet() bool { return o.Set } +// IsSet returns true if OptNilUpdateHostRequestMihomoIpVersion was set. +func (o OptNilUpdateHostRequestMihomoIpVersion) IsSet() bool { return o.Set } // Reset unsets value. -func (o *OptNilUpdateHostRequestFingerprint) Reset() { - var v UpdateHostRequestFingerprint +func (o *OptNilUpdateHostRequestMihomoIpVersion) Reset() { + var v UpdateHostRequestMihomoIpVersion o.Value = v o.Set = false o.Null = false } // SetTo sets value to v. -func (o *OptNilUpdateHostRequestFingerprint) SetTo(v UpdateHostRequestFingerprint) { +func (o *OptNilUpdateHostRequestMihomoIpVersion) SetTo(v UpdateHostRequestMihomoIpVersion) { o.Set = true o.Null = false o.Value = v } // IsNull returns true if value is Null. -func (o OptNilUpdateHostRequestFingerprint) IsNull() bool { return o.Null } +func (o OptNilUpdateHostRequestMihomoIpVersion) IsNull() bool { return o.Null } // SetToNull sets value to null. -func (o *OptNilUpdateHostRequestFingerprint) SetToNull() { +func (o *OptNilUpdateHostRequestMihomoIpVersion) SetToNull() { o.Set = true o.Null = true - var v UpdateHostRequestFingerprint + var v UpdateHostRequestMihomoIpVersion o.Value = v } // Get returns value and boolean that denotes whether value was set. -func (o OptNilUpdateHostRequestFingerprint) Get() (v UpdateHostRequestFingerprint, ok bool) { +func (o OptNilUpdateHostRequestMihomoIpVersion) Get() (v UpdateHostRequestMihomoIpVersion, ok bool) { if o.Null { return v, false } @@ -16210,7 +17193,133 @@ func (o OptNilUpdateHostRequestFingerprint) Get() (v UpdateHostRequestFingerprin } // Or returns value if set, or given parameter if does not. -func (o OptNilUpdateHostRequestFingerprint) Or(d UpdateHostRequestFingerprint) UpdateHostRequestFingerprint { +func (o OptNilUpdateHostRequestMihomoIpVersion) Or(d UpdateHostRequestMihomoIpVersion) UpdateHostRequestMihomoIpVersion { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptNilUpdateManyHostsRequestAlpn returns new OptNilUpdateManyHostsRequestAlpn with value set to v. +func NewOptNilUpdateManyHostsRequestAlpn(v UpdateManyHostsRequestAlpn) OptNilUpdateManyHostsRequestAlpn { + return OptNilUpdateManyHostsRequestAlpn{ + Value: v, + Set: true, + } +} + +// OptNilUpdateManyHostsRequestAlpn is optional nullable UpdateManyHostsRequestAlpn. +type OptNilUpdateManyHostsRequestAlpn struct { + Value UpdateManyHostsRequestAlpn + Set bool + Null bool +} + +// IsSet returns true if OptNilUpdateManyHostsRequestAlpn was set. +func (o OptNilUpdateManyHostsRequestAlpn) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptNilUpdateManyHostsRequestAlpn) Reset() { + var v UpdateManyHostsRequestAlpn + o.Value = v + o.Set = false + o.Null = false +} + +// SetTo sets value to v. +func (o *OptNilUpdateManyHostsRequestAlpn) SetTo(v UpdateManyHostsRequestAlpn) { + o.Set = true + o.Null = false + o.Value = v +} + +// IsNull returns true if value is Null. +func (o OptNilUpdateManyHostsRequestAlpn) IsNull() bool { return o.Null } + +// SetToNull sets value to null. +func (o *OptNilUpdateManyHostsRequestAlpn) SetToNull() { + o.Set = true + o.Null = true + var v UpdateManyHostsRequestAlpn + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptNilUpdateManyHostsRequestAlpn) Get() (v UpdateManyHostsRequestAlpn, ok bool) { + if o.Null { + return v, false + } + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptNilUpdateManyHostsRequestAlpn) Or(d UpdateManyHostsRequestAlpn) UpdateManyHostsRequestAlpn { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptNilUpdateManyHostsRequestMihomoIpVersion returns new OptNilUpdateManyHostsRequestMihomoIpVersion with value set to v. +func NewOptNilUpdateManyHostsRequestMihomoIpVersion(v UpdateManyHostsRequestMihomoIpVersion) OptNilUpdateManyHostsRequestMihomoIpVersion { + return OptNilUpdateManyHostsRequestMihomoIpVersion{ + Value: v, + Set: true, + } +} + +// OptNilUpdateManyHostsRequestMihomoIpVersion is optional nullable UpdateManyHostsRequestMihomoIpVersion. +type OptNilUpdateManyHostsRequestMihomoIpVersion struct { + Value UpdateManyHostsRequestMihomoIpVersion + Set bool + Null bool +} + +// IsSet returns true if OptNilUpdateManyHostsRequestMihomoIpVersion was set. +func (o OptNilUpdateManyHostsRequestMihomoIpVersion) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptNilUpdateManyHostsRequestMihomoIpVersion) Reset() { + var v UpdateManyHostsRequestMihomoIpVersion + o.Value = v + o.Set = false + o.Null = false +} + +// SetTo sets value to v. +func (o *OptNilUpdateManyHostsRequestMihomoIpVersion) SetTo(v UpdateManyHostsRequestMihomoIpVersion) { + o.Set = true + o.Null = false + o.Value = v +} + +// IsNull returns true if value is Null. +func (o OptNilUpdateManyHostsRequestMihomoIpVersion) IsNull() bool { return o.Null } + +// SetToNull sets value to null. +func (o *OptNilUpdateManyHostsRequestMihomoIpVersion) SetToNull() { + o.Set = true + o.Null = true + var v UpdateManyHostsRequestMihomoIpVersion + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptNilUpdateManyHostsRequestMihomoIpVersion) Get() (v UpdateManyHostsRequestMihomoIpVersion, ok bool) { + if o.Null { + return v, false + } + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptNilUpdateManyHostsRequestMihomoIpVersion) Or(d UpdateManyHostsRequestMihomoIpVersion) UpdateManyHostsRequestMihomoIpVersion { if v, ok := o.Get(); ok { return v } @@ -16539,6 +17648,52 @@ func (o OptUpdateHostRequestSecurityLayer) Or(d UpdateHostRequestSecurityLayer) return d } +// NewOptUpdateManyHostsRequestSecurityLayer returns new OptUpdateManyHostsRequestSecurityLayer with value set to v. +func NewOptUpdateManyHostsRequestSecurityLayer(v UpdateManyHostsRequestSecurityLayer) OptUpdateManyHostsRequestSecurityLayer { + return OptUpdateManyHostsRequestSecurityLayer{ + Value: v, + Set: true, + } +} + +// OptUpdateManyHostsRequestSecurityLayer is optional UpdateManyHostsRequestSecurityLayer. +type OptUpdateManyHostsRequestSecurityLayer struct { + Value UpdateManyHostsRequestSecurityLayer + Set bool +} + +// IsSet returns true if OptUpdateManyHostsRequestSecurityLayer was set. +func (o OptUpdateManyHostsRequestSecurityLayer) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptUpdateManyHostsRequestSecurityLayer) Reset() { + var v UpdateManyHostsRequestSecurityLayer + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptUpdateManyHostsRequestSecurityLayer) SetTo(v UpdateManyHostsRequestSecurityLayer) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptUpdateManyHostsRequestSecurityLayer) Get() (v UpdateManyHostsRequestSecurityLayer, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptUpdateManyHostsRequestSecurityLayer) Or(d UpdateManyHostsRequestSecurityLayer) UpdateManyHostsRequestSecurityLayer { + if v, ok := o.Get(); ok { + return v + } + return d +} + // NewOptUpdateSubscriptionSettingsRequestCustomResponseHeaders returns new OptUpdateSubscriptionSettingsRequestCustomResponseHeaders with value set to v. func NewOptUpdateSubscriptionSettingsRequestCustomResponseHeaders(v UpdateSubscriptionSettingsRequestCustomResponseHeaders) OptUpdateSubscriptionSettingsRequestCustomResponseHeaders { return OptUpdateSubscriptionSettingsRequestCustomResponseHeaders{ @@ -17741,7 +18896,7 @@ func (s *ProviderItem) SetUpdatedAt(val time.Time) { // Ref: #/components/schemas/Record type Record struct { ID float64 `json:"id"` - UserUuid uuid.UUID `json:"userUuid"` + UserId float64 `json:"userId"` RequestAt time.Time `json:"requestAt"` RequestIp NilString `json:"requestIp"` UserAgent NilString `json:"userAgent"` @@ -17752,9 +18907,9 @@ func (s *Record) GetID() float64 { return s.ID } -// GetUserUuid returns the value of UserUuid. -func (s *Record) GetUserUuid() uuid.UUID { - return s.UserUuid +// GetUserId returns the value of UserId. +func (s *Record) GetUserId() float64 { + return s.UserId } // GetRequestAt returns the value of RequestAt. @@ -17777,9 +18932,9 @@ func (s *Record) SetID(val float64) { s.ID = val } -// SetUserUuid sets the value of UserUuid. -func (s *Record) SetUserUuid(val uuid.UUID) { - s.UserUuid = val +// SetUserId sets the value of UserId. +func (s *Record) SetUserId(val float64) { + s.UserId = val } // SetRequestAt sets the value of RequestAt. @@ -18094,6 +19249,13 @@ type ResponseModification struct { // extended clients:**\n- `^Happ/`\n- `^INCY/`\n\n**Example:** `[\"^MyClient/\", // \"^CustomApp\\\\/v2\"]`"}. AdditionalExtendedClientsRegex []string `json:"additionalExtendedClientsRegex"` + // {"markdownDescription":"If you set this flag to **true**, the HWID check will be disabled. **This + // modification have higher priority than settings from Subscription Settings.**"}. + DisableHwidCheck OptBool `json:"disableHwidCheck"` + Encryption OptEncryptionItem `json:"encryption"` + // {"markdownDescription":"Excludes hosts from the subscription output if at least one tag in the + // host matches the given tags."}. + ExcludeHostsByTags []string `json:"excludeHostsByTags"` } // GetHeaders returns the value of Headers. @@ -18126,6 +19288,21 @@ func (s *ResponseModification) GetAdditionalExtendedClientsRegex() []string { return s.AdditionalExtendedClientsRegex } +// GetDisableHwidCheck returns the value of DisableHwidCheck. +func (s *ResponseModification) GetDisableHwidCheck() OptBool { + return s.DisableHwidCheck +} + +// GetEncryption returns the value of Encryption. +func (s *ResponseModification) GetEncryption() OptEncryptionItem { + return s.Encryption +} + +// GetExcludeHostsByTags returns the value of ExcludeHostsByTags. +func (s *ResponseModification) GetExcludeHostsByTags() []string { + return s.ExcludeHostsByTags +} + // SetHeaders sets the value of Headers. func (s *ResponseModification) SetHeaders(val []Header) { s.Headers = val @@ -18156,6 +19333,21 @@ func (s *ResponseModification) SetAdditionalExtendedClientsRegex(val []string) { s.AdditionalExtendedClientsRegex = val } +// SetDisableHwidCheck sets the value of DisableHwidCheck. +func (s *ResponseModification) SetDisableHwidCheck(val OptBool) { + s.DisableHwidCheck = val +} + +// SetEncryption sets the value of Encryption. +func (s *ResponseModification) SetEncryption(val OptEncryptionItem) { + s.Encryption = val +} + +// SetExcludeHostsByTags sets the value of ExcludeHostsByTags. +func (s *ResponseModification) SetExcludeHostsByTags(val []string) { + s.ExcludeHostsByTags = val +} + // Ref: #/components/schemas/ResponseRules type ResponseRules struct { // {"title":"Response Rules Config Version","markdownDescription":"Version of the **response rules** @@ -18237,21 +19429,6 @@ func (s *ResponseRulesVersion) UnmarshalText(data []byte) error { } } -// Ref: #/components/schemas/RestartAllNodesRequestBody -type RestartAllNodesRequestBody struct { - ForceRestart OptBool `json:"forceRestart"` -} - -// GetForceRestart returns the value of ForceRestart. -func (s *RestartAllNodesRequestBody) GetForceRestart() OptBool { - return s.ForceRestart -} - -// SetForceRestart sets the value of ForceRestart. -func (s *RestartAllNodesRequestBody) SetForceRestart(val OptBool) { - s.ForceRestart = val -} - // Ref: #/components/schemas/RevokeUserSubscriptionBody type RevokeUserSubscriptionBody struct { // Optional. If true, only passwords will be revoked, without changing the short UUID (Subscription @@ -18578,69 +19755,6 @@ func (s *RuleResponseType) UnmarshalText(data []byte) error { } } -// Ref: #/components/schemas/SetInboundToManyHostsRequest -type SetInboundToManyHostsRequest struct { - Uuids []uuid.UUID `json:"uuids"` - ConfigProfileUuid uuid.UUID `json:"configProfileUuid"` - ConfigProfileInboundUuid uuid.UUID `json:"configProfileInboundUuid"` -} - -// GetUuids returns the value of Uuids. -func (s *SetInboundToManyHostsRequest) GetUuids() []uuid.UUID { - return s.Uuids -} - -// GetConfigProfileUuid returns the value of ConfigProfileUuid. -func (s *SetInboundToManyHostsRequest) GetConfigProfileUuid() uuid.UUID { - return s.ConfigProfileUuid -} - -// GetConfigProfileInboundUuid returns the value of ConfigProfileInboundUuid. -func (s *SetInboundToManyHostsRequest) GetConfigProfileInboundUuid() uuid.UUID { - return s.ConfigProfileInboundUuid -} - -// SetUuids sets the value of Uuids. -func (s *SetInboundToManyHostsRequest) SetUuids(val []uuid.UUID) { - s.Uuids = val -} - -// SetConfigProfileUuid sets the value of ConfigProfileUuid. -func (s *SetInboundToManyHostsRequest) SetConfigProfileUuid(val uuid.UUID) { - s.ConfigProfileUuid = val -} - -// SetConfigProfileInboundUuid sets the value of ConfigProfileInboundUuid. -func (s *SetInboundToManyHostsRequest) SetConfigProfileInboundUuid(val uuid.UUID) { - s.ConfigProfileInboundUuid = val -} - -// Ref: #/components/schemas/SetPortToManyHostsRequest -type SetPortToManyHostsRequest struct { - Uuids []uuid.UUID `json:"uuids"` - Port int `json:"port"` -} - -// GetUuids returns the value of Uuids. -func (s *SetPortToManyHostsRequest) GetUuids() []uuid.UUID { - return s.Uuids -} - -// GetPort returns the value of Port. -func (s *SetPortToManyHostsRequest) GetPort() int { - return s.Port -} - -// SetUuids sets the value of Uuids. -func (s *SetPortToManyHostsRequest) SetUuids(val []uuid.UUID) { - s.Uuids = val -} - -// SetPort sets the value of Port. -func (s *SetPortToManyHostsRequest) SetPort(val int) { - s.Port = val -} - // Ref: #/components/schemas/SettingsResponse type SettingsResponse struct { Response SettingsResponseResponse `json:"response"` @@ -18873,6 +19987,96 @@ func (s *Stat) SetInterface(val NilInterfaceItem) { s.Interface = val } +// Ref: #/components/schemas/StatsNodeUsersUsageResponseResponse +type StatsNodeUsersUsageResponseResponse struct { + Response StatsNodeUsersUsageResponseResponseResponse `json:"response"` +} + +// GetResponse returns the value of Response. +func (s *StatsNodeUsersUsageResponseResponse) GetResponse() StatsNodeUsersUsageResponseResponseResponse { + return s.Response +} + +// SetResponse sets the value of Response. +func (s *StatsNodeUsersUsageResponseResponse) SetResponse(val StatsNodeUsersUsageResponseResponseResponse) { + s.Response = val +} + +func (*StatsNodeUsersUsageResponseResponse) bandwidthStatsNodesGetStatsNodeUsersUsageRes() {} +func (*StatsNodeUsersUsageResponseResponse) bandwidthStatsNodesGetStatsNodesUsersUsageRes() {} + +type StatsNodeUsersUsageResponseResponseResponse struct { + Categories []string `json:"categories"` + SparklineData []float64 `json:"sparklineData"` + TopUsers []StatsNodeUsersUsageResponseResponseResponseTopUsersItem `json:"topUsers"` +} + +// GetCategories returns the value of Categories. +func (s *StatsNodeUsersUsageResponseResponseResponse) GetCategories() []string { + return s.Categories +} + +// GetSparklineData returns the value of SparklineData. +func (s *StatsNodeUsersUsageResponseResponseResponse) GetSparklineData() []float64 { + return s.SparklineData +} + +// GetTopUsers returns the value of TopUsers. +func (s *StatsNodeUsersUsageResponseResponseResponse) GetTopUsers() []StatsNodeUsersUsageResponseResponseResponseTopUsersItem { + return s.TopUsers +} + +// SetCategories sets the value of Categories. +func (s *StatsNodeUsersUsageResponseResponseResponse) SetCategories(val []string) { + s.Categories = val +} + +// SetSparklineData sets the value of SparklineData. +func (s *StatsNodeUsersUsageResponseResponseResponse) SetSparklineData(val []float64) { + s.SparklineData = val +} + +// SetTopUsers sets the value of TopUsers. +func (s *StatsNodeUsersUsageResponseResponseResponse) SetTopUsers(val []StatsNodeUsersUsageResponseResponseResponseTopUsersItem) { + s.TopUsers = val +} + +type StatsNodeUsersUsageResponseResponseResponseTopUsersItem struct { + Color string `json:"color"` + Username string `json:"username"` + Total float64 `json:"total"` +} + +// GetColor returns the value of Color. +func (s *StatsNodeUsersUsageResponseResponseResponseTopUsersItem) GetColor() string { + return s.Color +} + +// GetUsername returns the value of Username. +func (s *StatsNodeUsersUsageResponseResponseResponseTopUsersItem) GetUsername() string { + return s.Username +} + +// GetTotal returns the value of Total. +func (s *StatsNodeUsersUsageResponseResponseResponseTopUsersItem) GetTotal() float64 { + return s.Total +} + +// SetColor sets the value of Color. +func (s *StatsNodeUsersUsageResponseResponseResponseTopUsersItem) SetColor(val string) { + s.Color = val +} + +// SetUsername sets the value of Username. +func (s *StatsNodeUsersUsageResponseResponseResponseTopUsersItem) SetUsername(val string) { + s.Username = val +} + +// SetTotal sets the value of Total. +func (s *StatsNodeUsersUsageResponseResponseResponseTopUsersItem) SetTotal(val float64) { + s.Total = val +} + // Ref: #/components/schemas/StatsUserUsageResponseResponse type StatsUserUsageResponseResponse struct { Response StatsUserUsageResponseResponseResponse `json:"response"` @@ -20481,35 +21685,35 @@ func (s *UpdateExternalSquadRequestResponseHeaders) init() UpdateExternalSquadRe // Ref: #/components/schemas/UpdateHostRequest type UpdateHostRequest struct { - UUID uuid.UUID `json:"uuid"` - Inbound OptInboundRef `json:"inbound"` - Remark OptString `json:"remark"` - Address OptString `json:"address"` - Port OptInt `json:"port"` - Path OptString `json:"path"` - Sni OptString `json:"sni"` - Host OptString `json:"host"` - Alpn OptNilUpdateHostRequestAlpn `json:"alpn"` - Fingerprint OptNilUpdateHostRequestFingerprint `json:"fingerprint"` - IsDisabled OptBool `json:"isDisabled"` - SecurityLayer OptUpdateHostRequestSecurityLayer `json:"securityLayer"` - XHttpExtraParams jx.Raw `json:"xHttpExtraParams"` - MuxParams jx.Raw `json:"muxParams"` - SockoptParams jx.Raw `json:"sockoptParams"` - FinalMask jx.Raw `json:"finalMask"` - ServerDescription OptNilString `json:"serverDescription"` - // Optional. Host tag for categorization. Max 32 characters, uppercase letters, numbers, underscores - // and colons are allowed. - Tag OptNilString `json:"tag"` - IsHidden OptBool `json:"isHidden"` - OverrideSniFromAddress OptBool `json:"overrideSniFromAddress"` - KeepSniBlank OptBool `json:"keepSniBlank"` - VlessRouteId OptNilInt `json:"vlessRouteId"` - AllowInsecure OptBool `json:"allowInsecure"` - ShuffleHost OptBool `json:"shuffleHost"` - MihomoX25519 OptBool `json:"mihomoX25519"` - Nodes []uuid.UUID `json:"nodes"` - XrayJsonTemplateUuid OptNilUUID `json:"xrayJsonTemplateUuid"` + UUID uuid.UUID `json:"uuid"` + Inbound OptInboundRef `json:"inbound"` + Remark OptString `json:"remark"` + Address OptString `json:"address"` + Port OptInt `json:"port"` + Path OptNilString `json:"path"` + Sni OptNilString `json:"sni"` + Host OptNilString `json:"host"` + Alpn OptNilUpdateHostRequestAlpn `json:"alpn"` + Fingerprint OptNilString `json:"fingerprint"` + IsDisabled OptBool `json:"isDisabled"` + SecurityLayer OptUpdateHostRequestSecurityLayer `json:"securityLayer"` + XhttpExtraParams jx.Raw `json:"xhttpExtraParams"` + MuxParams jx.Raw `json:"muxParams"` + SockoptParams jx.Raw `json:"sockoptParams"` + FinalMask jx.Raw `json:"finalMask"` + ServerDescription OptNilString `json:"serverDescription"` + Tags []string `json:"tags"` + IsHidden OptBool `json:"isHidden"` + OverrideSniFromAddress OptBool `json:"overrideSniFromAddress"` + KeepSniBlank OptBool `json:"keepSniBlank"` + VlessRouteId OptNilInt `json:"vlessRouteId"` + PinnedPeerCertSha256 OptNilString `json:"pinnedPeerCertSha256"` + VerifyPeerCertByName OptNilString `json:"verifyPeerCertByName"` + ShuffleHost OptBool `json:"shuffleHost"` + MihomoX25519 OptBool `json:"mihomoX25519"` + MihomoIpVersion OptNilUpdateHostRequestMihomoIpVersion `json:"mihomoIpVersion"` + Nodes []uuid.UUID `json:"nodes"` + XrayJsonTemplateUuid OptNilUUID `json:"xrayJsonTemplateUuid"` // Optional. Internal squads from which the host will be excluded. ExcludedInternalSquads []uuid.UUID `json:"excludedInternalSquads"` // Optional. Subscription types from which the host will be excluded from. @@ -20542,17 +21746,17 @@ func (s *UpdateHostRequest) GetPort() OptInt { } // GetPath returns the value of Path. -func (s *UpdateHostRequest) GetPath() OptString { +func (s *UpdateHostRequest) GetPath() OptNilString { return s.Path } // GetSni returns the value of Sni. -func (s *UpdateHostRequest) GetSni() OptString { +func (s *UpdateHostRequest) GetSni() OptNilString { return s.Sni } // GetHost returns the value of Host. -func (s *UpdateHostRequest) GetHost() OptString { +func (s *UpdateHostRequest) GetHost() OptNilString { return s.Host } @@ -20562,7 +21766,7 @@ func (s *UpdateHostRequest) GetAlpn() OptNilUpdateHostRequestAlpn { } // GetFingerprint returns the value of Fingerprint. -func (s *UpdateHostRequest) GetFingerprint() OptNilUpdateHostRequestFingerprint { +func (s *UpdateHostRequest) GetFingerprint() OptNilString { return s.Fingerprint } @@ -20576,9 +21780,9 @@ func (s *UpdateHostRequest) GetSecurityLayer() OptUpdateHostRequestSecurityLayer return s.SecurityLayer } -// GetXHttpExtraParams returns the value of XHttpExtraParams. -func (s *UpdateHostRequest) GetXHttpExtraParams() jx.Raw { - return s.XHttpExtraParams +// GetXhttpExtraParams returns the value of XhttpExtraParams. +func (s *UpdateHostRequest) GetXhttpExtraParams() jx.Raw { + return s.XhttpExtraParams } // GetMuxParams returns the value of MuxParams. @@ -20601,9 +21805,9 @@ func (s *UpdateHostRequest) GetServerDescription() OptNilString { return s.ServerDescription } -// GetTag returns the value of Tag. -func (s *UpdateHostRequest) GetTag() OptNilString { - return s.Tag +// GetTags returns the value of Tags. +func (s *UpdateHostRequest) GetTags() []string { + return s.Tags } // GetIsHidden returns the value of IsHidden. @@ -20626,9 +21830,14 @@ func (s *UpdateHostRequest) GetVlessRouteId() OptNilInt { return s.VlessRouteId } -// GetAllowInsecure returns the value of AllowInsecure. -func (s *UpdateHostRequest) GetAllowInsecure() OptBool { - return s.AllowInsecure +// GetPinnedPeerCertSha256 returns the value of PinnedPeerCertSha256. +func (s *UpdateHostRequest) GetPinnedPeerCertSha256() OptNilString { + return s.PinnedPeerCertSha256 +} + +// GetVerifyPeerCertByName returns the value of VerifyPeerCertByName. +func (s *UpdateHostRequest) GetVerifyPeerCertByName() OptNilString { + return s.VerifyPeerCertByName } // GetShuffleHost returns the value of ShuffleHost. @@ -20641,6 +21850,11 @@ func (s *UpdateHostRequest) GetMihomoX25519() OptBool { return s.MihomoX25519 } +// GetMihomoIpVersion returns the value of MihomoIpVersion. +func (s *UpdateHostRequest) GetMihomoIpVersion() OptNilUpdateHostRequestMihomoIpVersion { + return s.MihomoIpVersion +} + // GetNodes returns the value of Nodes. func (s *UpdateHostRequest) GetNodes() []uuid.UUID { return s.Nodes @@ -20687,17 +21901,17 @@ func (s *UpdateHostRequest) SetPort(val OptInt) { } // SetPath sets the value of Path. -func (s *UpdateHostRequest) SetPath(val OptString) { +func (s *UpdateHostRequest) SetPath(val OptNilString) { s.Path = val } // SetSni sets the value of Sni. -func (s *UpdateHostRequest) SetSni(val OptString) { +func (s *UpdateHostRequest) SetSni(val OptNilString) { s.Sni = val } // SetHost sets the value of Host. -func (s *UpdateHostRequest) SetHost(val OptString) { +func (s *UpdateHostRequest) SetHost(val OptNilString) { s.Host = val } @@ -20707,7 +21921,7 @@ func (s *UpdateHostRequest) SetAlpn(val OptNilUpdateHostRequestAlpn) { } // SetFingerprint sets the value of Fingerprint. -func (s *UpdateHostRequest) SetFingerprint(val OptNilUpdateHostRequestFingerprint) { +func (s *UpdateHostRequest) SetFingerprint(val OptNilString) { s.Fingerprint = val } @@ -20721,9 +21935,9 @@ func (s *UpdateHostRequest) SetSecurityLayer(val OptUpdateHostRequestSecurityLay s.SecurityLayer = val } -// SetXHttpExtraParams sets the value of XHttpExtraParams. -func (s *UpdateHostRequest) SetXHttpExtraParams(val jx.Raw) { - s.XHttpExtraParams = val +// SetXhttpExtraParams sets the value of XhttpExtraParams. +func (s *UpdateHostRequest) SetXhttpExtraParams(val jx.Raw) { + s.XhttpExtraParams = val } // SetMuxParams sets the value of MuxParams. @@ -20746,9 +21960,9 @@ func (s *UpdateHostRequest) SetServerDescription(val OptNilString) { s.ServerDescription = val } -// SetTag sets the value of Tag. -func (s *UpdateHostRequest) SetTag(val OptNilString) { - s.Tag = val +// SetTags sets the value of Tags. +func (s *UpdateHostRequest) SetTags(val []string) { + s.Tags = val } // SetIsHidden sets the value of IsHidden. @@ -20771,9 +21985,14 @@ func (s *UpdateHostRequest) SetVlessRouteId(val OptNilInt) { s.VlessRouteId = val } -// SetAllowInsecure sets the value of AllowInsecure. -func (s *UpdateHostRequest) SetAllowInsecure(val OptBool) { - s.AllowInsecure = val +// SetPinnedPeerCertSha256 sets the value of PinnedPeerCertSha256. +func (s *UpdateHostRequest) SetPinnedPeerCertSha256(val OptNilString) { + s.PinnedPeerCertSha256 = val +} + +// SetVerifyPeerCertByName sets the value of VerifyPeerCertByName. +func (s *UpdateHostRequest) SetVerifyPeerCertByName(val OptNilString) { + s.VerifyPeerCertByName = val } // SetShuffleHost sets the value of ShuffleHost. @@ -20786,6 +22005,11 @@ func (s *UpdateHostRequest) SetMihomoX25519(val OptBool) { s.MihomoX25519 = val } +// SetMihomoIpVersion sets the value of MihomoIpVersion. +func (s *UpdateHostRequest) SetMihomoIpVersion(val OptNilUpdateHostRequestMihomoIpVersion) { + s.MihomoIpVersion = val +} + // SetNodes sets the value of Nodes. func (s *UpdateHostRequest) SetNodes(val []uuid.UUID) { s.Nodes = val @@ -20944,55 +22168,39 @@ func (s *UpdateHostRequestExcludeFromSubscriptionTypesItem) UnmarshalText(data [ } } -type UpdateHostRequestFingerprint string +type UpdateHostRequestMihomoIpVersion string const ( - UpdateHostRequestFingerprintChrome UpdateHostRequestFingerprint = "chrome" - UpdateHostRequestFingerprintFirefox UpdateHostRequestFingerprint = "firefox" - UpdateHostRequestFingerprintSafari UpdateHostRequestFingerprint = "safari" - UpdateHostRequestFingerprintIos UpdateHostRequestFingerprint = "ios" - UpdateHostRequestFingerprintAndroid UpdateHostRequestFingerprint = "android" - UpdateHostRequestFingerprintEdge UpdateHostRequestFingerprint = "edge" - UpdateHostRequestFingerprintQq UpdateHostRequestFingerprint = "qq" - UpdateHostRequestFingerprintRandom UpdateHostRequestFingerprint = "random" - UpdateHostRequestFingerprintRandomized UpdateHostRequestFingerprint = "randomized" + UpdateHostRequestMihomoIpVersionDual UpdateHostRequestMihomoIpVersion = "dual" + UpdateHostRequestMihomoIpVersionIpv4 UpdateHostRequestMihomoIpVersion = "ipv4" + UpdateHostRequestMihomoIpVersionIpv6 UpdateHostRequestMihomoIpVersion = "ipv6" + UpdateHostRequestMihomoIpVersionIpv4Prefer UpdateHostRequestMihomoIpVersion = "ipv4-prefer" + UpdateHostRequestMihomoIpVersionIpv6Prefer UpdateHostRequestMihomoIpVersion = "ipv6-prefer" ) -// AllValues returns all UpdateHostRequestFingerprint values. -func (UpdateHostRequestFingerprint) AllValues() []UpdateHostRequestFingerprint { - return []UpdateHostRequestFingerprint{ - UpdateHostRequestFingerprintChrome, - UpdateHostRequestFingerprintFirefox, - UpdateHostRequestFingerprintSafari, - UpdateHostRequestFingerprintIos, - UpdateHostRequestFingerprintAndroid, - UpdateHostRequestFingerprintEdge, - UpdateHostRequestFingerprintQq, - UpdateHostRequestFingerprintRandom, - UpdateHostRequestFingerprintRandomized, +// AllValues returns all UpdateHostRequestMihomoIpVersion values. +func (UpdateHostRequestMihomoIpVersion) AllValues() []UpdateHostRequestMihomoIpVersion { + return []UpdateHostRequestMihomoIpVersion{ + UpdateHostRequestMihomoIpVersionDual, + UpdateHostRequestMihomoIpVersionIpv4, + UpdateHostRequestMihomoIpVersionIpv6, + UpdateHostRequestMihomoIpVersionIpv4Prefer, + UpdateHostRequestMihomoIpVersionIpv6Prefer, } } // MarshalText implements encoding.TextMarshaler. -func (s UpdateHostRequestFingerprint) MarshalText() ([]byte, error) { +func (s UpdateHostRequestMihomoIpVersion) MarshalText() ([]byte, error) { switch s { - case UpdateHostRequestFingerprintChrome: + case UpdateHostRequestMihomoIpVersionDual: return []byte(s), nil - case UpdateHostRequestFingerprintFirefox: + case UpdateHostRequestMihomoIpVersionIpv4: return []byte(s), nil - case UpdateHostRequestFingerprintSafari: + case UpdateHostRequestMihomoIpVersionIpv6: return []byte(s), nil - case UpdateHostRequestFingerprintIos: + case UpdateHostRequestMihomoIpVersionIpv4Prefer: return []byte(s), nil - case UpdateHostRequestFingerprintAndroid: - return []byte(s), nil - case UpdateHostRequestFingerprintEdge: - return []byte(s), nil - case UpdateHostRequestFingerprintQq: - return []byte(s), nil - case UpdateHostRequestFingerprintRandom: - return []byte(s), nil - case UpdateHostRequestFingerprintRandomized: + case UpdateHostRequestMihomoIpVersionIpv6Prefer: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) @@ -21000,34 +22208,22 @@ func (s UpdateHostRequestFingerprint) MarshalText() ([]byte, error) { } // UnmarshalText implements encoding.TextUnmarshaler. -func (s *UpdateHostRequestFingerprint) UnmarshalText(data []byte) error { - switch UpdateHostRequestFingerprint(data) { - case UpdateHostRequestFingerprintChrome: - *s = UpdateHostRequestFingerprintChrome +func (s *UpdateHostRequestMihomoIpVersion) UnmarshalText(data []byte) error { + switch UpdateHostRequestMihomoIpVersion(data) { + case UpdateHostRequestMihomoIpVersionDual: + *s = UpdateHostRequestMihomoIpVersionDual return nil - case UpdateHostRequestFingerprintFirefox: - *s = UpdateHostRequestFingerprintFirefox + case UpdateHostRequestMihomoIpVersionIpv4: + *s = UpdateHostRequestMihomoIpVersionIpv4 return nil - case UpdateHostRequestFingerprintSafari: - *s = UpdateHostRequestFingerprintSafari + case UpdateHostRequestMihomoIpVersionIpv6: + *s = UpdateHostRequestMihomoIpVersionIpv6 return nil - case UpdateHostRequestFingerprintIos: - *s = UpdateHostRequestFingerprintIos + case UpdateHostRequestMihomoIpVersionIpv4Prefer: + *s = UpdateHostRequestMihomoIpVersionIpv4Prefer return nil - case UpdateHostRequestFingerprintAndroid: - *s = UpdateHostRequestFingerprintAndroid - return nil - case UpdateHostRequestFingerprintEdge: - *s = UpdateHostRequestFingerprintEdge - return nil - case UpdateHostRequestFingerprintQq: - *s = UpdateHostRequestFingerprintQq - return nil - case UpdateHostRequestFingerprintRandom: - *s = UpdateHostRequestFingerprintRandom - return nil - case UpdateHostRequestFingerprintRandomized: - *s = UpdateHostRequestFingerprintRandomized + case UpdateHostRequestMihomoIpVersionIpv6Prefer: + *s = UpdateHostRequestMihomoIpVersionIpv6Prefer return nil default: return errors.Errorf("invalid value: %q", data) @@ -21193,6 +22389,601 @@ func (s *UpdateInternalSquadRequest) SetInbounds(val []uuid.UUID) { s.Inbounds = val } +// Ref: #/components/schemas/UpdateManyHostsRequest +type UpdateManyHostsRequest struct { + Inbound OptInboundRef `json:"inbound"` + Remark OptString `json:"remark"` + Address OptString `json:"address"` + Port OptInt `json:"port"` + Path OptNilString `json:"path"` + Sni OptNilString `json:"sni"` + Host OptNilString `json:"host"` + Alpn OptNilUpdateManyHostsRequestAlpn `json:"alpn"` + Fingerprint OptNilString `json:"fingerprint"` + IsDisabled OptBool `json:"isDisabled"` + SecurityLayer OptUpdateManyHostsRequestSecurityLayer `json:"securityLayer"` + XhttpExtraParams jx.Raw `json:"xhttpExtraParams"` + MuxParams jx.Raw `json:"muxParams"` + SockoptParams jx.Raw `json:"sockoptParams"` + FinalMask jx.Raw `json:"finalMask"` + ServerDescription OptNilString `json:"serverDescription"` + Tags []string `json:"tags"` + IsHidden OptBool `json:"isHidden"` + OverrideSniFromAddress OptBool `json:"overrideSniFromAddress"` + KeepSniBlank OptBool `json:"keepSniBlank"` + VlessRouteId OptNilInt `json:"vlessRouteId"` + PinnedPeerCertSha256 OptNilString `json:"pinnedPeerCertSha256"` + VerifyPeerCertByName OptNilString `json:"verifyPeerCertByName"` + ShuffleHost OptBool `json:"shuffleHost"` + MihomoX25519 OptBool `json:"mihomoX25519"` + MihomoIpVersion OptNilUpdateManyHostsRequestMihomoIpVersion `json:"mihomoIpVersion"` + Nodes []uuid.UUID `json:"nodes"` + XrayJsonTemplateUuid OptNilUUID `json:"xrayJsonTemplateUuid"` + // Optional. Internal squads from which the host will be excluded. + ExcludedInternalSquads []uuid.UUID `json:"excludedInternalSquads"` + // Optional. Subscription types from which the host will be excluded from. + ExcludeFromSubscriptionTypes []UpdateManyHostsRequestExcludeFromSubscriptionTypesItem `json:"excludeFromSubscriptionTypes"` + Uuids []uuid.UUID `json:"uuids"` +} + +// GetInbound returns the value of Inbound. +func (s *UpdateManyHostsRequest) GetInbound() OptInboundRef { + return s.Inbound +} + +// GetRemark returns the value of Remark. +func (s *UpdateManyHostsRequest) GetRemark() OptString { + return s.Remark +} + +// GetAddress returns the value of Address. +func (s *UpdateManyHostsRequest) GetAddress() OptString { + return s.Address +} + +// GetPort returns the value of Port. +func (s *UpdateManyHostsRequest) GetPort() OptInt { + return s.Port +} + +// GetPath returns the value of Path. +func (s *UpdateManyHostsRequest) GetPath() OptNilString { + return s.Path +} + +// GetSni returns the value of Sni. +func (s *UpdateManyHostsRequest) GetSni() OptNilString { + return s.Sni +} + +// GetHost returns the value of Host. +func (s *UpdateManyHostsRequest) GetHost() OptNilString { + return s.Host +} + +// GetAlpn returns the value of Alpn. +func (s *UpdateManyHostsRequest) GetAlpn() OptNilUpdateManyHostsRequestAlpn { + return s.Alpn +} + +// GetFingerprint returns the value of Fingerprint. +func (s *UpdateManyHostsRequest) GetFingerprint() OptNilString { + return s.Fingerprint +} + +// GetIsDisabled returns the value of IsDisabled. +func (s *UpdateManyHostsRequest) GetIsDisabled() OptBool { + return s.IsDisabled +} + +// GetSecurityLayer returns the value of SecurityLayer. +func (s *UpdateManyHostsRequest) GetSecurityLayer() OptUpdateManyHostsRequestSecurityLayer { + return s.SecurityLayer +} + +// GetXhttpExtraParams returns the value of XhttpExtraParams. +func (s *UpdateManyHostsRequest) GetXhttpExtraParams() jx.Raw { + return s.XhttpExtraParams +} + +// GetMuxParams returns the value of MuxParams. +func (s *UpdateManyHostsRequest) GetMuxParams() jx.Raw { + return s.MuxParams +} + +// GetSockoptParams returns the value of SockoptParams. +func (s *UpdateManyHostsRequest) GetSockoptParams() jx.Raw { + return s.SockoptParams +} + +// GetFinalMask returns the value of FinalMask. +func (s *UpdateManyHostsRequest) GetFinalMask() jx.Raw { + return s.FinalMask +} + +// GetServerDescription returns the value of ServerDescription. +func (s *UpdateManyHostsRequest) GetServerDescription() OptNilString { + return s.ServerDescription +} + +// GetTags returns the value of Tags. +func (s *UpdateManyHostsRequest) GetTags() []string { + return s.Tags +} + +// GetIsHidden returns the value of IsHidden. +func (s *UpdateManyHostsRequest) GetIsHidden() OptBool { + return s.IsHidden +} + +// GetOverrideSniFromAddress returns the value of OverrideSniFromAddress. +func (s *UpdateManyHostsRequest) GetOverrideSniFromAddress() OptBool { + return s.OverrideSniFromAddress +} + +// GetKeepSniBlank returns the value of KeepSniBlank. +func (s *UpdateManyHostsRequest) GetKeepSniBlank() OptBool { + return s.KeepSniBlank +} + +// GetVlessRouteId returns the value of VlessRouteId. +func (s *UpdateManyHostsRequest) GetVlessRouteId() OptNilInt { + return s.VlessRouteId +} + +// GetPinnedPeerCertSha256 returns the value of PinnedPeerCertSha256. +func (s *UpdateManyHostsRequest) GetPinnedPeerCertSha256() OptNilString { + return s.PinnedPeerCertSha256 +} + +// GetVerifyPeerCertByName returns the value of VerifyPeerCertByName. +func (s *UpdateManyHostsRequest) GetVerifyPeerCertByName() OptNilString { + return s.VerifyPeerCertByName +} + +// GetShuffleHost returns the value of ShuffleHost. +func (s *UpdateManyHostsRequest) GetShuffleHost() OptBool { + return s.ShuffleHost +} + +// GetMihomoX25519 returns the value of MihomoX25519. +func (s *UpdateManyHostsRequest) GetMihomoX25519() OptBool { + return s.MihomoX25519 +} + +// GetMihomoIpVersion returns the value of MihomoIpVersion. +func (s *UpdateManyHostsRequest) GetMihomoIpVersion() OptNilUpdateManyHostsRequestMihomoIpVersion { + return s.MihomoIpVersion +} + +// GetNodes returns the value of Nodes. +func (s *UpdateManyHostsRequest) GetNodes() []uuid.UUID { + return s.Nodes +} + +// GetXrayJsonTemplateUuid returns the value of XrayJsonTemplateUuid. +func (s *UpdateManyHostsRequest) GetXrayJsonTemplateUuid() OptNilUUID { + return s.XrayJsonTemplateUuid +} + +// GetExcludedInternalSquads returns the value of ExcludedInternalSquads. +func (s *UpdateManyHostsRequest) GetExcludedInternalSquads() []uuid.UUID { + return s.ExcludedInternalSquads +} + +// GetExcludeFromSubscriptionTypes returns the value of ExcludeFromSubscriptionTypes. +func (s *UpdateManyHostsRequest) GetExcludeFromSubscriptionTypes() []UpdateManyHostsRequestExcludeFromSubscriptionTypesItem { + return s.ExcludeFromSubscriptionTypes +} + +// GetUuids returns the value of Uuids. +func (s *UpdateManyHostsRequest) GetUuids() []uuid.UUID { + return s.Uuids +} + +// SetInbound sets the value of Inbound. +func (s *UpdateManyHostsRequest) SetInbound(val OptInboundRef) { + s.Inbound = val +} + +// SetRemark sets the value of Remark. +func (s *UpdateManyHostsRequest) SetRemark(val OptString) { + s.Remark = val +} + +// SetAddress sets the value of Address. +func (s *UpdateManyHostsRequest) SetAddress(val OptString) { + s.Address = val +} + +// SetPort sets the value of Port. +func (s *UpdateManyHostsRequest) SetPort(val OptInt) { + s.Port = val +} + +// SetPath sets the value of Path. +func (s *UpdateManyHostsRequest) SetPath(val OptNilString) { + s.Path = val +} + +// SetSni sets the value of Sni. +func (s *UpdateManyHostsRequest) SetSni(val OptNilString) { + s.Sni = val +} + +// SetHost sets the value of Host. +func (s *UpdateManyHostsRequest) SetHost(val OptNilString) { + s.Host = val +} + +// SetAlpn sets the value of Alpn. +func (s *UpdateManyHostsRequest) SetAlpn(val OptNilUpdateManyHostsRequestAlpn) { + s.Alpn = val +} + +// SetFingerprint sets the value of Fingerprint. +func (s *UpdateManyHostsRequest) SetFingerprint(val OptNilString) { + s.Fingerprint = val +} + +// SetIsDisabled sets the value of IsDisabled. +func (s *UpdateManyHostsRequest) SetIsDisabled(val OptBool) { + s.IsDisabled = val +} + +// SetSecurityLayer sets the value of SecurityLayer. +func (s *UpdateManyHostsRequest) SetSecurityLayer(val OptUpdateManyHostsRequestSecurityLayer) { + s.SecurityLayer = val +} + +// SetXhttpExtraParams sets the value of XhttpExtraParams. +func (s *UpdateManyHostsRequest) SetXhttpExtraParams(val jx.Raw) { + s.XhttpExtraParams = val +} + +// SetMuxParams sets the value of MuxParams. +func (s *UpdateManyHostsRequest) SetMuxParams(val jx.Raw) { + s.MuxParams = val +} + +// SetSockoptParams sets the value of SockoptParams. +func (s *UpdateManyHostsRequest) SetSockoptParams(val jx.Raw) { + s.SockoptParams = val +} + +// SetFinalMask sets the value of FinalMask. +func (s *UpdateManyHostsRequest) SetFinalMask(val jx.Raw) { + s.FinalMask = val +} + +// SetServerDescription sets the value of ServerDescription. +func (s *UpdateManyHostsRequest) SetServerDescription(val OptNilString) { + s.ServerDescription = val +} + +// SetTags sets the value of Tags. +func (s *UpdateManyHostsRequest) SetTags(val []string) { + s.Tags = val +} + +// SetIsHidden sets the value of IsHidden. +func (s *UpdateManyHostsRequest) SetIsHidden(val OptBool) { + s.IsHidden = val +} + +// SetOverrideSniFromAddress sets the value of OverrideSniFromAddress. +func (s *UpdateManyHostsRequest) SetOverrideSniFromAddress(val OptBool) { + s.OverrideSniFromAddress = val +} + +// SetKeepSniBlank sets the value of KeepSniBlank. +func (s *UpdateManyHostsRequest) SetKeepSniBlank(val OptBool) { + s.KeepSniBlank = val +} + +// SetVlessRouteId sets the value of VlessRouteId. +func (s *UpdateManyHostsRequest) SetVlessRouteId(val OptNilInt) { + s.VlessRouteId = val +} + +// SetPinnedPeerCertSha256 sets the value of PinnedPeerCertSha256. +func (s *UpdateManyHostsRequest) SetPinnedPeerCertSha256(val OptNilString) { + s.PinnedPeerCertSha256 = val +} + +// SetVerifyPeerCertByName sets the value of VerifyPeerCertByName. +func (s *UpdateManyHostsRequest) SetVerifyPeerCertByName(val OptNilString) { + s.VerifyPeerCertByName = val +} + +// SetShuffleHost sets the value of ShuffleHost. +func (s *UpdateManyHostsRequest) SetShuffleHost(val OptBool) { + s.ShuffleHost = val +} + +// SetMihomoX25519 sets the value of MihomoX25519. +func (s *UpdateManyHostsRequest) SetMihomoX25519(val OptBool) { + s.MihomoX25519 = val +} + +// SetMihomoIpVersion sets the value of MihomoIpVersion. +func (s *UpdateManyHostsRequest) SetMihomoIpVersion(val OptNilUpdateManyHostsRequestMihomoIpVersion) { + s.MihomoIpVersion = val +} + +// SetNodes sets the value of Nodes. +func (s *UpdateManyHostsRequest) SetNodes(val []uuid.UUID) { + s.Nodes = val +} + +// SetXrayJsonTemplateUuid sets the value of XrayJsonTemplateUuid. +func (s *UpdateManyHostsRequest) SetXrayJsonTemplateUuid(val OptNilUUID) { + s.XrayJsonTemplateUuid = val +} + +// SetExcludedInternalSquads sets the value of ExcludedInternalSquads. +func (s *UpdateManyHostsRequest) SetExcludedInternalSquads(val []uuid.UUID) { + s.ExcludedInternalSquads = val +} + +// SetExcludeFromSubscriptionTypes sets the value of ExcludeFromSubscriptionTypes. +func (s *UpdateManyHostsRequest) SetExcludeFromSubscriptionTypes(val []UpdateManyHostsRequestExcludeFromSubscriptionTypesItem) { + s.ExcludeFromSubscriptionTypes = val +} + +// SetUuids sets the value of Uuids. +func (s *UpdateManyHostsRequest) SetUuids(val []uuid.UUID) { + s.Uuids = val +} + +type UpdateManyHostsRequestAlpn string + +const ( + UpdateManyHostsRequestAlpnH3 UpdateManyHostsRequestAlpn = "h3" + UpdateManyHostsRequestAlpnH2 UpdateManyHostsRequestAlpn = "h2" + UpdateManyHostsRequestAlpnHTTP11 UpdateManyHostsRequestAlpn = "http/1.1" + UpdateManyHostsRequestAlpnH2HTTP11 UpdateManyHostsRequestAlpn = "h2,http/1.1" + UpdateManyHostsRequestAlpnH3H2HTTP11 UpdateManyHostsRequestAlpn = "h3,h2,http/1.1" + UpdateManyHostsRequestAlpnH3H2 UpdateManyHostsRequestAlpn = "h3,h2" +) + +// AllValues returns all UpdateManyHostsRequestAlpn values. +func (UpdateManyHostsRequestAlpn) AllValues() []UpdateManyHostsRequestAlpn { + return []UpdateManyHostsRequestAlpn{ + UpdateManyHostsRequestAlpnH3, + UpdateManyHostsRequestAlpnH2, + UpdateManyHostsRequestAlpnHTTP11, + UpdateManyHostsRequestAlpnH2HTTP11, + UpdateManyHostsRequestAlpnH3H2HTTP11, + UpdateManyHostsRequestAlpnH3H2, + } +} + +// MarshalText implements encoding.TextMarshaler. +func (s UpdateManyHostsRequestAlpn) MarshalText() ([]byte, error) { + switch s { + case UpdateManyHostsRequestAlpnH3: + return []byte(s), nil + case UpdateManyHostsRequestAlpnH2: + return []byte(s), nil + case UpdateManyHostsRequestAlpnHTTP11: + return []byte(s), nil + case UpdateManyHostsRequestAlpnH2HTTP11: + return []byte(s), nil + case UpdateManyHostsRequestAlpnH3H2HTTP11: + return []byte(s), nil + case UpdateManyHostsRequestAlpnH3H2: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *UpdateManyHostsRequestAlpn) UnmarshalText(data []byte) error { + switch UpdateManyHostsRequestAlpn(data) { + case UpdateManyHostsRequestAlpnH3: + *s = UpdateManyHostsRequestAlpnH3 + return nil + case UpdateManyHostsRequestAlpnH2: + *s = UpdateManyHostsRequestAlpnH2 + return nil + case UpdateManyHostsRequestAlpnHTTP11: + *s = UpdateManyHostsRequestAlpnHTTP11 + return nil + case UpdateManyHostsRequestAlpnH2HTTP11: + *s = UpdateManyHostsRequestAlpnH2HTTP11 + return nil + case UpdateManyHostsRequestAlpnH3H2HTTP11: + *s = UpdateManyHostsRequestAlpnH3H2HTTP11 + return nil + case UpdateManyHostsRequestAlpnH3H2: + *s = UpdateManyHostsRequestAlpnH3H2 + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +type UpdateManyHostsRequestExcludeFromSubscriptionTypesItem string + +const ( + UpdateManyHostsRequestExcludeFromSubscriptionTypesItemXRAYJSON UpdateManyHostsRequestExcludeFromSubscriptionTypesItem = "XRAY_JSON" + UpdateManyHostsRequestExcludeFromSubscriptionTypesItemXRAYBASE64 UpdateManyHostsRequestExcludeFromSubscriptionTypesItem = "XRAY_BASE64" + UpdateManyHostsRequestExcludeFromSubscriptionTypesItemMIHOMO UpdateManyHostsRequestExcludeFromSubscriptionTypesItem = "MIHOMO" + UpdateManyHostsRequestExcludeFromSubscriptionTypesItemSTASH UpdateManyHostsRequestExcludeFromSubscriptionTypesItem = "STASH" + UpdateManyHostsRequestExcludeFromSubscriptionTypesItemCLASH UpdateManyHostsRequestExcludeFromSubscriptionTypesItem = "CLASH" + UpdateManyHostsRequestExcludeFromSubscriptionTypesItemSINGBOX UpdateManyHostsRequestExcludeFromSubscriptionTypesItem = "SINGBOX" +) + +// AllValues returns all UpdateManyHostsRequestExcludeFromSubscriptionTypesItem values. +func (UpdateManyHostsRequestExcludeFromSubscriptionTypesItem) AllValues() []UpdateManyHostsRequestExcludeFromSubscriptionTypesItem { + return []UpdateManyHostsRequestExcludeFromSubscriptionTypesItem{ + UpdateManyHostsRequestExcludeFromSubscriptionTypesItemXRAYJSON, + UpdateManyHostsRequestExcludeFromSubscriptionTypesItemXRAYBASE64, + UpdateManyHostsRequestExcludeFromSubscriptionTypesItemMIHOMO, + UpdateManyHostsRequestExcludeFromSubscriptionTypesItemSTASH, + UpdateManyHostsRequestExcludeFromSubscriptionTypesItemCLASH, + UpdateManyHostsRequestExcludeFromSubscriptionTypesItemSINGBOX, + } +} + +// MarshalText implements encoding.TextMarshaler. +func (s UpdateManyHostsRequestExcludeFromSubscriptionTypesItem) MarshalText() ([]byte, error) { + switch s { + case UpdateManyHostsRequestExcludeFromSubscriptionTypesItemXRAYJSON: + return []byte(s), nil + case UpdateManyHostsRequestExcludeFromSubscriptionTypesItemXRAYBASE64: + return []byte(s), nil + case UpdateManyHostsRequestExcludeFromSubscriptionTypesItemMIHOMO: + return []byte(s), nil + case UpdateManyHostsRequestExcludeFromSubscriptionTypesItemSTASH: + return []byte(s), nil + case UpdateManyHostsRequestExcludeFromSubscriptionTypesItemCLASH: + return []byte(s), nil + case UpdateManyHostsRequestExcludeFromSubscriptionTypesItemSINGBOX: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *UpdateManyHostsRequestExcludeFromSubscriptionTypesItem) UnmarshalText(data []byte) error { + switch UpdateManyHostsRequestExcludeFromSubscriptionTypesItem(data) { + case UpdateManyHostsRequestExcludeFromSubscriptionTypesItemXRAYJSON: + *s = UpdateManyHostsRequestExcludeFromSubscriptionTypesItemXRAYJSON + return nil + case UpdateManyHostsRequestExcludeFromSubscriptionTypesItemXRAYBASE64: + *s = UpdateManyHostsRequestExcludeFromSubscriptionTypesItemXRAYBASE64 + return nil + case UpdateManyHostsRequestExcludeFromSubscriptionTypesItemMIHOMO: + *s = UpdateManyHostsRequestExcludeFromSubscriptionTypesItemMIHOMO + return nil + case UpdateManyHostsRequestExcludeFromSubscriptionTypesItemSTASH: + *s = UpdateManyHostsRequestExcludeFromSubscriptionTypesItemSTASH + return nil + case UpdateManyHostsRequestExcludeFromSubscriptionTypesItemCLASH: + *s = UpdateManyHostsRequestExcludeFromSubscriptionTypesItemCLASH + return nil + case UpdateManyHostsRequestExcludeFromSubscriptionTypesItemSINGBOX: + *s = UpdateManyHostsRequestExcludeFromSubscriptionTypesItemSINGBOX + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +type UpdateManyHostsRequestMihomoIpVersion string + +const ( + UpdateManyHostsRequestMihomoIpVersionDual UpdateManyHostsRequestMihomoIpVersion = "dual" + UpdateManyHostsRequestMihomoIpVersionIpv4 UpdateManyHostsRequestMihomoIpVersion = "ipv4" + UpdateManyHostsRequestMihomoIpVersionIpv6 UpdateManyHostsRequestMihomoIpVersion = "ipv6" + UpdateManyHostsRequestMihomoIpVersionIpv4Prefer UpdateManyHostsRequestMihomoIpVersion = "ipv4-prefer" + UpdateManyHostsRequestMihomoIpVersionIpv6Prefer UpdateManyHostsRequestMihomoIpVersion = "ipv6-prefer" +) + +// AllValues returns all UpdateManyHostsRequestMihomoIpVersion values. +func (UpdateManyHostsRequestMihomoIpVersion) AllValues() []UpdateManyHostsRequestMihomoIpVersion { + return []UpdateManyHostsRequestMihomoIpVersion{ + UpdateManyHostsRequestMihomoIpVersionDual, + UpdateManyHostsRequestMihomoIpVersionIpv4, + UpdateManyHostsRequestMihomoIpVersionIpv6, + UpdateManyHostsRequestMihomoIpVersionIpv4Prefer, + UpdateManyHostsRequestMihomoIpVersionIpv6Prefer, + } +} + +// MarshalText implements encoding.TextMarshaler. +func (s UpdateManyHostsRequestMihomoIpVersion) MarshalText() ([]byte, error) { + switch s { + case UpdateManyHostsRequestMihomoIpVersionDual: + return []byte(s), nil + case UpdateManyHostsRequestMihomoIpVersionIpv4: + return []byte(s), nil + case UpdateManyHostsRequestMihomoIpVersionIpv6: + return []byte(s), nil + case UpdateManyHostsRequestMihomoIpVersionIpv4Prefer: + return []byte(s), nil + case UpdateManyHostsRequestMihomoIpVersionIpv6Prefer: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *UpdateManyHostsRequestMihomoIpVersion) UnmarshalText(data []byte) error { + switch UpdateManyHostsRequestMihomoIpVersion(data) { + case UpdateManyHostsRequestMihomoIpVersionDual: + *s = UpdateManyHostsRequestMihomoIpVersionDual + return nil + case UpdateManyHostsRequestMihomoIpVersionIpv4: + *s = UpdateManyHostsRequestMihomoIpVersionIpv4 + return nil + case UpdateManyHostsRequestMihomoIpVersionIpv6: + *s = UpdateManyHostsRequestMihomoIpVersionIpv6 + return nil + case UpdateManyHostsRequestMihomoIpVersionIpv4Prefer: + *s = UpdateManyHostsRequestMihomoIpVersionIpv4Prefer + return nil + case UpdateManyHostsRequestMihomoIpVersionIpv6Prefer: + *s = UpdateManyHostsRequestMihomoIpVersionIpv6Prefer + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +type UpdateManyHostsRequestSecurityLayer string + +const ( + UpdateManyHostsRequestSecurityLayerDEFAULT UpdateManyHostsRequestSecurityLayer = "DEFAULT" + UpdateManyHostsRequestSecurityLayerTLS UpdateManyHostsRequestSecurityLayer = "TLS" + UpdateManyHostsRequestSecurityLayerNONE UpdateManyHostsRequestSecurityLayer = "NONE" +) + +// AllValues returns all UpdateManyHostsRequestSecurityLayer values. +func (UpdateManyHostsRequestSecurityLayer) AllValues() []UpdateManyHostsRequestSecurityLayer { + return []UpdateManyHostsRequestSecurityLayer{ + UpdateManyHostsRequestSecurityLayerDEFAULT, + UpdateManyHostsRequestSecurityLayerTLS, + UpdateManyHostsRequestSecurityLayerNONE, + } +} + +// MarshalText implements encoding.TextMarshaler. +func (s UpdateManyHostsRequestSecurityLayer) MarshalText() ([]byte, error) { + switch s { + case UpdateManyHostsRequestSecurityLayerDEFAULT: + return []byte(s), nil + case UpdateManyHostsRequestSecurityLayerTLS: + return []byte(s), nil + case UpdateManyHostsRequestSecurityLayerNONE: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *UpdateManyHostsRequestSecurityLayer) UnmarshalText(data []byte) error { + switch UpdateManyHostsRequestSecurityLayer(data) { + case UpdateManyHostsRequestSecurityLayerDEFAULT: + *s = UpdateManyHostsRequestSecurityLayerDEFAULT + return nil + case UpdateManyHostsRequestSecurityLayerTLS: + *s = UpdateManyHostsRequestSecurityLayerTLS + return nil + case UpdateManyHostsRequestSecurityLayerNONE: + *s = UpdateManyHostsRequestSecurityLayerNONE + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + // Ref: #/components/schemas/UpdateNodePluginRequest type UpdateNodePluginRequest struct { UUID uuid.UUID `json:"uuid"` @@ -21232,20 +23023,23 @@ func (s *UpdateNodePluginRequest) SetPluginConfig(val jx.Raw) { // Ref: #/components/schemas/UpdateNodeRequest type UpdateNodeRequest struct { - UUID uuid.UUID `json:"uuid"` - Name OptString `json:"name"` - Address OptString `json:"address"` - Port OptFloat64 `json:"port"` - IsTrafficTrackingActive OptBool `json:"isTrafficTrackingActive"` - TrafficLimitBytes OptFloat64 `json:"trafficLimitBytes"` - NotifyPercent OptFloat64 `json:"notifyPercent"` - TrafficResetDay OptFloat64 `json:"trafficResetDay"` - CountryCode OptString `json:"countryCode"` - ConsumptionMultiplier OptFloat64 `json:"consumptionMultiplier"` - ConfigProfile OptConfigProfileRef `json:"configProfile"` - ProviderUuid OptNilUUID `json:"providerUuid"` - Tags []string `json:"tags"` - ActivePluginUuid OptNilUUID `json:"activePluginUuid"` + UUID uuid.UUID `json:"uuid"` + Name OptString `json:"name"` + Address OptString `json:"address"` + Port OptFloat64 `json:"port"` + ProxyUrl OptNilString `json:"proxyUrl"` + IsTrafficTrackingActive OptBool `json:"isTrafficTrackingActive"` + TrafficLimitBytes OptFloat64 `json:"trafficLimitBytes"` + NotifyPercent OptFloat64 `json:"notifyPercent"` + TrafficResetDay OptFloat64 `json:"trafficResetDay"` + CountryCode OptString `json:"countryCode"` + ConsumptionMultiplier OptFloat64 `json:"consumptionMultiplier"` + NodeConsumptionMultiplier OptFloat64 `json:"nodeConsumptionMultiplier"` + ConfigProfile OptConfigProfileRef `json:"configProfile"` + ProviderUuid OptNilUUID `json:"providerUuid"` + Tags []string `json:"tags"` + ActivePluginUuid OptNilUUID `json:"activePluginUuid"` + Note OptNilString `json:"note"` } // GetUUID returns the value of UUID. @@ -21268,6 +23062,11 @@ func (s *UpdateNodeRequest) GetPort() OptFloat64 { return s.Port } +// GetProxyUrl returns the value of ProxyUrl. +func (s *UpdateNodeRequest) GetProxyUrl() OptNilString { + return s.ProxyUrl +} + // GetIsTrafficTrackingActive returns the value of IsTrafficTrackingActive. func (s *UpdateNodeRequest) GetIsTrafficTrackingActive() OptBool { return s.IsTrafficTrackingActive @@ -21298,6 +23097,11 @@ func (s *UpdateNodeRequest) GetConsumptionMultiplier() OptFloat64 { return s.ConsumptionMultiplier } +// GetNodeConsumptionMultiplier returns the value of NodeConsumptionMultiplier. +func (s *UpdateNodeRequest) GetNodeConsumptionMultiplier() OptFloat64 { + return s.NodeConsumptionMultiplier +} + // GetConfigProfile returns the value of ConfigProfile. func (s *UpdateNodeRequest) GetConfigProfile() OptConfigProfileRef { return s.ConfigProfile @@ -21318,6 +23122,11 @@ func (s *UpdateNodeRequest) GetActivePluginUuid() OptNilUUID { return s.ActivePluginUuid } +// GetNote returns the value of Note. +func (s *UpdateNodeRequest) GetNote() OptNilString { + return s.Note +} + // SetUUID sets the value of UUID. func (s *UpdateNodeRequest) SetUUID(val uuid.UUID) { s.UUID = val @@ -21338,6 +23147,11 @@ func (s *UpdateNodeRequest) SetPort(val OptFloat64) { s.Port = val } +// SetProxyUrl sets the value of ProxyUrl. +func (s *UpdateNodeRequest) SetProxyUrl(val OptNilString) { + s.ProxyUrl = val +} + // SetIsTrafficTrackingActive sets the value of IsTrafficTrackingActive. func (s *UpdateNodeRequest) SetIsTrafficTrackingActive(val OptBool) { s.IsTrafficTrackingActive = val @@ -21368,6 +23182,11 @@ func (s *UpdateNodeRequest) SetConsumptionMultiplier(val OptFloat64) { s.ConsumptionMultiplier = val } +// SetNodeConsumptionMultiplier sets the value of NodeConsumptionMultiplier. +func (s *UpdateNodeRequest) SetNodeConsumptionMultiplier(val OptFloat64) { + s.NodeConsumptionMultiplier = val +} + // SetConfigProfile sets the value of ConfigProfile. func (s *UpdateNodeRequest) SetConfigProfile(val OptConfigProfileRef) { s.ConfigProfile = val @@ -21388,6 +23207,11 @@ func (s *UpdateNodeRequest) SetActivePluginUuid(val OptNilUUID) { s.ActivePluginUuid = val } +// SetNote sets the value of Note. +func (s *UpdateNodeRequest) SetNote(val OptNilString) { + s.Note = val +} + // Ref: #/components/schemas/UpdatePasskeyRequest type UpdatePasskeyRequest struct { ID string `json:"id"` @@ -21727,7 +23551,7 @@ type UpdateUserRequest struct { UUID OptUUID `json:"uuid"` Status OptUpdateUserRequestStatus `json:"status"` // Traffic limit in bytes. 0 - unlimited. - TrafficLimitBytes OptInt `json:"trafficLimitBytes"` + TrafficLimitBytes OptFloat64 `json:"trafficLimitBytes"` // Available reset periods. TrafficLimitStrategy OptUpdateUserRequestTrafficLimitStrategy `json:"trafficLimitStrategy"` // Expiration date: 2025-01-17T15:38:45.065Z. @@ -21758,7 +23582,7 @@ func (s *UpdateUserRequest) GetStatus() OptUpdateUserRequestStatus { } // GetTrafficLimitBytes returns the value of TrafficLimitBytes. -func (s *UpdateUserRequest) GetTrafficLimitBytes() OptInt { +func (s *UpdateUserRequest) GetTrafficLimitBytes() OptFloat64 { return s.TrafficLimitBytes } @@ -21823,7 +23647,7 @@ func (s *UpdateUserRequest) SetStatus(val OptUpdateUserRequestStatus) { } // SetTrafficLimitBytes sets the value of TrafficLimitBytes. -func (s *UpdateUserRequest) SetTrafficLimitBytes(val OptInt) { +func (s *UpdateUserRequest) SetTrafficLimitBytes(val OptFloat64) { s.TrafficLimitBytes = val } @@ -22264,7 +24088,7 @@ type UserItemInfo struct { ShortUuid string `json:"shortUuid"` Username string `json:"username"` Status OptUserItemInfoStatus `json:"status"` - TrafficLimitBytes OptInt `json:"trafficLimitBytes"` + TrafficLimitBytes OptFloat64 `json:"trafficLimitBytes"` // Available reset periods. TrafficLimitStrategy OptUserItemInfoTrafficLimitStrategy `json:"trafficLimitStrategy"` ExpireAt time.Time `json:"expireAt"` @@ -22313,7 +24137,7 @@ func (s *UserItemInfo) GetStatus() OptUserItemInfoStatus { } // GetTrafficLimitBytes returns the value of TrafficLimitBytes. -func (s *UserItemInfo) GetTrafficLimitBytes() OptInt { +func (s *UserItemInfo) GetTrafficLimitBytes() OptFloat64 { return s.TrafficLimitBytes } @@ -22438,7 +24262,7 @@ func (s *UserItemInfo) SetStatus(val OptUserItemInfoStatus) { } // SetTrafficLimitBytes sets the value of TrafficLimitBytes. -func (s *UserItemInfo) SetTrafficLimitBytes(val OptInt) { +func (s *UserItemInfo) SetTrafficLimitBytes(val OptFloat64) { s.TrafficLimitBytes = val } diff --git a/api/oas_security_gen.go b/api/oas_security_gen.go index b197e62..e87b787 100644 --- a/api/oas_security_gen.go +++ b/api/oas_security_gen.go @@ -21,8 +21,10 @@ var operationRolesAuthorization = map[string][]string{ ApiTokensCreateOperation: []string{}, ApiTokensDeleteOperation: []string{}, ApiTokensFindAllOperation: []string{}, + ApiTokensGetScopesOperation: []string{}, BandwidthStatsNodesGetNodeUserUsageOperation: []string{}, BandwidthStatsNodesGetStatsNodeUsersUsageOperation: []string{}, + BandwidthStatsNodesGetStatsNodesUsersUsageOperation: []string{}, BandwidthStatsUsersGetStatsNodesUsageOperation: []string{}, BandwidthStatsUsersGetUserUsageByRangeOperation: []string{}, ConfigProfileCreateConfigProfileOperation: []string{}, @@ -45,7 +47,6 @@ var operationRolesAuthorization = map[string][]string{ HostsBulkActionsDeleteHostsOperation: []string{}, HostsBulkActionsDisableHostsOperation: []string{}, HostsBulkActionsEnableHostsOperation: []string{}, - HostsBulkActionsSetInboundToHostsOperation: []string{}, HostsBulkActionsSetPortToHostsOperation: []string{}, HostsCreateHostOperation: []string{}, HostsDeleteHostOperation: []string{}, @@ -150,7 +151,6 @@ var operationRolesAuthorization = map[string][]string{ SubscriptionsGetSubscriptionByUsernameOperation: []string{}, SubscriptionsGetSubscriptionByUuidOperation: []string{}, SystemDebugSrrMatcherOperation: []string{}, - SystemEncryptHappCryptoLinkOperation: []string{}, SystemGetBandwidthStatsOperation: []string{}, SystemGetMetadataOperation: []string{}, SystemGetNodesMetricsOperation: []string{}, @@ -189,6 +189,7 @@ var operationRolesAuthorization = map[string][]string{ UsersGetUserSubscriptionRequestHistoryOperation: []string{}, UsersGetUsersByEmailOperation: []string{}, UsersGetUsersByTagOperation: []string{}, + UsersGetUsersStreamOperation: []string{}, UsersResetUserTrafficOperation: []string{}, UsersResolveUserOperation: []string{}, UsersRevokeUserSubscriptionOperation: []string{}, diff --git a/api/oas_test_examples_gen_test.go b/api/oas_test_examples_gen_test.go index 6a7302d..95dba7f 100644 --- a/api/oas_test_examples_gen_test.go +++ b/api/oas_test_examples_gen_test.go @@ -695,8 +695,8 @@ func TestCreateHostRequestExcludeFromSubscriptionTypesItem_EncodeDecode(t *testi var typ2 CreateHostRequestExcludeFromSubscriptionTypesItem require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) } -func TestCreateHostRequestFingerprint_EncodeDecode(t *testing.T) { - var typ CreateHostRequestFingerprint +func TestCreateHostRequestMihomoIpVersion_EncodeDecode(t *testing.T) { + var typ CreateHostRequestMihomoIpVersion typ.SetFake() e := jx.Encoder{} @@ -704,7 +704,7 @@ func TestCreateHostRequestFingerprint_EncodeDecode(t *testing.T) { data := e.Bytes() require.True(t, std.Valid(data), "Encoded: %s", data) - var typ2 CreateHostRequestFingerprint + var typ2 CreateHostRequestMihomoIpVersion require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) } func TestCreateHostRequestSecurityLayer_EncodeDecode(t *testing.T) { @@ -1227,8 +1227,8 @@ func TestDropConnectionsRequestTargetNodes1Target_EncodeDecode(t *testing.T) { var typ2 DropConnectionsRequestTargetNodes1Target require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) } -func TestEncryptHappCryptoLinkRequest_EncodeDecode(t *testing.T) { - var typ EncryptHappCryptoLinkRequest +func TestEncryptionItem_EncodeDecode(t *testing.T) { + var typ EncryptionItem typ.SetFake() e := jx.Encoder{} @@ -1236,11 +1236,11 @@ func TestEncryptHappCryptoLinkRequest_EncodeDecode(t *testing.T) { data := e.Bytes() require.True(t, std.Valid(data), "Encoded: %s", data) - var typ2 EncryptHappCryptoLinkRequest + var typ2 EncryptionItem require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) } -func TestEncryptHappCryptoLinkResponse_EncodeDecode(t *testing.T) { - var typ EncryptHappCryptoLinkResponse +func TestEncryptionItemMethod_EncodeDecode(t *testing.T) { + var typ EncryptionItemMethod typ.SetFake() e := jx.Encoder{} @@ -1248,19 +1248,7 @@ func TestEncryptHappCryptoLinkResponse_EncodeDecode(t *testing.T) { data := e.Bytes() require.True(t, std.Valid(data), "Encoded: %s", data) - var typ2 EncryptHappCryptoLinkResponse - require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) -} -func TestEncryptHappCryptoLinkResponseResponse_EncodeDecode(t *testing.T) { - var typ EncryptHappCryptoLinkResponseResponse - typ.SetFake() - - e := jx.Encoder{} - typ.Encode(&e) - data := e.Bytes() - require.True(t, std.Valid(data), "Encoded: %s", data) - - var typ2 EncryptHappCryptoLinkResponseResponse + var typ2 EncryptionItemMethod require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) } func TestEventResponse_EncodeDecode(t *testing.T) { @@ -1493,18 +1481,6 @@ func TestFindAllApiTokensResponseResponse_EncodeDecode(t *testing.T) { var typ2 FindAllApiTokensResponseResponse require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) } -func TestFindAllApiTokensResponseResponseApiKeysItem_EncodeDecode(t *testing.T) { - var typ FindAllApiTokensResponseResponseApiKeysItem - typ.SetFake() - - e := jx.Encoder{} - typ.Encode(&e) - data := e.Bytes() - require.True(t, std.Valid(data), "Encoded: %s", data) - - var typ2 FindAllApiTokensResponseResponseApiKeysItem - require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) -} func TestFindAllApiTokensResponseResponseDocs_EncodeDecode(t *testing.T) { var typ FindAllApiTokensResponseResponseDocs typ.SetFake() @@ -1517,6 +1493,18 @@ func TestFindAllApiTokensResponseResponseDocs_EncodeDecode(t *testing.T) { var typ2 FindAllApiTokensResponseResponseDocs require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) } +func TestFindAllApiTokensResponseResponseTokensItem_EncodeDecode(t *testing.T) { + var typ FindAllApiTokensResponseResponseTokensItem + typ.SetFake() + + e := jx.Encoder{} + typ.Encode(&e) + data := e.Bytes() + require.True(t, std.Valid(data), "Encoded: %s", data) + + var typ2 FindAllApiTokensResponseResponseTokensItem + require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) +} func TestForbiddenError_EncodeDecode(t *testing.T) { var typ ForbiddenError typ.SetFake() @@ -1637,6 +1625,66 @@ func TestGetAllUsersResponseResponse_EncodeDecode(t *testing.T) { var typ2 GetAllUsersResponseResponse require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) } +func TestGetApiTokenScopesResponse_EncodeDecode(t *testing.T) { + var typ GetApiTokenScopesResponse + typ.SetFake() + + e := jx.Encoder{} + typ.Encode(&e) + data := e.Bytes() + require.True(t, std.Valid(data), "Encoded: %s", data) + + var typ2 GetApiTokenScopesResponse + require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) +} +func TestGetApiTokenScopesResponseResponse_EncodeDecode(t *testing.T) { + var typ GetApiTokenScopesResponseResponse + typ.SetFake() + + e := jx.Encoder{} + typ.Encode(&e) + data := e.Bytes() + require.True(t, std.Valid(data), "Encoded: %s", data) + + var typ2 GetApiTokenScopesResponseResponse + require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) +} +func TestGetApiTokenScopesResponseResponseResourcesItem_EncodeDecode(t *testing.T) { + var typ GetApiTokenScopesResponseResponseResourcesItem + typ.SetFake() + + e := jx.Encoder{} + typ.Encode(&e) + data := e.Bytes() + require.True(t, std.Valid(data), "Encoded: %s", data) + + var typ2 GetApiTokenScopesResponseResponseResourcesItem + require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) +} +func TestGetApiTokenScopesResponseResponseResourcesItemEndpointsItem_EncodeDecode(t *testing.T) { + var typ GetApiTokenScopesResponseResponseResourcesItemEndpointsItem + typ.SetFake() + + e := jx.Encoder{} + typ.Encode(&e) + data := e.Bytes() + require.True(t, std.Valid(data), "Encoded: %s", data) + + var typ2 GetApiTokenScopesResponseResponseResourcesItemEndpointsItem + require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) +} +func TestGetApiTokenScopesResponseResponseResourcesItemEndpointsItemKind_EncodeDecode(t *testing.T) { + var typ GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKind + typ.SetFake() + + e := jx.Encoder{} + typ.Encode(&e) + data := e.Bytes() + require.True(t, std.Valid(data), "Encoded: %s", data) + + var typ2 GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKind + require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) +} func TestGetBandwidthStatsResponse_EncodeDecode(t *testing.T) { var typ GetBandwidthStatsResponse typ.SetFake() @@ -2045,6 +2093,18 @@ func TestGetRawSubscriptionByShortUuidResponseResponseConvertedUserInfo_EncodeDe var typ2 GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfo require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) } +func TestGetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup_EncodeDecode(t *testing.T) { + var typ GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup + typ.SetFake() + + e := jx.Encoder{} + typ.Encode(&e) + data := e.Bytes() + require.True(t, std.Valid(data), "Encoded: %s", data) + + var typ2 GetRawSubscriptionByShortUuidResponseResponseConvertedUserInfoHwidCheckup + require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) +} func TestGetRawSubscriptionByShortUuidResponseResponseHeaders_EncodeDecode(t *testing.T) { var typ GetRawSubscriptionByShortUuidResponseResponseHeaders typ = make(GetRawSubscriptionByShortUuidResponseResponseHeaders) @@ -2083,6 +2143,18 @@ func TestGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemCl var typ2 GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverrides require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) } +func TestGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion_EncodeDecode(t *testing.T) { + var typ GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion + typ.SetFake() + + e := jx.Encoder{} + typ.Encode(&e) + data := e.Bytes() + require.True(t, std.Valid(data), "Encoded: %s", data) + + var typ2 GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion + require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) +} func TestGetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemMetadata_EncodeDecode(t *testing.T) { var typ GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemMetadata typ.SetFake() @@ -2609,8 +2681,8 @@ func TestGetRemnawaveHealthResponseResponseRuntimeMetricsItem_EncodeDecode(t *te var typ2 GetRemnawaveHealthResponseResponseRuntimeMetricsItem require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) } -func TestGetStatsNodeUsersUsageResponse_EncodeDecode(t *testing.T) { - var typ GetStatsNodeUsersUsageResponse +func TestGetStatsNodesUsersUsageRequest_EncodeDecode(t *testing.T) { + var typ GetStatsNodesUsersUsageRequest typ.SetFake() e := jx.Encoder{} @@ -2618,31 +2690,7 @@ func TestGetStatsNodeUsersUsageResponse_EncodeDecode(t *testing.T) { data := e.Bytes() require.True(t, std.Valid(data), "Encoded: %s", data) - var typ2 GetStatsNodeUsersUsageResponse - require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) -} -func TestGetStatsNodeUsersUsageResponseResponse_EncodeDecode(t *testing.T) { - var typ GetStatsNodeUsersUsageResponseResponse - typ.SetFake() - - e := jx.Encoder{} - typ.Encode(&e) - data := e.Bytes() - require.True(t, std.Valid(data), "Encoded: %s", data) - - var typ2 GetStatsNodeUsersUsageResponseResponse - require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) -} -func TestGetStatsNodeUsersUsageResponseResponseTopUsersItem_EncodeDecode(t *testing.T) { - var typ GetStatsNodeUsersUsageResponseResponseTopUsersItem - typ.SetFake() - - e := jx.Encoder{} - typ.Encode(&e) - data := e.Bytes() - require.True(t, std.Valid(data), "Encoded: %s", data) - - var typ2 GetStatsNodeUsersUsageResponseResponseTopUsersItem + var typ2 GetStatsNodesUsersUsageRequest require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) } func TestGetStatsResponse_EncodeDecode(t *testing.T) { @@ -3059,6 +3107,30 @@ func TestGetUserSubscriptionRequestHistoryResponse_EncodeDecode(t *testing.T) { var typ2 GetUserSubscriptionRequestHistoryResponse require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) } +func TestGetUsersStreamResponse_EncodeDecode(t *testing.T) { + var typ GetUsersStreamResponse + typ.SetFake() + + e := jx.Encoder{} + typ.Encode(&e) + data := e.Bytes() + require.True(t, std.Valid(data), "Encoded: %s", data) + + var typ2 GetUsersStreamResponse + require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) +} +func TestGetUsersStreamResponseResponse_EncodeDecode(t *testing.T) { + var typ GetUsersStreamResponseResponse + typ.SetFake() + + e := jx.Encoder{} + typ.Encode(&e) + data := e.Bytes() + require.True(t, std.Valid(data), "Encoded: %s", data) + + var typ2 GetUsersStreamResponseResponse + require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) +} func TestGithub_EncodeDecode(t *testing.T) { var typ Github typ.SetFake() @@ -3095,6 +3167,18 @@ func TestHostItem_EncodeDecode(t *testing.T) { var typ2 HostItem require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) } +func TestHostItemAlpn_EncodeDecode(t *testing.T) { + var typ HostItemAlpn + typ.SetFake() + + e := jx.Encoder{} + typ.Encode(&e) + data := e.Bytes() + require.True(t, std.Valid(data), "Encoded: %s", data) + + var typ2 HostItemAlpn + require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) +} func TestHostItemExcludeFromSubscriptionTypesItem_EncodeDecode(t *testing.T) { var typ HostItemExcludeFromSubscriptionTypesItem typ.SetFake() @@ -3107,6 +3191,18 @@ func TestHostItemExcludeFromSubscriptionTypesItem_EncodeDecode(t *testing.T) { var typ2 HostItemExcludeFromSubscriptionTypesItem require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) } +func TestHostItemMihomoIpVersion_EncodeDecode(t *testing.T) { + var typ HostItemMihomoIpVersion + typ.SetFake() + + e := jx.Encoder{} + typ.Encode(&e) + data := e.Bytes() + require.True(t, std.Valid(data), "Encoded: %s", data) + + var typ2 HostItemMihomoIpVersion + require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) +} func TestHostItemSecurityLayer_EncodeDecode(t *testing.T) { var typ HostItemSecurityLayer typ.SetFake() @@ -3275,6 +3371,18 @@ func TestInfraProviderResponseResponse_EncodeDecode(t *testing.T) { var typ2 InfraProviderResponseResponse require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) } +func TestInfraProvidersDetail_EncodeDecode(t *testing.T) { + var typ InfraProvidersDetail + typ.SetFake() + + e := jx.Encoder{} + typ.Encode(&e) + data := e.Bytes() + require.True(t, std.Valid(data), "Encoded: %s", data) + + var typ2 InfraProvidersDetail + require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) +} func TestInterfaceItem_EncodeDecode(t *testing.T) { var typ InterfaceItem typ.SetFake() @@ -3491,6 +3599,18 @@ func TestNodePluginsResponseResponseResponse_EncodeDecode(t *testing.T) { var typ2 NodePluginsResponseResponseResponse require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) } +func TestNodeRequestBodyRequest_EncodeDecode(t *testing.T) { + var typ NodeRequestBodyRequest + typ.SetFake() + + e := jx.Encoder{} + typ.Encode(&e) + data := e.Bytes() + require.True(t, std.Valid(data), "Encoded: %s", data) + + var typ2 NodeRequestBodyRequest + require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) +} func TestNodeResponse_EncodeDecode(t *testing.T) { var typ NodeResponse typ.SetFake() @@ -4115,18 +4235,6 @@ func TestResponseRulesVersion_EncodeDecode(t *testing.T) { var typ2 ResponseRulesVersion require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) } -func TestRestartAllNodesRequestBody_EncodeDecode(t *testing.T) { - var typ RestartAllNodesRequestBody - typ.SetFake() - - e := jx.Encoder{} - typ.Encode(&e) - data := e.Bytes() - require.True(t, std.Valid(data), "Encoded: %s", data) - - var typ2 RestartAllNodesRequestBody - require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) -} func TestRevokeUserSubscriptionBody_EncodeDecode(t *testing.T) { var typ RevokeUserSubscriptionBody typ.SetFake() @@ -4175,30 +4283,6 @@ func TestRuleResponseType_EncodeDecode(t *testing.T) { var typ2 RuleResponseType require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) } -func TestSetInboundToManyHostsRequest_EncodeDecode(t *testing.T) { - var typ SetInboundToManyHostsRequest - typ.SetFake() - - e := jx.Encoder{} - typ.Encode(&e) - data := e.Bytes() - require.True(t, std.Valid(data), "Encoded: %s", data) - - var typ2 SetInboundToManyHostsRequest - require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) -} -func TestSetPortToManyHostsRequest_EncodeDecode(t *testing.T) { - var typ SetPortToManyHostsRequest - typ.SetFake() - - e := jx.Encoder{} - typ.Encode(&e) - data := e.Bytes() - require.True(t, std.Valid(data), "Encoded: %s", data) - - var typ2 SetPortToManyHostsRequest - require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) -} func TestSettingsResponse_EncodeDecode(t *testing.T) { var typ SettingsResponse typ.SetFake() @@ -4295,6 +4379,42 @@ func TestStat_EncodeDecode(t *testing.T) { var typ2 Stat require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) } +func TestStatsNodeUsersUsageResponseResponse_EncodeDecode(t *testing.T) { + var typ StatsNodeUsersUsageResponseResponse + typ.SetFake() + + e := jx.Encoder{} + typ.Encode(&e) + data := e.Bytes() + require.True(t, std.Valid(data), "Encoded: %s", data) + + var typ2 StatsNodeUsersUsageResponseResponse + require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) +} +func TestStatsNodeUsersUsageResponseResponseResponse_EncodeDecode(t *testing.T) { + var typ StatsNodeUsersUsageResponseResponseResponse + typ.SetFake() + + e := jx.Encoder{} + typ.Encode(&e) + data := e.Bytes() + require.True(t, std.Valid(data), "Encoded: %s", data) + + var typ2 StatsNodeUsersUsageResponseResponseResponse + require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) +} +func TestStatsNodeUsersUsageResponseResponseResponseTopUsersItem_EncodeDecode(t *testing.T) { + var typ StatsNodeUsersUsageResponseResponseResponseTopUsersItem + typ.SetFake() + + e := jx.Encoder{} + typ.Encode(&e) + data := e.Bytes() + require.True(t, std.Valid(data), "Encoded: %s", data) + + var typ2 StatsNodeUsersUsageResponseResponseResponseTopUsersItem + require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) +} func TestStatsUserUsageResponseResponse_EncodeDecode(t *testing.T) { var typ StatsUserUsageResponseResponse typ.SetFake() @@ -4781,8 +4901,8 @@ func TestUpdateHostRequestExcludeFromSubscriptionTypesItem_EncodeDecode(t *testi var typ2 UpdateHostRequestExcludeFromSubscriptionTypesItem require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) } -func TestUpdateHostRequestFingerprint_EncodeDecode(t *testing.T) { - var typ UpdateHostRequestFingerprint +func TestUpdateHostRequestMihomoIpVersion_EncodeDecode(t *testing.T) { + var typ UpdateHostRequestMihomoIpVersion typ.SetFake() e := jx.Encoder{} @@ -4790,7 +4910,7 @@ func TestUpdateHostRequestFingerprint_EncodeDecode(t *testing.T) { data := e.Bytes() require.True(t, std.Valid(data), "Encoded: %s", data) - var typ2 UpdateHostRequestFingerprint + var typ2 UpdateHostRequestMihomoIpVersion require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) } func TestUpdateHostRequestSecurityLayer_EncodeDecode(t *testing.T) { @@ -4841,6 +4961,66 @@ func TestUpdateInternalSquadRequest_EncodeDecode(t *testing.T) { var typ2 UpdateInternalSquadRequest require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) } +func TestUpdateManyHostsRequest_EncodeDecode(t *testing.T) { + var typ UpdateManyHostsRequest + typ.SetFake() + + e := jx.Encoder{} + typ.Encode(&e) + data := e.Bytes() + require.True(t, std.Valid(data), "Encoded: %s", data) + + var typ2 UpdateManyHostsRequest + require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) +} +func TestUpdateManyHostsRequestAlpn_EncodeDecode(t *testing.T) { + var typ UpdateManyHostsRequestAlpn + typ.SetFake() + + e := jx.Encoder{} + typ.Encode(&e) + data := e.Bytes() + require.True(t, std.Valid(data), "Encoded: %s", data) + + var typ2 UpdateManyHostsRequestAlpn + require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) +} +func TestUpdateManyHostsRequestExcludeFromSubscriptionTypesItem_EncodeDecode(t *testing.T) { + var typ UpdateManyHostsRequestExcludeFromSubscriptionTypesItem + typ.SetFake() + + e := jx.Encoder{} + typ.Encode(&e) + data := e.Bytes() + require.True(t, std.Valid(data), "Encoded: %s", data) + + var typ2 UpdateManyHostsRequestExcludeFromSubscriptionTypesItem + require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) +} +func TestUpdateManyHostsRequestMihomoIpVersion_EncodeDecode(t *testing.T) { + var typ UpdateManyHostsRequestMihomoIpVersion + typ.SetFake() + + e := jx.Encoder{} + typ.Encode(&e) + data := e.Bytes() + require.True(t, std.Valid(data), "Encoded: %s", data) + + var typ2 UpdateManyHostsRequestMihomoIpVersion + require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) +} +func TestUpdateManyHostsRequestSecurityLayer_EncodeDecode(t *testing.T) { + var typ UpdateManyHostsRequestSecurityLayer + typ.SetFake() + + e := jx.Encoder{} + typ.Encode(&e) + data := e.Bytes() + require.True(t, std.Valid(data), "Encoded: %s", data) + + var typ2 UpdateManyHostsRequestSecurityLayer + require.NoError(t, typ2.Decode(jx.DecodeBytes(data))) +} func TestUpdateNodePluginRequest_EncodeDecode(t *testing.T) { var typ UpdateNodePluginRequest typ.SetFake() diff --git a/api/oas_validators_gen.go b/api/oas_validators_gen.go index 37da795..82164b7 100644 --- a/api/oas_validators_gen.go +++ b/api/oas_validators_gen.go @@ -42,6 +42,23 @@ func (s *AllHwidDevices) Validate() error { if s.Devices == nil { return errors.New("nil is invalid value") } + var failures []validate.FieldError + for i, elem := range s.Devices { + if err := func() error { + if err := elem.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: fmt.Sprintf("[%d]", i), + Error: err, + }) + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } return nil }(); err != nil { failures = append(failures, validate.FieldError{ @@ -489,7 +506,7 @@ func (s *BulkAllUpdateUsersRequest) Validate() error { if err := func() error { if value, ok := s.TrafficLimitBytes.Get(); ok { if err := func() error { - if err := (validate.Int{ + if err := (validate.Float{ MinSet: true, Min: 0, MaxSet: false, @@ -497,10 +514,10 @@ func (s *BulkAllUpdateUsersRequest) Validate() error { MinExclusive: false, MaxExclusive: false, MultipleOfSet: false, - MultipleOf: 0, + MultipleOf: nil, Pattern: nil, - }).Validate(int64(value)); err != nil { - return errors.Wrap(err, "int") + }).Validate(float64(value)); err != nil { + return errors.Wrap(err, "float") } return nil }(); err != nil { @@ -918,6 +935,34 @@ func (s *BulkNodesUpdateRequestFields) Validate() error { Error: err, }) } + if err := func() error { + if value, ok := s.NodeConsumptionMultiplier.Get(); ok { + if err := func() error { + if err := (validate.Float{ + MinSet: true, + Min: 0, + MaxSet: true, + Max: 100, + MinExclusive: false, + MaxExclusive: false, + MultipleOfSet: false, + MultipleOf: nil, + Pattern: nil, + }).Validate(float64(value)); err != nil { + return errors.Wrap(err, "float") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "nodeConsumptionMultiplier", + Error: err, + }) + } if err := func() error { if s.Tags == nil { return nil // optional @@ -966,6 +1011,36 @@ func (s *BulkNodesUpdateRequestFields) Validate() error { Error: err, }) } + if err := func() error { + if value, ok := s.Note.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 0, + MinLengthSet: false, + MaxLength: 255, + MaxLengthSet: true, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "note", + Error: err, + }) + } if len(failures) > 0 { return &validate.Error{Fields: failures} } @@ -1041,7 +1116,7 @@ func (s *BulkUpdateUsersRequestFields) Validate() error { if err := func() error { if value, ok := s.TrafficLimitBytes.Get(); ok { if err := func() error { - if err := (validate.Int{ + if err := (validate.Float{ MinSet: true, Min: 0, MaxSet: false, @@ -1049,10 +1124,10 @@ func (s *BulkUpdateUsersRequestFields) Validate() error { MinExclusive: false, MaxExclusive: false, MultipleOfSet: false, - MultipleOf: 0, + MultipleOf: nil, Pattern: nil, - }).Validate(int64(value)); err != nil { - return errors.Wrap(err, "int") + }).Validate(float64(value)); err != nil { + return errors.Wrap(err, "float") } return nil }(); err != nil { @@ -1636,6 +1711,108 @@ func (s *ConfigProfilesResponseResponse) Validate() error { return nil } +func (s *CreateApiTokenRequest) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if err := (validate.String{ + MinLength: 2, + MinLengthSet: true, + MaxLength: 30, + MaxLengthSet: true, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(s.Name)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "name", + Error: err, + }) + } + if err := func() error { + if err := (validate.Float{ + MinSet: true, + Min: 1, + MaxSet: false, + Max: 0, + MinExclusive: false, + MaxExclusive: false, + MultipleOfSet: false, + MultipleOf: nil, + Pattern: nil, + }).Validate(float64(s.ExpiresInDays)); err != nil { + return errors.Wrap(err, "float") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "expiresInDays", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s *CreateApiTokenResponse) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if err := s.Response.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "response", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s *CreateApiTokenResponseResponse) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if s.Scopes == nil { + return errors.New("nil is invalid value") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "scopes", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + func (s *CreateConfigProfileRequest) Validate() error { if s == nil { return validate.ErrNilPointer @@ -1753,24 +1930,6 @@ func (s *CreateHostRequest) Validate() error { Error: err, }) } - if err := func() error { - if value, ok := s.Fingerprint.Get(); ok { - if err := func() error { - if err := value.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - return err - } - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "fingerprint", - Error: err, - }) - } if err := func() error { if value, ok := s.SecurityLayer.Get(); ok { if err := func() error { @@ -1820,12 +1979,24 @@ func (s *CreateHostRequest) Validate() error { }) } if err := func() error { - if value, ok := s.Tag.Get(); ok { + if s.Tags == nil { + return nil // optional + } + if err := (validate.Array{ + MinLength: 0, + MinLengthSet: false, + MaxLength: 10, + MaxLengthSet: true, + }).ValidateLength(len(s.Tags)); err != nil { + return errors.Wrap(err, "array") + } + var failures []validate.FieldError + for i, elem := range s.Tags { if err := func() error { if err := (validate.String{ MinLength: 0, MinLengthSet: false, - MaxLength: 32, + MaxLength: 36, MaxLengthSet: true, Email: false, Hostname: false, @@ -1834,18 +2005,24 @@ func (s *CreateHostRequest) Validate() error { MinNumericSet: false, MaxNumeric: 0, MaxNumericSet: false, - }).Validate(string(value)); err != nil { + }).Validate(string(elem)); err != nil { return errors.Wrap(err, "string") } return nil }(); err != nil { - return err + failures = append(failures, validate.FieldError{ + Name: fmt.Sprintf("[%d]", i), + Error: err, + }) } } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } return nil }(); err != nil { failures = append(failures, validate.FieldError{ - Name: "tag", + Name: "tags", Error: err, }) } @@ -1877,6 +2054,24 @@ func (s *CreateHostRequest) Validate() error { Error: err, }) } + if err := func() error { + if value, ok := s.MihomoIpVersion.Get(); ok { + if err := func() error { + if err := value.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "mihomoIpVersion", + Error: err, + }) + } if err := func() error { var failures []validate.FieldError for i, elem := range s.ExcludeFromSubscriptionTypes { @@ -1946,25 +2141,17 @@ func (s CreateHostRequestExcludeFromSubscriptionTypesItem) Validate() error { } } -func (s CreateHostRequestFingerprint) Validate() error { +func (s CreateHostRequestMihomoIpVersion) Validate() error { switch s { - case "chrome": + case "dual": return nil - case "firefox": + case "ipv4": return nil - case "safari": + case "ipv6": return nil - case "ios": + case "ipv4-prefer": return nil - case "android": - return nil - case "edge": - return nil - case "qq": - return nil - case "random": - return nil - case "randomized": + case "ipv6-prefer": return nil default: return errors.Errorf("invalid value: %v", s) @@ -2017,6 +2204,48 @@ func (s *CreateInfraBillingHistoryRecordRequest) Validate() error { return nil } +func (s *CreateInfraBillingNodeRequest) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if value, ok := s.Name.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 255, + MaxLengthSet: true, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "name", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + func (s *CreateInfraProviderRequest) Validate() error { if s == nil { return validate.ErrNilPointer @@ -2213,10 +2442,40 @@ func (s *CreateNodeRequest) Validate() error { Error: err, }) } + if err := func() error { + if value, ok := s.ProxyUrl.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 0, + MinLengthSet: false, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: regexMap["^socks5:\\/\\/(?:[^:@/\\s]+(?::[^@/\\s]*)?@)?[^:@/\\s]+:\\d{1,5}$"], + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "proxyUrl", + Error: err, + }) + } if err := func() error { if value, ok := s.TrafficLimitBytes.Get(); ok { if err := func() error { - if err := (validate.Int{ + if err := (validate.Float{ MinSet: true, Min: 0, MaxSet: false, @@ -2224,10 +2483,10 @@ func (s *CreateNodeRequest) Validate() error { MinExclusive: false, MaxExclusive: false, MultipleOfSet: false, - MultipleOf: 0, + MultipleOf: nil, Pattern: nil, - }).Validate(int64(value)); err != nil { - return errors.Wrap(err, "int") + }).Validate(float64(value)); err != nil { + return errors.Wrap(err, "float") } return nil }(); err != nil { @@ -2355,6 +2614,34 @@ func (s *CreateNodeRequest) Validate() error { Error: err, }) } + if err := func() error { + if value, ok := s.NodeConsumptionMultiplier.Get(); ok { + if err := func() error { + if err := (validate.Float{ + MinSet: true, + Min: 0, + MaxSet: true, + Max: 100, + MinExclusive: false, + MaxExclusive: false, + MultipleOfSet: false, + MultipleOf: nil, + Pattern: nil, + }).Validate(float64(value)); err != nil { + return errors.Wrap(err, "float") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "nodeConsumptionMultiplier", + Error: err, + }) + } if err := func() error { if err := s.ConfigProfile.Validate(); err != nil { return err @@ -2414,6 +2701,36 @@ func (s *CreateNodeRequest) Validate() error { Error: err, }) } + if err := func() error { + if value, ok := s.Note.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 0, + MinLengthSet: false, + MaxLength: 255, + MaxLengthSet: true, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "note", + Error: err, + }) + } if len(failures) > 0 { return &validate.Error{Fields: failures} } @@ -2630,7 +2947,7 @@ func (s *CreateUserRequest) Validate() error { if err := func() error { if value, ok := s.TrafficLimitBytes.Get(); ok { if err := func() error { - if err := (validate.Int{ + if err := (validate.Float{ MinSet: true, Min: 0, MaxSet: false, @@ -2638,10 +2955,10 @@ func (s *CreateUserRequest) Validate() error { MinExclusive: false, MaxExclusive: false, MultipleOfSet: false, - MultipleOf: 0, + MultipleOf: nil, Pattern: nil, - }).Validate(int64(value)); err != nil { - return errors.Wrap(err, "int") + }).Validate(float64(value)); err != nil { + return errors.Wrap(err, "float") } return nil }(); err != nil { @@ -3069,6 +3386,29 @@ func (s *DeleteSnippetRequest) Validate() error { return nil } +func (s *Device) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if err := (validate.Float{}).Validate(float64(s.UserId)); err != nil { + return errors.Wrap(err, "float") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "userId", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + func (s *DropConnectionsRequest) Validate() error { if s == nil { return validate.ErrNilPointer @@ -3322,6 +3662,40 @@ func (s DropConnectionsRequestTargetNodes1Target) Validate() error { } } +func (s *EncryptionItem) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if err := s.Method.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "method", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s EncryptionItemMethod) Validate() error { + switch s { + case "age1": + return nil + case "age1pq1": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} + func (s *ExternalSquad) Validate() error { if s == nil { return validate.ErrNilPointer @@ -3883,13 +4257,53 @@ func (s *FindAllApiTokensResponseResponse) Validate() error { var failures []validate.FieldError if err := func() error { - if s.ApiKeys == nil { + if s.Tokens == nil { + return errors.New("nil is invalid value") + } + var failures []validate.FieldError + for i, elem := range s.Tokens { + if err := func() error { + if err := elem.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: fmt.Sprintf("[%d]", i), + Error: err, + }) + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "tokens", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s *FindAllApiTokensResponseResponseTokensItem) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if s.Scopes == nil { return errors.New("nil is invalid value") } return nil }(); err != nil { failures = append(failures, validate.FieldError{ - Name: "apiKeys", + Name: "scopes", Error: err, }) } @@ -4162,6 +4576,154 @@ func (s *GetAllUsersResponseResponse) Validate() error { return nil } +func (s *GetApiTokenScopesResponse) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if err := s.Response.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "response", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s *GetApiTokenScopesResponseResponse) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if s.Resources == nil { + return errors.New("nil is invalid value") + } + var failures []validate.FieldError + for i, elem := range s.Resources { + if err := func() error { + if err := elem.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: fmt.Sprintf("[%d]", i), + Error: err, + }) + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "resources", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s *GetApiTokenScopesResponseResponseResourcesItem) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if s.ResourceScopes == nil { + return errors.New("nil is invalid value") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "resourceScopes", + Error: err, + }) + } + if err := func() error { + if s.Endpoints == nil { + return errors.New("nil is invalid value") + } + var failures []validate.FieldError + for i, elem := range s.Endpoints { + if err := func() error { + if err := elem.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: fmt.Sprintf("[%d]", i), + Error: err, + }) + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "endpoints", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s *GetApiTokenScopesResponseResponseResourcesItemEndpointsItem) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if err := s.Kind.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "kind", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s GetApiTokenScopesResponseResponseResourcesItemEndpointsItemKind) Validate() error { + switch s { + case "read": + return nil + case "write": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} + func (s *GetConnectionKeysByUuidResponse) Validate() error { if s == nil { return validate.ErrNilPointer @@ -4287,34 +4849,6 @@ func (s *GetHwidDevicesStatsResponseResponse) Validate() error { Error: err, }) } - if err := func() error { - if s.ByApp == nil { - return errors.New("nil is invalid value") - } - var failures []validate.FieldError - for i, elem := range s.ByApp { - if err := func() error { - if err := elem.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: fmt.Sprintf("[%d]", i), - Error: err, - }) - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "byApp", - Error: err, - }) - } if err := func() error { if err := s.Stats.Validate(); err != nil { return err @@ -4349,6 +4883,34 @@ func (s *GetHwidDevicesStatsResponseResponseByPlatformItem) Validate() error { Error: err, }) } + if err := func() error { + if s.ByApp == nil { + return errors.New("nil is invalid value") + } + var failures []validate.FieldError + for i, elem := range s.ByApp { + if err := func() error { + if err := elem.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: fmt.Sprintf("[%d]", i), + Error: err, + }) + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "byApp", + Error: err, + }) + } if len(failures) > 0 { return &validate.Error{Fields: failures} } @@ -5030,6 +5592,17 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItem) Error: err, }) } + if err := func() error { + if err := s.ClientOverrides.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "clientOverrides", + Error: err, + }) + } if err := func() error { if err := s.Metadata.Validate(); err != nil { return err @@ -5047,12 +5620,70 @@ func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItem) return nil } +func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverrides) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if value, ok := s.MihomoIpVersion.Get(); ok { + if err := func() error { + if err := value.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "mihomoIpVersion", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemClientOverridesMihomoIpVersion) Validate() error { + switch s { + case "dual": + return nil + case "ipv4": + return nil + case "ipv6": + return nil + case "ipv4-prefer": + return nil + case "ipv6-prefer": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} + func (s *GetRawSubscriptionByShortUuidResponseResponseResolvedProxyConfigsItemMetadata) Validate() error { if s == nil { return validate.ErrNilPointer } var failures []validate.FieldError + if err := func() error { + if s.Tags == nil { + return errors.New("nil is invalid value") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "tags", + Error: err, + }) + } if err := func() error { if s.ExcludeFromSubscriptionTypes == nil { return errors.New("nil is invalid value") @@ -5750,122 +6381,28 @@ func (s *GetRemnawaveHealthResponseResponseRuntimeMetricsItem) Validate() error return nil } -func (s *GetStatsNodeUsersUsageResponse) Validate() error { +func (s *GetStatsNodesUsersUsageRequest) Validate() error { if s == nil { return validate.ErrNilPointer } var failures []validate.FieldError if err := func() error { - if err := s.Response.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "response", - Error: err, - }) - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil -} - -func (s *GetStatsNodeUsersUsageResponseResponse) Validate() error { - if s == nil { - return validate.ErrNilPointer - } - - var failures []validate.FieldError - if err := func() error { - if s.Categories == nil { + if s.NodesUuids == nil { return errors.New("nil is invalid value") } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "categories", - Error: err, - }) - } - if err := func() error { - if s.SparklineData == nil { - return errors.New("nil is invalid value") - } - var failures []validate.FieldError - for i, elem := range s.SparklineData { - if err := func() error { - if err := (validate.Float{}).Validate(float64(elem)); err != nil { - return errors.Wrap(err, "float") - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: fmt.Sprintf("[%d]", i), - Error: err, - }) - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} + if err := (validate.Array{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + }).ValidateLength(len(s.NodesUuids)); err != nil { + return errors.Wrap(err, "array") } return nil }(); err != nil { failures = append(failures, validate.FieldError{ - Name: "sparklineData", - Error: err, - }) - } - if err := func() error { - if s.TopUsers == nil { - return errors.New("nil is invalid value") - } - var failures []validate.FieldError - for i, elem := range s.TopUsers { - if err := func() error { - if err := elem.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: fmt.Sprintf("[%d]", i), - Error: err, - }) - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "topUsers", - Error: err, - }) - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil -} - -func (s *GetStatsNodeUsersUsageResponseResponseTopUsersItem) Validate() error { - if s == nil { - return validate.ErrNilPointer - } - - var failures []validate.FieldError - if err := func() error { - if err := (validate.Float{}).Validate(float64(s.Total)); err != nil { - return errors.Wrap(err, "float") - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "total", + Name: "nodesUuids", Error: err, }) } @@ -6765,6 +7302,69 @@ func (s *GetUserSubscriptionRequestHistoryResponse) Validate() error { return nil } +func (s *GetUsersStreamResponse) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if err := s.Response.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "response", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s *GetUsersStreamResponseResponse) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if s.Users == nil { + return errors.New("nil is invalid value") + } + var failures []validate.FieldError + for i, elem := range s.Users { + if err := func() error { + if err := elem.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: fmt.Sprintf("[%d]", i), + Error: err, + }) + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "users", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + func (s *Github) Validate() error { if s == nil { return validate.ErrNilPointer @@ -6852,6 +7452,24 @@ func (s *HostItem) Validate() error { } var failures []validate.FieldError + if err := func() error { + if value, ok := s.Alpn.Get(); ok { + if err := func() error { + if err := value.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "alpn", + Error: err, + }) + } if err := func() error { if value, ok := s.SecurityLayer.Get(); ok { if err := func() error { @@ -6928,6 +7546,24 @@ func (s *HostItem) Validate() error { Error: err, }) } + if err := func() error { + if value, ok := s.MihomoIpVersion.Get(); ok { + if err := func() error { + if err := value.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "mihomoIpVersion", + Error: err, + }) + } if err := func() error { if s.Nodes == nil { return errors.New("nil is invalid value") @@ -6951,6 +7587,9 @@ func (s *HostItem) Validate() error { }) } if err := func() error { + if s.ExcludeFromSubscriptionTypes == nil { + return errors.New("nil is invalid value") + } var failures []validate.FieldError for i, elem := range s.ExcludeFromSubscriptionTypes { if err := func() error { @@ -6981,6 +7620,25 @@ func (s *HostItem) Validate() error { return nil } +func (s HostItemAlpn) Validate() error { + switch s { + case "h3": + return nil + case "h2": + return nil + case "http/1.1": + return nil + case "h2,http/1.1": + return nil + case "h3,h2,http/1.1": + return nil + case "h3,h2": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} + func (s HostItemExcludeFromSubscriptionTypesItem) Validate() error { switch s { case "XRAY_JSON": @@ -7000,6 +7658,23 @@ func (s HostItemExcludeFromSubscriptionTypesItem) Validate() error { } } +func (s HostItemMihomoIpVersion) Validate() error { + switch s { + case "dual": + return nil + case "ipv4": + return nil + case "ipv6": + return nil + case "ipv4-prefer": + return nil + case "ipv6-prefer": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} + func (s HostItemSecurityLayer) Validate() error { switch s { case "DEFAULT": @@ -7784,6 +8459,17 @@ func (s *NodeResponseDataItem) Validate() error { Error: err, }) } + if err := func() error { + if err := (validate.Float{}).Validate(float64(s.NodeConsumptionMultiplier)); err != nil { + return errors.Wrap(err, "float") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "nodeConsumptionMultiplier", + Error: err, + }) + } if err := func() error { if s.Tags == nil { return errors.New("nil is invalid value") @@ -8678,6 +9364,17 @@ func (s *Record) Validate() error { Error: err, }) } + if err := func() error { + if err := (validate.Float{}).Validate(float64(s.UserId)); err != nil { + return errors.Wrap(err, "float") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "userId", + Error: err, + }) + } if len(failures) > 0 { return &validate.Error{Fields: failures} } @@ -8996,6 +9693,72 @@ func (s *ResponseModification) Validate() error { Error: err, }) } + if err := func() error { + if value, ok := s.Encryption.Get(); ok { + if err := func() error { + if err := value.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "encryption", + Error: err, + }) + } + if err := func() error { + if s.ExcludeHostsByTags == nil { + return nil // optional + } + if err := (validate.Array{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + }).ValidateLength(len(s.ExcludeHostsByTags)); err != nil { + return errors.Wrap(err, "array") + } + var failures []validate.FieldError + for i, elem := range s.ExcludeHostsByTags { + if err := func() error { + if err := (validate.String{ + MinLength: 0, + MinLengthSet: false, + MaxLength: 36, + MaxLengthSet: true, + Email: false, + Hostname: false, + Regex: regexMap["^[A-Z0-9_:]+$"], + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(elem)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: fmt.Sprintf("[%d]", i), + Error: err, + }) + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "excludeHostsByTags", + Error: err, + }) + } if len(failures) > 0 { return &validate.Error{Fields: failures} } @@ -9277,73 +10040,6 @@ func (s RuleResponseType) Validate() error { } } -func (s *SetInboundToManyHostsRequest) Validate() error { - if s == nil { - return validate.ErrNilPointer - } - - var failures []validate.FieldError - if err := func() error { - if s.Uuids == nil { - return errors.New("nil is invalid value") - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "uuids", - Error: err, - }) - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil -} - -func (s *SetPortToManyHostsRequest) Validate() error { - if s == nil { - return validate.ErrNilPointer - } - - var failures []validate.FieldError - if err := func() error { - if s.Uuids == nil { - return errors.New("nil is invalid value") - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "uuids", - Error: err, - }) - } - if err := func() error { - if err := (validate.Int{ - MinSet: true, - Min: 1, - MaxSet: true, - Max: 65535, - MinExclusive: false, - MaxExclusive: false, - MultipleOfSet: false, - MultipleOf: 0, - Pattern: nil, - }).Validate(int64(s.Port)); err != nil { - return errors.Wrap(err, "int") - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "port", - Error: err, - }) - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil -} - func (s *SettingsResponse) Validate() error { if s == nil { return validate.ErrNilPointer @@ -9591,6 +10287,131 @@ func (s *Stat) Validate() error { return nil } +func (s *StatsNodeUsersUsageResponseResponse) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if err := s.Response.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "response", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s *StatsNodeUsersUsageResponseResponseResponse) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if s.Categories == nil { + return errors.New("nil is invalid value") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "categories", + Error: err, + }) + } + if err := func() error { + if s.SparklineData == nil { + return errors.New("nil is invalid value") + } + var failures []validate.FieldError + for i, elem := range s.SparklineData { + if err := func() error { + if err := (validate.Float{}).Validate(float64(elem)); err != nil { + return errors.Wrap(err, "float") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: fmt.Sprintf("[%d]", i), + Error: err, + }) + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "sparklineData", + Error: err, + }) + } + if err := func() error { + if s.TopUsers == nil { + return errors.New("nil is invalid value") + } + var failures []validate.FieldError + for i, elem := range s.TopUsers { + if err := func() error { + if err := elem.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: fmt.Sprintf("[%d]", i), + Error: err, + }) + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "topUsers", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s *StatsNodeUsersUsageResponseResponseResponseTopUsersItem) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if err := (validate.Float{}).Validate(float64(s.Total)); err != nil { + return errors.Wrap(err, "float") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "total", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + func (s *StatsUserUsageResponseResponse) Validate() error { if s == nil { return validate.ErrNilPointer @@ -10743,24 +11564,6 @@ func (s *UpdateHostRequest) Validate() error { Error: err, }) } - if err := func() error { - if value, ok := s.Fingerprint.Get(); ok { - if err := func() error { - if err := value.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - return err - } - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "fingerprint", - Error: err, - }) - } if err := func() error { if value, ok := s.SecurityLayer.Get(); ok { if err := func() error { @@ -10810,12 +11613,24 @@ func (s *UpdateHostRequest) Validate() error { }) } if err := func() error { - if value, ok := s.Tag.Get(); ok { + if s.Tags == nil { + return nil // optional + } + if err := (validate.Array{ + MinLength: 0, + MinLengthSet: false, + MaxLength: 10, + MaxLengthSet: true, + }).ValidateLength(len(s.Tags)); err != nil { + return errors.Wrap(err, "array") + } + var failures []validate.FieldError + for i, elem := range s.Tags { if err := func() error { if err := (validate.String{ MinLength: 0, MinLengthSet: false, - MaxLength: 32, + MaxLength: 36, MaxLengthSet: true, Email: false, Hostname: false, @@ -10824,18 +11639,24 @@ func (s *UpdateHostRequest) Validate() error { MinNumericSet: false, MaxNumeric: 0, MaxNumericSet: false, - }).Validate(string(value)); err != nil { + }).Validate(string(elem)); err != nil { return errors.Wrap(err, "string") } return nil }(); err != nil { - return err + failures = append(failures, validate.FieldError{ + Name: fmt.Sprintf("[%d]", i), + Error: err, + }) } } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } return nil }(); err != nil { failures = append(failures, validate.FieldError{ - Name: "tag", + Name: "tags", Error: err, }) } @@ -10867,6 +11688,24 @@ func (s *UpdateHostRequest) Validate() error { Error: err, }) } + if err := func() error { + if value, ok := s.MihomoIpVersion.Get(); ok { + if err := func() error { + if err := value.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "mihomoIpVersion", + Error: err, + }) + } if err := func() error { var failures []validate.FieldError for i, elem := range s.ExcludeFromSubscriptionTypes { @@ -10936,25 +11775,17 @@ func (s UpdateHostRequestExcludeFromSubscriptionTypesItem) Validate() error { } } -func (s UpdateHostRequestFingerprint) Validate() error { +func (s UpdateHostRequestMihomoIpVersion) Validate() error { switch s { - case "chrome": + case "dual": return nil - case "firefox": + case "ipv4": return nil - case "safari": + case "ipv6": return nil - case "ios": + case "ipv4-prefer": return nil - case "android": - return nil - case "edge": - return nil - case "qq": - return nil - case "random": - return nil - case "randomized": + case "ipv6-prefer": return nil default: return errors.Errorf("invalid value: %v", s) @@ -11081,6 +11912,320 @@ func (s *UpdateInternalSquadRequest) Validate() error { return nil } +func (s *UpdateManyHostsRequest) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if value, ok := s.Remark.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 0, + MinLengthSet: false, + MaxLength: 40, + MaxLengthSet: true, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "remark", + Error: err, + }) + } + if err := func() error { + if value, ok := s.Alpn.Get(); ok { + if err := func() error { + if err := value.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "alpn", + Error: err, + }) + } + if err := func() error { + if value, ok := s.SecurityLayer.Get(); ok { + if err := func() error { + if err := value.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "securityLayer", + Error: err, + }) + } + if err := func() error { + if value, ok := s.ServerDescription.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 0, + MinLengthSet: false, + MaxLength: 30, + MaxLengthSet: true, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "serverDescription", + Error: err, + }) + } + if err := func() error { + if s.Tags == nil { + return nil // optional + } + if err := (validate.Array{ + MinLength: 0, + MinLengthSet: false, + MaxLength: 10, + MaxLengthSet: true, + }).ValidateLength(len(s.Tags)); err != nil { + return errors.Wrap(err, "array") + } + var failures []validate.FieldError + for i, elem := range s.Tags { + if err := func() error { + if err := (validate.String{ + MinLength: 0, + MinLengthSet: false, + MaxLength: 36, + MaxLengthSet: true, + Email: false, + Hostname: false, + Regex: regexMap["^[A-Z0-9_:]+$"], + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(elem)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: fmt.Sprintf("[%d]", i), + Error: err, + }) + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "tags", + Error: err, + }) + } + if err := func() error { + if value, ok := s.VlessRouteId.Get(); ok { + if err := func() error { + if err := (validate.Int{ + MinSet: true, + Min: 0, + MaxSet: true, + Max: 65535, + MinExclusive: false, + MaxExclusive: false, + MultipleOfSet: false, + MultipleOf: 0, + Pattern: nil, + }).Validate(int64(value)); err != nil { + return errors.Wrap(err, "int") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "vlessRouteId", + Error: err, + }) + } + if err := func() error { + if value, ok := s.MihomoIpVersion.Get(); ok { + if err := func() error { + if err := value.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "mihomoIpVersion", + Error: err, + }) + } + if err := func() error { + var failures []validate.FieldError + for i, elem := range s.ExcludeFromSubscriptionTypes { + if err := func() error { + if err := elem.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: fmt.Sprintf("[%d]", i), + Error: err, + }) + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "excludeFromSubscriptionTypes", + Error: err, + }) + } + if err := func() error { + if s.Uuids == nil { + return errors.New("nil is invalid value") + } + if err := (validate.Array{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + }).ValidateLength(len(s.Uuids)); err != nil { + return errors.Wrap(err, "array") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "uuids", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s UpdateManyHostsRequestAlpn) Validate() error { + switch s { + case "h3": + return nil + case "h2": + return nil + case "http/1.1": + return nil + case "h2,http/1.1": + return nil + case "h3,h2,http/1.1": + return nil + case "h3,h2": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} + +func (s UpdateManyHostsRequestExcludeFromSubscriptionTypesItem) Validate() error { + switch s { + case "XRAY_JSON": + return nil + case "XRAY_BASE64": + return nil + case "MIHOMO": + return nil + case "STASH": + return nil + case "CLASH": + return nil + case "SINGBOX": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} + +func (s UpdateManyHostsRequestMihomoIpVersion) Validate() error { + switch s { + case "dual": + return nil + case "ipv4": + return nil + case "ipv6": + return nil + case "ipv4-prefer": + return nil + case "ipv6-prefer": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} + +func (s UpdateManyHostsRequestSecurityLayer) Validate() error { + switch s { + case "DEFAULT": + return nil + case "TLS": + return nil + case "NONE": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} + func (s *UpdateNodePluginRequest) Validate() error { if s == nil { return validate.ErrNilPointer @@ -11217,6 +12362,36 @@ func (s *UpdateNodeRequest) Validate() error { Error: err, }) } + if err := func() error { + if value, ok := s.ProxyUrl.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 0, + MinLengthSet: false, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: regexMap["^socks5:\\/\\/(?:[^:@/\\s]+(?::[^@/\\s]*)?@)?[^:@/\\s]+:\\d{1,5}$"], + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "proxyUrl", + Error: err, + }) + } if err := func() error { if value, ok := s.TrafficLimitBytes.Get(); ok { if err := func() error { @@ -11359,6 +12534,34 @@ func (s *UpdateNodeRequest) Validate() error { Error: err, }) } + if err := func() error { + if value, ok := s.NodeConsumptionMultiplier.Get(); ok { + if err := func() error { + if err := (validate.Float{ + MinSet: true, + Min: 0, + MaxSet: true, + Max: 100, + MinExclusive: false, + MaxExclusive: false, + MultipleOfSet: false, + MultipleOf: nil, + Pattern: nil, + }).Validate(float64(value)); err != nil { + return errors.Wrap(err, "float") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "nodeConsumptionMultiplier", + Error: err, + }) + } if err := func() error { if value, ok := s.ConfigProfile.Get(); ok { if err := func() error { @@ -11425,6 +12628,36 @@ func (s *UpdateNodeRequest) Validate() error { Error: err, }) } + if err := func() error { + if value, ok := s.Note.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 0, + MinLengthSet: false, + MaxLength: 255, + MaxLengthSet: true, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "note", + Error: err, + }) + } if len(failures) > 0 { return &validate.Error{Fields: failures} } @@ -11703,7 +12936,7 @@ func (s *UpdateUserRequest) Validate() error { if err := func() error { if value, ok := s.TrafficLimitBytes.Get(); ok { if err := func() error { - if err := (validate.Int{ + if err := (validate.Float{ MinSet: true, Min: 0, MaxSet: false, @@ -11711,10 +12944,10 @@ func (s *UpdateUserRequest) Validate() error { MinExclusive: false, MaxExclusive: false, MultipleOfSet: false, - MultipleOf: 0, + MultipleOf: nil, Pattern: nil, - }).Validate(int64(value)); err != nil { - return errors.Wrap(err, "int") + }).Validate(float64(value)); err != nil { + return errors.Wrap(err, "float") } return nil }(); err != nil { @@ -11980,6 +13213,24 @@ func (s *UserItemInfo) Validate() error { Error: err, }) } + if err := func() error { + if value, ok := s.TrafficLimitBytes.Get(); ok { + if err := func() error { + if err := (validate.Float{}).Validate(float64(value)); err != nil { + return errors.Wrap(err, "float") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "trafficLimitBytes", + Error: err, + }) + } if err := func() error { if value, ok := s.TrafficLimitStrategy.Get(); ok { if err := func() error { diff --git a/specs/2.8.0-final.json b/specs/2.8.0-final.json new file mode 100644 index 0000000..9cb8d54 --- /dev/null +++ b/specs/2.8.0-final.json @@ -0,0 +1,20175 @@ +{ + "openapi": "3.0.0", + "paths": { + "/api/remnawave-settings": { + "get": { + "operationId": "RemnawaveSettings_getSettings", + "parameters": [], + "responses": { + "200": { + "description": "Remnawave settings retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SettingsResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Remnawave settings", + "tags": [ + "Remnawave Settings Controller" + ] + }, + "patch": { + "operationId": "RemnawaveSettings_updateSettings", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateRemnawaveSettingsRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Subscription settings updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SettingsResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update Remnawave settings", + "tags": [ + "Remnawave Settings Controller" + ] + } + }, + "/api/passkeys/registration/options": { + "get": { + "operationId": "Passkey_passkeyRegistrationOptions", + "parameters": [], + "responses": { + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + }, + "default": { + "description": "Get passkey registration options", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PasskeyOptions" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get registration options for passkey", + "tags": [ + "Passkeys Controller" + ] + } + }, + "/api/passkeys/registration/verify": { + "post": { + "operationId": "Passkey_passkeyRegistrationVerify", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PasskeyOptions" + } + } + } + }, + "responses": { + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + }, + "default": { + "description": "Verify passkey registration result", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VerifyPasskeyRegistrationResponse" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Verify registration for passkey", + "tags": [ + "Passkeys Controller" + ] + } + }, + "/api/passkeys": { + "get": { + "operationId": "Passkey_getActivePasskeys", + "parameters": [], + "responses": { + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + }, + "default": { + "description": "Get all passkeys", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PasskeysResponse" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all passkeys", + "tags": [ + "Passkeys Controller" + ] + }, + "delete": { + "operationId": "Passkey_deletePasskey", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePasskeyRequest" + } + } + } + }, + "responses": { + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + }, + "default": { + "description": "Delete passkey result", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PasskeysResponse" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete a passkey by ID", + "tags": [ + "Passkeys Controller" + ] + }, + "patch": { + "operationId": "Passkey_updatePasskey", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdatePasskeyRequest" + } + } + } + }, + "responses": { + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + }, + "default": { + "description": "Update passkey", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PasskeysResponse" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update passkey", + "tags": [ + "Passkeys Controller" + ] + } + }, + "/api/auth/login": { + "post": { + "operationId": "Auth_login", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginRequest" + } + } + } + }, + "responses": { + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "401": { + "description": "Unauthorized - Invalid credentials", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + }, + "default": { + "description": "Access token for further requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TokenResponse" + } + } + } + } + }, + "summary": "Login as superadmin", + "tags": [ + "Auth Controller" + ] + } + }, + "/api/auth/register": { + "post": { + "operationId": "Auth_register", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegisterRequest" + } + } + } + }, + "responses": { + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "403": { + "description": "Forbidden - Registration is not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForbiddenError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + }, + "default": { + "description": "Access token for further requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TokenResponse" + } + } + } + } + }, + "summary": "Register as superadmin", + "tags": [ + "Auth Controller" + ] + } + }, + "/api/auth/status": { + "get": { + "operationId": "Auth_getStatus", + "parameters": [], + "responses": { + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + }, + "default": { + "description": "Status of the system", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetStatusResponse" + } + } + } + } + }, + "summary": "Get the status of the authentication", + "tags": [ + "Auth Controller" + ] + } + }, + "/api/auth/oauth2/authorize": { + "post": { + "operationId": "Auth_oauth2Authorize", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OAuth2AuthorizeRequest" + } + } + } + }, + "responses": { + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + }, + "default": { + "description": "OAuth2 authorization URL", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OAuth2AuthorizeResponse" + } + } + } + } + }, + "summary": "Initiate OAuth2 authorization", + "tags": [ + "Auth Controller" + ] + } + }, + "/api/auth/oauth2/callback": { + "post": { + "operationId": "Auth_oauth2Callback", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OAuth2CallbackRequest" + } + } + } + }, + "responses": { + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + }, + "default": { + "description": "Access token for further requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TokenResponse" + } + } + } + } + }, + "summary": "Callback from OAuth2", + "tags": [ + "Auth Controller" + ] + } + }, + "/api/auth/passkey/authentication/options": { + "get": { + "operationId": "Auth_passkeyAuthenticationOptions", + "parameters": [], + "responses": { + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + }, + "default": { + "description": "Passkey authentication options", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PasskeyOptions" + } + } + } + } + }, + "summary": "Get the authentication options for passkey", + "tags": [ + "Auth Controller" + ] + } + }, + "/api/auth/passkey/authentication/verify": { + "post": { + "operationId": "Auth_passkeyAuthenticationVerify", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PasskeyOptions" + } + } + } + }, + "responses": { + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + }, + "default": { + "description": "JWT access token after successful passkey authentication", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TokenResponse" + } + } + } + } + }, + "summary": "Verify the authentication for passkey", + "tags": [ + "Auth Controller" + ] + } + }, + "/api/subscription-page-configs": { + "get": { + "operationId": "SubscriptionPageConfig_getAllConfigs", + "parameters": [], + "responses": { + "200": { + "description": "Subscription page configs retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionPageConfigsResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all subscription page configs", + "tags": [ + "Subscription Page Configs Controller" + ] + }, + "patch": { + "operationId": "SubscriptionPageConfig_updateConfig", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSubscriptionPageConfigRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Subscription page config updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionPageConfigResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update subscription page config", + "tags": [ + "Subscription Page Configs Controller" + ] + }, + "post": { + "operationId": "SubscriptionPageConfig_createConfig", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSubscriptionPageConfigRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Subscription page config created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSubscriptionPageConfigResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Create subscription page config", + "tags": [ + "Subscription Page Configs Controller" + ] + } + }, + "/api/subscription-page-configs/{uuid}": { + "get": { + "operationId": "SubscriptionPageConfig_getConfigByUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "Subscription page config UUID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Subscription page config retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionPageConfigResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get subscription page config by uuid", + "tags": [ + "Subscription Page Configs Controller" + ] + }, + "delete": { + "operationId": "SubscriptionPageConfig_deleteConfig", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "Subscription page config UUID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Subscription page config deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete subscription page config", + "tags": [ + "Subscription Page Configs Controller" + ] + } + }, + "/api/subscription-page-configs/actions/reorder": { + "post": { + "operationId": "SubscriptionPageConfig_reorderSubscriptionPageConfigs", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReorderRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Subscription page configs reordered successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionPageConfigsResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Reorder subscription page configs", + "tags": [ + "Subscription Page Configs Controller" + ] + } + }, + "/api/subscription-page-configs/actions/clone": { + "post": { + "operationId": "SubscriptionPageConfig_cloneSubscriptionPageConfig", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CloneNodePluginRequestRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Subscription page config cloned successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionPageConfigResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Clone subscription page config", + "tags": [ + "Subscription Page Configs Controller" + ] + } + }, + "/api/users": { + "post": { + "operationId": "Users_createUser", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateUserRequest" + } + } + } + }, + "responses": { + "201": { + "description": "User created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Create a new user", + "tags": [ + "Users Controller" + ] + }, + "patch": { + "operationId": "Users_updateUser", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateUserRequest" + } + } + } + }, + "responses": { + "200": { + "description": "User updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update a user by UUID or username", + "tags": [ + "Users Controller" + ] + }, + "get": { + "operationId": "Users_getAllUsers", + "parameters": [ + { + "name": "size", + "required": false, + "in": "query", + "description": "Page size for pagination", + "schema": { + "type": "integer" + } + }, + { + "name": "start", + "required": false, + "in": "query", + "description": "Offset for pagination", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Users fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAllUsersResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all users using offset-based pagination", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/{uuid}": { + "delete": { + "operationId": "Users_deleteUser", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "User not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete user", + "tags": [ + "Users Controller" + ] + }, + "get": { + "operationId": "Users_getUserByUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "User not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get user by UUID", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/stream": { + "get": { + "operationId": "Users_getUsersStream", + "parameters": [ + { + "name": "size", + "required": false, + "in": "query", + "description": "Page size, no more than 1000 (default 250)", + "schema": { + "type": "integer" + } + }, + { + "name": "cursor", + "required": false, + "in": "query", + "description": "Cursor from the previous response (nextCursor). Omit on the first request", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Users fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUsersStreamResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all users using cursor-based (keyset) pagination", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/tags": { + "get": { + "operationId": "Users_getAllTags", + "parameters": [], + "responses": { + "200": { + "description": "Tags fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TagsResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all existing user tags", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/{uuid}/accessible-nodes": { + "get": { + "operationId": "Users_getUserAccessibleNodes", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User accessible nodes fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUserAccessibleNodesResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "User not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get user accessible nodes", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/{uuid}/subscription-request-history": { + "get": { + "operationId": "Users_getUserSubscriptionRequestHistory", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User subscription request history fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUserSubscriptionRequestHistoryResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "User not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get user subscription request history, recent 24 records", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/by-short-uuid/{shortUuid}": { + "get": { + "operationId": "Users_getUserByShortUuid", + "parameters": [ + { + "name": "shortUuid", + "required": true, + "in": "path", + "description": "Short UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "User not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get user by Short UUID", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/by-username/{username}": { + "get": { + "operationId": "Users_getUserByUsername", + "parameters": [ + { + "name": "username", + "required": true, + "in": "path", + "description": "Username of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "User not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get user by username", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/by-id/{id}": { + "get": { + "operationId": "Users_getUserById", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "ID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "User not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get user by ID", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/by-telegram-id/{telegramId}": { + "get": { + "operationId": "Users_getUserByTelegramId", + "parameters": [ + { + "name": "telegramId", + "required": true, + "in": "path", + "description": "Telegram ID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Users fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsersResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get users by telegram ID", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/by-email/{email}": { + "get": { + "operationId": "Users_getUsersByEmail", + "parameters": [ + { + "name": "email", + "required": true, + "in": "path", + "description": "Email of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Users fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsersResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get users by email", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/by-tag/{tag}": { + "get": { + "operationId": "Users_getUsersByTag", + "parameters": [ + { + "name": "tag", + "required": true, + "in": "path", + "description": "Tag of the user", + "schema": { + "example": "PROMO_1", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Users fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsersResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get users by tag", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/{uuid}/actions/revoke": { + "post": { + "operationId": "Users_revokeUserSubscription", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the user", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RevokeUserSubscriptionBody" + } + } + } + }, + "responses": { + "200": { + "description": "User subscription revoked successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "User not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Revoke user subscription", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/{uuid}/actions/disable": { + "post": { + "operationId": "Users_disableUser", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User disabled successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "User not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Disable user", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/{uuid}/actions/enable": { + "post": { + "operationId": "Users_enableUser", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User enabled successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "User not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Enable user", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/{uuid}/actions/reset-traffic": { + "post": { + "operationId": "Users_resetUserTraffic", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User traffic reset successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "User not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Reset user traffic", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/resolve": { + "post": { + "operationId": "Users_resolveUser", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResolveUserRequestBody" + } + } + } + }, + "responses": { + "200": { + "description": "User resolved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResolveUserResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "User not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Resolve a user", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/bulk/delete-by-status": { + "post": { + "operationId": "UsersBulkActions_bulkDeleteUsersByStatus", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkDeleteUsersByStatusRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Users deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkActionResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Bulk delete users by status", + "tags": [ + "Users Bulk Actions Controller" + ] + } + }, + "/api/users/bulk/delete": { + "post": { + "operationId": "UsersBulkActions_bulkDeleteUsers", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkUuidsRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Users deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkActionResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Bulk delete users by UUIDs", + "tags": [ + "Users Bulk Actions Controller" + ] + } + }, + "/api/users/bulk/revoke-subscription": { + "post": { + "operationId": "UsersBulkActions_bulkRevokeUsersSubscription", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkUuidsRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Users subscription revoked successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkActionResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Revoke users subscription by User UUIDs", + "tags": [ + "Users Bulk Actions Controller" + ] + } + }, + "/api/users/bulk/reset-traffic": { + "post": { + "operationId": "UsersBulkActions_bulkResetUserTraffic", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkUuidsRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Users traffic reset successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkActionResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Bulk reset traffic users by UUIDs", + "tags": [ + "Users Bulk Actions Controller" + ] + } + }, + "/api/users/bulk/update": { + "post": { + "operationId": "UsersBulkActions_bulkUpdateUsers", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkUpdateUsersRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Users updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkActionResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Bulk update users by UUIDs", + "tags": [ + "Users Bulk Actions Controller" + ] + } + }, + "/api/users/bulk/update-squads": { + "post": { + "operationId": "UsersBulkActions_bulkUpdateUsersInternalSquads", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkUpdateUsersSquadsRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Internal squads updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkActionResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Bulk update users internal squads by UUIDs", + "tags": [ + "Users Bulk Actions Controller" + ] + } + }, + "/api/users/bulk/extend-expiration-date": { + "post": { + "description": "Bulk extend all users expiration date", + "operationId": "UsersBulkActions_bulkExtendExpirationDate", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkExtendExpirationDateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Users expiration date extended successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkActionResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Bulk Extend Users Expiration Date", + "tags": [ + "Users Bulk Actions Controller" + ] + } + }, + "/api/users/bulk/all/update": { + "post": { + "operationId": "UsersBulkActions_bulkUpdateAllUsers", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkAllUpdateUsersRequest" + } + } + } + }, + "responses": { + "200": { + "description": "All users updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Bulk update all users", + "tags": [ + "Users Bulk Actions Controller" + ] + } + }, + "/api/users/bulk/all/reset-traffic": { + "post": { + "description": "Bulk reset all users traffic", + "operationId": "UsersBulkActions_bulkAllResetUserTraffic", + "parameters": [], + "responses": { + "200": { + "description": "All users traffic reset successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Bulk Reset All Users Traffic", + "tags": [ + "Users Bulk Actions Controller" + ] + } + }, + "/api/users/bulk/all/extend-expiration-date": { + "post": { + "description": "Bulk extend all users expiration date", + "operationId": "UsersBulkActions_bulkAllExtendExpirationDate", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkAllExtendExpirationDateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "All users expiration date extended successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Bulk Extend All Users Expiration Date", + "tags": [ + "Users Bulk Actions Controller" + ] + } + }, + "/api/sub/{shortUuid}/info": { + "get": { + "operationId": "Subscription_getSubscriptionInfoByShortUuid", + "parameters": [ + { + "name": "shortUuid", + "required": true, + "in": "path", + "description": "Short UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Subscription info fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "summary": "Get Subscription Info by Short UUID", + "tags": [ + "[Public] Subscription Controller" + ] + } + }, + "/api/sub/{shortUuid}": { + "get": { + "operationId": "Subscription_getSubscription", + "parameters": [ + { + "name": "shortUuid", + "required": true, + "in": "path", + "description": "Short UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + } + }, + "tags": [ + "[Public] Subscription Controller" + ] + } + }, + "/api/sub/{shortUuid}/{clientType}": { + "get": { + "operationId": "Subscription_getSubscriptionByClientType", + "parameters": [ + { + "name": "clientType", + "required": true, + "in": "path", + "description": "Client type", + "schema": { + "enum": [ + "stash", + "singbox", + "mihomo", + "json", + "v2ray-json", + "clash" + ], + "type": "string" + } + }, + { + "name": "shortUuid", + "required": true, + "in": "path", + "description": "Short UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + } + }, + "tags": [ + "[Public] Subscription Controller" + ] + } + }, + "/api/subscriptions": { + "get": { + "operationId": "Subscriptions_getAllSubscriptions", + "parameters": [ + { + "name": "size", + "required": false, + "in": "query", + "description": "Number of subscriptions to return, no more than 500", + "schema": { + "example": 25, + "type": "integer" + } + }, + { + "name": "start", + "required": false, + "in": "query", + "description": "Start index (offset) of the users to return, default is 0", + "schema": { + "example": 0, + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Users fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAllSubscriptionsResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all subscriptions", + "tags": [ + "[Protected] Subscriptions Controller" + ] + } + }, + "/api/subscriptions/by-username/{username}": { + "get": { + "operationId": "Subscriptions_getSubscriptionByUsername", + "parameters": [ + { + "name": "username", + "required": true, + "in": "path", + "description": "Username of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Subscription fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "User not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get subscription by username", + "tags": [ + "[Protected] Subscriptions Controller" + ] + } + }, + "/api/subscriptions/by-short-uuid/{shortUuid}": { + "get": { + "operationId": "Subscriptions_getSubscriptionByShortUuidProtected", + "parameters": [ + { + "name": "shortUuid", + "required": true, + "in": "path", + "description": "Short uuid of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Subscription fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "User not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get subscription by short uuid (protected route)", + "tags": [ + "[Protected] Subscriptions Controller" + ] + } + }, + "/api/subscriptions/by-uuid/{uuid}": { + "get": { + "operationId": "Subscriptions_getSubscriptionByUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "Uuid of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Subscription fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "User not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get subscription by uuid", + "tags": [ + "[Protected] Subscriptions Controller" + ] + } + }, + "/api/subscriptions/by-short-uuid/{shortUuid}/raw": { + "get": { + "operationId": "Subscriptions_getRawSubscriptionByShortUuid", + "parameters": [ + { + "name": "withDisabledHosts", + "required": false, + "in": "query", + "description": "Include disabled hosts in the subscription. Default is false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "shortUuid", + "required": true, + "in": "path", + "description": "Short UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Raw subscription fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetRawSubscriptionByShortUuidResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Raw Subscription by Short UUID", + "tags": [ + "[Protected] Subscriptions Controller" + ] + } + }, + "/api/subscriptions/subpage-config/{shortUuid}": { + "get": { + "operationId": "Subscriptions_getSubpageConfigByShortUuid", + "parameters": [ + { + "name": "shortUuid", + "required": true, + "in": "path", + "description": "Short UUID of the user", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSubpageConfigByShortUuidRequestBody" + } + } + } + }, + "responses": { + "200": { + "description": "Subpage config fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSubpageConfigByShortUuidResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Subpage Config by Short UUID", + "tags": [ + "[Protected] Subscriptions Controller" + ] + } + }, + "/api/subscriptions/connection-keys/{uuid}": { + "get": { + "operationId": "Subscriptions_getConnectionKeysByUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Connection keys fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetConnectionKeysByUuidResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get connection keys (base64 format) by uuid", + "tags": [ + "[Protected] Subscriptions Controller" + ] + } + }, + "/api/subscription-templates": { + "get": { + "operationId": "SubscriptionTemplate_getAllTemplates", + "parameters": [], + "responses": { + "200": { + "description": "Templates retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TemplatesResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all subscription templates (wihout content)", + "tags": [ + "Subscription Template Controller" + ] + }, + "patch": { + "operationId": "SubscriptionTemplate_updateTemplate", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateTemplateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Template updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TemplateResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update subscription template", + "tags": [ + "Subscription Template Controller" + ] + }, + "post": { + "operationId": "SubscriptionTemplate_createTemplate", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSubscriptionTemplateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Template created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TemplateResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Create subscription template", + "tags": [ + "Subscription Template Controller" + ] + } + }, + "/api/subscription-templates/{uuid}": { + "get": { + "operationId": "SubscriptionTemplate_getTemplateByUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "Template UUID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Template retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TemplateResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get subscription template by uuid", + "tags": [ + "Subscription Template Controller" + ] + }, + "delete": { + "operationId": "SubscriptionTemplate_deleteTemplate", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "Template UUID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Template deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete subscription template", + "tags": [ + "Subscription Template Controller" + ] + } + }, + "/api/subscription-templates/actions/reorder": { + "post": { + "operationId": "SubscriptionTemplate_reorderSubscriptionTemplates", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReorderRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Subscription templates reordered successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TemplatesResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Reorder subscription templates", + "tags": [ + "Subscription Template Controller" + ] + } + }, + "/api/tokens": { + "post": { + "description": "This endpoint is forbidden to use via \"API-key\". It can only be used with an admin JWT-token.", + "operationId": "ApiTokens_create", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateApiTokenRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Token created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateApiTokenResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Create a new API token", + "tags": [ + "API Tokens Controller" + ] + }, + "get": { + "description": "This endpoint is forbidden to use via \"API-key\". It can only be used with admin JWT-token.", + "operationId": "ApiTokens_findAll", + "parameters": [], + "responses": { + "200": { + "description": "Tokens fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FindAllApiTokensResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all API tokens", + "tags": [ + "API Tokens Controller" + ] + } + }, + "/api/tokens/{uuid}": { + "delete": { + "description": "This endpoint is forbidden to use via \"API-key\". It can be used only with an admin JWT-token.", + "operationId": "ApiTokens_delete", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the API token", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Token deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteApiTokenResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete an API token by UUID", + "tags": [ + "API Tokens Controller" + ] + } + }, + "/api/tokens/scopes": { + "get": { + "description": "Returns the catalog of scopes that can be granted to an API token, grouped by resource. Forbidden via \"API-key\", admin JWT only.", + "operationId": "ApiTokens_getScopes", + "parameters": [], + "responses": { + "200": { + "description": "Available API token scopes fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetApiTokenScopesResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get available API token scopes", + "tags": [ + "API Tokens Controller" + ] + } + }, + "/api/config-profiles": { + "get": { + "operationId": "ConfigProfile_getConfigProfiles", + "parameters": [], + "responses": { + "200": { + "description": "Config profiles retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigProfilesResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get config profiles", + "tags": [ + "Config Profiles Controller" + ] + }, + "post": { + "operationId": "ConfigProfile_createConfigProfile", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateConfigProfileRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Config profile created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigProfileResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "409": { + "description": "Config profile name already exists or inbound tags are not unique. Inbound tags must be unique in global scope." + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Create config profile", + "tags": [ + "Config Profiles Controller" + ] + }, + "patch": { + "operationId": "ConfigProfile_updateConfigProfile", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateConfigProfileRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Config profile updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigProfileResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "Config profile not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "409": { + "description": "Config profile name already exists or inbound tags are not unique. Inbound tags must be unique in global scope." + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update Core Config in specific config profile", + "tags": [ + "Config Profiles Controller" + ] + } + }, + "/api/config-profiles/inbounds": { + "get": { + "operationId": "ConfigProfile_getAllInbounds", + "parameters": [], + "responses": { + "200": { + "description": "Inbounds retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InboundsResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all inbounds from all config profiles", + "tags": [ + "Config Profiles Controller" + ] + } + }, + "/api/config-profiles/{uuid}/inbounds": { + "get": { + "operationId": "ConfigProfile_getInboundsByProfileUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Inbounds retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InboundsResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "Config profile not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get inbounds by profile uuid", + "tags": [ + "Config Profiles Controller" + ] + } + }, + "/api/config-profiles/{uuid}": { + "get": { + "operationId": "ConfigProfile_getConfigProfileByUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Config profile retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigProfileResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "Config profile not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get config profile by uuid", + "tags": [ + "Config Profiles Controller" + ] + }, + "delete": { + "operationId": "ConfigProfile_deleteConfigProfileByUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Config profile deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "Config profile not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete config profile", + "tags": [ + "Config Profiles Controller" + ] + } + }, + "/api/config-profiles/{uuid}/computed-config": { + "get": { + "operationId": "ConfigProfile_getComputedConfigProfileByUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Computed config profile retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigProfileResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "Config profile not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get computed config profile by uuid", + "tags": [ + "Config Profiles Controller" + ] + } + }, + "/api/config-profiles/actions/reorder": { + "post": { + "operationId": "ConfigProfile_reorderConfigProfiles", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReorderRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Config profiles reordered successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigProfilesResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Reorder config profiles", + "tags": [ + "Config Profiles Controller" + ] + } + }, + "/api/snippets": { + "get": { + "operationId": "Snippets_getSnippets", + "parameters": [], + "responses": { + "200": { + "description": "Snippets retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnippetsResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get snippets", + "tags": [ + "Snippets Controller" + ] + }, + "delete": { + "operationId": "Snippets_deleteSnippetByName", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteSnippetRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Snippet deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnippetsResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "Snippet not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete snippet", + "tags": [ + "Snippets Controller" + ] + }, + "post": { + "operationId": "Snippets_createSnippet", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnippetRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Snippet created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnippetsResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "409": { + "description": "Snippet name already exists." + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Create snippet", + "tags": [ + "Snippets Controller" + ] + }, + "patch": { + "operationId": "Snippets_updateSnippet", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnippetRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Snippet updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnippetsResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "Snippet not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "409": { + "description": "Snippet name already exists." + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update snippet", + "tags": [ + "Snippets Controller" + ] + } + }, + "/api/internal-squads": { + "get": { + "operationId": "InternalSquad_getInternalSquads", + "parameters": [], + "responses": { + "200": { + "description": "Internal squads retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalSquadsResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all internal squads", + "tags": [ + "Internal Squads Controller" + ] + }, + "post": { + "operationId": "InternalSquad_createInternalSquad", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateInternalSquadRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Internal squad created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalSquadResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "409": { + "description": "Internal squad already exists" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Create internal squad", + "tags": [ + "Internal Squads Controller" + ] + }, + "patch": { + "operationId": "InternalSquad_updateInternalSquad", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateInternalSquadRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Internal squad updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalSquadResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "Internal squad not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "409": { + "description": "Internal squad already exists" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update internal squad", + "tags": [ + "Internal Squads Controller" + ] + } + }, + "/api/internal-squads/{uuid}": { + "get": { + "operationId": "InternalSquad_getInternalSquadByUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Internal squad retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalSquadResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get internal squad by uuid", + "tags": [ + "Internal Squads Controller" + ] + }, + "delete": { + "operationId": "InternalSquad_deleteInternalSquad", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Internal squad deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "Internal squad not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete internal squad", + "tags": [ + "Internal Squads Controller" + ] + } + }, + "/api/internal-squads/{uuid}/accessible-nodes": { + "get": { + "operationId": "InternalSquad_getInternalSquadAccessibleNodes", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the internal squad", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Internal squad accessible nodes fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetInternalSquadAccessibleNodesResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "Internal squad not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get internal squad accessible nodes", + "tags": [ + "Internal Squads Controller" + ] + } + }, + "/api/internal-squads/{uuid}/bulk-actions/add-users": { + "post": { + "operationId": "InternalSquad_addUsersToInternalSquad", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Task added to internal job queue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "Internal squad not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Add all users to internal squad", + "tags": [ + "Internal Squads Controller" + ] + } + }, + "/api/internal-squads/{uuid}/bulk-actions/remove-users": { + "delete": { + "operationId": "InternalSquad_removeUsersFromInternalSquad", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Task added to internal job queue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "Internal squad not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete users from internal squad", + "tags": [ + "Internal Squads Controller" + ] + } + }, + "/api/internal-squads/actions/reorder": { + "post": { + "operationId": "InternalSquad_reorderInternalSquads", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReorderRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Internal squads reordered successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalSquadsResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Reorder internal squads", + "tags": [ + "Internal Squads Controller" + ] + } + }, + "/api/external-squads": { + "get": { + "operationId": "ExternalSquad_getExternalSquads", + "parameters": [], + "responses": { + "200": { + "description": "External squads retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalSquadsResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all external squads", + "tags": [ + "External Squads Controller" + ] + }, + "post": { + "operationId": "ExternalSquad_createExternalSquad", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateExternalSquadRequest" + } + } + } + }, + "responses": { + "201": { + "description": "External squad created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalSquadResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "409": { + "description": "External squad already exists" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Create external squad", + "tags": [ + "External Squads Controller" + ] + }, + "patch": { + "operationId": "ExternalSquad_updateExternalSquad", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateExternalSquadRequest" + } + } + } + }, + "responses": { + "200": { + "description": "External squad updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalSquadResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "External squad not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "409": { + "description": "External squad already exists" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update external squad", + "tags": [ + "External Squads Controller" + ] + } + }, + "/api/external-squads/{uuid}": { + "get": { + "operationId": "ExternalSquad_getExternalSquadByUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "External squad retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalSquadResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get external squad by uuid", + "tags": [ + "External Squads Controller" + ] + }, + "delete": { + "operationId": "ExternalSquad_deleteExternalSquad", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "External squad deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "External squad not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete external squad", + "tags": [ + "External Squads Controller" + ] + } + }, + "/api/external-squads/{uuid}/bulk-actions/add-users": { + "post": { + "operationId": "ExternalSquad_addUsersToExternalSquad", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Task added to external job queue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "External squad not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Add all users to external squad", + "tags": [ + "External Squads Controller" + ] + } + }, + "/api/external-squads/{uuid}/bulk-actions/remove-users": { + "delete": { + "operationId": "ExternalSquad_removeUsersFromExternalSquad", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Task added to external job queue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "External squad not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete users from external squad", + "tags": [ + "External Squads Controller" + ] + } + }, + "/api/external-squads/actions/reorder": { + "post": { + "operationId": "ExternalSquad_reorderExternalSquads", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReorderRequest" + } + } + } + }, + "responses": { + "200": { + "description": "External squads reordered successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalSquadsResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Reorder external squads", + "tags": [ + "External Squads Controller" + ] + } + }, + "/api/keygen": { + "get": { + "operationId": "Keygen_generateKey", + "parameters": [], + "responses": { + "200": { + "description": "Get SECRET_KEY for Remnawave Node", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetPubKeyResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get SECRET_KEY for Remnawave Node", + "tags": [ + "Keygen Controller" + ] + } + }, + "/api/nodes/tags": { + "get": { + "operationId": "Nodes_getAllNodesTags", + "parameters": [], + "responses": { + "200": { + "description": "Nodes tags fetched", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TagsResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all existing nodes tags", + "tags": [ + "Nodes Controller" + ] + } + }, + "/api/nodes": { + "post": { + "operationId": "Nodes_createNode", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateNodeRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Node created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NodeResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Create a new node", + "tags": [ + "Nodes Controller" + ] + }, + "get": { + "operationId": "Nodes_getAllNodes", + "parameters": [], + "responses": { + "200": { + "description": "Nodes fetched", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NodesResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all nodes", + "tags": [ + "Nodes Controller" + ] + }, + "patch": { + "operationId": "Nodes_updateNode", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateNodeRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Node updated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NodeResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update node", + "tags": [ + "Nodes Controller" + ] + } + }, + "/api/nodes/{uuid}": { + "get": { + "operationId": "Nodes_getOneNode", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "Node UUID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Node fetched", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NodeResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get node by UUID", + "tags": [ + "Nodes Controller" + ] + }, + "delete": { + "operationId": "Nodes_deleteNode", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "Node UUID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Node deleted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete a node", + "tags": [ + "Nodes Controller" + ] + } + }, + "/api/nodes/{uuid}/actions/enable": { + "post": { + "operationId": "Nodes_enableNode", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "Node UUID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Node enabled", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NodeResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Enable a node", + "tags": [ + "Nodes Controller" + ] + } + }, + "/api/nodes/{uuid}/actions/disable": { + "post": { + "operationId": "Nodes_disableNode", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "Node UUID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Node disabled", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NodeResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Disable a node", + "tags": [ + "Nodes Controller" + ] + } + }, + "/api/nodes/{uuid}/actions/restart": { + "post": { + "operationId": "Nodes_restartNode", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "Node UUID", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NodeRequestBodyRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Node restarted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Restart node", + "tags": [ + "Nodes Controller" + ] + } + }, + "/api/nodes/{uuid}/actions/reset-traffic": { + "post": { + "operationId": "Nodes_resetNodeTraffic", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "Node UUID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Event sent", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Reset Node Traffic", + "tags": [ + "Nodes Controller" + ] + } + }, + "/api/nodes/actions/restart-all": { + "post": { + "operationId": "Nodes_restartAllNodes", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NodeRequestBodyRequest" + } + } + } + }, + "responses": { + "200": { + "description": "All nodes restarted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Restart all nodes", + "tags": [ + "Nodes Controller" + ] + } + }, + "/api/nodes/actions/reorder": { + "post": { + "operationId": "Nodes_reorderNodes", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReorderNodeRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Nodes reordered successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NodesResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Reorder nodes", + "tags": [ + "Nodes Controller" + ] + } + }, + "/api/nodes/bulk-actions/profile-modification": { + "post": { + "operationId": "Nodes_profileModification", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProfileModificationRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Event sent successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Modify Inbounds & Profile for many nodes", + "tags": [ + "Nodes Controller" + ] + } + }, + "/api/nodes/bulk-actions": { + "post": { + "operationId": "Nodes_bulkNodesActions", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkNodesActionsRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Event sent successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Perform actions for many nodes", + "tags": [ + "Nodes Controller" + ] + } + }, + "/api/nodes/bulk-actions/update": { + "post": { + "operationId": "Nodes_bulkNodesUpdate", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkNodesUpdateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Event sent successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update many nodes", + "tags": [ + "Nodes Controller" + ] + } + }, + "/api/node-plugins/torrent-blocker": { + "get": { + "operationId": "TorrentBlockerReports_getTorrentBlockerReports", + "parameters": [ + { + "name": "size", + "required": false, + "in": "query", + "description": "Page size for pagination", + "schema": { + "type": "integer" + } + }, + { + "name": "start", + "required": false, + "in": "query", + "description": "Offset for pagination", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Torrent blocker reports fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TorrentBlockerReportsResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Torrent Blocker Reports", + "tags": [ + "Node Plugins Controller" + ] + } + }, + "/api/node-plugins/torrent-blocker/stats": { + "get": { + "operationId": "TorrentBlockerReports_getTorrentBlockerReportsStats", + "parameters": [], + "responses": { + "200": { + "description": "Torrent blocker reports stats fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTorrentBlockerReportsStatsResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Torrent Blocker Reports Stats", + "tags": [ + "Node Plugins Controller" + ] + } + }, + "/api/node-plugins/torrent-blocker/truncate": { + "delete": { + "operationId": "TorrentBlockerReports_truncateTorrentBlockerReports", + "parameters": [], + "responses": { + "200": { + "description": "Torrent blocker reports truncated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TorrentBlockerReportsResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Truncate Torrent Blocker Reports", + "tags": [ + "Node Plugins Controller" + ] + } + }, + "/api/node-plugins": { + "get": { + "operationId": "NodePlugin_getAllConfigs", + "parameters": [], + "responses": { + "200": { + "description": "Node plugins retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NodePluginsResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all Node Plugins", + "tags": [ + "Node Plugins Controller" + ] + }, + "patch": { + "operationId": "NodePlugin_updateConfig", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateNodePluginRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Node plugin updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NodePluginResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update Node Plugin", + "tags": [ + "Node Plugins Controller" + ] + }, + "post": { + "operationId": "NodePlugin_createConfig", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateNodePluginRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Node plugin created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateNodePluginResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Create Node Plugin", + "tags": [ + "Node Plugins Controller" + ] + } + }, + "/api/node-plugins/{uuid}": { + "get": { + "operationId": "NodePlugin_getConfigByUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "Node plugin UUID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Node plugin retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NodePluginResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Node Plugin by uuid", + "tags": [ + "Node Plugins Controller" + ] + }, + "delete": { + "operationId": "NodePlugin_deleteConfig", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "Node plugin UUID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Node plugin deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete Node Plugin", + "tags": [ + "Node Plugins Controller" + ] + } + }, + "/api/node-plugins/actions/reorder": { + "post": { + "operationId": "NodePlugin_reorderNodePlugins", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReorderRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Node plugins reordered successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NodePluginsResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Reorder Node Plugins", + "tags": [ + "Node Plugins Controller" + ] + } + }, + "/api/node-plugins/actions/clone": { + "post": { + "operationId": "NodePlugin_cloneNodePlugin", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CloneNodePluginRequestRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Node plugin cloned successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NodePluginResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Clone Node Plugin", + "tags": [ + "Node Plugins Controller" + ] + } + }, + "/api/node-plugins/executor": { + "post": { + "operationId": "NodePlugin_pluginExecutor", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PluginExecutorRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Node plugin cloned successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Execute command on node plugins", + "tags": [ + "Node Plugins Controller" + ] + } + }, + "/api/hosts/tags": { + "get": { + "operationId": "Hosts_getAllHostTags", + "parameters": [], + "responses": { + "200": { + "description": "Host tags fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TagsResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all existing host tags", + "tags": [ + "Hosts Controller" + ] + } + }, + "/api/hosts": { + "post": { + "operationId": "Hosts_createHost", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateHostRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Host created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HostResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Create a new host", + "tags": [ + "Hosts Controller" + ] + }, + "patch": { + "operationId": "Hosts_updateHost", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateHostRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Host updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HostResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update a host", + "tags": [ + "Hosts Controller" + ] + }, + "get": { + "operationId": "Hosts_getAllHosts", + "parameters": [], + "responses": { + "200": { + "description": "Hosts fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HostListResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all hosts", + "tags": [ + "Hosts Controller" + ] + } + }, + "/api/hosts/{uuid}": { + "get": { + "operationId": "Hosts_getOneHost", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the host", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Host fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HostResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get a host by UUID", + "tags": [ + "Hosts Controller" + ] + }, + "delete": { + "operationId": "Hosts_deleteHost", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the host", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Host deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "Host not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete a host by UUID", + "tags": [ + "Hosts Controller" + ] + } + }, + "/api/hosts/actions/reorder": { + "post": { + "operationId": "Hosts_reorderHosts", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReorderHostRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Hosts reordered successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReorderHostResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Reorder hosts", + "tags": [ + "Hosts Controller" + ] + } + }, + "/api/hosts/bulk/delete": { + "post": { + "operationId": "HostsBulkActions_deleteHosts", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkUuidsRequest2" + } + } + } + }, + "responses": { + "200": { + "description": "Hosts deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HostListResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete hosts by UUIDs", + "tags": [ + "Hosts Bulk Actions Controller" + ] + } + }, + "/api/hosts/bulk/disable": { + "post": { + "operationId": "HostsBulkActions_disableHosts", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkUuidsRequest2" + } + } + } + }, + "responses": { + "200": { + "description": "Hosts disabled successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HostListResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Disable hosts by UUIDs", + "tags": [ + "Hosts Bulk Actions Controller" + ] + } + }, + "/api/hosts/bulk/enable": { + "post": { + "operationId": "HostsBulkActions_enableHosts", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkUuidsRequest2" + } + } + } + }, + "responses": { + "200": { + "description": "Hosts enabled successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HostListResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Enable hosts by UUIDs", + "tags": [ + "Hosts Bulk Actions Controller" + ] + } + }, + "/api/hosts/bulk/update": { + "patch": { + "operationId": "HostsBulkActions_setPortToHosts", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateManyHostsRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Hosts updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HostListResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update many hosts", + "tags": [ + "Hosts Bulk Actions Controller" + ] + } + }, + "/api/bandwidth-stats/nodes/{uuid}/users/legacy": { + "get": { + "operationId": "BandwidthStatsNodes_getNodeUserUsage", + "parameters": [ + { + "name": "start", + "required": true, + "in": "query", + "description": "Start date", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "end", + "required": true, + "in": "query", + "description": "End date", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the node", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Nodes users usage by range (legacy) fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetLegacyStatsNodesUsersUsageResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Node User Usage by Range and Node UUID (Legacy)", + "tags": [ + "Bandwidth Stats Controller" + ] + } + }, + "/api/bandwidth-stats/nodes/{uuid}/users": { + "get": { + "operationId": "BandwidthStatsNodes_getStatsNodeUsersUsage", + "parameters": [ + { + "name": "topUsersLimit", + "required": true, + "in": "query", + "description": "Limit of top users to return", + "schema": { + "type": "integer" + } + }, + { + "name": "start", + "required": true, + "in": "query", + "description": "Start date (YYYY-MM-DD)", + "schema": { + "format": "date", + "example": "2026-01-31", + "type": "string" + } + }, + { + "name": "end", + "required": true, + "in": "query", + "description": "End date (YYYY-MM-DD)", + "schema": { + "format": "date", + "example": "2026-01-01", + "type": "string" + } + }, + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the node", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Stats node users usage fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatsNodeUsersUsageResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Node Users Usage by Node UUID", + "tags": [ + "Bandwidth Stats Controller" + ] + } + }, + "/api/bandwidth-stats/nodes/users": { + "post": { + "operationId": "BandwidthStatsNodes_getStatsNodesUsersUsage", + "parameters": [ + { + "name": "topUsersLimit", + "required": true, + "in": "query", + "description": "Limit of top users to return", + "schema": { + "type": "integer" + } + }, + { + "name": "start", + "required": true, + "in": "query", + "description": "Start date (YYYY-MM-DD)", + "schema": { + "format": "date", + "example": "2026-01-31", + "type": "string" + } + }, + { + "name": "end", + "required": true, + "in": "query", + "description": "End date (YYYY-MM-DD)", + "schema": { + "format": "date", + "example": "2026-01-01", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetStatsNodesUsersUsageRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Stats node users usage fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatsNodeUsersUsageResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Nodes Users Usage by Nodes UUIDs", + "tags": [ + "Bandwidth Stats Controller" + ] + } + }, + "/api/bandwidth-stats/users/{uuid}/legacy": { + "get": { + "operationId": "BandwidthStatsUsers_getUserUsageByRange", + "parameters": [ + { + "name": "start", + "required": true, + "in": "query", + "description": "Start date", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "end", + "required": true, + "in": "query", + "description": "End date", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User usage by range (legacy) fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetLegacyStatsUserUsageResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "User not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get User Usage by Range (Legacy)", + "tags": [ + "Bandwidth Stats Controller" + ] + } + }, + "/api/bandwidth-stats/users/{uuid}": { + "get": { + "operationId": "BandwidthStatsUsers_getStatsNodesUsage", + "parameters": [ + { + "name": "topNodesLimit", + "required": true, + "in": "query", + "description": "Limit of top nodes to return", + "schema": { + "type": "integer" + } + }, + { + "name": "start", + "required": true, + "in": "query", + "description": "Start date (YYYY-MM-DD)", + "schema": { + "format": "date", + "example": "2026-01-31", + "type": "string" + } + }, + { + "name": "end", + "required": true, + "in": "query", + "description": "End date (YYYY-MM-DD)", + "schema": { + "format": "date", + "example": "2026-01-01", + "type": "string" + } + }, + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Stats user usage fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatsUserUsageResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get User Usage by Range", + "tags": [ + "Bandwidth Stats Controller" + ] + } + }, + "/api/hwid/devices": { + "get": { + "operationId": "HwidUserDevices_getAllUsers", + "parameters": [ + { + "name": "size", + "required": false, + "in": "query", + "description": "Page size for pagination", + "schema": { + "type": "integer" + } + }, + { + "name": "start", + "required": false, + "in": "query", + "description": "Offset for pagination", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Hwid devices fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAllHwidDevicesResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all HWID devices", + "tags": [ + "HWID User Devices Controller" + ] + }, + "post": { + "operationId": "HwidUserDevices_createUserHwidDevice", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateUserHwidDeviceRequest" + } + } + } + }, + "responses": { + "200": { + "description": "User HWID device created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HwidDevicesResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "One of requested resources not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Create a user HWID device", + "tags": [ + "HWID User Devices Controller" + ] + } + }, + "/api/hwid/devices/delete": { + "post": { + "operationId": "HwidUserDevices_deleteUserHwidDevice", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteUserHwidDeviceRequest" + } + } + } + }, + "responses": { + "200": { + "description": "User HWID device deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HwidDevicesResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "One of requested resources not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete a user HWID device", + "tags": [ + "HWID User Devices Controller" + ] + } + }, + "/api/hwid/devices/delete-all": { + "post": { + "operationId": "HwidUserDevices_deleteAllUserHwidDevices", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteAllUserHwidDevicesRequest" + } + } + } + }, + "responses": { + "200": { + "description": "User HWID devices deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HwidDevicesResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "One of requested resources not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete all user HWID devices", + "tags": [ + "HWID User Devices Controller" + ] + } + }, + "/api/hwid/devices/stats": { + "get": { + "operationId": "HwidUserDevices_getHwidDevicesStats", + "parameters": [], + "responses": { + "200": { + "description": "Hwid devices stats fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetHwidDevicesStatsResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get HWID devices stats", + "tags": [ + "HWID User Devices Controller" + ] + } + }, + "/api/hwid/devices/top-users": { + "get": { + "operationId": "HwidUserDevices_getTopUsersByHwidDevices", + "parameters": [ + { + "name": "size", + "required": false, + "in": "query", + "description": "Page size for pagination", + "schema": { + "type": "integer" + } + }, + { + "name": "start", + "required": false, + "in": "query", + "description": "Offset for pagination", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Top users by HWID devices fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTopUsersByHwidDevicesResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get top users by HWID devices", + "tags": [ + "HWID User Devices Controller" + ] + } + }, + "/api/hwid/devices/{userUuid}": { + "get": { + "operationId": "HwidUserDevices_getUserHwidDevices", + "parameters": [ + { + "name": "userUuid", + "required": true, + "in": "path", + "description": "UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User HWID devices fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HwidDevicesResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "One of requested resources not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get user HWID devices", + "tags": [ + "HWID User Devices Controller" + ] + } + }, + "/api/bandwidth-stats/nodes": { + "get": { + "operationId": "NodesUsageHistory_getStatsNodesUsage", + "parameters": [ + { + "name": "topNodesLimit", + "required": true, + "in": "query", + "description": "Limit of top nodes to return", + "schema": { + "type": "integer" + } + }, + { + "name": "start", + "required": true, + "in": "query", + "description": "Start date (YYYY-MM-DD)", + "schema": { + "format": "date", + "example": "2026-01-31", + "type": "string" + } + }, + { + "name": "end", + "required": true, + "in": "query", + "description": "End date (YYYY-MM-DD)", + "schema": { + "format": "date", + "example": "2026-01-01", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Stats nodes usage fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatsUserUsageResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Nodes Usage by Range", + "tags": [ + "Bandwidth Stats Controller" + ] + } + }, + "/api/infra-billing/providers": { + "get": { + "operationId": "InfraBilling_getInfraProviders", + "parameters": [], + "responses": { + "200": { + "description": "Infra providers retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetInfraProvidersResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all infra providers", + "tags": [ + "Infra Billing Controller" + ] + }, + "post": { + "operationId": "InfraBilling_createInfraProvider", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateInfraProviderRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Infra provider created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InfraProviderResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Create infra provider", + "tags": [ + "Infra Billing Controller" + ] + }, + "patch": { + "operationId": "InfraBilling_updateInfraProvider", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateInfraProviderRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Infra provider updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InfraProviderResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update infra provider", + "tags": [ + "Infra Billing Controller" + ] + } + }, + "/api/infra-billing/providers/{uuid}": { + "get": { + "operationId": "InfraBilling_getInfraProviderByUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Infra provider retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InfraProviderResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "Infra provider not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get infra provider by uuid", + "tags": [ + "Infra Billing Controller" + ] + }, + "delete": { + "operationId": "InfraBilling_deleteInfraProviderByUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Infra provider deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete infra provider by uuid", + "tags": [ + "Infra Billing Controller" + ] + } + }, + "/api/infra-billing/history": { + "post": { + "operationId": "InfraBilling_createInfraBillingHistoryRecord", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateInfraBillingHistoryRecordRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Infra billing history record created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BillingHistoryResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Create infra billing history", + "tags": [ + "Infra Billing Controller" + ] + }, + "get": { + "operationId": "InfraBilling_getInfraBillingHistoryRecords", + "parameters": [], + "responses": { + "200": { + "description": "Infra billing history records retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BillingHistoryResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get infra billing history", + "tags": [ + "Infra Billing Controller" + ] + } + }, + "/api/infra-billing/history/{uuid}": { + "delete": { + "operationId": "InfraBilling_deleteInfraBillingHistoryRecordByUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Infra billing history record deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BillingHistoryResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete infra billing history", + "tags": [ + "Infra Billing Controller" + ] + } + }, + "/api/infra-billing/nodes": { + "get": { + "operationId": "InfraBilling_getBillingNodes", + "parameters": [], + "responses": { + "200": { + "description": "Infra billing nodes retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BillingNodesResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get infra billing nodes", + "tags": [ + "Infra Billing Controller" + ] + }, + "patch": { + "operationId": "InfraBilling_updateInfraBillingNode", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateInfraBillingNodeRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Infra billing node updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BillingNodesResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update infra billing nodes", + "tags": [ + "Infra Billing Controller" + ] + }, + "post": { + "operationId": "InfraBilling_createInfraBillingNode", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateInfraBillingNodeRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Infra billing node created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BillingNodesResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Create infra billing node", + "tags": [ + "Infra Billing Controller" + ] + } + }, + "/api/infra-billing/nodes/{uuid}": { + "delete": { + "operationId": "InfraBilling_deleteInfraBillingNodeByUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Infra billing node deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BillingNodesResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete infra billing node", + "tags": [ + "Infra Billing Controller" + ] + } + }, + "/api/subscription-request-history": { + "get": { + "operationId": "UserSubscriptionRequestHistory_getSubscriptionRequestHistory", + "parameters": [ + { + "name": "size", + "required": false, + "in": "query", + "description": "Page size for pagination", + "schema": { + "type": "integer" + } + }, + { + "name": "start", + "required": false, + "in": "query", + "description": "Offset for pagination", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Subscription request history fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSubscriptionRequestHistoryResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all subscription request history", + "tags": [ + "Subscription Request History Controller" + ] + } + }, + "/api/subscription-request-history/stats": { + "get": { + "operationId": "UserSubscriptionRequestHistory_getSubscriptionRequestHistoryStats", + "parameters": [], + "responses": { + "200": { + "description": "User subscription request history stats fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSubscriptionRequestHistoryStatsResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get subscription request history stats", + "tags": [ + "Subscription Request History Controller" + ] + } + }, + "/api/system/metadata": { + "get": { + "operationId": "System_getMetadata", + "parameters": [], + "responses": { + "200": { + "description": "Returns system metadata", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetMetadataResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Remnawave Information", + "tags": [ + "System Controller" + ] + } + }, + "/api/system/stats": { + "get": { + "operationId": "System_getStats", + "parameters": [], + "responses": { + "200": { + "description": "Returns system statistics", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetStatsResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Stats", + "tags": [ + "System Controller" + ] + } + }, + "/api/system/stats/bandwidth": { + "get": { + "operationId": "System_getBandwidthStats", + "parameters": [], + "responses": { + "200": { + "description": "Returns bandwidth statistics", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetBandwidthStatsResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Bandwidth Stats", + "tags": [ + "System Controller" + ] + } + }, + "/api/system/stats/nodes": { + "get": { + "operationId": "System_getNodesStatistics", + "parameters": [], + "responses": { + "200": { + "description": "Returns nodes statistics", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetNodesStatisticsResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Nodes Statistics", + "tags": [ + "System Controller" + ] + } + }, + "/api/system/health": { + "get": { + "operationId": "System_getRemnawaveHealth", + "parameters": [], + "responses": { + "200": { + "description": "Returns Remnawave health", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetRemnawaveHealthResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Remnawave Health", + "tags": [ + "System Controller" + ] + } + }, + "/api/system/nodes/metrics": { + "get": { + "operationId": "System_getNodesMetrics", + "parameters": [], + "responses": { + "200": { + "description": "Returns nodes metrics from Prometheus metrics endpoint", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetNodesMetricsResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Nodes Metrics", + "tags": [ + "System Controller" + ] + } + }, + "/api/system/tools/x25519/generate": { + "get": { + "operationId": "System_getX25519Keypairs", + "parameters": [], + "responses": { + "200": { + "description": "Returns x25519 keypairs", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateX25519Response" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Generate 30 X25519 keypairs", + "tags": [ + "System Controller" + ] + } + }, + "/api/system/testers/srr-matcher": { + "post": { + "operationId": "System_debugSrrMatcher", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DebugSrrMatcherRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Debug SRR matcher information", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DebugSrrMatcherResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Test SRR Matcher", + "tags": [ + "System Controller" + ] + } + }, + "/api/system/stats/recap": { + "get": { + "operationId": "System_getRecap", + "parameters": [], + "responses": { + "200": { + "description": "Returns system recap", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetRecapResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Recap", + "tags": [ + "System Controller" + ] + } + }, + "/api/subscription-settings": { + "get": { + "operationId": "SubscriptionSettings_getSettings", + "parameters": [], + "responses": { + "200": { + "description": "Subscription settings retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionSettingsResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get subscription settings", + "tags": [ + "Subscription Settings Controller" + ] + }, + "patch": { + "operationId": "SubscriptionSettings_updateSettings", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSubscriptionSettingsRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Subscription settings updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionSettingsResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update subscription settings", + "tags": [ + "Subscription Settings Controller" + ] + } + }, + "/api/ip-control/fetch-ips/{uuid}": { + "post": { + "operationId": "IpControl_fetchUserIps", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Return jobId for further processing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IpsResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "User not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Request IP List for User", + "tags": [ + "IP Management Controller" + ] + } + }, + "/api/ip-control/fetch-ips/result/{jobId}": { + "get": { + "operationId": "IpControl_getFetchIpsResult", + "parameters": [ + { + "name": "jobId", + "required": true, + "in": "path", + "description": "Job ID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Return result or status of the job", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchIpsResultResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "Job not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get IP List Result by Job ID", + "tags": [ + "IP Management Controller" + ] + } + }, + "/api/ip-control/drop-connections": { + "post": { + "operationId": "IpControl_dropConnections", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DropConnectionsRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Event sent to background executor", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "User not found // Connected nodes not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Drop Connections for Users or IPs", + "tags": [ + "IP Management Controller" + ] + } + }, + "/api/ip-control/fetch-users-ips/{nodeUuid}": { + "post": { + "operationId": "IpControl_fetchUsersIps", + "parameters": [ + { + "name": "nodeUuid", + "required": true, + "in": "path", + "description": "UUID of the node", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Return jobId for further processing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IpsResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "Node not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Request Users IPs List for Node", + "tags": [ + "IP Management Controller" + ] + } + }, + "/api/ip-control/fetch-users-ips/result/{jobId}": { + "get": { + "operationId": "IpControl_getFetchUsersIpsResult", + "parameters": [ + { + "name": "jobId", + "required": true, + "in": "path", + "description": "Job ID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Return result or status of the job", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchUsersIpsResultResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "Job not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Users IPs List Result by Job ID", + "tags": [ + "IP Management Controller" + ] + } + }, + "/api/metadata/user/{uuid}": { + "get": { + "operationId": "Metadata_getUserMetadata", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User Metadata retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserMetadataResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "User or Metadata not found (see errorCode for more details)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get user metadata", + "tags": [ + "Metadata Controller" + ] + }, + "put": { + "operationId": "Metadata_upsertUserMetadata", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the user", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpsertUserMetadataRequestBodyRequest" + } + } + } + }, + "responses": { + "200": { + "description": "User Metadata upserted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserMetadataResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "User not found (see errorCode for more details)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update or create User Metadata", + "tags": [ + "Metadata Controller" + ] + } + }, + "/api/metadata/node/{uuid}": { + "get": { + "operationId": "Metadata_getNodeMetadata", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the node", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Node Metadata retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserMetadataResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "Node or Metadata not found (see errorCode for more details)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get node metadata", + "tags": [ + "Metadata Controller" + ] + }, + "put": { + "operationId": "Metadata_upsertNodeMetadata", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the node", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpsertUserMetadataRequestBodyRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Node Metadata upserted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserMetadataResponseResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + }, + "404": { + "description": "Node not found (see errorCode for more details)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFoundError" + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InternalServerError" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update or create Node Metadata", + "tags": [ + "Metadata Controller" + ] + } + } + }, + "info": { + "title": "Remnawave API v2.8.0", + "description": "\nRemnawave is a powerful proxy managment tool, built on top of Xray-core, with a focus on simplicity and ease of use.\n\n## Resources\n* https://t.me/remnawave\n* https://github.com/remnawave\n* https://docs.rw\n", + "version": "2.8.0", + "contact": {}, + "license": { + "name": "AGPL-3.0", + "url": "https://github.com/remnawave/panel?tab=AGPL-3.0-1-ov-file" + } + }, + "tags": [ + { + "name": "Auth Controller", + "description": "Used to authenticate admin users." + }, + { + "name": "Passkeys Controller", + "description": "Management of Passkeys." + }, + { + "name": "API Tokens Controller", + "description": "Manage API tokens to use in your code. This controller can't be used with API token, only with Admin JWT token" + }, + { + "name": "Users Controller", + "description": "Manage users, change their status, reset traffic, etc." + }, + { + "name": "Users Bulk Actions Controller", + "description": "Bulk actions with users." + }, + { + "name": "HWID User Devices Controller", + "description": "" + }, + { + "name": "[Public] Subscription Controller", + "description": "Public Subscription Controller. Methods of this controller are not protected with auth. Use it only for public requests." + }, + { + "name": "[Protected] Subscriptions Controller", + "description": "Methods of this controller are protected with auth, most of them is returning the same informations as public Subscription Controller." + }, + { + "name": "Nodes Controller", + "description": "" + }, + { + "name": "Node Plugins Controller", + "description": "" + }, + { + "name": "Bandwidth Stats Controller", + "description": "" + }, + { + "name": "IP Management Controller", + "description": "Management of IP addresses and connections." + }, + { + "name": "Config Profiles Controller", + "description": "Management of Config Profiles." + }, + { + "name": "Internal Squads Controller", + "description": "Management of Internal Squads." + }, + { + "name": "External Squads Controller", + "description": "Management of External Squads." + }, + { + "name": "Hosts Controller", + "description": "" + }, + { + "name": "Hosts Bulk Actions Controller", + "description": "" + }, + { + "name": "Subscription Template Controller", + "description": "" + }, + { + "name": "Subscription Settings Controller", + "description": "" + }, + { + "name": "Infra Billing Controller", + "description": "" + }, + { + "name": "System Controller", + "description": "" + }, + { + "name": "Keygen Controller", + "description": "Generation of SECRET_KEY for Remnawave Node." + }, + { + "name": "Subscription Request History Controller", + "description": "" + }, + { + "name": "Snippets Controller", + "description": "" + }, + { + "name": "Remnawave Settings Controller", + "description": "" + }, + { + "name": "Subscription Page Configs Controller", + "description": "" + }, + { + "name": "Metadata Controller", + "description": "Manage arbitrary metadata for Users and Nodes." + } + ], + "servers": [], + "components": { + "securitySchemes": { + "Authorization": { + "scheme": "bearer", + "bearerFormat": "JWT", + "type": "http", + "name": "Authorization", + "description": "JWT obtained login." + }, + "Prometheus": { + "type": "http", + "scheme": "basic", + "name": "Prometheus", + "description": "Prometheus Basic Auth" + } + }, + "schemas": { + "SettingsResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "passkeySettings": { + "$ref": "#/components/schemas/PasskeySettings" + }, + "oauth2Settings": { + "$ref": "#/components/schemas/Oauth2Settings" + }, + "passwordSettings": { + "$ref": "#/components/schemas/PasswordSettings" + }, + "brandingSettings": { + "$ref": "#/components/schemas/BrandingSettings" + } + }, + "required": [ + "passkeySettings", + "oauth2Settings", + "passwordSettings", + "brandingSettings" + ] + } + }, + "required": [ + "response" + ] + }, + "UpdateRemnawaveSettingsRequest": { + "type": "object", + "properties": { + "passkeySettings": { + "$ref": "#/components/schemas/PasskeySettings" + }, + "oauth2Settings": { + "$ref": "#/components/schemas/Oauth2Settings" + }, + "passwordSettings": { + "$ref": "#/components/schemas/PasswordSettings" + }, + "brandingSettings": { + "$ref": "#/components/schemas/BrandingSettings" + } + } + }, + "PasskeyOptions": { + "type": "object", + "properties": { + "response": {} + }, + "required": [ + "response" + ] + }, + "VerifyPasskeyRegistrationResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "verified": { + "type": "boolean" + } + }, + "required": [ + "verified" + ] + } + }, + "required": [ + "response" + ] + }, + "PasskeysResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "passkeys": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "createdAt": { + "description": "Created date. Format: 2025-01-17T15:38:45.065Z", + "type": "string", + "format": "date-time" + }, + "lastUsedAt": { + "description": "Last used date. Format: 2025-01-17T15:38:45.065Z", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "id", + "name", + "createdAt", + "lastUsedAt" + ] + } + } + }, + "required": [ + "passkeys" + ] + } + }, + "required": [ + "response" + ] + }, + "DeletePasskeyRequest": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + }, + "UpdatePasskeyRequest": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string", + "minLength": 2, + "maxLength": 30, + "pattern": "^[A-Za-z0-9_\\s-]+$" + } + }, + "required": [ + "id", + "name" + ] + }, + "LoginRequest": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "required": [ + "username", + "password" + ] + }, + "TokenResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "accessToken": { + "type": "string" + } + }, + "required": [ + "accessToken" + ] + } + }, + "required": [ + "response" + ] + }, + "RegisterRequest": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string", + "minLength": 24, + "pattern": "^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9]).{24,}$" + } + }, + "required": [ + "username", + "password" + ] + }, + "GetStatusResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "isLoginAllowed": { + "type": "boolean" + }, + "isRegisterAllowed": { + "type": "boolean" + }, + "authentication": { + "type": "object", + "properties": { + "passkey": { + "$ref": "#/components/schemas/PasswordSettings" + }, + "oauth2": { + "type": "object", + "properties": { + "providers": { + "type": "object", + "additionalProperties": { + "type": "boolean" + } + } + }, + "required": [ + "providers" + ] + }, + "password": { + "$ref": "#/components/schemas/PasswordSettings" + } + }, + "required": [ + "passkey", + "oauth2", + "password" + ], + "nullable": true + }, + "branding": { + "type": "object", + "properties": { + "title": { + "type": "string", + "nullable": true + }, + "logoUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "title", + "logoUrl" + ] + } + }, + "required": [ + "isLoginAllowed", + "isRegisterAllowed", + "authentication", + "branding" + ] + } + }, + "required": [ + "response" + ] + }, + "OAuth2AuthorizeRequest": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "telegram", + "github", + "pocketid", + "yandex", + "keycloak", + "generic" + ], + "x-enumNames": [ + "TELEGRAM", + "GITHUB", + "POCKETID", + "YANDEX", + "KEYCLOAK", + "GENERIC" + ] + } + }, + "required": [ + "provider" + ] + }, + "OAuth2AuthorizeResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri", + "nullable": true + } + }, + "required": [ + "authorizationUrl" + ] + } + }, + "required": [ + "response" + ] + }, + "OAuth2CallbackRequest": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "telegram", + "github", + "pocketid", + "yandex", + "keycloak", + "generic" + ], + "x-enumNames": [ + "TELEGRAM", + "GITHUB", + "POCKETID", + "YANDEX", + "KEYCLOAK", + "GENERIC" + ] + }, + "code": { + "type": "string" + }, + "state": { + "type": "string" + } + }, + "required": [ + "provider", + "code", + "state" + ] + }, + "SubscriptionPageConfigsResponseResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "configs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Config" + } + } + }, + "required": [ + "total", + "configs" + ] + } + }, + "required": [ + "response" + ] + }, + "SubscriptionPageConfigResponseResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "config": {} + }, + "required": [ + "uuid", + "viewPosition", + "name", + "config" + ] + } + }, + "required": [ + "response" + ] + }, + "UpdateSubscriptionPageConfigRequest": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string", + "minLength": 2, + "maxLength": 30, + "pattern": "^[A-Za-z0-9_\\s-]+$" + }, + "config": {} + }, + "required": [ + "uuid" + ] + }, + "DeleteResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "isDeleted": { + "type": "boolean" + } + }, + "required": [ + "isDeleted" + ] + } + }, + "required": [ + "response" + ] + }, + "CreateSubscriptionPageConfigRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 2, + "maxLength": 30, + "pattern": "^[A-Za-z0-9_\\s-]+$" + } + }, + "required": [ + "name" + ] + }, + "CreateSubscriptionPageConfigResponse": { + "type": "object", + "properties": { + "response": { + "$ref": "#/components/schemas/Config" + } + }, + "required": [ + "response" + ] + }, + "ReorderRequest": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReorderRequestItem" + } + } + }, + "required": [ + "items" + ] + }, + "CloneNodePluginRequestRequest": { + "type": "object", + "properties": { + "cloneFromUuid": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "cloneFromUuid" + ] + }, + "CreateUserRequest": { + "type": "object", + "properties": { + "username": { + "description": "Unique username for the user. Required. Must be 3-36 characters long and contain only letters, numbers, underscores and dashes.", + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "maxLength": 36, + "minLength": 3 + }, + "status": { + "description": "Optional. User account status. Defaults to ACTIVE.", + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "default": "ACTIVE" + }, + "shortUuid": { + "description": "Optional. Short UUID identifier for the user.", + "type": "string" + }, + "trojanPassword": { + "description": "Optional. Password for Trojan protocol. Must be 8-32 characters.", + "type": "string", + "minLength": 8, + "maxLength": 32 + }, + "vlessUuid": { + "description": "Optional. UUID for VLESS protocol. Must be a valid UUID format.", + "type": "string", + "format": "uuid" + }, + "ssPassword": { + "description": "Optional. Password for Shadowsocks protocol. Must be 8-32 characters.", + "type": "string", + "minLength": 8, + "maxLength": 32 + }, + "trafficLimitBytes": { + "description": "Optional. Traffic limit in bytes. Set to 0 for unlimited traffic.", + "type": "number", + "minimum": 0, + "exclusiveMinimum": false + }, + "trafficLimitStrategy": { + "description": "Available reset periods", + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "default": "NO_RESET" + }, + "expireAt": { + "description": "Account expiration date. Required. Format: 2025-01-17T15:38:45.065Z", + "type": "string", + "format": "date-time" + }, + "createdAt": { + "description": "Optional. Account creation date. Format: 2025-01-17T15:38:45.065Z", + "type": "string", + "format": "date-time" + }, + "lastTrafficResetAt": { + "description": "Optional. Date of last traffic reset. Format: 2025-01-17T15:38:45.065Z", + "type": "string", + "format": "date-time" + }, + "description": { + "description": "Optional. Additional notes or description for the user account.", + "type": "string" + }, + "tag": { + "description": "Optional. User tag for categorization. Max 16 characters, uppercase letters, numbers and underscores only.", + "type": "string", + "pattern": "^[A-Z0-9_]+$", + "maxLength": 16, + "nullable": true + }, + "telegramId": { + "description": "Optional. Telegram user ID for notifications. Must be an integer.", + "type": "integer", + "nullable": true + }, + "email": { + "description": "Optional. User email address. Must be a valid email format.", + "type": "string", + "format": "email", + "nullable": true + }, + "hwidDeviceLimit": { + "description": "Optional. Maximum number of hardware devices allowed. Must be a positive integer.", + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false + }, + "activeInternalSquads": { + "description": "Optional. Array of UUIDs representing enabled internal squads.", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "uuid": { + "description": "Optional. Pass UUID to create user with specific UUID, otherwise it will be generated automatically.", + "type": "string", + "format": "uuid" + }, + "externalSquadUuid": { + "description": "Optional. External squad UUID.", + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "username", + "expireAt" + ] + }, + "UserResponse": { + "type": "object", + "properties": { + "response": { + "$ref": "#/components/schemas/UserItemInfo" + } + }, + "required": [ + "response" + ] + }, + "UpdateUserRequest": { + "type": "object", + "properties": { + "username": { + "description": "Username of the user", + "type": "string" + }, + "uuid": { + "description": "UUID of the user. UUID has higher priority than username, so if both are provided, username will be ignored.", + "type": "string", + "format": "uuid" + }, + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED" + ] + }, + "trafficLimitBytes": { + "description": "Traffic limit in bytes. 0 - unlimited", + "type": "number", + "minimum": 0, + "exclusiveMinimum": false + }, + "trafficLimitStrategy": { + "description": "Available reset periods", + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "default": "NO_RESET" + }, + "expireAt": { + "description": "Expiration date: 2025-01-17T15:38:45.065Z", + "type": "string", + "format": "date-time" + }, + "description": { + "type": "string", + "nullable": true + }, + "tag": { + "type": "string", + "pattern": "^[A-Z0-9_]+$", + "maxLength": 16, + "nullable": true + }, + "telegramId": { + "type": "integer", + "nullable": true + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "hwidDeviceLimit": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false, + "nullable": true + }, + "activeInternalSquads": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "externalSquadUuid": { + "description": "Optional. External squad UUID.", + "type": "string", + "format": "uuid", + "nullable": true + } + } + }, + "GetAllUsersResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserItemInfo" + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "users", + "total" + ] + } + }, + "required": [ + "response" + ] + }, + "GetUsersStreamResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserItemInfo" + } + }, + "nextCursor": { + "description": "Cursor to fetch the next page, or null if there are no more results", + "type": "string", + "nullable": true + }, + "hasMore": { + "description": "Whether there are more results to fetch", + "type": "boolean" + } + }, + "required": [ + "users", + "nextCursor", + "hasMore" + ] + } + }, + "required": [ + "response" + ] + }, + "TagsResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "tags" + ] + } + }, + "required": [ + "response" + ] + }, + "GetUserAccessibleNodesResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "userUuid": { + "type": "string", + "format": "uuid" + }, + "activeNodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "nodeName": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "configProfileUuid": { + "type": "string", + "format": "uuid" + }, + "configProfileName": { + "type": "string" + }, + "activeSquads": { + "type": "array", + "items": { + "type": "object", + "properties": { + "squadName": { + "type": "string" + }, + "activeInbounds": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "squadName", + "activeInbounds" + ] + } + } + }, + "required": [ + "uuid", + "nodeName", + "countryCode", + "configProfileUuid", + "configProfileName", + "activeSquads" + ] + } + } + }, + "required": [ + "userUuid", + "activeNodes" + ] + } + }, + "required": [ + "response" + ] + }, + "GetUserSubscriptionRequestHistoryResponse": { + "type": "object", + "properties": { + "response": { + "$ref": "#/components/schemas/UserSubscriptionHistory" + } + }, + "required": [ + "response" + ] + }, + "UsersResponse": { + "type": "object", + "properties": { + "response": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserItemInfo" + } + } + }, + "required": [ + "response" + ] + }, + "RevokeUserSubscriptionBody": { + "type": "object", + "properties": { + "revokeOnlyPasswords": { + "description": "Optional. If true, only passwords will be revoked, without changing the short UUID (Subscription URL).", + "type": "boolean", + "default": false + }, + "shortUuid": { + "description": "Optional. If not provided, a new short UUID will be generated by Remnawave. Please note that it is strongly recommended to allow Remnawave to generate the short UUID.", + "type": "string", + "minLength": 6, + "maxLength": 48 + } + } + }, + "ResolveUserRequestBody": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "id": { + "type": "number" + }, + "shortUuid": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "ResolveUserResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "username": { + "type": "string" + }, + "id": { + "type": "number" + }, + "shortUuid": { + "type": "string" + } + }, + "required": [ + "uuid", + "username", + "id", + "shortUuid" + ] + } + }, + "required": [ + "response" + ] + }, + "BulkDeleteUsersByStatusRequest": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "default": "ACTIVE" + } + } + }, + "BulkActionResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "affectedRows": { + "type": "number" + } + }, + "required": [ + "affectedRows" + ] + } + }, + "required": [ + "response" + ] + }, + "BulkUuidsRequest": { + "type": "object", + "properties": { + "uuids": { + "type": "array", + "minItems": 1, + "maxItems": 500, + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "uuids" + ] + }, + "BulkUpdateUsersRequest": { + "type": "object", + "properties": { + "uuids": { + "type": "array", + "minItems": 1, + "maxItems": 500, + "items": { + "type": "string", + "format": "uuid" + } + }, + "fields": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "default": "ACTIVE" + }, + "trafficLimitBytes": { + "description": "Traffic limit in bytes. 0 - unlimited", + "type": "number", + "minimum": 0, + "exclusiveMinimum": false + }, + "trafficLimitStrategy": { + "description": "Traffic limit reset strategy", + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ] + }, + "expireAt": { + "description": "Expiration date: 2025-01-17T15:38:45.065Z", + "type": "string", + "format": "date-time" + }, + "description": { + "type": "string", + "nullable": true + }, + "telegramId": { + "type": "integer", + "nullable": true + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "tag": { + "type": "string", + "pattern": "^[A-Z0-9_]+$", + "maxLength": 16, + "nullable": true + }, + "hwidDeviceLimit": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false, + "nullable": true + }, + "externalSquadUuid": { + "description": "Optional. External squad UUID.", + "type": "string", + "format": "uuid", + "nullable": true + } + } + } + }, + "required": [ + "uuids", + "fields" + ] + }, + "BulkUpdateUsersSquadsRequest": { + "type": "object", + "properties": { + "uuids": { + "type": "array", + "minItems": 1, + "maxItems": 500, + "items": { + "type": "string", + "format": "uuid" + } + }, + "activeInternalSquads": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "uuids", + "activeInternalSquads" + ] + }, + "BulkExtendExpirationDateRequest": { + "type": "object", + "properties": { + "uuids": { + "type": "array", + "minItems": 1, + "maxItems": 500, + "items": { + "type": "string", + "format": "uuid" + } + }, + "extendDays": { + "type": "integer", + "minimum": 1, + "exclusiveMinimum": false, + "maximum": 9999, + "exclusiveMaximum": false + } + }, + "required": [ + "uuids", + "extendDays" + ] + }, + "BulkAllUpdateUsersRequest": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "default": "ACTIVE" + }, + "trafficLimitBytes": { + "description": "Traffic limit in bytes. 0 - unlimited", + "type": "number", + "minimum": 0, + "exclusiveMinimum": false + }, + "trafficLimitStrategy": { + "description": "Traffic limit reset strategy", + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ] + }, + "expireAt": { + "description": "Expiration date: 2025-01-17T15:38:45.065Z", + "type": "string", + "format": "date-time" + }, + "description": { + "type": "string", + "nullable": true + }, + "telegramId": { + "type": "integer", + "nullable": true + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "tag": { + "type": "string", + "pattern": "^[A-Z0-9_]+$", + "maxLength": 16, + "nullable": true + }, + "hwidDeviceLimit": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false, + "nullable": true + } + } + }, + "EventResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "eventSent": { + "type": "boolean" + } + }, + "required": [ + "eventSent" + ] + } + }, + "required": [ + "response" + ] + }, + "BulkAllExtendExpirationDateRequest": { + "type": "object", + "properties": { + "extendDays": { + "type": "integer", + "minimum": 1, + "exclusiveMinimum": false + } + }, + "required": [ + "extendDays" + ] + }, + "SubscriptionResponse": { + "type": "object", + "properties": { + "response": { + "$ref": "#/components/schemas/Subscription" + } + }, + "required": [ + "response" + ] + }, + "GetAllSubscriptionsResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "subscriptions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Subscription" + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "subscriptions", + "total" + ] + } + }, + "required": [ + "response" + ] + }, + "GetRawSubscriptionByShortUuidResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/UserItemInfo" + }, + "convertedUserInfo": { + "type": "object", + "properties": { + "daysLeft": { + "type": "number" + }, + "trafficLimit": { + "type": "string" + }, + "trafficUsed": { + "type": "string" + }, + "lifetimeTrafficUsed": { + "type": "string" + }, + "hwidCheckup": { + "type": "object", + "properties": { + "subscriptionAllowed": { + "type": "boolean" + }, + "maxDeviceReached": { + "type": "boolean" + }, + "hwidNotSupported": { + "type": "boolean" + }, + "limitBypassed": { + "type": "boolean" + } + }, + "required": [ + "subscriptionAllowed", + "maxDeviceReached", + "hwidNotSupported", + "limitBypassed" + ], + "nullable": true + } + }, + "required": [ + "daysLeft", + "trafficLimit", + "trafficUsed", + "lifetimeTrafficUsed", + "hwidCheckup" + ] + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "resolvedProxyConfigs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "finalRemark": { + "type": "string" + }, + "address": { + "type": "string" + }, + "port": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": true + }, + "protocol": { + "type": "string", + "enum": [ + "vless", + "trojan", + "shadowsocks", + "hysteria" + ] + }, + "protocolOptions": { + "oneOf": [ + { + "type": "object", + "properties": { + "encryption": { + "type": "string" + }, + "id": { + "type": "string" + }, + "flow": { + "type": "string", + "enum": [ + "", + "xtls-rprx-vision", + "xtls-rprx-vision-udp443" + ] + } + }, + "required": [ + "encryption", + "id", + "flow" + ] + }, + { + "type": "object", + "properties": { + "password": { + "type": "string" + } + }, + "required": [ + "password" + ] + }, + { + "type": "object", + "properties": { + "method": { + "type": "string" + }, + "password": { + "type": "string" + }, + "uot": { + "type": "boolean" + }, + "uotVersion": { + "type": "integer" + } + }, + "required": [ + "method", + "password", + "uot", + "uotVersion" + ] + }, + { + "type": "object", + "properties": { + "version": { + "type": "integer" + } + }, + "required": [ + "version" + ] + } + ] + }, + "transport": { + "type": "string", + "enum": [ + "tcp", + "xhttp", + "ws", + "httpupgrade", + "grpc", + "kcp", + "hysteria" + ] + }, + "transportOptions": { + "oneOf": [ + { + "type": "object", + "properties": { + "header": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "none" + ] + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "http" + ] + }, + "request": { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "method": { + "type": "string" + }, + "path": { + "type": "array", + "items": { + "type": "string" + } + }, + "headers": { + "type": "object", + "additionalProperties": {} + } + } + }, + "response": { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "status": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "headers": { + "type": "object", + "additionalProperties": {} + } + } + } + }, + "required": [ + "type" + ] + } + ], + "nullable": true + } + }, + "required": [ + "header" + ] + }, + { + "type": "object", + "properties": { + "path": { + "type": "string", + "nullable": true + }, + "host": { + "type": "string", + "nullable": true + }, + "mode": { + "type": "string", + "enum": [ + "auto", + "packet-up", + "stream-up", + "stream-one" + ] + }, + "extra": { + "additionalProperties": {}, + "nullable": true + } + }, + "required": [ + "path", + "host", + "mode", + "extra" + ] + }, + { + "type": "object", + "properties": { + "path": { + "type": "string", + "nullable": true + }, + "host": { + "type": "string", + "nullable": true + }, + "headers": { + "additionalProperties": { + "type": "string" + }, + "nullable": true + }, + "heartbeatPeriod": { + "type": "number", + "nullable": true + } + }, + "required": [ + "path", + "host", + "headers", + "heartbeatPeriod" + ] + }, + { + "type": "object", + "properties": { + "path": { + "type": "string", + "nullable": true + }, + "host": { + "type": "string", + "nullable": true + }, + "headers": { + "additionalProperties": { + "type": "string" + }, + "nullable": true + } + }, + "required": [ + "path", + "host", + "headers" + ] + }, + { + "type": "object", + "properties": { + "authority": { + "type": "string", + "nullable": true + }, + "serviceName": { + "type": "string", + "nullable": true + }, + "multiMode": { + "type": "boolean" + } + }, + "required": [ + "authority", + "serviceName", + "multiMode" + ] + }, + { + "type": "object", + "properties": { + "clientMtu": { + "type": "integer" + }, + "clientTti": { + "type": "integer" + }, + "congestion": { + "type": "boolean" + } + }, + "required": [ + "clientMtu", + "clientTti", + "congestion" + ] + }, + { + "type": "object", + "properties": { + "version": { + "type": "integer" + }, + "auth": { + "type": "string" + } + }, + "required": [ + "version", + "auth" + ] + } + ] + }, + "security": { + "type": "string", + "enum": [ + "tls", + "reality", + "none" + ] + }, + "securityOptions": { + "oneOf": [ + { + "type": "object", + "properties": { + "pinnedPeerCertSha256": { + "type": "string", + "nullable": true + }, + "verifyPeerCertByName": { + "type": "string", + "nullable": true + }, + "alpn": { + "type": "string", + "nullable": true + }, + "enableSessionResumption": { + "type": "boolean" + }, + "fingerprint": { + "type": "string", + "nullable": true + }, + "serverName": { + "type": "string", + "nullable": true + }, + "echConfigList": { + "type": "string", + "nullable": true + }, + "echForceQuery": { + "type": "string", + "nullable": true + } + }, + "required": [ + "pinnedPeerCertSha256", + "verifyPeerCertByName", + "alpn", + "enableSessionResumption", + "fingerprint", + "serverName", + "echConfigList", + "echForceQuery" + ] + }, + { + "type": "object", + "properties": { + "fingerprint": { + "type": "string" + }, + "publicKey": { + "type": "string" + }, + "shortId": { + "type": "string", + "nullable": true + }, + "serverName": { + "type": "string" + }, + "spiderX": { + "type": "string", + "nullable": true + }, + "mldsa65Verify": { + "type": "string", + "nullable": true + } + }, + "required": [ + "fingerprint", + "publicKey", + "shortId", + "serverName", + "spiderX", + "mldsa65Verify" + ] + } + ] + }, + "streamOverrides": { + "type": "object", + "properties": { + "finalMask": { + "nullable": true + }, + "sockopt": { + "nullable": true + } + }, + "required": [ + "finalMask", + "sockopt" + ] + }, + "mux": { + "nullable": true + }, + "clientOverrides": { + "type": "object", + "properties": { + "shuffleHost": { + "type": "boolean" + }, + "mihomoX25519": { + "type": "boolean" + }, + "mihomoIpVersion": { + "type": "string", + "enum": [ + "dual", + "ipv4", + "ipv6", + "ipv4-prefer", + "ipv6-prefer" + ], + "x-enumNames": [ + "DUAL", + "IPV4", + "IPV6", + "IPV4_PREFER", + "IPV6_PREFER" + ], + "nullable": true + }, + "serverDescription": { + "type": "string", + "nullable": true + }, + "xrayJsonTemplate": { + "nullable": true + } + }, + "required": [ + "shuffleHost", + "mihomoX25519", + "mihomoIpVersion", + "serverDescription", + "xrayJsonTemplate" + ] + }, + "metadata": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "excludeFromSubscriptionTypes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + } + }, + "inboundTag": { + "type": "string" + }, + "configProfileUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "configProfileInboundUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "isDisabled": { + "type": "boolean" + }, + "isHidden": { + "type": "boolean" + }, + "viewPosition": { + "type": "integer" + }, + "remark": { + "type": "string" + }, + "vlessRouteId": { + "type": "integer", + "nullable": true + }, + "rawInbound": { + "nullable": true + } + }, + "required": [ + "uuid", + "tags", + "excludeFromSubscriptionTypes", + "inboundTag", + "configProfileUuid", + "configProfileInboundUuid", + "isDisabled", + "isHidden", + "viewPosition", + "remark", + "vlessRouteId", + "rawInbound" + ] + } + }, + "required": [ + "finalRemark", + "address", + "port", + "protocol", + "protocolOptions", + "transport", + "transportOptions", + "security", + "streamOverrides", + "mux", + "clientOverrides", + "metadata" + ] + } + } + }, + "required": [ + "user", + "convertedUserInfo", + "headers", + "resolvedProxyConfigs" + ] + } + }, + "required": [ + "response" + ] + }, + "GetSubpageConfigByShortUuidRequestBody": { + "type": "object", + "properties": { + "requestHeaders": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "required": [ + "requestHeaders" + ] + }, + "GetSubpageConfigByShortUuidResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "subpageConfigUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "webpageAllowed": { + "type": "boolean" + } + }, + "required": [ + "subpageConfigUuid", + "webpageAllowed" + ] + } + }, + "required": [ + "response" + ] + }, + "GetConnectionKeysByUuidResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "enabledKeys": { + "type": "array", + "items": { + "type": "string" + } + }, + "hiddenKeys": { + "type": "array", + "items": { + "type": "string" + } + }, + "disabledKeys": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "enabledKeys", + "hiddenKeys", + "disabledKeys" + ] + } + }, + "required": [ + "response" + ] + }, + "TemplatesResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Template" + } + } + }, + "required": [ + "total", + "templates" + ] + } + }, + "required": [ + "response" + ] + }, + "TemplateResponse": { + "type": "object", + "properties": { + "response": { + "$ref": "#/components/schemas/Template" + } + }, + "required": [ + "response" + ] + }, + "UpdateTemplateRequest": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string", + "minLength": 2, + "maxLength": 255, + "pattern": "^[A-Za-z0-9_\\s-]+$" + }, + "templateJson": { + "type": "object", + "properties": {} + }, + "encodedTemplateYaml": { + "type": "string" + } + }, + "required": [ + "uuid" + ] + }, + "CreateSubscriptionTemplateRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 2, + "maxLength": 255, + "pattern": "^[A-Za-z0-9_\\s-]+$" + }, + "templateType": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + } + }, + "required": [ + "name", + "templateType" + ] + }, + "CreateApiTokenRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 2, + "maxLength": 30 + }, + "expiresInDays": { + "type": "number", + "minimum": 1, + "exclusiveMinimum": false + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + }, + "default": [ + "*" + ] + } + }, + "required": [ + "name", + "expiresInDays" + ] + }, + "CreateApiTokenResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "token": { + "type": "string" + } + }, + "required": [ + "uuid", + "name", + "expireAt", + "scopes", + "createdAt", + "updatedAt", + "token" + ] + } + }, + "required": [ + "response" + ] + }, + "DeleteApiTokenResponse": { + "type": "object", + "properties": { + "response": { + "type": "boolean" + } + }, + "required": [ + "response" + ] + }, + "GetApiTokenScopesResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "wildcard": { + "type": "string" + }, + "resources": { + "type": "array", + "items": { + "type": "object", + "properties": { + "resource": { + "type": "string" + }, + "resourceScopes": { + "type": "array", + "items": { + "type": "string" + } + }, + "endpoints": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "read", + "write" + ] + }, + "method": { + "type": "string" + }, + "path": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "key", + "kind", + "method", + "path", + "description" + ] + } + } + }, + "required": [ + "resource", + "resourceScopes", + "endpoints" + ] + } + } + }, + "required": [ + "wildcard", + "resources" + ] + } + }, + "required": [ + "response" + ] + }, + "FindAllApiTokensResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "tokens": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "name", + "expireAt", + "scopes", + "createdAt", + "updatedAt" + ] + } + }, + "docs": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "scalarPath": { + "type": "string", + "nullable": true + }, + "swaggerPath": { + "type": "string", + "nullable": true + } + }, + "required": [ + "enabled", + "scalarPath", + "swaggerPath" + ] + } + }, + "required": [ + "tokens", + "docs" + ] + } + }, + "required": [ + "response" + ] + }, + "ConfigProfilesResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "configProfiles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConfigProfile" + } + } + }, + "required": [ + "total", + "configProfiles" + ] + } + }, + "required": [ + "response" + ] + }, + "InboundsResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "inbounds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "profileUuid": { + "type": "string", + "format": "uuid" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "network": { + "type": "string", + "nullable": true + }, + "security": { + "type": "string", + "nullable": true + }, + "port": { + "type": "number", + "nullable": true + }, + "rawInbound": { + "nullable": true + }, + "activeSquads": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "uuid", + "profileUuid", + "tag", + "type", + "network", + "security", + "port", + "rawInbound", + "activeSquads" + ] + } + } + }, + "required": [ + "total", + "inbounds" + ] + } + }, + "required": [ + "response" + ] + }, + "ConfigProfileResponse": { + "type": "object", + "properties": { + "response": { + "$ref": "#/components/schemas/ConfigProfile" + } + }, + "required": [ + "response" + ] + }, + "CreateConfigProfileRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 2, + "maxLength": 30, + "pattern": "^[A-Za-z0-9_\\s-]+$" + }, + "config": { + "type": "object", + "properties": {} + } + }, + "required": [ + "name", + "config" + ] + }, + "UpdateConfigProfileRequest": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string", + "minLength": 2, + "maxLength": 30, + "pattern": "^[A-Za-z0-9_\\s-]+$" + }, + "config": { + "type": "object", + "properties": {} + } + }, + "required": [ + "uuid" + ] + }, + "SnippetsResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "snippets": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "snippet": {} + }, + "required": [ + "name", + "snippet" + ] + } + } + }, + "required": [ + "total", + "snippets" + ] + } + }, + "required": [ + "response" + ] + }, + "DeleteSnippetRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 2, + "maxLength": 255, + "pattern": "^[A-Za-z0-9_\\s-]+$" + } + }, + "required": [ + "name" + ] + }, + "SnippetRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 2, + "maxLength": 255, + "pattern": "^[A-Za-z0-9_\\s-]+$" + }, + "snippet": { + "type": "array", + "items": { + "type": "object", + "properties": {} + } + } + }, + "required": [ + "name", + "snippet" + ] + }, + "InternalSquadsResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "internalSquads": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InternalSquad" + } + } + }, + "required": [ + "total", + "internalSquads" + ] + } + }, + "required": [ + "response" + ] + }, + "InternalSquadResponseResponse": { + "type": "object", + "properties": { + "response": { + "$ref": "#/components/schemas/InternalSquad" + } + }, + "required": [ + "response" + ] + }, + "CreateInternalSquadRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 2, + "maxLength": 30, + "pattern": "^[A-Za-z0-9_\\s-]+$" + }, + "inbounds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "name", + "inbounds" + ] + }, + "GetInternalSquadAccessibleNodesResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "squadUuid": { + "type": "string", + "format": "uuid" + }, + "accessibleNodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "nodeName": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "configProfileUuid": { + "type": "string", + "format": "uuid" + }, + "configProfileName": { + "type": "string" + }, + "activeInbounds": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "uuid", + "nodeName", + "countryCode", + "configProfileUuid", + "configProfileName", + "activeInbounds" + ] + } + } + }, + "required": [ + "squadUuid", + "accessibleNodes" + ] + } + }, + "required": [ + "response" + ] + }, + "UpdateInternalSquadRequest": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string", + "minLength": 2, + "maxLength": 30, + "pattern": "^[A-Za-z0-9_\\s-]+$" + }, + "inbounds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "uuid" + ] + }, + "ExternalSquadsResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "externalSquads": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalSquad" + } + } + }, + "required": [ + "total", + "externalSquads" + ] + } + }, + "required": [ + "response" + ] + }, + "ExternalSquadResponseResponse": { + "type": "object", + "properties": { + "response": { + "$ref": "#/components/schemas/ExternalSquad" + } + }, + "required": [ + "response" + ] + }, + "CreateExternalSquadRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 2, + "maxLength": 30, + "pattern": "^[A-Za-z0-9_\\s-]+$" + } + }, + "required": [ + "name" + ] + }, + "UpdateExternalSquadRequest": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string", + "minLength": 2, + "maxLength": 30, + "pattern": "^[A-Za-z0-9_\\s-]+$" + }, + "templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TemplateRef" + } + }, + "subscriptionSettings": { + "$ref": "#/components/schemas/SubscriptionSettings" + }, + "hostOverrides": { + "$ref": "#/components/schemas/HostOverride" + }, + "responseHeaders": { + "additionalProperties": { + "type": "string" + }, + "nullable": true + }, + "hwidSettings": { + "$ref": "#/components/schemas/HwidSettings" + }, + "customRemarks": { + "$ref": "#/components/schemas/CustomRemark" + }, + "subpageConfigUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "uuid" + ] + }, + "GetPubKeyResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "pubKey": { + "type": "string" + } + }, + "required": [ + "pubKey" + ] + } + }, + "required": [ + "response" + ] + }, + "CreateNodeRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 3, + "maxLength": 30 + }, + "address": { + "type": "string", + "minLength": 2 + }, + "port": { + "type": "integer", + "minimum": 1, + "exclusiveMinimum": false, + "maximum": 65535, + "exclusiveMaximum": false + }, + "proxyUrl": { + "type": "string", + "pattern": "^socks5:\\/\\/(?:[^:@/\\s]+(?::[^@/\\s]*)?@)?[^:@/\\s]+:\\d{1,5}$", + "nullable": true + }, + "isTrafficTrackingActive": { + "type": "boolean", + "default": false + }, + "trafficLimitBytes": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": false + }, + "notifyPercent": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 100, + "exclusiveMaximum": false + }, + "trafficResetDay": { + "type": "integer", + "minimum": 1, + "exclusiveMinimum": false, + "maximum": 31, + "exclusiveMaximum": false + }, + "countryCode": { + "type": "string", + "maxLength": 2, + "default": "XX" + }, + "consumptionMultiplier": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 100, + "exclusiveMaximum": false + }, + "nodeConsumptionMultiplier": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 100, + "exclusiveMaximum": false + }, + "configProfile": { + "$ref": "#/components/schemas/ConfigProfileRef" + }, + "providerUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "tags": { + "type": "array", + "maxItems": 10, + "items": { + "type": "string", + "pattern": "^[A-Z0-9_:]+$", + "maxLength": 36 + } + }, + "activePluginUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "note": { + "type": "string", + "maxLength": 255 + } + }, + "required": [ + "name", + "address", + "configProfile" + ] + }, + "NodeResponse": { + "type": "object", + "properties": { + "response": { + "$ref": "#/components/schemas/NodeResponseDataItem" + } + }, + "required": [ + "response" + ] + }, + "NodesResponse": { + "type": "object", + "properties": { + "response": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NodeResponseDataItem" + } + } + }, + "required": [ + "response" + ] + }, + "UpdateNodeRequest": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string", + "minLength": 3, + "maxLength": 30 + }, + "address": { + "type": "string", + "minLength": 2 + }, + "port": { + "type": "number", + "minimum": 1, + "exclusiveMinimum": false, + "maximum": 65535, + "exclusiveMaximum": false + }, + "proxyUrl": { + "type": "string", + "pattern": "^socks5:\\/\\/(?:[^:@/\\s]+(?::[^@/\\s]*)?@)?[^:@/\\s]+:\\d{1,5}$", + "nullable": true + }, + "isTrafficTrackingActive": { + "type": "boolean" + }, + "trafficLimitBytes": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": false + }, + "notifyPercent": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 100, + "exclusiveMaximum": false + }, + "trafficResetDay": { + "type": "number", + "minimum": 1, + "exclusiveMinimum": false, + "maximum": 31, + "exclusiveMaximum": false + }, + "countryCode": { + "type": "string", + "maxLength": 2 + }, + "consumptionMultiplier": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 100, + "exclusiveMaximum": false + }, + "nodeConsumptionMultiplier": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 100, + "exclusiveMaximum": false + }, + "configProfile": { + "$ref": "#/components/schemas/ConfigProfileRef" + }, + "providerUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "tags": { + "type": "array", + "maxItems": 10, + "items": { + "type": "string", + "pattern": "^[A-Z0-9_:]+$", + "maxLength": 36 + } + }, + "activePluginUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "note": { + "type": "string", + "maxLength": 255, + "nullable": true + } + }, + "required": [ + "uuid" + ] + }, + "NodeRequestBodyRequest": { + "type": "object", + "properties": { + "forceRestart": { + "type": "boolean" + } + }, + "required": [ + "forceRestart" + ] + }, + "ReorderNodeRequest": { + "type": "object", + "properties": { + "nodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReorderRequestItem" + } + } + }, + "required": [ + "nodes" + ] + }, + "ProfileModificationRequest": { + "type": "object", + "properties": { + "uuids": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "format": "uuid" + } + }, + "configProfile": { + "type": "object", + "properties": { + "activeConfigProfileUuid": { + "type": "string", + "format": "uuid" + }, + "activeInbounds": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "activeConfigProfileUuid", + "activeInbounds" + ] + } + }, + "required": [ + "uuids", + "configProfile" + ] + }, + "BulkNodesActionsRequest": { + "type": "object", + "properties": { + "uuids": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "format": "uuid" + } + }, + "action": { + "type": "string", + "enum": [ + "ENABLE", + "DISABLE", + "RESTART", + "RESET_TRAFFIC" + ], + "x-enumNames": [ + "ENABLE", + "DISABLE", + "RESTART", + "RESET_TRAFFIC" + ] + } + }, + "required": [ + "uuids", + "action" + ] + }, + "BulkNodesUpdateRequest": { + "type": "object", + "properties": { + "uuids": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "format": "uuid" + } + }, + "fields": { + "type": "object", + "properties": { + "countryCode": { + "type": "string", + "maxLength": 2 + }, + "consumptionMultiplier": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 100, + "exclusiveMaximum": false + }, + "nodeConsumptionMultiplier": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 100, + "exclusiveMaximum": false + }, + "providerUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "tags": { + "type": "array", + "maxItems": 10, + "items": { + "type": "string", + "pattern": "^[A-Z0-9_:]+$", + "maxLength": 36 + } + }, + "activePluginUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "note": { + "type": "string", + "maxLength": 255, + "nullable": true + } + } + } + }, + "required": [ + "uuids", + "fields" + ] + }, + "TorrentBlockerReportsResponseResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "records": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "userId": { + "type": "number" + }, + "nodeId": { + "type": "number" + }, + "user": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "username": { + "type": "string" + } + }, + "required": [ + "uuid", + "username" + ] + }, + "node": { + "$ref": "#/components/schemas/Node" + }, + "report": { + "$ref": "#/components/schemas/ReportItem" + }, + "createdAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "id", + "userId", + "nodeId", + "user", + "node", + "report", + "createdAt" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "records", + "total" + ] + } + }, + "required": [ + "response" + ] + }, + "GetTorrentBlockerReportsStatsResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "stats": { + "type": "object", + "properties": { + "distinctNodes": { + "type": "number" + }, + "distinctUsers": { + "type": "number" + }, + "totalReports": { + "type": "number" + }, + "reportsLast24Hours": { + "type": "number" + } + }, + "required": [ + "distinctNodes", + "distinctUsers", + "totalReports", + "reportsLast24Hours" + ] + }, + "topUsers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "color": { + "type": "string" + }, + "username": { + "type": "string" + }, + "total": { + "type": "number" + } + }, + "required": [ + "uuid", + "color", + "username", + "total" + ] + } + }, + "topNodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TopNode" + } + } + }, + "required": [ + "stats", + "topUsers", + "topNodes" + ] + } + }, + "required": [ + "response" + ] + }, + "NodePluginsResponseResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "nodePlugins": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NodePlugin" + } + } + }, + "required": [ + "total", + "nodePlugins" + ] + } + }, + "required": [ + "response" + ] + }, + "NodePluginResponseResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "pluginConfig": {} + }, + "required": [ + "uuid", + "viewPosition", + "name", + "pluginConfig" + ] + } + }, + "required": [ + "response" + ] + }, + "UpdateNodePluginRequest": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string", + "minLength": 2, + "maxLength": 30, + "pattern": "^[A-Za-z0-9_\\s-]+$" + }, + "pluginConfig": {} + }, + "required": [ + "uuid" + ] + }, + "CreateNodePluginRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 2, + "maxLength": 30, + "pattern": "^[A-Za-z0-9_\\s-]+$" + } + }, + "required": [ + "name" + ] + }, + "CreateNodePluginResponse": { + "type": "object", + "properties": { + "response": { + "$ref": "#/components/schemas/NodePlugin" + } + }, + "required": [ + "response" + ] + }, + "PluginExecutorRequest": { + "type": "object", + "properties": { + "command": { + "oneOf": [ + { + "description": "Block IPs", + "type": "object", + "properties": { + "command": { + "type": "string", + "enum": [ + "blockIps" + ] + }, + "ips": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "ip": { + "type": "string" + }, + "timeout": { + "type": "number" + } + }, + "required": [ + "ip", + "timeout" + ] + } + } + }, + "required": [ + "command", + "ips" + ] + }, + { + "description": "Unblock IPs", + "type": "object", + "properties": { + "command": { + "type": "string", + "enum": [ + "unblockIps" + ] + }, + "ips": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + }, + "required": [ + "command", + "ips" + ] + }, + { + "description": "Recreate tables", + "type": "object", + "properties": { + "command": { + "type": "string", + "enum": [ + "recreateTables" + ] + } + }, + "required": [ + "command" + ] + } + ] + }, + "targetNodes": { + "oneOf": [ + { + "description": "Target all connected nodes", + "type": "object", + "properties": { + "target": { + "type": "string", + "enum": [ + "allNodes" + ] + } + }, + "required": [ + "target" + ] + }, + { + "description": "Target specific nodes", + "type": "object", + "properties": { + "target": { + "type": "string", + "enum": [ + "specificNodes" + ] + }, + "nodeUuids": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "target", + "nodeUuids" + ] + } + ] + } + }, + "required": [ + "command", + "targetNodes" + ] + }, + "CreateHostRequest": { + "type": "object", + "properties": { + "inbound": { + "$ref": "#/components/schemas/InboundRef" + }, + "remark": { + "type": "string", + "minLength": 1, + "maxLength": 40 + }, + "address": { + "type": "string" + }, + "port": { + "type": "integer" + }, + "path": { + "type": "string", + "nullable": true + }, + "sni": { + "type": "string", + "nullable": true + }, + "host": { + "type": "string", + "nullable": true + }, + "alpn": { + "type": "string", + "enum": [ + "h3", + "h2", + "http/1.1", + "h2,http/1.1", + "h3,h2,http/1.1", + "h3,h2" + ], + "x-enumNames": [ + "H3", + "H2", + "HTTP_1_1", + "H_COMBINED", + "H3_H2_H1_COMBINED", + "H3_H2_COMBINED" + ], + "nullable": true + }, + "fingerprint": { + "type": "string", + "nullable": true + }, + "isDisabled": { + "type": "boolean", + "default": false + }, + "securityLayer": { + "type": "string", + "enum": [ + "DEFAULT", + "TLS", + "NONE" + ], + "x-enumNames": [ + "DEFAULT", + "TLS", + "NONE" + ], + "default": "DEFAULT" + }, + "xhttpExtraParams": { + "nullable": true + }, + "muxParams": { + "nullable": true + }, + "sockoptParams": { + "nullable": true + }, + "finalMask": { + "nullable": true + }, + "serverDescription": { + "type": "string", + "maxLength": 30, + "nullable": true + }, + "tags": { + "type": "array", + "maxItems": 10, + "items": { + "type": "string", + "pattern": "^[A-Z0-9_:]+$", + "maxLength": 36 + } + }, + "isHidden": { + "type": "boolean", + "default": false + }, + "overrideSniFromAddress": { + "type": "boolean", + "default": false + }, + "keepSniBlank": { + "type": "boolean", + "default": false + }, + "pinnedPeerCertSha256": { + "type": "string", + "nullable": true + }, + "verifyPeerCertByName": { + "type": "string", + "nullable": true + }, + "vlessRouteId": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 65535, + "exclusiveMaximum": false, + "nullable": true + }, + "shuffleHost": { + "type": "boolean", + "default": false + }, + "mihomoX25519": { + "type": "boolean", + "default": false + }, + "mihomoIpVersion": { + "type": "string", + "enum": [ + "dual", + "ipv4", + "ipv6", + "ipv4-prefer", + "ipv6-prefer" + ], + "x-enumNames": [ + "DUAL", + "IPV4", + "IPV6", + "IPV4_PREFER", + "IPV6_PREFER" + ], + "nullable": true + }, + "nodes": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "xrayJsonTemplateUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "excludedInternalSquads": { + "description": "Optional. Internal squads from which the host will be excluded.", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "excludeFromSubscriptionTypes": { + "description": "Optional. Subscription types from which the host will be excluded from.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + } + } + }, + "required": [ + "inbound", + "remark", + "address", + "port" + ] + }, + "HostResponse": { + "type": "object", + "properties": { + "response": { + "$ref": "#/components/schemas/HostItem" + } + }, + "required": [ + "response" + ] + }, + "UpdateHostRequest": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "inbound": { + "$ref": "#/components/schemas/InboundRef" + }, + "remark": { + "type": "string", + "maxLength": 40 + }, + "address": { + "type": "string" + }, + "port": { + "type": "integer" + }, + "path": { + "type": "string", + "nullable": true + }, + "sni": { + "type": "string", + "nullable": true + }, + "host": { + "type": "string", + "nullable": true + }, + "alpn": { + "type": "string", + "enum": [ + "h3", + "h2", + "http/1.1", + "h2,http/1.1", + "h3,h2,http/1.1", + "h3,h2" + ], + "x-enumNames": [ + "H3", + "H2", + "HTTP_1_1", + "H_COMBINED", + "H3_H2_H1_COMBINED", + "H3_H2_COMBINED" + ], + "nullable": true + }, + "fingerprint": { + "type": "string", + "nullable": true + }, + "isDisabled": { + "type": "boolean", + "default": false + }, + "securityLayer": { + "type": "string", + "enum": [ + "DEFAULT", + "TLS", + "NONE" + ], + "x-enumNames": [ + "DEFAULT", + "TLS", + "NONE" + ] + }, + "xhttpExtraParams": { + "nullable": true + }, + "muxParams": { + "nullable": true + }, + "sockoptParams": { + "nullable": true + }, + "finalMask": { + "nullable": true + }, + "serverDescription": { + "type": "string", + "maxLength": 30, + "nullable": true + }, + "tags": { + "type": "array", + "maxItems": 10, + "items": { + "type": "string", + "pattern": "^[A-Z0-9_:]+$", + "maxLength": 36 + } + }, + "isHidden": { + "type": "boolean" + }, + "overrideSniFromAddress": { + "type": "boolean" + }, + "keepSniBlank": { + "type": "boolean" + }, + "vlessRouteId": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 65535, + "exclusiveMaximum": false, + "nullable": true + }, + "pinnedPeerCertSha256": { + "type": "string", + "nullable": true + }, + "verifyPeerCertByName": { + "type": "string", + "nullable": true + }, + "shuffleHost": { + "type": "boolean" + }, + "mihomoX25519": { + "type": "boolean" + }, + "mihomoIpVersion": { + "type": "string", + "enum": [ + "dual", + "ipv4", + "ipv6", + "ipv4-prefer", + "ipv6-prefer" + ], + "x-enumNames": [ + "DUAL", + "IPV4", + "IPV6", + "IPV4_PREFER", + "IPV6_PREFER" + ], + "nullable": true + }, + "nodes": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "xrayJsonTemplateUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "excludedInternalSquads": { + "description": "Optional. Internal squads from which the host will be excluded.", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "excludeFromSubscriptionTypes": { + "description": "Optional. Subscription types from which the host will be excluded from.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + } + } + }, + "required": [ + "uuid" + ] + }, + "HostListResponse": { + "type": "object", + "properties": { + "response": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HostItem" + } + } + }, + "required": [ + "response" + ] + }, + "ReorderHostRequest": { + "type": "object", + "properties": { + "hosts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReorderRequestItem" + } + } + }, + "required": [ + "hosts" + ] + }, + "ReorderHostResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "isUpdated": { + "type": "boolean" + } + }, + "required": [ + "isUpdated" + ] + } + }, + "required": [ + "response" + ] + }, + "BulkUuidsRequest2": { + "type": "object", + "properties": { + "uuids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "uuids" + ] + }, + "UpdateManyHostsRequest": { + "type": "object", + "properties": { + "inbound": { + "$ref": "#/components/schemas/InboundRef" + }, + "remark": { + "type": "string", + "maxLength": 40 + }, + "address": { + "type": "string" + }, + "port": { + "type": "integer" + }, + "path": { + "type": "string", + "nullable": true + }, + "sni": { + "type": "string", + "nullable": true + }, + "host": { + "type": "string", + "nullable": true + }, + "alpn": { + "type": "string", + "enum": [ + "h3", + "h2", + "http/1.1", + "h2,http/1.1", + "h3,h2,http/1.1", + "h3,h2" + ], + "x-enumNames": [ + "H3", + "H2", + "HTTP_1_1", + "H_COMBINED", + "H3_H2_H1_COMBINED", + "H3_H2_COMBINED" + ], + "nullable": true + }, + "fingerprint": { + "type": "string", + "nullable": true + }, + "isDisabled": { + "type": "boolean", + "default": false + }, + "securityLayer": { + "type": "string", + "enum": [ + "DEFAULT", + "TLS", + "NONE" + ], + "x-enumNames": [ + "DEFAULT", + "TLS", + "NONE" + ] + }, + "xhttpExtraParams": { + "nullable": true + }, + "muxParams": { + "nullable": true + }, + "sockoptParams": { + "nullable": true + }, + "finalMask": { + "nullable": true + }, + "serverDescription": { + "type": "string", + "maxLength": 30, + "nullable": true + }, + "tags": { + "type": "array", + "maxItems": 10, + "items": { + "type": "string", + "pattern": "^[A-Z0-9_:]+$", + "maxLength": 36 + } + }, + "isHidden": { + "type": "boolean" + }, + "overrideSniFromAddress": { + "type": "boolean" + }, + "keepSniBlank": { + "type": "boolean" + }, + "vlessRouteId": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 65535, + "exclusiveMaximum": false, + "nullable": true + }, + "pinnedPeerCertSha256": { + "type": "string", + "nullable": true + }, + "verifyPeerCertByName": { + "type": "string", + "nullable": true + }, + "shuffleHost": { + "type": "boolean" + }, + "mihomoX25519": { + "type": "boolean" + }, + "mihomoIpVersion": { + "type": "string", + "enum": [ + "dual", + "ipv4", + "ipv6", + "ipv4-prefer", + "ipv6-prefer" + ], + "x-enumNames": [ + "DUAL", + "IPV4", + "IPV6", + "IPV4_PREFER", + "IPV6_PREFER" + ], + "nullable": true + }, + "nodes": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "xrayJsonTemplateUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "excludedInternalSquads": { + "description": "Optional. Internal squads from which the host will be excluded.", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "excludeFromSubscriptionTypes": { + "description": "Optional. Subscription types from which the host will be excluded from.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + } + }, + "uuids": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "uuids" + ] + }, + "GetLegacyStatsNodesUsersUsageResponse": { + "type": "object", + "properties": { + "response": { + "type": "array", + "items": { + "type": "object", + "properties": { + "userUuid": { + "type": "string", + "format": "uuid" + }, + "username": { + "type": "string" + }, + "nodeUuid": { + "type": "string", + "format": "uuid" + }, + "total": { + "type": "number" + }, + "date": { + "type": "string" + } + }, + "required": [ + "userUuid", + "username", + "nodeUuid", + "total", + "date" + ] + } + } + }, + "required": [ + "response" + ] + }, + "StatsNodeUsersUsageResponseResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "sparklineData": { + "type": "array", + "items": { + "type": "number" + } + }, + "topUsers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "color": { + "type": "string" + }, + "username": { + "type": "string" + }, + "total": { + "type": "number" + } + }, + "required": [ + "color", + "username", + "total" + ] + } + } + }, + "required": [ + "categories", + "sparklineData", + "topUsers" + ] + } + }, + "required": [ + "response" + ] + }, + "GetStatsNodesUsersUsageRequest": { + "type": "object", + "properties": { + "nodesUuids": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "nodesUuids" + ] + }, + "GetLegacyStatsUserUsageResponse": { + "type": "object", + "properties": { + "response": { + "type": "array", + "items": { + "type": "object", + "properties": { + "userUuid": { + "type": "string", + "format": "uuid" + }, + "nodeUuid": { + "type": "string", + "format": "uuid" + }, + "nodeName": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "total": { + "type": "number" + }, + "date": { + "type": "string" + } + }, + "required": [ + "userUuid", + "nodeUuid", + "nodeName", + "countryCode", + "total", + "date" + ] + } + } + }, + "required": [ + "response" + ] + }, + "StatsUserUsageResponseResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "sparklineData": { + "type": "array", + "items": { + "type": "number" + } + }, + "topNodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TopNode" + } + }, + "series": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "color": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "total": { + "type": "number" + }, + "data": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "uuid", + "name", + "color", + "countryCode", + "total", + "data" + ] + } + } + }, + "required": [ + "categories", + "sparklineData", + "topNodes", + "series" + ] + } + }, + "required": [ + "response" + ] + }, + "GetAllHwidDevicesResponse": { + "type": "object", + "properties": { + "response": { + "$ref": "#/components/schemas/AllHwidDevices" + } + }, + "required": [ + "response" + ] + }, + "CreateUserHwidDeviceRequest": { + "type": "object", + "properties": { + "hwid": { + "type": "string" + }, + "userUuid": { + "type": "string", + "format": "uuid" + }, + "platform": { + "type": "string" + }, + "osVersion": { + "type": "string" + }, + "deviceModel": { + "type": "string" + }, + "userAgent": { + "type": "string" + }, + "requestIp": { + "type": "string" + } + }, + "required": [ + "hwid", + "userUuid" + ] + }, + "HwidDevicesResponse": { + "type": "object", + "properties": { + "response": { + "$ref": "#/components/schemas/AllHwidDevices" + } + }, + "required": [ + "response" + ] + }, + "DeleteUserHwidDeviceRequest": { + "type": "object", + "properties": { + "userUuid": { + "type": "string", + "format": "uuid" + }, + "hwid": { + "type": "string" + } + }, + "required": [ + "userUuid", + "hwid" + ] + }, + "DeleteAllUserHwidDevicesRequest": { + "type": "object", + "properties": { + "userUuid": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "userUuid" + ] + }, + "GetHwidDevicesStatsResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "byPlatform": { + "type": "array", + "items": { + "type": "object", + "properties": { + "platform": { + "type": "string" + }, + "count": { + "type": "number" + }, + "byApp": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ByAppItem" + } + } + }, + "required": [ + "platform", + "count", + "byApp" + ] + } + }, + "stats": { + "type": "object", + "properties": { + "totalUniqueDevices": { + "type": "number" + }, + "totalHwidDevices": { + "type": "number" + }, + "averageHwidDevicesPerUser": { + "type": "number" + } + }, + "required": [ + "totalUniqueDevices", + "totalHwidDevices", + "averageHwidDevicesPerUser" + ] + } + }, + "required": [ + "byPlatform", + "stats" + ] + } + }, + "required": [ + "response" + ] + }, + "GetTopUsersByHwidDevicesResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "users": { + "type": "array", + "items": { + "type": "object", + "properties": { + "userUuid": { + "type": "string", + "format": "uuid" + }, + "id": { + "type": "number" + }, + "username": { + "type": "string" + }, + "devicesCount": { + "type": "number" + } + }, + "required": [ + "userUuid", + "id", + "username", + "devicesCount" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "users", + "total" + ] + } + }, + "required": [ + "response" + ] + }, + "GetInfraProvidersResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "providers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Provider" + } + } + }, + "required": [ + "total", + "providers" + ] + } + }, + "required": [ + "response" + ] + }, + "InfraProviderResponseResponse": { + "type": "object", + "properties": { + "response": { + "$ref": "#/components/schemas/Provider" + } + }, + "required": [ + "response" + ] + }, + "CreateInfraProviderRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 2, + "maxLength": 30 + }, + "faviconLink": { + "type": "string", + "format": "uri" + }, + "loginUrl": { + "type": "string", + "format": "uri" + } + }, + "required": [ + "name" + ] + }, + "UpdateInfraProviderRequest": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string", + "minLength": 2, + "maxLength": 30 + }, + "faviconLink": { + "type": "string", + "format": "uri", + "nullable": true + }, + "loginUrl": { + "type": "string", + "format": "uri", + "nullable": true + } + }, + "required": [ + "uuid" + ] + }, + "CreateInfraBillingHistoryRecordRequest": { + "type": "object", + "properties": { + "providerUuid": { + "type": "string", + "format": "uuid" + }, + "amount": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": false + }, + "billedAt": { + "description": "Billing date. Format: 2025-01-17T15:38:45.065Z", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "providerUuid", + "amount", + "billedAt" + ] + }, + "BillingHistoryResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "records": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "providerUuid": { + "type": "string", + "format": "uuid" + }, + "amount": { + "type": "number" + }, + "billedAt": { + "type": "string", + "format": "date-time" + }, + "provider": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "faviconLink": { + "type": "string", + "nullable": true + } + }, + "required": [ + "uuid", + "name", + "faviconLink" + ] + } + }, + "required": [ + "uuid", + "providerUuid", + "amount", + "billedAt", + "provider" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "records", + "total" + ] + } + }, + "required": [ + "response" + ] + }, + "BillingNodesResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "totalBillingNodes": { + "type": "number" + }, + "billingNodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "nodeUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "providerUuid": { + "type": "string", + "format": "uuid" + }, + "provider": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "loginUrl": { + "type": "string", + "nullable": true + }, + "faviconLink": { + "type": "string", + "nullable": true + } + }, + "required": [ + "uuid", + "name", + "loginUrl", + "faviconLink" + ] + }, + "node": { + "$ref": "#/components/schemas/Node" + }, + "nextBillingAt": { + "type": "string", + "format": "date-time" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "nodeUuid", + "name", + "providerUuid", + "provider", + "node", + "nextBillingAt", + "createdAt", + "updatedAt" + ] + } + }, + "availableBillingNodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Node" + } + }, + "totalAvailableBillingNodes": { + "type": "number" + }, + "stats": { + "type": "object", + "properties": { + "upcomingNodesCount": { + "type": "number" + }, + "currentMonthPayments": { + "type": "number" + }, + "totalSpent": { + "type": "number" + } + }, + "required": [ + "upcomingNodesCount", + "currentMonthPayments", + "totalSpent" + ] + } + }, + "required": [ + "totalBillingNodes", + "billingNodes", + "availableBillingNodes", + "totalAvailableBillingNodes", + "stats" + ] + } + }, + "required": [ + "response" + ] + }, + "UpdateInfraBillingNodeRequest": { + "type": "object", + "properties": { + "uuids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "nextBillingAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuids", + "nextBillingAt" + ] + }, + "CreateInfraBillingNodeRequest": { + "type": "object", + "properties": { + "providerUuid": { + "type": "string", + "format": "uuid" + }, + "nodeUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "nullable": true + }, + "nextBillingAt": { + "description": "Next billing date. Format: 2025-01-17T15:38:45.065Z", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "providerUuid", + "nodeUuid", + "name", + "nextBillingAt" + ] + }, + "GetSubscriptionRequestHistoryResponse": { + "type": "object", + "properties": { + "response": { + "$ref": "#/components/schemas/UserSubscriptionHistory" + } + }, + "required": [ + "response" + ] + }, + "GetSubscriptionRequestHistoryStatsResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "byParsedApp": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ByAppItem" + } + }, + "hourlyRequestStats": { + "type": "array", + "items": { + "type": "object", + "properties": { + "dateTime": { + "type": "string", + "format": "date-time" + }, + "requestCount": { + "type": "number" + } + }, + "required": [ + "dateTime", + "requestCount" + ] + } + } + }, + "required": [ + "byParsedApp", + "hourlyRequestStats" + ] + } + }, + "required": [ + "response" + ] + }, + "GetMetadataResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "build": { + "type": "object", + "properties": { + "time": { + "type": "string" + }, + "number": { + "type": "string" + } + }, + "required": [ + "time", + "number" + ] + }, + "git": { + "type": "object", + "properties": { + "backend": { + "type": "object", + "properties": { + "commitSha": { + "type": "string" + }, + "branch": { + "type": "string" + }, + "commitUrl": { + "type": "string" + } + }, + "required": [ + "commitSha", + "branch", + "commitUrl" + ] + }, + "frontend": { + "type": "object", + "properties": { + "commitSha": { + "type": "string" + }, + "commitUrl": { + "type": "string" + } + }, + "required": [ + "commitSha", + "commitUrl" + ] + } + }, + "required": [ + "backend", + "frontend" + ] + } + }, + "required": [ + "version", + "build", + "git" + ] + } + }, + "required": [ + "response" + ] + }, + "GetStatsResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "cpu": { + "type": "object", + "properties": { + "cores": { + "type": "number" + } + }, + "required": [ + "cores" + ] + }, + "memory": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "free": { + "type": "number" + }, + "used": { + "type": "number" + } + }, + "required": [ + "total", + "free", + "used" + ] + }, + "uptime": { + "type": "number" + }, + "timestamp": { + "type": "number" + }, + "users": { + "type": "object", + "properties": { + "statusCounts": { + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "totalUsers": { + "type": "number" + } + }, + "required": [ + "statusCounts", + "totalUsers" + ] + }, + "onlineStats": { + "type": "object", + "properties": { + "lastDay": { + "type": "number" + }, + "lastWeek": { + "type": "number" + }, + "neverOnline": { + "type": "number" + }, + "onlineNow": { + "type": "number" + } + }, + "required": [ + "lastDay", + "lastWeek", + "neverOnline", + "onlineNow" + ] + }, + "nodes": { + "type": "object", + "properties": { + "totalOnline": { + "type": "number" + }, + "totalBytesLifetime": { + "type": "string" + } + }, + "required": [ + "totalOnline", + "totalBytesLifetime" + ] + } + }, + "required": [ + "cpu", + "memory", + "uptime", + "timestamp", + "users", + "onlineStats", + "nodes" + ] + } + }, + "required": [ + "response" + ] + }, + "GetBandwidthStatsResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "bandwidthLastTwoDays": { + "$ref": "#/components/schemas/BandwidthLastTwoDays" + }, + "bandwidthLastSevenDays": { + "$ref": "#/components/schemas/BandwidthLastTwoDays" + }, + "bandwidthLast30Days": { + "$ref": "#/components/schemas/BandwidthLastTwoDays" + }, + "bandwidthCalendarMonth": { + "$ref": "#/components/schemas/BandwidthLastTwoDays" + }, + "bandwidthCurrentYear": { + "$ref": "#/components/schemas/BandwidthLastTwoDays" + } + }, + "required": [ + "bandwidthLastTwoDays", + "bandwidthLastSevenDays", + "bandwidthLast30Days", + "bandwidthCalendarMonth", + "bandwidthCurrentYear" + ] + } + }, + "required": [ + "response" + ] + }, + "GetNodesStatisticsResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "lastSevenDays": { + "type": "array", + "items": { + "type": "object", + "properties": { + "nodeName": { + "type": "string" + }, + "date": { + "type": "string" + }, + "totalBytes": { + "type": "string" + } + }, + "required": [ + "nodeName", + "date", + "totalBytes" + ] + } + } + }, + "required": [ + "lastSevenDays" + ] + } + }, + "required": [ + "response" + ] + }, + "GetRemnawaveHealthResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "runtimeMetrics": { + "type": "array", + "items": { + "type": "object", + "properties": { + "rss": { + "type": "number" + }, + "heapUsed": { + "type": "number" + }, + "heapTotal": { + "type": "number" + }, + "external": { + "type": "number" + }, + "arrayBuffers": { + "type": "number" + }, + "eventLoopDelayMs": { + "type": "number" + }, + "eventLoopP99Ms": { + "type": "number" + }, + "activeHandles": { + "type": "number" + }, + "uptime": { + "type": "number" + }, + "pid": { + "type": "number" + }, + "timestamp": { + "type": "number" + }, + "instanceId": { + "type": "string" + }, + "instanceType": { + "type": "string" + } + }, + "required": [ + "rss", + "heapUsed", + "heapTotal", + "external", + "arrayBuffers", + "eventLoopDelayMs", + "eventLoopP99Ms", + "activeHandles", + "uptime", + "pid", + "timestamp", + "instanceId", + "instanceType" + ] + } + } + }, + "required": [ + "runtimeMetrics" + ] + } + }, + "required": [ + "response" + ] + }, + "GetNodesMetricsResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "nodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "nodeUuid": { + "type": "string" + }, + "nodeName": { + "type": "string" + }, + "countryEmoji": { + "type": "string" + }, + "providerName": { + "type": "string" + }, + "usersOnline": { + "type": "number" + }, + "inboundsStats": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InboundsStat" + } + }, + "outboundsStats": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InboundsStat" + } + } + }, + "required": [ + "nodeUuid", + "nodeName", + "countryEmoji", + "providerName", + "usersOnline", + "inboundsStats", + "outboundsStats" + ] + } + } + }, + "required": [ + "nodes" + ] + } + }, + "required": [ + "response" + ] + }, + "GenerateX25519Response": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "keypairs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "publicKey": { + "type": "string" + }, + "privateKey": { + "type": "string" + } + }, + "required": [ + "publicKey", + "privateKey" + ] + } + } + }, + "required": [ + "keypairs" + ] + } + }, + "required": [ + "response" + ] + }, + "DebugSrrMatcherRequest": { + "type": "object", + "properties": { + "responseRules": { + "$ref": "#/components/schemas/ResponseRules" + } + }, + "required": [ + "responseRules" + ] + }, + "DebugSrrMatcherResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "matched": { + "type": "boolean" + }, + "responseType": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX", + "BROWSER", + "BLOCK", + "STATUS_CODE_404", + "STATUS_CODE_451", + "SOCKET_DROP" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX", + "BROWSER", + "BLOCK", + "STATUS_CODE_404", + "STATUS_CODE_451", + "SOCKET_DROP" + ] + }, + "matchedRule": { + "$ref": "#/components/schemas/Rule" + }, + "inputHeaders": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "outputHeaders": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "required": [ + "matched", + "responseType", + "matchedRule", + "inputHeaders", + "outputHeaders" + ] + } + }, + "required": [ + "response" + ] + }, + "GetRecapResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "thisMonth": { + "type": "object", + "properties": { + "users": { + "type": "number" + }, + "traffic": { + "type": "string" + } + }, + "required": [ + "users", + "traffic" + ] + }, + "total": { + "type": "object", + "properties": { + "users": { + "type": "number" + }, + "nodes": { + "type": "number" + }, + "traffic": { + "type": "string" + }, + "nodesRam": { + "type": "string" + }, + "nodesCpuCores": { + "type": "number" + }, + "distinctCountries": { + "type": "number" + } + }, + "required": [ + "users", + "nodes", + "traffic", + "nodesRam", + "nodesCpuCores", + "distinctCountries" + ] + }, + "version": { + "type": "string" + }, + "initDate": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "thisMonth", + "total", + "version", + "initDate" + ] + } + }, + "required": [ + "response" + ] + }, + "SubscriptionSettingsResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "profileTitle": { + "type": "string" + }, + "supportLink": { + "type": "string" + }, + "profileUpdateInterval": { + "type": "integer", + "minimum": 1, + "exclusiveMinimum": false + }, + "isProfileWebpageUrlEnabled": { + "type": "boolean" + }, + "serveJsonAtBaseSubscription": { + "type": "boolean" + }, + "isShowCustomRemarks": { + "type": "boolean" + }, + "customRemarks": { + "$ref": "#/components/schemas/CustomRemark" + }, + "happAnnounce": { + "type": "string", + "nullable": true + }, + "happRouting": { + "type": "string", + "nullable": true + }, + "customResponseHeaders": { + "additionalProperties": { + "type": "string" + }, + "nullable": true + }, + "randomizeHosts": { + "type": "boolean" + }, + "responseRules": { + "$ref": "#/components/schemas/ResponseRules" + }, + "hwidSettings": { + "$ref": "#/components/schemas/HwidSettings" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "profileTitle", + "supportLink", + "profileUpdateInterval", + "isProfileWebpageUrlEnabled", + "serveJsonAtBaseSubscription", + "isShowCustomRemarks", + "customRemarks", + "happAnnounce", + "happRouting", + "customResponseHeaders", + "randomizeHosts", + "responseRules", + "hwidSettings", + "createdAt", + "updatedAt" + ] + } + }, + "required": [ + "response" + ] + }, + "UpdateSubscriptionSettingsRequest": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "profileTitle": { + "type": "string" + }, + "supportLink": { + "type": "string" + }, + "profileUpdateInterval": { + "type": "integer" + }, + "isProfileWebpageUrlEnabled": { + "type": "boolean" + }, + "serveJsonAtBaseSubscription": { + "type": "boolean" + }, + "happAnnounce": { + "type": "string", + "maxLength": 200, + "nullable": true + }, + "happRouting": { + "type": "string", + "nullable": true + }, + "isShowCustomRemarks": { + "type": "boolean" + }, + "customRemarks": { + "$ref": "#/components/schemas/CustomRemark" + }, + "customResponseHeaders": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "randomizeHosts": { + "type": "boolean" + }, + "responseRules": { + "$ref": "#/components/schemas/ResponseRules" + }, + "hwidSettings": { + "$ref": "#/components/schemas/HwidSettings" + } + }, + "required": [ + "uuid" + ] + }, + "IpsResponseResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "jobId": { + "type": "string" + } + }, + "required": [ + "jobId" + ] + } + }, + "required": [ + "response" + ] + }, + "FetchIpsResultResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "isCompleted": { + "type": "boolean" + }, + "isFailed": { + "type": "boolean" + }, + "progress": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "completed": { + "type": "number" + }, + "percent": { + "type": "number" + } + }, + "required": [ + "total", + "completed", + "percent" + ] + }, + "result": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "userUuid": { + "type": "string", + "format": "uuid" + }, + "userId": { + "type": "string" + }, + "nodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "nodeUuid": { + "type": "string", + "format": "uuid" + }, + "nodeName": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "ips": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Ips" + } + } + }, + "required": [ + "nodeUuid", + "nodeName", + "countryCode", + "ips" + ] + } + } + }, + "required": [ + "success", + "userUuid", + "userId", + "nodes" + ], + "nullable": true + } + }, + "required": [ + "isCompleted", + "isFailed", + "progress", + "result" + ] + } + }, + "required": [ + "response" + ] + }, + "DropConnectionsRequest": { + "type": "object", + "properties": { + "dropBy": { + "oneOf": [ + { + "description": "Drop by user UUIDs", + "type": "object", + "properties": { + "by": { + "type": "string", + "enum": [ + "userUuids" + ] + }, + "userUuids": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "by", + "userUuids" + ] + }, + { + "description": "Drop by IP addresses", + "type": "object", + "properties": { + "by": { + "type": "string", + "enum": [ + "ipAddresses" + ] + }, + "ipAddresses": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + }, + "required": [ + "by", + "ipAddresses" + ] + } + ] + }, + "targetNodes": { + "oneOf": [ + { + "description": "Target all connected nodes", + "type": "object", + "properties": { + "target": { + "type": "string", + "enum": [ + "allNodes" + ] + } + }, + "required": [ + "target" + ] + }, + { + "description": "Target specific nodes", + "type": "object", + "properties": { + "target": { + "type": "string", + "enum": [ + "specificNodes" + ] + }, + "nodeUuids": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "target", + "nodeUuids" + ] + } + ] + } + }, + "required": [ + "dropBy", + "targetNodes" + ] + }, + "FetchUsersIpsResultResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "isCompleted": { + "type": "boolean" + }, + "isFailed": { + "type": "boolean" + }, + "result": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "nodeUuid": { + "type": "string", + "format": "uuid" + }, + "users": { + "type": "array", + "items": { + "type": "object", + "properties": { + "userId": { + "type": "string" + }, + "ips": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Ips" + } + } + }, + "required": [ + "userId", + "ips" + ] + } + } + }, + "required": [ + "success", + "nodeUuid", + "users" + ], + "nullable": true + } + }, + "required": [ + "isCompleted", + "isFailed", + "result" + ] + } + }, + "required": [ + "response" + ] + }, + "UserMetadataResponseResponse": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "metadata": { + "type": "object", + "properties": {} + } + }, + "required": [ + "metadata" + ] + } + }, + "required": [ + "response" + ] + }, + "UpsertUserMetadataRequestBodyRequest": { + "type": "object", + "properties": { + "metadata": { + "type": "object", + "properties": {} + } + }, + "required": [ + "metadata" + ] + }, + "RemnawaveWebhookUserEvents": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "user" + ] + }, + "event": { + "type": "string", + "enum": [ + "user.created", + "user.modified", + "user.deleted", + "user.revoked", + "user.disabled", + "user.enabled", + "user.limited", + "user.expired", + "user.traffic_reset", + "user.first_connected", + "user.bandwidth_usage_threshold_reached", + "user.not_connected", + "user.expiration" + ] + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "data": { + "$ref": "#/components/schemas/UserItemInfo" + }, + "meta": { + "type": "object", + "properties": { + "notConnectedAfterHours": { + "type": "number", + "nullable": true + }, + "expiration": { + "type": "number", + "nullable": true + } + }, + "nullable": true + } + }, + "required": [ + "scope", + "event", + "timestamp", + "data", + "meta" + ] + }, + "RemnawaveWebhookUserHwidDevicesEvents": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "user_hwid_devices" + ] + }, + "event": { + "type": "string", + "enum": [ + "user_hwid_devices.added", + "user_hwid_devices.deleted" + ] + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "data": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/UserItemInfo" + }, + "hwidUserDevice": { + "$ref": "#/components/schemas/Device" + } + }, + "required": [ + "user", + "hwidUserDevice" + ] + } + }, + "required": [ + "scope", + "event", + "timestamp", + "data" + ] + }, + "RemnawaveWebhookNodeEvents": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "node" + ] + }, + "event": { + "type": "string", + "enum": [ + "node.created", + "node.modified", + "node.disabled", + "node.enabled", + "node.deleted", + "node.connection_lost", + "node.connection_restored", + "node.traffic_notify" + ] + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "data": { + "$ref": "#/components/schemas/NodeResponseDataItem" + } + }, + "required": [ + "scope", + "event", + "timestamp", + "data" + ] + }, + "RemnawaveWebhookServiceEvents": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "service" + ] + }, + "event": { + "type": "string", + "enum": [ + "service.panel_started", + "service.login_attempt_failed", + "service.login_attempt_success", + "service.subpage_config_changed", + "service.api_token_created", + "service.api_token_deleted" + ] + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "data": { + "type": "object", + "properties": { + "loginAttempt": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "ip": { + "type": "string" + }, + "userAgent": { + "type": "string" + }, + "description": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "required": [ + "username", + "ip", + "userAgent" + ] + }, + "panelVersion": { + "type": "string" + }, + "subpageConfig": { + "type": "object", + "properties": { + "action": { + "type": "string", + "enum": [ + "CREATED", + "UPDATED", + "DELETED" + ] + }, + "uuid": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "action", + "uuid" + ] + }, + "apiToken": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "name", + "uuid", + "expireAt", + "scopes" + ] + } + } + } + }, + "required": [ + "scope", + "event", + "timestamp", + "data" + ] + }, + "RemnawaveWebhookErrorsEvents": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "errors" + ] + }, + "event": { + "type": "string", + "enum": [ + "errors.bandwidth_usage_threshold_reached_max_notifications" + ] + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "data": { + "type": "object", + "properties": { + "description": { + "type": "string" + } + }, + "required": [ + "description" + ] + } + }, + "required": [ + "scope", + "event", + "timestamp", + "data" + ] + }, + "RemnawaveWebhookCrmEvents": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "crm" + ] + }, + "event": { + "type": "string", + "enum": [ + "crm.infra_billing_node_payment_in_7_days", + "crm.infra_billing_node_payment_in_48hrs", + "crm.infra_billing_node_payment_in_24hrs", + "crm.infra_billing_node_payment_due_today", + "crm.infra_billing_node_payment_overdue_24hrs", + "crm.infra_billing_node_payment_overdue_48hrs", + "crm.infra_billing_node_payment_overdue_7_days" + ] + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "data": { + "type": "object", + "properties": { + "providerName": { + "type": "string" + }, + "nodeName": { + "type": "string" + }, + "nextBillingAt": { + "type": "string", + "format": "date-time" + }, + "loginUrl": { + "type": "string" + } + }, + "required": [ + "providerName", + "nodeName", + "nextBillingAt", + "loginUrl" + ] + } + }, + "required": [ + "scope", + "event", + "timestamp", + "data" + ] + }, + "RemnawaveWebhookTorrentBlockerEvents": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "torrent_blocker" + ] + }, + "event": { + "type": "string", + "enum": [ + "torrent_blocker.report" + ] + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "data": { + "type": "object", + "properties": { + "node": { + "$ref": "#/components/schemas/NodeResponseDataItem" + }, + "user": { + "$ref": "#/components/schemas/UserItemInfo" + }, + "report": { + "$ref": "#/components/schemas/ReportItem" + } + }, + "required": [ + "node", + "user", + "report" + ] + } + }, + "required": [ + "scope", + "event", + "timestamp", + "data" + ] + }, + "BadRequestError": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ValidationError" + } + } + }, + "required": [ + "message", + "statusCode", + "errors" + ] + }, + "ValidationError": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "UnauthorizedError": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Unauthorized" + }, + "statusCode": { + "type": "number", + "example": 401 + } + }, + "required": [ + "message", + "statusCode" + ] + }, + "ForbiddenError": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Forbidden" + }, + "statusCode": { + "type": "number", + "example": 403 + } + }, + "required": [ + "message", + "statusCode" + ] + }, + "NotFoundError": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Not Found" + }, + "statusCode": { + "type": "number", + "example": 404 + } + }, + "required": [ + "message", + "statusCode" + ] + }, + "InternalServerError": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + }, + "Header": { + "description": "{\"markdownDescription\":\"**Key** and **value** of the response header will be added to the response.\"}", + "type": "object", + "properties": { + "key": { + "description": "{\"markdownDescription\":\"Key of the response header. Must comply with RFC 7230.\"}", + "type": "string", + "pattern": "^[!#$%&'*+\\-.0-9A-Z^_`a-z|~]+$" + }, + "value": { + "description": "{\"markdownDescription\":\"Value of the response header. \"}", + "type": "string", + "minLength": 1 + } + }, + "required": [ + "key", + "value" + ] + }, + "InfraProvidersDetail": { + "type": "object", + "properties": { + "nodeUuid": { + "type": "string", + "format": "uuid" + }, + "countryCode": { + "type": "string" + } + }, + "required": [ + "nodeUuid", + "countryCode" + ], + "nullable": true + }, + "Condition": { + "description": "{\"markdownDescription\":\"Condition to check against the **headerName**.\",\"defaultSnippets\":[{\"label\":\"Examples: Check if header contains \\\"text/html\\\"\",\"markdownDescription\":\"Condition to check if **headerName** contains \\\"text/html\\\"\",\"body\":{\"headerName\":\"accept\",\"operator\":\"CONTAINS\",\"value\":\"text/html\",\"caseSensitive\":true}}]}", + "type": "object", + "properties": { + "headerName": { + "description": "{\"markdownDescription\":\"**Name** of the HTTP header to check. Must comply with RFC 7230.\"}", + "type": "string", + "pattern": "^[!#$%&'*+\\-.0-9A-Z^_`a-z|~]+$" + }, + "operator": { + "description": "{\"errorMessage\":\"Invalid operator. Please select a valid operator.\",\"markdownDescription\":\"Operator to use for comparing the `headerName` with `value`.\",\"markdownEnumDescriptions\":[\"Performs an exact, comparison between the header value and specified string. `string === value`\",\"Ensures the header value does not exactly match the specified string. `string !== value`\",\"Checks if the header value contains the specified string as a substring. `string.includes()`\",\"Verifies the header value does not contain the specified string as a substring. `!string.includes()`\",\"Validates that the header value begins with the specified string. `string.startsWith()`\",\"Validates that the header value does not begin with the specified string. `!string.startsWith()`\",\"Confirms the header value ends with the specified string. `string.endsWith()`\",\"Confirms the header value does not end with the specified string. `!string.endsWith()`\",\"Evaluates if the header value matches the specified regular expression pattern. `regex.test()`\",\"Evaluates if the header value does not match the specified regular expression pattern. `!regex.test()`\"]}", + "type": "string", + "enum": [ + "EQUALS", + "NOT_EQUALS", + "CONTAINS", + "NOT_CONTAINS", + "STARTS_WITH", + "NOT_STARTS_WITH", + "ENDS_WITH", + "NOT_ENDS_WITH", + "REGEX", + "NOT_REGEX" + ], + "x-enumNames": [ + "EQUALS", + "NOT_EQUALS", + "CONTAINS", + "NOT_CONTAINS", + "STARTS_WITH", + "NOT_STARTS_WITH", + "ENDS_WITH", + "NOT_ENDS_WITH", + "REGEX", + "NOT_REGEX" + ] + }, + "value": { + "description": "{\"markdownDescription\":\"**Value** to check against the **headerName**.\"}", + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "caseSensitive": { + "description": "{\"markdownDescription\":\"Whether the value is **case sensitive**. \\n\\n - `true`: the value will be compared as is. \\n\\n - `false`: the value will be lowercased **before** comparison.\"}", + "type": "boolean" + } + }, + "required": [ + "headerName", + "operator", + "value", + "caseSensitive" + ] + }, + "EncryptionItem": { + "description": "{\"markdownDescription\":\"Encrypt response body with given parameters. Generate keypairs with Rescue CLI: `docker exec -it remnawave cli`, select \\\"Generate keypairs\\\".\"}", + "type": "object", + "properties": { + "method": { + "type": "string", + "enum": [ + "age1", + "age1pq1" + ] + }, + "key": { + "type": "string" + } + }, + "required": [ + "method", + "key" + ] + }, + "Ips": { + "type": "object", + "properties": { + "ip": { + "type": "string" + }, + "lastSeen": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "ip", + "lastSeen" + ] + }, + "ActiveInternalSquad": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "uuid", + "name" + ] + }, + "Inbound": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "profileUuid": { + "type": "string", + "format": "uuid" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "network": { + "type": "string", + "nullable": true + }, + "security": { + "type": "string", + "nullable": true + }, + "port": { + "type": "number", + "nullable": true + }, + "rawInbound": { + "nullable": true + } + }, + "required": [ + "uuid", + "profileUuid", + "tag", + "type", + "network", + "security", + "port", + "rawInbound" + ] + }, + "Node": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "countryCode": { + "type": "string" + } + }, + "required": [ + "uuid", + "name", + "countryCode" + ] + }, + "TemplateRef": { + "type": "object", + "properties": { + "templateUuid": { + "type": "string", + "format": "uuid" + }, + "templateType": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + } + }, + "required": [ + "templateUuid", + "templateType" + ] + }, + "InterfaceItem": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "rxBytesPerSec": { + "type": "number" + }, + "txBytesPerSec": { + "type": "number" + }, + "rxTotal": { + "type": "number" + }, + "txTotal": { + "type": "number" + } + }, + "required": [ + "interface", + "rxBytesPerSec", + "txBytesPerSec", + "rxTotal", + "txTotal" + ], + "nullable": true + }, + "ActionReportItem": { + "type": "object", + "properties": { + "blocked": { + "type": "boolean" + }, + "ip": { + "type": "string" + }, + "blockDuration": { + "type": "number" + }, + "willUnblockAt": { + "type": "string", + "format": "date-time" + }, + "userId": { + "type": "string" + }, + "processedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "blocked", + "ip", + "blockDuration", + "willUnblockAt", + "userId", + "processedAt" + ] + }, + "XrayReportItem": { + "type": "object", + "properties": { + "email": { + "type": "string", + "nullable": true + }, + "level": { + "type": "number", + "nullable": true + }, + "protocol": { + "type": "string", + "nullable": true + }, + "network": { + "type": "string" + }, + "source": { + "type": "string", + "nullable": true + }, + "destination": { + "type": "string" + }, + "routeTarget": { + "type": "string", + "nullable": true + }, + "originalTarget": { + "type": "string", + "nullable": true + }, + "inboundTag": { + "type": "string", + "nullable": true + }, + "inboundName": { + "type": "string", + "nullable": true + }, + "inboundLocal": { + "type": "string", + "nullable": true + }, + "outboundTag": { + "type": "string", + "nullable": true + }, + "ts": { + "type": "number" + } + }, + "required": [ + "email", + "level", + "protocol", + "network", + "source", + "destination", + "routeTarget", + "originalTarget", + "inboundTag", + "inboundName", + "inboundLocal", + "outboundTag", + "ts" + ] + }, + "ByAppItem": { + "type": "object", + "properties": { + "app": { + "type": "string" + }, + "count": { + "type": "number" + } + }, + "required": [ + "app", + "count" + ] + }, + "BillingNode": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "details": { + "$ref": "#/components/schemas/InfraProvidersDetail" + } + }, + "required": [ + "name", + "details" + ] + }, + "InboundsStat": { + "type": "object", + "properties": { + "tag": { + "type": "string" + }, + "upload": { + "type": "string" + }, + "download": { + "type": "string" + } + }, + "required": [ + "tag", + "upload", + "download" + ] + }, + "ResponseModification": { + "description": "{\"examples\":[{\"headers\":[{\"key\":\"X-Custom-Header\",\"value\":\"CustomValue\"}]}],\"markdownDescription\":\"Response modifications to be applied when the rule is matched. Optional.\"}", + "type": "object", + "properties": { + "headers": { + "description": "{\"defaultSnippets\":[{\"label\":\"Examples: Add custom header\",\"markdownDescription\":\"Add a custom header to the response\",\"body\":[{\"key\":\"X-Custom-Header\",\"value\":\"CustomValue\"}]}],\"markdownDescription\":\"Array of headers to be added when the rule is matched.\"}", + "type": "array", + "items": { + "$ref": "#/components/schemas/Header" + } + }, + "applyHeadersToEnd": { + "description": "{\"markdownDescription\":\"By default, headers are added when forming the response. In some cases, headers set in SRR may be overridden by headers from other parts of the system. If you set this flag to **true**, headers from SRR will be added at the very end, just before the response is sent. In this case, SRR headers may override headers from other sections.\"}", + "type": "boolean" + }, + "subscriptionTemplate": { + "description": "{\"markdownDescription\":\"Override the subscription template with the given name. If not provided, the default subscription template will be used. If the template name is not found, the default subscription template for this type will be used. **This modification have higher priority than settings from External Squads.**\"}", + "type": "string", + "minLength": 1 + }, + "ignoreHostXrayJsonTemplate": { + "description": "{\"markdownDescription\":\"Each Host may have its own Xray Json Template. If you set this flag to **true**, the Xray Json Template defined by the SRR will be used. **The Host's Xray Json Template will be ignored.**\"}", + "type": "boolean" + }, + "ignoreServeJsonAtBaseSubscription": { + "description": "{\"markdownDescription\":\"If you set this flag to **true**, the **Serve JSON at Base Subscription** setting will be ignored (set to **false**).\"}", + "type": "boolean" + }, + "additionalExtendedClientsRegex": { + "description": "{\"markdownDescription\":\"Additional regex patterns to match extended clients. Matched clients will receive `serverDescription` in the subscription response.\\n\\n**Default Mihomo extended clients:**\\n- `^FlClash ?X/`\\n- `^Flowvy/`\\n- `^prizrak-box/`\\n- `^koala-clash/`\\n\\n**Default Xray extended clients:**\\n- `^Happ/`\\n- `^INCY/`\\n\\n**Example:** `[\\\"^MyClient/\\\", \\\"^CustomApp\\\\\\\\/v2\\\"]`\"}", + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "disableHwidCheck": { + "description": "{\"markdownDescription\":\"If you set this flag to **true**, the HWID check will be disabled. **This modification have higher priority than settings from Subscription Settings.**\"}", + "type": "boolean" + }, + "encryption": { + "$ref": "#/components/schemas/EncryptionItem" + }, + "excludeHostsByTags": { + "description": "{\"markdownDescription\":\"Excludes hosts from the subscription output if at least one tag in the host matches the given tags.\"}", + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "pattern": "^[A-Z0-9_:]+$", + "maxLength": 36 + } + } + } + }, + "UserTrafficItem": { + "type": "object", + "properties": { + "usedTrafficBytes": { + "type": "number" + }, + "lifetimeUsedTrafficBytes": { + "type": "number" + }, + "onlineAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "firstConnectedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastConnectedNodeUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "usedTrafficBytes", + "lifetimeUsedTrafficBytes", + "onlineAt", + "firstConnectedAt", + "lastConnectedNodeUuid" + ] + }, + "UserItem2": { + "type": "object", + "properties": { + "shortUuid": { + "type": "string" + }, + "daysLeft": { + "type": "number" + }, + "trafficUsed": { + "type": "string" + }, + "trafficLimit": { + "type": "string" + }, + "lifetimeTrafficUsed": { + "type": "string" + }, + "trafficUsedBytes": { + "type": "string" + }, + "trafficLimitBytes": { + "type": "string" + }, + "lifetimeTrafficUsedBytes": { + "type": "string" + }, + "username": { + "type": "string" + }, + "expiresAt": { + "type": "string", + "format": "date-time" + }, + "isActive": { + "type": "boolean" + }, + "userStatus": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ] + }, + "trafficLimitStrategy": { + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ] + } + }, + "required": [ + "shortUuid", + "daysLeft", + "trafficUsed", + "trafficLimit", + "lifetimeTrafficUsed", + "trafficUsedBytes", + "trafficLimitBytes", + "lifetimeTrafficUsedBytes", + "username", + "expiresAt", + "isActive", + "userStatus", + "trafficLimitStrategy" + ] + }, + "InternalSquadsResponInfoItem": { + "type": "object", + "properties": { + "membersCount": { + "type": "number" + }, + "inboundsCount": { + "type": "number" + } + }, + "required": [ + "membersCount", + "inboundsCount" + ] + }, + "ExternalSquadsResponInfoItem": { + "type": "object", + "properties": { + "membersCount": { + "type": "number" + } + }, + "required": [ + "membersCount" + ] + }, + "SubscriptionSettings": { + "type": "object", + "properties": { + "profileTitle": { + "type": "string" + }, + "supportLink": { + "type": "string" + }, + "profileUpdateInterval": { + "type": "integer", + "minimum": 1, + "exclusiveMinimum": false + }, + "isProfileWebpageUrlEnabled": { + "type": "boolean" + }, + "serveJsonAtBaseSubscription": { + "type": "boolean" + }, + "isShowCustomRemarks": { + "type": "boolean" + }, + "happAnnounce": { + "type": "string", + "nullable": true + }, + "happRouting": { + "type": "string", + "nullable": true + }, + "randomizeHosts": { + "type": "boolean" + } + }, + "nullable": true + }, + "HostOverride": { + "type": "object", + "properties": { + "serverDescription": { + "type": "string", + "maxLength": 30, + "nullable": true + }, + "vlessRouteId": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 65535, + "exclusiveMaximum": false, + "nullable": true + } + }, + "nullable": true + }, + "HwidSettings": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "fallbackDeviceLimit": { + "type": "number" + }, + "maxDevicesAnnounce": { + "type": "string", + "maxLength": 200, + "nullable": true + } + }, + "required": [ + "enabled", + "fallbackDeviceLimit", + "maxDevicesAnnounce" + ], + "nullable": true + }, + "CustomRemark": { + "type": "object", + "properties": { + "expiredUsers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "limitedUsers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "disabledUsers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "emptyHosts": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "HWIDMaxDevicesExceeded": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "HWIDNotSupported": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + }, + "required": [ + "expiredUsers", + "limitedUsers", + "disabledUsers", + "emptyHosts", + "HWIDMaxDevicesExceeded", + "HWIDNotSupported" + ], + "nullable": true + }, + "NodeResponseInfoItem": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "cpus": { + "type": "integer" + }, + "cpuModel": { + "type": "string" + }, + "memoryTotal": { + "type": "number" + }, + "hostname": { + "type": "string" + }, + "platform": { + "type": "string" + }, + "release": { + "type": "string" + }, + "type": { + "type": "string" + }, + "version": { + "type": "string" + }, + "networkInterfaces": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "arch", + "cpus", + "cpuModel", + "memoryTotal", + "hostname", + "platform", + "release", + "type", + "version", + "networkInterfaces" + ] + }, + "Stat": { + "type": "object", + "properties": { + "memoryFree": { + "type": "number" + }, + "memoryUsed": { + "type": "number" + }, + "uptime": { + "type": "number" + }, + "loadAvg": { + "type": "array", + "items": { + "type": "number" + } + }, + "interface": { + "$ref": "#/components/schemas/InterfaceItem" + } + }, + "required": [ + "memoryFree", + "memoryUsed", + "uptime", + "loadAvg", + "interface" + ] + }, + "ReportItem": { + "type": "object", + "properties": { + "actionReport": { + "$ref": "#/components/schemas/ActionReportItem" + }, + "xrayReport": { + "$ref": "#/components/schemas/XrayReportItem" + } + }, + "required": [ + "actionReport", + "xrayReport" + ] + }, + "BillingHistoryItem": { + "type": "object", + "properties": { + "totalAmount": { + "type": "number" + }, + "totalBills": { + "type": "number" + } + }, + "required": [ + "totalAmount", + "totalBills" + ] + }, + "Rule": { + "description": "{\"defaultSnippets\":[{\"label\":\"Examples: Blank rule\",\"markdownDescription\":\"Simple blank rule with no conditions or modifications.\\n```json\\n{\\n \\\"name\\\": \\\"Blank rule\\\",\\n \\\"description\\\": \\\"Blank rule\\\",\\n \\\"operator\\\": \\\"AND\\\",\\n \\\"enabled\\\": true,\\n \\\"conditions\\\": [],\\n \\\"responseType\\\": \\\"BLOCK\\\",\\n \\\"responseModifications\\\": {\\n \\\"headers\\\": []\\n }\\n}\\n```\",\"body\":{\"name\":\"Blank rule\",\"description\":\"Blank rule\",\"operator\":\"AND\",\"enabled\":true,\"conditions\":[],\"responseType\":\"BLOCK\",\"responseModifications\":{\"headers\":[]}}},{\"label\":\"Examples: Block Legacy Clients\",\"markdownDescription\":\"Block requests from legacy clients\\n```json\\n{\\n \\\"name\\\": \\\"Block Legacy Clients\\\",\\n \\\"description\\\": \\\"Block requests from legacy clients\\\",\\n \\\"enabled\\\": true,\\n \\\"operator\\\": \\\"OR\\\",\\n \\\"conditions\\\": [\\n {\\n \\\"headerName\\\": \\\"user-agent\\\",\\n \\\"operator\\\": \\\"CONTAINS\\\",\\n \\\"value\\\": \\\"Hiddify\\\",\\n \\\"caseSensitive\\\": true\\n },\\n {\\n \\\"headerName\\\": \\\"user-agent\\\",\\n \\\"operator\\\": \\\"CONTAINS\\\",\\n \\\"value\\\": \\\"FoxRay\\\",\\n \\\"caseSensitive\\\": true\\n }\\n ],\\n \\\"responseType\\\": \\\"BLOCK\\\"\\n}\\n```\",\"body\":{\"name\":\"Block Legacy Clients\",\"description\":\"Block requests from legacy clients\",\"enabled\":true,\"operator\":\"OR\",\"conditions\":[{\"headerName\":\"user-agent\",\"operator\":\"CONTAINS\",\"value\":\"Hiddify\",\"caseSensitive\":true},{\"headerName\":\"user-agent\",\"operator\":\"CONTAINS\",\"value\":\"FoxRay\",\"caseSensitive\":true}],\"responseType\":\"BLOCK\"}}],\"title\":\"Response Rule\",\"markdownDescription\":\"Response rule configuration.\\n\\n**Fields:**\\n- **name**: Name of the response rule.\\n- **description**: Description of the response rule. Optional.\\n- **enabled**: Control whether the response rule is enabled or disabled. \\n\\n - `true` the rule will be applied. \\n\\n - `false` the rule will be always ignored.\\n- **operator**: Operator to use for combining conditions in the rule.\\n- **conditions**: Array of conditions to check against the request headers. Conditions are applied with **operator**. If conditions are empty, the rule will be matched.\\n- **responseType**: Type of the response. Determines the type of **response** to be returned when the rule is matched.\\n- **responseModifications**: Response modifications to be applied when the rule is matched. Optional.\\n\\n**Example:**\\n```json\\n{\\n \\\"name\\\": \\\"Block Legacy Clients\\\",\\n \\\"description\\\": \\\"Block requests from legacy clients\\\",\\n \\\"enabled\\\": true,\\n \\\"operator\\\": \\\"OR\\\",\\n \\\"conditions\\\": [\\n {\\n \\\"headerName\\\": \\\"user-agent\\\",\\n \\\"operator\\\": \\\"CONTAINS\\\",\\n \\\"value\\\": \\\"Hiddify\\\",\\n \\\"caseSensitive\\\": true\\n },\\n {\\n \\\"headerName\\\": \\\"user-agent\\\",\\n \\\"operator\\\": \\\"CONTAINS\\\",\\n \\\"value\\\": \\\"FoxRay\\\",\\n \\\"caseSensitive\\\": true\\n }\\n ],\\n \\\"responseType\\\": \\\"BLOCK\\\"\\n}\\n```\"}", + "type": "object", + "properties": { + "name": { + "description": "{\"markdownDescription\":\"Name of the response rule.\"}", + "type": "string", + "minLength": 1, + "maxLength": 50 + }, + "description": { + "description": "{\"markdownDescription\":\"Description of the response rule. Optional.\"}", + "type": "string", + "minLength": 1, + "maxLength": 250 + }, + "enabled": { + "description": "{\"markdownDescription\":\"Control whether the response rule is enabled or disabled. \\n\\n - `true` the rule will be applied. \\n\\n - `false` the rule will be always ignored.\"}", + "type": "boolean" + }, + "operator": { + "description": "{\"markdownDescription\":\"Operator to use for combining conditions in the rule.\"}", + "type": "string", + "enum": [ + "AND", + "OR" + ], + "x-enumNames": [ + "AND", + "OR" + ] + }, + "conditions": { + "description": "{\"markdownDescription\":\"Array of conditions to check against the request headers. Conditions are applied with **operator**. If conditions are empty, the rule will be matched.\"}", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + } + }, + "responseType": { + "description": "{\"errorMessage\":\"Invalid response type. Please select a valid response type.\",\"markdownDescription\":\"Type of the response. Determines the type of **response** to be returned when the rule is matched.\",\"markdownEnumDescriptions\":[\"Return **subscription** in XRAY-JSON format. (Using `Xray Json` template)\",\"Return **subscription** in BASE64 encoded string. Compatible with most client application with Xray core.\",\"Return **subscription** in Mihomo format. (Using `Mihomo` template)\",\"Return **subscription** in Stash format. (Using `Stash` template)\",\"Return **subscription** in Clash format. (Using `Clash` template) Useful for client application that use Legacy Clash core.\",\"Return **subscription** in Singbox format. (Using `Singbox` template) Format which is used by Singbox client application.\",\"Return **subscription** as browser format. The same as on `/info` route.\",\"**Drop** request and return `403` status code.\",\"**Drop** request and return `404` status code.\",\"**Drop** request and return `451` status code.\",\"**Drop** the socket connection.\"]}", + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX", + "BROWSER", + "BLOCK", + "STATUS_CODE_404", + "STATUS_CODE_451", + "SOCKET_DROP" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX", + "BROWSER", + "BLOCK", + "STATUS_CODE_404", + "STATUS_CODE_451", + "SOCKET_DROP" + ] + }, + "responseModifications": { + "$ref": "#/components/schemas/ResponseModification" + } + }, + "required": [ + "name", + "enabled", + "operator", + "conditions", + "responseType" + ] + }, + "Github": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "clientId": { + "type": "string", + "nullable": true + }, + "clientSecret": { + "type": "string", + "nullable": true + }, + "allowedEmails": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "enabled", + "clientId", + "clientSecret", + "allowedEmails" + ] + }, + "Pocketid": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "clientId": { + "type": "string", + "nullable": true + }, + "clientSecret": { + "type": "string", + "nullable": true + }, + "plainDomain": { + "type": "string", + "nullable": true + }, + "allowedEmails": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "enabled", + "clientId", + "clientSecret", + "plainDomain", + "allowedEmails" + ] + }, + "Keycloak": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "realm": { + "type": "string", + "nullable": true + }, + "clientId": { + "type": "string", + "nullable": true + }, + "clientSecret": { + "type": "string", + "nullable": true + }, + "frontendDomain": { + "type": "string", + "nullable": true + }, + "keycloakDomain": { + "type": "string", + "nullable": true + }, + "allowedEmails": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "enabled", + "realm", + "clientId", + "clientSecret", + "frontendDomain", + "keycloakDomain", + "allowedEmails" + ], + "default": { + "enabled": false, + "realm": null, + "frontendDomain": null, + "keycloakDomain": null, + "clientId": null, + "clientSecret": null, + "allowedEmails": [] + } + }, + "Generic": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "clientId": { + "type": "string", + "nullable": true + }, + "clientSecret": { + "type": "string", + "nullable": true + }, + "withPkce": { + "type": "boolean" + }, + "authorizationUrl": { + "type": "string", + "nullable": true + }, + "tokenUrl": { + "type": "string", + "nullable": true + }, + "frontendDomain": { + "type": "string", + "nullable": true + }, + "allowedEmails": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "enabled", + "clientId", + "clientSecret", + "withPkce", + "authorizationUrl", + "tokenUrl", + "frontendDomain", + "allowedEmails" + ], + "default": { + "enabled": false, + "frontendDomain": null, + "tokenUrl": null, + "clientId": null, + "clientSecret": null, + "withPkce": false, + "authorizationUrl": null, + "allowedEmails": [] + } + }, + "Telegram": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "clientId": { + "type": "string", + "nullable": true + }, + "clientSecret": { + "type": "string", + "nullable": true + }, + "allowedIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "frontendDomain": { + "type": "string", + "nullable": true + } + }, + "required": [ + "enabled", + "clientId", + "clientSecret", + "allowedIds", + "frontendDomain" + ], + "default": { + "enabled": false, + "clientId": null, + "clientSecret": null, + "allowedIds": [], + "frontendDomain": null + } + }, + "PasswordSettings": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "nullable": true + }, + "Config": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "config": { + "nullable": true + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "config" + ] + }, + "UserItemInfo": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "id": { + "type": "number" + }, + "shortUuid": { + "type": "string" + }, + "username": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "default": "ACTIVE" + }, + "trafficLimitBytes": { + "type": "number", + "default": 0 + }, + "trafficLimitStrategy": { + "description": "Available reset periods", + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "default": "NO_RESET" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "telegramId": { + "type": "integer", + "nullable": true + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tag": { + "type": "string", + "nullable": true + }, + "hwidDeviceLimit": { + "type": "integer", + "nullable": true + }, + "externalSquadUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "trojanPassword": { + "type": "string" + }, + "vlessUuid": { + "type": "string", + "format": "uuid" + }, + "ssPassword": { + "type": "string" + }, + "lastTriggeredThreshold": { + "type": "integer", + "default": 0 + }, + "subRevokedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastTrafficResetAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "subscriptionUrl": { + "type": "string" + }, + "activeInternalSquads": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ActiveInternalSquad" + } + }, + "userTraffic": { + "$ref": "#/components/schemas/UserTrafficItem" + } + }, + "required": [ + "uuid", + "id", + "shortUuid", + "username", + "expireAt", + "telegramId", + "email", + "description", + "tag", + "hwidDeviceLimit", + "externalSquadUuid", + "trojanPassword", + "vlessUuid", + "ssPassword", + "subRevokedAt", + "lastTrafficResetAt", + "createdAt", + "updatedAt", + "subscriptionUrl", + "activeInternalSquads", + "userTraffic" + ] + }, + "Record": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "userId": { + "type": "number" + }, + "requestAt": { + "type": "string", + "format": "date-time" + }, + "requestIp": { + "type": "string", + "nullable": true + }, + "userAgent": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "userId", + "requestAt", + "requestIp", + "userAgent" + ] + }, + "Subscription": { + "type": "object", + "properties": { + "isFound": { + "type": "boolean" + }, + "user": { + "$ref": "#/components/schemas/UserItem2" + }, + "links": { + "type": "array", + "items": { + "type": "string" + } + }, + "ssConfLinks": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "subscriptionUrl": { + "type": "string" + } + }, + "required": [ + "isFound", + "user", + "links", + "ssConfLinks", + "subscriptionUrl" + ] + }, + "Template": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "templateType": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + }, + "templateJson": { + "nullable": true + }, + "encodedTemplateYaml": { + "type": "string", + "nullable": true + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "templateType", + "templateJson", + "encodedTemplateYaml" + ] + }, + "ConfigProfile": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "config": {}, + "inbounds": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inbound" + } + }, + "nodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Node" + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "config", + "inbounds", + "nodes", + "createdAt", + "updatedAt" + ] + }, + "InternalSquad": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "info": { + "$ref": "#/components/schemas/InternalSquadsResponInfoItem" + }, + "inbounds": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inbound" + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "info", + "inbounds", + "createdAt", + "updatedAt" + ] + }, + "ExternalSquad": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "info": { + "$ref": "#/components/schemas/ExternalSquadsResponInfoItem" + }, + "templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TemplateRef" + } + }, + "subscriptionSettings": { + "$ref": "#/components/schemas/SubscriptionSettings" + }, + "hostOverrides": { + "$ref": "#/components/schemas/HostOverride" + }, + "responseHeaders": { + "additionalProperties": { + "type": "string" + }, + "nullable": true + }, + "hwidSettings": { + "$ref": "#/components/schemas/HwidSettings" + }, + "customRemarks": { + "$ref": "#/components/schemas/CustomRemark" + }, + "subpageConfigUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "info", + "templates", + "subscriptionSettings", + "hostOverrides", + "responseHeaders", + "hwidSettings", + "customRemarks", + "subpageConfigUuid", + "createdAt", + "updatedAt" + ] + }, + "ConfigProfileItem": { + "type": "object", + "properties": { + "activeConfigProfileUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "activeInbounds": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inbound" + } + } + }, + "required": [ + "activeConfigProfileUuid", + "activeInbounds" + ] + }, + "ProviderItem": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "faviconLink": { + "type": "string", + "nullable": true + }, + "loginUrl": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "name", + "faviconLink", + "loginUrl", + "createdAt", + "updatedAt" + ], + "nullable": true + }, + "SystemItem": { + "type": "object", + "properties": { + "info": { + "$ref": "#/components/schemas/NodeResponseInfoItem" + }, + "stats": { + "$ref": "#/components/schemas/Stat" + } + }, + "required": [ + "info", + "stats" + ], + "nullable": true + }, + "Version": { + "type": "object", + "properties": { + "xray": { + "type": "string" + }, + "node": { + "type": "string" + } + }, + "required": [ + "xray", + "node" + ], + "nullable": true + }, + "TopNode": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "countryCode": { + "type": "string" + }, + "color": { + "type": "string" + }, + "name": { + "type": "string" + }, + "total": { + "type": "number" + } + }, + "required": [ + "uuid", + "countryCode", + "color", + "name", + "total" + ] + }, + "NodePlugin": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "pluginConfig": { + "nullable": true + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "pluginConfig" + ] + }, + "InboundItem": { + "type": "object", + "properties": { + "configProfileUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "configProfileInboundUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "configProfileUuid", + "configProfileInboundUuid" + ] + }, + "Device": { + "type": "object", + "properties": { + "hwid": { + "type": "string" + }, + "userId": { + "type": "number" + }, + "platform": { + "type": "string", + "nullable": true + }, + "osVersion": { + "type": "string", + "nullable": true + }, + "deviceModel": { + "type": "string", + "nullable": true + }, + "userAgent": { + "type": "string", + "nullable": true + }, + "requestIp": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "hwid", + "userId", + "platform", + "osVersion", + "deviceModel", + "userAgent", + "requestIp", + "createdAt", + "updatedAt" + ] + }, + "Provider": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "faviconLink": { + "type": "string", + "nullable": true + }, + "loginUrl": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "billingHistory": { + "$ref": "#/components/schemas/BillingHistoryItem" + }, + "billingNodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BillingNode" + } + } + }, + "required": [ + "uuid", + "name", + "faviconLink", + "loginUrl", + "createdAt", + "updatedAt", + "billingHistory", + "billingNodes" + ] + }, + "DebugSrrMatcherSettings": { + "description": "{\"markdownDescription\":\"Settings for the **response rules** config. Optional.\"}", + "type": "object", + "properties": { + "disableSubscriptionAccessByPath": { + "description": "{\"markdownDescription\":\"Usually, a user's subscription may also be available via additional paths such as **/json**, **/stash**, or **/mihomo**. If this flag is set to **true**, access via these additional paths will be disabled.\"}", + "type": "boolean" + } + } + }, + "PasskeySettings": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "rpId": { + "type": "string", + "nullable": true + }, + "origin": { + "type": "string", + "nullable": true + } + }, + "required": [ + "enabled", + "rpId", + "origin" + ], + "nullable": true + }, + "Oauth2Settings": { + "type": "object", + "properties": { + "github": { + "$ref": "#/components/schemas/Github" + }, + "pocketid": { + "$ref": "#/components/schemas/Pocketid" + }, + "yandex": { + "$ref": "#/components/schemas/Github" + }, + "keycloak": { + "$ref": "#/components/schemas/Keycloak" + }, + "generic": { + "$ref": "#/components/schemas/Generic" + }, + "telegram": { + "$ref": "#/components/schemas/Telegram" + } + }, + "required": [ + "github", + "pocketid", + "yandex" + ], + "nullable": true + }, + "BrandingSettings": { + "type": "object", + "properties": { + "title": { + "type": "string", + "nullable": true + }, + "logoUrl": { + "type": "string", + "format": "uri", + "nullable": true + } + }, + "required": [ + "title", + "logoUrl" + ], + "nullable": true + }, + "ReorderRequestItem": { + "type": "object", + "properties": { + "viewPosition": { + "type": "integer" + }, + "uuid": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "viewPosition", + "uuid" + ] + }, + "NodeResponseDataItem": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "address": { + "type": "string" + }, + "port": { + "type": "integer", + "nullable": true + }, + "proxyUrl": { + "type": "string", + "nullable": true + }, + "isConnected": { + "type": "boolean" + }, + "isDisabled": { + "type": "boolean" + }, + "isConnecting": { + "type": "boolean" + }, + "lastStatusChange": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastStatusMessage": { + "type": "string", + "nullable": true + }, + "isTrafficTrackingActive": { + "type": "boolean" + }, + "trafficResetDay": { + "type": "integer", + "nullable": true + }, + "trafficLimitBytes": { + "type": "number", + "nullable": true + }, + "trafficUsedBytes": { + "type": "number", + "nullable": true + }, + "notifyPercent": { + "type": "integer", + "nullable": true + }, + "viewPosition": { + "type": "integer" + }, + "countryCode": { + "type": "string" + }, + "consumptionMultiplier": { + "type": "number" + }, + "nodeConsumptionMultiplier": { + "type": "number" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "configProfile": { + "$ref": "#/components/schemas/ConfigProfileItem" + }, + "providerUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "provider": { + "$ref": "#/components/schemas/ProviderItem" + }, + "activePluginUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "system": { + "$ref": "#/components/schemas/SystemItem" + }, + "versions": { + "$ref": "#/components/schemas/Version" + }, + "xrayUptime": { + "type": "number" + }, + "usersOnline": { + "type": "number" + }, + "note": { + "type": "string", + "nullable": true + } + }, + "required": [ + "uuid", + "name", + "address", + "port", + "proxyUrl", + "isConnected", + "isDisabled", + "isConnecting", + "lastStatusChange", + "lastStatusMessage", + "isTrafficTrackingActive", + "trafficResetDay", + "trafficLimitBytes", + "trafficUsedBytes", + "notifyPercent", + "viewPosition", + "countryCode", + "consumptionMultiplier", + "nodeConsumptionMultiplier", + "tags", + "createdAt", + "updatedAt", + "configProfile", + "providerUuid", + "provider", + "activePluginUuid", + "system", + "versions", + "xrayUptime", + "usersOnline", + "note" + ] + }, + "HostItem": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "remark": { + "type": "string" + }, + "address": { + "type": "string" + }, + "port": { + "type": "integer" + }, + "path": { + "type": "string", + "nullable": true + }, + "sni": { + "type": "string", + "nullable": true + }, + "host": { + "type": "string", + "nullable": true + }, + "alpn": { + "type": "string", + "enum": [ + "h3", + "h2", + "http/1.1", + "h2,http/1.1", + "h3,h2,http/1.1", + "h3,h2" + ], + "x-enumNames": [ + "H3", + "H2", + "HTTP_1_1", + "H_COMBINED", + "H3_H2_H1_COMBINED", + "H3_H2_COMBINED" + ], + "nullable": true + }, + "fingerprint": { + "type": "string", + "nullable": true + }, + "isDisabled": { + "type": "boolean" + }, + "securityLayer": { + "type": "string", + "enum": [ + "DEFAULT", + "TLS", + "NONE" + ], + "x-enumNames": [ + "DEFAULT", + "TLS", + "NONE" + ], + "default": "DEFAULT" + }, + "xhttpExtraParams": { + "nullable": true + }, + "muxParams": { + "nullable": true + }, + "sockoptParams": { + "nullable": true + }, + "finalMask": { + "nullable": true + }, + "inbound": { + "$ref": "#/components/schemas/InboundItem" + }, + "serverDescription": { + "type": "string", + "maxLength": 30, + "nullable": true + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "isHidden": { + "type": "boolean", + "default": false + }, + "overrideSniFromAddress": { + "type": "boolean", + "default": false + }, + "keepSniBlank": { + "type": "boolean", + "default": false + }, + "vlessRouteId": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 65535, + "exclusiveMaximum": false, + "nullable": true + }, + "pinnedPeerCertSha256": { + "type": "string", + "nullable": true + }, + "verifyPeerCertByName": { + "type": "string", + "nullable": true + }, + "shuffleHost": { + "type": "boolean" + }, + "mihomoX25519": { + "type": "boolean" + }, + "mihomoIpVersion": { + "type": "string", + "enum": [ + "dual", + "ipv4", + "ipv6", + "ipv4-prefer", + "ipv6-prefer" + ], + "x-enumNames": [ + "DUAL", + "IPV4", + "IPV6", + "IPV4_PREFER", + "IPV6_PREFER" + ], + "nullable": true + }, + "nodes": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "xrayJsonTemplateUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "excludedInternalSquads": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "excludeFromSubscriptionTypes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + } + } + }, + "required": [ + "uuid", + "viewPosition", + "remark", + "address", + "port", + "path", + "sni", + "host", + "alpn", + "fingerprint", + "isDisabled", + "xhttpExtraParams", + "muxParams", + "sockoptParams", + "finalMask", + "inbound", + "serverDescription", + "vlessRouteId", + "pinnedPeerCertSha256", + "verifyPeerCertByName", + "shuffleHost", + "mihomoX25519", + "mihomoIpVersion", + "nodes", + "xrayJsonTemplateUuid", + "excludedInternalSquads", + "excludeFromSubscriptionTypes" + ] + }, + "BandwidthLastTwoDays": { + "type": "object", + "properties": { + "current": { + "type": "string" + }, + "previous": { + "type": "string" + }, + "difference": { + "type": "string" + } + }, + "required": [ + "current", + "previous", + "difference" + ] + }, + "ResponseRules": { + "type": "object", + "properties": { + "version": { + "description": "{\"title\":\"Response Rules Config Version\",\"markdownDescription\":\"Version of the **response rules** config. Currently supported version is **1**.\"}", + "type": "string", + "enum": [ + "1" + ], + "x-enumNames": [ + "1" + ] + }, + "settings": { + "$ref": "#/components/schemas/DebugSrrMatcherSettings" + }, + "rules": { + "description": "{\"title\":\"Response Rules\",\"markdownDescription\":\"Array of **response rules**. Rules are evaluated in order and the first rule that matches is applied. If no rule matches, request will be blocked by default.\\n\\n**Example:**\\n```json\\n[\\n {\\n \\\"name\\\": \\\"Blank rule\\\",\\n \\\"description\\\": \\\"Blank rule\\\",\\n \\\"operator\\\": \\\"AND\\\",\\n \\\"enabled\\\": true,\\n \\\"conditions\\\": [],\\n \\\"responseType\\\": \\\"BLOCK\\\",\\n \\\"responseModifications\\\": {\\n \\\"headers\\\": []\\n }\\n }\\n]\\n```\",\"defaultSnippets\":[]}", + "type": "array", + "items": { + "$ref": "#/components/schemas/Rule" + } + } + }, + "required": [ + "version", + "rules" + ] + }, + "UserSubscriptionHistory": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "records": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + }, + "required": [ + "total", + "records" + ] + }, + "ConfigProfileRef": { + "type": "object", + "properties": { + "activeConfigProfileUuid": { + "type": "string", + "format": "uuid" + }, + "activeInbounds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "activeConfigProfileUuid", + "activeInbounds" + ] + }, + "InboundRef": { + "type": "object", + "properties": { + "configProfileUuid": { + "type": "string", + "format": "uuid" + }, + "configProfileInboundUuid": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "configProfileUuid", + "configProfileInboundUuid" + ] + }, + "AllHwidDevices": { + "type": "object", + "properties": { + "devices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Device" + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "devices", + "total" + ] + } + } + } +} \ No newline at end of file diff --git a/specs/2.8.0.json b/specs/2.8.0.json new file mode 100644 index 0000000..59b30e9 --- /dev/null +++ b/specs/2.8.0.json @@ -0,0 +1,48947 @@ +{ + "openapi": "3.0.0", + "paths": { + "/api/remnawave-settings": { + "get": { + "operationId": "RemnawaveSettingsController_getSettings", + "parameters": [], + "responses": { + "200": { + "description": "Remnawave settings retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetRemnawaveSettingsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Remnawave settings", + "tags": [ + "Remnawave Settings Controller" + ] + }, + "patch": { + "operationId": "RemnawaveSettingsController_updateSettings", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateRemnawaveSettingsRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Subscription settings updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateRemnawaveSettingsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update Remnawave settings", + "tags": [ + "Remnawave Settings Controller" + ] + } + }, + "/api/passkeys/registration/options": { + "get": { + "operationId": "PasskeyController_passkeyRegistrationOptions", + "parameters": [], + "responses": { + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + }, + "default": { + "description": "Get passkey registration options", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetPasskeyRegistrationOptionsResponseDto" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get registration options for passkey", + "tags": [ + "Passkeys Controller" + ] + } + }, + "/api/passkeys/registration/verify": { + "post": { + "operationId": "PasskeyController_passkeyRegistrationVerify", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VerifyPasskeyRegistrationRequestDto" + } + } + } + }, + "responses": { + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + }, + "default": { + "description": "Verify passkey registration result", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VerifyPasskeyRegistrationResponseDto" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Verify registration for passkey", + "tags": [ + "Passkeys Controller" + ] + } + }, + "/api/passkeys": { + "get": { + "operationId": "PasskeyController_getActivePasskeys", + "parameters": [], + "responses": { + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + }, + "default": { + "description": "Get all passkeys", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAllPasskeysResponseDto" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all passkeys", + "tags": [ + "Passkeys Controller" + ] + }, + "delete": { + "operationId": "PasskeyController_deletePasskey", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePasskeyRequestDto" + } + } + } + }, + "responses": { + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + }, + "default": { + "description": "Delete passkey result", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePasskeyResponseDto" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete a passkey by ID", + "tags": [ + "Passkeys Controller" + ] + }, + "patch": { + "operationId": "PasskeyController_updatePasskey", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdatePasskeyRequestDto" + } + } + } + }, + "responses": { + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + }, + "default": { + "description": "Update passkey", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdatePasskeyResponseDto" + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update passkey", + "tags": [ + "Passkeys Controller" + ] + } + }, + "/api/auth/login": { + "post": { + "operationId": "AuthController_login", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginRequestDto" + } + } + } + }, + "responses": { + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "401": { + "description": "Unauthorized - Invalid credentials", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "statusCode": { + "type": "number", + "example": 401 + }, + "message": { + "type": "string", + "example": "Invalid credentials" + }, + "error": { + "type": "string", + "example": "Unauthorized" + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + }, + "default": { + "description": "Access token for further requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginResponseDto" + } + } + } + } + }, + "summary": "Login as superadmin", + "tags": [ + "Auth Controller" + ] + } + }, + "/api/auth/register": { + "post": { + "operationId": "AuthController_register", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegisterRequestDto" + } + } + } + }, + "responses": { + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "403": { + "description": "Forbidden - Registration is not allowed", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "statusCode": { + "type": "number", + "example": 403 + }, + "message": { + "type": "string", + "example": "Registration is not allowed" + }, + "error": { + "type": "string", + "example": "Forbidden" + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + }, + "default": { + "description": "Access token for further requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegisterResponseDto" + } + } + } + } + }, + "summary": "Register as superadmin", + "tags": [ + "Auth Controller" + ] + } + }, + "/api/auth/status": { + "get": { + "operationId": "AuthController_getStatus", + "parameters": [], + "responses": { + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + }, + "default": { + "description": "Status of the system", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetStatusResponseDto" + } + } + } + } + }, + "summary": "Get the status of the authentication", + "tags": [ + "Auth Controller" + ] + } + }, + "/api/auth/oauth2/authorize": { + "post": { + "operationId": "AuthController_oauth2Authorize", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OAuth2AuthorizeRequestDto" + } + } + } + }, + "responses": { + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + }, + "default": { + "description": "OAuth2 authorization URL", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OAuth2AuthorizeResponseDto" + } + } + } + } + }, + "summary": "Initiate OAuth2 authorization", + "tags": [ + "Auth Controller" + ] + } + }, + "/api/auth/oauth2/callback": { + "post": { + "operationId": "AuthController_oauth2Callback", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OAuth2CallbackRequestDto" + } + } + } + }, + "responses": { + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + }, + "default": { + "description": "Access token for further requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OAuth2CallbackResponseDto" + } + } + } + } + }, + "summary": "Callback from OAuth2", + "tags": [ + "Auth Controller" + ] + } + }, + "/api/auth/passkey/authentication/options": { + "get": { + "operationId": "AuthController_passkeyAuthenticationOptions", + "parameters": [], + "responses": { + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + }, + "default": { + "description": "Passkey authentication options", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetPasskeyAuthenticationOptionsResponseDto" + } + } + } + } + }, + "summary": "Get the authentication options for passkey", + "tags": [ + "Auth Controller" + ] + } + }, + "/api/auth/passkey/authentication/verify": { + "post": { + "operationId": "AuthController_passkeyAuthenticationVerify", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VerifyPasskeyAuthenticationRequestDto" + } + } + } + }, + "responses": { + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + }, + "default": { + "description": "JWT access token after successful passkey authentication", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VerifyPasskeyAuthenticationResponseDto" + } + } + } + } + }, + "summary": "Verify the authentication for passkey", + "tags": [ + "Auth Controller" + ] + } + }, + "/api/subscription-page-configs": { + "get": { + "operationId": "SubscriptionPageConfigController_getAllConfigs", + "parameters": [], + "responses": { + "200": { + "description": "Subscription page configs retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSubscriptionPageConfigsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all subscription page configs", + "tags": [ + "Subscription Page Configs Controller" + ] + }, + "patch": { + "operationId": "SubscriptionPageConfigController_updateConfig", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSubscriptionPageConfigRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Subscription page config updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSubscriptionPageConfigResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update subscription page config", + "tags": [ + "Subscription Page Configs Controller" + ] + }, + "post": { + "operationId": "SubscriptionPageConfigController_createConfig", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSubscriptionPageConfigRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Subscription page config created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSubscriptionPageConfigResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Create subscription page config", + "tags": [ + "Subscription Page Configs Controller" + ] + } + }, + "/api/subscription-page-configs/{uuid}": { + "get": { + "operationId": "SubscriptionPageConfigController_getConfigByUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "Subscription page config UUID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Subscription page config retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSubscriptionPageConfigResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get subscription page config by uuid", + "tags": [ + "Subscription Page Configs Controller" + ] + }, + "delete": { + "operationId": "SubscriptionPageConfigController_deleteConfig", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "Subscription page config UUID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Subscription page config deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteSubscriptionPageConfigResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete subscription page config", + "tags": [ + "Subscription Page Configs Controller" + ] + } + }, + "/api/subscription-page-configs/actions/reorder": { + "post": { + "operationId": "SubscriptionPageConfigController_reorderSubscriptionPageConfigs", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReorderSubscriptionPageConfigsRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Subscription page configs reordered successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReorderSubscriptionPageConfigsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Reorder subscription page configs", + "tags": [ + "Subscription Page Configs Controller" + ] + } + }, + "/api/subscription-page-configs/actions/clone": { + "post": { + "operationId": "SubscriptionPageConfigController_cloneSubscriptionPageConfig", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CloneSubscriptionPageConfigRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Subscription page config cloned successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CloneSubscriptionPageConfigResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Clone subscription page config", + "tags": [ + "Subscription Page Configs Controller" + ] + } + }, + "/api/users": { + "post": { + "operationId": "UsersController_createUser", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateUserRequestDto" + } + } + } + }, + "responses": { + "201": { + "description": "User created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateUserResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Create a new user", + "tags": [ + "Users Controller" + ] + }, + "patch": { + "operationId": "UsersController_updateUser", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateUserRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "User updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateUserResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update a user by UUID or username", + "tags": [ + "Users Controller" + ] + }, + "get": { + "operationId": "UsersController_getAllUsers", + "parameters": [ + { + "name": "size", + "required": false, + "in": "query", + "description": "Page size for pagination", + "schema": { + "type": "number" + } + }, + { + "name": "start", + "required": false, + "in": "query", + "description": "Offset for pagination", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "Users fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAllUsersResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all users using offset-based pagination", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/{uuid}": { + "delete": { + "operationId": "UsersController_deleteUser", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteUserResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "User not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete user", + "tags": [ + "Users Controller" + ] + }, + "get": { + "operationId": "UsersController_getUserByUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUserByUuidResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "User not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get user by UUID", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/stream": { + "get": { + "operationId": "UsersController_getUsersStream", + "parameters": [ + { + "name": "size", + "required": false, + "in": "query", + "description": "Page size, no more than 1000 (default 250)", + "schema": { + "type": "number" + } + }, + { + "name": "cursor", + "required": false, + "in": "query", + "description": "Cursor from the previous response (nextCursor). Omit on the first request", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Users fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUsersStreamResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all users using cursor-based (keyset) pagination", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/tags": { + "get": { + "operationId": "UsersController_getAllTags", + "parameters": [], + "responses": { + "200": { + "description": "Tags fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAllTagsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all existing user tags", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/{uuid}/accessible-nodes": { + "get": { + "operationId": "UsersController_getUserAccessibleNodes", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User accessible nodes fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUserAccessibleNodesResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "User not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get user accessible nodes", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/{uuid}/subscription-request-history": { + "get": { + "operationId": "UsersController_getUserSubscriptionRequestHistory", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User subscription request history fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUserSubscriptionRequestHistoryResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "User not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get user subscription request history, recent 24 records", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/by-short-uuid/{shortUuid}": { + "get": { + "operationId": "UsersController_getUserByShortUuid", + "parameters": [ + { + "name": "shortUuid", + "required": true, + "in": "path", + "description": "Short UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUserByShortUuidResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "User not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get user by Short UUID", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/by-username/{username}": { + "get": { + "operationId": "UsersController_getUserByUsername", + "parameters": [ + { + "name": "username", + "required": true, + "in": "path", + "description": "Username of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUserByUsernameResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "User not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get user by username", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/by-id/{id}": { + "get": { + "operationId": "UsersController_getUserById", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "ID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUserByIdResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "User not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get user by ID", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/by-telegram-id/{telegramId}": { + "get": { + "operationId": "UsersController_getUserByTelegramId", + "parameters": [ + { + "name": "telegramId", + "required": true, + "in": "path", + "description": "Telegram ID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Users fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUserByTelegramIdResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get users by telegram ID", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/by-email/{email}": { + "get": { + "operationId": "UsersController_getUsersByEmail", + "parameters": [ + { + "name": "email", + "required": true, + "in": "path", + "description": "Email of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Users fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUserByEmailResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get users by email", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/by-tag/{tag}": { + "get": { + "operationId": "UsersController_getUsersByTag", + "parameters": [ + { + "name": "tag", + "required": true, + "in": "path", + "description": "Tag of the user", + "schema": { + "example": "PROMO_1", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Users fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUserByTagResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get users by tag", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/{uuid}/actions/revoke": { + "post": { + "operationId": "UsersController_revokeUserSubscription", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the user", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RevokeUserSubscriptionBodyDto" + } + } + } + }, + "responses": { + "200": { + "description": "User subscription revoked successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RevokeUserSubscriptionResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "User not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Revoke user subscription", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/{uuid}/actions/disable": { + "post": { + "operationId": "UsersController_disableUser", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User disabled successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DisableUserResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "User not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Disable user", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/{uuid}/actions/enable": { + "post": { + "operationId": "UsersController_enableUser", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User enabled successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnableUserResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "User not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Enable user", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/{uuid}/actions/reset-traffic": { + "post": { + "operationId": "UsersController_resetUserTraffic", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User traffic reset successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResetUserTrafficResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "User not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Reset user traffic", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/resolve": { + "post": { + "operationId": "UsersController_resolveUser", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResolveUserRequestBodyDto" + } + } + } + }, + "responses": { + "200": { + "description": "User resolved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResolveUserResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "User not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Resolve a user", + "tags": [ + "Users Controller" + ] + } + }, + "/api/users/bulk/delete-by-status": { + "post": { + "operationId": "UsersBulkActionsController_bulkDeleteUsersByStatus", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkDeleteUsersByStatusRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Users deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkDeleteUsersByStatusResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Bulk delete users by status", + "tags": [ + "Users Bulk Actions Controller" + ] + } + }, + "/api/users/bulk/delete": { + "post": { + "operationId": "UsersBulkActionsController_bulkDeleteUsers", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkDeleteUsersRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Users deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkDeleteUsersResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Bulk delete users by UUIDs", + "tags": [ + "Users Bulk Actions Controller" + ] + } + }, + "/api/users/bulk/revoke-subscription": { + "post": { + "operationId": "UsersBulkActionsController_bulkRevokeUsersSubscription", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkRevokeUsersSubscriptionRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Users subscription revoked successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkRevokeUsersSubscriptionResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Revoke users subscription by User UUIDs", + "tags": [ + "Users Bulk Actions Controller" + ] + } + }, + "/api/users/bulk/reset-traffic": { + "post": { + "operationId": "UsersBulkActionsController_bulkResetUserTraffic", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkResetTrafficUsersRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Users traffic reset successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkResetTrafficUsersResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Bulk reset traffic users by UUIDs", + "tags": [ + "Users Bulk Actions Controller" + ] + } + }, + "/api/users/bulk/update": { + "post": { + "operationId": "UsersBulkActionsController_bulkUpdateUsers", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkUpdateUsersRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Users updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkUpdateUsersResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Bulk update users by UUIDs", + "tags": [ + "Users Bulk Actions Controller" + ] + } + }, + "/api/users/bulk/update-squads": { + "post": { + "operationId": "UsersBulkActionsController_bulkUpdateUsersInternalSquads", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkUpdateUsersSquadsRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Internal squads updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkUpdateUsersSquadsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Bulk update users internal squads by UUIDs", + "tags": [ + "Users Bulk Actions Controller" + ] + } + }, + "/api/users/bulk/extend-expiration-date": { + "post": { + "description": "Bulk extend all users expiration date", + "operationId": "UsersBulkActionsController_bulkExtendExpirationDate", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkExtendExpirationDateRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Users expiration date extended successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkExtendExpirationDateResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Bulk Extend Users Expiration Date", + "tags": [ + "Users Bulk Actions Controller" + ] + } + }, + "/api/users/bulk/all/update": { + "post": { + "operationId": "UsersBulkActionsController_bulkUpdateAllUsers", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkAllUpdateUsersRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "All users updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkAllUpdateUsersResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Bulk update all users", + "tags": [ + "Users Bulk Actions Controller" + ] + } + }, + "/api/users/bulk/all/reset-traffic": { + "post": { + "description": "Bulk reset all users traffic", + "operationId": "UsersBulkActionsController_bulkAllResetUserTraffic", + "parameters": [], + "responses": { + "200": { + "description": "All users traffic reset successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkAllResetTrafficUsersResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Bulk Reset All Users Traffic", + "tags": [ + "Users Bulk Actions Controller" + ] + } + }, + "/api/users/bulk/all/extend-expiration-date": { + "post": { + "description": "Bulk extend all users expiration date", + "operationId": "UsersBulkActionsController_bulkAllExtendExpirationDate", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkAllExtendExpirationDateRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "All users expiration date extended successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkAllExtendExpirationDateResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Bulk Extend All Users Expiration Date", + "tags": [ + "Users Bulk Actions Controller" + ] + } + }, + "/api/sub/{shortUuid}/info": { + "get": { + "operationId": "SubscriptionController_getSubscriptionInfoByShortUuid", + "parameters": [ + { + "name": "shortUuid", + "required": true, + "in": "path", + "description": "Short UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Subscription info fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSubscriptionInfoResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "summary": "Get Subscription Info by Short UUID", + "tags": [ + "[Public] Subscription Controller" + ] + } + }, + "/api/sub/{shortUuid}": { + "get": { + "operationId": "SubscriptionController_getSubscription", + "parameters": [ + { + "name": "shortUuid", + "required": true, + "in": "path", + "description": "Short UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "[Public] Subscription Controller" + ] + } + }, + "/api/sub/{shortUuid}/{clientType}": { + "get": { + "operationId": "SubscriptionController_getSubscriptionByClientType", + "parameters": [ + { + "name": "clientType", + "required": true, + "in": "path", + "description": "Client type", + "schema": { + "enum": [ + "stash", + "singbox", + "mihomo", + "json", + "v2ray-json", + "clash" + ], + "type": "string" + } + }, + { + "name": "shortUuid", + "required": true, + "in": "path", + "description": "Short UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "[Public] Subscription Controller" + ] + } + }, + "/api/subscriptions": { + "get": { + "operationId": "SubscriptionsController_getAllSubscriptions", + "parameters": [ + { + "name": "size", + "required": false, + "in": "query", + "description": "Number of subscriptions to return, no more than 500", + "schema": { + "example": 25, + "type": "number" + } + }, + { + "name": "start", + "required": false, + "in": "query", + "description": "Start index (offset) of the users to return, default is 0", + "schema": { + "example": 0, + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "Users fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAllSubscriptionsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all subscriptions", + "tags": [ + "[Protected] Subscriptions Controller" + ] + } + }, + "/api/subscriptions/by-username/{username}": { + "get": { + "operationId": "SubscriptionsController_getSubscriptionByUsername", + "parameters": [ + { + "name": "username", + "required": true, + "in": "path", + "description": "Username of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Subscription fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSubscriptionByUsernameResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "User not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "format": "date-time" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get subscription by username", + "tags": [ + "[Protected] Subscriptions Controller" + ] + } + }, + "/api/subscriptions/by-short-uuid/{shortUuid}": { + "get": { + "operationId": "SubscriptionsController_getSubscriptionByShortUuidProtected", + "parameters": [ + { + "name": "shortUuid", + "required": true, + "in": "path", + "description": "Short uuid of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Subscription fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSubscriptionByShortUuidProtectedResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "User not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "format": "date-time" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get subscription by short uuid (protected route)", + "tags": [ + "[Protected] Subscriptions Controller" + ] + } + }, + "/api/subscriptions/by-uuid/{uuid}": { + "get": { + "operationId": "SubscriptionsController_getSubscriptionByUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "Uuid of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Subscription fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSubscriptionByUuidResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "User not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "format": "date-time" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get subscription by uuid", + "tags": [ + "[Protected] Subscriptions Controller" + ] + } + }, + "/api/subscriptions/by-short-uuid/{shortUuid}/raw": { + "get": { + "operationId": "SubscriptionsController_getRawSubscriptionByShortUuid", + "parameters": [ + { + "name": "withDisabledHosts", + "required": false, + "in": "query", + "description": "Include disabled hosts in the subscription. Default is false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "shortUuid", + "required": true, + "in": "path", + "description": "Short UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Raw subscription fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetRawSubscriptionByShortUuidResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Raw Subscription by Short UUID", + "tags": [ + "[Protected] Subscriptions Controller" + ] + } + }, + "/api/subscriptions/subpage-config/{shortUuid}": { + "get": { + "operationId": "SubscriptionsController_getSubpageConfigByShortUuid", + "parameters": [ + { + "name": "shortUuid", + "required": true, + "in": "path", + "description": "Short UUID of the user", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSubpageConfigByShortUuidRequestBodyDto" + } + } + } + }, + "responses": { + "200": { + "description": "Subpage config fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSubpageConfigByShortUuidResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Subpage Config by Short UUID", + "tags": [ + "[Protected] Subscriptions Controller" + ] + } + }, + "/api/subscriptions/connection-keys/{uuid}": { + "get": { + "operationId": "SubscriptionsController_getConnectionKeysByUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Connection keys fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetConnectionKeysByUuidResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get connection keys (base64 format) by uuid", + "tags": [ + "[Protected] Subscriptions Controller" + ] + } + }, + "/api/subscription-templates": { + "get": { + "operationId": "SubscriptionTemplateController_getAllTemplates", + "parameters": [], + "responses": { + "200": { + "description": "Templates retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTemplatesResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all subscription templates (wihout content)", + "tags": [ + "Subscription Template Controller" + ] + }, + "patch": { + "operationId": "SubscriptionTemplateController_updateTemplate", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateTemplateRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Template updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateTemplateResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update subscription template", + "tags": [ + "Subscription Template Controller" + ] + }, + "post": { + "operationId": "SubscriptionTemplateController_createTemplate", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSubscriptionTemplateRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Template created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSubscriptionTemplateResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Create subscription template", + "tags": [ + "Subscription Template Controller" + ] + } + }, + "/api/subscription-templates/{uuid}": { + "get": { + "operationId": "SubscriptionTemplateController_getTemplateByUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "Template UUID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Template retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTemplateResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get subscription template by uuid", + "tags": [ + "Subscription Template Controller" + ] + }, + "delete": { + "operationId": "SubscriptionTemplateController_deleteTemplate", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "Template UUID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Template deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteSubscriptionTemplateResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete subscription template", + "tags": [ + "Subscription Template Controller" + ] + } + }, + "/api/subscription-templates/actions/reorder": { + "post": { + "operationId": "SubscriptionTemplateController_reorderSubscriptionTemplates", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReorderSubscriptionTemplatesRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Subscription templates reordered successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReorderSubscriptionTemplatesResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Reorder subscription templates", + "tags": [ + "Subscription Template Controller" + ] + } + }, + "/api/tokens": { + "post": { + "description": "This endpoint is forbidden to use via \"API-key\". It can only be used with an admin JWT-token.", + "operationId": "ApiTokensController_create", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateApiTokenRequestDto" + } + } + } + }, + "responses": { + "201": { + "description": "Token created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateApiTokenResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Create a new API token", + "tags": [ + "API Tokens Controller" + ] + }, + "get": { + "description": "This endpoint is forbidden to use via \"API-key\". It can only be used with admin JWT-token.", + "operationId": "ApiTokensController_findAll", + "parameters": [], + "responses": { + "200": { + "description": "Tokens fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FindAllApiTokensResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all API tokens", + "tags": [ + "API Tokens Controller" + ] + } + }, + "/api/tokens/{uuid}": { + "delete": { + "description": "This endpoint is forbidden to use via \"API-key\". It can be used only with an admin JWT-token.", + "operationId": "ApiTokensController_delete", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the API token", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Token deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteApiTokenResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete an API token by UUID", + "tags": [ + "API Tokens Controller" + ] + } + }, + "/api/tokens/scopes": { + "get": { + "description": "Returns the catalog of scopes that can be granted to an API token, grouped by resource. Forbidden via \"API-key\", admin JWT only.", + "operationId": "ApiTokensController_getScopes", + "parameters": [], + "responses": { + "200": { + "description": "Available API token scopes fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetApiTokenScopesResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get available API token scopes", + "tags": [ + "API Tokens Controller" + ] + } + }, + "/api/config-profiles": { + "get": { + "operationId": "ConfigProfileController_getConfigProfiles", + "parameters": [], + "responses": { + "200": { + "description": "Config profiles retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetConfigProfilesResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get config profiles", + "tags": [ + "Config Profiles Controller" + ] + }, + "post": { + "operationId": "ConfigProfileController_createConfigProfile", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateConfigProfileRequestDto" + } + } + } + }, + "responses": { + "201": { + "description": "Config profile created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateConfigProfileResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "409": { + "description": "Config profile name already exists or inbound tags are not unique. Inbound tags must be unique in global scope." + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Create config profile", + "tags": [ + "Config Profiles Controller" + ] + }, + "patch": { + "operationId": "ConfigProfileController_updateConfigProfile", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateConfigProfileRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Config profile updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateConfigProfileResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "Config profile not found" + }, + "409": { + "description": "Config profile name already exists or inbound tags are not unique. Inbound tags must be unique in global scope." + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update Core Config in specific config profile", + "tags": [ + "Config Profiles Controller" + ] + } + }, + "/api/config-profiles/inbounds": { + "get": { + "operationId": "ConfigProfileController_getAllInbounds", + "parameters": [], + "responses": { + "200": { + "description": "Inbounds retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAllInboundsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all inbounds from all config profiles", + "tags": [ + "Config Profiles Controller" + ] + } + }, + "/api/config-profiles/{uuid}/inbounds": { + "get": { + "operationId": "ConfigProfileController_getInboundsByProfileUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Inbounds retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetInboundsByProfileUuidResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "Config profile not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get inbounds by profile uuid", + "tags": [ + "Config Profiles Controller" + ] + } + }, + "/api/config-profiles/{uuid}": { + "get": { + "operationId": "ConfigProfileController_getConfigProfileByUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Config profile retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetConfigProfileByUuidResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "Config profile not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get config profile by uuid", + "tags": [ + "Config Profiles Controller" + ] + }, + "delete": { + "operationId": "ConfigProfileController_deleteConfigProfileByUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Config profile deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteConfigProfileResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "Config profile not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete config profile", + "tags": [ + "Config Profiles Controller" + ] + } + }, + "/api/config-profiles/{uuid}/computed-config": { + "get": { + "operationId": "ConfigProfileController_getComputedConfigProfileByUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Computed config profile retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetComputedConfigProfileByUuidResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "Config profile not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get computed config profile by uuid", + "tags": [ + "Config Profiles Controller" + ] + } + }, + "/api/config-profiles/actions/reorder": { + "post": { + "operationId": "ConfigProfileController_reorderConfigProfiles", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReorderConfigProfilesRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Config profiles reordered successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReorderConfigProfilesResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Reorder config profiles", + "tags": [ + "Config Profiles Controller" + ] + } + }, + "/api/snippets": { + "get": { + "operationId": "SnippetsController_getSnippets", + "parameters": [], + "responses": { + "200": { + "description": "Snippets retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSnippetsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get snippets", + "tags": [ + "Snippets Controller" + ] + }, + "delete": { + "operationId": "SnippetsController_deleteSnippetByName", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteSnippetRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Snippet deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteSnippetResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "Snippet not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete snippet", + "tags": [ + "Snippets Controller" + ] + }, + "post": { + "operationId": "SnippetsController_createSnippet", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSnippetRequestDto" + } + } + } + }, + "responses": { + "201": { + "description": "Snippet created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSnippetResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "409": { + "description": "Snippet name already exists." + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Create snippet", + "tags": [ + "Snippets Controller" + ] + }, + "patch": { + "operationId": "SnippetsController_updateSnippet", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSnippetRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Snippet updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSnippetResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "Snippet not found" + }, + "409": { + "description": "Snippet name already exists." + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update snippet", + "tags": [ + "Snippets Controller" + ] + } + }, + "/api/internal-squads": { + "get": { + "operationId": "InternalSquadController_getInternalSquads", + "parameters": [], + "responses": { + "200": { + "description": "Internal squads retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetInternalSquadsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all internal squads", + "tags": [ + "Internal Squads Controller" + ] + }, + "post": { + "operationId": "InternalSquadController_createInternalSquad", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateInternalSquadRequestDto" + } + } + } + }, + "responses": { + "201": { + "description": "Internal squad created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateInternalSquadResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "409": { + "description": "Internal squad already exists" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Create internal squad", + "tags": [ + "Internal Squads Controller" + ] + }, + "patch": { + "operationId": "InternalSquadController_updateInternalSquad", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateInternalSquadRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Internal squad updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateInternalSquadResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "Internal squad not found" + }, + "409": { + "description": "Internal squad already exists" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update internal squad", + "tags": [ + "Internal Squads Controller" + ] + } + }, + "/api/internal-squads/{uuid}": { + "get": { + "operationId": "InternalSquadController_getInternalSquadByUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Internal squad retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetInternalSquadByUuidResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get internal squad by uuid", + "tags": [ + "Internal Squads Controller" + ] + }, + "delete": { + "operationId": "InternalSquadController_deleteInternalSquad", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Internal squad deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteInternalSquadResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "Internal squad not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete internal squad", + "tags": [ + "Internal Squads Controller" + ] + } + }, + "/api/internal-squads/{uuid}/accessible-nodes": { + "get": { + "operationId": "InternalSquadController_getInternalSquadAccessibleNodes", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the internal squad", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Internal squad accessible nodes fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetInternalSquadAccessibleNodesResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "Internal squad not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get internal squad accessible nodes", + "tags": [ + "Internal Squads Controller" + ] + } + }, + "/api/internal-squads/{uuid}/bulk-actions/add-users": { + "post": { + "operationId": "InternalSquadController_addUsersToInternalSquad", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Task added to internal job queue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddUsersToInternalSquadResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "Internal squad not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Add all users to internal squad", + "tags": [ + "Internal Squads Controller" + ] + } + }, + "/api/internal-squads/{uuid}/bulk-actions/remove-users": { + "delete": { + "operationId": "InternalSquadController_removeUsersFromInternalSquad", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Task added to internal job queue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RemoveUsersFromInternalSquadResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "Internal squad not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete users from internal squad", + "tags": [ + "Internal Squads Controller" + ] + } + }, + "/api/internal-squads/actions/reorder": { + "post": { + "operationId": "InternalSquadController_reorderInternalSquads", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReorderInternalSquadsRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Internal squads reordered successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReorderInternalSquadsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Reorder internal squads", + "tags": [ + "Internal Squads Controller" + ] + } + }, + "/api/external-squads": { + "get": { + "operationId": "ExternalSquadController_getExternalSquads", + "parameters": [], + "responses": { + "200": { + "description": "External squads retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetExternalSquadsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all external squads", + "tags": [ + "External Squads Controller" + ] + }, + "post": { + "operationId": "ExternalSquadController_createExternalSquad", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateExternalSquadRequestDto" + } + } + } + }, + "responses": { + "201": { + "description": "External squad created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateExternalSquadResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "409": { + "description": "External squad already exists" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Create external squad", + "tags": [ + "External Squads Controller" + ] + }, + "patch": { + "operationId": "ExternalSquadController_updateExternalSquad", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateExternalSquadRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "External squad updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateExternalSquadResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "External squad not found" + }, + "409": { + "description": "External squad already exists" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update external squad", + "tags": [ + "External Squads Controller" + ] + } + }, + "/api/external-squads/{uuid}": { + "get": { + "operationId": "ExternalSquadController_getExternalSquadByUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "External squad retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetExternalSquadByUuidResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get external squad by uuid", + "tags": [ + "External Squads Controller" + ] + }, + "delete": { + "operationId": "ExternalSquadController_deleteExternalSquad", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "External squad deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteExternalSquadResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "External squad not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete external squad", + "tags": [ + "External Squads Controller" + ] + } + }, + "/api/external-squads/{uuid}/bulk-actions/add-users": { + "post": { + "operationId": "ExternalSquadController_addUsersToExternalSquad", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Task added to external job queue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddUsersToExternalSquadResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "External squad not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Add all users to external squad", + "tags": [ + "External Squads Controller" + ] + } + }, + "/api/external-squads/{uuid}/bulk-actions/remove-users": { + "delete": { + "operationId": "ExternalSquadController_removeUsersFromExternalSquad", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Task added to external job queue", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RemoveUsersFromExternalSquadResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "External squad not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete users from external squad", + "tags": [ + "External Squads Controller" + ] + } + }, + "/api/external-squads/actions/reorder": { + "post": { + "operationId": "ExternalSquadController_reorderExternalSquads", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReorderExternalSquadsRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "External squads reordered successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReorderExternalSquadsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Reorder external squads", + "tags": [ + "External Squads Controller" + ] + } + }, + "/api/keygen": { + "get": { + "operationId": "KeygenController_generateKey", + "parameters": [], + "responses": { + "200": { + "description": "Get SECRET_KEY for Remnawave Node", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetPubKeyResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get SECRET_KEY for Remnawave Node", + "tags": [ + "Keygen Controller" + ] + } + }, + "/api/nodes/tags": { + "get": { + "operationId": "NodesController_getAllNodesTags", + "parameters": [], + "responses": { + "200": { + "description": "Nodes tags fetched", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAllNodesTagsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all existing nodes tags", + "tags": [ + "Nodes Controller" + ] + } + }, + "/api/nodes": { + "post": { + "operationId": "NodesController_createNode", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateNodeRequestDto" + } + } + } + }, + "responses": { + "201": { + "description": "Node created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateNodeResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Create a new node", + "tags": [ + "Nodes Controller" + ] + }, + "get": { + "operationId": "NodesController_getAllNodes", + "parameters": [], + "responses": { + "200": { + "description": "Nodes fetched", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAllNodesResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all nodes", + "tags": [ + "Nodes Controller" + ] + }, + "patch": { + "operationId": "NodesController_updateNode", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateNodeRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Node updated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateNodeResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update node", + "tags": [ + "Nodes Controller" + ] + } + }, + "/api/nodes/{uuid}": { + "get": { + "operationId": "NodesController_getOneNode", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "Node UUID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Node fetched", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetOneNodeResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get node by UUID", + "tags": [ + "Nodes Controller" + ] + }, + "delete": { + "operationId": "NodesController_deleteNode", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "Node UUID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Node deleted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteNodeResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete a node", + "tags": [ + "Nodes Controller" + ] + } + }, + "/api/nodes/{uuid}/actions/enable": { + "post": { + "operationId": "NodesController_enableNode", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "Node UUID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Node enabled", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnableNodeResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Enable a node", + "tags": [ + "Nodes Controller" + ] + } + }, + "/api/nodes/{uuid}/actions/disable": { + "post": { + "operationId": "NodesController_disableNode", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "Node UUID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Node disabled", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DisableNodeResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Disable a node", + "tags": [ + "Nodes Controller" + ] + } + }, + "/api/nodes/{uuid}/actions/restart": { + "post": { + "operationId": "NodesController_restartNode", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "Node UUID", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestartNodeRequestBodyDto" + } + } + } + }, + "responses": { + "200": { + "description": "Node restarted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestartNodeResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Restart node", + "tags": [ + "Nodes Controller" + ] + } + }, + "/api/nodes/{uuid}/actions/reset-traffic": { + "post": { + "operationId": "NodesController_resetNodeTraffic", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "Node UUID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Event sent", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResetNodeTrafficResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Reset Node Traffic", + "tags": [ + "Nodes Controller" + ] + } + }, + "/api/nodes/actions/restart-all": { + "post": { + "operationId": "NodesController_restartAllNodes", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestartAllNodesRequestBodyDto" + } + } + } + }, + "responses": { + "200": { + "description": "All nodes restarted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestartAllNodesResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Restart all nodes", + "tags": [ + "Nodes Controller" + ] + } + }, + "/api/nodes/actions/reorder": { + "post": { + "operationId": "NodesController_reorderNodes", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReorderNodeRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Nodes reordered successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReorderNodeResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Reorder nodes", + "tags": [ + "Nodes Controller" + ] + } + }, + "/api/nodes/bulk-actions/profile-modification": { + "post": { + "operationId": "NodesController_profileModification", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProfileModificationRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Event sent successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProfileModificationResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Modify Inbounds & Profile for many nodes", + "tags": [ + "Nodes Controller" + ] + } + }, + "/api/nodes/bulk-actions": { + "post": { + "operationId": "NodesController_bulkNodesActions", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkNodesActionsRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Event sent successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkNodesActionsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Perform actions for many nodes", + "tags": [ + "Nodes Controller" + ] + } + }, + "/api/nodes/bulk-actions/update": { + "post": { + "operationId": "NodesController_bulkNodesUpdate", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkNodesUpdateRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Event sent successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkNodesUpdateResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update many nodes", + "tags": [ + "Nodes Controller" + ] + } + }, + "/api/node-plugins/torrent-blocker": { + "get": { + "operationId": "TorrentBlockerReportsController_getTorrentBlockerReports", + "parameters": [ + { + "name": "size", + "required": false, + "in": "query", + "description": "Page size for pagination", + "schema": { + "type": "number" + } + }, + { + "name": "start", + "required": false, + "in": "query", + "description": "Offset for pagination", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "Torrent blocker reports fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTorrentBlockerReportsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Torrent Blocker Reports", + "tags": [ + "Node Plugins Controller" + ] + } + }, + "/api/node-plugins/torrent-blocker/stats": { + "get": { + "operationId": "TorrentBlockerReportsController_getTorrentBlockerReportsStats", + "parameters": [], + "responses": { + "200": { + "description": "Torrent blocker reports stats fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTorrentBlockerReportsStatsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Torrent Blocker Reports Stats", + "tags": [ + "Node Plugins Controller" + ] + } + }, + "/api/node-plugins/torrent-blocker/truncate": { + "delete": { + "operationId": "TorrentBlockerReportsController_truncateTorrentBlockerReports", + "parameters": [], + "responses": { + "200": { + "description": "Torrent blocker reports truncated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TruncateTorrentBlockerReportsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Truncate Torrent Blocker Reports", + "tags": [ + "Node Plugins Controller" + ] + } + }, + "/api/node-plugins": { + "get": { + "operationId": "NodePluginController_getAllConfigs", + "parameters": [], + "responses": { + "200": { + "description": "Node plugins retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetNodePluginsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all Node Plugins", + "tags": [ + "Node Plugins Controller" + ] + }, + "patch": { + "operationId": "NodePluginController_updateConfig", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateNodePluginRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Node plugin updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateNodePluginResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update Node Plugin", + "tags": [ + "Node Plugins Controller" + ] + }, + "post": { + "operationId": "NodePluginController_createConfig", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateNodePluginRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Node plugin created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateNodePluginResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Create Node Plugin", + "tags": [ + "Node Plugins Controller" + ] + } + }, + "/api/node-plugins/{uuid}": { + "get": { + "operationId": "NodePluginController_getConfigByUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "Node plugin UUID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Node plugin retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetNodePluginResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Node Plugin by uuid", + "tags": [ + "Node Plugins Controller" + ] + }, + "delete": { + "operationId": "NodePluginController_deleteConfig", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "Node plugin UUID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Node plugin deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteNodePluginResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete Node Plugin", + "tags": [ + "Node Plugins Controller" + ] + } + }, + "/api/node-plugins/actions/reorder": { + "post": { + "operationId": "NodePluginController_reorderNodePlugins", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReorderNodePluginsRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Node plugins reordered successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReorderNodePluginsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Reorder Node Plugins", + "tags": [ + "Node Plugins Controller" + ] + } + }, + "/api/node-plugins/actions/clone": { + "post": { + "operationId": "NodePluginController_cloneNodePlugin", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CloneNodePluginRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Node plugin cloned successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CloneNodePluginResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Clone Node Plugin", + "tags": [ + "Node Plugins Controller" + ] + } + }, + "/api/node-plugins/executor": { + "post": { + "operationId": "NodePluginController_pluginExecutor", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PluginExecutorRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Node plugin cloned successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PluginExecutorResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Execute command on node plugins", + "tags": [ + "Node Plugins Controller" + ] + } + }, + "/api/hosts/tags": { + "get": { + "operationId": "HostsController_getAllHostTags", + "parameters": [], + "responses": { + "200": { + "description": "Host tags fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAllHostTagsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all existing host tags", + "tags": [ + "Hosts Controller" + ] + } + }, + "/api/hosts": { + "post": { + "operationId": "HostsController_createHost", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateHostRequestDto" + } + } + } + }, + "responses": { + "201": { + "description": "Host created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateHostResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Create a new host", + "tags": [ + "Hosts Controller" + ] + }, + "patch": { + "operationId": "HostsController_updateHost", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateHostRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Host updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateHostResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update a host", + "tags": [ + "Hosts Controller" + ] + }, + "get": { + "operationId": "HostsController_getAllHosts", + "parameters": [], + "responses": { + "200": { + "description": "Hosts fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAllHostsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all hosts", + "tags": [ + "Hosts Controller" + ] + } + }, + "/api/hosts/{uuid}": { + "get": { + "operationId": "HostsController_getOneHost", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the host", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Host fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetOneHostResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get a host by UUID", + "tags": [ + "Hosts Controller" + ] + }, + "delete": { + "operationId": "HostsController_deleteHost", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the host", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Host deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteHostResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "Host not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete a host by UUID", + "tags": [ + "Hosts Controller" + ] + } + }, + "/api/hosts/actions/reorder": { + "post": { + "operationId": "HostsController_reorderHosts", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReorderHostRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Hosts reordered successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReorderHostResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Reorder hosts", + "tags": [ + "Hosts Controller" + ] + } + }, + "/api/hosts/bulk/delete": { + "post": { + "operationId": "HostsBulkActionsController_deleteHosts", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkDeleteHostsRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Hosts deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkDeleteHostsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete hosts by UUIDs", + "tags": [ + "Hosts Bulk Actions Controller" + ] + } + }, + "/api/hosts/bulk/disable": { + "post": { + "operationId": "HostsBulkActionsController_disableHosts", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkDisableHostsRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Hosts disabled successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkDisableHostsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Disable hosts by UUIDs", + "tags": [ + "Hosts Bulk Actions Controller" + ] + } + }, + "/api/hosts/bulk/enable": { + "post": { + "operationId": "HostsBulkActionsController_enableHosts", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkEnableHostsRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Hosts enabled successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkEnableHostsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Enable hosts by UUIDs", + "tags": [ + "Hosts Bulk Actions Controller" + ] + } + }, + "/api/hosts/bulk/update": { + "patch": { + "operationId": "HostsBulkActionsController_setPortToHosts", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateManyHostsRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Hosts updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateManyHostsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update many hosts", + "tags": [ + "Hosts Bulk Actions Controller" + ] + } + }, + "/api/bandwidth-stats/nodes/{uuid}/users/legacy": { + "get": { + "operationId": "BandwidthStatsNodesController_getNodeUserUsage", + "parameters": [ + { + "name": "start", + "required": true, + "in": "query", + "description": "Start date", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "end", + "required": true, + "in": "query", + "description": "End date", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the node", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Nodes users usage by range (legacy) fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetLegacyStatsNodesUsersUsageResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Node User Usage by Range and Node UUID (Legacy)", + "tags": [ + "Bandwidth Stats Controller" + ] + } + }, + "/api/bandwidth-stats/nodes/{uuid}/users": { + "get": { + "operationId": "BandwidthStatsNodesController_getStatsNodeUsersUsage", + "parameters": [ + { + "name": "topUsersLimit", + "required": true, + "in": "query", + "description": "Limit of top users to return", + "schema": { + "type": "number" + } + }, + { + "name": "start", + "required": true, + "in": "query", + "description": "Start date (YYYY-MM-DD)", + "schema": { + "format": "date", + "example": "2026-01-31", + "type": "string" + } + }, + { + "name": "end", + "required": true, + "in": "query", + "description": "End date (YYYY-MM-DD)", + "schema": { + "format": "date", + "example": "2026-01-01", + "type": "string" + } + }, + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the node", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Stats node users usage fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetStatsNodeUsersUsageResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Node Users Usage by Node UUID", + "tags": [ + "Bandwidth Stats Controller" + ] + } + }, + "/api/bandwidth-stats/nodes/users": { + "post": { + "operationId": "BandwidthStatsNodesController_getStatsNodesUsersUsage", + "parameters": [ + { + "name": "topUsersLimit", + "required": true, + "in": "query", + "description": "Limit of top users to return", + "schema": { + "type": "number" + } + }, + { + "name": "start", + "required": true, + "in": "query", + "description": "Start date (YYYY-MM-DD)", + "schema": { + "format": "date", + "example": "2026-01-31", + "type": "string" + } + }, + { + "name": "end", + "required": true, + "in": "query", + "description": "End date (YYYY-MM-DD)", + "schema": { + "format": "date", + "example": "2026-01-01", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetStatsNodesUsersUsageRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Stats node users usage fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetStatsNodesUsersUsageResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Nodes Users Usage by Nodes UUIDs", + "tags": [ + "Bandwidth Stats Controller" + ] + } + }, + "/api/bandwidth-stats/users/{uuid}/legacy": { + "get": { + "operationId": "BandwidthStatsUsersController_getUserUsageByRange", + "parameters": [ + { + "name": "start", + "required": true, + "in": "query", + "description": "Start date", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "end", + "required": true, + "in": "query", + "description": "End date", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User usage by range (legacy) fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetLegacyStatsUserUsageResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "User not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get User Usage by Range (Legacy)", + "tags": [ + "Bandwidth Stats Controller" + ] + } + }, + "/api/bandwidth-stats/users/{uuid}": { + "get": { + "operationId": "BandwidthStatsUsersController_getStatsNodesUsage", + "parameters": [ + { + "name": "topNodesLimit", + "required": true, + "in": "query", + "description": "Limit of top nodes to return", + "schema": { + "type": "number" + } + }, + { + "name": "start", + "required": true, + "in": "query", + "description": "Start date (YYYY-MM-DD)", + "schema": { + "format": "date", + "example": "2026-01-31", + "type": "string" + } + }, + { + "name": "end", + "required": true, + "in": "query", + "description": "End date (YYYY-MM-DD)", + "schema": { + "format": "date", + "example": "2026-01-01", + "type": "string" + } + }, + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Stats user usage fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetStatsUserUsageResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get User Usage by Range", + "tags": [ + "Bandwidth Stats Controller" + ] + } + }, + "/api/hwid/devices": { + "get": { + "operationId": "HwidUserDevicesController_getAllUsers", + "parameters": [ + { + "name": "size", + "required": false, + "in": "query", + "description": "Page size for pagination", + "schema": { + "type": "number" + } + }, + { + "name": "start", + "required": false, + "in": "query", + "description": "Offset for pagination", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "Hwid devices fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAllHwidDevicesResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all HWID devices", + "tags": [ + "HWID User Devices Controller" + ] + }, + "post": { + "operationId": "HwidUserDevicesController_createUserHwidDevice", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateUserHwidDeviceRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "User HWID device created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateUserHwidDeviceResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "One of requested resources not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Create a user HWID device", + "tags": [ + "HWID User Devices Controller" + ] + } + }, + "/api/hwid/devices/delete": { + "post": { + "operationId": "HwidUserDevicesController_deleteUserHwidDevice", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteUserHwidDeviceRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "User HWID device deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteUserHwidDeviceResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "One of requested resources not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete a user HWID device", + "tags": [ + "HWID User Devices Controller" + ] + } + }, + "/api/hwid/devices/delete-all": { + "post": { + "operationId": "HwidUserDevicesController_deleteAllUserHwidDevices", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteAllUserHwidDevicesRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "User HWID devices deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteAllUserHwidDevicesResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "One of requested resources not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete all user HWID devices", + "tags": [ + "HWID User Devices Controller" + ] + } + }, + "/api/hwid/devices/stats": { + "get": { + "operationId": "HwidUserDevicesController_getHwidDevicesStats", + "parameters": [], + "responses": { + "200": { + "description": "Hwid devices stats fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetHwidDevicesStatsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get HWID devices stats", + "tags": [ + "HWID User Devices Controller" + ] + } + }, + "/api/hwid/devices/top-users": { + "get": { + "operationId": "HwidUserDevicesController_getTopUsersByHwidDevices", + "parameters": [ + { + "name": "size", + "required": false, + "in": "query", + "description": "Page size for pagination", + "schema": { + "type": "number" + } + }, + { + "name": "start", + "required": false, + "in": "query", + "description": "Offset for pagination", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "Top users by HWID devices fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTopUsersByHwidDevicesResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get top users by HWID devices", + "tags": [ + "HWID User Devices Controller" + ] + } + }, + "/api/hwid/devices/{userUuid}": { + "get": { + "operationId": "HwidUserDevicesController_getUserHwidDevices", + "parameters": [ + { + "name": "userUuid", + "required": true, + "in": "path", + "description": "UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User HWID devices fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUserHwidDevicesResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "One of requested resources not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get user HWID devices", + "tags": [ + "HWID User Devices Controller" + ] + } + }, + "/api/bandwidth-stats/nodes": { + "get": { + "operationId": "NodesUsageHistoryController_getStatsNodesUsage", + "parameters": [ + { + "name": "topNodesLimit", + "required": true, + "in": "query", + "description": "Limit of top nodes to return", + "schema": { + "type": "number" + } + }, + { + "name": "start", + "required": true, + "in": "query", + "description": "Start date (YYYY-MM-DD)", + "schema": { + "format": "date", + "example": "2026-01-31", + "type": "string" + } + }, + { + "name": "end", + "required": true, + "in": "query", + "description": "End date (YYYY-MM-DD)", + "schema": { + "format": "date", + "example": "2026-01-01", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Stats nodes usage fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetStatsNodesUsageResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Nodes Usage by Range", + "tags": [ + "Bandwidth Stats Controller" + ] + } + }, + "/api/infra-billing/providers": { + "get": { + "operationId": "InfraBillingController_getInfraProviders", + "parameters": [], + "responses": { + "200": { + "description": "Infra providers retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetInfraProvidersResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all infra providers", + "tags": [ + "Infra Billing Controller" + ] + }, + "post": { + "operationId": "InfraBillingController_createInfraProvider", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateInfraProviderRequestDto" + } + } + } + }, + "responses": { + "201": { + "description": "Infra provider created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateInfraProviderResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Create infra provider", + "tags": [ + "Infra Billing Controller" + ] + }, + "patch": { + "operationId": "InfraBillingController_updateInfraProvider", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateInfraProviderRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Infra provider updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateInfraProviderResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update infra provider", + "tags": [ + "Infra Billing Controller" + ] + } + }, + "/api/infra-billing/providers/{uuid}": { + "get": { + "operationId": "InfraBillingController_getInfraProviderByUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Infra provider retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetInfraProviderByUuidResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "Infra provider not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get infra provider by uuid", + "tags": [ + "Infra Billing Controller" + ] + }, + "delete": { + "operationId": "InfraBillingController_deleteInfraProviderByUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Infra provider deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteInfraProviderByUuidResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete infra provider by uuid", + "tags": [ + "Infra Billing Controller" + ] + } + }, + "/api/infra-billing/history": { + "post": { + "operationId": "InfraBillingController_createInfraBillingHistoryRecord", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateInfraBillingHistoryRecordRequestDto" + } + } + } + }, + "responses": { + "201": { + "description": "Infra billing history record created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateInfraBillingHistoryRecordResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Create infra billing history", + "tags": [ + "Infra Billing Controller" + ] + }, + "get": { + "operationId": "InfraBillingController_getInfraBillingHistoryRecords", + "parameters": [], + "responses": { + "200": { + "description": "Infra billing history records retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetInfraBillingHistoryRecordsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get infra billing history", + "tags": [ + "Infra Billing Controller" + ] + } + }, + "/api/infra-billing/history/{uuid}": { + "delete": { + "operationId": "InfraBillingController_deleteInfraBillingHistoryRecordByUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Infra billing history record deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteInfraBillingHistoryRecordByUuidResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete infra billing history", + "tags": [ + "Infra Billing Controller" + ] + } + }, + "/api/infra-billing/nodes": { + "get": { + "operationId": "InfraBillingController_getBillingNodes", + "parameters": [], + "responses": { + "200": { + "description": "Infra billing nodes retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetInfraBillingNodesResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get infra billing nodes", + "tags": [ + "Infra Billing Controller" + ] + }, + "patch": { + "operationId": "InfraBillingController_updateInfraBillingNode", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateInfraBillingNodeRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Infra billing node updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateInfraBillingNodeResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update infra billing nodes", + "tags": [ + "Infra Billing Controller" + ] + }, + "post": { + "operationId": "InfraBillingController_createInfraBillingNode", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateInfraBillingNodeRequestDto" + } + } + } + }, + "responses": { + "201": { + "description": "Infra billing node created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateInfraBillingNodeResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Create infra billing node", + "tags": [ + "Infra Billing Controller" + ] + } + }, + "/api/infra-billing/nodes/{uuid}": { + "delete": { + "operationId": "InfraBillingController_deleteInfraBillingNodeByUuid", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Infra billing node deleted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteInfraBillingNodeByUuidResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Delete infra billing node", + "tags": [ + "Infra Billing Controller" + ] + } + }, + "/api/subscription-request-history": { + "get": { + "operationId": "UserSubscriptionRequestHistoryController_getSubscriptionRequestHistory", + "parameters": [ + { + "name": "size", + "required": false, + "in": "query", + "description": "Page size for pagination", + "schema": { + "type": "number" + } + }, + { + "name": "start", + "required": false, + "in": "query", + "description": "Offset for pagination", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "Subscription request history fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSubscriptionRequestHistoryResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get all subscription request history", + "tags": [ + "Subscription Request History Controller" + ] + } + }, + "/api/subscription-request-history/stats": { + "get": { + "operationId": "UserSubscriptionRequestHistoryController_getSubscriptionRequestHistoryStats", + "parameters": [], + "responses": { + "200": { + "description": "User subscription request history stats fetched successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSubscriptionRequestHistoryStatsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get subscription request history stats", + "tags": [ + "Subscription Request History Controller" + ] + } + }, + "/api/system/metadata": { + "get": { + "operationId": "SystemController_getMetadata", + "parameters": [], + "responses": { + "200": { + "description": "Returns system metadata", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetMetadataResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Remnawave Information", + "tags": [ + "System Controller" + ] + } + }, + "/api/system/stats": { + "get": { + "operationId": "SystemController_getStats", + "parameters": [], + "responses": { + "200": { + "description": "Returns system statistics", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetStatsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Stats", + "tags": [ + "System Controller" + ] + } + }, + "/api/system/stats/bandwidth": { + "get": { + "operationId": "SystemController_getBandwidthStats", + "parameters": [], + "responses": { + "200": { + "description": "Returns bandwidth statistics", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetBandwidthStatsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Bandwidth Stats", + "tags": [ + "System Controller" + ] + } + }, + "/api/system/stats/nodes": { + "get": { + "operationId": "SystemController_getNodesStatistics", + "parameters": [], + "responses": { + "200": { + "description": "Returns nodes statistics", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetNodesStatisticsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Nodes Statistics", + "tags": [ + "System Controller" + ] + } + }, + "/api/system/health": { + "get": { + "operationId": "SystemController_getRemnawaveHealth", + "parameters": [], + "responses": { + "200": { + "description": "Returns Remnawave health", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetRemnawaveHealthResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Remnawave Health", + "tags": [ + "System Controller" + ] + } + }, + "/api/system/nodes/metrics": { + "get": { + "operationId": "SystemController_getNodesMetrics", + "parameters": [], + "responses": { + "200": { + "description": "Returns nodes metrics from Prometheus metrics endpoint", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetNodesMetricsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Nodes Metrics", + "tags": [ + "System Controller" + ] + } + }, + "/api/system/tools/x25519/generate": { + "get": { + "operationId": "SystemController_getX25519Keypairs", + "parameters": [], + "responses": { + "200": { + "description": "Returns x25519 keypairs", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateX25519ResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Generate 30 X25519 keypairs", + "tags": [ + "System Controller" + ] + } + }, + "/api/system/testers/srr-matcher": { + "post": { + "operationId": "SystemController_debugSrrMatcher", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DebugSrrMatcherRequestDto" + } + } + } + }, + "responses": { + "201": { + "description": "Debug SRR matcher information", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DebugSrrMatcherResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Test SRR Matcher", + "tags": [ + "System Controller" + ] + } + }, + "/api/system/stats/recap": { + "get": { + "operationId": "SystemController_getRecap", + "parameters": [], + "responses": { + "200": { + "description": "Returns system recap", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetRecapResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Recap", + "tags": [ + "System Controller" + ] + } + }, + "/api/subscription-settings": { + "get": { + "operationId": "SubscriptionSettingsController_getSettings", + "parameters": [], + "responses": { + "200": { + "description": "Subscription settings retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSubscriptionSettingsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get subscription settings", + "tags": [ + "Subscription Settings Controller" + ] + }, + "patch": { + "operationId": "SubscriptionSettingsController_updateSettings", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSubscriptionSettingsRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Subscription settings updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSubscriptionSettingsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update subscription settings", + "tags": [ + "Subscription Settings Controller" + ] + } + }, + "/api/ip-control/fetch-ips/{uuid}": { + "post": { + "operationId": "IpControlController_fetchUserIps", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Return jobId for further processing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchIpsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "User not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Request IP List for User", + "tags": [ + "IP Management Controller" + ] + } + }, + "/api/ip-control/fetch-ips/result/{jobId}": { + "get": { + "operationId": "IpControlController_getFetchIpsResult", + "parameters": [ + { + "name": "jobId", + "required": true, + "in": "path", + "description": "Job ID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Return result or status of the job", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchIpsResultResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "Job not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get IP List Result by Job ID", + "tags": [ + "IP Management Controller" + ] + } + }, + "/api/ip-control/drop-connections": { + "post": { + "operationId": "IpControlController_dropConnections", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DropConnectionsRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Event sent to background executor", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DropConnectionsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "User not found // Connected nodes not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Drop Connections for Users or IPs", + "tags": [ + "IP Management Controller" + ] + } + }, + "/api/ip-control/fetch-users-ips/{nodeUuid}": { + "post": { + "operationId": "IpControlController_fetchUsersIps", + "parameters": [ + { + "name": "nodeUuid", + "required": true, + "in": "path", + "description": "UUID of the node", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Return jobId for further processing", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchUsersIpsResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "Node not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Request Users IPs List for Node", + "tags": [ + "IP Management Controller" + ] + } + }, + "/api/ip-control/fetch-users-ips/result/{jobId}": { + "get": { + "operationId": "IpControlController_getFetchUsersIpsResult", + "parameters": [ + { + "name": "jobId", + "required": true, + "in": "path", + "description": "Job ID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Return result or status of the job", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchUsersIpsResultResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "Job not found" + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get Users IPs List Result by Job ID", + "tags": [ + "IP Management Controller" + ] + } + }, + "/api/metadata/user/{uuid}": { + "get": { + "operationId": "MetadataController_getUserMetadata", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the user", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User Metadata retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUserMetadataResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "User or Metadata not found (see errorCode for more details)", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "example": { + "timestamp": "omitted", + "path": "omitted", + "message": "User not found", + "errorCode": "A025" + }, + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string", + "enum": [ + "A025" + ] + } + } + }, + { + "example": { + "timestamp": "omitted", + "path": "omitted", + "message": "Metadata not found", + "errorCode": "A226" + }, + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string", + "enum": [ + "A226" + ] + } + } + } + ] + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get user metadata", + "tags": [ + "Metadata Controller" + ] + }, + "put": { + "operationId": "MetadataController_upsertUserMetadata", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the user", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpsertUserMetadataRequestBodyDto" + } + } + } + }, + "responses": { + "200": { + "description": "User Metadata upserted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpsertUserMetadataResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "User not found (see errorCode for more details)", + "content": { + "application/json": { + "schema": { + "example": { + "timestamp": "omitted", + "path": "omitted", + "message": "User not found", + "errorCode": "A025" + }, + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string", + "enum": [ + "A025" + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update or create User Metadata", + "tags": [ + "Metadata Controller" + ] + } + }, + "/api/metadata/node/{uuid}": { + "get": { + "operationId": "MetadataController_getNodeMetadata", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the node", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Node Metadata retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetNodeMetadataResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "Node or Metadata not found (see errorCode for more details)", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "example": { + "timestamp": "omitted", + "path": "omitted", + "message": "Node not found", + "errorCode": "A011" + }, + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string", + "enum": [ + "A011" + ] + } + } + }, + { + "example": { + "timestamp": "omitted", + "path": "omitted", + "message": "Metadata not found", + "errorCode": "A226" + }, + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string", + "enum": [ + "A226" + ] + } + } + } + ] + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Get node metadata", + "tags": [ + "Metadata Controller" + ] + }, + "put": { + "operationId": "MetadataController_upsertNodeMetadata", + "parameters": [ + { + "name": "uuid", + "required": true, + "in": "path", + "description": "UUID of the node", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpsertNodeMetadataRequestBodyDto" + } + } + } + }, + "responses": { + "200": { + "description": "Node Metadata upserted successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpsertNodeMetadataResponseDto" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number", + "example": 400 + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "validation": { + "type": "string", + "example": "uuid" + }, + "code": { + "type": "string", + "example": "invalid_string" + }, + "message": { + "type": "string", + "example": "Invalid uuid" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "uuid" + ] + } + }, + "required": [ + "validation", + "code", + "message", + "path" + ] + }, + "example": [ + { + "validation": "uuid", + "code": "invalid_string", + "message": "Invalid uuid", + "path": [ + "uuid" + ] + } + ] + } + } + } + } + } + }, + "404": { + "description": "Node not found (see errorCode for more details)", + "content": { + "application/json": { + "schema": { + "example": { + "timestamp": "omitted", + "path": "omitted", + "message": "Node not found", + "errorCode": "A011" + }, + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string", + "enum": [ + "A011" + ] + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "string" + }, + "path": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errorCode": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "Authorization": [] + } + ], + "summary": "Update or create Node Metadata", + "tags": [ + "Metadata Controller" + ] + } + } + }, + "info": { + "title": "Remnawave API v2.8.0", + "description": "\nRemnawave is a powerful proxy managment tool, built on top of Xray-core, with a focus on simplicity and ease of use.\n\n## Resources\n* https://t.me/remnawave\n* https://github.com/remnawave\n* https://docs.rw\n", + "version": "2.8.0", + "contact": {}, + "license": { + "name": "AGPL-3.0", + "url": "https://github.com/remnawave/panel?tab=AGPL-3.0-1-ov-file" + } + }, + "tags": [ + { + "name": "Auth Controller", + "description": "Used to authenticate admin users." + }, + { + "name": "Passkeys Controller", + "description": "Management of Passkeys." + }, + { + "name": "API Tokens Controller", + "description": "Manage API tokens to use in your code. This controller can't be used with API token, only with Admin JWT token" + }, + { + "name": "Users Controller", + "description": "Manage users, change their status, reset traffic, etc." + }, + { + "name": "Users Bulk Actions Controller", + "description": "Bulk actions with users." + }, + { + "name": "HWID User Devices Controller", + "description": "" + }, + { + "name": "[Public] Subscription Controller", + "description": "Public Subscription Controller. Methods of this controller are not protected with auth. Use it only for public requests." + }, + { + "name": "[Protected] Subscriptions Controller", + "description": "Methods of this controller are protected with auth, most of them is returning the same informations as public Subscription Controller." + }, + { + "name": "Nodes Controller", + "description": "" + }, + { + "name": "Node Plugins Controller", + "description": "" + }, + { + "name": "Bandwidth Stats Controller", + "description": "" + }, + { + "name": "IP Management Controller", + "description": "Management of IP addresses and connections." + }, + { + "name": "Config Profiles Controller", + "description": "Management of Config Profiles." + }, + { + "name": "Internal Squads Controller", + "description": "Management of Internal Squads." + }, + { + "name": "External Squads Controller", + "description": "Management of External Squads." + }, + { + "name": "Hosts Controller", + "description": "" + }, + { + "name": "Hosts Bulk Actions Controller", + "description": "" + }, + { + "name": "Subscription Template Controller", + "description": "" + }, + { + "name": "Subscription Settings Controller", + "description": "" + }, + { + "name": "Infra Billing Controller", + "description": "" + }, + { + "name": "System Controller", + "description": "" + }, + { + "name": "Keygen Controller", + "description": "Generation of SECRET_KEY for Remnawave Node." + }, + { + "name": "Subscription Request History Controller", + "description": "" + }, + { + "name": "Snippets Controller", + "description": "" + }, + { + "name": "Remnawave Settings Controller", + "description": "" + }, + { + "name": "Subscription Page Configs Controller", + "description": "" + }, + { + "name": "Metadata Controller", + "description": "Manage arbitrary metadata for Users and Nodes." + } + ], + "servers": [], + "components": { + "securitySchemes": { + "Authorization": { + "scheme": "bearer", + "bearerFormat": "JWT", + "type": "http", + "name": "Authorization", + "description": "JWT obtained login." + }, + "Prometheus": { + "type": "http", + "scheme": "basic", + "name": "Prometheus", + "description": "Prometheus Basic Auth" + } + }, + "schemas": { + "GetRemnawaveSettingsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "passkeySettings": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "rpId": { + "type": "string", + "nullable": true + }, + "origin": { + "type": "string", + "nullable": true + } + }, + "required": [ + "enabled", + "rpId", + "origin" + ], + "nullable": true + }, + "oauth2Settings": { + "type": "object", + "properties": { + "github": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "clientId": { + "type": "string", + "nullable": true + }, + "clientSecret": { + "type": "string", + "nullable": true + }, + "allowedEmails": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "enabled", + "clientId", + "clientSecret", + "allowedEmails" + ] + }, + "pocketid": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "clientId": { + "type": "string", + "nullable": true + }, + "clientSecret": { + "type": "string", + "nullable": true + }, + "plainDomain": { + "type": "string", + "nullable": true + }, + "allowedEmails": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "enabled", + "clientId", + "clientSecret", + "plainDomain", + "allowedEmails" + ] + }, + "yandex": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "clientId": { + "type": "string", + "nullable": true + }, + "clientSecret": { + "type": "string", + "nullable": true + }, + "allowedEmails": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "enabled", + "clientId", + "clientSecret", + "allowedEmails" + ] + }, + "keycloak": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "realm": { + "type": "string", + "nullable": true + }, + "clientId": { + "type": "string", + "nullable": true + }, + "clientSecret": { + "type": "string", + "nullable": true + }, + "frontendDomain": { + "type": "string", + "nullable": true + }, + "keycloakDomain": { + "type": "string", + "nullable": true + }, + "allowedEmails": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "enabled", + "realm", + "clientId", + "clientSecret", + "frontendDomain", + "keycloakDomain", + "allowedEmails" + ], + "default": { + "enabled": false, + "realm": null, + "frontendDomain": null, + "keycloakDomain": null, + "clientId": null, + "clientSecret": null, + "allowedEmails": [] + } + }, + "generic": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "clientId": { + "type": "string", + "nullable": true + }, + "clientSecret": { + "type": "string", + "nullable": true + }, + "withPkce": { + "type": "boolean" + }, + "authorizationUrl": { + "type": "string", + "nullable": true + }, + "tokenUrl": { + "type": "string", + "nullable": true + }, + "frontendDomain": { + "type": "string", + "nullable": true + }, + "allowedEmails": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "enabled", + "clientId", + "clientSecret", + "withPkce", + "authorizationUrl", + "tokenUrl", + "frontendDomain", + "allowedEmails" + ], + "default": { + "enabled": false, + "frontendDomain": null, + "tokenUrl": null, + "clientId": null, + "clientSecret": null, + "withPkce": false, + "authorizationUrl": null, + "allowedEmails": [] + } + }, + "telegram": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "clientId": { + "type": "string", + "nullable": true + }, + "clientSecret": { + "type": "string", + "nullable": true + }, + "allowedIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "frontendDomain": { + "type": "string", + "nullable": true + } + }, + "required": [ + "enabled", + "clientId", + "clientSecret", + "allowedIds", + "frontendDomain" + ], + "default": { + "enabled": false, + "clientId": null, + "clientSecret": null, + "allowedIds": [], + "frontendDomain": null + } + } + }, + "required": [ + "github", + "pocketid", + "yandex" + ], + "nullable": true + }, + "passwordSettings": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "nullable": true + }, + "brandingSettings": { + "type": "object", + "properties": { + "title": { + "type": "string", + "nullable": true + }, + "logoUrl": { + "type": "string", + "format": "uri", + "nullable": true + } + }, + "required": [ + "title", + "logoUrl" + ], + "nullable": true + } + }, + "required": [ + "passkeySettings", + "oauth2Settings", + "passwordSettings", + "brandingSettings" + ] + } + }, + "required": [ + "response" + ] + }, + "UpdateRemnawaveSettingsRequestDto": { + "type": "object", + "properties": { + "passkeySettings": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "rpId": { + "type": "string", + "nullable": true + }, + "origin": { + "type": "string", + "nullable": true + } + }, + "required": [ + "enabled", + "rpId", + "origin" + ] + }, + "oauth2Settings": { + "type": "object", + "properties": { + "github": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "clientId": { + "type": "string", + "nullable": true + }, + "clientSecret": { + "type": "string", + "nullable": true + }, + "allowedEmails": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "enabled", + "clientId", + "clientSecret", + "allowedEmails" + ] + }, + "pocketid": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "clientId": { + "type": "string", + "nullable": true + }, + "clientSecret": { + "type": "string", + "nullable": true + }, + "plainDomain": { + "type": "string", + "nullable": true + }, + "allowedEmails": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "enabled", + "clientId", + "clientSecret", + "plainDomain", + "allowedEmails" + ] + }, + "yandex": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "clientId": { + "type": "string", + "nullable": true + }, + "clientSecret": { + "type": "string", + "nullable": true + }, + "allowedEmails": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "enabled", + "clientId", + "clientSecret", + "allowedEmails" + ] + }, + "keycloak": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "realm": { + "type": "string", + "nullable": true + }, + "clientId": { + "type": "string", + "nullable": true + }, + "clientSecret": { + "type": "string", + "nullable": true + }, + "frontendDomain": { + "type": "string", + "nullable": true + }, + "keycloakDomain": { + "type": "string", + "nullable": true + }, + "allowedEmails": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "enabled", + "realm", + "clientId", + "clientSecret", + "frontendDomain", + "keycloakDomain", + "allowedEmails" + ], + "default": { + "enabled": false, + "realm": null, + "frontendDomain": null, + "keycloakDomain": null, + "clientId": null, + "clientSecret": null, + "allowedEmails": [] + } + }, + "generic": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "clientId": { + "type": "string", + "nullable": true + }, + "clientSecret": { + "type": "string", + "nullable": true + }, + "withPkce": { + "type": "boolean" + }, + "authorizationUrl": { + "type": "string", + "nullable": true + }, + "tokenUrl": { + "type": "string", + "nullable": true + }, + "frontendDomain": { + "type": "string", + "nullable": true + }, + "allowedEmails": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "enabled", + "clientId", + "clientSecret", + "withPkce", + "authorizationUrl", + "tokenUrl", + "frontendDomain", + "allowedEmails" + ], + "default": { + "enabled": false, + "frontendDomain": null, + "tokenUrl": null, + "clientId": null, + "clientSecret": null, + "withPkce": false, + "authorizationUrl": null, + "allowedEmails": [] + } + }, + "telegram": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "clientId": { + "type": "string", + "nullable": true + }, + "clientSecret": { + "type": "string", + "nullable": true + }, + "allowedIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "frontendDomain": { + "type": "string", + "nullable": true + } + }, + "required": [ + "enabled", + "clientId", + "clientSecret", + "allowedIds", + "frontendDomain" + ], + "default": { + "enabled": false, + "clientId": null, + "clientSecret": null, + "allowedIds": [], + "frontendDomain": null + } + } + }, + "required": [ + "github", + "pocketid", + "yandex" + ] + }, + "passwordSettings": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ] + }, + "brandingSettings": { + "type": "object", + "properties": { + "title": { + "type": "string", + "nullable": true + }, + "logoUrl": { + "type": "string", + "format": "uri", + "nullable": true + } + }, + "required": [ + "title", + "logoUrl" + ] + } + } + }, + "UpdateRemnawaveSettingsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "passkeySettings": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "rpId": { + "type": "string", + "nullable": true + }, + "origin": { + "type": "string", + "nullable": true + } + }, + "required": [ + "enabled", + "rpId", + "origin" + ], + "nullable": true + }, + "oauth2Settings": { + "type": "object", + "properties": { + "github": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "clientId": { + "type": "string", + "nullable": true + }, + "clientSecret": { + "type": "string", + "nullable": true + }, + "allowedEmails": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "enabled", + "clientId", + "clientSecret", + "allowedEmails" + ] + }, + "pocketid": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "clientId": { + "type": "string", + "nullable": true + }, + "clientSecret": { + "type": "string", + "nullable": true + }, + "plainDomain": { + "type": "string", + "nullable": true + }, + "allowedEmails": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "enabled", + "clientId", + "clientSecret", + "plainDomain", + "allowedEmails" + ] + }, + "yandex": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "clientId": { + "type": "string", + "nullable": true + }, + "clientSecret": { + "type": "string", + "nullable": true + }, + "allowedEmails": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "enabled", + "clientId", + "clientSecret", + "allowedEmails" + ] + }, + "keycloak": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "realm": { + "type": "string", + "nullable": true + }, + "clientId": { + "type": "string", + "nullable": true + }, + "clientSecret": { + "type": "string", + "nullable": true + }, + "frontendDomain": { + "type": "string", + "nullable": true + }, + "keycloakDomain": { + "type": "string", + "nullable": true + }, + "allowedEmails": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "enabled", + "realm", + "clientId", + "clientSecret", + "frontendDomain", + "keycloakDomain", + "allowedEmails" + ], + "default": { + "enabled": false, + "realm": null, + "frontendDomain": null, + "keycloakDomain": null, + "clientId": null, + "clientSecret": null, + "allowedEmails": [] + } + }, + "generic": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "clientId": { + "type": "string", + "nullable": true + }, + "clientSecret": { + "type": "string", + "nullable": true + }, + "withPkce": { + "type": "boolean" + }, + "authorizationUrl": { + "type": "string", + "nullable": true + }, + "tokenUrl": { + "type": "string", + "nullable": true + }, + "frontendDomain": { + "type": "string", + "nullable": true + }, + "allowedEmails": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "enabled", + "clientId", + "clientSecret", + "withPkce", + "authorizationUrl", + "tokenUrl", + "frontendDomain", + "allowedEmails" + ], + "default": { + "enabled": false, + "frontendDomain": null, + "tokenUrl": null, + "clientId": null, + "clientSecret": null, + "withPkce": false, + "authorizationUrl": null, + "allowedEmails": [] + } + }, + "telegram": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "clientId": { + "type": "string", + "nullable": true + }, + "clientSecret": { + "type": "string", + "nullable": true + }, + "allowedIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "frontendDomain": { + "type": "string", + "nullable": true + } + }, + "required": [ + "enabled", + "clientId", + "clientSecret", + "allowedIds", + "frontendDomain" + ], + "default": { + "enabled": false, + "clientId": null, + "clientSecret": null, + "allowedIds": [], + "frontendDomain": null + } + } + }, + "required": [ + "github", + "pocketid", + "yandex" + ], + "nullable": true + }, + "passwordSettings": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "nullable": true + }, + "brandingSettings": { + "type": "object", + "properties": { + "title": { + "type": "string", + "nullable": true + }, + "logoUrl": { + "type": "string", + "format": "uri", + "nullable": true + } + }, + "required": [ + "title", + "logoUrl" + ], + "nullable": true + } + }, + "required": [ + "passkeySettings", + "oauth2Settings", + "passwordSettings", + "brandingSettings" + ] + } + }, + "required": [ + "response" + ] + }, + "GetPasskeyRegistrationOptionsResponseDto": { + "type": "object", + "properties": { + "response": {} + }, + "required": [ + "response" + ] + }, + "VerifyPasskeyRegistrationRequestDto": { + "type": "object", + "properties": { + "response": {} + }, + "required": [ + "response" + ] + }, + "VerifyPasskeyRegistrationResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "verified": { + "type": "boolean" + } + }, + "required": [ + "verified" + ] + } + }, + "required": [ + "response" + ] + }, + "GetAllPasskeysResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "passkeys": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "createdAt": { + "description": "Created date. Format: 2025-01-17T15:38:45.065Z", + "type": "string", + "format": "date-time" + }, + "lastUsedAt": { + "description": "Last used date. Format: 2025-01-17T15:38:45.065Z", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "id", + "name", + "createdAt", + "lastUsedAt" + ] + } + } + }, + "required": [ + "passkeys" + ] + } + }, + "required": [ + "response" + ] + }, + "DeletePasskeyRequestDto": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + }, + "DeletePasskeyResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "passkeys": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "createdAt": { + "description": "Created date. Format: 2025-01-17T15:38:45.065Z", + "type": "string", + "format": "date-time" + }, + "lastUsedAt": { + "description": "Last used date. Format: 2025-01-17T15:38:45.065Z", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "id", + "name", + "createdAt", + "lastUsedAt" + ] + } + } + }, + "required": [ + "passkeys" + ] + } + }, + "required": [ + "response" + ] + }, + "UpdatePasskeyRequestDto": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string", + "minLength": 2, + "maxLength": 30, + "pattern": "^[A-Za-z0-9_\\s-]+$" + } + }, + "required": [ + "id", + "name" + ] + }, + "UpdatePasskeyResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "passkeys": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "createdAt": { + "description": "Created date. Format: 2025-01-17T15:38:45.065Z", + "type": "string", + "format": "date-time" + }, + "lastUsedAt": { + "description": "Last used date. Format: 2025-01-17T15:38:45.065Z", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "id", + "name", + "createdAt", + "lastUsedAt" + ] + } + } + }, + "required": [ + "passkeys" + ] + } + }, + "required": [ + "response" + ] + }, + "LoginRequestDto": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "required": [ + "username", + "password" + ] + }, + "LoginResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "accessToken": { + "type": "string" + } + }, + "required": [ + "accessToken" + ] + } + }, + "required": [ + "response" + ] + }, + "RegisterRequestDto": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string", + "minLength": 24, + "pattern": "^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9]).{24,}$" + } + }, + "required": [ + "username", + "password" + ] + }, + "RegisterResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "accessToken": { + "type": "string" + } + }, + "required": [ + "accessToken" + ] + } + }, + "required": [ + "response" + ] + }, + "GetStatusResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "isLoginAllowed": { + "type": "boolean" + }, + "isRegisterAllowed": { + "type": "boolean" + }, + "authentication": { + "type": "object", + "properties": { + "passkey": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ] + }, + "oauth2": { + "type": "object", + "properties": { + "providers": { + "type": "object", + "additionalProperties": { + "type": "boolean" + } + } + }, + "required": [ + "providers" + ] + }, + "password": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ] + } + }, + "required": [ + "passkey", + "oauth2", + "password" + ], + "nullable": true + }, + "branding": { + "type": "object", + "properties": { + "title": { + "type": "string", + "nullable": true + }, + "logoUrl": { + "type": "string", + "nullable": true + } + }, + "required": [ + "title", + "logoUrl" + ] + } + }, + "required": [ + "isLoginAllowed", + "isRegisterAllowed", + "authentication", + "branding" + ] + } + }, + "required": [ + "response" + ] + }, + "OAuth2AuthorizeRequestDto": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "telegram", + "github", + "pocketid", + "yandex", + "keycloak", + "generic" + ], + "x-enumNames": [ + "TELEGRAM", + "GITHUB", + "POCKETID", + "YANDEX", + "KEYCLOAK", + "GENERIC" + ] + } + }, + "required": [ + "provider" + ] + }, + "OAuth2AuthorizeResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri", + "nullable": true + } + }, + "required": [ + "authorizationUrl" + ] + } + }, + "required": [ + "response" + ] + }, + "OAuth2CallbackRequestDto": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "telegram", + "github", + "pocketid", + "yandex", + "keycloak", + "generic" + ], + "x-enumNames": [ + "TELEGRAM", + "GITHUB", + "POCKETID", + "YANDEX", + "KEYCLOAK", + "GENERIC" + ] + }, + "code": { + "type": "string" + }, + "state": { + "type": "string" + } + }, + "required": [ + "provider", + "code", + "state" + ] + }, + "OAuth2CallbackResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "accessToken": { + "type": "string" + } + }, + "required": [ + "accessToken" + ] + } + }, + "required": [ + "response" + ] + }, + "GetPasskeyAuthenticationOptionsResponseDto": { + "type": "object", + "properties": { + "response": {} + }, + "required": [ + "response" + ] + }, + "VerifyPasskeyAuthenticationRequestDto": { + "type": "object", + "properties": { + "response": {} + }, + "required": [ + "response" + ] + }, + "VerifyPasskeyAuthenticationResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "accessToken": { + "type": "string" + } + }, + "required": [ + "accessToken" + ] + } + }, + "required": [ + "response" + ] + }, + "GetSubscriptionPageConfigsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "configs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "config": { + "nullable": true + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "config" + ] + } + } + }, + "required": [ + "total", + "configs" + ] + } + }, + "required": [ + "response" + ] + }, + "GetSubscriptionPageConfigResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "config": {} + }, + "required": [ + "uuid", + "viewPosition", + "name", + "config" + ] + } + }, + "required": [ + "response" + ] + }, + "UpdateSubscriptionPageConfigRequestDto": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string", + "minLength": 2, + "maxLength": 30, + "pattern": "^[A-Za-z0-9_\\s-]+$" + }, + "config": {} + }, + "required": [ + "uuid" + ] + }, + "UpdateSubscriptionPageConfigResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "config": {} + }, + "required": [ + "uuid", + "viewPosition", + "name", + "config" + ] + } + }, + "required": [ + "response" + ] + }, + "DeleteSubscriptionPageConfigResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "isDeleted": { + "type": "boolean" + } + }, + "required": [ + "isDeleted" + ] + } + }, + "required": [ + "response" + ] + }, + "CreateSubscriptionPageConfigRequestDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 2, + "maxLength": 30, + "pattern": "^[A-Za-z0-9_\\s-]+$" + } + }, + "required": [ + "name" + ] + }, + "CreateSubscriptionPageConfigResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "config": { + "nullable": true + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "config" + ] + } + }, + "required": [ + "response" + ] + }, + "ReorderSubscriptionPageConfigsRequestDto": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "viewPosition": { + "type": "integer" + }, + "uuid": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "viewPosition", + "uuid" + ] + } + } + }, + "required": [ + "items" + ] + }, + "ReorderSubscriptionPageConfigsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "configs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "config": { + "nullable": true + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "config" + ] + } + } + }, + "required": [ + "total", + "configs" + ] + } + }, + "required": [ + "response" + ] + }, + "CloneSubscriptionPageConfigRequestDto": { + "type": "object", + "properties": { + "cloneFromUuid": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "cloneFromUuid" + ] + }, + "CloneSubscriptionPageConfigResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "config": {} + }, + "required": [ + "uuid", + "viewPosition", + "name", + "config" + ] + } + }, + "required": [ + "response" + ] + }, + "CreateUserRequestDto": { + "type": "object", + "properties": { + "username": { + "description": "Unique username for the user. Required. Must be 3-36 characters long and contain only letters, numbers, underscores and dashes.", + "type": "string", + "pattern": "^[a-zA-Z0-9_-]+$", + "maxLength": 36, + "minLength": 3 + }, + "status": { + "description": "Optional. User account status. Defaults to ACTIVE.", + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "default": "ACTIVE" + }, + "shortUuid": { + "description": "Optional. Short UUID identifier for the user.", + "type": "string" + }, + "trojanPassword": { + "description": "Optional. Password for Trojan protocol. Must be 8-32 characters.", + "type": "string", + "minLength": 8, + "maxLength": 32 + }, + "vlessUuid": { + "description": "Optional. UUID for VLESS protocol. Must be a valid UUID format.", + "type": "string", + "format": "uuid" + }, + "ssPassword": { + "description": "Optional. Password for Shadowsocks protocol. Must be 8-32 characters.", + "type": "string", + "minLength": 8, + "maxLength": 32 + }, + "trafficLimitBytes": { + "description": "Optional. Traffic limit in bytes. Set to 0 for unlimited traffic.", + "type": "number", + "minimum": 0, + "exclusiveMinimum": false + }, + "trafficLimitStrategy": { + "description": "Available reset periods", + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "default": "NO_RESET" + }, + "expireAt": { + "description": "Account expiration date. Required. Format: 2025-01-17T15:38:45.065Z", + "type": "string", + "format": "date-time" + }, + "createdAt": { + "description": "Optional. Account creation date. Format: 2025-01-17T15:38:45.065Z", + "type": "string", + "format": "date-time" + }, + "lastTrafficResetAt": { + "description": "Optional. Date of last traffic reset. Format: 2025-01-17T15:38:45.065Z", + "type": "string", + "format": "date-time" + }, + "description": { + "description": "Optional. Additional notes or description for the user account.", + "type": "string" + }, + "tag": { + "description": "Optional. User tag for categorization. Max 16 characters, uppercase letters, numbers and underscores only.", + "type": "string", + "pattern": "^[A-Z0-9_]+$", + "maxLength": 16, + "nullable": true + }, + "telegramId": { + "description": "Optional. Telegram user ID for notifications. Must be an integer.", + "type": "integer", + "nullable": true + }, + "email": { + "description": "Optional. User email address. Must be a valid email format.", + "type": "string", + "format": "email", + "nullable": true + }, + "hwidDeviceLimit": { + "description": "Optional. Maximum number of hardware devices allowed. Must be a positive integer.", + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false + }, + "activeInternalSquads": { + "description": "Optional. Array of UUIDs representing enabled internal squads.", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "uuid": { + "description": "Optional. Pass UUID to create user with specific UUID, otherwise it will be generated automatically.", + "type": "string", + "format": "uuid" + }, + "externalSquadUuid": { + "description": "Optional. External squad UUID.", + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "username", + "expireAt" + ] + }, + "CreateUserResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "id": { + "type": "number" + }, + "shortUuid": { + "type": "string" + }, + "username": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "default": "ACTIVE" + }, + "trafficLimitBytes": { + "type": "number", + "default": 0 + }, + "trafficLimitStrategy": { + "description": "Available reset periods", + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "default": "NO_RESET" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "telegramId": { + "type": "integer", + "nullable": true + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tag": { + "type": "string", + "nullable": true + }, + "hwidDeviceLimit": { + "type": "integer", + "nullable": true + }, + "externalSquadUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "trojanPassword": { + "type": "string" + }, + "vlessUuid": { + "type": "string", + "format": "uuid" + }, + "ssPassword": { + "type": "string" + }, + "lastTriggeredThreshold": { + "type": "integer", + "default": 0 + }, + "subRevokedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastTrafficResetAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "subscriptionUrl": { + "type": "string" + }, + "activeInternalSquads": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "uuid", + "name" + ] + } + }, + "userTraffic": { + "type": "object", + "properties": { + "usedTrafficBytes": { + "type": "number" + }, + "lifetimeUsedTrafficBytes": { + "type": "number" + }, + "onlineAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "firstConnectedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastConnectedNodeUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "usedTrafficBytes", + "lifetimeUsedTrafficBytes", + "onlineAt", + "firstConnectedAt", + "lastConnectedNodeUuid" + ] + } + }, + "required": [ + "uuid", + "id", + "shortUuid", + "username", + "expireAt", + "telegramId", + "email", + "description", + "tag", + "hwidDeviceLimit", + "externalSquadUuid", + "trojanPassword", + "vlessUuid", + "ssPassword", + "subRevokedAt", + "lastTrafficResetAt", + "createdAt", + "updatedAt", + "subscriptionUrl", + "activeInternalSquads", + "userTraffic" + ] + } + }, + "required": [ + "response" + ] + }, + "UpdateUserRequestDto": { + "type": "object", + "properties": { + "username": { + "description": "Username of the user", + "type": "string" + }, + "uuid": { + "description": "UUID of the user. UUID has higher priority than username, so if both are provided, username will be ignored.", + "type": "string", + "format": "uuid" + }, + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED" + ] + }, + "trafficLimitBytes": { + "description": "Traffic limit in bytes. 0 - unlimited", + "type": "number", + "minimum": 0, + "exclusiveMinimum": false + }, + "trafficLimitStrategy": { + "description": "Available reset periods", + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "default": "NO_RESET" + }, + "expireAt": { + "description": "Expiration date: 2025-01-17T15:38:45.065Z", + "type": "string", + "format": "date-time" + }, + "description": { + "type": "string", + "nullable": true + }, + "tag": { + "type": "string", + "pattern": "^[A-Z0-9_]+$", + "maxLength": 16, + "nullable": true + }, + "telegramId": { + "type": "integer", + "nullable": true + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "hwidDeviceLimit": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false, + "nullable": true + }, + "activeInternalSquads": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "externalSquadUuid": { + "description": "Optional. External squad UUID.", + "type": "string", + "format": "uuid", + "nullable": true + } + } + }, + "UpdateUserResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "id": { + "type": "number" + }, + "shortUuid": { + "type": "string" + }, + "username": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "default": "ACTIVE" + }, + "trafficLimitBytes": { + "type": "number", + "default": 0 + }, + "trafficLimitStrategy": { + "description": "Available reset periods", + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "default": "NO_RESET" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "telegramId": { + "type": "integer", + "nullable": true + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tag": { + "type": "string", + "nullable": true + }, + "hwidDeviceLimit": { + "type": "integer", + "nullable": true + }, + "externalSquadUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "trojanPassword": { + "type": "string" + }, + "vlessUuid": { + "type": "string", + "format": "uuid" + }, + "ssPassword": { + "type": "string" + }, + "lastTriggeredThreshold": { + "type": "integer", + "default": 0 + }, + "subRevokedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastTrafficResetAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "subscriptionUrl": { + "type": "string" + }, + "activeInternalSquads": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "uuid", + "name" + ] + } + }, + "userTraffic": { + "type": "object", + "properties": { + "usedTrafficBytes": { + "type": "number" + }, + "lifetimeUsedTrafficBytes": { + "type": "number" + }, + "onlineAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "firstConnectedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastConnectedNodeUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "usedTrafficBytes", + "lifetimeUsedTrafficBytes", + "onlineAt", + "firstConnectedAt", + "lastConnectedNodeUuid" + ] + } + }, + "required": [ + "uuid", + "id", + "shortUuid", + "username", + "expireAt", + "telegramId", + "email", + "description", + "tag", + "hwidDeviceLimit", + "externalSquadUuid", + "trojanPassword", + "vlessUuid", + "ssPassword", + "subRevokedAt", + "lastTrafficResetAt", + "createdAt", + "updatedAt", + "subscriptionUrl", + "activeInternalSquads", + "userTraffic" + ] + } + }, + "required": [ + "response" + ] + }, + "DeleteUserResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "isDeleted": { + "type": "boolean" + } + }, + "required": [ + "isDeleted" + ] + } + }, + "required": [ + "response" + ] + }, + "GetAllUsersResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "users": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "id": { + "type": "number" + }, + "shortUuid": { + "type": "string" + }, + "username": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "default": "ACTIVE" + }, + "trafficLimitBytes": { + "type": "number", + "default": 0 + }, + "trafficLimitStrategy": { + "description": "Available reset periods", + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "default": "NO_RESET" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "telegramId": { + "type": "integer", + "nullable": true + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tag": { + "type": "string", + "nullable": true + }, + "hwidDeviceLimit": { + "type": "integer", + "nullable": true + }, + "externalSquadUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "trojanPassword": { + "type": "string" + }, + "vlessUuid": { + "type": "string", + "format": "uuid" + }, + "ssPassword": { + "type": "string" + }, + "lastTriggeredThreshold": { + "type": "integer", + "default": 0 + }, + "subRevokedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastTrafficResetAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "subscriptionUrl": { + "type": "string" + }, + "activeInternalSquads": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "uuid", + "name" + ] + } + }, + "userTraffic": { + "type": "object", + "properties": { + "usedTrafficBytes": { + "type": "number" + }, + "lifetimeUsedTrafficBytes": { + "type": "number" + }, + "onlineAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "firstConnectedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastConnectedNodeUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "usedTrafficBytes", + "lifetimeUsedTrafficBytes", + "onlineAt", + "firstConnectedAt", + "lastConnectedNodeUuid" + ] + } + }, + "required": [ + "uuid", + "id", + "shortUuid", + "username", + "expireAt", + "telegramId", + "email", + "description", + "tag", + "hwidDeviceLimit", + "externalSquadUuid", + "trojanPassword", + "vlessUuid", + "ssPassword", + "subRevokedAt", + "lastTrafficResetAt", + "createdAt", + "updatedAt", + "subscriptionUrl", + "activeInternalSquads", + "userTraffic" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "users", + "total" + ] + } + }, + "required": [ + "response" + ] + }, + "GetUsersStreamResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "users": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "id": { + "type": "number" + }, + "shortUuid": { + "type": "string" + }, + "username": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "default": "ACTIVE" + }, + "trafficLimitBytes": { + "type": "number", + "default": 0 + }, + "trafficLimitStrategy": { + "description": "Available reset periods", + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "default": "NO_RESET" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "telegramId": { + "type": "integer", + "nullable": true + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tag": { + "type": "string", + "nullable": true + }, + "hwidDeviceLimit": { + "type": "integer", + "nullable": true + }, + "externalSquadUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "trojanPassword": { + "type": "string" + }, + "vlessUuid": { + "type": "string", + "format": "uuid" + }, + "ssPassword": { + "type": "string" + }, + "lastTriggeredThreshold": { + "type": "integer", + "default": 0 + }, + "subRevokedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastTrafficResetAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "subscriptionUrl": { + "type": "string" + }, + "activeInternalSquads": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "uuid", + "name" + ] + } + }, + "userTraffic": { + "type": "object", + "properties": { + "usedTrafficBytes": { + "type": "number" + }, + "lifetimeUsedTrafficBytes": { + "type": "number" + }, + "onlineAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "firstConnectedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastConnectedNodeUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "usedTrafficBytes", + "lifetimeUsedTrafficBytes", + "onlineAt", + "firstConnectedAt", + "lastConnectedNodeUuid" + ] + } + }, + "required": [ + "uuid", + "id", + "shortUuid", + "username", + "expireAt", + "telegramId", + "email", + "description", + "tag", + "hwidDeviceLimit", + "externalSquadUuid", + "trojanPassword", + "vlessUuid", + "ssPassword", + "subRevokedAt", + "lastTrafficResetAt", + "createdAt", + "updatedAt", + "subscriptionUrl", + "activeInternalSquads", + "userTraffic" + ] + } + }, + "nextCursor": { + "description": "Cursor to fetch the next page, or null if there are no more results", + "type": "string", + "nullable": true + }, + "hasMore": { + "description": "Whether there are more results to fetch", + "type": "boolean" + } + }, + "required": [ + "users", + "nextCursor", + "hasMore" + ] + } + }, + "required": [ + "response" + ] + }, + "GetAllTagsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "tags" + ] + } + }, + "required": [ + "response" + ] + }, + "GetUserAccessibleNodesResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "userUuid": { + "type": "string", + "format": "uuid" + }, + "activeNodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "nodeName": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "configProfileUuid": { + "type": "string", + "format": "uuid" + }, + "configProfileName": { + "type": "string" + }, + "activeSquads": { + "type": "array", + "items": { + "type": "object", + "properties": { + "squadName": { + "type": "string" + }, + "activeInbounds": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "squadName", + "activeInbounds" + ] + } + } + }, + "required": [ + "uuid", + "nodeName", + "countryCode", + "configProfileUuid", + "configProfileName", + "activeSquads" + ] + } + } + }, + "required": [ + "userUuid", + "activeNodes" + ] + } + }, + "required": [ + "response" + ] + }, + "GetUserSubscriptionRequestHistoryResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "records": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "userId": { + "type": "number" + }, + "requestAt": { + "type": "string", + "format": "date-time" + }, + "requestIp": { + "type": "string", + "nullable": true + }, + "userAgent": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "userId", + "requestAt", + "requestIp", + "userAgent" + ] + } + } + }, + "required": [ + "total", + "records" + ] + } + }, + "required": [ + "response" + ] + }, + "GetUserByShortUuidResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "id": { + "type": "number" + }, + "shortUuid": { + "type": "string" + }, + "username": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "default": "ACTIVE" + }, + "trafficLimitBytes": { + "type": "number", + "default": 0 + }, + "trafficLimitStrategy": { + "description": "Available reset periods", + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "default": "NO_RESET" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "telegramId": { + "type": "integer", + "nullable": true + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tag": { + "type": "string", + "nullable": true + }, + "hwidDeviceLimit": { + "type": "integer", + "nullable": true + }, + "externalSquadUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "trojanPassword": { + "type": "string" + }, + "vlessUuid": { + "type": "string", + "format": "uuid" + }, + "ssPassword": { + "type": "string" + }, + "lastTriggeredThreshold": { + "type": "integer", + "default": 0 + }, + "subRevokedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastTrafficResetAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "subscriptionUrl": { + "type": "string" + }, + "activeInternalSquads": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "uuid", + "name" + ] + } + }, + "userTraffic": { + "type": "object", + "properties": { + "usedTrafficBytes": { + "type": "number" + }, + "lifetimeUsedTrafficBytes": { + "type": "number" + }, + "onlineAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "firstConnectedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastConnectedNodeUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "usedTrafficBytes", + "lifetimeUsedTrafficBytes", + "onlineAt", + "firstConnectedAt", + "lastConnectedNodeUuid" + ] + } + }, + "required": [ + "uuid", + "id", + "shortUuid", + "username", + "expireAt", + "telegramId", + "email", + "description", + "tag", + "hwidDeviceLimit", + "externalSquadUuid", + "trojanPassword", + "vlessUuid", + "ssPassword", + "subRevokedAt", + "lastTrafficResetAt", + "createdAt", + "updatedAt", + "subscriptionUrl", + "activeInternalSquads", + "userTraffic" + ] + } + }, + "required": [ + "response" + ] + }, + "GetUserByUuidResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "id": { + "type": "number" + }, + "shortUuid": { + "type": "string" + }, + "username": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "default": "ACTIVE" + }, + "trafficLimitBytes": { + "type": "number", + "default": 0 + }, + "trafficLimitStrategy": { + "description": "Available reset periods", + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "default": "NO_RESET" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "telegramId": { + "type": "integer", + "nullable": true + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tag": { + "type": "string", + "nullable": true + }, + "hwidDeviceLimit": { + "type": "integer", + "nullable": true + }, + "externalSquadUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "trojanPassword": { + "type": "string" + }, + "vlessUuid": { + "type": "string", + "format": "uuid" + }, + "ssPassword": { + "type": "string" + }, + "lastTriggeredThreshold": { + "type": "integer", + "default": 0 + }, + "subRevokedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastTrafficResetAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "subscriptionUrl": { + "type": "string" + }, + "activeInternalSquads": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "uuid", + "name" + ] + } + }, + "userTraffic": { + "type": "object", + "properties": { + "usedTrafficBytes": { + "type": "number" + }, + "lifetimeUsedTrafficBytes": { + "type": "number" + }, + "onlineAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "firstConnectedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastConnectedNodeUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "usedTrafficBytes", + "lifetimeUsedTrafficBytes", + "onlineAt", + "firstConnectedAt", + "lastConnectedNodeUuid" + ] + } + }, + "required": [ + "uuid", + "id", + "shortUuid", + "username", + "expireAt", + "telegramId", + "email", + "description", + "tag", + "hwidDeviceLimit", + "externalSquadUuid", + "trojanPassword", + "vlessUuid", + "ssPassword", + "subRevokedAt", + "lastTrafficResetAt", + "createdAt", + "updatedAt", + "subscriptionUrl", + "activeInternalSquads", + "userTraffic" + ] + } + }, + "required": [ + "response" + ] + }, + "GetUserByUsernameResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "id": { + "type": "number" + }, + "shortUuid": { + "type": "string" + }, + "username": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "default": "ACTIVE" + }, + "trafficLimitBytes": { + "type": "number", + "default": 0 + }, + "trafficLimitStrategy": { + "description": "Available reset periods", + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "default": "NO_RESET" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "telegramId": { + "type": "integer", + "nullable": true + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tag": { + "type": "string", + "nullable": true + }, + "hwidDeviceLimit": { + "type": "integer", + "nullable": true + }, + "externalSquadUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "trojanPassword": { + "type": "string" + }, + "vlessUuid": { + "type": "string", + "format": "uuid" + }, + "ssPassword": { + "type": "string" + }, + "lastTriggeredThreshold": { + "type": "integer", + "default": 0 + }, + "subRevokedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastTrafficResetAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "subscriptionUrl": { + "type": "string" + }, + "activeInternalSquads": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "uuid", + "name" + ] + } + }, + "userTraffic": { + "type": "object", + "properties": { + "usedTrafficBytes": { + "type": "number" + }, + "lifetimeUsedTrafficBytes": { + "type": "number" + }, + "onlineAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "firstConnectedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastConnectedNodeUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "usedTrafficBytes", + "lifetimeUsedTrafficBytes", + "onlineAt", + "firstConnectedAt", + "lastConnectedNodeUuid" + ] + } + }, + "required": [ + "uuid", + "id", + "shortUuid", + "username", + "expireAt", + "telegramId", + "email", + "description", + "tag", + "hwidDeviceLimit", + "externalSquadUuid", + "trojanPassword", + "vlessUuid", + "ssPassword", + "subRevokedAt", + "lastTrafficResetAt", + "createdAt", + "updatedAt", + "subscriptionUrl", + "activeInternalSquads", + "userTraffic" + ] + } + }, + "required": [ + "response" + ] + }, + "GetUserByIdResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "id": { + "type": "number" + }, + "shortUuid": { + "type": "string" + }, + "username": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "default": "ACTIVE" + }, + "trafficLimitBytes": { + "type": "number", + "default": 0 + }, + "trafficLimitStrategy": { + "description": "Available reset periods", + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "default": "NO_RESET" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "telegramId": { + "type": "integer", + "nullable": true + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tag": { + "type": "string", + "nullable": true + }, + "hwidDeviceLimit": { + "type": "integer", + "nullable": true + }, + "externalSquadUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "trojanPassword": { + "type": "string" + }, + "vlessUuid": { + "type": "string", + "format": "uuid" + }, + "ssPassword": { + "type": "string" + }, + "lastTriggeredThreshold": { + "type": "integer", + "default": 0 + }, + "subRevokedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastTrafficResetAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "subscriptionUrl": { + "type": "string" + }, + "activeInternalSquads": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "uuid", + "name" + ] + } + }, + "userTraffic": { + "type": "object", + "properties": { + "usedTrafficBytes": { + "type": "number" + }, + "lifetimeUsedTrafficBytes": { + "type": "number" + }, + "onlineAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "firstConnectedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastConnectedNodeUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "usedTrafficBytes", + "lifetimeUsedTrafficBytes", + "onlineAt", + "firstConnectedAt", + "lastConnectedNodeUuid" + ] + } + }, + "required": [ + "uuid", + "id", + "shortUuid", + "username", + "expireAt", + "telegramId", + "email", + "description", + "tag", + "hwidDeviceLimit", + "externalSquadUuid", + "trojanPassword", + "vlessUuid", + "ssPassword", + "subRevokedAt", + "lastTrafficResetAt", + "createdAt", + "updatedAt", + "subscriptionUrl", + "activeInternalSquads", + "userTraffic" + ] + } + }, + "required": [ + "response" + ] + }, + "GetUserByTelegramIdResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "id": { + "type": "number" + }, + "shortUuid": { + "type": "string" + }, + "username": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "default": "ACTIVE" + }, + "trafficLimitBytes": { + "type": "number", + "default": 0 + }, + "trafficLimitStrategy": { + "description": "Available reset periods", + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "default": "NO_RESET" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "telegramId": { + "type": "integer", + "nullable": true + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tag": { + "type": "string", + "nullable": true + }, + "hwidDeviceLimit": { + "type": "integer", + "nullable": true + }, + "externalSquadUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "trojanPassword": { + "type": "string" + }, + "vlessUuid": { + "type": "string", + "format": "uuid" + }, + "ssPassword": { + "type": "string" + }, + "lastTriggeredThreshold": { + "type": "integer", + "default": 0 + }, + "subRevokedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastTrafficResetAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "subscriptionUrl": { + "type": "string" + }, + "activeInternalSquads": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "uuid", + "name" + ] + } + }, + "userTraffic": { + "type": "object", + "properties": { + "usedTrafficBytes": { + "type": "number" + }, + "lifetimeUsedTrafficBytes": { + "type": "number" + }, + "onlineAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "firstConnectedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastConnectedNodeUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "usedTrafficBytes", + "lifetimeUsedTrafficBytes", + "onlineAt", + "firstConnectedAt", + "lastConnectedNodeUuid" + ] + } + }, + "required": [ + "uuid", + "id", + "shortUuid", + "username", + "expireAt", + "telegramId", + "email", + "description", + "tag", + "hwidDeviceLimit", + "externalSquadUuid", + "trojanPassword", + "vlessUuid", + "ssPassword", + "subRevokedAt", + "lastTrafficResetAt", + "createdAt", + "updatedAt", + "subscriptionUrl", + "activeInternalSquads", + "userTraffic" + ] + } + } + }, + "required": [ + "response" + ] + }, + "GetUserByEmailResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "id": { + "type": "number" + }, + "shortUuid": { + "type": "string" + }, + "username": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "default": "ACTIVE" + }, + "trafficLimitBytes": { + "type": "number", + "default": 0 + }, + "trafficLimitStrategy": { + "description": "Available reset periods", + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "default": "NO_RESET" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "telegramId": { + "type": "integer", + "nullable": true + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tag": { + "type": "string", + "nullable": true + }, + "hwidDeviceLimit": { + "type": "integer", + "nullable": true + }, + "externalSquadUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "trojanPassword": { + "type": "string" + }, + "vlessUuid": { + "type": "string", + "format": "uuid" + }, + "ssPassword": { + "type": "string" + }, + "lastTriggeredThreshold": { + "type": "integer", + "default": 0 + }, + "subRevokedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastTrafficResetAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "subscriptionUrl": { + "type": "string" + }, + "activeInternalSquads": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "uuid", + "name" + ] + } + }, + "userTraffic": { + "type": "object", + "properties": { + "usedTrafficBytes": { + "type": "number" + }, + "lifetimeUsedTrafficBytes": { + "type": "number" + }, + "onlineAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "firstConnectedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastConnectedNodeUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "usedTrafficBytes", + "lifetimeUsedTrafficBytes", + "onlineAt", + "firstConnectedAt", + "lastConnectedNodeUuid" + ] + } + }, + "required": [ + "uuid", + "id", + "shortUuid", + "username", + "expireAt", + "telegramId", + "email", + "description", + "tag", + "hwidDeviceLimit", + "externalSquadUuid", + "trojanPassword", + "vlessUuid", + "ssPassword", + "subRevokedAt", + "lastTrafficResetAt", + "createdAt", + "updatedAt", + "subscriptionUrl", + "activeInternalSquads", + "userTraffic" + ] + } + } + }, + "required": [ + "response" + ] + }, + "GetUserByTagResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "id": { + "type": "number" + }, + "shortUuid": { + "type": "string" + }, + "username": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "default": "ACTIVE" + }, + "trafficLimitBytes": { + "type": "number", + "default": 0 + }, + "trafficLimitStrategy": { + "description": "Available reset periods", + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "default": "NO_RESET" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "telegramId": { + "type": "integer", + "nullable": true + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tag": { + "type": "string", + "nullable": true + }, + "hwidDeviceLimit": { + "type": "integer", + "nullable": true + }, + "externalSquadUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "trojanPassword": { + "type": "string" + }, + "vlessUuid": { + "type": "string", + "format": "uuid" + }, + "ssPassword": { + "type": "string" + }, + "lastTriggeredThreshold": { + "type": "integer", + "default": 0 + }, + "subRevokedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastTrafficResetAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "subscriptionUrl": { + "type": "string" + }, + "activeInternalSquads": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "uuid", + "name" + ] + } + }, + "userTraffic": { + "type": "object", + "properties": { + "usedTrafficBytes": { + "type": "number" + }, + "lifetimeUsedTrafficBytes": { + "type": "number" + }, + "onlineAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "firstConnectedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastConnectedNodeUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "usedTrafficBytes", + "lifetimeUsedTrafficBytes", + "onlineAt", + "firstConnectedAt", + "lastConnectedNodeUuid" + ] + } + }, + "required": [ + "uuid", + "id", + "shortUuid", + "username", + "expireAt", + "telegramId", + "email", + "description", + "tag", + "hwidDeviceLimit", + "externalSquadUuid", + "trojanPassword", + "vlessUuid", + "ssPassword", + "subRevokedAt", + "lastTrafficResetAt", + "createdAt", + "updatedAt", + "subscriptionUrl", + "activeInternalSquads", + "userTraffic" + ] + } + } + }, + "required": [ + "response" + ] + }, + "RevokeUserSubscriptionBodyDto": { + "type": "object", + "properties": { + "revokeOnlyPasswords": { + "description": "Optional. If true, only passwords will be revoked, without changing the short UUID (Subscription URL).", + "type": "boolean", + "default": false + }, + "shortUuid": { + "description": "Optional. If not provided, a new short UUID will be generated by Remnawave. Please note that it is strongly recommended to allow Remnawave to generate the short UUID.", + "type": "string", + "minLength": 6, + "maxLength": 48 + } + } + }, + "RevokeUserSubscriptionResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "id": { + "type": "number" + }, + "shortUuid": { + "type": "string" + }, + "username": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "default": "ACTIVE" + }, + "trafficLimitBytes": { + "type": "number", + "default": 0 + }, + "trafficLimitStrategy": { + "description": "Available reset periods", + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "default": "NO_RESET" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "telegramId": { + "type": "integer", + "nullable": true + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tag": { + "type": "string", + "nullable": true + }, + "hwidDeviceLimit": { + "type": "integer", + "nullable": true + }, + "externalSquadUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "trojanPassword": { + "type": "string" + }, + "vlessUuid": { + "type": "string", + "format": "uuid" + }, + "ssPassword": { + "type": "string" + }, + "lastTriggeredThreshold": { + "type": "integer", + "default": 0 + }, + "subRevokedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastTrafficResetAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "subscriptionUrl": { + "type": "string" + }, + "activeInternalSquads": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "uuid", + "name" + ] + } + }, + "userTraffic": { + "type": "object", + "properties": { + "usedTrafficBytes": { + "type": "number" + }, + "lifetimeUsedTrafficBytes": { + "type": "number" + }, + "onlineAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "firstConnectedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastConnectedNodeUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "usedTrafficBytes", + "lifetimeUsedTrafficBytes", + "onlineAt", + "firstConnectedAt", + "lastConnectedNodeUuid" + ] + } + }, + "required": [ + "uuid", + "id", + "shortUuid", + "username", + "expireAt", + "telegramId", + "email", + "description", + "tag", + "hwidDeviceLimit", + "externalSquadUuid", + "trojanPassword", + "vlessUuid", + "ssPassword", + "subRevokedAt", + "lastTrafficResetAt", + "createdAt", + "updatedAt", + "subscriptionUrl", + "activeInternalSquads", + "userTraffic" + ] + } + }, + "required": [ + "response" + ] + }, + "DisableUserResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "id": { + "type": "number" + }, + "shortUuid": { + "type": "string" + }, + "username": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "default": "ACTIVE" + }, + "trafficLimitBytes": { + "type": "number", + "default": 0 + }, + "trafficLimitStrategy": { + "description": "Available reset periods", + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "default": "NO_RESET" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "telegramId": { + "type": "integer", + "nullable": true + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tag": { + "type": "string", + "nullable": true + }, + "hwidDeviceLimit": { + "type": "integer", + "nullable": true + }, + "externalSquadUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "trojanPassword": { + "type": "string" + }, + "vlessUuid": { + "type": "string", + "format": "uuid" + }, + "ssPassword": { + "type": "string" + }, + "lastTriggeredThreshold": { + "type": "integer", + "default": 0 + }, + "subRevokedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastTrafficResetAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "subscriptionUrl": { + "type": "string" + }, + "activeInternalSquads": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "uuid", + "name" + ] + } + }, + "userTraffic": { + "type": "object", + "properties": { + "usedTrafficBytes": { + "type": "number" + }, + "lifetimeUsedTrafficBytes": { + "type": "number" + }, + "onlineAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "firstConnectedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastConnectedNodeUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "usedTrafficBytes", + "lifetimeUsedTrafficBytes", + "onlineAt", + "firstConnectedAt", + "lastConnectedNodeUuid" + ] + } + }, + "required": [ + "uuid", + "id", + "shortUuid", + "username", + "expireAt", + "telegramId", + "email", + "description", + "tag", + "hwidDeviceLimit", + "externalSquadUuid", + "trojanPassword", + "vlessUuid", + "ssPassword", + "subRevokedAt", + "lastTrafficResetAt", + "createdAt", + "updatedAt", + "subscriptionUrl", + "activeInternalSquads", + "userTraffic" + ] + } + }, + "required": [ + "response" + ] + }, + "EnableUserResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "id": { + "type": "number" + }, + "shortUuid": { + "type": "string" + }, + "username": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "default": "ACTIVE" + }, + "trafficLimitBytes": { + "type": "number", + "default": 0 + }, + "trafficLimitStrategy": { + "description": "Available reset periods", + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "default": "NO_RESET" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "telegramId": { + "type": "integer", + "nullable": true + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tag": { + "type": "string", + "nullable": true + }, + "hwidDeviceLimit": { + "type": "integer", + "nullable": true + }, + "externalSquadUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "trojanPassword": { + "type": "string" + }, + "vlessUuid": { + "type": "string", + "format": "uuid" + }, + "ssPassword": { + "type": "string" + }, + "lastTriggeredThreshold": { + "type": "integer", + "default": 0 + }, + "subRevokedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastTrafficResetAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "subscriptionUrl": { + "type": "string" + }, + "activeInternalSquads": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "uuid", + "name" + ] + } + }, + "userTraffic": { + "type": "object", + "properties": { + "usedTrafficBytes": { + "type": "number" + }, + "lifetimeUsedTrafficBytes": { + "type": "number" + }, + "onlineAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "firstConnectedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastConnectedNodeUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "usedTrafficBytes", + "lifetimeUsedTrafficBytes", + "onlineAt", + "firstConnectedAt", + "lastConnectedNodeUuid" + ] + } + }, + "required": [ + "uuid", + "id", + "shortUuid", + "username", + "expireAt", + "telegramId", + "email", + "description", + "tag", + "hwidDeviceLimit", + "externalSquadUuid", + "trojanPassword", + "vlessUuid", + "ssPassword", + "subRevokedAt", + "lastTrafficResetAt", + "createdAt", + "updatedAt", + "subscriptionUrl", + "activeInternalSquads", + "userTraffic" + ] + } + }, + "required": [ + "response" + ] + }, + "ResetUserTrafficResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "id": { + "type": "number" + }, + "shortUuid": { + "type": "string" + }, + "username": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "default": "ACTIVE" + }, + "trafficLimitBytes": { + "type": "number", + "default": 0 + }, + "trafficLimitStrategy": { + "description": "Available reset periods", + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "default": "NO_RESET" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "telegramId": { + "type": "integer", + "nullable": true + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tag": { + "type": "string", + "nullable": true + }, + "hwidDeviceLimit": { + "type": "integer", + "nullable": true + }, + "externalSquadUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "trojanPassword": { + "type": "string" + }, + "vlessUuid": { + "type": "string", + "format": "uuid" + }, + "ssPassword": { + "type": "string" + }, + "lastTriggeredThreshold": { + "type": "integer", + "default": 0 + }, + "subRevokedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastTrafficResetAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "subscriptionUrl": { + "type": "string" + }, + "activeInternalSquads": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "uuid", + "name" + ] + } + }, + "userTraffic": { + "type": "object", + "properties": { + "usedTrafficBytes": { + "type": "number" + }, + "lifetimeUsedTrafficBytes": { + "type": "number" + }, + "onlineAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "firstConnectedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastConnectedNodeUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "usedTrafficBytes", + "lifetimeUsedTrafficBytes", + "onlineAt", + "firstConnectedAt", + "lastConnectedNodeUuid" + ] + } + }, + "required": [ + "uuid", + "id", + "shortUuid", + "username", + "expireAt", + "telegramId", + "email", + "description", + "tag", + "hwidDeviceLimit", + "externalSquadUuid", + "trojanPassword", + "vlessUuid", + "ssPassword", + "subRevokedAt", + "lastTrafficResetAt", + "createdAt", + "updatedAt", + "subscriptionUrl", + "activeInternalSquads", + "userTraffic" + ] + } + }, + "required": [ + "response" + ] + }, + "ResolveUserRequestBodyDto": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "id": { + "type": "number" + }, + "shortUuid": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "ResolveUserResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "username": { + "type": "string" + }, + "id": { + "type": "number" + }, + "shortUuid": { + "type": "string" + } + }, + "required": [ + "uuid", + "username", + "id", + "shortUuid" + ] + } + }, + "required": [ + "response" + ] + }, + "BulkDeleteUsersByStatusRequestDto": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "default": "ACTIVE" + } + } + }, + "BulkDeleteUsersByStatusResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "affectedRows": { + "type": "number" + } + }, + "required": [ + "affectedRows" + ] + } + }, + "required": [ + "response" + ] + }, + "BulkDeleteUsersRequestDto": { + "type": "object", + "properties": { + "uuids": { + "type": "array", + "minItems": 1, + "maxItems": 500, + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "uuids" + ] + }, + "BulkDeleteUsersResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "affectedRows": { + "type": "number" + } + }, + "required": [ + "affectedRows" + ] + } + }, + "required": [ + "response" + ] + }, + "BulkRevokeUsersSubscriptionRequestDto": { + "type": "object", + "properties": { + "uuids": { + "type": "array", + "minItems": 1, + "maxItems": 500, + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "uuids" + ] + }, + "BulkRevokeUsersSubscriptionResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "affectedRows": { + "type": "number" + } + }, + "required": [ + "affectedRows" + ] + } + }, + "required": [ + "response" + ] + }, + "BulkResetTrafficUsersRequestDto": { + "type": "object", + "properties": { + "uuids": { + "type": "array", + "minItems": 1, + "maxItems": 500, + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "uuids" + ] + }, + "BulkResetTrafficUsersResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "affectedRows": { + "type": "number" + } + }, + "required": [ + "affectedRows" + ] + } + }, + "required": [ + "response" + ] + }, + "BulkUpdateUsersRequestDto": { + "type": "object", + "properties": { + "uuids": { + "type": "array", + "minItems": 1, + "maxItems": 500, + "items": { + "type": "string", + "format": "uuid" + } + }, + "fields": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "default": "ACTIVE" + }, + "trafficLimitBytes": { + "description": "Traffic limit in bytes. 0 - unlimited", + "type": "number", + "minimum": 0, + "exclusiveMinimum": false + }, + "trafficLimitStrategy": { + "description": "Traffic limit reset strategy", + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ] + }, + "expireAt": { + "description": "Expiration date: 2025-01-17T15:38:45.065Z", + "type": "string", + "format": "date-time" + }, + "description": { + "type": "string", + "nullable": true + }, + "telegramId": { + "type": "integer", + "nullable": true + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "tag": { + "type": "string", + "pattern": "^[A-Z0-9_]+$", + "maxLength": 16, + "nullable": true + }, + "hwidDeviceLimit": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false, + "nullable": true + }, + "externalSquadUuid": { + "description": "Optional. External squad UUID.", + "type": "string", + "format": "uuid", + "nullable": true + } + } + } + }, + "required": [ + "uuids", + "fields" + ] + }, + "BulkUpdateUsersResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "affectedRows": { + "type": "number" + } + }, + "required": [ + "affectedRows" + ] + } + }, + "required": [ + "response" + ] + }, + "BulkUpdateUsersSquadsRequestDto": { + "type": "object", + "properties": { + "uuids": { + "type": "array", + "minItems": 1, + "maxItems": 500, + "items": { + "type": "string", + "format": "uuid" + } + }, + "activeInternalSquads": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "uuids", + "activeInternalSquads" + ] + }, + "BulkUpdateUsersSquadsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "affectedRows": { + "type": "number" + } + }, + "required": [ + "affectedRows" + ] + } + }, + "required": [ + "response" + ] + }, + "BulkExtendExpirationDateRequestDto": { + "type": "object", + "properties": { + "uuids": { + "type": "array", + "minItems": 1, + "maxItems": 500, + "items": { + "type": "string", + "format": "uuid" + } + }, + "extendDays": { + "type": "integer", + "minimum": 1, + "exclusiveMinimum": false, + "maximum": 9999, + "exclusiveMaximum": false + } + }, + "required": [ + "uuids", + "extendDays" + ] + }, + "BulkExtendExpirationDateResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "affectedRows": { + "type": "number" + } + }, + "required": [ + "affectedRows" + ] + } + }, + "required": [ + "response" + ] + }, + "BulkAllUpdateUsersRequestDto": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "default": "ACTIVE" + }, + "trafficLimitBytes": { + "description": "Traffic limit in bytes. 0 - unlimited", + "type": "number", + "minimum": 0, + "exclusiveMinimum": false + }, + "trafficLimitStrategy": { + "description": "Traffic limit reset strategy", + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ] + }, + "expireAt": { + "description": "Expiration date: 2025-01-17T15:38:45.065Z", + "type": "string", + "format": "date-time" + }, + "description": { + "type": "string", + "nullable": true + }, + "telegramId": { + "type": "integer", + "nullable": true + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "tag": { + "type": "string", + "pattern": "^[A-Z0-9_]+$", + "maxLength": 16, + "nullable": true + }, + "hwidDeviceLimit": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false, + "nullable": true + } + } + }, + "BulkAllUpdateUsersResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "eventSent": { + "type": "boolean" + } + }, + "required": [ + "eventSent" + ] + } + }, + "required": [ + "response" + ] + }, + "BulkAllResetTrafficUsersResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "eventSent": { + "type": "boolean" + } + }, + "required": [ + "eventSent" + ] + } + }, + "required": [ + "response" + ] + }, + "BulkAllExtendExpirationDateRequestDto": { + "type": "object", + "properties": { + "extendDays": { + "type": "integer", + "minimum": 1, + "exclusiveMinimum": false + } + }, + "required": [ + "extendDays" + ] + }, + "BulkAllExtendExpirationDateResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "eventSent": { + "type": "boolean" + } + }, + "required": [ + "eventSent" + ] + } + }, + "required": [ + "response" + ] + }, + "GetSubscriptionInfoResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "isFound": { + "type": "boolean" + }, + "user": { + "type": "object", + "properties": { + "shortUuid": { + "type": "string" + }, + "daysLeft": { + "type": "number" + }, + "trafficUsed": { + "type": "string" + }, + "trafficLimit": { + "type": "string" + }, + "lifetimeTrafficUsed": { + "type": "string" + }, + "trafficUsedBytes": { + "type": "string" + }, + "trafficLimitBytes": { + "type": "string" + }, + "lifetimeTrafficUsedBytes": { + "type": "string" + }, + "username": { + "type": "string" + }, + "expiresAt": { + "type": "string", + "format": "date-time" + }, + "isActive": { + "type": "boolean" + }, + "userStatus": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ] + }, + "trafficLimitStrategy": { + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ] + } + }, + "required": [ + "shortUuid", + "daysLeft", + "trafficUsed", + "trafficLimit", + "lifetimeTrafficUsed", + "trafficUsedBytes", + "trafficLimitBytes", + "lifetimeTrafficUsedBytes", + "username", + "expiresAt", + "isActive", + "userStatus", + "trafficLimitStrategy" + ] + }, + "links": { + "type": "array", + "items": { + "type": "string" + } + }, + "ssConfLinks": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "subscriptionUrl": { + "type": "string" + } + }, + "required": [ + "isFound", + "user", + "links", + "ssConfLinks", + "subscriptionUrl" + ] + } + }, + "required": [ + "response" + ] + }, + "GetAllSubscriptionsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "subscriptions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "isFound": { + "type": "boolean" + }, + "user": { + "type": "object", + "properties": { + "shortUuid": { + "type": "string" + }, + "daysLeft": { + "type": "number" + }, + "trafficUsed": { + "type": "string" + }, + "trafficLimit": { + "type": "string" + }, + "lifetimeTrafficUsed": { + "type": "string" + }, + "trafficUsedBytes": { + "type": "string" + }, + "trafficLimitBytes": { + "type": "string" + }, + "lifetimeTrafficUsedBytes": { + "type": "string" + }, + "username": { + "type": "string" + }, + "expiresAt": { + "type": "string", + "format": "date-time" + }, + "isActive": { + "type": "boolean" + }, + "userStatus": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ] + }, + "trafficLimitStrategy": { + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ] + } + }, + "required": [ + "shortUuid", + "daysLeft", + "trafficUsed", + "trafficLimit", + "lifetimeTrafficUsed", + "trafficUsedBytes", + "trafficLimitBytes", + "lifetimeTrafficUsedBytes", + "username", + "expiresAt", + "isActive", + "userStatus", + "trafficLimitStrategy" + ] + }, + "links": { + "type": "array", + "items": { + "type": "string" + } + }, + "ssConfLinks": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "subscriptionUrl": { + "type": "string" + } + }, + "required": [ + "isFound", + "user", + "links", + "ssConfLinks", + "subscriptionUrl" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "subscriptions", + "total" + ] + } + }, + "required": [ + "response" + ] + }, + "GetSubscriptionByUsernameResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "isFound": { + "type": "boolean" + }, + "user": { + "type": "object", + "properties": { + "shortUuid": { + "type": "string" + }, + "daysLeft": { + "type": "number" + }, + "trafficUsed": { + "type": "string" + }, + "trafficLimit": { + "type": "string" + }, + "lifetimeTrafficUsed": { + "type": "string" + }, + "trafficUsedBytes": { + "type": "string" + }, + "trafficLimitBytes": { + "type": "string" + }, + "lifetimeTrafficUsedBytes": { + "type": "string" + }, + "username": { + "type": "string" + }, + "expiresAt": { + "type": "string", + "format": "date-time" + }, + "isActive": { + "type": "boolean" + }, + "userStatus": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ] + }, + "trafficLimitStrategy": { + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ] + } + }, + "required": [ + "shortUuid", + "daysLeft", + "trafficUsed", + "trafficLimit", + "lifetimeTrafficUsed", + "trafficUsedBytes", + "trafficLimitBytes", + "lifetimeTrafficUsedBytes", + "username", + "expiresAt", + "isActive", + "userStatus", + "trafficLimitStrategy" + ] + }, + "links": { + "type": "array", + "items": { + "type": "string" + } + }, + "ssConfLinks": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "subscriptionUrl": { + "type": "string" + } + }, + "required": [ + "isFound", + "user", + "links", + "ssConfLinks", + "subscriptionUrl" + ] + } + }, + "required": [ + "response" + ] + }, + "GetSubscriptionByShortUuidProtectedResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "isFound": { + "type": "boolean" + }, + "user": { + "type": "object", + "properties": { + "shortUuid": { + "type": "string" + }, + "daysLeft": { + "type": "number" + }, + "trafficUsed": { + "type": "string" + }, + "trafficLimit": { + "type": "string" + }, + "lifetimeTrafficUsed": { + "type": "string" + }, + "trafficUsedBytes": { + "type": "string" + }, + "trafficLimitBytes": { + "type": "string" + }, + "lifetimeTrafficUsedBytes": { + "type": "string" + }, + "username": { + "type": "string" + }, + "expiresAt": { + "type": "string", + "format": "date-time" + }, + "isActive": { + "type": "boolean" + }, + "userStatus": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ] + }, + "trafficLimitStrategy": { + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ] + } + }, + "required": [ + "shortUuid", + "daysLeft", + "trafficUsed", + "trafficLimit", + "lifetimeTrafficUsed", + "trafficUsedBytes", + "trafficLimitBytes", + "lifetimeTrafficUsedBytes", + "username", + "expiresAt", + "isActive", + "userStatus", + "trafficLimitStrategy" + ] + }, + "links": { + "type": "array", + "items": { + "type": "string" + } + }, + "ssConfLinks": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "subscriptionUrl": { + "type": "string" + } + }, + "required": [ + "isFound", + "user", + "links", + "ssConfLinks", + "subscriptionUrl" + ] + } + }, + "required": [ + "response" + ] + }, + "GetSubscriptionByUuidResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "isFound": { + "type": "boolean" + }, + "user": { + "type": "object", + "properties": { + "shortUuid": { + "type": "string" + }, + "daysLeft": { + "type": "number" + }, + "trafficUsed": { + "type": "string" + }, + "trafficLimit": { + "type": "string" + }, + "lifetimeTrafficUsed": { + "type": "string" + }, + "trafficUsedBytes": { + "type": "string" + }, + "trafficLimitBytes": { + "type": "string" + }, + "lifetimeTrafficUsedBytes": { + "type": "string" + }, + "username": { + "type": "string" + }, + "expiresAt": { + "type": "string", + "format": "date-time" + }, + "isActive": { + "type": "boolean" + }, + "userStatus": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ] + }, + "trafficLimitStrategy": { + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ] + } + }, + "required": [ + "shortUuid", + "daysLeft", + "trafficUsed", + "trafficLimit", + "lifetimeTrafficUsed", + "trafficUsedBytes", + "trafficLimitBytes", + "lifetimeTrafficUsedBytes", + "username", + "expiresAt", + "isActive", + "userStatus", + "trafficLimitStrategy" + ] + }, + "links": { + "type": "array", + "items": { + "type": "string" + } + }, + "ssConfLinks": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "subscriptionUrl": { + "type": "string" + } + }, + "required": [ + "isFound", + "user", + "links", + "ssConfLinks", + "subscriptionUrl" + ] + } + }, + "required": [ + "response" + ] + }, + "GetRawSubscriptionByShortUuidResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "user": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "id": { + "type": "number" + }, + "shortUuid": { + "type": "string" + }, + "username": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "default": "ACTIVE" + }, + "trafficLimitBytes": { + "type": "number", + "default": 0 + }, + "trafficLimitStrategy": { + "description": "Available reset periods", + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "default": "NO_RESET" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "telegramId": { + "type": "integer", + "nullable": true + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tag": { + "type": "string", + "nullable": true + }, + "hwidDeviceLimit": { + "type": "integer", + "nullable": true + }, + "externalSquadUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "trojanPassword": { + "type": "string" + }, + "vlessUuid": { + "type": "string", + "format": "uuid" + }, + "ssPassword": { + "type": "string" + }, + "lastTriggeredThreshold": { + "type": "integer", + "default": 0 + }, + "subRevokedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastTrafficResetAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "subscriptionUrl": { + "type": "string" + }, + "activeInternalSquads": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "uuid", + "name" + ] + } + }, + "userTraffic": { + "type": "object", + "properties": { + "usedTrafficBytes": { + "type": "number" + }, + "lifetimeUsedTrafficBytes": { + "type": "number" + }, + "onlineAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "firstConnectedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastConnectedNodeUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "usedTrafficBytes", + "lifetimeUsedTrafficBytes", + "onlineAt", + "firstConnectedAt", + "lastConnectedNodeUuid" + ] + } + }, + "required": [ + "uuid", + "id", + "shortUuid", + "username", + "expireAt", + "telegramId", + "email", + "description", + "tag", + "hwidDeviceLimit", + "externalSquadUuid", + "trojanPassword", + "vlessUuid", + "ssPassword", + "subRevokedAt", + "lastTrafficResetAt", + "createdAt", + "updatedAt", + "subscriptionUrl", + "activeInternalSquads", + "userTraffic" + ] + }, + "convertedUserInfo": { + "type": "object", + "properties": { + "daysLeft": { + "type": "number" + }, + "trafficLimit": { + "type": "string" + }, + "trafficUsed": { + "type": "string" + }, + "lifetimeTrafficUsed": { + "type": "string" + }, + "hwidCheckup": { + "type": "object", + "properties": { + "subscriptionAllowed": { + "type": "boolean" + }, + "maxDeviceReached": { + "type": "boolean" + }, + "hwidNotSupported": { + "type": "boolean" + }, + "limitBypassed": { + "type": "boolean" + } + }, + "required": [ + "subscriptionAllowed", + "maxDeviceReached", + "hwidNotSupported", + "limitBypassed" + ], + "nullable": true + } + }, + "required": [ + "daysLeft", + "trafficLimit", + "trafficUsed", + "lifetimeTrafficUsed", + "hwidCheckup" + ] + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "resolvedProxyConfigs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "finalRemark": { + "type": "string" + }, + "address": { + "type": "string" + }, + "port": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": true + }, + "protocol": { + "type": "string", + "enum": [ + "vless", + "trojan", + "shadowsocks", + "hysteria" + ] + }, + "protocolOptions": { + "oneOf": [ + { + "type": "object", + "properties": { + "encryption": { + "type": "string" + }, + "id": { + "type": "string" + }, + "flow": { + "type": "string", + "enum": [ + "", + "xtls-rprx-vision", + "xtls-rprx-vision-udp443" + ] + } + }, + "required": [ + "encryption", + "id", + "flow" + ] + }, + { + "type": "object", + "properties": { + "password": { + "type": "string" + } + }, + "required": [ + "password" + ] + }, + { + "type": "object", + "properties": { + "method": { + "type": "string" + }, + "password": { + "type": "string" + }, + "uot": { + "type": "boolean" + }, + "uotVersion": { + "type": "integer" + } + }, + "required": [ + "method", + "password", + "uot", + "uotVersion" + ] + }, + { + "type": "object", + "properties": { + "version": { + "type": "integer" + } + }, + "required": [ + "version" + ] + } + ] + }, + "transport": { + "type": "string", + "enum": [ + "tcp", + "xhttp", + "ws", + "httpupgrade", + "grpc", + "kcp", + "hysteria" + ] + }, + "transportOptions": { + "oneOf": [ + { + "type": "object", + "properties": { + "header": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "none" + ] + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "http" + ] + }, + "request": { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "method": { + "type": "string" + }, + "path": { + "type": "array", + "items": { + "type": "string" + } + }, + "headers": { + "type": "object", + "additionalProperties": {} + } + } + }, + "response": { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "status": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "headers": { + "type": "object", + "additionalProperties": {} + } + } + } + }, + "required": [ + "type" + ] + } + ], + "nullable": true + } + }, + "required": [ + "header" + ] + }, + { + "type": "object", + "properties": { + "path": { + "type": "string", + "nullable": true + }, + "host": { + "type": "string", + "nullable": true + }, + "mode": { + "type": "string", + "enum": [ + "auto", + "packet-up", + "stream-up", + "stream-one" + ] + }, + "extra": { + "type": "object", + "additionalProperties": {}, + "nullable": true + } + }, + "required": [ + "path", + "host", + "mode", + "extra" + ] + }, + { + "type": "object", + "properties": { + "path": { + "type": "string", + "nullable": true + }, + "host": { + "type": "string", + "nullable": true + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true + }, + "heartbeatPeriod": { + "type": "number", + "nullable": true + } + }, + "required": [ + "path", + "host", + "headers", + "heartbeatPeriod" + ] + }, + { + "type": "object", + "properties": { + "path": { + "type": "string", + "nullable": true + }, + "host": { + "type": "string", + "nullable": true + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true + } + }, + "required": [ + "path", + "host", + "headers" + ] + }, + { + "type": "object", + "properties": { + "authority": { + "type": "string", + "nullable": true + }, + "serviceName": { + "type": "string", + "nullable": true + }, + "multiMode": { + "type": "boolean" + } + }, + "required": [ + "authority", + "serviceName", + "multiMode" + ] + }, + { + "type": "object", + "properties": { + "clientMtu": { + "type": "integer" + }, + "clientTti": { + "type": "integer" + }, + "congestion": { + "type": "boolean" + } + }, + "required": [ + "clientMtu", + "clientTti", + "congestion" + ] + }, + { + "type": "object", + "properties": { + "version": { + "type": "integer" + }, + "auth": { + "type": "string" + } + }, + "required": [ + "version", + "auth" + ] + } + ] + }, + "security": { + "type": "string", + "enum": [ + "tls", + "reality", + "none" + ] + }, + "securityOptions": { + "oneOf": [ + { + "type": "object", + "properties": { + "pinnedPeerCertSha256": { + "type": "string", + "nullable": true + }, + "verifyPeerCertByName": { + "type": "string", + "nullable": true + }, + "alpn": { + "type": "string", + "nullable": true + }, + "enableSessionResumption": { + "type": "boolean" + }, + "fingerprint": { + "type": "string", + "nullable": true + }, + "serverName": { + "type": "string", + "nullable": true + }, + "echConfigList": { + "type": "string", + "nullable": true + }, + "echForceQuery": { + "type": "string", + "nullable": true + } + }, + "required": [ + "pinnedPeerCertSha256", + "verifyPeerCertByName", + "alpn", + "enableSessionResumption", + "fingerprint", + "serverName", + "echConfigList", + "echForceQuery" + ] + }, + { + "type": "object", + "properties": { + "fingerprint": { + "type": "string" + }, + "publicKey": { + "type": "string" + }, + "shortId": { + "type": "string", + "nullable": true + }, + "serverName": { + "type": "string" + }, + "spiderX": { + "type": "string", + "nullable": true + }, + "mldsa65Verify": { + "type": "string", + "nullable": true + } + }, + "required": [ + "fingerprint", + "publicKey", + "shortId", + "serverName", + "spiderX", + "mldsa65Verify" + ] + } + ] + }, + "streamOverrides": { + "type": "object", + "properties": { + "finalMask": { + "nullable": true + }, + "sockopt": { + "nullable": true + } + }, + "required": [ + "finalMask", + "sockopt" + ] + }, + "mux": { + "nullable": true + }, + "clientOverrides": { + "type": "object", + "properties": { + "shuffleHost": { + "type": "boolean" + }, + "mihomoX25519": { + "type": "boolean" + }, + "mihomoIpVersion": { + "type": "string", + "enum": [ + "dual", + "ipv4", + "ipv6", + "ipv4-prefer", + "ipv6-prefer" + ], + "x-enumNames": [ + "DUAL", + "IPV4", + "IPV6", + "IPV4_PREFER", + "IPV6_PREFER" + ], + "nullable": true + }, + "serverDescription": { + "type": "string", + "nullable": true + }, + "xrayJsonTemplate": { + "nullable": true + } + }, + "required": [ + "shuffleHost", + "mihomoX25519", + "mihomoIpVersion", + "serverDescription", + "xrayJsonTemplate" + ] + }, + "metadata": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "excludeFromSubscriptionTypes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + } + }, + "inboundTag": { + "type": "string" + }, + "configProfileUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "configProfileInboundUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "isDisabled": { + "type": "boolean" + }, + "isHidden": { + "type": "boolean" + }, + "viewPosition": { + "type": "integer" + }, + "remark": { + "type": "string" + }, + "vlessRouteId": { + "type": "integer", + "nullable": true + }, + "rawInbound": { + "nullable": true + } + }, + "required": [ + "uuid", + "tags", + "excludeFromSubscriptionTypes", + "inboundTag", + "configProfileUuid", + "configProfileInboundUuid", + "isDisabled", + "isHidden", + "viewPosition", + "remark", + "vlessRouteId", + "rawInbound" + ] + } + }, + "required": [ + "finalRemark", + "address", + "port", + "protocol", + "protocolOptions", + "transport", + "transportOptions", + "security", + "streamOverrides", + "mux", + "clientOverrides", + "metadata" + ] + } + } + }, + "required": [ + "user", + "convertedUserInfo", + "headers", + "resolvedProxyConfigs" + ] + } + }, + "required": [ + "response" + ] + }, + "GetSubpageConfigByShortUuidRequestBodyDto": { + "type": "object", + "properties": { + "requestHeaders": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "required": [ + "requestHeaders" + ] + }, + "GetSubpageConfigByShortUuidResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "subpageConfigUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "webpageAllowed": { + "type": "boolean" + } + }, + "required": [ + "subpageConfigUuid", + "webpageAllowed" + ] + } + }, + "required": [ + "response" + ] + }, + "GetConnectionKeysByUuidResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "enabledKeys": { + "type": "array", + "items": { + "type": "string" + } + }, + "hiddenKeys": { + "type": "array", + "items": { + "type": "string" + } + }, + "disabledKeys": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "enabledKeys", + "hiddenKeys", + "disabledKeys" + ] + } + }, + "required": [ + "response" + ] + }, + "GetTemplatesResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "templates": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "templateType": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + }, + "templateJson": { + "nullable": true + }, + "encodedTemplateYaml": { + "type": "string", + "nullable": true + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "templateType", + "templateJson", + "encodedTemplateYaml" + ] + } + } + }, + "required": [ + "total", + "templates" + ] + } + }, + "required": [ + "response" + ] + }, + "GetTemplateResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "templateType": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + }, + "templateJson": { + "nullable": true + }, + "encodedTemplateYaml": { + "type": "string", + "nullable": true + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "templateType", + "templateJson", + "encodedTemplateYaml" + ] + } + }, + "required": [ + "response" + ] + }, + "UpdateTemplateRequestDto": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string", + "minLength": 2, + "maxLength": 255, + "pattern": "^[A-Za-z0-9_\\s-]+$" + }, + "templateJson": { + "type": "object", + "properties": {} + }, + "encodedTemplateYaml": { + "type": "string" + } + }, + "required": [ + "uuid" + ] + }, + "UpdateTemplateResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "templateType": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + }, + "templateJson": { + "nullable": true + }, + "encodedTemplateYaml": { + "type": "string", + "nullable": true + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "templateType", + "templateJson", + "encodedTemplateYaml" + ] + } + }, + "required": [ + "response" + ] + }, + "DeleteSubscriptionTemplateResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "isDeleted": { + "type": "boolean" + } + }, + "required": [ + "isDeleted" + ] + } + }, + "required": [ + "response" + ] + }, + "CreateSubscriptionTemplateRequestDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 2, + "maxLength": 255, + "pattern": "^[A-Za-z0-9_\\s-]+$" + }, + "templateType": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + } + }, + "required": [ + "name", + "templateType" + ] + }, + "CreateSubscriptionTemplateResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "templateType": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + }, + "templateJson": { + "nullable": true + }, + "encodedTemplateYaml": { + "type": "string", + "nullable": true + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "templateType", + "templateJson", + "encodedTemplateYaml" + ] + } + }, + "required": [ + "response" + ] + }, + "ReorderSubscriptionTemplatesRequestDto": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "viewPosition": { + "type": "integer" + }, + "uuid": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "viewPosition", + "uuid" + ] + } + } + }, + "required": [ + "items" + ] + }, + "ReorderSubscriptionTemplatesResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "templates": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "templateType": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + }, + "templateJson": { + "nullable": true + }, + "encodedTemplateYaml": { + "type": "string", + "nullable": true + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "templateType", + "templateJson", + "encodedTemplateYaml" + ] + } + } + }, + "required": [ + "total", + "templates" + ] + } + }, + "required": [ + "response" + ] + }, + "CreateApiTokenRequestDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 2, + "maxLength": 30 + }, + "expiresInDays": { + "type": "number", + "minimum": 1, + "exclusiveMinimum": false + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + }, + "default": [ + "*" + ] + } + }, + "required": [ + "name", + "expiresInDays" + ] + }, + "CreateApiTokenResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "token": { + "type": "string" + } + }, + "required": [ + "uuid", + "name", + "expireAt", + "scopes", + "createdAt", + "updatedAt", + "token" + ] + } + }, + "required": [ + "response" + ] + }, + "DeleteApiTokenResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "boolean" + } + }, + "required": [ + "response" + ] + }, + "GetApiTokenScopesResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "wildcard": { + "type": "string" + }, + "resources": { + "type": "array", + "items": { + "type": "object", + "properties": { + "resource": { + "type": "string" + }, + "resourceScopes": { + "type": "array", + "items": { + "type": "string" + } + }, + "endpoints": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "read", + "write" + ] + }, + "method": { + "type": "string" + }, + "path": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "key", + "kind", + "method", + "path", + "description" + ] + } + } + }, + "required": [ + "resource", + "resourceScopes", + "endpoints" + ] + } + } + }, + "required": [ + "wildcard", + "resources" + ] + } + }, + "required": [ + "response" + ] + }, + "FindAllApiTokensResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "tokens": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "name", + "expireAt", + "scopes", + "createdAt", + "updatedAt" + ] + } + }, + "docs": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "scalarPath": { + "type": "string", + "nullable": true + }, + "swaggerPath": { + "type": "string", + "nullable": true + } + }, + "required": [ + "enabled", + "scalarPath", + "swaggerPath" + ] + } + }, + "required": [ + "tokens", + "docs" + ] + } + }, + "required": [ + "response" + ] + }, + "GetConfigProfilesResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "configProfiles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "config": {}, + "inbounds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "profileUuid": { + "type": "string", + "format": "uuid" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "network": { + "type": "string", + "nullable": true + }, + "security": { + "type": "string", + "nullable": true + }, + "port": { + "type": "number", + "nullable": true + }, + "rawInbound": { + "nullable": true + } + }, + "required": [ + "uuid", + "profileUuid", + "tag", + "type", + "network", + "security", + "port", + "rawInbound" + ] + } + }, + "nodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "countryCode": { + "type": "string" + } + }, + "required": [ + "uuid", + "name", + "countryCode" + ] + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "config", + "inbounds", + "nodes", + "createdAt", + "updatedAt" + ] + } + } + }, + "required": [ + "total", + "configProfiles" + ] + } + }, + "required": [ + "response" + ] + }, + "GetAllInboundsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "inbounds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "profileUuid": { + "type": "string", + "format": "uuid" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "network": { + "type": "string", + "nullable": true + }, + "security": { + "type": "string", + "nullable": true + }, + "port": { + "type": "number", + "nullable": true + }, + "rawInbound": { + "nullable": true + }, + "activeSquads": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "uuid", + "profileUuid", + "tag", + "type", + "network", + "security", + "port", + "rawInbound", + "activeSquads" + ] + } + } + }, + "required": [ + "total", + "inbounds" + ] + } + }, + "required": [ + "response" + ] + }, + "GetInboundsByProfileUuidResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "inbounds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "profileUuid": { + "type": "string", + "format": "uuid" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "network": { + "type": "string", + "nullable": true + }, + "security": { + "type": "string", + "nullable": true + }, + "port": { + "type": "number", + "nullable": true + }, + "rawInbound": { + "nullable": true + }, + "activeSquads": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "uuid", + "profileUuid", + "tag", + "type", + "network", + "security", + "port", + "rawInbound", + "activeSquads" + ] + } + } + }, + "required": [ + "total", + "inbounds" + ] + } + }, + "required": [ + "response" + ] + }, + "GetConfigProfileByUuidResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "config": {}, + "inbounds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "profileUuid": { + "type": "string", + "format": "uuid" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "network": { + "type": "string", + "nullable": true + }, + "security": { + "type": "string", + "nullable": true + }, + "port": { + "type": "number", + "nullable": true + }, + "rawInbound": { + "nullable": true + } + }, + "required": [ + "uuid", + "profileUuid", + "tag", + "type", + "network", + "security", + "port", + "rawInbound" + ] + } + }, + "nodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "countryCode": { + "type": "string" + } + }, + "required": [ + "uuid", + "name", + "countryCode" + ] + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "config", + "inbounds", + "nodes", + "createdAt", + "updatedAt" + ] + } + }, + "required": [ + "response" + ] + }, + "GetComputedConfigProfileByUuidResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "config": {}, + "inbounds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "profileUuid": { + "type": "string", + "format": "uuid" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "network": { + "type": "string", + "nullable": true + }, + "security": { + "type": "string", + "nullable": true + }, + "port": { + "type": "number", + "nullable": true + }, + "rawInbound": { + "nullable": true + } + }, + "required": [ + "uuid", + "profileUuid", + "tag", + "type", + "network", + "security", + "port", + "rawInbound" + ] + } + }, + "nodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "countryCode": { + "type": "string" + } + }, + "required": [ + "uuid", + "name", + "countryCode" + ] + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "config", + "inbounds", + "nodes", + "createdAt", + "updatedAt" + ] + } + }, + "required": [ + "response" + ] + }, + "DeleteConfigProfileResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "isDeleted": { + "type": "boolean" + } + }, + "required": [ + "isDeleted" + ] + } + }, + "required": [ + "response" + ] + }, + "CreateConfigProfileRequestDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 2, + "maxLength": 30, + "pattern": "^[A-Za-z0-9_\\s-]+$" + }, + "config": { + "type": "object", + "properties": {} + } + }, + "required": [ + "name", + "config" + ] + }, + "CreateConfigProfileResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "config": {}, + "inbounds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "profileUuid": { + "type": "string", + "format": "uuid" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "network": { + "type": "string", + "nullable": true + }, + "security": { + "type": "string", + "nullable": true + }, + "port": { + "type": "number", + "nullable": true + }, + "rawInbound": { + "nullable": true + } + }, + "required": [ + "uuid", + "profileUuid", + "tag", + "type", + "network", + "security", + "port", + "rawInbound" + ] + } + }, + "nodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "countryCode": { + "type": "string" + } + }, + "required": [ + "uuid", + "name", + "countryCode" + ] + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "config", + "inbounds", + "nodes", + "createdAt", + "updatedAt" + ] + } + }, + "required": [ + "response" + ] + }, + "UpdateConfigProfileRequestDto": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string", + "minLength": 2, + "maxLength": 30, + "pattern": "^[A-Za-z0-9_\\s-]+$" + }, + "config": { + "type": "object", + "properties": {} + } + }, + "required": [ + "uuid" + ] + }, + "UpdateConfigProfileResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "config": {}, + "inbounds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "profileUuid": { + "type": "string", + "format": "uuid" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "network": { + "type": "string", + "nullable": true + }, + "security": { + "type": "string", + "nullable": true + }, + "port": { + "type": "number", + "nullable": true + }, + "rawInbound": { + "nullable": true + } + }, + "required": [ + "uuid", + "profileUuid", + "tag", + "type", + "network", + "security", + "port", + "rawInbound" + ] + } + }, + "nodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "countryCode": { + "type": "string" + } + }, + "required": [ + "uuid", + "name", + "countryCode" + ] + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "config", + "inbounds", + "nodes", + "createdAt", + "updatedAt" + ] + } + }, + "required": [ + "response" + ] + }, + "ReorderConfigProfilesRequestDto": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "viewPosition": { + "type": "integer" + }, + "uuid": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "viewPosition", + "uuid" + ] + } + } + }, + "required": [ + "items" + ] + }, + "ReorderConfigProfilesResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "configProfiles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "config": {}, + "inbounds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "profileUuid": { + "type": "string", + "format": "uuid" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "network": { + "type": "string", + "nullable": true + }, + "security": { + "type": "string", + "nullable": true + }, + "port": { + "type": "number", + "nullable": true + }, + "rawInbound": { + "nullable": true + } + }, + "required": [ + "uuid", + "profileUuid", + "tag", + "type", + "network", + "security", + "port", + "rawInbound" + ] + } + }, + "nodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "countryCode": { + "type": "string" + } + }, + "required": [ + "uuid", + "name", + "countryCode" + ] + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "config", + "inbounds", + "nodes", + "createdAt", + "updatedAt" + ] + } + } + }, + "required": [ + "total", + "configProfiles" + ] + } + }, + "required": [ + "response" + ] + }, + "GetSnippetsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "snippets": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "snippet": {} + }, + "required": [ + "name", + "snippet" + ] + } + } + }, + "required": [ + "total", + "snippets" + ] + } + }, + "required": [ + "response" + ] + }, + "DeleteSnippetRequestDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 2, + "maxLength": 255, + "pattern": "^[A-Za-z0-9_\\s-]+$" + } + }, + "required": [ + "name" + ] + }, + "DeleteSnippetResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "snippets": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "snippet": {} + }, + "required": [ + "name", + "snippet" + ] + } + } + }, + "required": [ + "total", + "snippets" + ] + } + }, + "required": [ + "response" + ] + }, + "CreateSnippetRequestDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 2, + "maxLength": 255, + "pattern": "^[A-Za-z0-9_\\s-]+$" + }, + "snippet": { + "type": "array", + "items": { + "type": "object", + "properties": {} + } + } + }, + "required": [ + "name", + "snippet" + ] + }, + "CreateSnippetResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "snippets": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "snippet": {} + }, + "required": [ + "name", + "snippet" + ] + } + } + }, + "required": [ + "total", + "snippets" + ] + } + }, + "required": [ + "response" + ] + }, + "UpdateSnippetRequestDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 2, + "maxLength": 255, + "pattern": "^[A-Za-z0-9_\\s-]+$" + }, + "snippet": { + "type": "array", + "items": { + "type": "object", + "properties": {} + } + } + }, + "required": [ + "name", + "snippet" + ] + }, + "UpdateSnippetResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "snippets": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "snippet": {} + }, + "required": [ + "name", + "snippet" + ] + } + } + }, + "required": [ + "total", + "snippets" + ] + } + }, + "required": [ + "response" + ] + }, + "GetInternalSquadsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "internalSquads": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "info": { + "type": "object", + "properties": { + "membersCount": { + "type": "number" + }, + "inboundsCount": { + "type": "number" + } + }, + "required": [ + "membersCount", + "inboundsCount" + ] + }, + "inbounds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "profileUuid": { + "type": "string", + "format": "uuid" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "network": { + "type": "string", + "nullable": true + }, + "security": { + "type": "string", + "nullable": true + }, + "port": { + "type": "number", + "nullable": true + }, + "rawInbound": { + "nullable": true + } + }, + "required": [ + "uuid", + "profileUuid", + "tag", + "type", + "network", + "security", + "port", + "rawInbound" + ] + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "info", + "inbounds", + "createdAt", + "updatedAt" + ] + } + } + }, + "required": [ + "total", + "internalSquads" + ] + } + }, + "required": [ + "response" + ] + }, + "GetInternalSquadByUuidResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "info": { + "type": "object", + "properties": { + "membersCount": { + "type": "number" + }, + "inboundsCount": { + "type": "number" + } + }, + "required": [ + "membersCount", + "inboundsCount" + ] + }, + "inbounds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "profileUuid": { + "type": "string", + "format": "uuid" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "network": { + "type": "string", + "nullable": true + }, + "security": { + "type": "string", + "nullable": true + }, + "port": { + "type": "number", + "nullable": true + }, + "rawInbound": { + "nullable": true + } + }, + "required": [ + "uuid", + "profileUuid", + "tag", + "type", + "network", + "security", + "port", + "rawInbound" + ] + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "info", + "inbounds", + "createdAt", + "updatedAt" + ] + } + }, + "required": [ + "response" + ] + }, + "CreateInternalSquadRequestDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 2, + "maxLength": 30, + "pattern": "^[A-Za-z0-9_\\s-]+$" + }, + "inbounds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "name", + "inbounds" + ] + }, + "CreateInternalSquadResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "info": { + "type": "object", + "properties": { + "membersCount": { + "type": "number" + }, + "inboundsCount": { + "type": "number" + } + }, + "required": [ + "membersCount", + "inboundsCount" + ] + }, + "inbounds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "profileUuid": { + "type": "string", + "format": "uuid" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "network": { + "type": "string", + "nullable": true + }, + "security": { + "type": "string", + "nullable": true + }, + "port": { + "type": "number", + "nullable": true + }, + "rawInbound": { + "nullable": true + } + }, + "required": [ + "uuid", + "profileUuid", + "tag", + "type", + "network", + "security", + "port", + "rawInbound" + ] + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "info", + "inbounds", + "createdAt", + "updatedAt" + ] + } + }, + "required": [ + "response" + ] + }, + "GetInternalSquadAccessibleNodesResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "squadUuid": { + "type": "string", + "format": "uuid" + }, + "accessibleNodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "nodeName": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "configProfileUuid": { + "type": "string", + "format": "uuid" + }, + "configProfileName": { + "type": "string" + }, + "activeInbounds": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "uuid", + "nodeName", + "countryCode", + "configProfileUuid", + "configProfileName", + "activeInbounds" + ] + } + } + }, + "required": [ + "squadUuid", + "accessibleNodes" + ] + } + }, + "required": [ + "response" + ] + }, + "UpdateInternalSquadRequestDto": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string", + "minLength": 2, + "maxLength": 30, + "pattern": "^[A-Za-z0-9_\\s-]+$" + }, + "inbounds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "uuid" + ] + }, + "UpdateInternalSquadResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "info": { + "type": "object", + "properties": { + "membersCount": { + "type": "number" + }, + "inboundsCount": { + "type": "number" + } + }, + "required": [ + "membersCount", + "inboundsCount" + ] + }, + "inbounds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "profileUuid": { + "type": "string", + "format": "uuid" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "network": { + "type": "string", + "nullable": true + }, + "security": { + "type": "string", + "nullable": true + }, + "port": { + "type": "number", + "nullable": true + }, + "rawInbound": { + "nullable": true + } + }, + "required": [ + "uuid", + "profileUuid", + "tag", + "type", + "network", + "security", + "port", + "rawInbound" + ] + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "info", + "inbounds", + "createdAt", + "updatedAt" + ] + } + }, + "required": [ + "response" + ] + }, + "DeleteInternalSquadResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "isDeleted": { + "type": "boolean" + } + }, + "required": [ + "isDeleted" + ] + } + }, + "required": [ + "response" + ] + }, + "AddUsersToInternalSquadResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "eventSent": { + "type": "boolean" + } + }, + "required": [ + "eventSent" + ] + } + }, + "required": [ + "response" + ] + }, + "RemoveUsersFromInternalSquadResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "eventSent": { + "type": "boolean" + } + }, + "required": [ + "eventSent" + ] + } + }, + "required": [ + "response" + ] + }, + "ReorderInternalSquadsRequestDto": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "viewPosition": { + "type": "integer" + }, + "uuid": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "viewPosition", + "uuid" + ] + } + } + }, + "required": [ + "items" + ] + }, + "ReorderInternalSquadsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "internalSquads": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "info": { + "type": "object", + "properties": { + "membersCount": { + "type": "number" + }, + "inboundsCount": { + "type": "number" + } + }, + "required": [ + "membersCount", + "inboundsCount" + ] + }, + "inbounds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "profileUuid": { + "type": "string", + "format": "uuid" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "network": { + "type": "string", + "nullable": true + }, + "security": { + "type": "string", + "nullable": true + }, + "port": { + "type": "number", + "nullable": true + }, + "rawInbound": { + "nullable": true + } + }, + "required": [ + "uuid", + "profileUuid", + "tag", + "type", + "network", + "security", + "port", + "rawInbound" + ] + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "info", + "inbounds", + "createdAt", + "updatedAt" + ] + } + } + }, + "required": [ + "total", + "internalSquads" + ] + } + }, + "required": [ + "response" + ] + }, + "GetExternalSquadsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "externalSquads": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "info": { + "type": "object", + "properties": { + "membersCount": { + "type": "number" + } + }, + "required": [ + "membersCount" + ] + }, + "templates": { + "type": "array", + "items": { + "type": "object", + "properties": { + "templateUuid": { + "type": "string", + "format": "uuid" + }, + "templateType": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + } + }, + "required": [ + "templateUuid", + "templateType" + ] + } + }, + "subscriptionSettings": { + "type": "object", + "properties": { + "profileTitle": { + "type": "string" + }, + "supportLink": { + "type": "string" + }, + "profileUpdateInterval": { + "type": "integer", + "minimum": 1, + "exclusiveMinimum": false + }, + "isProfileWebpageUrlEnabled": { + "type": "boolean" + }, + "serveJsonAtBaseSubscription": { + "type": "boolean" + }, + "isShowCustomRemarks": { + "type": "boolean" + }, + "happAnnounce": { + "type": "string", + "nullable": true + }, + "happRouting": { + "type": "string", + "nullable": true + }, + "randomizeHosts": { + "type": "boolean" + } + }, + "nullable": true + }, + "hostOverrides": { + "type": "object", + "properties": { + "serverDescription": { + "type": "string", + "maxLength": 30, + "nullable": true + }, + "vlessRouteId": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 65535, + "exclusiveMaximum": false, + "nullable": true + } + }, + "nullable": true + }, + "responseHeaders": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true + }, + "hwidSettings": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "fallbackDeviceLimit": { + "type": "number" + }, + "maxDevicesAnnounce": { + "type": "string", + "maxLength": 200, + "nullable": true + } + }, + "required": [ + "enabled", + "fallbackDeviceLimit", + "maxDevicesAnnounce" + ], + "nullable": true + }, + "customRemarks": { + "type": "object", + "properties": { + "expiredUsers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "limitedUsers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "disabledUsers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "emptyHosts": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "HWIDMaxDevicesExceeded": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "HWIDNotSupported": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + }, + "required": [ + "expiredUsers", + "limitedUsers", + "disabledUsers", + "emptyHosts", + "HWIDMaxDevicesExceeded", + "HWIDNotSupported" + ], + "nullable": true + }, + "subpageConfigUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "info", + "templates", + "subscriptionSettings", + "hostOverrides", + "responseHeaders", + "hwidSettings", + "customRemarks", + "subpageConfigUuid", + "createdAt", + "updatedAt" + ] + } + } + }, + "required": [ + "total", + "externalSquads" + ] + } + }, + "required": [ + "response" + ] + }, + "GetExternalSquadByUuidResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "info": { + "type": "object", + "properties": { + "membersCount": { + "type": "number" + } + }, + "required": [ + "membersCount" + ] + }, + "templates": { + "type": "array", + "items": { + "type": "object", + "properties": { + "templateUuid": { + "type": "string", + "format": "uuid" + }, + "templateType": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + } + }, + "required": [ + "templateUuid", + "templateType" + ] + } + }, + "subscriptionSettings": { + "type": "object", + "properties": { + "profileTitle": { + "type": "string" + }, + "supportLink": { + "type": "string" + }, + "profileUpdateInterval": { + "type": "integer", + "minimum": 1, + "exclusiveMinimum": false + }, + "isProfileWebpageUrlEnabled": { + "type": "boolean" + }, + "serveJsonAtBaseSubscription": { + "type": "boolean" + }, + "isShowCustomRemarks": { + "type": "boolean" + }, + "happAnnounce": { + "type": "string", + "nullable": true + }, + "happRouting": { + "type": "string", + "nullable": true + }, + "randomizeHosts": { + "type": "boolean" + } + }, + "nullable": true + }, + "hostOverrides": { + "type": "object", + "properties": { + "serverDescription": { + "type": "string", + "maxLength": 30, + "nullable": true + }, + "vlessRouteId": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 65535, + "exclusiveMaximum": false, + "nullable": true + } + }, + "nullable": true + }, + "responseHeaders": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true + }, + "hwidSettings": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "fallbackDeviceLimit": { + "type": "number" + }, + "maxDevicesAnnounce": { + "type": "string", + "maxLength": 200, + "nullable": true + } + }, + "required": [ + "enabled", + "fallbackDeviceLimit", + "maxDevicesAnnounce" + ], + "nullable": true + }, + "customRemarks": { + "type": "object", + "properties": { + "expiredUsers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "limitedUsers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "disabledUsers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "emptyHosts": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "HWIDMaxDevicesExceeded": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "HWIDNotSupported": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + }, + "required": [ + "expiredUsers", + "limitedUsers", + "disabledUsers", + "emptyHosts", + "HWIDMaxDevicesExceeded", + "HWIDNotSupported" + ], + "nullable": true + }, + "subpageConfigUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "info", + "templates", + "subscriptionSettings", + "hostOverrides", + "responseHeaders", + "hwidSettings", + "customRemarks", + "subpageConfigUuid", + "createdAt", + "updatedAt" + ] + } + }, + "required": [ + "response" + ] + }, + "CreateExternalSquadRequestDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 2, + "maxLength": 30, + "pattern": "^[A-Za-z0-9_\\s-]+$" + } + }, + "required": [ + "name" + ] + }, + "CreateExternalSquadResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "info": { + "type": "object", + "properties": { + "membersCount": { + "type": "number" + } + }, + "required": [ + "membersCount" + ] + }, + "templates": { + "type": "array", + "items": { + "type": "object", + "properties": { + "templateUuid": { + "type": "string", + "format": "uuid" + }, + "templateType": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + } + }, + "required": [ + "templateUuid", + "templateType" + ] + } + }, + "subscriptionSettings": { + "type": "object", + "properties": { + "profileTitle": { + "type": "string" + }, + "supportLink": { + "type": "string" + }, + "profileUpdateInterval": { + "type": "integer", + "minimum": 1, + "exclusiveMinimum": false + }, + "isProfileWebpageUrlEnabled": { + "type": "boolean" + }, + "serveJsonAtBaseSubscription": { + "type": "boolean" + }, + "isShowCustomRemarks": { + "type": "boolean" + }, + "happAnnounce": { + "type": "string", + "nullable": true + }, + "happRouting": { + "type": "string", + "nullable": true + }, + "randomizeHosts": { + "type": "boolean" + } + }, + "nullable": true + }, + "hostOverrides": { + "type": "object", + "properties": { + "serverDescription": { + "type": "string", + "maxLength": 30, + "nullable": true + }, + "vlessRouteId": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 65535, + "exclusiveMaximum": false, + "nullable": true + } + }, + "nullable": true + }, + "responseHeaders": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true + }, + "hwidSettings": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "fallbackDeviceLimit": { + "type": "number" + }, + "maxDevicesAnnounce": { + "type": "string", + "maxLength": 200, + "nullable": true + } + }, + "required": [ + "enabled", + "fallbackDeviceLimit", + "maxDevicesAnnounce" + ], + "nullable": true + }, + "customRemarks": { + "type": "object", + "properties": { + "expiredUsers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "limitedUsers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "disabledUsers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "emptyHosts": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "HWIDMaxDevicesExceeded": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "HWIDNotSupported": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + }, + "required": [ + "expiredUsers", + "limitedUsers", + "disabledUsers", + "emptyHosts", + "HWIDMaxDevicesExceeded", + "HWIDNotSupported" + ], + "nullable": true + }, + "subpageConfigUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "info", + "templates", + "subscriptionSettings", + "hostOverrides", + "responseHeaders", + "hwidSettings", + "customRemarks", + "subpageConfigUuid", + "createdAt", + "updatedAt" + ] + } + }, + "required": [ + "response" + ] + }, + "UpdateExternalSquadRequestDto": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string", + "minLength": 2, + "maxLength": 30, + "pattern": "^[A-Za-z0-9_\\s-]+$" + }, + "templates": { + "type": "array", + "items": { + "type": "object", + "properties": { + "templateUuid": { + "type": "string", + "format": "uuid" + }, + "templateType": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + } + }, + "required": [ + "templateUuid", + "templateType" + ] + } + }, + "subscriptionSettings": { + "type": "object", + "properties": { + "profileTitle": { + "type": "string" + }, + "supportLink": { + "type": "string" + }, + "profileUpdateInterval": { + "type": "integer", + "minimum": 1, + "exclusiveMinimum": false + }, + "isProfileWebpageUrlEnabled": { + "type": "boolean" + }, + "serveJsonAtBaseSubscription": { + "type": "boolean" + }, + "isShowCustomRemarks": { + "type": "boolean" + }, + "happAnnounce": { + "type": "string", + "nullable": true + }, + "happRouting": { + "type": "string", + "nullable": true + }, + "randomizeHosts": { + "type": "boolean" + } + } + }, + "hostOverrides": { + "type": "object", + "properties": { + "serverDescription": { + "type": "string", + "maxLength": 30, + "nullable": true + }, + "vlessRouteId": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 65535, + "exclusiveMaximum": false, + "nullable": true + } + } + }, + "responseHeaders": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true + }, + "hwidSettings": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "fallbackDeviceLimit": { + "type": "number" + }, + "maxDevicesAnnounce": { + "type": "string", + "maxLength": 200, + "nullable": true + } + }, + "required": [ + "enabled", + "fallbackDeviceLimit", + "maxDevicesAnnounce" + ], + "nullable": true + }, + "customRemarks": { + "type": "object", + "properties": { + "expiredUsers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "limitedUsers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "disabledUsers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "emptyHosts": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "HWIDMaxDevicesExceeded": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "HWIDNotSupported": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + }, + "required": [ + "expiredUsers", + "limitedUsers", + "disabledUsers", + "emptyHosts", + "HWIDMaxDevicesExceeded", + "HWIDNotSupported" + ], + "nullable": true + }, + "subpageConfigUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "uuid" + ] + }, + "UpdateExternalSquadResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "info": { + "type": "object", + "properties": { + "membersCount": { + "type": "number" + } + }, + "required": [ + "membersCount" + ] + }, + "templates": { + "type": "array", + "items": { + "type": "object", + "properties": { + "templateUuid": { + "type": "string", + "format": "uuid" + }, + "templateType": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + } + }, + "required": [ + "templateUuid", + "templateType" + ] + } + }, + "subscriptionSettings": { + "type": "object", + "properties": { + "profileTitle": { + "type": "string" + }, + "supportLink": { + "type": "string" + }, + "profileUpdateInterval": { + "type": "integer", + "minimum": 1, + "exclusiveMinimum": false + }, + "isProfileWebpageUrlEnabled": { + "type": "boolean" + }, + "serveJsonAtBaseSubscription": { + "type": "boolean" + }, + "isShowCustomRemarks": { + "type": "boolean" + }, + "happAnnounce": { + "type": "string", + "nullable": true + }, + "happRouting": { + "type": "string", + "nullable": true + }, + "randomizeHosts": { + "type": "boolean" + } + }, + "nullable": true + }, + "hostOverrides": { + "type": "object", + "properties": { + "serverDescription": { + "type": "string", + "maxLength": 30, + "nullable": true + }, + "vlessRouteId": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 65535, + "exclusiveMaximum": false, + "nullable": true + } + }, + "nullable": true + }, + "responseHeaders": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true + }, + "hwidSettings": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "fallbackDeviceLimit": { + "type": "number" + }, + "maxDevicesAnnounce": { + "type": "string", + "maxLength": 200, + "nullable": true + } + }, + "required": [ + "enabled", + "fallbackDeviceLimit", + "maxDevicesAnnounce" + ], + "nullable": true + }, + "customRemarks": { + "type": "object", + "properties": { + "expiredUsers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "limitedUsers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "disabledUsers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "emptyHosts": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "HWIDMaxDevicesExceeded": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "HWIDNotSupported": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + }, + "required": [ + "expiredUsers", + "limitedUsers", + "disabledUsers", + "emptyHosts", + "HWIDMaxDevicesExceeded", + "HWIDNotSupported" + ], + "nullable": true + }, + "subpageConfigUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "info", + "templates", + "subscriptionSettings", + "hostOverrides", + "responseHeaders", + "hwidSettings", + "customRemarks", + "subpageConfigUuid", + "createdAt", + "updatedAt" + ] + } + }, + "required": [ + "response" + ] + }, + "DeleteExternalSquadResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "isDeleted": { + "type": "boolean" + } + }, + "required": [ + "isDeleted" + ] + } + }, + "required": [ + "response" + ] + }, + "AddUsersToExternalSquadResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "eventSent": { + "type": "boolean" + } + }, + "required": [ + "eventSent" + ] + } + }, + "required": [ + "response" + ] + }, + "RemoveUsersFromExternalSquadResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "eventSent": { + "type": "boolean" + } + }, + "required": [ + "eventSent" + ] + } + }, + "required": [ + "response" + ] + }, + "ReorderExternalSquadsRequestDto": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "viewPosition": { + "type": "integer" + }, + "uuid": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "viewPosition", + "uuid" + ] + } + } + }, + "required": [ + "items" + ] + }, + "ReorderExternalSquadsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "externalSquads": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "info": { + "type": "object", + "properties": { + "membersCount": { + "type": "number" + } + }, + "required": [ + "membersCount" + ] + }, + "templates": { + "type": "array", + "items": { + "type": "object", + "properties": { + "templateUuid": { + "type": "string", + "format": "uuid" + }, + "templateType": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + } + }, + "required": [ + "templateUuid", + "templateType" + ] + } + }, + "subscriptionSettings": { + "type": "object", + "properties": { + "profileTitle": { + "type": "string" + }, + "supportLink": { + "type": "string" + }, + "profileUpdateInterval": { + "type": "integer", + "minimum": 1, + "exclusiveMinimum": false + }, + "isProfileWebpageUrlEnabled": { + "type": "boolean" + }, + "serveJsonAtBaseSubscription": { + "type": "boolean" + }, + "isShowCustomRemarks": { + "type": "boolean" + }, + "happAnnounce": { + "type": "string", + "nullable": true + }, + "happRouting": { + "type": "string", + "nullable": true + }, + "randomizeHosts": { + "type": "boolean" + } + }, + "nullable": true + }, + "hostOverrides": { + "type": "object", + "properties": { + "serverDescription": { + "type": "string", + "maxLength": 30, + "nullable": true + }, + "vlessRouteId": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 65535, + "exclusiveMaximum": false, + "nullable": true + } + }, + "nullable": true + }, + "responseHeaders": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true + }, + "hwidSettings": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "fallbackDeviceLimit": { + "type": "number" + }, + "maxDevicesAnnounce": { + "type": "string", + "maxLength": 200, + "nullable": true + } + }, + "required": [ + "enabled", + "fallbackDeviceLimit", + "maxDevicesAnnounce" + ], + "nullable": true + }, + "customRemarks": { + "type": "object", + "properties": { + "expiredUsers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "limitedUsers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "disabledUsers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "emptyHosts": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "HWIDMaxDevicesExceeded": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "HWIDNotSupported": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + }, + "required": [ + "expiredUsers", + "limitedUsers", + "disabledUsers", + "emptyHosts", + "HWIDMaxDevicesExceeded", + "HWIDNotSupported" + ], + "nullable": true + }, + "subpageConfigUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "info", + "templates", + "subscriptionSettings", + "hostOverrides", + "responseHeaders", + "hwidSettings", + "customRemarks", + "subpageConfigUuid", + "createdAt", + "updatedAt" + ] + } + } + }, + "required": [ + "total", + "externalSquads" + ] + } + }, + "required": [ + "response" + ] + }, + "GetPubKeyResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "pubKey": { + "type": "string" + } + }, + "required": [ + "pubKey" + ] + } + }, + "required": [ + "response" + ] + }, + "GetAllNodesTagsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "tags" + ] + } + }, + "required": [ + "response" + ] + }, + "CreateNodeRequestDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 3, + "maxLength": 30 + }, + "address": { + "type": "string", + "minLength": 2 + }, + "port": { + "type": "integer", + "minimum": 1, + "exclusiveMinimum": false, + "maximum": 65535, + "exclusiveMaximum": false + }, + "proxyUrl": { + "type": "string", + "pattern": "^socks5:\\/\\/(?:[^:@/\\s]+(?::[^@/\\s]*)?@)?[^:@/\\s]+:\\d{1,5}$", + "nullable": true + }, + "isTrafficTrackingActive": { + "type": "boolean", + "default": false + }, + "trafficLimitBytes": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": false + }, + "notifyPercent": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 100, + "exclusiveMaximum": false + }, + "trafficResetDay": { + "type": "integer", + "minimum": 1, + "exclusiveMinimum": false, + "maximum": 31, + "exclusiveMaximum": false + }, + "countryCode": { + "type": "string", + "maxLength": 2, + "default": "XX" + }, + "consumptionMultiplier": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 100, + "exclusiveMaximum": false + }, + "nodeConsumptionMultiplier": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 100, + "exclusiveMaximum": false + }, + "configProfile": { + "type": "object", + "properties": { + "activeConfigProfileUuid": { + "type": "string", + "format": "uuid" + }, + "activeInbounds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "activeConfigProfileUuid", + "activeInbounds" + ] + }, + "providerUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "tags": { + "type": "array", + "maxItems": 10, + "items": { + "type": "string", + "pattern": "^[A-Z0-9_:]+$", + "maxLength": 36 + } + }, + "activePluginUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "note": { + "type": "string", + "maxLength": 255 + } + }, + "required": [ + "name", + "address", + "configProfile" + ] + }, + "CreateNodeResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "address": { + "type": "string" + }, + "port": { + "type": "integer", + "nullable": true + }, + "proxyUrl": { + "type": "string", + "nullable": true + }, + "isConnected": { + "type": "boolean" + }, + "isDisabled": { + "type": "boolean" + }, + "isConnecting": { + "type": "boolean" + }, + "lastStatusChange": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastStatusMessage": { + "type": "string", + "nullable": true + }, + "isTrafficTrackingActive": { + "type": "boolean" + }, + "trafficResetDay": { + "type": "integer", + "nullable": true + }, + "trafficLimitBytes": { + "type": "number", + "nullable": true + }, + "trafficUsedBytes": { + "type": "number", + "nullable": true + }, + "notifyPercent": { + "type": "integer", + "nullable": true + }, + "viewPosition": { + "type": "integer" + }, + "countryCode": { + "type": "string" + }, + "consumptionMultiplier": { + "type": "number" + }, + "nodeConsumptionMultiplier": { + "type": "number" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "configProfile": { + "type": "object", + "properties": { + "activeConfigProfileUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "activeInbounds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "profileUuid": { + "type": "string", + "format": "uuid" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "network": { + "type": "string", + "nullable": true + }, + "security": { + "type": "string", + "nullable": true + }, + "port": { + "type": "number", + "nullable": true + }, + "rawInbound": { + "nullable": true + } + }, + "required": [ + "uuid", + "profileUuid", + "tag", + "type", + "network", + "security", + "port", + "rawInbound" + ] + } + } + }, + "required": [ + "activeConfigProfileUuid", + "activeInbounds" + ] + }, + "providerUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "provider": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "faviconLink": { + "type": "string", + "nullable": true + }, + "loginUrl": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "name", + "faviconLink", + "loginUrl", + "createdAt", + "updatedAt" + ], + "nullable": true + }, + "activePluginUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "system": { + "type": "object", + "properties": { + "info": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "cpus": { + "type": "integer" + }, + "cpuModel": { + "type": "string" + }, + "memoryTotal": { + "type": "number" + }, + "hostname": { + "type": "string" + }, + "platform": { + "type": "string" + }, + "release": { + "type": "string" + }, + "type": { + "type": "string" + }, + "version": { + "type": "string" + }, + "networkInterfaces": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "arch", + "cpus", + "cpuModel", + "memoryTotal", + "hostname", + "platform", + "release", + "type", + "version", + "networkInterfaces" + ] + }, + "stats": { + "type": "object", + "properties": { + "memoryFree": { + "type": "number" + }, + "memoryUsed": { + "type": "number" + }, + "uptime": { + "type": "number" + }, + "loadAvg": { + "type": "array", + "items": { + "type": "number" + } + }, + "interface": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "rxBytesPerSec": { + "type": "number" + }, + "txBytesPerSec": { + "type": "number" + }, + "rxTotal": { + "type": "number" + }, + "txTotal": { + "type": "number" + } + }, + "required": [ + "interface", + "rxBytesPerSec", + "txBytesPerSec", + "rxTotal", + "txTotal" + ], + "nullable": true + } + }, + "required": [ + "memoryFree", + "memoryUsed", + "uptime", + "loadAvg", + "interface" + ] + } + }, + "required": [ + "info", + "stats" + ], + "nullable": true + }, + "versions": { + "type": "object", + "properties": { + "xray": { + "type": "string" + }, + "node": { + "type": "string" + } + }, + "required": [ + "xray", + "node" + ], + "nullable": true + }, + "xrayUptime": { + "type": "number" + }, + "usersOnline": { + "type": "number" + }, + "note": { + "type": "string", + "nullable": true + } + }, + "required": [ + "uuid", + "name", + "address", + "port", + "proxyUrl", + "isConnected", + "isDisabled", + "isConnecting", + "lastStatusChange", + "lastStatusMessage", + "isTrafficTrackingActive", + "trafficResetDay", + "trafficLimitBytes", + "trafficUsedBytes", + "notifyPercent", + "viewPosition", + "countryCode", + "consumptionMultiplier", + "nodeConsumptionMultiplier", + "tags", + "createdAt", + "updatedAt", + "configProfile", + "providerUuid", + "provider", + "activePluginUuid", + "system", + "versions", + "xrayUptime", + "usersOnline", + "note" + ] + } + }, + "required": [ + "response" + ] + }, + "GetAllNodesResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "address": { + "type": "string" + }, + "port": { + "type": "integer", + "nullable": true + }, + "proxyUrl": { + "type": "string", + "nullable": true + }, + "isConnected": { + "type": "boolean" + }, + "isDisabled": { + "type": "boolean" + }, + "isConnecting": { + "type": "boolean" + }, + "lastStatusChange": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastStatusMessage": { + "type": "string", + "nullable": true + }, + "isTrafficTrackingActive": { + "type": "boolean" + }, + "trafficResetDay": { + "type": "integer", + "nullable": true + }, + "trafficLimitBytes": { + "type": "number", + "nullable": true + }, + "trafficUsedBytes": { + "type": "number", + "nullable": true + }, + "notifyPercent": { + "type": "integer", + "nullable": true + }, + "viewPosition": { + "type": "integer" + }, + "countryCode": { + "type": "string" + }, + "consumptionMultiplier": { + "type": "number" + }, + "nodeConsumptionMultiplier": { + "type": "number" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "configProfile": { + "type": "object", + "properties": { + "activeConfigProfileUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "activeInbounds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "profileUuid": { + "type": "string", + "format": "uuid" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "network": { + "type": "string", + "nullable": true + }, + "security": { + "type": "string", + "nullable": true + }, + "port": { + "type": "number", + "nullable": true + }, + "rawInbound": { + "nullable": true + } + }, + "required": [ + "uuid", + "profileUuid", + "tag", + "type", + "network", + "security", + "port", + "rawInbound" + ] + } + } + }, + "required": [ + "activeConfigProfileUuid", + "activeInbounds" + ] + }, + "providerUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "provider": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "faviconLink": { + "type": "string", + "nullable": true + }, + "loginUrl": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "name", + "faviconLink", + "loginUrl", + "createdAt", + "updatedAt" + ], + "nullable": true + }, + "activePluginUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "system": { + "type": "object", + "properties": { + "info": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "cpus": { + "type": "integer" + }, + "cpuModel": { + "type": "string" + }, + "memoryTotal": { + "type": "number" + }, + "hostname": { + "type": "string" + }, + "platform": { + "type": "string" + }, + "release": { + "type": "string" + }, + "type": { + "type": "string" + }, + "version": { + "type": "string" + }, + "networkInterfaces": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "arch", + "cpus", + "cpuModel", + "memoryTotal", + "hostname", + "platform", + "release", + "type", + "version", + "networkInterfaces" + ] + }, + "stats": { + "type": "object", + "properties": { + "memoryFree": { + "type": "number" + }, + "memoryUsed": { + "type": "number" + }, + "uptime": { + "type": "number" + }, + "loadAvg": { + "type": "array", + "items": { + "type": "number" + } + }, + "interface": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "rxBytesPerSec": { + "type": "number" + }, + "txBytesPerSec": { + "type": "number" + }, + "rxTotal": { + "type": "number" + }, + "txTotal": { + "type": "number" + } + }, + "required": [ + "interface", + "rxBytesPerSec", + "txBytesPerSec", + "rxTotal", + "txTotal" + ], + "nullable": true + } + }, + "required": [ + "memoryFree", + "memoryUsed", + "uptime", + "loadAvg", + "interface" + ] + } + }, + "required": [ + "info", + "stats" + ], + "nullable": true + }, + "versions": { + "type": "object", + "properties": { + "xray": { + "type": "string" + }, + "node": { + "type": "string" + } + }, + "required": [ + "xray", + "node" + ], + "nullable": true + }, + "xrayUptime": { + "type": "number" + }, + "usersOnline": { + "type": "number" + }, + "note": { + "type": "string", + "nullable": true + } + }, + "required": [ + "uuid", + "name", + "address", + "port", + "proxyUrl", + "isConnected", + "isDisabled", + "isConnecting", + "lastStatusChange", + "lastStatusMessage", + "isTrafficTrackingActive", + "trafficResetDay", + "trafficLimitBytes", + "trafficUsedBytes", + "notifyPercent", + "viewPosition", + "countryCode", + "consumptionMultiplier", + "nodeConsumptionMultiplier", + "tags", + "createdAt", + "updatedAt", + "configProfile", + "providerUuid", + "provider", + "activePluginUuid", + "system", + "versions", + "xrayUptime", + "usersOnline", + "note" + ] + } + } + }, + "required": [ + "response" + ] + }, + "GetOneNodeResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "address": { + "type": "string" + }, + "port": { + "type": "integer", + "nullable": true + }, + "proxyUrl": { + "type": "string", + "nullable": true + }, + "isConnected": { + "type": "boolean" + }, + "isDisabled": { + "type": "boolean" + }, + "isConnecting": { + "type": "boolean" + }, + "lastStatusChange": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastStatusMessage": { + "type": "string", + "nullable": true + }, + "isTrafficTrackingActive": { + "type": "boolean" + }, + "trafficResetDay": { + "type": "integer", + "nullable": true + }, + "trafficLimitBytes": { + "type": "number", + "nullable": true + }, + "trafficUsedBytes": { + "type": "number", + "nullable": true + }, + "notifyPercent": { + "type": "integer", + "nullable": true + }, + "viewPosition": { + "type": "integer" + }, + "countryCode": { + "type": "string" + }, + "consumptionMultiplier": { + "type": "number" + }, + "nodeConsumptionMultiplier": { + "type": "number" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "configProfile": { + "type": "object", + "properties": { + "activeConfigProfileUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "activeInbounds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "profileUuid": { + "type": "string", + "format": "uuid" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "network": { + "type": "string", + "nullable": true + }, + "security": { + "type": "string", + "nullable": true + }, + "port": { + "type": "number", + "nullable": true + }, + "rawInbound": { + "nullable": true + } + }, + "required": [ + "uuid", + "profileUuid", + "tag", + "type", + "network", + "security", + "port", + "rawInbound" + ] + } + } + }, + "required": [ + "activeConfigProfileUuid", + "activeInbounds" + ] + }, + "providerUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "provider": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "faviconLink": { + "type": "string", + "nullable": true + }, + "loginUrl": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "name", + "faviconLink", + "loginUrl", + "createdAt", + "updatedAt" + ], + "nullable": true + }, + "activePluginUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "system": { + "type": "object", + "properties": { + "info": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "cpus": { + "type": "integer" + }, + "cpuModel": { + "type": "string" + }, + "memoryTotal": { + "type": "number" + }, + "hostname": { + "type": "string" + }, + "platform": { + "type": "string" + }, + "release": { + "type": "string" + }, + "type": { + "type": "string" + }, + "version": { + "type": "string" + }, + "networkInterfaces": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "arch", + "cpus", + "cpuModel", + "memoryTotal", + "hostname", + "platform", + "release", + "type", + "version", + "networkInterfaces" + ] + }, + "stats": { + "type": "object", + "properties": { + "memoryFree": { + "type": "number" + }, + "memoryUsed": { + "type": "number" + }, + "uptime": { + "type": "number" + }, + "loadAvg": { + "type": "array", + "items": { + "type": "number" + } + }, + "interface": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "rxBytesPerSec": { + "type": "number" + }, + "txBytesPerSec": { + "type": "number" + }, + "rxTotal": { + "type": "number" + }, + "txTotal": { + "type": "number" + } + }, + "required": [ + "interface", + "rxBytesPerSec", + "txBytesPerSec", + "rxTotal", + "txTotal" + ], + "nullable": true + } + }, + "required": [ + "memoryFree", + "memoryUsed", + "uptime", + "loadAvg", + "interface" + ] + } + }, + "required": [ + "info", + "stats" + ], + "nullable": true + }, + "versions": { + "type": "object", + "properties": { + "xray": { + "type": "string" + }, + "node": { + "type": "string" + } + }, + "required": [ + "xray", + "node" + ], + "nullable": true + }, + "xrayUptime": { + "type": "number" + }, + "usersOnline": { + "type": "number" + }, + "note": { + "type": "string", + "nullable": true + } + }, + "required": [ + "uuid", + "name", + "address", + "port", + "proxyUrl", + "isConnected", + "isDisabled", + "isConnecting", + "lastStatusChange", + "lastStatusMessage", + "isTrafficTrackingActive", + "trafficResetDay", + "trafficLimitBytes", + "trafficUsedBytes", + "notifyPercent", + "viewPosition", + "countryCode", + "consumptionMultiplier", + "nodeConsumptionMultiplier", + "tags", + "createdAt", + "updatedAt", + "configProfile", + "providerUuid", + "provider", + "activePluginUuid", + "system", + "versions", + "xrayUptime", + "usersOnline", + "note" + ] + } + }, + "required": [ + "response" + ] + }, + "EnableNodeResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "address": { + "type": "string" + }, + "port": { + "type": "integer", + "nullable": true + }, + "proxyUrl": { + "type": "string", + "nullable": true + }, + "isConnected": { + "type": "boolean" + }, + "isDisabled": { + "type": "boolean" + }, + "isConnecting": { + "type": "boolean" + }, + "lastStatusChange": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastStatusMessage": { + "type": "string", + "nullable": true + }, + "isTrafficTrackingActive": { + "type": "boolean" + }, + "trafficResetDay": { + "type": "integer", + "nullable": true + }, + "trafficLimitBytes": { + "type": "number", + "nullable": true + }, + "trafficUsedBytes": { + "type": "number", + "nullable": true + }, + "notifyPercent": { + "type": "integer", + "nullable": true + }, + "viewPosition": { + "type": "integer" + }, + "countryCode": { + "type": "string" + }, + "consumptionMultiplier": { + "type": "number" + }, + "nodeConsumptionMultiplier": { + "type": "number" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "configProfile": { + "type": "object", + "properties": { + "activeConfigProfileUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "activeInbounds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "profileUuid": { + "type": "string", + "format": "uuid" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "network": { + "type": "string", + "nullable": true + }, + "security": { + "type": "string", + "nullable": true + }, + "port": { + "type": "number", + "nullable": true + }, + "rawInbound": { + "nullable": true + } + }, + "required": [ + "uuid", + "profileUuid", + "tag", + "type", + "network", + "security", + "port", + "rawInbound" + ] + } + } + }, + "required": [ + "activeConfigProfileUuid", + "activeInbounds" + ] + }, + "providerUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "provider": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "faviconLink": { + "type": "string", + "nullable": true + }, + "loginUrl": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "name", + "faviconLink", + "loginUrl", + "createdAt", + "updatedAt" + ], + "nullable": true + }, + "activePluginUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "system": { + "type": "object", + "properties": { + "info": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "cpus": { + "type": "integer" + }, + "cpuModel": { + "type": "string" + }, + "memoryTotal": { + "type": "number" + }, + "hostname": { + "type": "string" + }, + "platform": { + "type": "string" + }, + "release": { + "type": "string" + }, + "type": { + "type": "string" + }, + "version": { + "type": "string" + }, + "networkInterfaces": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "arch", + "cpus", + "cpuModel", + "memoryTotal", + "hostname", + "platform", + "release", + "type", + "version", + "networkInterfaces" + ] + }, + "stats": { + "type": "object", + "properties": { + "memoryFree": { + "type": "number" + }, + "memoryUsed": { + "type": "number" + }, + "uptime": { + "type": "number" + }, + "loadAvg": { + "type": "array", + "items": { + "type": "number" + } + }, + "interface": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "rxBytesPerSec": { + "type": "number" + }, + "txBytesPerSec": { + "type": "number" + }, + "rxTotal": { + "type": "number" + }, + "txTotal": { + "type": "number" + } + }, + "required": [ + "interface", + "rxBytesPerSec", + "txBytesPerSec", + "rxTotal", + "txTotal" + ], + "nullable": true + } + }, + "required": [ + "memoryFree", + "memoryUsed", + "uptime", + "loadAvg", + "interface" + ] + } + }, + "required": [ + "info", + "stats" + ], + "nullable": true + }, + "versions": { + "type": "object", + "properties": { + "xray": { + "type": "string" + }, + "node": { + "type": "string" + } + }, + "required": [ + "xray", + "node" + ], + "nullable": true + }, + "xrayUptime": { + "type": "number" + }, + "usersOnline": { + "type": "number" + }, + "note": { + "type": "string", + "nullable": true + } + }, + "required": [ + "uuid", + "name", + "address", + "port", + "proxyUrl", + "isConnected", + "isDisabled", + "isConnecting", + "lastStatusChange", + "lastStatusMessage", + "isTrafficTrackingActive", + "trafficResetDay", + "trafficLimitBytes", + "trafficUsedBytes", + "notifyPercent", + "viewPosition", + "countryCode", + "consumptionMultiplier", + "nodeConsumptionMultiplier", + "tags", + "createdAt", + "updatedAt", + "configProfile", + "providerUuid", + "provider", + "activePluginUuid", + "system", + "versions", + "xrayUptime", + "usersOnline", + "note" + ] + } + }, + "required": [ + "response" + ] + }, + "DisableNodeResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "address": { + "type": "string" + }, + "port": { + "type": "integer", + "nullable": true + }, + "proxyUrl": { + "type": "string", + "nullable": true + }, + "isConnected": { + "type": "boolean" + }, + "isDisabled": { + "type": "boolean" + }, + "isConnecting": { + "type": "boolean" + }, + "lastStatusChange": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastStatusMessage": { + "type": "string", + "nullable": true + }, + "isTrafficTrackingActive": { + "type": "boolean" + }, + "trafficResetDay": { + "type": "integer", + "nullable": true + }, + "trafficLimitBytes": { + "type": "number", + "nullable": true + }, + "trafficUsedBytes": { + "type": "number", + "nullable": true + }, + "notifyPercent": { + "type": "integer", + "nullable": true + }, + "viewPosition": { + "type": "integer" + }, + "countryCode": { + "type": "string" + }, + "consumptionMultiplier": { + "type": "number" + }, + "nodeConsumptionMultiplier": { + "type": "number" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "configProfile": { + "type": "object", + "properties": { + "activeConfigProfileUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "activeInbounds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "profileUuid": { + "type": "string", + "format": "uuid" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "network": { + "type": "string", + "nullable": true + }, + "security": { + "type": "string", + "nullable": true + }, + "port": { + "type": "number", + "nullable": true + }, + "rawInbound": { + "nullable": true + } + }, + "required": [ + "uuid", + "profileUuid", + "tag", + "type", + "network", + "security", + "port", + "rawInbound" + ] + } + } + }, + "required": [ + "activeConfigProfileUuid", + "activeInbounds" + ] + }, + "providerUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "provider": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "faviconLink": { + "type": "string", + "nullable": true + }, + "loginUrl": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "name", + "faviconLink", + "loginUrl", + "createdAt", + "updatedAt" + ], + "nullable": true + }, + "activePluginUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "system": { + "type": "object", + "properties": { + "info": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "cpus": { + "type": "integer" + }, + "cpuModel": { + "type": "string" + }, + "memoryTotal": { + "type": "number" + }, + "hostname": { + "type": "string" + }, + "platform": { + "type": "string" + }, + "release": { + "type": "string" + }, + "type": { + "type": "string" + }, + "version": { + "type": "string" + }, + "networkInterfaces": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "arch", + "cpus", + "cpuModel", + "memoryTotal", + "hostname", + "platform", + "release", + "type", + "version", + "networkInterfaces" + ] + }, + "stats": { + "type": "object", + "properties": { + "memoryFree": { + "type": "number" + }, + "memoryUsed": { + "type": "number" + }, + "uptime": { + "type": "number" + }, + "loadAvg": { + "type": "array", + "items": { + "type": "number" + } + }, + "interface": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "rxBytesPerSec": { + "type": "number" + }, + "txBytesPerSec": { + "type": "number" + }, + "rxTotal": { + "type": "number" + }, + "txTotal": { + "type": "number" + } + }, + "required": [ + "interface", + "rxBytesPerSec", + "txBytesPerSec", + "rxTotal", + "txTotal" + ], + "nullable": true + } + }, + "required": [ + "memoryFree", + "memoryUsed", + "uptime", + "loadAvg", + "interface" + ] + } + }, + "required": [ + "info", + "stats" + ], + "nullable": true + }, + "versions": { + "type": "object", + "properties": { + "xray": { + "type": "string" + }, + "node": { + "type": "string" + } + }, + "required": [ + "xray", + "node" + ], + "nullable": true + }, + "xrayUptime": { + "type": "number" + }, + "usersOnline": { + "type": "number" + }, + "note": { + "type": "string", + "nullable": true + } + }, + "required": [ + "uuid", + "name", + "address", + "port", + "proxyUrl", + "isConnected", + "isDisabled", + "isConnecting", + "lastStatusChange", + "lastStatusMessage", + "isTrafficTrackingActive", + "trafficResetDay", + "trafficLimitBytes", + "trafficUsedBytes", + "notifyPercent", + "viewPosition", + "countryCode", + "consumptionMultiplier", + "nodeConsumptionMultiplier", + "tags", + "createdAt", + "updatedAt", + "configProfile", + "providerUuid", + "provider", + "activePluginUuid", + "system", + "versions", + "xrayUptime", + "usersOnline", + "note" + ] + } + }, + "required": [ + "response" + ] + }, + "DeleteNodeResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "isDeleted": { + "type": "boolean" + } + }, + "required": [ + "isDeleted" + ] + } + }, + "required": [ + "response" + ] + }, + "UpdateNodeRequestDto": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string", + "minLength": 3, + "maxLength": 30 + }, + "address": { + "type": "string", + "minLength": 2 + }, + "port": { + "type": "number", + "minimum": 1, + "exclusiveMinimum": false, + "maximum": 65535, + "exclusiveMaximum": false + }, + "proxyUrl": { + "type": "string", + "pattern": "^socks5:\\/\\/(?:[^:@/\\s]+(?::[^@/\\s]*)?@)?[^:@/\\s]+:\\d{1,5}$", + "nullable": true + }, + "isTrafficTrackingActive": { + "type": "boolean" + }, + "trafficLimitBytes": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": false + }, + "notifyPercent": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 100, + "exclusiveMaximum": false + }, + "trafficResetDay": { + "type": "number", + "minimum": 1, + "exclusiveMinimum": false, + "maximum": 31, + "exclusiveMaximum": false + }, + "countryCode": { + "type": "string", + "maxLength": 2 + }, + "consumptionMultiplier": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 100, + "exclusiveMaximum": false + }, + "nodeConsumptionMultiplier": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 100, + "exclusiveMaximum": false + }, + "configProfile": { + "type": "object", + "properties": { + "activeConfigProfileUuid": { + "type": "string", + "format": "uuid" + }, + "activeInbounds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "activeConfigProfileUuid", + "activeInbounds" + ] + }, + "providerUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "tags": { + "type": "array", + "maxItems": 10, + "items": { + "type": "string", + "pattern": "^[A-Z0-9_:]+$", + "maxLength": 36 + } + }, + "activePluginUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "note": { + "type": "string", + "maxLength": 255, + "nullable": true + } + }, + "required": [ + "uuid" + ] + }, + "UpdateNodeResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "address": { + "type": "string" + }, + "port": { + "type": "integer", + "nullable": true + }, + "proxyUrl": { + "type": "string", + "nullable": true + }, + "isConnected": { + "type": "boolean" + }, + "isDisabled": { + "type": "boolean" + }, + "isConnecting": { + "type": "boolean" + }, + "lastStatusChange": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastStatusMessage": { + "type": "string", + "nullable": true + }, + "isTrafficTrackingActive": { + "type": "boolean" + }, + "trafficResetDay": { + "type": "integer", + "nullable": true + }, + "trafficLimitBytes": { + "type": "number", + "nullable": true + }, + "trafficUsedBytes": { + "type": "number", + "nullable": true + }, + "notifyPercent": { + "type": "integer", + "nullable": true + }, + "viewPosition": { + "type": "integer" + }, + "countryCode": { + "type": "string" + }, + "consumptionMultiplier": { + "type": "number" + }, + "nodeConsumptionMultiplier": { + "type": "number" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "configProfile": { + "type": "object", + "properties": { + "activeConfigProfileUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "activeInbounds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "profileUuid": { + "type": "string", + "format": "uuid" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "network": { + "type": "string", + "nullable": true + }, + "security": { + "type": "string", + "nullable": true + }, + "port": { + "type": "number", + "nullable": true + }, + "rawInbound": { + "nullable": true + } + }, + "required": [ + "uuid", + "profileUuid", + "tag", + "type", + "network", + "security", + "port", + "rawInbound" + ] + } + } + }, + "required": [ + "activeConfigProfileUuid", + "activeInbounds" + ] + }, + "providerUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "provider": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "faviconLink": { + "type": "string", + "nullable": true + }, + "loginUrl": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "name", + "faviconLink", + "loginUrl", + "createdAt", + "updatedAt" + ], + "nullable": true + }, + "activePluginUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "system": { + "type": "object", + "properties": { + "info": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "cpus": { + "type": "integer" + }, + "cpuModel": { + "type": "string" + }, + "memoryTotal": { + "type": "number" + }, + "hostname": { + "type": "string" + }, + "platform": { + "type": "string" + }, + "release": { + "type": "string" + }, + "type": { + "type": "string" + }, + "version": { + "type": "string" + }, + "networkInterfaces": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "arch", + "cpus", + "cpuModel", + "memoryTotal", + "hostname", + "platform", + "release", + "type", + "version", + "networkInterfaces" + ] + }, + "stats": { + "type": "object", + "properties": { + "memoryFree": { + "type": "number" + }, + "memoryUsed": { + "type": "number" + }, + "uptime": { + "type": "number" + }, + "loadAvg": { + "type": "array", + "items": { + "type": "number" + } + }, + "interface": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "rxBytesPerSec": { + "type": "number" + }, + "txBytesPerSec": { + "type": "number" + }, + "rxTotal": { + "type": "number" + }, + "txTotal": { + "type": "number" + } + }, + "required": [ + "interface", + "rxBytesPerSec", + "txBytesPerSec", + "rxTotal", + "txTotal" + ], + "nullable": true + } + }, + "required": [ + "memoryFree", + "memoryUsed", + "uptime", + "loadAvg", + "interface" + ] + } + }, + "required": [ + "info", + "stats" + ], + "nullable": true + }, + "versions": { + "type": "object", + "properties": { + "xray": { + "type": "string" + }, + "node": { + "type": "string" + } + }, + "required": [ + "xray", + "node" + ], + "nullable": true + }, + "xrayUptime": { + "type": "number" + }, + "usersOnline": { + "type": "number" + }, + "note": { + "type": "string", + "nullable": true + } + }, + "required": [ + "uuid", + "name", + "address", + "port", + "proxyUrl", + "isConnected", + "isDisabled", + "isConnecting", + "lastStatusChange", + "lastStatusMessage", + "isTrafficTrackingActive", + "trafficResetDay", + "trafficLimitBytes", + "trafficUsedBytes", + "notifyPercent", + "viewPosition", + "countryCode", + "consumptionMultiplier", + "nodeConsumptionMultiplier", + "tags", + "createdAt", + "updatedAt", + "configProfile", + "providerUuid", + "provider", + "activePluginUuid", + "system", + "versions", + "xrayUptime", + "usersOnline", + "note" + ] + } + }, + "required": [ + "response" + ] + }, + "RestartNodeRequestBodyDto": { + "type": "object", + "properties": { + "forceRestart": { + "type": "boolean" + } + }, + "required": [ + "forceRestart" + ] + }, + "RestartNodeResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "eventSent": { + "type": "boolean" + } + }, + "required": [ + "eventSent" + ] + } + }, + "required": [ + "response" + ] + }, + "ResetNodeTrafficResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "eventSent": { + "type": "boolean" + } + }, + "required": [ + "eventSent" + ] + } + }, + "required": [ + "response" + ] + }, + "RestartAllNodesRequestBodyDto": { + "type": "object", + "properties": { + "forceRestart": { + "type": "boolean" + } + }, + "required": [ + "forceRestart" + ] + }, + "RestartAllNodesResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "eventSent": { + "type": "boolean" + } + }, + "required": [ + "eventSent" + ] + } + }, + "required": [ + "response" + ] + }, + "ReorderNodeRequestDto": { + "type": "object", + "properties": { + "nodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "viewPosition": { + "type": "integer" + }, + "uuid": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "viewPosition", + "uuid" + ] + } + } + }, + "required": [ + "nodes" + ] + }, + "ReorderNodeResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "address": { + "type": "string" + }, + "port": { + "type": "integer", + "nullable": true + }, + "proxyUrl": { + "type": "string", + "nullable": true + }, + "isConnected": { + "type": "boolean" + }, + "isDisabled": { + "type": "boolean" + }, + "isConnecting": { + "type": "boolean" + }, + "lastStatusChange": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastStatusMessage": { + "type": "string", + "nullable": true + }, + "isTrafficTrackingActive": { + "type": "boolean" + }, + "trafficResetDay": { + "type": "integer", + "nullable": true + }, + "trafficLimitBytes": { + "type": "number", + "nullable": true + }, + "trafficUsedBytes": { + "type": "number", + "nullable": true + }, + "notifyPercent": { + "type": "integer", + "nullable": true + }, + "viewPosition": { + "type": "integer" + }, + "countryCode": { + "type": "string" + }, + "consumptionMultiplier": { + "type": "number" + }, + "nodeConsumptionMultiplier": { + "type": "number" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "configProfile": { + "type": "object", + "properties": { + "activeConfigProfileUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "activeInbounds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "profileUuid": { + "type": "string", + "format": "uuid" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "network": { + "type": "string", + "nullable": true + }, + "security": { + "type": "string", + "nullable": true + }, + "port": { + "type": "number", + "nullable": true + }, + "rawInbound": { + "nullable": true + } + }, + "required": [ + "uuid", + "profileUuid", + "tag", + "type", + "network", + "security", + "port", + "rawInbound" + ] + } + } + }, + "required": [ + "activeConfigProfileUuid", + "activeInbounds" + ] + }, + "providerUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "provider": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "faviconLink": { + "type": "string", + "nullable": true + }, + "loginUrl": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "name", + "faviconLink", + "loginUrl", + "createdAt", + "updatedAt" + ], + "nullable": true + }, + "activePluginUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "system": { + "type": "object", + "properties": { + "info": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "cpus": { + "type": "integer" + }, + "cpuModel": { + "type": "string" + }, + "memoryTotal": { + "type": "number" + }, + "hostname": { + "type": "string" + }, + "platform": { + "type": "string" + }, + "release": { + "type": "string" + }, + "type": { + "type": "string" + }, + "version": { + "type": "string" + }, + "networkInterfaces": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "arch", + "cpus", + "cpuModel", + "memoryTotal", + "hostname", + "platform", + "release", + "type", + "version", + "networkInterfaces" + ] + }, + "stats": { + "type": "object", + "properties": { + "memoryFree": { + "type": "number" + }, + "memoryUsed": { + "type": "number" + }, + "uptime": { + "type": "number" + }, + "loadAvg": { + "type": "array", + "items": { + "type": "number" + } + }, + "interface": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "rxBytesPerSec": { + "type": "number" + }, + "txBytesPerSec": { + "type": "number" + }, + "rxTotal": { + "type": "number" + }, + "txTotal": { + "type": "number" + } + }, + "required": [ + "interface", + "rxBytesPerSec", + "txBytesPerSec", + "rxTotal", + "txTotal" + ], + "nullable": true + } + }, + "required": [ + "memoryFree", + "memoryUsed", + "uptime", + "loadAvg", + "interface" + ] + } + }, + "required": [ + "info", + "stats" + ], + "nullable": true + }, + "versions": { + "type": "object", + "properties": { + "xray": { + "type": "string" + }, + "node": { + "type": "string" + } + }, + "required": [ + "xray", + "node" + ], + "nullable": true + }, + "xrayUptime": { + "type": "number" + }, + "usersOnline": { + "type": "number" + }, + "note": { + "type": "string", + "nullable": true + } + }, + "required": [ + "uuid", + "name", + "address", + "port", + "proxyUrl", + "isConnected", + "isDisabled", + "isConnecting", + "lastStatusChange", + "lastStatusMessage", + "isTrafficTrackingActive", + "trafficResetDay", + "trafficLimitBytes", + "trafficUsedBytes", + "notifyPercent", + "viewPosition", + "countryCode", + "consumptionMultiplier", + "nodeConsumptionMultiplier", + "tags", + "createdAt", + "updatedAt", + "configProfile", + "providerUuid", + "provider", + "activePluginUuid", + "system", + "versions", + "xrayUptime", + "usersOnline", + "note" + ] + } + } + }, + "required": [ + "response" + ] + }, + "ProfileModificationRequestDto": { + "type": "object", + "properties": { + "uuids": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "format": "uuid" + } + }, + "configProfile": { + "type": "object", + "properties": { + "activeConfigProfileUuid": { + "type": "string", + "format": "uuid" + }, + "activeInbounds": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "activeConfigProfileUuid", + "activeInbounds" + ] + } + }, + "required": [ + "uuids", + "configProfile" + ] + }, + "ProfileModificationResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "eventSent": { + "type": "boolean" + } + }, + "required": [ + "eventSent" + ] + } + }, + "required": [ + "response" + ] + }, + "BulkNodesActionsRequestDto": { + "type": "object", + "properties": { + "uuids": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "format": "uuid" + } + }, + "action": { + "type": "string", + "enum": [ + "ENABLE", + "DISABLE", + "RESTART", + "RESET_TRAFFIC" + ], + "x-enumNames": [ + "ENABLE", + "DISABLE", + "RESTART", + "RESET_TRAFFIC" + ] + } + }, + "required": [ + "uuids", + "action" + ] + }, + "BulkNodesActionsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "eventSent": { + "type": "boolean" + } + }, + "required": [ + "eventSent" + ] + } + }, + "required": [ + "response" + ] + }, + "BulkNodesUpdateRequestDto": { + "type": "object", + "properties": { + "uuids": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "format": "uuid" + } + }, + "fields": { + "type": "object", + "properties": { + "countryCode": { + "type": "string", + "maxLength": 2 + }, + "consumptionMultiplier": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 100, + "exclusiveMaximum": false + }, + "nodeConsumptionMultiplier": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 100, + "exclusiveMaximum": false + }, + "providerUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "tags": { + "type": "array", + "maxItems": 10, + "items": { + "type": "string", + "pattern": "^[A-Z0-9_:]+$", + "maxLength": 36 + } + }, + "activePluginUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "note": { + "type": "string", + "maxLength": 255, + "nullable": true + } + } + } + }, + "required": [ + "uuids", + "fields" + ] + }, + "BulkNodesUpdateResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "eventSent": { + "type": "boolean" + } + }, + "required": [ + "eventSent" + ] + } + }, + "required": [ + "response" + ] + }, + "GetTorrentBlockerReportsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "records": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "userId": { + "type": "number" + }, + "nodeId": { + "type": "number" + }, + "user": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "username": { + "type": "string" + } + }, + "required": [ + "uuid", + "username" + ] + }, + "node": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "countryCode": { + "type": "string" + } + }, + "required": [ + "uuid", + "name", + "countryCode" + ] + }, + "report": { + "type": "object", + "properties": { + "actionReport": { + "type": "object", + "properties": { + "blocked": { + "type": "boolean" + }, + "ip": { + "type": "string" + }, + "blockDuration": { + "type": "number" + }, + "willUnblockAt": { + "type": "string", + "format": "date-time" + }, + "userId": { + "type": "string" + }, + "processedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "blocked", + "ip", + "blockDuration", + "willUnblockAt", + "userId", + "processedAt" + ] + }, + "xrayReport": { + "type": "object", + "properties": { + "email": { + "type": "string", + "nullable": true + }, + "level": { + "type": "number", + "nullable": true + }, + "protocol": { + "type": "string", + "nullable": true + }, + "network": { + "type": "string" + }, + "source": { + "type": "string", + "nullable": true + }, + "destination": { + "type": "string" + }, + "routeTarget": { + "type": "string", + "nullable": true + }, + "originalTarget": { + "type": "string", + "nullable": true + }, + "inboundTag": { + "type": "string", + "nullable": true + }, + "inboundName": { + "type": "string", + "nullable": true + }, + "inboundLocal": { + "type": "string", + "nullable": true + }, + "outboundTag": { + "type": "string", + "nullable": true + }, + "ts": { + "type": "number" + } + }, + "required": [ + "email", + "level", + "protocol", + "network", + "source", + "destination", + "routeTarget", + "originalTarget", + "inboundTag", + "inboundName", + "inboundLocal", + "outboundTag", + "ts" + ] + } + }, + "required": [ + "actionReport", + "xrayReport" + ] + }, + "createdAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "id", + "userId", + "nodeId", + "user", + "node", + "report", + "createdAt" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "records", + "total" + ] + } + }, + "required": [ + "response" + ] + }, + "GetTorrentBlockerReportsStatsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "stats": { + "type": "object", + "properties": { + "distinctNodes": { + "type": "number" + }, + "distinctUsers": { + "type": "number" + }, + "totalReports": { + "type": "number" + }, + "reportsLast24Hours": { + "type": "number" + } + }, + "required": [ + "distinctNodes", + "distinctUsers", + "totalReports", + "reportsLast24Hours" + ] + }, + "topUsers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "color": { + "type": "string" + }, + "username": { + "type": "string" + }, + "total": { + "type": "number" + } + }, + "required": [ + "uuid", + "color", + "username", + "total" + ] + } + }, + "topNodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "countryCode": { + "type": "string" + }, + "color": { + "type": "string" + }, + "name": { + "type": "string" + }, + "total": { + "type": "number" + } + }, + "required": [ + "uuid", + "countryCode", + "color", + "name", + "total" + ] + } + } + }, + "required": [ + "stats", + "topUsers", + "topNodes" + ] + } + }, + "required": [ + "response" + ] + }, + "TruncateTorrentBlockerReportsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "records": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "userId": { + "type": "number" + }, + "nodeId": { + "type": "number" + }, + "user": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "username": { + "type": "string" + } + }, + "required": [ + "uuid", + "username" + ] + }, + "node": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "countryCode": { + "type": "string" + } + }, + "required": [ + "uuid", + "name", + "countryCode" + ] + }, + "report": { + "type": "object", + "properties": { + "actionReport": { + "type": "object", + "properties": { + "blocked": { + "type": "boolean" + }, + "ip": { + "type": "string" + }, + "blockDuration": { + "type": "number" + }, + "willUnblockAt": { + "type": "string", + "format": "date-time" + }, + "userId": { + "type": "string" + }, + "processedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "blocked", + "ip", + "blockDuration", + "willUnblockAt", + "userId", + "processedAt" + ] + }, + "xrayReport": { + "type": "object", + "properties": { + "email": { + "type": "string", + "nullable": true + }, + "level": { + "type": "number", + "nullable": true + }, + "protocol": { + "type": "string", + "nullable": true + }, + "network": { + "type": "string" + }, + "source": { + "type": "string", + "nullable": true + }, + "destination": { + "type": "string" + }, + "routeTarget": { + "type": "string", + "nullable": true + }, + "originalTarget": { + "type": "string", + "nullable": true + }, + "inboundTag": { + "type": "string", + "nullable": true + }, + "inboundName": { + "type": "string", + "nullable": true + }, + "inboundLocal": { + "type": "string", + "nullable": true + }, + "outboundTag": { + "type": "string", + "nullable": true + }, + "ts": { + "type": "number" + } + }, + "required": [ + "email", + "level", + "protocol", + "network", + "source", + "destination", + "routeTarget", + "originalTarget", + "inboundTag", + "inboundName", + "inboundLocal", + "outboundTag", + "ts" + ] + } + }, + "required": [ + "actionReport", + "xrayReport" + ] + }, + "createdAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "id", + "userId", + "nodeId", + "user", + "node", + "report", + "createdAt" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "records", + "total" + ] + } + }, + "required": [ + "response" + ] + }, + "GetNodePluginsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "nodePlugins": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "pluginConfig": { + "nullable": true + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "pluginConfig" + ] + } + } + }, + "required": [ + "total", + "nodePlugins" + ] + } + }, + "required": [ + "response" + ] + }, + "GetNodePluginResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "pluginConfig": {} + }, + "required": [ + "uuid", + "viewPosition", + "name", + "pluginConfig" + ] + } + }, + "required": [ + "response" + ] + }, + "UpdateNodePluginRequestDto": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string", + "minLength": 2, + "maxLength": 30, + "pattern": "^[A-Za-z0-9_\\s-]+$" + }, + "pluginConfig": {} + }, + "required": [ + "uuid" + ] + }, + "UpdateNodePluginResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "pluginConfig": {} + }, + "required": [ + "uuid", + "viewPosition", + "name", + "pluginConfig" + ] + } + }, + "required": [ + "response" + ] + }, + "DeleteNodePluginResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "isDeleted": { + "type": "boolean" + } + }, + "required": [ + "isDeleted" + ] + } + }, + "required": [ + "response" + ] + }, + "CreateNodePluginRequestDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 2, + "maxLength": 30, + "pattern": "^[A-Za-z0-9_\\s-]+$" + } + }, + "required": [ + "name" + ] + }, + "CreateNodePluginResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "pluginConfig": { + "nullable": true + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "pluginConfig" + ] + } + }, + "required": [ + "response" + ] + }, + "ReorderNodePluginsRequestDto": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "viewPosition": { + "type": "integer" + }, + "uuid": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "viewPosition", + "uuid" + ] + } + } + }, + "required": [ + "items" + ] + }, + "ReorderNodePluginsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "nodePlugins": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "pluginConfig": { + "nullable": true + } + }, + "required": [ + "uuid", + "viewPosition", + "name", + "pluginConfig" + ] + } + } + }, + "required": [ + "total", + "nodePlugins" + ] + } + }, + "required": [ + "response" + ] + }, + "CloneNodePluginRequestDto": { + "type": "object", + "properties": { + "cloneFromUuid": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "cloneFromUuid" + ] + }, + "CloneNodePluginResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "pluginConfig": {} + }, + "required": [ + "uuid", + "viewPosition", + "name", + "pluginConfig" + ] + } + }, + "required": [ + "response" + ] + }, + "PluginExecutorRequestDto": { + "type": "object", + "properties": { + "command": { + "oneOf": [ + { + "description": "Block IPs", + "type": "object", + "properties": { + "command": { + "type": "string", + "enum": [ + "blockIps" + ] + }, + "ips": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "ip": { + "type": "string" + }, + "timeout": { + "type": "number" + } + }, + "required": [ + "ip", + "timeout" + ] + } + } + }, + "required": [ + "command", + "ips" + ] + }, + { + "description": "Unblock IPs", + "type": "object", + "properties": { + "command": { + "type": "string", + "enum": [ + "unblockIps" + ] + }, + "ips": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + }, + "required": [ + "command", + "ips" + ] + }, + { + "description": "Recreate tables", + "type": "object", + "properties": { + "command": { + "type": "string", + "enum": [ + "recreateTables" + ] + } + }, + "required": [ + "command" + ] + } + ] + }, + "targetNodes": { + "oneOf": [ + { + "description": "Target all connected nodes", + "type": "object", + "properties": { + "target": { + "type": "string", + "enum": [ + "allNodes" + ] + } + }, + "required": [ + "target" + ] + }, + { + "description": "Target specific nodes", + "type": "object", + "properties": { + "target": { + "type": "string", + "enum": [ + "specificNodes" + ] + }, + "nodeUuids": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "target", + "nodeUuids" + ] + } + ] + } + }, + "required": [ + "command", + "targetNodes" + ] + }, + "PluginExecutorResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "eventSent": { + "type": "boolean" + } + }, + "required": [ + "eventSent" + ] + } + }, + "required": [ + "response" + ] + }, + "GetAllHostTagsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "tags" + ] + } + }, + "required": [ + "response" + ] + }, + "CreateHostRequestDto": { + "type": "object", + "properties": { + "inbound": { + "type": "object", + "properties": { + "configProfileUuid": { + "type": "string", + "format": "uuid" + }, + "configProfileInboundUuid": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "configProfileUuid", + "configProfileInboundUuid" + ] + }, + "remark": { + "type": "string", + "minLength": 1, + "maxLength": 40 + }, + "address": { + "type": "string" + }, + "port": { + "type": "integer" + }, + "path": { + "type": "string", + "nullable": true + }, + "sni": { + "type": "string", + "nullable": true + }, + "host": { + "type": "string", + "nullable": true + }, + "alpn": { + "type": "string", + "enum": [ + "h3", + "h2", + "http/1.1", + "h2,http/1.1", + "h3,h2,http/1.1", + "h3,h2" + ], + "x-enumNames": [ + "H3", + "H2", + "HTTP_1_1", + "H_COMBINED", + "H3_H2_H1_COMBINED", + "H3_H2_COMBINED" + ], + "nullable": true + }, + "fingerprint": { + "type": "string", + "nullable": true + }, + "isDisabled": { + "type": "boolean", + "default": false + }, + "securityLayer": { + "type": "string", + "enum": [ + "DEFAULT", + "TLS", + "NONE" + ], + "x-enumNames": [ + "DEFAULT", + "TLS", + "NONE" + ], + "default": "DEFAULT" + }, + "xhttpExtraParams": { + "nullable": true + }, + "muxParams": { + "nullable": true + }, + "sockoptParams": { + "nullable": true + }, + "finalMask": { + "nullable": true + }, + "serverDescription": { + "type": "string", + "maxLength": 30, + "nullable": true + }, + "tags": { + "type": "array", + "maxItems": 10, + "items": { + "type": "string", + "pattern": "^[A-Z0-9_:]+$", + "maxLength": 36 + } + }, + "isHidden": { + "type": "boolean", + "default": false + }, + "overrideSniFromAddress": { + "type": "boolean", + "default": false + }, + "keepSniBlank": { + "type": "boolean", + "default": false + }, + "pinnedPeerCertSha256": { + "type": "string", + "nullable": true + }, + "verifyPeerCertByName": { + "type": "string", + "nullable": true + }, + "vlessRouteId": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 65535, + "exclusiveMaximum": false, + "nullable": true + }, + "shuffleHost": { + "type": "boolean", + "default": false + }, + "mihomoX25519": { + "type": "boolean", + "default": false + }, + "mihomoIpVersion": { + "type": "string", + "enum": [ + "dual", + "ipv4", + "ipv6", + "ipv4-prefer", + "ipv6-prefer" + ], + "x-enumNames": [ + "DUAL", + "IPV4", + "IPV6", + "IPV4_PREFER", + "IPV6_PREFER" + ], + "nullable": true + }, + "nodes": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "xrayJsonTemplateUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "excludedInternalSquads": { + "description": "Optional. Internal squads from which the host will be excluded.", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "excludeFromSubscriptionTypes": { + "description": "Optional. Subscription types from which the host will be excluded from.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + } + } + }, + "required": [ + "inbound", + "remark", + "address", + "port" + ] + }, + "CreateHostResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "remark": { + "type": "string" + }, + "address": { + "type": "string" + }, + "port": { + "type": "integer" + }, + "path": { + "type": "string", + "nullable": true + }, + "sni": { + "type": "string", + "nullable": true + }, + "host": { + "type": "string", + "nullable": true + }, + "alpn": { + "type": "string", + "enum": [ + "h3", + "h2", + "http/1.1", + "h2,http/1.1", + "h3,h2,http/1.1", + "h3,h2" + ], + "x-enumNames": [ + "H3", + "H2", + "HTTP_1_1", + "H_COMBINED", + "H3_H2_H1_COMBINED", + "H3_H2_COMBINED" + ], + "nullable": true + }, + "fingerprint": { + "type": "string", + "nullable": true + }, + "isDisabled": { + "type": "boolean" + }, + "securityLayer": { + "type": "string", + "enum": [ + "DEFAULT", + "TLS", + "NONE" + ], + "x-enumNames": [ + "DEFAULT", + "TLS", + "NONE" + ], + "default": "DEFAULT" + }, + "xhttpExtraParams": { + "nullable": true + }, + "muxParams": { + "nullable": true + }, + "sockoptParams": { + "nullable": true + }, + "finalMask": { + "nullable": true + }, + "inbound": { + "type": "object", + "properties": { + "configProfileUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "configProfileInboundUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "configProfileUuid", + "configProfileInboundUuid" + ] + }, + "serverDescription": { + "type": "string", + "maxLength": 30, + "nullable": true + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "isHidden": { + "type": "boolean", + "default": false + }, + "overrideSniFromAddress": { + "type": "boolean", + "default": false + }, + "keepSniBlank": { + "type": "boolean", + "default": false + }, + "vlessRouteId": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 65535, + "exclusiveMaximum": false, + "nullable": true + }, + "pinnedPeerCertSha256": { + "type": "string", + "nullable": true + }, + "verifyPeerCertByName": { + "type": "string", + "nullable": true + }, + "shuffleHost": { + "type": "boolean" + }, + "mihomoX25519": { + "type": "boolean" + }, + "mihomoIpVersion": { + "type": "string", + "enum": [ + "dual", + "ipv4", + "ipv6", + "ipv4-prefer", + "ipv6-prefer" + ], + "x-enumNames": [ + "DUAL", + "IPV4", + "IPV6", + "IPV4_PREFER", + "IPV6_PREFER" + ], + "nullable": true + }, + "nodes": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "xrayJsonTemplateUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "excludedInternalSquads": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "excludeFromSubscriptionTypes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + } + } + }, + "required": [ + "uuid", + "viewPosition", + "remark", + "address", + "port", + "path", + "sni", + "host", + "alpn", + "fingerprint", + "isDisabled", + "xhttpExtraParams", + "muxParams", + "sockoptParams", + "finalMask", + "inbound", + "serverDescription", + "vlessRouteId", + "pinnedPeerCertSha256", + "verifyPeerCertByName", + "shuffleHost", + "mihomoX25519", + "mihomoIpVersion", + "nodes", + "xrayJsonTemplateUuid", + "excludedInternalSquads", + "excludeFromSubscriptionTypes" + ] + } + }, + "required": [ + "response" + ] + }, + "UpdateHostRequestDto": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "inbound": { + "type": "object", + "properties": { + "configProfileUuid": { + "type": "string", + "format": "uuid" + }, + "configProfileInboundUuid": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "configProfileUuid", + "configProfileInboundUuid" + ] + }, + "remark": { + "type": "string", + "maxLength": 40 + }, + "address": { + "type": "string" + }, + "port": { + "type": "integer" + }, + "path": { + "type": "string", + "nullable": true + }, + "sni": { + "type": "string", + "nullable": true + }, + "host": { + "type": "string", + "nullable": true + }, + "alpn": { + "type": "string", + "enum": [ + "h3", + "h2", + "http/1.1", + "h2,http/1.1", + "h3,h2,http/1.1", + "h3,h2" + ], + "x-enumNames": [ + "H3", + "H2", + "HTTP_1_1", + "H_COMBINED", + "H3_H2_H1_COMBINED", + "H3_H2_COMBINED" + ], + "nullable": true + }, + "fingerprint": { + "type": "string", + "nullable": true + }, + "isDisabled": { + "type": "boolean", + "default": false + }, + "securityLayer": { + "type": "string", + "enum": [ + "DEFAULT", + "TLS", + "NONE" + ], + "x-enumNames": [ + "DEFAULT", + "TLS", + "NONE" + ] + }, + "xhttpExtraParams": { + "nullable": true + }, + "muxParams": { + "nullable": true + }, + "sockoptParams": { + "nullable": true + }, + "finalMask": { + "nullable": true + }, + "serverDescription": { + "type": "string", + "maxLength": 30, + "nullable": true + }, + "tags": { + "type": "array", + "maxItems": 10, + "items": { + "type": "string", + "pattern": "^[A-Z0-9_:]+$", + "maxLength": 36 + } + }, + "isHidden": { + "type": "boolean" + }, + "overrideSniFromAddress": { + "type": "boolean" + }, + "keepSniBlank": { + "type": "boolean" + }, + "vlessRouteId": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 65535, + "exclusiveMaximum": false, + "nullable": true + }, + "pinnedPeerCertSha256": { + "type": "string", + "nullable": true + }, + "verifyPeerCertByName": { + "type": "string", + "nullable": true + }, + "shuffleHost": { + "type": "boolean" + }, + "mihomoX25519": { + "type": "boolean" + }, + "mihomoIpVersion": { + "type": "string", + "enum": [ + "dual", + "ipv4", + "ipv6", + "ipv4-prefer", + "ipv6-prefer" + ], + "x-enumNames": [ + "DUAL", + "IPV4", + "IPV6", + "IPV4_PREFER", + "IPV6_PREFER" + ], + "nullable": true + }, + "nodes": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "xrayJsonTemplateUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "excludedInternalSquads": { + "description": "Optional. Internal squads from which the host will be excluded.", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "excludeFromSubscriptionTypes": { + "description": "Optional. Subscription types from which the host will be excluded from.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + } + } + }, + "required": [ + "uuid" + ] + }, + "UpdateHostResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "remark": { + "type": "string" + }, + "address": { + "type": "string" + }, + "port": { + "type": "integer" + }, + "path": { + "type": "string", + "nullable": true + }, + "sni": { + "type": "string", + "nullable": true + }, + "host": { + "type": "string", + "nullable": true + }, + "alpn": { + "type": "string", + "enum": [ + "h3", + "h2", + "http/1.1", + "h2,http/1.1", + "h3,h2,http/1.1", + "h3,h2" + ], + "x-enumNames": [ + "H3", + "H2", + "HTTP_1_1", + "H_COMBINED", + "H3_H2_H1_COMBINED", + "H3_H2_COMBINED" + ], + "nullable": true + }, + "fingerprint": { + "type": "string", + "nullable": true + }, + "isDisabled": { + "type": "boolean" + }, + "securityLayer": { + "type": "string", + "enum": [ + "DEFAULT", + "TLS", + "NONE" + ], + "x-enumNames": [ + "DEFAULT", + "TLS", + "NONE" + ], + "default": "DEFAULT" + }, + "xhttpExtraParams": { + "nullable": true + }, + "muxParams": { + "nullable": true + }, + "sockoptParams": { + "nullable": true + }, + "finalMask": { + "nullable": true + }, + "inbound": { + "type": "object", + "properties": { + "configProfileUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "configProfileInboundUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "configProfileUuid", + "configProfileInboundUuid" + ] + }, + "serverDescription": { + "type": "string", + "maxLength": 30, + "nullable": true + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "isHidden": { + "type": "boolean", + "default": false + }, + "overrideSniFromAddress": { + "type": "boolean", + "default": false + }, + "keepSniBlank": { + "type": "boolean", + "default": false + }, + "vlessRouteId": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 65535, + "exclusiveMaximum": false, + "nullable": true + }, + "pinnedPeerCertSha256": { + "type": "string", + "nullable": true + }, + "verifyPeerCertByName": { + "type": "string", + "nullable": true + }, + "shuffleHost": { + "type": "boolean" + }, + "mihomoX25519": { + "type": "boolean" + }, + "mihomoIpVersion": { + "type": "string", + "enum": [ + "dual", + "ipv4", + "ipv6", + "ipv4-prefer", + "ipv6-prefer" + ], + "x-enumNames": [ + "DUAL", + "IPV4", + "IPV6", + "IPV4_PREFER", + "IPV6_PREFER" + ], + "nullable": true + }, + "nodes": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "xrayJsonTemplateUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "excludedInternalSquads": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "excludeFromSubscriptionTypes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + } + } + }, + "required": [ + "uuid", + "viewPosition", + "remark", + "address", + "port", + "path", + "sni", + "host", + "alpn", + "fingerprint", + "isDisabled", + "xhttpExtraParams", + "muxParams", + "sockoptParams", + "finalMask", + "inbound", + "serverDescription", + "vlessRouteId", + "pinnedPeerCertSha256", + "verifyPeerCertByName", + "shuffleHost", + "mihomoX25519", + "mihomoIpVersion", + "nodes", + "xrayJsonTemplateUuid", + "excludedInternalSquads", + "excludeFromSubscriptionTypes" + ] + } + }, + "required": [ + "response" + ] + }, + "GetAllHostsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "remark": { + "type": "string" + }, + "address": { + "type": "string" + }, + "port": { + "type": "integer" + }, + "path": { + "type": "string", + "nullable": true + }, + "sni": { + "type": "string", + "nullable": true + }, + "host": { + "type": "string", + "nullable": true + }, + "alpn": { + "type": "string", + "enum": [ + "h3", + "h2", + "http/1.1", + "h2,http/1.1", + "h3,h2,http/1.1", + "h3,h2" + ], + "x-enumNames": [ + "H3", + "H2", + "HTTP_1_1", + "H_COMBINED", + "H3_H2_H1_COMBINED", + "H3_H2_COMBINED" + ], + "nullable": true + }, + "fingerprint": { + "type": "string", + "nullable": true + }, + "isDisabled": { + "type": "boolean" + }, + "securityLayer": { + "type": "string", + "enum": [ + "DEFAULT", + "TLS", + "NONE" + ], + "x-enumNames": [ + "DEFAULT", + "TLS", + "NONE" + ], + "default": "DEFAULT" + }, + "xhttpExtraParams": { + "nullable": true + }, + "muxParams": { + "nullable": true + }, + "sockoptParams": { + "nullable": true + }, + "finalMask": { + "nullable": true + }, + "inbound": { + "type": "object", + "properties": { + "configProfileUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "configProfileInboundUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "configProfileUuid", + "configProfileInboundUuid" + ] + }, + "serverDescription": { + "type": "string", + "maxLength": 30, + "nullable": true + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "isHidden": { + "type": "boolean", + "default": false + }, + "overrideSniFromAddress": { + "type": "boolean", + "default": false + }, + "keepSniBlank": { + "type": "boolean", + "default": false + }, + "vlessRouteId": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 65535, + "exclusiveMaximum": false, + "nullable": true + }, + "pinnedPeerCertSha256": { + "type": "string", + "nullable": true + }, + "verifyPeerCertByName": { + "type": "string", + "nullable": true + }, + "shuffleHost": { + "type": "boolean" + }, + "mihomoX25519": { + "type": "boolean" + }, + "mihomoIpVersion": { + "type": "string", + "enum": [ + "dual", + "ipv4", + "ipv6", + "ipv4-prefer", + "ipv6-prefer" + ], + "x-enumNames": [ + "DUAL", + "IPV4", + "IPV6", + "IPV4_PREFER", + "IPV6_PREFER" + ], + "nullable": true + }, + "nodes": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "xrayJsonTemplateUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "excludedInternalSquads": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "excludeFromSubscriptionTypes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + } + } + }, + "required": [ + "uuid", + "viewPosition", + "remark", + "address", + "port", + "path", + "sni", + "host", + "alpn", + "fingerprint", + "isDisabled", + "xhttpExtraParams", + "muxParams", + "sockoptParams", + "finalMask", + "inbound", + "serverDescription", + "vlessRouteId", + "pinnedPeerCertSha256", + "verifyPeerCertByName", + "shuffleHost", + "mihomoX25519", + "mihomoIpVersion", + "nodes", + "xrayJsonTemplateUuid", + "excludedInternalSquads", + "excludeFromSubscriptionTypes" + ] + } + } + }, + "required": [ + "response" + ] + }, + "GetOneHostResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "remark": { + "type": "string" + }, + "address": { + "type": "string" + }, + "port": { + "type": "integer" + }, + "path": { + "type": "string", + "nullable": true + }, + "sni": { + "type": "string", + "nullable": true + }, + "host": { + "type": "string", + "nullable": true + }, + "alpn": { + "type": "string", + "enum": [ + "h3", + "h2", + "http/1.1", + "h2,http/1.1", + "h3,h2,http/1.1", + "h3,h2" + ], + "x-enumNames": [ + "H3", + "H2", + "HTTP_1_1", + "H_COMBINED", + "H3_H2_H1_COMBINED", + "H3_H2_COMBINED" + ], + "nullable": true + }, + "fingerprint": { + "type": "string", + "nullable": true + }, + "isDisabled": { + "type": "boolean" + }, + "securityLayer": { + "type": "string", + "enum": [ + "DEFAULT", + "TLS", + "NONE" + ], + "x-enumNames": [ + "DEFAULT", + "TLS", + "NONE" + ], + "default": "DEFAULT" + }, + "xhttpExtraParams": { + "nullable": true + }, + "muxParams": { + "nullable": true + }, + "sockoptParams": { + "nullable": true + }, + "finalMask": { + "nullable": true + }, + "inbound": { + "type": "object", + "properties": { + "configProfileUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "configProfileInboundUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "configProfileUuid", + "configProfileInboundUuid" + ] + }, + "serverDescription": { + "type": "string", + "maxLength": 30, + "nullable": true + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "isHidden": { + "type": "boolean", + "default": false + }, + "overrideSniFromAddress": { + "type": "boolean", + "default": false + }, + "keepSniBlank": { + "type": "boolean", + "default": false + }, + "vlessRouteId": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 65535, + "exclusiveMaximum": false, + "nullable": true + }, + "pinnedPeerCertSha256": { + "type": "string", + "nullable": true + }, + "verifyPeerCertByName": { + "type": "string", + "nullable": true + }, + "shuffleHost": { + "type": "boolean" + }, + "mihomoX25519": { + "type": "boolean" + }, + "mihomoIpVersion": { + "type": "string", + "enum": [ + "dual", + "ipv4", + "ipv6", + "ipv4-prefer", + "ipv6-prefer" + ], + "x-enumNames": [ + "DUAL", + "IPV4", + "IPV6", + "IPV4_PREFER", + "IPV6_PREFER" + ], + "nullable": true + }, + "nodes": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "xrayJsonTemplateUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "excludedInternalSquads": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "excludeFromSubscriptionTypes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + } + } + }, + "required": [ + "uuid", + "viewPosition", + "remark", + "address", + "port", + "path", + "sni", + "host", + "alpn", + "fingerprint", + "isDisabled", + "xhttpExtraParams", + "muxParams", + "sockoptParams", + "finalMask", + "inbound", + "serverDescription", + "vlessRouteId", + "pinnedPeerCertSha256", + "verifyPeerCertByName", + "shuffleHost", + "mihomoX25519", + "mihomoIpVersion", + "nodes", + "xrayJsonTemplateUuid", + "excludedInternalSquads", + "excludeFromSubscriptionTypes" + ] + } + }, + "required": [ + "response" + ] + }, + "ReorderHostRequestDto": { + "type": "object", + "properties": { + "hosts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "viewPosition": { + "type": "integer" + }, + "uuid": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "viewPosition", + "uuid" + ] + } + } + }, + "required": [ + "hosts" + ] + }, + "ReorderHostResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "isUpdated": { + "type": "boolean" + } + }, + "required": [ + "isUpdated" + ] + } + }, + "required": [ + "response" + ] + }, + "DeleteHostResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "isDeleted": { + "type": "boolean" + } + }, + "required": [ + "isDeleted" + ] + } + }, + "required": [ + "response" + ] + }, + "BulkDeleteHostsRequestDto": { + "type": "object", + "properties": { + "uuids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "uuids" + ] + }, + "BulkDeleteHostsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "remark": { + "type": "string" + }, + "address": { + "type": "string" + }, + "port": { + "type": "integer" + }, + "path": { + "type": "string", + "nullable": true + }, + "sni": { + "type": "string", + "nullable": true + }, + "host": { + "type": "string", + "nullable": true + }, + "alpn": { + "type": "string", + "enum": [ + "h3", + "h2", + "http/1.1", + "h2,http/1.1", + "h3,h2,http/1.1", + "h3,h2" + ], + "x-enumNames": [ + "H3", + "H2", + "HTTP_1_1", + "H_COMBINED", + "H3_H2_H1_COMBINED", + "H3_H2_COMBINED" + ], + "nullable": true + }, + "fingerprint": { + "type": "string", + "nullable": true + }, + "isDisabled": { + "type": "boolean" + }, + "securityLayer": { + "type": "string", + "enum": [ + "DEFAULT", + "TLS", + "NONE" + ], + "x-enumNames": [ + "DEFAULT", + "TLS", + "NONE" + ], + "default": "DEFAULT" + }, + "xhttpExtraParams": { + "nullable": true + }, + "muxParams": { + "nullable": true + }, + "sockoptParams": { + "nullable": true + }, + "finalMask": { + "nullable": true + }, + "inbound": { + "type": "object", + "properties": { + "configProfileUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "configProfileInboundUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "configProfileUuid", + "configProfileInboundUuid" + ] + }, + "serverDescription": { + "type": "string", + "maxLength": 30, + "nullable": true + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "isHidden": { + "type": "boolean", + "default": false + }, + "overrideSniFromAddress": { + "type": "boolean", + "default": false + }, + "keepSniBlank": { + "type": "boolean", + "default": false + }, + "vlessRouteId": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 65535, + "exclusiveMaximum": false, + "nullable": true + }, + "pinnedPeerCertSha256": { + "type": "string", + "nullable": true + }, + "verifyPeerCertByName": { + "type": "string", + "nullable": true + }, + "shuffleHost": { + "type": "boolean" + }, + "mihomoX25519": { + "type": "boolean" + }, + "mihomoIpVersion": { + "type": "string", + "enum": [ + "dual", + "ipv4", + "ipv6", + "ipv4-prefer", + "ipv6-prefer" + ], + "x-enumNames": [ + "DUAL", + "IPV4", + "IPV6", + "IPV4_PREFER", + "IPV6_PREFER" + ], + "nullable": true + }, + "nodes": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "xrayJsonTemplateUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "excludedInternalSquads": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "excludeFromSubscriptionTypes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + } + } + }, + "required": [ + "uuid", + "viewPosition", + "remark", + "address", + "port", + "path", + "sni", + "host", + "alpn", + "fingerprint", + "isDisabled", + "xhttpExtraParams", + "muxParams", + "sockoptParams", + "finalMask", + "inbound", + "serverDescription", + "vlessRouteId", + "pinnedPeerCertSha256", + "verifyPeerCertByName", + "shuffleHost", + "mihomoX25519", + "mihomoIpVersion", + "nodes", + "xrayJsonTemplateUuid", + "excludedInternalSquads", + "excludeFromSubscriptionTypes" + ] + } + } + }, + "required": [ + "response" + ] + }, + "BulkDisableHostsRequestDto": { + "type": "object", + "properties": { + "uuids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "uuids" + ] + }, + "BulkDisableHostsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "remark": { + "type": "string" + }, + "address": { + "type": "string" + }, + "port": { + "type": "integer" + }, + "path": { + "type": "string", + "nullable": true + }, + "sni": { + "type": "string", + "nullable": true + }, + "host": { + "type": "string", + "nullable": true + }, + "alpn": { + "type": "string", + "enum": [ + "h3", + "h2", + "http/1.1", + "h2,http/1.1", + "h3,h2,http/1.1", + "h3,h2" + ], + "x-enumNames": [ + "H3", + "H2", + "HTTP_1_1", + "H_COMBINED", + "H3_H2_H1_COMBINED", + "H3_H2_COMBINED" + ], + "nullable": true + }, + "fingerprint": { + "type": "string", + "nullable": true + }, + "isDisabled": { + "type": "boolean" + }, + "securityLayer": { + "type": "string", + "enum": [ + "DEFAULT", + "TLS", + "NONE" + ], + "x-enumNames": [ + "DEFAULT", + "TLS", + "NONE" + ], + "default": "DEFAULT" + }, + "xhttpExtraParams": { + "nullable": true + }, + "muxParams": { + "nullable": true + }, + "sockoptParams": { + "nullable": true + }, + "finalMask": { + "nullable": true + }, + "inbound": { + "type": "object", + "properties": { + "configProfileUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "configProfileInboundUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "configProfileUuid", + "configProfileInboundUuid" + ] + }, + "serverDescription": { + "type": "string", + "maxLength": 30, + "nullable": true + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "isHidden": { + "type": "boolean", + "default": false + }, + "overrideSniFromAddress": { + "type": "boolean", + "default": false + }, + "keepSniBlank": { + "type": "boolean", + "default": false + }, + "vlessRouteId": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 65535, + "exclusiveMaximum": false, + "nullable": true + }, + "pinnedPeerCertSha256": { + "type": "string", + "nullable": true + }, + "verifyPeerCertByName": { + "type": "string", + "nullable": true + }, + "shuffleHost": { + "type": "boolean" + }, + "mihomoX25519": { + "type": "boolean" + }, + "mihomoIpVersion": { + "type": "string", + "enum": [ + "dual", + "ipv4", + "ipv6", + "ipv4-prefer", + "ipv6-prefer" + ], + "x-enumNames": [ + "DUAL", + "IPV4", + "IPV6", + "IPV4_PREFER", + "IPV6_PREFER" + ], + "nullable": true + }, + "nodes": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "xrayJsonTemplateUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "excludedInternalSquads": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "excludeFromSubscriptionTypes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + } + } + }, + "required": [ + "uuid", + "viewPosition", + "remark", + "address", + "port", + "path", + "sni", + "host", + "alpn", + "fingerprint", + "isDisabled", + "xhttpExtraParams", + "muxParams", + "sockoptParams", + "finalMask", + "inbound", + "serverDescription", + "vlessRouteId", + "pinnedPeerCertSha256", + "verifyPeerCertByName", + "shuffleHost", + "mihomoX25519", + "mihomoIpVersion", + "nodes", + "xrayJsonTemplateUuid", + "excludedInternalSquads", + "excludeFromSubscriptionTypes" + ] + } + } + }, + "required": [ + "response" + ] + }, + "BulkEnableHostsRequestDto": { + "type": "object", + "properties": { + "uuids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "uuids" + ] + }, + "BulkEnableHostsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "remark": { + "type": "string" + }, + "address": { + "type": "string" + }, + "port": { + "type": "integer" + }, + "path": { + "type": "string", + "nullable": true + }, + "sni": { + "type": "string", + "nullable": true + }, + "host": { + "type": "string", + "nullable": true + }, + "alpn": { + "type": "string", + "enum": [ + "h3", + "h2", + "http/1.1", + "h2,http/1.1", + "h3,h2,http/1.1", + "h3,h2" + ], + "x-enumNames": [ + "H3", + "H2", + "HTTP_1_1", + "H_COMBINED", + "H3_H2_H1_COMBINED", + "H3_H2_COMBINED" + ], + "nullable": true + }, + "fingerprint": { + "type": "string", + "nullable": true + }, + "isDisabled": { + "type": "boolean" + }, + "securityLayer": { + "type": "string", + "enum": [ + "DEFAULT", + "TLS", + "NONE" + ], + "x-enumNames": [ + "DEFAULT", + "TLS", + "NONE" + ], + "default": "DEFAULT" + }, + "xhttpExtraParams": { + "nullable": true + }, + "muxParams": { + "nullable": true + }, + "sockoptParams": { + "nullable": true + }, + "finalMask": { + "nullable": true + }, + "inbound": { + "type": "object", + "properties": { + "configProfileUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "configProfileInboundUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "configProfileUuid", + "configProfileInboundUuid" + ] + }, + "serverDescription": { + "type": "string", + "maxLength": 30, + "nullable": true + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "isHidden": { + "type": "boolean", + "default": false + }, + "overrideSniFromAddress": { + "type": "boolean", + "default": false + }, + "keepSniBlank": { + "type": "boolean", + "default": false + }, + "vlessRouteId": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 65535, + "exclusiveMaximum": false, + "nullable": true + }, + "pinnedPeerCertSha256": { + "type": "string", + "nullable": true + }, + "verifyPeerCertByName": { + "type": "string", + "nullable": true + }, + "shuffleHost": { + "type": "boolean" + }, + "mihomoX25519": { + "type": "boolean" + }, + "mihomoIpVersion": { + "type": "string", + "enum": [ + "dual", + "ipv4", + "ipv6", + "ipv4-prefer", + "ipv6-prefer" + ], + "x-enumNames": [ + "DUAL", + "IPV4", + "IPV6", + "IPV4_PREFER", + "IPV6_PREFER" + ], + "nullable": true + }, + "nodes": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "xrayJsonTemplateUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "excludedInternalSquads": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "excludeFromSubscriptionTypes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + } + } + }, + "required": [ + "uuid", + "viewPosition", + "remark", + "address", + "port", + "path", + "sni", + "host", + "alpn", + "fingerprint", + "isDisabled", + "xhttpExtraParams", + "muxParams", + "sockoptParams", + "finalMask", + "inbound", + "serverDescription", + "vlessRouteId", + "pinnedPeerCertSha256", + "verifyPeerCertByName", + "shuffleHost", + "mihomoX25519", + "mihomoIpVersion", + "nodes", + "xrayJsonTemplateUuid", + "excludedInternalSquads", + "excludeFromSubscriptionTypes" + ] + } + } + }, + "required": [ + "response" + ] + }, + "UpdateManyHostsRequestDto": { + "type": "object", + "properties": { + "inbound": { + "type": "object", + "properties": { + "configProfileUuid": { + "type": "string", + "format": "uuid" + }, + "configProfileInboundUuid": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "configProfileUuid", + "configProfileInboundUuid" + ] + }, + "remark": { + "type": "string", + "maxLength": 40 + }, + "address": { + "type": "string" + }, + "port": { + "type": "integer" + }, + "path": { + "type": "string", + "nullable": true + }, + "sni": { + "type": "string", + "nullable": true + }, + "host": { + "type": "string", + "nullable": true + }, + "alpn": { + "type": "string", + "enum": [ + "h3", + "h2", + "http/1.1", + "h2,http/1.1", + "h3,h2,http/1.1", + "h3,h2" + ], + "x-enumNames": [ + "H3", + "H2", + "HTTP_1_1", + "H_COMBINED", + "H3_H2_H1_COMBINED", + "H3_H2_COMBINED" + ], + "nullable": true + }, + "fingerprint": { + "type": "string", + "nullable": true + }, + "isDisabled": { + "type": "boolean", + "default": false + }, + "securityLayer": { + "type": "string", + "enum": [ + "DEFAULT", + "TLS", + "NONE" + ], + "x-enumNames": [ + "DEFAULT", + "TLS", + "NONE" + ] + }, + "xhttpExtraParams": { + "nullable": true + }, + "muxParams": { + "nullable": true + }, + "sockoptParams": { + "nullable": true + }, + "finalMask": { + "nullable": true + }, + "serverDescription": { + "type": "string", + "maxLength": 30, + "nullable": true + }, + "tags": { + "type": "array", + "maxItems": 10, + "items": { + "type": "string", + "pattern": "^[A-Z0-9_:]+$", + "maxLength": 36 + } + }, + "isHidden": { + "type": "boolean" + }, + "overrideSniFromAddress": { + "type": "boolean" + }, + "keepSniBlank": { + "type": "boolean" + }, + "vlessRouteId": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 65535, + "exclusiveMaximum": false, + "nullable": true + }, + "pinnedPeerCertSha256": { + "type": "string", + "nullable": true + }, + "verifyPeerCertByName": { + "type": "string", + "nullable": true + }, + "shuffleHost": { + "type": "boolean" + }, + "mihomoX25519": { + "type": "boolean" + }, + "mihomoIpVersion": { + "type": "string", + "enum": [ + "dual", + "ipv4", + "ipv6", + "ipv4-prefer", + "ipv6-prefer" + ], + "x-enumNames": [ + "DUAL", + "IPV4", + "IPV6", + "IPV4_PREFER", + "IPV6_PREFER" + ], + "nullable": true + }, + "nodes": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "xrayJsonTemplateUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "excludedInternalSquads": { + "description": "Optional. Internal squads from which the host will be excluded.", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "excludeFromSubscriptionTypes": { + "description": "Optional. Subscription types from which the host will be excluded from.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + } + }, + "uuids": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "uuids" + ] + }, + "UpdateManyHostsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "viewPosition": { + "type": "integer" + }, + "remark": { + "type": "string" + }, + "address": { + "type": "string" + }, + "port": { + "type": "integer" + }, + "path": { + "type": "string", + "nullable": true + }, + "sni": { + "type": "string", + "nullable": true + }, + "host": { + "type": "string", + "nullable": true + }, + "alpn": { + "type": "string", + "enum": [ + "h3", + "h2", + "http/1.1", + "h2,http/1.1", + "h3,h2,http/1.1", + "h3,h2" + ], + "x-enumNames": [ + "H3", + "H2", + "HTTP_1_1", + "H_COMBINED", + "H3_H2_H1_COMBINED", + "H3_H2_COMBINED" + ], + "nullable": true + }, + "fingerprint": { + "type": "string", + "nullable": true + }, + "isDisabled": { + "type": "boolean" + }, + "securityLayer": { + "type": "string", + "enum": [ + "DEFAULT", + "TLS", + "NONE" + ], + "x-enumNames": [ + "DEFAULT", + "TLS", + "NONE" + ], + "default": "DEFAULT" + }, + "xhttpExtraParams": { + "nullable": true + }, + "muxParams": { + "nullable": true + }, + "sockoptParams": { + "nullable": true + }, + "finalMask": { + "nullable": true + }, + "inbound": { + "type": "object", + "properties": { + "configProfileUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "configProfileInboundUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "configProfileUuid", + "configProfileInboundUuid" + ] + }, + "serverDescription": { + "type": "string", + "maxLength": 30, + "nullable": true + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "isHidden": { + "type": "boolean", + "default": false + }, + "overrideSniFromAddress": { + "type": "boolean", + "default": false + }, + "keepSniBlank": { + "type": "boolean", + "default": false + }, + "vlessRouteId": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": false, + "maximum": 65535, + "exclusiveMaximum": false, + "nullable": true + }, + "pinnedPeerCertSha256": { + "type": "string", + "nullable": true + }, + "verifyPeerCertByName": { + "type": "string", + "nullable": true + }, + "shuffleHost": { + "type": "boolean" + }, + "mihomoX25519": { + "type": "boolean" + }, + "mihomoIpVersion": { + "type": "string", + "enum": [ + "dual", + "ipv4", + "ipv6", + "ipv4-prefer", + "ipv6-prefer" + ], + "x-enumNames": [ + "DUAL", + "IPV4", + "IPV6", + "IPV4_PREFER", + "IPV6_PREFER" + ], + "nullable": true + }, + "nodes": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "xrayJsonTemplateUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "excludedInternalSquads": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "excludeFromSubscriptionTypes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX" + ] + } + } + }, + "required": [ + "uuid", + "viewPosition", + "remark", + "address", + "port", + "path", + "sni", + "host", + "alpn", + "fingerprint", + "isDisabled", + "xhttpExtraParams", + "muxParams", + "sockoptParams", + "finalMask", + "inbound", + "serverDescription", + "vlessRouteId", + "pinnedPeerCertSha256", + "verifyPeerCertByName", + "shuffleHost", + "mihomoX25519", + "mihomoIpVersion", + "nodes", + "xrayJsonTemplateUuid", + "excludedInternalSquads", + "excludeFromSubscriptionTypes" + ] + } + } + }, + "required": [ + "response" + ] + }, + "GetLegacyStatsNodesUsersUsageResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "array", + "items": { + "type": "object", + "properties": { + "userUuid": { + "type": "string", + "format": "uuid" + }, + "username": { + "type": "string" + }, + "nodeUuid": { + "type": "string", + "format": "uuid" + }, + "total": { + "type": "number" + }, + "date": { + "type": "string" + } + }, + "required": [ + "userUuid", + "username", + "nodeUuid", + "total", + "date" + ] + } + } + }, + "required": [ + "response" + ] + }, + "GetStatsNodeUsersUsageResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "sparklineData": { + "type": "array", + "items": { + "type": "number" + } + }, + "topUsers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "color": { + "type": "string" + }, + "username": { + "type": "string" + }, + "total": { + "type": "number" + } + }, + "required": [ + "color", + "username", + "total" + ] + } + } + }, + "required": [ + "categories", + "sparklineData", + "topUsers" + ] + } + }, + "required": [ + "response" + ] + }, + "GetStatsNodesUsersUsageRequestDto": { + "type": "object", + "properties": { + "nodesUuids": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "nodesUuids" + ] + }, + "GetStatsNodesUsersUsageResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "sparklineData": { + "type": "array", + "items": { + "type": "number" + } + }, + "topUsers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "color": { + "type": "string" + }, + "username": { + "type": "string" + }, + "total": { + "type": "number" + } + }, + "required": [ + "color", + "username", + "total" + ] + } + } + }, + "required": [ + "categories", + "sparklineData", + "topUsers" + ] + } + }, + "required": [ + "response" + ] + }, + "GetLegacyStatsUserUsageResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "array", + "items": { + "type": "object", + "properties": { + "userUuid": { + "type": "string", + "format": "uuid" + }, + "nodeUuid": { + "type": "string", + "format": "uuid" + }, + "nodeName": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "total": { + "type": "number" + }, + "date": { + "type": "string" + } + }, + "required": [ + "userUuid", + "nodeUuid", + "nodeName", + "countryCode", + "total", + "date" + ] + } + } + }, + "required": [ + "response" + ] + }, + "GetStatsUserUsageResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "sparklineData": { + "type": "array", + "items": { + "type": "number" + } + }, + "topNodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "color": { + "type": "string" + }, + "name": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "total": { + "type": "number" + } + }, + "required": [ + "uuid", + "color", + "name", + "countryCode", + "total" + ] + } + }, + "series": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "color": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "total": { + "type": "number" + }, + "data": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "uuid", + "name", + "color", + "countryCode", + "total", + "data" + ] + } + } + }, + "required": [ + "categories", + "sparklineData", + "topNodes", + "series" + ] + } + }, + "required": [ + "response" + ] + }, + "GetAllHwidDevicesResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "devices": { + "type": "array", + "items": { + "type": "object", + "properties": { + "hwid": { + "type": "string" + }, + "userId": { + "type": "number" + }, + "platform": { + "type": "string", + "nullable": true + }, + "osVersion": { + "type": "string", + "nullable": true + }, + "deviceModel": { + "type": "string", + "nullable": true + }, + "userAgent": { + "type": "string", + "nullable": true + }, + "requestIp": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "hwid", + "userId", + "platform", + "osVersion", + "deviceModel", + "userAgent", + "requestIp", + "createdAt", + "updatedAt" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "devices", + "total" + ] + } + }, + "required": [ + "response" + ] + }, + "CreateUserHwidDeviceRequestDto": { + "type": "object", + "properties": { + "hwid": { + "type": "string" + }, + "userUuid": { + "type": "string", + "format": "uuid" + }, + "platform": { + "type": "string" + }, + "osVersion": { + "type": "string" + }, + "deviceModel": { + "type": "string" + }, + "userAgent": { + "type": "string" + }, + "requestIp": { + "type": "string" + } + }, + "required": [ + "hwid", + "userUuid" + ] + }, + "CreateUserHwidDeviceResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "devices": { + "type": "array", + "items": { + "type": "object", + "properties": { + "hwid": { + "type": "string" + }, + "userId": { + "type": "number" + }, + "platform": { + "type": "string", + "nullable": true + }, + "osVersion": { + "type": "string", + "nullable": true + }, + "deviceModel": { + "type": "string", + "nullable": true + }, + "userAgent": { + "type": "string", + "nullable": true + }, + "requestIp": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "hwid", + "userId", + "platform", + "osVersion", + "deviceModel", + "userAgent", + "requestIp", + "createdAt", + "updatedAt" + ] + } + } + }, + "required": [ + "total", + "devices" + ] + } + }, + "required": [ + "response" + ] + }, + "DeleteUserHwidDeviceRequestDto": { + "type": "object", + "properties": { + "userUuid": { + "type": "string", + "format": "uuid" + }, + "hwid": { + "type": "string" + } + }, + "required": [ + "userUuid", + "hwid" + ] + }, + "DeleteUserHwidDeviceResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "devices": { + "type": "array", + "items": { + "type": "object", + "properties": { + "hwid": { + "type": "string" + }, + "userId": { + "type": "number" + }, + "platform": { + "type": "string", + "nullable": true + }, + "osVersion": { + "type": "string", + "nullable": true + }, + "deviceModel": { + "type": "string", + "nullable": true + }, + "userAgent": { + "type": "string", + "nullable": true + }, + "requestIp": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "hwid", + "userId", + "platform", + "osVersion", + "deviceModel", + "userAgent", + "requestIp", + "createdAt", + "updatedAt" + ] + } + } + }, + "required": [ + "total", + "devices" + ] + } + }, + "required": [ + "response" + ] + }, + "DeleteAllUserHwidDevicesRequestDto": { + "type": "object", + "properties": { + "userUuid": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "userUuid" + ] + }, + "DeleteAllUserHwidDevicesResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "devices": { + "type": "array", + "items": { + "type": "object", + "properties": { + "hwid": { + "type": "string" + }, + "userId": { + "type": "number" + }, + "platform": { + "type": "string", + "nullable": true + }, + "osVersion": { + "type": "string", + "nullable": true + }, + "deviceModel": { + "type": "string", + "nullable": true + }, + "userAgent": { + "type": "string", + "nullable": true + }, + "requestIp": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "hwid", + "userId", + "platform", + "osVersion", + "deviceModel", + "userAgent", + "requestIp", + "createdAt", + "updatedAt" + ] + } + } + }, + "required": [ + "total", + "devices" + ] + } + }, + "required": [ + "response" + ] + }, + "GetHwidDevicesStatsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "byPlatform": { + "type": "array", + "items": { + "type": "object", + "properties": { + "platform": { + "type": "string" + }, + "count": { + "type": "number" + }, + "byApp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "app": { + "type": "string" + }, + "count": { + "type": "number" + } + }, + "required": [ + "app", + "count" + ] + } + } + }, + "required": [ + "platform", + "count", + "byApp" + ] + } + }, + "stats": { + "type": "object", + "properties": { + "totalUniqueDevices": { + "type": "number" + }, + "totalHwidDevices": { + "type": "number" + }, + "averageHwidDevicesPerUser": { + "type": "number" + } + }, + "required": [ + "totalUniqueDevices", + "totalHwidDevices", + "averageHwidDevicesPerUser" + ] + } + }, + "required": [ + "byPlatform", + "stats" + ] + } + }, + "required": [ + "response" + ] + }, + "GetTopUsersByHwidDevicesResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "users": { + "type": "array", + "items": { + "type": "object", + "properties": { + "userUuid": { + "type": "string", + "format": "uuid" + }, + "id": { + "type": "number" + }, + "username": { + "type": "string" + }, + "devicesCount": { + "type": "number" + } + }, + "required": [ + "userUuid", + "id", + "username", + "devicesCount" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "users", + "total" + ] + } + }, + "required": [ + "response" + ] + }, + "GetUserHwidDevicesResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "devices": { + "type": "array", + "items": { + "type": "object", + "properties": { + "hwid": { + "type": "string" + }, + "userId": { + "type": "number" + }, + "platform": { + "type": "string", + "nullable": true + }, + "osVersion": { + "type": "string", + "nullable": true + }, + "deviceModel": { + "type": "string", + "nullable": true + }, + "userAgent": { + "type": "string", + "nullable": true + }, + "requestIp": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "hwid", + "userId", + "platform", + "osVersion", + "deviceModel", + "userAgent", + "requestIp", + "createdAt", + "updatedAt" + ] + } + } + }, + "required": [ + "total", + "devices" + ] + } + }, + "required": [ + "response" + ] + }, + "GetStatsNodesUsageResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "sparklineData": { + "type": "array", + "items": { + "type": "number" + } + }, + "topNodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "color": { + "type": "string" + }, + "name": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "total": { + "type": "number" + } + }, + "required": [ + "uuid", + "color", + "name", + "countryCode", + "total" + ] + } + }, + "series": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "color": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "total": { + "type": "number" + }, + "data": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "uuid", + "name", + "color", + "countryCode", + "total", + "data" + ] + } + } + }, + "required": [ + "categories", + "sparklineData", + "topNodes", + "series" + ] + } + }, + "required": [ + "response" + ] + }, + "GetInfraProvidersResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "providers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "faviconLink": { + "type": "string", + "nullable": true + }, + "loginUrl": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "billingHistory": { + "type": "object", + "properties": { + "totalAmount": { + "type": "number" + }, + "totalBills": { + "type": "number" + } + }, + "required": [ + "totalAmount", + "totalBills" + ] + }, + "billingNodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "details": { + "type": "object", + "properties": { + "nodeUuid": { + "type": "string", + "format": "uuid" + }, + "countryCode": { + "type": "string" + } + }, + "required": [ + "nodeUuid", + "countryCode" + ], + "nullable": true + } + }, + "required": [ + "name", + "details" + ] + } + } + }, + "required": [ + "uuid", + "name", + "faviconLink", + "loginUrl", + "createdAt", + "updatedAt", + "billingHistory", + "billingNodes" + ] + } + } + }, + "required": [ + "total", + "providers" + ] + } + }, + "required": [ + "response" + ] + }, + "GetInfraProviderByUuidResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "faviconLink": { + "type": "string", + "nullable": true + }, + "loginUrl": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "billingHistory": { + "type": "object", + "properties": { + "totalAmount": { + "type": "number" + }, + "totalBills": { + "type": "number" + } + }, + "required": [ + "totalAmount", + "totalBills" + ] + }, + "billingNodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "details": { + "type": "object", + "properties": { + "nodeUuid": { + "type": "string", + "format": "uuid" + }, + "countryCode": { + "type": "string" + } + }, + "required": [ + "nodeUuid", + "countryCode" + ], + "nullable": true + } + }, + "required": [ + "name", + "details" + ] + } + } + }, + "required": [ + "uuid", + "name", + "faviconLink", + "loginUrl", + "createdAt", + "updatedAt", + "billingHistory", + "billingNodes" + ] + } + }, + "required": [ + "response" + ] + }, + "DeleteInfraProviderByUuidResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "isDeleted": { + "type": "boolean" + } + }, + "required": [ + "isDeleted" + ] + } + }, + "required": [ + "response" + ] + }, + "CreateInfraProviderRequestDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 2, + "maxLength": 30 + }, + "faviconLink": { + "type": "string", + "format": "uri" + }, + "loginUrl": { + "type": "string", + "format": "uri" + } + }, + "required": [ + "name" + ] + }, + "CreateInfraProviderResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "faviconLink": { + "type": "string", + "nullable": true + }, + "loginUrl": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "billingHistory": { + "type": "object", + "properties": { + "totalAmount": { + "type": "number" + }, + "totalBills": { + "type": "number" + } + }, + "required": [ + "totalAmount", + "totalBills" + ] + }, + "billingNodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "details": { + "type": "object", + "properties": { + "nodeUuid": { + "type": "string", + "format": "uuid" + }, + "countryCode": { + "type": "string" + } + }, + "required": [ + "nodeUuid", + "countryCode" + ], + "nullable": true + } + }, + "required": [ + "name", + "details" + ] + } + } + }, + "required": [ + "uuid", + "name", + "faviconLink", + "loginUrl", + "createdAt", + "updatedAt", + "billingHistory", + "billingNodes" + ] + } + }, + "required": [ + "response" + ] + }, + "UpdateInfraProviderRequestDto": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string", + "minLength": 2, + "maxLength": 30 + }, + "faviconLink": { + "type": "string", + "format": "uri", + "nullable": true + }, + "loginUrl": { + "type": "string", + "format": "uri", + "nullable": true + } + }, + "required": [ + "uuid" + ] + }, + "UpdateInfraProviderResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "faviconLink": { + "type": "string", + "nullable": true + }, + "loginUrl": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "billingHistory": { + "type": "object", + "properties": { + "totalAmount": { + "type": "number" + }, + "totalBills": { + "type": "number" + } + }, + "required": [ + "totalAmount", + "totalBills" + ] + }, + "billingNodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "details": { + "type": "object", + "properties": { + "nodeUuid": { + "type": "string", + "format": "uuid" + }, + "countryCode": { + "type": "string" + } + }, + "required": [ + "nodeUuid", + "countryCode" + ], + "nullable": true + } + }, + "required": [ + "name", + "details" + ] + } + } + }, + "required": [ + "uuid", + "name", + "faviconLink", + "loginUrl", + "createdAt", + "updatedAt", + "billingHistory", + "billingNodes" + ] + } + }, + "required": [ + "response" + ] + }, + "CreateInfraBillingHistoryRecordRequestDto": { + "type": "object", + "properties": { + "providerUuid": { + "type": "string", + "format": "uuid" + }, + "amount": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": false + }, + "billedAt": { + "description": "Billing date. Format: 2025-01-17T15:38:45.065Z", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "providerUuid", + "amount", + "billedAt" + ] + }, + "CreateInfraBillingHistoryRecordResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "records": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "providerUuid": { + "type": "string", + "format": "uuid" + }, + "amount": { + "type": "number" + }, + "billedAt": { + "type": "string", + "format": "date-time" + }, + "provider": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "faviconLink": { + "type": "string", + "nullable": true + } + }, + "required": [ + "uuid", + "name", + "faviconLink" + ] + } + }, + "required": [ + "uuid", + "providerUuid", + "amount", + "billedAt", + "provider" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "records", + "total" + ] + } + }, + "required": [ + "response" + ] + }, + "GetInfraBillingHistoryRecordsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "records": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "providerUuid": { + "type": "string", + "format": "uuid" + }, + "amount": { + "type": "number" + }, + "billedAt": { + "type": "string", + "format": "date-time" + }, + "provider": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "faviconLink": { + "type": "string", + "nullable": true + } + }, + "required": [ + "uuid", + "name", + "faviconLink" + ] + } + }, + "required": [ + "uuid", + "providerUuid", + "amount", + "billedAt", + "provider" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "records", + "total" + ] + } + }, + "required": [ + "response" + ] + }, + "DeleteInfraBillingHistoryRecordByUuidResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "records": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "providerUuid": { + "type": "string", + "format": "uuid" + }, + "amount": { + "type": "number" + }, + "billedAt": { + "type": "string", + "format": "date-time" + }, + "provider": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "faviconLink": { + "type": "string", + "nullable": true + } + }, + "required": [ + "uuid", + "name", + "faviconLink" + ] + } + }, + "required": [ + "uuid", + "providerUuid", + "amount", + "billedAt", + "provider" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "records", + "total" + ] + } + }, + "required": [ + "response" + ] + }, + "GetInfraBillingNodesResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "totalBillingNodes": { + "type": "number" + }, + "billingNodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "nodeUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "providerUuid": { + "type": "string", + "format": "uuid" + }, + "provider": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "loginUrl": { + "type": "string", + "nullable": true + }, + "faviconLink": { + "type": "string", + "nullable": true + } + }, + "required": [ + "uuid", + "name", + "loginUrl", + "faviconLink" + ] + }, + "node": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "countryCode": { + "type": "string" + } + }, + "required": [ + "uuid", + "name", + "countryCode" + ], + "nullable": true + }, + "nextBillingAt": { + "type": "string", + "format": "date-time" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "nodeUuid", + "name", + "providerUuid", + "provider", + "node", + "nextBillingAt", + "createdAt", + "updatedAt" + ] + } + }, + "availableBillingNodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "countryCode": { + "type": "string" + } + }, + "required": [ + "uuid", + "name", + "countryCode" + ] + } + }, + "totalAvailableBillingNodes": { + "type": "number" + }, + "stats": { + "type": "object", + "properties": { + "upcomingNodesCount": { + "type": "number" + }, + "currentMonthPayments": { + "type": "number" + }, + "totalSpent": { + "type": "number" + } + }, + "required": [ + "upcomingNodesCount", + "currentMonthPayments", + "totalSpent" + ] + } + }, + "required": [ + "totalBillingNodes", + "billingNodes", + "availableBillingNodes", + "totalAvailableBillingNodes", + "stats" + ] + } + }, + "required": [ + "response" + ] + }, + "UpdateInfraBillingNodeRequestDto": { + "type": "object", + "properties": { + "uuids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "nextBillingAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuids", + "nextBillingAt" + ] + }, + "UpdateInfraBillingNodeResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "totalBillingNodes": { + "type": "number" + }, + "billingNodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "nodeUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "providerUuid": { + "type": "string", + "format": "uuid" + }, + "provider": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "loginUrl": { + "type": "string", + "nullable": true + }, + "faviconLink": { + "type": "string", + "nullable": true + } + }, + "required": [ + "uuid", + "name", + "loginUrl", + "faviconLink" + ] + }, + "node": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "countryCode": { + "type": "string" + } + }, + "required": [ + "uuid", + "name", + "countryCode" + ], + "nullable": true + }, + "nextBillingAt": { + "type": "string", + "format": "date-time" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "nodeUuid", + "name", + "providerUuid", + "provider", + "node", + "nextBillingAt", + "createdAt", + "updatedAt" + ] + } + }, + "availableBillingNodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "countryCode": { + "type": "string" + } + }, + "required": [ + "uuid", + "name", + "countryCode" + ] + } + }, + "totalAvailableBillingNodes": { + "type": "number" + }, + "stats": { + "type": "object", + "properties": { + "upcomingNodesCount": { + "type": "number" + }, + "currentMonthPayments": { + "type": "number" + }, + "totalSpent": { + "type": "number" + } + }, + "required": [ + "upcomingNodesCount", + "currentMonthPayments", + "totalSpent" + ] + } + }, + "required": [ + "totalBillingNodes", + "billingNodes", + "availableBillingNodes", + "totalAvailableBillingNodes", + "stats" + ] + } + }, + "required": [ + "response" + ] + }, + "CreateInfraBillingNodeRequestDto": { + "type": "object", + "properties": { + "providerUuid": { + "type": "string", + "format": "uuid" + }, + "nodeUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "nullable": true + }, + "nextBillingAt": { + "description": "Next billing date. Format: 2025-01-17T15:38:45.065Z", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "providerUuid", + "nodeUuid", + "name", + "nextBillingAt" + ] + }, + "CreateInfraBillingNodeResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "totalBillingNodes": { + "type": "number" + }, + "billingNodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "nodeUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "providerUuid": { + "type": "string", + "format": "uuid" + }, + "provider": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "loginUrl": { + "type": "string", + "nullable": true + }, + "faviconLink": { + "type": "string", + "nullable": true + } + }, + "required": [ + "uuid", + "name", + "loginUrl", + "faviconLink" + ] + }, + "node": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "countryCode": { + "type": "string" + } + }, + "required": [ + "uuid", + "name", + "countryCode" + ], + "nullable": true + }, + "nextBillingAt": { + "type": "string", + "format": "date-time" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "nodeUuid", + "name", + "providerUuid", + "provider", + "node", + "nextBillingAt", + "createdAt", + "updatedAt" + ] + } + }, + "availableBillingNodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "countryCode": { + "type": "string" + } + }, + "required": [ + "uuid", + "name", + "countryCode" + ] + } + }, + "totalAvailableBillingNodes": { + "type": "number" + }, + "stats": { + "type": "object", + "properties": { + "upcomingNodesCount": { + "type": "number" + }, + "currentMonthPayments": { + "type": "number" + }, + "totalSpent": { + "type": "number" + } + }, + "required": [ + "upcomingNodesCount", + "currentMonthPayments", + "totalSpent" + ] + } + }, + "required": [ + "totalBillingNodes", + "billingNodes", + "availableBillingNodes", + "totalAvailableBillingNodes", + "stats" + ] + } + }, + "required": [ + "response" + ] + }, + "DeleteInfraBillingNodeByUuidResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "totalBillingNodes": { + "type": "number" + }, + "billingNodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "nodeUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "providerUuid": { + "type": "string", + "format": "uuid" + }, + "provider": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "loginUrl": { + "type": "string", + "nullable": true + }, + "faviconLink": { + "type": "string", + "nullable": true + } + }, + "required": [ + "uuid", + "name", + "loginUrl", + "faviconLink" + ] + }, + "node": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "countryCode": { + "type": "string" + } + }, + "required": [ + "uuid", + "name", + "countryCode" + ], + "nullable": true + }, + "nextBillingAt": { + "type": "string", + "format": "date-time" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "nodeUuid", + "name", + "providerUuid", + "provider", + "node", + "nextBillingAt", + "createdAt", + "updatedAt" + ] + } + }, + "availableBillingNodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "countryCode": { + "type": "string" + } + }, + "required": [ + "uuid", + "name", + "countryCode" + ] + } + }, + "totalAvailableBillingNodes": { + "type": "number" + }, + "stats": { + "type": "object", + "properties": { + "upcomingNodesCount": { + "type": "number" + }, + "currentMonthPayments": { + "type": "number" + }, + "totalSpent": { + "type": "number" + } + }, + "required": [ + "upcomingNodesCount", + "currentMonthPayments", + "totalSpent" + ] + } + }, + "required": [ + "totalBillingNodes", + "billingNodes", + "availableBillingNodes", + "totalAvailableBillingNodes", + "stats" + ] + } + }, + "required": [ + "response" + ] + }, + "GetSubscriptionRequestHistoryResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "records": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "userId": { + "type": "number" + }, + "requestIp": { + "type": "string", + "nullable": true + }, + "userAgent": { + "type": "string", + "nullable": true + }, + "requestAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "id", + "userId", + "requestIp", + "userAgent", + "requestAt" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "records", + "total" + ] + } + }, + "required": [ + "response" + ] + }, + "GetSubscriptionRequestHistoryStatsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "byParsedApp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "app": { + "type": "string" + }, + "count": { + "type": "number" + } + }, + "required": [ + "app", + "count" + ] + } + }, + "hourlyRequestStats": { + "type": "array", + "items": { + "type": "object", + "properties": { + "dateTime": { + "type": "string", + "format": "date-time" + }, + "requestCount": { + "type": "number" + } + }, + "required": [ + "dateTime", + "requestCount" + ] + } + } + }, + "required": [ + "byParsedApp", + "hourlyRequestStats" + ] + } + }, + "required": [ + "response" + ] + }, + "GetMetadataResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "build": { + "type": "object", + "properties": { + "time": { + "type": "string" + }, + "number": { + "type": "string" + } + }, + "required": [ + "time", + "number" + ] + }, + "git": { + "type": "object", + "properties": { + "backend": { + "type": "object", + "properties": { + "commitSha": { + "type": "string" + }, + "branch": { + "type": "string" + }, + "commitUrl": { + "type": "string" + } + }, + "required": [ + "commitSha", + "branch", + "commitUrl" + ] + }, + "frontend": { + "type": "object", + "properties": { + "commitSha": { + "type": "string" + }, + "commitUrl": { + "type": "string" + } + }, + "required": [ + "commitSha", + "commitUrl" + ] + } + }, + "required": [ + "backend", + "frontend" + ] + } + }, + "required": [ + "version", + "build", + "git" + ] + } + }, + "required": [ + "response" + ] + }, + "GetStatsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "cpu": { + "type": "object", + "properties": { + "cores": { + "type": "number" + } + }, + "required": [ + "cores" + ] + }, + "memory": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "free": { + "type": "number" + }, + "used": { + "type": "number" + } + }, + "required": [ + "total", + "free", + "used" + ] + }, + "uptime": { + "type": "number" + }, + "timestamp": { + "type": "number" + }, + "users": { + "type": "object", + "properties": { + "statusCounts": { + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "totalUsers": { + "type": "number" + } + }, + "required": [ + "statusCounts", + "totalUsers" + ] + }, + "onlineStats": { + "type": "object", + "properties": { + "lastDay": { + "type": "number" + }, + "lastWeek": { + "type": "number" + }, + "neverOnline": { + "type": "number" + }, + "onlineNow": { + "type": "number" + } + }, + "required": [ + "lastDay", + "lastWeek", + "neverOnline", + "onlineNow" + ] + }, + "nodes": { + "type": "object", + "properties": { + "totalOnline": { + "type": "number" + }, + "totalBytesLifetime": { + "type": "string" + } + }, + "required": [ + "totalOnline", + "totalBytesLifetime" + ] + } + }, + "required": [ + "cpu", + "memory", + "uptime", + "timestamp", + "users", + "onlineStats", + "nodes" + ] + } + }, + "required": [ + "response" + ] + }, + "GetBandwidthStatsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "bandwidthLastTwoDays": { + "type": "object", + "properties": { + "current": { + "type": "string" + }, + "previous": { + "type": "string" + }, + "difference": { + "type": "string" + } + }, + "required": [ + "current", + "previous", + "difference" + ] + }, + "bandwidthLastSevenDays": { + "type": "object", + "properties": { + "current": { + "type": "string" + }, + "previous": { + "type": "string" + }, + "difference": { + "type": "string" + } + }, + "required": [ + "current", + "previous", + "difference" + ] + }, + "bandwidthLast30Days": { + "type": "object", + "properties": { + "current": { + "type": "string" + }, + "previous": { + "type": "string" + }, + "difference": { + "type": "string" + } + }, + "required": [ + "current", + "previous", + "difference" + ] + }, + "bandwidthCalendarMonth": { + "type": "object", + "properties": { + "current": { + "type": "string" + }, + "previous": { + "type": "string" + }, + "difference": { + "type": "string" + } + }, + "required": [ + "current", + "previous", + "difference" + ] + }, + "bandwidthCurrentYear": { + "type": "object", + "properties": { + "current": { + "type": "string" + }, + "previous": { + "type": "string" + }, + "difference": { + "type": "string" + } + }, + "required": [ + "current", + "previous", + "difference" + ] + } + }, + "required": [ + "bandwidthLastTwoDays", + "bandwidthLastSevenDays", + "bandwidthLast30Days", + "bandwidthCalendarMonth", + "bandwidthCurrentYear" + ] + } + }, + "required": [ + "response" + ] + }, + "GetNodesStatisticsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "lastSevenDays": { + "type": "array", + "items": { + "type": "object", + "properties": { + "nodeName": { + "type": "string" + }, + "date": { + "type": "string" + }, + "totalBytes": { + "type": "string" + } + }, + "required": [ + "nodeName", + "date", + "totalBytes" + ] + } + } + }, + "required": [ + "lastSevenDays" + ] + } + }, + "required": [ + "response" + ] + }, + "GetRemnawaveHealthResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "runtimeMetrics": { + "type": "array", + "items": { + "type": "object", + "properties": { + "rss": { + "type": "number" + }, + "heapUsed": { + "type": "number" + }, + "heapTotal": { + "type": "number" + }, + "external": { + "type": "number" + }, + "arrayBuffers": { + "type": "number" + }, + "eventLoopDelayMs": { + "type": "number" + }, + "eventLoopP99Ms": { + "type": "number" + }, + "activeHandles": { + "type": "number" + }, + "uptime": { + "type": "number" + }, + "pid": { + "type": "number" + }, + "timestamp": { + "type": "number" + }, + "instanceId": { + "type": "string" + }, + "instanceType": { + "type": "string" + } + }, + "required": [ + "rss", + "heapUsed", + "heapTotal", + "external", + "arrayBuffers", + "eventLoopDelayMs", + "eventLoopP99Ms", + "activeHandles", + "uptime", + "pid", + "timestamp", + "instanceId", + "instanceType" + ] + } + } + }, + "required": [ + "runtimeMetrics" + ] + } + }, + "required": [ + "response" + ] + }, + "GetNodesMetricsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "nodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "nodeUuid": { + "type": "string" + }, + "nodeName": { + "type": "string" + }, + "countryEmoji": { + "type": "string" + }, + "providerName": { + "type": "string" + }, + "usersOnline": { + "type": "number" + }, + "inboundsStats": { + "type": "array", + "items": { + "type": "object", + "properties": { + "tag": { + "type": "string" + }, + "upload": { + "type": "string" + }, + "download": { + "type": "string" + } + }, + "required": [ + "tag", + "upload", + "download" + ] + } + }, + "outboundsStats": { + "type": "array", + "items": { + "type": "object", + "properties": { + "tag": { + "type": "string" + }, + "upload": { + "type": "string" + }, + "download": { + "type": "string" + } + }, + "required": [ + "tag", + "upload", + "download" + ] + } + } + }, + "required": [ + "nodeUuid", + "nodeName", + "countryEmoji", + "providerName", + "usersOnline", + "inboundsStats", + "outboundsStats" + ] + } + } + }, + "required": [ + "nodes" + ] + } + }, + "required": [ + "response" + ] + }, + "GenerateX25519ResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "keypairs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "publicKey": { + "type": "string" + }, + "privateKey": { + "type": "string" + } + }, + "required": [ + "publicKey", + "privateKey" + ] + } + } + }, + "required": [ + "keypairs" + ] + } + }, + "required": [ + "response" + ] + }, + "DebugSrrMatcherRequestDto": { + "type": "object", + "properties": { + "responseRules": { + "type": "object", + "properties": { + "version": { + "description": "{\"title\":\"Response Rules Config Version\",\"markdownDescription\":\"Version of the **response rules** config. Currently supported version is **1**.\"}", + "type": "string", + "enum": [ + "1" + ], + "x-enumNames": [ + "1" + ] + }, + "settings": { + "description": "{\"markdownDescription\":\"Settings for the **response rules** config. Optional.\"}", + "type": "object", + "properties": { + "disableSubscriptionAccessByPath": { + "description": "{\"markdownDescription\":\"Usually, a user's subscription may also be available via additional paths such as **/json**, **/stash**, or **/mihomo**. If this flag is set to **true**, access via these additional paths will be disabled.\"}", + "type": "boolean" + } + } + }, + "rules": { + "description": "{\"title\":\"Response Rules\",\"markdownDescription\":\"Array of **response rules**. Rules are evaluated in order and the first rule that matches is applied. If no rule matches, request will be blocked by default.\\n\\n**Example:**\\n```json\\n[\\n {\\n \\\"name\\\": \\\"Blank rule\\\",\\n \\\"description\\\": \\\"Blank rule\\\",\\n \\\"operator\\\": \\\"AND\\\",\\n \\\"enabled\\\": true,\\n \\\"conditions\\\": [],\\n \\\"responseType\\\": \\\"BLOCK\\\",\\n \\\"responseModifications\\\": {\\n \\\"headers\\\": []\\n }\\n }\\n]\\n```\",\"defaultSnippets\":[]}", + "type": "array", + "items": { + "description": "{\"defaultSnippets\":[{\"label\":\"Examples: Blank rule\",\"markdownDescription\":\"Simple blank rule with no conditions or modifications.\\n```json\\n{\\n \\\"name\\\": \\\"Blank rule\\\",\\n \\\"description\\\": \\\"Blank rule\\\",\\n \\\"operator\\\": \\\"AND\\\",\\n \\\"enabled\\\": true,\\n \\\"conditions\\\": [],\\n \\\"responseType\\\": \\\"BLOCK\\\",\\n \\\"responseModifications\\\": {\\n \\\"headers\\\": []\\n }\\n}\\n```\",\"body\":{\"name\":\"Blank rule\",\"description\":\"Blank rule\",\"operator\":\"AND\",\"enabled\":true,\"conditions\":[],\"responseType\":\"BLOCK\",\"responseModifications\":{\"headers\":[]}}},{\"label\":\"Examples: Block Legacy Clients\",\"markdownDescription\":\"Block requests from legacy clients\\n```json\\n{\\n \\\"name\\\": \\\"Block Legacy Clients\\\",\\n \\\"description\\\": \\\"Block requests from legacy clients\\\",\\n \\\"enabled\\\": true,\\n \\\"operator\\\": \\\"OR\\\",\\n \\\"conditions\\\": [\\n {\\n \\\"headerName\\\": \\\"user-agent\\\",\\n \\\"operator\\\": \\\"CONTAINS\\\",\\n \\\"value\\\": \\\"Hiddify\\\",\\n \\\"caseSensitive\\\": true\\n },\\n {\\n \\\"headerName\\\": \\\"user-agent\\\",\\n \\\"operator\\\": \\\"CONTAINS\\\",\\n \\\"value\\\": \\\"FoxRay\\\",\\n \\\"caseSensitive\\\": true\\n }\\n ],\\n \\\"responseType\\\": \\\"BLOCK\\\"\\n}\\n```\",\"body\":{\"name\":\"Block Legacy Clients\",\"description\":\"Block requests from legacy clients\",\"enabled\":true,\"operator\":\"OR\",\"conditions\":[{\"headerName\":\"user-agent\",\"operator\":\"CONTAINS\",\"value\":\"Hiddify\",\"caseSensitive\":true},{\"headerName\":\"user-agent\",\"operator\":\"CONTAINS\",\"value\":\"FoxRay\",\"caseSensitive\":true}],\"responseType\":\"BLOCK\"}}],\"title\":\"Response Rule\",\"markdownDescription\":\"Response rule configuration.\\n\\n**Fields:**\\n- **name**: Name of the response rule.\\n- **description**: Description of the response rule. Optional.\\n- **enabled**: Control whether the response rule is enabled or disabled. \\n\\n - `true` the rule will be applied. \\n\\n - `false` the rule will be always ignored.\\n- **operator**: Operator to use for combining conditions in the rule.\\n- **conditions**: Array of conditions to check against the request headers. Conditions are applied with **operator**. If conditions are empty, the rule will be matched.\\n- **responseType**: Type of the response. Determines the type of **response** to be returned when the rule is matched.\\n- **responseModifications**: Response modifications to be applied when the rule is matched. Optional.\\n\\n**Example:**\\n```json\\n{\\n \\\"name\\\": \\\"Block Legacy Clients\\\",\\n \\\"description\\\": \\\"Block requests from legacy clients\\\",\\n \\\"enabled\\\": true,\\n \\\"operator\\\": \\\"OR\\\",\\n \\\"conditions\\\": [\\n {\\n \\\"headerName\\\": \\\"user-agent\\\",\\n \\\"operator\\\": \\\"CONTAINS\\\",\\n \\\"value\\\": \\\"Hiddify\\\",\\n \\\"caseSensitive\\\": true\\n },\\n {\\n \\\"headerName\\\": \\\"user-agent\\\",\\n \\\"operator\\\": \\\"CONTAINS\\\",\\n \\\"value\\\": \\\"FoxRay\\\",\\n \\\"caseSensitive\\\": true\\n }\\n ],\\n \\\"responseType\\\": \\\"BLOCK\\\"\\n}\\n```\"}", + "type": "object", + "properties": { + "name": { + "description": "{\"markdownDescription\":\"Name of the response rule.\"}", + "type": "string", + "minLength": 1, + "maxLength": 50 + }, + "description": { + "description": "{\"markdownDescription\":\"Description of the response rule. Optional.\"}", + "type": "string", + "minLength": 1, + "maxLength": 250 + }, + "enabled": { + "description": "{\"markdownDescription\":\"Control whether the response rule is enabled or disabled. \\n\\n - `true` the rule will be applied. \\n\\n - `false` the rule will be always ignored.\"}", + "type": "boolean" + }, + "operator": { + "description": "{\"markdownDescription\":\"Operator to use for combining conditions in the rule.\"}", + "type": "string", + "enum": [ + "AND", + "OR" + ], + "x-enumNames": [ + "AND", + "OR" + ] + }, + "conditions": { + "description": "{\"markdownDescription\":\"Array of conditions to check against the request headers. Conditions are applied with **operator**. If conditions are empty, the rule will be matched.\"}", + "type": "array", + "items": { + "description": "{\"markdownDescription\":\"Condition to check against the **headerName**.\",\"defaultSnippets\":[{\"label\":\"Examples: Check if header contains \\\"text/html\\\"\",\"markdownDescription\":\"Condition to check if **headerName** contains \\\"text/html\\\"\",\"body\":{\"headerName\":\"accept\",\"operator\":\"CONTAINS\",\"value\":\"text/html\",\"caseSensitive\":true}}]}", + "type": "object", + "properties": { + "headerName": { + "description": "{\"markdownDescription\":\"**Name** of the HTTP header to check. Must comply with RFC 7230.\"}", + "type": "string", + "pattern": "^[!#$%&'*+\\-.0-9A-Z^_`a-z|~]+$" + }, + "operator": { + "description": "{\"errorMessage\":\"Invalid operator. Please select a valid operator.\",\"markdownDescription\":\"Operator to use for comparing the `headerName` with `value`.\",\"markdownEnumDescriptions\":[\"Performs an exact, comparison between the header value and specified string. `string === value`\",\"Ensures the header value does not exactly match the specified string. `string !== value`\",\"Checks if the header value contains the specified string as a substring. `string.includes()`\",\"Verifies the header value does not contain the specified string as a substring. `!string.includes()`\",\"Validates that the header value begins with the specified string. `string.startsWith()`\",\"Validates that the header value does not begin with the specified string. `!string.startsWith()`\",\"Confirms the header value ends with the specified string. `string.endsWith()`\",\"Confirms the header value does not end with the specified string. `!string.endsWith()`\",\"Evaluates if the header value matches the specified regular expression pattern. `regex.test()`\",\"Evaluates if the header value does not match the specified regular expression pattern. `!regex.test()`\"]}", + "type": "string", + "enum": [ + "EQUALS", + "NOT_EQUALS", + "CONTAINS", + "NOT_CONTAINS", + "STARTS_WITH", + "NOT_STARTS_WITH", + "ENDS_WITH", + "NOT_ENDS_WITH", + "REGEX", + "NOT_REGEX" + ], + "x-enumNames": [ + "EQUALS", + "NOT_EQUALS", + "CONTAINS", + "NOT_CONTAINS", + "STARTS_WITH", + "NOT_STARTS_WITH", + "ENDS_WITH", + "NOT_ENDS_WITH", + "REGEX", + "NOT_REGEX" + ] + }, + "value": { + "description": "{\"markdownDescription\":\"**Value** to check against the **headerName**.\"}", + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "caseSensitive": { + "description": "{\"markdownDescription\":\"Whether the value is **case sensitive**. \\n\\n - `true`: the value will be compared as is. \\n\\n - `false`: the value will be lowercased **before** comparison.\"}", + "type": "boolean" + } + }, + "required": [ + "headerName", + "operator", + "value", + "caseSensitive" + ] + } + }, + "responseType": { + "description": "{\"errorMessage\":\"Invalid response type. Please select a valid response type.\",\"markdownDescription\":\"Type of the response. Determines the type of **response** to be returned when the rule is matched.\",\"markdownEnumDescriptions\":[\"Return **subscription** in XRAY-JSON format. (Using `Xray Json` template)\",\"Return **subscription** in BASE64 encoded string. Compatible with most client application with Xray core.\",\"Return **subscription** in Mihomo format. (Using `Mihomo` template)\",\"Return **subscription** in Stash format. (Using `Stash` template)\",\"Return **subscription** in Clash format. (Using `Clash` template) Useful for client application that use Legacy Clash core.\",\"Return **subscription** in Singbox format. (Using `Singbox` template) Format which is used by Singbox client application.\",\"Return **subscription** as browser format. The same as on `/info` route.\",\"**Drop** request and return `403` status code.\",\"**Drop** request and return `404` status code.\",\"**Drop** request and return `451` status code.\",\"**Drop** the socket connection.\"]}", + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX", + "BROWSER", + "BLOCK", + "STATUS_CODE_404", + "STATUS_CODE_451", + "SOCKET_DROP" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX", + "BROWSER", + "BLOCK", + "STATUS_CODE_404", + "STATUS_CODE_451", + "SOCKET_DROP" + ] + }, + "responseModifications": { + "description": "{\"examples\":[{\"headers\":[{\"key\":\"X-Custom-Header\",\"value\":\"CustomValue\"}]}],\"markdownDescription\":\"Response modifications to be applied when the rule is matched. Optional.\"}", + "type": "object", + "properties": { + "headers": { + "description": "{\"defaultSnippets\":[{\"label\":\"Examples: Add custom header\",\"markdownDescription\":\"Add a custom header to the response\",\"body\":[{\"key\":\"X-Custom-Header\",\"value\":\"CustomValue\"}]}],\"markdownDescription\":\"Array of headers to be added when the rule is matched.\"}", + "type": "array", + "items": { + "description": "{\"markdownDescription\":\"**Key** and **value** of the response header will be added to the response.\"}", + "type": "object", + "properties": { + "key": { + "description": "{\"markdownDescription\":\"Key of the response header. Must comply with RFC 7230.\"}", + "type": "string", + "pattern": "^[!#$%&'*+\\-.0-9A-Z^_`a-z|~]+$" + }, + "value": { + "description": "{\"markdownDescription\":\"Value of the response header. \"}", + "type": "string", + "minLength": 1 + } + }, + "required": [ + "key", + "value" + ] + } + }, + "applyHeadersToEnd": { + "description": "{\"markdownDescription\":\"By default, headers are added when forming the response. In some cases, headers set in SRR may be overridden by headers from other parts of the system. If you set this flag to **true**, headers from SRR will be added at the very end, just before the response is sent. In this case, SRR headers may override headers from other sections.\"}", + "type": "boolean" + }, + "subscriptionTemplate": { + "description": "{\"markdownDescription\":\"Override the subscription template with the given name. If not provided, the default subscription template will be used. If the template name is not found, the default subscription template for this type will be used. **This modification have higher priority than settings from External Squads.**\"}", + "type": "string", + "minLength": 1 + }, + "ignoreHostXrayJsonTemplate": { + "description": "{\"markdownDescription\":\"Each Host may have its own Xray Json Template. If you set this flag to **true**, the Xray Json Template defined by the SRR will be used. **The Host's Xray Json Template will be ignored.**\"}", + "type": "boolean" + }, + "ignoreServeJsonAtBaseSubscription": { + "description": "{\"markdownDescription\":\"If you set this flag to **true**, the **Serve JSON at Base Subscription** setting will be ignored (set to **false**).\"}", + "type": "boolean" + }, + "additionalExtendedClientsRegex": { + "description": "{\"markdownDescription\":\"Additional regex patterns to match extended clients. Matched clients will receive `serverDescription` in the subscription response.\\n\\n**Default Mihomo extended clients:**\\n- `^FlClash ?X/`\\n- `^Flowvy/`\\n- `^prizrak-box/`\\n- `^koala-clash/`\\n\\n**Default Xray extended clients:**\\n- `^Happ/`\\n- `^INCY/`\\n\\n**Example:** `[\\\"^MyClient/\\\", \\\"^CustomApp\\\\\\\\/v2\\\"]`\"}", + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "disableHwidCheck": { + "description": "{\"markdownDescription\":\"If you set this flag to **true**, the HWID check will be disabled. **This modification have higher priority than settings from Subscription Settings.**\"}", + "type": "boolean" + }, + "encryption": { + "description": "{\"markdownDescription\":\"Encrypt response body with given parameters. Generate keypairs with Rescue CLI: `docker exec -it remnawave cli`, select \\\"Generate keypairs\\\".\"}", + "type": "object", + "properties": { + "method": { + "type": "string", + "enum": [ + "age1", + "age1pq1" + ] + }, + "key": { + "type": "string" + } + }, + "required": [ + "method", + "key" + ] + }, + "excludeHostsByTags": { + "description": "{\"markdownDescription\":\"Excludes hosts from the subscription output if at least one tag in the host matches the given tags.\"}", + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "pattern": "^[A-Z0-9_:]+$", + "maxLength": 36 + } + } + } + } + }, + "required": [ + "name", + "enabled", + "operator", + "conditions", + "responseType" + ] + } + } + }, + "required": [ + "version", + "rules" + ] + } + }, + "required": [ + "responseRules" + ] + }, + "DebugSrrMatcherResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "matched": { + "type": "boolean" + }, + "responseType": { + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX", + "BROWSER", + "BLOCK", + "STATUS_CODE_404", + "STATUS_CODE_451", + "SOCKET_DROP" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX", + "BROWSER", + "BLOCK", + "STATUS_CODE_404", + "STATUS_CODE_451", + "SOCKET_DROP" + ] + }, + "matchedRule": { + "description": "{\"defaultSnippets\":[{\"label\":\"Examples: Blank rule\",\"markdownDescription\":\"Simple blank rule with no conditions or modifications.\\n```json\\n{\\n \\\"name\\\": \\\"Blank rule\\\",\\n \\\"description\\\": \\\"Blank rule\\\",\\n \\\"operator\\\": \\\"AND\\\",\\n \\\"enabled\\\": true,\\n \\\"conditions\\\": [],\\n \\\"responseType\\\": \\\"BLOCK\\\",\\n \\\"responseModifications\\\": {\\n \\\"headers\\\": []\\n }\\n}\\n```\",\"body\":{\"name\":\"Blank rule\",\"description\":\"Blank rule\",\"operator\":\"AND\",\"enabled\":true,\"conditions\":[],\"responseType\":\"BLOCK\",\"responseModifications\":{\"headers\":[]}}},{\"label\":\"Examples: Block Legacy Clients\",\"markdownDescription\":\"Block requests from legacy clients\\n```json\\n{\\n \\\"name\\\": \\\"Block Legacy Clients\\\",\\n \\\"description\\\": \\\"Block requests from legacy clients\\\",\\n \\\"enabled\\\": true,\\n \\\"operator\\\": \\\"OR\\\",\\n \\\"conditions\\\": [\\n {\\n \\\"headerName\\\": \\\"user-agent\\\",\\n \\\"operator\\\": \\\"CONTAINS\\\",\\n \\\"value\\\": \\\"Hiddify\\\",\\n \\\"caseSensitive\\\": true\\n },\\n {\\n \\\"headerName\\\": \\\"user-agent\\\",\\n \\\"operator\\\": \\\"CONTAINS\\\",\\n \\\"value\\\": \\\"FoxRay\\\",\\n \\\"caseSensitive\\\": true\\n }\\n ],\\n \\\"responseType\\\": \\\"BLOCK\\\"\\n}\\n```\",\"body\":{\"name\":\"Block Legacy Clients\",\"description\":\"Block requests from legacy clients\",\"enabled\":true,\"operator\":\"OR\",\"conditions\":[{\"headerName\":\"user-agent\",\"operator\":\"CONTAINS\",\"value\":\"Hiddify\",\"caseSensitive\":true},{\"headerName\":\"user-agent\",\"operator\":\"CONTAINS\",\"value\":\"FoxRay\",\"caseSensitive\":true}],\"responseType\":\"BLOCK\"}}],\"title\":\"Response Rule\",\"markdownDescription\":\"Response rule configuration.\\n\\n**Fields:**\\n- **name**: Name of the response rule.\\n- **description**: Description of the response rule. Optional.\\n- **enabled**: Control whether the response rule is enabled or disabled. \\n\\n - `true` the rule will be applied. \\n\\n - `false` the rule will be always ignored.\\n- **operator**: Operator to use for combining conditions in the rule.\\n- **conditions**: Array of conditions to check against the request headers. Conditions are applied with **operator**. If conditions are empty, the rule will be matched.\\n- **responseType**: Type of the response. Determines the type of **response** to be returned when the rule is matched.\\n- **responseModifications**: Response modifications to be applied when the rule is matched. Optional.\\n\\n**Example:**\\n```json\\n{\\n \\\"name\\\": \\\"Block Legacy Clients\\\",\\n \\\"description\\\": \\\"Block requests from legacy clients\\\",\\n \\\"enabled\\\": true,\\n \\\"operator\\\": \\\"OR\\\",\\n \\\"conditions\\\": [\\n {\\n \\\"headerName\\\": \\\"user-agent\\\",\\n \\\"operator\\\": \\\"CONTAINS\\\",\\n \\\"value\\\": \\\"Hiddify\\\",\\n \\\"caseSensitive\\\": true\\n },\\n {\\n \\\"headerName\\\": \\\"user-agent\\\",\\n \\\"operator\\\": \\\"CONTAINS\\\",\\n \\\"value\\\": \\\"FoxRay\\\",\\n \\\"caseSensitive\\\": true\\n }\\n ],\\n \\\"responseType\\\": \\\"BLOCK\\\"\\n}\\n```\"}", + "type": "object", + "properties": { + "name": { + "description": "{\"markdownDescription\":\"Name of the response rule.\"}", + "type": "string", + "minLength": 1, + "maxLength": 50 + }, + "description": { + "description": "{\"markdownDescription\":\"Description of the response rule. Optional.\"}", + "type": "string", + "minLength": 1, + "maxLength": 250 + }, + "enabled": { + "description": "{\"markdownDescription\":\"Control whether the response rule is enabled or disabled. \\n\\n - `true` the rule will be applied. \\n\\n - `false` the rule will be always ignored.\"}", + "type": "boolean" + }, + "operator": { + "description": "{\"markdownDescription\":\"Operator to use for combining conditions in the rule.\"}", + "type": "string", + "enum": [ + "AND", + "OR" + ], + "x-enumNames": [ + "AND", + "OR" + ] + }, + "conditions": { + "description": "{\"markdownDescription\":\"Array of conditions to check against the request headers. Conditions are applied with **operator**. If conditions are empty, the rule will be matched.\"}", + "type": "array", + "items": { + "description": "{\"markdownDescription\":\"Condition to check against the **headerName**.\",\"defaultSnippets\":[{\"label\":\"Examples: Check if header contains \\\"text/html\\\"\",\"markdownDescription\":\"Condition to check if **headerName** contains \\\"text/html\\\"\",\"body\":{\"headerName\":\"accept\",\"operator\":\"CONTAINS\",\"value\":\"text/html\",\"caseSensitive\":true}}]}", + "type": "object", + "properties": { + "headerName": { + "description": "{\"markdownDescription\":\"**Name** of the HTTP header to check. Must comply with RFC 7230.\"}", + "type": "string", + "pattern": "^[!#$%&'*+\\-.0-9A-Z^_`a-z|~]+$" + }, + "operator": { + "description": "{\"errorMessage\":\"Invalid operator. Please select a valid operator.\",\"markdownDescription\":\"Operator to use for comparing the `headerName` with `value`.\",\"markdownEnumDescriptions\":[\"Performs an exact, comparison between the header value and specified string. `string === value`\",\"Ensures the header value does not exactly match the specified string. `string !== value`\",\"Checks if the header value contains the specified string as a substring. `string.includes()`\",\"Verifies the header value does not contain the specified string as a substring. `!string.includes()`\",\"Validates that the header value begins with the specified string. `string.startsWith()`\",\"Validates that the header value does not begin with the specified string. `!string.startsWith()`\",\"Confirms the header value ends with the specified string. `string.endsWith()`\",\"Confirms the header value does not end with the specified string. `!string.endsWith()`\",\"Evaluates if the header value matches the specified regular expression pattern. `regex.test()`\",\"Evaluates if the header value does not match the specified regular expression pattern. `!regex.test()`\"]}", + "type": "string", + "enum": [ + "EQUALS", + "NOT_EQUALS", + "CONTAINS", + "NOT_CONTAINS", + "STARTS_WITH", + "NOT_STARTS_WITH", + "ENDS_WITH", + "NOT_ENDS_WITH", + "REGEX", + "NOT_REGEX" + ], + "x-enumNames": [ + "EQUALS", + "NOT_EQUALS", + "CONTAINS", + "NOT_CONTAINS", + "STARTS_WITH", + "NOT_STARTS_WITH", + "ENDS_WITH", + "NOT_ENDS_WITH", + "REGEX", + "NOT_REGEX" + ] + }, + "value": { + "description": "{\"markdownDescription\":\"**Value** to check against the **headerName**.\"}", + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "caseSensitive": { + "description": "{\"markdownDescription\":\"Whether the value is **case sensitive**. \\n\\n - `true`: the value will be compared as is. \\n\\n - `false`: the value will be lowercased **before** comparison.\"}", + "type": "boolean" + } + }, + "required": [ + "headerName", + "operator", + "value", + "caseSensitive" + ] + } + }, + "responseType": { + "description": "{\"errorMessage\":\"Invalid response type. Please select a valid response type.\",\"markdownDescription\":\"Type of the response. Determines the type of **response** to be returned when the rule is matched.\",\"markdownEnumDescriptions\":[\"Return **subscription** in XRAY-JSON format. (Using `Xray Json` template)\",\"Return **subscription** in BASE64 encoded string. Compatible with most client application with Xray core.\",\"Return **subscription** in Mihomo format. (Using `Mihomo` template)\",\"Return **subscription** in Stash format. (Using `Stash` template)\",\"Return **subscription** in Clash format. (Using `Clash` template) Useful for client application that use Legacy Clash core.\",\"Return **subscription** in Singbox format. (Using `Singbox` template) Format which is used by Singbox client application.\",\"Return **subscription** as browser format. The same as on `/info` route.\",\"**Drop** request and return `403` status code.\",\"**Drop** request and return `404` status code.\",\"**Drop** request and return `451` status code.\",\"**Drop** the socket connection.\"]}", + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX", + "BROWSER", + "BLOCK", + "STATUS_CODE_404", + "STATUS_CODE_451", + "SOCKET_DROP" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX", + "BROWSER", + "BLOCK", + "STATUS_CODE_404", + "STATUS_CODE_451", + "SOCKET_DROP" + ] + }, + "responseModifications": { + "description": "{\"examples\":[{\"headers\":[{\"key\":\"X-Custom-Header\",\"value\":\"CustomValue\"}]}],\"markdownDescription\":\"Response modifications to be applied when the rule is matched. Optional.\"}", + "type": "object", + "properties": { + "headers": { + "description": "{\"defaultSnippets\":[{\"label\":\"Examples: Add custom header\",\"markdownDescription\":\"Add a custom header to the response\",\"body\":[{\"key\":\"X-Custom-Header\",\"value\":\"CustomValue\"}]}],\"markdownDescription\":\"Array of headers to be added when the rule is matched.\"}", + "type": "array", + "items": { + "description": "{\"markdownDescription\":\"**Key** and **value** of the response header will be added to the response.\"}", + "type": "object", + "properties": { + "key": { + "description": "{\"markdownDescription\":\"Key of the response header. Must comply with RFC 7230.\"}", + "type": "string", + "pattern": "^[!#$%&'*+\\-.0-9A-Z^_`a-z|~]+$" + }, + "value": { + "description": "{\"markdownDescription\":\"Value of the response header. \"}", + "type": "string", + "minLength": 1 + } + }, + "required": [ + "key", + "value" + ] + } + }, + "applyHeadersToEnd": { + "description": "{\"markdownDescription\":\"By default, headers are added when forming the response. In some cases, headers set in SRR may be overridden by headers from other parts of the system. If you set this flag to **true**, headers from SRR will be added at the very end, just before the response is sent. In this case, SRR headers may override headers from other sections.\"}", + "type": "boolean" + }, + "subscriptionTemplate": { + "description": "{\"markdownDescription\":\"Override the subscription template with the given name. If not provided, the default subscription template will be used. If the template name is not found, the default subscription template for this type will be used. **This modification have higher priority than settings from External Squads.**\"}", + "type": "string", + "minLength": 1 + }, + "ignoreHostXrayJsonTemplate": { + "description": "{\"markdownDescription\":\"Each Host may have its own Xray Json Template. If you set this flag to **true**, the Xray Json Template defined by the SRR will be used. **The Host's Xray Json Template will be ignored.**\"}", + "type": "boolean" + }, + "ignoreServeJsonAtBaseSubscription": { + "description": "{\"markdownDescription\":\"If you set this flag to **true**, the **Serve JSON at Base Subscription** setting will be ignored (set to **false**).\"}", + "type": "boolean" + }, + "additionalExtendedClientsRegex": { + "description": "{\"markdownDescription\":\"Additional regex patterns to match extended clients. Matched clients will receive `serverDescription` in the subscription response.\\n\\n**Default Mihomo extended clients:**\\n- `^FlClash ?X/`\\n- `^Flowvy/`\\n- `^prizrak-box/`\\n- `^koala-clash/`\\n\\n**Default Xray extended clients:**\\n- `^Happ/`\\n- `^INCY/`\\n\\n**Example:** `[\\\"^MyClient/\\\", \\\"^CustomApp\\\\\\\\/v2\\\"]`\"}", + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "disableHwidCheck": { + "description": "{\"markdownDescription\":\"If you set this flag to **true**, the HWID check will be disabled. **This modification have higher priority than settings from Subscription Settings.**\"}", + "type": "boolean" + }, + "encryption": { + "description": "{\"markdownDescription\":\"Encrypt response body with given parameters. Generate keypairs with Rescue CLI: `docker exec -it remnawave cli`, select \\\"Generate keypairs\\\".\"}", + "type": "object", + "properties": { + "method": { + "type": "string", + "enum": [ + "age1", + "age1pq1" + ] + }, + "key": { + "type": "string" + } + }, + "required": [ + "method", + "key" + ] + }, + "excludeHostsByTags": { + "description": "{\"markdownDescription\":\"Excludes hosts from the subscription output if at least one tag in the host matches the given tags.\"}", + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "pattern": "^[A-Z0-9_:]+$", + "maxLength": 36 + } + } + } + } + }, + "required": [ + "name", + "enabled", + "operator", + "conditions", + "responseType" + ], + "nullable": true + }, + "inputHeaders": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "outputHeaders": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "required": [ + "matched", + "responseType", + "matchedRule", + "inputHeaders", + "outputHeaders" + ] + } + }, + "required": [ + "response" + ] + }, + "GetRecapResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "thisMonth": { + "type": "object", + "properties": { + "users": { + "type": "number" + }, + "traffic": { + "type": "string" + } + }, + "required": [ + "users", + "traffic" + ] + }, + "total": { + "type": "object", + "properties": { + "users": { + "type": "number" + }, + "nodes": { + "type": "number" + }, + "traffic": { + "type": "string" + }, + "nodesRam": { + "type": "string" + }, + "nodesCpuCores": { + "type": "number" + }, + "distinctCountries": { + "type": "number" + } + }, + "required": [ + "users", + "nodes", + "traffic", + "nodesRam", + "nodesCpuCores", + "distinctCountries" + ] + }, + "version": { + "type": "string" + }, + "initDate": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "thisMonth", + "total", + "version", + "initDate" + ] + } + }, + "required": [ + "response" + ] + }, + "GetSubscriptionSettingsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "profileTitle": { + "type": "string" + }, + "supportLink": { + "type": "string" + }, + "profileUpdateInterval": { + "type": "integer", + "minimum": 1, + "exclusiveMinimum": false + }, + "isProfileWebpageUrlEnabled": { + "type": "boolean" + }, + "serveJsonAtBaseSubscription": { + "type": "boolean" + }, + "isShowCustomRemarks": { + "type": "boolean" + }, + "customRemarks": { + "type": "object", + "properties": { + "expiredUsers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "limitedUsers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "disabledUsers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "emptyHosts": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "HWIDMaxDevicesExceeded": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "HWIDNotSupported": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + }, + "required": [ + "expiredUsers", + "limitedUsers", + "disabledUsers", + "emptyHosts", + "HWIDMaxDevicesExceeded", + "HWIDNotSupported" + ] + }, + "happAnnounce": { + "type": "string", + "nullable": true + }, + "happRouting": { + "type": "string", + "nullable": true + }, + "customResponseHeaders": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true + }, + "randomizeHosts": { + "type": "boolean" + }, + "responseRules": { + "type": "object", + "properties": { + "version": { + "description": "{\"title\":\"Response Rules Config Version\",\"markdownDescription\":\"Version of the **response rules** config. Currently supported version is **1**.\"}", + "type": "string", + "enum": [ + "1" + ], + "x-enumNames": [ + "1" + ] + }, + "settings": { + "description": "{\"markdownDescription\":\"Settings for the **response rules** config. Optional.\"}", + "type": "object", + "properties": { + "disableSubscriptionAccessByPath": { + "description": "{\"markdownDescription\":\"Usually, a user's subscription may also be available via additional paths such as **/json**, **/stash**, or **/mihomo**. If this flag is set to **true**, access via these additional paths will be disabled.\"}", + "type": "boolean" + } + } + }, + "rules": { + "description": "{\"title\":\"Response Rules\",\"markdownDescription\":\"Array of **response rules**. Rules are evaluated in order and the first rule that matches is applied. If no rule matches, request will be blocked by default.\\n\\n**Example:**\\n```json\\n[\\n {\\n \\\"name\\\": \\\"Blank rule\\\",\\n \\\"description\\\": \\\"Blank rule\\\",\\n \\\"operator\\\": \\\"AND\\\",\\n \\\"enabled\\\": true,\\n \\\"conditions\\\": [],\\n \\\"responseType\\\": \\\"BLOCK\\\",\\n \\\"responseModifications\\\": {\\n \\\"headers\\\": []\\n }\\n }\\n]\\n```\",\"defaultSnippets\":[]}", + "type": "array", + "items": { + "description": "{\"defaultSnippets\":[{\"label\":\"Examples: Blank rule\",\"markdownDescription\":\"Simple blank rule with no conditions or modifications.\\n```json\\n{\\n \\\"name\\\": \\\"Blank rule\\\",\\n \\\"description\\\": \\\"Blank rule\\\",\\n \\\"operator\\\": \\\"AND\\\",\\n \\\"enabled\\\": true,\\n \\\"conditions\\\": [],\\n \\\"responseType\\\": \\\"BLOCK\\\",\\n \\\"responseModifications\\\": {\\n \\\"headers\\\": []\\n }\\n}\\n```\",\"body\":{\"name\":\"Blank rule\",\"description\":\"Blank rule\",\"operator\":\"AND\",\"enabled\":true,\"conditions\":[],\"responseType\":\"BLOCK\",\"responseModifications\":{\"headers\":[]}}},{\"label\":\"Examples: Block Legacy Clients\",\"markdownDescription\":\"Block requests from legacy clients\\n```json\\n{\\n \\\"name\\\": \\\"Block Legacy Clients\\\",\\n \\\"description\\\": \\\"Block requests from legacy clients\\\",\\n \\\"enabled\\\": true,\\n \\\"operator\\\": \\\"OR\\\",\\n \\\"conditions\\\": [\\n {\\n \\\"headerName\\\": \\\"user-agent\\\",\\n \\\"operator\\\": \\\"CONTAINS\\\",\\n \\\"value\\\": \\\"Hiddify\\\",\\n \\\"caseSensitive\\\": true\\n },\\n {\\n \\\"headerName\\\": \\\"user-agent\\\",\\n \\\"operator\\\": \\\"CONTAINS\\\",\\n \\\"value\\\": \\\"FoxRay\\\",\\n \\\"caseSensitive\\\": true\\n }\\n ],\\n \\\"responseType\\\": \\\"BLOCK\\\"\\n}\\n```\",\"body\":{\"name\":\"Block Legacy Clients\",\"description\":\"Block requests from legacy clients\",\"enabled\":true,\"operator\":\"OR\",\"conditions\":[{\"headerName\":\"user-agent\",\"operator\":\"CONTAINS\",\"value\":\"Hiddify\",\"caseSensitive\":true},{\"headerName\":\"user-agent\",\"operator\":\"CONTAINS\",\"value\":\"FoxRay\",\"caseSensitive\":true}],\"responseType\":\"BLOCK\"}}],\"title\":\"Response Rule\",\"markdownDescription\":\"Response rule configuration.\\n\\n**Fields:**\\n- **name**: Name of the response rule.\\n- **description**: Description of the response rule. Optional.\\n- **enabled**: Control whether the response rule is enabled or disabled. \\n\\n - `true` the rule will be applied. \\n\\n - `false` the rule will be always ignored.\\n- **operator**: Operator to use for combining conditions in the rule.\\n- **conditions**: Array of conditions to check against the request headers. Conditions are applied with **operator**. If conditions are empty, the rule will be matched.\\n- **responseType**: Type of the response. Determines the type of **response** to be returned when the rule is matched.\\n- **responseModifications**: Response modifications to be applied when the rule is matched. Optional.\\n\\n**Example:**\\n```json\\n{\\n \\\"name\\\": \\\"Block Legacy Clients\\\",\\n \\\"description\\\": \\\"Block requests from legacy clients\\\",\\n \\\"enabled\\\": true,\\n \\\"operator\\\": \\\"OR\\\",\\n \\\"conditions\\\": [\\n {\\n \\\"headerName\\\": \\\"user-agent\\\",\\n \\\"operator\\\": \\\"CONTAINS\\\",\\n \\\"value\\\": \\\"Hiddify\\\",\\n \\\"caseSensitive\\\": true\\n },\\n {\\n \\\"headerName\\\": \\\"user-agent\\\",\\n \\\"operator\\\": \\\"CONTAINS\\\",\\n \\\"value\\\": \\\"FoxRay\\\",\\n \\\"caseSensitive\\\": true\\n }\\n ],\\n \\\"responseType\\\": \\\"BLOCK\\\"\\n}\\n```\"}", + "type": "object", + "properties": { + "name": { + "description": "{\"markdownDescription\":\"Name of the response rule.\"}", + "type": "string", + "minLength": 1, + "maxLength": 50 + }, + "description": { + "description": "{\"markdownDescription\":\"Description of the response rule. Optional.\"}", + "type": "string", + "minLength": 1, + "maxLength": 250 + }, + "enabled": { + "description": "{\"markdownDescription\":\"Control whether the response rule is enabled or disabled. \\n\\n - `true` the rule will be applied. \\n\\n - `false` the rule will be always ignored.\"}", + "type": "boolean" + }, + "operator": { + "description": "{\"markdownDescription\":\"Operator to use for combining conditions in the rule.\"}", + "type": "string", + "enum": [ + "AND", + "OR" + ], + "x-enumNames": [ + "AND", + "OR" + ] + }, + "conditions": { + "description": "{\"markdownDescription\":\"Array of conditions to check against the request headers. Conditions are applied with **operator**. If conditions are empty, the rule will be matched.\"}", + "type": "array", + "items": { + "description": "{\"markdownDescription\":\"Condition to check against the **headerName**.\",\"defaultSnippets\":[{\"label\":\"Examples: Check if header contains \\\"text/html\\\"\",\"markdownDescription\":\"Condition to check if **headerName** contains \\\"text/html\\\"\",\"body\":{\"headerName\":\"accept\",\"operator\":\"CONTAINS\",\"value\":\"text/html\",\"caseSensitive\":true}}]}", + "type": "object", + "properties": { + "headerName": { + "description": "{\"markdownDescription\":\"**Name** of the HTTP header to check. Must comply with RFC 7230.\"}", + "type": "string", + "pattern": "^[!#$%&'*+\\-.0-9A-Z^_`a-z|~]+$" + }, + "operator": { + "description": "{\"errorMessage\":\"Invalid operator. Please select a valid operator.\",\"markdownDescription\":\"Operator to use for comparing the `headerName` with `value`.\",\"markdownEnumDescriptions\":[\"Performs an exact, comparison between the header value and specified string. `string === value`\",\"Ensures the header value does not exactly match the specified string. `string !== value`\",\"Checks if the header value contains the specified string as a substring. `string.includes()`\",\"Verifies the header value does not contain the specified string as a substring. `!string.includes()`\",\"Validates that the header value begins with the specified string. `string.startsWith()`\",\"Validates that the header value does not begin with the specified string. `!string.startsWith()`\",\"Confirms the header value ends with the specified string. `string.endsWith()`\",\"Confirms the header value does not end with the specified string. `!string.endsWith()`\",\"Evaluates if the header value matches the specified regular expression pattern. `regex.test()`\",\"Evaluates if the header value does not match the specified regular expression pattern. `!regex.test()`\"]}", + "type": "string", + "enum": [ + "EQUALS", + "NOT_EQUALS", + "CONTAINS", + "NOT_CONTAINS", + "STARTS_WITH", + "NOT_STARTS_WITH", + "ENDS_WITH", + "NOT_ENDS_WITH", + "REGEX", + "NOT_REGEX" + ], + "x-enumNames": [ + "EQUALS", + "NOT_EQUALS", + "CONTAINS", + "NOT_CONTAINS", + "STARTS_WITH", + "NOT_STARTS_WITH", + "ENDS_WITH", + "NOT_ENDS_WITH", + "REGEX", + "NOT_REGEX" + ] + }, + "value": { + "description": "{\"markdownDescription\":\"**Value** to check against the **headerName**.\"}", + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "caseSensitive": { + "description": "{\"markdownDescription\":\"Whether the value is **case sensitive**. \\n\\n - `true`: the value will be compared as is. \\n\\n - `false`: the value will be lowercased **before** comparison.\"}", + "type": "boolean" + } + }, + "required": [ + "headerName", + "operator", + "value", + "caseSensitive" + ] + } + }, + "responseType": { + "description": "{\"errorMessage\":\"Invalid response type. Please select a valid response type.\",\"markdownDescription\":\"Type of the response. Determines the type of **response** to be returned when the rule is matched.\",\"markdownEnumDescriptions\":[\"Return **subscription** in XRAY-JSON format. (Using `Xray Json` template)\",\"Return **subscription** in BASE64 encoded string. Compatible with most client application with Xray core.\",\"Return **subscription** in Mihomo format. (Using `Mihomo` template)\",\"Return **subscription** in Stash format. (Using `Stash` template)\",\"Return **subscription** in Clash format. (Using `Clash` template) Useful for client application that use Legacy Clash core.\",\"Return **subscription** in Singbox format. (Using `Singbox` template) Format which is used by Singbox client application.\",\"Return **subscription** as browser format. The same as on `/info` route.\",\"**Drop** request and return `403` status code.\",\"**Drop** request and return `404` status code.\",\"**Drop** request and return `451` status code.\",\"**Drop** the socket connection.\"]}", + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX", + "BROWSER", + "BLOCK", + "STATUS_CODE_404", + "STATUS_CODE_451", + "SOCKET_DROP" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX", + "BROWSER", + "BLOCK", + "STATUS_CODE_404", + "STATUS_CODE_451", + "SOCKET_DROP" + ] + }, + "responseModifications": { + "description": "{\"examples\":[{\"headers\":[{\"key\":\"X-Custom-Header\",\"value\":\"CustomValue\"}]}],\"markdownDescription\":\"Response modifications to be applied when the rule is matched. Optional.\"}", + "type": "object", + "properties": { + "headers": { + "description": "{\"defaultSnippets\":[{\"label\":\"Examples: Add custom header\",\"markdownDescription\":\"Add a custom header to the response\",\"body\":[{\"key\":\"X-Custom-Header\",\"value\":\"CustomValue\"}]}],\"markdownDescription\":\"Array of headers to be added when the rule is matched.\"}", + "type": "array", + "items": { + "description": "{\"markdownDescription\":\"**Key** and **value** of the response header will be added to the response.\"}", + "type": "object", + "properties": { + "key": { + "description": "{\"markdownDescription\":\"Key of the response header. Must comply with RFC 7230.\"}", + "type": "string", + "pattern": "^[!#$%&'*+\\-.0-9A-Z^_`a-z|~]+$" + }, + "value": { + "description": "{\"markdownDescription\":\"Value of the response header. \"}", + "type": "string", + "minLength": 1 + } + }, + "required": [ + "key", + "value" + ] + } + }, + "applyHeadersToEnd": { + "description": "{\"markdownDescription\":\"By default, headers are added when forming the response. In some cases, headers set in SRR may be overridden by headers from other parts of the system. If you set this flag to **true**, headers from SRR will be added at the very end, just before the response is sent. In this case, SRR headers may override headers from other sections.\"}", + "type": "boolean" + }, + "subscriptionTemplate": { + "description": "{\"markdownDescription\":\"Override the subscription template with the given name. If not provided, the default subscription template will be used. If the template name is not found, the default subscription template for this type will be used. **This modification have higher priority than settings from External Squads.**\"}", + "type": "string", + "minLength": 1 + }, + "ignoreHostXrayJsonTemplate": { + "description": "{\"markdownDescription\":\"Each Host may have its own Xray Json Template. If you set this flag to **true**, the Xray Json Template defined by the SRR will be used. **The Host's Xray Json Template will be ignored.**\"}", + "type": "boolean" + }, + "ignoreServeJsonAtBaseSubscription": { + "description": "{\"markdownDescription\":\"If you set this flag to **true**, the **Serve JSON at Base Subscription** setting will be ignored (set to **false**).\"}", + "type": "boolean" + }, + "additionalExtendedClientsRegex": { + "description": "{\"markdownDescription\":\"Additional regex patterns to match extended clients. Matched clients will receive `serverDescription` in the subscription response.\\n\\n**Default Mihomo extended clients:**\\n- `^FlClash ?X/`\\n- `^Flowvy/`\\n- `^prizrak-box/`\\n- `^koala-clash/`\\n\\n**Default Xray extended clients:**\\n- `^Happ/`\\n- `^INCY/`\\n\\n**Example:** `[\\\"^MyClient/\\\", \\\"^CustomApp\\\\\\\\/v2\\\"]`\"}", + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "disableHwidCheck": { + "description": "{\"markdownDescription\":\"If you set this flag to **true**, the HWID check will be disabled. **This modification have higher priority than settings from Subscription Settings.**\"}", + "type": "boolean" + }, + "encryption": { + "description": "{\"markdownDescription\":\"Encrypt response body with given parameters. Generate keypairs with Rescue CLI: `docker exec -it remnawave cli`, select \\\"Generate keypairs\\\".\"}", + "type": "object", + "properties": { + "method": { + "type": "string", + "enum": [ + "age1", + "age1pq1" + ] + }, + "key": { + "type": "string" + } + }, + "required": [ + "method", + "key" + ] + }, + "excludeHostsByTags": { + "description": "{\"markdownDescription\":\"Excludes hosts from the subscription output if at least one tag in the host matches the given tags.\"}", + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "pattern": "^[A-Z0-9_:]+$", + "maxLength": 36 + } + } + } + } + }, + "required": [ + "name", + "enabled", + "operator", + "conditions", + "responseType" + ] + } + } + }, + "required": [ + "version", + "rules" + ], + "nullable": true + }, + "hwidSettings": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "fallbackDeviceLimit": { + "type": "number" + }, + "maxDevicesAnnounce": { + "type": "string", + "maxLength": 200, + "nullable": true + } + }, + "required": [ + "enabled", + "fallbackDeviceLimit", + "maxDevicesAnnounce" + ], + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "profileTitle", + "supportLink", + "profileUpdateInterval", + "isProfileWebpageUrlEnabled", + "serveJsonAtBaseSubscription", + "isShowCustomRemarks", + "customRemarks", + "happAnnounce", + "happRouting", + "customResponseHeaders", + "randomizeHosts", + "responseRules", + "hwidSettings", + "createdAt", + "updatedAt" + ] + } + }, + "required": [ + "response" + ] + }, + "UpdateSubscriptionSettingsRequestDto": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "profileTitle": { + "type": "string" + }, + "supportLink": { + "type": "string" + }, + "profileUpdateInterval": { + "type": "integer" + }, + "isProfileWebpageUrlEnabled": { + "type": "boolean" + }, + "serveJsonAtBaseSubscription": { + "type": "boolean" + }, + "happAnnounce": { + "type": "string", + "maxLength": 200, + "nullable": true + }, + "happRouting": { + "type": "string", + "nullable": true + }, + "isShowCustomRemarks": { + "type": "boolean" + }, + "customRemarks": { + "type": "object", + "properties": { + "expiredUsers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "limitedUsers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "disabledUsers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "emptyHosts": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "HWIDMaxDevicesExceeded": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "HWIDNotSupported": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + }, + "required": [ + "expiredUsers", + "limitedUsers", + "disabledUsers", + "emptyHosts", + "HWIDMaxDevicesExceeded", + "HWIDNotSupported" + ] + }, + "customResponseHeaders": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "randomizeHosts": { + "type": "boolean" + }, + "responseRules": { + "type": "object", + "properties": { + "version": { + "description": "{\"title\":\"Response Rules Config Version\",\"markdownDescription\":\"Version of the **response rules** config. Currently supported version is **1**.\"}", + "type": "string", + "enum": [ + "1" + ], + "x-enumNames": [ + "1" + ] + }, + "settings": { + "description": "{\"markdownDescription\":\"Settings for the **response rules** config. Optional.\"}", + "type": "object", + "properties": { + "disableSubscriptionAccessByPath": { + "description": "{\"markdownDescription\":\"Usually, a user's subscription may also be available via additional paths such as **/json**, **/stash**, or **/mihomo**. If this flag is set to **true**, access via these additional paths will be disabled.\"}", + "type": "boolean" + } + } + }, + "rules": { + "description": "{\"title\":\"Response Rules\",\"markdownDescription\":\"Array of **response rules**. Rules are evaluated in order and the first rule that matches is applied. If no rule matches, request will be blocked by default.\\n\\n**Example:**\\n```json\\n[\\n {\\n \\\"name\\\": \\\"Blank rule\\\",\\n \\\"description\\\": \\\"Blank rule\\\",\\n \\\"operator\\\": \\\"AND\\\",\\n \\\"enabled\\\": true,\\n \\\"conditions\\\": [],\\n \\\"responseType\\\": \\\"BLOCK\\\",\\n \\\"responseModifications\\\": {\\n \\\"headers\\\": []\\n }\\n }\\n]\\n```\",\"defaultSnippets\":[]}", + "type": "array", + "items": { + "description": "{\"defaultSnippets\":[{\"label\":\"Examples: Blank rule\",\"markdownDescription\":\"Simple blank rule with no conditions or modifications.\\n```json\\n{\\n \\\"name\\\": \\\"Blank rule\\\",\\n \\\"description\\\": \\\"Blank rule\\\",\\n \\\"operator\\\": \\\"AND\\\",\\n \\\"enabled\\\": true,\\n \\\"conditions\\\": [],\\n \\\"responseType\\\": \\\"BLOCK\\\",\\n \\\"responseModifications\\\": {\\n \\\"headers\\\": []\\n }\\n}\\n```\",\"body\":{\"name\":\"Blank rule\",\"description\":\"Blank rule\",\"operator\":\"AND\",\"enabled\":true,\"conditions\":[],\"responseType\":\"BLOCK\",\"responseModifications\":{\"headers\":[]}}},{\"label\":\"Examples: Block Legacy Clients\",\"markdownDescription\":\"Block requests from legacy clients\\n```json\\n{\\n \\\"name\\\": \\\"Block Legacy Clients\\\",\\n \\\"description\\\": \\\"Block requests from legacy clients\\\",\\n \\\"enabled\\\": true,\\n \\\"operator\\\": \\\"OR\\\",\\n \\\"conditions\\\": [\\n {\\n \\\"headerName\\\": \\\"user-agent\\\",\\n \\\"operator\\\": \\\"CONTAINS\\\",\\n \\\"value\\\": \\\"Hiddify\\\",\\n \\\"caseSensitive\\\": true\\n },\\n {\\n \\\"headerName\\\": \\\"user-agent\\\",\\n \\\"operator\\\": \\\"CONTAINS\\\",\\n \\\"value\\\": \\\"FoxRay\\\",\\n \\\"caseSensitive\\\": true\\n }\\n ],\\n \\\"responseType\\\": \\\"BLOCK\\\"\\n}\\n```\",\"body\":{\"name\":\"Block Legacy Clients\",\"description\":\"Block requests from legacy clients\",\"enabled\":true,\"operator\":\"OR\",\"conditions\":[{\"headerName\":\"user-agent\",\"operator\":\"CONTAINS\",\"value\":\"Hiddify\",\"caseSensitive\":true},{\"headerName\":\"user-agent\",\"operator\":\"CONTAINS\",\"value\":\"FoxRay\",\"caseSensitive\":true}],\"responseType\":\"BLOCK\"}}],\"title\":\"Response Rule\",\"markdownDescription\":\"Response rule configuration.\\n\\n**Fields:**\\n- **name**: Name of the response rule.\\n- **description**: Description of the response rule. Optional.\\n- **enabled**: Control whether the response rule is enabled or disabled. \\n\\n - `true` the rule will be applied. \\n\\n - `false` the rule will be always ignored.\\n- **operator**: Operator to use for combining conditions in the rule.\\n- **conditions**: Array of conditions to check against the request headers. Conditions are applied with **operator**. If conditions are empty, the rule will be matched.\\n- **responseType**: Type of the response. Determines the type of **response** to be returned when the rule is matched.\\n- **responseModifications**: Response modifications to be applied when the rule is matched. Optional.\\n\\n**Example:**\\n```json\\n{\\n \\\"name\\\": \\\"Block Legacy Clients\\\",\\n \\\"description\\\": \\\"Block requests from legacy clients\\\",\\n \\\"enabled\\\": true,\\n \\\"operator\\\": \\\"OR\\\",\\n \\\"conditions\\\": [\\n {\\n \\\"headerName\\\": \\\"user-agent\\\",\\n \\\"operator\\\": \\\"CONTAINS\\\",\\n \\\"value\\\": \\\"Hiddify\\\",\\n \\\"caseSensitive\\\": true\\n },\\n {\\n \\\"headerName\\\": \\\"user-agent\\\",\\n \\\"operator\\\": \\\"CONTAINS\\\",\\n \\\"value\\\": \\\"FoxRay\\\",\\n \\\"caseSensitive\\\": true\\n }\\n ],\\n \\\"responseType\\\": \\\"BLOCK\\\"\\n}\\n```\"}", + "type": "object", + "properties": { + "name": { + "description": "{\"markdownDescription\":\"Name of the response rule.\"}", + "type": "string", + "minLength": 1, + "maxLength": 50 + }, + "description": { + "description": "{\"markdownDescription\":\"Description of the response rule. Optional.\"}", + "type": "string", + "minLength": 1, + "maxLength": 250 + }, + "enabled": { + "description": "{\"markdownDescription\":\"Control whether the response rule is enabled or disabled. \\n\\n - `true` the rule will be applied. \\n\\n - `false` the rule will be always ignored.\"}", + "type": "boolean" + }, + "operator": { + "description": "{\"markdownDescription\":\"Operator to use for combining conditions in the rule.\"}", + "type": "string", + "enum": [ + "AND", + "OR" + ], + "x-enumNames": [ + "AND", + "OR" + ] + }, + "conditions": { + "description": "{\"markdownDescription\":\"Array of conditions to check against the request headers. Conditions are applied with **operator**. If conditions are empty, the rule will be matched.\"}", + "type": "array", + "items": { + "description": "{\"markdownDescription\":\"Condition to check against the **headerName**.\",\"defaultSnippets\":[{\"label\":\"Examples: Check if header contains \\\"text/html\\\"\",\"markdownDescription\":\"Condition to check if **headerName** contains \\\"text/html\\\"\",\"body\":{\"headerName\":\"accept\",\"operator\":\"CONTAINS\",\"value\":\"text/html\",\"caseSensitive\":true}}]}", + "type": "object", + "properties": { + "headerName": { + "description": "{\"markdownDescription\":\"**Name** of the HTTP header to check. Must comply with RFC 7230.\"}", + "type": "string", + "pattern": "^[!#$%&'*+\\-.0-9A-Z^_`a-z|~]+$" + }, + "operator": { + "description": "{\"errorMessage\":\"Invalid operator. Please select a valid operator.\",\"markdownDescription\":\"Operator to use for comparing the `headerName` with `value`.\",\"markdownEnumDescriptions\":[\"Performs an exact, comparison between the header value and specified string. `string === value`\",\"Ensures the header value does not exactly match the specified string. `string !== value`\",\"Checks if the header value contains the specified string as a substring. `string.includes()`\",\"Verifies the header value does not contain the specified string as a substring. `!string.includes()`\",\"Validates that the header value begins with the specified string. `string.startsWith()`\",\"Validates that the header value does not begin with the specified string. `!string.startsWith()`\",\"Confirms the header value ends with the specified string. `string.endsWith()`\",\"Confirms the header value does not end with the specified string. `!string.endsWith()`\",\"Evaluates if the header value matches the specified regular expression pattern. `regex.test()`\",\"Evaluates if the header value does not match the specified regular expression pattern. `!regex.test()`\"]}", + "type": "string", + "enum": [ + "EQUALS", + "NOT_EQUALS", + "CONTAINS", + "NOT_CONTAINS", + "STARTS_WITH", + "NOT_STARTS_WITH", + "ENDS_WITH", + "NOT_ENDS_WITH", + "REGEX", + "NOT_REGEX" + ], + "x-enumNames": [ + "EQUALS", + "NOT_EQUALS", + "CONTAINS", + "NOT_CONTAINS", + "STARTS_WITH", + "NOT_STARTS_WITH", + "ENDS_WITH", + "NOT_ENDS_WITH", + "REGEX", + "NOT_REGEX" + ] + }, + "value": { + "description": "{\"markdownDescription\":\"**Value** to check against the **headerName**.\"}", + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "caseSensitive": { + "description": "{\"markdownDescription\":\"Whether the value is **case sensitive**. \\n\\n - `true`: the value will be compared as is. \\n\\n - `false`: the value will be lowercased **before** comparison.\"}", + "type": "boolean" + } + }, + "required": [ + "headerName", + "operator", + "value", + "caseSensitive" + ] + } + }, + "responseType": { + "description": "{\"errorMessage\":\"Invalid response type. Please select a valid response type.\",\"markdownDescription\":\"Type of the response. Determines the type of **response** to be returned when the rule is matched.\",\"markdownEnumDescriptions\":[\"Return **subscription** in XRAY-JSON format. (Using `Xray Json` template)\",\"Return **subscription** in BASE64 encoded string. Compatible with most client application with Xray core.\",\"Return **subscription** in Mihomo format. (Using `Mihomo` template)\",\"Return **subscription** in Stash format. (Using `Stash` template)\",\"Return **subscription** in Clash format. (Using `Clash` template) Useful for client application that use Legacy Clash core.\",\"Return **subscription** in Singbox format. (Using `Singbox` template) Format which is used by Singbox client application.\",\"Return **subscription** as browser format. The same as on `/info` route.\",\"**Drop** request and return `403` status code.\",\"**Drop** request and return `404` status code.\",\"**Drop** request and return `451` status code.\",\"**Drop** the socket connection.\"]}", + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX", + "BROWSER", + "BLOCK", + "STATUS_CODE_404", + "STATUS_CODE_451", + "SOCKET_DROP" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX", + "BROWSER", + "BLOCK", + "STATUS_CODE_404", + "STATUS_CODE_451", + "SOCKET_DROP" + ] + }, + "responseModifications": { + "description": "{\"examples\":[{\"headers\":[{\"key\":\"X-Custom-Header\",\"value\":\"CustomValue\"}]}],\"markdownDescription\":\"Response modifications to be applied when the rule is matched. Optional.\"}", + "type": "object", + "properties": { + "headers": { + "description": "{\"defaultSnippets\":[{\"label\":\"Examples: Add custom header\",\"markdownDescription\":\"Add a custom header to the response\",\"body\":[{\"key\":\"X-Custom-Header\",\"value\":\"CustomValue\"}]}],\"markdownDescription\":\"Array of headers to be added when the rule is matched.\"}", + "type": "array", + "items": { + "description": "{\"markdownDescription\":\"**Key** and **value** of the response header will be added to the response.\"}", + "type": "object", + "properties": { + "key": { + "description": "{\"markdownDescription\":\"Key of the response header. Must comply with RFC 7230.\"}", + "type": "string", + "pattern": "^[!#$%&'*+\\-.0-9A-Z^_`a-z|~]+$" + }, + "value": { + "description": "{\"markdownDescription\":\"Value of the response header. \"}", + "type": "string", + "minLength": 1 + } + }, + "required": [ + "key", + "value" + ] + } + }, + "applyHeadersToEnd": { + "description": "{\"markdownDescription\":\"By default, headers are added when forming the response. In some cases, headers set in SRR may be overridden by headers from other parts of the system. If you set this flag to **true**, headers from SRR will be added at the very end, just before the response is sent. In this case, SRR headers may override headers from other sections.\"}", + "type": "boolean" + }, + "subscriptionTemplate": { + "description": "{\"markdownDescription\":\"Override the subscription template with the given name. If not provided, the default subscription template will be used. If the template name is not found, the default subscription template for this type will be used. **This modification have higher priority than settings from External Squads.**\"}", + "type": "string", + "minLength": 1 + }, + "ignoreHostXrayJsonTemplate": { + "description": "{\"markdownDescription\":\"Each Host may have its own Xray Json Template. If you set this flag to **true**, the Xray Json Template defined by the SRR will be used. **The Host's Xray Json Template will be ignored.**\"}", + "type": "boolean" + }, + "ignoreServeJsonAtBaseSubscription": { + "description": "{\"markdownDescription\":\"If you set this flag to **true**, the **Serve JSON at Base Subscription** setting will be ignored (set to **false**).\"}", + "type": "boolean" + }, + "additionalExtendedClientsRegex": { + "description": "{\"markdownDescription\":\"Additional regex patterns to match extended clients. Matched clients will receive `serverDescription` in the subscription response.\\n\\n**Default Mihomo extended clients:**\\n- `^FlClash ?X/`\\n- `^Flowvy/`\\n- `^prizrak-box/`\\n- `^koala-clash/`\\n\\n**Default Xray extended clients:**\\n- `^Happ/`\\n- `^INCY/`\\n\\n**Example:** `[\\\"^MyClient/\\\", \\\"^CustomApp\\\\\\\\/v2\\\"]`\"}", + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "disableHwidCheck": { + "description": "{\"markdownDescription\":\"If you set this flag to **true**, the HWID check will be disabled. **This modification have higher priority than settings from Subscription Settings.**\"}", + "type": "boolean" + }, + "encryption": { + "description": "{\"markdownDescription\":\"Encrypt response body with given parameters. Generate keypairs with Rescue CLI: `docker exec -it remnawave cli`, select \\\"Generate keypairs\\\".\"}", + "type": "object", + "properties": { + "method": { + "type": "string", + "enum": [ + "age1", + "age1pq1" + ] + }, + "key": { + "type": "string" + } + }, + "required": [ + "method", + "key" + ] + }, + "excludeHostsByTags": { + "description": "{\"markdownDescription\":\"Excludes hosts from the subscription output if at least one tag in the host matches the given tags.\"}", + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "pattern": "^[A-Z0-9_:]+$", + "maxLength": 36 + } + } + } + } + }, + "required": [ + "name", + "enabled", + "operator", + "conditions", + "responseType" + ] + } + } + }, + "required": [ + "version", + "rules" + ] + }, + "hwidSettings": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "fallbackDeviceLimit": { + "type": "number" + }, + "maxDevicesAnnounce": { + "type": "string", + "maxLength": 200, + "nullable": true + } + }, + "required": [ + "enabled", + "fallbackDeviceLimit", + "maxDevicesAnnounce" + ] + } + }, + "required": [ + "uuid" + ] + }, + "UpdateSubscriptionSettingsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "profileTitle": { + "type": "string" + }, + "supportLink": { + "type": "string" + }, + "profileUpdateInterval": { + "type": "integer", + "minimum": 1, + "exclusiveMinimum": false + }, + "isProfileWebpageUrlEnabled": { + "type": "boolean" + }, + "serveJsonAtBaseSubscription": { + "type": "boolean" + }, + "isShowCustomRemarks": { + "type": "boolean" + }, + "customRemarks": { + "type": "object", + "properties": { + "expiredUsers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "limitedUsers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "disabledUsers": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "emptyHosts": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "HWIDMaxDevicesExceeded": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + }, + "HWIDNotSupported": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + }, + "required": [ + "expiredUsers", + "limitedUsers", + "disabledUsers", + "emptyHosts", + "HWIDMaxDevicesExceeded", + "HWIDNotSupported" + ] + }, + "happAnnounce": { + "type": "string", + "nullable": true + }, + "happRouting": { + "type": "string", + "nullable": true + }, + "customResponseHeaders": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true + }, + "randomizeHosts": { + "type": "boolean" + }, + "responseRules": { + "type": "object", + "properties": { + "version": { + "description": "{\"title\":\"Response Rules Config Version\",\"markdownDescription\":\"Version of the **response rules** config. Currently supported version is **1**.\"}", + "type": "string", + "enum": [ + "1" + ], + "x-enumNames": [ + "1" + ] + }, + "settings": { + "description": "{\"markdownDescription\":\"Settings for the **response rules** config. Optional.\"}", + "type": "object", + "properties": { + "disableSubscriptionAccessByPath": { + "description": "{\"markdownDescription\":\"Usually, a user's subscription may also be available via additional paths such as **/json**, **/stash**, or **/mihomo**. If this flag is set to **true**, access via these additional paths will be disabled.\"}", + "type": "boolean" + } + } + }, + "rules": { + "description": "{\"title\":\"Response Rules\",\"markdownDescription\":\"Array of **response rules**. Rules are evaluated in order and the first rule that matches is applied. If no rule matches, request will be blocked by default.\\n\\n**Example:**\\n```json\\n[\\n {\\n \\\"name\\\": \\\"Blank rule\\\",\\n \\\"description\\\": \\\"Blank rule\\\",\\n \\\"operator\\\": \\\"AND\\\",\\n \\\"enabled\\\": true,\\n \\\"conditions\\\": [],\\n \\\"responseType\\\": \\\"BLOCK\\\",\\n \\\"responseModifications\\\": {\\n \\\"headers\\\": []\\n }\\n }\\n]\\n```\",\"defaultSnippets\":[]}", + "type": "array", + "items": { + "description": "{\"defaultSnippets\":[{\"label\":\"Examples: Blank rule\",\"markdownDescription\":\"Simple blank rule with no conditions or modifications.\\n```json\\n{\\n \\\"name\\\": \\\"Blank rule\\\",\\n \\\"description\\\": \\\"Blank rule\\\",\\n \\\"operator\\\": \\\"AND\\\",\\n \\\"enabled\\\": true,\\n \\\"conditions\\\": [],\\n \\\"responseType\\\": \\\"BLOCK\\\",\\n \\\"responseModifications\\\": {\\n \\\"headers\\\": []\\n }\\n}\\n```\",\"body\":{\"name\":\"Blank rule\",\"description\":\"Blank rule\",\"operator\":\"AND\",\"enabled\":true,\"conditions\":[],\"responseType\":\"BLOCK\",\"responseModifications\":{\"headers\":[]}}},{\"label\":\"Examples: Block Legacy Clients\",\"markdownDescription\":\"Block requests from legacy clients\\n```json\\n{\\n \\\"name\\\": \\\"Block Legacy Clients\\\",\\n \\\"description\\\": \\\"Block requests from legacy clients\\\",\\n \\\"enabled\\\": true,\\n \\\"operator\\\": \\\"OR\\\",\\n \\\"conditions\\\": [\\n {\\n \\\"headerName\\\": \\\"user-agent\\\",\\n \\\"operator\\\": \\\"CONTAINS\\\",\\n \\\"value\\\": \\\"Hiddify\\\",\\n \\\"caseSensitive\\\": true\\n },\\n {\\n \\\"headerName\\\": \\\"user-agent\\\",\\n \\\"operator\\\": \\\"CONTAINS\\\",\\n \\\"value\\\": \\\"FoxRay\\\",\\n \\\"caseSensitive\\\": true\\n }\\n ],\\n \\\"responseType\\\": \\\"BLOCK\\\"\\n}\\n```\",\"body\":{\"name\":\"Block Legacy Clients\",\"description\":\"Block requests from legacy clients\",\"enabled\":true,\"operator\":\"OR\",\"conditions\":[{\"headerName\":\"user-agent\",\"operator\":\"CONTAINS\",\"value\":\"Hiddify\",\"caseSensitive\":true},{\"headerName\":\"user-agent\",\"operator\":\"CONTAINS\",\"value\":\"FoxRay\",\"caseSensitive\":true}],\"responseType\":\"BLOCK\"}}],\"title\":\"Response Rule\",\"markdownDescription\":\"Response rule configuration.\\n\\n**Fields:**\\n- **name**: Name of the response rule.\\n- **description**: Description of the response rule. Optional.\\n- **enabled**: Control whether the response rule is enabled or disabled. \\n\\n - `true` the rule will be applied. \\n\\n - `false` the rule will be always ignored.\\n- **operator**: Operator to use for combining conditions in the rule.\\n- **conditions**: Array of conditions to check against the request headers. Conditions are applied with **operator**. If conditions are empty, the rule will be matched.\\n- **responseType**: Type of the response. Determines the type of **response** to be returned when the rule is matched.\\n- **responseModifications**: Response modifications to be applied when the rule is matched. Optional.\\n\\n**Example:**\\n```json\\n{\\n \\\"name\\\": \\\"Block Legacy Clients\\\",\\n \\\"description\\\": \\\"Block requests from legacy clients\\\",\\n \\\"enabled\\\": true,\\n \\\"operator\\\": \\\"OR\\\",\\n \\\"conditions\\\": [\\n {\\n \\\"headerName\\\": \\\"user-agent\\\",\\n \\\"operator\\\": \\\"CONTAINS\\\",\\n \\\"value\\\": \\\"Hiddify\\\",\\n \\\"caseSensitive\\\": true\\n },\\n {\\n \\\"headerName\\\": \\\"user-agent\\\",\\n \\\"operator\\\": \\\"CONTAINS\\\",\\n \\\"value\\\": \\\"FoxRay\\\",\\n \\\"caseSensitive\\\": true\\n }\\n ],\\n \\\"responseType\\\": \\\"BLOCK\\\"\\n}\\n```\"}", + "type": "object", + "properties": { + "name": { + "description": "{\"markdownDescription\":\"Name of the response rule.\"}", + "type": "string", + "minLength": 1, + "maxLength": 50 + }, + "description": { + "description": "{\"markdownDescription\":\"Description of the response rule. Optional.\"}", + "type": "string", + "minLength": 1, + "maxLength": 250 + }, + "enabled": { + "description": "{\"markdownDescription\":\"Control whether the response rule is enabled or disabled. \\n\\n - `true` the rule will be applied. \\n\\n - `false` the rule will be always ignored.\"}", + "type": "boolean" + }, + "operator": { + "description": "{\"markdownDescription\":\"Operator to use for combining conditions in the rule.\"}", + "type": "string", + "enum": [ + "AND", + "OR" + ], + "x-enumNames": [ + "AND", + "OR" + ] + }, + "conditions": { + "description": "{\"markdownDescription\":\"Array of conditions to check against the request headers. Conditions are applied with **operator**. If conditions are empty, the rule will be matched.\"}", + "type": "array", + "items": { + "description": "{\"markdownDescription\":\"Condition to check against the **headerName**.\",\"defaultSnippets\":[{\"label\":\"Examples: Check if header contains \\\"text/html\\\"\",\"markdownDescription\":\"Condition to check if **headerName** contains \\\"text/html\\\"\",\"body\":{\"headerName\":\"accept\",\"operator\":\"CONTAINS\",\"value\":\"text/html\",\"caseSensitive\":true}}]}", + "type": "object", + "properties": { + "headerName": { + "description": "{\"markdownDescription\":\"**Name** of the HTTP header to check. Must comply with RFC 7230.\"}", + "type": "string", + "pattern": "^[!#$%&'*+\\-.0-9A-Z^_`a-z|~]+$" + }, + "operator": { + "description": "{\"errorMessage\":\"Invalid operator. Please select a valid operator.\",\"markdownDescription\":\"Operator to use for comparing the `headerName` with `value`.\",\"markdownEnumDescriptions\":[\"Performs an exact, comparison between the header value and specified string. `string === value`\",\"Ensures the header value does not exactly match the specified string. `string !== value`\",\"Checks if the header value contains the specified string as a substring. `string.includes()`\",\"Verifies the header value does not contain the specified string as a substring. `!string.includes()`\",\"Validates that the header value begins with the specified string. `string.startsWith()`\",\"Validates that the header value does not begin with the specified string. `!string.startsWith()`\",\"Confirms the header value ends with the specified string. `string.endsWith()`\",\"Confirms the header value does not end with the specified string. `!string.endsWith()`\",\"Evaluates if the header value matches the specified regular expression pattern. `regex.test()`\",\"Evaluates if the header value does not match the specified regular expression pattern. `!regex.test()`\"]}", + "type": "string", + "enum": [ + "EQUALS", + "NOT_EQUALS", + "CONTAINS", + "NOT_CONTAINS", + "STARTS_WITH", + "NOT_STARTS_WITH", + "ENDS_WITH", + "NOT_ENDS_WITH", + "REGEX", + "NOT_REGEX" + ], + "x-enumNames": [ + "EQUALS", + "NOT_EQUALS", + "CONTAINS", + "NOT_CONTAINS", + "STARTS_WITH", + "NOT_STARTS_WITH", + "ENDS_WITH", + "NOT_ENDS_WITH", + "REGEX", + "NOT_REGEX" + ] + }, + "value": { + "description": "{\"markdownDescription\":\"**Value** to check against the **headerName**.\"}", + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "caseSensitive": { + "description": "{\"markdownDescription\":\"Whether the value is **case sensitive**. \\n\\n - `true`: the value will be compared as is. \\n\\n - `false`: the value will be lowercased **before** comparison.\"}", + "type": "boolean" + } + }, + "required": [ + "headerName", + "operator", + "value", + "caseSensitive" + ] + } + }, + "responseType": { + "description": "{\"errorMessage\":\"Invalid response type. Please select a valid response type.\",\"markdownDescription\":\"Type of the response. Determines the type of **response** to be returned when the rule is matched.\",\"markdownEnumDescriptions\":[\"Return **subscription** in XRAY-JSON format. (Using `Xray Json` template)\",\"Return **subscription** in BASE64 encoded string. Compatible with most client application with Xray core.\",\"Return **subscription** in Mihomo format. (Using `Mihomo` template)\",\"Return **subscription** in Stash format. (Using `Stash` template)\",\"Return **subscription** in Clash format. (Using `Clash` template) Useful for client application that use Legacy Clash core.\",\"Return **subscription** in Singbox format. (Using `Singbox` template) Format which is used by Singbox client application.\",\"Return **subscription** as browser format. The same as on `/info` route.\",\"**Drop** request and return `403` status code.\",\"**Drop** request and return `404` status code.\",\"**Drop** request and return `451` status code.\",\"**Drop** the socket connection.\"]}", + "type": "string", + "enum": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX", + "BROWSER", + "BLOCK", + "STATUS_CODE_404", + "STATUS_CODE_451", + "SOCKET_DROP" + ], + "x-enumNames": [ + "XRAY_JSON", + "XRAY_BASE64", + "MIHOMO", + "STASH", + "CLASH", + "SINGBOX", + "BROWSER", + "BLOCK", + "STATUS_CODE_404", + "STATUS_CODE_451", + "SOCKET_DROP" + ] + }, + "responseModifications": { + "description": "{\"examples\":[{\"headers\":[{\"key\":\"X-Custom-Header\",\"value\":\"CustomValue\"}]}],\"markdownDescription\":\"Response modifications to be applied when the rule is matched. Optional.\"}", + "type": "object", + "properties": { + "headers": { + "description": "{\"defaultSnippets\":[{\"label\":\"Examples: Add custom header\",\"markdownDescription\":\"Add a custom header to the response\",\"body\":[{\"key\":\"X-Custom-Header\",\"value\":\"CustomValue\"}]}],\"markdownDescription\":\"Array of headers to be added when the rule is matched.\"}", + "type": "array", + "items": { + "description": "{\"markdownDescription\":\"**Key** and **value** of the response header will be added to the response.\"}", + "type": "object", + "properties": { + "key": { + "description": "{\"markdownDescription\":\"Key of the response header. Must comply with RFC 7230.\"}", + "type": "string", + "pattern": "^[!#$%&'*+\\-.0-9A-Z^_`a-z|~]+$" + }, + "value": { + "description": "{\"markdownDescription\":\"Value of the response header. \"}", + "type": "string", + "minLength": 1 + } + }, + "required": [ + "key", + "value" + ] + } + }, + "applyHeadersToEnd": { + "description": "{\"markdownDescription\":\"By default, headers are added when forming the response. In some cases, headers set in SRR may be overridden by headers from other parts of the system. If you set this flag to **true**, headers from SRR will be added at the very end, just before the response is sent. In this case, SRR headers may override headers from other sections.\"}", + "type": "boolean" + }, + "subscriptionTemplate": { + "description": "{\"markdownDescription\":\"Override the subscription template with the given name. If not provided, the default subscription template will be used. If the template name is not found, the default subscription template for this type will be used. **This modification have higher priority than settings from External Squads.**\"}", + "type": "string", + "minLength": 1 + }, + "ignoreHostXrayJsonTemplate": { + "description": "{\"markdownDescription\":\"Each Host may have its own Xray Json Template. If you set this flag to **true**, the Xray Json Template defined by the SRR will be used. **The Host's Xray Json Template will be ignored.**\"}", + "type": "boolean" + }, + "ignoreServeJsonAtBaseSubscription": { + "description": "{\"markdownDescription\":\"If you set this flag to **true**, the **Serve JSON at Base Subscription** setting will be ignored (set to **false**).\"}", + "type": "boolean" + }, + "additionalExtendedClientsRegex": { + "description": "{\"markdownDescription\":\"Additional regex patterns to match extended clients. Matched clients will receive `serverDescription` in the subscription response.\\n\\n**Default Mihomo extended clients:**\\n- `^FlClash ?X/`\\n- `^Flowvy/`\\n- `^prizrak-box/`\\n- `^koala-clash/`\\n\\n**Default Xray extended clients:**\\n- `^Happ/`\\n- `^INCY/`\\n\\n**Example:** `[\\\"^MyClient/\\\", \\\"^CustomApp\\\\\\\\/v2\\\"]`\"}", + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "disableHwidCheck": { + "description": "{\"markdownDescription\":\"If you set this flag to **true**, the HWID check will be disabled. **This modification have higher priority than settings from Subscription Settings.**\"}", + "type": "boolean" + }, + "encryption": { + "description": "{\"markdownDescription\":\"Encrypt response body with given parameters. Generate keypairs with Rescue CLI: `docker exec -it remnawave cli`, select \\\"Generate keypairs\\\".\"}", + "type": "object", + "properties": { + "method": { + "type": "string", + "enum": [ + "age1", + "age1pq1" + ] + }, + "key": { + "type": "string" + } + }, + "required": [ + "method", + "key" + ] + }, + "excludeHostsByTags": { + "description": "{\"markdownDescription\":\"Excludes hosts from the subscription output if at least one tag in the host matches the given tags.\"}", + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "pattern": "^[A-Z0-9_:]+$", + "maxLength": 36 + } + } + } + } + }, + "required": [ + "name", + "enabled", + "operator", + "conditions", + "responseType" + ] + } + } + }, + "required": [ + "version", + "rules" + ], + "nullable": true + }, + "hwidSettings": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "fallbackDeviceLimit": { + "type": "number" + }, + "maxDevicesAnnounce": { + "type": "string", + "maxLength": 200, + "nullable": true + } + }, + "required": [ + "enabled", + "fallbackDeviceLimit", + "maxDevicesAnnounce" + ], + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "profileTitle", + "supportLink", + "profileUpdateInterval", + "isProfileWebpageUrlEnabled", + "serveJsonAtBaseSubscription", + "isShowCustomRemarks", + "customRemarks", + "happAnnounce", + "happRouting", + "customResponseHeaders", + "randomizeHosts", + "responseRules", + "hwidSettings", + "createdAt", + "updatedAt" + ] + } + }, + "required": [ + "response" + ] + }, + "FetchIpsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "jobId": { + "type": "string" + } + }, + "required": [ + "jobId" + ] + } + }, + "required": [ + "response" + ] + }, + "FetchIpsResultResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "isCompleted": { + "type": "boolean" + }, + "isFailed": { + "type": "boolean" + }, + "progress": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "completed": { + "type": "number" + }, + "percent": { + "type": "number" + } + }, + "required": [ + "total", + "completed", + "percent" + ] + }, + "result": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "userUuid": { + "type": "string", + "format": "uuid" + }, + "userId": { + "type": "string" + }, + "nodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "nodeUuid": { + "type": "string", + "format": "uuid" + }, + "nodeName": { + "type": "string" + }, + "countryCode": { + "type": "string" + }, + "ips": { + "type": "array", + "items": { + "type": "object", + "properties": { + "ip": { + "type": "string" + }, + "lastSeen": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "ip", + "lastSeen" + ] + } + } + }, + "required": [ + "nodeUuid", + "nodeName", + "countryCode", + "ips" + ] + } + } + }, + "required": [ + "success", + "userUuid", + "userId", + "nodes" + ], + "nullable": true + } + }, + "required": [ + "isCompleted", + "isFailed", + "progress", + "result" + ] + } + }, + "required": [ + "response" + ] + }, + "DropConnectionsRequestDto": { + "type": "object", + "properties": { + "dropBy": { + "oneOf": [ + { + "description": "Drop by user UUIDs", + "type": "object", + "properties": { + "by": { + "type": "string", + "enum": [ + "userUuids" + ] + }, + "userUuids": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "by", + "userUuids" + ] + }, + { + "description": "Drop by IP addresses", + "type": "object", + "properties": { + "by": { + "type": "string", + "enum": [ + "ipAddresses" + ] + }, + "ipAddresses": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + }, + "required": [ + "by", + "ipAddresses" + ] + } + ] + }, + "targetNodes": { + "oneOf": [ + { + "description": "Target all connected nodes", + "type": "object", + "properties": { + "target": { + "type": "string", + "enum": [ + "allNodes" + ] + } + }, + "required": [ + "target" + ] + }, + { + "description": "Target specific nodes", + "type": "object", + "properties": { + "target": { + "type": "string", + "enum": [ + "specificNodes" + ] + }, + "nodeUuids": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "target", + "nodeUuids" + ] + } + ] + } + }, + "required": [ + "dropBy", + "targetNodes" + ] + }, + "DropConnectionsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "eventSent": { + "type": "boolean" + } + }, + "required": [ + "eventSent" + ] + } + }, + "required": [ + "response" + ] + }, + "FetchUsersIpsResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "jobId": { + "type": "string" + } + }, + "required": [ + "jobId" + ] + } + }, + "required": [ + "response" + ] + }, + "FetchUsersIpsResultResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "isCompleted": { + "type": "boolean" + }, + "isFailed": { + "type": "boolean" + }, + "result": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "nodeUuid": { + "type": "string", + "format": "uuid" + }, + "users": { + "type": "array", + "items": { + "type": "object", + "properties": { + "userId": { + "type": "string" + }, + "ips": { + "type": "array", + "items": { + "type": "object", + "properties": { + "ip": { + "type": "string" + }, + "lastSeen": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "ip", + "lastSeen" + ] + } + } + }, + "required": [ + "userId", + "ips" + ] + } + } + }, + "required": [ + "success", + "nodeUuid", + "users" + ], + "nullable": true + } + }, + "required": [ + "isCompleted", + "isFailed", + "result" + ] + } + }, + "required": [ + "response" + ] + }, + "GetUserMetadataResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "metadata": { + "type": "object", + "properties": {} + } + }, + "required": [ + "metadata" + ] + } + }, + "required": [ + "response" + ] + }, + "UpsertUserMetadataRequestBodyDto": { + "type": "object", + "properties": { + "metadata": { + "type": "object", + "properties": {} + } + }, + "required": [ + "metadata" + ] + }, + "UpsertUserMetadataResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "metadata": { + "type": "object", + "properties": {} + } + }, + "required": [ + "metadata" + ] + } + }, + "required": [ + "response" + ] + }, + "GetNodeMetadataResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "metadata": { + "type": "object", + "properties": {} + } + }, + "required": [ + "metadata" + ] + } + }, + "required": [ + "response" + ] + }, + "UpsertNodeMetadataRequestBodyDto": { + "type": "object", + "properties": { + "metadata": { + "type": "object", + "properties": {} + } + }, + "required": [ + "metadata" + ] + }, + "UpsertNodeMetadataResponseDto": { + "type": "object", + "properties": { + "response": { + "type": "object", + "properties": { + "metadata": { + "type": "object", + "properties": {} + } + }, + "required": [ + "metadata" + ] + } + }, + "required": [ + "response" + ] + }, + "RemnawaveWebhookUserEventsDto": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "user" + ] + }, + "event": { + "type": "string", + "enum": [ + "user.created", + "user.modified", + "user.deleted", + "user.revoked", + "user.disabled", + "user.enabled", + "user.limited", + "user.expired", + "user.traffic_reset", + "user.first_connected", + "user.bandwidth_usage_threshold_reached", + "user.not_connected", + "user.expiration" + ] + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "data": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "id": { + "type": "number" + }, + "shortUuid": { + "type": "string" + }, + "username": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "default": "ACTIVE" + }, + "trafficLimitBytes": { + "type": "number", + "default": 0 + }, + "trafficLimitStrategy": { + "description": "Available reset periods", + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "default": "NO_RESET" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "telegramId": { + "type": "integer", + "nullable": true + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tag": { + "type": "string", + "nullable": true + }, + "hwidDeviceLimit": { + "type": "integer", + "nullable": true + }, + "externalSquadUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "trojanPassword": { + "type": "string" + }, + "vlessUuid": { + "type": "string", + "format": "uuid" + }, + "ssPassword": { + "type": "string" + }, + "lastTriggeredThreshold": { + "type": "integer", + "default": 0 + }, + "subRevokedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastTrafficResetAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "subscriptionUrl": { + "type": "string" + }, + "activeInternalSquads": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "uuid", + "name" + ] + } + }, + "userTraffic": { + "type": "object", + "properties": { + "usedTrafficBytes": { + "type": "number" + }, + "lifetimeUsedTrafficBytes": { + "type": "number" + }, + "onlineAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "firstConnectedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastConnectedNodeUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "usedTrafficBytes", + "lifetimeUsedTrafficBytes", + "onlineAt", + "firstConnectedAt", + "lastConnectedNodeUuid" + ] + } + }, + "required": [ + "uuid", + "id", + "shortUuid", + "username", + "expireAt", + "telegramId", + "email", + "description", + "tag", + "hwidDeviceLimit", + "externalSquadUuid", + "trojanPassword", + "vlessUuid", + "ssPassword", + "subRevokedAt", + "lastTrafficResetAt", + "createdAt", + "updatedAt", + "subscriptionUrl", + "activeInternalSquads", + "userTraffic" + ] + }, + "meta": { + "type": "object", + "properties": { + "notConnectedAfterHours": { + "type": "number", + "nullable": true + }, + "expiration": { + "type": "number", + "nullable": true + } + }, + "nullable": true + } + }, + "required": [ + "scope", + "event", + "timestamp", + "data", + "meta" + ] + }, + "RemnawaveWebhookUserHwidDevicesEventsDto": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "user_hwid_devices" + ] + }, + "event": { + "type": "string", + "enum": [ + "user_hwid_devices.added", + "user_hwid_devices.deleted" + ] + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "data": { + "type": "object", + "properties": { + "user": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "id": { + "type": "number" + }, + "shortUuid": { + "type": "string" + }, + "username": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "default": "ACTIVE" + }, + "trafficLimitBytes": { + "type": "number", + "default": 0 + }, + "trafficLimitStrategy": { + "description": "Available reset periods", + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "default": "NO_RESET" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "telegramId": { + "type": "integer", + "nullable": true + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tag": { + "type": "string", + "nullable": true + }, + "hwidDeviceLimit": { + "type": "integer", + "nullable": true + }, + "externalSquadUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "trojanPassword": { + "type": "string" + }, + "vlessUuid": { + "type": "string", + "format": "uuid" + }, + "ssPassword": { + "type": "string" + }, + "lastTriggeredThreshold": { + "type": "integer", + "default": 0 + }, + "subRevokedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastTrafficResetAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "subscriptionUrl": { + "type": "string" + }, + "activeInternalSquads": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "uuid", + "name" + ] + } + }, + "userTraffic": { + "type": "object", + "properties": { + "usedTrafficBytes": { + "type": "number" + }, + "lifetimeUsedTrafficBytes": { + "type": "number" + }, + "onlineAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "firstConnectedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastConnectedNodeUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "usedTrafficBytes", + "lifetimeUsedTrafficBytes", + "onlineAt", + "firstConnectedAt", + "lastConnectedNodeUuid" + ] + } + }, + "required": [ + "uuid", + "id", + "shortUuid", + "username", + "expireAt", + "telegramId", + "email", + "description", + "tag", + "hwidDeviceLimit", + "externalSquadUuid", + "trojanPassword", + "vlessUuid", + "ssPassword", + "subRevokedAt", + "lastTrafficResetAt", + "createdAt", + "updatedAt", + "subscriptionUrl", + "activeInternalSquads", + "userTraffic" + ] + }, + "hwidUserDevice": { + "type": "object", + "properties": { + "hwid": { + "type": "string" + }, + "userId": { + "type": "number" + }, + "platform": { + "type": "string", + "nullable": true + }, + "osVersion": { + "type": "string", + "nullable": true + }, + "deviceModel": { + "type": "string", + "nullable": true + }, + "userAgent": { + "type": "string", + "nullable": true + }, + "requestIp": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "hwid", + "userId", + "platform", + "osVersion", + "deviceModel", + "userAgent", + "requestIp", + "createdAt", + "updatedAt" + ] + } + }, + "required": [ + "user", + "hwidUserDevice" + ] + } + }, + "required": [ + "scope", + "event", + "timestamp", + "data" + ] + }, + "RemnawaveWebhookNodeEventsDto": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "node" + ] + }, + "event": { + "type": "string", + "enum": [ + "node.created", + "node.modified", + "node.disabled", + "node.enabled", + "node.deleted", + "node.connection_lost", + "node.connection_restored", + "node.traffic_notify" + ] + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "data": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "address": { + "type": "string" + }, + "port": { + "type": "integer", + "nullable": true + }, + "proxyUrl": { + "type": "string", + "nullable": true + }, + "isConnected": { + "type": "boolean" + }, + "isDisabled": { + "type": "boolean" + }, + "isConnecting": { + "type": "boolean" + }, + "lastStatusChange": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastStatusMessage": { + "type": "string", + "nullable": true + }, + "isTrafficTrackingActive": { + "type": "boolean" + }, + "trafficResetDay": { + "type": "integer", + "nullable": true + }, + "trafficLimitBytes": { + "type": "number", + "nullable": true + }, + "trafficUsedBytes": { + "type": "number", + "nullable": true + }, + "notifyPercent": { + "type": "integer", + "nullable": true + }, + "viewPosition": { + "type": "integer" + }, + "countryCode": { + "type": "string" + }, + "consumptionMultiplier": { + "type": "number" + }, + "nodeConsumptionMultiplier": { + "type": "number" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "configProfile": { + "type": "object", + "properties": { + "activeConfigProfileUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "activeInbounds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "profileUuid": { + "type": "string", + "format": "uuid" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "network": { + "type": "string", + "nullable": true + }, + "security": { + "type": "string", + "nullable": true + }, + "port": { + "type": "number", + "nullable": true + }, + "rawInbound": { + "nullable": true + } + }, + "required": [ + "uuid", + "profileUuid", + "tag", + "type", + "network", + "security", + "port", + "rawInbound" + ] + } + } + }, + "required": [ + "activeConfigProfileUuid", + "activeInbounds" + ] + }, + "providerUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "provider": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "faviconLink": { + "type": "string", + "nullable": true + }, + "loginUrl": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "name", + "faviconLink", + "loginUrl", + "createdAt", + "updatedAt" + ], + "nullable": true + }, + "activePluginUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "system": { + "type": "object", + "properties": { + "info": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "cpus": { + "type": "integer" + }, + "cpuModel": { + "type": "string" + }, + "memoryTotal": { + "type": "number" + }, + "hostname": { + "type": "string" + }, + "platform": { + "type": "string" + }, + "release": { + "type": "string" + }, + "type": { + "type": "string" + }, + "version": { + "type": "string" + }, + "networkInterfaces": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "arch", + "cpus", + "cpuModel", + "memoryTotal", + "hostname", + "platform", + "release", + "type", + "version", + "networkInterfaces" + ] + }, + "stats": { + "type": "object", + "properties": { + "memoryFree": { + "type": "number" + }, + "memoryUsed": { + "type": "number" + }, + "uptime": { + "type": "number" + }, + "loadAvg": { + "type": "array", + "items": { + "type": "number" + } + }, + "interface": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "rxBytesPerSec": { + "type": "number" + }, + "txBytesPerSec": { + "type": "number" + }, + "rxTotal": { + "type": "number" + }, + "txTotal": { + "type": "number" + } + }, + "required": [ + "interface", + "rxBytesPerSec", + "txBytesPerSec", + "rxTotal", + "txTotal" + ], + "nullable": true + } + }, + "required": [ + "memoryFree", + "memoryUsed", + "uptime", + "loadAvg", + "interface" + ] + } + }, + "required": [ + "info", + "stats" + ], + "nullable": true + }, + "versions": { + "type": "object", + "properties": { + "xray": { + "type": "string" + }, + "node": { + "type": "string" + } + }, + "required": [ + "xray", + "node" + ], + "nullable": true + }, + "xrayUptime": { + "type": "number" + }, + "usersOnline": { + "type": "number" + }, + "note": { + "type": "string", + "nullable": true + } + }, + "required": [ + "uuid", + "name", + "address", + "port", + "proxyUrl", + "isConnected", + "isDisabled", + "isConnecting", + "lastStatusChange", + "lastStatusMessage", + "isTrafficTrackingActive", + "trafficResetDay", + "trafficLimitBytes", + "trafficUsedBytes", + "notifyPercent", + "viewPosition", + "countryCode", + "consumptionMultiplier", + "nodeConsumptionMultiplier", + "tags", + "createdAt", + "updatedAt", + "configProfile", + "providerUuid", + "provider", + "activePluginUuid", + "system", + "versions", + "xrayUptime", + "usersOnline", + "note" + ] + } + }, + "required": [ + "scope", + "event", + "timestamp", + "data" + ] + }, + "RemnawaveWebhookServiceEventsDto": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "service" + ] + }, + "event": { + "type": "string", + "enum": [ + "service.panel_started", + "service.login_attempt_failed", + "service.login_attempt_success", + "service.subpage_config_changed", + "service.api_token_created", + "service.api_token_deleted" + ] + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "data": { + "type": "object", + "properties": { + "loginAttempt": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "ip": { + "type": "string" + }, + "userAgent": { + "type": "string" + }, + "description": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "required": [ + "username", + "ip", + "userAgent" + ] + }, + "panelVersion": { + "type": "string" + }, + "subpageConfig": { + "type": "object", + "properties": { + "action": { + "type": "string", + "enum": [ + "CREATED", + "UPDATED", + "DELETED" + ] + }, + "uuid": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "action", + "uuid" + ] + }, + "apiToken": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "uuid": { + "type": "string", + "format": "uuid" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "name", + "uuid", + "expireAt", + "scopes" + ] + } + } + } + }, + "required": [ + "scope", + "event", + "timestamp", + "data" + ] + }, + "RemnawaveWebhookErrorsEventsDto": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "errors" + ] + }, + "event": { + "type": "string", + "enum": [ + "errors.bandwidth_usage_threshold_reached_max_notifications" + ] + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "data": { + "type": "object", + "properties": { + "description": { + "type": "string" + } + }, + "required": [ + "description" + ] + } + }, + "required": [ + "scope", + "event", + "timestamp", + "data" + ] + }, + "RemnawaveWebhookCrmEventsDto": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "crm" + ] + }, + "event": { + "type": "string", + "enum": [ + "crm.infra_billing_node_payment_in_7_days", + "crm.infra_billing_node_payment_in_48hrs", + "crm.infra_billing_node_payment_in_24hrs", + "crm.infra_billing_node_payment_due_today", + "crm.infra_billing_node_payment_overdue_24hrs", + "crm.infra_billing_node_payment_overdue_48hrs", + "crm.infra_billing_node_payment_overdue_7_days" + ] + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "data": { + "type": "object", + "properties": { + "providerName": { + "type": "string" + }, + "nodeName": { + "type": "string" + }, + "nextBillingAt": { + "type": "string", + "format": "date-time" + }, + "loginUrl": { + "type": "string" + } + }, + "required": [ + "providerName", + "nodeName", + "nextBillingAt", + "loginUrl" + ] + } + }, + "required": [ + "scope", + "event", + "timestamp", + "data" + ] + }, + "RemnawaveWebhookTorrentBlockerEventsDto": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "torrent_blocker" + ] + }, + "event": { + "type": "string", + "enum": [ + "torrent_blocker.report" + ] + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "data": { + "type": "object", + "properties": { + "node": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "address": { + "type": "string" + }, + "port": { + "type": "integer", + "nullable": true + }, + "proxyUrl": { + "type": "string", + "nullable": true + }, + "isConnected": { + "type": "boolean" + }, + "isDisabled": { + "type": "boolean" + }, + "isConnecting": { + "type": "boolean" + }, + "lastStatusChange": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastStatusMessage": { + "type": "string", + "nullable": true + }, + "isTrafficTrackingActive": { + "type": "boolean" + }, + "trafficResetDay": { + "type": "integer", + "nullable": true + }, + "trafficLimitBytes": { + "type": "number", + "nullable": true + }, + "trafficUsedBytes": { + "type": "number", + "nullable": true + }, + "notifyPercent": { + "type": "integer", + "nullable": true + }, + "viewPosition": { + "type": "integer" + }, + "countryCode": { + "type": "string" + }, + "consumptionMultiplier": { + "type": "number" + }, + "nodeConsumptionMultiplier": { + "type": "number" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "configProfile": { + "type": "object", + "properties": { + "activeConfigProfileUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "activeInbounds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "profileUuid": { + "type": "string", + "format": "uuid" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "network": { + "type": "string", + "nullable": true + }, + "security": { + "type": "string", + "nullable": true + }, + "port": { + "type": "number", + "nullable": true + }, + "rawInbound": { + "nullable": true + } + }, + "required": [ + "uuid", + "profileUuid", + "tag", + "type", + "network", + "security", + "port", + "rawInbound" + ] + } + } + }, + "required": [ + "activeConfigProfileUuid", + "activeInbounds" + ] + }, + "providerUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "provider": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "faviconLink": { + "type": "string", + "nullable": true + }, + "loginUrl": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "name", + "faviconLink", + "loginUrl", + "createdAt", + "updatedAt" + ], + "nullable": true + }, + "activePluginUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "system": { + "type": "object", + "properties": { + "info": { + "type": "object", + "properties": { + "arch": { + "type": "string" + }, + "cpus": { + "type": "integer" + }, + "cpuModel": { + "type": "string" + }, + "memoryTotal": { + "type": "number" + }, + "hostname": { + "type": "string" + }, + "platform": { + "type": "string" + }, + "release": { + "type": "string" + }, + "type": { + "type": "string" + }, + "version": { + "type": "string" + }, + "networkInterfaces": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "arch", + "cpus", + "cpuModel", + "memoryTotal", + "hostname", + "platform", + "release", + "type", + "version", + "networkInterfaces" + ] + }, + "stats": { + "type": "object", + "properties": { + "memoryFree": { + "type": "number" + }, + "memoryUsed": { + "type": "number" + }, + "uptime": { + "type": "number" + }, + "loadAvg": { + "type": "array", + "items": { + "type": "number" + } + }, + "interface": { + "type": "object", + "properties": { + "interface": { + "type": "string" + }, + "rxBytesPerSec": { + "type": "number" + }, + "txBytesPerSec": { + "type": "number" + }, + "rxTotal": { + "type": "number" + }, + "txTotal": { + "type": "number" + } + }, + "required": [ + "interface", + "rxBytesPerSec", + "txBytesPerSec", + "rxTotal", + "txTotal" + ], + "nullable": true + } + }, + "required": [ + "memoryFree", + "memoryUsed", + "uptime", + "loadAvg", + "interface" + ] + } + }, + "required": [ + "info", + "stats" + ], + "nullable": true + }, + "versions": { + "type": "object", + "properties": { + "xray": { + "type": "string" + }, + "node": { + "type": "string" + } + }, + "required": [ + "xray", + "node" + ], + "nullable": true + }, + "xrayUptime": { + "type": "number" + }, + "usersOnline": { + "type": "number" + }, + "note": { + "type": "string", + "nullable": true + } + }, + "required": [ + "uuid", + "name", + "address", + "port", + "proxyUrl", + "isConnected", + "isDisabled", + "isConnecting", + "lastStatusChange", + "lastStatusMessage", + "isTrafficTrackingActive", + "trafficResetDay", + "trafficLimitBytes", + "trafficUsedBytes", + "notifyPercent", + "viewPosition", + "countryCode", + "consumptionMultiplier", + "nodeConsumptionMultiplier", + "tags", + "createdAt", + "updatedAt", + "configProfile", + "providerUuid", + "provider", + "activePluginUuid", + "system", + "versions", + "xrayUptime", + "usersOnline", + "note" + ] + }, + "user": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "id": { + "type": "number" + }, + "shortUuid": { + "type": "string" + }, + "username": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "x-enumNames": [ + "ACTIVE", + "DISABLED", + "LIMITED", + "EXPIRED" + ], + "default": "ACTIVE" + }, + "trafficLimitBytes": { + "type": "number", + "default": 0 + }, + "trafficLimitStrategy": { + "description": "Available reset periods", + "type": "string", + "enum": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "x-enumNames": [ + "NO_RESET", + "DAY", + "WEEK", + "MONTH", + "MONTH_ROLLING" + ], + "default": "NO_RESET" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "telegramId": { + "type": "integer", + "nullable": true + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tag": { + "type": "string", + "nullable": true + }, + "hwidDeviceLimit": { + "type": "integer", + "nullable": true + }, + "externalSquadUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "trojanPassword": { + "type": "string" + }, + "vlessUuid": { + "type": "string", + "format": "uuid" + }, + "ssPassword": { + "type": "string" + }, + "lastTriggeredThreshold": { + "type": "integer", + "default": 0 + }, + "subRevokedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastTrafficResetAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "subscriptionUrl": { + "type": "string" + }, + "activeInternalSquads": { + "type": "array", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "uuid", + "name" + ] + } + }, + "userTraffic": { + "type": "object", + "properties": { + "usedTrafficBytes": { + "type": "number" + }, + "lifetimeUsedTrafficBytes": { + "type": "number" + }, + "onlineAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "firstConnectedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastConnectedNodeUuid": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "required": [ + "usedTrafficBytes", + "lifetimeUsedTrafficBytes", + "onlineAt", + "firstConnectedAt", + "lastConnectedNodeUuid" + ] + } + }, + "required": [ + "uuid", + "id", + "shortUuid", + "username", + "expireAt", + "telegramId", + "email", + "description", + "tag", + "hwidDeviceLimit", + "externalSquadUuid", + "trojanPassword", + "vlessUuid", + "ssPassword", + "subRevokedAt", + "lastTrafficResetAt", + "createdAt", + "updatedAt", + "subscriptionUrl", + "activeInternalSquads", + "userTraffic" + ] + }, + "report": { + "type": "object", + "properties": { + "actionReport": { + "type": "object", + "properties": { + "blocked": { + "type": "boolean" + }, + "ip": { + "type": "string" + }, + "blockDuration": { + "type": "number" + }, + "willUnblockAt": { + "type": "string", + "format": "date-time" + }, + "userId": { + "type": "string" + }, + "processedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "blocked", + "ip", + "blockDuration", + "willUnblockAt", + "userId", + "processedAt" + ] + }, + "xrayReport": { + "type": "object", + "properties": { + "email": { + "type": "string", + "nullable": true + }, + "level": { + "type": "number", + "nullable": true + }, + "protocol": { + "type": "string", + "nullable": true + }, + "network": { + "type": "string" + }, + "source": { + "type": "string", + "nullable": true + }, + "destination": { + "type": "string" + }, + "routeTarget": { + "type": "string", + "nullable": true + }, + "originalTarget": { + "type": "string", + "nullable": true + }, + "inboundTag": { + "type": "string", + "nullable": true + }, + "inboundName": { + "type": "string", + "nullable": true + }, + "inboundLocal": { + "type": "string", + "nullable": true + }, + "outboundTag": { + "type": "string", + "nullable": true + }, + "ts": { + "type": "number" + } + }, + "required": [ + "email", + "level", + "protocol", + "network", + "source", + "destination", + "routeTarget", + "originalTarget", + "inboundTag", + "inboundName", + "inboundLocal", + "outboundTag", + "ts" + ] + } + }, + "required": [ + "actionReport", + "xrayReport" + ] + } + }, + "required": [ + "node", + "user", + "report" + ] + } + }, + "required": [ + "scope", + "event", + "timestamp", + "data" + ] + } + } + } +}