upd for api spec

This commit is contained in:
crn4
2026-05-04 17:59:22 +02:00
parent 0a2b88a008
commit 16cc204c89
2 changed files with 95 additions and 32 deletions

View File

@@ -3746,40 +3746,56 @@ components:
example: "john@reseller.com"
ResellerMSPResponse:
type: object
description: An MSP account managed (or invited) by a reseller.
properties:
id:
type: string
description: The MSP account ID
description: The MSP account ID.
example: ch8i4ug6lnn4g9hqv7m0
name:
type: string
description: The MSP name
description: Display name of the MSP.
example: "Partner MSP"
domain:
type: string
description: The MSP domain
description: The MSP account domain.
example: "partner-msp.com"
has_reseller:
type: boolean
description: Whether the MSP is managed by a reseller
example: true
status:
type: string
description: |
Lifecycle status of the reseller↔MSP relationship.
* `existing` — MSP exists in the system but has not yet been invited.
* `invited` — Reseller has invited the MSP; MSP user has not accepted.
* `active` — MSP user accepted; reseller manages the account.
enum:
- existing
- invited
- active
example: "active"
tenant_number:
type: integer
description: Number of manageable (active or pending) tenants under this MSP.
example: 12
reseller_customer_id:
type: string
description: Reseller's internal customer reference for this MSP
description: Reseller's internal customer reference for this MSP.
example: "CUST-12345"
activated_at:
type: string
description: MSP activation timestamp in RFC3339 format
example: "2024-01-01T00:00:00Z"
format: date-time
description: When the MSP account was activated.
example: "2026-04-01T12:00:00Z"
invited_at:
type: string
description: MSP invitation timestamp in RFC3339 format
example: "2024-01-01T00:00:00Z"
format: date-time
description: When the reseller invited the MSP (set only if invited).
example: "2026-04-15T09:30:00Z"
required:
- id
- name
- domain
- has_reseller
- status
- tenant_number
GetResellerMSPsResponse:
type: array
items:
@@ -3808,11 +3824,16 @@ components:
- domain
UpdateResellerMSPRequest:
type: object
description: Mutable fields the reseller can update on a managed MSP.
properties:
name:
type: string
description: New display name for the MSP. Whitespace is trimmed; empty/whitespace-only values are rejected.
example: "Renamed MSP"
reseller_customer_id:
type: string
description: Reseller's internal customer reference for this MSP
example: "CUST-12345"
description: New reseller customer reference. Pass empty string to clear.
example: "CUST-67890"
CreateTenantRequest:
type: object
properties:

View File

@@ -1,6 +1,6 @@
// Package api provides primitives to interact with the openapi HTTP API.
//
// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.6.0 DO NOT EDIT.
// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.0 DO NOT EDIT.
package api
import (
@@ -13,8 +13,8 @@ import (
)
const (
BearerAuthScopes = "BearerAuth.Scopes"
TokenAuthScopes = "TokenAuth.Scopes"
BearerAuthScopes bearerAuthContextKey = "BearerAuth.Scopes"
TokenAuthScopes tokenAuthContextKey = "TokenAuth.Scopes"
)
// Defines values for CreateIntegrationRequestPlatform.
@@ -860,6 +860,27 @@ func (e PolicyRuleUpdateProtocol) Valid() bool {
}
}
// Defines values for ResellerMSPResponseStatus.
const (
ResellerMSPResponseStatusActive ResellerMSPResponseStatus = "active"
ResellerMSPResponseStatusExisting ResellerMSPResponseStatus = "existing"
ResellerMSPResponseStatusInvited ResellerMSPResponseStatus = "invited"
)
// Valid indicates whether the value is a known member of the ResellerMSPResponseStatus enum.
func (e ResellerMSPResponseStatus) Valid() bool {
switch e {
case ResellerMSPResponseStatusActive:
return true
case ResellerMSPResponseStatusExisting:
return true
case ResellerMSPResponseStatusInvited:
return true
default:
return false
}
}
// Defines values for ResourceType.
const (
ResourceTypeDomain ResourceType = "domain"
@@ -3579,30 +3600,42 @@ type ProxyCluster struct {
ConnectedProxies int `json:"connected_proxies"`
}
// ResellerMSPResponse defines model for ResellerMSPResponse.
// ResellerMSPResponse An MSP account managed (or invited) by a reseller.
type ResellerMSPResponse struct {
// ActivatedAt MSP activation timestamp in RFC3339 format
ActivatedAt *string `json:"activated_at,omitempty"`
// ActivatedAt When the MSP account was activated.
ActivatedAt *time.Time `json:"activated_at,omitempty"`
// Domain The MSP domain
// Domain The MSP account domain.
Domain string `json:"domain"`
// HasReseller Whether the MSP is managed by a reseller
HasReseller bool `json:"has_reseller"`
// Id The MSP account ID
// Id The MSP account ID.
Id string `json:"id"`
// InvitedAt MSP invitation timestamp in RFC3339 format
InvitedAt *string `json:"invited_at,omitempty"`
// InvitedAt When the reseller invited the MSP (set only if invited).
InvitedAt *time.Time `json:"invited_at,omitempty"`
// Name The MSP name
// Name Display name of the MSP.
Name string `json:"name"`
// ResellerCustomerId Reseller's internal customer reference for this MSP
// ResellerCustomerId Reseller's internal customer reference for this MSP.
ResellerCustomerId *string `json:"reseller_customer_id,omitempty"`
// Status Lifecycle status of the reseller↔MSP relationship.
// * `existing` — MSP exists in the system but has not yet been invited.
// * `invited` — Reseller has invited the MSP; MSP user has not accepted.
// * `active` — MSP user accepted; reseller manages the account.
Status ResellerMSPResponseStatus `json:"status"`
// TenantNumber Number of manageable (active or pending) tenants under this MSP.
TenantNumber int `json:"tenant_number"`
}
// ResellerMSPResponseStatus Lifecycle status of the reseller↔MSP relationship.
// * `existing` — MSP exists in the system but has not yet been invited.
// * `invited` — Reseller has invited the MSP; MSP user has not accepted.
// * `active` — MSP user accepted; reseller manages the account.
type ResellerMSPResponseStatus string
// ResellerStatusResponse defines model for ResellerStatusResponse.
type ResellerStatusResponse struct {
// ActivatedAt Reseller activation timestamp in RFC3339 format
@@ -4232,9 +4265,12 @@ type TenantResponse struct {
// TenantResponseStatus The status of the tenant
type TenantResponseStatus string
// UpdateResellerMSPRequest defines model for UpdateResellerMSPRequest.
// UpdateResellerMSPRequest Mutable fields the reseller can update on a managed MSP.
type UpdateResellerMSPRequest struct {
// ResellerCustomerId Reseller's internal customer reference for this MSP
// Name New display name for the MSP. Whitespace is trimmed; empty/whitespace-only values are rejected.
Name *string `json:"name,omitempty"`
// ResellerCustomerId New reseller customer reference. Pass empty string to clear.
ResellerCustomerId *string `json:"reseller_customer_id,omitempty"`
}
@@ -4522,6 +4558,12 @@ type ZoneRequest struct {
// Conflict Standard error response. Note: The exact structure of this error response is inferred from `util.WriteErrorResponse` and `util.WriteError` usage in the provided Go code, as a specific Go struct for errors was not provided.
type Conflict = ErrorResponse
// bearerAuthContextKey is the context key for BearerAuth security scheme
type bearerAuthContextKey string
// tokenAuthContextKey is the context key for TokenAuth security scheme
type tokenAuthContextKey string
// GetApiEventsNetworkTrafficParams defines parameters for GetApiEventsNetworkTraffic.
type GetApiEventsNetworkTrafficParams struct {
// Page Page number