diff --git a/CHANGELOG.md b/CHANGELOG.md index 4db00e5..b1ab092 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,15 @@ Notable changes, newest first. Release notes on GitHub list every commit; this file collects what users and scripts need to know. +## Unreleased + +### Changes + +- Refreshed the generated API clients and specs. No command, flag, JSON field or + `-o text` column changes. Norcube Monitor's status page domain and logo + endpoints, DomainRadar's expiry alert settings and Billing's plan features are + in the clients but have no commands yet; `nrc api` reaches them. + ## 0.23.0 (2026-11-05) ### New diff --git a/internal/api/billing/billing.gen.go b/internal/api/billing/billing.gen.go index 1bb772b..b86e715 100644 --- a/internal/api/billing/billing.gen.go +++ b/internal/api/billing/billing.gen.go @@ -40,6 +40,8 @@ func (e ConstantsBillingType) Valid() bool { // Defines values for ConstantsInvoiceStatus. const ( InvoiceStatusDraft ConstantsInvoiceStatus = "draft" + InvoiceStatusOpen ConstantsInvoiceStatus = "open" + InvoiceStatusPaid ConstantsInvoiceStatus = "paid" ) // Valid indicates whether the value is a known member of the ConstantsInvoiceStatus enum. @@ -47,6 +49,10 @@ func (e ConstantsInvoiceStatus) Valid() bool { switch e { case InvoiceStatusDraft: return true + case InvoiceStatusOpen: + return true + case InvoiceStatusPaid: + return true default: return false } @@ -188,12 +194,14 @@ const ( ErrEmailRequired ResponseType = "EMAIL_REQUIRED" ErrInnovationAgencyIDRequired ResponseType = "INNOVATION_AGENCY_ID_REQUIRED" ErrInsufficientPermissions ResponseType = "INSUFFICIENT_PERMISSIONS" + ErrInsufficientScope ResponseType = "INSUFFICIENT_SCOPE" ErrInternalServer ResponseType = "INTERNAL_SERVER_ERROR" ErrInvalidCredentials ResponseType = "INVALID_CREDENTIALS" ErrInvalidOldPassword ResponseType = "INVALID_OLD_PASSWORD" ErrInvalidRequest ResponseType = "INVALID_REQUEST" ErrInvalidRole ResponseType = "INVALID_ROLE" ErrInvalidToken ResponseType = "INVALID_TOKEN" + ErrInvoiceAlreadyPaid ResponseType = "INVOICE_ALREADY_PAID" ErrLoginIntentToken ResponseType = "LOGIN_INTENT_TOKEN" ErrMissingBackupCode ResponseType = "MISSING_BACKUP_CODE" ErrMissingNewPassword ResponseType = "MISSING_NEW_PASSWORD" @@ -205,10 +213,13 @@ const ( ErrNameTooShort ResponseType = "NAME_TOO_SHORT" ErrNewPasswordRequired ResponseType = "NEW_PASSWORD_REQUIRED" ErrNotFound ResponseType = "NOT_FOUND" + ErrNothingToPay ResponseType = "NOTHING_TO_PAY" ErrOTPInvalid ResponseType = "OTP_INVALID" ErrOldPasswordRequired ResponseType = "OLD_PASSWORD_REQUIRED" ErrPasswordRequired ResponseType = "PASSWORD_REQUIRED" ErrPayloadInvalid ResponseType = "INVALID_PAYLOAD" + ErrPaymentInProgress ResponseType = "PAYMENT_IN_PROGRESS" + ErrPaymentMethodRequired ResponseType = "PAYMENT_METHOD_REQUIRED" ErrSecretExpired ResponseType = "SECRET_EXPIRED" ErrSecretNotFound ResponseType = "SECRET_NOT_FOUND" ErrServiceNotSubscribable ResponseType = "SERVICE_NOT_SUBSCRIBABLE" @@ -232,6 +243,8 @@ func (e ResponseType) Valid() bool { return true case ErrInsufficientPermissions: return true + case ErrInsufficientScope: + return true case ErrInternalServer: return true case ErrInvalidCredentials: @@ -244,6 +257,8 @@ func (e ResponseType) Valid() bool { return true case ErrInvalidToken: return true + case ErrInvoiceAlreadyPaid: + return true case ErrLoginIntentToken: return true case ErrMissingBackupCode: @@ -266,6 +281,8 @@ func (e ResponseType) Valid() bool { return true case ErrNotFound: return true + case ErrNothingToPay: + return true case ErrOTPInvalid: return true case ErrOldPasswordRequired: @@ -274,6 +291,10 @@ func (e ResponseType) Valid() bool { return true case ErrPayloadInvalid: return true + case ErrPaymentInProgress: + return true + case ErrPaymentMethodRequired: + return true case ErrSecretExpired: return true case ErrSecretNotFound: @@ -329,9 +350,15 @@ type DtoBillingPlan struct { Description *string `json:"description,omitempty"` DisplayOrder *int `json:"displayOrder,omitempty"` - // Entitlements Entitlements maps entitlement keys to values ("Up to N datasources"). + // Entitlements Entitlements maps entitlement keys to values. Clients that show a plan + // should use Features, which is already worded. Entitlements *map[string]int `json:"entitlements,omitempty"` + // Features Features lists what the entitlements grant, resolved and ready to show, + // so a client needs no knowledge of entitlement keys. Only entitlements the + // platform enforces for this plan's service appear here. + Features *[]DtoBillingPlanFeature `json:"features,omitempty"` + // Highlighted Highlighted renders the "Most popular" treatment. Highlighted *bool `json:"highlighted,omitempty"` MonthlyPriceCents *int `json:"monthlyPriceCents,omitempty"` @@ -341,6 +368,21 @@ type DtoBillingPlan struct { Quotas *[]DtoBillingPlanQuota `json:"quotas,omitempty"` } +// DtoBillingPlanFeature defines model for dto.BillingPlanFeature. +type DtoBillingPlanFeature struct { + Key *string `json:"key,omitempty"` + + // Label Label names the setting, for comparing two plans side by side. + Label *string `json:"label,omitempty"` + + // Line Line is the sentence for the plan card. + Line *string `json:"line,omitempty"` + + // Unit Unit names what the value counts, in the plural. + Unit *string `json:"unit,omitempty"` + Value *int `json:"value,omitempty"` +} + // DtoBillingPlanQuota defines model for dto.BillingPlanQuota. type DtoBillingPlanQuota struct { IncludedQuantity *float32 `json:"includedQuantity,omitempty"` @@ -2329,6 +2371,7 @@ type CreateSCAReauthPaymentIntentResponse struct { JSON200 *HandlerCreateSCAReauthPaymentIntentResponse JSON400 *ResponseAPIError JSON404 *ResponseAPIError + JSON409 *ResponseAPIError JSON500 *ResponseAPIError } @@ -2492,6 +2535,7 @@ type UpdateSubscriptionResponse struct { HTTPResponse *http.Response JSON200 *DtoSubscription JSON400 *ResponseAPIError + JSON402 *ResponseAPIError JSON404 *ResponseAPIError JSON409 *ResponseAPIError JSON500 *ResponseAPIError @@ -3297,6 +3341,13 @@ func ParseCreateSCAReauthPaymentIntentResponse(rsp *http.Response) (*CreateSCARe } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest ResponseAPIError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON409 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest ResponseAPIError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -3518,6 +3569,13 @@ func ParseUpdateSubscriptionResponse(rsp *http.Response) (*UpdateSubscriptionRes } response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 402: + var dest ResponseAPIError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON402 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest ResponseAPIError if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/internal/api/domainradar/domainradar.gen.go b/internal/api/domainradar/domainradar.gen.go index 5b26964..0e22d85 100644 --- a/internal/api/domainradar/domainradar.gen.go +++ b/internal/api/domainradar/domainradar.gen.go @@ -14,6 +14,7 @@ import ( "strings" "github.com/oapi-codegen/runtime" + openapi_types "github.com/oapi-codegen/runtime/types" ) // Defines values for ConstantsAIRisk. @@ -163,6 +164,33 @@ func (e ConstantsSortDir) Valid() bool { } } +// Defines values for DtoExpiryAlertsStatus. +const ( + Degraded DtoExpiryAlertsStatus = "degraded" + Down DtoExpiryAlertsStatus = "down" + Paused DtoExpiryAlertsStatus = "paused" + Pending DtoExpiryAlertsStatus = "pending" + Up DtoExpiryAlertsStatus = "up" +) + +// Valid indicates whether the value is a known member of the DtoExpiryAlertsStatus enum. +func (e DtoExpiryAlertsStatus) Valid() bool { + switch e { + case Degraded: + return true + case Down: + return true + case Paused: + return true + case Pending: + return true + case Up: + return true + default: + return false + } +} + // Defines values for ResponseType. const ( ErrConflict ResponseType = "CONFLICT" @@ -170,12 +198,15 @@ const ( ErrInsufficientScope ResponseType = "INSUFFICIENT_SCOPE" ErrInternal ResponseType = "INTERNAL_ERROR" ErrInvalidPayload ResponseType = "INVALID_PAYLOAD" + ErrLimitReached ResponseType = "LIMIT_REACHED" ErrMissingOrganizationID ResponseType = "MISSING_ORGANIZATION_ID" ErrMissingUserID ResponseType = "MISSING_USER_ID" + ErrMonitorAccessDenied ResponseType = "MONITOR_ACCESS_DENIED" ErrNotFound ResponseType = "NOT_FOUND" ErrOrgBlocked ResponseType = "ORG_BLOCKED" ErrTooManyRequests ResponseType = "TOO_MANY_REQUESTS" ErrUnauthorized ResponseType = "UNAUTHORIZED" + ErrUnavailable ResponseType = "UNAVAILABLE" ErrValidationFailed ResponseType = "VALIDATION_FAILED" ) @@ -192,10 +223,14 @@ func (e ResponseType) Valid() bool { return true case ErrInvalidPayload: return true + case ErrLimitReached: + return true case ErrMissingOrganizationID: return true case ErrMissingUserID: return true + case ErrMonitorAccessDenied: + return true case ErrNotFound: return true case ErrOrgBlocked: @@ -204,6 +239,8 @@ func (e ResponseType) Valid() bool { return true case ErrUnauthorized: return true + case ErrUnavailable: + return true case ErrValidationFailed: return true default: @@ -391,6 +428,33 @@ type DtoDomainCheck struct { WhoisSourceServer *string `json:"whoisSourceServer,omitempty"` } +// DtoExpiryAlerts defines model for dto.ExpiryAlerts. +type DtoExpiryAlerts struct { + Enabled bool `json:"enabled"` + ExpiryThresholdsDays *[]int `json:"expiryThresholdsDays,omitempty"` + LastCheckedAt *string `json:"lastCheckedAt,omitempty"` + + // LastErrorKind LastErrorKind explains a non-up status, e.g. domain_expiring, + // domain_expiry_unknown, domain_lookup_failed. + LastErrorKind *string `json:"lastErrorKind,omitempty"` + + // MonitorId The fields below are present when enabled. + MonitorId *openapi_types.UUID `json:"monitorId,omitempty"` + Status *DtoExpiryAlertsStatus `json:"status,omitempty"` +} + +// DtoExpiryAlertsStatus defines model for DtoExpiryAlerts.Status. +type DtoExpiryAlertsStatus string + +// DtoExpiryAlertsUpdate defines model for dto.ExpiryAlertsUpdate. +type DtoExpiryAlertsUpdate struct { + Enabled bool `json:"enabled"` + + // ExpiryThresholdsDays Days before expiry to warn at; required when enabling ([] warns only + // once the domain has expired). Norcube Monitor allows up to 5, each 1-365. + ExpiryThresholdsDays *[]int `json:"expiryThresholdsDays,omitempty"` +} + // DtoGeneratedName defines model for dto.GeneratedName. type DtoGeneratedName struct { Length *int `json:"length,omitempty"` @@ -622,6 +686,9 @@ type CreateBulkCheckJSONRequestBody = CheckhandlerBulkCheckRequest // SaveDomainJSONRequestBody defines body for SaveDomain for application/json ContentType. type SaveDomainJSONRequestBody = SaveddomainhandlerSaveRequest +// SetSavedDomainExpiryAlertsJSONRequestBody defines body for SetSavedDomainExpiryAlerts for application/json ContentType. +type SetSavedDomainExpiryAlertsJSONRequestBody = DtoExpiryAlertsUpdate + // CreateNameJobJSONRequestBody defines body for CreateNameJob for application/json ContentType. type CreateNameJobJSONRequestBody = NamegenhandlerCreateJobRequest @@ -774,6 +841,14 @@ type ClientInterface interface { // RemoveSavedDomain request RemoveSavedDomain(ctx context.Context, domain string, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetSavedDomainExpiryAlerts request + GetSavedDomainExpiryAlerts(ctx context.Context, domain string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // SetSavedDomainExpiryAlertsWithBody request with any body + SetSavedDomainExpiryAlertsWithBody(ctx context.Context, domain string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + SetSavedDomainExpiryAlerts(ctx context.Context, domain string, body SetSavedDomainExpiryAlertsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListNameJobs request ListNameJobs(ctx context.Context, params *ListNameJobsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1109,6 +1184,42 @@ func (c *Client) RemoveSavedDomain(ctx context.Context, domain string, reqEditor return c.Client.Do(req) } +func (c *Client) GetSavedDomainExpiryAlerts(ctx context.Context, domain string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSavedDomainExpiryAlertsRequest(c.Server, domain) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SetSavedDomainExpiryAlertsWithBody(ctx context.Context, domain string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSetSavedDomainExpiryAlertsRequestWithBody(c.Server, domain, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SetSavedDomainExpiryAlerts(ctx context.Context, domain string, body SetSavedDomainExpiryAlertsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSetSavedDomainExpiryAlertsRequest(c.Server, domain, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListNameJobs(ctx context.Context, params *ListNameJobsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListNameJobsRequest(c.Server, params) if err != nil { @@ -2426,6 +2537,87 @@ func NewRemoveSavedDomainRequest(server string, domain string) (*http.Request, e return req, nil } +// NewGetSavedDomainExpiryAlertsRequest generates requests for GetSavedDomainExpiryAlerts +func NewGetSavedDomainExpiryAlertsRequest(server string, domain string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "domain", domain, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/domains/saved/%s/expiry-alerts", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewSetSavedDomainExpiryAlertsRequest calls the generic SetSavedDomainExpiryAlerts builder with application/json body +func NewSetSavedDomainExpiryAlertsRequest(server string, domain string, body SetSavedDomainExpiryAlertsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewSetSavedDomainExpiryAlertsRequestWithBody(server, domain, "application/json", bodyReader) +} + +// NewSetSavedDomainExpiryAlertsRequestWithBody generates requests for SetSavedDomainExpiryAlerts with any type of body +func NewSetSavedDomainExpiryAlertsRequestWithBody(server string, domain string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "domain", domain, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/domains/saved/%s/expiry-alerts", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodPut, queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewListNameJobsRequest generates requests for ListNameJobs func NewListNameJobsRequest(server string, params *ListNameJobsParams) (*http.Request, error) { var err error @@ -2896,6 +3088,14 @@ type ClientWithResponsesInterface interface { // RemoveSavedDomainWithResponse request RemoveSavedDomainWithResponse(ctx context.Context, domain string, reqEditors ...RequestEditorFn) (*RemoveSavedDomainResponse, error) + // GetSavedDomainExpiryAlertsWithResponse request + GetSavedDomainExpiryAlertsWithResponse(ctx context.Context, domain string, reqEditors ...RequestEditorFn) (*GetSavedDomainExpiryAlertsResponse, error) + + // SetSavedDomainExpiryAlertsWithBodyWithResponse request with any body + SetSavedDomainExpiryAlertsWithBodyWithResponse(ctx context.Context, domain string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetSavedDomainExpiryAlertsResponse, error) + + SetSavedDomainExpiryAlertsWithResponse(ctx context.Context, domain string, body SetSavedDomainExpiryAlertsJSONRequestBody, reqEditors ...RequestEditorFn) (*SetSavedDomainExpiryAlertsResponse, error) + // ListNameJobsWithResponse request ListNameJobsWithResponse(ctx context.Context, params *ListNameJobsParams, reqEditors ...RequestEditorFn) (*ListNameJobsResponse, error) @@ -3595,6 +3795,74 @@ func (r RemoveSavedDomainResponse) ContentType() string { return "" } +type GetSavedDomainExpiryAlertsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *DtoExpiryAlerts + JSON403 *ResponseAPIError + JSON404 *ResponseAPIError + JSON503 *ResponseAPIError +} + +// Status returns HTTPResponse.Status +func (r GetSavedDomainExpiryAlertsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetSavedDomainExpiryAlertsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetSavedDomainExpiryAlertsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type SetSavedDomainExpiryAlertsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *DtoExpiryAlerts + JSON400 *ResponseAPIError + JSON402 *ResponseAPIError + JSON403 *ResponseAPIError + JSON404 *ResponseAPIError + JSON503 *ResponseAPIError +} + +// Status returns HTTPResponse.Status +func (r SetSavedDomainExpiryAlertsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r SetSavedDomainExpiryAlertsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r SetSavedDomainExpiryAlertsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListNameJobsResponse struct { Body []byte HTTPResponse *http.Response @@ -4023,6 +4291,32 @@ func (c *ClientWithResponses) RemoveSavedDomainWithResponse(ctx context.Context, return ParseRemoveSavedDomainResponse(rsp) } +// GetSavedDomainExpiryAlertsWithResponse request returning *GetSavedDomainExpiryAlertsResponse +func (c *ClientWithResponses) GetSavedDomainExpiryAlertsWithResponse(ctx context.Context, domain string, reqEditors ...RequestEditorFn) (*GetSavedDomainExpiryAlertsResponse, error) { + rsp, err := c.GetSavedDomainExpiryAlerts(ctx, domain, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetSavedDomainExpiryAlertsResponse(rsp) +} + +// SetSavedDomainExpiryAlertsWithBodyWithResponse request with arbitrary body returning *SetSavedDomainExpiryAlertsResponse +func (c *ClientWithResponses) SetSavedDomainExpiryAlertsWithBodyWithResponse(ctx context.Context, domain string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetSavedDomainExpiryAlertsResponse, error) { + rsp, err := c.SetSavedDomainExpiryAlertsWithBody(ctx, domain, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSetSavedDomainExpiryAlertsResponse(rsp) +} + +func (c *ClientWithResponses) SetSavedDomainExpiryAlertsWithResponse(ctx context.Context, domain string, body SetSavedDomainExpiryAlertsJSONRequestBody, reqEditors ...RequestEditorFn) (*SetSavedDomainExpiryAlertsResponse, error) { + rsp, err := c.SetSavedDomainExpiryAlerts(ctx, domain, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSetSavedDomainExpiryAlertsResponse(rsp) +} + // ListNameJobsWithResponse request returning *ListNameJobsResponse func (c *ClientWithResponses) ListNameJobsWithResponse(ctx context.Context, params *ListNameJobsParams, reqEditors ...RequestEditorFn) (*ListNameJobsResponse, error) { rsp, err := c.ListNameJobs(ctx, params, reqEditors...) @@ -4883,6 +5177,114 @@ func ParseRemoveSavedDomainResponse(rsp *http.Response) (*RemoveSavedDomainRespo return response, nil } +// ParseGetSavedDomainExpiryAlertsResponse parses an HTTP response from a GetSavedDomainExpiryAlertsWithResponse call +func ParseGetSavedDomainExpiryAlertsResponse(rsp *http.Response) (*GetSavedDomainExpiryAlertsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetSavedDomainExpiryAlertsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest DtoExpiryAlerts + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest ResponseAPIError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest ResponseAPIError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: + var dest ResponseAPIError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON503 = &dest + + } + + return response, nil +} + +// ParseSetSavedDomainExpiryAlertsResponse parses an HTTP response from a SetSavedDomainExpiryAlertsWithResponse call +func ParseSetSavedDomainExpiryAlertsResponse(rsp *http.Response) (*SetSavedDomainExpiryAlertsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &SetSavedDomainExpiryAlertsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest DtoExpiryAlerts + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest ResponseAPIError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 402: + var dest ResponseAPIError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON402 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest ResponseAPIError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest ResponseAPIError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: + var dest ResponseAPIError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON503 = &dest + + } + + return response, nil +} + // ParseListNameJobsResponse parses an HTTP response from a ListNameJobsWithResponse call func ParseListNameJobsResponse(rsp *http.Response) (*ListNameJobsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/internal/api/monitor/monitor.gen.go b/internal/api/monitor/monitor.gen.go index 8a8f54d..2e1d553 100644 --- a/internal/api/monitor/monitor.gen.go +++ b/internal/api/monitor/monitor.gen.go @@ -85,12 +85,16 @@ const ( ErrorReasonCodeRecentlySent ConstantsErrorReason = "CODE_RECENTLY_SENT" ErrorReasonContactUnverified ConstantsErrorReason = "CONTACT_UNVERIFIED" ErrorReasonDeliveryRejected ConstantsErrorReason = "DELIVERY_REJECTED" + ErrorReasonDomainNotSet ConstantsErrorReason = "DOMAIN_NOT_SET" + ErrorReasonDomainTaken ConstantsErrorReason = "DOMAIN_TAKEN" + ErrorReasonDomainsDisabled ConstantsErrorReason = "DOMAINS_DISABLED" ErrorReasonIncidentResolved ConstantsErrorReason = "INCIDENT_RESOLVED" ErrorReasonInsufficientScope ConstantsErrorReason = "INSUFFICIENT_SCOPE" ErrorReasonMissingOrganizationID ConstantsErrorReason = "MISSING_ORGANIZATION_ID" ErrorReasonMonitorLimit ConstantsErrorReason = "MONITOR_LIMIT" ErrorReasonNothingToVerify ConstantsErrorReason = "NOTHING_TO_VERIFY" ErrorReasonSlugTaken ConstantsErrorReason = "SLUG_TAKEN" + ErrorReasonStatusPageDomainLimit ConstantsErrorReason = "STATUS_PAGE_DOMAIN_LIMIT" ErrorReasonStatusPageLimit ConstantsErrorReason = "STATUS_PAGE_LIMIT" ErrorReasonTooManyAttempts ConstantsErrorReason = "TOO_MANY_ATTEMPTS" ErrorReasonUnverifiedChannelLimit ConstantsErrorReason = "UNVERIFIED_CHANNEL_LIMIT" @@ -115,6 +119,12 @@ func (e ConstantsErrorReason) Valid() bool { return true case ErrorReasonDeliveryRejected: return true + case ErrorReasonDomainNotSet: + return true + case ErrorReasonDomainTaken: + return true + case ErrorReasonDomainsDisabled: + return true case ErrorReasonIncidentResolved: return true case ErrorReasonInsufficientScope: @@ -127,6 +137,8 @@ func (e ConstantsErrorReason) Valid() bool { return true case ErrorReasonSlugTaken: return true + case ErrorReasonStatusPageDomainLimit: + return true case ErrorReasonStatusPageLimit: return true case ErrorReasonTooManyAttempts: @@ -1440,6 +1452,66 @@ func (e DtoStatusPageComponentManualStatus) Valid() bool { } } +// Defines values for DtoStatusPageDomainErrorCode. +const ( + DOMAINTAKEN DtoStatusPageDomainErrorCode = "DOMAIN_TAKEN" +) + +// Valid indicates whether the value is a known member of the DtoStatusPageDomainErrorCode enum. +func (e DtoStatusPageDomainErrorCode) Valid() bool { + switch e { + case DOMAINTAKEN: + return true + default: + return false + } +} + +// Defines values for DtoStatusPageDomainStatus. +const ( + Active DtoStatusPageDomainStatus = "active" + Failed DtoStatusPageDomainStatus = "failed" + PendingCertificate DtoStatusPageDomainStatus = "pending_certificate" + PendingDns DtoStatusPageDomainStatus = "pending_dns" + PendingOwnership DtoStatusPageDomainStatus = "pending_ownership" +) + +// Valid indicates whether the value is a known member of the DtoStatusPageDomainStatus enum. +func (e DtoStatusPageDomainStatus) Valid() bool { + switch e { + case Active: + return true + case Failed: + return true + case PendingCertificate: + return true + case PendingDns: + return true + case PendingOwnership: + return true + default: + return false + } +} + +// Defines values for DtoStatusPageDomainRecordType. +const ( + CNAME DtoStatusPageDomainRecordType = "CNAME" + TXT DtoStatusPageDomainRecordType = "TXT" +) + +// Valid indicates whether the value is a known member of the DtoStatusPageDomainRecordType enum. +func (e DtoStatusPageDomainRecordType) Valid() bool { + switch e { + case CNAME: + return true + case TXT: + return true + default: + return false + } +} + // Defines values for DtoStatusPageIncidentImpact. const ( DtoStatusPageIncidentImpactCritical DtoStatusPageIncidentImpact = "critical" @@ -2978,15 +3050,30 @@ type DtoPublicStatusPage struct { Active []DtoPublicStatusIncident `json:"active"` // AsOf AsOf is when the content last changed. - AsOf *string `json:"asOf,omitempty"` - Components []DtoPublicStatusComponent `json:"components"` - Description string `json:"description"` - Groups []DtoPublicStatusGroup `json:"groups"` - Id openapi_types.UUID `json:"id"` + AsOf *string `json:"asOf,omitempty"` + + // CanonicalUrl CanonicalURL is the page's address on its active custom domain, where + // search engines should credit it. + CanonicalUrl *string `json:"canonicalUrl,omitempty"` + Components []DtoPublicStatusComponent `json:"components"` + Description string `json:"description"` + Groups []DtoPublicStatusGroup `json:"groups"` + Id openapi_types.UUID `json:"id"` // Indicator Indicator is the page's one-word verdict. Indicator DtoPublicStatusPageIndicator `json:"indicator"` - Name string `json:"name"` + + // Logo Logo and LogoDark hold the images as data URIs where there is no public + // file: a draft's snapshot, and the dashboard's preview. + Logo *string `json:"logo,omitempty"` + LogoDark *string `json:"logoDark,omitempty"` + LogoDarkFile *string `json:"logoDarkFile,omitempty"` + + // LogoFile LogoFile and LogoDarkFile name a published page's logo images, each a file + // the renderer serves at /logo/: a hash of the content and an + // extension. Left out when it has none; LogoDarkFile is for dark mode. + LogoFile *string `json:"logoFile,omitempty"` + Name string `json:"name"` // Published Published false: only preview links show it. Published bool `json:"published"` @@ -3098,10 +3185,14 @@ type DtoStatusChangeTo string // DtoStatusPage defines model for dto.StatusPage. type DtoStatusPage struct { - CreatedAt string `json:"createdAt"` - Description string `json:"description"` - Id openapi_types.UUID `json:"id"` - Name string `json:"name"` + CreatedAt string `json:"createdAt"` + + // CustomDomain CustomDomain is the page's custom domain once active. URL keeps working + // beside it; GET /status-pages/{id}/domain tells about one still pending. + CustomDomain *string `json:"customDomain,omitempty"` + Description string `json:"description"` + Id openapi_types.UUID `json:"id"` + Name string `json:"name"` // Published Published pages are public; others answer 404. Published bool `json:"published"` @@ -3160,6 +3251,62 @@ type DtoStatusPageCreate struct { Slug string `json:"slug"` } +// DtoStatusPageDomain defines model for dto.StatusPageDomain. +type DtoStatusPageDomain struct { + CreatedAt string `json:"createdAt"` + + // Error Error is what is wrong, while there is something. + Error *string `json:"error,omitempty"` + + // ErrorCode ErrorCode: DOMAIN_TAKEN when another status page proved this hostname first. + // The claim stays pending, in case they let it go. + ErrorCode *DtoStatusPageDomainErrorCode `json:"errorCode,omitempty"` + Hostname string `json:"hostname"` + LastCheckedAt *string `json:"lastCheckedAt,omitempty"` + + // Records Records are what the customer adds to their DNS. + Records []DtoStatusPageDomainRecord `json:"records"` + + // Status Status: pending_ownership until the TXT record proves the organization owns + // the hostname; pending_dns until Cloudflare sees the CNAME; + // pending_certificate until the certificate is live; then active. failed + // means given up: set the domain again to start over. + Status DtoStatusPageDomainStatus `json:"status"` + UpdatedAt string `json:"updatedAt"` +} + +// DtoStatusPageDomainErrorCode ErrorCode: DOMAIN_TAKEN when another status page proved this hostname first. +// The claim stays pending, in case they let it go. +type DtoStatusPageDomainErrorCode string + +// DtoStatusPageDomainStatus Status: pending_ownership until the TXT record proves the organization owns +// the hostname; pending_dns until Cloudflare sees the CNAME; +// pending_certificate until the certificate is live; then active. failed +// means given up: set the domain again to start over. +type DtoStatusPageDomainStatus string + +// DtoStatusPageDomainRecord defines model for dto.StatusPageDomainRecord. +type DtoStatusPageDomainRecord struct { + Name string `json:"name"` + + // Required Required false: not needed now. The ownership TXT record stops being + // required once the domain is active (it is needed again if the domain ever + // falls back to pending), and Cloudflare's own TXT record only helps verify the + // hostname before moving the CNAME. + Required bool `json:"required"` + Type DtoStatusPageDomainRecordType `json:"type"` + Value string `json:"value"` +} + +// DtoStatusPageDomainRecordType defines model for DtoStatusPageDomainRecord.Type. +type DtoStatusPageDomainRecordType string + +// DtoStatusPageDomainSet defines model for dto.StatusPageDomainSet. +type DtoStatusPageDomainSet struct { + // Hostname Hostname is a subdomain the customer controls, not an apex. + Hostname string `json:"hostname"` +} + // DtoStatusPageGroup defines model for dto.StatusPageGroup. type DtoStatusPageGroup struct { Collapsed *bool `json:"collapsed,omitempty"` @@ -3255,6 +3402,21 @@ type DtoStatusPageLayout struct { Groups []DtoStatusPageGroup `json:"groups"` } +// DtoStatusPageLogo defines model for dto.StatusPageLogo. +type DtoStatusPageLogo struct { + Dark *string `json:"dark,omitempty"` + Light *string `json:"light,omitempty"` +} + +// DtoStatusPageLogoSet defines model for dto.StatusPageLogoSet. +type DtoStatusPageLogoSet struct { + // Dark Dark is the image for dark mode, in the same form. + Dark *string `json:"dark,omitempty"` + + // Light Light is the image, base64 encoded: PNG, JPEG, WebP or SVG, at most 48 KB. + Light string `json:"light"` +} + // DtoStatusPagePreviewLink defines model for dto.StatusPagePreviewLink. type DtoStatusPagePreviewLink struct { ExpiresAt string `json:"expiresAt"` @@ -3584,6 +3746,9 @@ type CreateStatusPageJSONRequestBody = DtoStatusPageCreate // UpdateStatusPageJSONRequestBody defines body for UpdateStatusPage for application/json ContentType. type UpdateStatusPageJSONRequestBody = DtoStatusPageUpdate +// SetStatusPageDomainJSONRequestBody defines body for SetStatusPageDomain for application/json ContentType. +type SetStatusPageDomainJSONRequestBody = DtoStatusPageDomainSet + // CreateStatusPageIncidentJSONRequestBody defines body for CreateStatusPageIncident for application/json ContentType. type CreateStatusPageIncidentJSONRequestBody = DtoStatusPageIncidentCreate @@ -3596,6 +3761,9 @@ type CreateStatusPageIncidentUpdateJSONRequestBody = DtoStatusPageIncidentPost // SetStatusPageLayoutJSONRequestBody defines body for SetStatusPageLayout for application/json ContentType. type SetStatusPageLayoutJSONRequestBody = DtoStatusPageLayout +// SetStatusPageLogoJSONRequestBody defines body for SetStatusPageLogo for application/json ContentType. +type SetStatusPageLogoJSONRequestBody = DtoStatusPageLogoSet + // RequestEditorFn is the function signature for the RequestEditor callback function type RequestEditorFn func(ctx context.Context, req *http.Request) error @@ -3789,6 +3957,17 @@ type ClientInterface interface { UpdateStatusPage(ctx context.Context, id openapi_types.UUID, body UpdateStatusPageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteStatusPageDomain request + DeleteStatusPageDomain(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetStatusPageDomain request + GetStatusPageDomain(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) + + // SetStatusPageDomainWithBody request with any body + SetStatusPageDomainWithBody(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + SetStatusPageDomain(ctx context.Context, id openapi_types.UUID, body SetStatusPageDomainJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListStatusPageIncidents request ListStatusPageIncidents(ctx context.Context, id openapi_types.UUID, params *ListStatusPageIncidentsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -3818,6 +3997,17 @@ type ClientInterface interface { SetStatusPageLayout(ctx context.Context, id openapi_types.UUID, body SetStatusPageLayoutJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteStatusPageLogo request + DeleteStatusPageLogo(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetStatusPageLogo request + GetStatusPageLogo(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) + + // SetStatusPageLogoWithBody request with any body + SetStatusPageLogoWithBody(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + SetStatusPageLogo(ctx context.Context, id openapi_types.UUID, body SetStatusPageLogoJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // PreviewStatusPage request PreviewStatusPage(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -4347,6 +4537,54 @@ func (c *Client) UpdateStatusPage(ctx context.Context, id openapi_types.UUID, bo return c.Client.Do(req) } +func (c *Client) DeleteStatusPageDomain(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteStatusPageDomainRequest(c.Server, id) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetStatusPageDomain(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetStatusPageDomainRequest(c.Server, id) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SetStatusPageDomainWithBody(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSetStatusPageDomainRequestWithBody(c.Server, id, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SetStatusPageDomain(ctx context.Context, id openapi_types.UUID, body SetStatusPageDomainJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSetStatusPageDomainRequest(c.Server, id, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) ListStatusPageIncidents(ctx context.Context, id openapi_types.UUID, params *ListStatusPageIncidentsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewListStatusPageIncidentsRequest(c.Server, id, params) if err != nil { @@ -4479,6 +4717,54 @@ func (c *Client) SetStatusPageLayout(ctx context.Context, id openapi_types.UUID, return c.Client.Do(req) } +func (c *Client) DeleteStatusPageLogo(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteStatusPageLogoRequest(c.Server, id) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetStatusPageLogo(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetStatusPageLogoRequest(c.Server, id) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SetStatusPageLogoWithBody(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSetStatusPageLogoRequestWithBody(c.Server, id, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) SetStatusPageLogo(ctx context.Context, id openapi_types.UUID, body SetStatusPageLogoJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSetStatusPageLogoRequest(c.Server, id, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) PreviewStatusPage(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewPreviewStatusPageRequest(c.Server, id) if err != nil { @@ -6264,8 +6550,8 @@ func NewUpdateStatusPageRequestWithBody(server string, id openapi_types.UUID, co return req, nil } -// NewListStatusPageIncidentsRequest generates requests for ListStatusPageIncidents -func NewListStatusPageIncidentsRequest(server string, id openapi_types.UUID, params *ListStatusPageIncidentsParams) (*http.Request, error) { +// NewDeleteStatusPageDomainRequest generates requests for DeleteStatusPageDomain +func NewDeleteStatusPageDomainRequest(server string, id openapi_types.UUID) (*http.Request, error) { var err error var pathParam0 string @@ -6280,7 +6566,7 @@ func NewListStatusPageIncidentsRequest(server string, id openapi_types.UUID, par return nil, err } - operationPath := fmt.Sprintf("/status-pages/%s/incidents", pathParam0) + operationPath := fmt.Sprintf("/status-pages/%s/domain", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6290,55 +6576,38 @@ func NewListStatusPageIncidentsRequest(server string, id openapi_types.UUID, par return nil, err } - if params != nil { - // queryValues collects non-styled parameters (passthrough, JSON) - // that are safe to round-trip through url.Values.Encode(). - queryValues := queryURL.Query() - // rawQueryFragments collects pre-encoded query fragments from - // styled parameters, preserving literal commas as delimiters - // per the OpenAPI spec (e.g. "color=blue,black,brown"). - var rawQueryFragments []string - - if params.Cursor != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "cursor", *params.Cursor, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } - - } + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) + if err != nil { + return nil, err + } - if params.Limit != nil { + return req, nil +} - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } +// NewGetStatusPageDomainRequest generates requests for GetStatusPageDomain +func NewGetStatusPageDomainRequest(server string, id openapi_types.UUID) (*http.Request, error) { + var err error - } + var pathParam0 string - if params.Status != nil { + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) + if err != nil { + return nil, err + } - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "status", *params.Status, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - } + operationPath := fmt.Sprintf("/status-pages/%s/domain", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - if encoded := queryValues.Encode(); encoded != "" { - rawQueryFragments = append(rawQueryFragments, encoded) - } - queryURL.RawQuery = strings.Join(rawQueryFragments, "&") + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) @@ -6349,19 +6618,19 @@ func NewListStatusPageIncidentsRequest(server string, id openapi_types.UUID, par return req, nil } -// NewCreateStatusPageIncidentRequest calls the generic CreateStatusPageIncident builder with application/json body -func NewCreateStatusPageIncidentRequest(server string, id openapi_types.UUID, body CreateStatusPageIncidentJSONRequestBody) (*http.Request, error) { +// NewSetStatusPageDomainRequest calls the generic SetStatusPageDomain builder with application/json body +func NewSetStatusPageDomainRequest(server string, id openapi_types.UUID, body SetStatusPageDomainJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateStatusPageIncidentRequestWithBody(server, id, "application/json", bodyReader) + return NewSetStatusPageDomainRequestWithBody(server, id, "application/json", bodyReader) } -// NewCreateStatusPageIncidentRequestWithBody generates requests for CreateStatusPageIncident with any type of body -func NewCreateStatusPageIncidentRequestWithBody(server string, id openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error) { +// NewSetStatusPageDomainRequestWithBody generates requests for SetStatusPageDomain with any type of body +func NewSetStatusPageDomainRequestWithBody(server string, id openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -6376,7 +6645,7 @@ func NewCreateStatusPageIncidentRequestWithBody(server string, id openapi_types. return nil, err } - operationPath := fmt.Sprintf("/status-pages/%s/incidents", pathParam0) + operationPath := fmt.Sprintf("/status-pages/%s/domain", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6386,7 +6655,7 @@ func NewCreateStatusPageIncidentRequestWithBody(server string, id openapi_types. return nil, err } - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) + req, err := http.NewRequest(http.MethodPut, queryURL.String(), body) if err != nil { return nil, err } @@ -6396,8 +6665,8 @@ func NewCreateStatusPageIncidentRequestWithBody(server string, id openapi_types. return req, nil } -// NewGetStatusPageIncidentRequest generates requests for GetStatusPageIncident -func NewGetStatusPageIncidentRequest(server string, id openapi_types.UUID, incidentId openapi_types.UUID) (*http.Request, error) { +// NewListStatusPageIncidentsRequest generates requests for ListStatusPageIncidents +func NewListStatusPageIncidentsRequest(server string, id openapi_types.UUID, params *ListStatusPageIncidentsParams) (*http.Request, error) { var err error var pathParam0 string @@ -6407,19 +6676,12 @@ func NewGetStatusPageIncidentRequest(server string, id openapi_types.UUID, incid return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithOptions("simple", false, "incidentId", incidentId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/status-pages/%s/incidents/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/status-pages/%s/incidents", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6429,17 +6691,156 @@ func NewGetStatusPageIncidentRequest(server string, id openapi_types.UUID, incid return nil, err } - req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewUpdateStatusPageIncidentRequest calls the generic UpdateStatusPageIncident builder with application/json body -func NewUpdateStatusPageIncidentRequest(server string, id openapi_types.UUID, incidentId openapi_types.UUID, body UpdateStatusPageIncidentJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader + if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). + queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string + + if params.Cursor != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "cursor", *params.Cursor, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.Status != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "status", *params.Status, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateStatusPageIncidentRequest calls the generic CreateStatusPageIncident builder with application/json body +func NewCreateStatusPageIncidentRequest(server string, id openapi_types.UUID, body CreateStatusPageIncidentJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateStatusPageIncidentRequestWithBody(server, id, "application/json", bodyReader) +} + +// NewCreateStatusPageIncidentRequestWithBody generates requests for CreateStatusPageIncident with any type of body +func NewCreateStatusPageIncidentRequestWithBody(server string, id openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/status-pages/%s/incidents", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetStatusPageIncidentRequest generates requests for GetStatusPageIncident +func NewGetStatusPageIncidentRequest(server string, id openapi_types.UUID, incidentId openapi_types.UUID) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "incidentId", incidentId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/status-pages/%s/incidents/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUpdateStatusPageIncidentRequest calls the generic UpdateStatusPageIncident builder with application/json body +func NewUpdateStatusPageIncidentRequest(server string, id openapi_types.UUID, incidentId openapi_types.UUID, body UpdateStatusPageIncidentJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err @@ -6626,6 +7027,121 @@ func NewSetStatusPageLayoutRequestWithBody(server string, id openapi_types.UUID, return req, nil } +// NewDeleteStatusPageLogoRequest generates requests for DeleteStatusPageLogo +func NewDeleteStatusPageLogoRequest(server string, id openapi_types.UUID) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/status-pages/%s/logo", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetStatusPageLogoRequest generates requests for GetStatusPageLogo +func NewGetStatusPageLogoRequest(server string, id openapi_types.UUID) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/status-pages/%s/logo", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewSetStatusPageLogoRequest calls the generic SetStatusPageLogo builder with application/json body +func NewSetStatusPageLogoRequest(server string, id openapi_types.UUID, body SetStatusPageLogoJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewSetStatusPageLogoRequestWithBody(server, id, "application/json", bodyReader) +} + +// NewSetStatusPageLogoRequestWithBody generates requests for SetStatusPageLogo with any type of body +func NewSetStatusPageLogoRequestWithBody(server string, id openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/status-pages/%s/logo", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodPut, queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewPreviewStatusPageRequest generates requests for PreviewStatusPage func NewPreviewStatusPageRequest(server string, id openapi_types.UUID) (*http.Request, error) { var err error @@ -6925,10 +7441,21 @@ type ClientWithResponsesInterface interface { UpdateStatusPageWithResponse(ctx context.Context, id openapi_types.UUID, body UpdateStatusPageJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateStatusPageResponse, error) - // ListStatusPageIncidentsWithResponse request - ListStatusPageIncidentsWithResponse(ctx context.Context, id openapi_types.UUID, params *ListStatusPageIncidentsParams, reqEditors ...RequestEditorFn) (*ListStatusPageIncidentsResponse, error) + // DeleteStatusPageDomainWithResponse request + DeleteStatusPageDomainWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*DeleteStatusPageDomainResponse, error) - // CreateStatusPageIncidentWithBodyWithResponse request with any body + // GetStatusPageDomainWithResponse request + GetStatusPageDomainWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetStatusPageDomainResponse, error) + + // SetStatusPageDomainWithBodyWithResponse request with any body + SetStatusPageDomainWithBodyWithResponse(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetStatusPageDomainResponse, error) + + SetStatusPageDomainWithResponse(ctx context.Context, id openapi_types.UUID, body SetStatusPageDomainJSONRequestBody, reqEditors ...RequestEditorFn) (*SetStatusPageDomainResponse, error) + + // ListStatusPageIncidentsWithResponse request + ListStatusPageIncidentsWithResponse(ctx context.Context, id openapi_types.UUID, params *ListStatusPageIncidentsParams, reqEditors ...RequestEditorFn) (*ListStatusPageIncidentsResponse, error) + + // CreateStatusPageIncidentWithBodyWithResponse request with any body CreateStatusPageIncidentWithBodyWithResponse(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateStatusPageIncidentResponse, error) CreateStatusPageIncidentWithResponse(ctx context.Context, id openapi_types.UUID, body CreateStatusPageIncidentJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateStatusPageIncidentResponse, error) @@ -6954,6 +7481,17 @@ type ClientWithResponsesInterface interface { SetStatusPageLayoutWithResponse(ctx context.Context, id openapi_types.UUID, body SetStatusPageLayoutJSONRequestBody, reqEditors ...RequestEditorFn) (*SetStatusPageLayoutResponse, error) + // DeleteStatusPageLogoWithResponse request + DeleteStatusPageLogoWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*DeleteStatusPageLogoResponse, error) + + // GetStatusPageLogoWithResponse request + GetStatusPageLogoWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetStatusPageLogoResponse, error) + + // SetStatusPageLogoWithBodyWithResponse request with any body + SetStatusPageLogoWithBodyWithResponse(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetStatusPageLogoResponse, error) + + SetStatusPageLogoWithResponse(ctx context.Context, id openapi_types.UUID, body SetStatusPageLogoJSONRequestBody, reqEditors ...RequestEditorFn) (*SetStatusPageLogoResponse, error) + // PreviewStatusPageWithResponse request PreviewStatusPageWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*PreviewStatusPageResponse, error) @@ -8140,6 +8678,108 @@ func (r UpdateStatusPageResponse) ContentType() string { return "" } +type DeleteStatusPageDomainResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *ResponseProblem + JSON403 *ResponseProblem + JSON404 *ResponseProblem +} + +// Status returns HTTPResponse.Status +func (r DeleteStatusPageDomainResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteStatusPageDomainResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteStatusPageDomainResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type GetStatusPageDomainResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *DtoStatusPageDomain + JSON401 *ResponseProblem + JSON403 *ResponseProblem + JSON404 *ResponseProblem +} + +// Status returns HTTPResponse.Status +func (r GetStatusPageDomainResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetStatusPageDomainResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetStatusPageDomainResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type SetStatusPageDomainResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *DtoStatusPageDomain + JSON400 *ResponseProblem + JSON401 *ResponseProblem + JSON402 *ResponseProblem + JSON403 *ResponseProblem + JSON404 *ResponseProblem + JSON409 *ResponseProblem + JSON503 *ResponseProblem +} + +// Status returns HTTPResponse.Status +func (r SetStatusPageDomainResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r SetStatusPageDomainResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r SetStatusPageDomainResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListStatusPageIncidentsResponse struct { Body []byte HTTPResponse *http.Response @@ -8381,6 +9021,105 @@ func (r SetStatusPageLayoutResponse) ContentType() string { return "" } +type DeleteStatusPageLogoResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *ResponseProblem + JSON403 *ResponseProblem + JSON404 *ResponseProblem +} + +// Status returns HTTPResponse.Status +func (r DeleteStatusPageLogoResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteStatusPageLogoResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteStatusPageLogoResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type GetStatusPageLogoResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *DtoStatusPageLogo + JSON401 *ResponseProblem + JSON403 *ResponseProblem + JSON404 *ResponseProblem +} + +// Status returns HTTPResponse.Status +func (r GetStatusPageLogoResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetStatusPageLogoResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetStatusPageLogoResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type SetStatusPageLogoResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *DtoStatusPageLogo + JSON400 *ResponseProblem + JSON401 *ResponseProblem + JSON403 *ResponseProblem + JSON404 *ResponseProblem +} + +// Status returns HTTPResponse.Status +func (r SetStatusPageLogoResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r SetStatusPageLogoResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r SetStatusPageLogoResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type PreviewStatusPageResponse struct { Body []byte HTTPResponse *http.Response @@ -8893,6 +9632,41 @@ func (c *ClientWithResponses) UpdateStatusPageWithResponse(ctx context.Context, return ParseUpdateStatusPageResponse(rsp) } +// DeleteStatusPageDomainWithResponse request returning *DeleteStatusPageDomainResponse +func (c *ClientWithResponses) DeleteStatusPageDomainWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*DeleteStatusPageDomainResponse, error) { + rsp, err := c.DeleteStatusPageDomain(ctx, id, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteStatusPageDomainResponse(rsp) +} + +// GetStatusPageDomainWithResponse request returning *GetStatusPageDomainResponse +func (c *ClientWithResponses) GetStatusPageDomainWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetStatusPageDomainResponse, error) { + rsp, err := c.GetStatusPageDomain(ctx, id, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetStatusPageDomainResponse(rsp) +} + +// SetStatusPageDomainWithBodyWithResponse request with arbitrary body returning *SetStatusPageDomainResponse +func (c *ClientWithResponses) SetStatusPageDomainWithBodyWithResponse(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetStatusPageDomainResponse, error) { + rsp, err := c.SetStatusPageDomainWithBody(ctx, id, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSetStatusPageDomainResponse(rsp) +} + +func (c *ClientWithResponses) SetStatusPageDomainWithResponse(ctx context.Context, id openapi_types.UUID, body SetStatusPageDomainJSONRequestBody, reqEditors ...RequestEditorFn) (*SetStatusPageDomainResponse, error) { + rsp, err := c.SetStatusPageDomain(ctx, id, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSetStatusPageDomainResponse(rsp) +} + // ListStatusPageIncidentsWithResponse request returning *ListStatusPageIncidentsResponse func (c *ClientWithResponses) ListStatusPageIncidentsWithResponse(ctx context.Context, id openapi_types.UUID, params *ListStatusPageIncidentsParams, reqEditors ...RequestEditorFn) (*ListStatusPageIncidentsResponse, error) { rsp, err := c.ListStatusPageIncidents(ctx, id, params, reqEditors...) @@ -8988,6 +9762,41 @@ func (c *ClientWithResponses) SetStatusPageLayoutWithResponse(ctx context.Contex return ParseSetStatusPageLayoutResponse(rsp) } +// DeleteStatusPageLogoWithResponse request returning *DeleteStatusPageLogoResponse +func (c *ClientWithResponses) DeleteStatusPageLogoWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*DeleteStatusPageLogoResponse, error) { + rsp, err := c.DeleteStatusPageLogo(ctx, id, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteStatusPageLogoResponse(rsp) +} + +// GetStatusPageLogoWithResponse request returning *GetStatusPageLogoResponse +func (c *ClientWithResponses) GetStatusPageLogoWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetStatusPageLogoResponse, error) { + rsp, err := c.GetStatusPageLogo(ctx, id, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetStatusPageLogoResponse(rsp) +} + +// SetStatusPageLogoWithBodyWithResponse request with arbitrary body returning *SetStatusPageLogoResponse +func (c *ClientWithResponses) SetStatusPageLogoWithBodyWithResponse(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetStatusPageLogoResponse, error) { + rsp, err := c.SetStatusPageLogoWithBody(ctx, id, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSetStatusPageLogoResponse(rsp) +} + +func (c *ClientWithResponses) SetStatusPageLogoWithResponse(ctx context.Context, id openapi_types.UUID, body SetStatusPageLogoJSONRequestBody, reqEditors ...RequestEditorFn) (*SetStatusPageLogoResponse, error) { + rsp, err := c.SetStatusPageLogo(ctx, id, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSetStatusPageLogoResponse(rsp) +} + // PreviewStatusPageWithResponse request returning *PreviewStatusPageResponse func (c *ClientWithResponses) PreviewStatusPageWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*PreviewStatusPageResponse, error) { rsp, err := c.PreviewStatusPage(ctx, id, reqEditors...) @@ -9621,7 +10430,375 @@ func ParseGetIncidentResponse(rsp *http.Response) (*GetIncidentResponse, error) if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + } + + return response, nil +} + +// ParseAcknowledgeIncidentResponse parses an HTTP response from a AcknowledgeIncidentWithResponse call +func ParseAcknowledgeIncidentResponse(rsp *http.Response) (*AcknowledgeIncidentResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &AcknowledgeIncidentResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest DtoIncidentDetail + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + } + + return response, nil +} + +// ParseListMonitorsResponse parses an HTTP response from a ListMonitorsWithResponse call +func ParseListMonitorsResponse(rsp *http.Response) (*ListMonitorsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListMonitorsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Cursors ResponseAPIResponsePaginationCursors `json:"cursors"` + List []DtoMonitor `json:"list"` + Meta ResponseAPIResponsePaginationMeta `json:"meta"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + } + + return response, nil +} + +// ParseCreateMonitorResponse parses an HTTP response from a CreateMonitorWithResponse call +func ParseCreateMonitorResponse(rsp *http.Response) (*CreateMonitorResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateMonitorResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest DtoMonitor + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 402: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON402 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON503 = &dest + + } + + return response, nil +} + +// ParseApplyMonitorBulkActionResponse parses an HTTP response from a ApplyMonitorBulkActionWithResponse call +func ParseApplyMonitorBulkActionResponse(rsp *http.Response) (*ApplyMonitorBulkActionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ApplyMonitorBulkActionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest DtoMonitorBulkResult + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON503 = &dest + + } + + return response, nil +} + +// ParseDeleteMonitorResponse parses an HTTP response from a DeleteMonitorWithResponse call +func ParseDeleteMonitorResponse(rsp *http.Response) (*DeleteMonitorResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteMonitorResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON409 = &dest + + } + + return response, nil +} + +// ParseGetMonitorResponse parses an HTTP response from a GetMonitorWithResponse call +func ParseGetMonitorResponse(rsp *http.Response) (*GetMonitorResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetMonitorResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest DtoMonitor + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + } + + return response, nil +} + +// ParseUpdateMonitorResponse parses an HTTP response from a UpdateMonitorWithResponse call +func ParseUpdateMonitorResponse(rsp *http.Response) (*UpdateMonitorResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateMonitorResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest DtoMonitor + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest ResponseProblem @@ -9644,27 +10821,34 @@ func ParseGetIncidentResponse(rsp *http.Response) (*GetIncidentResponse, error) } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON503 = &dest + } return response, nil } -// ParseAcknowledgeIncidentResponse parses an HTTP response from a AcknowledgeIncidentWithResponse call -func ParseAcknowledgeIncidentResponse(rsp *http.Response) (*AcknowledgeIncidentResponse, error) { +// ParseGetMonitorAlertsResponse parses an HTTP response from a GetMonitorAlertsWithResponse call +func ParseGetMonitorAlertsResponse(rsp *http.Response) (*GetMonitorAlertsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &AcknowledgeIncidentResponse{ + response := &GetMonitorAlertsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest DtoIncidentDetail + var dest DtoMonitorAlerts if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -9696,26 +10880,22 @@ func ParseAcknowledgeIncidentResponse(rsp *http.Response) (*AcknowledgeIncidentR return response, nil } -// ParseListMonitorsResponse parses an HTTP response from a ListMonitorsWithResponse call -func ParseListMonitorsResponse(rsp *http.Response) (*ListMonitorsResponse, error) { +// ParseSetMonitorAlertsResponse parses an HTTP response from a SetMonitorAlertsWithResponse call +func ParseSetMonitorAlertsResponse(rsp *http.Response) (*SetMonitorAlertsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListMonitorsResponse{ + response := &SetMonitorAlertsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Cursors ResponseAPIResponsePaginationCursors `json:"cursors"` - List []DtoMonitor `json:"list"` - Meta ResponseAPIResponsePaginationMeta `json:"meta"` - } + var dest DtoMonitorAlerts if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -9742,31 +10922,38 @@ func ParseListMonitorsResponse(rsp *http.Response) (*ListMonitorsResponse, error } response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + } return response, nil } -// ParseCreateMonitorResponse parses an HTTP response from a CreateMonitorWithResponse call -func ParseCreateMonitorResponse(rsp *http.Response) (*CreateMonitorResponse, error) { +// ParseGetMonitorAvailabilityResponse parses an HTTP response from a GetMonitorAvailabilityWithResponse call +func ParseGetMonitorAvailabilityResponse(rsp *http.Response) (*GetMonitorAvailabilityResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateMonitorResponse{ + response := &GetMonitorAvailabilityResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest DtoMonitor + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest DtoAvailability if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest ResponseProblem @@ -9782,13 +10969,6 @@ func ParseCreateMonitorResponse(rsp *http.Response) (*CreateMonitorResponse, err } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 402: - var dest ResponseProblem - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON402 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest ResponseProblem if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -9796,46 +10976,39 @@ func ParseCreateMonitorResponse(rsp *http.Response) (*CreateMonitorResponse, err } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest ResponseProblem if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON503 = &dest + response.JSON404 = &dest } return response, nil } -// ParseApplyMonitorBulkActionResponse parses an HTTP response from a ApplyMonitorBulkActionWithResponse call -func ParseApplyMonitorBulkActionResponse(rsp *http.Response) (*ApplyMonitorBulkActionResponse, error) { +// ParseGetMonitorCertificateResponse parses an HTTP response from a GetMonitorCertificateWithResponse call +func ParseGetMonitorCertificateResponse(rsp *http.Response) (*GetMonitorCertificateResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ApplyMonitorBulkActionResponse{ + response := &GetMonitorCertificateResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest DtoMonitorBulkResult + var dest DtoMonitorCertificate if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest ResponseProblem - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest ResponseProblem if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -9850,39 +11023,39 @@ func ParseApplyMonitorBulkActionResponse(rsp *http.Response) (*ApplyMonitorBulkA } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest ResponseProblem - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest ResponseProblem if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON503 = &dest + response.JSON404 = &dest } return response, nil } -// ParseDeleteMonitorResponse parses an HTTP response from a DeleteMonitorWithResponse call -func ParseDeleteMonitorResponse(rsp *http.Response) (*DeleteMonitorResponse, error) { +// ParseRunMonitorCheckResponse parses an HTTP response from a RunMonitorCheckWithResponse call +func ParseRunMonitorCheckResponse(rsp *http.Response) (*RunMonitorCheckResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteMonitorResponse{ + response := &RunMonitorCheckResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest DtoCheckResult + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest ResponseProblem if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -9890,6 +11063,13 @@ func ParseDeleteMonitorResponse(rsp *http.Response) (*DeleteMonitorResponse, err } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 402: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON402 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest ResponseProblem if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -9904,27 +11084,27 @@ func ParseDeleteMonitorResponse(rsp *http.Response) (*DeleteMonitorResponse, err } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: var dest ResponseProblem if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON409 = &dest + response.JSON429 = &dest } return response, nil } -// ParseGetMonitorResponse parses an HTTP response from a GetMonitorWithResponse call -func ParseGetMonitorResponse(rsp *http.Response) (*GetMonitorResponse, error) { +// ParsePauseMonitorResponse parses an HTTP response from a PauseMonitorWithResponse call +func ParsePauseMonitorResponse(rsp *http.Response) (*PauseMonitorResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetMonitorResponse{ + response := &PauseMonitorResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -9963,22 +11143,26 @@ func ParseGetMonitorResponse(rsp *http.Response) (*GetMonitorResponse, error) { return response, nil } -// ParseUpdateMonitorResponse parses an HTTP response from a UpdateMonitorWithResponse call -func ParseUpdateMonitorResponse(rsp *http.Response) (*UpdateMonitorResponse, error) { +// ParseListMonitorResultsResponse parses an HTTP response from a ListMonitorResultsWithResponse call +func ParseListMonitorResultsResponse(rsp *http.Response) (*ListMonitorResultsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateMonitorResponse{ + response := &ListMonitorResultsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest DtoMonitor + var dest struct { + Cursors ResponseAPIResponsePaginationCursors `json:"cursors"` + List []DtoCheckResult `json:"list"` + Meta ResponseAPIResponsePaginationMeta `json:"meta"` + } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -10012,34 +11196,27 @@ func ParseUpdateMonitorResponse(rsp *http.Response) (*UpdateMonitorResponse, err } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: - var dest ResponseProblem - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON503 = &dest - } return response, nil } -// ParseGetMonitorAlertsResponse parses an HTTP response from a GetMonitorAlertsWithResponse call -func ParseGetMonitorAlertsResponse(rsp *http.Response) (*GetMonitorAlertsResponse, error) { +// ParseResumeMonitorResponse parses an HTTP response from a ResumeMonitorWithResponse call +func ParseResumeMonitorResponse(rsp *http.Response) (*ResumeMonitorResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetMonitorAlertsResponse{ + response := &ResumeMonitorResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest DtoMonitorAlerts + var dest DtoMonitor if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -10071,22 +11248,22 @@ func ParseGetMonitorAlertsResponse(rsp *http.Response) (*GetMonitorAlertsRespons return response, nil } -// ParseSetMonitorAlertsResponse parses an HTTP response from a SetMonitorAlertsWithResponse call -func ParseSetMonitorAlertsResponse(rsp *http.Response) (*SetMonitorAlertsResponse, error) { +// ParseGetMonitorStatsResponse parses an HTTP response from a GetMonitorStatsWithResponse call +func ParseGetMonitorStatsResponse(rsp *http.Response) (*GetMonitorStatsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &SetMonitorAlertsResponse{ + response := &GetMonitorStatsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest DtoMonitorAlerts + var dest DtoMonitorStats if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -10125,22 +11302,26 @@ func ParseSetMonitorAlertsResponse(rsp *http.Response) (*SetMonitorAlertsRespons return response, nil } -// ParseGetMonitorAvailabilityResponse parses an HTTP response from a GetMonitorAvailabilityWithResponse call -func ParseGetMonitorAvailabilityResponse(rsp *http.Response) (*GetMonitorAvailabilityResponse, error) { +// ParseListMonitorStatusChangesResponse parses an HTTP response from a ListMonitorStatusChangesWithResponse call +func ParseListMonitorStatusChangesResponse(rsp *http.Response) (*ListMonitorStatusChangesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetMonitorAvailabilityResponse{ + response := &ListMonitorStatusChangesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest DtoAvailability + var dest struct { + Cursors ResponseAPIResponsePaginationCursors `json:"cursors"` + List []DtoStatusChange `json:"list"` + Meta ResponseAPIResponsePaginationMeta `json:"meta"` + } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -10179,141 +11360,98 @@ func ParseGetMonitorAvailabilityResponse(rsp *http.Response) (*GetMonitorAvailab return response, nil } -// ParseGetMonitorCertificateResponse parses an HTTP response from a GetMonitorCertificateWithResponse call -func ParseGetMonitorCertificateResponse(rsp *http.Response) (*GetMonitorCertificateResponse, error) { +// ParseListStatusPagesResponse parses an HTTP response from a ListStatusPagesWithResponse call +func ParseListStatusPagesResponse(rsp *http.Response) (*ListStatusPagesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetMonitorCertificateResponse{ + response := &ListStatusPagesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest DtoMonitorCertificate + var dest struct { + Cursors ResponseAPIResponsePaginationCursors `json:"cursors"` + List []DtoStatusPage `json:"list"` + Meta ResponseAPIResponsePaginationMeta `json:"meta"` + } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest ResponseProblem if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest ResponseProblem if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest ResponseProblem if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON403 = &dest } return response, nil } -// ParseRunMonitorCheckResponse parses an HTTP response from a RunMonitorCheckWithResponse call -func ParseRunMonitorCheckResponse(rsp *http.Response) (*RunMonitorCheckResponse, error) { +// ParseCreateStatusPageResponse parses an HTTP response from a CreateStatusPageWithResponse call +func ParseCreateStatusPageResponse(rsp *http.Response) (*CreateStatusPageResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &RunMonitorCheckResponse{ + response := &CreateStatusPageResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest DtoCheckResult - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest ResponseProblem - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 402: - var dest ResponseProblem - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON402 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest ResponseProblem + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest DtoStatusPage if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest ResponseProblem if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest ResponseProblem if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePauseMonitorResponse parses an HTTP response from a PauseMonitorWithResponse call -func ParsePauseMonitorResponse(rsp *http.Response) (*PauseMonitorResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PauseMonitorResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest DtoMonitor - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest + response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 402: var dest ResponseProblem if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON402 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest ResponseProblem @@ -10322,50 +11460,32 @@ func ParsePauseMonitorResponse(rsp *http.Response) (*PauseMonitorResponse, error } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: var dest ResponseProblem if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON409 = &dest } return response, nil } -// ParseListMonitorResultsResponse parses an HTTP response from a ListMonitorResultsWithResponse call -func ParseListMonitorResultsResponse(rsp *http.Response) (*ListMonitorResultsResponse, error) { +// ParseDeleteStatusPageResponse parses an HTTP response from a DeleteStatusPageWithResponse call +func ParseDeleteStatusPageResponse(rsp *http.Response) (*DeleteStatusPageResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListMonitorResultsResponse{ + response := &DeleteStatusPageResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Cursors ResponseAPIResponsePaginationCursors `json:"cursors"` - List []DtoCheckResult `json:"list"` - Meta ResponseAPIResponsePaginationMeta `json:"meta"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest ResponseProblem - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest ResponseProblem if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -10392,22 +11512,22 @@ func ParseListMonitorResultsResponse(rsp *http.Response) (*ListMonitorResultsRes return response, nil } -// ParseResumeMonitorResponse parses an HTTP response from a ResumeMonitorWithResponse call -func ParseResumeMonitorResponse(rsp *http.Response) (*ResumeMonitorResponse, error) { +// ParseGetStatusPageResponse parses an HTTP response from a GetStatusPageWithResponse call +func ParseGetStatusPageResponse(rsp *http.Response) (*GetStatusPageResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ResumeMonitorResponse{ + response := &GetStatusPageResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest DtoMonitor + var dest DtoStatusPage if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -10439,22 +11559,22 @@ func ParseResumeMonitorResponse(rsp *http.Response) (*ResumeMonitorResponse, err return response, nil } -// ParseGetMonitorStatsResponse parses an HTTP response from a GetMonitorStatsWithResponse call -func ParseGetMonitorStatsResponse(rsp *http.Response) (*GetMonitorStatsResponse, error) { +// ParseUpdateStatusPageResponse parses an HTTP response from a UpdateStatusPageWithResponse call +func ParseUpdateStatusPageResponse(rsp *http.Response) (*UpdateStatusPageResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetMonitorStatsResponse{ + response := &UpdateStatusPageResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest DtoMonitorStats + var dest DtoStatusPage if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -10488,43 +11608,32 @@ func ParseGetMonitorStatsResponse(rsp *http.Response) (*GetMonitorStatsResponse, } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON409 = &dest + } return response, nil } -// ParseListMonitorStatusChangesResponse parses an HTTP response from a ListMonitorStatusChangesWithResponse call -func ParseListMonitorStatusChangesResponse(rsp *http.Response) (*ListMonitorStatusChangesResponse, error) { +// ParseDeleteStatusPageDomainResponse parses an HTTP response from a DeleteStatusPageDomainWithResponse call +func ParseDeleteStatusPageDomainResponse(rsp *http.Response) (*DeleteStatusPageDomainResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListMonitorStatusChangesResponse{ + response := &DeleteStatusPageDomainResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Cursors ResponseAPIResponsePaginationCursors `json:"cursors"` - List []DtoStatusChange `json:"list"` - Meta ResponseAPIResponsePaginationMeta `json:"meta"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest ResponseProblem - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest ResponseProblem if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -10551,77 +11660,73 @@ func ParseListMonitorStatusChangesResponse(rsp *http.Response) (*ListMonitorStat return response, nil } -// ParseListStatusPagesResponse parses an HTTP response from a ListStatusPagesWithResponse call -func ParseListStatusPagesResponse(rsp *http.Response) (*ListStatusPagesResponse, error) { +// ParseGetStatusPageDomainResponse parses an HTTP response from a GetStatusPageDomainWithResponse call +func ParseGetStatusPageDomainResponse(rsp *http.Response) (*GetStatusPageDomainResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListStatusPagesResponse{ + response := &GetStatusPageDomainResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Cursors ResponseAPIResponsePaginationCursors `json:"cursors"` - List []DtoStatusPage `json:"list"` - Meta ResponseAPIResponsePaginationMeta `json:"meta"` - } + var dest DtoStatusPageDomain if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest ResponseProblem if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest ResponseProblem if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest ResponseProblem if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON404 = &dest } return response, nil } -// ParseCreateStatusPageResponse parses an HTTP response from a CreateStatusPageWithResponse call -func ParseCreateStatusPageResponse(rsp *http.Response) (*CreateStatusPageResponse, error) { +// ParseSetStatusPageDomainResponse parses an HTTP response from a SetStatusPageDomainWithResponse call +func ParseSetStatusPageDomainResponse(rsp *http.Response) (*SetStatusPageDomainResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateStatusPageResponse{ + response := &SetStatusPageDomainResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest DtoStatusPage + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest DtoStatusPageDomain if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest ResponseProblem @@ -10651,6 +11756,13 @@ func ParseCreateStatusPageResponse(rsp *http.Response) (*CreateStatusPageRespons } response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: var dest ResponseProblem if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -10658,25 +11770,50 @@ func ParseCreateStatusPageResponse(rsp *http.Response) (*CreateStatusPageRespons } response.JSON409 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON503 = &dest + } return response, nil } -// ParseDeleteStatusPageResponse parses an HTTP response from a DeleteStatusPageWithResponse call -func ParseDeleteStatusPageResponse(rsp *http.Response) (*DeleteStatusPageResponse, error) { +// ParseListStatusPageIncidentsResponse parses an HTTP response from a ListStatusPageIncidentsWithResponse call +func ParseListStatusPageIncidentsResponse(rsp *http.Response) (*ListStatusPageIncidentsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteStatusPageResponse{ + response := &ListStatusPageIncidentsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Cursors ResponseAPIResponsePaginationCursors `json:"cursors"` + List []DtoStatusPageIncident `json:"list"` + Meta ResponseAPIResponsePaginationMeta `json:"meta"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest ResponseProblem if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -10703,26 +11840,33 @@ func ParseDeleteStatusPageResponse(rsp *http.Response) (*DeleteStatusPageRespons return response, nil } -// ParseGetStatusPageResponse parses an HTTP response from a GetStatusPageWithResponse call -func ParseGetStatusPageResponse(rsp *http.Response) (*GetStatusPageResponse, error) { +// ParseCreateStatusPageIncidentResponse parses an HTTP response from a CreateStatusPageIncidentWithResponse call +func ParseCreateStatusPageIncidentResponse(rsp *http.Response) (*CreateStatusPageIncidentResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetStatusPageResponse{ + response := &CreateStatusPageIncidentResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest DtoStatusPage + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest DtoStatusPageIncident if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest ResponseProblem @@ -10750,34 +11894,27 @@ func ParseGetStatusPageResponse(rsp *http.Response) (*GetStatusPageResponse, err return response, nil } -// ParseUpdateStatusPageResponse parses an HTTP response from a UpdateStatusPageWithResponse call -func ParseUpdateStatusPageResponse(rsp *http.Response) (*UpdateStatusPageResponse, error) { +// ParseGetStatusPageIncidentResponse parses an HTTP response from a GetStatusPageIncidentWithResponse call +func ParseGetStatusPageIncidentResponse(rsp *http.Response) (*GetStatusPageIncidentResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateStatusPageResponse{ + response := &GetStatusPageIncidentResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest DtoStatusPage + var dest DtoStatusPageIncident if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest ResponseProblem - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest ResponseProblem if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -10799,38 +11936,27 @@ func ParseUpdateStatusPageResponse(rsp *http.Response) (*UpdateStatusPageRespons } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: - var dest ResponseProblem - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON409 = &dest - } return response, nil } -// ParseListStatusPageIncidentsResponse parses an HTTP response from a ListStatusPageIncidentsWithResponse call -func ParseListStatusPageIncidentsResponse(rsp *http.Response) (*ListStatusPageIncidentsResponse, error) { +// ParseUpdateStatusPageIncidentResponse parses an HTTP response from a UpdateStatusPageIncidentWithResponse call +func ParseUpdateStatusPageIncidentResponse(rsp *http.Response) (*UpdateStatusPageIncidentResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListStatusPageIncidentsResponse{ + response := &UpdateStatusPageIncidentResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Cursors ResponseAPIResponsePaginationCursors `json:"cursors"` - List []DtoStatusPageIncident `json:"list"` - Meta ResponseAPIResponsePaginationMeta `json:"meta"` - } + var dest DtoStatusPageIncident if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -10869,15 +11995,15 @@ func ParseListStatusPageIncidentsResponse(rsp *http.Response) (*ListStatusPageIn return response, nil } -// ParseCreateStatusPageIncidentResponse parses an HTTP response from a CreateStatusPageIncidentWithResponse call -func ParseCreateStatusPageIncidentResponse(rsp *http.Response) (*CreateStatusPageIncidentResponse, error) { +// ParseCreateStatusPageIncidentUpdateResponse parses an HTTP response from a CreateStatusPageIncidentUpdateWithResponse call +func ParseCreateStatusPageIncidentUpdateResponse(rsp *http.Response) (*CreateStatusPageIncidentUpdateResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateStatusPageIncidentResponse{ + response := &CreateStatusPageIncidentUpdateResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -10918,27 +12044,34 @@ func ParseCreateStatusPageIncidentResponse(rsp *http.Response) (*CreateStatusPag } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest ResponseProblem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON409 = &dest + } return response, nil } -// ParseGetStatusPageIncidentResponse parses an HTTP response from a GetStatusPageIncidentWithResponse call -func ParseGetStatusPageIncidentResponse(rsp *http.Response) (*GetStatusPageIncidentResponse, error) { +// ParseGetStatusPageLayoutResponse parses an HTTP response from a GetStatusPageLayoutWithResponse call +func ParseGetStatusPageLayoutResponse(rsp *http.Response) (*GetStatusPageLayoutResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetStatusPageIncidentResponse{ + response := &GetStatusPageLayoutResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest DtoStatusPageIncident + var dest DtoStatusPageLayout if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -10970,22 +12103,22 @@ func ParseGetStatusPageIncidentResponse(rsp *http.Response) (*GetStatusPageIncid return response, nil } -// ParseUpdateStatusPageIncidentResponse parses an HTTP response from a UpdateStatusPageIncidentWithResponse call -func ParseUpdateStatusPageIncidentResponse(rsp *http.Response) (*UpdateStatusPageIncidentResponse, error) { +// ParseSetStatusPageLayoutResponse parses an HTTP response from a SetStatusPageLayoutWithResponse call +func ParseSetStatusPageLayoutResponse(rsp *http.Response) (*SetStatusPageLayoutResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateStatusPageIncidentResponse{ + response := &SetStatusPageLayoutResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest DtoStatusPageIncident + var dest DtoStatusPageLayout if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11024,34 +12157,20 @@ func ParseUpdateStatusPageIncidentResponse(rsp *http.Response) (*UpdateStatusPag return response, nil } -// ParseCreateStatusPageIncidentUpdateResponse parses an HTTP response from a CreateStatusPageIncidentUpdateWithResponse call -func ParseCreateStatusPageIncidentUpdateResponse(rsp *http.Response) (*CreateStatusPageIncidentUpdateResponse, error) { +// ParseDeleteStatusPageLogoResponse parses an HTTP response from a DeleteStatusPageLogoWithResponse call +func ParseDeleteStatusPageLogoResponse(rsp *http.Response) (*DeleteStatusPageLogoResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateStatusPageIncidentUpdateResponse{ + response := &DeleteStatusPageLogoResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest DtoStatusPageIncident - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest ResponseProblem - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest ResponseProblem if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11073,34 +12192,27 @@ func ParseCreateStatusPageIncidentUpdateResponse(rsp *http.Response) (*CreateSta } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: - var dest ResponseProblem - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON409 = &dest - } return response, nil } -// ParseGetStatusPageLayoutResponse parses an HTTP response from a GetStatusPageLayoutWithResponse call -func ParseGetStatusPageLayoutResponse(rsp *http.Response) (*GetStatusPageLayoutResponse, error) { +// ParseGetStatusPageLogoResponse parses an HTTP response from a GetStatusPageLogoWithResponse call +func ParseGetStatusPageLogoResponse(rsp *http.Response) (*GetStatusPageLogoResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetStatusPageLayoutResponse{ + response := &GetStatusPageLogoResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest DtoStatusPageLayout + var dest DtoStatusPageLogo if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11132,22 +12244,22 @@ func ParseGetStatusPageLayoutResponse(rsp *http.Response) (*GetStatusPageLayoutR return response, nil } -// ParseSetStatusPageLayoutResponse parses an HTTP response from a SetStatusPageLayoutWithResponse call -func ParseSetStatusPageLayoutResponse(rsp *http.Response) (*SetStatusPageLayoutResponse, error) { +// ParseSetStatusPageLogoResponse parses an HTTP response from a SetStatusPageLogoWithResponse call +func ParseSetStatusPageLogoResponse(rsp *http.Response) (*SetStatusPageLogoResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &SetStatusPageLayoutResponse{ + response := &SetStatusPageLogoResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest DtoStatusPageLayout + var dest DtoStatusPageLogo if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } diff --git a/specs/billing.openapi.json b/specs/billing.openapi.json index c04cb80..0ce9e7b 100644 --- a/specs/billing.openapi.json +++ b/specs/billing.openapi.json @@ -16,11 +16,15 @@ }, "constants.InvoiceStatus": { "enum": [ - "draft" + "draft", + "open", + "paid" ], "type": "string", "x-enum-varnames": [ - "InvoiceStatusDraft" + "InvoiceStatusDraft", + "InvoiceStatusOpen", + "InvoiceStatusPaid" ] }, "dto.BillingPlan": { @@ -45,9 +49,16 @@ "additionalProperties": { "type": "integer" }, - "description": "Entitlements maps entitlement keys to values (\"Up to N datasources\").", + "description": "Entitlements maps entitlement keys to values. Clients that show a plan\nshould use Features, which is already worded.", "type": "object" }, + "features": { + "description": "Features lists what the entitlements grant, resolved and ready to show,\nso a client needs no knowledge of entitlement keys. Only entitlements the\nplatform enforces for this plan's service appear here.", + "items": { + "$ref": "#/components/schemas/dto.BillingPlanFeature" + }, + "type": "array" + }, "highlighted": { "description": "Highlighted renders the \"Most popular\" treatment.", "example": false, @@ -71,6 +82,34 @@ }, "type": "object" }, + "dto.BillingPlanFeature": { + "properties": { + "key": { + "example": "max_monitors", + "type": "string" + }, + "label": { + "description": "Label names the setting, for comparing two plans side by side.", + "example": "Max monitors", + "type": "string" + }, + "line": { + "description": "Line is the sentence for the plan card.", + "example": "Up to 10 monitors", + "type": "string" + }, + "unit": { + "description": "Unit names what the value counts, in the plural.", + "example": "monitors", + "type": "string" + }, + "value": { + "example": 10, + "type": "integer" + } + }, + "type": "object" + }, "dto.BillingPlanQuota": { "properties": { "includedQuantity": { @@ -808,6 +847,7 @@ "UNAUTHORIZED", "INVALID_CREDENTIALS", "INSUFFICIENT_PERMISSIONS", + "INSUFFICIENT_SCOPE", "INVALID_PAYLOAD", "EMAIL_REQUIRED", "MISSING_NEW_PASSWORD", @@ -832,7 +872,11 @@ "NAME_TOO_LONG", "SLUG_TOO_LONG", "SERVICE_NOT_SUBSCRIBABLE", - "SUBSCRIPTION_CANCEL_NOT_ALLOWED" + "SUBSCRIPTION_CANCEL_NOT_ALLOWED", + "PAYMENT_IN_PROGRESS", + "NOTHING_TO_PAY", + "INVOICE_ALREADY_PAID", + "PAYMENT_METHOD_REQUIRED" ], "type": "string", "x-enum-varnames": [ @@ -845,6 +889,7 @@ "ErrUnauthorized", "ErrInvalidCredentials", "ErrInsufficientPermissions", + "ErrInsufficientScope", "ErrPayloadInvalid", "ErrEmailRequired", "ErrMissingNewPassword", @@ -869,7 +914,11 @@ "ErrNameTooLong", "ErrSlugTooLong", "ErrServiceNotSubscribable", - "ErrCancelNotAllowed" + "ErrCancelNotAllowed", + "ErrPaymentInProgress", + "ErrNothingToPay", + "ErrInvoiceAlreadyPaid", + "ErrPaymentMethodRequired" ] }, "service.AccountStatusOutput": { @@ -1640,7 +1689,7 @@ }, "/billing/sca-reauth/{invoiceId}": { "post": { - "description": "Creates a fresh on-session PaymentIntent against the org's default payment method for the given invoice. The frontend confirms it with Stripe Elements (`stripe.confirmCardPayment(clientSecret)`), which triggers the 3DS challenge inline. On success the webhook updates the charge_attempts row and marks the invoice paid. Used by the dunning email link for SCA-failed off-session charges.", + "description": "Returns the PaymentIntent the customer confirms to pay the invoice on-session, against the org's default payment method. The frontend confirms it with Stripe Elements (`stripe.confirmCardPayment(clientSecret)`), which triggers the 3DS challenge inline. On success the webhook updates the charge_attempts row and marks the invoice paid. An invoice has one confirmable PaymentIntent at a time: repeated calls return the same one (a new one only after a card change or cancellation). 409 PAYMENT_IN_PROGRESS while a payment is being created or processed (retry shortly), 409 INVOICE_ALREADY_PAID once it is paid, 409 NOTHING_TO_PAY when nothing is due. Used by the dunning email link for SCA-failed off-session charges.", "operationId": "createSCAReauthPaymentIntent", "parameters": [ { @@ -1684,6 +1733,16 @@ }, "description": "Not Found" }, + "409": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.APIError" + } + } + }, + "description": "Conflict" + }, "500": { "content": { "application/json": { @@ -1920,7 +1979,7 @@ ] }, "put": { - "description": "Subscribes the organization to the given plan code. The target service is the PLAN's service: if the organization already has a subscription there, its plan is changed (upgrade/downgrade) mid-period; otherwise a new subscription is created. Only public plans of plans/choice-mode services are selectable (409 SERVICE_NOT_SUBSCRIBABLE for metered services, 404 for hidden plans). Entitlements sync to the limits service asynchronously.", + "description": "Subscribes the organization to the given plan code. The target service is the PLAN's service: if the organization already has a subscription there, its plan is changed (upgrade/downgrade) mid-period; otherwise a new subscription is created. Only public plans of plans/choice-mode services are selectable (409 SERVICE_NOT_SUBSCRIBABLE for metered services, 404 for hidden plans). A plan priced above zero needs a card on file or bank-transfer billing (402 PAYMENT_METHOD_REQUIRED). Entitlements sync to the limits service asynchronously.", "operationId": "updateSubscription", "requestBody": { "content": { @@ -1955,6 +2014,16 @@ }, "description": "Bad Request" }, + "402": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.APIError" + } + } + }, + "description": "Payment Required" + }, "404": { "content": { "application/json": { diff --git a/specs/domainradar.openapi.json b/specs/domainradar.openapi.json index 8c6e448..1a923c6 100644 --- a/specs/domainradar.openapi.json +++ b/specs/domainradar.openapi.json @@ -367,6 +367,75 @@ }, "type": "object" }, + "dto.ExpiryAlerts": { + "properties": { + "enabled": { + "type": "boolean" + }, + "expiryThresholdsDays": { + "example": [ + 30, + 14, + 7 + ], + "items": { + "type": "integer" + }, + "type": "array" + }, + "lastCheckedAt": { + "type": "string" + }, + "lastErrorKind": { + "description": "LastErrorKind explains a non-up status, e.g. domain_expiring,\ndomain_expiry_unknown, domain_lookup_failed.", + "example": "domain_expiring", + "type": "string" + }, + "monitorId": { + "description": "The fields below are present when enabled.", + "format": "uuid", + "type": "string" + }, + "status": { + "enum": [ + "pending", + "up", + "degraded", + "down", + "paused" + ], + "type": "string" + } + }, + "required": [ + "enabled" + ], + "type": "object" + }, + "dto.ExpiryAlertsUpdate": { + "properties": { + "enabled": { + "example": true, + "type": "boolean" + }, + "expiryThresholdsDays": { + "description": "Days before expiry to warn at; required when enabling ([] warns only\nonce the domain has expired). Norcube Monitor allows up to 5, each 1-365.", + "example": [ + 30, + 14, + 7 + ], + "items": { + "type": "integer" + }, + "type": "array" + } + }, + "required": [ + "enabled" + ], + "type": "object" + }, "dto.GeneratedName": { "properties": { "length": { @@ -694,7 +763,10 @@ "MISSING_USER_ID", "ORG_BLOCKED", "TOO_MANY_REQUESTS", - "INSUFFICIENT_SCOPE" + "INSUFFICIENT_SCOPE", + "LIMIT_REACHED", + "MONITOR_ACCESS_DENIED", + "UNAVAILABLE" ], "type": "string", "x-enum-varnames": [ @@ -709,7 +781,10 @@ "ErrMissingUserID", "ErrOrgBlocked", "ErrTooManyRequests", - "ErrInsufficientScope" + "ErrInsufficientScope", + "ErrLimitReached", + "ErrMonitorAccessDenied", + "ErrUnavailable" ] }, "saveddomainhandler.saveRequest": { @@ -2161,6 +2236,162 @@ ] } }, + "/domains/saved/{domain}/expiry-alerts": { + "get": { + "description": "Whether Norcube Monitor watches this saved domain's expiry, and the monitor's current status. Needs Norcube Monitor read access (monitor:GetMonitor) as well.", + "operationId": "getSavedDomainExpiryAlerts", + "parameters": [ + { + "description": "Domain name", + "in": "path", + "name": "domain", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dto.ExpiryAlerts" + } + } + }, + "description": "OK" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.APIError" + } + } + }, + "description": "No Norcube Monitor access (MONITOR_ACCESS_DENIED)" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.APIError" + } + } + }, + "description": "Domain isn't saved" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.APIError" + } + } + }, + "description": "Norcube Monitor unavailable" + } + }, + "summary": "Get a saved domain's expiry alerts", + "tags": [ + "Saved Domains" + ] + }, + "put": { + "description": "Turning alerts on creates (or updates) a Norcube Monitor domain monitor for this saved domain; it counts toward the org's Norcube Monitor monitors and is billed as Norcube Monitor domain checks. Turning them off, or removing the saved domain, deletes it. Needs Norcube Monitor access (monitor:CreateMonitor / UpdateMonitor) as well. Idempotent.", + "operationId": "setSavedDomainExpiryAlerts", + "parameters": [ + { + "description": "Domain name", + "in": "path", + "name": "domain", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dto.ExpiryAlertsUpdate" + } + } + }, + "description": "Alert settings", + "required": true, + "x-originalParamName": "payload" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dto.ExpiryAlerts" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.APIError" + } + } + }, + "description": "Bad Request" + }, + "402": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.APIError" + } + } + }, + "description": "Organization blocked for unpaid invoices" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.APIError" + } + } + }, + "description": "No Norcube Monitor access (MONITOR_ACCESS_DENIED) or monitor limit reached (LIMIT_REACHED)" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.APIError" + } + } + }, + "description": "Domain isn't saved" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.APIError" + } + } + }, + "description": "Norcube Monitor unavailable" + } + }, + "summary": "Turn a saved domain's expiry alerts on or off", + "tags": [ + "Saved Domains" + ] + } + }, "/name-generator/jobs": { "get": { "description": "Returns a cursor-paginated list of name generation jobs for the authenticated organization.", diff --git a/specs/langsync.openapi.json b/specs/langsync.openapi.json index 482e539..8e545e1 100644 --- a/specs/langsync.openapi.json +++ b/specs/langsync.openapi.json @@ -1681,7 +1681,7 @@ "name": "Jan Švábík" }, "description": "This is the API for JDS LangSync service.", - "title": "JDS LangSync API", + "title": "Norcube LangSync API", "version": "" }, "openapi": "3.0.3", @@ -5059,7 +5059,7 @@ }, "/translations/custom-prompts": { "get": { - "description": "Retrieves a list of custom prompts for the organization.", + "description": "Retrieves the organization's shared custom prompts and the caller's own private ones.", "operationId": "listCustomPrompts", "responses": { "200": { diff --git a/specs/monitor.openapi.json b/specs/monitor.openapi.json index 9582acb..8f27000 100644 --- a/specs/monitor.openapi.json +++ b/specs/monitor.openapi.json @@ -44,7 +44,11 @@ "ALERT_CHANNEL_LIMIT", "UNVERIFIED_CHANNEL_LIMIT", "STATUS_PAGE_LIMIT", + "STATUS_PAGE_DOMAIN_LIMIT", "SLUG_TAKEN", + "DOMAIN_TAKEN", + "DOMAINS_DISABLED", + "DOMAIN_NOT_SET", "INCIDENT_RESOLVED", "MISSING_ORGANIZATION_ID", "INSUFFICIENT_SCOPE", @@ -64,7 +68,11 @@ "ErrorReasonAlertChannelLimit", "ErrorReasonUnverifiedChannelLimit", "ErrorReasonStatusPageLimit", + "ErrorReasonStatusPageDomainLimit", "ErrorReasonSlugTaken", + "ErrorReasonDomainTaken", + "ErrorReasonDomainsDisabled", + "ErrorReasonDomainNotSet", "ErrorReasonIncidentResolved", "ErrorReasonMissingOrganizationID", "ErrorReasonInsufficientScope", @@ -2514,6 +2522,11 @@ "description": "AsOf is when the content last changed.", "type": "string" }, + "canonicalUrl": { + "description": "CanonicalURL is the page's address on its active custom domain, where\nsearch engines should credit it.", + "example": "https://status.acme.com", + "type": "string" + }, "components": { "items": { "$ref": "#/components/schemas/dto.PublicStatusComponent" @@ -2543,6 +2556,22 @@ ], "type": "string" }, + "logo": { + "description": "Logo and LogoDark hold the images as data URIs where there is no public\nfile: a draft's snapshot, and the dashboard's preview.", + "type": "string" + }, + "logoDark": { + "type": "string" + }, + "logoDarkFile": { + "example": "fedcba9876543210fedcba9876543210.svg", + "type": "string" + }, + "logoFile": { + "description": "LogoFile and LogoDarkFile name a published page's logo images, each a file\nthe renderer serves at \u003cpage\u003e/logo/\u003cname\u003e: a hash of the content and an\nextension. Left out when it has none; LogoDarkFile is for dark mode.", + "example": "0123456789abcdef0123456789abcdef.png", + "type": "string" + }, "name": { "example": "Acme status", "type": "string" @@ -2850,6 +2879,11 @@ "createdAt": { "type": "string" }, + "customDomain": { + "description": "CustomDomain is the page's custom domain once active. URL keeps working\nbeside it; GET /status-pages/{id}/domain tells about one still pending.", + "example": "status.acme.com", + "type": "string" + }, "description": { "type": "string" }, @@ -3006,6 +3040,105 @@ ], "type": "object" }, + "dto.StatusPageDomain": { + "properties": { + "createdAt": { + "type": "string" + }, + "error": { + "description": "Error is what is wrong, while there is something.", + "type": "string" + }, + "errorCode": { + "description": "ErrorCode: DOMAIN_TAKEN when another status page proved this hostname first.\nThe claim stays pending, in case they let it go.", + "enum": [ + "DOMAIN_TAKEN" + ], + "type": "string" + }, + "hostname": { + "example": "status.acme.com", + "type": "string" + }, + "lastCheckedAt": { + "type": "string" + }, + "records": { + "description": "Records are what the customer adds to their DNS.", + "items": { + "$ref": "#/components/schemas/dto.StatusPageDomainRecord" + }, + "type": "array" + }, + "status": { + "description": "Status: pending_ownership until the TXT record proves the organization owns\nthe hostname; pending_dns until Cloudflare sees the CNAME;\npending_certificate until the certificate is live; then active. failed\nmeans given up: set the domain again to start over.", + "enum": [ + "pending_ownership", + "pending_dns", + "pending_certificate", + "active", + "failed" + ], + "type": "string" + }, + "updatedAt": { + "type": "string" + } + }, + "required": [ + "createdAt", + "hostname", + "records", + "status", + "updatedAt" + ], + "type": "object" + }, + "dto.StatusPageDomainRecord": { + "properties": { + "name": { + "example": "status.acme.com", + "type": "string" + }, + "required": { + "description": "Required false: not needed now. The ownership TXT record stops being\nrequired once the domain is active (it is needed again if the domain ever\nfalls back to pending), and Cloudflare's own TXT record only helps verify the\nhostname before moving the CNAME.", + "type": "boolean" + }, + "type": { + "enum": [ + "CNAME", + "TXT" + ], + "example": "CNAME", + "type": "string" + }, + "value": { + "example": "custom.norcubestatus.com", + "type": "string" + } + }, + "required": [ + "name", + "required", + "type", + "value" + ], + "type": "object" + }, + "dto.StatusPageDomainSet": { + "properties": { + "hostname": { + "description": "Hostname is a subdomain the customer controls, not an apex.", + "example": "status.acme.com", + "maxLength": 253, + "type": "string" + } + }, + "required": [ + "hostname" + ], + "type": "object" + }, "dto.StatusPageGroup": { "properties": { "collapsed": { @@ -3290,6 +3423,34 @@ ], "type": "object" }, + "dto.StatusPageLogo": { + "properties": { + "dark": { + "type": "string" + }, + "light": { + "example": "data:image/svg+xml;base64,PHN2Zy8+", + "type": "string" + } + }, + "type": "object" + }, + "dto.StatusPageLogoSet": { + "properties": { + "dark": { + "description": "Dark is the image for dark mode, in the same form.", + "type": "string" + }, + "light": { + "description": "Light is the image, base64 encoded: PNG, JPEG, WebP or SVG, at most 48 KB.", + "type": "string" + } + }, + "required": [ + "light" + ], + "type": "object" + }, "dto.StatusPagePreviewLink": { "properties": { "expiresAt": { @@ -6416,7 +6577,7 @@ ] }, "post": { - "description": "Creates a page, unpublished: add components with PUT layout, check it with a preview link, then publish it. The slug is its public address and must be free: 409 with reason SLUG_TAKEN. Past the plan's limit: 403 with reason STATUS_PAGE_LIMIT. An organization with unpaid invoices: 402.", + "description": "Creates a page, unpublished: add components with PUT layout, check it with a preview link, then publish it. The slug is its public address and must be free: 409 with reason SLUG_TAKEN. Past the organization's limit: 403 with reason STATUS_PAGE_LIMIT. An organization with unpaid invoices: 402.", "operationId": "createStatusPage", "requestBody": { "content": { @@ -6727,10 +6888,10 @@ ] } }, - "/status-pages/{id}/incidents": { - "get": { - "description": "The incidents posted on this page, newest first, with their updates. These are public posts, not the monitors' own incidents.", - "operationId": "listStatusPageIncidents", + "/status-pages/{id}/domain": { + "delete": { + "description": "The page stops serving on the hostname within about a minute; its default address keeps working.", + "operationId": "deleteStatusPageDomain", "parameters": [ { "description": "Status page ID", @@ -6741,32 +6902,62 @@ "format": "uuid", "type": "string" } + } + ], + "responses": { + "204": { + "description": "No Content" }, - { - "in": "query", - "name": "cursor", - "schema": { - "type": "string" - } + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.Problem" + } + } + }, + "description": "Missing, invalid or expired token (UNAUTHORIZED)" }, - { - "in": "query", - "name": "limit", - "schema": { - "maximum": 100, - "minimum": 1, - "type": "integer" - } + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.Problem" + } + } + }, + "description": "No permission for this (FORBIDDEN), or the token's scopes don't allow this (reason INSUFFICIENT_SCOPE)" }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.Problem" + } + } + }, + "description": "Not Found" + } + }, + "summary": "Remove a status page's custom domain", + "tags": [ + "Status pages" + ], + "x-norcube-scopes": [ + "monitor.statuspages" + ] + }, + "get": { + "description": "The page's custom domain, the DNS records it needs, where it stands (status pending_ownership, pending_dns, pending_certificate, active or failed) and what is wrong. errorCode DOMAIN_TAKEN means another status page proved this hostname first; the claim waits in case they let it go. 404 with reason DOMAIN_NOT_SET when the page has none.", + "operationId": "getStatusPageDomain", + "parameters": [ { - "description": "Status filters on open or resolved.", - "in": "query", - "name": "status", + "description": "Status page ID", + "in": "path", + "name": "id", + "required": true, "schema": { - "enum": [ - "open", - "resolved" - ], + "format": "uuid", "type": "string" } } @@ -6776,37 +6967,12 @@ "content": { "application/json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/response.APIResponseWithPagination" - }, - { - "properties": { - "list": { - "items": { - "$ref": "#/components/schemas/dto.StatusPageIncident" - }, - "type": "array" - } - }, - "type": "object" - } - ] + "$ref": "#/components/schemas/dto.StatusPageDomain" } } }, "description": "OK" }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/response.Problem" - } - } - }, - "description": "Bad Request" - }, "401": { "content": { "application/json": { @@ -6838,7 +7004,7 @@ "description": "Not Found" } }, - "summary": "List a status page's posted incidents", + "summary": "Get a status page's custom domain", "tags": [ "Status pages" ], @@ -6850,9 +7016,9 @@ "monitor.statuspages" ] }, - "post": { - "description": "Posts an incident with its first update. Public as soon as it is posted (within a minute) when the page is published. While it is open, the components it names show the status it gives them.", - "operationId": "createStatusPageIncident", + "put": { + "description": "Claims a subdomain as this page's custom domain, replacing the one it had, and answers the DNS records to add. The TXT record proves the organization owns the hostname; only then does anything happen at Cloudflare. The page starts serving there once Cloudflare has also verified the CNAME and issued the certificate; its default address keeps working. Setting the same hostname again changes nothing, unless it failed: that starts it over with the same token. An unproven claim blocks nobody and fails after 14 days. An active custom domain is billed per month, by its share of the month. 403 LIMIT_REACHED with reason STATUS_PAGE_DOMAIN_LIMIT at the organization's limit of custom domains (10 unless raised), 409 with reason DOMAIN_TAKEN when another status page has proved the hostname, DOMAINS_DISABLED where custom domains aren't set up.", + "operationId": "setStatusPageDomain", "parameters": [ { "description": "Status page ID", @@ -6869,24 +7035,24 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dto.StatusPageIncidentCreate" + "$ref": "#/components/schemas/dto.StatusPageDomainSet" } } }, - "description": "The post", + "description": "The hostname", "required": true, "x-originalParamName": "body" }, "responses": { - "201": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/dto.StatusPageIncident" + "$ref": "#/components/schemas/dto.StatusPageDomain" } } }, - "description": "Created" + "description": "OK" }, "400": { "content": { @@ -6908,6 +7074,16 @@ }, "description": "Missing, invalid or expired token (UNAUTHORIZED)" }, + "402": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.Problem" + } + } + }, + "description": "Payment Required" + }, "403": { "content": { "application/json": { @@ -6916,7 +7092,7 @@ } } }, - "description": "No permission for this (FORBIDDEN), or the token's scopes don't allow this (reason INSUFFICIENT_SCOPE)" + "description": "No permission for this (FORBIDDEN), the token's scopes don't allow this (reason INSUFFICIENT_SCOPE), or the organization's limit of custom domains (LIMIT_REACHED)" }, "404": { "content": { @@ -6927,9 +7103,29 @@ } }, "description": "Not Found" + }, + "409": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.Problem" + } + } + }, + "description": "Conflict" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.Problem" + } + } + }, + "description": "Couldn't check the organization's limits" } }, - "summary": "Post an incident on a status page", + "summary": "Set a status page's custom domain", "tags": [ "Status pages" ], @@ -6938,10 +7134,10 @@ ] } }, - "/status-pages/{id}/incidents/{incidentId}": { + "/status-pages/{id}/incidents": { "get": { - "description": "One post with its updates, the components it affects and the monitor incidents it links to.", - "operationId": "getStatusPageIncident", + "description": "The incidents posted on this page, newest first, with their updates. These are public posts, not the monitors' own incidents.", + "operationId": "listStatusPageIncidents", "parameters": [ { "description": "Status page ID", @@ -6954,21 +7150,232 @@ } }, { - "description": "Posted incident ID", - "in": "path", - "name": "incidentId", - "required": true, + "in": "query", + "name": "cursor", "schema": { - "format": "uuid", "type": "string" } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { + }, + { + "in": "query", + "name": "limit", + "schema": { + "maximum": 100, + "minimum": 1, + "type": "integer" + } + }, + { + "description": "Status filters on open or resolved.", + "in": "query", + "name": "status", + "schema": { + "enum": [ + "open", + "resolved" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/response.APIResponseWithPagination" + }, + { + "properties": { + "list": { + "items": { + "$ref": "#/components/schemas/dto.StatusPageIncident" + }, + "type": "array" + } + }, + "type": "object" + } + ] + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.Problem" + } + } + }, + "description": "Bad Request" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.Problem" + } + } + }, + "description": "Missing, invalid or expired token (UNAUTHORIZED)" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.Problem" + } + } + }, + "description": "No permission for this (FORBIDDEN), or the token's scopes don't allow this (reason INSUFFICIENT_SCOPE)" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.Problem" + } + } + }, + "description": "Not Found" + } + }, + "summary": "List a status page's posted incidents", + "tags": [ + "Status pages" + ], + "x-norcube-scopes": [ + "monitor.read", + "monitor.check", + "monitor.write", + "monitor.channels", + "monitor.statuspages" + ] + }, + "post": { + "description": "Posts an incident with its first update. Public as soon as it is posted (within a minute) when the page is published. While it is open, the components it names show the status it gives them.", + "operationId": "createStatusPageIncident", + "parameters": [ + { + "description": "Status page ID", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dto.StatusPageIncidentCreate" + } + } + }, + "description": "The post", + "required": true, + "x-originalParamName": "body" + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dto.StatusPageIncident" + } + } + }, + "description": "Created" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.Problem" + } + } + }, + "description": "Bad Request" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.Problem" + } + } + }, + "description": "Missing, invalid or expired token (UNAUTHORIZED)" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.Problem" + } + } + }, + "description": "No permission for this (FORBIDDEN), or the token's scopes don't allow this (reason INSUFFICIENT_SCOPE)" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.Problem" + } + } + }, + "description": "Not Found" + } + }, + "summary": "Post an incident on a status page", + "tags": [ + "Status pages" + ], + "x-norcube-scopes": [ + "monitor.statuspages" + ] + } + }, + "/status-pages/{id}/incidents/{incidentId}": { + "get": { + "description": "One post with its updates, the components it affects and the monitor incidents it links to.", + "operationId": "getStatusPageIncident", + "parameters": [ + { + "description": "Status page ID", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "description": "Posted incident ID", + "in": "path", + "name": "incidentId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/dto.StatusPageIncident" } } @@ -7383,6 +7790,222 @@ ] } }, + "/status-pages/{id}/logo": { + "delete": { + "description": "The page shows its name again within a minute.", + "operationId": "deleteStatusPageLogo", + "parameters": [ + { + "description": "Status page ID", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.Problem" + } + } + }, + "description": "Missing, invalid or expired token (UNAUTHORIZED)" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.Problem" + } + } + }, + "description": "No permission for this (FORBIDDEN), or the token's scopes don't allow this (reason INSUFFICIENT_SCOPE)" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.Problem" + } + } + }, + "description": "Not Found" + } + }, + "summary": "Remove a status page's logo", + "tags": [ + "Status pages" + ], + "x-norcube-scopes": [ + "monitor.statuspages" + ] + }, + "get": { + "description": "The page's logo as data URIs; empty when it has none.", + "operationId": "getStatusPageLogo", + "parameters": [ + { + "description": "Status page ID", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dto.StatusPageLogo" + } + } + }, + "description": "OK" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.Problem" + } + } + }, + "description": "Missing, invalid or expired token (UNAUTHORIZED)" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.Problem" + } + } + }, + "description": "No permission for this (FORBIDDEN), or the token's scopes don't allow this (reason INSUFFICIENT_SCOPE)" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.Problem" + } + } + }, + "description": "Not Found" + } + }, + "summary": "Get a status page's logo", + "tags": [ + "Status pages" + ], + "x-norcube-scopes": [ + "monitor.read", + "monitor.check", + "monitor.write", + "monitor.channels", + "monitor.statuspages" + ] + }, + "put": { + "description": "Replaces the page's logo, shown in place of its name. Images are base64 encoded PNG, JPEG, WebP or SVG, at most 48 KB each; the type comes from the bytes. A dark image left out removes the one the page had. The public page shows it within a minute.", + "operationId": "setStatusPageLogo", + "parameters": [ + { + "description": "Status page ID", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dto.StatusPageLogoSet" + } + } + }, + "description": "The logo", + "required": true, + "x-originalParamName": "body" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dto.StatusPageLogo" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.Problem" + } + } + }, + "description": "Bad Request" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.Problem" + } + } + }, + "description": "Missing, invalid or expired token (UNAUTHORIZED)" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.Problem" + } + } + }, + "description": "No permission for this (FORBIDDEN), or the token's scopes don't allow this (reason INSUFFICIENT_SCOPE)" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/response.Problem" + } + } + }, + "description": "Not Found" + } + }, + "summary": "Set a status page's logo", + "tags": [ + "Status pages" + ], + "x-norcube-scopes": [ + "monitor.statuspages" + ] + } + }, "/status-pages/{id}/preview": { "get": { "description": "Exactly what the public would get for this page right now, published or not: the page snapshot and the incident history.", diff --git a/specs/snapdb.openapi.json b/specs/snapdb.openapi.json index 56c82cd..f517a73 100644 --- a/specs/snapdb.openapi.json +++ b/specs/snapdb.openapi.json @@ -2170,7 +2170,7 @@ "name": "Jan Švábík" }, "description": "This documents the backend service used by the frontend platform.", - "title": "JDS Backup App Backend", + "title": "Norcube Backup API", "version": "" }, "openapi": "3.0.3",